@nice2dev/ui 1.4.26 → 1.4.27

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@nice2dev/ui-core"),Ft=require("./core-lBFqvT0V.cjs"),r=require("react"),Oe=require("./no-code-DPc82kyy.cjs"),dt=require("./NiceForm-DM2tARZT.cjs"),Vt=require("./pickerCommons-CQnae2FM.cjs"),bn=require("./NiceColorPicker-79rkvaSk.cjs"),it=require("./NiceMention-D330ovOt.cjs"),Zl=require("./NiceHtmlEditor-BEWNA_UI.cjs"),pi=require("./NiceCodeEditor-CBgbzwjx.cjs"),Be=require("./NiceModuleLifecyclePanel-bsHwj1pO.cjs"),Fe=require("./NiceButton-DzCqkG5a.cjs"),At=require("./NiceScheduler-Dff8fuq_.cjs"),Wn=require("./NicePivotGrid-D53CQ2cY.cjs"),e=require("react/jsx-runtime"),Fr=require("react-dom"),ft=require("./NiceSavedQueryPanel-DJKEOqy5.cjs"),_t=require("./devops-o6Zm0VKB.cjs"),hn=require("./NiceAlert-RVTgQxCE.cjs"),Fi=require("./NiceModal-BRVzjuUN.cjs"),qt=require("./NiceLoginForm-Bkm5j80r.cjs"),qr=require("./NicePagination-CnKYyKI5.cjs"),fn=require("./NiceDataGrid-Cszjz8NV.cjs"),Ze=require("./charts-CSgOgfES.cjs"),kt=require("./NiceWindow-DQyf5wat.cjs"),ed=require("./NiceGantt-Drl4gvw9.cjs"),Tn=require("./injectStyleOnce-DeWaxcdf.cjs"),Vr=require("@nice2dev/i18n"),wh=require("./NiceDocumentViewer-CDXAmPp7.cjs"),En=require("./core-lazy-sO0xvg64.cjs"),qi=require("./data-branching-7rpktFJ-.cjs");function td({className:t="",size:n="md",showTooltip:i=!0,showLabel:a=!0,onClick:s,label:o,tooltipPosition:c="bottom"}){const{t:d}=l.useNiceTranslation(),{badgeInfo:p,isLoading:m}=Ft.useTracelessPolicySafe(),[h,u]=r.useState(!1),x={sm:"nice-traceless-badge--sm",md:"nice-traceless-badge--md",lg:"nice-traceless-badge--lg"},f=o||p.label;return r.createElement("div",{className:`nice-traceless-badge ${p.cssClass} ${x[n]} ${t}`.trim(),onClick:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),role:s?"button":"status",tabIndex:s?0:void 0,onKeyDown:s?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),s())}:void 0,"aria-label":d("traceless.badgeAria","Privacy mode: {mode}").replace("{mode}",f),style:{display:"inline-flex",alignItems:"center",gap:"0.375rem",padding:n==="sm"?"0.25rem 0.5rem":n==="lg"?"0.5rem 1rem":"0.375rem 0.75rem",borderRadius:"9999px",fontSize:n==="sm"?"0.75rem":n==="lg"?"1rem":"0.875rem",fontWeight:500,backgroundColor:`${p.color}20`,color:p.color,border:`1px solid ${p.color}40`,cursor:s?"pointer":"default",transition:"all 0.2s ease",position:"relative",userSelect:"none"}},r.createElement("span",{"aria-hidden":!0},r.createElement(l.NiceIcon,{name:m?"clock":p.icon,size:14})),a&&r.createElement("span",null,f),i&&h&&r.createElement("div",{role:"tooltip",style:{position:"absolute",[c==="top"?"bottom":c==="bottom"?"top":c==="left"?"right":"left"]:"100%",[c==="top"||c==="bottom"?"left":"top"]:"50%",transform:c==="top"||c==="bottom"?"translateX(-50%)":"translateY(-50%)",marginTop:c==="bottom"?"0.5rem":void 0,marginBottom:c==="top"?"0.5rem":void 0,marginLeft:c==="right"?"0.5rem":void 0,marginRight:c==="left"?"0.5rem":void 0,padding:"0.5rem 0.75rem",backgroundColor:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #fff)",borderRadius:"0.375rem",fontSize:"0.75rem",whiteSpace:"nowrap",zIndex:50,boxShadow:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",maxWidth:"280px",textAlign:"left"}},p.tooltip))}function kh({className:t="",showReport:n=!0,showAudit:i=!0,showModeSelector:a=!0,availableModes:s=["traceless","ephemeral","private"],onModeChange:o}){const{t:c}=l.useNiceTranslation(),{policy:d,badgeInfo:p,setUserPreference:m,generateReport:h}=Ft.useTracelessPolicySafe(),{result:u,run:x}=Ft.useStorageAudit(),[f,b]=r.useState(null),g=r.useCallback(w=>{m({preferredMode:w}),o?.(w)},[m,o]),v=r.useCallback(()=>{b(h())},[h]),y={traceless:c("traceless.mode.traceless","Traceless"),ephemeral:c("traceless.mode.ephemeral","Ephemeral"),private:c("traceless.mode.private","Private"),balanced:c("traceless.mode.balanced","Balanced"),full:c("traceless.mode.full","Full"),custom:c("traceless.mode.custom","Custom")},C={traceless:c("traceless.modeDesc.traceless","Zero storage. Maximum privacy. Data resets on every page load."),ephemeral:c("traceless.modeDesc.ephemeral","Session-only. Data clears when you close the tab."),private:c("traceless.modeDesc.private","Minimal storage with secure authentication."),balanced:c("traceless.modeDesc.balanced","Local preferences saved. No tracking cookies."),full:c("traceless.modeDesc.full","All storage enabled with consent controls."),custom:c("traceless.modeDesc.custom","Custom configuration.")};return r.createElement("div",{className:`nice-traceless-panel ${t}`.trim(),style:{padding:"1.5rem",backgroundColor:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"0.75rem",border:"1px solid var(--nice-border-color, #e5e7eb)"}},r.createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",marginBottom:"1.5rem"}},r.createElement(td,{size:"lg",showTooltip:!1}),r.createElement("div",null,r.createElement("h3",{style:{margin:0,fontSize:"1.125rem",fontWeight:600}},c("traceless.title","Privacy Settings")),r.createElement("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--nice-text-muted, #6b7280)"}},C[d.effectiveMode]))),a&&r.createElement("div",{style:{marginBottom:"1.5rem"}},r.createElement("label",{style:{display:"block",marginBottom:"0.5rem",fontWeight:500}},c("traceless.level","Privacy Level")),r.createElement("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"}},s.map(w=>r.createElement("button",{key:w,onClick:()=>g(w),style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:d.effectiveMode===w?"2px solid var(--nice-primary, #3b82f6)":"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:d.effectiveMode===w?"var(--nice-info-bg, #eff6ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",fontWeight:d.effectiveMode===w?600:400}},y[w])))),r.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1rem",marginBottom:"1.5rem"}},r.createElement(Ms,{title:c("traceless.cookies","Cookies"),allowed:d.cookiesAllowed,icon:r.createElement(l.NiceIcon,{name:"file",size:24})}),r.createElement(Ms,{title:"localStorage",allowed:d.localStorageAllowed,icon:r.createElement(l.NiceIcon,{name:"save",size:24})}),r.createElement(Ms,{title:"sessionStorage",allowed:d.sessionStorageAllowed,icon:r.createElement(l.NiceIcon,{name:"clipboard",size:24})})),r.createElement("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap"}},i&&r.createElement("button",{onClick:x,style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:"search",size:16}),c("traceless.runAudit","Run Audit")),n&&r.createElement("button",{onClick:v,style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:"file",size:16}),c("traceless.generateReport","Generate Report"))),u&&r.createElement("div",{style:{marginTop:"1rem",padding:"1rem",backgroundColor:u.compliant?"var(--nice-success-bg, #ecfdf5)":"var(--nice-danger-bg, #fef2f2)",borderRadius:"0.5rem",border:`1px solid ${u.compliant?"var(--nice-color-success, #10b981)":"var(--nice-color-error, #ef4444)"}`}},r.createElement("p",{style:{margin:0,fontWeight:500,color:u.compliant?"var(--nice-success, #059669)":"var(--nice-color-error, #dc2626)",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:u.compliant?"check":"close",size:16}),u.compliant?c("traceless.compliant","Compliant"):c("traceless.violations","Violations Found")),!u.compliant&&u.violations.map((w,E)=>r.createElement("p",{key:E,style:{margin:"0.5rem 0 0",fontSize:"0.875rem"}},`• ${w.message}`))),f&&r.createElement("div",{style:{marginTop:"1rem",padding:"1rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)"}},r.createElement("h4",{style:{margin:"0 0 0.5rem",fontSize:"0.875rem",fontWeight:600}},c("traceless.statement","Compliance Statement")),r.createElement("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--nice-text-secondary, #4b5563)"}},f.statement)))}function Ms({title:t,allowed:n,icon:i}){const{t:a}=l.useNiceTranslation();return r.createElement("div",{style:{padding:"0.75rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #e5e7eb)",textAlign:"center"}},r.createElement("div",{style:{fontSize:"1.5rem",marginBottom:"0.25rem"}},i),r.createElement("div",{style:{fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem"}},t),r.createElement("div",{style:{fontSize:"0.75rem",color:n?"var(--nice-color-success, #10b981)":"var(--nice-text-muted, #6b7280)",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"0.25rem"}},r.createElement(l.NiceIcon,{name:n?"check":"close",size:12}),n?a("enabled","Enabled"):a("disabled","Disabled")))}function Ch({className:t="",position:n="bottom",onAccept:i,onDecline:a,onCustomize:s,privacyPolicyUrl:o,acceptText:c,declineText:d}){const{t:p}=l.useNiceTranslation(),{shouldShow:m,mode:h,dismiss:u}=Ft.useCookieBannerVisibility(),x=r.useCallback(()=>{i?.(),u()},[i,u]),f=r.useCallback(()=>{a?.(),u()},[a,u]);if(!m)return null;const b=n==="top"?{top:0,borderBottom:"1px solid var(--nice-border-color, #e5e7eb)"}:{bottom:0,borderTop:"1px solid var(--nice-border-color, #e5e7eb)"};return r.createElement("div",{className:`nice-consent-banner ${t}`.trim(),role:"dialog","aria-label":p("cookie.title","Cookie consent"),style:{position:"fixed",left:0,right:0,padding:"1rem 1.5rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",boxShadow:"0 -4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",flexWrap:"wrap",...b}},r.createElement("div",{style:{flex:1,minWidth:"200px"}},r.createElement("p",{style:{margin:0,fontSize:"0.875rem"}},`${p("cookie.message","This site uses cookies to improve your experience.")} `,o&&r.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--nice-color-primary, #3b82f6)"}},p("cookie.learnMore","Learn more")))),r.createElement("div",{style:{display:"flex",gap:"0.5rem",flexShrink:0}},s&&r.createElement("button",{onClick:s,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer"}},p("cookie.customize","Customize")),r.createElement("button",{onClick:f,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer"}},d??p("cookie.reject","Reject all")),r.createElement("button",{onClick:x,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"none",backgroundColor:"var(--nice-color-primary, #3b82f6)",color:"var(--nice-text-on-primary, #fff)",cursor:"pointer",fontWeight:500}},c??p("cookie.accept","Accept all"))))}function Sh({useCase:t,className:n="",message:i,variant:a="inline",dismissible:s=!1,onDismiss:o}){const{t:c}=l.useNiceTranslation(),{warningMessage:d}=Ft.useTracelessPolicySafe().policy.effectiveMode==="traceless"?{warningMessage:i||c("traceless.limitedFeature","This feature has limited functionality in Traceless mode.")}:{warningMessage:void 0},[p,m]=r.useState(!1),h=r.useCallback(()=>{m(!0),o?.()},[o]);if(!d||p)return null;const u={inline:{padding:"0.5rem 0.75rem",backgroundColor:"var(--nice-warning-bg, #fef3c7)",border:"1px solid var(--nice-warning-light, #fbbf24)",borderRadius:"0.375rem",fontSize:"0.875rem"},banner:{padding:"0.75rem 1rem",backgroundColor:"var(--nice-warning-bg, #fef3c7)",borderBottom:"1px solid var(--nice-warning-light, #fbbf24)",fontSize:"0.875rem"},toast:{padding:"0.75rem 1rem",backgroundColor:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #fff)",borderRadius:"0.5rem",boxShadow:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",fontSize:"0.875rem"}};return r.createElement("div",{className:`nice-traceless-warning nice-traceless-warning--${a} ${n}`.trim(),role:"alert",style:{display:"flex",alignItems:"center",gap:"0.5rem",...u[a]}},r.createElement("span",{"aria-hidden":!0},r.createElement(l.NiceIcon,{name:"warning",size:16})),r.createElement("span",{style:{flex:1}},d),s&&r.createElement("button",{onClick:h,"aria-label":c("traceless.dismissWarning","Dismiss warning"),style:{background:"none",border:"none",cursor:"pointer",padding:"0.25rem",opacity:.7}},r.createElement(l.NiceIcon,{name:"close",size:14})))}const nd=r.createContext(null);function Th(){const t=r.useContext(nd);return t||{isActive:!1,trackEvent:()=>{},trackPageView:()=>{},setUserProperties:()=>{},mode:"traceless",provider:"custom"}}function Eh({children:t,provider:n,trackingId:i,endpoint:a,customHandler:s,cookies:o=!0,localStorage:c=!1,minMode:d="balanced",autoTrackPageViews:p=!0,respectDoNotTrack:m=!0,debug:h=!1,domain:u,scriptUrl:x,anonymizeIp:f=!0,cookieless:b=!1}){const{policy:g,mode:v}=Ft.useTracelessPolicySafe(),y=r.useMemo(()=>{if(m&&typeof navigator<"u"){const j=navigator.doNotTrack||window.doNotTrack;if(j==="1"||j==="yes")return h&&Rn("Disabled: Do Not Track is set"),!1}const N=["traceless","ephemeral","private","balanced","full"],_=N.indexOf(v),k=N.indexOf(d);return _<k?(h&&Rn(`Disabled: mode ${v} < minMode ${d}`),!1):o&&!g.cookiesAllowed&&!b?(h&&Rn("Disabled: cookies required but not allowed"),!1):c&&!g.localStorageAllowed?(h&&Rn("Disabled: localStorage required but not allowed"),!1):!0},[v,d,g,o,c,b,m,h]);r.useEffect(()=>{if(y){if(n==="custom"&&s){s.init();return}switch(n){case"plausible":ea(x||"https://plausible.io/js/script.js",{"data-domain":i||u});break;case"simple-analytics":ea(x||"https://scripts.simpleanalyticscdn.com/latest.js");break;case"umami":ea(x||a||"",{"data-website-id":i});break;case"fathom":ea(x||"https://cdn.usefathom.com/script.js",{"data-site":i});break;case"matomo":Ph(a||"",i||"",f);break;case"google-analytics":b||(ea(`https://www.googletagmanager.com/gtag/js?id=${i}`),Ih(i||"",f));break;case"google-tag-manager":b||Dh(i||"");break;default:h&&console.warn(`[NiceAnalyticsTracker] Unknown provider: ${n}`)}h&&Rn(`Initialized: ${n}`)}},[y,n,i,a,x,u,f,b,s,h]);const C=r.useCallback(N=>{if(y){if(h&&Rn("trackPageView:",N),n==="custom"&&s){s.trackPageView(N);return}switch(n){case"plausible":window.plausible?.("pageview");break;case"umami":window.umami?.track();break;case"fathom":window.fathom?.trackPageview();break;case"matomo":window._paq?.push(["trackPageView"]);break;case"google-analytics":window.gtag?.("event","page_view",{page_path:N.path,page_title:N.title});break}}},[y,n,s,h]);r.useEffect(()=>{if(!y||!p)return;C({path:typeof window<"u"?window.location.pathname:"/",title:typeof document<"u"?document.title:""});const N=()=>{C({path:window.location.pathname,title:document.title})};return window.addEventListener("popstate",N),()=>window.removeEventListener("popstate",N)},[y,p,C]);const w=r.useCallback(N=>{if(y){if(h&&Rn("trackEvent:",N),n==="custom"&&s){s.trackEvent(N);return}switch(n){case"plausible":window.plausible?.(N.name,{props:N.properties});break;case"umami":window.umami?.track(N.name,N.properties);break;case"fathom":window.fathom?.trackGoal(N.name,N.value??0);break;case"matomo":window._paq?.push(["trackEvent",N.category,N.name,N.label,N.value]);break;case"google-analytics":window.gtag?.("event",N.name,{event_category:N.category,event_label:N.label,value:N.value,...N.properties});break}}},[y,n,s,h]),E=r.useCallback(N=>{if(y){if(h&&Rn("setUserProperties:",N),n==="custom"&&s?.setUserProperties){s.setUserProperties(N);return}switch(n){case"google-analytics":window.gtag?.("set","user_properties",N);break;case"matomo":Object.entries(N).forEach(([_,k])=>{window._paq?.push(["setCustomVariable",_,String(k)])});break}}},[y,n,s,h]),S=r.useMemo(()=>({isActive:y,trackEvent:w,trackPageView:C,setUserProperties:E,mode:v,provider:n}),[y,w,C,E,v,n]);return r.createElement(nd.Provider,{value:S},t)}function Rn(...t){console.log("[NiceAnalyticsTracker]",...t)}function ea(t,n){if(typeof document>"u"||!t||document.querySelector(`script[src="${t}"]`))return;const a=document.createElement("script");a.src=t,a.async=!0,a.defer=!0,n&&Object.entries(n).forEach(([s,o])=>{o!==void 0&&a.setAttribute(s,o)}),document.head.appendChild(a)}function Ih(t,n){if(typeof window>"u")return;window.dataLayer=window.dataLayer||[];function i(...a){window.dataLayer.push(arguments)}window.gtag=i,i("js",new Date),i("config",t,{anonymize_ip:n})}function Dh(t){if(typeof window>"u")return;window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"});const n=document.createElement("script");n.async=!0,n.src=`https://www.googletagmanager.com/gtm.js?id=${t}`,document.head.appendChild(n)}function Ph(t,n,i){if(typeof window>"u"||!t)return;window._paq=window._paq||[];const a=window._paq;i&&a.push(["setAnonymizeIp",!0]),a.push(["trackPageView"]),a.push(["enableLinkTracking"]),a.push(["setTrackerUrl",`${t}/matomo.php`]),a.push(["setSiteId",n]);const s=document.createElement("script");s.async=!0,s.src=`${t}/matomo.js`,document.head.appendChild(s)}function wn(t,n=2){return String(t).padStart(n,"0")}function Os(t){return wn(t.getUTCFullYear(),4)+wn(t.getUTCMonth()+1)+wn(t.getUTCDate())+"T"+wn(t.getUTCHours())+wn(t.getUTCMinutes())+wn(t.getUTCSeconds())+"Z"}function sc(t){return wn(t.getFullYear(),4)+wn(t.getMonth()+1)+wn(t.getDate())}function ta(t){return t.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r?\n/g,"\\n")}function Ah(t){if(t.length<=75)return t;const n=[];let i=0;for(;i<t.length;)n.push(t.slice(i,i+75)),i+=75;return n.join(`\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@nice2dev/ui-core"),Ft=require("./core-lBFqvT0V.cjs"),r=require("react"),Oe=require("./no-code-DPc82kyy.cjs"),dt=require("./NiceForm-B8dX4aLD.cjs"),Vt=require("./pickerCommons-CQnae2FM.cjs"),bn=require("./NiceColorPicker-BHaRJBM0.cjs"),it=require("./NiceMention-CfSS8Ujd.cjs"),Zl=require("./NiceHtmlEditor-f4_dA-V9.cjs"),pi=require("./NiceCodeEditor-CBgbzwjx.cjs"),Be=require("./NiceModuleLifecyclePanel-CPBBmmcI.cjs"),Fe=require("./NiceButton-DzCqkG5a.cjs"),At=require("./NiceScheduler-ztYGeYos.cjs"),Wn=require("./NicePivotGrid-D53CQ2cY.cjs"),e=require("react/jsx-runtime"),Fr=require("react-dom"),ft=require("./NiceSavedQueryPanel-D6Sa9FiR.cjs"),_t=require("./devops-o6Zm0VKB.cjs"),hn=require("./NiceAlert-RVTgQxCE.cjs"),Fi=require("./NiceModal-BRVzjuUN.cjs"),qt=require("./NiceLoginForm-Bkm5j80r.cjs"),qr=require("./NicePagination-CnKYyKI5.cjs"),fn=require("./NiceDataGrid-CuUM3ujX.cjs"),Ze=require("./charts-CSgOgfES.cjs"),kt=require("./NiceWindow-DQyf5wat.cjs"),ed=require("./NiceGantt-Drl4gvw9.cjs"),Tn=require("./injectStyleOnce-DeWaxcdf.cjs"),Vr=require("@nice2dev/i18n"),wh=require("./NiceDocumentViewer-CDXAmPp7.cjs"),En=require("./core-lazy-DPE-Nj4r.cjs"),qi=require("./data-branching-7rpktFJ-.cjs");function td({className:t="",size:n="md",showTooltip:i=!0,showLabel:a=!0,onClick:s,label:o,tooltipPosition:c="bottom"}){const{t:d}=l.useNiceTranslation(),{badgeInfo:p,isLoading:m}=Ft.useTracelessPolicySafe(),[h,u]=r.useState(!1),x={sm:"nice-traceless-badge--sm",md:"nice-traceless-badge--md",lg:"nice-traceless-badge--lg"},f=o||p.label;return r.createElement("div",{className:`nice-traceless-badge ${p.cssClass} ${x[n]} ${t}`.trim(),onClick:s,onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),role:s?"button":"status",tabIndex:s?0:void 0,onKeyDown:s?b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),s())}:void 0,"aria-label":d("traceless.badgeAria","Privacy mode: {mode}").replace("{mode}",f),style:{display:"inline-flex",alignItems:"center",gap:"0.375rem",padding:n==="sm"?"0.25rem 0.5rem":n==="lg"?"0.5rem 1rem":"0.375rem 0.75rem",borderRadius:"9999px",fontSize:n==="sm"?"0.75rem":n==="lg"?"1rem":"0.875rem",fontWeight:500,backgroundColor:`${p.color}20`,color:p.color,border:`1px solid ${p.color}40`,cursor:s?"pointer":"default",transition:"all 0.2s ease",position:"relative",userSelect:"none"}},r.createElement("span",{"aria-hidden":!0},r.createElement(l.NiceIcon,{name:m?"clock":p.icon,size:14})),a&&r.createElement("span",null,f),i&&h&&r.createElement("div",{role:"tooltip",style:{position:"absolute",[c==="top"?"bottom":c==="bottom"?"top":c==="left"?"right":"left"]:"100%",[c==="top"||c==="bottom"?"left":"top"]:"50%",transform:c==="top"||c==="bottom"?"translateX(-50%)":"translateY(-50%)",marginTop:c==="bottom"?"0.5rem":void 0,marginBottom:c==="top"?"0.5rem":void 0,marginLeft:c==="right"?"0.5rem":void 0,marginRight:c==="left"?"0.5rem":void 0,padding:"0.5rem 0.75rem",backgroundColor:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #fff)",borderRadius:"0.375rem",fontSize:"0.75rem",whiteSpace:"nowrap",zIndex:50,boxShadow:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",maxWidth:"280px",textAlign:"left"}},p.tooltip))}function kh({className:t="",showReport:n=!0,showAudit:i=!0,showModeSelector:a=!0,availableModes:s=["traceless","ephemeral","private"],onModeChange:o}){const{t:c}=l.useNiceTranslation(),{policy:d,badgeInfo:p,setUserPreference:m,generateReport:h}=Ft.useTracelessPolicySafe(),{result:u,run:x}=Ft.useStorageAudit(),[f,b]=r.useState(null),g=r.useCallback(w=>{m({preferredMode:w}),o?.(w)},[m,o]),v=r.useCallback(()=>{b(h())},[h]),y={traceless:c("traceless.mode.traceless","Traceless"),ephemeral:c("traceless.mode.ephemeral","Ephemeral"),private:c("traceless.mode.private","Private"),balanced:c("traceless.mode.balanced","Balanced"),full:c("traceless.mode.full","Full"),custom:c("traceless.mode.custom","Custom")},C={traceless:c("traceless.modeDesc.traceless","Zero storage. Maximum privacy. Data resets on every page load."),ephemeral:c("traceless.modeDesc.ephemeral","Session-only. Data clears when you close the tab."),private:c("traceless.modeDesc.private","Minimal storage with secure authentication."),balanced:c("traceless.modeDesc.balanced","Local preferences saved. No tracking cookies."),full:c("traceless.modeDesc.full","All storage enabled with consent controls."),custom:c("traceless.modeDesc.custom","Custom configuration.")};return r.createElement("div",{className:`nice-traceless-panel ${t}`.trim(),style:{padding:"1.5rem",backgroundColor:"var(--nice-bg-secondary, #f9fafb)",borderRadius:"0.75rem",border:"1px solid var(--nice-border-color, #e5e7eb)"}},r.createElement("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",marginBottom:"1.5rem"}},r.createElement(td,{size:"lg",showTooltip:!1}),r.createElement("div",null,r.createElement("h3",{style:{margin:0,fontSize:"1.125rem",fontWeight:600}},c("traceless.title","Privacy Settings")),r.createElement("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--nice-text-muted, #6b7280)"}},C[d.effectiveMode]))),a&&r.createElement("div",{style:{marginBottom:"1.5rem"}},r.createElement("label",{style:{display:"block",marginBottom:"0.5rem",fontWeight:500}},c("traceless.level","Privacy Level")),r.createElement("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"}},s.map(w=>r.createElement("button",{key:w,onClick:()=>g(w),style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:d.effectiveMode===w?"2px solid var(--nice-primary, #3b82f6)":"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:d.effectiveMode===w?"var(--nice-info-bg, #eff6ff)":"var(--nice-bg-primary, #fff)",cursor:"pointer",fontWeight:d.effectiveMode===w?600:400}},y[w])))),r.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1rem",marginBottom:"1.5rem"}},r.createElement(Ms,{title:c("traceless.cookies","Cookies"),allowed:d.cookiesAllowed,icon:r.createElement(l.NiceIcon,{name:"file",size:24})}),r.createElement(Ms,{title:"localStorage",allowed:d.localStorageAllowed,icon:r.createElement(l.NiceIcon,{name:"save",size:24})}),r.createElement(Ms,{title:"sessionStorage",allowed:d.sessionStorageAllowed,icon:r.createElement(l.NiceIcon,{name:"clipboard",size:24})})),r.createElement("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap"}},i&&r.createElement("button",{onClick:x,style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:"search",size:16}),c("traceless.runAudit","Run Audit")),n&&r.createElement("button",{onClick:v,style:{padding:"0.5rem 1rem",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:"file",size:16}),c("traceless.generateReport","Generate Report"))),u&&r.createElement("div",{style:{marginTop:"1rem",padding:"1rem",backgroundColor:u.compliant?"var(--nice-success-bg, #ecfdf5)":"var(--nice-danger-bg, #fef2f2)",borderRadius:"0.5rem",border:`1px solid ${u.compliant?"var(--nice-color-success, #10b981)":"var(--nice-color-error, #ef4444)"}`}},r.createElement("p",{style:{margin:0,fontWeight:500,color:u.compliant?"var(--nice-success, #059669)":"var(--nice-color-error, #dc2626)",display:"inline-flex",alignItems:"center",gap:"0.375rem"}},r.createElement(l.NiceIcon,{name:u.compliant?"check":"close",size:16}),u.compliant?c("traceless.compliant","Compliant"):c("traceless.violations","Violations Found")),!u.compliant&&u.violations.map((w,E)=>r.createElement("p",{key:E,style:{margin:"0.5rem 0 0",fontSize:"0.875rem"}},`• ${w.message}`))),f&&r.createElement("div",{style:{marginTop:"1rem",padding:"1rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #d1d5db)"}},r.createElement("h4",{style:{margin:"0 0 0.5rem",fontSize:"0.875rem",fontWeight:600}},c("traceless.statement","Compliance Statement")),r.createElement("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--nice-text-secondary, #4b5563)"}},f.statement)))}function Ms({title:t,allowed:n,icon:i}){const{t:a}=l.useNiceTranslation();return r.createElement("div",{style:{padding:"0.75rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",borderRadius:"0.5rem",border:"1px solid var(--nice-border-color, #e5e7eb)",textAlign:"center"}},r.createElement("div",{style:{fontSize:"1.5rem",marginBottom:"0.25rem"}},i),r.createElement("div",{style:{fontSize:"0.75rem",fontWeight:500,marginBottom:"0.25rem"}},t),r.createElement("div",{style:{fontSize:"0.75rem",color:n?"var(--nice-color-success, #10b981)":"var(--nice-text-muted, #6b7280)",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"0.25rem"}},r.createElement(l.NiceIcon,{name:n?"check":"close",size:12}),n?a("enabled","Enabled"):a("disabled","Disabled")))}function Ch({className:t="",position:n="bottom",onAccept:i,onDecline:a,onCustomize:s,privacyPolicyUrl:o,acceptText:c,declineText:d}){const{t:p}=l.useNiceTranslation(),{shouldShow:m,mode:h,dismiss:u}=Ft.useCookieBannerVisibility(),x=r.useCallback(()=>{i?.(),u()},[i,u]),f=r.useCallback(()=>{a?.(),u()},[a,u]);if(!m)return null;const b=n==="top"?{top:0,borderBottom:"1px solid var(--nice-border-color, #e5e7eb)"}:{bottom:0,borderTop:"1px solid var(--nice-border-color, #e5e7eb)"};return r.createElement("div",{className:`nice-consent-banner ${t}`.trim(),role:"dialog","aria-label":p("cookie.title","Cookie consent"),style:{position:"fixed",left:0,right:0,padding:"1rem 1.5rem",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",boxShadow:"0 -4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"space-between",gap:"1rem",flexWrap:"wrap",...b}},r.createElement("div",{style:{flex:1,minWidth:"200px"}},r.createElement("p",{style:{margin:0,fontSize:"0.875rem"}},`${p("cookie.message","This site uses cookies to improve your experience.")} `,o&&r.createElement("a",{href:o,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--nice-color-primary, #3b82f6)"}},p("cookie.learnMore","Learn more")))),r.createElement("div",{style:{display:"flex",gap:"0.5rem",flexShrink:0}},s&&r.createElement("button",{onClick:s,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer"}},p("cookie.customize","Customize")),r.createElement("button",{onClick:f,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"1px solid var(--nice-border-color, #d1d5db)",backgroundColor:"var(--nice-bg-primary, #fff)",color:"var(--nice-text-primary, #0f172a)",cursor:"pointer"}},d??p("cookie.reject","Reject all")),r.createElement("button",{onClick:x,style:{padding:"0.5rem 1rem",borderRadius:"0.375rem",border:"none",backgroundColor:"var(--nice-color-primary, #3b82f6)",color:"var(--nice-text-on-primary, #fff)",cursor:"pointer",fontWeight:500}},c??p("cookie.accept","Accept all"))))}function Sh({useCase:t,className:n="",message:i,variant:a="inline",dismissible:s=!1,onDismiss:o}){const{t:c}=l.useNiceTranslation(),{warningMessage:d}=Ft.useTracelessPolicySafe().policy.effectiveMode==="traceless"?{warningMessage:i||c("traceless.limitedFeature","This feature has limited functionality in Traceless mode.")}:{warningMessage:void 0},[p,m]=r.useState(!1),h=r.useCallback(()=>{m(!0),o?.()},[o]);if(!d||p)return null;const u={inline:{padding:"0.5rem 0.75rem",backgroundColor:"var(--nice-warning-bg, #fef3c7)",border:"1px solid var(--nice-warning-light, #fbbf24)",borderRadius:"0.375rem",fontSize:"0.875rem"},banner:{padding:"0.75rem 1rem",backgroundColor:"var(--nice-warning-bg, #fef3c7)",borderBottom:"1px solid var(--nice-warning-light, #fbbf24)",fontSize:"0.875rem"},toast:{padding:"0.75rem 1rem",backgroundColor:"var(--nice-text-primary, #1f2937)",color:"var(--nice-text-inverse, #fff)",borderRadius:"0.5rem",boxShadow:"0 4px 6px -1px var(--nice-overlay-10, rgba(0, 0, 0, 0.1))",fontSize:"0.875rem"}};return r.createElement("div",{className:`nice-traceless-warning nice-traceless-warning--${a} ${n}`.trim(),role:"alert",style:{display:"flex",alignItems:"center",gap:"0.5rem",...u[a]}},r.createElement("span",{"aria-hidden":!0},r.createElement(l.NiceIcon,{name:"warning",size:16})),r.createElement("span",{style:{flex:1}},d),s&&r.createElement("button",{onClick:h,"aria-label":c("traceless.dismissWarning","Dismiss warning"),style:{background:"none",border:"none",cursor:"pointer",padding:"0.25rem",opacity:.7}},r.createElement(l.NiceIcon,{name:"close",size:14})))}const nd=r.createContext(null);function Th(){const t=r.useContext(nd);return t||{isActive:!1,trackEvent:()=>{},trackPageView:()=>{},setUserProperties:()=>{},mode:"traceless",provider:"custom"}}function Eh({children:t,provider:n,trackingId:i,endpoint:a,customHandler:s,cookies:o=!0,localStorage:c=!1,minMode:d="balanced",autoTrackPageViews:p=!0,respectDoNotTrack:m=!0,debug:h=!1,domain:u,scriptUrl:x,anonymizeIp:f=!0,cookieless:b=!1}){const{policy:g,mode:v}=Ft.useTracelessPolicySafe(),y=r.useMemo(()=>{if(m&&typeof navigator<"u"){const j=navigator.doNotTrack||window.doNotTrack;if(j==="1"||j==="yes")return h&&Rn("Disabled: Do Not Track is set"),!1}const N=["traceless","ephemeral","private","balanced","full"],_=N.indexOf(v),k=N.indexOf(d);return _<k?(h&&Rn(`Disabled: mode ${v} < minMode ${d}`),!1):o&&!g.cookiesAllowed&&!b?(h&&Rn("Disabled: cookies required but not allowed"),!1):c&&!g.localStorageAllowed?(h&&Rn("Disabled: localStorage required but not allowed"),!1):!0},[v,d,g,o,c,b,m,h]);r.useEffect(()=>{if(y){if(n==="custom"&&s){s.init();return}switch(n){case"plausible":ea(x||"https://plausible.io/js/script.js",{"data-domain":i||u});break;case"simple-analytics":ea(x||"https://scripts.simpleanalyticscdn.com/latest.js");break;case"umami":ea(x||a||"",{"data-website-id":i});break;case"fathom":ea(x||"https://cdn.usefathom.com/script.js",{"data-site":i});break;case"matomo":Ph(a||"",i||"",f);break;case"google-analytics":b||(ea(`https://www.googletagmanager.com/gtag/js?id=${i}`),Ih(i||"",f));break;case"google-tag-manager":b||Dh(i||"");break;default:h&&console.warn(`[NiceAnalyticsTracker] Unknown provider: ${n}`)}h&&Rn(`Initialized: ${n}`)}},[y,n,i,a,x,u,f,b,s,h]);const C=r.useCallback(N=>{if(y){if(h&&Rn("trackPageView:",N),n==="custom"&&s){s.trackPageView(N);return}switch(n){case"plausible":window.plausible?.("pageview");break;case"umami":window.umami?.track();break;case"fathom":window.fathom?.trackPageview();break;case"matomo":window._paq?.push(["trackPageView"]);break;case"google-analytics":window.gtag?.("event","page_view",{page_path:N.path,page_title:N.title});break}}},[y,n,s,h]);r.useEffect(()=>{if(!y||!p)return;C({path:typeof window<"u"?window.location.pathname:"/",title:typeof document<"u"?document.title:""});const N=()=>{C({path:window.location.pathname,title:document.title})};return window.addEventListener("popstate",N),()=>window.removeEventListener("popstate",N)},[y,p,C]);const w=r.useCallback(N=>{if(y){if(h&&Rn("trackEvent:",N),n==="custom"&&s){s.trackEvent(N);return}switch(n){case"plausible":window.plausible?.(N.name,{props:N.properties});break;case"umami":window.umami?.track(N.name,N.properties);break;case"fathom":window.fathom?.trackGoal(N.name,N.value??0);break;case"matomo":window._paq?.push(["trackEvent",N.category,N.name,N.label,N.value]);break;case"google-analytics":window.gtag?.("event",N.name,{event_category:N.category,event_label:N.label,value:N.value,...N.properties});break}}},[y,n,s,h]),E=r.useCallback(N=>{if(y){if(h&&Rn("setUserProperties:",N),n==="custom"&&s?.setUserProperties){s.setUserProperties(N);return}switch(n){case"google-analytics":window.gtag?.("set","user_properties",N);break;case"matomo":Object.entries(N).forEach(([_,k])=>{window._paq?.push(["setCustomVariable",_,String(k)])});break}}},[y,n,s,h]),S=r.useMemo(()=>({isActive:y,trackEvent:w,trackPageView:C,setUserProperties:E,mode:v,provider:n}),[y,w,C,E,v,n]);return r.createElement(nd.Provider,{value:S},t)}function Rn(...t){console.log("[NiceAnalyticsTracker]",...t)}function ea(t,n){if(typeof document>"u"||!t||document.querySelector(`script[src="${t}"]`))return;const a=document.createElement("script");a.src=t,a.async=!0,a.defer=!0,n&&Object.entries(n).forEach(([s,o])=>{o!==void 0&&a.setAttribute(s,o)}),document.head.appendChild(a)}function Ih(t,n){if(typeof window>"u")return;window.dataLayer=window.dataLayer||[];function i(...a){window.dataLayer.push(arguments)}window.gtag=i,i("js",new Date),i("config",t,{anonymize_ip:n})}function Dh(t){if(typeof window>"u")return;window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"});const n=document.createElement("script");n.async=!0,n.src=`https://www.googletagmanager.com/gtm.js?id=${t}`,document.head.appendChild(n)}function Ph(t,n,i){if(typeof window>"u"||!t)return;window._paq=window._paq||[];const a=window._paq;i&&a.push(["setAnonymizeIp",!0]),a.push(["trackPageView"]),a.push(["enableLinkTracking"]),a.push(["setTrackerUrl",`${t}/matomo.php`]),a.push(["setSiteId",n]);const s=document.createElement("script");s.async=!0,s.src=`${t}/matomo.js`,document.head.appendChild(s)}function wn(t,n=2){return String(t).padStart(n,"0")}function Os(t){return wn(t.getUTCFullYear(),4)+wn(t.getUTCMonth()+1)+wn(t.getUTCDate())+"T"+wn(t.getUTCHours())+wn(t.getUTCMinutes())+wn(t.getUTCSeconds())+"Z"}function sc(t){return wn(t.getFullYear(),4)+wn(t.getMonth()+1)+wn(t.getDate())}function ta(t){return t.replace(/\\/g,"\\\\").replace(/;/g,"\\;").replace(/,/g,"\\,").replace(/\r?\n/g,"\\n")}function Ah(t){if(t.length<=75)return t;const n=[];let i=0;for(;i<t.length;)n.push(t.slice(i,i+75)),i+=75;return n.join(`\r
2
2
  `)}function id(t,n={}){const{prodId:i="-//nice2dev//NiceToDev.UI//EN",calendarName:a,method:s}=n,o=["BEGIN:VCALENDAR","VERSION:2.0",`PRODID:${i}`,"CALSCALE:GREGORIAN"];s&&o.push(`METHOD:${s}`),a&&o.push(`X-WR-CALNAME:${ta(a)}`);const c=Os(new Date);for(const d of t)o.push("BEGIN:VEVENT"),o.push(`UID:${d.uid}`),o.push(`DTSTAMP:${c}`),d.allDay?(o.push(`DTSTART;VALUE=DATE:${sc(d.start)}`),d.end&&o.push(`DTEND;VALUE=DATE:${sc(d.end)}`)):(o.push(`DTSTART:${Os(d.start)}`),d.end&&o.push(`DTEND:${Os(d.end)}`)),o.push(`SUMMARY:${ta(d.summary)}`),d.description&&o.push(`DESCRIPTION:${ta(d.description)}`),d.location&&o.push(`LOCATION:${ta(d.location)}`),d.url&&o.push(`URL:${d.url}`),d.status&&o.push(`STATUS:${d.status}`),d.rrule&&o.push(`RRULE:${d.rrule}`),d.categories&&d.categories.length>0&&o.push(`CATEGORIES:${d.categories.map(ta).join(",")}`),o.push("END:VEVENT");return o.push("END:VCALENDAR"),o.map(Ah).join(`\r
3
3
  `)}function ad(t,n={}){const i=id(t,n);return new Blob([i],{type:"text/calendar;charset=utf-8"})}function Rh(t,n="calendar.ics",i={}){if(typeof window>"u"||typeof URL.createObjectURL!="function")return;const a=ad(t,i),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=n,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s)}const $h=[];function Mh(t){const n=t?.closest?.("[data-theme], .nice-dark, .nice-light, .dark");if(!n)return"";const i=n.getAttribute("data-theme");return i==="dark"||n.classList.contains("nice-dark")||n.classList.contains("dark")?"nice-dark":i==="light"||n.classList.contains("nice-light")?"nice-light":""}const sd=({icon:t,items:n=$h,direction:i="right",position:a={bottom:24,right:24},disabled:s=!1,className:o,style:c,id:d,"data-testid":p})=>{const[m,h]=r.useState(!1),u=m&&!s,x=r.useRef(null),f=r.useRef(null),[b,g]=r.useState(null),[v,y]=r.useState(""),C=r.useRef(null);l.useMenuButton(f,C,{open:u,onOpenChange:h,orientation:i==="up"||i==="down"?"vertical":"horizontal"}),r.useLayoutEffect(()=>{if(!u||!f.current)return;const E=f.current,S=()=>g(E.getBoundingClientRect());return S(),y(Mh(x.current)),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),()=>{window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}},[u]);const w=e.jsx("div",{className:"nice-speed-dial__items",role:"menu",ref:C,children:n.map(E=>e.jsx("button",{type:"button",role:"menuitem",className:"nice-speed-dial__item nice-btn nice-btn--secondary",onClick:()=>{E.onClick?.(),h(!1)},title:E.label,"aria-label":E.label,children:E.icon},E.key))});return e.jsxs("div",{ref:x,id:d,"data-testid":p,className:["nice-speed-dial",`nice-speed-dial--${i}`,u?"nice-speed-dial--open":"",s?"nice-speed-dial--disabled":"",o||""].filter(Boolean).join(" "),style:{...a,...c},children:[e.jsx("button",{ref:f,type:"button",className:"nice-speed-dial__trigger nice-btn nice-btn--primary",onClick:()=>h(E=>!E),"aria-expanded":u,"aria-haspopup":"menu",disabled:s,children:e.jsx("span",{className:"nice-speed-dial__trigger-icon",children:t??e.jsx(l.NiceIcon,{name:"plus",size:24})})}),u&&b&&typeof document<"u"&&Fr.createPortal(e.jsx("div",{className:["nice-speed-dial","nice-speed-dial--portal",`nice-speed-dial--${i}`,"nice-speed-dial--open",v].filter(Boolean).join(" "),"data-theme":v==="nice-dark"?"dark":v==="nice-light"?"light":void 0,style:{position:"fixed",left:b.left,top:b.top,width:b.width,height:b.height,right:"auto",bottom:"auto",margin:0},children:w}),document.body)]})},Jt=({children:t,variant:n="primary",size:i="md",dot:a,outline:s,subtle:o,pulse:c,icon:d,removable:p,onRemove:m,className:h,style:u,displayStyle:x,testId:f,"data-testid":b})=>{const{t:g}=l.useNiceTranslation(),v=l.useComponentDisplayStyle("badge",x),y=l.useComponentDisplayClass("badge",x),C={...v};for(const w of["fontSize","padding","paddingLeft","paddingRight","paddingTop","paddingBottom","paddingInline","paddingBlock"])delete C[w];if(n!=="primary"||s||o)for(const w of["background","backgroundColor","color"])delete C[w];if(s||o)for(const w of["border","borderColor","borderWidth","borderStyle","boxShadow"])delete C[w];return e.jsxs("span",{className:`nice-badge nice-badge--${n} nice-badge--${i} nice-badge--ds-${y} ${a?"nice-badge--dot":""} ${s?"nice-badge--outline":""} ${o?"nice-badge--subtle":""} ${c?"nice-badge--pulse":""} ${p?"nice-badge--removable":""} ${h||""}`,style:{...C,...u},"data-testid":b??f,children:[d&&e.jsx("span",{className:"nice-badge__icon",children:d}),t,p&&e.jsx("button",{type:"button",className:"nice-badge__remove",onClick:m,"aria-label":g("badge.remove","Remove"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]})},Oh=Object.freeze(Object.defineProperty({__proto__:null,NiceBadge:Jt},Symbol.toStringTag,{value:"Module"})),us=({children:t,selected:n,removable:i,onClick:a,onRemove:s,color:o,size:c="md",className:d,style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation(),x=typeof t=="string"||typeof t=="number"?`${u("tag.remove","Remove")}: ${t}`:u("tag.remove","Remove");return e.jsxs("span",{className:`nice-tag nice-tag--${c} ${a?"nice-tag--clickable":""} ${n?"nice-tag--selected":""} ${d||""}`,style:{...p,...o&&!n?{borderColor:o,color:o}:{}},"data-testid":h??m,...a&&{onClick:a,role:"button",tabIndex:0,"aria-pressed":n,onKeyDown:f=>{f.target===f.currentTarget&&(f.key==="Enter"||f.key===" "?(f.preventDefault(),a()):i&&(f.key==="Delete"||f.key==="Backspace")&&(f.preventDefault(),s?.()))}},children:[t,i&&e.jsx("button",{type:"button",className:"nice-tag__remove",onClick:f=>{f.stopPropagation(),s?.()},"aria-label":x,children:e.jsx(l.NiceIcon,{name:"close",size:14})})]})};function Lh(t){return t.split(" ").map(n=>n[0]).filter(Boolean).slice(0,2).join("").toUpperCase()}const Ht=({src:t,alt:n,name:i,size:a="md",square:s,color:o,badge:c,badgePosition:d="bottom-right",className:p,style:m,testId:h,"data-testid":u})=>{const x=e.jsx("div",{className:`nice-avatar nice-avatar--${a} ${s?"nice-avatar--square":""} ${c==null&&p||""}`,style:c==null?{...m,...o?{background:o}:{}}:o?{background:o}:void 0,"aria-label":n||i,"data-testid":c==null?u??h:void 0,children:t?e.jsx("img",{src:t,alt:n||i||""}):i?Lh(i):e.jsx(l.NiceIcon,{name:"user",size:"md",className:"nice-avatar__fallback-icon"})});return c==null?x:e.jsxs("span",{className:`nice-avatar-wrap ${p||""}`,style:m,"data-testid":u??h,children:[x,e.jsx("span",{className:`nice-avatar__badge nice-avatar__badge--${d}`,children:c})]})};function zh(t){return t?t.trim().split(/\s+/).map(n=>n[0]).join("").slice(0,2).toUpperCase():""}const Ur=({children:t,items:n,max:i,size:a="md",className:s,style:o,testId:c,"data-testid":d})=>{const p=`nice-avatar nice-avatar--${a}`;let m,h;if(n&&n.length>0)h=n.length,m=(i?n.slice(0,i):n).map((f,b)=>{const g=f.src?e.jsx("img",{src:f.src,alt:f.name??""}):e.jsx("span",{children:zh(f.name)});return f.href?e.jsx("a",{className:p,href:f.href,title:f.name,onClick:f.onClick,children:g},b):f.onClick?e.jsx("button",{type:"button",className:p,title:f.name,onClick:f.onClick,children:g},b):e.jsx("span",{className:p,title:f.name,children:g},b)});else{const x=r.Children.toArray(t);h=x.length,m=(i?x.slice(0,i):x).map(b=>r.isValidElement(b)&&b.props.size==null?r.cloneElement(b,{size:a}):b)}const u=i?Math.max(0,h-i):0;return e.jsxs("div",{className:`nice-avatar-group nice-avatar-group--${a} ${s||""}`,style:o,"data-testid":d??c,children:[m,u>0&&e.jsxs("div",{className:p,style:{background:"var(--nice-text-muted)"},children:["+",u]})]})},Bh={xxs:4,xs:6,sm:8,md:12,lg:16,xl:20,xxl:28},rd=Object.assign(r.forwardRef(({children:t,items:n,renderCard:i,searchable:a,searchField:s="text",searchPlaceholder:o,emptyText:c,onCardClick:d,size:p="md",minColumnWidth:m=240,columns:h,gap:u,align:x="stretch",equalHeight:f=!1,value:b,onChange:g,name:v,disabled:y,readOnly:C,loading:w,error:E,errorText:S,className:N,style:_,testId:k,"data-testid":j},T)=>{const{t:P}=l.useNiceTranslation(),[B,R]=r.useState(""),I=h?`repeat(${h}, minmax(0, 1fr))`:`repeat(auto-fill, minmax(${m}px, 1fr))`,D=u??Bh[p]??12,M=typeof E=="string"?E.length>0:!!E,O=typeof E=="string"?E:E?S??"":"",L=n!=null&&i!=null,V=r.useMemo(()=>{if(!L||!B)return n??[];const se=B.toLowerCase();return(n??[]).filter(ce=>String(ce[s]??"").toLowerCase().includes(se))},[L,n,B,s]),ee=g!=null||b!=null,z=r.useMemo(()=>({value:b,onChange:se=>{!y&&!C&&g?.(se)},name:v}),[b,g,v,y,C]),U=f?"stretch":x,re=f?"1fr":void 0,Y=`nice-card-group nice-card-group--${p}${f?" nice-card-group--equal":""}${y?" nice-card-group--disabled":""}${C?" nice-card-group--readonly":""}${w?" nice-card-group--loading":""}${M?" nice-card-group--error":""}${N?` ${N}`:""}`;if(L)return e.jsx(Be.NiceCardGroupSizeContext.Provider,{value:p,children:e.jsxs("div",{ref:T,className:Y,style:{position:"relative",..._},"aria-disabled":y||void 0,"aria-busy":w||void 0,"data-testid":j??k,children:[a&&e.jsx("div",{className:"nice-card-group__search",children:e.jsx("input",{type:"text",value:B,onChange:se=>R(se.target.value),placeholder:o||P("controls.search","Search...")})}),w?e.jsx("div",{className:"nice-card-group__empty",children:e.jsx("span",{className:"nice-spinner nice-spinner--md"})}):V.length===0?e.jsx("div",{className:"nice-card-group__empty",children:c||P("controls.noData","No data available")}):e.jsx("div",{className:"nice-card-group__grid",style:{display:"grid",gridTemplateColumns:I,gridAutoRows:re,gap:D,alignItems:U},children:V.map(se=>e.jsx("div",{className:"nice-card-group__data-card",onClick:d?()=>d(se):void 0,onKeyDown:d?ce=>{ce.target===ce.currentTarget&&(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),d(se))}:void 0,role:d?"button":void 0,tabIndex:d?0:void 0,style:d?{cursor:"pointer"}:void 0,children:i(se)},se.key))}),O&&e.jsx("div",{className:"nice-card-group__error",role:"alert",children:O})]})});const oe=e.jsxs("div",{ref:T,className:Y,style:{display:"grid",gridTemplateColumns:I,gridAutoRows:re,gap:D,alignItems:U,position:w?"relative":void 0,..._},role:ee?"radiogroup":void 0,"aria-label":ee?v:void 0,"aria-disabled":y||void 0,"aria-busy":w||void 0,"data-testid":j??k,children:[t,w&&e.jsx("span",{className:"nice-card-group__spinner","aria-hidden":"true",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})}),O&&!f&&e.jsx("div",{className:"nice-card-group__error",role:"alert",style:{gridColumn:"1 / -1"},children:O})]}),q=O&&f&&e.jsx("div",{className:"nice-card-group__error",role:"alert",children:O});return e.jsxs(Be.NiceCardGroupSizeContext.Provider,{value:p,children:[ee?e.jsx(Be.NiceCardRadioContext.Provider,{value:z,children:oe}):oe,q]})}),{displayName:"NiceCardGroup"}),Fh={color:!0,description:!0,volume:!0,gain:!0},Hr=r.forwardRef(function(n,i){const{t:a}=l.useNiceTranslation(),{children:s,name:o,description:c,defaultDescription:d,onDescriptionChange:p,labelPlacement:m="bottom",number:h,color:u="transparent",onColorChange:x,volume:f,defaultVolume:b,onVolumeChange:g,gain:v,defaultGain:y,onGainChange:C,contextMenu:w=!0,quickControls:E,onOpenConfig:S,fullConfigLabel:N=a("deviceTile.fullConfiguration","Full configuration"),selected:_,onClick:k,focusId:j,className:T,style:P,title:B,"data-testid":R}=n,I={...Fh,...E},D=r.useRef(null),M=J=>{D.current=J,typeof i=="function"?i(J):i&&(i.current=J)},O=D;l.useSpatialFocusable(O,{id:j??"",onActivate:k,disabled:!j});const[L,V]=l.useControllableState({value:c,defaultValue:d,fallbackValue:"",onChange:p,componentName:"NiceDeviceTile"}),[ee,z]=l.useControllableState({value:f,defaultValue:b,fallbackValue:80,onChange:g,componentName:"NiceDeviceTile"}),[U,re]=l.useControllableState({value:v,defaultValue:y,fallbackValue:50,onChange:C,componentName:"NiceDeviceTile"}),Y=l.useSpatialNavOptional(),[oe,q]=r.useState(null),se=r.useRef(null);l.useClickOutside(se,()=>q(null)),r.useEffect(()=>{if(oe)return Y?.pauseNavigation(),()=>{Y?.resumeNavigation()}},[oe,Y]),l.useOverlayFocus(se,{open:oe!=null,modal:!1,onClose:()=>q(null)});const ce=J=>{if(!w)return;J.preventDefault();let{clientX:me,clientY:je}=J;if(me===0&&je===0){const H=J.currentTarget.getBoundingClientRect();me=H.left,je=H.bottom}const ue=Math.min(me,window.innerWidth-256),F=Math.min(je,window.innerHeight-320);q({x:Math.max(8,ue),y:Math.max(8,F)})},le=u!=="transparent"&&u!=="";return e.jsxs("div",{ref:M,className:["nice-device-tile",`nice-device-tile--label-${m}`,_?"nice-device-tile--selected":"",le?"nice-device-tile--colored":"",T??""].filter(Boolean).join(" "),style:{...P,"--device-color":u},title:B,"data-testid":R,onClick:k,onKeyDown:k?J=>{J.target===J.currentTarget&&(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),J.currentTarget.click())}:void 0,onContextMenu:ce,role:k?"button":void 0,tabIndex:j||k?0:void 0,children:[e.jsxs("div",{className:"nice-device-tile__device",children:[h!=null&&e.jsx("span",{className:"nice-device-tile__badge",children:h}),s]}),(o||L)&&e.jsxs("div",{className:"nice-device-tile__caption",children:[o&&e.jsx("span",{className:"nice-device-tile__name",children:o}),L&&e.jsx("span",{className:"nice-device-tile__description",children:L})]}),oe&&e.jsx("div",{ref:se,className:"nice-device-tile__menu",style:{position:"fixed",left:oe.x,top:oe.y},role:"dialog","aria-label":o,children:e.jsxs("div",{style:{display:"contents"},onClick:J=>J.stopPropagation(),onKeyDown:J=>{J.key!=="Escape"&&J.stopPropagation()},children:[o&&e.jsx("div",{className:"nice-device-tile__menu-title",children:o}),I.color&&e.jsxs("div",{className:"nice-device-tile__menu-row",children:[e.jsx("span",{className:"nice-device-tile__menu-label",children:a("deviceTile.color","Color")}),e.jsx(bn.NiceColorPicker,{compact:!0,value:le?u:"#3b82f6",onChange:J=>x?.(J)})]}),I.description&&e.jsxs("div",{className:"nice-device-tile__menu-row nice-device-tile__menu-row--stack",children:[e.jsx("span",{className:"nice-device-tile__menu-label",children:a("deviceTile.description","Description")}),e.jsx(Oe.NiceTextInput,{value:L,onChange:J=>V(J),size:"sm"})]}),I.volume&&e.jsxs("div",{className:"nice-device-tile__menu-row",children:[e.jsx("span",{className:"nice-device-tile__menu-label",children:a("deviceTile.volume","Volume")}),e.jsx(dt.NiceSlider,{value:ee,onChange:J=>z(J),min:0,max:100})]}),I.gain&&e.jsxs("div",{className:"nice-device-tile__menu-row",children:[e.jsx("span",{className:"nice-device-tile__menu-label",children:a("deviceTile.gain","Gain")}),e.jsx(dt.NiceSlider,{value:U,onChange:J=>re(J),min:0,max:100})]}),S&&e.jsx(Fe.NiceButton,{size:"sm",variant:"outline",className:"nice-device-tile__menu-config",onClick:()=>{q(null),S()},children:N})]})})]})}),qh={xxs:20,xs:24,sm:32,md:40,lg:56,xl:72,xxl:96},Ma=15,wi=18,Oa=6,na=30,od=({level:t=0,size:n="md",muted:i=!1,...a})=>{const{t:s}=l.useNiceTranslation(),c=`nice-mic-clip-${l.useControlId()}`,d=typeof n=="number"?n:qh[n]??40,p=Math.max(0,Math.min(1,t)),m=Oa+(1-p)*na,h=p*na;return e.jsx(Hr,{...a,children:e.jsxs("svg",{className:`nice-microphone${i?" nice-microphone--muted":""}`,width:d,height:d*(64/48),viewBox:"0 0 48 64",role:"img","aria-label":a.name?s("microphone.microphone","Microphone: {name}").replace("{name}",String(a.name)):s("microphone.microphone2","Microphone"),children:[e.jsx("defs",{children:e.jsx("clipPath",{id:c,children:e.jsx("rect",{x:Ma,y:Oa,width:wi,height:na,rx:wi/2})})}),e.jsxs("g",{clipPath:`url(#${c})`,children:[e.jsx("rect",{x:Ma,y:Oa,width:wi,height:na,className:"nice-microphone__body"}),h>0&&e.jsx("rect",{x:Ma,y:m,width:wi,height:h,className:"nice-microphone__level"})]}),e.jsx("rect",{x:Ma,y:Oa,width:wi,height:na,rx:wi/2,className:"nice-microphone__outline"}),e.jsx("path",{d:"M10 30 a14 14 0 0 0 28 0",className:"nice-microphone__stand"}),e.jsx("line",{x1:"24",y1:"44",x2:"24",y2:"56",className:"nice-microphone__stand"}),e.jsx("line",{x1:"16",y1:"56",x2:"32",y2:"56",className:"nice-microphone__stand"}),i&&e.jsx("line",{x1:"9",y1:"9",x2:"39",y2:"49",className:"nice-microphone__slash"})]})})},Vh={xxs:22,xs:28,sm:36,md:48,lg:64,xl:84,xxl:110},Uh=[{id:"LT",shape:{kind:"rect",x:18,y:3,w:16,h:5,rx:2},label:[26,1]},{id:"RT",shape:{kind:"rect",x:66,y:3,w:16,h:5,rx:2},label:[74,1]},{id:"LB",shape:{kind:"rect",x:18,y:10,w:16,h:5,rx:2},label:[26,9]},{id:"RB",shape:{kind:"rect",x:66,y:10,w:16,h:5,rx:2},label:[74,9]},{id:"DpadUp",shape:{kind:"rect",x:25,y:26,w:5,h:6,rx:1},label:[27,24]},{id:"DpadDown",shape:{kind:"rect",x:25,y:38,w:5,h:6,rx:1},label:[27,50]},{id:"DpadLeft",shape:{kind:"rect",x:18,y:32,w:6,h:5,rx:1},label:[16,35]},{id:"DpadRight",shape:{kind:"rect",x:31,y:32,w:6,h:5,rx:1},label:[40,35]},{id:"Y",shape:{kind:"circle",cx:74,cy:25,r:4},label:[74,19]},{id:"A",shape:{kind:"circle",cx:74,cy:41,r:4},label:[74,51]},{id:"X",shape:{kind:"circle",cx:66,cy:33,r:4},label:[58,35]},{id:"B",shape:{kind:"circle",cx:82,cy:33,r:4},label:[90,35]},{id:"Back",shape:{kind:"circle",cx:44,cy:26,r:2.6},label:[44,20]},{id:"Start",shape:{kind:"circle",cx:56,cy:26,r:2.6},label:[56,20]},{id:"LS",shape:{kind:"circle",cx:42,cy:42,r:6},label:[42,54]},{id:"RS",shape:{kind:"circle",cx:60,cy:44,r:6},label:[60,56]}],Hh="M50 18 C66 18 72 20 76 26 L90 48 C94 58 86 64 80 58 L66 46 L34 46 L20 58 C14 64 6 58 10 48 L24 26 C28 20 34 18 50 18 Z";function Gh({shape:t}){return t.kind==="circle"?e.jsx("circle",{cx:t.cx,cy:t.cy,r:t.r}):e.jsx("rect",{x:t.x,y:t.y,width:t.w,height:t.h,rx:t.rx??1})}const cd=({view:t="compact",size:n="md",onButtonPress:i,pressedButtons:a,highlightedButtons:s,live:o=!1,gamepadIndex:c=0,buttonLabels:d,actionTree:p,assignments:m,onAssign:h,...u})=>{const{t:x}=l.useNiceTranslation(),f=typeof n=="number"?n:Vh[n]??48,[b,g]=r.useState(()=>new Set),[v,y]=r.useState(null);l.useGamepad({index:c,enabled:o,onButtonDown:P=>{g(B=>{const R=new Set(B);return R.add(P),R}),i?.(P)},onButtonUp:P=>{g(B=>{const R=new Set(B);return R.delete(P),R})}});const C=P=>!!s?.includes(P)||!!a?.includes(P)||b.has(P),w=f*1.5,E=w*(68/100),S=(P,B)=>{P.stopPropagation(),i?.(B),p&&y(R=>R===B?null:B)},N=t==="compact",_=!N&&(!!i||!!p),k=r.useRef(null);l.useRovingFocus(k,{orientation:"grid",itemSelector:".nice-gamepad__btn",enabled:_});const j=e.jsxs("svg",{className:`nice-gamepad nice-gamepad--${t}${_?" nice-gamepad--interactive":""}`,width:w,height:E,viewBox:"0 0 100 68",role:_?"group":"img","aria-label":u.name?x("gamepad.gamepad","Gamepad: {name}").replace("{name}",String(u.name)):x("gamepad.gamepad2","Gamepad"),children:[e.jsx("path",{d:Hh,className:"nice-gamepad__body"}),!N&&Uh.map(({id:P,shape:B,label:R})=>{const I=d?.[P]??m?.[P];return e.jsxs("g",{"data-button":P,"data-pressed":C(P)?"true":void 0,className:`nice-gamepad__btn${v===P?" nice-gamepad__btn--armed":""}`,role:_?"button":void 0,"aria-label":_?I?`${P} ${I}`:P:void 0,"aria-pressed":_&&p?v===P:void 0,onClick:D=>S(D,P),onKeyDown:D=>{_&&(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),S(D,P))},children:[e.jsx(Gh,{shape:B}),I&&e.jsx("text",{x:R[0],y:R[1],className:"nice-gamepad__label",children:I})]},P)})]}),T=_?e.jsx("div",{ref:k,className:"nice-gamepad__pad",children:j}):j;return e.jsx(Hr,{...u,children:p&&!N?e.jsxs("div",{className:"nice-gamepad__assign",children:[T,e.jsxs("div",{className:"nice-gamepad__tree",children:[e.jsx("div",{className:"nice-gamepad__tree-hint",children:v?x("gamepad.assignTo",'Assign to "{armed}"…').replace("{armed}",String(v)):x("gamepad.clickAButtonThenA","Click a button, then a node")}),e.jsx(ft.NiceTreeView,{nodes:p,selectionMode:"single",onNodeClick:P=>{v&&(h?.(v,P),y(null))}})]})]}):T})},Wh=[],Kh=({devices:t,defaultDevices:n,onDevicesChange:i,autoDetect:a=!0,kinds:s=["microphone","gamepad"],slots:o,onAssign:c,onOpenConfig:d,columns:p,minColumnWidth:m=160,className:h,style:u,id:x,"data-testid":f})=>{const{t:b}=l.useNiceTranslation(),[g,v]=l.useControllableState({value:t,defaultValue:n,fallbackValue:Wh,onChange:i,componentName:"NiceDeviceManager"}),y=r.useCallback(N=>{N.length!==0&&v(_=>{const k=new Set(_.map(T=>T.id)),j=N.filter(T=>!k.has(T.id));return j.length?[..._,...j]:_})},[v]);r.useEffect(()=>{if(!a||!s.includes("microphone")||!navigator.mediaDevices?.enumerateDevices)return;let N=!1;const _=()=>{navigator.mediaDevices.enumerateDevices().then(k=>{if(N)return;const j=k.filter(T=>T.kind==="audioinput").map((T,P)=>({id:`mic:${T.deviceId||P}`,kind:"microphone",name:T.label||`Microphone ${P+1}`,deviceId:T.deviceId}));y(j)}).catch(()=>{})};return _(),navigator.mediaDevices.addEventListener?.("devicechange",_),()=>{N=!0,navigator.mediaDevices.removeEventListener?.("devicechange",_)}},[a,s,y]);const C=l.useConnectedGamepads(),w=a&&s.includes("gamepad");r.useEffect(()=>{w&&y(C.map(N=>({id:`pad:${N.index}`,kind:"gamepad",name:N.id.split("(")[0]?.trim()||`Controller ${N.index+1}`,deviceId:String(N.index)})))},[w,C,y]);const E=r.useCallback((N,_)=>{v(k=>k.map(j=>j.id===N?{...j,..._}:j))},[v]),S=r.useCallback((N,_)=>{E(N,{assignedTo:_}),c?.(N,_)},[E,c]);return e.jsx("div",{id:x,"data-testid":f,className:`nice-device-manager ${h??""}`.trim(),style:u,children:g.length===0?e.jsx("p",{className:"nice-device-manager__empty",children:b("deviceManager.noDevicesDetected","No devices detected.")}):e.jsx(rd,{columns:p,minColumnWidth:m,gap:12,children:g.map((N,_)=>{const k={name:N.name,description:N.description,number:N.number??_+1,color:N.color??"transparent",volume:N.volume,gain:N.gain,onColorChange:j=>E(N.id,{color:j}),onDescriptionChange:j=>E(N.id,{description:j}),onVolumeChange:j=>E(N.id,{volume:j}),onGainChange:j=>E(N.id,{gain:j}),onOpenConfig:()=>d?.(N)};return e.jsxs("div",{className:"nice-device-manager__cell",children:[N.kind==="microphone"?e.jsx(od,{...k,level:N.level}):e.jsx(cd,{...k,view:"compact",live:!0}),o&&o.length>0&&e.jsx("div",{className:"nice-device-manager__slots",children:o.map(j=>e.jsx(Fe.NiceButton,{size:"sm",variant:N.assignedTo===j.id?"primary":"ghost",onClick:()=>S(N.id,N.assignedTo===j.id?null:j.id),children:j.label},j.id))})]},N.id)})})})},Yh=[];function rc(t,n){const i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),s=getComputedStyle(t),o=parseFloat(s.borderLeftWidth)||0,c=parseFloat(s.borderTopWidth)||0;return{width:a.width,height:a.height,left:0,top:0,transform:`translate(${a.left-i.left-o}px, ${a.top-i.top-c}px)`,opacity:1}}function on({options:t=Yh,value:n,defaultValue:i,onChange:a,size:s="md",block:o=!1,disabled:c=!1,readOnly:d=!1,loading:p=!1,error:m,highlightFill:h=!0,errorPlacement:u="bottom",className:x="",style:f,"data-testid":b="nice-segmented-control"}){const{t:g}=l.useNiceTranslation(),v=r.useRef(null),[y,C]=r.useState(i),[w,E]=r.useState({}),S=n!==void 0?n:y,N=t.findIndex(j=>j.value===S);r.useEffect(()=>{if(!v.current||N<0){E({opacity:0});return}const j=v.current,P=j.querySelectorAll(".nice-segmented-control__option")[N];if(!P){E({opacity:0});return}E(rc(j,P))},[N,t.length,h,s,o]),r.useEffect(()=>{const j=()=>{if(!v.current||N<0)return;const T=v.current,B=T.querySelectorAll(".nice-segmented-control__option")[N];B&&E(rc(T,B))};return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[N]);const _=r.useCallback(j=>{c||d||p||t.find(P=>P.value===j)?.disabled||(n===void 0&&C(j),a?.(j))},[c,d,p,t,n,a]);l.useRovingFocus(v,{orientation:"both",wrap:!0,activateOnMove:!0});const k=e.jsxs("div",{ref:v,className:`nice-segmented-control nice-segmented-control--${s} ${o?"nice-segmented-control--block":""} ${c?"nice-segmented-control--disabled":""} ${d?"nice-segmented-control--readonly":""} ${p?"nice-segmented-control--loading":""} ${m?"nice-segmented-control--error":""} ${h?"nice-segmented-control--fill":""} ${x}`,style:f,role:"radiogroup","aria-label":g("controls.select","Select option"),"aria-busy":p||void 0,"aria-invalid":!!m||void 0,"data-testid":b,children:[e.jsx("div",{className:"nice-segmented-control__thumb",style:w}),t.map((j,T)=>{const P=j.value===S,B=c||j.disabled;return e.jsxs("button",{type:"button",className:`nice-segmented-control__option ${P?"nice-segmented-control__option--selected":""} ${B?"nice-segmented-control__option--disabled":""}`,onClick:()=>_(j.value),disabled:B||p,role:"radio","aria-checked":P,"data-testid":`${b}-option-${T}`,children:[j.icon&&e.jsx("span",{className:"nice-segmented-control__icon",children:j.icon}),e.jsx("span",{className:"nice-segmented-control__label",children:j.label})]},String(j.value))}),p&&e.jsx("div",{className:"nice-segmented-control__spinner","aria-hidden":"true",children:e.jsx("div",{className:"nice-spinner nice-spinner--sm"})})]});return m?e.jsxs("div",{className:`nice-segmented-control-field${u==="right"?" nice-segmented-control-field--err-right":""}`,children:[k,e.jsx("div",{className:"nice-segmented-control__error",role:"alert",children:m})]}):k}process.env.NODE_ENV!=="production"&&(on.displayName="NiceSegmentedControl");const Jh=["gamepad","hints","navigation","bindings"],Qh=["activate","back","secondary","tertiary","menu","view","sectionPrev","sectionNext","pagePrev","pageNext","first","last","toggleHints"],Ls={navigate:"Move",activate:"Select",back:"Back",secondary:"Options",tertiary:"More",menu:"Menu",view:"Switch area",sectionPrev:"Previous section",sectionNext:"Next section",pagePrev:"Previous page",pageNext:"Next page",first:"First",last:"Last",scroll:"Scroll",toggleHints:"Show or hide hints"},Xh=Object.assign(function({sections:n=Jh,className:i,style:a,id:s,"data-testid":o}){const{t:c}=l.useNiceTranslation(),[d,p]=l.useInputPreferences(),[m,h]=r.useState(null);r.useEffect(()=>{if(!(!m||typeof window>"u"))return l.getInputEngine().captureNextInput(g=>{m.device==="gamepad"&&g.button?p({gamepadBindings:{...d.gamepadBindings,[m.intent]:[g.button]}}):m.device==="keyboard"&&g.keys&&p({keyboardBindings:{...d.keyboardBindings,[m.intent]:[g.keys]}}),h(null)})},[m,d.gamepadBindings,d.keyboardBindings,p]);const u=(g,v)=>p({[g]:v}),x=c("inputSettings.auto","Automatic"),f=g=>{const{[g]:v,...y}=d.gamepadBindings,{[g]:C,...w}=d.keyboardBindings;p({gamepadBindings:y,keyboardBindings:w})},b=g=>{switch(g){case"gamepad":return e.jsxs("section",{className:"nice-input-settings__section",children:[e.jsx("h3",{className:"nice-input-settings__title",children:c("inputSettings.section.gamepad","Gamepad")}),e.jsxs("div",{className:"nice-input-settings__field",children:[e.jsx("span",{className:"nice-input-settings__label",children:c("inputSettings.confirmButton","Confirm with")}),e.jsx(on,{value:d.confirmButton,onChange:v=>u("confirmButton",v),options:[{value:"auto",label:x},{value:"south",label:c("input.pad.bottomButton","Bottom button")},{value:"east",label:c("input.pad.rightButton","Right button")}]})]}),e.jsx(Oe.NiceSelect,{label:c("inputSettings.glyphFamily","Button symbols"),value:d.glyphFamily,onChange:v=>u("glyphFamily",v),options:[{value:"auto",label:x},{value:"xbox",label:"Xbox"},{value:"playstation",label:"PlayStation"},{value:"nintendo",label:"Nintendo"},{value:"steam",label:"Steam"},{value:"generic",label:c("inputSettings.family.generic","Generic")}]}),e.jsx(dt.NiceSlider,{label:c("inputSettings.stickThreshold","Stick push needed to move"),min:.2,max:.9,step:.05,value:d.stickThreshold,onChange:v=>u("stickThreshold",v),showValue:!0}),e.jsx(dt.NiceSlider,{label:c("inputSettings.repeatDelay","Repeat after (ms)"),min:200,max:800,step:20,value:d.repeatDelay,onChange:v=>u("repeatDelay",v),showValue:!0}),e.jsx(dt.NiceSlider,{label:c("inputSettings.repeatInterval","Repeat every (ms)"),min:50,max:250,step:10,value:d.repeatInterval,onChange:v=>u("repeatInterval",v),showValue:!0}),e.jsx(Vt.NiceToggle,{label:c("inputSettings.invertScroll","Invert scrolling with the right stick"),checked:d.invertScroll,onChange:v=>u("invertScroll",v)}),e.jsx(Vt.NiceToggle,{label:c("inputSettings.vibration","Vibration"),checked:d.vibration,onChange:v=>u("vibration",v)})]},g);case"hints":return e.jsxs("section",{className:"nice-input-settings__section",children:[e.jsx("h3",{className:"nice-input-settings__title",children:c("inputSettings.section.hints","Button hints")}),e.jsxs("div",{className:"nice-input-settings__field",children:[e.jsx("span",{className:"nice-input-settings__label",children:c("inputSettings.hints","Show hints")}),e.jsx(on,{value:d.hints,onChange:v=>u("hints",v),options:[{value:"auto",label:c("inputSettings.hints.auto","With keyboard or pad")},{value:"always",label:c("inputSettings.always","Always")},{value:"never",label:c("inputSettings.never","Never")}]})]}),e.jsxs("div",{className:"nice-input-settings__field",children:[e.jsx("span",{className:"nice-input-settings__label",children:c("inputSettings.hintDensity","Where")}),e.jsx(on,{value:d.hintDensity,onChange:v=>u("hintDensity",v),options:[{value:"bar",label:c("inputSettings.density.bar","Hint bar")},{value:"bar-and-controls",label:c("inputSettings.density.barAndControls","Bar and controls")}]})]})]},g);case"navigation":return e.jsxs("section",{className:"nice-input-settings__section",children:[e.jsx("h3",{className:"nice-input-settings__title",children:c("inputSettings.section.navigation","Navigation")}),e.jsxs("div",{className:"nice-input-settings__field",children:[e.jsx("span",{className:"nice-input-settings__label",children:c("inputSettings.arrowNavigation","Arrow keys outside lists")}),e.jsx(on,{value:d.arrowNavigation,onChange:v=>u("arrowNavigation",v),options:[{value:"auto",label:c("inputSettings.arrows.auto","Depends on the area")},{value:"spatial",label:c("inputSettings.arrows.spatial","Move focus")},{value:"native",label:c("inputSettings.arrows.native","Scroll")}]})]}),e.jsxs("div",{className:"nice-input-settings__field",children:[e.jsx("span",{className:"nice-input-settings__label",children:c("inputSettings.onScreenKeyboard","On-screen keyboard")}),e.jsx(on,{value:d.onScreenKeyboard,onChange:v=>u("onScreenKeyboard",v),options:[{value:"auto",label:c("inputSettings.osk.auto","With a pad")},{value:"always",label:c("inputSettings.always","Always")},{value:"never",label:c("inputSettings.never","Never")}]})]})]},g);default:return e.jsxs("section",{className:"nice-input-settings__section",children:[e.jsx("h3",{className:"nice-input-settings__title",children:c("inputSettings.section.bindings","Buttons and keys")}),e.jsxs("table",{className:"nice-input-settings__bindings",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",children:c("inputSettings.actionColumn","Action")}),e.jsx("th",{scope:"col",children:c("inputSettings.gamepadColumn","Gamepad")}),e.jsx("th",{scope:"col",children:c("inputSettings.keyboardColumn","Keyboard")}),e.jsx("th",{scope:"col",children:e.jsx("span",{className:"nice-sr-only",children:c("inputSettings.reset","Reset")})})]})}),e.jsx("tbody",{children:Qh.map(v=>{const y=w=>m?.intent===v&&m.device===w,C=(d.keyboardBindings[v]??l.NICE_DEFAULT_KEYBOARD_BINDINGS[v])[0];return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"nice-input-settings__action",children:c(`input.intent.${v}`,Ls[v])}),e.jsx("td",{children:e.jsx(Fe.NiceButton,{size:"sm",variant:"ghost",onClick:()=>h({intent:v,device:"gamepad"}),"aria-label":`${c("inputSettings.change","Change")}: ${c(`input.intent.${v}`,Ls[v])}`,children:y("gamepad")?c("inputSettings.pressButton","Press a button…"):e.jsx(l.NiceButtonPrompt,{intent:v,device:"gamepad",size:"sm"})})}),e.jsx("td",{children:e.jsx(Fe.NiceButton,{size:"sm",variant:"ghost",onClick:()=>h({intent:v,device:"keyboard"}),"aria-label":`${c("inputSettings.change","Change")}: ${c(`input.intent.${v}`,Ls[v])}`,children:y("keyboard")?c("inputSettings.pressKey","Press a key…"):C?e.jsx(l.NiceKeyCap,{keys:C,size:"sm"}):c("inputSettings.none","None")})}),e.jsx("td",{children:e.jsx(Fe.NiceButton,{size:"sm",variant:"ghost",onClick:()=>f(v),children:c("inputSettings.reset","Reset")})})]},v)})})]}),e.jsxs("div",{className:"nice-input-settings__actions",children:[m&&e.jsx(Fe.NiceButton,{size:"sm",onClick:()=>h(null),children:c("inputSettings.cancel","Cancel")}),e.jsx(Fe.NiceButton,{size:"sm",variant:"secondary",onClick:()=>p({gamepadBindings:{},keyboardBindings:{}}),children:c("inputSettings.resetAll","Reset all bindings")})]})]},g)}};return e.jsx("div",{id:s,"data-testid":o,className:`nice-input-settings${i?` ${i}`:""}`,style:a,children:n.map(b)})},{displayName:"NiceInputSettings"}),rs=({value:t,max:n=100,label:i,helperText:a,error:s,required:o,disabled:c,loading:d,showValue:p=!0,text:m,variant:h="primary",size:u="md",striped:x,animated:f,formatValue:b,labelPlacement:g="top",errorPlacement:v="bottom",labelWidth:y,controlWidth:C,className:w,style:E,id:S})=>{const N=l.useControlId(S),_=Math.min(100,Math.max(0,t/n*100)),k=m??(b?b(t,n):`${Math.round(_)}%`),j=p,T=i?e.jsxs("label",{className:"nice-field__label",htmlFor:N,children:[i,o&&e.jsx("span",{className:"nice-field__required",children:"*"})]}):null,P=s?e.jsx("div",{id:`${N}-error`,className:"nice-field__error",role:"alert",children:s}):null,B=!s&&a?e.jsx("div",{id:`${N}-helper`,className:"nice-field__helper",children:a}):null,R=e.jsxs("div",{className:`nice-progress ${c?"nice-progress--disabled":""} ${d?"nice-progress--loading":""}`,role:"progressbar",id:N,"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":n,"aria-busy":d||void 0,"aria-disabled":c||void 0,children:[e.jsx("div",{className:`nice-progress__track ${u!=="md"?`nice-progress__track--${u}`:""}`,children:e.jsx("div",{className:`nice-progress__fill nice-progress__fill--${h} ${x||d?"nice-progress__fill--striped":""} ${f||d?"nice-progress__fill--animated":""}`,style:{width:d?"100%":`${_}%`}})}),j&&(g==="left"||g==="right")&&e.jsx("span",{className:"nice-progress__value",children:k})]}),I=e.jsxs("div",{className:"nice-progress__header",children:[T,j&&e.jsx("span",{className:"nice-progress__value",children:k})]});return e.jsxs("div",{className:`nice-field nice-field--${u} nice-field--progress ${g==="left"?"nice-field--label-left":""} ${w||""}`,style:{...E,...y!=null&&{"--nice-field-label-width":typeof y=="number"?`${y}px`:y},...C!=null&&{"--nice-field-control-width":typeof C=="number"?`${C}px`:C}},children:[g==="top"&&(j?I:T),g==="left"||g==="right"?e.jsxs("div",{className:"nice-field__control",style:{display:"flex",alignItems:"center",gap:"var(--nice-space-2, 8px)",flex:"1 1 auto"},children:[g==="right"?e.jsxs(e.Fragment,{children:[R,T]}):e.jsxs(e.Fragment,{children:[T,R]}),v==="right"&&P,v==="right"&&!s&&B]}):e.jsx("div",{className:"nice-field__control",children:R}),g==="bottom"&&(j?I:T),v!=="right"&&P,v!=="right"&&B]})},ps=({vertical:t,text:n,size:i="md",className:a,style:s,testId:o,"data-testid":c})=>t?e.jsx("hr",{className:`nice-divider nice-divider--vertical nice-divider--${i} ${a||""}`,style:s,"data-testid":c??o}):n?e.jsx("div",{className:`nice-divider--with-text nice-divider--${i} ${a||""}`,style:s,"data-testid":c??o,children:n}):e.jsx("hr",{className:`nice-divider nice-divider--${i} ${a||""}`,style:s,"data-testid":c??o}),oc=t=>typeof t=="number"?t:/^\d+(\.\d+)?$/.test(t.trim())?`${t}px`:t,Zh={text:14,rect:80,circle:40},eg={xxs:{text:6,rect:28,circle:16},xs:{text:8,rect:40,circle:24},sm:{text:11,rect:60,circle:32},small:{text:11,rect:60,circle:32},md:{text:14,rect:80,circle:40},medium:{text:14,rect:80,circle:40},lg:{text:20,rect:120,circle:56},large:{text:20,rect:120,circle:56},xl:{text:28,rect:160,circle:72},xxl:{text:36,rect:220,circle:96}},ha=({variant:t="text",width:n,height:i,count:a=1,size:s="md",orientation:o="vertical",animationSpeed:c,className:d,style:p,testId:m,"data-testid":h})=>{const u=eg[s]??Zh,x=oc(n??(t==="circle"?u.circle:"100%")),f=oc(i??(t==="text"?u.text:t==="circle"?u.circle:u.rect)),b=c!=null&&c>0?{"--nice-skeleton-speed":`${c}s`}:null;if(a<=1)return e.jsx("div",{className:`nice-skeleton nice-skeleton--${t} nice-skeleton--${s} ${d||""}`,style:{width:x,height:f,...b,...p},"data-testid":h??m});const g=o==="horizontal";return e.jsx("div",{className:`nice-skeleton-group ${d||""}`,style:{display:"flex",flexDirection:g?"row":"column",gap:"var(--nice-space-2, 8px)",width:"100%",...b,...p},"data-testid":h??m,children:Array.from({length:a}).map((v,y)=>e.jsx("div",{className:`nice-skeleton nice-skeleton--${t} nice-skeleton--${s}`,style:g?{flex:"1 1 0",minWidth:0,height:f}:{width:x,height:f}},y))})},Gr=({icon:t,title:n,description:i,action:a,size:s="md",className:o,style:c,testId:d,"data-testid":p})=>e.jsxs("div",{className:`nice-empty nice-empty--${s} ${o||""}`,style:c,"data-testid":p??d,role:"status","aria-label":n,children:[t&&e.jsx("div",{className:"nice-empty__icon","aria-hidden":"true",children:t}),e.jsx("div",{className:"nice-empty__title",children:n}),i&&e.jsx("div",{className:"nice-empty__desc",children:i}),a]}),tg=[],cc={xxs:9,xs:11,sm:13,small:13,md:16,medium:16,lg:20,large:20,xl:24,xxl:28},ld=Object.assign(r.forwardRef(({items:t=tg,mode:n="left",size:i="md",isFragment:a=!1,renderItem:s,className:o,style:c,id:d,testId:p,"data-testid":m,...h},u)=>{const{renderIcon:x}=l.useNiceIcon(),f=cc[i]??cc.md;return e.jsx("div",{ref:u,id:d,className:`nice-timeline nice-timeline--${n} nice-timeline--${i} ${a?"nice-timeline--fragment":""} ${o||""}`,style:c,"data-testid":m??p,...h,children:t.map((b,g)=>{const v=n==="alternate"?g%2===0?"left":"right":n;return e.jsxs("div",{className:`nice-timeline__item nice-timeline__item--${v}`,children:[e.jsx("div",{className:"nice-timeline__dot",style:b.color?{borderColor:b.color,color:b.color}:void 0,children:x(b.icon,f)??e.jsx("span",{className:"nice-timeline__dot-inner",style:b.color?{background:b.color}:void 0})}),a&&g===0&&e.jsx("div",{className:"nice-timeline__connector nice-timeline__connector--leading"}),(g<t.length-1||a)&&e.jsx("div",{className:"nice-timeline__connector"}),e.jsx("div",{className:"nice-timeline__content",children:s?s(b,g):e.jsxs(e.Fragment,{children:[b.title&&e.jsx("div",{className:"nice-timeline__title",children:b.title}),b.subtitle&&e.jsx("div",{className:"nice-timeline__subtitle",children:b.subtitle}),b.content&&e.jsx("div",{className:"nice-timeline__body",children:b.content})]})})]},b.key)})})}),{displayName:"NiceTimeline"}),ng=[],dd=Object.assign(r.forwardRef(({items:t=ng,visibleCount:n=1,showArrows:i=!0,showDots:a=!0,autoPlay:s=7e3,circular:o=!0,activeIndex:c,onChange:d,size:p="md",fullWidth:m=!0,className:h,style:u,id:x,testId:f,"data-testid":b,...g},v)=>{const{t:y}=l.useNiceTranslation(),[C,w]=r.useState(0),E=r.useRef(void 0),N=c!=null&&typeof d=="function"?c:C,_=Math.max(1,Math.floor(n||1)),k=Math.max(0,t.length-_),j=r.useCallback(q=>{let se=q;o?se=(q%t.length+t.length)%t.length:se=Math.max(0,Math.min(k,q)),w(se),d?.(se)},[t.length,k,o,d]),T=r.useCallback(()=>j(N+1),[j,N]),P=r.useCallback(()=>j(N-1),[j,N]),[B,R]=r.useState(!1),[I,D]=r.useState(!1),[M,O]=r.useState(!1),L=s>0&&!M&&!B&&!I;r.useEffect(()=>{if(L)return E.current=setInterval(T,s),()=>clearInterval(E.current)},[L,s,T]);const V=o||N>0,ee=o||N<k,z=r.useRef(null);r.useEffect(()=>{const q=z.current?.children;q&&Array.from(q).forEach((se,ce)=>{se.toggleAttribute("inert",ce<N||ce>=N+_)})},[N,_,t.length]);const U=r.useRef(null),re=r.useCallback(q=>{U.current=q,typeof v=="function"?v(q):v&&(v.current=q)},[v]);l.useIntent(["sectionPrev","sectionNext"],q=>{if(q.intent==="sectionNext"?!ee:!V)return!1;q.intent==="sectionNext"?T():P()},{ref:U,enabled:t.length>_}),l.useInputHints(U,[{intent:"sectionPrev",label:y("carousel.prev","Previous slide")},{intent:"sectionNext",label:y("carousel.next","Next slide")}],{enabled:t.length>_});const Y=r.useCallback(q=>{q.target===q.currentTarget&&(q.key==="ArrowLeft"&&V?(q.preventDefault(),P()):q.key==="ArrowRight"&&ee?(q.preventDefault(),T()):q.key==="Home"?(q.preventDefault(),j(0)):q.key==="End"&&(q.preventDefault(),j(k)))},[P,T,j,V,ee,k]),oe=r.useRef(null);return l.useRovingFocus(oe,{orientation:"horizontal",activateOnMove:!0}),e.jsxs("div",{ref:re,id:x,className:`nice-carousel nice-carousel--${p} ${m?"nice-carousel--full-width":""} ${h||""}`,style:u,"data-testid":b??f,role:"region","aria-roledescription":"carousel","aria-label":y("carousel.label","Carousel"),tabIndex:0,onKeyDown:Y,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onFocus:()=>D(!0),onBlur:q=>{q.currentTarget.contains(q.relatedTarget)||D(!1)},...g,children:[s>0&&e.jsx("button",{type:"button",className:"nice-carousel__rotation",onClick:()=>O(q=>!q),"aria-label":M?y("carousel.startRotation","Start automatic slide show"):y("carousel.stopRotation","Stop automatic slide show"),children:e.jsx(l.NiceIcon,{name:M?"play":"pause",size:16})}),e.jsx("div",{className:"nice-carousel__viewport","aria-live":L?"off":"polite",children:e.jsx("div",{ref:z,className:"nice-carousel__track",style:{transform:`translateX(-${N*(100/_)}%)`,"--nice-carousel-slide-basis":`${100/_}%`},children:t.map((q,se)=>e.jsx("div",{className:"nice-carousel__slide",role:"group","aria-roledescription":"slide","aria-label":`${se+1} / ${t.length}`,children:q},se))})}),i&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"nice-carousel__arrow nice-carousel__arrow--prev",onClick:P,disabled:!V,"aria-label":y("carousel.prev","Previous"),children:e.jsx(l.NiceIcon,{name:"chevron-left",size:20})}),e.jsx("button",{type:"button",className:"nice-carousel__arrow nice-carousel__arrow--next",onClick:T,disabled:!ee,"aria-label":y("carousel.next","Next"),children:e.jsx(l.NiceIcon,{name:"chevron-right",size:20})})]}),a&&t.length>_&&e.jsx("div",{className:"nice-carousel__dots",role:"tablist",ref:oe,children:Array.from({length:k+1},(q,se)=>e.jsx("button",{type:"button",className:`nice-carousel__dot ${se===N?"nice-carousel__dot--active":""}`,onClick:()=>j(se),role:"tab","aria-selected":se===N,"aria-label":`${y("carousel.goTo","Go to slide")} ${se+1}`},se))})]})}),{displayName:"NiceCarousel"}),ig=[];function ag({items:t=ig,itemHeight:n,height:i=400,overscan:a=3,renderItem:s,itemKey:o,className:c,style:d,size:p="md",disabled:m,readOnly:h,loading:u,error:x,testId:f,"data-testid":b,...g},v){const y=r.useRef(null),[C,w]=r.useState(0),E=typeof i=="number"?i:parseFloat(String(i)),S=Number.isFinite(E)?E:400,N=Number.isFinite(n)&&n>0?n:1,_=Number.isFinite(a)&&a>=0?Math.floor(a):0,k=t.length*N,{startIndex:j,endIndex:T}=r.useMemo(()=>{const R=Math.max(1,Math.ceil(S/N)),I=Math.floor(C/N),D=Math.max(0,I-_),M=Math.min(t.length-1,I+R+_);return{startIndex:D,endIndex:M}},[C,S,N,t.length,_]),P=r.useCallback(R=>{w(R.currentTarget.scrollTop)},[]);r.useEffect(()=>{v&&(typeof v=="function"?v(y.current):v.current=y.current)},[v]);const B=r.useMemo(()=>{const R=[];for(let I=j;I<=T;I++){const D=o?o(t[I],I):I;R.push(e.jsx("div",{className:"nice-virtual-scroller__item",style:{position:"absolute",top:I*N,left:0,right:0,height:N},children:s(t[I],I)},D))}return R},[j,T,t,N,s,o]);return e.jsxs("div",{ref:y,className:`nice-virtual-scroller nice-virtual-scroller--${p} ${m?"nice-virtual-scroller--disabled":""} ${x?"nice-virtual-scroller--error":""} ${c||""}`,style:{width:"100%",...d,height:typeof i=="string"&&!/^\d+(\.\d+)?$/.test(i)?i:S,overflow:"auto",position:"relative"},onScroll:P,role:"list","aria-disabled":m||void 0,"aria-busy":u||void 0,"data-testid":b??f,...g,children:[x?e.jsx("div",{className:"nice-virtual-scroller__error",role:"alert",children:x}):e.jsx("div",{style:{height:k,position:"relative",width:"100%"},children:B}),u&&e.jsx("div",{className:"nice-virtual-scroller__loading","aria-hidden":"true",children:e.jsx("span",{className:"nice-spinner nice-spinner--sm"})})]})}const ud=Object.assign(r.forwardRef(ag),{displayName:"NiceVirtualScroller"}),sg=[],pd=r.createContext(null);function Ts(){const t=r.useContext(pd);if(!t)throw new Error("useFAQ must be used within NiceFAQ");return t}function La(t,n){if(!n)return{score:1,indices:[]};const i=t.toLowerCase(),s=n.toLowerCase().split(/\s+/).filter(Boolean);let o=0;const c=[];for(const p of s){let m=!1,h=0;for(;(h=i.indexOf(p,h))!==-1;){m=!0,c.push([h,h+p.length]);const u=h===0||/\s/.test(t[h-1]),x=h+p.length===t.length||/\s/.test(t[h+p.length]);u&&x?o+=2:u?o+=1.5:o+=1,h+=1}if(!m){let u=0,x=-1;for(let f=0;f<i.length&&u<p.length;f++)if(i[f]===p[u]){if(x===-1||f===x+1)if(x===-1)c.push([f,f+1]);else{const b=c[c.length-1];b[1]=f+1}else c.push([f,f+1]);x=f,u++}if(u===p.length)o+=.5;else return null}}const d=rg(c);return{score:o/s.length,indices:d}}function rg(t){if(t.length===0)return[];const n=[...t].sort((a,s)=>a[0]-s[0]),i=[n[0]];for(let a=1;a<n.length;a++){const s=i[i.length-1],o=n[a];o[0]<=s[1]?s[1]=Math.max(s[1],o[1]):i.push(o)}return i}function og(t,n){if(!n.trim())return t.map(a=>({item:a,score:1,matches:[]}));const i=[];for(const a of t){const s=[];let o=0;const c=La(a.question,n);if(c&&c.score>0&&(s.push({field:"question",indices:c.indices}),o+=c.score*3),typeof a.answer=="string"){const d=La(a.answer,n);d&&d.score>0&&(s.push({field:"answer",indices:d.indices}),o+=d.score*1)}if(a.tags)for(const d of a.tags){const p=La(d,n);if(p&&p.score>0){s.push({field:"tags",indices:p.indices}),o+=p.score*2;break}}if(a.keywords)for(const d of a.keywords){const p=La(d,n);if(p&&p.score>0){s.push({field:"keywords",indices:p.indices}),o+=p.score*2.5;break}}s.length>0&&(a.featured&&(o*=1.2),i.push({item:a,score:o,matches:s}))}return i.sort((a,s)=>s.score-a.score)}const cg=({text:t,indices:n})=>{if(n.length===0)return e.jsx(e.Fragment,{children:t});const i=[];let a=0;for(const[s,o]of n)s>a&&i.push(e.jsx("span",{children:t.slice(a,s)},`text-${a}`)),i.push(e.jsx("mark",{className:"nice-faq-highlight",children:t.slice(s,o)},`mark-${s}`)),a=o;return a<t.length&&i.push(e.jsx("span",{children:t.slice(a)},`text-${a}`)),e.jsx(e.Fragment,{children:i})},md=({placeholder:t,autoFocus:n=!1,showIcon:i=!0,debounceMs:a=200})=>{const{t:s}=l.useNiceTranslation(),o=t??s("faq.searchFaqPlaceholder","Search FAQ..."),{searchQuery:c,setSearchQuery:d}=Ts(),[p,m]=r.useState(c),h=r.useRef(null),u=r.useRef(null);r.useEffect(()=>(u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{d(p)},a),()=>{u.current&&clearTimeout(u.current)}),[p,a,d]);const x=r.useCallback(()=>{m(""),d(""),h.current?.focus()},[d]);return e.jsxs("div",{className:"nice-faq-search",children:[i&&e.jsx("span",{className:"nice-faq-search-icon",children:e.jsx(l.NiceIcon,{name:"search",size:16})}),e.jsx("input",{ref:h,type:"text",className:"nice-faq-search-input",placeholder:o,value:p,onChange:f=>m(f.target.value),autoFocus:n,"aria-label":s("faq.searchFaq","Search FAQ")}),p&&e.jsx("button",{className:"nice-faq-search-clear",onClick:x,"aria-label":s("faq.clearSearch","Clear search"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]})},hd=({showCounts:t=!0,layout:n="horizontal"})=>{const{t:i}=l.useNiceTranslation(),{categories:a,items:s,selectedCategory:o,setSelectedCategory:c}=Ts(),d=r.useMemo(()=>{const p={all:s.length};for(const m of s)m.category&&(p[m.category]=(p[m.category]||0)+1);return p},[s]);return a.length===0?null:n==="dropdown"?e.jsx("div",{className:"nice-faq-category-dropdown",children:e.jsxs("select",{value:o||"all",onChange:p=>c(p.target.value==="all"?null:p.target.value),className:"nice-faq-category-select",children:[e.jsxs("option",{value:"all",children:[i("faq.allCategories","All Categories")," ",t&&`(${d.all})`]}),a.map(p=>e.jsxs("option",{value:p.id,children:[p.name," ",t&&`(${d[p.id]||0})`]},p.id))]})}):e.jsxs("div",{className:`nice-faq-categories nice-faq-categories--${n}`,children:[e.jsxs("button",{className:`nice-faq-category-btn ${o?"":"nice-faq-category-btn--active"}`,onClick:()=>c(null),children:[e.jsx("span",{children:i("faq.all","All")}),t&&e.jsx("span",{className:"nice-faq-category-count",children:d.all})]}),a.map(p=>e.jsxs("button",{className:`nice-faq-category-btn ${o===p.id?"nice-faq-category-btn--active":""}`,onClick:()=>c(p.id),style:p.color?{"--cat-color":p.color}:void 0,children:[p.icon&&e.jsx("span",{className:"nice-faq-category-icon",children:p.icon}),e.jsx("span",{children:p.name}),t&&e.jsx("span",{className:"nice-faq-category-count",children:d[p.id]||0})]},p.id))]})},Wr=({result:t,showFeedback:n=!0,showRelated:i=!0,animateExpand:a=!0})=>{const{t:s}=l.useNiceTranslation(),{item:o,matches:c}=t,{expandedIds:d,toggleExpanded:p,items:m,submitFeedback:h}=Ts(),[u,x]=r.useState(null),[f,b]=r.useState(!1),[g,v]=r.useState(""),y=r.useRef(null),C=d.has(o.id);r.useEffect(()=>{y.current?.toggleAttribute("inert",!C)},[C]);const w=c.find(_=>_.field==="question")?.indices||[],E=r.useMemo(()=>!i||!o.relatedIds||o.relatedIds.length===0?[]:m.filter(_=>o.relatedIds?.includes(_.id)),[i,o.relatedIds,m]),S=_=>{x(_),_?h(o.id,_):b(!0)},N=()=>{h(o.id,!1,g),b(!1),v("")};return e.jsxs("div",{className:`nice-faq-item ${C?"nice-faq-item--expanded":""} ${o.featured?"nice-faq-item--featured":""}`,"data-question-id":o.id,children:[e.jsxs("button",{className:"nice-faq-question",onClick:()=>p(o.id),"aria-expanded":C,"aria-controls":`faq-answer-${o.id}`,children:[o.icon&&e.jsx("span",{className:"nice-faq-question-icon",children:o.icon}),e.jsx("span",{className:"nice-faq-question-text",children:e.jsx(cg,{text:o.question,indices:w})}),e.jsx("span",{className:`nice-faq-chevron ${C?"nice-faq-chevron--open":""}`,children:e.jsx(l.NiceIcon,{name:"chevron-down",size:16})})]}),e.jsx("div",{id:`faq-answer-${o.id}`,className:`nice-faq-answer ${a?"nice-faq-answer--animated":""}`,ref:y,style:{maxHeight:C?a?y.current?.scrollHeight??1e3:void 0:0},"aria-hidden":!C,children:e.jsxs("div",{className:"nice-faq-answer-content",children:[typeof o.answer=="string"?e.jsx("p",{children:o.answer}):o.answer,o.tags&&o.tags.length>0&&e.jsx("div",{className:"nice-faq-tags",children:o.tags.map(_=>e.jsx("span",{className:"nice-faq-tag",children:_},_))}),E.length>0&&e.jsxs("div",{className:"nice-faq-related",children:[e.jsx("span",{className:"nice-faq-related-label",children:s("faq.related","Related:")}),E.map(_=>e.jsx("button",{className:"nice-faq-related-link",onClick:k=>{k.stopPropagation(),p(_.id),document.querySelector(`[data-question-id="${_.id}"]`)?.scrollIntoView({behavior:"smooth",block:"center"})},children:_.question},_.id))]}),n&&e.jsxs("div",{className:"nice-faq-feedback",children:[u===null?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"nice-faq-feedback-label",children:s("faq.wasThisHelpful","Was this helpful?")}),e.jsxs("button",{className:"nice-faq-feedback-btn nice-faq-feedback-btn--yes",onClick:()=>S(!0),"aria-label":s("faq.yesThisWasHelpful","Yes, this was helpful"),children:[e.jsx(l.NiceIcon,{name:"check",size:14})," ",s("faq.yes","Yes")]}),e.jsxs("button",{className:"nice-faq-feedback-btn nice-faq-feedback-btn--no",onClick:()=>S(!1),"aria-label":s("faq.noThisWasNotHelpful","No, this was not helpful"),children:[e.jsx(l.NiceIcon,{name:"close",size:14})," ",s("faq.no","No")]})]}):e.jsx("span",{className:"nice-faq-feedback-thanks",children:u?s("faq.thanksForYourFeedback","Thanks for your feedback!"):""}),f&&e.jsxs("div",{className:"nice-faq-feedback-form",children:[e.jsx("textarea",{placeholder:s("faq.howCanWeImproveThis","How can we improve this answer?"),value:g,onChange:_=>v(_.target.value),className:"nice-faq-feedback-textarea",rows:3}),e.jsxs("div",{className:"nice-faq-feedback-actions",children:[e.jsx("button",{className:"nice-faq-feedback-submit",onClick:N,children:s("faq.submit","Submit")}),e.jsx("button",{className:"nice-faq-feedback-cancel",onClick:()=>{b(!1),x(null)},children:s("faq.cancel","Cancel")})]})]})]})]})})]})},xr=({category:t,results:n,showFeedback:i,showRelated:a,collapsible:s=!0})=>{const{t:o}=l.useNiceTranslation(),[c,d]=r.useState(!1),p=r.useId();return n.length===0?null:e.jsxs("div",{className:"nice-faq-group",children:[e.jsxs("div",{className:`nice-faq-group-header ${s?"nice-faq-group-header--collapsible":""}`,role:"presentation",onClick:s?()=>d(!c):void 0,style:t.color?{borderColor:t.color}:void 0,children:[t.icon&&e.jsx("span",{className:"nice-faq-group-icon",children:t.icon}),e.jsx("h3",{className:"nice-faq-group-title",children:t.name}),t.description&&e.jsx("p",{className:"nice-faq-group-desc",children:t.description}),e.jsx("span",{className:"nice-faq-group-count",children:n.length}),s&&e.jsx("button",{type:"button",className:`nice-faq-group-chevron ${c?"":"nice-faq-group-chevron--open"}`,"aria-expanded":!c,"aria-controls":c?void 0:p,"aria-label":`${c?o("faq.expandGroup","Expand"):o("faq.collapseGroup","Collapse")}: ${t.name}`,onClick:m=>{m.stopPropagation(),d(!c)},children:e.jsx(l.NiceIcon,{name:"chevron-down",size:16})})]}),!c&&e.jsx("div",{id:p,className:"nice-faq-group-items",children:n.map(m=>e.jsx(Wr,{result:m,showFeedback:i,showRelated:a},m.item.id))})]})},lg=({items:t=sg,categories:n=[],showSearch:i=!0,searchPlaceholder:a,autoFocusSearch:s=!1,showCategories:o=!0,categoryLayout:c="horizontal",groupByCategory:d=!0,allowMultiple:p=!0,defaultExpanded:m=[],showFeedback:h=!0,showRelated:u=!0,onFeedback:x,onAnalytics:f,showExpandControls:b=!0,animateExpand:g=!0,emptyMessage:v,generateSchema:y=!0,header:C,footer:w,size:E="md",className:S,style:N,testId:_,"data-testid":k})=>{const{t:j}=l.useNiceTranslation(),T=a??j("faq.searchFrequentlyAskedQuestions","Search frequently asked questions..."),P=v??j("faq.noQuestionsFoundMatchingYour","No questions found matching your search."),[B,R]=r.useState(new Set(m)),[I,D]=r.useState(""),[M,O]=r.useState(null),L=r.useMemo(()=>[...t].sort((le,J)=>le.featured&&!J.featured?-1:!le.featured&&J.featured?1:(le.order??999)-(J.order??999)),[t]),V=r.useMemo(()=>M?L.filter(le=>le.category===M):L,[L,M]),ee=r.useMemo(()=>og(V,I),[V,I]),z=r.useMemo(()=>{if(!d||n.length===0)return null;const le={},J=[];for(const me of ee){const je=me.item.category;je?(le[je]||(le[je]=[]),le[je].push(me)):J.push(me)}return{groups:le,uncategorized:J}},[d,n,ee]),U=r.useCallback(le=>{R(J=>{const me=new Set(J);return me.has(le)?(me.delete(le),f?.({type:"collapse",questionId:le,timestamp:new Date().toISOString()})):(p||me.clear(),me.add(le),f?.({type:"expand",questionId:le,timestamp:new Date().toISOString()})),me})},[p,f]),re=r.useCallback(()=>{R(new Set(t.map(le=>le.id)))},[t]),Y=r.useCallback(()=>{R(new Set)},[]),oe=r.useCallback(le=>{D(le),le.trim()&&f?.({type:"search",searchQuery:le,timestamp:new Date().toISOString()})},[f]),q=r.useCallback((le,J,me)=>{const je={questionId:le,helpful:J,comment:me,timestamp:new Date().toISOString()};x?.(je),f?.({type:"feedback",questionId:le,timestamp:je.timestamp,metadata:{helpful:J,comment:me}})},[x,f]),se=r.useMemo(()=>{if(!y)return null;const le={"@context":"https://schema.org","@type":"FAQPage",mainEntity:t.map(J=>({"@type":"Question",name:J.question,acceptedAnswer:{"@type":"Answer",text:typeof J.answer=="string"?J.answer:""}}))};return e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(le)}})},[y,t]),ce={items:L,categories:n,expandedIds:B,searchQuery:I,selectedCategory:M,toggleExpanded:U,expandAll:re,collapseAll:Y,setSearchQuery:oe,setSelectedCategory:O,submitFeedback:q};return e.jsx(pd.Provider,{value:ce,children:e.jsxs("div",{className:`nice-faq nice-faq--${E} ${S||""}`,style:N,"data-testid":k??_,children:[se,C&&e.jsx("div",{className:"nice-faq-header",children:C}),e.jsxs("div",{className:"nice-faq-controls",children:[i&&e.jsx(md,{placeholder:T,autoFocus:s}),o&&n.length>0&&e.jsx(hd,{layout:c,showCounts:!0}),b&&e.jsxs("div",{className:"nice-faq-expand-controls",children:[e.jsx("button",{className:"nice-faq-expand-btn",onClick:re,children:j("faq.expandAll","Expand All")}),e.jsx("button",{className:"nice-faq-expand-btn",onClick:Y,children:j("faq.collapseAll","Collapse All")})]})]}),I&&e.jsx("div",{className:"nice-faq-results-info",children:(ee.length===1?j("faq.foundOneResult",'Found 1 result for "{query}"'):j("faq.foundResults",'Found {count} results for "{query}"')).replace("{count}",String(ee.length)).replace("{query}",I)}),e.jsx("div",{className:"nice-faq-list",children:ee.length===0?e.jsx("div",{className:"nice-faq-empty",children:typeof P=="string"?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"nice-faq-empty-icon",children:e.jsx(l.NiceIcon,{name:"search",size:32})}),e.jsx("p",{children:P})]}):P}):z?e.jsxs(e.Fragment,{children:[n.sort((le,J)=>(le.order??999)-(J.order??999)).map(le=>e.jsx(xr,{category:le,results:z.groups[le.id]||[],showFeedback:h,showRelated:u},le.id)),z.uncategorized.length>0&&e.jsx(xr,{category:{id:"other",name:"Other Questions"},results:z.uncategorized,showFeedback:h,showRelated:u})]}):ee.map(le=>e.jsx(Wr,{result:le,showFeedback:h,showRelated:u,animateExpand:g},le.item.id))}),w&&e.jsx("div",{className:"nice-faq-footer",children:w})]})})},dg=[];function zs(t,n){return n.split(".").reduce((i,a)=>{if(i&&typeof i=="object")return i[a]},t)}const ug=({status:t})=>{const{t:n}=l.useNiceTranslation(),a={connecting:{color:"var(--nice-color-warning, #f59e0b)",label:n("liveGrid.connecting","Connecting...")},connected:{color:"var(--nice-color-success, #22c55e)",label:n("liveGrid.live","Live")},disconnected:{color:"var(--nice-text-muted, #6b7280)",label:n("liveGrid.disconnected","Disconnected")},error:{color:"var(--nice-color-error, #ef4444)",label:n("error","Error")}}[t];return e.jsxs("div",{className:"nice-live-grid-status",children:[e.jsx("span",{className:"nice-live-grid-status-dot",style:{backgroundColor:a.color}}),e.jsx("span",{className:"nice-live-grid-status-label",children:a.label})]})};function pg({columns:t=dg,data:n=[],dataSource:i,rowKey:a="id",showConnectionStatus:s=!0,highlightDuration:o=2e3,updateAnimation:c="flash",maxRows:d,selectable:p=!1,selectedIds:m,onSelectionChange:h,onRowClick:u,onUpdate:x,onConnectionStatusChange:f,emptyContent:b,loadingContent:g,sortable:v=!1,sortField:y,sortDirection:C,onSortChange:w,virtualized:E=!1,rowHeight:S=40,height:N=400,className:_="",style:k,"data-testid":j},T){const{t:P}=l.useNiceTranslation(),[B,R]=r.useState(n),[I,D]=r.useState(!1),[M,O]=r.useState("disconnected"),[L,V]=r.useState(new Map),[ee,z]=r.useState(m||new Set),U=r.useRef(null),re=r.useRef(null),Y=r.useRef(new Map),oe=m??ee,q=h??z,se=r.useCallback(A=>A[a],[a]),ce=r.useCallback((A,Z,fe=[])=>{V(Q=>{const ne=new Map(Q);return ne.set(A,{operation:Z,changedFields:new Set(fe),timestamp:Date.now()}),ne});const Ne=Y.current.get(A);Ne&&clearTimeout(Ne);const K=setTimeout(()=>{V(Q=>{const ne=new Map(Q);return ne.delete(A),ne}),Y.current.delete(A)},o);Y.current.set(A,K)},[o]),le=r.useCallback(A=>{const Z=se(A.row);if(R(fe=>{switch(A.operation){case"insert":{if(fe.some(Q=>se(Q)===Z))return fe;const K=[A.row,...fe];return d&&K.length>d?K.slice(0,d):K}case"update":return fe.map(Ne=>se(Ne)===Z?{...Ne,...A.row,...A.changes||{}}:Ne);case"upsert":{if(fe.some(Q=>se(Q)===Z))return fe.map(Q=>se(Q)===Z?{...Q,...A.row,...A.changes||{}}:Q);const K=[A.row,...fe];return d&&K.length>d?K.slice(0,d):K}case"delete":return fe.filter(Ne=>se(Ne)!==Z);default:return fe}}),c!=="none"){const fe=A.changes?Object.keys(A.changes):[];ce(Z,A.operation,fe)}x?.(A)},[se,d,c,ce,x]),J=r.useCallback(A=>{"updates"in A?A.fullRefresh?R(A.updates.map(Z=>Z.row)):A.updates.forEach(le):le(A)},[le]);r.useEffect(()=>{if(!i)return;i.fetchInitial&&(D(!0),i.fetchInitial().then(Z=>{R(Z),D(!1)})),re.current=i.subscribe(J);let A;return i.onStatusChange?A=i.onStatusChange(Z=>{O(Z),f?.(Z)}):(O("connected"),f?.("connected")),()=>{re.current?.(),A?.()}},[i,J,f]),r.useEffect(()=>{const A=Y.current;return()=>{A.forEach(Z=>clearTimeout(Z))}},[]),r.useImperativeHandle(T,()=>({getData:()=>B,addRow:A=>le({operation:"insert",row:A}),updateRow:(A,Z)=>{const fe=B.find(Ne=>se(Ne)===A);fe&&le({operation:"update",row:fe,changes:Z})},deleteRow:A=>{const Z=B.find(fe=>se(fe)===A);Z&&le({operation:"delete",row:Z})},refresh:()=>{i?.fetchInitial&&(D(!0),i.fetchInitial().then(A=>{R(A),D(!1)}))},getConnectionStatus:()=>M}));const me=r.useMemo(()=>!y||!C?B:[...B].sort((A,Z)=>{const fe=zs(A,y),Ne=zs(Z,y);if(fe===Ne)return 0;if(fe==null)return 1;if(Ne==null)return-1;const K=fe<Ne?-1:1;return C==="asc"?K:-K}),[B,y,C]),je=r.useCallback((A,Z)=>{if(p){const fe=se(A),Ne=new Set(oe);Ne.has(fe)?Ne.delete(fe):Ne.add(fe),q(Ne)}u?.(A,Z)},[p,se,oe,q,u]),ue=r.useCallback(A=>{if(!v)return;let Z="asc";y===A&&(Z=C==="asc"?"desc":"asc"),w?.(A,Z)},[v,y,C,w]),F=r.useCallback(A=>{const Z=se(A),fe=L.get(Z),Ne=oe.has(Z),K=["nice-live-grid-row"];return Ne&&K.push("nice-live-grid-row--selected"),fe&&(K.push(`nice-live-grid-row--${fe.operation}`),K.push(`nice-live-grid-row--${c}`)),K.join(" ")},[se,L,oe,c]),H=r.useCallback((A,Z)=>{const fe=se(A);return L.get(fe)?.changedFields.has(Z)?"nice-live-grid-cell--changed":""},[se,L]);return I&&B.length===0?e.jsx("div",{className:`nice-live-grid nice-live-grid--loading ${_}`,style:k,"data-testid":j,children:g===void 0?P("loading","Loading…"):g}):e.jsxs("div",{ref:U,className:`nice-live-grid ${_}`,style:{...k,height:N},"data-testid":j,children:[s&&e.jsxs("div",{className:"nice-live-grid-header",children:[e.jsx(ug,{status:M}),e.jsx("span",{className:"nice-live-grid-count",children:P("liveGrid.rows","{count} rows").replace("{count}",String(B.length))})]}),e.jsx("div",{className:"nice-live-grid-table-wrapper",children:e.jsxs("table",{className:"nice-live-grid-table",children:[e.jsx("thead",{children:e.jsx("tr",{children:t.map(A=>e.jsxs("th",{className:`nice-live-grid-th ${v&&A.sortable!==!1?"nice-live-grid-th--sortable":""}`,style:{width:A.width,minWidth:A.minWidth,maxWidth:A.maxWidth,textAlign:A.align||"left"},onClick:()=>A.sortable!==!1&&ue(String(A.field)),children:[A.headerRender?A.headerRender(A):A.header,y===String(A.field)&&e.jsx("span",{className:"nice-live-grid-sort-icon",children:e.jsx(l.NiceIcon,{name:C==="asc"?"sort-asc":"sort-desc",size:12})})]},String(A.field)))})}),e.jsx("tbody",{children:me.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:t.length,className:"nice-live-grid-empty",children:b===void 0?P("noData","No data"):b})}):me.map(A=>e.jsx("tr",{className:F(A),onClick:Z=>je(A,Z),style:{height:S},children:t.map(Z=>{const fe=zs(A,String(Z.field));return e.jsx("td",{className:`nice-live-grid-td ${H(A,String(Z.field))}`,style:{textAlign:Z.align||"left"},children:Z.render?Z.render(fe,A,Z):String(fe??"")},String(Z.field))})},String(se(A))))})]})})]})}const mg=Object.assign(r.forwardRef(pg),{displayName:"NiceLiveDataGrid"});function Vi(t){return{key:t?.keyField??"id",children:t?.childrenField??"children"}}function Li(t,n){return String(t[n])}function zi(t,n){const i=t[n];return Array.isArray(i)?i:void 0}function lc(t,n,i){return{...t,[n]:i}}function sn(t,n,i){const a=Vi(i),s=(o,c,d)=>{o.forEach((p,m)=>{const h={node:p,parent:c,parentId:c===null?null:Li(c,a.key),index:m,siblings:o,ancestors:d,depth:d.length};if(n(p,h)===!1)return;const u=zi(p,a.children);u?.length&&s(u,p,[...d,p])})};s(t,null,[])}function It(t,n,i){const a=Vi(i),s=(o,c,d)=>{for(let p=0;p<o.length;p++){const m=o[p];if(Li(m,a.key)===n)return{node:m,parent:c,parentId:c===null?null:Li(c,a.key),index:p,siblings:o,ancestors:d,depth:d.length};const h=zi(m,a.children);if(h?.length){const u=s(h,m,[...d,m]);if(u)return u}}};return s(t,null,[])}function si(t,n,i){return It(t,n,i)?.node}function Kr(t,n,i,a){const s=Vi(a);return!!It(t,n,a)?.ancestors.some(c=>Li(c,s.key)===i)}function _a(t,n){const i=Vi(n),a=zi(t,i.children);return a?.length?1+Math.max(...a.map(s=>_a(s,n))):1}function Yr(t,n,i,a){const s=Vi(a);if(n===null)return i(t);let o=!1;const c=d=>{let p=null;for(let m=0;m<d.length&&!o;m++){const h=d[m];let u=null;if(Li(h,s.key)===n)u=lc(h,s.children,i(zi(h,s.children)??[])),o=!0;else{const x=zi(h,s.children),f=x?.length?c(x):null;f&&(u=lc(h,s.children,f))}u&&(p=p??[...d],p[m]=u)}return p};return c(t)??[...t]}function Hn(t,n,i,a){return i.parentId!==null&&!si(t,i.parentId,a)?t:Yr(t,i.parentId,s=>{const o=[...s];return o.splice(Math.max(0,Math.min(i.index,o.length)),0,n),o},a)}function mi(t,n,i){const a=It(t,n,i);return a?Yr(t,a.parentId,s=>s.filter((o,c)=>c!==a.index),i):t}function ka(t,n,i,a){const s=It(t,n,a);if(!s)return t;const o=typeof i=="function"?i(s.node):{...s.node,...i};return Yr(t,s.parentId,c=>c.map((d,p)=>p===s.index?o:d),a)}function Ui(t,n,i,a){const s=It(t,n,a);if(!s||i.parentId!==null&&(i.parentId===n||Kr(t,i.parentId,n,a)||!si(t,i.parentId,a)))return t;let o=i.index;if(s.parentId===i.parentId&&(o>s.index&&(o-=1),o=Math.max(0,Math.min(o,s.siblings.length-1)),o===s.index))return t;const c=mi(t,n,a);return Hn(c,s.node,{parentId:i.parentId,index:o},a)}function ms(t,n,i,a){const s=It(t,n,a);if(!s)return t;const o=Math.max(0,Math.min(s.index+i,s.siblings.length-1));return o===s.index?t:Ui(t,n,{parentId:s.parentId,index:o>s.index?o+1:o},a)}function Jr(t,n,i){const a=Vi(i),s=It(t,n,i);if(!s||s.index===0)return t;const o=s.siblings[s.index-1];return Ui(t,n,{parentId:Li(o,a.key),index:zi(o,a.children)?.length??0},i)}function Qr(t,n,i){const a=It(t,n,i);if(!a||a.parentId===null)return t;const s=It(t,a.parentId,i);return s?Ui(t,n,{parentId:s.parentId,index:s.index+1},i):t}const hg=[],gg=["moveUp","moveDown","indent","outdent","rename","remove"],bg=5,dc=28,fg=600,vg=16,xg=10;function yg(t){const{value:n,defaultValue:i,onChange:a,keyField:s="id",childrenField:o="children",labelField:c="label",getLabel:d,renderLabel:p,getIcon:m,renderRowEnd:h,selectedId:u,defaultSelectedId:x,onSelect:f,collapsedIds:b,defaultCollapsedIds:g,onCollapsedChange:v,canHaveChildren:y,canDrag:C,canDrop:w,maxDepth:E,editable:S=!1,removable:N=!1,actions:_=!0,contextMenuItems:k,onExternalDrop:j,emptyText:T,"aria-label":P,height:B,size:R="md",readOnly:I=!1,disabled:D=!1,className:M,style:O,id:L,title:V,accessMode:ee,"data-testid":z}=t,{t:U}=l.useNiceTranslation(),re=l.useNiceAccessMode(ee,L),Y=D||re==="disabled",oe=I||re==="readOnly"||Y,q=r.useMemo(()=>({keyField:s,childrenField:o}),[s,o]),[se,ce]=l.useControllableState({value:n,defaultValue:i,fallbackValue:[],componentName:"NiceSortableTree"}),[le,J]=l.useControllableState({value:u,defaultValue:x,fallbackValue:null,componentName:"NiceSortableTree"}),[me,je]=l.useControllableState({value:b,defaultValue:g,fallbackValue:hg,componentName:"NiceSortableTree"}),ue=r.useCallback(de=>String(de[s]),[s]),F=r.useCallback(de=>{const De=de[o];return Array.isArray(De)?De:[]},[o]),H=r.useCallback(de=>{if(d)return d(de);const De=de[c];return De==null?ue(de):String(De)},[d,c,ue]),A=(de,De)=>!oe&&(typeof de=="function"?de(De):de),Z=r.useCallback(de=>y?y(de):!0,[y]),fe=r.useMemo(()=>new Set(me),[me]),Ne=r.useMemo(()=>{const de=[];return sn(se,(De,Ge)=>{const Xe=ue(De),lt=F(De).length>0,yt=lt&&!fe.has(Xe);return de.push({node:De,id:Xe,depth:Ge.depth,parentId:Ge.parentId,index:Ge.index,setSize:Ge.siblings.length,hasChildren:lt,expanded:yt}),yt?void 0:!1},q),de},[se,fe,ue,F,q]),K=r.useMemo(()=>new Map(Ne.map(de=>[de.id,de])),[Ne]),Q=r.useRef(null),ne=r.useRef(null),[G,Se]=r.useState(""),te=r.useRef(null),we=r.useCallback(de=>{je(de),v?.(de)},[je,v]),ie=r.useCallback((de,De)=>{const Ge=me.includes(de);De&&Ge?we(me.filter(Xe=>Xe!==de)):!De&&!Ge&&we([...me,de])},[me,we]),xe=r.useCallback(de=>{J(de),f?.(de,de===null?null:si(se,de,q)??null)},[J,f,se,q]);l.useTreeFocus(ne,{onToggle:(de,De)=>{const Ge=de.dataset.nodeId;Ge!==void 0&&ie(Ge,De)}});const W=de=>{const De=It(se,de,q);return De?{parentId:De.parentId,index:De.index}:null},be=(de,De)=>{const Ge=It(de,De,q);if(!Ge)return;const Xe=Ge.parent?H(Ge.parent):U("sortableTree.root","top level");Se(U("sortableTree.announceMoved","{label} moved to {parent}, position {position} of {count}").replace("{label}",H(Ge.node)).replace("{parent}",Xe).replace("{position}",String(Ge.index+1)).replace("{count}",String(Ge.siblings.length)))},Te=(de,De)=>de===se?!1:(ce(de),a?.(de,De),!0),Me=(de,De,Ge,Xe)=>{let lt=0;if(De.parentId!==null){if(de!==null&&(De.parentId===de||Kr(se,De.parentId,de,q)))return!1;const yt=It(se,De.parentId,q);if(!yt||!Z(yt.node))return!1;lt=yt.depth+1}return E!==void 0&&lt+Ge>E?!1:w?w(de,De,Xe):!0},$=(de,De,Ge,Xe)=>{const lt=W(de);if(!lt)return;const yt=si(se,de,q);if(!yt||!Me(de,De,_a(yt,q)))return;const ct=It(Xe,de,q),wt=ct?{parentId:ct.parentId,index:ct.index}:De;Te(Xe,{type:Ge,id:de,from:lt,to:wt})&&(te.current=de,wt.parentId!==null&&ie(wt.parentId,!0),be(Xe,de))},X=(de,De)=>{const Ge=ms(se,de,De,q),Xe=It(Ge,de,q);Xe&&$(de,{parentId:Xe.parentId,index:Xe.index},"move",Ge)},ae=de=>{const De=Jr(se,de,q),Ge=It(De,de,q);Ge&&De!==se&&$(de,{parentId:Ge.parentId,index:Ge.index},"indent",De)},ve=de=>{const De=Qr(se,de,q),Ge=It(De,de,q);Ge&&De!==se&&$(de,{parentId:Ge.parentId,index:Ge.index},"outdent",De)},Ce=de=>{const De=W(de);if(!De)return;const Ge=Ne.findIndex(Nt=>Nt.id===de),Xe=new Set,lt=si(se,de,q);lt&&sn([lt],Nt=>{Xe.add(ue(Nt))},q);const yt=Ne.slice(Ge+1).find(Nt=>!Xe.has(Nt.id)),ct=Ne.slice(0,Math.max(0,Ge)).reverse().find(Nt=>!Xe.has(Nt.id)),wt=yt?.id??ct?.id??null;Te(mi(se,de,q),{type:"remove",id:de,from:De})&&(le!==null&&Xe.has(le)&&xe(wt),te.current=wt,Se(U("sortableTree.announceRemoved","{label} removed").replace("{label}",lt?H(lt):de)))},[_e,ke]=r.useState(null),Ee=r.useRef(null);r.useEffect(()=>{_e!==null&&(Ee.current?.focus(),Ee.current?.select())},[_e]);const Re=(de,De)=>{ke(null),te.current=de;const Ge=si(se,de,q),Xe=De?.trim();!Ge||!Xe||Xe===H(Ge)||Te(ka(se,de,{[c]:Xe},q),{type:"rename",id:de,label:Xe})};r.useLayoutEffect(()=>{const de=te.current;if(de===null||_e!==null)return;te.current=null;const De=[...ne.current?.querySelectorAll("[data-node-id]")??[]].find(Ge=>Ge.dataset.nodeId===de);De&&(De.focus(),De.scrollIntoView?.({block:"nearest"}))});const qe=(de,De)=>{const Ge=ne.current;if(!Ge)return null;const Xe=[...Ge.querySelectorAll("[data-node-id]")];if(Xe.length===0)return{target:{parentId:null,index:0},line:null,insideId:null,invalid:!1};const lt=Xe[0],yt=Xe[Xe.length-1],ct=(wt,Nt,jt)=>({top:Nt==="top"?wt.offsetTop:wt.offsetTop+wt.offsetHeight,depth:jt});if(de<lt.getBoundingClientRect().top){const wt=K.get(lt.dataset.nodeId??"");return wt&&!De.has(wt.id)?{target:{parentId:null,index:0},line:ct(lt,"top",0),insideId:null,invalid:!1}:null}for(const wt of Xe){const Nt=wt.getBoundingClientRect();if(de<Nt.top||de>=Nt.bottom)continue;const jt=K.get(wt.dataset.nodeId??"");if(!jt||De.has(jt.id))return null;const Gt=(de-Nt.top)/Math.max(1,Nt.height),vn=Z(jt.node)?Gt<.25?"before":Gt>.75?"after":"inside":Gt<.5?"before":"after";return vn==="before"?{target:{parentId:jt.parentId,index:jt.index},line:ct(wt,"top",jt.depth),insideId:null,invalid:!1}:vn==="inside"?{target:{parentId:jt.id,index:F(jt.node).length},line:null,insideId:jt.id,invalid:!1}:jt.expanded?{target:{parentId:jt.id,index:0},line:ct(wt,"bottom",jt.depth+1),insideId:null,invalid:!1}:{target:{parentId:jt.parentId,index:jt.index+1},line:ct(wt,"bottom",jt.depth),insideId:null,invalid:!1}}return{target:{parentId:null,index:se.length},line:ct(yt,"bottom",0),insideId:null,invalid:!1}},Ye=r.useRef(null),[We,ot]=r.useState(null),[st,rt]=r.useState(null),mt=r.useRef(!1),Ke=de=>{clearTimeout(de.hoverTimer),de.hoverTimer=void 0,de.hoverId=null},he=(de,De)=>{const Ge=De?.insideId??null;if(Ge===de.hoverId)return;Ke(de);const Xe=Ge?K.get(Ge):void 0;Xe&&Xe.hasChildren&&!Xe.expanded&&(de.hoverId=Ge,de.hoverTimer=setTimeout(()=>ie(Xe.id,!0),fg))},Pe=de=>{const De=Q.current;if(!De||De.scrollHeight<=De.clientHeight)return;const Ge=De.getBoundingClientRect();de<Ge.top+dc?De.scrollTop-=10:de>Ge.bottom-dc&&(De.scrollTop+=10)},He=(de,De)=>{const Ge=!!de.target.closest(".nice-sortable-tree__grip");if(oe||de.button!==0||_e!==null||de.pointerType==="touch"&&!Ge||de.target.closest(".nice-sortable-tree__toggle, input, button")||C&&!C(De.node))return;const Xe=new Set;sn([De.node],lt=>{Xe.add(ue(lt))},q),Ye.current={id:De.id,pointerId:de.pointerId,startY:de.clientY,startX:de.clientX,startScroll:Q.current?.scrollTop??0,rowTop:de.currentTarget.getBoundingClientRect().top,started:!1,height:_a(De.node,q),block:Xe,view:null,hoverId:null,hoverTimer:void 0}},pt=de=>{const De=Ye.current;if(!De||de.pointerId!==De.pointerId)return;const Ge=(Q.current?.scrollTop??0)-De.startScroll,Xe=de.clientY+xg-De.rowTop+Ge;if(!De.started){if(Math.hypot(de.clientX-De.startX,de.clientY-De.startY)<bg)return;De.started=!0,de.currentTarget.setPointerCapture?.(de.pointerId),de.currentTarget.focus()}Pe(de.clientY);const lt=qe(de.clientY,De.block),yt=lt?{...lt,invalid:!Me(De.id,lt.target,De.height)}:null;De.view=yt,he(De,yt),ot({ids:De.block,dy:Xe}),rt(yt)},Qe=de=>{const De=Ye.current;if(Ye.current=null,!!De){if(Ke(De),De.started){if(de&&De.view&&!De.view.invalid){const Ge=Ui(se,De.id,De.view.target,q),Xe=It(Ge,De.id,q);Xe&&Ge!==se&&$(De.id,{parentId:Xe.parentId,index:Xe.index},"move",Ge)}mt.current=!0,window.setTimeout(()=>{mt.current=!1},0)}ot(null),rt(null)}},ut=Be.useTreeDragSession(),ge=r.useRef({view:null,hoverId:null,hoverTimer:void 0}),Le=r.useRef(()=>{});Le.current=de=>{const De=ge.current,Ge=Q.current?.getBoundingClientRect(),Xe=!!Ge&&de.x>=Ge.left&&de.x<=Ge.right&&de.y>=Ge.top&&de.y<=Ge.bottom;if(de.type==="move"){if(!Xe||oe||!j){De.view&&(De.view=null,Ke(De),rt(null));return}Pe(de.y);const yt=qe(de.y,new Set),ct=yt?{...yt,invalid:!Me(null,yt.target,1,de.payload)}:null;De.view=ct,he(De,ct),rt(ct);return}const lt=De.view;De.view=null,Ke(De),rt(null),de.commit&&Xe&&lt&&!lt.invalid&&j?.(de.payload,lt.target)},r.useEffect(()=>ut?.subscribe(de=>Le.current(de)),[ut]);const[et,pe]=r.useState(null),Ie=r.useRef(null);l.useOverlayFocus(Ie,{open:et!==null,modal:!1,onClose:()=>pe(null)}),l.useRovingFocus(Ie,{orientation:"vertical",wrap:!0,enabled:et!==null}),r.useLayoutEffect(()=>{const de=Ie.current;if(!et||!de||typeof window>"u")return;const De=de.getBoundingClientRect(),Ge=Math.max(8,Math.min(et.x,window.innerWidth-De.width-8)),Xe=Math.max(8,Math.min(et.y,window.innerHeight-De.height-8));(Ge!==et.x||Xe!==et.y)&&pe({...et,x:Ge,y:Xe})},[et]),r.useEffect(()=>{if(!et)return;const de=De=>{Ie.current?.contains(De.target)||pe(null)};return document.addEventListener("mousedown",de),()=>document.removeEventListener("mousedown",de)},[et]);const ze=_===!0?gg:_===!1?[]:_,Je=et?K.get(et.id):void 0,ht=[];if(Je){const de=Je.node,De=!oe&&(!C||C(de)),Ge=Je.index>0,Xe=(lt,yt,ct,wt,Nt)=>{ze.includes(lt)&&ht.push({id:lt,label:yt,icon:e.jsx(l.NiceIcon,{name:ct,size:14}),disabled:!wt,onClick:Nt})};Xe("moveUp",U("sortableTree.moveUp","Move up"),"chevron-up",De&&Ge,()=>X(Je.id,-1)),Xe("moveDown",U("sortableTree.moveDown","Move down"),"chevron-down",De&&Je.index<Je.setSize-1,()=>X(Je.id,1)),Xe("indent",U("sortableTree.indent","Indent"),"indent",De&&Ge,()=>ae(Je.id)),Xe("outdent",U("sortableTree.outdent","Outdent"),"outdent",De&&Je.parentId!==null,()=>ve(Je.id)),Xe("rename",U("sortableTree.rename","Rename"),"edit",A(S,de),()=>ke(Je.id)),Xe("remove",U("sortableTree.remove","Remove"),"trash",A(N,de),()=>Ce(Je.id)),ht.push(...k?.(de)??[])}const Bt=(de,De)=>{if(de.target!==de.currentTarget)return;if(de.key==="Escape"&&Ye.current?.started){de.preventDefault(),Qe(!1);return}if(!oe&&(!C||C(De.node))&&de.ctrlKey&&de.shiftKey&&!de.altKey){const Xe=typeof window<"u"&&Q.current!==null&&window.getComputedStyle(Q.current).direction==="rtl",lt=Xe&&de.key==="ArrowLeft"?"ArrowRight":Xe&&de.key==="ArrowRight"?"ArrowLeft":de.key,yt={ArrowUp:()=>X(De.id,-1),ArrowDown:()=>X(De.id,1),ArrowRight:()=>ae(De.id),ArrowLeft:()=>ve(De.id)};if(yt[lt]){de.preventDefault(),yt[lt]();return}}de.key==="F2"&&A(S,De.node)?(de.preventDefault(),ke(De.id)):de.key==="Delete"&&A(N,De.node)&&(de.preventDefault(),Ce(De.id))};if(re==="hidden")return null;const Dt=We?.ids;return e.jsxs("div",{ref:Q,id:L,title:V,"data-testid":z,className:["nice-sortable-tree",`nice-sortable-tree--${R}`,We?"nice-sortable-tree--dragging":"",st&&Ne.length===0&&!st.invalid?"nice-sortable-tree--drop-empty":"",Y?"nice-sortable-tree--disabled":"",M??""].filter(Boolean).join(" "),style:{...B!==void 0?{height:B,overflow:"auto"}:{},...O},"aria-disabled":Y||void 0,children:[Ne.length===0&&e.jsx("div",{className:"nice-sortable-tree__empty",children:T??U("sortableTree.empty","Nothing here yet")}),e.jsxs("ul",{ref:ne,role:"tree","aria-label":P,"aria-disabled":Y||void 0,className:"nice-sortable-tree__list",children:[Ne.map(de=>{const De=de.id===le,Ge=!!Dt?.has(de.id),Xe={depth:de.depth,hasChildren:de.hasChildren,expanded:de.expanded,selected:De,dragging:Ge},lt=_e===de.id,yt={"--nice-sortable-tree-depth":de.depth,...Ge&&We?{transform:`translate(${vg}px, ${We.dy}px)`}:{}};return e.jsxs("li",{role:"treeitem","data-node-id":de.id,"aria-level":de.depth+1,"aria-setsize":de.setSize,"aria-posinset":de.index+1,"aria-expanded":de.hasChildren?de.expanded:void 0,"aria-selected":De,"aria-label":H(de.node),tabIndex:-1,className:["nice-sortable-tree__row",De?"nice-sortable-tree__row--selected":"",Ge?"nice-sortable-tree__row--dragging":"",st?.insideId===de.id?st.invalid?"nice-sortable-tree__row--drop-invalid":"nice-sortable-tree__row--drop-inside":""].filter(Boolean).join(" "),style:yt,onClick:ct=>{if(mt.current){mt.current=!1;return}if(!Y){if(de.hasChildren&&ct.target.closest(".nice-sortable-tree__toggle")){ie(de.id,!de.expanded);return}xe(de.id)}},onDoubleClick:()=>{A(S,de.node)&&ke(de.id)},onKeyDown:ct=>Bt(ct,de),onPointerDown:ct=>He(ct,de),onPointerMove:pt,onPointerUp:()=>Qe(!0),onPointerCancel:()=>Qe(!1),onContextMenu:ct=>{if(Y||ze.length===0&&!k)return;ct.preventDefault(),ct.stopPropagation();const wt=ct.currentTarget.getBoundingClientRect(),Nt=ct.clientX===0&&ct.clientY===0;pe({id:de.id,x:Nt?wt.left+24:ct.clientX,y:Nt?wt.bottom:ct.clientY})},children:[!oe&&(!C||C(de.node))&&e.jsx("span",{className:"nice-sortable-tree__grip","aria-hidden":"true",children:e.jsx(l.NiceIcon,{name:"grip",size:14})}),de.hasChildren?e.jsx("span",{className:"nice-sortable-tree__toggle","aria-hidden":"true",children:e.jsx(l.NiceIcon,{name:de.expanded?"chevron-down":"chevron-right",size:14})}):e.jsx("span",{className:"nice-sortable-tree__toggle nice-sortable-tree__toggle--leaf","aria-hidden":"true"}),m&&e.jsx("span",{className:"nice-sortable-tree__icon","aria-hidden":"true",children:m(de.node,Xe)}),lt?e.jsx("input",{ref:Ee,className:"nice-sortable-tree__input","aria-label":U("sortableTree.renameField","New name"),defaultValue:H(de.node),onClick:ct=>ct.stopPropagation(),onPointerDown:ct=>ct.stopPropagation(),onKeyDown:ct=>{ct.stopPropagation(),ct.key==="Enter"?(ct.preventDefault(),Re(de.id,ct.currentTarget.value)):ct.key==="Escape"&&(ct.preventDefault(),Re(de.id,null))},onBlur:ct=>{_e===de.id&&Re(de.id,ct.currentTarget.value)}}):e.jsx("span",{className:"nice-sortable-tree__label",children:p?p(de.node,Xe):H(de.node)}),h&&e.jsx("span",{className:"nice-sortable-tree__end",children:h(de.node,Xe)})]},de.id)}),st?.line&&e.jsx("li",{role:"none",className:`nice-sortable-tree__drop-line${st.invalid?" nice-sortable-tree__drop-line--invalid":""}`,style:{top:st.line.top,"--nice-sortable-tree-depth":st.line.depth}})]}),e.jsx("div",{className:"nice-sr-only","aria-live":"polite",role:"status",children:G}),et&&ht.length>0&&e.jsx("ul",{ref:Ie,role:"menu","aria-label":U("sortableTree.menu","Node actions"),className:"nice-contextmenu nice-contextmenu__list nice-sortable-tree__menu",style:{position:"fixed",left:et.x,top:et.y},children:ht.map((de,De)=>e.jsx("li",{role:"none",className:"nice-contextmenu__item",children:e.jsxs("button",{type:"button",role:"menuitem",className:`nice-contextmenu__btn${de.danger?" nice-contextmenu__btn--danger":""}`,disabled:de.disabled,onClick:Ge=>{pe(null),de.onClick?.(Ge)},children:[de.icon&&e.jsx("span",{className:"nice-contextmenu__icon","aria-hidden":"true",children:de.icon}),e.jsx("span",{children:de.label??de.text})]})},de.id??de.key??De))})]})}const gd=Object.assign(yg,{displayName:"NiceSortableTree"}),uc=new WeakMap;function In(t){const n=uc.get(t);if(n)return n;const i=new Map;return sn(t,(a,s)=>{i.set(a.id,{node:a,ancestors:[...s.ancestors],order:i.size})}),uc.set(t,i),i}function bd(t,n){return In(t).get(n)?.node}function Ng(t,n){const i=In(t),a=new Set;for(const s of n){const o=i.get(s);o&&sn([o.node],c=>{c.route&&!c.disabled&&a.add(c.id)})}return[...a].sort((s,o)=>(i.get(s)?.order??0)-(i.get(o)?.order??0))}function Ri(t,n){let i;return sn(t,a=>{if(i)return!1;n(a)&&(i=a)}),i}function Xr(t){const n=new Set;return sn(t,i=>{n.add(i.id)}),n}function $i(t,n){let i=n;for(let a=2;t.has(i);a++)i=`${n}-${a}`;return t.add(i),i}function Zr(t){const n=[];return sn(t,i=>{i.ref&&n.push(i.ref)}),n}function fd(t,n){const i=In(n),a=[];return sn(t,s=>{s.ref&&!i.get(s.ref)?.node.route&&a.push(s.id)}),a}function eo(t,n){if(t.label)return t.label;const i=In(n);return(t.ref?i.get(t.ref)?.node.label:void 0)??(t.from?i.get(t.from)?.node.label:void 0)??t.ref??t.from??t.id}function hs(t,n){const i=In(n);return(t.ref?i.get(t.ref):void 0)?.node??(t.from?i.get(t.from):void 0)?.node}function vd(t,n){return In(t).get(n)?.ancestors.map(i=>i.label)??[]}function pc(t,n,i){let a=null,s=t;for(const o of n){const c=Ri(s,m=>m.from===o.id);if(c){a=c.id;continue}const d={id:$i(i,`g:${o.id}`),from:o.id,children:[]},p=a===null?s:It(s,a)?.node.children??[];s=Hn(s,d,{parentId:a,index:p.length}),a=d.id}return{menu:s,parentId:a}}function xd(t,n,i,a={}){const s=In(n),o=Math.max(0,a.skipLevels??0),c=new Set(Zr(t)),d=Xr(t);let p=t;const m=[...new Set(i)].filter(h=>s.get(h)?.node.route&&!s.get(h)?.node.disabled).sort((h,u)=>(s.get(h)?.order??0)-(s.get(u)?.order??0));for(const h of m){const u=s.get(h);if(!u||c.has(h))continue;c.add(h);const x=u.ancestors.slice(o);if(u.node.children?.length){const g=pc(p,[...x,u.node],d);p=g.menu,g.parentId!==null&&(p=ka(p,g.parentId,{ref:h}));continue}const f=pc(p,x,d);p=f.menu;const b=f.parentId===null?p:It(p,f.parentId)?.node.children??[];p=Hn(p,{id:$i(d,`p:${h}`),ref:h},{parentId:f.parentId,index:b.length})}return p}function yd(t){let n=t;for(;;){const i=Ri(n,a=>!!a.from&&!a.ref&&!a.children?.length);if(!i)return n;n=mi(n,i.id)}}function Nd(t,n){const i=new Set(n);let a=t;for(const s of i){const o=Ri(a,c=>c.ref===s);o&&(o.children?.length?a=ka(a,o.id,c=>{const{ref:d,...p}=c;return{...p,from:p.from??s}}):a=mi(a,o.id))}return a===t?a:yd(a)}function _d(t,n,i,a,s={}){const o=In(n),c=Xr(t);let d=t,p=a.index;const m=h=>{const u=(h.children??[]).map(m).filter(b=>b!==null),x=!!h.route&&!h.disabled,f=x?Ri(d,b=>b.ref===h.id):void 0;return f&&(d=mi(d,f.id),c.delete(f.id)),h.children?.length?!u.length&&!x?null:{id:$i(c,`g:${h.id}`),from:h.id,...x?{ref:h.id}:{},children:u}:x?{id:$i(c,`p:${h.id}`),ref:h.id}:null};for(const h of i){const u=o.get(h);if(!u)continue;const x=!!u.node.route&&!u.node.disabled,f=!u.node.children?.length||s.asPage,b=x?Ri(d,v=>v.ref===h):void 0;if(f){if(b)d=Ui(d,b.id,{parentId:a.parentId,index:p});else if(x)d=Hn(d,{id:$i(c,`p:${h}`),ref:h},{parentId:a.parentId,index:p});else continue;const v=Ri(d,y=>y.ref===h);p=(v?It(d,v.id)?.index??p:p)+1;continue}const g=m(u.node);g&&(a.parentId!==null&&!It(d,a.parentId)?d=Hn(d,g,{parentId:null,index:d.length}):(d=Hn(d,g,{parentId:a.parentId,index:p}),p+=1))}return yd(d)}function jd(t,n,i){const a=Xr(t),s=$i(a,"group");return{menu:Hn(t,{id:s,label:n,children:[]},i??{parentId:null,index:t.length}),id:s}}function _g(t,n,i){if(t.icon)return i?i(t.icon):void 0;const a=n?.icon;return typeof a=="string"?i?i(a):void 0:a}function wd(t,n,i={}){const a=In(n),s=o=>o.flatMap(c=>{const p=(c.ref?a.get(c.ref)?.node:void 0)?.route,m=s(c.children??[]);return!p&&m.length===0?[]:[{id:c.id,label:eo(c,n),icon:_g(c,hs(c,n),i.renderIcon),...p?{route:p}:{},...m.length?{children:m}:{}}]});return s(t)}function kd(t,n,i={}){const a=wd(t,n,i),s=[];let o=[];const c=()=>{o.length&&(s.push({id:`${o[0].id}:other`,label:i.otherLabel??"Other",views:o}),o=[])};for(const d of a){if(!d.children?.length){o.push(d);continue}c();const p=d.route?[{id:`${d.id}:page`,label:d.label,icon:d.icon,route:d.route}]:[];s.push({id:d.id,label:d.label,icon:d.icon,views:[...p,...d.children]})}return c(),[{source:i.source??{id:"menu",label:i.otherLabel??"Menu"},modules:s,roles:[],units:[]}]}function jg(t,n={}){const i=n.key??"id",a=(d,p)=>typeof i=="function"?i(d,p):i==="route"?d.route??d.id:d.id,s=(d,p)=>d.map(m=>({id:a(m,p),label:m.label,icon:m.icon,...m.route?{route:m.route}:{},...m.children?.length?{children:s(m.children,p)}:{}})),o=d=>d.modules.map(p=>({id:p.id,label:p.label,icon:p.icon,children:s(p.views,p)}));return n.includeSources??t.length>1?t.map(d=>({id:d.source.id,label:d.source.label,icon:d.source.icon,children:o(d)})):t.flatMap(o)}const wg=[],kg=[],Cg={},Sg=60,Tg=t=>e.jsx(l.NiceIcon,{name:t,size:16});function Cd(t){return t.map(n=>{const i=n.children?.length?Cd(n.children):void 0,a=!!i?.some(s=>s.placeable);return n.route&&i?{key:`${n.id}::branch`,nodeId:n.id,label:n.label,icon:n.icon,placeable:!0,disabled:n.disabled,children:[{key:n.id,nodeId:n.id,label:n.label,icon:n.icon,route:n.route,own:!0,placeable:!0,disabled:n.disabled},...i]}:{key:n.id,nodeId:n.id,label:n.label,icon:n.icon,route:n.route,placeable:!!n.route||a,disabled:n.disabled,children:i}})}function Sd(t,n){return n<=0?[]:t.flatMap(i=>i.children?.length?[i.key,...Sd(i.children,n-1)]:[])}const Eg=({drag:t,label:n,title:i})=>{const a=Be.useTreeDragSession();return e.jsx("span",{className:"nice-menu-builder__grip",title:i,"aria-hidden":"true",onPointerDown:s=>{a&&(s.stopPropagation(),Be.startTreeDrag(a,s,t,n))},children:e.jsx(l.NiceIcon,{name:"grip",size:14})})},Ig=({value:t,onChange:n,renderIcon:i})=>{const{t:a}=l.useNiceTranslation(),[s,o]=r.useState(""),c=r.useRef(null);l.useRovingFocus(c,{orientation:"grid",itemSelector:"button"});const d=r.useMemo(()=>{const p=s.trim().toLowerCase(),m=p?l.NICE_BUILTIN_ICONS.filter(u=>u.includes(p)):l.NICE_BUILTIN_ICONS,h=m.slice(0,Sg);return t&&m.includes(t)&&!h.includes(t)?[t,...h]:h},[s,t]);return e.jsxs("div",{className:"nice-menu-builder__icon-picker",children:[e.jsx(Oe.NiceTextInput,{type:"search",size:"sm",label:a("menuBuilder.iconSearch","Search icons"),value:s,onChange:o}),e.jsxs("div",{ref:c,role:"group","aria-label":a("menuBuilder.icons","Icons"),className:"nice-menu-builder__icon-grid",children:[d.map(p=>e.jsx("button",{type:"button",title:p,"aria-label":p,"aria-pressed":p===t,className:`nice-menu-builder__icon-option${p===t?" nice-menu-builder__icon-option--on":""}`,onClick:()=>n(p),children:i(p)},p)),d.length===0&&e.jsx("span",{className:"nice-menu-builder__hint",children:a("menuBuilder.noIcons","No icons found")})]})]})},Dg=({catalog:t=wg,value:n,defaultValue:i,onChange:a,skipLevels:s=0,maxDepth:o,renderIcon:c=Tg,renderIconPicker:d,showPreview:p=!0,previewProps:m,toolbar:h,height:u,size:x="md",readOnly:f=!1,disabled:b=!1,className:g,style:v,id:y,title:C,accessMode:w,"data-testid":E})=>{const{t:S}=l.useNiceTranslation(),N=l.useNiceAccessMode(w,y),_=b||N==="disabled",k=f||N==="readOnly"||_,[j,T]=l.useControllableState({value:n,defaultValue:i,fallbackValue:kg,componentName:"NiceMenuBuilder"}),P=ne=>{ne===j||k||(T(ne),a?.(ne))},[B,R]=r.useState(null),I=r.useRef(null),[D,M]=r.useState(0);r.useEffect(()=>{D>0&&I.current?.querySelector("input")?.focus()},[D]);const O=r.useMemo(()=>Cd(t),[t]),L=r.useMemo(()=>Zr(j),[j]),V=r.useMemo(()=>new Set(fd(j,t)),[j,t]),ee=r.useMemo(()=>Sd(O,2),[O]),z=ne=>{const G=new Set(ne),Se=new Set(L),te=ne.filter(xe=>!Se.has(xe)),we=L.filter(xe=>!G.has(xe));let ie=j;te.length&&(ie=xd(ie,t,te,{skipLevels:s})),we.length&&(ie=Nd(ie,we)),P(ie)},U=r.useMemo(()=>[{field:"label",header:S("menuBuilder.catalogColumn","View"),render:(ne,G)=>e.jsxs("span",{className:"nice-menu-builder__catalog-cell",children:[!k&&!G.disabled&&e.jsx(Eg,{drag:{ids:[G.nodeId],asPage:!!G.own},label:G.label,title:S("menuBuilder.dragHint","Drag into the menu")}),G.icon!==void 0&&e.jsx("span",{className:"nice-menu-builder__icon","aria-hidden":"true",children:typeof G.icon=="string"?c(G.icon):G.icon}),e.jsx("span",{className:"nice-menu-builder__label",children:G.label}),G.own&&e.jsx("span",{className:"nice-menu-builder__hint",children:S("menuBuilder.ownPage","(page)")})]})}],[S,k,c]),re=B?It(j,B)?.node:void 0,Y=ne=>!ne.ref||ne.children!==void 0,oe=ne=>It(j,ne)?.depth??0,q=(ne,G)=>{const Se=ne;!Se||!Array.isArray(Se.ids)||P(_d(j,t,Se.ids,G,{asPage:Se.asPage}))},se=()=>{let ne;if(re){const Se=It(j,re.id);Y(re)&&(o===void 0||(Se?.depth??0)+2<=o)?ne={parentId:re.id,index:re.children?.length??0}:Se&&(ne={parentId:Se.parentId,index:Se.index+1})}const G=jd(j,S("menuBuilder.newGroup","New group"),ne);P(G.menu),R(G.id),M(Se=>Se+1)},ce=ne=>{const G=It(j,ne.id);if(!G||G.index===0)return!1;const Se=G.siblings[G.index-1];return Y(Se)&&(o===void 0||G.depth+1+_a(ne)<=o)},le=re?It(j,re.id):void 0,J=ne=>{re&&P(ne(j,re.id))},me=()=>{if(!re||!le)return;const ne=le.siblings[le.index+1]??le.siblings[le.index-1];P(mi(j,re.id)),R(ne?.id??le.parentId)},je=ne=>{if(ne.icon)return c(ne.icon);const G=hs(ne,t);return typeof G?.icon=="string"?c(G.icon):G?.icon!==void 0?G.icon:e.jsx(l.NiceIcon,{name:ne.ref?"file":"folder",size:16})},ue=ne=>{re&&P(ka(j,re.id,G=>{const Se={...G,...ne};return Object.keys(ne).forEach(te=>{ne[te]===void 0&&delete Se[te]}),Se}))},F=re?hs(re,t):void 0,H=re?.ref?bd(t,re.ref):void 0,A=F?.label,Z=F?[...vd(t,F.id),F.label].join(" / "):"",fe=re?(d??(ne=>e.jsx(Ig,{...ne,renderIcon:c})))({value:re.icon,onChange:ne=>ue({icon:ne})}):null,Ne=r.useMemo(()=>p?kd(j,t,{renderIcon:c,otherLabel:S("menuBuilder.other","Other"),source:{id:"menu-preview",label:S("menuBuilder.preview","Preview")}}):[],[p,j,t,c,S]);if(N==="hidden")return null;const K=(ne,G,Se,te,we)=>e.jsx(Fe.NiceButton,{variant:"ghost",size:"sm",ariaLabel:G,title:G,disabled:!te,onClick:we,children:e.jsx(l.NiceIcon,{name:Se,size:16})},ne),Q=!k;return e.jsx(Be.TreeDragSessionProvider,{children:e.jsx("div",{id:y,title:C,"data-testid":E,className:["nice-menu-builder",_?"nice-menu-builder--disabled":"",g??""].filter(Boolean).join(" "),style:{...u!==void 0?{height:u}:{},...v},"aria-disabled":_||void 0,children:e.jsxs("div",{className:"nice-menu-builder__grid",children:[e.jsxs("section",{className:"nice-menu-builder__column nice-menu-builder__column--catalog","aria-label":S("menuBuilder.catalog","Available views"),children:[e.jsx("header",{className:"nice-menu-builder__head",children:e.jsx("span",{className:"nice-menu-builder__title",children:S("menuBuilder.catalog","Available views")})}),e.jsx("div",{className:"nice-menu-builder__body nice-menu-builder__body--flush",children:e.jsx(ft.NiceTreeGrid,{data:O,nested:!0,keyField:"key",columns:U,checkable:!0,checkStrategy:"leaves",checkedKeys:L,onCheckedChange:z,isRowCheckable:ne=>ne.placeable,isRowDisabled:ne=>!!ne.disabled,getRowLabel:ne=>ne.label,defaultExpandedKeys:ee,searchable:!0,searchPlaceholder:S("menuBuilder.searchViews","Search views"),searchFields:["label"],toolbarActions:["onlyChecked"],showSelectAll:!1,size:x,compact:!0,readOnly:k,emptyText:S("menuBuilder.catalogEmpty","No views to choose from")})})]}),e.jsxs("section",{className:"nice-menu-builder__column nice-menu-builder__column--menu","aria-label":S("menuBuilder.menu","Menu"),children:[e.jsxs("header",{className:"nice-menu-builder__head",children:[e.jsx("span",{className:"nice-menu-builder__title",children:S("menuBuilder.menu","Menu")}),Q&&e.jsxs("span",{className:"nice-menu-builder__tools",role:"group","aria-label":S("menuBuilder.tools","Menu tools"),children:[K("group",S("menuBuilder.addGroup","New group"),"folder",!0,se),K("up",S("sortableTree.moveUp","Move up"),"chevron-up",!!le&&le.index>0,()=>J((ne,G)=>ms(ne,G,-1))),K("down",S("sortableTree.moveDown","Move down"),"chevron-down",!!le&&le.index<le.siblings.length-1,()=>J((ne,G)=>ms(ne,G,1))),K("indent",S("sortableTree.indent","Indent"),"indent",!!re&&ce(re),()=>J(Jr)),K("outdent",S("sortableTree.outdent","Outdent"),"outdent",!!le&&le.parentId!==null,()=>J(Qr)),K("remove",S("sortableTree.remove","Remove"),"trash",!!re,me)]}),h]}),e.jsx("div",{className:"nice-menu-builder__body",children:e.jsx(gd,{"aria-label":S("menuBuilder.menu","Menu"),value:j,onChange:ne=>P(ne),selectedId:B,onSelect:ne=>R(ne),getLabel:ne=>eo(ne,t),getIcon:ne=>je(ne),renderRowEnd:ne=>V.has(ne.id)?e.jsx("span",{className:"nice-menu-builder__badge",children:S("menuBuilder.unavailable","unavailable")}):null,canHaveChildren:Y,canDrop:(ne,G)=>G.parentId===null||o===void 0||ne!==null||oe(G.parentId)+2<=o,maxDepth:o,editable:Q,removable:Q,onExternalDrop:q,emptyText:S("menuBuilder.menuEmpty","Check views on the left or drag them here"),size:x,readOnly:k})})]}),e.jsxs("div",{className:"nice-menu-builder__side",children:[e.jsxs("section",{className:"nice-menu-builder__column nice-menu-builder__column--item","aria-label":S("menuBuilder.item","Item"),children:[e.jsxs("header",{className:"nice-menu-builder__head",children:[e.jsx("span",{className:"nice-menu-builder__title",children:S("menuBuilder.item","Item")}),re&&e.jsx("span",{className:"nice-menu-builder__kind",children:re.ref?S("menuBuilder.page","Page"):S("menuBuilder.group","Group")})]}),e.jsxs("div",{className:"nice-menu-builder__body nice-menu-builder__props",children:[!re&&e.jsx("p",{className:"nice-menu-builder__hint",children:S("menuBuilder.selectHint","Select an item of the menu to rename it or change its icon.")}),re&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-menu-builder__field",ref:I,children:[e.jsx(Oe.NiceTextInput,{label:S("menuBuilder.name","Name"),size:"sm",value:re.label??"",placeholder:A??S("menuBuilder.newGroup","New group"),onChange:ne=>ue({label:ne.trim()?ne:void 0}),readOnly:k}),Q&&re.label&&A&&e.jsx(Fe.NiceButton,{variant:"ghost",size:"sm",ariaLabel:S("menuBuilder.resetName","Name from the catalog"),title:S("menuBuilder.resetName","Name from the catalog"),onClick:()=>ue({label:void 0}),children:e.jsx(l.NiceIcon,{name:"undo",size:16})})]}),e.jsxs("div",{className:"nice-menu-builder__field nice-menu-builder__field--icon",children:[e.jsx("span",{className:"nice-menu-builder__field-label",children:S("menuBuilder.icon","Icon")}),e.jsx("span",{className:"nice-menu-builder__icon-now","aria-hidden":"true",children:je(re)}),Q&&re.icon&&e.jsx(Fe.NiceButton,{variant:"ghost",size:"sm",ariaLabel:S("menuBuilder.resetIcon","Icon from the catalog"),title:S("menuBuilder.resetIcon","Icon from the catalog"),onClick:()=>ue({icon:void 0}),children:e.jsx(l.NiceIcon,{name:"undo",size:16})})]}),Q&&fe,(H?.route||Z)&&e.jsxs("dl",{className:"nice-menu-builder__facts",children:[H?.route&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:S("menuBuilder.route","Opens")}),e.jsx("dd",{children:e.jsx("code",{children:H.route})})]}),Z&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:S("menuBuilder.source","In the catalog")}),e.jsx("dd",{children:Z})]})]}),V.has(re.id)&&e.jsx("p",{className:"nice-menu-builder__warning",role:"note",children:S("menuBuilder.orphan","This view is no longer in the catalog — it will not show in the menu.")})]})]})]}),p&&e.jsxs("section",{className:"nice-menu-builder__column nice-menu-builder__column--preview","aria-label":S("menuBuilder.preview","Preview"),children:[e.jsx("header",{className:"nice-menu-builder__head",children:e.jsx("span",{className:"nice-menu-builder__title",children:S("menuBuilder.preview","Preview")})}),e.jsx("div",{className:"nice-menu-builder__body nice-menu-builder__body--flush",children:e.jsx(Be.NiceSidebarNav,{data:Ne,minimal:!0,readonly:!0,contextMenu:!1,preferences:Cg,...m})})]})]})]})})})},Td=r.createContext(null),Pg=({children:t,type:n="single",value:i,defaultValue:a,disabled:s=!1,onChange:o,className:c="",style:d,testId:p,"data-testid":m})=>{const[h,u]=r.useState(a??(n==="single"?"":[])),x=i!==void 0,f=x?i:h,b=r.useCallback(y=>n==="single"?f===y:Array.isArray(f)&&f.includes(y),[n,f]),g=r.useCallback(y=>{let C;if(n==="single")C=f===y?"":y;else{const w=Array.isArray(f)?f:[];C=w.includes(y)?w.filter(E=>E!==y):[...w,y]}x||u(C),o?.(C)},[n,f,x,o]),v=r.useMemo(()=>({type:n,isPressed:b,toggle:g,disabled:s}),[n,b,g,s]);return e.jsx(Td.Provider,{value:v,children:e.jsx("div",{role:"group",className:`nice-toggle-group nice-toggle-group--${n} ${c}`,style:d,"data-testid":m??p,children:t})})},Ag=Object.assign(({value:t,children:n,disabled:i=!1})=>{const a=r.useContext(Td);if(!a)throw new Error("NiceToggleGroup.Item must be rendered inside <NiceToggleGroup>");const s=a.isPressed(t),o=a.disabled||i;return e.jsx("button",{type:"button",className:`nice-toggle-group__item ${s?"nice-toggle-group__item--pressed":""}`,"aria-pressed":s,disabled:o,onClick:()=>a.toggle(t),children:n})},{displayName:"NiceToggleGroup.Item"}),yr=Object.assign(Pg,{displayName:"NiceToggleGroup",Item:Ag}),Rg=["daily","weekly","monthly","yearly"],$g={daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},Mg={daily:"Repeat every (days)",weekly:"Repeat every (weeks)",monthly:"Repeat every (months)",yearly:"Repeat every (years)"},Og={daily:{single:"Every day",other:"Every {n} days"},weekly:{single:"Every week",other:"Every {n} weeks"},monthly:{single:"Every month",other:"Every {n} months"},yearly:{single:"Every year",other:"Every {n} years"}},mc=10,Ed=864e5,Lg=new Date(2023,0,1);function hc(t,n){try{return new Intl.PluralRules(t).select(n)}catch{return n===1?"one":"other"}}function Nr(t,n,i){const a=new Date(Lg.getTime()+n*Ed);try{return new Intl.DateTimeFormat(t,{weekday:i}).format(a)}catch{return new Intl.DateTimeFormat("en",{weekday:i}).format(a)}}function Id(t,n){try{return new Intl.DateTimeFormat(t,n)}catch{return new Intl.DateTimeFormat("en",n)}}function gc(t){const n=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}function zg(t,n,i,a){const s=Math.max(1,Math.floor(t.interval??1)),o=Og[t.freq],c=[s===1?n(`recurrence.summary.${t.freq}.single`,o.single):n(`recurrence.summary.${t.freq}.${hc(i,s)}`,o.other).replace("{n}",String(s))];if(t.freq==="weekly"&&t.byDay?.length&&c.push(a.filter(d=>t.byDay?.includes(d)).map(d=>Nr(i,d,"short")).join(", ")),t.count&&t.count>0)c.push(n(`recurrence.summary.times.${hc(i,t.count)}`,t.count===1?"once":"{n} times").replace("{n}",String(t.count)));else if(t.until){const d=Id(i,{day:"numeric",month:"short",year:"numeric"});c.push(`${n("recurrence.summary.until","until")} ${d.format(new Date(t.until))}`)}return c.join(" · ")}const Bg=({value:t,defaultValue:n=null,onChange:i,start:a,allowNone:s=!0,previewCount:o=5,weekStartsOn:c=1,label:d,size:p="md",disabled:m=!1,readOnly:h=!1,className:u="",style:x,id:f,accessMode:b,"data-testid":g})=>{const{t:v,lang:y}=l.useNiceTranslation(),C=l.useNiceAccessMode(b,f),[w,E]=l.useControllableState({value:t,defaultValue:n,onChange:i,componentName:"NiceRecurrenceEditor"}),[S]=r.useState(()=>new Date),N=a??S,_=m||h||C==="disabled"||C==="readOnly",k=l.normalizeSize(p),j=k==="xxs"||k==="xs"?k:"sm",T=r.useMemo(()=>Array.from({length:7},(L,V)=>(V+c)%7),[c]),P=r.useMemo(()=>{if(!w||o<=0)return[];const L=new Date(N.getTime()+100*365*Ed);return At.recurrenceDates(w,N,L,o)},[w,N,o]);if(C==="hidden")return null;const B=L=>{w&&E({...w,...L})},R=L=>{if(L==="none"){E(null);return}const V=L,ee=w?{...w,freq:V}:{freq:V,interval:1};V==="weekly"?ee.byDay=w?.byDay?.length?w.byDay:[N.getDay()]:delete ee.byDay,E(ee)},I=w?.count?"after":w?.until?"on":"never",D=L=>{if(!w)return;const V={...w};if(delete V.count,delete V.until,L==="after")E({...V,count:mc});else if(L==="on"){const ee=new Date(N);ee.setMonth(ee.getMonth()+3),E({...V,until:ee})}else E(V)},M=[...s?[{value:"none",label:v("recurrence.freq.none","Does not repeat")}]:[],...Rg.map(L=>({value:L,label:v(`recurrence.freq.${L}`,$g[L])}))],O=Id(y,{weekday:"short",day:"numeric",month:"short",year:"numeric"});return e.jsxs("div",{id:f,className:`nice-recurrence nice-recurrence--${k} ${u}`,style:x,"data-testid":g,children:[e.jsx(Oe.NiceSelect,{size:j,label:d??v("recurrence.frequency","Repeats"),value:w?w.freq:"none",options:M,onChange:L=>R(Array.isArray(L)?L[0]??"none":L),disabled:_}),w&&e.jsxs(e.Fragment,{children:[e.jsx(Oe.NiceNumberInput,{size:j,className:"nice-recurrence__interval",label:v(`recurrence.interval.${w.freq}`,Mg[w.freq]),min:1,max:999,value:w.interval??1,onChange:L=>B({interval:Math.max(1,Math.round(L??1))}),disabled:_}),w.freq==="weekly"&&e.jsxs("div",{className:"nice-recurrence__days",role:"group","aria-label":v("recurrence.days","On days"),children:[e.jsx("span",{className:"nice-recurrence__caption",children:v("recurrence.days","On days")}),e.jsx(yr,{type:"multiple",disabled:_,value:(w.byDay??[]).map(String),onChange:L=>{const V=(Array.isArray(L)?L:[L]).map(Number);V.length>0&&B({byDay:V.sort((ee,z)=>ee-z)})},children:T.map(L=>e.jsx(yr.Item,{value:String(L),children:e.jsx("span",{title:Nr(y,L,"long"),children:Nr(y,L,"short")})},L))})]}),e.jsxs("div",{className:"nice-recurrence__ends",children:[e.jsx(dt.NiceRadioGroup,{size:j,label:v("recurrence.endsLabel","Ends"),direction:"vertical",value:I,onChange:D,disabled:_,options:[{value:"never",label:v("recurrence.ends.never","Never")},{value:"on",label:v("recurrence.ends.on","On a date")},{value:"after",label:v("recurrence.ends.after","After a number of occurrences")}]}),I==="on"&&w.until&&e.jsx(dt.NiceDateTimePicker,{size:j,label:v("recurrence.endDate","End date"),dateFormatPreset:"date-local",value:gc(new Date(w.until)),min:gc(N),onChange:L=>{const[V,ee,z]=L.split("-").map(Number);V&&ee&&z&&B({until:new Date(V,ee-1,z,23,59,59)})},disabled:_}),I==="after"&&e.jsx(Oe.NiceNumberInput,{size:j,className:"nice-recurrence__count",label:v("recurrence.count","Occurrences"),min:1,max:9999,value:w.count??mc,onChange:L=>B({count:Math.max(1,Math.round(L??1))}),disabled:_})]}),e.jsx("p",{className:"nice-recurrence__summary","aria-live":"polite",children:zg(w,v,y,T)}),P.length>0&&e.jsxs("div",{className:"nice-recurrence__preview",children:[e.jsx("span",{className:"nice-recurrence__caption",children:v("recurrence.next","Next dates")}),e.jsx("ol",{className:"nice-recurrence__dates",children:P.map(L=>e.jsx("li",{children:e.jsx("time",{dateTime:L.toISOString(),children:O.format(L)})},L.getTime()))})]})]})]})};function Fg(t,n=1){let i;if(typeof t.quantity=="number"){const s=t.quantity*n;i=Number.isInteger(s)?String(s):String(Math.round(s*100)/100)}else i=t.quantity!=null?String(t.quantity):"";const a=t.unit??"";return[i,a].filter(Boolean).join(" ").trim()}const qg=({photos:t})=>{const{t:n}=l.useNiceTranslation(),i=[...t].sort((c,d)=>+!!d.primary-+!!c.primary),[a,s]=r.useState(i[0]?.id),o=i.find(c=>c.id===a)??i[0];return e.jsxs("div",{className:"nice-recipe__gallery",children:[o&&e.jsxs("div",{className:"nice-recipe__photo-main",children:[e.jsx("img",{src:o.url,alt:o.caption??""}),o.caption&&e.jsx("div",{className:"nice-recipe__photo-caption",children:o.caption})]}),i.length>1&&e.jsx("div",{className:"nice-recipe__photo-thumbs",children:i.map(c=>e.jsx("button",{type:"button",className:`nice-recipe__thumb${c.id===o?.id?" nice-recipe__thumb--active":""}`,onClick:()=>s(c.id),"aria-label":c.caption??n("recipe.photo","Photo"),children:e.jsx("img",{src:c.url,alt:c.caption??""})},c.id))})]})},Vg=({recipe:t,compact:n=!1,hidePhotos:i=!1,hideIngredients:a=!1,hideSteps:s=!1,onIngredientToggle:o,onStepToggle:c,className:d,style:p,accessMode:m,id:h,"data-testid":u})=>{const{t:x}=l.useNiceTranslation(),f=l.useNiceAccessMode(m,h),b=t.servings,[g,v]=r.useState(b);if(r.useEffect(()=>{v(b)},[b]),f==="hidden")return null;const y=f==="readOnly"||f==="disabled",C=At.recipeTotalMinutes(t),w=t.photos??[],E=[...t.steps].sort((k,j)=>k.order-j.order),S=!y&&typeof b=="number"&&b>0&&typeof g=="number"&&g>0?g/b:1,N=!n&&typeof b=="number"&&b>0&&!y,_=()=>{typeof window<"u"&&window.print()};return e.jsxs("div",{className:`nice-recipe${n?" nice-recipe--compact":""} ${d??""}`,style:p,"data-testid":u,children:[e.jsxs("header",{className:"nice-recipe__header",children:[e.jsx("h3",{className:"nice-recipe__title",children:t.title||x("recipe.untitled","Untitled recipe")}),!n&&t.description&&e.jsx("p",{className:"nice-recipe__description",children:t.description}),e.jsxs("div",{className:"nice-recipe__meta",children:[t.servings!=null&&e.jsxs("span",{className:"nice-recipe__meta-item",children:[e.jsx(l.NiceIcon,{name:"box",size:14})," ",g??t.servings," ",x("recipe.servings","servings")]}),C!=null&&e.jsxs("span",{className:"nice-recipe__meta-item",children:[e.jsx(l.NiceIcon,{name:"clock",size:14})," ",C," ",x("recipe.minutes","min")]}),t.difficulty&&e.jsx("span",{className:`nice-recipe__badge nice-recipe__badge--${t.difficulty}`,children:x(`recipe.difficulty.${t.difficulty}`,t.difficulty)}),t.cuisine&&e.jsxs("span",{className:"nice-recipe__meta-item",children:[e.jsx(l.NiceIcon,{name:"globe",size:14})," ",t.cuisine]}),t.sourceUrl&&e.jsxs("a",{className:"nice-recipe__meta-item nice-recipe__source",href:t.sourceUrl,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(l.NiceIcon,{name:"link",size:14})," ",x("recipe.source","Source")]})]}),(N||!n)&&e.jsxs("div",{className:"nice-recipe__actions",children:[N&&e.jsxs("span",{className:"nice-recipe__servings-stepper",children:[e.jsx("button",{type:"button",className:"nice-recipe__servings-btn","aria-label":x("recipe.servingsDecrease","Decrease servings"),onClick:()=>v(k=>Math.max(1,(k??b??1)-1)),disabled:(g??b??1)<=1,children:"−"}),e.jsxs("span",{"aria-live":"polite",className:"nice-recipe__servings-value",children:[g??b," ×"]}),e.jsx("button",{type:"button",className:"nice-recipe__servings-btn","aria-label":x("recipe.servingsIncrease","Increase servings"),onClick:()=>v(k=>Math.min(99,(k??b??1)+1)),disabled:(g??b??1)>=99,children:"+"}),S!==1&&e.jsx("button",{type:"button",className:"nice-recipe__servings-reset",onClick:()=>v(b),children:x("recipe.reset","Reset")})]}),!n&&e.jsxs("button",{type:"button",className:"nice-recipe__print",onClick:_,"aria-label":x("recipe.print","Print recipe"),children:[e.jsx(l.NiceIcon,{name:"printer",size:14})," ",x("recipe.print","Print")]})]}),t.tags&&t.tags.length>0&&e.jsx("div",{className:"nice-recipe__tags",children:t.tags.map(k=>e.jsxs("span",{className:"nice-recipe__tag",children:["#",k]},k))})]}),!i&&w.length>0&&e.jsx(qg,{photos:w}),e.jsxs("div",{className:"nice-recipe__body",children:[!a&&t.ingredients.length>0&&e.jsxs("section",{className:"nice-recipe__section nice-recipe__section--ingredients",children:[e.jsx("h4",{className:"nice-recipe__section-title",children:x("recipe.ingredients","Ingredients")}),e.jsx("ul",{className:"nice-recipe__ingredients",children:t.ingredients.map(k=>e.jsx("li",{className:"nice-recipe__ingredient",children:e.jsxs("label",{className:`nice-recipe__ingredient-row${k.checked?" nice-recipe__ingredient-row--checked":""}`,children:[e.jsx("input",{type:"checkbox",checked:!!k.checked,disabled:y||!o,onChange:()=>o?.(k)}),e.jsx("span",{className:"nice-recipe__ingredient-qty",children:Fg(k,S)}),e.jsx("span",{className:"nice-recipe__ingredient-name",children:k.name}),k.notes&&e.jsxs("span",{className:"nice-recipe__ingredient-notes",children:["— ",k.notes]})]})},k.id))})]}),!s&&E.length>0&&e.jsxs("section",{className:"nice-recipe__section nice-recipe__section--steps",children:[e.jsx("h4",{className:"nice-recipe__section-title",children:x("recipe.steps","Steps")}),e.jsx("ol",{className:"nice-recipe__steps",children:E.map(k=>e.jsx("li",{className:`nice-recipe__step${k.done?" nice-recipe__step--done":""}`,children:e.jsxs("label",{className:"nice-recipe__step-row",children:[e.jsx("input",{type:"checkbox",checked:!!k.done,disabled:y||!c,onChange:()=>c?.(k)}),e.jsxs("div",{className:"nice-recipe__step-body",children:[e.jsx("div",{className:"nice-recipe__step-instruction",children:k.instruction}),k.durationMinutes!=null&&e.jsxs("div",{className:"nice-recipe__step-duration",children:[e.jsx(l.NiceIcon,{name:"clock",size:14})," ",k.durationMinutes," ",x("recipe.minutes","min")]}),k.image&&e.jsx("img",{className:"nice-recipe__step-image",src:k.image,alt:""})]})]})},k.id))})]})]}),!n&&t.nutrition&&e.jsxs("footer",{className:"nice-recipe__nutrition",children:[t.nutrition.calories!=null&&e.jsx("span",{children:x("recipe.kcal","{label}: {value} kcal").replace("{label}",x("recipe.nutrition.calories","Calories")).replace("{value}",String(t.nutrition.calories))}),t.nutrition.protein!=null&&e.jsxs("span",{children:[x("recipe.nutrition.protein","Protein"),": ",t.nutrition.protein," g"]}),t.nutrition.fat!=null&&e.jsxs("span",{children:[x("recipe.nutrition.fat","Fat"),": ",t.nutrition.fat," g"]}),t.nutrition.carbs!=null&&e.jsxs("span",{children:[x("recipe.nutrition.carbs","Carbs"),": ",t.nutrition.carbs," g"]}),t.nutrition.fiber!=null&&e.jsxs("span",{children:[x("recipe.nutrition.fiber","Fiber"),": ",t.nutrition.fiber," g"]}),t.nutrition.sugar!=null&&e.jsxs("span",{children:[x("recipe.nutrition.sugar","Sugar"),": ",t.nutrition.sugar," g"]}),t.nutrition.sodium!=null&&e.jsx("span",{children:x("recipe.mg","{label}: {value} mg").replace("{label}",x("recipe.nutrition.sodium","Sodium")).replace("{value}",String(t.nutrition.sodium))})]})]})},Ug=[],Hg=[{value:"",label:"All"},{value:"easy",label:"Easy"},{value:"medium",label:"Medium"},{value:"hard",label:"Hard"}],Dd=({recipes:t=Ug,onSelect:n,initialQuery:i="",hideFilters:a,emptyMessage:s,className:o,style:c,"data-testid":d})=>{const{t:p}=l.useNiceTranslation(),[m,h]=r.useState(i),[u,x]=r.useState(""),[f,b]=r.useState(""),g=r.useMemo(()=>{const y=new Set;for(const C of t)for(const w of C.tags??[])y.add(w);return Array.from(y).sort()},[t]),v=r.useMemo(()=>{const y=m.trim().toLowerCase();return t.filter(C=>u&&C.difficulty!==u||f&&!(C.tags??[]).includes(f)?!1:y?[C.title,C.description??"",C.cuisine??"",...C.tags??[]].join(" ").toLowerCase().includes(y):!0)},[t,m,u,f]);return e.jsxs("div",{className:`nice-recipe-list ${o??""}`,style:c,"data-testid":d,children:[e.jsxs("div",{className:"nice-recipe-list__toolbar",children:[e.jsx("input",{type:"search",className:"nice-recipe-list__search",value:m,placeholder:p("recipe.list.search","Search recipes…"),onChange:y=>h(y.target.value),"aria-label":p("recipe.list.search","Search recipes")}),!a&&e.jsxs(e.Fragment,{children:[e.jsx("select",{className:"nice-recipe-list__filter",value:u,onChange:y=>x(y.target.value),"aria-label":p("recipe.difficulty","Difficulty"),children:Hg.map(y=>e.jsx("option",{value:y.value,children:y.label},y.value||"all"))}),g.length>0&&e.jsxs("select",{className:"nice-recipe-list__filter",value:f,onChange:y=>b(y.target.value),"aria-label":p("recipe.tags","Tags"),children:[e.jsx("option",{value:"",children:p("recipe.list.allTags","All tags")}),g.map(y=>e.jsxs("option",{value:y,children:["#",y]},y))]})]}),e.jsxs("span",{className:"nice-recipe-list__count","aria-live":"polite",children:[v.length," / ",t.length]})]}),v.length===0?e.jsx("div",{className:"nice-recipe-list__empty",children:s??p("recipe.list.empty","No recipes match the current filters.")}):e.jsx("ul",{className:"nice-recipe-list__grid",children:v.map(y=>{const C=y.photos?.find(E=>E.primary)??y.photos?.[0],w=At.recipeTotalMinutes(y);return e.jsx("li",{className:"nice-recipe-list__item",children:e.jsxs("button",{type:"button",className:"nice-recipe-list__card",onClick:()=>n?.(y),children:[C&&e.jsx("span",{className:"nice-recipe-list__thumb",children:e.jsx("img",{src:C.url,alt:C.caption??y.title,loading:"lazy"})}),e.jsxs("span",{className:"nice-recipe-list__body",children:[e.jsx("span",{className:"nice-recipe-list__title",children:y.title}),y.description&&e.jsx("span",{className:"nice-recipe-list__desc",children:y.description}),e.jsxs("span",{className:"nice-recipe-list__meta",children:[typeof y.servings=="number"&&e.jsxs("span",{className:"nice-recipe-list__meta-item",children:[e.jsx(l.NiceIcon,{name:"utensils",size:12})," ",y.servings]}),w!=null&&w>0&&e.jsxs("span",{className:"nice-recipe-list__meta-item",children:[e.jsx(l.NiceIcon,{name:"clock",size:12})," ",p("recipe.min","{total} min").replace("{total}",String(w))]}),y.difficulty&&e.jsx("span",{className:`nice-recipe__badge nice-recipe__badge--${y.difficulty}`,children:y.difficulty})]}),y.tags&&y.tags.length>0&&e.jsx("span",{className:"nice-recipe-list__tags",children:y.tags.slice(0,4).map(E=>e.jsxs("span",{className:"nice-recipe__tag",children:["#",E]},E))})]})]})},y.id)})})]})},Gg=[],Wg=[],Kg=["breakfast","lunch","dinner"],Yg=1440*60*1e3;function Jg(t){const n=new Date(t);n.setHours(0,0,0,0);const i=n.getDay(),a=i===0?-6:1-i;return n.setDate(n.getDate()+a),n}function bc(t,n){return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()}const Qg=({recipes:t=Gg,meals:n=Wg,onChange:i,weekStart:a,rows:s=Kg,readOnly:o,className:c,style:d,"data-testid":p})=>{const{t:m,lang:h}=l.useNiceTranslation(),u=r.useMemo(()=>Jg(a??new Date),[a]),x=r.useMemo(()=>Array.from({length:7},(E,S)=>new Date(u.getTime()+S*Yg)),[u]),f=r.useMemo(()=>{const E=new Map;for(const S of t)E.set(S.id,S);return E},[t]),b=r.useCallback((E,S)=>n.filter(N=>N.kind===S&&N.servedAt instanceof Date&&bc(N.servedAt,E)),[n]),g=r.useCallback((E,S,N)=>{if(!N||o)return;const _=f.get(N),k=new Date(E);k.setHours(S==="breakfast"?8:S==="lunch"?13:S==="dinner"?19:16,0,0,0);const j={id:At.newRecipeId("meal"),name:_?.title??m("mealplan.untitled","Meal"),kind:S,servedAt:k,recipeIds:[N],servings:_?.servings};i?.([...n,j])},[n,i,o,f,m]),v=r.useCallback(E=>{o||i?.(n.filter(S=>S.id!==E))},[n,i,o]),y=E=>E.toLocaleDateString(h,{weekday:"short",day:"numeric",month:"short"}),C=E=>m(`mealplan.kind.${E}`,E.charAt(0).toUpperCase()+E.slice(1)),w=new Date;return e.jsx("div",{className:`nice-mealplan ${c??""}`,style:d,"data-testid":p,children:e.jsxs("div",{className:"nice-mealplan__grid",style:{gridTemplateColumns:"auto repeat(7, minmax(8rem, 1fr))"},children:[e.jsx("div",{className:"nice-mealplan__corner"}),x.map(E=>e.jsx("div",{className:`nice-mealplan__day-head${bc(E,w)?" nice-mealplan__day-head--today":""}`,children:y(E)},E.toISOString())),s.map(E=>e.jsxs(r.Fragment,{children:[e.jsx("div",{className:"nice-mealplan__row-head",children:C(E)}),x.map(S=>{const N=b(S,E);return e.jsxs("div",{className:"nice-mealplan__cell",children:[N.map(_=>{const k=_.recipeIds[0]?f.get(_.recipeIds[0]):void 0;return e.jsxs("div",{className:"nice-mealplan__chip",title:_.name,children:[e.jsx("span",{className:"nice-mealplan__chip-title",children:k?.title??_.name}),!o&&e.jsx("button",{type:"button",className:"nice-mealplan__chip-remove","aria-label":m("mealplan.remove","Remove meal"),onClick:()=>v(_.id),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},_.id)}),!o&&t.length>0&&e.jsxs("select",{className:"nice-mealplan__add",value:"","aria-label":m("mealplan.addRecipe","Add recipe"),onChange:_=>{const k=_.target.value;k&&g(S,E,k),_.target.value=""},children:[e.jsxs("option",{value:"",children:["+ ",m("mealplan.add","Add")]}),t.map(_=>e.jsx("option",{value:_.id,children:_.title},_.id))]})]},`${E}-${S.toISOString()}`)})]},E))]})})},Xg=[],Zg=[],eb=({recipes:t=Xg,collections:n=Zg,onChange:i,readOnly:a,onSelectRecipe:s,className:o,style:c,"data-testid":d})=>{const{t:p}=l.useNiceTranslation(),{prompt:m,element:h}=_t.useNiceDialogs(),[u,x]=r.useState(n[0]?.id??null),[f,b]=r.useState(null),g=r.useMemo(()=>{const j=new Map;for(const T of t)j.set(T.id,T);return j},[t]),v=r.useMemo(()=>n.find(j=>j.id===u)??n[0]??null,[n,u]),y=r.useMemo(()=>v?v.recipeIds.map(j=>g.get(j)).filter(j=>!!j):[],[v,g]),C=r.useCallback(j=>{i?.(j)},[i]),w=r.useCallback(()=>{a||m({title:p("collections.namePrompt","Collection name")}).then(j=>{if(!j||!j.trim())return;const T={id:At.newRecipeId("coll"),name:j.trim(),recipeIds:[]};C([...n,T]),x(T.id)})},[n,a,p,C,m]),E=r.useCallback(j=>{if(a)return;const T=n.filter(P=>P.id!==j);C(T),u===j&&x(T[0]?.id??null)},[u,n,a,C]),S=r.useCallback(()=>{if(!f)return;const j=f.value.trim();j&&C(n.map(T=>T.id===f.id?{...T,name:j}:T)),b(null)},[n,f,C]),N=r.useCallback(j=>{!v||!j||a||v.recipeIds.includes(j)||C(n.map(T=>T.id===v.id?{...T,recipeIds:[...T.recipeIds,j]}:T))},[v,n,a,C]),_=r.useCallback(j=>{!v||a||C(n.map(T=>T.id===v.id?{...T,recipeIds:T.recipeIds.filter(P=>P!==j)}:T))},[v,n,a,C]),k=r.useMemo(()=>v?t.filter(j=>!v.recipeIds.includes(j.id)):[],[v,t]);return e.jsxs("div",{className:`nice-recipe-collections ${o??""}`,style:c,"data-testid":d,children:[h,e.jsxs("aside",{className:"nice-recipe-collections__sidebar",children:[e.jsxs("div",{className:"nice-recipe-collections__sidebar-head",children:[e.jsx("span",{className:"nice-recipe-collections__sidebar-title",children:p("collections.title","Collections")}),!a&&e.jsx("button",{type:"button",className:"nice-recipe-collections__sidebar-add",onClick:w,"aria-label":p("collections.create","Create collection"),children:e.jsx(l.NiceIcon,{name:"plus",size:14})})]}),e.jsx("ul",{className:"nice-recipe-collections__list",children:n.map(j=>{const T=v?.id===j.id,P=f?.id===j.id;return e.jsxs("li",{className:`nice-recipe-collections__item${T?" nice-recipe-collections__item--active":""}`,children:[P?e.jsx("input",{autoFocus:!0,className:"nice-recipe-collections__rename",value:f.value,onChange:B=>b({id:j.id,value:B.target.value}),onBlur:S,onKeyDown:B=>{B.key==="Enter"?S():B.key==="Escape"&&b(null)}}):e.jsxs("button",{type:"button",className:"nice-recipe-collections__item-btn",onClick:()=>x(j.id),onDoubleClick:()=>!a&&b({id:j.id,value:j.name}),children:[e.jsx("span",{className:"nice-recipe-collections__item-name",children:j.name}),e.jsx("span",{className:"nice-recipe-collections__item-count",children:j.recipeIds.length})]}),!a&&!P&&e.jsx("button",{type:"button",className:"nice-recipe-collections__item-remove",onClick:()=>E(j.id),"aria-label":p("collections.delete","Delete collection"),title:p("collections.delete","Delete collection"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},j.id)})})]}),e.jsx("section",{className:"nice-recipe-collections__main",children:v?e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"nice-recipe-collections__header",children:[e.jsx("h3",{className:"nice-recipe-collections__name",children:v.name}),!a&&k.length>0&&e.jsxs("select",{className:"nice-recipe-collections__add-recipe",value:"","aria-label":p("collections.addRecipe","Add recipe"),onChange:j=>{const T=j.target.value;T&&N(T),j.target.value=""},children:[e.jsxs("option",{value:"",children:["+ ",p("collections.addRecipe","Add recipe")]}),k.map(j=>e.jsx("option",{value:j.id,children:j.title},j.id))]})]}),y.length===0?e.jsx("div",{className:"nice-recipe-collections__empty",children:p("collections.empty","No recipes in this collection yet.")}):e.jsx(Dd,{recipes:y,hideFilters:!0,onSelect:j=>s?.(j)}),!a&&y.length>0&&e.jsxs("details",{className:"nice-recipe-collections__manage",children:[e.jsx("summary",{children:p("collections.manage","Manage recipes")}),e.jsx("ul",{className:"nice-recipe-collections__manage-list",children:y.map(j=>e.jsxs("li",{children:[e.jsx("span",{children:j.title}),e.jsx("button",{type:"button",onClick:()=>_(j.id),"aria-label":p("collections.removeRecipe","Remove recipe from collection"),children:p("collections.removeShort","Remove")})]},j.id))})]})]}):e.jsx("div",{className:"nice-recipe-collections__empty",children:p("collections.emptyState","No collection selected.")})})]})},tb=[],ki=["hour","day","week","month","quarter","year"],nb=t=>{switch(t){case"hour":return{msPerPixel:6e4,unitMs:36e5,unitLabel:"HH:mm",headerFormat:"MMM d, yyyy"};case"day":return{msPerPixel:36e5,unitMs:864e5,unitLabel:"d",headerFormat:"MMM yyyy"};case"week":return{msPerPixel:864e5/2,unitMs:6048e5,unitLabel:"W",headerFormat:"MMM yyyy"};case"month":return{msPerPixel:864e5*2,unitMs:2592e6,unitLabel:"MMM",headerFormat:"yyyy"};case"quarter":return{msPerPixel:864e5*7,unitMs:7776e6,unitLabel:"Q",headerFormat:"yyyy"};case"year":return{msPerPixel:864e5*30,unitMs:31536e6,unitLabel:"yyyy",headerFormat:""};default:return{msPerPixel:864e5,unitMs:864e5,unitLabel:"d",headerFormat:"MMM yyyy"}}},Ci=(t,n,i="pl-PL")=>{const a={};if(n.includes("yyyy")&&(a.year="numeric"),n.includes("MMM")&&(a.month="short"),n.includes("MM")&&!n.includes("MMM")&&(a.month="2-digit"),(n.includes("dd")||n.includes("d"))&&(a.day="2-digit"),n.includes("EEE")&&(a.weekday="short"),n.includes("HH")&&(a.hour="2-digit",a.hour12=!1),n.includes("mm")&&!n.includes("MMM")&&(a.minute="2-digit"),n==="W")return`T${ib(t)}`;if(n==="Q")return`Q${Math.ceil((t.getMonth()+1)/3)}`;const s=a.year||a.month||a.day||a.weekday;return(a.hour||a.minute)&&!s?t.toLocaleTimeString(i,a):t.toLocaleDateString(i,a)},ib=t=>{const n=new Date(t);n.setHours(0,0,0,0),n.setDate(n.getDate()+4-(n.getDay()||7));const i=new Date(n.getFullYear(),0,1);return Math.ceil(((n.getTime()-i.getTime())/864e5+1)/7)},fc=(t,n)=>new Date(t.getTime()+n),ab=["var(--nice-color-primary, #3b82f6)","var(--nice-color-error, #ef4444)","var(--nice-color-success, #22c55e)","var(--nice-color-warning, #f59e0b)","var(--nice-color-accent, #8b5cf6)","var(--nice-color-accent-pink, #ec4899)","var(--nice-color-info, #06b6d4)","var(--nice-success, #84cc16)","var(--nice-warning, #f97316)","var(--nice-color-accent, #6366f1)"],sb=Object.assign(r.forwardRef((t,n)=>{const{t:i}=l.useNiceTranslation(),{events:a=tb,groups:s=[],markers:o=[],initialZoom:c="week",initialDate:d,width:p=800,height:m=400,showToday:h=!0,showZoomControls:u=!0,showNavControls:x=!0,showMinimap:f=!1,onEventClick:b,onEventHover:g,onDateChange:v,onZoomChange:y,renderEvent:C,colors:w=ab,locale:E="pl-PL",className:S,style:N,..._}=t,[k,j]=r.useState(c),[T,P]=r.useState(d||new Date),[B,R]=r.useState(!1),[I,D]=r.useState({x:0,date:new Date}),[M,O]=r.useState(null),[L,V]=r.useState(new Set),ee=r.useRef(null),z=r.useMemo(()=>nb(k),[k]),U=p*z.msPerPixel,re=T.getTime()-U/2,Y=T.getTime()+U/2,oe=r.useMemo(()=>new Date(re),[re]),q=r.useMemo(()=>new Date(Y),[Y]),se=r.useCallback(W=>(W.getTime()-oe.getTime())/z.msPerPixel,[oe,z.msPerPixel]);r.useCallback(W=>{const be=W*z.msPerPixel;return new Date(oe.getTime()+be)},[oe,z.msPerPixel]);const ce=r.useMemo(()=>{const W=[];let be=new Date(oe);switch(k){case"hour":be.setMinutes(0,0,0);break;case"day":be.setHours(0,0,0,0);break;case"week":{const Te=be.getDay();be.setDate(be.getDate()-Te+1),be.setHours(0,0,0,0);break}case"month":be.setDate(1),be.setHours(0,0,0,0);break;case"quarter":be.setMonth(Math.floor(be.getMonth()/3)*3),be.setDate(1),be.setHours(0,0,0,0);break;case"year":be.setMonth(0,1),be.setHours(0,0,0,0);break}for(;be<=q;){const Te=se(be),Me=k==="day"?be.getDay()===1:k==="week"?be.getDate()===1:k==="month"?be.getMonth()%3===0:k==="quarter"?be.getMonth()===0:!0;W.push({date:new Date(be),x:Te,isMain:Me,isWeekend:k==="day"&&(be.getDay()===0||be.getDay()===6)}),be=fc(be,z.unitMs)}return W},[oe,q,k,z,se]),le=r.useMemo(()=>{const W=z.unitMs/z.msPerPixel;return W<=0?1:Math.max(1,Math.ceil(40/W))},[z]),J=r.useMemo(()=>{const W=new Map;return W.set("__default",[]),s.forEach(be=>W.set(be.id,[])),a.forEach(be=>{const Te=be.group&&W.has(be.group)?be.group:"__default",Me=W.get(Te)||[];Me.push(be),W.set(Te,Me)}),W},[a,s]),me=r.useMemo(()=>{const W=[];return J.get("__default")?.length&&W.push({id:"__default",title:"",events:J.get("__default")||[],isGroup:!1}),s.forEach(be=>{L.has(be.id)||W.push({id:be.id,title:be.title,events:J.get(be.id)||[],isGroup:!0})}),W},[J,s,L]),je=r.useCallback(W=>{P(W),v?.(W)},[v]),ue=r.useCallback(()=>{const W=ki.indexOf(k);if(W>0){const be=ki[W-1];j(be),y?.(be)}},[k,y]),F=r.useCallback(()=>{const W=ki.indexOf(k);if(W<ki.length-1){const be=ki[W+1];j(be),y?.(be)}},[k,y]),H=r.useCallback(W=>{j(W),y?.(W)},[y]),A=r.useCallback(W=>{const be=fc(T,W*U*.5);je(be)},[T,U,je]),Z=r.useCallback(W=>{W.button===0&&(R(!0),D({x:W.clientX,date:T}))},[T]),fe=r.useCallback(W=>{if(!B)return;const Te=(I.x-W.clientX)*z.msPerPixel,Me=new Date(I.date.getTime()+Te);P(Me)},[B,I,z.msPerPixel]),Ne=r.useCallback(()=>{B&&(R(!1),v?.(T))},[B,T,v]),K=r.useCallback(W=>{W.preventDefault(),W.deltaY<0?ue():F()},[ue,F]),Q=r.useCallback(W=>{O(W),g?.(W)},[g]),ne=r.useCallback(()=>{O(null),g?.(null)},[g]),G=r.useRef(null);l.useRovingFocus(G,{orientation:"grid",itemSelector:".nice-timeline-event, .nice-timeline-milestone"});const Se=W=>be=>{(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),b?.(W))};r.useImperativeHandle(n,()=>({goToDate:je,zoomIn:ue,zoomOut:F,setZoom:H,getCurrentDate:()=>T,getCurrentZoom:()=>k}),[je,ue,F,H,T,k]);const te=40,we=60,ie=Math.max(me.length*te,m-we-40),xe=se(new Date);return e.jsxs("div",{className:`nice-timeline ${S||""}`,style:{width:p,...N},..._,children:[e.jsxs("div",{className:"nice-timeline-toolbar",children:[x&&e.jsx("div",{className:"nice-timeline-nav",children:e.jsxs(At.NiceButtonGroup,{size:"sm",children:[e.jsx(Fe.NiceButton,{onClick:()=>A(-1),"aria-label":i("planning.previous","Previous"),children:e.jsx(l.NiceIcon,{name:"chevron-left",size:14})}),e.jsx(Fe.NiceButton,{onClick:()=>je(new Date),children:i("scheduling.today","Today")}),e.jsx(Fe.NiceButton,{onClick:()=>A(1),"aria-label":i("planning.next","Next"),children:e.jsx(l.NiceIcon,{name:"chevron-right",size:14})})]})}),e.jsx("div",{className:"nice-timeline-center",children:e.jsxs("span",{className:"nice-timeline-range",children:[Ci(oe,"MMM d, yyyy",E)," —"," ",Ci(q,"MMM d, yyyy",E)]})}),u&&e.jsx("div",{className:"nice-timeline-zoom",children:e.jsx(At.NiceButtonGroup,{size:"sm",children:ki.map(W=>e.jsx(Fe.NiceButton,{variant:k===W?"primary":"secondary",onClick:()=>H(W),children:W==="hour"?i("planning.hourShort","hr"):W==="day"?i("planning.dayShort","day"):W==="week"?i("planning.weekShort","wk"):W==="month"?i("planning.monthShort","mo"):W==="quarter"?i("planning.quarterShort","qtr"):i("planning.yearShort","yr")},W))})})]}),e.jsxs("div",{ref:ee,className:"nice-timeline-container",onMouseDown:Z,onMouseMove:fe,onMouseUp:Ne,onMouseLeave:Ne,onWheel:K,style:{cursor:B?"grabbing":"grab"},children:[e.jsxs("div",{className:"nice-timeline-header",style:{height:we},children:[e.jsx("div",{className:"nice-timeline-header-main",children:z.headerFormat&&e.jsx("span",{children:Ci(T,z.headerFormat,E)})}),e.jsx("div",{className:"nice-timeline-header-units",children:ce.map((W,be)=>{const Te=be%le===0||W.isMain,Me=k==="hour"&&W.date.getHours()===0,$=Me?"d MMM":z.unitLabel;return e.jsx("div",{className:`nice-timeline-unit ${W.isMain?"main":""} ${W.isWeekend?"nice-timeline-unit--weekend":""} ${Me?"nice-timeline-unit--midnight":""} ${Te?"":"nice-timeline-unit--no-label"}`,style:{left:W.x},children:Te&&e.jsx("span",{children:Ci(W.date,$,E)})},be)})})]}),e.jsxs("div",{ref:G,className:"nice-timeline-chart",style:{height:ie},role:"group","aria-label":i("timeline.events","Events"),children:[e.jsxs("svg",{className:"nice-timeline-grid",width:p,height:ie,children:[ce.map((W,be)=>{if(!W.isWeekend)return null;const Te=ce[be+1],Me=(Te?Te.x:W.x+z.unitMs/z.msPerPixel)-W.x;return e.jsx("rect",{x:W.x,y:0,width:Me,height:ie,className:"nice-timeline-weekend-band"},`wk-${be}`)}),ce.map((W,be)=>e.jsx("line",{x1:W.x,y1:0,x2:W.x,y2:ie,className:W.isMain?"main":"minor"},be)),h&&xe>=0&&xe<=p&&e.jsx("line",{x1:xe,y1:0,x2:xe,y2:ie,className:"today"}),me.map((W,be)=>e.jsx("line",{x1:0,y1:(be+1)*te,x2:p,y2:(be+1)*te,className:"row-sep"},be))]}),o.map((W,be)=>{const Te=se(W.date);return Te<0||Te>p?null:e.jsx("div",{className:`nice-timeline-marker ${W.type||"line"}`,style:{left:Te,borderColor:W.color},children:e.jsx("span",{className:"nice-timeline-marker-label",children:W.label})},be)}),me.map((W,be)=>e.jsx("div",{className:"nice-timeline-row",style:{top:be*te,height:te},children:W.events.map((Te,Me)=>{const $=se(Te.start),X=Te.end?se(Te.end):$+10,ae=Math.max(X-$,20),ve=Te.color||w[Me%w.length];return $>p||X<0?null:Te.type==="milestone"?e.jsx("div",{className:`nice-timeline-milestone ${M?.id===Te.id?"hovered":""}`,style:{left:$,borderColor:ve},onClick:()=>b?.(Te),onKeyDown:Se(Te),onMouseEnter:()=>Q(Te),onMouseLeave:ne,onFocus:()=>Q(Te),onBlur:ne,role:"button","aria-label":Te.title,title:Te.title,children:Te.icon||e.jsx(l.NiceIcon,{name:"diamond",size:12})},Te.id):e.jsx("div",{className:`nice-timeline-event ${Te.type||"event"} ${M?.id===Te.id?"hovered":""}`,style:{left:Math.max($,0),width:ae,backgroundColor:ve},onClick:()=>b?.(Te),onKeyDown:Se(Te),onMouseEnter:()=>Q(Te),onMouseLeave:ne,onFocus:()=>Q(Te),onBlur:ne,role:"button","aria-label":Te.title,title:Te.description||Te.title,children:C?C(Te):e.jsx("span",{className:"nice-timeline-event-title",children:Te.title})},Te.id)})},W.id)),h&&xe>=0&&xe<=p&&e.jsx("div",{className:"nice-timeline-today-marker",style:{left:xe},children:e.jsx("span",{children:i("scheduling.today","Today")})})]}),M&&e.jsxs("div",{className:"nice-timeline-tooltip",style:{left:se(M.start)+10},children:[e.jsx("strong",{children:M.title}),M.description&&e.jsx("p",{children:M.description}),e.jsxs("small",{children:[Ci(M.start,"MMM d, yyyy HH:mm",E),M.end&&` — ${Ci(M.end,"MMM d, yyyy HH:mm",E)}`]})]})]}),f&&e.jsx("div",{className:"nice-timeline-minimap"}),e.jsx("style",{children:`
4
4
  .nice-timeline {
@@ -1289,7 +1289,7 @@ ${ae}
1289
1289
  color: var(--nice-primary, #2563eb); border-radius: var(--nice-radius-sm, 4px); padding: 4px 12px;
1290
1290
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 2px;
1291
1291
  }
1292
- `;class Zd{constructor(){this.components=new Map,this.actionHandlers=new Map}register(n){return this.components.set(n.type,n),this}registerAll(n){for(const i of n)this.register(i);return this}unregister(n){return this.components.delete(n)}get(n){return this.components.get(n)}has(n){return this.components.has(n)}getAll(){return Array.from(this.components.values())}getByCategory(n){return this.getAll().filter(i=>i.category===n)}getCategories(){return[...new Set(this.getAll().map(n=>n.category))]}registerAction(n,i){return this.actionHandlers.set(n,i),this}getAction(n){return this.actionHandlers.get(n)}hasAction(n){return this.actionHandlers.has(n)}getActionNames(){return Array.from(this.actionHandlers.keys())}validateTypes(n){const i=[];for(const a of n)this.has(a)||i.push(a);return i}clear(){this.components.clear(),this.actionHandlers.clear()}}const co=jf();function jf(){const t=new Zd;return wf(t),kf(t),t}function wf(t){t.registerAll([{type:"text",label:"Text",category:"content",component:(n=>r.createElement("p",{className:"nice-view-v2__text"},String(n.content??n.text??"")))},{type:"heading",label:"Heading",category:"content",component:(n=>{const a=`h${Math.min(6,Math.max(1,Number(n.level??2)))}`;return r.createElement(a,{className:"nice-view-v2__heading"},String(n.text??""))})},{type:"container",label:"Container",category:"layout",component:(n=>r.createElement("div",{className:"nice-view-v2__container",style:{flexDirection:n.direction??"column",gap:typeof n.gap=="number"?n.gap:8}},n.children))},{type:"button",label:"Button",category:"actions",component:(n=>r.createElement("button",{type:"button",className:"nice-btn nice-btn--primary"},String(n.label??n.text??"Button")))}])}function Yt(t,n,i,a){const s=r.lazy(()=>n().then(c=>({default:i(c)}))),o=c=>r.createElement(r.Suspense,{fallback:null},r.createElement(s,c));t.register({...a,component:o})}function kf(t){Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceTextInput$1),n=>n.NiceTextInput,{type:"textInput",label:"Text Input",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceTextArea$1),n=>n.NiceTextArea,{type:"textArea",label:"Text Area",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceNumberInput$1),n=>n.NiceNumberInput,{type:"numberInput",label:"Number Input",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceCheckbox$1),n=>n.NiceCheckbox,{type:"checkbox",label:"Checkbox",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceSelect$1),n=>n.NiceSelect,{type:"select",label:"Select",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceSlider$1),n=>n.NiceSlider,{type:"slider",label:"Slider",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceRating$1),n=>n.NiceRating,{type:"rating",label:"Rating",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceRadioGroup$1),n=>n.NiceRadioGroup,{type:"radioGroup",label:"Radio Group",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceDateTimePicker$1),n=>n.NiceDateTimePicker,{type:"datePicker",label:"Date Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-DM2tARZT.cjs")).then(n=>n.NiceDateTimePicker$1),n=>n.NiceDateTimePicker,{type:"timePicker",label:"Time Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceColorPicker-79rkvaSk.cjs")),n=>n.NiceColorPicker,{type:"colorPicker",label:"Color Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceModuleLifecyclePanel-bsHwj1pO.cjs")).then(n=>n.NiceCard$1),n=>n.NiceCard,{type:"card",label:"Card",category:"layout"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceDataGrid-Cszjz8NV.cjs")).then(n=>n.NiceDataGrid$1),n=>(i=>r.createElement(n.NiceDataGrid,{...i,data:Array.isArray(i.data)?i.data:[]})),{type:"dataGrid",label:"Data Grid",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>require("./charts-CSgOgfES.cjs")).then(n=>n.NiceChart$1),n=>(i=>r.createElement(n.NiceChart,{...i,series:Array.isArray(i.series)?i.series:[]})),{type:"chart",label:"Chart",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>QT),n=>(i=>r.createElement(n.NiceStatistic,{...i,title:String(i.title??i.label??"KPI"),value:typeof i.value=="number"||typeof i.value=="string"?i.value:"—"})),{type:"kpi",label:"KPI",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>Oh),n=>(i=>r.createElement(n.NiceBadge,{...i,children:i.children??String(i.text??i.label??"Badge")})),{type:"badge",label:"Badge",category:"display"})}function fs(t,n){let i=t;for(const a of n.split(".")){if(i==null||typeof i!="object")return;i=i[a]}return i}const Cf={toUpperCase:t=>typeof t=="string"?t.toUpperCase():t,toLowerCase:t=>typeof t=="string"?t.toLowerCase():t,trim:t=>typeof t=="string"?t.trim():t,toFixed2:t=>typeof t=="number"?t.toFixed(2):t,toFixed0:t=>typeof t=="number"?t.toFixed(0):t,toString:t=>String(t??""),toNumber:t=>Number(t)||0,boolean:t=>!!t,not:t=>!t,length:t=>Array.isArray(t)||typeof t=="string"?t.length:0,json:t=>{try{return JSON.stringify(t)}catch{return""}},date:t=>{try{return new Date(t).toLocaleDateString()}catch{return String(t)}},datetime:t=>{try{return new Date(t).toLocaleString()}catch{return String(t)}},currency:t=>typeof t=="number"?t.toLocaleString(void 0,{style:"currency",currency:"USD"}):t,percent:t=>typeof t=="number"?`${(t*100).toFixed(1)}%`:t};function Sf(t,n,i){const a=t.split("|").map(o=>o.trim());let s=n;for(const o of a){if(o.startsWith("field:")){s=fs(i,o.slice(6));continue}const c=Cf[o];c&&(s=c(s,i))}return s}function Tf(t,n,i){if(!n)return;const a=n.getRecord(t.source,i);if(!a)return;const s=fs(a,t.field);if(t.transform)try{return Sf(t.transform,s,a)}catch{return s}return s}function eu(t,n,i){const a=t.trim();if(a.startsWith("!"))return!eu(a.slice(1),n,i);const s=a.match(/^([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)\s*(===?|!==?|>=?|<=?)\s*(.+)$/);if(s){const[,d,p,m]=s,[h,...u]=d.split("."),x=n.getRecord(h,i),f=x?fs(x,u.join(".")):void 0;let b=m.trim();switch(b==="true"?b=!0:b==="false"?b=!1:b==="null"||b==="undefined"?b=void 0:/^-?\d+(\.\d+)?$/.test(b)?b=Number(b):(b.startsWith("'")&&b.endsWith("'")||b.startsWith('"')&&b.endsWith('"'))&&(b=b.slice(1,-1)),p){case"==":case"===":return f===b;case"!=":case"!==":return f!==b;case">":return Number(f)>Number(b);case">=":return Number(f)>=Number(b);case"<":return Number(f)<Number(b);case"<=":return Number(f)<=Number(b);default:return!0}}const[o,...c]=a.split(".");if(o){const d=n.getRecord(o,i);return d?!!(c.length?fs(d,c.join(".")):d):!1}return!0}function Pc(t,n,i){if(!t||!n)return!0;try{return eu(t,n,i)}catch{return!0}}function Ac(t,n){if(!t||t.length===0)return"editable";if(!n||n.length===0)return"hidden";let i="hidden";const a={hidden:0,readonly:1,editable:2};for(const s of t)(n.includes(s.role)||s.role==="*")&&a[s.access]>a[i]&&(i=s.access);return i}function Ef(t,n){return t+1}const tu=Object.assign(r.forwardRef(({view:t,registry:n=co,dataStore:i,userRoles:a,onNavigate:s,onNotify:o,onOpenDialog:c,onCloseDialog:d,fallback:p,recordIndex:m,onRunScript:h,className:u,style:x,id:f,...b},g)=>{const{t:v}=l.useNiceTranslation(),{confirm:y,element:C}=_t.useNiceDialogs(),[,w]=r.useReducer(Ef,0),E=r.useRef(w);E.current=w;const S=r.useMemo(()=>({dataSources:new Proxy({},{get:(I,D)=>i?.get(D)}),navigate:I=>s?.(I),notify:(I,D)=>o?.(I,D),refreshDataSource:I=>{i?.refresh(I),E.current({type:"tick"})},openDialog:I=>c?.(I),closeDialog:()=>d?.()}),[i,s,o,c,d]),N=r.useCallback(async I=>{for(const D of I)if(!(D.confirm&&!await y({message:D.confirm})))try{switch(D.type){case"navigate":D.target&&S.navigate(D.target);break;case"apiCall":if(D.endpoint){const M=D.endpoint.trim().toLowerCase();if(!M.startsWith("http://")&&!M.startsWith("https://")&&!M.startsWith("/")){console.warn("[NiceViewRenderer] Blocked unsafe endpoint:",D.endpoint);break}await fetch(D.endpoint,{method:D.method??"POST",headers:{"Content-Type":"application/json"},body:D.body?JSON.stringify(D.body):void 0})}D.successMessage&&S.notify(D.successMessage,"success");break;case"setField":if(D.field&&i){const[M,...O]=D.field.split(".");i.setField(M,O.join("."),D.value,m)}break;case"refresh":D.dataSourceKey&&S.refreshDataSource(D.dataSourceKey);break;case"openDialog":D.dialogViewId&&S.openDialog(D.dialogViewId);break;case"closeDialog":S.closeDialog();break;case"submit":break;case"custom":{const M=D.handler?n.getAction(D.handler):void 0;M&&await M(D.params??{},S);break}case"script":D.script&&(h?await h(D.script,{language:D.language??"js",action:D,context:S}):typeof console<"u"&&console.warn("[NiceViewRenderer] script action skipped: no onRunScript handler provided.",D));break}}catch(M){const O=D.errorMessage??`Action failed: ${M.message}`;S.notify(O,"error")}},[S,i,m,n,h,y]),_=r.useCallback(I=>{if(!Pc(I.visibleWhen,i,m))return null;const D=Ac(I.permissions,a);if(D==="hidden")return null;const M={...I.props};if(I.bindings){for(const[V,ee]of Object.entries(I.bindings))if(M[V]=Tf(ee,i,m),ee.twoWay){const z=`on${V.charAt(0).toUpperCase()}${V.slice(1)}Change`;M[z]=U=>{i?.setField(ee.source,ee.field,U,m),E.current({type:"tick"})}}}if(D==="readonly"&&(M.disabled=!0,M.readOnly=!0),I.events)for(const V of I.events)M[V.event]=(...ee)=>{N(V.actions)};const O=n.get(I.controlType);if(!O)return p?e.jsx(p,{controlType:I.controlType}):e.jsx("div",{className:"nice-view-v2__unknown",children:v("view.unknownControl","Unknown control: {type}").replace("{type}",I.controlType)});const L=O.component;return e.jsx(L,{...O.defaultProps??{},...M})},[n,i,a,m,N,p,v]),k=r.useCallback((I,D)=>I.map(M=>Pc(M.visibleWhen,i,m)?e.jsx("div",{className:`nice-view-v2__row ${M.cssClass??""}`,style:{gridTemplateColumns:`repeat(${D}, 1fr)`,...M.height?{minHeight:M.height}:{}},children:M.cells.map(O=>e.jsx("div",{className:`nice-view-v2__cell ${O.cssClass??""}`,style:{gridColumn:O.colSpan?`span ${O.colSpan}`:void 0,gridRow:O.rowSpan?`span ${O.rowSpan}`:void 0},children:_(O)},O.id))},M.id):null),[_,i,m]),j=r.useCallback((I,D)=>{switch(I.type){case"tabs":return e.jsx("div",{className:"nice-view-v2__tabs",children:I.sections.map(M=>e.jsxs("div",{className:"nice-view-v2__tab-panel",children:[M.label&&e.jsx("div",{className:"nice-view-v2__tab-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});case"accordion":return e.jsx("div",{className:"nice-view-v2__accordion",children:I.sections.map(M=>e.jsxs("details",{className:"nice-view-v2__accordion-panel",children:[e.jsx("summary",{children:M.label??M.id}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});case"splitter":{const M=I.props?.sizes??I.sections.map(()=>"1fr");return e.jsx("div",{className:"nice-view-v2__splitter",style:{gridTemplateColumns:M.join(" ")},children:I.sections.map(O=>e.jsxs("div",{className:"nice-view-v2__splitter-panel",children:[O.rows&&k(O.rows,D),O.container&&j(O.container,D)]},O.id))})}case"stack":return e.jsx("div",{className:"nice-view-v2__stack",children:I.sections.map(M=>e.jsxs("div",{children:[M.label&&e.jsx("h3",{className:"nice-view-v2__section-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});default:return e.jsx(e.Fragment,{children:I.sections.map(M=>e.jsxs("div",{children:[M.label&&e.jsx("h3",{className:"nice-view-v2__section-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))})}},[k]),T=r.useCallback(I=>!I||I.length===0?null:I.map((D,M)=>e.jsx("div",{className:`nice-view-v2__toolbar nice-view-v2__toolbar--${D.position}`,children:D.items.map(O=>O.type==="separator"?e.jsx("span",{className:"nice-view-v2__toolbar-sep"},O.id):O.type==="spacer"?e.jsx("span",{className:"nice-view-v2__toolbar-spacer"},O.id):e.jsxs("button",{type:"button",className:"nice-view-v2__toolbar-btn",disabled:typeof O.disabled=="boolean"?O.disabled:!1,onClick:()=>O.actions&&void N(O.actions),children:[O.icon&&e.jsx("span",{className:"nice-view-v2__toolbar-icon",children:e.jsx(l.NiceIcon,{name:O.icon,size:14})}),O.label]},O.id))},M)),[N]);if(Ac(t.permissions?.map(I=>({...I})),a)==="hidden")return null;const B=t.toolbars?.filter(I=>I.position==="top"),R=t.toolbars?.filter(I=>I.position==="bottom");return e.jsxs("div",{ref:g,id:f,className:`nice-view-v2 ${u??""}`,style:x,"data-view-id":t.id,"data-view-module":t.module,...b,children:[C,T(B),t.container?j(t.container,t.columns??12):t.rows&&k(t.rows,t.columns??12),T(R)]})}),{displayName:"NiceViewRenderer"});function If(t){const n=[];for(const i of t??[])for(const a of i.cells??[])n.push(a);return n}function lo(t,n){if(Array.isArray(n))return n;if(n&&typeof n=="object"){const i=n,a=t.dataSources?.[0]?.key;if(a&&Array.isArray(i[a]))return i[a];const s=Object.values(i).find(o=>Array.isArray(o));if(Array.isArray(s))return s}return[]}function uo(t,n){const i=[],a=new Set;for(const s of If(t.rows)){const o=s,c=o.binding?.field??o.props?.field;c&&!a.has(c)&&(a.add(c),i.push({field:c,header:o.label??o.props?.label??c}))}if(i.length===0&&n.length>0)for(const s of Object.keys(n[0]))i.push({field:s,header:s});return i}function Us(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _r(t,n,i={}){const a=lo(t,n),s=i.columns??uo(t,a),o=Us(t.name||"Report"),c=s.length>0?`<table><thead><tr>${s.map(d=>`<th>${Us(d.header)}</th>`).join("")}</tr></thead><tbody>${a.map(d=>`<tr>${s.map(p=>`<td>${Us(d[p.field])}</td>`).join("")}</tr>`).join("")}</tbody></table>`:"<p>No data.</p>";return`<!doctype html><html><head><meta charset="utf-8"><title>${o}</title><style>body{font-family:Inter,system-ui,Arial,sans-serif;color:#111;margin:24px;}h1{font-size:18px;margin:0 0 16px;}table{border-collapse:collapse;width:100%;font-size:12px;}th,td{border:1px solid #ccc;padding:6px 8px;text-align:left;}thead th{background:#f3f4f6;}@media print{body{margin:0;}@page{margin:16mm;}}</style></head><body><h1>${o}</h1>${c}</body></html>`}function Rc(t,n,i){if(typeof document>"u")return;const a=new Blob([t],{type:n}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=i,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(s),0)}async function nu(t,n,i,a={}){const s=lo(t,n);if(a.onExport){await a.onExport(t,s,i);return}const o=a.columns??uo(t,s),c=a.fileName??t.name??"export";switch(i){case"csv":Ze.downloadCSV(s,o,{fileName:c});return;case"xlsx":Ze.downloadXLSX(s,o,{fileName:c,sheetName:t.name||"Sheet1"});return;case"html":Rc(_r(t,n,{columns:o}),"text/html;charset=utf-8",`${c}.html`);return;case"docx":Rc(_r(t,n,{columns:o}),"application/msword",`${c}.doc`);return;case"pdf":default:Ze.exportToPDF(s,o,{title:t.name});return}}const Df=[{target:".nice-view-editor",titleKey:"tutorial.viewEditor.intro.title",title:"View editor",contentKey:"tutorial.viewEditor.intro.content",content:"Author any view kind from one place: choose the kind (or scaffold from an entity), drag controls from the palette into the grid cells, then configure each cell — data binding, role permissions and event actions. Switch Design / Preview / Source, and Save when valid.",placement:"auto"},{target:".nice-view-editor__palette",titleKey:"tutorial.viewEditor.palette.title",title:"Palette",contentKey:"tutorial.viewEditor.palette.content",content:"Add controls from the palette into the grid — inputs, data grids, charts, KPIs, buttons and display blocks.",placement:"right"},{target:".nice-view-editor__canvas",titleKey:"tutorial.viewEditor.canvas.title",title:"Canvas",contentKey:"tutorial.viewEditor.canvas.content",content:"Arrange cells into rows and set each cell’s column span. Click a cell to configure it.",placement:"auto"},{target:".nice-view-editor__props",titleKey:"tutorial.viewEditor.props.title",title:"Properties",contentKey:"tutorial.viewEditor.props.content",content:"Configure the selected control: props, data binding, role permissions and event actions. With nothing selected, manage the view’s data sources.",placement:"left"},{target:".nice-view-editor__modes",titleKey:"tutorial.viewEditor.modes.title",title:"Design / Preview / Source",contentKey:"tutorial.viewEditor.modes.content",content:"Switch between the visual designer, a live preview, and the raw NiceViewDefinition JSON. Save when the view is valid.",placement:"bottom"}],Pf=[{category:"Inputs",items:[{type:"textInput",label:"Text"},{type:"textArea",label:"Text area"},{type:"numberInput",label:"Number"},{type:"select",label:"Select"},{type:"checkbox",label:"Checkbox"},{type:"datePicker",label:"Date"}]},{category:"Data",items:[{type:"dataGrid",label:"Data grid"}]},{category:"BI",items:[{type:"chart",label:"Chart"},{type:"kpi",label:"KPI"}]},{category:"Actions",items:[{type:"button",label:"Button"}]},{category:"Display",items:[{type:"text",label:"Text"},{type:"heading",label:"Heading"},{type:"badge",label:"Badge"},{type:"card",label:"Card"}]}],Af=["rest","odata","graphql","static","query","entity"],Rf=["hidden","readonly","editable"],$f=[{value:"form",label:"Form"},{value:"detail",label:"Detail"},{value:"grid",label:"Grid"},{value:"dashboard",label:"Dashboard"},{value:"content",label:"Content"},{value:"report",label:"Report"},{value:"print",label:"Print"},{value:"mix",label:"Mix"}],Mf=new Set(["report","print","grid"]),Of=["pdf","docx","xlsx","csv","html"];let Lf=0;const os=t=>`${t}-${Date.now().toString(36)}-${(Lf++).toString(36)}`;function zf(){return{id:os("view"),name:"New View",version:2,columns:12,rows:[],dataSources:[]}}function Bf(t){const n={};for(const i of t.dataSources??[]){const a=i.data;n[i.key]=Array.isArray(a)&&a.length>0?a:[{}]}return{get:i=>n[i],getRecord:(i,a=0)=>n[i]?.[a]??{},setField:(i,a,s,o=0)=>{const c=n[i]??(n[i]=[{}]),d=c[o]??(c[o]={});d[a]=s},refresh:()=>{}}}const Ff=r.forwardRef(function(n,i){const a=r.useRef(null);l.useRovingFocus(a,{orientation:"horizontal",wrap:!0,activateOnMove:!0}),Tn.injectStyleOnce(Uf,Hf);const{value:s,onChange:o,registry:c=co,entities:d,dataSourceOptions:p,onSave:m,onExport:h,height:u=560,tutorial:x,className:f,style:b,id:g,"data-testid":v}=n,{t:y}=l.useNiceTranslation(),[C,w]=r.useState(()=>s??zf()),E=s??C,[S,N]=r.useState(null),[_,k]=r.useState("design"),j=r.useCallback(F=>{o?o(F):w(F)},[o]),T=r.useMemo(()=>E.rows??[],[E.rows]),P=(E.dataSources??[]).map(F=>F.key),B=r.useMemo(()=>c.getActionNames(),[c]),I=r.useCallback(F=>{if(!F)return null;for(const H of T){const A=H.cells.find(Z=>Z.id===F);if(A)return{row:H,cell:A}}return null},[T])(S),D=F=>j({...E,rows:F}),M=(F,H)=>D(T.map(A=>({...A,cells:A.cells.map(Z=>Z.id===F?{...Z,...H}:Z)}))),O=()=>D([...T,{id:os("row"),cells:[]}]),L=F=>{const H={id:os("cell"),controlType:F,props:{label:F},colSpan:6},A=T.length>0?T.slice():[{id:os("row"),cells:[]}];A[A.length-1]={...A[A.length-1],cells:[...A[A.length-1].cells,H]},D(A),N(H.id)},V=F=>{D(T.map(H=>({...H,cells:H.cells.filter(A=>A.id!==F)}))),S===F&&N(null)},ee=(F,H)=>{const A=d?.find(Z=>Z.name===F);A&&(j(Qd(A,H)),N(null))},z=r.useMemo(()=>(d??[]).map(F=>F.name).filter(F=>!!F),[d]),U=r.useMemo(()=>oo(E),[E]),re=r.useMemo(()=>Bf(E),[E]),Y=r.useMemo(()=>{const F={};for(const H of E.dataSources??[]){const A=H.data;F[H.key]=Array.isArray(A)?A:[]}return F},[E]),oe=E.kind??E.meta?.kind??"form",q=F=>{nu(E,Y,F,{onExport:h})},se=e.jsxs("div",{className:"nice-view-editor__toolbar",children:[e.jsx("input",{className:"nice-view-editor__name",value:E.name,onChange:F=>j({...E,name:F.target.value}),placeholder:y("viewEditor.name","View name"),"aria-label":y("viewEditor.name","View name")}),e.jsx("select",{className:"nice-view-editor__kind",value:oe,onChange:F=>j({...E,kind:F.target.value}),"aria-label":y("viewEditor.kindAria","View kind"),children:$f.map(F=>e.jsx("option",{value:F.value,children:y("viewEditor.kind."+F.value,F.label)},F.value))}),d&&d.length>0&&e.jsxs("select",{className:"nice-view-editor__from-entity",value:"",onChange:F=>{const[H,A]=F.target.value.split("::");H&&ee(H,A)},"aria-label":y("viewEditor.fromEntityAria","New view from entity"),children:[e.jsx("option",{value:"",children:y("viewEditor.fromEntity","New from entity…")}),d.map(F=>["form","detail","grid"].map(H=>e.jsxs("option",{value:`${F.name}::${H}`,children:[F.name," · ",H]},`${F.name}-${H}`)))]}),Mf.has(oe)&&e.jsxs("select",{className:"nice-view-editor__export",value:"",onChange:F=>{const H=F.target.value;H&&q(H)},"aria-label":y("viewEditor.exportAria","Export view"),children:[e.jsx("option",{value:"",children:y("viewEditor.export","Export…")}),Of.map(F=>e.jsx("option",{value:F,children:F.toUpperCase()},F))]}),e.jsx("span",{className:"nice-view-editor__spacer"}),e.jsx("div",{className:"nice-view-editor__modes",ref:a,role:"tablist",children:["design","preview","source"].map(F=>e.jsx("button",{type:"button",role:"tab","aria-selected":_===F,className:"nice-view-editor__mode"+(_===F?" nice-view-editor__mode--active":""),onClick:()=>k(F),children:y("viewEditor.mode."+F,F[0].toUpperCase()+F.slice(1))},F))}),e.jsxs("span",{className:"nice-view-editor__status"+(U.length?" nice-view-editor__status--err":""),title:U.join(`
1292
+ `;class Zd{constructor(){this.components=new Map,this.actionHandlers=new Map}register(n){return this.components.set(n.type,n),this}registerAll(n){for(const i of n)this.register(i);return this}unregister(n){return this.components.delete(n)}get(n){return this.components.get(n)}has(n){return this.components.has(n)}getAll(){return Array.from(this.components.values())}getByCategory(n){return this.getAll().filter(i=>i.category===n)}getCategories(){return[...new Set(this.getAll().map(n=>n.category))]}registerAction(n,i){return this.actionHandlers.set(n,i),this}getAction(n){return this.actionHandlers.get(n)}hasAction(n){return this.actionHandlers.has(n)}getActionNames(){return Array.from(this.actionHandlers.keys())}validateTypes(n){const i=[];for(const a of n)this.has(a)||i.push(a);return i}clear(){this.components.clear(),this.actionHandlers.clear()}}const co=jf();function jf(){const t=new Zd;return wf(t),kf(t),t}function wf(t){t.registerAll([{type:"text",label:"Text",category:"content",component:(n=>r.createElement("p",{className:"nice-view-v2__text"},String(n.content??n.text??"")))},{type:"heading",label:"Heading",category:"content",component:(n=>{const a=`h${Math.min(6,Math.max(1,Number(n.level??2)))}`;return r.createElement(a,{className:"nice-view-v2__heading"},String(n.text??""))})},{type:"container",label:"Container",category:"layout",component:(n=>r.createElement("div",{className:"nice-view-v2__container",style:{flexDirection:n.direction??"column",gap:typeof n.gap=="number"?n.gap:8}},n.children))},{type:"button",label:"Button",category:"actions",component:(n=>r.createElement("button",{type:"button",className:"nice-btn nice-btn--primary"},String(n.label??n.text??"Button")))}])}function Yt(t,n,i,a){const s=r.lazy(()=>n().then(c=>({default:i(c)}))),o=c=>r.createElement(r.Suspense,{fallback:null},r.createElement(s,c));t.register({...a,component:o})}function kf(t){Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceTextInput$1),n=>n.NiceTextInput,{type:"textInput",label:"Text Input",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceTextArea$1),n=>n.NiceTextArea,{type:"textArea",label:"Text Area",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceNumberInput$1),n=>n.NiceNumberInput,{type:"numberInput",label:"Number Input",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceCheckbox$1),n=>n.NiceCheckbox,{type:"checkbox",label:"Checkbox",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./no-code-DPc82kyy.cjs")).then(n=>n.NiceSelect$1),n=>n.NiceSelect,{type:"select",label:"Select",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceSlider$1),n=>n.NiceSlider,{type:"slider",label:"Slider",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceRating$1),n=>n.NiceRating,{type:"rating",label:"Rating",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceRadioGroup$1),n=>n.NiceRadioGroup,{type:"radioGroup",label:"Radio Group",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceDateTimePicker$1),n=>n.NiceDateTimePicker,{type:"datePicker",label:"Date Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceForm-B8dX4aLD.cjs")).then(n=>n.NiceDateTimePicker$1),n=>n.NiceDateTimePicker,{type:"timePicker",label:"Time Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceColorPicker-BHaRJBM0.cjs")),n=>n.NiceColorPicker,{type:"colorPicker",label:"Color Picker",category:"input"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceModuleLifecyclePanel-CPBBmmcI.cjs")).then(n=>n.NiceCard$1),n=>n.NiceCard,{type:"card",label:"Card",category:"layout"}),Yt(t,()=>Promise.resolve().then(()=>require("./NiceDataGrid-CuUM3ujX.cjs")).then(n=>n.NiceDataGrid$1),n=>(i=>r.createElement(n.NiceDataGrid,{...i,data:Array.isArray(i.data)?i.data:[]})),{type:"dataGrid",label:"Data Grid",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>require("./charts-CSgOgfES.cjs")).then(n=>n.NiceChart$1),n=>(i=>r.createElement(n.NiceChart,{...i,series:Array.isArray(i.series)?i.series:[]})),{type:"chart",label:"Chart",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>QT),n=>(i=>r.createElement(n.NiceStatistic,{...i,title:String(i.title??i.label??"KPI"),value:typeof i.value=="number"||typeof i.value=="string"?i.value:"—"})),{type:"kpi",label:"KPI",category:"data"}),Yt(t,()=>Promise.resolve().then(()=>Oh),n=>(i=>r.createElement(n.NiceBadge,{...i,children:i.children??String(i.text??i.label??"Badge")})),{type:"badge",label:"Badge",category:"display"})}function fs(t,n){let i=t;for(const a of n.split(".")){if(i==null||typeof i!="object")return;i=i[a]}return i}const Cf={toUpperCase:t=>typeof t=="string"?t.toUpperCase():t,toLowerCase:t=>typeof t=="string"?t.toLowerCase():t,trim:t=>typeof t=="string"?t.trim():t,toFixed2:t=>typeof t=="number"?t.toFixed(2):t,toFixed0:t=>typeof t=="number"?t.toFixed(0):t,toString:t=>String(t??""),toNumber:t=>Number(t)||0,boolean:t=>!!t,not:t=>!t,length:t=>Array.isArray(t)||typeof t=="string"?t.length:0,json:t=>{try{return JSON.stringify(t)}catch{return""}},date:t=>{try{return new Date(t).toLocaleDateString()}catch{return String(t)}},datetime:t=>{try{return new Date(t).toLocaleString()}catch{return String(t)}},currency:t=>typeof t=="number"?t.toLocaleString(void 0,{style:"currency",currency:"USD"}):t,percent:t=>typeof t=="number"?`${(t*100).toFixed(1)}%`:t};function Sf(t,n,i){const a=t.split("|").map(o=>o.trim());let s=n;for(const o of a){if(o.startsWith("field:")){s=fs(i,o.slice(6));continue}const c=Cf[o];c&&(s=c(s,i))}return s}function Tf(t,n,i){if(!n)return;const a=n.getRecord(t.source,i);if(!a)return;const s=fs(a,t.field);if(t.transform)try{return Sf(t.transform,s,a)}catch{return s}return s}function eu(t,n,i){const a=t.trim();if(a.startsWith("!"))return!eu(a.slice(1),n,i);const s=a.match(/^([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)\s*(===?|!==?|>=?|<=?)\s*(.+)$/);if(s){const[,d,p,m]=s,[h,...u]=d.split("."),x=n.getRecord(h,i),f=x?fs(x,u.join(".")):void 0;let b=m.trim();switch(b==="true"?b=!0:b==="false"?b=!1:b==="null"||b==="undefined"?b=void 0:/^-?\d+(\.\d+)?$/.test(b)?b=Number(b):(b.startsWith("'")&&b.endsWith("'")||b.startsWith('"')&&b.endsWith('"'))&&(b=b.slice(1,-1)),p){case"==":case"===":return f===b;case"!=":case"!==":return f!==b;case">":return Number(f)>Number(b);case">=":return Number(f)>=Number(b);case"<":return Number(f)<Number(b);case"<=":return Number(f)<=Number(b);default:return!0}}const[o,...c]=a.split(".");if(o){const d=n.getRecord(o,i);return d?!!(c.length?fs(d,c.join(".")):d):!1}return!0}function Pc(t,n,i){if(!t||!n)return!0;try{return eu(t,n,i)}catch{return!0}}function Ac(t,n){if(!t||t.length===0)return"editable";if(!n||n.length===0)return"hidden";let i="hidden";const a={hidden:0,readonly:1,editable:2};for(const s of t)(n.includes(s.role)||s.role==="*")&&a[s.access]>a[i]&&(i=s.access);return i}function Ef(t,n){return t+1}const tu=Object.assign(r.forwardRef(({view:t,registry:n=co,dataStore:i,userRoles:a,onNavigate:s,onNotify:o,onOpenDialog:c,onCloseDialog:d,fallback:p,recordIndex:m,onRunScript:h,className:u,style:x,id:f,...b},g)=>{const{t:v}=l.useNiceTranslation(),{confirm:y,element:C}=_t.useNiceDialogs(),[,w]=r.useReducer(Ef,0),E=r.useRef(w);E.current=w;const S=r.useMemo(()=>({dataSources:new Proxy({},{get:(I,D)=>i?.get(D)}),navigate:I=>s?.(I),notify:(I,D)=>o?.(I,D),refreshDataSource:I=>{i?.refresh(I),E.current({type:"tick"})},openDialog:I=>c?.(I),closeDialog:()=>d?.()}),[i,s,o,c,d]),N=r.useCallback(async I=>{for(const D of I)if(!(D.confirm&&!await y({message:D.confirm})))try{switch(D.type){case"navigate":D.target&&S.navigate(D.target);break;case"apiCall":if(D.endpoint){const M=D.endpoint.trim().toLowerCase();if(!M.startsWith("http://")&&!M.startsWith("https://")&&!M.startsWith("/")){console.warn("[NiceViewRenderer] Blocked unsafe endpoint:",D.endpoint);break}await fetch(D.endpoint,{method:D.method??"POST",headers:{"Content-Type":"application/json"},body:D.body?JSON.stringify(D.body):void 0})}D.successMessage&&S.notify(D.successMessage,"success");break;case"setField":if(D.field&&i){const[M,...O]=D.field.split(".");i.setField(M,O.join("."),D.value,m)}break;case"refresh":D.dataSourceKey&&S.refreshDataSource(D.dataSourceKey);break;case"openDialog":D.dialogViewId&&S.openDialog(D.dialogViewId);break;case"closeDialog":S.closeDialog();break;case"submit":break;case"custom":{const M=D.handler?n.getAction(D.handler):void 0;M&&await M(D.params??{},S);break}case"script":D.script&&(h?await h(D.script,{language:D.language??"js",action:D,context:S}):typeof console<"u"&&console.warn("[NiceViewRenderer] script action skipped: no onRunScript handler provided.",D));break}}catch(M){const O=D.errorMessage??`Action failed: ${M.message}`;S.notify(O,"error")}},[S,i,m,n,h,y]),_=r.useCallback(I=>{if(!Pc(I.visibleWhen,i,m))return null;const D=Ac(I.permissions,a);if(D==="hidden")return null;const M={...I.props};if(I.bindings){for(const[V,ee]of Object.entries(I.bindings))if(M[V]=Tf(ee,i,m),ee.twoWay){const z=`on${V.charAt(0).toUpperCase()}${V.slice(1)}Change`;M[z]=U=>{i?.setField(ee.source,ee.field,U,m),E.current({type:"tick"})}}}if(D==="readonly"&&(M.disabled=!0,M.readOnly=!0),I.events)for(const V of I.events)M[V.event]=(...ee)=>{N(V.actions)};const O=n.get(I.controlType);if(!O)return p?e.jsx(p,{controlType:I.controlType}):e.jsx("div",{className:"nice-view-v2__unknown",children:v("view.unknownControl","Unknown control: {type}").replace("{type}",I.controlType)});const L=O.component;return e.jsx(L,{...O.defaultProps??{},...M})},[n,i,a,m,N,p,v]),k=r.useCallback((I,D)=>I.map(M=>Pc(M.visibleWhen,i,m)?e.jsx("div",{className:`nice-view-v2__row ${M.cssClass??""}`,style:{gridTemplateColumns:`repeat(${D}, 1fr)`,...M.height?{minHeight:M.height}:{}},children:M.cells.map(O=>e.jsx("div",{className:`nice-view-v2__cell ${O.cssClass??""}`,style:{gridColumn:O.colSpan?`span ${O.colSpan}`:void 0,gridRow:O.rowSpan?`span ${O.rowSpan}`:void 0},children:_(O)},O.id))},M.id):null),[_,i,m]),j=r.useCallback((I,D)=>{switch(I.type){case"tabs":return e.jsx("div",{className:"nice-view-v2__tabs",children:I.sections.map(M=>e.jsxs("div",{className:"nice-view-v2__tab-panel",children:[M.label&&e.jsx("div",{className:"nice-view-v2__tab-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});case"accordion":return e.jsx("div",{className:"nice-view-v2__accordion",children:I.sections.map(M=>e.jsxs("details",{className:"nice-view-v2__accordion-panel",children:[e.jsx("summary",{children:M.label??M.id}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});case"splitter":{const M=I.props?.sizes??I.sections.map(()=>"1fr");return e.jsx("div",{className:"nice-view-v2__splitter",style:{gridTemplateColumns:M.join(" ")},children:I.sections.map(O=>e.jsxs("div",{className:"nice-view-v2__splitter-panel",children:[O.rows&&k(O.rows,D),O.container&&j(O.container,D)]},O.id))})}case"stack":return e.jsx("div",{className:"nice-view-v2__stack",children:I.sections.map(M=>e.jsxs("div",{children:[M.label&&e.jsx("h3",{className:"nice-view-v2__section-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))});default:return e.jsx(e.Fragment,{children:I.sections.map(M=>e.jsxs("div",{children:[M.label&&e.jsx("h3",{className:"nice-view-v2__section-label",children:M.label}),M.rows&&k(M.rows,D),M.container&&j(M.container,D)]},M.id))})}},[k]),T=r.useCallback(I=>!I||I.length===0?null:I.map((D,M)=>e.jsx("div",{className:`nice-view-v2__toolbar nice-view-v2__toolbar--${D.position}`,children:D.items.map(O=>O.type==="separator"?e.jsx("span",{className:"nice-view-v2__toolbar-sep"},O.id):O.type==="spacer"?e.jsx("span",{className:"nice-view-v2__toolbar-spacer"},O.id):e.jsxs("button",{type:"button",className:"nice-view-v2__toolbar-btn",disabled:typeof O.disabled=="boolean"?O.disabled:!1,onClick:()=>O.actions&&void N(O.actions),children:[O.icon&&e.jsx("span",{className:"nice-view-v2__toolbar-icon",children:e.jsx(l.NiceIcon,{name:O.icon,size:14})}),O.label]},O.id))},M)),[N]);if(Ac(t.permissions?.map(I=>({...I})),a)==="hidden")return null;const B=t.toolbars?.filter(I=>I.position==="top"),R=t.toolbars?.filter(I=>I.position==="bottom");return e.jsxs("div",{ref:g,id:f,className:`nice-view-v2 ${u??""}`,style:x,"data-view-id":t.id,"data-view-module":t.module,...b,children:[C,T(B),t.container?j(t.container,t.columns??12):t.rows&&k(t.rows,t.columns??12),T(R)]})}),{displayName:"NiceViewRenderer"});function If(t){const n=[];for(const i of t??[])for(const a of i.cells??[])n.push(a);return n}function lo(t,n){if(Array.isArray(n))return n;if(n&&typeof n=="object"){const i=n,a=t.dataSources?.[0]?.key;if(a&&Array.isArray(i[a]))return i[a];const s=Object.values(i).find(o=>Array.isArray(o));if(Array.isArray(s))return s}return[]}function uo(t,n){const i=[],a=new Set;for(const s of If(t.rows)){const o=s,c=o.binding?.field??o.props?.field;c&&!a.has(c)&&(a.add(c),i.push({field:c,header:o.label??o.props?.label??c}))}if(i.length===0&&n.length>0)for(const s of Object.keys(n[0]))i.push({field:s,header:s});return i}function Us(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _r(t,n,i={}){const a=lo(t,n),s=i.columns??uo(t,a),o=Us(t.name||"Report"),c=s.length>0?`<table><thead><tr>${s.map(d=>`<th>${Us(d.header)}</th>`).join("")}</tr></thead><tbody>${a.map(d=>`<tr>${s.map(p=>`<td>${Us(d[p.field])}</td>`).join("")}</tr>`).join("")}</tbody></table>`:"<p>No data.</p>";return`<!doctype html><html><head><meta charset="utf-8"><title>${o}</title><style>body{font-family:Inter,system-ui,Arial,sans-serif;color:#111;margin:24px;}h1{font-size:18px;margin:0 0 16px;}table{border-collapse:collapse;width:100%;font-size:12px;}th,td{border:1px solid #ccc;padding:6px 8px;text-align:left;}thead th{background:#f3f4f6;}@media print{body{margin:0;}@page{margin:16mm;}}</style></head><body><h1>${o}</h1>${c}</body></html>`}function Rc(t,n,i){if(typeof document>"u")return;const a=new Blob([t],{type:n}),s=URL.createObjectURL(a),o=document.createElement("a");o.href=s,o.download=i,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(s),0)}async function nu(t,n,i,a={}){const s=lo(t,n);if(a.onExport){await a.onExport(t,s,i);return}const o=a.columns??uo(t,s),c=a.fileName??t.name??"export";switch(i){case"csv":Ze.downloadCSV(s,o,{fileName:c});return;case"xlsx":Ze.downloadXLSX(s,o,{fileName:c,sheetName:t.name||"Sheet1"});return;case"html":Rc(_r(t,n,{columns:o}),"text/html;charset=utf-8",`${c}.html`);return;case"docx":Rc(_r(t,n,{columns:o}),"application/msword",`${c}.doc`);return;case"pdf":default:Ze.exportToPDF(s,o,{title:t.name});return}}const Df=[{target:".nice-view-editor",titleKey:"tutorial.viewEditor.intro.title",title:"View editor",contentKey:"tutorial.viewEditor.intro.content",content:"Author any view kind from one place: choose the kind (or scaffold from an entity), drag controls from the palette into the grid cells, then configure each cell — data binding, role permissions and event actions. Switch Design / Preview / Source, and Save when valid.",placement:"auto"},{target:".nice-view-editor__palette",titleKey:"tutorial.viewEditor.palette.title",title:"Palette",contentKey:"tutorial.viewEditor.palette.content",content:"Add controls from the palette into the grid — inputs, data grids, charts, KPIs, buttons and display blocks.",placement:"right"},{target:".nice-view-editor__canvas",titleKey:"tutorial.viewEditor.canvas.title",title:"Canvas",contentKey:"tutorial.viewEditor.canvas.content",content:"Arrange cells into rows and set each cell’s column span. Click a cell to configure it.",placement:"auto"},{target:".nice-view-editor__props",titleKey:"tutorial.viewEditor.props.title",title:"Properties",contentKey:"tutorial.viewEditor.props.content",content:"Configure the selected control: props, data binding, role permissions and event actions. With nothing selected, manage the view’s data sources.",placement:"left"},{target:".nice-view-editor__modes",titleKey:"tutorial.viewEditor.modes.title",title:"Design / Preview / Source",contentKey:"tutorial.viewEditor.modes.content",content:"Switch between the visual designer, a live preview, and the raw NiceViewDefinition JSON. Save when the view is valid.",placement:"bottom"}],Pf=[{category:"Inputs",items:[{type:"textInput",label:"Text"},{type:"textArea",label:"Text area"},{type:"numberInput",label:"Number"},{type:"select",label:"Select"},{type:"checkbox",label:"Checkbox"},{type:"datePicker",label:"Date"}]},{category:"Data",items:[{type:"dataGrid",label:"Data grid"}]},{category:"BI",items:[{type:"chart",label:"Chart"},{type:"kpi",label:"KPI"}]},{category:"Actions",items:[{type:"button",label:"Button"}]},{category:"Display",items:[{type:"text",label:"Text"},{type:"heading",label:"Heading"},{type:"badge",label:"Badge"},{type:"card",label:"Card"}]}],Af=["rest","odata","graphql","static","query","entity"],Rf=["hidden","readonly","editable"],$f=[{value:"form",label:"Form"},{value:"detail",label:"Detail"},{value:"grid",label:"Grid"},{value:"dashboard",label:"Dashboard"},{value:"content",label:"Content"},{value:"report",label:"Report"},{value:"print",label:"Print"},{value:"mix",label:"Mix"}],Mf=new Set(["report","print","grid"]),Of=["pdf","docx","xlsx","csv","html"];let Lf=0;const os=t=>`${t}-${Date.now().toString(36)}-${(Lf++).toString(36)}`;function zf(){return{id:os("view"),name:"New View",version:2,columns:12,rows:[],dataSources:[]}}function Bf(t){const n={};for(const i of t.dataSources??[]){const a=i.data;n[i.key]=Array.isArray(a)&&a.length>0?a:[{}]}return{get:i=>n[i],getRecord:(i,a=0)=>n[i]?.[a]??{},setField:(i,a,s,o=0)=>{const c=n[i]??(n[i]=[{}]),d=c[o]??(c[o]={});d[a]=s},refresh:()=>{}}}const Ff=r.forwardRef(function(n,i){const a=r.useRef(null);l.useRovingFocus(a,{orientation:"horizontal",wrap:!0,activateOnMove:!0}),Tn.injectStyleOnce(Uf,Hf);const{value:s,onChange:o,registry:c=co,entities:d,dataSourceOptions:p,onSave:m,onExport:h,height:u=560,tutorial:x,className:f,style:b,id:g,"data-testid":v}=n,{t:y}=l.useNiceTranslation(),[C,w]=r.useState(()=>s??zf()),E=s??C,[S,N]=r.useState(null),[_,k]=r.useState("design"),j=r.useCallback(F=>{o?o(F):w(F)},[o]),T=r.useMemo(()=>E.rows??[],[E.rows]),P=(E.dataSources??[]).map(F=>F.key),B=r.useMemo(()=>c.getActionNames(),[c]),I=r.useCallback(F=>{if(!F)return null;for(const H of T){const A=H.cells.find(Z=>Z.id===F);if(A)return{row:H,cell:A}}return null},[T])(S),D=F=>j({...E,rows:F}),M=(F,H)=>D(T.map(A=>({...A,cells:A.cells.map(Z=>Z.id===F?{...Z,...H}:Z)}))),O=()=>D([...T,{id:os("row"),cells:[]}]),L=F=>{const H={id:os("cell"),controlType:F,props:{label:F},colSpan:6},A=T.length>0?T.slice():[{id:os("row"),cells:[]}];A[A.length-1]={...A[A.length-1],cells:[...A[A.length-1].cells,H]},D(A),N(H.id)},V=F=>{D(T.map(H=>({...H,cells:H.cells.filter(A=>A.id!==F)}))),S===F&&N(null)},ee=(F,H)=>{const A=d?.find(Z=>Z.name===F);A&&(j(Qd(A,H)),N(null))},z=r.useMemo(()=>(d??[]).map(F=>F.name).filter(F=>!!F),[d]),U=r.useMemo(()=>oo(E),[E]),re=r.useMemo(()=>Bf(E),[E]),Y=r.useMemo(()=>{const F={};for(const H of E.dataSources??[]){const A=H.data;F[H.key]=Array.isArray(A)?A:[]}return F},[E]),oe=E.kind??E.meta?.kind??"form",q=F=>{nu(E,Y,F,{onExport:h})},se=e.jsxs("div",{className:"nice-view-editor__toolbar",children:[e.jsx("input",{className:"nice-view-editor__name",value:E.name,onChange:F=>j({...E,name:F.target.value}),placeholder:y("viewEditor.name","View name"),"aria-label":y("viewEditor.name","View name")}),e.jsx("select",{className:"nice-view-editor__kind",value:oe,onChange:F=>j({...E,kind:F.target.value}),"aria-label":y("viewEditor.kindAria","View kind"),children:$f.map(F=>e.jsx("option",{value:F.value,children:y("viewEditor.kind."+F.value,F.label)},F.value))}),d&&d.length>0&&e.jsxs("select",{className:"nice-view-editor__from-entity",value:"",onChange:F=>{const[H,A]=F.target.value.split("::");H&&ee(H,A)},"aria-label":y("viewEditor.fromEntityAria","New view from entity"),children:[e.jsx("option",{value:"",children:y("viewEditor.fromEntity","New from entity…")}),d.map(F=>["form","detail","grid"].map(H=>e.jsxs("option",{value:`${F.name}::${H}`,children:[F.name," · ",H]},`${F.name}-${H}`)))]}),Mf.has(oe)&&e.jsxs("select",{className:"nice-view-editor__export",value:"",onChange:F=>{const H=F.target.value;H&&q(H)},"aria-label":y("viewEditor.exportAria","Export view"),children:[e.jsx("option",{value:"",children:y("viewEditor.export","Export…")}),Of.map(F=>e.jsx("option",{value:F,children:F.toUpperCase()},F))]}),e.jsx("span",{className:"nice-view-editor__spacer"}),e.jsx("div",{className:"nice-view-editor__modes",ref:a,role:"tablist",children:["design","preview","source"].map(F=>e.jsx("button",{type:"button",role:"tab","aria-selected":_===F,className:"nice-view-editor__mode"+(_===F?" nice-view-editor__mode--active":""),onClick:()=>k(F),children:y("viewEditor.mode."+F,F[0].toUpperCase()+F.slice(1))},F))}),e.jsxs("span",{className:"nice-view-editor__status"+(U.length?" nice-view-editor__status--err":""),title:U.join(`
1293
1293
  `),children:[e.jsx(l.NiceIcon,{name:U.length===0?"check":"warning",size:14})," ",U.length===0?y("viewEditor.valid","Valid"):U.length]}),m&&e.jsx("button",{type:"button",className:"nice-view-editor__save",onClick:()=>m(E),disabled:U.length>0,children:y("viewEditor.save","Save")}),e.jsx(l.NiceTutorialButton,{steps:l.resolveTutorial(x,Df)})]}),ce=e.jsxs("div",{className:"nice-view-editor__palette",children:[Pf.map(F=>e.jsxs("div",{className:"nice-view-editor__pal-group",children:[e.jsx("div",{className:"nice-view-editor__pal-cat",children:y("viewEditor.cat."+F.category,F.category)}),F.items.map(H=>{const A=y("viewEditor.pal."+H.type,H.label);return e.jsx("button",{type:"button",className:"nice-view-editor__pal-item",onClick:()=>L(H.type),title:`${y("viewEditor.add","Add")} ${A}`,children:A},H.type)})]},F.category)),e.jsxs("button",{type:"button",className:"nice-view-editor__add-row",onClick:O,children:["+ ",y("viewEditor.addRow","Add row")]})]}),le=e.jsxs("div",{className:"nice-view-editor__canvas",children:[T.length===0&&e.jsx("div",{className:"nice-view-editor__canvas-empty",children:y("viewEditor.canvasEmpty","Add a row, then drop controls from the palette — or start “New from entity”.")}),T.map(F=>e.jsxs("div",{className:"nice-view-editor__row",style:{gridTemplateColumns:`repeat(${E.columns??12}, 1fr)`},children:[F.cells.map(H=>e.jsxs("button",{type:"button",className:"nice-view-editor__cell"+(H.id===S?" nice-view-editor__cell--sel":""),style:{gridColumn:`span ${H.colSpan??6}`},onClick:()=>N(H.id),onKeyDown:A=>{A.key==="Delete"&&(A.preventDefault(),V(H.id))},children:[e.jsx("span",{className:"nice-view-editor__cell-type",children:H.controlType}),H.bindings?.value?.field&&e.jsxs("span",{className:"nice-view-editor__cell-field",children:[e.jsx(l.NiceIcon,{name:"link",size:12})," ",H.bindings.value.field]}),e.jsx("span",{className:"nice-view-editor__cell-x",role:"button",tabIndex:-1,"aria-label":y("viewEditor.removeCell","Remove cell"),onClick:A=>{A.stopPropagation(),V(H.id)},onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),A.stopPropagation(),V(H.id))},children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},H.id)),F.cells.length===0&&e.jsx("span",{className:"nice-view-editor__row-empty",children:y("viewEditor.emptyRow","empty row")})]},F.id))]}),J=I?e.jsx(qf,{cell:I.cell,dsKeys:P,handlerNames:B,onPatch:F=>M(I.cell.id,F)}):e.jsx(Vf,{dataSources:E.dataSources??[],onChange:F=>j({...E,dataSources:F}),queryOptions:p,entityNames:z}),me="nice-view-editor"+(f?` ${f}`:""),je=_==="design",ue=_==="source"?e.jsx("pre",{className:"nice-view-editor__source",children:Yd(E)}):_==="preview"?e.jsx("div",{className:"nice-view-editor__preview",children:e.jsx(tu,{view:E,registry:c,dataStore:re})}):le;return e.jsx(_t.NiceAppShell,{ref:i,id:g,className:me,style:{height:u,...b},"data-testid":v,flush:!0,toolbar:se,sidebar:je?ce:void 0,rightSidebar:je?e.jsx("div",{className:"nice-view-editor__props",children:J}):void 0,children:ue})});function qf({cell:t,dsKeys:n,handlerNames:i,onPatch:a}){const{t:s}=l.useNiceTranslation(),o=t.bindings?.value,c=u=>{const x={source:"",field:"",...o,...u};a({bindings:{...t.bindings,value:x}})},d=t.events??[],p=u=>a({events:u}),m=t.permissions??[],h=u=>a({permissions:u});return e.jsxs("div",{className:"nice-view-editor__panel",children:[e.jsxs("div",{className:"nice-view-editor__panel-title",children:[s("viewEditor.control","Control")," · ",t.controlType]}),e.jsx("label",{className:"nice-view-editor__lbl",children:s("viewEditor.cp.label","Label")}),e.jsx("input",{className:"nice-view-editor__in",value:t.props.label??"",onChange:u=>a({props:{...t.props,label:u.target.value}})}),e.jsx("label",{className:"nice-view-editor__lbl",children:s("viewEditor.cp.colSpan","Column span")}),e.jsx("input",{className:"nice-view-editor__in",type:"number",min:1,max:12,value:t.colSpan??6,onChange:u=>a({colSpan:Number(u.target.value)||6})}),e.jsx("div",{className:"nice-view-editor__panel-sub",children:s("viewEditor.cp.binding","Binding")}),e.jsx("label",{className:"nice-view-editor__lbl",children:s("viewEditor.cp.dataSource","Data source")}),e.jsxs("select",{className:"nice-view-editor__in",value:o?.source??"",onChange:u=>c({source:u.target.value}),children:[e.jsx("option",{value:"",children:s("viewEditor.cp.none","— none —")}),n.map(u=>e.jsx("option",{value:u,children:u},u))]}),e.jsx("label",{className:"nice-view-editor__lbl",children:s("viewEditor.cp.field","Field")}),e.jsx("input",{className:"nice-view-editor__in",value:o?.field??"",onChange:u=>c({field:u.target.value}),placeholder:s("viewEditor.cp.fieldPath","field path")}),e.jsxs("label",{className:"nice-view-editor__chk",children:[e.jsx("input",{type:"checkbox",checked:!!o?.twoWay,onChange:u=>c({twoWay:u.target.checked})}),s("viewEditor.cp.twoWay","Two-way")]}),e.jsx("div",{className:"nice-view-editor__panel-sub",children:s("viewEditor.cp.permissions","Permissions")}),m.map((u,x)=>e.jsxs("div",{className:"nice-view-editor__perm",children:[e.jsx("input",{className:"nice-view-editor__in",value:u.role,placeholder:s("viewEditor.cp.role","role"),onChange:f=>h(m.map((b,g)=>g===x?{...b,role:f.target.value}:b))}),e.jsx("select",{className:"nice-view-editor__in",value:u.access,onChange:f=>h(m.map((b,g)=>g===x?{...b,access:f.target.value}:b)),children:Rf.map(f=>e.jsx("option",{value:f,children:f},f))}),e.jsx("button",{type:"button",onClick:()=>h(m.filter((f,b)=>b!==x)),"aria-label":s("viewEditor.remove","Remove"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},x)),e.jsxs("button",{type:"button",className:"nice-view-editor__mini-add",onClick:()=>h([...m,{role:"*",access:"editable"}]),children:["+ ",s("viewEditor.cp.addPermission","Permission")]}),e.jsx("div",{className:"nice-view-editor__panel-sub",children:s("viewEditor.cp.events","Events")}),d.map((u,x)=>e.jsxs("div",{className:"nice-view-editor__event",children:[e.jsx("input",{className:"nice-view-editor__in",value:u.event,placeholder:s("viewEditor.cp.eventPlaceholder","event (onClick / onValueChange…)"),onChange:f=>p(d.map((b,g)=>g===x?{...b,event:f.target.value}:b))}),e.jsx(Xd,{value:u.actions,handlers:i,dataSources:n,onChange:f=>p(d.map((b,g)=>g===x?{...b,actions:f}:b))}),e.jsx("button",{type:"button",className:"nice-view-editor__mini-remove",onClick:()=>p(d.filter((f,b)=>b!==x)),children:s("viewEditor.cp.removeEvent","Remove event")})]},x)),e.jsxs("button",{type:"button",className:"nice-view-editor__mini-add",onClick:()=>p([...d,{event:"onClick",actions:[]}]),children:["+ ",s("viewEditor.cp.addEvent","Event")]})]})}function Vf({dataSources:t,onChange:n,queryOptions:i,entityNames:a}){const{t:s}=l.useNiceTranslation(),o=(d,p)=>n(t.map((m,h)=>h===d?{...m,...p}:m)),c=(d,p)=>d.type==="query"&&i&&i.length>0?e.jsxs("select",{className:"nice-view-editor__in",value:d.ref??"","aria-label":s("viewEditor.ds.ref","Module data source"),onChange:m=>o(p,{ref:m.target.value||void 0}),children:[e.jsx("option",{value:"",children:s("viewEditor.ds.refPick","Pick a data source…")}),i.map(m=>e.jsx("option",{value:m.key,children:m.label??m.key},m.key))]}):d.type==="query"?e.jsx("input",{className:"nice-view-editor__in",value:d.ref??"",placeholder:s("viewEditor.ds.ref","Module data source"),onChange:m=>o(p,{ref:m.target.value||void 0})}):d.type==="entity"&&a.length>0?e.jsxs("select",{className:"nice-view-editor__in",value:d.entity??"","aria-label":s("viewEditor.ds.entity","Entity"),onChange:m=>o(p,{entity:m.target.value||void 0}),children:[e.jsx("option",{value:"",children:s("viewEditor.ds.entityPick","Pick an entity…")}),a.map(m=>e.jsx("option",{value:m,children:m},m))]}):d.type==="entity"?e.jsx("input",{className:"nice-view-editor__in",value:d.entity??"",placeholder:s("viewEditor.ds.entity","Entity"),onChange:m=>o(p,{entity:m.target.value||void 0})}):e.jsx("input",{className:"nice-view-editor__in",value:d.endpoint??"",placeholder:s("viewEditor.ds.endpoint","endpoint"),onChange:m=>o(p,{endpoint:m.target.value})});return e.jsxs("div",{className:"nice-view-editor__panel",children:[e.jsx("div",{className:"nice-view-editor__panel-title",children:s("viewEditor.ds.title","Data sources")}),e.jsx("div",{className:"nice-view-editor__hint",children:s("viewEditor.ds.hint","Select a control to edit its props, binding & events.")}),t.map((d,p)=>e.jsxs("div",{className:"nice-view-editor__ds",children:[e.jsx("input",{className:"nice-view-editor__in",value:d.key,placeholder:s("viewEditor.ds.key","key"),onChange:m=>o(p,{key:m.target.value})}),e.jsx("select",{className:"nice-view-editor__in",value:d.type,onChange:m=>o(p,{type:m.target.value}),children:Af.map(m=>e.jsx("option",{value:m,children:m},m))}),c(d,p),e.jsxs("label",{className:"nice-view-editor__chk",children:[e.jsx("input",{type:"checkbox",checked:!!d.autoLoad,onChange:m=>o(p,{autoLoad:m.target.checked})}),s("viewEditor.ds.autoLoad","auto-load")]}),e.jsx("button",{type:"button",onClick:()=>n(t.filter((m,h)=>h!==p)),"aria-label":s("viewEditor.remove","Remove"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},p)),e.jsxs("button",{type:"button",className:"nice-view-editor__mini-add",onClick:()=>n([...t,{key:`ds${t.length+1}`,type:"rest",autoLoad:!0}]),children:["+ ",s("viewEditor.ds.add","Data source")]})]})}const Uf="nice-view-editor-styles",Hf=`
1294
1294
  .nice-view-editor { display: flex; flex-direction: column; border: 1px solid var(--nice-border-color, #e5e7eb); border-radius: 8px; overflow: hidden; background: var(--nice-bg-primary, #fff); color: var(--nice-text-primary, #111827); }
1295
1295
  .nice-view-editor__toolbar { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--nice-border-color, #e5e7eb); flex-wrap: wrap; }
@@ -5118,4 +5118,4 @@ ${Pe.text}
5118
5118
 
5119
5119
  `:"")+T.content),E(!1)},j=nc(t);return e.jsxs("div",{className:"nice-helpdesk-detail",children:[b.element,e.jsxs("div",{className:"nice-helpdesk-detail-header",children:[e.jsxs("button",{className:"nice-helpdesk-back-btn",onClick:()=>h("list"),children:[e.jsx(l.NiceIcon,{name:"arrow-left",size:14})," ",m("helpdesk.back","Back")]}),e.jsxs("div",{className:"nice-helpdesk-detail-title",children:[e.jsxs("span",{className:"nice-helpdesk-ticket-number",children:["#",t.number]}),e.jsx("h2",{children:t.subject})]}),e.jsxs("div",{className:"nice-helpdesk-detail-actions",children:[t.status!=="closed"&&o&&e.jsxs("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--danger",onClick:()=>{const T=t.id;b.prompt({title:m("helpdesk.escalationReasonPrompt","Escalation reason")}).then(P=>{P&&o(T,P)})},children:[e.jsx(l.NiceIcon,{name:"zap",size:14})," ",m("helpdesk.escalate","Escalate")]}),c&&e.jsxs("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--secondary",children:[e.jsx(l.NiceIcon,{name:"link",size:14})," ",m("helpdesk.merge","Merge")]})]})]}),j!=="ok"&&e.jsxs("div",{className:`nice-helpdesk-sla-banner nice-helpdesk-sla-banner--${j}`,children:[e.jsx("span",{className:"nice-helpdesk-sla-banner-icon",children:e.jsx(l.NiceIcon,{name:j==="warning"?"warning":"bell",size:16})}),e.jsxs("span",{children:[j==="breached"?m("helpdesk.slaBreached2","SLA Breached!"):m("helpdesk.slaAtRisk2","SLA at risk -")," ",t.slaBreach?.timeToResolution!==void 0&&e.jsx("strong",{children:t.slaBreach.timeToResolution<0?m("helpdesk.overdueBy","Overdue by {duration}").replace("{duration}",String(Ai(Math.abs(t.slaBreach.timeToResolution)))):m("helpdesk.remaining","{duration} remaining").replace("{duration}",String(Ai(t.slaBreach.timeToResolution)))})]})]}),e.jsxs("div",{className:"nice-helpdesk-detail-content",children:[e.jsxs("div",{className:"nice-helpdesk-conversation",children:[e.jsxs("div",{className:"nice-helpdesk-message nice-helpdesk-message--original",children:[e.jsxs("div",{className:"nice-helpdesk-message-header",children:[e.jsxs("div",{className:"nice-helpdesk-message-author",children:[t.requester.avatar?e.jsx("img",{src:t.requester.avatar,alt:t.requester.name,className:"nice-helpdesk-avatar"}):e.jsx("div",{className:"nice-helpdesk-avatar nice-helpdesk-avatar--placeholder",children:t.requester.name[0]}),e.jsxs("div",{children:[e.jsx("div",{className:"nice-helpdesk-message-author-name",children:t.requester.name}),e.jsx("div",{className:"nice-helpdesk-message-author-email",children:t.requester.email})]})]}),e.jsxs("div",{className:"nice-helpdesk-message-meta",children:[e.jsxs("span",{className:"nice-helpdesk-channel-badge",children:[_m(t.channel)," ",t.channel]}),e.jsx("span",{className:"nice-helpdesk-message-time",children:ds(t.createdAt)})]})]}),e.jsx("div",{className:"nice-helpdesk-message-body",children:t.htmlDescription?e.jsx("div",{dangerouslySetInnerHTML:{__html:t.htmlDescription}}):e.jsx("p",{children:t.description})}),t.attachments.length>0&&e.jsx("div",{className:"nice-helpdesk-attachments",children:t.attachments.map(T=>e.jsxs("a",{href:T.url,className:"nice-helpdesk-attachment",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(l.NiceIcon,{name:"paperclip",size:14})," ",T.filename]},T.id))})]}),t.comments.map(T=>e.jsxs("div",{className:`nice-helpdesk-message ${T.isInternal?"nice-helpdesk-message--internal":""}`,children:[T.isInternal&&e.jsxs("div",{className:"nice-helpdesk-internal-badge",children:[e.jsx(l.NiceIcon,{name:"lock",size:14})," ",m("helpdesk.internalNote","Internal Note")]}),e.jsxs("div",{className:"nice-helpdesk-message-header",children:[e.jsxs("div",{className:"nice-helpdesk-message-author",children:[T.author.avatar?e.jsx("img",{src:T.author.avatar,alt:T.author.name,className:"nice-helpdesk-avatar"}):e.jsx("div",{className:"nice-helpdesk-avatar nice-helpdesk-avatar--placeholder",children:T.author.name[0]}),e.jsxs("div",{children:[e.jsx("div",{className:"nice-helpdesk-message-author-name",children:T.author.name}),e.jsx("div",{className:"nice-helpdesk-message-author-role",children:T.author.role})]})]}),e.jsx("div",{className:"nice-helpdesk-message-time",children:ds(T.createdAt)})]}),e.jsx("div",{className:"nice-helpdesk-message-body",children:T.htmlContent?e.jsx("div",{dangerouslySetInnerHTML:{__html:T.htmlContent}}):e.jsx("p",{children:T.content})}),T.attachments&&T.attachments.length>0&&e.jsx("div",{className:"nice-helpdesk-attachments",children:T.attachments.map(P=>e.jsxs("a",{href:P.url,className:"nice-helpdesk-attachment",target:"_blank",rel:"noopener noreferrer",children:[e.jsx(l.NiceIcon,{name:"paperclip",size:14})," ",P.filename]},P.id))})]},T.id)),t.status!=="closed"&&n&&e.jsxs("div",{className:"nice-helpdesk-reply-box",children:[e.jsxs("div",{className:"nice-helpdesk-reply-header",children:[e.jsxs("div",{className:"nice-helpdesk-reply-tabs",children:[e.jsxs("button",{className:`nice-helpdesk-reply-tab ${y?"":"nice-helpdesk-reply-tab--active"}`,onClick:()=>C(!1),children:[e.jsx(l.NiceIcon,{name:"reply",size:14})," ",m("helpdesk.reply","Reply")]}),e.jsxs("button",{className:`nice-helpdesk-reply-tab ${y?"nice-helpdesk-reply-tab--active":""}`,onClick:()=>C(!0),children:[e.jsx(l.NiceIcon,{name:"lock",size:14})," ",m("helpdesk.internalNote","Internal Note")]})]}),p&&p.length>0&&e.jsxs("div",{className:"nice-helpdesk-canned-dropdown",children:[e.jsxs("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--text",onClick:()=>E(!w),children:[e.jsx(l.NiceIcon,{name:"edit",size:14})," ",m("helpdesk.cannedResponses","Canned Responses")]}),w&&e.jsx("div",{className:"nice-helpdesk-canned-list",children:p.map(T=>e.jsxs("button",{className:"nice-helpdesk-canned-item",onClick:()=>k(T),children:[e.jsx("strong",{children:T.title}),e.jsxs("span",{children:[T.content.substring(0,80),"..."]})]},T.id))})]})]}),e.jsx("textarea",{className:"nice-helpdesk-reply-textarea",placeholder:y?m("helpdesk.addInternalNote","Add an internal note..."):m("helpdesk.typeReply","Type your reply..."),value:g,onChange:T=>v(T.target.value),rows:5}),e.jsxs("div",{className:"nice-helpdesk-reply-footer",children:[e.jsxs("div",{className:"nice-helpdesk-reply-actions",children:[e.jsx("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--icon",title:m("helpdesk.attachFile","Attach file"),"aria-label":m("helpdesk.attachFile","Attach file"),children:e.jsx(l.NiceIcon,{name:"paperclip",size:16})}),e.jsx("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--icon",title:m("helpdesk.insertLink","Insert link"),"aria-label":m("helpdesk.insertLink","Insert link"),children:e.jsx(l.NiceIcon,{name:"link",size:16})})]}),e.jsx("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--primary",onClick:_,disabled:!g.trim()||S,children:S?m("helpdesk.sending","Sending..."):y?m("helpdesk.addNote","Add Note"):m("helpdesk.sendReply","Send Reply")})]})]})]}),e.jsxs("div",{className:"nice-helpdesk-properties",children:[e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.status","Status")}),e.jsxs("select",{value:t.status,onChange:T=>a?.(t.id,T.target.value),className:"nice-helpdesk-property-select",disabled:!a,children:[e.jsx("option",{value:"new",children:m("helpdesk.statusNew","New")}),e.jsx("option",{value:"open",children:m("helpdesk.statusOpen","Open")}),e.jsx("option",{value:"pending",children:m("helpdesk.statusPending","Pending")}),e.jsx("option",{value:"on-hold",children:m("helpdesk.statusOnHold","On Hold")}),e.jsx("option",{value:"resolved",children:m("helpdesk.statusResolved","Resolved")}),e.jsx("option",{value:"closed",children:m("helpdesk.statusClosed","Closed")})]})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.priority","Priority")}),e.jsxs("select",{value:t.priority,onChange:T=>s?.(t.id,T.target.value),className:"nice-helpdesk-property-select",disabled:!s,style:{borderLeftColor:Nm(t.priority)},children:[e.jsx("option",{value:"low",children:m("helpdesk.priorityLow","Low")}),e.jsx("option",{value:"medium",children:m("helpdesk.priorityMedium","Medium")}),e.jsx("option",{value:"high",children:m("helpdesk.priorityHigh","High")}),e.jsx("option",{value:"urgent",children:m("helpdesk.priorityUrgent","Urgent")}),e.jsx("option",{value:"critical",children:m("helpdesk.priorityCritical","Critical")})]})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.assignee","Assignee")}),e.jsxs("select",{value:t.assignee?.id||"",onChange:T=>i?.(t.id,T.target.value||null),className:"nice-helpdesk-property-select",disabled:!i,children:[e.jsx("option",{value:"",children:m("helpdesk.unassigned","Unassigned")}),u.map(T=>e.jsx("option",{value:T.id,children:T.name},T.id))]})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.type","Type")}),e.jsxs("div",{className:"nice-helpdesk-property-value",children:[e.jsx(l.NiceIcon,{name:jm(t.type),size:14})," ",t.type]})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.category","Category")}),e.jsx("div",{className:"nice-helpdesk-property-value",children:t.category||m("helpdesk.none","None")})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.tags","Tags")}),e.jsxs("div",{className:"nice-helpdesk-tags",children:[t.tags.map(T=>e.jsx("span",{className:"nice-helpdesk-tag",children:T},T)),t.tags.length===0&&e.jsx("span",{className:"nice-helpdesk-no-tags",children:m("helpdesk.noTags","No tags")})]})]}),t.slaPolicy&&e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.slaPolicy","SLA Policy")}),e.jsxs("div",{className:"nice-helpdesk-sla-info",children:[e.jsx("div",{className:"nice-helpdesk-sla-policy-name",children:t.slaPolicy.name}),e.jsxs("div",{className:"nice-helpdesk-sla-times",children:[e.jsxs("div",{children:[m("helpdesk.firstResponse","First Response"),":"," ",Ai(t.slaPolicy.firstResponseTime)]}),e.jsxs("div",{children:[m("helpdesk.resolution","Resolution"),":"," ",Ai(t.slaPolicy.resolutionTime)]})]})]})]}),e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.activity","Activity")}),e.jsx("div",{className:"nice-helpdesk-activity-list",children:t.activities.slice(0,5).map(T=>e.jsxs("div",{className:"nice-helpdesk-activity-item",children:[e.jsx("span",{className:"nice-helpdesk-activity-dot"}),e.jsxs("span",{className:"nice-helpdesk-activity-text",children:[T.actor.name," ",T.type.replace(/-/g," "),T.newValue&&` → ${T.newValue}`]}),e.jsx("span",{className:"nice-helpdesk-activity-time",children:ds(T.timestamp)})]},T.id))})]}),t.linkedTickets&&t.linkedTickets.length>0&&e.jsxs("div",{className:"nice-helpdesk-property-section",children:[e.jsx("h4",{children:m("helpdesk.linkedTickets","Linked Tickets")}),e.jsx("div",{className:"nice-helpdesk-linked-list",children:t.linkedTickets.map(T=>e.jsxs("div",{className:"nice-helpdesk-linked-item",children:[e.jsx("span",{className:"nice-helpdesk-linked-type",children:T.linkType}),e.jsxs("span",{className:"nice-helpdesk-linked-id",children:["#",T.id]}),e.jsx("span",{className:`nice-helpdesk-linked-status nice-helpdesk-linked-status--${T.status}`,children:T.status})]},T.id))})]})]})]})]})}function cT({onSubmit:t,customFields:n}){const{t:i}=l.useNiceTranslation(),{setView:a,categories:s,tags:o,currentUser:c}=gi(),[d,p]=r.useState(""),[m,h]=r.useState(""),[u,x]=r.useState("question"),[f,b]=r.useState("medium"),[g,v]=r.useState(""),[y,C]=r.useState([]),[w,E]=r.useState(!1),S=async N=>{if(N.preventDefault(),!(!d.trim()||!m.trim()||!t)){E(!0);try{await t({subject:d,description:m,type:u,priority:f,category:g||void 0,tags:y,requester:c,channel:"portal",status:"new"}),a("list")}finally{E(!1)}}};return e.jsxs("div",{className:"nice-helpdesk-create",children:[e.jsxs("div",{className:"nice-helpdesk-create-header",children:[e.jsxs("button",{className:"nice-helpdesk-back-btn",onClick:()=>a("list"),children:[e.jsx(l.NiceIcon,{name:"arrow-left",size:14})," ",i("helpdesk.back","Back")]}),e.jsx("h2",{children:i("helpdesk.createNewTicket","Create New Ticket")})]}),e.jsxs("form",{className:"nice-helpdesk-create-form",onSubmit:S,children:[e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsxs("label",{htmlFor:"hd-subject",children:[i("helpdesk.subject","Subject")," *"]}),e.jsx("input",{id:"hd-subject",type:"text",value:d,onChange:N=>p(N.target.value),placeholder:i("helpdesk.subjectPlaceholder","Brief description of your issue"),required:!0,className:"nice-helpdesk-input"})]}),e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsxs("label",{htmlFor:"hd-description",children:[i("helpdesk.description","Description")," *"]}),e.jsx("textarea",{id:"hd-description",value:m,onChange:N=>h(N.target.value),placeholder:i("helpdesk.descriptionPlaceholder","Please provide detailed information about your issue..."),required:!0,rows:8,className:"nice-helpdesk-textarea"})]}),e.jsxs("div",{className:"nice-helpdesk-form-grid",children:[e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsx("label",{htmlFor:"hd-type",children:i("helpdesk.type","Type")}),e.jsxs("select",{id:"hd-type",value:u,onChange:N=>x(N.target.value),className:"nice-helpdesk-select",children:[e.jsx("option",{value:"question",children:i("helpdesk.typeQuestion","Question")}),e.jsx("option",{value:"incident",children:i("helpdesk.typeIncident","Incident")}),e.jsx("option",{value:"problem",children:i("helpdesk.typeProblem","Problem")}),e.jsx("option",{value:"task",children:i("helpdesk.typeTask","Task")}),e.jsx("option",{value:"feature-request",children:i("helpdesk.typeFeatureRequest","Feature Request")}),e.jsx("option",{value:"bug",children:i("helpdesk.typeBugReport","Bug Report")})]})]}),e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsx("label",{htmlFor:"hd-priority",children:i("helpdesk.priority","Priority")}),e.jsxs("select",{id:"hd-priority",value:f,onChange:N=>b(N.target.value),className:"nice-helpdesk-select",children:[e.jsx("option",{value:"low",children:i("helpdesk.priorityLow","Low")}),e.jsx("option",{value:"medium",children:i("helpdesk.priorityMedium","Medium")}),e.jsx("option",{value:"high",children:i("helpdesk.priorityHigh","High")}),e.jsx("option",{value:"urgent",children:i("helpdesk.priorityUrgent","Urgent")}),e.jsx("option",{value:"critical",children:i("helpdesk.priorityCritical","Critical")})]})]}),e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsx("label",{htmlFor:"hd-category",children:i("helpdesk.category","Category")}),e.jsxs("select",{id:"hd-category",value:g,onChange:N=>v(N.target.value),className:"nice-helpdesk-select",children:[e.jsx("option",{value:"",children:i("helpdesk.selectCategory","Select category...")}),s.map(N=>e.jsx("option",{value:N,children:N},N))]})]})]}),e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsx("label",{children:i("helpdesk.tags","Tags")}),e.jsx("div",{className:"nice-helpdesk-tag-selector",children:o.map(N=>e.jsxs("label",{className:"nice-helpdesk-tag-option",children:[e.jsx("input",{type:"checkbox",checked:y.includes(N),onChange:_=>{_.target.checked?C([...y,N]):C(y.filter(k=>k!==N))}}),e.jsx("span",{children:N})]},N))})]}),e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsx("label",{children:i("helpdesk.attachments","Attachments")}),e.jsxs("div",{className:"nice-helpdesk-dropzone",children:[e.jsxs("div",{className:"nice-helpdesk-dropzone-content",children:[e.jsx("span",{className:"nice-helpdesk-dropzone-icon",children:e.jsx(l.NiceIcon,{name:"paperclip",size:16})}),e.jsx("span",{children:i("helpdesk.dropzoneHint","Drag files here or click to upload")})]}),e.jsx("input",{type:"file",multiple:!0,className:"nice-helpdesk-dropzone-input"})]})]}),n&&n.length>0&&e.jsxs("div",{className:"nice-helpdesk-custom-fields",children:[e.jsx("h4",{children:i("helpdesk.additionalInformation","Additional Information")}),n.map(N=>e.jsxs("div",{className:"nice-helpdesk-form-row",children:[e.jsxs("label",{htmlFor:`hd-custom-${N.id}`,children:[N.name," ",N.required&&"*"]}),N.type==="text"&&e.jsx("input",{type:"text",id:`hd-custom-${N.id}`,className:"nice-helpdesk-input",required:N.required}),N.type==="select"&&e.jsxs("select",{id:`hd-custom-${N.id}`,className:"nice-helpdesk-select",required:N.required,children:[e.jsx("option",{value:"",children:i("helpdesk.select","Select...")}),N.options?.map(_=>e.jsx("option",{value:_,children:_},_))]})]},N.id))]}),e.jsxs("div",{className:"nice-helpdesk-form-actions",children:[e.jsx("button",{type:"button",className:"nice-helpdesk-btn nice-helpdesk-btn--secondary",onClick:()=>a("list"),children:i("helpdesk.cancel","Cancel")}),e.jsx("button",{type:"submit",className:"nice-helpdesk-btn nice-helpdesk-btn--primary",disabled:!d.trim()||!m.trim()||w,children:w?i("helpdesk.creating","Creating..."):i("helpdesk.createTicket","Create Ticket")})]})]})]})}function lT({stats:t,agentMetrics:n}){const{t:i}=l.useNiceTranslation(),{currentUser:a,setView:s,setFilter:o}=gi(),c=n?.find(d=>d.agentId===a.id);return e.jsxs("div",{className:"nice-helpdesk-dashboard",children:[e.jsx("h2",{children:i("helpdesk.dashboard","Dashboard")}),e.jsxs("div",{className:"nice-helpdesk-stats-grid",children:[e.jsxs("div",{role:"button",tabIndex:0,onKeyDown:l.clickOnActivationKey,className:"nice-helpdesk-stat-card nice-helpdesk-stat-card--blue",onClick:()=>{o({status:["open","new"]}),s("list")},children:[e.jsx("div",{className:"nice-helpdesk-stat-value",children:t?.totalOpen??0}),e.jsx("div",{className:"nice-helpdesk-stat-label",children:i("helpdesk.openTickets","Open Tickets")})]}),e.jsxs("div",{role:"button",tabIndex:0,onKeyDown:l.clickOnActivationKey,className:"nice-helpdesk-stat-card nice-helpdesk-stat-card--yellow",onClick:()=>{o({status:["pending"]}),s("list")},children:[e.jsx("div",{className:"nice-helpdesk-stat-value",children:t?.totalPending??0}),e.jsx("div",{className:"nice-helpdesk-stat-label",children:i("helpdesk.statusPending","Pending")})]}),e.jsxs("div",{role:"button",tabIndex:0,onKeyDown:l.clickOnActivationKey,className:"nice-helpdesk-stat-card nice-helpdesk-stat-card--red",onClick:()=>{o({slaStatus:"breached"}),s("list")},children:[e.jsx("div",{className:"nice-helpdesk-stat-value",children:t?.slaBreaches??0}),e.jsx("div",{className:"nice-helpdesk-stat-label",children:i("helpdesk.slaBreaches","SLA Breaches")})]}),e.jsxs("div",{className:"nice-helpdesk-stat-card nice-helpdesk-stat-card--green",children:[e.jsx("div",{className:"nice-helpdesk-stat-value",children:t?.csatAverage?.toFixed(1)??"-"}),e.jsx("div",{className:"nice-helpdesk-stat-label",children:i("helpdesk.csatScore","CSAT Score")})]})]}),c&&e.jsxs("div",{className:"nice-helpdesk-section",children:[e.jsx("h3",{children:i("helpdesk.myPerformance","My Performance")}),e.jsxs("div",{className:"nice-helpdesk-metrics-grid",children:[e.jsxs("div",{className:"nice-helpdesk-metric",children:[e.jsx("div",{className:"nice-helpdesk-metric-value",children:c.openTickets}),e.jsx("div",{className:"nice-helpdesk-metric-label",children:i("helpdesk.myOpenTickets","My Open Tickets")})]}),e.jsxs("div",{className:"nice-helpdesk-metric",children:[e.jsx("div",{className:"nice-helpdesk-metric-value",children:c.resolvedToday}),e.jsx("div",{className:"nice-helpdesk-metric-label",children:i("helpdesk.resolvedToday","Resolved Today")})]}),e.jsxs("div",{className:"nice-helpdesk-metric",children:[e.jsx("div",{className:"nice-helpdesk-metric-value",children:Ai(c.avgResponseTime)}),e.jsx("div",{className:"nice-helpdesk-metric-label",children:i("helpdesk.avgResponseTime","Avg Response Time")})]}),e.jsxs("div",{className:"nice-helpdesk-metric",children:[e.jsxs("div",{className:"nice-helpdesk-metric-value",children:[c.slaCompliance.toFixed(0),"%"]}),e.jsx("div",{className:"nice-helpdesk-metric-label",children:i("helpdesk.slaCompliance","SLA Compliance")})]})]})]}),t?.ticketsByPriority&&e.jsxs("div",{className:"nice-helpdesk-section",children:[e.jsx("h3",{children:i("helpdesk.ticketsByPriority","Tickets by Priority")}),e.jsx("div",{className:"nice-helpdesk-priority-bars",children:["critical","urgent","high","medium","low"].map(d=>e.jsxs("div",{className:"nice-helpdesk-priority-bar",children:[e.jsx("div",{className:"nice-helpdesk-priority-bar-label",children:d}),e.jsx("div",{className:"nice-helpdesk-priority-bar-track",children:e.jsx("div",{className:"nice-helpdesk-priority-bar-fill",style:{width:`${Math.min(100,(t.ticketsByPriority[d]||0)/Math.max(1,t.totalOpen)*100)}%`,backgroundColor:Nm(d)}})}),e.jsx("div",{className:"nice-helpdesk-priority-bar-count",children:t.ticketsByPriority[d]||0})]},d))})]}),n&&n.length>0&&e.jsxs("div",{className:"nice-helpdesk-section",children:[e.jsx("h3",{children:i("helpdesk.teamPerformance","Team Performance")}),e.jsxs("table",{className:"nice-helpdesk-leaderboard",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:i("helpdesk.agent","Agent")}),e.jsx("th",{children:i("helpdesk.statusOpen","Open")}),e.jsx("th",{children:i("helpdesk.resolvedWeek","Resolved (Week)")}),e.jsx("th",{children:i("helpdesk.avgResponse","Avg Response")}),e.jsx("th",{children:i("helpdesk.csat","CSAT")})]})}),e.jsx("tbody",{children:n.sort((d,p)=>p.resolvedThisWeek-d.resolvedThisWeek).map(d=>e.jsxs("tr",{children:[e.jsx("td",{children:d.agentId}),e.jsx("td",{children:d.openTickets}),e.jsx("td",{children:d.resolvedThisWeek}),e.jsx("td",{children:Ai(d.avgResponseTime)}),e.jsxs("td",{children:[d.csatScore.toFixed(1)," ",e.jsx(l.NiceIcon,{name:"star",size:14})]})]},d.agentId))})]})]})]})}function dT({articles:t,onSearch:n}){const{t:i}=l.useNiceTranslation(),[a,s]=r.useState(""),[o,c]=r.useState([]),[d,p]=r.useState(!1),m=async()=>{if(!(!a.trim()||!n)){p(!0);try{const u=await n(a);c(u)}finally{p(!1)}}},h=a&&o.length>0?o:t;return e.jsxs("div",{className:"nice-helpdesk-kb",children:[e.jsx("h2",{children:i("helpdesk.knowledgeBase","Knowledge Base")}),e.jsxs("div",{className:"nice-helpdesk-kb-search",children:[e.jsx("input",{type:"text",placeholder:i("helpdesk.searchArticles","Search articles..."),value:a,onChange:u=>s(u.target.value),onKeyDown:u=>u.key==="Enter"&&m(),className:"nice-helpdesk-input"}),e.jsx("button",{className:"nice-helpdesk-btn nice-helpdesk-btn--primary",onClick:m,disabled:d,children:d?i("helpdesk.searching","Searching..."):i("helpdesk.search","Search")})]}),e.jsxs("div",{className:"nice-helpdesk-kb-articles",children:[h.map(u=>e.jsxs("a",{href:u.url,className:"nice-helpdesk-kb-article",target:"_blank",rel:"noopener noreferrer",children:[e.jsx("div",{className:"nice-helpdesk-kb-article-title",children:u.title}),e.jsx("div",{className:"nice-helpdesk-kb-article-excerpt",children:u.excerpt}),e.jsxs("div",{className:"nice-helpdesk-kb-article-meta",children:[e.jsx("span",{children:u.category}),e.jsxs("span",{children:[e.jsx(l.NiceIcon,{name:"eye",size:14})," ",u.views]}),e.jsxs("span",{children:[e.jsx(l.NiceIcon,{name:"check",size:14})," ",u.helpfulVotes]})]})]},u.id)),h.length===0&&e.jsxs("div",{className:"nice-helpdesk-empty",children:[e.jsx("div",{className:"nice-helpdesk-empty-icon",children:e.jsx(l.NiceIcon,{name:"book",size:16})}),e.jsx("div",{className:"nice-helpdesk-empty-title",children:i("helpdesk.noArticlesFound","No articles found")})]})]})]})}const uT=({tickets:t=eT,currentUser:n,agents:i=[],categories:a=[],tags:s=[],slaPolicies:o=[],cannedResponses:c=[],knowledgeBase:d=[],agentMetrics:p,stats:m,initialView:h="list",initialFilter:u={},showSidebar:x=!0,showDashboard:f=!0,showKnowledgeBase:b=!0,allowMerge:g=!0,enableCSAT:v=!0,customFields:y,realTimeUpdates:C=!1,onCreateTicket:w,onUpdateTicket:E,onDeleteTicket:S,onAddComment:N,onAssign:_,onChangeStatus:k,onChangePriority:j,onMergeTickets:T,onEscalate:P,onAddTags:B,onRemoveTag:R,onLinkTicket:I,onSubmitCSAT:D,onSearchKnowledgeBase:M,onUploadAttachment:O,onExportTickets:L,className:V,style:ee,"data-testid":z})=>{const{t:U}=l.useNiceTranslation(),[re,Y]=r.useState(h),[oe,q]=r.useState(u),[se,ce]=r.useState(null);r.useEffect(()=>{ce(me=>me&&(t.find(je=>je.id===me.id)??me))},[t]);const le=r.useMemo(()=>oe.assignee==="me"?{...oe,assignee:n.id}:oe,[oe,n.id]),J={currentUser:n,selectedTicket:se,setSelectedTicket:ce,view:re,setView:Y,filter:le,setFilter:q,cannedResponses:c,knowledgeBase:d,agents:i,categories:a,tags:s,slaPolicies:o};return e.jsx(ym.Provider,{value:J,children:e.jsxs("div",{className:`nice-helpdesk-root${V?" "+V:""}`,style:ee,"data-testid":z,children:[x&&e.jsx(iT,{stats:m}),e.jsxs("div",{className:"nice-helpdesk-main",children:[re==="list"&&e.jsx(rT,{tickets:t}),re==="detail"&&se&&e.jsx(oT,{ticket:se,onAddComment:N,onAssign:_,onChangeStatus:k,onChangePriority:j,onEscalate:P,onMerge:g?T:void 0,onAddTags:B,cannedResponses:c}),re==="create"&&e.jsx(cT,{onSubmit:w,customFields:y}),re==="dashboard"&&f&&e.jsx(lT,{stats:m,agentMetrics:p}),re==="knowledge-base"&&b&&e.jsx(dT,{articles:d,onSearch:M}),re==="settings"&&e.jsxs("div",{className:"nice-helpdesk-settings",children:[e.jsx("h2",{children:U("helpdesk.settings","Settings")}),e.jsx("p",{children:U("helpdesk.settingsComingSoon","Settings panel - coming soon")})]})]})]})})},wm=r.createContext(null);function Ia(){const t=r.useContext(wm);if(!t)throw new Error("usePresence must be used within NicePresenceProvider");return t}const pT=({children:t,dataSource:n,currentUserId:i,cursorDebounce:a=50})=>{const[s,o]=r.useState([]),c=r.useRef(null),d=r.useRef(null);r.useEffect(()=>{n.getUsers().then(o)},[n]),r.useEffect(()=>{const u=n.subscribe(x=>{o(f=>{switch(x.type){case"join":return f.find(b=>b.id===x.user.id)?f.map(b=>b.id===x.user.id?x.user:b):[...f,x.user];case"leave":return f.filter(b=>b.id!==x.user.id);case"update":case"cursor":case"focus":return f.map(b=>b.id===x.user.id?{...b,...x.user}:b);default:return f}})});return()=>u()},[n]);const p=r.useCallback(u=>{d.current=u,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{d.current&&n.broadcastCursor?.(d.current)},a)},[n,a]),m=r.useCallback(u=>{n.broadcastFocus?.(u)},[n]),h=r.useCallback(u=>{n.updatePresence?.({status:u})},[n]);return e.jsx(wm.Provider,{value:{users:s,currentUserId:i,updateCursor:p,updateFocus:m,updateStatus:h},children:t})},mT={sm:24,md:32,lg:40},hT=Object.assign(r.forwardRef(({max:t=5,size:n="md",showStatus:i=!0,filterUsers:a,onClick:s,overflowRender:o,className:c="",style:d,"data-testid":p},m)=>{const{users:h}=Ia(),u=a?h.filter(a):h,x=u.slice(0,t),f=u.length-t,b=mT[n];return e.jsxs("div",{ref:m,className:`nice-presence-avatars nice-presence-avatars--${n} ${c}`,style:d,"data-testid":p,children:[x.map((g,v)=>e.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,onKeyDown:s?l.clickOnActivationKey:void 0,className:"nice-presence-avatar",style:{zIndex:x.length-v,width:b,height:b,marginLeft:v>0?-b/4:0,borderColor:g.color||"var(--nice-color-primary, #3b82f6)"},title:g.name,onClick:()=>s?.(g),children:[g.avatar?e.jsx("img",{src:g.avatar,alt:g.name,className:"nice-presence-avatar-img"}):e.jsx("span",{className:"nice-presence-avatar-initials",children:g.name.split(" ").map(y=>y[0]).join("").slice(0,2).toUpperCase()}),i&&g.status&&e.jsx("span",{className:`nice-presence-avatar-status nice-presence-avatar-status--${g.status}`})]},g.id)),f>0&&e.jsx("div",{className:"nice-presence-avatar nice-presence-avatar--overflow",style:{width:b,height:b,marginLeft:-b/4},children:o?o(f):`+${f}`})]})}),{displayName:"NicePresenceAvatars"}),gT=Object.assign(r.forwardRef(({containerRef:t,showLabel:n=!0,labelFadeDelay:i=2e3,filterUsers:a,className:s="",style:o,"data-testid":c},d)=>{const{users:p,currentUserId:m}=Ia(),[h,u]=r.useState(new Set),x=r.useRef(new Map);r.useEffect(()=>{const b=x.current;return p.forEach(g=>{if(g.cursor&&g.id!==m){u(C=>new Set([...C,g.id]));const v=b.get(g.id);v&&clearTimeout(v);const y=setTimeout(()=>{u(C=>{const w=new Set(C);return w.delete(g.id),w})},i);b.set(g.id,y)}}),()=>{b.forEach(g=>clearTimeout(g))}},[p,m,i]);const f=p.filter(b=>b.id!==m&&b.cursor).filter(b=>!a||a(b));return e.jsx("div",{ref:d,className:`nice-presence-cursors ${s}`,style:o,"data-testid":c,children:f.map(b=>e.jsxs("div",{className:"nice-presence-cursor",style:{left:b.cursor.x,top:b.cursor.y,"--cursor-color":b.color||"var(--nice-color-primary, #3b82f6)"},children:[e.jsx("svg",{className:"nice-presence-cursor-icon",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M5.5 3.21V20.8c0 .45.54.67.85.35l4.86-4.86a.5.5 0 0 1 .35-.15h6.44c.45 0 .67-.54.35-.85L6.35 3.21a.5.5 0 0 0-.85.35z"})}),n&&e.jsx("span",{className:`nice-presence-cursor-label ${h.has(b.id)?"nice-presence-cursor-label--visible":""}`,children:b.name})]},b.id))})}),{displayName:"NicePresenceCursors"}),bT=Object.assign(r.forwardRef(({fieldId:t,position:n="top",showAvatars:i=!0,className:a="",style:s,"data-testid":o},c)=>{const{t:d}=l.useNiceTranslation(),{users:p,currentUserId:m}=Ia(),h=p.filter(u=>u.id!==m&&u.focusedOn===t);return h.length===0?null:e.jsx("div",{ref:c,className:`nice-presence-focus nice-presence-focus--${n} ${a}`,style:s,"data-testid":o,children:i?e.jsx("div",{className:"nice-presence-focus-avatars",children:h.slice(0,3).map(u=>e.jsx("div",{className:"nice-presence-focus-avatar",style:{borderColor:u.color},title:d("presence.isEditing","{name} is editing").replace("{name}",String(u.name)),children:u.avatar?e.jsx("img",{src:u.avatar,alt:u.name}):e.jsx("span",{children:u.name[0]})},u.id))}):e.jsx("span",{className:"nice-presence-focus-count",children:d("presence.editing","{focusedUsers} editing").replace("{focusedUsers}",String(h.length))})})}),{displayName:"NicePresenceFocus"}),fT=Object.assign(r.forwardRef(({showFocus:t=!0,showLastSeen:n=!0,groupByStatus:i=!1,onUserClick:a,className:s="",style:o,"data-testid":c},d)=>{const{t:p,lang:m}=l.useNiceTranslation(),{users:h,currentUserId:u}=Ia(),x=h.filter(v=>v.id!==u),f=v=>{if(!v)return"";const C=new Date().getTime()-v.getTime(),w=Math.floor(C/6e4);if(w<1)return p("presence.justNow","Just now");const E=new Intl.RelativeTimeFormat(m,{style:"narrow"});return w<60?E.format(-w,"minute"):w<1440?E.format(-Math.floor(w/60),"hour"):E.format(-Math.floor(w/1440),"day")},b=({user:v})=>{const y=l.useAccessibleClick({onClick:()=>a?.(v)});return e.jsxs("div",{className:"nice-presence-list-item","aria-label":p("presence.user","User {name}").replace("{name}",String(v.name)),...y,children:[e.jsxs("div",{className:"nice-presence-list-avatar",style:{borderColor:v.color},children:[v.avatar?e.jsx("img",{src:v.avatar,alt:v.name}):e.jsx("span",{children:v.name.split(" ").map(C=>C[0]).join("").slice(0,2)}),e.jsx("span",{className:`nice-presence-list-status nice-presence-list-status--${v.status||"online"}`})]}),e.jsxs("div",{className:"nice-presence-list-info",children:[e.jsx("span",{className:"nice-presence-list-name",children:v.name}),t&&v.focusedOn&&e.jsx("span",{className:"nice-presence-list-focus",children:p("presence.editing2","Editing: {focusedOn}").replace("{focusedOn}",String(v.focusedOn))}),n&&v.lastSeen&&e.jsx("span",{className:"nice-presence-list-lastseen",children:f(v.lastSeen)})]})]},v.id)},g=v=>e.jsx(b,{user:v},v.id);if(i){const v={online:x.filter(y=>y.status==="online"||!y.status),away:x.filter(y=>y.status==="away"),busy:x.filter(y=>y.status==="busy"),offline:x.filter(y=>y.status==="offline")};return e.jsxs("div",{ref:d,className:`nice-presence-list ${s}`,style:o,"data-testid":c,children:[v.online.length>0&&e.jsxs("div",{className:"nice-presence-list-group",children:[e.jsx("div",{className:"nice-presence-list-group-header",children:p("presence.online","Online ({online})").replace("{online}",String(v.online.length))}),v.online.map(g)]}),v.away.length>0&&e.jsxs("div",{className:"nice-presence-list-group",children:[e.jsx("div",{className:"nice-presence-list-group-header",children:p("presence.away","Away ({away})").replace("{away}",String(v.away.length))}),v.away.map(g)]}),v.busy.length>0&&e.jsxs("div",{className:"nice-presence-list-group",children:[e.jsx("div",{className:"nice-presence-list-group-header",children:p("presence.busy","Busy ({busy})").replace("{busy}",String(v.busy.length))}),v.busy.map(g)]})]})}return e.jsx("div",{ref:d,className:`nice-presence-list ${s}`,style:o,"data-testid":c,children:x.map(g)})}),{displayName:"NicePresenceList"});function vT({status:t}){if(!t)return null;const n={stable:{bg:"var(--nice-success-tint-15, rgba(16, 185, 129, 0.15))",text:"var(--nice-color-success, #10b981)"},beta:{bg:"var(--nice-warning-tint-15, rgba(245, 158, 11, 0.15))",text:"var(--nice-color-warning, #f59e0b)"},experimental:{bg:"var(--nice-accent-tint-15, rgba(139, 92, 246, 0.15))",text:"var(--nice-color-accent, #8b5cf6)"},deprecated:{bg:"var(--nice-danger-tint-15, rgba(239, 68, 68, 0.15))",text:"var(--nice-color-error, #ef4444)"}},i=n[t]||n.stable;return e.jsx("span",{className:"nice-doc-status-badge",style:{display:"inline-block",padding:"2px 8px",borderRadius:4,fontSize:11,fontWeight:600,textTransform:"uppercase",background:i.bg,color:i.text},children:t})}function xT({type:t,required:n}){const{t:i}=l.useNiceTranslation();return e.jsxs("span",{className:"nice-doc-type-badge",style:{display:"inline-flex",gap:4,alignItems:"center"},children:[e.jsx("code",{style:{padding:"2px 6px",borderRadius:4,fontSize:12,fontFamily:"ui-monospace, monospace",background:"var(--nice-bg-secondary, #1a1a1a)",color:"var(--nice-color-primary, #6c5ce7)"},children:t}),n&&e.jsx("span",{style:{color:"var(--nice-color-error, #ef4444)",fontSize:11,fontWeight:600},children:i("documentationViewer.required","required")})]})}function Ki({code:t,language:n="tsx"}){const{t:i}=l.useNiceTranslation(),[a,s]=r.useState(!1),o=r.useCallback(()=>{navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)},[t]);return e.jsxs("div",{className:"nice-doc-code-block",style:{position:"relative"},children:[e.jsx("button",{onClick:o,style:{position:"absolute",top:8,right:8,padding:"4px 8px",border:"none",borderRadius:4,background:"var(--nice-bg-secondary, #2a2a2a)",color:"var(--nice-text-secondary, #888)",cursor:"pointer",fontSize:11},children:a?e.jsxs(e.Fragment,{children:[e.jsx(l.NiceIcon,{name:"check",size:12})," ",i("documentationViewer.copied","Copied")]}):i("documentationViewer.copy","Copy")}),e.jsx("pre",{style:{margin:0,padding:16,borderRadius:8,background:"var(--nice-bg-secondary, #0d0d0d)",border:"1px solid var(--nice-border-color, #2a2a2a)",overflow:"auto",fontSize:13,lineHeight:1.5,fontFamily:"ui-monospace, monospace"},children:e.jsx("code",{className:`language-${n}`,children:t})})]})}function Sn({text:t}){const n=t.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/`(.*?)`/g,'<code style="background:var(--nice-bg-secondary);padding: var(--nice-space-px, 1px) var(--nice-space-1, 4px);border-radius:var(--nice-radius-sm, 3px);font-size:0.9em">$1</code>').replace(/\[(.*?)\]\((.*?)\)/g,'<a href="$2" target="_blank" rel="noopener" style="color:var(--nice-color-primary)">$1</a>');return e.jsx("span",{dangerouslySetInnerHTML:{__html:n}})}function yT({doc:t}){const{t:n}=l.useNiceTranslation();return e.jsxs("div",{className:"nice-doc-section nice-doc-overview",children:[e.jsxs("div",{style:{padding:20,borderRadius:12,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)",marginBottom:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[e.jsx("h2",{style:{margin:0,fontSize:24,fontWeight:700},children:t.displayName||t.name}),e.jsx(vT,{status:t.status})]}),e.jsx("p",{style:{margin:"0 0 16px",color:"var(--nice-text-secondary, #888)",lineHeight:1.6},children:e.jsx(Sn,{text:t.description})}),t.tags&&t.tags.length>0&&e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:t.tags.map(i=>e.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:11,background:"var(--nice-bg-tertiary, #1a1a1a)",color:"var(--nice-text-muted, #666)"},children:["#",i]},i))})]}),t.import&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.import","Import")}),e.jsx(Ki,{code:`import { ${(t.import.named??[t.name]).join(", ")} } from '${t.import.from}';${t.import.types&&t.import.types.length>0?`
5120
5120
  import type { ${t.import.types.join(", ")} } from '${t.import.from}';`:""}`,language:"typescript"})]}),t.bestPractices&&t.bestPractices.length>0&&e.jsxs("div",{style:{marginTop:24},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:[e.jsx(l.NiceIcon,{name:"lightbulb",size:16})," ",n("documentationViewer.bestPractices","Best Practices")]}),e.jsx("ul",{style:{margin:0,paddingLeft:20,color:"var(--nice-text-secondary, #888)"},children:t.bestPractices.map((i,a)=>e.jsx("li",{style:{marginBottom:8},children:e.jsx(Sn,{text:i})},a))})]}),t.pitfalls&&t.pitfalls.length>0&&e.jsxs("div",{style:{marginTop:24},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px",color:"var(--nice-color-warning, #f59e0b)"},children:[e.jsx(l.NiceIcon,{name:"warning",size:16})," ",n("documentationViewer.commonPitfalls","Common Pitfalls")]}),e.jsx("ul",{style:{margin:0,paddingLeft:20,color:"var(--nice-text-secondary, #888)"},children:t.pitfalls.map((i,a)=>e.jsx("li",{style:{marginBottom:8},children:e.jsx(Sn,{text:i})},a))})]})]})}function NT({props:t}){const{t:n}=l.useNiceTranslation(),[i,a]=r.useState(""),[s,o]=r.useState(!1),c=r.useMemo(()=>{let d=t;if(i){const p=i.toLowerCase();d=d.filter(m=>m.name.toLowerCase().includes(p)||m.description.toLowerCase().includes(p))}return s&&(d=d.filter(p=>p.required)),d},[t,i,s]);return e.jsxs("div",{className:"nice-doc-section nice-doc-props",children:[e.jsxs("div",{style:{display:"flex",gap:12,marginBottom:16},children:[e.jsx("input",{type:"text",placeholder:n("documentationViewer.searchProps","Search props..."),value:i,onChange:d=>a(d.target.value),style:{flex:1,padding:"8px 12px",border:"1px solid var(--nice-border-color, #2a2a2a)",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",color:"var(--nice-text-primary, #fff)",fontSize:14}}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:s,onChange:d=>o(d.target.checked)}),e.jsx("span",{style:{fontSize:13},children:n("documentationViewer.requiredOnly","Required only")})]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[c.map(d=>e.jsx(_T,{prop:d},d.name)),c.length===0&&e.jsx("p",{style:{color:"var(--nice-text-muted, #666)",textAlign:"center",padding:24},children:n("documentationViewer.noPropsMatchYourFilter","No props match your filter.")})]})]})}function _T({prop:t}){const{t:n}=l.useNiceTranslation(),[i,a]=r.useState(!1);return e.jsxs("div",{className:"nice-doc-prop-card",style:{padding:16,borderRadius:8,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx("code",{style:{fontSize:14,fontWeight:600,color:"var(--nice-text-primary, #fff)"},children:t.name}),t.deprecated&&e.jsx("span",{style:{padding:"1px 6px",borderRadius:3,fontSize:10,background:"var(--nice-danger-tint-15, rgba(239, 68, 68, 0.15))",color:"var(--nice-color-error, #ef4444)"},children:n("documentationViewer.deprecated","deprecated")})]}),e.jsx(xT,{type:t.type,required:t.required})]}),e.jsx("p",{style:{margin:"0 0 8px",fontSize:13,color:"var(--nice-text-secondary, #888)",lineHeight:1.5},children:e.jsx(Sn,{text:t.description})}),t.defaultValue&&e.jsxs("div",{style:{fontSize:12,color:"var(--nice-text-muted, #666)"},children:[n("documentationViewer.default2","Default:")," ",e.jsx("code",{style:{color:"var(--nice-color-success, #10b981)"},children:t.defaultValue})]}),t.deprecated&&e.jsxs("div",{style:{marginTop:8,padding:8,borderRadius:4,background:"var(--nice-danger-tint-10, rgba(239, 68, 68, 0.1))",fontSize:12,color:"var(--nice-color-error, #ef4444)"},children:[e.jsx(l.NiceIcon,{name:"warning",size:12})," ",t.deprecated]}),t.options&&t.options.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>a(!i),style:{marginTop:8,padding:"4px 8px",border:"none",background:"transparent",color:"var(--nice-color-primary, #6c5ce7)",cursor:"pointer",fontSize:12},children:[e.jsx(l.NiceIcon,{name:i?"chevron-down":"chevron-right",size:12})," ",n("documentationViewer.possibleValues","{options} possible values").replace("{options}",String(t.options.length))]}),i&&e.jsx("div",{style:{marginTop:8,display:"flex",flexDirection:"column",gap:4},children:t.options.map(s=>e.jsxs("div",{style:{padding:"6px 10px",borderRadius:4,background:"var(--nice-bg-tertiary, #1a1a1a)",fontSize:12},children:[e.jsxs("code",{style:{color:"var(--nice-color-primary, #6c5ce7)"},children:['"',s.value,'"']}),s.label&&e.jsxs("span",{style:{marginLeft:8,color:"var(--nice-text-secondary, #888)"},children:["— ",s.label]})]},s.value))})]})]})}function jT({events:t}){const{t:n}=l.useNiceTranslation();return e.jsx("div",{className:"nice-doc-section nice-doc-events",children:e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:12},children:t.map(i=>e.jsxs("div",{style:{padding:16,borderRadius:8,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsx("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:8},children:e.jsx("code",{style:{fontSize:14,fontWeight:600,color:"var(--nice-color-warning, #f59e0b)"},children:i.name})}),e.jsx("p",{style:{margin:"0 0 12px",fontSize:13,color:"var(--nice-text-secondary, #888)"},children:e.jsx(Sn,{text:i.description})}),e.jsx(Ki,{code:i.signature,language:"typescript"}),i.parameters&&i.parameters.length>0&&e.jsxs("div",{style:{marginTop:12},children:[e.jsx("div",{style:{fontSize:12,fontWeight:600,marginBottom:8},children:n("documentationViewer.parameters","Parameters:")}),i.parameters.map(a=>e.jsxs("div",{style:{fontSize:12,marginBottom:4,color:"var(--nice-text-secondary, #888)"},children:[e.jsx("code",{style:{color:"var(--nice-color-primary, #6c5ce7)"},children:a.name}),e.jsxs("span",{style:{color:"var(--nice-text-muted, #666)"},children:[" : ",a.type]}),e.jsxs("span",{children:[" — ",a.description]})]},a.name))]})]},i.name))})})}function wT({doc:t}){const{t:n}=l.useNiceTranslation(),i=t.theming;return i?e.jsxs("div",{className:"nice-doc-section nice-doc-theming",children:[i.description&&e.jsx("p",{style:{margin:"0 0 24px",color:"var(--nice-text-secondary, #888)",lineHeight:1.6},children:e.jsx(Sn,{text:i.description})}),i.cssVariables&&i.cssVariables.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.cssVariables","CSS Variables")}),e.jsx("div",{style:{display:"grid",gap:8,marginBottom:24},children:i.cssVariables.map(a=>e.jsx(kT,{variable:a},a.name))})]}),i.cssClasses&&i.cssClasses.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.cssClasses","CSS Classes")}),e.jsx("div",{style:{display:"grid",gap:8,marginBottom:24},children:i.cssClasses.map(a=>e.jsxs("div",{style:{padding:"10px 14px",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("code",{style:{fontSize:13,color:"var(--nice-color-primary, #6c5ce7)"},children:[".",a.name]}),e.jsx("span",{style:{fontSize:12,color:"var(--nice-text-secondary, #888)"},children:a.description})]},a.name))})]}),i.example&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.example","Example")}),e.jsx(Ki,{code:i.example,language:"tsx"})]})]}):null}function kT({variable:t}){return e.jsxs("div",{style:{padding:"10px 14px",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[e.jsx("code",{style:{fontSize:13,color:"var(--nice-color-primary, #6c5ce7)"},children:t.name}),t.defaultValue&&e.jsx("code",{style:{fontSize:11,color:"var(--nice-text-muted, #666)"},children:t.defaultValue})]}),e.jsx("div",{style:{fontSize:12,color:"var(--nice-text-secondary, #888)"},children:t.description})]})}function CT({doc:t}){const{t:n}=l.useNiceTranslation(),i=t.i18n;return i?e.jsxs("div",{className:"nice-doc-section nice-doc-i18n",children:[i.description&&e.jsx("p",{style:{margin:"0 0 24px",color:"var(--nice-text-secondary, #888)",lineHeight:1.6},children:e.jsx(Sn,{text:i.description})}),i.keys&&i.keys.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.translationKeys","Translation Keys")}),e.jsx("div",{style:{display:"grid",gap:8,marginBottom:24},children:i.keys.map(a=>e.jsx(ST,{i18nKey:a},a.key))})]}),i.example&&e.jsxs(e.Fragment,{children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:n("documentationViewer.example","Example")}),e.jsx(Ki,{code:i.example,language:"tsx"})]})]}):null}function ST({i18nKey:t}){const{t:n}=l.useNiceTranslation();return e.jsxs("div",{style:{padding:"10px 14px",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:4},children:[e.jsx("code",{style:{fontSize:13,color:"var(--nice-color-primary, #6c5ce7)"},children:t.key}),e.jsx("span",{style:{fontSize:11,color:"var(--nice-text-muted, #666)",padding:"2px 6px",background:"var(--nice-bg-tertiary)",borderRadius:3},children:t.context})]}),e.jsxs("div",{style:{fontSize:12,color:"var(--nice-text-secondary, #888)"},children:[n("documentationViewer.default",'Default: "{defaultText}"').replace("{defaultText}",String(t.defaultText)),t.placeholders&&t.placeholders.length>0&&e.jsx("span",{style:{marginLeft:8,color:"var(--nice-text-muted, #666)"},children:n("documentationViewer.placeholders","Placeholders: {placeholders}").replace("{placeholders}",String(t.placeholders.join(", ")))})]})]})}function TT({examples:t,enableEdit:n}){return e.jsx("div",{className:"nice-doc-section nice-doc-examples",children:e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:24},children:t.map((i,a)=>e.jsx(ET,{example:i,enableEdit:n},a))})})}function ET({example:t,enableEdit:n}){const{t:i}=l.useNiceTranslation(),[a,s]=r.useState(t.code),[o,c]=r.useState(!1);return e.jsxs("div",{style:{borderRadius:12,border:"1px solid var(--nice-border-color, #2a2a2a)",overflow:"hidden"},children:[e.jsxs("div",{style:{padding:"12px 16px",background:"var(--nice-bg-secondary, #141414)",borderBottom:"1px solid var(--nice-border-color, #2a2a2a)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("h4",{style:{margin:0,fontSize:14,fontWeight:600},children:t.title}),e.jsx("p",{style:{margin:"4px 0 0",fontSize:12,color:"var(--nice-text-secondary, #888)"},children:t.description})]}),n&&e.jsx("button",{onClick:()=>c(!o),style:{padding:"4px 10px",border:"1px solid var(--nice-border-color, #2a2a2a)",borderRadius:4,background:o?"var(--nice-color-primary, #6c5ce7)":"transparent",color:o?"var(--nice-color-white, #fff)":"var(--nice-text-secondary, #888)",cursor:"pointer",fontSize:12},children:o?i("documentationViewer.preview","Preview"):i("documentationViewer.edit","Edit")})]}),o?e.jsx("textarea",{value:a,onChange:d=>s(d.target.value),style:{width:"100%",minHeight:200,padding:16,border:"none",background:"var(--nice-bg-primary, #0a0a0a)",color:"var(--nice-text-primary, #fff)",fontFamily:"ui-monospace, monospace",fontSize:13,lineHeight:1.5,resize:"vertical"}}):e.jsx(Ki,{code:a,language:t.language||"tsx"})]})}function IT({doc:t}){const{t:n}=l.useNiceTranslation(),i=t.accessibility;return i?e.jsxs("div",{className:"nice-doc-section nice-doc-accessibility",children:[i.role&&e.jsxs("div",{style:{marginBottom:24},children:[e.jsx("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 8px"},children:n("documentationViewer.ariaRole","ARIA Role")}),e.jsxs("code",{style:{padding:"4px 10px",borderRadius:4,background:"var(--nice-bg-secondary, #141414)",fontSize:14},children:['role="',i.role,'"']})]}),i.keyboard&&i.keyboard.length>0&&e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:[e.jsx(l.NiceIcon,{name:"terminal",size:16})," ",n("documentationViewer.keyboardNavigation","Keyboard Navigation")]}),e.jsx("div",{style:{display:"grid",gap:8},children:i.keyboard.map(a=>e.jsxs("div",{style:{padding:"10px 14px",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)",display:"flex",gap:16,alignItems:"center"},children:[e.jsx("kbd",{style:{padding:"4px 8px",borderRadius:4,background:"var(--nice-bg-tertiary, #1a1a1a)",border:"1px solid var(--nice-border-color, #2a2a2a)",fontSize:12,fontFamily:"ui-monospace, monospace",minWidth:60,textAlign:"center"},children:a.key}),e.jsx("span",{style:{fontSize:13,color:"var(--nice-text-secondary, #888)"},children:a.action})]},a.key))})]}),i.screenReader&&e.jsxs("div",{style:{marginBottom:24},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 8px"},children:[e.jsx(l.NiceIcon,{name:"accessibility",size:16})," ",n("documentationViewer.screenReader","Screen Reader")]}),e.jsx("p",{style:{margin:0,color:"var(--nice-text-secondary, #888)",lineHeight:1.6},children:e.jsx(Sn,{text:i.screenReader})})]}),i.wcag&&e.jsxs("div",{children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 8px"},children:[e.jsx(l.NiceIcon,{name:"clipboard",size:16})," ",n("documentationViewer.wcagCompliance","WCAG Compliance")]}),e.jsx("p",{style:{margin:0,color:"var(--nice-text-secondary, #888)",lineHeight:1.6},children:e.jsx(Sn,{text:i.wcag})})]})]}):null}function DT({doc:t}){const{t:n}=l.useNiceTranslation();return e.jsxs("div",{className:"nice-doc-section nice-doc-api",children:[t.slots&&t.slots.length>0&&e.jsxs("div",{style:{marginBottom:32},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:[e.jsx(l.NiceIcon,{name:"plug",size:16})," ",n("documentationViewer.slotsRenderProps","Slots / Render Props")]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:t.slots.map(i=>e.jsxs("div",{style:{padding:16,borderRadius:8,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsx("code",{style:{fontSize:14,fontWeight:600,color:"var(--nice-color-primary, #6c5ce7)"},children:i.name}),e.jsx("p",{style:{margin:"8px 0 0",fontSize:13,color:"var(--nice-text-secondary, #888)"},children:i.description}),i.props&&i.props.length>0&&e.jsxs("div",{style:{marginTop:12,paddingTop:12,borderTop:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsx("div",{style:{fontSize:12,fontWeight:600,marginBottom:8},children:n("documentationViewer.renderProps","Render props:")}),i.props.map(a=>e.jsxs("div",{style:{fontSize:12,color:"var(--nice-text-secondary, #888)",marginBottom:4},children:[e.jsx("code",{style:{color:"var(--nice-color-primary, #6c5ce7)"},children:a.name}),e.jsxs("span",{style:{color:"var(--nice-text-muted, #666)"},children:[" : ",a.type]}),e.jsxs("span",{children:[" — ",a.description]})]},a.name))]})]},i.name))})]}),t.methods&&t.methods.length>0&&e.jsxs("div",{style:{marginBottom:32},children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:[e.jsx(l.NiceIcon,{name:"settings",size:16})," ",n("documentationViewer.methods","Methods")]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:t.methods.map(i=>e.jsxs("div",{style:{padding:16,borderRadius:8,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsxs("code",{style:{fontSize:14,fontWeight:600,color:"var(--nice-color-warning, #f59e0b)"},children:[i.name,"()"]}),e.jsx("p",{style:{margin:"8px 0",fontSize:13,color:"var(--nice-text-secondary, #888)"},children:i.description}),e.jsx(Ki,{code:i.signature,language:"typescript"}),i.returns&&e.jsx("div",{style:{marginTop:8,fontSize:12,color:"var(--nice-text-muted, #666)"},children:n("documentationViewer.returns","Returns: {returns}").replace("{returns}",String(i.returns))})]},i.name))})]}),t.related&&t.related.length>0&&e.jsxs("div",{children:[e.jsxs("h3",{style:{fontSize:16,fontWeight:600,margin:"0 0 12px"},children:[e.jsx(l.NiceIcon,{name:"link",size:16})," ",n("documentationViewer.relatedComponents","Related Components")]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:t.related.map(i=>e.jsxs("div",{style:{padding:"8px 14px",borderRadius:6,background:"var(--nice-bg-secondary, #141414)",border:"1px solid var(--nice-border-color, #2a2a2a)"},children:[e.jsx("code",{style:{fontSize:13,color:"var(--nice-color-primary, #6c5ce7)"},children:i.name}),e.jsx("span",{style:{fontSize:11,color:"var(--nice-text-muted, #666)",marginLeft:8},children:i.package}),e.jsx("div",{style:{fontSize:11,color:"var(--nice-text-secondary, #888)",marginTop:4},children:i.relationship})]},i.name))})]})]})}function PT({doc:t,component:n,renderPreview:i,defaultTab:a="overview",sections:s={},compact:o=!1,enableCodeEdit:c=!1,className:d,style:p}){const{t:m}=l.useNiceTranslation(),[h,u]=r.useState(a),x={overview:s.overview!==!1,props:s.props!==!1&&(t.props?.length??0)>0,events:s.events!==!1&&(t.events?.length??0)>0,theming:s.theming!==!1&&!!t.theming,i18n:s.i18n!==!1&&!!t.i18n,examples:s.examples!==!1&&(t.examples?.length??0)>0,accessibility:s.accessibility!==!1&&!!t.accessibility,api:s.api!==!1&&(!!t.slots?.length||!!t.methods?.length||!!t.related?.length)},f=[{id:"overview",label:m("documentationViewer.overview","Overview"),icon:"book",available:x.overview},{id:"props",label:m("documentationViewer.props","Props"),icon:"settings",available:x.props},{id:"events",label:m("documentationViewer.events","Events"),icon:"zap",available:x.events},{id:"theming",label:m("documentationViewer.theming","Theming"),icon:"palette",available:x.theming},{id:"i18n",label:"i18n",icon:"globe",available:x.i18n},{id:"examples",label:m("documentationViewer.examples","Examples"),icon:"lightbulb",available:x.examples},{id:"accessibility",label:"A11y",icon:"accessibility",available:x.accessibility},{id:"api",label:"API",icon:"settings",available:x.api}].filter(b=>b.available);return r.useEffect(()=>{f.find(b=>b.id===h)||u(f[0]?.id||"overview")},[f,h]),e.jsxs("div",{className:`nice-documentation-viewer ${o?"nice-doc-compact":""} ${d||""}`,style:{background:"var(--nice-bg-primary, #0a0a0a)",color:"var(--nice-text-primary, #fff)",borderRadius:o?8:16,overflow:"hidden",...p},children:[!o&&e.jsx("div",{style:{padding:"24px 24px 0",borderBottom:"1px solid var(--nice-border-color, #2a2a2a)"},children:e.jsx("div",{style:{marginBottom:16},children:e.jsx("span",{style:{fontSize:12,color:"var(--nice-text-muted, #666)"},children:t.package})})}),e.jsx("div",{style:{display:"flex",gap:4,padding:"12px 24px",borderBottom:"1px solid var(--nice-border-color, #2a2a2a)",overflowX:"auto"},children:f.map(b=>e.jsxs("button",{onClick:()=>u(b.id),style:{display:"flex",alignItems:"center",gap:6,padding:"8px 14px",border:"none",borderRadius:6,background:h===b.id?"var(--nice-color-primary, #6c5ce7)":"transparent",color:h===b.id?"var(--nice-color-white, #fff)":"var(--nice-text-secondary, #888)",cursor:"pointer",fontSize:13,fontWeight:500,whiteSpace:"nowrap",transition:"background 0.15s, color 0.15s"},children:[e.jsx("span",{children:e.jsx(l.NiceIcon,{name:b.icon,size:14})}),e.jsx("span",{children:b.label}),b.id==="props"&&t.props&&e.jsxs("span",{style:{opacity:.7},children:["(",t.props.length,")"]})]},b.id))}),e.jsxs("div",{style:{padding:o?16:24},children:[h==="overview"&&e.jsx(yT,{doc:t}),h==="props"&&t.props&&e.jsx(NT,{props:t.props}),h==="events"&&t.events&&e.jsx(jT,{events:t.events}),h==="theming"&&e.jsx(wT,{doc:t}),h==="i18n"&&e.jsx(CT,{doc:t}),h==="examples"&&e.jsx(TT,{examples:t.examples??[],enableEdit:c}),h==="accessibility"&&e.jsx(IT,{doc:t}),h==="api"&&e.jsx(DT,{doc:t})]}),t.lastUpdated&&!o&&e.jsx("div",{style:{padding:"12px 24px",borderTop:"1px solid var(--nice-border-color, #2a2a2a)",fontSize:11,color:"var(--nice-text-muted, #666)"},children:m("documentationViewer.lastUpdated","Last updated: {lastUpdated}").replace("{lastUpdated}",String(t.lastUpdated))})]})}const AT=(t,n,i)=>{const a=t[n];return a?typeof a=="function"?a():Promise.resolve(a):new Promise((s,o)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(o.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==i?". Note that variables only represent file names one level deep.":""))))})};async function RT(t){try{const n=await AT(Object.assign({"../../docs/NiceAPIFlow.doc.json":()=>Promise.resolve().then(()=>require("./NiceAPIFlow.doc-Dx4qw1lm.cjs")),"../../docs/NiceAlertDialog.doc.json":()=>Promise.resolve().then(()=>require("./NiceAlertDialog.doc-BST0-aVs.cjs")),"../../docs/NiceAnimatePresence.doc.json":()=>Promise.resolve().then(()=>require("./NiceAnimatePresence.doc-IdEWrSnT.cjs")),"../../docs/NiceApiExplorer.doc.json":()=>Promise.resolve().then(()=>require("./NiceApiExplorer.doc-TEx67kV5.cjs")),"../../docs/NiceAssessment.doc.json":()=>Promise.resolve().then(()=>require("./NiceAssessment.doc-BB1rXcVx.cjs")),"../../docs/NiceAutomationRuleEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceAutomationRuleEditor.doc-BsXa78FM.cjs")),"../../docs/NiceBPMNDesigner.doc.json":()=>Promise.resolve().then(()=>require("./NiceBPMNDesigner.doc-BY8t7qOi.cjs")),"../../docs/NiceBackupDiffViewer.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupDiffViewer.doc-ChQaZCg1.cjs")),"../../docs/NiceBackupList.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupList.doc-BdQCw0_D.cjs")),"../../docs/NiceBackupRestoreDialog.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupRestoreDialog.doc-B2iiqTps.cjs")),"../../docs/NiceBackupScheduler.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupScheduler.doc-ByeL3iH1.cjs")),"../../docs/NiceBackupStatusBadge.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupStatusBadge.doc-BA3dYgiW.cjs")),"../../docs/NiceBackupTagEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceBackupTagEditor.doc-Bej1KHco.cjs")),"../../docs/NiceBranchManager.doc.json":()=>Promise.resolve().then(()=>require("./NiceBranchManager.doc-BTyRjX7X.cjs")),"../../docs/NiceCalendarScheduler.doc.json":()=>Promise.resolve().then(()=>require("./NiceCalendarScheduler.doc-BEtQkZjV.cjs")),"../../docs/NiceCameraFeed.doc.json":()=>Promise.resolve().then(()=>require("./NiceCameraFeed.doc-Bt4eZ8MH.cjs")),"../../docs/NiceChip.doc.json":()=>Promise.resolve().then(()=>require("./NiceChip.doc-Bccf4IQe.cjs")),"../../docs/NiceCodeTemplate.doc.json":()=>Promise.resolve().then(()=>require("./NiceCodeTemplate.doc-BWxTE4C_.cjs")),"../../docs/NiceCombobox.doc.json":()=>Promise.resolve().then(()=>require("./NiceCombobox.doc-C5IPnVuz.cjs")),"../../docs/NiceComponentPlayground.doc.json":()=>Promise.resolve().then(()=>require("./NiceComponentPlayground.doc-DbLhlUDT.cjs")),"../../docs/NiceConfigProvider.doc.json":()=>Promise.resolve().then(()=>require("./NiceConfigProvider.doc-bMLQj3Zx.cjs")),"../../docs/NiceConnectorConfigForm.doc.json":()=>Promise.resolve().then(()=>require("./NiceConnectorConfigForm.doc-BKrDuhXw.cjs")),"../../docs/NiceCronEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceCronEditor.doc-w_TbOWFo.cjs")),"../../docs/NiceDataBranchGraph.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataBranchGraph.doc-sjLmrrtE.cjs")),"../../docs/NiceDataBranchManager.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataBranchManager.doc-B1-Rp2X4.cjs")),"../../docs/NiceDataConflictResolver.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataConflictResolver.doc-CjQryrTu.cjs")),"../../docs/NiceDataDiffViewer.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataDiffViewer.doc-BzGrf0U-.cjs")),"../../docs/NiceDataList.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataList.doc-DHXrpTPT.cjs")),"../../docs/NiceDataMapper.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataMapper.doc-ytGVtYVr.cjs")),"../../docs/NiceDataMergeBuilder.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataMergeBuilder.doc-BcmzKxh2.cjs")),"../../docs/NiceDataSnapshot.doc.json":()=>Promise.resolve().then(()=>require("./NiceDataSnapshot.doc-C73K1biG.cjs")),"../../docs/NiceDesktopViews.doc.json":()=>Promise.resolve().then(()=>require("./NiceDesktopViews.doc-DJjYlyP2.cjs")),"../../docs/NiceDeviceControlCard.doc.json":()=>Promise.resolve().then(()=>require("./NiceDeviceControlCard.doc-BZIo92-w.cjs")),"../../docs/NiceDocPage.doc.json":()=>Promise.resolve().then(()=>require("./NiceDocPage.doc-BVBe27kj.cjs")),"../../docs/NiceDocumentationViewer.doc.json":()=>Promise.resolve().then(()=>require("./NiceDocumentationViewer.doc-CrwlvPFg.cjs")),"../../docs/NiceDrawingCanvas.doc.json":()=>Promise.resolve().then(()=>require("./NiceDrawingCanvas.doc-Ww9zz17x.cjs")),"../../docs/NiceDropdown.doc.json":()=>Promise.resolve().then(()=>require("./NiceDropdown.doc-dAgER8da.cjs")),"../../docs/NiceDropzone.doc.json":()=>Promise.resolve().then(()=>require("./NiceDropzone.doc-CVVNc9SE.cjs")),"../../docs/NiceEnergyChart.doc.json":()=>Promise.resolve().then(()=>require("./NiceEnergyChart.doc-DW-jllDV.cjs")),"../../docs/NiceEnergyMonitor.doc.json":()=>Promise.resolve().then(()=>require("./NiceEnergyMonitor.doc-lf6CCIYi.cjs")),"../../docs/NiceEventOrchestrator.doc.json":()=>Promise.resolve().then(()=>require("./NiceEventOrchestrator.doc-Dwtq2s_L.cjs")),"../../docs/NiceExam.doc.json":()=>Promise.resolve().then(()=>require("./NiceExam.doc-Br8pEbQb.cjs")),"../../docs/NiceExpressionBuilder.doc.json":()=>Promise.resolve().then(()=>require("./NiceExpressionBuilder.doc-CTjqEcZR.cjs")),"../../docs/NiceFeatureGate.doc.json":()=>Promise.resolve().then(()=>require("./NiceFeatureGate.doc-DN17uS_B.cjs")),"../../docs/NiceFileExplorer.doc.json":()=>Promise.resolve().then(()=>require("./NiceFileExplorer.doc-DNHYQF_t.cjs")),"../../docs/NiceFileManagerViews.doc.json":()=>Promise.resolve().then(()=>require("./NiceFileManagerViews.doc-CKlnm6cX.cjs")),"../../docs/NiceFloatingActionButton.doc.json":()=>Promise.resolve().then(()=>require("./NiceFloatingActionButton.doc-BOlJwq4S.cjs")),"../../docs/NiceFontPicker.doc.json":()=>Promise.resolve().then(()=>require("./NiceFontPicker.doc-B10vOqeF.cjs")),"../../docs/NiceFormItem.doc.json":()=>Promise.resolve().then(()=>require("./NiceFormItem.doc-Ck3PgaPD.cjs")),"../../docs/NiceGantt.doc.json":()=>Promise.resolve().then(()=>require("./NiceGantt.doc-DTv0r7bP.cjs")),"../../docs/NiceGestureHandler.doc.json":()=>Promise.resolve().then(()=>require("./NiceGestureHandler.doc-9GGvVnM5.cjs")),"../../docs/NiceGitBlame.doc.json":()=>Promise.resolve().then(()=>require("./NiceGitBlame.doc-DuTSjZVN.cjs")),"../../docs/NiceGitConflictResolver.doc.json":()=>Promise.resolve().then(()=>require("./NiceGitConflictResolver.doc-CgroGM9_.cjs")),"../../docs/NiceGitDiffViewer.doc.json":()=>Promise.resolve().then(()=>require("./NiceGitDiffViewer.doc-D9FVquBC.cjs")),"../../docs/NiceGitGraph.doc.json":()=>Promise.resolve().then(()=>require("./NiceGitGraph.doc-eRvTmefl.cjs")),"../../docs/NiceGitHooks.doc.json":()=>Promise.resolve().then(()=>require("./NiceGitHooks.doc-DCTVw7HX.cjs")),"../../docs/NiceHeader.doc.json":()=>Promise.resolve().then(()=>require("./NiceHeader.doc-Cxoy_f_k.cjs")),"../../docs/NiceImage.doc.json":()=>Promise.resolve().then(()=>require("./NiceImage.doc-CvnaTRj8.cjs")),"../../docs/NiceInPlaceEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceInPlaceEditor.doc-8nC6Kqvn.cjs")),"../../docs/NiceInstanceMonitor.doc.json":()=>Promise.resolve().then(()=>require("./NiceInstanceMonitor.doc-HVbLufnh.cjs")),"../../docs/NiceInteractiveTimeline.doc.json":()=>Promise.resolve().then(()=>require("./NiceInteractiveTimeline.doc-WMOVQhMe.cjs")),"../../docs/NiceJsonEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceJsonEditor.doc-DeyoVDQw.cjs")),"../../docs/NiceLocaleManager.doc.json":()=>Promise.resolve().then(()=>require("./NiceLocaleManager.doc-XH6hMW0Z.cjs")),"../../docs/NiceLockButton.doc.json":()=>Promise.resolve().then(()=>require("./NiceLockButton.doc-BMhSj3TB.cjs")),"../../docs/NiceMAM.doc.json":()=>Promise.resolve().then(()=>require("./NiceMAM.doc-CsQ57saR.cjs")),"../../docs/NiceMegaMenu.doc.json":()=>Promise.resolve().then(()=>require("./NiceMegaMenu.doc-7UyOCd3l.cjs")),"../../docs/NiceMentionInput.doc.json":()=>Promise.resolve().then(()=>require("./NiceMentionInput.doc-ZSPjBsZc.cjs")),"../../docs/NiceMergeRequestBuilder.doc.json":()=>Promise.resolve().then(()=>require("./NiceMergeRequestBuilder.doc-C5p8mYuh.cjs")),"../../docs/NiceModuleLoaderProvider.doc.json":()=>Promise.resolve().then(()=>require("./NiceModuleLoaderProvider.doc-lo97661g.cjs")),"../../docs/NiceModuleRoute.doc.json":()=>Promise.resolve().then(()=>require("./NiceModuleRoute.doc-yfKOEjaL.cjs")),"../../docs/NiceMotion.doc.json":()=>Promise.resolve().then(()=>require("./NiceMotion.doc-COF5BldG.cjs")),"../../docs/NiceMultiColumnComboBox.doc.json":()=>Promise.resolve().then(()=>require("./NiceMultiColumnComboBox.doc-Ben0Q0J0.cjs")),"../../docs/NiceNetworkDiscoveryPanel.doc.json":()=>Promise.resolve().then(()=>require("./NiceNetworkDiscoveryPanel.doc-BFgFZI5G.cjs")),"../../docs/NiceNotificationList.doc.json":()=>Promise.resolve().then(()=>require("./NiceNotificationList.doc-CBWusjJX.cjs")),"../../docs/NiceNotificationPreferences.doc.json":()=>Promise.resolve().then(()=>require("./NiceNotificationPreferences.doc-C0_JB6hx.cjs")),"../../docs/NiceOfflineSync.doc.json":()=>Promise.resolve().then(()=>require("./NiceOfflineSync.doc-BLQFyOf2.cjs")),"../../docs/NicePipelineEditor.doc.json":()=>Promise.resolve().then(()=>require("./NicePipelineEditor.doc-DZ0pTVTp.cjs")),"../../docs/NicePipelineMonitor.doc.json":()=>Promise.resolve().then(()=>require("./NicePipelineMonitor.doc-C88-TagI.cjs")),"../../docs/NicePoll.doc.json":()=>Promise.resolve().then(()=>require("./NicePoll.doc-IOgqVPhc.cjs")),"../../docs/NicePollLive.doc.json":()=>Promise.resolve().then(()=>require("./NicePollLive.doc-xBMqHeyt.cjs")),"../../docs/NicePreview.doc.json":()=>Promise.resolve().then(()=>require("./NicePreview.doc-atKISvmp.cjs")),"../../docs/NicePropertyGrid.doc.json":()=>Promise.resolve().then(()=>require("./NicePropertyGrid.doc-BWNyWrWq.cjs")),"../../docs/NiceQuiz.doc.json":()=>Promise.resolve().then(()=>require("./NiceQuiz.doc-BhAeGrcP.cjs")),"../../docs/NiceRadio.doc.json":()=>Promise.resolve().then(()=>require("./NiceRadio.doc-Cc8-1vbn.cjs")),"../../docs/NiceRecurrencePicker.doc.json":()=>Promise.resolve().then(()=>require("./NiceRecurrencePicker.doc-vC2YmCXF.cjs")),"../../docs/NiceRichTextEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceRichTextEditor.doc-ClPCkzCd.cjs")),"../../docs/NiceRoomGrid.doc.json":()=>Promise.resolve().then(()=>require("./NiceRoomGrid.doc-DJPVUQVg.cjs")),"../../docs/NiceSceneActionBuilder.doc.json":()=>Promise.resolve().then(()=>require("./NiceSceneActionBuilder.doc-BDbpdDYG.cjs")),"../../docs/NiceSceneBar.doc.json":()=>Promise.resolve().then(()=>require("./NiceSceneBar.doc-09sc3yuF.cjs")),"../../docs/NiceSceneSelector.doc.json":()=>Promise.resolve().then(()=>require("./NiceSceneSelector.doc-CPzCAy-d.cjs")),"../../docs/NiceScheduler.doc.json":()=>Promise.resolve().then(()=>require("./NiceScheduler.doc-Cnl-FC0q.cjs")),"../../docs/NiceSchedulerViews.doc.json":()=>Promise.resolve().then(()=>require("./NiceSchedulerViews.doc-C9opZpgg.cjs")),"../../docs/NiceScrollArea.doc.json":()=>Promise.resolve().then(()=>require("./NiceScrollArea.doc-LdxDrGDY.cjs")),"../../docs/NiceSensorGaugePanel.doc.json":()=>Promise.resolve().then(()=>require("./NiceSensorGaugePanel.doc-BHirbWLn.cjs")),"../../docs/NiceSheet.doc.json":()=>Promise.resolve().then(()=>require("./NiceSheet.doc-CsIu3Y1G.cjs")),"../../docs/NiceSpeedDial.doc.json":()=>Promise.resolve().then(()=>require("./NiceSpeedDial.doc-CSWvNR9n.cjs")),"../../docs/NiceSplitPane.doc.json":()=>Promise.resolve().then(()=>require("./NiceSplitPane.doc-Ck_FvdL6.cjs")),"../../docs/NiceSpotlight.doc.json":()=>Promise.resolve().then(()=>require("./NiceSpotlight.doc-BVZFfDVI.cjs")),"../../docs/NiceStateDesigner.doc.json":()=>Promise.resolve().then(()=>require("./NiceStateDesigner.doc-DV4zEC50.cjs")),"../../docs/NiceStepNavigation.doc.json":()=>Promise.resolve().then(()=>require("./NiceStepNavigation.doc-TSy2dWmf.cjs")),"../../docs/NiceStepper.doc.json":()=>Promise.resolve().then(()=>require("./NiceStepper.doc-f8lYpr33.cjs")),"../../docs/NiceSteps.doc.json":()=>Promise.resolve().then(()=>require("./NiceSteps.doc-C_mkhnez.cjs")),"../../docs/NiceStreamDashboard.doc.json":()=>Promise.resolve().then(()=>require("./NiceStreamDashboard.doc-CdkHFf4Y.cjs")),"../../docs/NiceSurvey.doc.json":()=>Promise.resolve().then(()=>require("./NiceSurvey.doc-9UorYdXy.cjs")),"../../docs/NiceSwitch.doc.json":()=>Promise.resolve().then(()=>require("./NiceSwitch.doc-CLc7OxrE.cjs")),"../../docs/NiceTaskInbox.doc.json":()=>Promise.resolve().then(()=>require("./NiceTaskInbox.doc-CdCTfgBq.cjs")),"../../docs/NiceTestBuilder.doc.json":()=>Promise.resolve().then(()=>require("./NiceTestBuilder.doc-Cj1fNTvk.cjs")),"../../docs/NiceTimelineItem.doc.json":()=>Promise.resolve().then(()=>require("./NiceTimelineItem.doc-DF6w3PIs.cjs")),"../../docs/NiceTranscoder.doc.json":()=>Promise.resolve().then(()=>require("./NiceTranscoder.doc-Dnirl3wg.cjs")),"../../docs/NiceTransition.doc.json":()=>Promise.resolve().then(()=>require("./NiceTransition.doc-GA1N91ON.cjs")),"../../docs/NiceTree.doc.json":()=>Promise.resolve().then(()=>require("./NiceTree.doc-DGrIAx3G.cjs")),"../../docs/NiceUndoProvider.doc.json":()=>Promise.resolve().then(()=>require("./NiceUndoProvider.doc-EKVuugVJ.cjs")),"../../docs/NiceUnitConverter.doc.json":()=>Promise.resolve().then(()=>require("./NiceUnitConverter.doc-DmiyYOH_.cjs")),"../../docs/NiceVideoAnnotator.doc.json":()=>Promise.resolve().then(()=>require("./NiceVideoAnnotator.doc-C1iEi7OM.cjs")),"../../docs/NiceVideoEditor.doc.json":()=>Promise.resolve().then(()=>require("./NiceVideoEditor.doc-C6mhEb-q.cjs")),"../../docs/NiceVirtualGrid.doc.json":()=>Promise.resolve().then(()=>require("./NiceVirtualGrid.doc-rtwudxTG.cjs")),"../../docs/NiceVirtualList.doc.json":()=>Promise.resolve().then(()=>require("./NiceVirtualList.doc-C8q-Hfl0.cjs"))}),`../../docs/${t}.doc.json`,4);return n.default||n}catch{return console.warn(`Documentation not found for component: ${t}`),null}}function $T(t,n){return{package:n,components:t.map(i=>({name:i.name,category:i.category,summary:i.summary,status:i.status})),generated:new Date().toISOString()}}function MT(t){const n=[];if(!t||typeof t!="object")return["Documentation must be an object"];const i=t;return(!i.name||typeof i.name!="string")&&n.push('Missing or invalid "name" field'),(!i.package||typeof i.package!="string")&&n.push('Missing or invalid "package" field'),(!i.category||typeof i.category!="string")&&n.push('Missing or invalid "category" field'),(!i.summary||typeof i.summary!="string")&&n.push('Missing or invalid "summary" field'),(!i.description||typeof i.description!="string")&&n.push('Missing or invalid "description" field'),(!i.import||typeof i.import!="object")&&n.push('Missing or invalid "import" field'),Array.isArray(i.props)||n.push('Missing or invalid "props" array'),Array.isArray(i.examples)||n.push('Missing or invalid "examples" array'),Array.isArray(i.props)&&i.props.forEach((a,s)=>{const o=a;o.name||n.push(`Prop ${s}: missing "name"`),o.type||n.push(`Prop ${s}: missing "type"`),o.description||n.push(`Prop ${s}: missing "description"`)}),Array.isArray(i.examples)&&i.examples.forEach((a,s)=>{const o=a;o.title||n.push(`Example ${s}: missing "title"`),o.code||n.push(`Example ${s}: missing "code"`)}),i.status&&!["stable","beta","experimental","deprecated"].includes(i.status)&&n.push('Invalid "status" value'),n}function OT(t){return{required:t.filter(n=>n.required&&!n.deprecated),optional:t.filter(n=>!n.required&&!n.deprecated),deprecated:t.filter(n=>n.deprecated)}}function LT(t){const n=[`interface ${t.name}Props {`];for(const i of t.props){i.description&&n.push(` /** ${i.description} */`);const a=i.required?"":"?";n.push(` ${i.name}${a}: ${i.type};`)}return n.push("}"),n.join(`
5121
- `)}function zT(t){const n=[];if(t.theming?.cssVariables)for(const i of t.theming.cssVariables)n.push(i.name);return n}function BT(t){const n=[];if(t.i18n?.keys)for(const i of t.i18n.keys)n.push(i.key);return n}function FT(t,n){const i=n.toLowerCase();return t.filter(a=>!!(a.name.toLowerCase().includes(i)||a.displayName?.toLowerCase().includes(i)||a.summary.toLowerCase().includes(i)||a.description.toLowerCase().includes(i)||a.tags?.some(s=>s.toLowerCase().includes(i))||a.props.some(s=>s.name.toLowerCase().includes(i)||s.description.toLowerCase().includes(i))))}function vr(){return typeof navigator>"u"?null:navigator.connection||navigator.mozConnection||navigator.webkitConnection||null}function km(t={}){const{onOnline:n,onOffline:i,pingUrl:a,pingInterval:s=3e4,useNetworkInfo:o=!0}=t,[c,d]=r.useState(()=>{const g=o?vr():null;return{isOnline:typeof navigator<"u"?navigator.onLine:!0,wasOffline:!1,lastOnline:null,lastOffline:null,effectiveType:g?.effectiveType??null,downlink:g?.downlink??null,rtt:g?.rtt??null,saveData:g?.saveData??!1}}),p=r.useRef(!1),m=r.useRef(null),h=r.useCallback(()=>{d(g=>({...g,isOnline:!0,wasOffline:p.current,lastOnline:new Date})),n?.(),setTimeout(()=>{p.current=!1,d(g=>({...g,wasOffline:!1}))},5e3)},[n]),u=r.useCallback(()=>{p.current=!0,d(g=>({...g,isOnline:!1,lastOffline:new Date})),i?.()},[i]),x=r.useCallback(()=>{const g=vr();g&&d(v=>({...v,effectiveType:g.effectiveType,downlink:g.downlink,rtt:g.rtt,saveData:g.saveData}))},[]),f=r.useCallback(async()=>{if(!a)return navigator.onLine;try{const g=new AbortController,v=setTimeout(()=>g.abort(),5e3),y=await fetch(a,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:g.signal});return clearTimeout(v),!0}catch{return!1}},[a]),b=r.useCallback(g=>{d(v=>({...v,isOnline:g,...g?{lastOnline:new Date}:{lastOffline:new Date}}))},[]);return r.useEffect(()=>{if(typeof window>"u")return;window.addEventListener("online",h),window.addEventListener("offline",u);const g=o?vr():null;return g&&g.addEventListener("change",x),a&&s>0&&(m.current=setInterval(async()=>{const v=await f();v!==c.isOnline&&(v?h():u())},s)),()=>{window.removeEventListener("online",h),window.removeEventListener("offline",u),g&&g.removeEventListener("change",x),m.current&&clearInterval(m.current)}},[h,u,x,a,s,f,c.isOnline,o]),{...c,checkConnectivity:f,setOnline:b}}function ic(t={}){const{swUrl:n="/sw.js",scope:i="/",registerOnMount:a=!0,updateInterval:s=0,onSuccess:o,onUpdate:c,onError:d,onActivated:p}=t,[m,h]=r.useState(()=>({isSupported:typeof navigator<"u"&&"serviceWorker"in navigator,isRegistered:!1,isUpdating:!1,hasUpdate:!1,registration:null,waitingWorker:null,state:null,controllerState:null,error:null})),u=r.useRef(null),x=r.useCallback(async()=>{if(!m.isSupported)return null;try{const C=await navigator.serviceWorker.register(n,{scope:i}),w=()=>{const E=C.active;E&&h(S=>({...S,controllerState:E.state}))};return C.addEventListener("updatefound",()=>{const E=C.installing;E&&E.addEventListener("statechange",()=>{E.state==="installed"&&(navigator.serviceWorker.controller?(h(S=>({...S,hasUpdate:!0,waitingWorker:E})),c?.(C)):o?.(C)),w()})}),C.waiting&&h(E=>({...E,hasUpdate:!0,waitingWorker:C.waiting})),h(E=>({...E,isRegistered:!0,registration:C,error:null})),C.active&&!C.waiting&&o?.(C),C}catch(C){const w=C instanceof Error?C:new Error(String(C));return h(E=>({...E,error:w})),d?.(w),null}},[n,i,m.isSupported,o,c,d]),f=r.useCallback(async()=>{if(m.registration)try{await m.registration.update()}catch(C){console.warn("Failed to check for SW update:",C)}},[m.registration]),b=r.useCallback(()=>{m.waitingWorker&&(h(C=>({...C,isUpdating:!0})),m.waitingWorker.postMessage({type:"SKIP_WAITING"}))},[m.waitingWorker]),g=r.useCallback(async()=>{if(!m.registration)return!1;try{const C=await m.registration.unregister();return C&&h(w=>({...w,isRegistered:!1,registration:null,hasUpdate:!1,waitingWorker:null})),C}catch{return!1}},[m.registration]),v=r.useCallback(async()=>{if(typeof caches>"u")return!1;try{const C=await caches.keys();return await Promise.all(C.map(w=>caches.delete(w))),!0}catch{return!1}},[]),y=r.useCallback(async()=>typeof caches>"u"?[]:caches.keys(),[]);return r.useEffect(()=>{if(!m.isSupported)return;const C=()=>{m.isUpdating&&(h(w=>({...w,isUpdating:!1,hasUpdate:!1,waitingWorker:null})),p?.())};return navigator.serviceWorker.addEventListener("controllerchange",C),()=>{navigator.serviceWorker.removeEventListener("controllerchange",C)}},[m.isSupported,m.isUpdating,p]),r.useEffect(()=>{a&&m.isSupported&&!m.isRegistered&&x()},[a,m.isSupported,m.isRegistered,x]),r.useEffect(()=>(s>0&&m.isRegistered&&(u.current=setInterval(f,s)),()=>{u.current&&clearInterval(u.current)}),[s,m.isRegistered,f]),{...m,register:x,checkForUpdate:f,update:b,unregister:g,clearCaches:v,getCacheNames:y}}function Cm(t={}){const{onInstallPrompt:n,onInstalled:i,onInstallDismissed:a,...s}=t,{isOnline:o,wasOffline:c}=km(s),{isRegistered:d,hasUpdate:p,isUpdating:m,registration:h,update:u,checkForUpdate:x}=ic(s),[f,b]=r.useState({isInstalled:Cs()!=="browser",canInstall:!1,installDismissed:!1,isInstalling:!1,platforms:[]}),g=r.useRef(null);r.useEffect(()=>{if(typeof window>"u")return;const C=E=>{E.preventDefault(),g.current=E,b(S=>({...S,canInstall:!0,platforms:E.platforms})),n?.(E)},w=()=>{g.current=null,b(E=>({...E,isInstalled:!0,canInstall:!1,isInstalling:!1})),i?.()};return window.addEventListener("beforeinstallprompt",C),window.addEventListener("appinstalled",w),()=>{window.removeEventListener("beforeinstallprompt",C),window.removeEventListener("appinstalled",w)}},[n,i]),r.useEffect(()=>{if(typeof window>"u")return;const C=window.matchMedia("(display-mode: standalone)"),w=E=>{b(S=>({...S,isInstalled:E.matches}))};return C.addEventListener("change",w),()=>C.removeEventListener("change",w)},[]);const v=r.useCallback(async()=>{if(!g.current)return!1;b(C=>({...C,isInstalling:!0}));try{await g.current.prompt();const{outcome:C}=await g.current.userChoice;return C==="accepted"?!0:(b(w=>({...w,installDismissed:!0,isInstalling:!1})),a?.(),!1)}catch{return b(C=>({...C,isInstalling:!1})),!1}},[a]),y=r.useCallback(()=>{u()},[u]);return{...f,isOnline:o,wasOffline:c,swRegistered:d,hasUpdate:p,isUpdating:m,installApp:v,updateApp:y,checkForUpdate:x,displayMode:Cs(),registration:h}}function qT(t){const n="=".repeat((4-t.length%4)%4),i=(t+n).replace(/-/g,"+").replace(/_/g,"/"),a=window.atob(i),s=new Uint8Array(a.length);for(let o=0;o<a.length;++o)s[o]=a.charCodeAt(o);return s}function Gl(t){const n=t.toJSON();return{endpoint:n.endpoint||"",expirationTime:n.expirationTime??null,keys:{p256dh:n.keys?.p256dh||"",auth:n.keys?.auth||""}}}function VT(t={}){const{vapidPublicKey:n,swRegistration:i,onSubscribe:a,onUnsubscribe:s,onPermissionGranted:o,onPermissionDenied:c,onError:d}=t,[p,m]=r.useState(()=>({isSupported:typeof window<"u"&&"PushManager"in window&&"serviceWorker"in navigator,notificationsSupported:typeof window<"u"&&"Notification"in window,permission:typeof window<"u"&&"Notification"in window?Notification.permission:"default",isSubscribed:!1,isLoading:!1,subscription:null,subscriptionJSON:null,error:null})),h=r.useRef(i||null),u=r.useCallback(async()=>{if(h.current)return h.current;if(!p.isSupported)return null;try{const y=await navigator.serviceWorker.ready;return h.current=y,y}catch{return null}},[p.isSupported]),x=r.useCallback(async()=>{const y=await u();if(!y)return null;try{const C=await y.pushManager.getSubscription();return m(w=>({...w,isSubscribed:!!C,subscription:C,subscriptionJSON:C?Gl(C):null})),C}catch{return null}},[u]),f=r.useCallback(async()=>{if(!p.notificationsSupported)return"denied";try{const y=await Notification.requestPermission();return m(C=>({...C,permission:y})),y==="granted"?o?.():y==="denied"&&c?.(),y}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,error:C})),d?.(C),"denied"}},[p.notificationsSupported,o,c,d]),b=r.useCallback(async()=>{if(!p.isSupported)return null;if(!n){const y=new Error("VAPID public key is required for push subscription");return m(C=>({...C,error:y})),d?.(y),null}m(y=>({...y,isLoading:!0,error:null}));try{if(p.permission!=="granted"&&await f()!=="granted")return m(S=>({...S,isLoading:!1})),null;const y=await u();if(!y)throw new Error("Service Worker not registered");const C=await y.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qT(n)}),w=Gl(C);return m(E=>({...E,isSubscribed:!0,isLoading:!1,subscription:C,subscriptionJSON:w})),a?.(w),w}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,isLoading:!1,error:C})),d?.(C),null}},[p.isSupported,p.permission,n,f,u,a,d]),g=r.useCallback(async()=>{if(!p.subscription)return!0;m(y=>({...y,isLoading:!0,error:null}));try{const y=await p.subscription.unsubscribe();return y?(m(C=>({...C,isSubscribed:!1,isLoading:!1,subscription:null,subscriptionJSON:null})),s?.()):m(C=>({...C,isLoading:!1})),y}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,isLoading:!1,error:C})),d?.(C),!1}},[p.subscription,s,d]),v=r.useCallback(async(y,C)=>{if(!p.notificationsSupported||p.permission!=="granted"&&await f()!=="granted")return null;try{const w=await u();return w?(await w.showNotification(y,C),null):new Notification(y,C)}catch{return null}},[p.notificationsSupported,p.permission,f,u]);return r.useEffect(()=>{p.isSupported&&x()},[p.isSupported,x]),r.useEffect(()=>{if(!p.notificationsSupported)return;const y=()=>{m(w=>({...w,permission:Notification.permission}))},C=setInterval(()=>{Notification.permission!==p.permission&&y()},1e3);return()=>{clearInterval(C)}},[p.notificationsSupported,p.permission]),{...p,requestPermission:f,subscribe:b,unsubscribe:g,showNotification:v,checkSubscription:x}}const UT=Object.assign(r.forwardRef(function(n,i){const{t:a}=l.useNiceTranslation(),{variant:s="banner",position:o="bottom",title:c,description:d,installText:p,dismissText:m,icon:h,appIconUrl:u,persistent:x=!1,delay:f=0,onInstall:b,onDismiss:g,installButton:v,dismissButton:y,animation:C="slide",zIndex:w=1e3,preview:E=!1,className:S,style:N,..._}=n,k=d??a("installPrompt.description","Install this application for quick access and offline support."),j=c??a("installPrompt.installApp","Install App"),T=p??a("installPrompt.install","Install"),P=m??a("installPrompt.notNow","Not now"),{canInstall:B,installApp:R,isInstalled:I}=Cm({registerOnMount:!1}),[D,M]=r.useState(!1),[O,L]=r.useState(f===0);r.useEffect(()=>{if(f>0){const oe=setTimeout(()=>L(!0),f);return()=>clearTimeout(oe)}},[f]);const V=r.useCallback(async()=>{await R()&&b?.()},[R,b]),ee=r.useCallback(()=>{M(!0),g?.()},[g]);if(!E&&(!O||I||!B)||D&&!x)return null;const z=h||(u?e.jsx("img",{src:u,alt:a("installPrompt.appIcon","App icon"),className:"nice-install-prompt__app-icon"}):e.jsx(l.NiceIcon,{name:"download",size:24})),U=v||e.jsx("button",{type:"button",className:"nice-install-prompt__install",onClick:V,children:T}),re=y||e.jsx("button",{type:"button",className:"nice-install-prompt__dismiss",onClick:ee,children:P}),Y=oe=>`nice-install-prompt nice-install-prompt--${oe} nice-install-prompt--${o} ${S||""}`;switch(s){case"modal":return e.jsx("div",{role:"presentation",ref:i,className:Y("modal"),style:{zIndex:w,...N},onClick:ee,..._,children:e.jsxs("div",{role:"presentation",className:"nice-install-prompt__dialog",onClick:oe=>oe.stopPropagation(),children:[e.jsx("div",{className:"nice-install-prompt__icon",children:z}),e.jsx("h3",{className:"nice-install-prompt__title",children:j}),e.jsx("p",{className:"nice-install-prompt__description",children:k}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[U,re]})]})});case"card":return e.jsxs("div",{ref:i,className:Y("card"),style:N,..._,children:[e.jsxs("div",{className:"nice-install-prompt__body",children:[e.jsx("span",{className:"nice-install-prompt__icon",children:z}),e.jsxs("div",{children:[e.jsx("h4",{className:"nice-install-prompt__title",children:j}),e.jsx("p",{className:"nice-install-prompt__description",children:k})]})]}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[U,re]})]});case"mini":return e.jsxs("div",{role:"button",tabIndex:0,onKeyDown:l.clickOnActivationKey,ref:i,className:Y("mini"),style:{zIndex:w,...N},onClick:V,..._,children:[e.jsx(l.NiceIcon,{name:"download",size:24}),e.jsx("span",{className:"nice-install-prompt__label",children:T})]});case"banner":default:return e.jsxs("div",{ref:i,className:Y("banner"),style:{zIndex:w,...N},..._,children:[e.jsxs("div",{className:"nice-install-prompt__body",children:[e.jsx("span",{className:"nice-install-prompt__icon",children:z}),e.jsxs("div",{children:[e.jsx("div",{className:"nice-install-prompt__title",children:j}),e.jsx("div",{className:"nice-install-prompt__description",children:k})]})]}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[re,U]})]})}}),{displayName:"NiceInstallPrompt"}),HT=Object.assign(r.forwardRef(function(n,i){const{t:a}=l.useNiceTranslation(),{variant:s="banner",position:o="bottom",title:c,description:d,updateText:p,dismissText:m,icon:h,autoReload:u=!0,onUpdate:x,onDismiss:f,zIndex:b=1001,preview:g=!1,className:v,style:y,swUrl:C,scope:w,registerOnMount:E,updateInterval:S,onSuccess:N,onError:_,onActivated:k,...j}=n,T=d??a("updatePrompt.description","A new version is ready. Refresh to get the latest features."),P=c??a("updatePrompt.updateAvailable","Update Available"),B=p??a("updatePrompt.updateNow","Update now"),R=m??a("updatePrompt.later","Later"),{hasUpdate:I,isUpdating:D,update:M}=ic({swUrl:C,scope:w,registerOnMount:E,updateInterval:S,onSuccess:N,onError:_,onActivated:()=>{k?.(),u&&window.location.reload()}}),[O,L]=r.useState(!1),V=r.useCallback(()=>{M(),x?.()},[M,x]),ee=r.useCallback(()=>{L(!0),f?.()},[f]);if(!I&&!g||O)return null;const z=h||e.jsx(l.NiceIcon,{name:"refresh",size:24}),U=D?a("updatePrompt.updating","Updating…"):B,re=oe=>`nice-update-prompt nice-update-prompt--${oe} nice-update-prompt--${o} ${v||""}`,Y=e.jsx("button",{type:"button",className:"nice-update-prompt__update",onClick:V,disabled:D,children:U});switch(s){case"modal":return e.jsx("div",{role:"presentation",ref:i,className:re("modal"),style:{zIndex:b,...y},onClick:ee,...j,children:e.jsxs("div",{role:"presentation",className:"nice-update-prompt__dialog",onClick:oe=>oe.stopPropagation(),children:[e.jsx("div",{className:"nice-update-prompt__icon",children:e.jsx(l.NiceIcon,{name:"refresh",size:24})}),e.jsx("h3",{className:"nice-update-prompt__title",children:P}),e.jsx("p",{className:"nice-update-prompt__description",children:T}),e.jsxs("div",{className:"nice-update-prompt__actions",children:[Y,e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss",onClick:ee,children:R})]})]})});case"toast":return e.jsxs("div",{ref:i,className:re("toast"),style:{zIndex:b,...y},...j,children:[e.jsx("span",{className:"nice-update-prompt__icon",children:z}),e.jsxs("div",{className:"nice-update-prompt__text",children:[e.jsx("div",{className:"nice-update-prompt__title",children:P}),e.jsx("div",{className:"nice-update-prompt__description",children:T})]}),Y,e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss nice-update-prompt__dismiss--icon",onClick:ee,"aria-label":a("updatePrompt.dismiss","Dismiss"),children:e.jsx(l.NiceIcon,{name:"close",size:18})})]});case"banner":default:return e.jsxs("div",{ref:i,className:re("banner"),style:{zIndex:b,...y},...j,children:[e.jsxs("div",{className:"nice-update-prompt__body",children:[e.jsx("span",{className:"nice-update-prompt__icon",children:z}),e.jsxs("div",{className:"nice-update-prompt__text",children:[e.jsx("div",{className:"nice-update-prompt__title",children:P}),e.jsx("div",{className:"nice-update-prompt__description",children:T})]})]}),e.jsxs("div",{className:"nice-update-prompt__actions",children:[e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss",onClick:ee,children:R}),Y]})]})}}),{displayName:"NiceUpdatePrompt"}),Sm=({children:t,horizontal:n=!0,vertical:i=!0,inline:a=!1,minHeight:s,className:o="",style:c,testId:d,"data-testid":p})=>{const m={...s!==void 0&&{minHeight:s},...c},h=["nice-center",a?"nice-center--inline":"",n?"nice-center--h":"",i?"nice-center--v":"",o].filter(Boolean).join(" ");return e.jsx("div",{className:h,style:m,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Sm.displayName="NiceCenter");const GT={start:"flex-start",center:"center",end:"flex-end","space-between":"space-between","space-around":"space-around"},WT={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},Tm=({children:t,direction:n="vertical",spacing:i=16,align:a="stretch",justify:s="start",wrap:o=!1,divider:c,className:d="",style:p,testId:m,"data-testid":h})=>{const u={display:"flex",flexDirection:n==="vertical"?"column":"row",gap:typeof i=="number"?`${i}px`:i,alignItems:WT[a],justifyContent:GT[s],flexWrap:o?"wrap":"nowrap",...p},x=r.Children.toArray(t),f=c?x.flatMap((b,g)=>g<x.length-1?[b,e.jsx(r.Fragment,{children:c},`nice-stack-divider-${g}`)]:[b]):x;return e.jsx("div",{className:`nice-stack nice-stack--${n} ${d}`,style:u,"data-testid":h??m,children:f})};process.env.NODE_ENV!=="production"&&(Tm.displayName="NiceStack");const Em=({children:t,direction:n="row",wrap:i="nowrap",justify:a="flex-start",align:s="stretch",gap:o=0,inline:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const u={display:c?"inline-flex":"flex",flexDirection:n,flexWrap:i,justifyContent:a,alignItems:s,gap:typeof o=="number"?`${o}px`:o,...p};return e.jsx("div",{className:`nice-flex ${d}`,style:u,"data-testid":h??m,children:t})};process.env.NODE_ENV!=="production"&&(Em.displayName="NiceFlex");const Im=({size:t,flex:n=1,axis:i="both",className:a="",style:s,testId:o,"data-testid":c})=>{const d={};if(t!==void 0){const p=typeof t=="number"?`${t}px`:t;(i==="horizontal"||i==="both")&&(d.width=p),(i==="vertical"||i==="both")&&(d.height=p),d.flex="0 0 auto"}else d.flex=`${n} 1 0`;return e.jsx("span",{"aria-hidden":"true",className:`nice-spacer nice-spacer--${i} ${a}`,style:{...d,...s},"data-testid":c??o})};process.env.NODE_ENV!=="production"&&(Im.displayName="NiceSpacer");function KT(t){return typeof t=="string"?t.trim():!Number.isFinite(t)||t<=0?"1 / 1":String(t)}const Dm=({children:t,ratio:n="16/9",maxWidth:i,className:a="",style:s,testId:o,"data-testid":c})=>{const d={aspectRatio:KT(n),width:"100%",...i!==void 0&&{maxWidth:typeof i=="number"?`${i}px`:i},...s};return e.jsx("div",{className:`nice-aspect-ratio ${a}`,style:d,"data-testid":c??o,children:t})};process.env.NODE_ENV!=="production"&&(Dm.displayName="NiceAspectRatio");const Pm=({children:t,cite:n,author:i,variant:a="bordered",className:s="",style:o,testId:c,"data-testid":d})=>e.jsxs("blockquote",{cite:n,className:`nice-blockquote nice-blockquote--${a} ${s}`,style:o,"data-testid":d??c,children:[e.jsx("div",{className:"nice-blockquote__content",children:t}),(i||n)&&e.jsxs("footer",{className:"nice-blockquote__footer",children:[i&&e.jsxs("span",{className:"nice-blockquote__author",children:["— ",i]}),n&&e.jsx("cite",{className:"nice-blockquote__cite",children:n})]})]});process.env.NODE_ENV!=="production"&&(Pm.displayName="NiceBlockquote");const Am=({children:t,lines:n=1,expandable:i=!1,expandText:a,collapseText:s,tooltip:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),[u,x]=r.useState(!1),b=i&&u?{}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n,overflow:"hidden",wordBreak:"break-word"};return e.jsxs("span",{className:`nice-truncate ${c}`,style:d,"data-testid":m??p,children:[e.jsx("span",{className:"nice-truncate__text",style:b,title:o?t:void 0,children:t}),i&&e.jsx("button",{type:"button",className:"nice-truncate__toggle",onClick:()=>x(g=>!g),"aria-expanded":u,children:u?s??h("truncate.collapse","Show less"):a??h("truncate.expand","Show more")})]})};process.env.NODE_ENV!=="production"&&(Am.displayName="NiceTruncate");const Rm=({children:t,level:n,size:i,weight:a="semibold",truncate:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m=`h${n}`,u=["nice-heading",`nice-heading--size-${i??(n===1?"3xl":n===2?"2xl":n===3?"xl":n===4?"lg":n===5?"md":"sm")}`,`nice-heading--weight-${a}`,s?"nice-heading--truncate":"",o].filter(Boolean).join(" ");return e.jsx(m,{className:u,style:c,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Rm.displayName="NiceHeading");const $m=({children:t,size:n="md",lead:i=!1,muted:a=!1,className:s="",style:o,testId:c,"data-testid":d})=>{const p=["nice-paragraph",`nice-paragraph--size-${n}`,i?"nice-paragraph--lead":"",a?"nice-paragraph--muted":"",s].filter(Boolean).join(" ");return e.jsx("p",{className:p,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&($m.displayName="NiceParagraph");const Mm=({children:t,href:n,external:i=!1,variant:a="default",underline:s="hover",onClick:o,target:c,rel:d,className:p="",style:m,testId:h,"data-testid":u})=>{const x=c??(i?"_blank":void 0),f=d??(i?"noopener noreferrer":void 0),b=["nice-link",`nice-link--${a}`,`nice-link--underline-${s}`,i?"nice-link--external":"",p].filter(Boolean).join(" ");return e.jsx("a",{href:n,target:x,rel:f,onClick:o,className:b,style:m,"data-testid":u??h,children:t})};process.env.NODE_ENV!=="production"&&(Mm.displayName="NiceLink");const YT={sm:"640px",md:"768px",lg:"1024px",xl:"1280px",full:"100%"},Om=({children:t,size:n="lg",padding:i,centered:a=!0,fluid:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m={maxWidth:s?"100%":YT[n],...a&&{marginInline:"auto"},...i!==void 0&&{paddingInline:typeof i=="number"?`${i}px`:i},...c},h=["nice-container",`nice-container--${n}`,s?"nice-container--fluid":"",o].filter(Boolean).join(" ");return e.jsx("div",{className:h,style:m,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Om.displayName="NiceContainer");const Lm=({children:t,title:n,subtitle:i,actions:a,padding:s,divider:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const h={...s!==void 0&&{padding:typeof s=="number"?`${s}px`:s},...d},u=n||i||a;return e.jsxs("section",{className:`nice-section ${c}`,style:h,"data-testid":m??p,children:[u&&e.jsxs("header",{className:`nice-section__header${o?" nice-section__header--divider":""}`,children:[e.jsxs("div",{className:"nice-section__heading",children:[n&&e.jsx("h2",{className:"nice-section__title",children:n}),i&&e.jsx("p",{className:"nice-section__subtitle",children:i})]}),a&&e.jsx("div",{className:"nice-section__actions",children:a})]}),e.jsx("div",{className:"nice-section__body",children:t})]})};process.env.NODE_ENV!=="production"&&(Lm.displayName="NiceSection");function JT(t,n){return typeof t=="string"?t:Number.isFinite(t)?n!==void 0?t.toLocaleString(void 0,{minimumFractionDigits:n,maximumFractionDigits:n}):t.toLocaleString():String(t)}const ac=({title:t,value:n,prefix:i,suffix:a,precision:s,trend:o,size:c="md",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation();return e.jsxs("div",{className:`nice-statistic nice-statistic--${c} ${d}`,style:p,"data-testid":h??m,children:[e.jsx("div",{className:"nice-statistic__title",children:t}),e.jsxs("div",{className:"nice-statistic__value",children:[i&&e.jsx("span",{className:"nice-statistic__prefix",children:i}),e.jsx("span",{className:"nice-statistic__number",children:JT(n,s)}),a&&e.jsx("span",{className:"nice-statistic__suffix",children:a}),o&&e.jsxs("span",{className:`nice-statistic__trend nice-statistic__trend--${o.direction}`,"aria-label":(o.direction==="up"?u("statistic.trendUp","Trend up {value}%"):u("statistic.trendDown","Trend down {value}%")).replace("{value}",String(o.value)),children:[e.jsx(l.NiceIcon,{name:o.direction==="up"?"arrow-up":"arrow-down",size:12})," ",o.value,"%"]})]})]})};process.env.NODE_ENV!=="production"&&(ac.displayName="NiceStatistic");const QT=Object.freeze(Object.defineProperty({__proto__:null,NiceStatistic:ac},Symbol.toStringTag,{value:"Module"})),XT=e.jsx(l.NiceIcon,{name:"clipboard",size:16}),zm=({text:t,children:n,onCopy:i,successMessage:a,timeout:s=2e3,variant:o="icon",className:c="",style:d,testId:p,"data-testid":m,"aria-label":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(!1),b=r.useRef(null),g=r.useCallback(async()=>{let y=!1;try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(t),y=!0;else if(typeof document<"u"){const C=document.createElement("textarea");C.value=t,C.setAttribute("readonly",""),C.style.position="absolute",C.style.left="-9999px",document.body.appendChild(C),C.select(),y=document.execCommand("copy"),document.body.removeChild(C)}}catch{y=!1}y&&(i?.(t),f(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>f(!1),s))},[t,i,s]),v=x?a??u("copy.success","Copied!"):n??(o==="icon"?XT:u("copy.label","Copy"));return e.jsx("button",{type:"button",onClick:g,"aria-label":h??(n==null&&o==="icon"?u("copy.aria","Copy to clipboard"):void 0),"data-testid":m??p,"data-copied":x||void 0,className:`nice-copy-button nice-copy-button--${o} ${x?"nice-copy-button--copied":""} ${c}`,style:d,children:v})};process.env.NODE_ENV!=="production"&&(zm.displayName="NiceCopyButton");function Bm(){return`clip_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function Fm(t){try{const n=JSON.parse(t);if(Array.isArray(n)||typeof n=="object"&&n!==null)return"json"}catch{}return/<[a-z][\s\S]*>/i.test(t)?"html":t.startsWith("data:image/")?"image":"text"}function qm(t,n=80){const i=t.replace(/\s+/g," ").trim();return i.length<=n?i:i.slice(0,n-3)+"..."}const ZT={text:"edit",json:"hash",record:"clipboard",file:"file",image:"image",html:"globe",custom:"box"},eE=Object.assign(r.forwardRef(({entries:t,onEntriesChange:n,onPaste:i,onCopy:a,maxEntries:s=20,enableShortcuts:o=!0,persist:c=!0,storageKey:d="nice-clipboard-stack",open:p,onOpenChange:m,size:h="md",position:u="bottom-right",showTrigger:x=!0,trigger:f,showTypeIcons:b=!0,showTimestamps:g=!0,draggable:v=!0,renderEntry:y,className:C,style:w,id:E,accessMode:S,disabled:N,..._},k)=>{const j=l.useControlId(E),T=l.useNiceAccessMode(S,E),{t:P}=l.useNiceTranslation(),B=r.useRef(null),[R,I]=r.useState([]),[D,M]=r.useState(!1),[O,L]=r.useState(null),[V,ee]=r.useState(""),z=t??R,U=p??D,re=r.useCallback(A=>{p===void 0&&M(A),m?.(A)},[p,m]),Y=r.useCallback(A=>{t===void 0&&I(A),n?.(A)},[t,n]);r.useEffect(()=>{if(!(!c||t!==void 0))try{const A=localStorage.getItem(d);if(A){const Z=JSON.parse(A);I(Z)}}catch{}},[c,d,t]),r.useEffect(()=>{if(!(!c||t!==void 0))try{localStorage.setItem(d,JSON.stringify(z))}catch{}},[c,d,z,t]),r.useCallback((A,Z={})=>{const fe=Z.type??Fm(A),Ne={id:Bm(),type:fe,content:A,preview:qm(A),copiedAt:Date.now(),...Z};if(fe==="json")try{Ne.parsedValue=JSON.parse(A)}catch{}return Y([Ne,...z.filter(K=>K.id!==Ne.id)].slice(0,s)),a?.(Ne),Ne},[z,s,Y,a]);const oe=r.useCallback(A=>{Y(z.filter(Z=>Z.id!==A))},[z,Y]),q=r.useCallback((A,Z)=>{Y(z.map(fe=>fe.id===A?{...fe,isPinned:Z}:fe))},[z,Y]),se=r.useCallback(A=>{navigator.clipboard?.writeText(A.content),i?.(A),re(!1)},[i,re]),ce=r.useCallback(()=>{Y(z.filter(A=>A.isPinned))},[z,Y]),le=r.useCallback((A,Z)=>{const fe=[...z],[Ne]=fe.splice(A,1);fe.splice(Z,0,Ne),Y(fe)},[z,Y]);r.useEffect(()=>{if(!o||N)return;const A=Z=>{(Z.ctrlKey||Z.metaKey)&&Z.shiftKey&&(Z.key==="v"||Z.key==="V")?(Z.preventDefault(),re(!U)):Z.key==="Escape"&&U&&(Z.preventDefault(),re(!1))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[o,N,U,re]),r.useEffect(()=>{if(!U)return;const A=Z=>{B.current&&!B.current.contains(Z.target)&&re(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[U,re]);const J=r.useMemo(()=>{if(!V)return z;const A=V.toLowerCase();return z.filter(Z=>Z.content.toLowerCase().includes(A)||Z.label?.toLowerCase().includes(A)||Z.source?.toLowerCase().includes(A))},[z,V]),me=r.useCallback(A=>{v&&L(A)},[v]),je=r.useCallback(A=>{A.preventDefault()},[]),ue=r.useCallback(A=>{O===null||O===A||(le(O,A),L(null))},[O,le]);if(T==="hidden")return null;const F=T==="disabled"||N,H=A=>{const Z=Date.now()-A;return Z<6e4?P("time.justNow","Just now"):Z<36e5?`${Math.floor(Z/6e4)}m ${P("time.ago","ago")}`:Z<864e5?`${Math.floor(Z/36e5)}h ${P("time.ago","ago")}`:new Date(A).toLocaleDateString()};return e.jsxs("div",{ref:A=>{B.current=A,typeof k=="function"?k(A):k&&(k.current=A)},id:j,className:`nice-clipboard nice-clipboard--${h} nice-clipboard--${u}${F?" nice-clipboard--disabled":""}${C?` ${C}`:""}`,style:w,..._,children:[x&&(f??e.jsxs("button",{type:"button",className:"nice-clipboard__trigger",onClick:()=>re(!U),disabled:F,"aria-label":P("clipboard.history","Clipboard History"),"aria-expanded":U,title:`${P("clipboard.history","Clipboard History")} (Ctrl+Shift+V)`,children:[e.jsx(l.NiceIcon,{name:"clipboard",size:16}),z.length>0&&e.jsx("span",{className:"nice-clipboard__badge",children:z.length})]})),U&&e.jsxs("div",{className:"nice-clipboard__dropdown",children:[e.jsxs("div",{className:"nice-clipboard__header",children:[e.jsx("span",{className:"nice-clipboard__title",children:P("clipboard.history","Clipboard History")}),e.jsx("div",{className:"nice-clipboard__actions",children:e.jsx("button",{type:"button",className:"nice-clipboard__action",onClick:ce,disabled:z.filter(A=>!A.isPinned).length===0,title:P("clipboard.clearAll","Clear all"),"aria-label":P("clipboard.clearAll","Clear all"),children:e.jsx(l.NiceIcon,{name:"trash",size:16})})})]}),e.jsx("div",{className:"nice-clipboard__search",children:e.jsx("input",{type:"text",placeholder:P("clipboard.search","Search..."),value:V,onChange:A=>ee(A.target.value),className:"nice-clipboard__search-input"})}),e.jsx("div",{className:"nice-clipboard__list",children:J.length===0?e.jsx("div",{className:"nice-clipboard__empty",children:z.length===0?P("clipboard.empty","Clipboard is empty"):P("clipboard.noResults","No matching entries")}):J.map((A,Z)=>e.jsxs("div",{className:`nice-clipboard__entry${A.isPinned?" nice-clipboard__entry--pinned":""}${O===Z?" nice-clipboard__entry--dragging":""}`,draggable:v,onDragStart:()=>me(Z),onDragOver:je,onDrop:()=>ue(Z),onClick:()=>se(A),role:"button",tabIndex:0,onKeyDown:fe=>fe.key==="Enter"&&se(A),children:[b&&e.jsx("span",{className:"nice-clipboard__entry-icon",children:e.jsx(l.NiceIcon,{name:ZT[A.type],size:16})}),e.jsx("div",{className:"nice-clipboard__entry-content",children:y?y(A):e.jsxs(e.Fragment,{children:[A.label&&e.jsx("span",{className:"nice-clipboard__entry-label",children:A.label}),e.jsx("span",{className:"nice-clipboard__entry-preview",children:A.type==="image"&&A.imageMeta?.dataUrl?e.jsx("img",{src:A.imageMeta.dataUrl,alt:P("clipboard.clipboardImage","Clipboard image"),className:"nice-clipboard__entry-thumb"}):A.preview||A.content.slice(0,80)}),g&&e.jsx("span",{className:"nice-clipboard__entry-time",children:H(A.copiedAt)})]})}),e.jsxs("div",{className:"nice-clipboard__entry-actions",children:[e.jsx("button",{type:"button",className:`nice-clipboard__pin${A.isPinned?" nice-clipboard__pin--active":""}`,onClick:fe=>{fe.stopPropagation(),q(A.id,!A.isPinned)},title:A.isPinned?P("clipboard.unpin","Unpin"):P("clipboard.pin","Pin"),"aria-label":A.isPinned?P("clipboard.unpin","Unpin"):P("clipboard.pin","Pin"),children:e.jsx(l.NiceIcon,{name:"map-pin",size:16})}),e.jsx("button",{type:"button",className:"nice-clipboard__remove",onClick:fe=>{fe.stopPropagation(),oe(A.id)},title:P("clipboard.remove","Remove"),"aria-label":P("clipboard.remove","Remove"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]})]},A.id))}),e.jsxs("div",{className:"nice-clipboard__footer",children:[e.jsxs("span",{className:"nice-clipboard__count",children:[z.length," / ",s," ",P("clipboard.entries","entries")]}),e.jsx("span",{className:"nice-clipboard__hint",children:"Ctrl+Shift+V"})]})]})]})}),{displayName:"NiceClipboardStack"});function tE(t={}){const{maxEntries:n=20,storageKey:i="nice-clipboard-stack",persist:a=!0,onCopy:s,onPaste:o}=t,[c,d]=r.useState([]);r.useEffect(()=>{if(a)try{const b=localStorage.getItem(i);b&&d(JSON.parse(b))}catch{}},[a,i]),r.useEffect(()=>{if(a)try{localStorage.setItem(i,JSON.stringify(c))}catch{}},[a,i,c]);const p=r.useCallback((b,g={})=>{const v=g.type??Fm(b),y={id:Bm(),type:v,content:b,preview:qm(b),copiedAt:Date.now(),...g};if(v==="json")try{y.parsedValue=JSON.parse(b)}catch{}return navigator.clipboard?.writeText(b),d(C=>[y,...C.filter(w=>w.id!==y.id)].slice(0,n)),s?.(y),y},[n,s]),m=r.useCallback(b=>(navigator.clipboard?.writeText(b.content),o?.(b),b.content),[o]),h=r.useCallback(b=>{d(g=>g.filter(v=>v.id!==b))},[]),u=r.useCallback((b,g)=>{d(v=>v.map(y=>y.id===b?{...y,isPinned:g}:y))},[]),x=r.useCallback((b=!0)=>{d(g=>b?g.filter(v=>v.isPinned):[])},[]),f=r.useCallback((b,g)=>{d(v=>{const y=[...v],[C]=y.splice(b,1);return y.splice(g,0,C),y})},[]);return{entries:c,copy:p,paste:m,remove:h,pin:u,clear:x,reorder:f,canUndo:c.length>0}}const nE={info:"info",warning:"warning",error:"close",success:"check",tip:"lightbulb"},Vm=({children:t,type:n="info",title:i,icon:a,closable:s=!1,onClose:o,size:c="md",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(!1);if(x)return null;const b=()=>{f(!0),o?.()},g=n==="error"?"alert":"status";return e.jsxs("div",{className:`nice-callout nice-callout--${n} nice-callout--${c} ${d}`,style:p,role:g,"data-testid":h??m,children:[e.jsx("span",{className:"nice-callout__icon","aria-hidden":"true",children:a??e.jsx(l.NiceIcon,{name:nE[n],size:18})}),e.jsxs("div",{className:"nice-callout__body",children:[i&&e.jsx("div",{className:"nice-callout__title",children:i}),e.jsx("div",{className:"nice-callout__content",children:t})]}),s&&e.jsx("button",{type:"button",className:"nice-callout__close",onClick:b,"aria-label":u("callout.dismiss","Dismiss"),children:e.jsx(l.NiceIcon,{name:"close",size:16})})]})};process.env.NODE_ENV!=="production"&&(Vm.displayName="NiceCallout");const Um=({children:t,onClickOutside:n,disabled:i=!1,mouseEvent:a="mousedown",className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useRef(null);return r.useEffect(()=>{if(i)return;const m=h=>{!p.current||p.current.contains(h.target)||n(h)};return document.addEventListener(a,m),document.addEventListener("touchstart",m),()=>{document.removeEventListener(a,m),document.removeEventListener("touchstart",m)}},[i,a,n]),e.jsx("div",{ref:p,className:`nice-click-outside ${s}`,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&(Um.displayName="NiceClickOutside");const iE='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',Hm=({children:t,active:n=!0,initialFocus:i,returnFocus:a=!0,className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useRef(null);return r.useEffect(()=>{if(!n||!p.current)return;const m=p.current,h=document.activeElement,u=()=>Array.from(m.querySelectorAll(iE)).filter(b=>!b.hasAttribute("disabled")&&b.tabIndex!==-1);(()=>{if(i&&typeof i!="string"&&i.current){i.current.focus();return}if(typeof i=="string"){const g=m.querySelector(i);if(g){g.focus();return}}(u()[0]??m).focus()})();const f=b=>{if(b.key!=="Tab")return;const g=u();if(g.length===0){b.preventDefault();return}const v=g[0],y=g[g.length-1];b.shiftKey&&document.activeElement===v?(b.preventDefault(),y.focus()):!b.shiftKey&&document.activeElement===y&&(b.preventDefault(),v.focus())};return m.addEventListener("keydown",f),()=>{m.removeEventListener("keydown",f),a&&h&&document.contains(h)&&h.focus()}},[n,i,a]),e.jsx("div",{ref:p,tabIndex:-1,className:`nice-focus-trap ${s}`,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&(Hm.displayName="NiceFocusTrap");const Gm=({children:t,politeness:n="polite",atomic:i=!1,relevant:a="additions text",visible:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m=s?{}:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};return e.jsx("div",{role:"status","aria-live":n,"aria-atomic":i||void 0,"aria-relevant":a,className:`nice-live-region ${s?"":"nice-live-region--visually-hidden"} ${o}`,style:{...m,...c},"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Gm.displayName="NiceLiveRegion");const Wm=({children:t,fallback:n,delay:i=0})=>e.jsx(r.Suspense,{fallback:e.jsx(aE,{delay:i,children:n}),children:t});process.env.NODE_ENV!=="production"&&(Wm.displayName="NiceSuspense");const aE=({delay:t,children:n})=>{const[i,a]=r.useState(t<=0);return r.useEffect(()=>{if(t<=0)return;const s=setTimeout(()=>a(!0),t);return()=>clearTimeout(s)},[t]),i?e.jsx(e.Fragment,{children:n}):null};function sE(t,n){if(t===void 0)return null;const i=l.resolveScrollContainer(t,n);return i instanceof Element?i:null}const rE=[],Km=({items:t=rE,affix:n=!0,offsetTop:i=0,targetOffset:a=0,onChange:s,scrollContainer:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),[u,x]=r.useState(null),f=r.useRef(null);r.useEffect(()=>{if(typeof IntersectionObserver>"u")return;const y=Ym(t).map(w=>document.getElementById(w)).filter(w=>w!=null);if(y.length===0)return;const C=new IntersectionObserver(w=>{const E=w.filter(S=>S.isIntersecting).sort((S,N)=>S.boundingClientRect.top-N.boundingClientRect.top);if(E[0]){const S=E[0].target.id;x(N=>(N!==S&&s?.(S),S))}},{root:sE(o,f.current),rootMargin:`-${i}px 0px -50% 0px`});return y.forEach(w=>C.observe(w)),()=>C.disconnect()},[t,i,s,o]);const b=r.useCallback((v,y)=>{v.preventDefault();const C=document.getElementById(y);if(!C)return;const w=l.resolveScrollContainer(o,f.current);w.scrollTo({top:l.scrollTopFor(w,C,a),behavior:"smooth"})},[a,o]),g={...n&&{position:"sticky",top:i},...d};return e.jsx("nav",{ref:f,className:`nice-anchor ${n?"nice-anchor--affix":""} ${c}`,style:g,"aria-label":h("anchor.aria","Table of contents"),"data-testid":m??p,children:e.jsx(Jm,{items:t,active:u,onClick:b})})};process.env.NODE_ENV!=="production"&&(Km.displayName="NiceAnchor");function Ym(t){const n=[];for(const i of t)n.push(i.href),i.children&&n.push(...Ym(i.children));return n}const Jm=({items:t,active:n,onClick:i})=>e.jsx("ul",{className:"nice-anchor__list",children:t.map(a=>e.jsxs("li",{className:`nice-anchor__item ${n===a.href?"nice-anchor__item--active":""}`,children:[e.jsx("a",{href:`#${a.href}`,className:"nice-anchor__link",onClick:s=>i(s,a.href),"aria-current":n===a.href?"true":void 0,children:a.title}),a.children&&a.children.length>0&&e.jsx(Jm,{items:a.children,active:n,onClick:i})]},a.href))}),Qm=({visibilityHeight:t=400,target:n,duration:i=450,children:a,onScroll:s,className:o="",style:c,testId:d,"data-testid":p})=>{const{t:m}=l.useNiceTranslation(),[h,u]=r.useState(!1),x=r.useCallback(()=>n?n():typeof window>"u"?void 0:window,[n]);r.useEffect(()=>{const b=x();if(!b)return;const g=()=>b instanceof Window?window.scrollY:b.scrollTop,v=()=>u(g()>=t);return v(),b.addEventListener("scroll",v,{passive:!0}),()=>b.removeEventListener("scroll",v)},[x,t]);const f=r.useCallback(()=>{const b=x();if(!b)return;const g=performance.now(),v=b instanceof Window?window.scrollY:b.scrollTop;if(v===0){s?.();return}const y=C=>{const w=Math.min(1,(C-g)/i),E=1-Math.pow(1-w,3),S=v*(1-E);b instanceof Window?window.scrollTo(0,S):b.scrollTop=S,w<1?requestAnimationFrame(y):s?.()};requestAnimationFrame(y)},[i,s,x]);return h?e.jsx("button",{type:"button",onClick:f,"aria-label":m("backTop.aria","Back to top"),className:`nice-back-top ${o}`,style:c,"data-testid":p??d,children:a??e.jsx(l.NiceIcon,{name:"arrow-up",size:18})}):null};process.env.NODE_ENV!=="production"&&(Qm.displayName="NiceBackTop");const Xm=({children:t,offsetTop:n,offsetBottom:i,target:a,onChange:s,className:o="",style:c,testId:d,"data-testid":p})=>{const m=r.useRef(null),h=r.useRef(null),[u,x]=r.useState(!1),[f,b]=r.useState(null);r.useEffect(()=>{const v=a?a():typeof window<"u"?window:null;if(!v||!m.current)return;const y=m.current,C=()=>{const w=y.getBoundingClientRect(),E=v instanceof Window?window.innerHeight:v.clientHeight;let S=!1;(n!==void 0&&w.top<n||i!==void 0&&E-w.bottom<i)&&(S=!0),x(N=>{if(N!==S&&(s?.(S),S&&h.current)){const _=h.current.getBoundingClientRect();b({width:_.width,height:_.height})}return S})};return C(),v.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C),()=>{v.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[n,i,a,s]);const g=u?{position:"fixed",...n!==void 0&&{top:n},...i!==void 0&&{bottom:i},width:f?.width,zIndex:10}:{};return e.jsx("div",{ref:m,"data-testid":p??d,className:`nice-affix ${u?"nice-affix--affixed":""} ${o}`,style:{...u&&f&&{height:f.height},...c},children:e.jsx("div",{ref:h,className:"nice-affix__content",style:g,children:t})})};process.env.NODE_ENV!=="production"&&(Xm.displayName="NiceAffix");const oE={start:"flex-start",center:"center",end:"flex-end"},Zm=({media:t,children:n,mediaPosition:i="start",align:a="start",spacing:s=16,className:o="",style:c,testId:d,"data-testid":p})=>{const m={display:"flex",alignItems:oE[a],gap:typeof s=="number"?`${s}px`:s,flexDirection:i==="start"?"row":"row-reverse",...c};return e.jsxs("div",{className:`nice-media-object ${o}`,style:m,"data-testid":p??d,children:[e.jsx("div",{className:"nice-media-object__media",children:t}),e.jsx("div",{className:"nice-media-object__content",children:n})]})};process.env.NODE_ENV!=="production"&&(Zm.displayName="NiceMediaObject");function Wl(t,n,i){const a=t.toFixed(n),[s,o]=a.split("."),c=s.replace(/\B(?=(\d{3})+(?!\d))/g,i);return o?`${c}.${o}`:c}const eh=({end:t,start:n=0,duration:i=2,decimals:a=0,prefix:s,suffix:o,separator:c=",",onComplete:d,className:p="",style:m,testId:h,"data-testid":u})=>{const[x,f]=r.useState(n),b=r.useRef(!1);return r.useEffect(()=>{b.current=!1;const g=performance.now(),v=t-n,y=Math.max(0,i*1e3);if(y===0){f(t),d?.();return}let C=0;const w=E=>{const S=Math.min(1,(E-g)/y),N=1-Math.pow(1-S,3);f(n+v*N),S<1?C=requestAnimationFrame(w):b.current||(b.current=!0,d?.())};return C=requestAnimationFrame(w),()=>cancelAnimationFrame(C)},[t,n,i,d]),e.jsxs("span",{className:`nice-count-up ${p}`,style:m,"data-testid":u??h,"aria-label":`${s??""}${Wl(t,a,c)}${o??""}`,children:[s,Wl(x,a,c),o]})};process.env.NODE_ENV!=="production"&&(eh.displayName="NiceCountUp");function Kl(t){const n=Date.now(),i=Math.max(0,t-n),a=Math.floor(i/1e3)%60,s=Math.floor(i/(1e3*60))%60,o=Math.floor(i/(1e3*60*60))%24;return{days:Math.floor(i/(1e3*60*60*24)),hours:o,minutes:s,seconds:a,total:i}}const Yl={days:0,hours:0,minutes:0,seconds:0,total:0},cE=t=>String(t).padStart(2,"0"),th=({targetDate:t,onComplete:n,format:i="full",showDays:a=!0,showHours:s=!0,showMinutes:o=!0,showSeconds:c=!0,labels:d,className:p="",style:m,testId:h,"data-testid":u})=>{const{t:x}=l.useNiceTranslation(),f=t?.getTime(),[b,g]=r.useState(()=>f===void 0?Yl:Kl(f)),v=r.useRef(!1);r.useEffect(()=>{if(v.current=!1,f===void 0){g(Yl);return}const E=()=>{const N=Kl(f);g(N),N.total===0&&!v.current&&(v.current=!0,n?.())};E();const S=setInterval(E,1e3);return()=>clearInterval(S)},[f,n]);const y=(E,S)=>d?.[E]??x(`countdown.${E}`,S),C=[];a&&C.push({value:b.days,full:y("days","days"),short:"d"}),s&&C.push({value:b.hours,full:y("hours","hours"),short:"h"}),o&&C.push({value:b.minutes,full:y("minutes","minutes"),short:"m"}),c&&C.push({value:b.seconds,full:y("seconds","seconds"),short:"s"});const w=i==="minimal"?C.map(E=>cE(E.value)).join(":"):i==="compact"?C.map(E=>`${E.value}${E.short}`).join(" "):C.map(E=>`${E.value} ${E.full}`).join(" ");return e.jsx("span",{className:`nice-countdown nice-countdown--${i} ${p}`,style:m,"data-testid":u??h,role:"timer","aria-live":"polite",children:w})};process.env.NODE_ENV!=="production"&&(th.displayName="NiceCountdown");const ma=t=>String(t).padStart(2,"0");function Na(t,n="seconds"){const i=Math.max(0,Math.floor(t)),a=Math.floor(i/36e5),s=Math.floor(i/6e4)%60,o=Math.floor(i/1e3)%60,c=a>0?`${a}:${ma(s)}:${ma(o)}`:`${ma(s)}:${ma(o)}`;return n==="tenths"?`${c}.${Math.floor(i/100)%10}`:n==="hundredths"?`${c}.${ma(Math.floor(i/10)%100)}`:c}const nh={seconds:250,tenths:50,hundredths:31},ss=()=>typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();function ih(t,n){const[i,a]=r.useState(0),s=r.useRef({accumulated:0,startedAt:null}),o=r.useCallback(()=>{const d=s.current;return d.accumulated+(d.startedAt===null?0:ss()-d.startedAt)},[]);r.useEffect(()=>{const d=s.current;if(!t){d.startedAt!==null&&(d.accumulated+=ss()-d.startedAt,d.startedAt=null,a(d.accumulated));return}d.startedAt===null&&(d.startedAt=ss());const p=setInterval(()=>a(o()),n);return()=>clearInterval(p)},[t,n,o]);const c=r.useCallback(()=>{const d=s.current;d.accumulated=0,d.startedAt!==null&&(d.startedAt=ss()),a(0)},[]);return{elapsed:i,read:o,reset:c}}const Jl=[],lE=({running:t,defaultRunning:n=!1,onRunningChange:i,laps:a,defaultLaps:s,onLapsChange:o,onReset:c,precision:d="hundredths",showLaps:p=!0,label:m,size:h="md",className:u="",style:x,id:f,testId:b,accessMode:g,"data-testid":v})=>{const{t:y}=l.useNiceTranslation(),C=l.useNiceAccessMode(g,f),w=C==="disabled"||C==="readOnly",[E,S]=l.useControllableState({value:t,defaultValue:n,onChange:i,componentName:"NiceStopwatch"}),[N,_]=l.useControllableState({value:a,defaultValue:s,fallbackValue:Jl,onChange:o,componentName:"NiceStopwatch"}),{elapsed:k,read:j,reset:T}=ih(E,nh[d]),P=r.useMemo(()=>N.map((O,L)=>({n:L+1,total:O,split:O-(L>0?N[L-1]:0)})),[N]),[B,R]=r.useMemo(()=>{if(P.length<3)return[-1,-1];let O=0,L=0;return P.forEach((V,ee)=>{V.split<P[O].split&&(O=ee),V.split>P[L].split&&(L=ee)}),[O,L]},[P]);if(C==="hidden")return null;const I=l.normalizeSize(h),D=m??y("stopwatch.label","Stopwatch"),M=E?y("stopwatch.pause","Pause"):k>0?y("stopwatch.resume","Resume"):y("stopwatch.start","Start");return e.jsxs("div",{id:f,className:`nice-stopwatch nice-stopwatch--${I} ${E?"nice-stopwatch--running":""} ${u}`,style:x,"data-testid":b??v,children:[m&&e.jsx("div",{className:"nice-stopwatch__label",children:m}),e.jsx("div",{className:"nice-stopwatch__time",role:"timer","aria-label":D,children:Na(k,d)}),e.jsxs("div",{className:"nice-stopwatch__controls",children:[e.jsx(Fe.NiceButton,{size:I,variant:E?"secondary":"primary",onClick:()=>S(!E),disabled:w,children:M}),p&&e.jsx(Fe.NiceButton,{size:I,variant:"outline",onClick:()=>_(O=>[...O,Math.round(j())]),disabled:w||!E,children:y("stopwatch.lap","Lap")}),e.jsx(Fe.NiceButton,{size:I,variant:"outline",onClick:()=>{T(),_(Jl),c?.()},disabled:w||E||k===0&&N.length===0,children:y("stopwatch.reset","Reset")})]}),p&&P.length>0&&e.jsx("ol",{className:"nice-stopwatch__laps","aria-label":y("stopwatch.laps","Laps"),"aria-live":"polite",children:P.map((O,L)=>e.jsxs("li",{className:`nice-stopwatch__lap ${L===B?"nice-stopwatch__lap--fastest":""} ${L===R?"nice-stopwatch__lap--slowest":""}`,children:[e.jsxs("span",{className:"nice-stopwatch__lap-name",children:[y("stopwatch.lapNumber","Lap")," ",O.n,L===B&&e.jsx("span",{className:"nice-stopwatch__lap-tag",children:y("stopwatch.fastest","fastest")}),L===R&&e.jsx("span",{className:"nice-stopwatch__lap-tag",children:y("stopwatch.slowest","slowest")})]}),e.jsx("span",{className:"nice-stopwatch__lap-split",children:Na(O.split,d)}),e.jsx("span",{className:"nice-stopwatch__lap-total",children:Na(O.total,d)})]},O.n)).reverse()})]})},Un=6e4,dE=[1*Un,5*Un,10*Un,25*Un];function uE(t,n){const i=Math.floor(t/36e5),a=Math.floor(t/Un)%60,s=Math.floor(t/1e3)%60,o=[];return i&&o.push(`${i} ${n.h}`),a&&o.push(`${a} ${n.min}`),(s||o.length===0)&&o.push(`${s} ${n.s}`),o.join(" ")}const pE=({duration:t,defaultDuration:n=5*Un,onDurationChange:i,running:a,defaultRunning:s=!1,onRunningChange:o,onComplete:c,presets:d=dE,editable:p=!0,precision:m="seconds",showProgress:h=!0,label:u,size:x="md",className:f="",style:b,id:g,testId:v,accessMode:y,"data-testid":C})=>{const{t:w}=l.useNiceTranslation(),E=l.useNiceAccessMode(y,g),S=E==="disabled"||E==="readOnly",[N,_]=l.useControllableState({value:t,defaultValue:n,onChange:i,componentName:"NiceCountdownTimer"}),[k,j]=l.useControllableState({value:a,defaultValue:s,onChange:o,componentName:"NiceCountdownTimer"}),{elapsed:T,reset:P}=ih(k,nh[m]),B=Math.max(0,N-T),R=N>0&&B===0,I=r.useRef(!1),D=r.useRef(c);if(D.current=c,r.useEffect(()=>{if(!R){I.current=!1;return}I.current||(I.current=!0,j(!1),D.current?.())},[R,j]),E==="hidden")return null;const M=l.normalizeSize(x),O=T===0&&!k,L=u??w("timer.label","Timer"),V=m==="seconds"?Na(Math.ceil(B/1e3)*1e3,"seconds"):Na(Math.ceil(B/100)*100,"tenths"),ee={h:w("timer.hoursShort","h"),min:w("timer.minutesShort","min"),s:w("timer.secondsShort","s")},z={h:Math.floor(N/36e5),m:Math.floor(N/Un)%60,s:Math.floor(N/1e3)%60},U=(Y,oe)=>{const q={...z,[Y]:Math.max(0,Math.round(oe??0))};_(q.h*36e5+q.m*Un+q.s*1e3)},re=k?w("timer.pause","Pause"):O||R?w("timer.start","Start"):w("timer.resume","Resume");return e.jsxs("div",{id:g,className:`nice-countdown-timer nice-countdown-timer--${M} ${k?"nice-countdown-timer--running":""} ${R?"nice-countdown-timer--done":""} ${f}`,style:b,"data-testid":v??C,children:[u&&e.jsx("div",{className:"nice-countdown-timer__label",children:u}),e.jsx("div",{className:"nice-countdown-timer__time",role:"timer","aria-label":L,children:V}),R&&e.jsx("div",{className:"nice-countdown-timer__done",role:"status",children:w("timer.done","Time's up")}),h&&e.jsx("div",{className:"nice-countdown-timer__progress",role:"progressbar","aria-label":w("timer.timeLeft","Time left"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":N>0?Math.round(B/N*100):0,children:e.jsx("div",{className:"nice-countdown-timer__progress-bar",style:{width:`${N>0?B/N*100:0}%`}})}),O&&p&&e.jsxs("div",{className:"nice-countdown-timer__fields",children:[e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.hours","Hours"),min:0,max:99,value:z.h,onChange:Y=>U("h",Y),disabled:S}),e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.minutes","Minutes"),min:0,max:59,value:z.m,onChange:Y=>U("m",Y),disabled:S}),e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.seconds","Seconds"),min:0,max:59,value:z.s,onChange:Y=>U("s",Y),disabled:S})]}),O&&d.length>0&&e.jsx("div",{className:"nice-countdown-timer__presets",children:d.map(Y=>e.jsx(Fe.NiceButton,{size:"sm",variant:Y===N?"primary":"outline","aria-pressed":Y===N,onClick:()=>_(Y),disabled:S,children:uE(Y,ee)},Y))}),e.jsxs("div",{className:"nice-countdown-timer__controls",children:[e.jsx(Fe.NiceButton,{size:M,variant:k?"secondary":"primary",onClick:()=>{R&&P(),j(!k)},disabled:S||N<=0,children:re}),e.jsx(Fe.NiceButton,{size:M,variant:"outline",onClick:()=>{j(!1),P()},disabled:S||O,children:w("timer.reset","Reset")})]})]})},ah=({children:t,title:n,extra:i,defaultCollapsed:a=!1,collapsed:s,onCollapse:o,collapseTrigger:c="icon",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(a),b=s!==void 0,g=b?s:x,v=r.useId(),y=r.useCallback(E=>{b||f(E),o?.(E)},[b,o]),C=r.useCallback(()=>y(!g),[g,y]),w=c==="header"?{onClick:C,role:"button",tabIndex:0,"aria-expanded":!g,"aria-controls":v,onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),C())}}:{};return e.jsxs("div",{className:`nice-collapsible-card ${g?"nice-collapsible-card--collapsed":""} ${d}`,style:p,"data-testid":h??m,children:[e.jsxs("div",{className:"nice-collapsible-card__header",...w,children:[e.jsx("div",{className:"nice-collapsible-card__title",children:n}),i&&e.jsx("div",{className:"nice-collapsible-card__extra",children:i}),e.jsx("button",{type:"button",className:"nice-collapsible-card__chevron","aria-expanded":!g,"aria-controls":v,"aria-label":g?u("collapsibleCard.expand","Expand"):u("collapsibleCard.collapse","Collapse"),onClick:E=>{E.stopPropagation(),C()},children:e.jsx(l.NiceIcon,{name:g?"chevron-right":"chevron-down",size:16})})]}),e.jsx("div",{id:v,className:"nice-collapsible-card__body",hidden:g,children:t})]})};process.env.NODE_ENV!=="production"&&(ah.displayName="NiceCollapsibleCard");const sh=({children:t,text:n,color:i,placement:a="end",className:s="",style:o,testId:c,"data-testid":d})=>{const p=i?{backgroundColor:i}:{};return e.jsxs("div",{className:`nice-ribbon-wrap nice-ribbon-wrap--${a} ${s}`,style:{position:"relative",...o},"data-testid":d??c,children:[t,e.jsx("span",{className:`nice-ribbon nice-ribbon--${a}`,style:p,children:n})]})};process.env.NODE_ENV!=="production"&&(sh.displayName="NiceRibbon");const rh=({children:t,expanded:n,defaultExpanded:i=!1,onExpandedChange:a,trigger:s,animated:o=!0,disabled:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const[u,x]=r.useState(i),f=n!==void 0,b=f?n:u,g=r.useId(),v=`${g}-trigger`,y=r.useCallback(()=>{if(c)return;const C=!b;f||x(C),a?.(C)},[c,b,f,a]);return e.jsxs("div",{className:`nice-collapse ${b?"nice-collapse--expanded":""} ${o?"nice-collapse--animated":""} ${d}`,style:p,"data-testid":h??m,children:[e.jsx("button",{type:"button",id:v,className:"nice-collapse__trigger","aria-expanded":b,"aria-controls":g,disabled:c,onClick:y,children:s}),e.jsx("div",{id:g,className:"nice-collapse__panel",role:"region","aria-labelledby":v,hidden:!b,children:t})]})};process.env.NODE_ENV!=="production"&&(rh.displayName="NiceCollapse");const oh=({children:t,links:n,copyright:i,social:a,sticky:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m={...s&&{position:"sticky",bottom:0},...c};return e.jsxs("footer",{className:`nice-footer ${s?"nice-footer--sticky":""} ${o}`,style:m,"data-testid":p??d,children:[t&&e.jsx("div",{className:"nice-footer__content",children:t}),n&&n.length>0&&e.jsx("div",{className:"nice-footer__columns",children:n.map((h,u)=>e.jsxs("nav",{className:"nice-footer__column","aria-label":typeof h.title=="string"?h.title:void 0,children:[e.jsx("h3",{className:"nice-footer__column-title",children:h.title}),e.jsx("ul",{className:"nice-footer__list",children:h.items.map((x,f)=>e.jsx("li",{className:"nice-footer__list-item",children:e.jsx("a",{href:x.href,className:"nice-footer__link",target:x.external?"_blank":void 0,rel:x.external?"noopener noreferrer":void 0,children:x.label})},f))})]},u))}),(i||a&&a.length>0)&&e.jsxs("div",{className:"nice-footer__bottom",children:[i&&e.jsx("div",{className:"nice-footer__copyright",children:i}),a&&a.length>0&&e.jsx("ul",{className:"nice-footer__social",children:a.map((h,u)=>e.jsx("li",{children:e.jsx("a",{href:h.href,className:"nice-footer__social-link","aria-label":h.label,target:"_blank",rel:"noopener noreferrer",children:e.jsx("span",{"aria-hidden":"true",children:h.icon})})},u))})]})]})};process.env.NODE_ENV!=="production"&&(oh.displayName="NiceFooter");const ch=({title:t,subtitle:n,breadcrumb:i,avatar:a,tags:s,extra:o,footer:c,onBack:d,className:p="",style:m,testId:h,"data-testid":u})=>{const{t:x}=l.useNiceTranslation();return e.jsxs("header",{className:`nice-page-header ${p}`,style:m,"data-testid":u??h,children:[i&&e.jsx("div",{className:"nice-page-header__breadcrumb",children:i}),e.jsxs("div",{className:"nice-page-header__row",children:[d&&e.jsx("button",{type:"button",onClick:d,className:"nice-page-header__back","aria-label":x("pageHeader.back","Back"),children:e.jsx(l.NiceIcon,{name:"arrow-left",size:16})}),a&&e.jsx("div",{className:"nice-page-header__avatar",children:a}),e.jsxs("div",{className:"nice-page-header__heading",children:[e.jsxs("div",{className:"nice-page-header__title-row",children:[e.jsx("h1",{className:"nice-page-header__title",children:t}),s&&e.jsx("div",{className:"nice-page-header__tags",children:s})]}),n&&e.jsx("div",{className:"nice-page-header__subtitle",children:n})]}),o&&e.jsx("div",{className:"nice-page-header__extra",children:o})]}),c&&e.jsx("div",{className:"nice-page-header__footer",children:c})]})};process.env.NODE_ENV!=="production"&&(ch.displayName="NicePageHeader");const mE={xs:0,sm:640,md:768,lg:1024,xl:1280},lh=({children:t,columns:n=3,gap:i=16,hoverable:a=!1,className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useId().replace(/:/g,""),m=typeof n=="object"&&n!==null,h={display:"grid",gap:typeof i=="number"?`${i}px`:i,gridTemplateColumns:m?"repeat(var(--nice-card-grid-cols, 1), minmax(0, 1fr))":`repeat(${n}, minmax(0, 1fr))`,...o},u=m?hE(p,n):"";return e.jsxs(e.Fragment,{children:[u&&e.jsx("style",{children:u}),e.jsx("div",{"data-nice-card-grid":p,"data-testid":d??c,className:`nice-card-grid ${a?"nice-card-grid--hoverable":""} ${s}`,style:h,children:t})]})};process.env.NODE_ENV!=="production"&&(lh.displayName="NiceCardGrid");function hE(t,n){const i=[],a=`[data-nice-card-grid="${t}"]`;n.xs!==void 0&&i.push(`${a}{--nice-card-grid-cols:${n.xs};}`);for(const s of["sm","md","lg","xl"])n[s]!==void 0&&i.push(`@media (min-width: ${mE[s]}px){${a}{--nice-card-grid-cols:${n[s]};}}`);return i.join("")}const gE=[];function dh({value:t,defaultValue:n,options:i=gE,disabled:a=!1,direction:s="horizontal",name:o,onChange:c,className:d="",style:p,testId:m,"data-testid":h}){const[u,x]=r.useState(n??[]),f=t!==void 0,b=f?t:u,g=r.useId(),v=r.useCallback(y=>{const C=b.includes(y)?b.filter(w=>w!==y):[...b,y];f||x(C),c?.(C)},[b,f,c]);return e.jsx("div",{role:"group","aria-label":o,className:`nice-checkbox-group nice-checkbox-group--${s} ${d}`,style:p,"data-testid":h??m,children:i.map((y,C)=>{const w=`${g}-${C}`,E=b.includes(y.value),S=a||y.disabled;return e.jsxs("label",{htmlFor:w,className:`nice-checkbox-group__item ${S?"nice-checkbox-group__item--disabled":""}`,children:[e.jsx("input",{id:w,type:"checkbox",className:"nice-checkbox-group__input",checked:E,disabled:S,onChange:()=>v(y.value)}),e.jsx("span",{className:"nice-checkbox-group__label",children:y.label})]},C)})})}process.env.NODE_ENV!=="production"&&(dh.displayName="NiceCheckboxGroup");const uh=({length:t=6,value:n,onChange:i,onComplete:a,type:s="number",autoFocus:o=!0,disabled:c=!1,error:d=!1,separator:p,className:m="",style:h,"aria-label":u,testId:x,"data-testid":f})=>{const{t:b}=l.useNiceTranslation(),g=n!==void 0,[v,y]=r.useState(""),C=(g?n:v).slice(0,t),w=r.useRef(!1),E=r.useRef([]);r.useEffect(()=>{o&&E.current[0]&&E.current[0].focus()},[o]);const S=r.useCallback(j=>{const T=j.slice(0,t);g||y(T),i?.(T),T.length===t&&!w.current&&(w.current=!0,a?.(T)),T.length<t&&(w.current=!1)},[t,g,i,a]),N=(j,T)=>{const P=(s==="number"?T.replace(/\D/g,""):T).slice(-1);if(!P)return;const B=C.split("");B[j]=P;const R=B.join("").slice(0,t);S(R),E.current[Math.min(j+1,t-1)]?.focus()},_=(j,T)=>{if(T.key==="Backspace"){const P=C.split("");P[j]?P[j]="":j>0&&(P[j-1]="",E.current[j-1]?.focus()),S(P.join(""))}else T.key==="ArrowLeft"&&j>0?(T.preventDefault(),E.current[j-1]?.focus()):T.key==="ArrowRight"&&j<t-1&&(T.preventDefault(),E.current[j+1]?.focus())},k=j=>{const T=j.clipboardData.getData("text"),P=(s==="number"?T.replace(/\D/g,""):T).slice(0,t);if(!P)return;j.preventDefault(),S(P);const B=Math.min(P.length,t-1);E.current[B]?.focus()};return e.jsx("div",{role:"group","aria-label":u??b("otpInput.oneTimePasswordDigits","One-time password, {value} digits").replace("{value}",String(t)),className:`nice-otp-input ${d?"nice-otp-input--error":""} ${m}`,style:h,"data-testid":f??x,children:Array.from({length:t}).map((j,T)=>e.jsxs(r.Fragment,{children:[e.jsx("input",{ref:P=>{E.current[T]=P},type:s==="number"?"tel":"text",inputMode:s==="number"?"numeric":"text",maxLength:1,value:C[T]??"",onChange:P=>N(T,P.target.value),onKeyDown:P=>_(T,P),onPaste:k,disabled:c,"aria-label":b("otpInput.digitOf","Digit {i} of {value}").replace("{i}",String(T+1)).replace("{value}",String(t)),className:"nice-otp-input__slot",autoComplete:T===0?"one-time-code":"off"}),p&&T<t-1&&e.jsx("span",{className:"nice-otp-input__separator","aria-hidden":"true",children:p})]},T))})};process.env.NODE_ENV!=="production"&&(uh.displayName="NiceOTPInput");const bE=[],fE=({label:t,onKeyDown:n,children:i})=>{const a=r.useRef(null);return l.useRovingFocus(a,{orientation:"vertical",typeahead:!0}),e.jsx("ul",{ref:a,className:"nice-cascade-select__column",role:"listbox","aria-label":t,onKeyDown:n,children:i})},ph=({options:t=bE,value:n,defaultValue:i,onChange:a,placeholder:s,disabled:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=n!==void 0,[x,f]=r.useState(i??[]),b=u?n:x,[g,v]=r.useState(!1),[y,C]=r.useState(b),w=r.useMemo(()=>vE(t,b),[t,b]),E=r.useMemo(()=>{const R=[t];let I=t;for(const D of y){const M=I?.find(O=>O.value===D);if(!M?.children?.length)break;R.push(M.children),I=M.children}return R},[t,y]),S=(R,I)=>{if(I.disabled)return;const D=[...y.slice(0,R),I.value];C(D),(!I.children||I.children.length===0)&&(u||f(D),a?.(D),v(!1))},N=w.length?w.map((R,I)=>e.jsxs(r.Fragment,{children:[I>0&&e.jsx("span",{className:"nice-cascade-select__sep",children:" / "}),R]},I)):s??h("cascadeSelect.placeholder","Select"),_=r.useRef(null),k=()=>{C(b),v(!0)};l.useOverlayFocus(_,{open:g,modal:!1,onClose:()=>v(!1)});const j=R=>{const I=_.current?.querySelectorAll(".nice-cascade-select__column")[R];(I?.querySelector('[aria-selected="true"]:not(:disabled)')??I?.querySelector('[role="option"]:not(:disabled)'))?.focus()},T=r.useRef(null);r.useEffect(()=>{T.current!==null&&(j(T.current),T.current=null)},[E]);const P=(R,I)=>{const D=I.target.closest("[data-value]")?.getAttribute("data-value"),M=E[R]?.find(O=>O.value===D);M&&((I.key==="ArrowRight"||I.key==="Enter")&&M.children?.length&&!M.disabled?(I.preventDefault(),T.current=R+1,C([...y.slice(0,R),M.value])):I.key==="Enter"?(I.preventDefault(),S(R,M)):I.key==="ArrowLeft"&&R>0?(I.preventDefault(),j(R-1)):(I.key==="ArrowRight"||I.key==="ArrowLeft")&&I.preventDefault())},B=y.length-1;return e.jsxs("div",{className:`nice-cascade-select ${g?"nice-cascade-select--open":""} ${c}`,style:d,"data-testid":m??p,children:[e.jsx("button",{type:"button",className:"nice-cascade-select__trigger",disabled:o,"aria-haspopup":"listbox","aria-expanded":g,onClick:()=>g?v(!1):k(),onKeyDown:R=>{!g&&(R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),k())},children:N}),g&&e.jsx("div",{ref:_,className:"nice-cascade-select__menu",children:E.map((R,I)=>{const D=I>0?E[I-1].find(M=>M.value===y[I-1])?.label:void 0;return e.jsx(fE,{label:I===0?s??h("cascadeSelect.placeholder","Select"):typeof D=="string"?D:void 0,onKeyDown:M=>P(I,M),children:R.map(M=>{const O=y[I]===M.value;return e.jsx("li",{role:"presentation",children:e.jsxs("button",{type:"button",role:"option","aria-selected":O,disabled:M.disabled,"data-value":M.value,"data-autofocus":O&&I===B||void 0,className:`nice-cascade-select__option ${O?"nice-cascade-select__option--active":""}`,onClick:()=>S(I,M),children:[e.jsx("span",{children:M.label}),M.children&&M.children.length>0&&e.jsx("span",{className:"nice-cascade-select__chevron","aria-hidden":"true",children:e.jsx(l.NiceIcon,{name:"chevron-right",size:14})})]})},M.value)})},I)})})]})};process.env.NODE_ENV!=="production"&&(ph.displayName="NiceCascadeSelect");function vE(t,n){const i=[];let a=t;for(const s of n){const o=a?.find(c=>c.value===s);if(!o)break;i.push(o.label),a=o.children}return i}const xE={success:"check",error:"close",info:"info",warning:"warning",pending:"clock"},mh=({status:t,title:n,subtitle:i,icon:a,extra:s,children:o,className:c="",style:d,testId:p,"data-testid":m})=>{const h=t==="error"?"alert":"status";return e.jsxs("div",{className:`nice-result nice-result--${t} ${c}`,style:d,role:h,"data-testid":m??p,children:[e.jsx("div",{className:"nice-result__icon","aria-hidden":"true",children:a??e.jsx(l.NiceIcon,{name:xE[t],size:48})}),e.jsx("h2",{className:"nice-result__title",children:n}),i&&e.jsx("p",{className:"nice-result__subtitle",children:i}),o&&e.jsx("div",{className:"nice-result__content",children:o}),s&&e.jsx("div",{className:"nice-result__extra",children:s})]})};process.env.NODE_ENV!=="production"&&(mh.displayName="NiceResult");const Ql={startX:0,startY:0,dx:0,dy:0,dragging:!1},hh=({children:t,onSwipeLeft:n,onSwipeRight:i,onSwipeUp:a,onSwipeDown:s,threshold:o=100,showOverlay:c=!0,disabled:d=!1,className:p="",style:m,testId:h,"data-testid":u})=>{const[x,f]=r.useState(Ql),b=r.useRef(null),g=r.useCallback(_=>{switch(_){case"left":n?.();break;case"right":i?.();break;case"up":a?.();break;case"down":s?.();break}},[n,i,a,s]),v=_=>{d||(_.currentTarget.setPointerCapture(_.pointerId),f({startX:_.clientX,startY:_.clientY,dx:0,dy:0,dragging:!0}))},y=_=>{f(k=>k.dragging?{...k,dx:_.clientX-k.startX,dy:_.clientY-k.startY}:k)},C=r.useCallback(()=>{const{dx:_,dy:k}=x,j=Math.abs(_),T=Math.abs(k);Math.max(j,T)>=o&&(j>T?g(_>0?"right":"left"):g(k>0?"down":"up")),f(Ql)},[x,o,g]),w=_=>{try{_.currentTarget.releasePointerCapture(_.pointerId)}catch{}C()},E=_=>{if(!d)switch(_.key){case"ArrowLeft":_.preventDefault(),g("left");break;case"ArrowRight":_.preventDefault(),g("right");break;case"ArrowUp":_.preventDefault(),g("up");break;case"ArrowDown":_.preventDefault(),g("down");break}},S=x.dragging?`translate(${x.dx}px, ${x.dy}px) rotate(${x.dx/20}deg)`:void 0,N=(()=>{if(!c||!x.dragging)return null;const{dx:_,dy:k}=x,j=Math.abs(_),T=Math.abs(k);return j<16&&T<16?null:j>T?_>0?"right":"left":k>0?"down":"up"})();return e.jsxs("div",{ref:b,tabIndex:d?-1:0,role:"button","aria-disabled":d||void 0,className:`nice-swipe-card ${x.dragging?"nice-swipe-card--dragging":""} ${p}`,style:{transform:S,touchAction:"none",...m},"data-testid":u??h,onPointerDown:v,onPointerMove:y,onPointerUp:w,onPointerCancel:w,onKeyDown:E,children:[t,N&&e.jsx("div",{className:`nice-swipe-card__overlay nice-swipe-card__overlay--${N}`,"aria-hidden":"true"})]})};process.env.NODE_ENV!=="production"&&(hh.displayName="NiceSwipeCard");const yE=[],gh=({tabs:t=yE,activeTab:n,onChange:i,variant:a="default",size:s="md",showIcons:o=!0,stretch:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const u=r.useRef([]),x=Math.max(0,t.findIndex(g=>g.id===n)),f=g=>{u.current[g]?.focus()},b=r.useCallback((g,v)=>{let y=v;if(g.key==="ArrowRight")y=(v+1)%t.length;else if(g.key==="ArrowLeft")y=(v-1+t.length)%t.length;else if(g.key==="Home")y=0;else if(g.key==="End")y=t.length-1;else return;g.preventDefault();let C=0;for(;t[y].disabled&&C++<t.length;)y=(y+(g.key==="ArrowLeft"?-1:1)+t.length)%t.length;f(y)},[t]);return e.jsx("div",{role:"tablist","aria-orientation":"horizontal",className:`nice-tab-bar nice-tab-bar--${a} nice-tab-bar--${s} ${c?"nice-tab-bar--stretch":""} ${d}`,style:p,"data-testid":h??m,children:t.map((g,v)=>{const y=v===x;return e.jsxs("button",{ref:C=>{u.current[v]=C},type:"button",role:"tab","aria-selected":y,tabIndex:y?0:-1,disabled:g.disabled,className:`nice-tab-bar__tab ${y?"nice-tab-bar__tab--active":""}`,onClick:()=>i?.(g.id),onKeyDown:C=>b(C,v),children:[o&&g.icon&&e.jsx("span",{className:"nice-tab-bar__icon","aria-hidden":"true",children:g.icon}),e.jsx("span",{className:"nice-tab-bar__label",children:g.label})]},g.id)})})};process.env.NODE_ENV!=="production"&&(gh.displayName="NiceTabBar");const bh=({children:t,header:n,footer:i,sider:a,siderPlacement:s="start",className:o="",style:c,testId:d,"data-testid":p})=>e.jsxs("div",{className:`nice-layout ${o}`,style:c,"data-testid":p??d,children:[n&&e.jsx("header",{className:"nice-layout__header",children:n}),e.jsxs("div",{className:`nice-layout__row nice-layout__row--sider-${s}`,children:[a&&s==="start"&&e.jsx("aside",{className:"nice-layout__sider",children:a}),e.jsx("main",{className:"nice-layout__main",children:t}),a&&s==="end"&&e.jsx("aside",{className:"nice-layout__sider",children:a})]}),i&&e.jsx("footer",{className:"nice-layout__footer",children:i})]});process.env.NODE_ENV!=="production"&&(bh.displayName="NiceLayout");const NE={xs:12,sm:14,md:16,lg:18,xl:20};function _E(t,n,i){let a=t;return typeof n=="number"&&(a=Math.max(n,a)),typeof i=="number"&&(a=Math.min(i,a)),a}function Xl(t,n){return Number.isFinite(t)?n===void 0?String(t):t.toFixed(n):""}const fh=({value:t,defaultValue:n=0,onChange:i,min:a,max:s,step:o=1,precision:c,format:d,showButtons:p=!0,size:m="md",placeholder:h,disabled:u=!1,readOnly:x=!1,className:f="",style:b,testId:g,"data-testid":v})=>{const y=NE[m],{t:C}=l.useNiceTranslation(),w=t!==void 0,[E,S]=r.useState(n),N=w?t:E,_=r.useCallback(M=>{const O=_E(M,a,s);w||S(O),i?.(O)},[a,s,w,i]),k=M=>{if(M===""||M==="-")return;const O=Number(M);Number.isFinite(O)&&_(O)},j=typeof d=="function"?d(N):typeof d=="string"?d.replace("{value}",Xl(N,c)):Xl(N,c),T=()=>_(N+o),P=()=>_(N-o),B=r.useRef(null),R=r.useRef(null),I=u||x;l.useEngage(B,{disabled:I,restoreOnCancel:!0,onEngage:()=>{R.current=N},onRelease:M=>{M&&R.current!==null&&_(R.current),R.current=null}});const D=M=>{if(I)return;const O=M.key==="ArrowUp"?o:M.key==="ArrowDown"?-o:M.key==="PageUp"?o*10:M.key==="PageDown"?-o*10:0,L=M.key==="Home"&&typeof a=="number"?a:M.key==="End"&&typeof s=="number"?s:void 0;O?(M.preventDefault(),_(N+O)):L!==void 0&&(M.preventDefault(),_(L))};return e.jsxs("div",{className:`nice-numeric-input nice-numeric-input--size-${m} ${u?"nice-numeric-input--disabled":""} ${f}`,style:b,"data-testid":v??g,children:[p&&e.jsx("button",{type:"button",className:"nice-numeric-input__btn nice-numeric-input__btn--dec",onClick:P,disabled:u||x||typeof a=="number"&&N<=a,"aria-label":C("numericInput.decrement","Decrement"),children:e.jsx(l.NiceIcon,{name:"minus",size:y})}),e.jsx("input",{ref:B,type:"text",inputMode:"decimal",className:"nice-numeric-input__field",value:j,placeholder:h,disabled:u,readOnly:x,onChange:M=>k(M.target.value),onKeyDown:D,"aria-valuenow":Number.isFinite(N)?N:void 0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuetext":j||void 0,role:"spinbutton"}),p&&e.jsx("button",{type:"button",className:"nice-numeric-input__btn nice-numeric-input__btn--inc",onClick:T,disabled:u||x||typeof s=="number"&&N>=s,"aria-label":C("numericInput.increment","Increment"),children:e.jsx(l.NiceIcon,{name:"plus",size:y})})]})};process.env.NODE_ENV!=="production"&&(fh.displayName="NiceNumericInput");const jE=e.jsx(l.NiceIcon,{name:"star",size:24,className:"nice-rate__star"}),vh=({value:t,defaultValue:n=0,count:i=5,allowHalf:a=!1,allowClear:s=!0,readOnly:o=!1,disabled:c=!1,character:d,onChange:p,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),b=t!==void 0,[g,v]=r.useState(n),y=b?t:g,[C,w]=r.useState(null),E=C??y,S=r.useCallback(k=>{const j=Math.max(0,Math.min(i,k)),T=s&&j===y?0:j;b||v(T),p?.(T)},[i,s,y,b,p]),N=k=>{if(c||o)return;const j=a?.5:1;k.key==="ArrowRight"||k.key==="ArrowUp"?(k.preventDefault(),S(Math.min(i,y+j))):k.key==="ArrowLeft"||k.key==="ArrowDown"?(k.preventDefault(),S(Math.max(0,y-j))):k.key==="Home"?(k.preventDefault(),S(0)):k.key==="End"&&(k.preventDefault(),S(i))},_=k=>typeof d=="function"?d(k):d??jE;return e.jsx("span",{role:"radiogroup","aria-label":f("rate.aria","Rating"),"aria-valuenow":y,"aria-valuemin":0,"aria-valuemax":i,tabIndex:c?-1:0,onKeyDown:N,className:`nice-rate ${c?"nice-rate--disabled":""} ${m}`,style:h,"data-testid":x??u,children:Array.from({length:i}).map((k,j)=>{const T=E>=j+1,P=!T&&a&&E>=j+.5,B=!c&&!o;return e.jsxs("span",{className:`nice-rate__item ${T?"nice-rate__item--full":""} ${P?"nice-rate__item--half":""}`,onMouseLeave:()=>B&&w(null),children:[e.jsx("span",{className:"nice-rate__char","aria-hidden":"true",children:_(j)}),P&&e.jsx("span",{className:"nice-rate__half-fill","aria-hidden":"true",children:_(j)}),a&&e.jsx("button",{type:"button",className:"nice-rate__half-zone nice-rate__half-zone--left","aria-label":f("rate.rate","Rate {i}").replace("{i}",String(j+.5)),disabled:!B,onMouseEnter:()=>B&&w(j+.5),onFocus:()=>B&&w(j+.5),onBlur:()=>w(null),onClick:()=>S(j+.5)}),e.jsx("button",{type:"button",className:`nice-rate__zone ${a?"nice-rate__zone--right":""}`,"aria-label":f("rate.rate","Rate {i}").replace("{i}",String(j+1)),disabled:!B,onMouseEnter:()=>B&&w(j+1),onFocus:()=>B&&w(j+1),onBlur:()=>w(null),onClick:()=>S(j+1)})]},j)})})};process.env.NODE_ENV!=="production"&&(vh.displayName="NiceRate");const xh=({accept:t,multiple:n=!1,disabled:i=!1,capture:a,children:s,onChange:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=r.useRef(null),x=r.useCallback(()=>{i||u.current?.click()},[i]);return e.jsxs("span",{className:`nice-file-picker ${i?"nice-file-picker--disabled":""} ${c}`,style:d,"data-testid":m??p,children:[e.jsx("button",{type:"button",className:"nice-file-picker__trigger",onClick:x,disabled:i,children:s??h("filePicker.label","Choose file")}),e.jsx("input",{ref:u,type:"file",accept:t,multiple:n,capture:a,disabled:i,className:"nice-file-picker__input",style:wE,onChange:f=>{f.target.files&&f.target.files.length>0&&o?.(f.target.files)}})]})};process.env.NODE_ENV!=="production"&&(xh.displayName="NiceFilePicker");const wE={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},yh=({value:t,defaultValue:n,onChange:i,onSearch:a,getSuggestions:s,recentSearches:o,placeholder:c,disabled:d=!1,size:p="md",className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),[b,g]=l.useControllableState({value:t,defaultValue:n,fallbackValue:"",onChange:i,componentName:"NiceSearchInput"}),[v,y]=r.useState(!1),[C,w]=r.useState(-1),E=r.useId(),[S,N]=r.useState([]),_=r.useRef(0);r.useEffect(()=>{if(!s)return;if(!b){N([]);return}const I=++_.current;s(b).then(D=>{I===_.current&&N(D)})},[b,s]);const k=v&&!b&&(o?.length??0)>0,j=v&&b.length>0&&S.length>0,T=k?o.map(I=>({id:I,label:I})):j?S:[],P=r.useCallback(I=>{const D=T[I];if(!D)return;const M=typeof D.label=="string"?D.label:String(D.id);g(M),a?.(M),y(!1)},[T,g,a]),B=I=>{I.key==="ArrowDown"?(I.preventDefault(),w(D=>T.length===0?-1:(D+1)%T.length)):I.key==="ArrowUp"?(I.preventDefault(),w(D=>T.length===0?-1:(D-1+T.length)%T.length)):I.key==="Enter"?(I.preventDefault(),C>=0?P(C):(a?.(b),y(!1))):I.key==="Escape"&&y(!1)},R=r.useRef(null);return l.useIntent(["navigate","activate"],I=>{if(I.source==="keyboard")return!1;if(I.intent==="activate"){if(C<0)return!1;P(C);return}if(I.direction!=="up"&&I.direction!=="down")return!1;const D=I.direction==="down"?1:-1;w(M=>(M+D+T.length)%T.length)},{ref:R,enabled:T.length>0}),e.jsxs("div",{ref:R,className:`nice-search-input nice-search-input--${p} ${v?"nice-search-input--open":""} ${m}`,style:h,"data-testid":x??u,children:[e.jsx("input",{type:"search",role:"combobox","aria-expanded":v,"aria-controls":E,"aria-activedescendant":v&&C>=0?`${E}-${C}`:void 0,"aria-autocomplete":"list",className:"nice-search-input__field",value:b,placeholder:c??f("searchInput.placeholder","Search..."),disabled:d,onChange:I=>{g(I.target.value),y(!0),w(-1)},onFocus:()=>y(!0),onBlur:()=>{setTimeout(()=>y(!1),150)},onKeyDown:B}),(k||j)&&e.jsx("ul",{id:E,role:"listbox",className:"nice-search-input__list",children:T.map((I,D)=>e.jsxs("li",{id:`${E}-${D}`,role:"option","aria-selected":D===C,className:`nice-search-input__item ${D===C?"nice-search-input__item--active":""}`,onMouseEnter:()=>w(D),onMouseDown:M=>{M.preventDefault(),P(D)},children:[e.jsx("span",{className:"nice-search-input__label",children:I.label}),I.hint&&e.jsx("span",{className:"nice-search-input__hint",children:I.hint})]},I.id))})]})};process.env.NODE_ENV!=="production"&&(yh.displayName="NiceSearchInput");const Nh=({value:t,defaultValue:n,onChange:i,suggestions:a,maxTags:s,allowDuplicates:o=!1,separator:c=",",placeholder:d,disabled:p=!1,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),[b,g]=l.useControllableState({value:t,defaultValue:n,fallbackValue:[],onChange:i,componentName:"NiceTagInput"}),[v,y]=r.useState(""),C=r.useRef(null),w=r.useCallback(M=>{const O=[];for(const L of M){const V=L.trim();if(V&&!(!o&&[...b,...O].includes(V))){if(s!==void 0&&b.length+O.length>=s)break;O.push(V)}}O.length!==0&&g([...b,...O])},[b,o,s,g]),E=r.useCallback(M=>{g(b.filter((O,L)=>L!==M))},[b,g]),S=()=>{v.trim()&&(w([v]),y(""))},N=(()=>{if(!a||!v)return[];const M=v.toLowerCase();return a.filter(O=>O.toLowerCase().includes(M)&&!b.includes(O)).slice(0,8)})(),[_,k]=r.useState(-1);r.useEffect(()=>k(-1),[v]);const j=r.useRef(null),P=`${r.useId()}-suggestions`,B=M=>{w([M]),y(""),C.current?.focus()},R=M=>{const O=N.length;k(L=>O===0?-1:((L+M)%O+O)%O)};l.useIntent(["navigate","activate"],M=>{if(M.source==="keyboard")return!1;if(M.intent==="activate"){const O=N[_];if(!O)return!1;B(O);return}if(M.direction!=="up"&&M.direction!=="down")return!1;R(M.direction==="down"?1:-1)},{ref:j,enabled:N.length>0});const I=M=>{N.length>0&&(M.key==="ArrowDown"||M.key==="ArrowUp")?(M.preventDefault(),R(M.key==="ArrowDown"?1:-1)):M.key==="Escape"&&_>=0?(M.preventDefault(),k(-1)):M.key==="Enter"&&N[_]?(M.preventDefault(),B(N[_])):M.key==="Enter"||M.key===c?(M.preventDefault(),S()):M.key==="Backspace"&&v===""&&b.length>0&&(M.preventDefault(),E(b.length-1))},D=M=>{const O=M.clipboardData.getData("text");O.includes(c)&&(M.preventDefault(),w(O.split(c)),y(""))};return e.jsxs("div",{role:"presentation",ref:j,className:`nice-tag-input ${p?"nice-tag-input--disabled":""} ${m}`,style:h,"data-testid":x??u,onClick:()=>C.current?.focus(),children:[e.jsxs("ul",{className:"nice-tag-input__tags",role:"list",children:[b.map((M,O)=>e.jsxs("li",{className:"nice-tag-input__tag",children:[e.jsx("span",{className:"nice-tag-input__tag-label",children:M}),e.jsx("button",{type:"button",className:"nice-tag-input__tag-remove","aria-label":f("tagInput.remove","Remove tag"),disabled:p,onClick:L=>{L.stopPropagation(),E(O)},children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},`${M}-${O}`)),e.jsx("li",{className:"nice-tag-input__draft",children:e.jsx("input",{ref:C,type:"text",className:"nice-tag-input__input",value:v,placeholder:b.length===0?d:void 0,disabled:p||s!==void 0&&b.length>=s,onChange:M=>y(M.target.value),onKeyDown:I,onPaste:D,onBlur:S,...a?.length?{role:"combobox","aria-autocomplete":"list","aria-expanded":N.length>0,"aria-controls":N.length>0?P:void 0,"aria-activedescendant":N[_]?`${P}-${_}`:void 0}:{}})})]}),N.length>0&&e.jsx("ul",{id:P,className:"nice-tag-input__suggestions",role:"listbox",children:N.map((M,O)=>e.jsx("li",{id:`${P}-${O}`,role:"option","aria-selected":O===_,className:`nice-tag-input__suggestion${O===_?" nice-tag-input__suggestion--active":""}`,onMouseEnter:()=>k(O),onMouseDown:L=>{L.preventDefault(),B(M)},children:M},M))})]})};process.env.NODE_ENV!=="production"&&(Nh.displayName="NiceTagInput");const kE=[],_h=({open:t,images:n=kE,index:i,defaultIndex:a=0,onIndexChange:s,onClose:o,zoom:c=!0,download:d=!1,counter:p=!0,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),b=i!==void 0,[g,v]=r.useState(a),y=b?i:g,[C,w]=r.useState(1),E=r.useCallback(B=>{const R=Math.max(0,Math.min(n.length-1,B));b||v(R),s?.(R),w(1)},[n.length,b,s]),S=r.useCallback(()=>E(y-1),[y,E]),N=r.useCallback(()=>E(y+1),[y,E]);r.useEffect(()=>{t&&w(1)},[t]);const _=r.useRef(null),k=t&&n.length>0;l.useOverlayFocus(_,{open:k,onClose:o});const j=r.useCallback(B=>{w(R=>Math.min(4,Math.max(1,R+B)))},[]),T=B=>{if(B.key==="ArrowLeft")S();else if(B.key==="ArrowRight")N();else if(c&&(B.key==="+"||B.key==="="))j(.25);else if(c&&B.key==="-")j(-.25);else return;B.preventDefault()};if(l.useIntent(["sectionPrev","sectionNext","pagePrev","pageNext"],B=>{if(B.intent==="sectionPrev")S();else if(B.intent==="sectionNext")N();else{if(!c||B.source==="keyboard")return!1;j(B.intent==="pageNext"?.25:-.25)}},{ref:_,enabled:k}),l.useInputHints(_,k&&n.length>1?[{intent:"sectionPrev",label:f("lightbox.previous","Previous image")},{intent:"sectionNext",label:f("lightbox.next","Next image")},...c?[{intent:"pageNext",label:f("lightbox.zoomIn","Zoom in")},{intent:"pagePrev",label:f("lightbox.zoomOut","Zoom out")}]:[]]:[]),!k)return null;const P=n[y];return e.jsxs("div",{ref:_,className:`nice-lightbox ${m}`,style:h,role:"dialog","aria-modal":"true","aria-label":f("lightbox.aria","Image viewer"),"data-testid":x??u,onClick:B=>{B.target===B.currentTarget&&o()},onKeyDown:T,children:[e.jsxs("div",{className:"nice-lightbox__toolbar",children:[p&&e.jsxs("span",{className:"nice-lightbox__counter","aria-live":"polite",children:[y+1," / ",n.length]}),e.jsx("div",{className:"nice-lightbox__toolbar-spacer"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"nice-lightbox__btn","aria-label":f("lightbox.zoomOut","Zoom out"),onClick:()=>w(B=>Math.max(1,B-.25)),disabled:C<=1,children:e.jsx(l.NiceIcon,{name:"minus",size:16})}),e.jsx("button",{type:"button",className:"nice-lightbox__btn","aria-label":f("lightbox.zoomIn","Zoom in"),onClick:()=>w(B=>Math.min(4,B+.25)),disabled:C>=4,children:e.jsx(l.NiceIcon,{name:"plus",size:16})})]}),d&&e.jsx("a",{className:"nice-lightbox__btn",href:P.downloadUrl??P.src,download:!0,"aria-label":f("lightbox.download","Download"),children:e.jsx(l.NiceIcon,{name:"download",size:16})}),e.jsx("button",{type:"button",className:"nice-lightbox__btn nice-lightbox__btn--close","aria-label":f("lightbox.close","Close"),onClick:o,children:e.jsx(l.NiceIcon,{name:"close",size:16})})]}),n.length>1&&e.jsx("button",{type:"button",className:"nice-lightbox__nav nice-lightbox__nav--prev","aria-label":f("lightbox.previous","Previous image"),onClick:S,disabled:y===0,children:e.jsx(l.NiceIcon,{name:"chevron-left",size:20})}),e.jsxs("div",{className:"nice-lightbox__stage",children:[e.jsx("img",{src:P.src,alt:P.alt,className:"nice-lightbox__image",style:{transform:`scale(${C})`}}),P.caption&&e.jsx("div",{className:"nice-lightbox__caption",children:P.caption})]}),n.length>1&&e.jsx("button",{type:"button",className:"nice-lightbox__nav nice-lightbox__nav--next","aria-label":f("lightbox.next","Next image"),onClick:N,disabled:y===n.length-1,children:e.jsx(l.NiceIcon,{name:"chevron-right",size:20})})]})};process.env.NODE_ENV!=="production"&&(_h.displayName="NiceLightbox");const CE=[];function SE(t){const n=t.split("+").map(i=>i.trim().toLowerCase());return{ctrl:n.includes("ctrl"),meta:n.includes("meta")||n.includes("cmd"),shift:n.includes("shift"),alt:n.includes("alt")||n.includes("option"),key:n.find(i=>!["ctrl","meta","cmd","shift","alt","option"].includes(i))??""}}const jh=({commands:t=CE,open:n,onOpenChange:i,onCommand:a,placeholder:s,shortcut:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=n!==void 0,[x,f]=r.useState(!0),b=u?n:x,g=r.useCallback(I=>{u||f(I),i?.(I)},[u,i]),[v,y]=r.useState(""),C=r.useRef(null),w=r.useRef(null),E=r.useId(),S=`${E}-list`;r.useEffect(()=>{if(!o)return;const I=SE(o),D=M=>{M.ctrlKey===I.ctrl&&M.metaKey===I.meta&&M.shiftKey===I.shift&&M.altKey===I.alt&&M.key.toLowerCase()===I.key&&(M.preventDefault(),g(!0))};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[o,g]),l.useOverlayFocus(w,{open:b,modal:!1,initialFocus:C,onClose:()=>g(!1)});const N=r.useMemo(()=>{if(!v)return t;const I=v.toLowerCase();return t.filter(D=>!!(D.label.toLowerCase().includes(I)||D.keywords?.some(M=>M.toLowerCase().includes(I))))},[t,v]),_=r.useMemo(()=>{const I=new Map;for(const D of N){const M=D.category??"";I.has(M)||I.set(M,[]),I.get(M).push(D)}return Array.from(I.entries())},[N]),k=r.useMemo(()=>_.flatMap(([,I])=>I.filter(D=>!D.disabled)),[_]),j=r.useCallback(I=>{I.onRun?.(),a?.(I),g(!1)},[a,g]),{activeIndex:T,setActiveIndex:P,handleKeyDown:B}=Vt.useListKeyboardNav(k,{open:b,onSelect:I=>j(I),loop:!0,intentRef:w});if(l.useInputHints(w,b?[{intent:"navigate",label:h("commandPalette.choose","Choose")},{intent:"activate",label:h("commandPalette.run","Run")}]:[]),!b)return null;const R=k[T];return e.jsxs("div",{ref:w,className:`nice-command-bar ${c}`,style:d,role:"dialog","aria-modal":"false","data-testid":m??p,children:[e.jsx("input",{ref:C,type:"text",role:"combobox","aria-expanded":"true","aria-autocomplete":"list","aria-controls":S,"aria-activedescendant":R?`${E}-opt-${R.id}`:void 0,className:"nice-command-bar__search",value:v,placeholder:s??h("commandBar.placeholder","Type a command..."),onChange:I=>{y(I.target.value),P(0)},onKeyDown:B}),e.jsxs("ul",{id:S,role:"listbox",className:"nice-command-bar__list",children:[_.map(([I,D])=>e.jsxs(r.Fragment,{children:[I&&e.jsx("li",{className:"nice-command-bar__category","aria-hidden":"true",children:I}),D.map(M=>{const O=k.indexOf(M),L=O===T;return e.jsxs("li",{id:`${E}-opt-${M.id}`,role:"option","aria-selected":L,"aria-disabled":M.disabled||void 0,className:`nice-command-bar__item ${L?"nice-command-bar__item--active":""} ${M.disabled?"nice-command-bar__item--disabled":""}`,onMouseEnter:()=>!M.disabled&&P(Math.max(0,O)),onMouseDown:V=>{V.preventDefault(),M.disabled||j(M)},children:[M.icon&&e.jsx("span",{className:"nice-command-bar__icon",children:M.icon}),e.jsx("span",{className:"nice-command-bar__label",children:M.label}),M.hint&&e.jsx("span",{className:"nice-command-bar__hint",children:M.hint}),M.shortcut&&e.jsx("kbd",{className:"nice-command-bar__shortcut",children:M.shortcut})]},M.id)})]},I||"_")),k.length===0&&e.jsx("li",{className:"nice-command-bar__empty","aria-live":"polite",children:h("commandBar.empty","No commands found")})]})]})};process.env.NODE_ENV!=="production"&&(jh.displayName="NiceCommandBar");Object.defineProperty(exports,"ANIMATION_VALUES",{enumerable:!0,get:()=>l.ANIMATION_VALUES});Object.defineProperty(exports,"BatchOperations",{enumerable:!0,get:()=>l.BatchOperations});Object.defineProperty(exports,"COMMON_SHORTCUTS",{enumerable:!0,get:()=>l.COMMON_SHORTCUTS});Object.defineProperty(exports,"ColumnFormulas",{enumerable:!0,get:()=>l.ColumnFormulas});Object.defineProperty(exports,"DEFAULT_VARIANT_CONFIG",{enumerable:!0,get:()=>l.DEFAULT_VARIANT_CONFIG});Object.defineProperty(exports,"DENSITY_VALUES",{enumerable:!0,get:()=>l.DENSITY_VALUES});Object.defineProperty(exports,"IndexedDBAdapter",{enumerable:!0,get:()=>l.IndexedDBAdapter});Object.defineProperty(exports,"LeakDetectorStatus",{enumerable:!0,get:()=>l.LeakDetectorStatus});Object.defineProperty(exports,"LocalStorageAdapter",{enumerable:!0,get:()=>l.LocalStorageAdapter});Object.defineProperty(exports,"NICE_BREAKPOINTS",{enumerable:!0,get:()=>l.NICE_BREAKPOINTS});Object.defineProperty(exports,"NICE_BUILTIN_ICONS",{enumerable:!0,get:()=>l.NICE_BUILTIN_ICONS});Object.defineProperty(exports,"NICE_DISPLAY_STYLES",{enumerable:!0,get:()=>l.NICE_DISPLAY_STYLES});Object.defineProperty(exports,"NICE_DISPLAY_STYLE_INFO",{enumerable:!0,get:()=>l.NICE_DISPLAY_STYLE_INFO});Object.defineProperty(exports,"NICE_INPUT_DEFAULTS",{enumerable:!0,get:()=>l.NICE_INPUT_DEFAULTS});Object.defineProperty(exports,"NICE_INTENTS",{enumerable:!0,get:()=>l.NICE_INTENTS});Object.defineProperty(exports,"NICE_INTENT_EVENT",{enumerable:!0,get:()=>l.NICE_INTENT_EVENT});Object.defineProperty(exports,"NICE_THEME_ARCHIVE",{enumerable:!0,get:()=>l.NICE_THEME_ARCHIVE});Object.defineProperty(exports,"NICE_THEME_CURATED",{enumerable:!0,get:()=>l.NICE_THEME_CURATED});Object.defineProperty(exports,"NICE_THEME_CURATED_PACKS",{enumerable:!0,get:()=>l.NICE_THEME_CURATED_PACKS});Object.defineProperty(exports,"NICE_THEME_DEFAULT",{enumerable:!0,get:()=>l.NICE_THEME_DEFAULT});Object.defineProperty(exports,"NICE_THEME_GALLERY",{enumerable:!0,get:()=>l.NICE_THEME_GALLERY});Object.defineProperty(exports,"NICE_THEME_PACKS",{enumerable:!0,get:()=>l.NICE_THEME_PACKS});Object.defineProperty(exports,"NICE_THEME_PACK_FONT_LINKS",{enumerable:!0,get:()=>l.NICE_THEME_PACK_FONT_LINKS});Object.defineProperty(exports,"NICE_THEME_PACK_FONT_LINKS_EXTENDED",{enumerable:!0,get:()=>l.NICE_THEME_PACK_FONT_LINKS_EXTENDED});Object.defineProperty(exports,"NICE_THEME_PACK_LIST",{enumerable:!0,get:()=>l.NICE_THEME_PACK_LIST});Object.defineProperty(exports,"NICE_THEME_PACK_LIST_EXTENDED",{enumerable:!0,get:()=>l.NICE_THEME_PACK_LIST_EXTENDED});Object.defineProperty(exports,"NICE_THEME_PRESETS",{enumerable:!0,get:()=>l.NICE_THEME_PRESETS});Object.defineProperty(exports,"NiceA11yProvider",{enumerable:!0,get:()=>l.NiceA11yProvider});Object.defineProperty(exports,"NiceAIProvider",{enumerable:!0,get:()=>l.NiceAIProvider});Object.defineProperty(exports,"NiceAccessControl",{enumerable:!0,get:()=>l.NiceAccessControl});Object.defineProperty(exports,"NiceButtonPrompt",{enumerable:!0,get:()=>l.NiceButtonPrompt});Object.defineProperty(exports,"NiceDataCache",{enumerable:!0,get:()=>l.NiceDataCache});Object.defineProperty(exports,"NiceDisplayStyleContext",{enumerable:!0,get:()=>l.NiceDisplayStyleContext});Object.defineProperty(exports,"NiceFieldStatus",{enumerable:!0,get:()=>l.NiceFieldStatus});Object.defineProperty(exports,"NiceFocusScope",{enumerable:!0,get:()=>l.NiceFocusScope});Object.defineProperty(exports,"NiceFocusable",{enumerable:!0,get:()=>l.NiceFocusable});Object.defineProperty(exports,"NiceHelpIcon",{enumerable:!0,get:()=>l.NiceHelpIcon});Object.defineProperty(exports,"NiceHelpProvider",{enumerable:!0,get:()=>l.NiceHelpProvider});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>l.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>l.NiceI18nProvider});Object.defineProperty(exports,"NiceIcon",{enumerable:!0,get:()=>l.NiceIcon});Object.defineProperty(exports,"NiceIconProvider",{enumerable:!0,get:()=>l.NiceIconProvider});Object.defineProperty(exports,"NiceInlineHelp",{enumerable:!0,get:()=>l.NiceInlineHelp});Object.defineProperty(exports,"NiceInputHintBar",{enumerable:!0,get:()=>l.NiceInputHintBar});Object.defineProperty(exports,"NiceInputProvider",{enumerable:!0,get:()=>l.NiceInputProvider});Object.defineProperty(exports,"NiceKeyCap",{enumerable:!0,get:()=>l.NiceKeyCap});Object.defineProperty(exports,"NiceKeyboardHint",{enumerable:!0,get:()=>l.NiceKeyboardHint});Object.defineProperty(exports,"NicePreferencesPanel",{enumerable:!0,get:()=>l.NicePreferencesPanel});Object.defineProperty(exports,"NiceProfiler",{enumerable:!0,get:()=>l.NiceProfiler});Object.defineProperty(exports,"NicePullToRefresh",{enumerable:!0,get:()=>l.NicePullToRefresh});Object.defineProperty(exports,"NiceQuickHelp",{enumerable:!0,get:()=>l.NiceQuickHelp});Object.defineProperty(exports,"NiceRTLProvider",{enumerable:!0,get:()=>l.NiceRTLProvider});Object.defineProperty(exports,"NiceRequestDeduplicator",{enumerable:!0,get:()=>l.NiceRequestDeduplicator});Object.defineProperty(exports,"NiceSkipLink",{enumerable:!0,get:()=>l.NiceSkipLink});Object.defineProperty(exports,"NiceSpatialNavProvider",{enumerable:!0,get:()=>l.NiceSpatialNavProvider});Object.defineProperty(exports,"NiceStateIO",{enumerable:!0,get:()=>l.NiceStateIO});Object.defineProperty(exports,"NiceSwipeableListItem",{enumerable:!0,get:()=>l.NiceSwipeableListItem});Object.defineProperty(exports,"NiceTestWrapper",{enumerable:!0,get:()=>l.NiceTestWrapper});Object.defineProperty(exports,"NiceThemeContext",{enumerable:!0,get:()=>l.NiceThemeContext});Object.defineProperty(exports,"NiceThemeProvider",{enumerable:!0,get:()=>l.NiceThemeProvider});Object.defineProperty(exports,"NiceThemeVariantConfigurator",{enumerable:!0,get:()=>l.NiceThemeVariantConfigurator});Object.defineProperty(exports,"NiceThemeVariantProvider",{enumerable:!0,get:()=>l.NiceThemeVariantProvider});Object.defineProperty(exports,"NiceTouchTarget",{enumerable:!0,get:()=>l.NiceTouchTarget});Object.defineProperty(exports,"NiceTutorialButton",{enumerable:!0,get:()=>l.NiceTutorialButton});Object.defineProperty(exports,"NiceTutorialsProvider",{enumerable:!0,get:()=>l.NiceTutorialsProvider});Object.defineProperty(exports,"NiceUserPreferencesProvider",{enumerable:!0,get:()=>l.NiceUserPreferencesProvider});Object.defineProperty(exports,"NiceVisuallyHidden",{enumerable:!0,get:()=>l.NiceVisuallyHidden});Object.defineProperty(exports,"PRIVACY_LEVEL_ORDER",{enumerable:!0,get:()=>l.PRIVACY_LEVEL_ORDER});Object.defineProperty(exports,"ProfilerOverlay",{enumerable:!0,get:()=>l.ProfilerOverlay});Object.defineProperty(exports,"RADIUS_VALUES",{enumerable:!0,get:()=>l.RADIUS_VALUES});Object.defineProperty(exports,"RestAPISyncAdapter",{enumerable:!0,get:()=>l.RestAPISyncAdapter});Object.defineProperty(exports,"SHADOW_DARK_MODE_VALUES",{enumerable:!0,get:()=>l.SHADOW_DARK_MODE_VALUES});Object.defineProperty(exports,"SHADOW_VALUES",{enumerable:!0,get:()=>l.SHADOW_VALUES});Object.defineProperty(exports,"StorageAdapter",{enumerable:!0,get:()=>l.StorageAdapter});Object.defineProperty(exports,"THEME_DEFAULT_LINKS",{enumerable:!0,get:()=>l.THEME_DEFAULT_LINKS});Object.defineProperty(exports,"THEME_HEADER_CURVE",{enumerable:!0,get:()=>l.THEME_HEADER_CURVE});Object.defineProperty(exports,"THEME_HIGHLIGHT_CURVE",{enumerable:!0,get:()=>l.THEME_HIGHLIGHT_CURVE});Object.defineProperty(exports,"THEME_SURFACE_PATHS",{enumerable:!0,get:()=>l.THEME_SURFACE_PATHS});Object.defineProperty(exports,"TRACELESS_MODE_PRESETS",{enumerable:!0,get:()=>l.TRACELESS_MODE_PRESETS});Object.defineProperty(exports,"VARIANT_PRESETS",{enumerable:!0,get:()=>l.VARIANT_PRESETS});Object.defineProperty(exports,"ValidationRules",{enumerable:!0,get:()=>l.ValidationRules});Object.defineProperty(exports,"accessModeAttrs",{enumerable:!0,get:()=>l.accessModeAttrs});Object.defineProperty(exports,"aggregate",{enumerable:!0,get:()=>l.aggregate});Object.defineProperty(exports,"applyTheme",{enumerable:!0,get:()=>l.applyTheme});Object.defineProperty(exports,"applyVariantConfig",{enumerable:!0,get:()=>l.applyVariantConfig});Object.defineProperty(exports,"applyVariantsToTheme",{enumerable:!0,get:()=>l.applyVariantsToTheme});Object.defineProperty(exports,"auditStorageCompliance",{enumerable:!0,get:()=>l.auditStorageCompliance});Object.defineProperty(exports,"auditWCAG22AAA",{enumerable:!0,get:()=>l.auditWCAG22AAA});Object.defineProperty(exports,"buildAriaDescribedBy",{enumerable:!0,get:()=>l.buildAriaDescribedBy});Object.defineProperty(exports,"buildFormFieldAria",{enumerable:!0,get:()=>l.buildFormFieldAria});Object.defineProperty(exports,"calculateDataDiff",{enumerable:!0,get:()=>l.calculateDataDiff});Object.defineProperty(exports,"checkAriaCompliance",{enumerable:!0,get:()=>l.checkAriaCompliance});Object.defineProperty(exports,"checkContrastAAA",{enumerable:!0,get:()=>l.checkContrastAAA});Object.defineProperty(exports,"checkRegression",{enumerable:!0,get:()=>l.checkRegression});Object.defineProperty(exports,"clearLeakReports",{enumerable:!0,get:()=>l.clearLeakReports});Object.defineProperty(exports,"clearProfilingData",{enumerable:!0,get:()=>l.clearProfilingData});Object.defineProperty(exports,"clickOnActivationKey",{enumerable:!0,get:()=>l.clickOnActivationKey});Object.defineProperty(exports,"colorSetSnapshot",{enumerable:!0,get:()=>l.colorSetSnapshot});Object.defineProperty(exports,"configureLeakDetector",{enumerable:!0,get:()=>l.configureLeakDetector});Object.defineProperty(exports,"configureProfiler",{enumerable:!0,get:()=>l.configureProfiler});Object.defineProperty(exports,"createArrayDataSource",{enumerable:!0,get:()=>l.createArrayDataSource});Object.defineProperty(exports,"createCustomDataSource",{enumerable:!0,get:()=>l.createCustomDataSource});Object.defineProperty(exports,"createGraphQLDataSource",{enumerable:!0,get:()=>l.createGraphQLDataSource});Object.defineProperty(exports,"createGraphQLSubscriptionSource",{enumerable:!0,get:()=>l.createGraphQLSubscriptionSource});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>l.createICUTranslator});Object.defineProperty(exports,"createId",{enumerable:!0,get:()=>l.createId});Object.defineProperty(exports,"createIndexedDBDataSource",{enumerable:!0,get:()=>l.createIndexedDBDataSource});Object.defineProperty(exports,"createInfiniteScroll",{enumerable:!0,get:()=>l.createInfiniteScroll});Object.defineProperty(exports,"createMockDataSource",{enumerable:!0,get:()=>l.createMockDataSource});Object.defineProperty(exports,"createNavigationActions",{enumerable:!0,get:()=>l.createNavigationActions});Object.defineProperty(exports,"createNiceReduxMiddleware",{enumerable:!0,get:()=>l.createNiceReduxMiddleware});Object.defineProperty(exports,"createODataDataSource",{enumerable:!0,get:()=>l.createODataDataSource});Object.defineProperty(exports,"createOfflineFirstDataSource",{enumerable:!0,get:()=>l.createOfflineFirstDataSource});Object.defineProperty(exports,"createReactQueryAdapter",{enumerable:!0,get:()=>l.createReactQueryAdapter});Object.defineProperty(exports,"createRestDataSource",{enumerable:!0,get:()=>l.createRestDataSource});Object.defineProperty(exports,"createSSEDataSource",{enumerable:!0,get:()=>l.createSSEDataSource});Object.defineProperty(exports,"createSignalRDataSource",{enumerable:!0,get:()=>l.createSignalRDataSource});Object.defineProperty(exports,"createTabEscape",{enumerable:!0,get:()=>l.createTabEscape});Object.defineProperty(exports,"createURLStateManager",{enumerable:!0,get:()=>l.createURLStateManager});Object.defineProperty(exports,"createUserPreferencesStore",{enumerable:!0,get:()=>l.createUserPreferencesStore});Object.defineProperty(exports,"createWebSocketDataSource",{enumerable:!0,get:()=>l.createWebSocketDataSource});Object.defineProperty(exports,"createZustandAdapter",{enumerable:!0,get:()=>l.createZustandAdapter});Object.defineProperty(exports,"defaultValidationMessage",{enumerable:!0,get:()=>l.defaultValidationMessage});Object.defineProperty(exports,"deprecateProp",{enumerable:!0,get:()=>l.deprecateProp});Object.defineProperty(exports,"deprecateSymbol",{enumerable:!0,get:()=>l.deprecateSymbol});Object.defineProperty(exports,"deriveColorSet",{enumerable:!0,get:()=>l.deriveColorSet});Object.defineProperty(exports,"deserializeTheme",{enumerable:!0,get:()=>l.deserializeTheme});Object.defineProperty(exports,"detectGamepadFamily",{enumerable:!0,get:()=>l.detectGamepadFamily});Object.defineProperty(exports,"endMark",{enumerable:!0,get:()=>l.endMark});Object.defineProperty(exports,"evaluateValidation",{enumerable:!0,get:()=>l.evaluateValidation});Object.defineProperty(exports,"evaluateValidationRule",{enumerable:!0,get:()=>l.evaluateValidationRule});Object.defineProperty(exports,"filterGroupToWhere",{enumerable:!0,get:()=>l.filterGroupToWhere});Object.defineProperty(exports,"filterNiceThemePacksByTag",{enumerable:!0,get:()=>l.filterNiceThemePacksByTag});Object.defineProperty(exports,"forceGC",{enumerable:!0,get:()=>l.forceGC});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>l.formatICU});Object.defineProperty(exports,"formatShortcut",{enumerable:!0,get:()=>l.formatShortcut});Object.defineProperty(exports,"gamepadButtonLabel",{enumerable:!0,get:()=>l.gamepadButtonLabel});Object.defineProperty(exports,"gamepadGlyphName",{enumerable:!0,get:()=>l.gamepadGlyphName});Object.defineProperty(exports,"generateBadgeStyles",{enumerable:!0,get:()=>l.generateBadgeStyles});Object.defineProperty(exports,"generateButtonStyles",{enumerable:!0,get:()=>l.generateButtonStyles});Object.defineProperty(exports,"generateCardStyles",{enumerable:!0,get:()=>l.generateCardStyles});Object.defineProperty(exports,"generateFillStyles",{enumerable:!0,get:()=>l.generateFillStyles});Object.defineProperty(exports,"generateFormFieldsFromOpenAPI",{enumerable:!0,get:()=>l.generateFormFieldsFromSchema});Object.defineProperty(exports,"generateFromOpenAPI",{enumerable:!0,get:()=>l.generateFromOpenAPI});Object.defineProperty(exports,"generateGridColumnsFromOpenAPI",{enumerable:!0,get:()=>l.generateColumnsFromSchema});Object.defineProperty(exports,"generateInputStyles",{enumerable:!0,get:()=>l.generateInputStyles});Object.defineProperty(exports,"generatePaletteFromColor",{enumerable:!0,get:()=>l.generatePaletteFromColor});Object.defineProperty(exports,"generateTabStyles",{enumerable:!0,get:()=>l.generateTabStyles});Object.defineProperty(exports,"generateTableStyles",{enumerable:!0,get:()=>l.generateTableStyles});Object.defineProperty(exports,"generateToggleStyles",{enumerable:!0,get:()=>l.generateToggleStyles});Object.defineProperty(exports,"generateTooltipStyles",{enumerable:!0,get:()=>l.generateTooltipStyles});Object.defineProperty(exports,"generateTracelessComplianceReport",{enumerable:!0,get:()=>l.generateTracelessComplianceReport});Object.defineProperty(exports,"generateVariantCSS",{enumerable:!0,get:()=>l.generateVariantCSS});Object.defineProperty(exports,"getComponentStats",{enumerable:!0,get:()=>l.getComponentStats});Object.defineProperty(exports,"getComponentStyleFromConfig",{enumerable:!0,get:()=>l.getComponentStyleFromConfig});Object.defineProperty(exports,"getComputedTheme",{enumerable:!0,get:()=>l.getComputedTheme});Object.defineProperty(exports,"getDisplayStyleDataAttrs",{enumerable:!0,get:()=>l.getDisplayStyleDataAttrs});Object.defineProperty(exports,"getInputEngine",{enumerable:!0,get:()=>l.getInputEngine});Object.defineProperty(exports,"getLeakReports",{enumerable:!0,get:()=>l.getLeakReports});Object.defineProperty(exports,"getLeakSummary",{enumerable:!0,get:()=>l.getLeakSummary});Object.defineProperty(exports,"getNiceAnimationClass",{enumerable:!0,get:()=>l.getNiceAnimationClass});Object.defineProperty(exports,"getNiceThemePack",{enumerable:!0,get:()=>l.getNiceThemePack});Object.defineProperty(exports,"getPerformanceReport",{enumerable:!0,get:()=>l.getPerformanceReport});Object.defineProperty(exports,"getProfilingStats",{enumerable:!0,get:()=>l.getProfilingStats});Object.defineProperty(exports,"getRecentTimings",{enumerable:!0,get:()=>l.getRecentTimings});Object.defineProperty(exports,"getSlowRenders",{enumerable:!0,get:()=>l.getSlowRenders});Object.defineProperty(exports,"getThemeValue",{enumerable:!0,get:()=>l.getThemeValue});Object.defineProperty(exports,"getTracelessBadgeInfo",{enumerable:!0,get:()=>l.getTracelessBadgeInfo});Object.defineProperty(exports,"groupBy",{enumerable:!0,get:()=>l.groupBy});Object.defineProperty(exports,"groupByHierarchical",{enumerable:!0,get:()=>l.groupByHierarchical});Object.defineProperty(exports,"isRecordValid",{enumerable:!0,get:()=>l.isRecordValid});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>l.loadNiceDictionary});Object.defineProperty(exports,"logicalProps",{enumerable:!0,get:()=>l.logicalProps});Object.defineProperty(exports,"matchesShortcut",{enumerable:!0,get:()=>l.matchesShortcut});Object.defineProperty(exports,"measureAsync",{enumerable:!0,get:()=>l.measureAsync});Object.defineProperty(exports,"measureSync",{enumerable:!0,get:()=>l.measureSync});Object.defineProperty(exports,"niceReduxActions",{enumerable:!0,get:()=>l.niceReduxActions});Object.defineProperty(exports,"niceReduxReducer",{enumerable:!0,get:()=>l.niceReduxReducer});Object.defineProperty(exports,"niceSelectors",{enumerable:!0,get:()=>l.niceSelectors});Object.defineProperty(exports,"niceStaggerDelay",{enumerable:!0,get:()=>l.niceStaggerDelay});Object.defineProperty(exports,"niceThemeBankingV2",{enumerable:!0,get:()=>l.niceThemeBankingV2});Object.defineProperty(exports,"niceThemeBlackTieGala",{enumerable:!0,get:()=>l.niceThemeBlackTieGala});Object.defineProperty(exports,"niceThemeBlue",{enumerable:!0,get:()=>l.niceThemeBlue});Object.defineProperty(exports,"niceThemeBootstrap",{enumerable:!0,get:()=>l.niceThemeBootstrap});Object.defineProperty(exports,"niceThemeDark",{enumerable:!0,get:()=>l.niceThemeDark});Object.defineProperty(exports,"niceThemeFluent",{enumerable:!0,get:()=>l.niceThemeFluent});Object.defineProperty(exports,"niceThemeFluentV2",{enumerable:!0,get:()=>l.niceThemeFluentV2});Object.defineProperty(exports,"niceThemeHighContrast",{enumerable:!0,get:()=>l.niceThemeHighContrast});Object.defineProperty(exports,"niceThemeLight",{enumerable:!0,get:()=>l.niceThemeLight});Object.defineProperty(exports,"niceThemeMaterial",{enumerable:!0,get:()=>l.niceThemeMaterial});Object.defineProperty(exports,"niceThemeMinimalism",{enumerable:!0,get:()=>l.niceThemeMinimalism});Object.defineProperty(exports,"niceThemeObsidianV2",{enumerable:!0,get:()=>l.niceThemeObsidianV2});Object.defineProperty(exports,"niceThemeOnyxV2",{enumerable:!0,get:()=>l.niceThemeOnyxV2});Object.defineProperty(exports,"niceThemeShadowV2",{enumerable:!0,get:()=>l.niceThemeShadowV2});Object.defineProperty(exports,"niceThemeSlateV2",{enumerable:!0,get:()=>l.niceThemeSlateV2});Object.defineProperty(exports,"parseThemeRef",{enumerable:!0,get:()=>l.parseThemeRef});Object.defineProperty(exports,"pivot",{enumerable:!0,get:()=>l.pivot});Object.defineProperty(exports,"printPerformanceReport",{enumerable:!0,get:()=>l.printPerformanceReport});Object.defineProperty(exports,"removeTheme",{enumerable:!0,get:()=>l.removeTheme});Object.defineProperty(exports,"renameThemeRef",{enumerable:!0,get:()=>l.renameThemeRef});Object.defineProperty(exports,"resolveCssColor",{enumerable:!0,get:()=>l.resolveCssColor});Object.defineProperty(exports,"resolveDisplayStyleConfig",{enumerable:!0,get:()=>l.resolveDisplayStyleConfig});Object.defineProperty(exports,"resolveStepsI18n",{enumerable:!0,get:()=>l.resolveStepsI18n});Object.defineProperty(exports,"resolveTheme",{enumerable:!0,get:()=>l.resolveTheme});Object.defineProperty(exports,"resolveThemeValue",{enumerable:!0,get:()=>l.resolveThemeValue});Object.defineProperty(exports,"resolveTracelessPolicy",{enumerable:!0,get:()=>l.resolveTracelessPolicy});Object.defineProperty(exports,"resolveTutorial",{enumerable:!0,get:()=>l.resolveTutorial});Object.defineProperty(exports,"saveBaseline",{enumerable:!0,get:()=>l.saveBaseline});Object.defineProperty(exports,"serializeTheme",{enumerable:!0,get:()=>l.serializeTheme});Object.defineProperty(exports,"setupReactDevToolsIntegration",{enumerable:!0,get:()=>l.setupReactDevToolsIntegration});Object.defineProperty(exports,"simulateKeyboard",{enumerable:!0,get:()=>l.simulateKeyboard});Object.defineProperty(exports,"simulateType",{enumerable:!0,get:()=>l.simulateType});Object.defineProperty(exports,"sortModelToOrderBy",{enumerable:!0,get:()=>l.sortModelToOrderBy});Object.defineProperty(exports,"startMark",{enumerable:!0,get:()=>l.startMark});Object.defineProperty(exports,"takeMemorySnapshot",{enumerable:!0,get:()=>l.takeMemorySnapshot});Object.defineProperty(exports,"testId",{enumerable:!0,get:()=>l.testId});Object.defineProperty(exports,"themeAbyss",{enumerable:!0,get:()=>l.themeAbyss});Object.defineProperty(exports,"themeAfricanEarth",{enumerable:!0,get:()=>l.themeAfricanEarth});Object.defineProperty(exports,"themeAmber",{enumerable:!0,get:()=>l.themeAmber});Object.defineProperty(exports,"themeArctic",{enumerable:!0,get:()=>l.themeArctic});Object.defineProperty(exports,"themeAurora",{enumerable:!0,get:()=>l.themeAurora});Object.defineProperty(exports,"themeAutumn",{enumerable:!0,get:()=>l.themeAutumn});Object.defineProperty(exports,"themeBanking",{enumerable:!0,get:()=>l.themeBanking});Object.defineProperty(exports,"themeBrazilianCarnival",{enumerable:!0,get:()=>l.themeBrazilianCarnival});Object.defineProperty(exports,"themeCarbon",{enumerable:!0,get:()=>l.themeCarbon});Object.defineProperty(exports,"themeCharcoal",{enumerable:!0,get:()=>l.themeCharcoal});Object.defineProperty(exports,"themeCherryBlossom",{enumerable:!0,get:()=>l.themeCherryBlossom});Object.defineProperty(exports,"themeChineseNewYear",{enumerable:!0,get:()=>l.themeChineseNewYear});Object.defineProperty(exports,"themeChristmas",{enumerable:!0,get:()=>l.themeChristmas});Object.defineProperty(exports,"themeCoffee",{enumerable:!0,get:()=>l.themeCoffee});Object.defineProperty(exports,"themeCoolGray",{enumerable:!0,get:()=>l.themeCoolGray});Object.defineProperty(exports,"themeCoral",{enumerable:!0,get:()=>l.themeCoral});Object.defineProperty(exports,"themeCosmos",{enumerable:!0,get:()=>l.themeCosmos});Object.defineProperty(exports,"themeCyan",{enumerable:!0,get:()=>l.themeCyan});Object.defineProperty(exports,"themeCyberpunk",{enumerable:!0,get:()=>l.themeCyberpunk});Object.defineProperty(exports,"themeDesert",{enumerable:!0,get:()=>l.themeDesert});Object.defineProperty(exports,"themeDracula",{enumerable:!0,get:()=>l.themeDracula});Object.defineProperty(exports,"themeEaster",{enumerable:!0,get:()=>l.themeEaster});Object.defineProperty(exports,"themeEclipse",{enumerable:!0,get:()=>l.themeEclipse});Object.defineProperty(exports,"themeEducation",{enumerable:!0,get:()=>l.themeEducation});Object.defineProperty(exports,"themeEmerald",{enumerable:!0,get:()=>l.themeEmerald});Object.defineProperty(exports,"themeEmeraldDark",{enumerable:!0,get:()=>l.themeEmeraldDark});Object.defineProperty(exports,"themeEnhancedContrast",{enumerable:!0,get:()=>l.themeEnhancedContrast});Object.defineProperty(exports,"themeEnterprise",{enumerable:!0,get:()=>l.themeEnterprise});Object.defineProperty(exports,"themeForest",{enumerable:!0,get:()=>l.themeForest});Object.defineProperty(exports,"themeFuchsia",{enumerable:!0,get:()=>l.themeFuchsia});Object.defineProperty(exports,"themeGlassmorphism",{enumerable:!0,get:()=>l.themeGlassmorphism});Object.defineProperty(exports,"themeGovernment",{enumerable:!0,get:()=>l.themeGovernment});Object.defineProperty(exports,"themeHalloween",{enumerable:!0,get:()=>l.themeHalloween});Object.defineProperty(exports,"themeHarvest",{enumerable:!0,get:()=>l.themeHarvest});Object.defineProperty(exports,"themeHealthcare",{enumerable:!0,get:()=>l.themeHealthcare});Object.defineProperty(exports,"themeHighContrastDark",{enumerable:!0,get:()=>l.themeHighContrastDark});Object.defineProperty(exports,"themeIndianFestive",{enumerable:!0,get:()=>l.themeIndianFestive});Object.defineProperty(exports,"themeIndigo",{enumerable:!0,get:()=>l.themeIndigo});Object.defineProperty(exports,"themeIvory",{enumerable:!0,get:()=>l.themeIvory});Object.defineProperty(exports,"themeJapaneseZen",{enumerable:!0,get:()=>l.themeJapaneseZen});Object.defineProperty(exports,"themeLargeText",{enumerable:!0,get:()=>l.themeLargeText});Object.defineProperty(exports,"themeLavender",{enumerable:!0,get:()=>l.themeLavender});Object.defineProperty(exports,"themeLegal",{enumerable:!0,get:()=>l.themeLegal});Object.defineProperty(exports,"themeLime",{enumerable:!0,get:()=>l.themeLime});Object.defineProperty(exports,"themeMediterranean",{enumerable:!0,get:()=>l.themeMediterranean});Object.defineProperty(exports,"themeMidnight",{enumerable:!0,get:()=>l.themeMidnight});Object.defineProperty(exports,"themeMinimalist",{enumerable:!0,get:()=>l.themeMinimalist});Object.defineProperty(exports,"themeMonochrome",{enumerable:!0,get:()=>l.themeMonochrome});Object.defineProperty(exports,"themeMonokai",{enumerable:!0,get:()=>l.themeMonokai});Object.defineProperty(exports,"themeMoroccan",{enumerable:!0,get:()=>l.themeMoroccan});Object.defineProperty(exports,"themeNebula",{enumerable:!0,get:()=>l.themeNebula});Object.defineProperty(exports,"themeNeon",{enumerable:!0,get:()=>l.themeNeon});Object.defineProperty(exports,"themeNeumorphismDark",{enumerable:!0,get:()=>l.themeNeumorphismDark});Object.defineProperty(exports,"themeNeumorphismLight",{enumerable:!0,get:()=>l.themeNeumorphismLight});Object.defineProperty(exports,"themeNord",{enumerable:!0,get:()=>l.themeNord});Object.defineProperty(exports,"themeObsidian",{enumerable:!0,get:()=>l.themeObsidian});Object.defineProperty(exports,"themeOcean",{enumerable:!0,get:()=>l.themeOcean});Object.defineProperty(exports,"themeOneDark",{enumerable:!0,get:()=>l.themeOneDark});Object.defineProperty(exports,"themeOnyx",{enumerable:!0,get:()=>l.themeOnyx});Object.defineProperty(exports,"themeOrange",{enumerable:!0,get:()=>l.themeOrange});Object.defineProperty(exports,"themePastelCoral",{enumerable:!0,get:()=>l.themePastelCoral});Object.defineProperty(exports,"themePastelLavender",{enumerable:!0,get:()=>l.themePastelLavender});Object.defineProperty(exports,"themePastelLemon",{enumerable:!0,get:()=>l.themePastelLemon});Object.defineProperty(exports,"themePastelMint",{enumerable:!0,get:()=>l.themePastelMint});Object.defineProperty(exports,"themePastelPeach",{enumerable:!0,get:()=>l.themePastelPeach});Object.defineProperty(exports,"themePastelRose",{enumerable:!0,get:()=>l.themePastelRose});Object.defineProperty(exports,"themePastelSage",{enumerable:!0,get:()=>l.themePastelSage});Object.defineProperty(exports,"themePastelSky",{enumerable:!0,get:()=>l.themePastelSky});Object.defineProperty(exports,"themePink",{enumerable:!0,get:()=>l.themePink});Object.defineProperty(exports,"themePreviewRoles",{enumerable:!0,get:()=>l.themePreviewRoles});Object.defineProperty(exports,"themeRealEstate",{enumerable:!0,get:()=>l.themeRealEstate});Object.defineProperty(exports,"themeRefsIn",{enumerable:!0,get:()=>l.themeRefsIn});Object.defineProperty(exports,"themeRefsOf",{enumerable:!0,get:()=>l.themeRefsOf});Object.defineProperty(exports,"themeRetrowave",{enumerable:!0,get:()=>l.themeRetrowave});Object.defineProperty(exports,"themeRose",{enumerable:!0,get:()=>l.themeRose});Object.defineProperty(exports,"themeRuby",{enumerable:!0,get:()=>l.themeRuby});Object.defineProperty(exports,"themeScandinavian",{enumerable:!0,get:()=>l.themeScandinavian});Object.defineProperty(exports,"themeSepia",{enumerable:!0,get:()=>l.themeSepia});Object.defineProperty(exports,"themeShadow",{enumerable:!0,get:()=>l.themeShadow});Object.defineProperty(exports,"themeSilver",{enumerable:!0,get:()=>l.themeSilver});Object.defineProperty(exports,"themeSky",{enumerable:!0,get:()=>l.themeSky});Object.defineProperty(exports,"themeSlate",{enumerable:!0,get:()=>l.themeSlate});Object.defineProperty(exports,"themeSoftDark",{enumerable:!0,get:()=>l.themeSoftDark});Object.defineProperty(exports,"themeSolarizedDark",{enumerable:!0,get:()=>l.themeSolarizedDark});Object.defineProperty(exports,"themeSolarizedLight",{enumerable:!0,get:()=>l.themeSolarizedLight});Object.defineProperty(exports,"themeSpring",{enumerable:!0,get:()=>l.themeSpring});Object.defineProperty(exports,"themeStone",{enumerable:!0,get:()=>l.themeStone});Object.defineProperty(exports,"themeSummerBeach",{enumerable:!0,get:()=>l.themeSummerBeach});Object.defineProperty(exports,"themeSunset",{enumerable:!0,get:()=>l.themeSunset});Object.defineProperty(exports,"themeSynthwave",{enumerable:!0,get:()=>l.themeSynthwave});Object.defineProperty(exports,"themeTeal",{enumerable:!0,get:()=>l.themeTeal});Object.defineProperty(exports,"themeTechStartup",{enumerable:!0,get:()=>l.themeTechStartup});Object.defineProperty(exports,"themeTerminalGreen",{enumerable:!0,get:()=>l.themeTerminalGreen});Object.defineProperty(exports,"themeToCssVars",{enumerable:!0,get:()=>l.themeToCssVars});Object.defineProperty(exports,"themeTropical",{enumerable:!0,get:()=>l.themeTropical});Object.defineProperty(exports,"themeValentine",{enumerable:!0,get:()=>l.themeValentine});Object.defineProperty(exports,"themeVaporwave",{enumerable:!0,get:()=>l.themeVaporwave});Object.defineProperty(exports,"themeVintage",{enumerable:!0,get:()=>l.themeVintage});Object.defineProperty(exports,"themeViolet",{enumerable:!0,get:()=>l.themeViolet});Object.defineProperty(exports,"themeWarmDark",{enumerable:!0,get:()=>l.themeWarmDark});Object.defineProperty(exports,"themeWarmGray",{enumerable:!0,get:()=>l.themeWarmGray});Object.defineProperty(exports,"themeWine",{enumerable:!0,get:()=>l.themeWine});Object.defineProperty(exports,"themeWinterFrost",{enumerable:!0,get:()=>l.themeWinterFrost});Object.defineProperty(exports,"themeZinc",{enumerable:!0,get:()=>l.themeZinc});Object.defineProperty(exports,"toAriaKeyShortcuts",{enumerable:!0,get:()=>l.toAriaKeyShortcuts});Object.defineProperty(exports,"toGamepadButton",{enumerable:!0,get:()=>l.toGamepadButton});Object.defineProperty(exports,"triggerHaptic",{enumerable:!0,get:()=>l.triggerHaptic});Object.defineProperty(exports,"triggerNiceAction",{enumerable:!0,get:()=>l.triggerNiceAction});Object.defineProperty(exports,"useAICompletion",{enumerable:!0,get:()=>l.useAICompletion});Object.defineProperty(exports,"useAdaptiveVariant",{enumerable:!0,get:()=>l.useAdaptiveVariant});Object.defineProperty(exports,"useBrandColors",{enumerable:!0,get:()=>l.useBrandColors});Object.defineProperty(exports,"useBreakpoint",{enumerable:!0,get:()=>l.useBreakpoint});Object.defineProperty(exports,"useChartPreferences",{enumerable:!0,get:()=>l.useChartPreferences});Object.defineProperty(exports,"useChartSuggestion",{enumerable:!0,get:()=>l.useChartSuggestion});Object.defineProperty(exports,"useClickOutside",{enumerable:!0,get:()=>l.useClickOutside});Object.defineProperty(exports,"useCodeCompletion",{enumerable:!0,get:()=>l.useCodeCompletion});Object.defineProperty(exports,"useCognitiveAccessibility",{enumerable:!0,get:()=>l.useCognitiveAccessibility});Object.defineProperty(exports,"useComponentDisplayClass",{enumerable:!0,get:()=>l.useComponentDisplayClass});Object.defineProperty(exports,"useComponentDisplayStyle",{enumerable:!0,get:()=>l.useComponentDisplayStyle});Object.defineProperty(exports,"useComponentHelp",{enumerable:!0,get:()=>l.useComponentHelp});Object.defineProperty(exports,"useConnectedGamepads",{enumerable:!0,get:()=>l.useConnectedGamepads});Object.defineProperty(exports,"useContainerSize",{enumerable:!0,get:()=>l.useContainerSize});Object.defineProperty(exports,"useControlId",{enumerable:!0,get:()=>l.useControlId});Object.defineProperty(exports,"useControlPreferences",{enumerable:!0,get:()=>l.useControlPreferences});Object.defineProperty(exports,"useControllableState",{enumerable:!0,get:()=>l.useControllableState});Object.defineProperty(exports,"useDarkMode",{enumerable:!0,get:()=>l.useDarkMode});Object.defineProperty(exports,"useDebouncedValue",{enumerable:!0,get:()=>l.useDebouncedValue});Object.defineProperty(exports,"useDevice",{enumerable:!0,get:()=>l.useDevice});Object.defineProperty(exports,"useDisplayAnimation",{enumerable:!0,get:()=>l.useDisplayAnimation});Object.defineProperty(exports,"useDisplayDensity",{enumerable:!0,get:()=>l.useDisplayDensity});Object.defineProperty(exports,"useEngage",{enumerable:!0,get:()=>l.useEngage});Object.defineProperty(exports,"useFocusManagement",{enumerable:!0,get:()=>l.useFocusManagement});Object.defineProperty(exports,"useFocusScope",{enumerable:!0,get:()=>l.useFocusScope});Object.defineProperty(exports,"useFocusTrap",{enumerable:!0,get:()=>l.useFocusTrap});Object.defineProperty(exports,"useFormGeneration",{enumerable:!0,get:()=>l.useFormGeneration});Object.defineProperty(exports,"useGamepad",{enumerable:!0,get:()=>l.useGamepad});Object.defineProperty(exports,"useGamepadFamily",{enumerable:!0,get:()=>l.useGamepadFamily});Object.defineProperty(exports,"useGridFocus",{enumerable:!0,get:()=>l.useGridFocus});Object.defineProperty(exports,"useGridPreferences",{enumerable:!0,get:()=>l.useGridPreferences});Object.defineProperty(exports,"useHaptic",{enumerable:!0,get:()=>l.useHaptic});Object.defineProperty(exports,"useHintsVisible",{enumerable:!0,get:()=>l.useHintsVisible});Object.defineProperty(exports,"useInputEngine",{enumerable:!0,get:()=>l.useInputEngine});Object.defineProperty(exports,"useInputHints",{enumerable:!0,get:()=>l.useInputHints});Object.defineProperty(exports,"useInputMethod",{enumerable:!0,get:()=>l.useInputMethod});Object.defineProperty(exports,"useInputMode",{enumerable:!0,get:()=>l.useInputMode});Object.defineProperty(exports,"useInputPreferences",{enumerable:!0,get:()=>l.useInputPreferences});Object.defineProperty(exports,"useInputState",{enumerable:!0,get:()=>l.useInputState});Object.defineProperty(exports,"useIntent",{enumerable:!0,get:()=>l.useIntent});Object.defineProperty(exports,"useIsTouchDevice",{enumerable:!0,get:()=>l.useIsTouchDevice});Object.defineProperty(exports,"useLiveAnnouncement",{enumerable:!0,get:()=>l.useLiveAnnouncement});Object.defineProperty(exports,"useLongPress",{enumerable:!0,get:()=>l.useLongPress});Object.defineProperty(exports,"useMeasureEffect",{enumerable:!0,get:()=>l.useMeasureEffect});Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:()=>l.useMediaQuery});Object.defineProperty(exports,"useMemoryMonitor",{enumerable:!0,get:()=>l.useMemoryMonitor});Object.defineProperty(exports,"useMenuButton",{enumerable:!0,get:()=>l.useMenuButton});Object.defineProperty(exports,"useNaturalLanguageFilter",{enumerable:!0,get:()=>l.useNaturalLanguageFilter});Object.defineProperty(exports,"useNiceA11y",{enumerable:!0,get:()=>l.useNiceA11y});Object.defineProperty(exports,"useNiceAI",{enumerable:!0,get:()=>l.useNiceAI});Object.defineProperty(exports,"useNiceAccessMode",{enumerable:!0,get:()=>l.useNiceAccessMode});Object.defineProperty(exports,"useNiceAction",{enumerable:!0,get:()=>l.useNiceAction});Object.defineProperty(exports,"useNiceActions",{enumerable:!0,get:()=>l.useNiceActions});Object.defineProperty(exports,"useNiceCollapse",{enumerable:!0,get:()=>l.useNiceCollapse});Object.defineProperty(exports,"useNiceDataSource",{enumerable:!0,get:()=>l.useNiceDataSource});Object.defineProperty(exports,"useNiceDisplayStyle",{enumerable:!0,get:()=>l.useNiceDisplayStyle});Object.defineProperty(exports,"useNiceField",{enumerable:!0,get:()=>l.useNiceField});Object.defineProperty(exports,"useNiceHelp",{enumerable:!0,get:()=>l.useNiceHelp});Object.defineProperty(exports,"useNiceIcon",{enumerable:!0,get:()=>l.useNiceIcon});Object.defineProperty(exports,"useNiceLookupSource",{enumerable:!0,get:()=>l.useNiceLookupSource});Object.defineProperty(exports,"useNiceRTL",{enumerable:!0,get:()=>l.useNiceRTL});Object.defineProperty(exports,"useNiceRecord",{enumerable:!0,get:()=>l.useNiceRecord});Object.defineProperty(exports,"useNiceTheme",{enumerable:!0,get:()=>l.useNiceTheme});Object.defineProperty(exports,"useNiceTransition",{enumerable:!0,get:()=>l.useNiceTransition});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>l.useNiceTranslation});Object.defineProperty(exports,"useNiceTutorials",{enumerable:!0,get:()=>l.useNiceTutorials});Object.defineProperty(exports,"useNiceTutorialsEnabled",{enumerable:!0,get:()=>l.useNiceTutorialsEnabled});Object.defineProperty(exports,"useOrientation",{enumerable:!0,get:()=>l.useOrientation});Object.defineProperty(exports,"useOverlayFocus",{enumerable:!0,get:()=>l.useOverlayFocus});Object.defineProperty(exports,"usePan",{enumerable:!0,get:()=>l.usePan});Object.defineProperty(exports,"usePinch",{enumerable:!0,get:()=>l.usePinch});Object.defineProperty(exports,"usePullToRefresh",{enumerable:!0,get:()=>l.usePullToRefresh});Object.defineProperty(exports,"useRenderCount",{enumerable:!0,get:()=>l.useRenderCount});Object.defineProperty(exports,"useResolvedDisplayStyle",{enumerable:!0,get:()=>l.useResolvedDisplayStyle});Object.defineProperty(exports,"useResponsiveValue",{enumerable:!0,get:()=>l.useResponsiveValue});Object.defineProperty(exports,"useRestoreFocus",{enumerable:!0,get:()=>l.useRestoreFocus});Object.defineProperty(exports,"useRouteAnnouncement",{enumerable:!0,get:()=>l.useRouteAnnouncement});Object.defineProperty(exports,"useRovingFocus",{enumerable:!0,get:()=>l.useRovingFocus});Object.defineProperty(exports,"useRovingTabIndex",{enumerable:!0,get:()=>l.useRovingTabIndex});Object.defineProperty(exports,"useSafeAbortController",{enumerable:!0,get:()=>l.useSafeAbortController});Object.defineProperty(exports,"useSafeAreaInsets",{enumerable:!0,get:()=>l.useSafeAreaInsets});Object.defineProperty(exports,"useSafeEventListener",{enumerable:!0,get:()=>l.useSafeEventListener});Object.defineProperty(exports,"useSafeFetch",{enumerable:!0,get:()=>l.useSafeFetch});Object.defineProperty(exports,"useSafeInterval",{enumerable:!0,get:()=>l.useSafeInterval});Object.defineProperty(exports,"useSafeState",{enumerable:!0,get:()=>l.useSafeState});Object.defineProperty(exports,"useSafeSubscription",{enumerable:!0,get:()=>l.useSafeSubscription});Object.defineProperty(exports,"useSafeTimeout",{enumerable:!0,get:()=>l.useSafeTimeout});Object.defineProperty(exports,"useSafeWebSocket",{enumerable:!0,get:()=>l.useSafeWebSocket});Object.defineProperty(exports,"useShowAt",{enumerable:!0,get:()=>l.useShowAt});Object.defineProperty(exports,"useSpatialFocusable",{enumerable:!0,get:()=>l.useSpatialFocusable});Object.defineProperty(exports,"useSpatialNav",{enumerable:!0,get:()=>l.useSpatialNav});Object.defineProperty(exports,"useSpatialNavOptional",{enumerable:!0,get:()=>l.useSpatialNavOptional});Object.defineProperty(exports,"useSubmitOnEnter",{enumerable:!0,get:()=>l.useSubmitOnEnter});Object.defineProperty(exports,"useSwipe",{enumerable:!0,get:()=>l.useSwipe});Object.defineProperty(exports,"useTextImprovement",{enumerable:!0,get:()=>l.useTextImprovement});Object.defineProperty(exports,"useThemeVariants",{enumerable:!0,get:()=>l.useThemeVariants});Object.defineProperty(exports,"useTreeFocus",{enumerable:!0,get:()=>l.useTreeFocus});Object.defineProperty(exports,"useUnmountLog",{enumerable:!0,get:()=>l.useUnmountLog});Object.defineProperty(exports,"useUserPreferences",{enumerable:!0,get:()=>l.useUserPreferences});Object.defineProperty(exports,"useVirtualKeyboard",{enumerable:!0,get:()=>l.useVirtualKeyboard});Object.defineProperty(exports,"useVoiceControl",{enumerable:!0,get:()=>l.useVoiceControl});Object.defineProperty(exports,"useWhyDidYouRender",{enumerable:!0,get:()=>l.useWhyDidYouRender});Object.defineProperty(exports,"validateData",{enumerable:!0,get:()=>l.validateData});Object.defineProperty(exports,"withCaching",{enumerable:!0,get:()=>l.withCaching});Object.defineProperty(exports,"withCalculatedColumns",{enumerable:!0,get:()=>l.withCalculatedColumns});Object.defineProperty(exports,"withCrossTabSync",{enumerable:!0,get:()=>l.withCrossTabSync});Object.defineProperty(exports,"withCursorPagination",{enumerable:!0,get:()=>l.withCursorPagination});Object.defineProperty(exports,"withLeakTracking",{enumerable:!0,get:()=>l.withLeakTracking});Object.defineProperty(exports,"withOptimisticUpdates",{enumerable:!0,get:()=>l.withOptimisticUpdates});Object.defineProperty(exports,"withPolling",{enumerable:!0,get:()=>l.withPolling});Object.defineProperty(exports,"withWhyDidYouRender",{enumerable:!0,get:()=>l.withWhyDidYouRender});Object.defineProperty(exports,"wouldCreateCycle",{enumerable:!0,get:()=>l.wouldCreateCycle});exports.TracelessProvider=Ft.TracelessProvider;exports.useCookieBannerVisibility=Ft.useCookieBannerVisibility;exports.useEditorStatePersistence=Ft.useEditorStatePersistence;exports.useGridStatePersistence=Ft.useGridStatePersistence;exports.usePersistedState=Ft.usePersistedState;exports.useResolvedStorageProps=Ft.useResolvedStorageProps;exports.useStorageAdapter=Ft.useStorageAdapter;exports.useStorageAudit=Ft.useStorageAudit;exports.useTracelessLocalStorage=Ft.useTracelessLocalStorage;exports.useTracelessPolicy=Ft.useTracelessPolicy;exports.useTracelessPolicySafe=Ft.useTracelessPolicySafe;exports.useTracelessSessionStorage=Ft.useTracelessSessionStorage;exports.useTracelessStorage=Ft.useTracelessStorage;exports.NICE_NO_CODE_STEP_TYPES=Oe.NICE_NO_CODE_STEP_TYPES;exports.NiceAPIFlow=Oe.NiceAPIFlow;exports.NiceCheckbox=Oe.NiceCheckbox;exports.NiceCodePreview=Oe.NiceCodePreview;exports.NiceCodeTemplate=Oe.NiceCodeTemplate;exports.NiceComponentDesigner=Oe.NiceComponentDesigner;exports.NiceDataMapper=Oe.NiceDataMapper;exports.NiceEventOrchestrator=Oe.NiceEventOrchestrator;exports.NiceLowCodeStudio=Oe.NiceLowCodeStudio;exports.NiceNoCodeScriptEditor=Oe.NiceNoCodeScriptEditor;exports.NiceNumberInput=Oe.NiceNumberInput;exports.NicePageBuilder=Oe.NicePageBuilder;exports.NiceSelect=Oe.NiceSelect;exports.NiceStateDesigner=Oe.NiceStateDesigner;exports.NiceTestBuilder=Oe.NiceTestBuilder;exports.NiceTextInput=Oe.NiceTextInput;exports.evaluateNoCodeExpression=Oe.evaluateNoCodeExpression;exports.newNoCodeStep=Oe.newNoCodeStep;exports.noCodeConditionsHold=Oe.noCodeConditionsHold;exports.noCodePath=Oe.noCodePath;exports.runNoCodeScript=Oe.runNoCodeScript;exports.validateNoCodeScript=Oe.validateNoCodeScript;exports.COUNTRIES=dt.COUNTRIES;exports.NiceAddress=dt.NiceAddress;exports.NiceAutocomplete=dt.NiceAutocomplete;exports.NiceCalendar=dt.NiceCalendar;exports.NiceCountryPicker=dt.NiceCountryPicker;exports.NiceDateTimePicker=dt.NiceDateTimePicker;exports.NiceForm=dt.NiceForm;exports.NiceMaskedInput=dt.NiceMaskedInput;exports.NicePasswordInput=dt.NicePasswordInput;exports.NiceRadioGroup=dt.NiceRadioGroup;exports.NiceRating=dt.NiceRating;exports.NiceSlider=dt.NiceSlider;exports.NiceTagBox=dt.NiceTagBox;exports.NiceTextArea=dt.NiceTextArea;exports.NiceUpload=dt.NiceUpload;exports.FlagIcon=Vt.FlagIcon;exports.NiceTabs=Vt.NiceTabs;exports.NiceToggle=Vt.NiceToggle;exports.ThemePreviewSwatch=Vt.ThemePreviewSwatch;exports.NiceColorPicker=bn.NiceColorPicker;exports.DEFAULT_ASPECT_RATIOS=it.DEFAULT_ASPECT_RATIOS;exports.EMOJI_DATA=it.EMOJI_DATA;exports.GRADIENT_PRESETS=it.GRADIENT_PRESETS;exports.NICE_COLOR_PRESET_KEYS=it.NICE_COLOR_PRESET_KEYS;exports.NiceAccountPicker=it.NiceAccountPicker;exports.NiceAddressInput=it.NiceAddressInput;exports.NiceCodeEditorAI=it.NiceCodeEditorAI;exports.NiceColorPalette=it.NiceColorPalette;exports.NiceContactPicker=it.NiceContactPicker;exports.NiceCropEditor=it.NiceCropEditor;exports.NiceDateRangeBox=it.NiceDateRangeBox;exports.NiceDocumentEditor=it.NiceDocumentEditor;exports.NiceDropDownBox=it.NiceDropDownBox;exports.NiceEmojiPicker=it.NiceEmojiPicker;exports.NiceGradientPicker=it.NiceGradientPicker;exports.NiceHtmlEditorAI=it.NiceHtmlEditorAI;exports.NiceImageAnnotator=it.NiceImageAnnotator;exports.NiceImageEditor=it.NiceImageEditor;exports.NiceInputOtp=it.NiceInputOtp;exports.NiceInvoiceLineEditor=it.NiceInvoiceLineEditor;exports.NiceKeyValueEditor=it.NiceKeyValueEditor;exports.NiceKnob=it.NiceKnob;exports.NiceLogConsole=it.NiceLogConsole;exports.NiceLookup=it.NiceLookup;exports.NiceMarkdownEditor=it.NiceMarkdownEditor;exports.NiceMention=it.NiceMention;exports.NicePDFAnnotationEditor=it.NicePDFAnnotationEditor;exports.NicePickList=it.NicePickList;exports.NiceRangeSlider=it.NiceRangeSlider;exports.NiceScannerControl=it.NiceScannerControl;exports.NiceScriptRunner=it.NiceScriptRunner;exports.NiceSignature=it.NiceSignature;exports.NiceTreeSelect=it.NiceTreeSelect;exports.NiceWiki=it.NiceWiki;exports.applyPreset=it.applyPreset;exports.contrastRatio=it.contrastRatio;exports.cssToGradient=it.cssToGradient;exports.generateHarmony=it.generateHarmony;exports.generateVariations=it.generateVariations;exports.gradientToCss=it.gradientToCss;exports.hexToHsv=it.hexToHsv;exports.hexToRgb=it.hexToRgb;exports.hsvToHex=it.hsvToHex;exports.hsvToRgb=it.hsvToRgb;exports.randomPalette=it.randomPalette;exports.rgbToHex=it.rgbToHex;exports.rgbToHsl=it.rgbToHsl;exports.rgbToHsv=it.rgbToHsv;exports.wcagLevel=it.wcagLevel;exports.NiceHtmlEditor=Zl.NiceHtmlEditor;exports.NiceCodeDiffEditor=pi.NiceCodeDiffEditor;exports.NiceCodeEditor=pi.NiceCodeEditor;exports.NiceSimpleCodeEditor=pi.NiceSimpleCodeEditor;exports.LANGUAGES=Be.LANGUAGES;exports.NICE_THEME_PICKER_PRESETS=Be.NICE_THEME_PICKER_PRESETS;exports.NiceAccordion=Be.NiceAccordion;exports.NiceAppLayout=Be.NiceAppLayout;exports.NiceAuthButtons=Be.NiceAuthButtons;exports.NiceBreadcrumb=Be.NiceBreadcrumb;exports.NiceCard=Be.NiceCard;exports.NiceConsole=Be.NiceConsole;exports.NiceContextMenu=Be.NiceContextMenu;exports.NiceDashboardLayout=Be.NiceDashboardLayout;exports.NiceDashboardShell=Be.NiceDashboardShell;exports.NiceDesktop=Be.NiceDesktop;exports.NiceDock=Be.NiceDock;exports.NiceDynamicSidebar=Be.NiceDynamicSidebar;exports.NiceIconRail=Be.NiceIconRail;exports.NiceKioskShell=Be.NiceKioskShell;exports.NiceLanguagePicker=Be.NiceLanguagePicker;exports.NiceMdiWorkspace=Be.NiceMdiWorkspace;exports.NiceMenu=Be.NiceMenu;exports.NiceModeSelector=Be.NiceModeSelector;exports.NiceModuleLifecyclePanel=Be.NiceModuleLifecyclePanel;exports.NiceNavMenu=Be.NiceNavMenu;exports.NiceNavbar=Be.NiceNavbar;exports.NiceOrganizationProfileForm=Be.NiceOrganizationProfileForm;exports.NiceSetupWizard=Be.NiceSetupWizard;exports.NiceSidebarNav=Be.NiceSidebarNav;exports.NiceSpinner=Be.NiceSpinner;exports.NiceSplitter=Be.NiceSplitter;exports.NiceStepper=Be.NiceStepper;exports.NiceThemePicker=Be.NiceThemePicker;exports.NiceTooltip=Be.NiceTooltip;exports.NiceUserMenu=Be.NiceUserMenu;exports.NiceWizard=Be.NiceWizard;exports.PREFS_CATEGORIES=Be.PREFS_CATEGORIES;exports.SIDEBAR_DEFAULT_FAVORITE_LIST=Be.SIDEBAR_DEFAULT_FAVORITE_LIST;exports.activeSidebarFavoriteList=Be.activeSidebarFavoriteList;exports.buildPrefsCategoryViews=Be.buildPrefsCategoryViews;exports.filterSidebarItems=Be.filterSidebarItems;exports.findSidebarItemByRoute=Be.findSidebarItemByRoute;exports.mapSidebarViews=Be.mapSidebarViews;exports.normalizeSidebarSearch=Be.normalizeSidebarSearch;exports.sidebarFavoriteItems=Be.sidebarFavoriteItems;exports.sidebarFavoriteLists=Be.sidebarFavoriteLists;exports.sidebarFavoriteListsOf=Be.sidebarFavoriteListsOf;exports.sidebarFavoriteTree=Be.sidebarFavoriteTree;exports.sidebarItemMatches=Be.sidebarItemMatches;exports.sidebarPrefsHostControlled=Be.sidebarPrefsHostControlled;exports.toThemeDescriptor=Be.toThemeDescriptor;exports.useSetupWizard=Be.useSetupWizard;exports.useSidebarNavPrefs=Be.useSidebarNavPrefs;exports.walkSidebarNav=Be.walkSidebarNav;exports.NiceButton=Fe.NiceButton;exports.NiceButtonGroup=At.NiceButtonGroup;exports.NiceScheduler=At.NiceScheduler;exports.createEmptyRecipe=At.createEmptyRecipe;exports.newRecipeId=At.newRecipeId;exports.recipeTotalMinutes=At.recipeTotalMinutes;exports.recurrenceDates=At.recurrenceDates;exports.NiceDropDownButton=Wn.NiceDropDownButton;exports.NicePivotGrid=Wn.NicePivotGrid;exports.NicePivotGridFieldChooser=Wn.NicePivotGridFieldChooser;exports.NICE_TREE_ROW_MIME=ft.NICE_TREE_ROW_MIME;exports.NiceDataGridAI=ft.NiceDataGridAI;exports.NiceHighlight=ft.NiceHighlight;exports.NiceKanbanBoard=ft.NiceKanbanBoard;exports.NiceList=ft.NiceList;exports.NiceModuleGrid=ft.NiceModuleGrid;exports.NiceReconciliationView=ft.NiceReconciliationView;exports.NiceSavedQueryPanel=ft.NiceSavedQueryPanel;exports.NiceSpreadsheet=ft.NiceSpreadsheet;exports.NiceTable=ft.NiceTable;exports.NiceTileView=ft.NiceTileView;exports.NiceTreeGrid=ft.NiceTreeGrid;exports.NiceTreeList=ft.NiceTreeList;exports.NiceTreeView=ft.NiceTreeView;exports.treeDropPosition=ft.treeDropPosition;exports.treeKeyboardMove=ft.treeKeyboardMove;exports.treeKeyboardTarget=ft.treeKeyboardTarget;exports.useTreeRowDrop=ft.useTreeRowDrop;exports.NiceAppShell=_t.NiceAppShell;exports.NiceBranchManager=_t.NiceBranchManager;exports.NiceConfirmDialog=_t.NiceConfirmDialog;exports.NiceGitBlame=_t.NiceGitBlame;exports.NiceGitConflictResolver=_t.NiceGitConflictResolver;exports.NiceGitDiffViewer=_t.NiceGitDiffViewer;exports.NiceGitGraph=_t.NiceGitGraph;exports.NiceGitHooks=_t.NiceGitHooks;exports.NiceMergeRequestBuilder=_t.NiceMergeRequestBuilder;exports.NiceOnScreenKeyboard=_t.NiceOnScreenKeyboard;exports.NiceOnScreenKeyboardHost=_t.NiceOnScreenKeyboardHost;exports.NicePipelineEditor=_t.NicePipelineEditor;exports.NicePipelineMonitor=_t.NicePipelineMonitor;exports.NicePromptDialog=_t.NicePromptDialog;exports.useNiceDialogs=_t.useNiceDialogs;exports.NiceAlert=hn.NiceAlert;exports.NiceModal=Fi.NiceModal;exports.NiceCookieConsent=qt.NiceCookieConsent;exports.NiceDrawer=qt.NiceDrawer;exports.NiceErrorBoundary=qt.NiceErrorBoundary;exports.NiceLoginForm=qt.NiceLoginForm;exports.NiceOfflineBanner=qt.NiceOfflineBanner;exports.NiceRetryPanel=qt.NiceRetryPanel;exports.NiceTimeoutFeedback=qt.NiceTimeoutFeedback;exports.NiceToastContainer=qt.NiceToastContainer;exports.useNiceTimeout=qt.useNiceTimeout;exports.useNiceToast=qt.useNiceToast;exports.NicePagination=qr.NicePagination;exports.NiceDataGrid=fn.NiceDataGrid;exports.NiceFilterBuilder=fn.NiceFilterBuilder;exports.NiceRowEditDialog=fn.NiceRowEditDialog;exports.rowEditFormItems=fn.rowEditFormItems;exports.CHART_COLORS=Ze.CHART_COLORS;exports.NiceBarGauge=Ze.NiceBarGauge;exports.NiceBullet=Ze.NiceBullet;exports.NiceChart=Ze.NiceChart;exports.NiceChartAI=Ze.NiceChartAI;exports.NiceChartRangeSelector=Ze.NiceChartRangeSelector;exports.NiceCircularGauge=Ze.NiceCircularGauge;exports.NiceDrillDownChart=Ze.NiceDrillDownChart;exports.NiceForecastChart=Ze.NiceForecastChart;exports.NiceFunnel=Ze.NiceFunnel;exports.NiceHeatMap=Ze.NiceHeatMap;exports.NiceLinearGauge=Ze.NiceLinearGauge;exports.NiceLiveChart=Ze.NiceLiveChart;exports.NiceMapChart=Ze.NiceMapChart;exports.NiceOrganizationChart=Ze.NiceOrganizationChart;exports.NicePieChart=Ze.NicePieChart;exports.NicePolarChart=Ze.NicePolarChart;exports.NiceRealtimeChart=Ze.NiceRealtimeChart;exports.NiceSankey=Ze.NiceSankey;exports.NiceSparkline=Ze.NiceSparkline;exports.NiceStockChart=Ze.NiceStockChart;exports.NiceTreeMap=Ze.NiceTreeMap;exports.autoDetectColumns=Ze.autoDetectColumns;exports.createMockLiveChartSource=Ze.createMockLiveChartSource;exports.createSignalRLiveChartSource=Ze.createSignalRLiveChartSource;exports.createWebSocketLiveChartSource=Ze.createWebSocketLiveChartSource;exports.downloadCSV=Ze.downloadCSV;exports.downloadHTML=Ze.downloadHTML;exports.downloadJSON=Ze.downloadJSON;exports.downloadPDF=Ze.downloadPDF;exports.downloadXLSX=Ze.downloadXLSX;exports.exportToCSV=Ze.exportToCSV;exports.exportToHTML=Ze.exportToHTML;exports.exportToJSON=Ze.exportToJSON;exports.exportToPDF=Ze.exportToPDF;exports.exportToXLSX=Ze.exportToXLSX;exports.niceExport=Ze.niceExport;exports.orgChartToPng=Ze.orgChartToPng;exports.orgChartToSvg=Ze.orgChartToSvg;exports.tidyTreeLayout=Ze.tidyTreeLayout;exports.NiceActionSheet=kt.NiceActionSheet;exports.NiceBlockUI=kt.NiceBlockUI;exports.NiceBox=kt.NiceBox;exports.NiceCommandPaletteProvider=kt.NiceCommandPaletteProvider;exports.NiceLoadPanel=kt.NiceLoadPanel;exports.NicePopover=kt.NicePopover$1;exports.NiceResizable=kt.NiceResizable;exports.NiceResponsiveBox=kt.NiceResponsiveBox;exports.NiceScrollView=kt.NiceScrollView;exports.NiceTutorial=kt.NiceTutorial;exports.NiceTutorialProvider=kt.NiceTutorialProvider;exports.NiceWindow=kt.NiceWindow;exports.NiceWindowManager=kt.NiceWindowManager;exports.fuzzyMatch=kt.fuzzyMatch;exports.highlightMatches=kt.highlightMatches;exports.useCommandPalette=kt.useCommandPalette;exports.useNiceTutorial=kt.useNiceTutorial;exports.useRegisterCommands=kt.useRegisterCommands;exports.NiceGantt=ed.NiceGantt;exports.NiceDocumentViewer=wh.NiceDocumentViewer;exports.DefaultErrorFallback=En.DefaultErrorFallback;exports.DefaultLoadingFallback=En.DefaultLoadingFallback;exports.LazyComponents=En.LazyComponents;exports.createLazyComponent=En.createLazyComponent;exports.preloadAllHeavyComponents=En.preloadAllHeavyComponents;exports.preloadComponents=En.preloadComponents;exports.useLazyOnVisible=En.useLazyOnVisible;exports.usePreloadOnIdle=En.usePreloadOnIdle;exports.usePreloadOnRouteHint=En.usePreloadOnRouteHint;exports.NiceDataBranchGraph=qi.NiceDataBranchGraph;exports.NiceDataBranchManager=qi.NiceDataBranchManager;exports.NiceDataConflictResolver=qi.NiceDataConflictResolver;exports.NiceDataDiffViewer=qi.NiceDataDiffViewer;exports.NiceDataMergeBuilder=qi.NiceDataMergeBuilder;exports.NiceDataSnapshot=qi.NiceDataSnapshot;exports.AmazonMarketplaceConnector=qo;exports.CLI_COMMANDS=$r;exports.CONNECTORS_BY_CATEGORY=AC;exports.CONNECTOR_REGISTRY=Up;exports.CURRENT_SCHEMA_VERSION=uv;exports.DESIGN_CARD=Ot;exports.Dynamics365Connector=Io;exports.DynamicsBCConnector=Do;exports.EBayConnector=Vo;exports.FAQCategoryFilter=hd;exports.FAQGroup=xr;exports.FAQItemCard=Wr;exports.FAQSearchBar=md;exports.HubSpotConnector=Bo;exports.MailchimpConnector=zo;exports.NICE_DATATYPE_CONTROL_MAP=Jd;exports.NICE_DRAG_MIME=to;exports.NICE_MODULE_DATA_SOURCE_KINDS=bp;exports.NICE_QUERY_OPERATORS=ep;exports.NICE_SQL_DIALECTS=Zu;exports.NICE_SQL_FUNCTIONS=li;exports.NICE_THEME_ARCHIVE_CATALOG=v_;exports.NICE_THEME_CATALOG=Bn;exports.NICE_THEME_CATALOG_ENTRIES=zd;exports.NiceAccessManager=o0;exports.NiceAchievementBadge=yk;exports.NiceActionBuilder=Xd;exports.NiceAffix=Xm;exports.NiceAmountBreakdown=wk;exports.NiceAnalyticsTracker=Eh;exports.NiceAnchor=Km;exports.NiceApiExplorer=Aj;exports.NiceAspectRatio=Dm;exports.NiceAssessment=Wi;exports.NiceAuditLog=u_;exports.NiceAuthGuard=Rk;exports.NiceAutomationRuleEditor=J_;exports.NiceAvatar=Ht;exports.NiceAvatarGroup=Ur;exports.NiceBPMNDesigner=fj;exports.NiceBackTop=Qm;exports.NiceBackupDiffViewer=v1;exports.NiceBackupList=a1;exports.NiceBackupRestoreDialog=g1;exports.NiceBackupScheduler=_1;exports.NiceBackupStatusBadge=l1;exports.NiceBackupTagEditor=m1;exports.NiceBadge=Jt;exports.NiceBarcode=Au;exports.NiceBlockquote=Pm;exports.NiceBusinessCard=Ak;exports.NiceCallout=Vm;exports.NiceCardGrid=lh;exports.NiceCardGroup=rd;exports.NiceCarousel=dd;exports.NiceCascadeSelect=ph;exports.NiceCenter=Sm;exports.NiceCheckboxGroup=dh;exports.NiceClickOutside=Um;exports.NiceClipboardStack=eE;exports.NiceCollapse=rh;exports.NiceCollapsibleCard=ah;exports.NiceColumnChooser=WN;exports.NiceCommandBar=jh;exports.NiceComplianceDashboard=Rw;exports.NiceComponentPlayground=Oj;exports.NiceComponentTypeMapping=uu;exports.NiceConnectorConfigForm=$C;exports.NiceConnectorSelector=RC;exports.NiceConsentBanner=Ch;exports.NiceConsentPanel=Mk;exports.NiceContainer=Om;exports.NiceCopyButton=zm;exports.NiceCountUp=eh;exports.NiceCountdown=th;exports.NiceCountdownTimer=pE;exports.NiceDMS=jC;exports.NiceDataSourceBuilder=f0;exports.NiceDataSourceEditor=lk;exports.NiceDesignTokens=Nw;exports.NiceDeviceControlCard=P_;exports.NiceDeviceManager=Kh;exports.NiceDeviceTile=Hr;exports.NiceDiagramDesigner=Kw;exports.NiceDisplayStylePicker=zu;exports.NiceDivider=ps;exports.NiceDocumentApprovalFlow=Ik;exports.NiceDocumentVersionList=Sk;exports.NiceDocumentationViewer=PT;exports.NiceDraggable=Pd;exports.NiceERPReportDesigner=xC;exports.NiceEmpty=Gr;exports.NiceEnergyChart=ej;exports.NiceExam=J1;exports.NiceFAQ=lg;exports.NiceFeatureFlagsProvider=rv;exports.NiceFeatureGate=ov;exports.NiceFileManager=Ad;exports.NiceFilePicker=xh;exports.NiceFirstRunPreferences=Go;exports.NiceFlex=Em;exports.NiceFocusTrap=Hm;exports.NiceFooter=oh;exports.NiceGallery=no;exports.NiceGamepad=cd;exports.NiceGitManager=Hb;exports.NiceHeading=Rm;exports.NiceHelpDesk=uT;exports.NiceInbox=Pk;exports.NiceInputSettings=Xh;exports.NiceInstallPrompt=UT;exports.NiceInstanceMonitor=Pu;exports.NiceIntegrationHub=PC;exports.NiceLayout=bh;exports.NiceLeaderboard=xk;exports.NiceLifecycleHooksEditor=Cb;exports.NiceLightbox=_h;exports.NiceLink=Mm;exports.NiceLiveDataGrid=mg;exports.NiceLiveRegion=Gm;exports.NiceLoanCalculator=Tw;exports.NiceLocaleManager=dj;exports.NiceLockButton=Iu;exports.NiceLogo=Xp;exports.NiceMAM=mS;exports.NiceMap=Md;exports.NiceMealPlan=Qg;exports.NiceMediaObject=Zm;exports.NiceMenuBuilder=Dg;exports.NiceMicrophone=od;exports.NiceModuleHotSwap=dv;exports.NiceModuleLoaderProvider=iv;exports.NiceModuleRoute=av;exports.NiceNavShell=ZS;exports.NiceNavShellHome=Wo;exports.NiceNavShellPaneFooter=PS;exports.NiceNavShellPaneHeader=AS;exports.NiceNetworkDiscoveryPanel=Dj;exports.NiceNotificationPreferences=Ej;exports.NiceNotifications=Zp;exports.NiceNumericInput=fh;exports.NiceOTPInput=uh;exports.NicePDFViewer=Tu;exports.NicePageHeader=ch;exports.NiceParagraph=$m;exports.NicePermissionMatrix=Wu;exports.NicePlanningTimeline=sb;exports.NicePoll=X1;exports.NicePollLive=Z1;exports.NicePresenceAvatars=hT;exports.NicePresenceCursors=gT;exports.NicePresenceFocus=bT;exports.NicePresenceList=fT;exports.NicePresenceProvider=pT;exports.NicePrintPreview=XN;exports.NiceProgress=rs;exports.NiceQRCode=Ou;exports.NiceQueryDesigner=Np;exports.NiceQuestCard=_k;exports.NiceQuiz=Y1;exports.NiceRate=vh;exports.NiceRecipe=Vg;exports.NiceRecipeCollections=eb;exports.NiceRecipeEditor=ub;exports.NiceRecipeList=Dd;exports.NiceRecurrenceEditor=Bg;exports.NiceReportBuilder=Bp;exports.NiceResourceAllocation=cb;exports.NiceResult=mh;exports.NiceRevisionHistory=Pb;exports.NiceRibbon=sh;exports.NiceRoleEditor=s0;exports.NiceRoomGrid=aj;exports.NiceRulesEngine=CC;exports.NiceSceneActionBuilder=V_;exports.NiceSceneBar=oj;exports.NiceSearchBar=Mr;exports.NiceSearchInput=yh;exports.NiceSection=Lm;exports.NiceSegmentedControl=on;exports.NiceSensorGaugePanel=O_;exports.NiceShowcase=GN;exports.NiceSidebarPrefsDisplay=Ko;exports.NiceSidebarPrefsGeneral=Yo;exports.NiceSidebarPrefsHidden=Jo;exports.NiceSidebarPrefsOrder=Qo;exports.NiceSidebarPrefsReset=Xo;exports.NiceSkeleton=ha;exports.NiceSortable=Es;exports.NiceSortableTree=gd;exports.NiceSpacer=Im;exports.NiceSpeechToText=Od;exports.NiceSpeedDialAction=sd;exports.NiceStack=Tm;exports.NiceStatistic=ac;exports.NiceStopwatch=lE;exports.NiceStreamDashboard=KC;exports.NiceSurvey=Q1;exports.NiceSuspense=Wm;exports.NiceSwipeCard=hh;exports.NiceTabBar=gh;exports.NiceTag=us;exports.NiceTagInput=Nh;exports.NiceTaskInbox=Du;exports.NiceTempDial=Eu;exports.NiceTerminalUI=Lu;exports.NiceThemeDesigner=Wd;exports.NiceThemeGalleryPicker=bf;exports.NiceThemeGalleryPreview=Kd;exports.NiceThemePreview=ro;exports.NiceTimeline=ld;exports.NiceToggleGroup=yr;exports.NiceTopNav=em;exports.NiceTranscoder=iS;exports.NiceTruncate=Am;exports.NiceTutorialHost=cw;exports.NiceUndoManager=mo;exports.NiceUndoProvider=ju;exports.NiceUpdatePrompt=HT;exports.NiceValidationBuilder=$d;exports.NiceValidationGroup=ao;exports.NiceValidationSummary=so;exports.NiceValidator=gs;exports.NiceVideoAnnotator=cS;exports.NiceVideoEditor=BC;exports.NiceViewCache=ba;exports.NiceViewEditor=Ff;exports.NiceViewFetchError=jr;exports.NiceViewFetcher=Gf;exports.NiceViewHotReload=Qf;exports.NiceViewRegistry=Zd;exports.NiceViewRenderer=tu;exports.NiceVirtualScroller=ud;exports.NiceWorkflowInstanceMonitor=Pu;exports.NiceWorkflowTaskInbox=Du;exports.PARENT_KEYS_PARAMETER=wo;exports.PARENT_KEY_COLUMN=_s;exports.PayPalConnector=Mo;exports.QuickBooksConnector=Ao;exports.SAPConnector=ui;exports.SAPIdocConnector=To;exports.SAPRfcConnector=Eo;exports.SIDEBAR_PREFS_ROUTE_KEYS=qS;exports.SalesforceConnector=Po;exports.SendGridConnector=Lo;exports.ShopifyConnector=Fo;exports.SidebarPrefsScopeProvider=rm;exports.StripeConnector=$o;exports.TracelessBadge=td;exports.TracelessPanel=kh;exports.TracelessWarning=Sh;exports.TwilioConnector=Oo;exports.XeroConnector=Ro;exports.addCatalogPages=xd;exports.addMenuGroup=jd;exports.addRelatedTable=cp;exports.addTableInstance=_o;exports.assembleQueryRows=R0;exports.buildIcs=id;exports.buildSidebarPrefsRoutes=om;exports.catalogFromSidebarData=jg;exports.catalogPagesOf=Ng;exports.checkModuleHealth=lu;exports.checkPermissions=wv;exports.checkSingleModule=lv;exports.compareSemver=ci;exports.conditionsToFilter=lp;exports.createComponentMeta=Yk;exports.createDocIndex=$T;exports.createRoleId=No;exports.createStandardErpContracts=xv;exports.createUndoMiddleware=Qv;exports.datePartSql=Dr;exports.defaultTypeMapping=yv;exports.defaultViewRegistry=co;exports.deriveExportColumns=uo;exports.deserializeManifest=ev;exports.deserializeRbacPolicy=Cv;exports.deserializeView=ff;exports.diffObjects=g_;exports.diffViews=Uv;exports.downloadIcs=Rh;exports.duplicateRole=Yu;exports.emptyFilterGroup=di;exports.emptyQueryDesign=ap;exports.entityToView=Qd;exports.exportIcs=ad;exports.exportView=nu;exports.extractControlTypes=mv;exports.extractCssVariables=zT;exports.extractI18nKeys=BT;exports.extractTokensFromTheme=Bu;exports.fetchFigmaTokens=$p;exports.findMenuCatalogNode=bd;exports.findTreeNode=si;exports.formatDiffAsText=Wv;exports.functionSql=ko;exports.generateAdapters=Ap;exports.generateAllForRbac=Dv;exports.generateAllForView=Iv;exports.generateDartModel=bu;exports.generateInterface=LT;exports.generateMermaidSyntax=Jw;exports.generateQuerySql=js;exports.generateRbacDart=vu;exports.generateRbacTypescript=fu;exports.generateScaffold=Bv;exports.generateStoriesFromViews=Yv;exports.generateStoryFromView=Nu;exports.generateTokens=cs;exports.generateTypescriptModel=gu;exports.generateViewCatalog=Jv;exports.getComponentRegistry=Pp;exports.groupProps=OT;exports.indentTreeNode=Jr;exports.insertCatalogNodes=_d;exports.insertTreeNode=Hn;exports.isAllowed=mu;exports.isModuleDataSource=M0;exports.isTreeDescendant=Kr;exports.isVersionCompatible=cv;exports.isViewCompatibleWith=hv;exports.listScaffoldTemplates=Fv;exports.loadComponentDoc=RT;exports.menuCatalogPath=vd;exports.menuCheckedPages=Zr;exports.menuItemLabel=eo;exports.menuItemSource=hs;exports.menuOrphans=fd;exports.menuToSidebarData=kd;exports.menuToSidebarViews=wd;exports.moduleDataSourceColumns=Ps;exports.moduleDataSourceDependencies=L0;exports.moduleDataSourceParameters=xp;exports.moduleDataSourceTable=vp;exports.moveTreeNode=Ui;exports.moveTreeNodeBy=ms;exports.nestPathOf=Bi;exports.newModuleDataSource=Ar;exports.niceESLintPlugin=Lk;exports.noFullImport=wp;exports.operatorsFor=tp;exports.outdentTreeNode=Qr;exports.outputColumns=Gi;exports.parseAdapterCLIArgs=Rp;exports.parseCLIArgs=Ip;exports.parseTokensFromCSS=nC;exports.parseTokensFromJSON=tC;exports.permissionTree=Ku;exports.pickColumns=Ir;exports.planQuerySql=Co;exports.planSqlText=gp;exports.queryParameterNames=Ta;exports.quoteSqlName=va;exports.readNiceDrag=pb;exports.relatedTables=op;exports.removeCatalogPages=Nd;exports.removeRole=Ju;exports.removeTable=sp;exports.removeTreeNode=mi;exports.requireA11y=jp;exports.requireGridColumns=kp;exports.requireI18n=_p;exports.resolveExportRows=lo;exports.resolvePermissions=jv;exports.resolveRolePermissions=yo;exports.resolveUserPermissions=e0;exports.roleAncestors=xo;exports.roleInheritanceCycles=t0;exports.rootTableId=Ds;exports.runAdapterGenerator=eC;exports.runCLI=Hk;exports.runContractTests=vv;exports.scaffoldComponent=Cp;exports.scaffoldInit=Ep;exports.scaffoldPage=Sp;exports.scaffoldTheme=Tp;exports.searchDocs=FT;exports.serializeManifest=Zf;exports.serializeRbacPolicy=kv;exports.serializeView=Yd;exports.standardDataSources=O0;exports.suggestJoins=rp;exports.syncFromFigma=iC;exports.toViewDataSourceRef=m0;exports.tokensToCssVars=Op;exports.tokensToNiceTheme=Mp;exports.treeNodeHeight=_a;exports.treeNodeLocation=It;exports.updateFilterNode=jo;exports.updateTreeNode=ka;exports.useAnalytics=Th;exports.useAssessment=bm;exports.useAuditLog=h_;exports.useClipboardStack=tE;exports.useColumnChooser=KN;exports.useDMS=NC;exports.useERPReportDesigner=uC;exports.useFAQ=Ts;exports.useFeatureFlag=cu;exports.useFeatureFlags=ou;exports.useIntegrationHub=SC;exports.useMAM=uS;exports.useModuleLoader=su;exports.useNiceDataSourceTimeout=cj;exports.useNiceNavShellPane=Ho;exports.useNiceValidation=io;exports.useOnlineStatus=km;exports.usePWA=Cm;exports.usePresence=Ia;exports.usePrintPreview=ZN;exports.usePushNotifications=VT;exports.useReportBuilder=zp;exports.useRulesEngine=wC;exports.useServiceWorker=ic;exports.useSidebarPrefsScope=hi;exports.useSidebarUserId=LS;exports.useStreamDashboard=VC;exports.useTranscoder=QC;exports.useUndoKeyboard=Zv;exports.useUndoManager=Xv;exports.useVideoAnnotator=oS;exports.useVideoEditor=OC;exports.validateCrossPlatformView=du;exports.validateDiagramSchema=Yw;exports.validateDoc=MT;exports.validateModuleManifest=iu;exports.validateRbacPolicy=Sv;exports.validateViewDefinition=oo;exports.validateViewForDeploy=xu;exports.validateViewsBatch=Vv;exports.valueTypeOf=Sa;exports.viewToHtml=_r;exports.walkTreeNodes=sn;exports.wouldCreateRoleCycle=Tr;
5121
+ `)}function zT(t){const n=[];if(t.theming?.cssVariables)for(const i of t.theming.cssVariables)n.push(i.name);return n}function BT(t){const n=[];if(t.i18n?.keys)for(const i of t.i18n.keys)n.push(i.key);return n}function FT(t,n){const i=n.toLowerCase();return t.filter(a=>!!(a.name.toLowerCase().includes(i)||a.displayName?.toLowerCase().includes(i)||a.summary.toLowerCase().includes(i)||a.description.toLowerCase().includes(i)||a.tags?.some(s=>s.toLowerCase().includes(i))||a.props.some(s=>s.name.toLowerCase().includes(i)||s.description.toLowerCase().includes(i))))}function vr(){return typeof navigator>"u"?null:navigator.connection||navigator.mozConnection||navigator.webkitConnection||null}function km(t={}){const{onOnline:n,onOffline:i,pingUrl:a,pingInterval:s=3e4,useNetworkInfo:o=!0}=t,[c,d]=r.useState(()=>{const g=o?vr():null;return{isOnline:typeof navigator<"u"?navigator.onLine:!0,wasOffline:!1,lastOnline:null,lastOffline:null,effectiveType:g?.effectiveType??null,downlink:g?.downlink??null,rtt:g?.rtt??null,saveData:g?.saveData??!1}}),p=r.useRef(!1),m=r.useRef(null),h=r.useCallback(()=>{d(g=>({...g,isOnline:!0,wasOffline:p.current,lastOnline:new Date})),n?.(),setTimeout(()=>{p.current=!1,d(g=>({...g,wasOffline:!1}))},5e3)},[n]),u=r.useCallback(()=>{p.current=!0,d(g=>({...g,isOnline:!1,lastOffline:new Date})),i?.()},[i]),x=r.useCallback(()=>{const g=vr();g&&d(v=>({...v,effectiveType:g.effectiveType,downlink:g.downlink,rtt:g.rtt,saveData:g.saveData}))},[]),f=r.useCallback(async()=>{if(!a)return navigator.onLine;try{const g=new AbortController,v=setTimeout(()=>g.abort(),5e3),y=await fetch(a,{method:"HEAD",mode:"no-cors",cache:"no-store",signal:g.signal});return clearTimeout(v),!0}catch{return!1}},[a]),b=r.useCallback(g=>{d(v=>({...v,isOnline:g,...g?{lastOnline:new Date}:{lastOffline:new Date}}))},[]);return r.useEffect(()=>{if(typeof window>"u")return;window.addEventListener("online",h),window.addEventListener("offline",u);const g=o?vr():null;return g&&g.addEventListener("change",x),a&&s>0&&(m.current=setInterval(async()=>{const v=await f();v!==c.isOnline&&(v?h():u())},s)),()=>{window.removeEventListener("online",h),window.removeEventListener("offline",u),g&&g.removeEventListener("change",x),m.current&&clearInterval(m.current)}},[h,u,x,a,s,f,c.isOnline,o]),{...c,checkConnectivity:f,setOnline:b}}function ic(t={}){const{swUrl:n="/sw.js",scope:i="/",registerOnMount:a=!0,updateInterval:s=0,onSuccess:o,onUpdate:c,onError:d,onActivated:p}=t,[m,h]=r.useState(()=>({isSupported:typeof navigator<"u"&&"serviceWorker"in navigator,isRegistered:!1,isUpdating:!1,hasUpdate:!1,registration:null,waitingWorker:null,state:null,controllerState:null,error:null})),u=r.useRef(null),x=r.useCallback(async()=>{if(!m.isSupported)return null;try{const C=await navigator.serviceWorker.register(n,{scope:i}),w=()=>{const E=C.active;E&&h(S=>({...S,controllerState:E.state}))};return C.addEventListener("updatefound",()=>{const E=C.installing;E&&E.addEventListener("statechange",()=>{E.state==="installed"&&(navigator.serviceWorker.controller?(h(S=>({...S,hasUpdate:!0,waitingWorker:E})),c?.(C)):o?.(C)),w()})}),C.waiting&&h(E=>({...E,hasUpdate:!0,waitingWorker:C.waiting})),h(E=>({...E,isRegistered:!0,registration:C,error:null})),C.active&&!C.waiting&&o?.(C),C}catch(C){const w=C instanceof Error?C:new Error(String(C));return h(E=>({...E,error:w})),d?.(w),null}},[n,i,m.isSupported,o,c,d]),f=r.useCallback(async()=>{if(m.registration)try{await m.registration.update()}catch(C){console.warn("Failed to check for SW update:",C)}},[m.registration]),b=r.useCallback(()=>{m.waitingWorker&&(h(C=>({...C,isUpdating:!0})),m.waitingWorker.postMessage({type:"SKIP_WAITING"}))},[m.waitingWorker]),g=r.useCallback(async()=>{if(!m.registration)return!1;try{const C=await m.registration.unregister();return C&&h(w=>({...w,isRegistered:!1,registration:null,hasUpdate:!1,waitingWorker:null})),C}catch{return!1}},[m.registration]),v=r.useCallback(async()=>{if(typeof caches>"u")return!1;try{const C=await caches.keys();return await Promise.all(C.map(w=>caches.delete(w))),!0}catch{return!1}},[]),y=r.useCallback(async()=>typeof caches>"u"?[]:caches.keys(),[]);return r.useEffect(()=>{if(!m.isSupported)return;const C=()=>{m.isUpdating&&(h(w=>({...w,isUpdating:!1,hasUpdate:!1,waitingWorker:null})),p?.())};return navigator.serviceWorker.addEventListener("controllerchange",C),()=>{navigator.serviceWorker.removeEventListener("controllerchange",C)}},[m.isSupported,m.isUpdating,p]),r.useEffect(()=>{a&&m.isSupported&&!m.isRegistered&&x()},[a,m.isSupported,m.isRegistered,x]),r.useEffect(()=>(s>0&&m.isRegistered&&(u.current=setInterval(f,s)),()=>{u.current&&clearInterval(u.current)}),[s,m.isRegistered,f]),{...m,register:x,checkForUpdate:f,update:b,unregister:g,clearCaches:v,getCacheNames:y}}function Cm(t={}){const{onInstallPrompt:n,onInstalled:i,onInstallDismissed:a,...s}=t,{isOnline:o,wasOffline:c}=km(s),{isRegistered:d,hasUpdate:p,isUpdating:m,registration:h,update:u,checkForUpdate:x}=ic(s),[f,b]=r.useState({isInstalled:Cs()!=="browser",canInstall:!1,installDismissed:!1,isInstalling:!1,platforms:[]}),g=r.useRef(null);r.useEffect(()=>{if(typeof window>"u")return;const C=E=>{E.preventDefault(),g.current=E,b(S=>({...S,canInstall:!0,platforms:E.platforms})),n?.(E)},w=()=>{g.current=null,b(E=>({...E,isInstalled:!0,canInstall:!1,isInstalling:!1})),i?.()};return window.addEventListener("beforeinstallprompt",C),window.addEventListener("appinstalled",w),()=>{window.removeEventListener("beforeinstallprompt",C),window.removeEventListener("appinstalled",w)}},[n,i]),r.useEffect(()=>{if(typeof window>"u")return;const C=window.matchMedia("(display-mode: standalone)"),w=E=>{b(S=>({...S,isInstalled:E.matches}))};return C.addEventListener("change",w),()=>C.removeEventListener("change",w)},[]);const v=r.useCallback(async()=>{if(!g.current)return!1;b(C=>({...C,isInstalling:!0}));try{await g.current.prompt();const{outcome:C}=await g.current.userChoice;return C==="accepted"?!0:(b(w=>({...w,installDismissed:!0,isInstalling:!1})),a?.(),!1)}catch{return b(C=>({...C,isInstalling:!1})),!1}},[a]),y=r.useCallback(()=>{u()},[u]);return{...f,isOnline:o,wasOffline:c,swRegistered:d,hasUpdate:p,isUpdating:m,installApp:v,updateApp:y,checkForUpdate:x,displayMode:Cs(),registration:h}}function qT(t){const n="=".repeat((4-t.length%4)%4),i=(t+n).replace(/-/g,"+").replace(/_/g,"/"),a=window.atob(i),s=new Uint8Array(a.length);for(let o=0;o<a.length;++o)s[o]=a.charCodeAt(o);return s}function Gl(t){const n=t.toJSON();return{endpoint:n.endpoint||"",expirationTime:n.expirationTime??null,keys:{p256dh:n.keys?.p256dh||"",auth:n.keys?.auth||""}}}function VT(t={}){const{vapidPublicKey:n,swRegistration:i,onSubscribe:a,onUnsubscribe:s,onPermissionGranted:o,onPermissionDenied:c,onError:d}=t,[p,m]=r.useState(()=>({isSupported:typeof window<"u"&&"PushManager"in window&&"serviceWorker"in navigator,notificationsSupported:typeof window<"u"&&"Notification"in window,permission:typeof window<"u"&&"Notification"in window?Notification.permission:"default",isSubscribed:!1,isLoading:!1,subscription:null,subscriptionJSON:null,error:null})),h=r.useRef(i||null),u=r.useCallback(async()=>{if(h.current)return h.current;if(!p.isSupported)return null;try{const y=await navigator.serviceWorker.ready;return h.current=y,y}catch{return null}},[p.isSupported]),x=r.useCallback(async()=>{const y=await u();if(!y)return null;try{const C=await y.pushManager.getSubscription();return m(w=>({...w,isSubscribed:!!C,subscription:C,subscriptionJSON:C?Gl(C):null})),C}catch{return null}},[u]),f=r.useCallback(async()=>{if(!p.notificationsSupported)return"denied";try{const y=await Notification.requestPermission();return m(C=>({...C,permission:y})),y==="granted"?o?.():y==="denied"&&c?.(),y}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,error:C})),d?.(C),"denied"}},[p.notificationsSupported,o,c,d]),b=r.useCallback(async()=>{if(!p.isSupported)return null;if(!n){const y=new Error("VAPID public key is required for push subscription");return m(C=>({...C,error:y})),d?.(y),null}m(y=>({...y,isLoading:!0,error:null}));try{if(p.permission!=="granted"&&await f()!=="granted")return m(S=>({...S,isLoading:!1})),null;const y=await u();if(!y)throw new Error("Service Worker not registered");const C=await y.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:qT(n)}),w=Gl(C);return m(E=>({...E,isSubscribed:!0,isLoading:!1,subscription:C,subscriptionJSON:w})),a?.(w),w}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,isLoading:!1,error:C})),d?.(C),null}},[p.isSupported,p.permission,n,f,u,a,d]),g=r.useCallback(async()=>{if(!p.subscription)return!0;m(y=>({...y,isLoading:!0,error:null}));try{const y=await p.subscription.unsubscribe();return y?(m(C=>({...C,isSubscribed:!1,isLoading:!1,subscription:null,subscriptionJSON:null})),s?.()):m(C=>({...C,isLoading:!1})),y}catch(y){const C=y instanceof Error?y:new Error(String(y));return m(w=>({...w,isLoading:!1,error:C})),d?.(C),!1}},[p.subscription,s,d]),v=r.useCallback(async(y,C)=>{if(!p.notificationsSupported||p.permission!=="granted"&&await f()!=="granted")return null;try{const w=await u();return w?(await w.showNotification(y,C),null):new Notification(y,C)}catch{return null}},[p.notificationsSupported,p.permission,f,u]);return r.useEffect(()=>{p.isSupported&&x()},[p.isSupported,x]),r.useEffect(()=>{if(!p.notificationsSupported)return;const y=()=>{m(w=>({...w,permission:Notification.permission}))},C=setInterval(()=>{Notification.permission!==p.permission&&y()},1e3);return()=>{clearInterval(C)}},[p.notificationsSupported,p.permission]),{...p,requestPermission:f,subscribe:b,unsubscribe:g,showNotification:v,checkSubscription:x}}const UT=Object.assign(r.forwardRef(function(n,i){const{t:a}=l.useNiceTranslation(),{variant:s="banner",position:o="bottom",title:c,description:d,installText:p,dismissText:m,icon:h,appIconUrl:u,persistent:x=!1,delay:f=0,onInstall:b,onDismiss:g,installButton:v,dismissButton:y,animation:C="slide",zIndex:w=1e3,preview:E=!1,className:S,style:N,..._}=n,k=d??a("installPrompt.description","Install this application for quick access and offline support."),j=c??a("installPrompt.installApp","Install App"),T=p??a("installPrompt.install","Install"),P=m??a("installPrompt.notNow","Not now"),{canInstall:B,installApp:R,isInstalled:I}=Cm({registerOnMount:!1}),[D,M]=r.useState(!1),[O,L]=r.useState(f===0);r.useEffect(()=>{if(f>0){const oe=setTimeout(()=>L(!0),f);return()=>clearTimeout(oe)}},[f]);const V=r.useCallback(async()=>{await R()&&b?.()},[R,b]),ee=r.useCallback(()=>{M(!0),g?.()},[g]);if(!E&&(!O||I||!B)||D&&!x)return null;const z=h||(u?e.jsx("img",{src:u,alt:a("installPrompt.appIcon","App icon"),className:"nice-install-prompt__app-icon"}):e.jsx(l.NiceIcon,{name:"download",size:24})),U=v||e.jsx("button",{type:"button",className:"nice-install-prompt__install",onClick:V,children:T}),re=y||e.jsx("button",{type:"button",className:"nice-install-prompt__dismiss",onClick:ee,children:P}),Y=oe=>`nice-install-prompt nice-install-prompt--${oe} nice-install-prompt--${o} ${S||""}`;switch(s){case"modal":return e.jsx("div",{role:"presentation",ref:i,className:Y("modal"),style:{zIndex:w,...N},onClick:ee,..._,children:e.jsxs("div",{role:"presentation",className:"nice-install-prompt__dialog",onClick:oe=>oe.stopPropagation(),children:[e.jsx("div",{className:"nice-install-prompt__icon",children:z}),e.jsx("h3",{className:"nice-install-prompt__title",children:j}),e.jsx("p",{className:"nice-install-prompt__description",children:k}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[U,re]})]})});case"card":return e.jsxs("div",{ref:i,className:Y("card"),style:N,..._,children:[e.jsxs("div",{className:"nice-install-prompt__body",children:[e.jsx("span",{className:"nice-install-prompt__icon",children:z}),e.jsxs("div",{children:[e.jsx("h4",{className:"nice-install-prompt__title",children:j}),e.jsx("p",{className:"nice-install-prompt__description",children:k})]})]}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[U,re]})]});case"mini":return e.jsxs("div",{role:"button",tabIndex:0,onKeyDown:l.clickOnActivationKey,ref:i,className:Y("mini"),style:{zIndex:w,...N},onClick:V,..._,children:[e.jsx(l.NiceIcon,{name:"download",size:24}),e.jsx("span",{className:"nice-install-prompt__label",children:T})]});case"banner":default:return e.jsxs("div",{ref:i,className:Y("banner"),style:{zIndex:w,...N},..._,children:[e.jsxs("div",{className:"nice-install-prompt__body",children:[e.jsx("span",{className:"nice-install-prompt__icon",children:z}),e.jsxs("div",{children:[e.jsx("div",{className:"nice-install-prompt__title",children:j}),e.jsx("div",{className:"nice-install-prompt__description",children:k})]})]}),e.jsxs("div",{className:"nice-install-prompt__actions",children:[re,U]})]})}}),{displayName:"NiceInstallPrompt"}),HT=Object.assign(r.forwardRef(function(n,i){const{t:a}=l.useNiceTranslation(),{variant:s="banner",position:o="bottom",title:c,description:d,updateText:p,dismissText:m,icon:h,autoReload:u=!0,onUpdate:x,onDismiss:f,zIndex:b=1001,preview:g=!1,className:v,style:y,swUrl:C,scope:w,registerOnMount:E,updateInterval:S,onSuccess:N,onError:_,onActivated:k,...j}=n,T=d??a("updatePrompt.description","A new version is ready. Refresh to get the latest features."),P=c??a("updatePrompt.updateAvailable","Update Available"),B=p??a("updatePrompt.updateNow","Update now"),R=m??a("updatePrompt.later","Later"),{hasUpdate:I,isUpdating:D,update:M}=ic({swUrl:C,scope:w,registerOnMount:E,updateInterval:S,onSuccess:N,onError:_,onActivated:()=>{k?.(),u&&window.location.reload()}}),[O,L]=r.useState(!1),V=r.useCallback(()=>{M(),x?.()},[M,x]),ee=r.useCallback(()=>{L(!0),f?.()},[f]);if(!I&&!g||O)return null;const z=h||e.jsx(l.NiceIcon,{name:"refresh",size:24}),U=D?a("updatePrompt.updating","Updating…"):B,re=oe=>`nice-update-prompt nice-update-prompt--${oe} nice-update-prompt--${o} ${v||""}`,Y=e.jsx("button",{type:"button",className:"nice-update-prompt__update",onClick:V,disabled:D,children:U});switch(s){case"modal":return e.jsx("div",{role:"presentation",ref:i,className:re("modal"),style:{zIndex:b,...y},onClick:ee,...j,children:e.jsxs("div",{role:"presentation",className:"nice-update-prompt__dialog",onClick:oe=>oe.stopPropagation(),children:[e.jsx("div",{className:"nice-update-prompt__icon",children:e.jsx(l.NiceIcon,{name:"refresh",size:24})}),e.jsx("h3",{className:"nice-update-prompt__title",children:P}),e.jsx("p",{className:"nice-update-prompt__description",children:T}),e.jsxs("div",{className:"nice-update-prompt__actions",children:[Y,e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss",onClick:ee,children:R})]})]})});case"toast":return e.jsxs("div",{ref:i,className:re("toast"),style:{zIndex:b,...y},...j,children:[e.jsx("span",{className:"nice-update-prompt__icon",children:z}),e.jsxs("div",{className:"nice-update-prompt__text",children:[e.jsx("div",{className:"nice-update-prompt__title",children:P}),e.jsx("div",{className:"nice-update-prompt__description",children:T})]}),Y,e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss nice-update-prompt__dismiss--icon",onClick:ee,"aria-label":a("updatePrompt.dismiss","Dismiss"),children:e.jsx(l.NiceIcon,{name:"close",size:18})})]});case"banner":default:return e.jsxs("div",{ref:i,className:re("banner"),style:{zIndex:b,...y},...j,children:[e.jsxs("div",{className:"nice-update-prompt__body",children:[e.jsx("span",{className:"nice-update-prompt__icon",children:z}),e.jsxs("div",{className:"nice-update-prompt__text",children:[e.jsx("div",{className:"nice-update-prompt__title",children:P}),e.jsx("div",{className:"nice-update-prompt__description",children:T})]})]}),e.jsxs("div",{className:"nice-update-prompt__actions",children:[e.jsx("button",{type:"button",className:"nice-update-prompt__dismiss",onClick:ee,children:R}),Y]})]})}}),{displayName:"NiceUpdatePrompt"}),Sm=({children:t,horizontal:n=!0,vertical:i=!0,inline:a=!1,minHeight:s,className:o="",style:c,testId:d,"data-testid":p})=>{const m={...s!==void 0&&{minHeight:s},...c},h=["nice-center",a?"nice-center--inline":"",n?"nice-center--h":"",i?"nice-center--v":"",o].filter(Boolean).join(" ");return e.jsx("div",{className:h,style:m,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Sm.displayName="NiceCenter");const GT={start:"flex-start",center:"center",end:"flex-end","space-between":"space-between","space-around":"space-around"},WT={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"},Tm=({children:t,direction:n="vertical",spacing:i=16,align:a="stretch",justify:s="start",wrap:o=!1,divider:c,className:d="",style:p,testId:m,"data-testid":h})=>{const u={display:"flex",flexDirection:n==="vertical"?"column":"row",gap:typeof i=="number"?`${i}px`:i,alignItems:WT[a],justifyContent:GT[s],flexWrap:o?"wrap":"nowrap",...p},x=r.Children.toArray(t),f=c?x.flatMap((b,g)=>g<x.length-1?[b,e.jsx(r.Fragment,{children:c},`nice-stack-divider-${g}`)]:[b]):x;return e.jsx("div",{className:`nice-stack nice-stack--${n} ${d}`,style:u,"data-testid":h??m,children:f})};process.env.NODE_ENV!=="production"&&(Tm.displayName="NiceStack");const Em=({children:t,direction:n="row",wrap:i="nowrap",justify:a="flex-start",align:s="stretch",gap:o=0,inline:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const u={display:c?"inline-flex":"flex",flexDirection:n,flexWrap:i,justifyContent:a,alignItems:s,gap:typeof o=="number"?`${o}px`:o,...p};return e.jsx("div",{className:`nice-flex ${d}`,style:u,"data-testid":h??m,children:t})};process.env.NODE_ENV!=="production"&&(Em.displayName="NiceFlex");const Im=({size:t,flex:n=1,axis:i="both",className:a="",style:s,testId:o,"data-testid":c})=>{const d={};if(t!==void 0){const p=typeof t=="number"?`${t}px`:t;(i==="horizontal"||i==="both")&&(d.width=p),(i==="vertical"||i==="both")&&(d.height=p),d.flex="0 0 auto"}else d.flex=`${n} 1 0`;return e.jsx("span",{"aria-hidden":"true",className:`nice-spacer nice-spacer--${i} ${a}`,style:{...d,...s},"data-testid":c??o})};process.env.NODE_ENV!=="production"&&(Im.displayName="NiceSpacer");function KT(t){return typeof t=="string"?t.trim():!Number.isFinite(t)||t<=0?"1 / 1":String(t)}const Dm=({children:t,ratio:n="16/9",maxWidth:i,className:a="",style:s,testId:o,"data-testid":c})=>{const d={aspectRatio:KT(n),width:"100%",...i!==void 0&&{maxWidth:typeof i=="number"?`${i}px`:i},...s};return e.jsx("div",{className:`nice-aspect-ratio ${a}`,style:d,"data-testid":c??o,children:t})};process.env.NODE_ENV!=="production"&&(Dm.displayName="NiceAspectRatio");const Pm=({children:t,cite:n,author:i,variant:a="bordered",className:s="",style:o,testId:c,"data-testid":d})=>e.jsxs("blockquote",{cite:n,className:`nice-blockquote nice-blockquote--${a} ${s}`,style:o,"data-testid":d??c,children:[e.jsx("div",{className:"nice-blockquote__content",children:t}),(i||n)&&e.jsxs("footer",{className:"nice-blockquote__footer",children:[i&&e.jsxs("span",{className:"nice-blockquote__author",children:["— ",i]}),n&&e.jsx("cite",{className:"nice-blockquote__cite",children:n})]})]});process.env.NODE_ENV!=="production"&&(Pm.displayName="NiceBlockquote");const Am=({children:t,lines:n=1,expandable:i=!1,expandText:a,collapseText:s,tooltip:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),[u,x]=r.useState(!1),b=i&&u?{}:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:n,overflow:"hidden",wordBreak:"break-word"};return e.jsxs("span",{className:`nice-truncate ${c}`,style:d,"data-testid":m??p,children:[e.jsx("span",{className:"nice-truncate__text",style:b,title:o?t:void 0,children:t}),i&&e.jsx("button",{type:"button",className:"nice-truncate__toggle",onClick:()=>x(g=>!g),"aria-expanded":u,children:u?s??h("truncate.collapse","Show less"):a??h("truncate.expand","Show more")})]})};process.env.NODE_ENV!=="production"&&(Am.displayName="NiceTruncate");const Rm=({children:t,level:n,size:i,weight:a="semibold",truncate:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m=`h${n}`,u=["nice-heading",`nice-heading--size-${i??(n===1?"3xl":n===2?"2xl":n===3?"xl":n===4?"lg":n===5?"md":"sm")}`,`nice-heading--weight-${a}`,s?"nice-heading--truncate":"",o].filter(Boolean).join(" ");return e.jsx(m,{className:u,style:c,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Rm.displayName="NiceHeading");const $m=({children:t,size:n="md",lead:i=!1,muted:a=!1,className:s="",style:o,testId:c,"data-testid":d})=>{const p=["nice-paragraph",`nice-paragraph--size-${n}`,i?"nice-paragraph--lead":"",a?"nice-paragraph--muted":"",s].filter(Boolean).join(" ");return e.jsx("p",{className:p,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&($m.displayName="NiceParagraph");const Mm=({children:t,href:n,external:i=!1,variant:a="default",underline:s="hover",onClick:o,target:c,rel:d,className:p="",style:m,testId:h,"data-testid":u})=>{const x=c??(i?"_blank":void 0),f=d??(i?"noopener noreferrer":void 0),b=["nice-link",`nice-link--${a}`,`nice-link--underline-${s}`,i?"nice-link--external":"",p].filter(Boolean).join(" ");return e.jsx("a",{href:n,target:x,rel:f,onClick:o,className:b,style:m,"data-testid":u??h,children:t})};process.env.NODE_ENV!=="production"&&(Mm.displayName="NiceLink");const YT={sm:"640px",md:"768px",lg:"1024px",xl:"1280px",full:"100%"},Om=({children:t,size:n="lg",padding:i,centered:a=!0,fluid:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m={maxWidth:s?"100%":YT[n],...a&&{marginInline:"auto"},...i!==void 0&&{paddingInline:typeof i=="number"?`${i}px`:i},...c},h=["nice-container",`nice-container--${n}`,s?"nice-container--fluid":"",o].filter(Boolean).join(" ");return e.jsx("div",{className:h,style:m,"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Om.displayName="NiceContainer");const Lm=({children:t,title:n,subtitle:i,actions:a,padding:s,divider:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const h={...s!==void 0&&{padding:typeof s=="number"?`${s}px`:s},...d},u=n||i||a;return e.jsxs("section",{className:`nice-section ${c}`,style:h,"data-testid":m??p,children:[u&&e.jsxs("header",{className:`nice-section__header${o?" nice-section__header--divider":""}`,children:[e.jsxs("div",{className:"nice-section__heading",children:[n&&e.jsx("h2",{className:"nice-section__title",children:n}),i&&e.jsx("p",{className:"nice-section__subtitle",children:i})]}),a&&e.jsx("div",{className:"nice-section__actions",children:a})]}),e.jsx("div",{className:"nice-section__body",children:t})]})};process.env.NODE_ENV!=="production"&&(Lm.displayName="NiceSection");function JT(t,n){return typeof t=="string"?t:Number.isFinite(t)?n!==void 0?t.toLocaleString(void 0,{minimumFractionDigits:n,maximumFractionDigits:n}):t.toLocaleString():String(t)}const ac=({title:t,value:n,prefix:i,suffix:a,precision:s,trend:o,size:c="md",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation();return e.jsxs("div",{className:`nice-statistic nice-statistic--${c} ${d}`,style:p,"data-testid":h??m,children:[e.jsx("div",{className:"nice-statistic__title",children:t}),e.jsxs("div",{className:"nice-statistic__value",children:[i&&e.jsx("span",{className:"nice-statistic__prefix",children:i}),e.jsx("span",{className:"nice-statistic__number",children:JT(n,s)}),a&&e.jsx("span",{className:"nice-statistic__suffix",children:a}),o&&e.jsxs("span",{className:`nice-statistic__trend nice-statistic__trend--${o.direction}`,"aria-label":(o.direction==="up"?u("statistic.trendUp","Trend up {value}%"):u("statistic.trendDown","Trend down {value}%")).replace("{value}",String(o.value)),children:[e.jsx(l.NiceIcon,{name:o.direction==="up"?"arrow-up":"arrow-down",size:12})," ",o.value,"%"]})]})]})};process.env.NODE_ENV!=="production"&&(ac.displayName="NiceStatistic");const QT=Object.freeze(Object.defineProperty({__proto__:null,NiceStatistic:ac},Symbol.toStringTag,{value:"Module"})),XT=e.jsx(l.NiceIcon,{name:"clipboard",size:16}),zm=({text:t,children:n,onCopy:i,successMessage:a,timeout:s=2e3,variant:o="icon",className:c="",style:d,testId:p,"data-testid":m,"aria-label":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(!1),b=r.useRef(null),g=r.useCallback(async()=>{let y=!1;try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)await navigator.clipboard.writeText(t),y=!0;else if(typeof document<"u"){const C=document.createElement("textarea");C.value=t,C.setAttribute("readonly",""),C.style.position="absolute",C.style.left="-9999px",document.body.appendChild(C),C.select(),y=document.execCommand("copy"),document.body.removeChild(C)}}catch{y=!1}y&&(i?.(t),f(!0),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>f(!1),s))},[t,i,s]),v=x?a??u("copy.success","Copied!"):n??(o==="icon"?XT:u("copy.label","Copy"));return e.jsx("button",{type:"button",onClick:g,"aria-label":h??(n==null&&o==="icon"?u("copy.aria","Copy to clipboard"):void 0),"data-testid":m??p,"data-copied":x||void 0,className:`nice-copy-button nice-copy-button--${o} ${x?"nice-copy-button--copied":""} ${c}`,style:d,children:v})};process.env.NODE_ENV!=="production"&&(zm.displayName="NiceCopyButton");function Bm(){return`clip_${Date.now()}_${Math.random().toString(36).slice(2,9)}`}function Fm(t){try{const n=JSON.parse(t);if(Array.isArray(n)||typeof n=="object"&&n!==null)return"json"}catch{}return/<[a-z][\s\S]*>/i.test(t)?"html":t.startsWith("data:image/")?"image":"text"}function qm(t,n=80){const i=t.replace(/\s+/g," ").trim();return i.length<=n?i:i.slice(0,n-3)+"..."}const ZT={text:"edit",json:"hash",record:"clipboard",file:"file",image:"image",html:"globe",custom:"box"},eE=Object.assign(r.forwardRef(({entries:t,onEntriesChange:n,onPaste:i,onCopy:a,maxEntries:s=20,enableShortcuts:o=!0,persist:c=!0,storageKey:d="nice-clipboard-stack",open:p,onOpenChange:m,size:h="md",position:u="bottom-right",showTrigger:x=!0,trigger:f,showTypeIcons:b=!0,showTimestamps:g=!0,draggable:v=!0,renderEntry:y,className:C,style:w,id:E,accessMode:S,disabled:N,..._},k)=>{const j=l.useControlId(E),T=l.useNiceAccessMode(S,E),{t:P}=l.useNiceTranslation(),B=r.useRef(null),[R,I]=r.useState([]),[D,M]=r.useState(!1),[O,L]=r.useState(null),[V,ee]=r.useState(""),z=t??R,U=p??D,re=r.useCallback(A=>{p===void 0&&M(A),m?.(A)},[p,m]),Y=r.useCallback(A=>{t===void 0&&I(A),n?.(A)},[t,n]);r.useEffect(()=>{if(!(!c||t!==void 0))try{const A=localStorage.getItem(d);if(A){const Z=JSON.parse(A);I(Z)}}catch{}},[c,d,t]),r.useEffect(()=>{if(!(!c||t!==void 0))try{localStorage.setItem(d,JSON.stringify(z))}catch{}},[c,d,z,t]),r.useCallback((A,Z={})=>{const fe=Z.type??Fm(A),Ne={id:Bm(),type:fe,content:A,preview:qm(A),copiedAt:Date.now(),...Z};if(fe==="json")try{Ne.parsedValue=JSON.parse(A)}catch{}return Y([Ne,...z.filter(K=>K.id!==Ne.id)].slice(0,s)),a?.(Ne),Ne},[z,s,Y,a]);const oe=r.useCallback(A=>{Y(z.filter(Z=>Z.id!==A))},[z,Y]),q=r.useCallback((A,Z)=>{Y(z.map(fe=>fe.id===A?{...fe,isPinned:Z}:fe))},[z,Y]),se=r.useCallback(A=>{navigator.clipboard?.writeText(A.content),i?.(A),re(!1)},[i,re]),ce=r.useCallback(()=>{Y(z.filter(A=>A.isPinned))},[z,Y]),le=r.useCallback((A,Z)=>{const fe=[...z],[Ne]=fe.splice(A,1);fe.splice(Z,0,Ne),Y(fe)},[z,Y]);r.useEffect(()=>{if(!o||N)return;const A=Z=>{(Z.ctrlKey||Z.metaKey)&&Z.shiftKey&&(Z.key==="v"||Z.key==="V")?(Z.preventDefault(),re(!U)):Z.key==="Escape"&&U&&(Z.preventDefault(),re(!1))};return window.addEventListener("keydown",A),()=>window.removeEventListener("keydown",A)},[o,N,U,re]),r.useEffect(()=>{if(!U)return;const A=Z=>{B.current&&!B.current.contains(Z.target)&&re(!1)};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[U,re]);const J=r.useMemo(()=>{if(!V)return z;const A=V.toLowerCase();return z.filter(Z=>Z.content.toLowerCase().includes(A)||Z.label?.toLowerCase().includes(A)||Z.source?.toLowerCase().includes(A))},[z,V]),me=r.useCallback(A=>{v&&L(A)},[v]),je=r.useCallback(A=>{A.preventDefault()},[]),ue=r.useCallback(A=>{O===null||O===A||(le(O,A),L(null))},[O,le]);if(T==="hidden")return null;const F=T==="disabled"||N,H=A=>{const Z=Date.now()-A;return Z<6e4?P("time.justNow","Just now"):Z<36e5?`${Math.floor(Z/6e4)}m ${P("time.ago","ago")}`:Z<864e5?`${Math.floor(Z/36e5)}h ${P("time.ago","ago")}`:new Date(A).toLocaleDateString()};return e.jsxs("div",{ref:A=>{B.current=A,typeof k=="function"?k(A):k&&(k.current=A)},id:j,className:`nice-clipboard nice-clipboard--${h} nice-clipboard--${u}${F?" nice-clipboard--disabled":""}${C?` ${C}`:""}`,style:w,..._,children:[x&&(f??e.jsxs("button",{type:"button",className:"nice-clipboard__trigger",onClick:()=>re(!U),disabled:F,"aria-label":P("clipboard.history","Clipboard History"),"aria-expanded":U,title:`${P("clipboard.history","Clipboard History")} (Ctrl+Shift+V)`,children:[e.jsx(l.NiceIcon,{name:"clipboard",size:16}),z.length>0&&e.jsx("span",{className:"nice-clipboard__badge",children:z.length})]})),U&&e.jsxs("div",{className:"nice-clipboard__dropdown",children:[e.jsxs("div",{className:"nice-clipboard__header",children:[e.jsx("span",{className:"nice-clipboard__title",children:P("clipboard.history","Clipboard History")}),e.jsx("div",{className:"nice-clipboard__actions",children:e.jsx("button",{type:"button",className:"nice-clipboard__action",onClick:ce,disabled:z.filter(A=>!A.isPinned).length===0,title:P("clipboard.clearAll","Clear all"),"aria-label":P("clipboard.clearAll","Clear all"),children:e.jsx(l.NiceIcon,{name:"trash",size:16})})})]}),e.jsx("div",{className:"nice-clipboard__search",children:e.jsx("input",{type:"text",placeholder:P("clipboard.search","Search..."),value:V,onChange:A=>ee(A.target.value),className:"nice-clipboard__search-input"})}),e.jsx("div",{className:"nice-clipboard__list",children:J.length===0?e.jsx("div",{className:"nice-clipboard__empty",children:z.length===0?P("clipboard.empty","Clipboard is empty"):P("clipboard.noResults","No matching entries")}):J.map((A,Z)=>e.jsxs("div",{className:`nice-clipboard__entry${A.isPinned?" nice-clipboard__entry--pinned":""}${O===Z?" nice-clipboard__entry--dragging":""}`,draggable:v,onDragStart:()=>me(Z),onDragOver:je,onDrop:()=>ue(Z),onClick:()=>se(A),role:"button",tabIndex:0,onKeyDown:fe=>fe.key==="Enter"&&se(A),children:[b&&e.jsx("span",{className:"nice-clipboard__entry-icon",children:e.jsx(l.NiceIcon,{name:ZT[A.type],size:16})}),e.jsx("div",{className:"nice-clipboard__entry-content",children:y?y(A):e.jsxs(e.Fragment,{children:[A.label&&e.jsx("span",{className:"nice-clipboard__entry-label",children:A.label}),e.jsx("span",{className:"nice-clipboard__entry-preview",children:A.type==="image"&&A.imageMeta?.dataUrl?e.jsx("img",{src:A.imageMeta.dataUrl,alt:P("clipboard.clipboardImage","Clipboard image"),className:"nice-clipboard__entry-thumb"}):A.preview||A.content.slice(0,80)}),g&&e.jsx("span",{className:"nice-clipboard__entry-time",children:H(A.copiedAt)})]})}),e.jsxs("div",{className:"nice-clipboard__entry-actions",children:[e.jsx("button",{type:"button",className:`nice-clipboard__pin${A.isPinned?" nice-clipboard__pin--active":""}`,onClick:fe=>{fe.stopPropagation(),q(A.id,!A.isPinned)},title:A.isPinned?P("clipboard.unpin","Unpin"):P("clipboard.pin","Pin"),"aria-label":A.isPinned?P("clipboard.unpin","Unpin"):P("clipboard.pin","Pin"),children:e.jsx(l.NiceIcon,{name:"map-pin",size:16})}),e.jsx("button",{type:"button",className:"nice-clipboard__remove",onClick:fe=>{fe.stopPropagation(),oe(A.id)},title:P("clipboard.remove","Remove"),"aria-label":P("clipboard.remove","Remove"),children:e.jsx(l.NiceIcon,{name:"close",size:14})})]})]},A.id))}),e.jsxs("div",{className:"nice-clipboard__footer",children:[e.jsxs("span",{className:"nice-clipboard__count",children:[z.length," / ",s," ",P("clipboard.entries","entries")]}),e.jsx("span",{className:"nice-clipboard__hint",children:"Ctrl+Shift+V"})]})]})]})}),{displayName:"NiceClipboardStack"});function tE(t={}){const{maxEntries:n=20,storageKey:i="nice-clipboard-stack",persist:a=!0,onCopy:s,onPaste:o}=t,[c,d]=r.useState([]);r.useEffect(()=>{if(a)try{const b=localStorage.getItem(i);b&&d(JSON.parse(b))}catch{}},[a,i]),r.useEffect(()=>{if(a)try{localStorage.setItem(i,JSON.stringify(c))}catch{}},[a,i,c]);const p=r.useCallback((b,g={})=>{const v=g.type??Fm(b),y={id:Bm(),type:v,content:b,preview:qm(b),copiedAt:Date.now(),...g};if(v==="json")try{y.parsedValue=JSON.parse(b)}catch{}return navigator.clipboard?.writeText(b),d(C=>[y,...C.filter(w=>w.id!==y.id)].slice(0,n)),s?.(y),y},[n,s]),m=r.useCallback(b=>(navigator.clipboard?.writeText(b.content),o?.(b),b.content),[o]),h=r.useCallback(b=>{d(g=>g.filter(v=>v.id!==b))},[]),u=r.useCallback((b,g)=>{d(v=>v.map(y=>y.id===b?{...y,isPinned:g}:y))},[]),x=r.useCallback((b=!0)=>{d(g=>b?g.filter(v=>v.isPinned):[])},[]),f=r.useCallback((b,g)=>{d(v=>{const y=[...v],[C]=y.splice(b,1);return y.splice(g,0,C),y})},[]);return{entries:c,copy:p,paste:m,remove:h,pin:u,clear:x,reorder:f,canUndo:c.length>0}}const nE={info:"info",warning:"warning",error:"close",success:"check",tip:"lightbulb"},Vm=({children:t,type:n="info",title:i,icon:a,closable:s=!1,onClose:o,size:c="md",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(!1);if(x)return null;const b=()=>{f(!0),o?.()},g=n==="error"?"alert":"status";return e.jsxs("div",{className:`nice-callout nice-callout--${n} nice-callout--${c} ${d}`,style:p,role:g,"data-testid":h??m,children:[e.jsx("span",{className:"nice-callout__icon","aria-hidden":"true",children:a??e.jsx(l.NiceIcon,{name:nE[n],size:18})}),e.jsxs("div",{className:"nice-callout__body",children:[i&&e.jsx("div",{className:"nice-callout__title",children:i}),e.jsx("div",{className:"nice-callout__content",children:t})]}),s&&e.jsx("button",{type:"button",className:"nice-callout__close",onClick:b,"aria-label":u("callout.dismiss","Dismiss"),children:e.jsx(l.NiceIcon,{name:"close",size:16})})]})};process.env.NODE_ENV!=="production"&&(Vm.displayName="NiceCallout");const Um=({children:t,onClickOutside:n,disabled:i=!1,mouseEvent:a="mousedown",className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useRef(null);return r.useEffect(()=>{if(i)return;const m=h=>{!p.current||p.current.contains(h.target)||n(h)};return document.addEventListener(a,m),document.addEventListener("touchstart",m),()=>{document.removeEventListener(a,m),document.removeEventListener("touchstart",m)}},[i,a,n]),e.jsx("div",{ref:p,className:`nice-click-outside ${s}`,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&(Um.displayName="NiceClickOutside");const iE='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])',Hm=({children:t,active:n=!0,initialFocus:i,returnFocus:a=!0,className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useRef(null);return r.useEffect(()=>{if(!n||!p.current)return;const m=p.current,h=document.activeElement,u=()=>Array.from(m.querySelectorAll(iE)).filter(b=>!b.hasAttribute("disabled")&&b.tabIndex!==-1);(()=>{if(i&&typeof i!="string"&&i.current){i.current.focus();return}if(typeof i=="string"){const g=m.querySelector(i);if(g){g.focus();return}}(u()[0]??m).focus()})();const f=b=>{if(b.key!=="Tab")return;const g=u();if(g.length===0){b.preventDefault();return}const v=g[0],y=g[g.length-1];b.shiftKey&&document.activeElement===v?(b.preventDefault(),y.focus()):!b.shiftKey&&document.activeElement===y&&(b.preventDefault(),v.focus())};return m.addEventListener("keydown",f),()=>{m.removeEventListener("keydown",f),a&&h&&document.contains(h)&&h.focus()}},[n,i,a]),e.jsx("div",{ref:p,tabIndex:-1,className:`nice-focus-trap ${s}`,style:o,"data-testid":d??c,children:t})};process.env.NODE_ENV!=="production"&&(Hm.displayName="NiceFocusTrap");const Gm=({children:t,politeness:n="polite",atomic:i=!1,relevant:a="additions text",visible:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m=s?{}:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0};return e.jsx("div",{role:"status","aria-live":n,"aria-atomic":i||void 0,"aria-relevant":a,className:`nice-live-region ${s?"":"nice-live-region--visually-hidden"} ${o}`,style:{...m,...c},"data-testid":p??d,children:t})};process.env.NODE_ENV!=="production"&&(Gm.displayName="NiceLiveRegion");const Wm=({children:t,fallback:n,delay:i=0})=>e.jsx(r.Suspense,{fallback:e.jsx(aE,{delay:i,children:n}),children:t});process.env.NODE_ENV!=="production"&&(Wm.displayName="NiceSuspense");const aE=({delay:t,children:n})=>{const[i,a]=r.useState(t<=0);return r.useEffect(()=>{if(t<=0)return;const s=setTimeout(()=>a(!0),t);return()=>clearTimeout(s)},[t]),i?e.jsx(e.Fragment,{children:n}):null};function sE(t,n){if(t===void 0)return null;const i=l.resolveScrollContainer(t,n);return i instanceof Element?i:null}const rE=[],Km=({items:t=rE,affix:n=!0,offsetTop:i=0,targetOffset:a=0,onChange:s,scrollContainer:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),[u,x]=r.useState(null),f=r.useRef(null);r.useEffect(()=>{if(typeof IntersectionObserver>"u")return;const y=Ym(t).map(w=>document.getElementById(w)).filter(w=>w!=null);if(y.length===0)return;const C=new IntersectionObserver(w=>{const E=w.filter(S=>S.isIntersecting).sort((S,N)=>S.boundingClientRect.top-N.boundingClientRect.top);if(E[0]){const S=E[0].target.id;x(N=>(N!==S&&s?.(S),S))}},{root:sE(o,f.current),rootMargin:`-${i}px 0px -50% 0px`});return y.forEach(w=>C.observe(w)),()=>C.disconnect()},[t,i,s,o]);const b=r.useCallback((v,y)=>{v.preventDefault();const C=document.getElementById(y);if(!C)return;const w=l.resolveScrollContainer(o,f.current);w.scrollTo({top:l.scrollTopFor(w,C,a),behavior:"smooth"})},[a,o]),g={...n&&{position:"sticky",top:i},...d};return e.jsx("nav",{ref:f,className:`nice-anchor ${n?"nice-anchor--affix":""} ${c}`,style:g,"aria-label":h("anchor.aria","Table of contents"),"data-testid":m??p,children:e.jsx(Jm,{items:t,active:u,onClick:b})})};process.env.NODE_ENV!=="production"&&(Km.displayName="NiceAnchor");function Ym(t){const n=[];for(const i of t)n.push(i.href),i.children&&n.push(...Ym(i.children));return n}const Jm=({items:t,active:n,onClick:i})=>e.jsx("ul",{className:"nice-anchor__list",children:t.map(a=>e.jsxs("li",{className:`nice-anchor__item ${n===a.href?"nice-anchor__item--active":""}`,children:[e.jsx("a",{href:`#${a.href}`,className:"nice-anchor__link",onClick:s=>i(s,a.href),"aria-current":n===a.href?"true":void 0,children:a.title}),a.children&&a.children.length>0&&e.jsx(Jm,{items:a.children,active:n,onClick:i})]},a.href))}),Qm=({visibilityHeight:t=400,target:n,duration:i=450,children:a,onScroll:s,className:o="",style:c,testId:d,"data-testid":p})=>{const{t:m}=l.useNiceTranslation(),[h,u]=r.useState(!1),x=r.useCallback(()=>n?n():typeof window>"u"?void 0:window,[n]);r.useEffect(()=>{const b=x();if(!b)return;const g=()=>b instanceof Window?window.scrollY:b.scrollTop,v=()=>u(g()>=t);return v(),b.addEventListener("scroll",v,{passive:!0}),()=>b.removeEventListener("scroll",v)},[x,t]);const f=r.useCallback(()=>{const b=x();if(!b)return;const g=performance.now(),v=b instanceof Window?window.scrollY:b.scrollTop;if(v===0){s?.();return}const y=C=>{const w=Math.min(1,(C-g)/i),E=1-Math.pow(1-w,3),S=v*(1-E);b instanceof Window?window.scrollTo(0,S):b.scrollTop=S,w<1?requestAnimationFrame(y):s?.()};requestAnimationFrame(y)},[i,s,x]);return h?e.jsx("button",{type:"button",onClick:f,"aria-label":m("backTop.aria","Back to top"),className:`nice-back-top ${o}`,style:c,"data-testid":p??d,children:a??e.jsx(l.NiceIcon,{name:"arrow-up",size:18})}):null};process.env.NODE_ENV!=="production"&&(Qm.displayName="NiceBackTop");const Xm=({children:t,offsetTop:n,offsetBottom:i,target:a,onChange:s,className:o="",style:c,testId:d,"data-testid":p})=>{const m=r.useRef(null),h=r.useRef(null),[u,x]=r.useState(!1),[f,b]=r.useState(null);r.useEffect(()=>{const v=a?a():typeof window<"u"?window:null;if(!v||!m.current)return;const y=m.current,C=()=>{const w=y.getBoundingClientRect(),E=v instanceof Window?window.innerHeight:v.clientHeight;let S=!1;(n!==void 0&&w.top<n||i!==void 0&&E-w.bottom<i)&&(S=!0),x(N=>{if(N!==S&&(s?.(S),S&&h.current)){const _=h.current.getBoundingClientRect();b({width:_.width,height:_.height})}return S})};return C(),v.addEventListener("scroll",C,{passive:!0}),window.addEventListener("resize",C),()=>{v.removeEventListener("scroll",C),window.removeEventListener("resize",C)}},[n,i,a,s]);const g=u?{position:"fixed",...n!==void 0&&{top:n},...i!==void 0&&{bottom:i},width:f?.width,zIndex:10}:{};return e.jsx("div",{ref:m,"data-testid":p??d,className:`nice-affix ${u?"nice-affix--affixed":""} ${o}`,style:{...u&&f&&{height:f.height},...c},children:e.jsx("div",{ref:h,className:"nice-affix__content",style:g,children:t})})};process.env.NODE_ENV!=="production"&&(Xm.displayName="NiceAffix");const oE={start:"flex-start",center:"center",end:"flex-end"},Zm=({media:t,children:n,mediaPosition:i="start",align:a="start",spacing:s=16,className:o="",style:c,testId:d,"data-testid":p})=>{const m={display:"flex",alignItems:oE[a],gap:typeof s=="number"?`${s}px`:s,flexDirection:i==="start"?"row":"row-reverse",...c};return e.jsxs("div",{className:`nice-media-object ${o}`,style:m,"data-testid":p??d,children:[e.jsx("div",{className:"nice-media-object__media",children:t}),e.jsx("div",{className:"nice-media-object__content",children:n})]})};process.env.NODE_ENV!=="production"&&(Zm.displayName="NiceMediaObject");function Wl(t,n,i){const a=t.toFixed(n),[s,o]=a.split("."),c=s.replace(/\B(?=(\d{3})+(?!\d))/g,i);return o?`${c}.${o}`:c}const eh=({end:t,start:n=0,duration:i=2,decimals:a=0,prefix:s,suffix:o,separator:c=",",onComplete:d,className:p="",style:m,testId:h,"data-testid":u})=>{const[x,f]=r.useState(n),b=r.useRef(!1);return r.useEffect(()=>{b.current=!1;const g=performance.now(),v=t-n,y=Math.max(0,i*1e3);if(y===0){f(t),d?.();return}let C=0;const w=E=>{const S=Math.min(1,(E-g)/y),N=1-Math.pow(1-S,3);f(n+v*N),S<1?C=requestAnimationFrame(w):b.current||(b.current=!0,d?.())};return C=requestAnimationFrame(w),()=>cancelAnimationFrame(C)},[t,n,i,d]),e.jsxs("span",{className:`nice-count-up ${p}`,style:m,"data-testid":u??h,"aria-label":`${s??""}${Wl(t,a,c)}${o??""}`,children:[s,Wl(x,a,c),o]})};process.env.NODE_ENV!=="production"&&(eh.displayName="NiceCountUp");function Kl(t){const n=Date.now(),i=Math.max(0,t-n),a=Math.floor(i/1e3)%60,s=Math.floor(i/(1e3*60))%60,o=Math.floor(i/(1e3*60*60))%24;return{days:Math.floor(i/(1e3*60*60*24)),hours:o,minutes:s,seconds:a,total:i}}const Yl={days:0,hours:0,minutes:0,seconds:0,total:0},cE=t=>String(t).padStart(2,"0"),th=({targetDate:t,onComplete:n,format:i="full",showDays:a=!0,showHours:s=!0,showMinutes:o=!0,showSeconds:c=!0,labels:d,className:p="",style:m,testId:h,"data-testid":u})=>{const{t:x}=l.useNiceTranslation(),f=t?.getTime(),[b,g]=r.useState(()=>f===void 0?Yl:Kl(f)),v=r.useRef(!1);r.useEffect(()=>{if(v.current=!1,f===void 0){g(Yl);return}const E=()=>{const N=Kl(f);g(N),N.total===0&&!v.current&&(v.current=!0,n?.())};E();const S=setInterval(E,1e3);return()=>clearInterval(S)},[f,n]);const y=(E,S)=>d?.[E]??x(`countdown.${E}`,S),C=[];a&&C.push({value:b.days,full:y("days","days"),short:"d"}),s&&C.push({value:b.hours,full:y("hours","hours"),short:"h"}),o&&C.push({value:b.minutes,full:y("minutes","minutes"),short:"m"}),c&&C.push({value:b.seconds,full:y("seconds","seconds"),short:"s"});const w=i==="minimal"?C.map(E=>cE(E.value)).join(":"):i==="compact"?C.map(E=>`${E.value}${E.short}`).join(" "):C.map(E=>`${E.value} ${E.full}`).join(" ");return e.jsx("span",{className:`nice-countdown nice-countdown--${i} ${p}`,style:m,"data-testid":u??h,role:"timer","aria-live":"polite",children:w})};process.env.NODE_ENV!=="production"&&(th.displayName="NiceCountdown");const ma=t=>String(t).padStart(2,"0");function Na(t,n="seconds"){const i=Math.max(0,Math.floor(t)),a=Math.floor(i/36e5),s=Math.floor(i/6e4)%60,o=Math.floor(i/1e3)%60,c=a>0?`${a}:${ma(s)}:${ma(o)}`:`${ma(s)}:${ma(o)}`;return n==="tenths"?`${c}.${Math.floor(i/100)%10}`:n==="hundredths"?`${c}.${ma(Math.floor(i/10)%100)}`:c}const nh={seconds:250,tenths:50,hundredths:31},ss=()=>typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now();function ih(t,n){const[i,a]=r.useState(0),s=r.useRef({accumulated:0,startedAt:null}),o=r.useCallback(()=>{const d=s.current;return d.accumulated+(d.startedAt===null?0:ss()-d.startedAt)},[]);r.useEffect(()=>{const d=s.current;if(!t){d.startedAt!==null&&(d.accumulated+=ss()-d.startedAt,d.startedAt=null,a(d.accumulated));return}d.startedAt===null&&(d.startedAt=ss());const p=setInterval(()=>a(o()),n);return()=>clearInterval(p)},[t,n,o]);const c=r.useCallback(()=>{const d=s.current;d.accumulated=0,d.startedAt!==null&&(d.startedAt=ss()),a(0)},[]);return{elapsed:i,read:o,reset:c}}const Jl=[],lE=({running:t,defaultRunning:n=!1,onRunningChange:i,laps:a,defaultLaps:s,onLapsChange:o,onReset:c,precision:d="hundredths",showLaps:p=!0,label:m,size:h="md",className:u="",style:x,id:f,testId:b,accessMode:g,"data-testid":v})=>{const{t:y}=l.useNiceTranslation(),C=l.useNiceAccessMode(g,f),w=C==="disabled"||C==="readOnly",[E,S]=l.useControllableState({value:t,defaultValue:n,onChange:i,componentName:"NiceStopwatch"}),[N,_]=l.useControllableState({value:a,defaultValue:s,fallbackValue:Jl,onChange:o,componentName:"NiceStopwatch"}),{elapsed:k,read:j,reset:T}=ih(E,nh[d]),P=r.useMemo(()=>N.map((O,L)=>({n:L+1,total:O,split:O-(L>0?N[L-1]:0)})),[N]),[B,R]=r.useMemo(()=>{if(P.length<3)return[-1,-1];let O=0,L=0;return P.forEach((V,ee)=>{V.split<P[O].split&&(O=ee),V.split>P[L].split&&(L=ee)}),[O,L]},[P]);if(C==="hidden")return null;const I=l.normalizeSize(h),D=m??y("stopwatch.label","Stopwatch"),M=E?y("stopwatch.pause","Pause"):k>0?y("stopwatch.resume","Resume"):y("stopwatch.start","Start");return e.jsxs("div",{id:f,className:`nice-stopwatch nice-stopwatch--${I} ${E?"nice-stopwatch--running":""} ${u}`,style:x,"data-testid":b??v,children:[m&&e.jsx("div",{className:"nice-stopwatch__label",children:m}),e.jsx("div",{className:"nice-stopwatch__time",role:"timer","aria-label":D,children:Na(k,d)}),e.jsxs("div",{className:"nice-stopwatch__controls",children:[e.jsx(Fe.NiceButton,{size:I,variant:E?"secondary":"primary",onClick:()=>S(!E),disabled:w,children:M}),p&&e.jsx(Fe.NiceButton,{size:I,variant:"outline",onClick:()=>_(O=>[...O,Math.round(j())]),disabled:w||!E,children:y("stopwatch.lap","Lap")}),e.jsx(Fe.NiceButton,{size:I,variant:"outline",onClick:()=>{T(),_(Jl),c?.()},disabled:w||E||k===0&&N.length===0,children:y("stopwatch.reset","Reset")})]}),p&&P.length>0&&e.jsx("ol",{className:"nice-stopwatch__laps","aria-label":y("stopwatch.laps","Laps"),"aria-live":"polite",children:P.map((O,L)=>e.jsxs("li",{className:`nice-stopwatch__lap ${L===B?"nice-stopwatch__lap--fastest":""} ${L===R?"nice-stopwatch__lap--slowest":""}`,children:[e.jsxs("span",{className:"nice-stopwatch__lap-name",children:[y("stopwatch.lapNumber","Lap")," ",O.n,L===B&&e.jsx("span",{className:"nice-stopwatch__lap-tag",children:y("stopwatch.fastest","fastest")}),L===R&&e.jsx("span",{className:"nice-stopwatch__lap-tag",children:y("stopwatch.slowest","slowest")})]}),e.jsx("span",{className:"nice-stopwatch__lap-split",children:Na(O.split,d)}),e.jsx("span",{className:"nice-stopwatch__lap-total",children:Na(O.total,d)})]},O.n)).reverse()})]})},Un=6e4,dE=[1*Un,5*Un,10*Un,25*Un];function uE(t,n){const i=Math.floor(t/36e5),a=Math.floor(t/Un)%60,s=Math.floor(t/1e3)%60,o=[];return i&&o.push(`${i} ${n.h}`),a&&o.push(`${a} ${n.min}`),(s||o.length===0)&&o.push(`${s} ${n.s}`),o.join(" ")}const pE=({duration:t,defaultDuration:n=5*Un,onDurationChange:i,running:a,defaultRunning:s=!1,onRunningChange:o,onComplete:c,presets:d=dE,editable:p=!0,precision:m="seconds",showProgress:h=!0,label:u,size:x="md",className:f="",style:b,id:g,testId:v,accessMode:y,"data-testid":C})=>{const{t:w}=l.useNiceTranslation(),E=l.useNiceAccessMode(y,g),S=E==="disabled"||E==="readOnly",[N,_]=l.useControllableState({value:t,defaultValue:n,onChange:i,componentName:"NiceCountdownTimer"}),[k,j]=l.useControllableState({value:a,defaultValue:s,onChange:o,componentName:"NiceCountdownTimer"}),{elapsed:T,reset:P}=ih(k,nh[m]),B=Math.max(0,N-T),R=N>0&&B===0,I=r.useRef(!1),D=r.useRef(c);if(D.current=c,r.useEffect(()=>{if(!R){I.current=!1;return}I.current||(I.current=!0,j(!1),D.current?.())},[R,j]),E==="hidden")return null;const M=l.normalizeSize(x),O=T===0&&!k,L=u??w("timer.label","Timer"),V=m==="seconds"?Na(Math.ceil(B/1e3)*1e3,"seconds"):Na(Math.ceil(B/100)*100,"tenths"),ee={h:w("timer.hoursShort","h"),min:w("timer.minutesShort","min"),s:w("timer.secondsShort","s")},z={h:Math.floor(N/36e5),m:Math.floor(N/Un)%60,s:Math.floor(N/1e3)%60},U=(Y,oe)=>{const q={...z,[Y]:Math.max(0,Math.round(oe??0))};_(q.h*36e5+q.m*Un+q.s*1e3)},re=k?w("timer.pause","Pause"):O||R?w("timer.start","Start"):w("timer.resume","Resume");return e.jsxs("div",{id:g,className:`nice-countdown-timer nice-countdown-timer--${M} ${k?"nice-countdown-timer--running":""} ${R?"nice-countdown-timer--done":""} ${f}`,style:b,"data-testid":v??C,children:[u&&e.jsx("div",{className:"nice-countdown-timer__label",children:u}),e.jsx("div",{className:"nice-countdown-timer__time",role:"timer","aria-label":L,children:V}),R&&e.jsx("div",{className:"nice-countdown-timer__done",role:"status",children:w("timer.done","Time's up")}),h&&e.jsx("div",{className:"nice-countdown-timer__progress",role:"progressbar","aria-label":w("timer.timeLeft","Time left"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":N>0?Math.round(B/N*100):0,children:e.jsx("div",{className:"nice-countdown-timer__progress-bar",style:{width:`${N>0?B/N*100:0}%`}})}),O&&p&&e.jsxs("div",{className:"nice-countdown-timer__fields",children:[e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.hours","Hours"),min:0,max:99,value:z.h,onChange:Y=>U("h",Y),disabled:S}),e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.minutes","Minutes"),min:0,max:59,value:z.m,onChange:Y=>U("m",Y),disabled:S}),e.jsx(Oe.NiceNumberInput,{size:"sm",label:w("timer.seconds","Seconds"),min:0,max:59,value:z.s,onChange:Y=>U("s",Y),disabled:S})]}),O&&d.length>0&&e.jsx("div",{className:"nice-countdown-timer__presets",children:d.map(Y=>e.jsx(Fe.NiceButton,{size:"sm",variant:Y===N?"primary":"outline","aria-pressed":Y===N,onClick:()=>_(Y),disabled:S,children:uE(Y,ee)},Y))}),e.jsxs("div",{className:"nice-countdown-timer__controls",children:[e.jsx(Fe.NiceButton,{size:M,variant:k?"secondary":"primary",onClick:()=>{R&&P(),j(!k)},disabled:S||N<=0,children:re}),e.jsx(Fe.NiceButton,{size:M,variant:"outline",onClick:()=>{j(!1),P()},disabled:S||O,children:w("timer.reset","Reset")})]})]})},ah=({children:t,title:n,extra:i,defaultCollapsed:a=!1,collapsed:s,onCollapse:o,collapseTrigger:c="icon",className:d="",style:p,testId:m,"data-testid":h})=>{const{t:u}=l.useNiceTranslation(),[x,f]=r.useState(a),b=s!==void 0,g=b?s:x,v=r.useId(),y=r.useCallback(E=>{b||f(E),o?.(E)},[b,o]),C=r.useCallback(()=>y(!g),[g,y]),w=c==="header"?{onClick:C,role:"button",tabIndex:0,"aria-expanded":!g,"aria-controls":v,onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),C())}}:{};return e.jsxs("div",{className:`nice-collapsible-card ${g?"nice-collapsible-card--collapsed":""} ${d}`,style:p,"data-testid":h??m,children:[e.jsxs("div",{className:"nice-collapsible-card__header",...w,children:[e.jsx("div",{className:"nice-collapsible-card__title",children:n}),i&&e.jsx("div",{className:"nice-collapsible-card__extra",children:i}),e.jsx("button",{type:"button",className:"nice-collapsible-card__chevron","aria-expanded":!g,"aria-controls":v,"aria-label":g?u("collapsibleCard.expand","Expand"):u("collapsibleCard.collapse","Collapse"),onClick:E=>{E.stopPropagation(),C()},children:e.jsx(l.NiceIcon,{name:g?"chevron-right":"chevron-down",size:16})})]}),e.jsx("div",{id:v,className:"nice-collapsible-card__body",hidden:g,children:t})]})};process.env.NODE_ENV!=="production"&&(ah.displayName="NiceCollapsibleCard");const sh=({children:t,text:n,color:i,placement:a="end",className:s="",style:o,testId:c,"data-testid":d})=>{const p=i?{backgroundColor:i}:{};return e.jsxs("div",{className:`nice-ribbon-wrap nice-ribbon-wrap--${a} ${s}`,style:{position:"relative",...o},"data-testid":d??c,children:[t,e.jsx("span",{className:`nice-ribbon nice-ribbon--${a}`,style:p,children:n})]})};process.env.NODE_ENV!=="production"&&(sh.displayName="NiceRibbon");const rh=({children:t,expanded:n,defaultExpanded:i=!1,onExpandedChange:a,trigger:s,animated:o=!0,disabled:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const[u,x]=r.useState(i),f=n!==void 0,b=f?n:u,g=r.useId(),v=`${g}-trigger`,y=r.useCallback(()=>{if(c)return;const C=!b;f||x(C),a?.(C)},[c,b,f,a]);return e.jsxs("div",{className:`nice-collapse ${b?"nice-collapse--expanded":""} ${o?"nice-collapse--animated":""} ${d}`,style:p,"data-testid":h??m,children:[e.jsx("button",{type:"button",id:v,className:"nice-collapse__trigger","aria-expanded":b,"aria-controls":g,disabled:c,onClick:y,children:s}),e.jsx("div",{id:g,className:"nice-collapse__panel",role:"region","aria-labelledby":v,hidden:!b,children:t})]})};process.env.NODE_ENV!=="production"&&(rh.displayName="NiceCollapse");const oh=({children:t,links:n,copyright:i,social:a,sticky:s=!1,className:o="",style:c,testId:d,"data-testid":p})=>{const m={...s&&{position:"sticky",bottom:0},...c};return e.jsxs("footer",{className:`nice-footer ${s?"nice-footer--sticky":""} ${o}`,style:m,"data-testid":p??d,children:[t&&e.jsx("div",{className:"nice-footer__content",children:t}),n&&n.length>0&&e.jsx("div",{className:"nice-footer__columns",children:n.map((h,u)=>e.jsxs("nav",{className:"nice-footer__column","aria-label":typeof h.title=="string"?h.title:void 0,children:[e.jsx("h3",{className:"nice-footer__column-title",children:h.title}),e.jsx("ul",{className:"nice-footer__list",children:h.items.map((x,f)=>e.jsx("li",{className:"nice-footer__list-item",children:e.jsx("a",{href:x.href,className:"nice-footer__link",target:x.external?"_blank":void 0,rel:x.external?"noopener noreferrer":void 0,children:x.label})},f))})]},u))}),(i||a&&a.length>0)&&e.jsxs("div",{className:"nice-footer__bottom",children:[i&&e.jsx("div",{className:"nice-footer__copyright",children:i}),a&&a.length>0&&e.jsx("ul",{className:"nice-footer__social",children:a.map((h,u)=>e.jsx("li",{children:e.jsx("a",{href:h.href,className:"nice-footer__social-link","aria-label":h.label,target:"_blank",rel:"noopener noreferrer",children:e.jsx("span",{"aria-hidden":"true",children:h.icon})})},u))})]})]})};process.env.NODE_ENV!=="production"&&(oh.displayName="NiceFooter");const ch=({title:t,subtitle:n,breadcrumb:i,avatar:a,tags:s,extra:o,footer:c,onBack:d,className:p="",style:m,testId:h,"data-testid":u})=>{const{t:x}=l.useNiceTranslation();return e.jsxs("header",{className:`nice-page-header ${p}`,style:m,"data-testid":u??h,children:[i&&e.jsx("div",{className:"nice-page-header__breadcrumb",children:i}),e.jsxs("div",{className:"nice-page-header__row",children:[d&&e.jsx("button",{type:"button",onClick:d,className:"nice-page-header__back","aria-label":x("pageHeader.back","Back"),children:e.jsx(l.NiceIcon,{name:"arrow-left",size:16})}),a&&e.jsx("div",{className:"nice-page-header__avatar",children:a}),e.jsxs("div",{className:"nice-page-header__heading",children:[e.jsxs("div",{className:"nice-page-header__title-row",children:[e.jsx("h1",{className:"nice-page-header__title",children:t}),s&&e.jsx("div",{className:"nice-page-header__tags",children:s})]}),n&&e.jsx("div",{className:"nice-page-header__subtitle",children:n})]}),o&&e.jsx("div",{className:"nice-page-header__extra",children:o})]}),c&&e.jsx("div",{className:"nice-page-header__footer",children:c})]})};process.env.NODE_ENV!=="production"&&(ch.displayName="NicePageHeader");const mE={xs:0,sm:640,md:768,lg:1024,xl:1280},lh=({children:t,columns:n=3,gap:i=16,hoverable:a=!1,className:s="",style:o,testId:c,"data-testid":d})=>{const p=r.useId().replace(/:/g,""),m=typeof n=="object"&&n!==null,h={display:"grid",gap:typeof i=="number"?`${i}px`:i,gridTemplateColumns:m?"repeat(var(--nice-card-grid-cols, 1), minmax(0, 1fr))":`repeat(${n}, minmax(0, 1fr))`,...o},u=m?hE(p,n):"";return e.jsxs(e.Fragment,{children:[u&&e.jsx("style",{children:u}),e.jsx("div",{"data-nice-card-grid":p,"data-testid":d??c,className:`nice-card-grid ${a?"nice-card-grid--hoverable":""} ${s}`,style:h,children:t})]})};process.env.NODE_ENV!=="production"&&(lh.displayName="NiceCardGrid");function hE(t,n){const i=[],a=`[data-nice-card-grid="${t}"]`;n.xs!==void 0&&i.push(`${a}{--nice-card-grid-cols:${n.xs};}`);for(const s of["sm","md","lg","xl"])n[s]!==void 0&&i.push(`@media (min-width: ${mE[s]}px){${a}{--nice-card-grid-cols:${n[s]};}}`);return i.join("")}const gE=[];function dh({value:t,defaultValue:n,options:i=gE,disabled:a=!1,direction:s="horizontal",name:o,onChange:c,className:d="",style:p,testId:m,"data-testid":h}){const[u,x]=r.useState(n??[]),f=t!==void 0,b=f?t:u,g=r.useId(),v=r.useCallback(y=>{const C=b.includes(y)?b.filter(w=>w!==y):[...b,y];f||x(C),c?.(C)},[b,f,c]);return e.jsx("div",{role:"group","aria-label":o,className:`nice-checkbox-group nice-checkbox-group--${s} ${d}`,style:p,"data-testid":h??m,children:i.map((y,C)=>{const w=`${g}-${C}`,E=b.includes(y.value),S=a||y.disabled;return e.jsxs("label",{htmlFor:w,className:`nice-checkbox-group__item ${S?"nice-checkbox-group__item--disabled":""}`,children:[e.jsx("input",{id:w,type:"checkbox",className:"nice-checkbox-group__input",checked:E,disabled:S,onChange:()=>v(y.value)}),e.jsx("span",{className:"nice-checkbox-group__label",children:y.label})]},C)})})}process.env.NODE_ENV!=="production"&&(dh.displayName="NiceCheckboxGroup");const uh=({length:t=6,value:n,onChange:i,onComplete:a,type:s="number",autoFocus:o=!0,disabled:c=!1,error:d=!1,separator:p,className:m="",style:h,"aria-label":u,testId:x,"data-testid":f})=>{const{t:b}=l.useNiceTranslation(),g=n!==void 0,[v,y]=r.useState(""),C=(g?n:v).slice(0,t),w=r.useRef(!1),E=r.useRef([]);r.useEffect(()=>{o&&E.current[0]&&E.current[0].focus()},[o]);const S=r.useCallback(j=>{const T=j.slice(0,t);g||y(T),i?.(T),T.length===t&&!w.current&&(w.current=!0,a?.(T)),T.length<t&&(w.current=!1)},[t,g,i,a]),N=(j,T)=>{const P=(s==="number"?T.replace(/\D/g,""):T).slice(-1);if(!P)return;const B=C.split("");B[j]=P;const R=B.join("").slice(0,t);S(R),E.current[Math.min(j+1,t-1)]?.focus()},_=(j,T)=>{if(T.key==="Backspace"){const P=C.split("");P[j]?P[j]="":j>0&&(P[j-1]="",E.current[j-1]?.focus()),S(P.join(""))}else T.key==="ArrowLeft"&&j>0?(T.preventDefault(),E.current[j-1]?.focus()):T.key==="ArrowRight"&&j<t-1&&(T.preventDefault(),E.current[j+1]?.focus())},k=j=>{const T=j.clipboardData.getData("text"),P=(s==="number"?T.replace(/\D/g,""):T).slice(0,t);if(!P)return;j.preventDefault(),S(P);const B=Math.min(P.length,t-1);E.current[B]?.focus()};return e.jsx("div",{role:"group","aria-label":u??b("otpInput.oneTimePasswordDigits","One-time password, {value} digits").replace("{value}",String(t)),className:`nice-otp-input ${d?"nice-otp-input--error":""} ${m}`,style:h,"data-testid":f??x,children:Array.from({length:t}).map((j,T)=>e.jsxs(r.Fragment,{children:[e.jsx("input",{ref:P=>{E.current[T]=P},type:s==="number"?"tel":"text",inputMode:s==="number"?"numeric":"text",maxLength:1,value:C[T]??"",onChange:P=>N(T,P.target.value),onKeyDown:P=>_(T,P),onPaste:k,disabled:c,"aria-label":b("otpInput.digitOf","Digit {i} of {value}").replace("{i}",String(T+1)).replace("{value}",String(t)),className:"nice-otp-input__slot",autoComplete:T===0?"one-time-code":"off"}),p&&T<t-1&&e.jsx("span",{className:"nice-otp-input__separator","aria-hidden":"true",children:p})]},T))})};process.env.NODE_ENV!=="production"&&(uh.displayName="NiceOTPInput");const bE=[],fE=({label:t,onKeyDown:n,children:i})=>{const a=r.useRef(null);return l.useRovingFocus(a,{orientation:"vertical",typeahead:!0}),e.jsx("ul",{ref:a,className:"nice-cascade-select__column",role:"listbox","aria-label":t,onKeyDown:n,children:i})},ph=({options:t=bE,value:n,defaultValue:i,onChange:a,placeholder:s,disabled:o=!1,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=n!==void 0,[x,f]=r.useState(i??[]),b=u?n:x,[g,v]=r.useState(!1),[y,C]=r.useState(b),w=r.useMemo(()=>vE(t,b),[t,b]),E=r.useMemo(()=>{const R=[t];let I=t;for(const D of y){const M=I?.find(O=>O.value===D);if(!M?.children?.length)break;R.push(M.children),I=M.children}return R},[t,y]),S=(R,I)=>{if(I.disabled)return;const D=[...y.slice(0,R),I.value];C(D),(!I.children||I.children.length===0)&&(u||f(D),a?.(D),v(!1))},N=w.length?w.map((R,I)=>e.jsxs(r.Fragment,{children:[I>0&&e.jsx("span",{className:"nice-cascade-select__sep",children:" / "}),R]},I)):s??h("cascadeSelect.placeholder","Select"),_=r.useRef(null),k=()=>{C(b),v(!0)};l.useOverlayFocus(_,{open:g,modal:!1,onClose:()=>v(!1)});const j=R=>{const I=_.current?.querySelectorAll(".nice-cascade-select__column")[R];(I?.querySelector('[aria-selected="true"]:not(:disabled)')??I?.querySelector('[role="option"]:not(:disabled)'))?.focus()},T=r.useRef(null);r.useEffect(()=>{T.current!==null&&(j(T.current),T.current=null)},[E]);const P=(R,I)=>{const D=I.target.closest("[data-value]")?.getAttribute("data-value"),M=E[R]?.find(O=>O.value===D);M&&((I.key==="ArrowRight"||I.key==="Enter")&&M.children?.length&&!M.disabled?(I.preventDefault(),T.current=R+1,C([...y.slice(0,R),M.value])):I.key==="Enter"?(I.preventDefault(),S(R,M)):I.key==="ArrowLeft"&&R>0?(I.preventDefault(),j(R-1)):(I.key==="ArrowRight"||I.key==="ArrowLeft")&&I.preventDefault())},B=y.length-1;return e.jsxs("div",{className:`nice-cascade-select ${g?"nice-cascade-select--open":""} ${c}`,style:d,"data-testid":m??p,children:[e.jsx("button",{type:"button",className:"nice-cascade-select__trigger",disabled:o,"aria-haspopup":"listbox","aria-expanded":g,onClick:()=>g?v(!1):k(),onKeyDown:R=>{!g&&(R.key==="ArrowDown"||R.key==="ArrowUp")&&(R.preventDefault(),k())},children:N}),g&&e.jsx("div",{ref:_,className:"nice-cascade-select__menu",children:E.map((R,I)=>{const D=I>0?E[I-1].find(M=>M.value===y[I-1])?.label:void 0;return e.jsx(fE,{label:I===0?s??h("cascadeSelect.placeholder","Select"):typeof D=="string"?D:void 0,onKeyDown:M=>P(I,M),children:R.map(M=>{const O=y[I]===M.value;return e.jsx("li",{role:"presentation",children:e.jsxs("button",{type:"button",role:"option","aria-selected":O,disabled:M.disabled,"data-value":M.value,"data-autofocus":O&&I===B||void 0,className:`nice-cascade-select__option ${O?"nice-cascade-select__option--active":""}`,onClick:()=>S(I,M),children:[e.jsx("span",{children:M.label}),M.children&&M.children.length>0&&e.jsx("span",{className:"nice-cascade-select__chevron","aria-hidden":"true",children:e.jsx(l.NiceIcon,{name:"chevron-right",size:14})})]})},M.value)})},I)})})]})};process.env.NODE_ENV!=="production"&&(ph.displayName="NiceCascadeSelect");function vE(t,n){const i=[];let a=t;for(const s of n){const o=a?.find(c=>c.value===s);if(!o)break;i.push(o.label),a=o.children}return i}const xE={success:"check",error:"close",info:"info",warning:"warning",pending:"clock"},mh=({status:t,title:n,subtitle:i,icon:a,extra:s,children:o,className:c="",style:d,testId:p,"data-testid":m})=>{const h=t==="error"?"alert":"status";return e.jsxs("div",{className:`nice-result nice-result--${t} ${c}`,style:d,role:h,"data-testid":m??p,children:[e.jsx("div",{className:"nice-result__icon","aria-hidden":"true",children:a??e.jsx(l.NiceIcon,{name:xE[t],size:48})}),e.jsx("h2",{className:"nice-result__title",children:n}),i&&e.jsx("p",{className:"nice-result__subtitle",children:i}),o&&e.jsx("div",{className:"nice-result__content",children:o}),s&&e.jsx("div",{className:"nice-result__extra",children:s})]})};process.env.NODE_ENV!=="production"&&(mh.displayName="NiceResult");const Ql={startX:0,startY:0,dx:0,dy:0,dragging:!1},hh=({children:t,onSwipeLeft:n,onSwipeRight:i,onSwipeUp:a,onSwipeDown:s,threshold:o=100,showOverlay:c=!0,disabled:d=!1,className:p="",style:m,testId:h,"data-testid":u})=>{const[x,f]=r.useState(Ql),b=r.useRef(null),g=r.useCallback(_=>{switch(_){case"left":n?.();break;case"right":i?.();break;case"up":a?.();break;case"down":s?.();break}},[n,i,a,s]),v=_=>{d||(_.currentTarget.setPointerCapture(_.pointerId),f({startX:_.clientX,startY:_.clientY,dx:0,dy:0,dragging:!0}))},y=_=>{f(k=>k.dragging?{...k,dx:_.clientX-k.startX,dy:_.clientY-k.startY}:k)},C=r.useCallback(()=>{const{dx:_,dy:k}=x,j=Math.abs(_),T=Math.abs(k);Math.max(j,T)>=o&&(j>T?g(_>0?"right":"left"):g(k>0?"down":"up")),f(Ql)},[x,o,g]),w=_=>{try{_.currentTarget.releasePointerCapture(_.pointerId)}catch{}C()},E=_=>{if(!d)switch(_.key){case"ArrowLeft":_.preventDefault(),g("left");break;case"ArrowRight":_.preventDefault(),g("right");break;case"ArrowUp":_.preventDefault(),g("up");break;case"ArrowDown":_.preventDefault(),g("down");break}},S=x.dragging?`translate(${x.dx}px, ${x.dy}px) rotate(${x.dx/20}deg)`:void 0,N=(()=>{if(!c||!x.dragging)return null;const{dx:_,dy:k}=x,j=Math.abs(_),T=Math.abs(k);return j<16&&T<16?null:j>T?_>0?"right":"left":k>0?"down":"up"})();return e.jsxs("div",{ref:b,tabIndex:d?-1:0,role:"button","aria-disabled":d||void 0,className:`nice-swipe-card ${x.dragging?"nice-swipe-card--dragging":""} ${p}`,style:{transform:S,touchAction:"none",...m},"data-testid":u??h,onPointerDown:v,onPointerMove:y,onPointerUp:w,onPointerCancel:w,onKeyDown:E,children:[t,N&&e.jsx("div",{className:`nice-swipe-card__overlay nice-swipe-card__overlay--${N}`,"aria-hidden":"true"})]})};process.env.NODE_ENV!=="production"&&(hh.displayName="NiceSwipeCard");const yE=[],gh=({tabs:t=yE,activeTab:n,onChange:i,variant:a="default",size:s="md",showIcons:o=!0,stretch:c=!1,className:d="",style:p,testId:m,"data-testid":h})=>{const u=r.useRef([]),x=Math.max(0,t.findIndex(g=>g.id===n)),f=g=>{u.current[g]?.focus()},b=r.useCallback((g,v)=>{let y=v;if(g.key==="ArrowRight")y=(v+1)%t.length;else if(g.key==="ArrowLeft")y=(v-1+t.length)%t.length;else if(g.key==="Home")y=0;else if(g.key==="End")y=t.length-1;else return;g.preventDefault();let C=0;for(;t[y].disabled&&C++<t.length;)y=(y+(g.key==="ArrowLeft"?-1:1)+t.length)%t.length;f(y)},[t]);return e.jsx("div",{role:"tablist","aria-orientation":"horizontal",className:`nice-tab-bar nice-tab-bar--${a} nice-tab-bar--${s} ${c?"nice-tab-bar--stretch":""} ${d}`,style:p,"data-testid":h??m,children:t.map((g,v)=>{const y=v===x;return e.jsxs("button",{ref:C=>{u.current[v]=C},type:"button",role:"tab","aria-selected":y,tabIndex:y?0:-1,disabled:g.disabled,className:`nice-tab-bar__tab ${y?"nice-tab-bar__tab--active":""}`,onClick:()=>i?.(g.id),onKeyDown:C=>b(C,v),children:[o&&g.icon&&e.jsx("span",{className:"nice-tab-bar__icon","aria-hidden":"true",children:g.icon}),e.jsx("span",{className:"nice-tab-bar__label",children:g.label})]},g.id)})})};process.env.NODE_ENV!=="production"&&(gh.displayName="NiceTabBar");const bh=({children:t,header:n,footer:i,sider:a,siderPlacement:s="start",className:o="",style:c,testId:d,"data-testid":p})=>e.jsxs("div",{className:`nice-layout ${o}`,style:c,"data-testid":p??d,children:[n&&e.jsx("header",{className:"nice-layout__header",children:n}),e.jsxs("div",{className:`nice-layout__row nice-layout__row--sider-${s}`,children:[a&&s==="start"&&e.jsx("aside",{className:"nice-layout__sider",children:a}),e.jsx("main",{className:"nice-layout__main",children:t}),a&&s==="end"&&e.jsx("aside",{className:"nice-layout__sider",children:a})]}),i&&e.jsx("footer",{className:"nice-layout__footer",children:i})]});process.env.NODE_ENV!=="production"&&(bh.displayName="NiceLayout");const NE={xs:12,sm:14,md:16,lg:18,xl:20};function _E(t,n,i){let a=t;return typeof n=="number"&&(a=Math.max(n,a)),typeof i=="number"&&(a=Math.min(i,a)),a}function Xl(t,n){return Number.isFinite(t)?n===void 0?String(t):t.toFixed(n):""}const fh=({value:t,defaultValue:n=0,onChange:i,min:a,max:s,step:o=1,precision:c,format:d,showButtons:p=!0,size:m="md",placeholder:h,disabled:u=!1,readOnly:x=!1,className:f="",style:b,testId:g,"data-testid":v})=>{const y=NE[m],{t:C}=l.useNiceTranslation(),w=t!==void 0,[E,S]=r.useState(n),N=w?t:E,_=r.useCallback(M=>{const O=_E(M,a,s);w||S(O),i?.(O)},[a,s,w,i]),k=M=>{if(M===""||M==="-")return;const O=Number(M);Number.isFinite(O)&&_(O)},j=typeof d=="function"?d(N):typeof d=="string"?d.replace("{value}",Xl(N,c)):Xl(N,c),T=()=>_(N+o),P=()=>_(N-o),B=r.useRef(null),R=r.useRef(null),I=u||x;l.useEngage(B,{disabled:I,restoreOnCancel:!0,onEngage:()=>{R.current=N},onRelease:M=>{M&&R.current!==null&&_(R.current),R.current=null}});const D=M=>{if(I)return;const O=M.key==="ArrowUp"?o:M.key==="ArrowDown"?-o:M.key==="PageUp"?o*10:M.key==="PageDown"?-o*10:0,L=M.key==="Home"&&typeof a=="number"?a:M.key==="End"&&typeof s=="number"?s:void 0;O?(M.preventDefault(),_(N+O)):L!==void 0&&(M.preventDefault(),_(L))};return e.jsxs("div",{className:`nice-numeric-input nice-numeric-input--size-${m} ${u?"nice-numeric-input--disabled":""} ${f}`,style:b,"data-testid":v??g,children:[p&&e.jsx("button",{type:"button",className:"nice-numeric-input__btn nice-numeric-input__btn--dec",onClick:P,disabled:u||x||typeof a=="number"&&N<=a,"aria-label":C("numericInput.decrement","Decrement"),children:e.jsx(l.NiceIcon,{name:"minus",size:y})}),e.jsx("input",{ref:B,type:"text",inputMode:"decimal",className:"nice-numeric-input__field",value:j,placeholder:h,disabled:u,readOnly:x,onChange:M=>k(M.target.value),onKeyDown:D,"aria-valuenow":Number.isFinite(N)?N:void 0,"aria-valuemin":a,"aria-valuemax":s,"aria-valuetext":j||void 0,role:"spinbutton"}),p&&e.jsx("button",{type:"button",className:"nice-numeric-input__btn nice-numeric-input__btn--inc",onClick:T,disabled:u||x||typeof s=="number"&&N>=s,"aria-label":C("numericInput.increment","Increment"),children:e.jsx(l.NiceIcon,{name:"plus",size:y})})]})};process.env.NODE_ENV!=="production"&&(fh.displayName="NiceNumericInput");const jE=e.jsx(l.NiceIcon,{name:"star",size:24,className:"nice-rate__star"}),vh=({value:t,defaultValue:n=0,count:i=5,allowHalf:a=!1,allowClear:s=!0,readOnly:o=!1,disabled:c=!1,character:d,onChange:p,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),b=t!==void 0,[g,v]=r.useState(n),y=b?t:g,[C,w]=r.useState(null),E=C??y,S=r.useCallback(k=>{const j=Math.max(0,Math.min(i,k)),T=s&&j===y?0:j;b||v(T),p?.(T)},[i,s,y,b,p]),N=k=>{if(c||o)return;const j=a?.5:1;k.key==="ArrowRight"||k.key==="ArrowUp"?(k.preventDefault(),S(Math.min(i,y+j))):k.key==="ArrowLeft"||k.key==="ArrowDown"?(k.preventDefault(),S(Math.max(0,y-j))):k.key==="Home"?(k.preventDefault(),S(0)):k.key==="End"&&(k.preventDefault(),S(i))},_=k=>typeof d=="function"?d(k):d??jE;return e.jsx("span",{role:"radiogroup","aria-label":f("rate.aria","Rating"),"aria-valuenow":y,"aria-valuemin":0,"aria-valuemax":i,tabIndex:c?-1:0,onKeyDown:N,className:`nice-rate ${c?"nice-rate--disabled":""} ${m}`,style:h,"data-testid":x??u,children:Array.from({length:i}).map((k,j)=>{const T=E>=j+1,P=!T&&a&&E>=j+.5,B=!c&&!o;return e.jsxs("span",{className:`nice-rate__item ${T?"nice-rate__item--full":""} ${P?"nice-rate__item--half":""}`,onMouseLeave:()=>B&&w(null),children:[e.jsx("span",{className:"nice-rate__char","aria-hidden":"true",children:_(j)}),P&&e.jsx("span",{className:"nice-rate__half-fill","aria-hidden":"true",children:_(j)}),a&&e.jsx("button",{type:"button",className:"nice-rate__half-zone nice-rate__half-zone--left","aria-label":f("rate.rate","Rate {i}").replace("{i}",String(j+.5)),disabled:!B,onMouseEnter:()=>B&&w(j+.5),onFocus:()=>B&&w(j+.5),onBlur:()=>w(null),onClick:()=>S(j+.5)}),e.jsx("button",{type:"button",className:`nice-rate__zone ${a?"nice-rate__zone--right":""}`,"aria-label":f("rate.rate","Rate {i}").replace("{i}",String(j+1)),disabled:!B,onMouseEnter:()=>B&&w(j+1),onFocus:()=>B&&w(j+1),onBlur:()=>w(null),onClick:()=>S(j+1)})]},j)})})};process.env.NODE_ENV!=="production"&&(vh.displayName="NiceRate");const xh=({accept:t,multiple:n=!1,disabled:i=!1,capture:a,children:s,onChange:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=r.useRef(null),x=r.useCallback(()=>{i||u.current?.click()},[i]);return e.jsxs("span",{className:`nice-file-picker ${i?"nice-file-picker--disabled":""} ${c}`,style:d,"data-testid":m??p,children:[e.jsx("button",{type:"button",className:"nice-file-picker__trigger",onClick:x,disabled:i,children:s??h("filePicker.label","Choose file")}),e.jsx("input",{ref:u,type:"file",accept:t,multiple:n,capture:a,disabled:i,className:"nice-file-picker__input",style:wE,onChange:f=>{f.target.files&&f.target.files.length>0&&o?.(f.target.files)}})]})};process.env.NODE_ENV!=="production"&&(xh.displayName="NiceFilePicker");const wE={position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0},yh=({value:t,defaultValue:n,onChange:i,onSearch:a,getSuggestions:s,recentSearches:o,placeholder:c,disabled:d=!1,size:p="md",className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),[b,g]=l.useControllableState({value:t,defaultValue:n,fallbackValue:"",onChange:i,componentName:"NiceSearchInput"}),[v,y]=r.useState(!1),[C,w]=r.useState(-1),E=r.useId(),[S,N]=r.useState([]),_=r.useRef(0);r.useEffect(()=>{if(!s)return;if(!b){N([]);return}const I=++_.current;s(b).then(D=>{I===_.current&&N(D)})},[b,s]);const k=v&&!b&&(o?.length??0)>0,j=v&&b.length>0&&S.length>0,T=k?o.map(I=>({id:I,label:I})):j?S:[],P=r.useCallback(I=>{const D=T[I];if(!D)return;const M=typeof D.label=="string"?D.label:String(D.id);g(M),a?.(M),y(!1)},[T,g,a]),B=I=>{I.key==="ArrowDown"?(I.preventDefault(),w(D=>T.length===0?-1:(D+1)%T.length)):I.key==="ArrowUp"?(I.preventDefault(),w(D=>T.length===0?-1:(D-1+T.length)%T.length)):I.key==="Enter"?(I.preventDefault(),C>=0?P(C):(a?.(b),y(!1))):I.key==="Escape"&&y(!1)},R=r.useRef(null);return l.useIntent(["navigate","activate"],I=>{if(I.source==="keyboard")return!1;if(I.intent==="activate"){if(C<0)return!1;P(C);return}if(I.direction!=="up"&&I.direction!=="down")return!1;const D=I.direction==="down"?1:-1;w(M=>(M+D+T.length)%T.length)},{ref:R,enabled:T.length>0}),e.jsxs("div",{ref:R,className:`nice-search-input nice-search-input--${p} ${v?"nice-search-input--open":""} ${m}`,style:h,"data-testid":x??u,children:[e.jsx("input",{type:"search",role:"combobox","aria-expanded":v,"aria-controls":E,"aria-activedescendant":v&&C>=0?`${E}-${C}`:void 0,"aria-autocomplete":"list",className:"nice-search-input__field",value:b,placeholder:c??f("searchInput.placeholder","Search..."),disabled:d,onChange:I=>{g(I.target.value),y(!0),w(-1)},onFocus:()=>y(!0),onBlur:()=>{setTimeout(()=>y(!1),150)},onKeyDown:B}),(k||j)&&e.jsx("ul",{id:E,role:"listbox",className:"nice-search-input__list",children:T.map((I,D)=>e.jsxs("li",{id:`${E}-${D}`,role:"option","aria-selected":D===C,className:`nice-search-input__item ${D===C?"nice-search-input__item--active":""}`,onMouseEnter:()=>w(D),onMouseDown:M=>{M.preventDefault(),P(D)},children:[e.jsx("span",{className:"nice-search-input__label",children:I.label}),I.hint&&e.jsx("span",{className:"nice-search-input__hint",children:I.hint})]},I.id))})]})};process.env.NODE_ENV!=="production"&&(yh.displayName="NiceSearchInput");const Nh=({value:t,defaultValue:n,onChange:i,suggestions:a,maxTags:s,allowDuplicates:o=!1,separator:c=",",placeholder:d,disabled:p=!1,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),[b,g]=l.useControllableState({value:t,defaultValue:n,fallbackValue:[],onChange:i,componentName:"NiceTagInput"}),[v,y]=r.useState(""),C=r.useRef(null),w=r.useCallback(M=>{const O=[];for(const L of M){const V=L.trim();if(V&&!(!o&&[...b,...O].includes(V))){if(s!==void 0&&b.length+O.length>=s)break;O.push(V)}}O.length!==0&&g([...b,...O])},[b,o,s,g]),E=r.useCallback(M=>{g(b.filter((O,L)=>L!==M))},[b,g]),S=()=>{v.trim()&&(w([v]),y(""))},N=(()=>{if(!a||!v)return[];const M=v.toLowerCase();return a.filter(O=>O.toLowerCase().includes(M)&&!b.includes(O)).slice(0,8)})(),[_,k]=r.useState(-1);r.useEffect(()=>k(-1),[v]);const j=r.useRef(null),P=`${r.useId()}-suggestions`,B=M=>{w([M]),y(""),C.current?.focus()},R=M=>{const O=N.length;k(L=>O===0?-1:((L+M)%O+O)%O)};l.useIntent(["navigate","activate"],M=>{if(M.source==="keyboard")return!1;if(M.intent==="activate"){const O=N[_];if(!O)return!1;B(O);return}if(M.direction!=="up"&&M.direction!=="down")return!1;R(M.direction==="down"?1:-1)},{ref:j,enabled:N.length>0});const I=M=>{N.length>0&&(M.key==="ArrowDown"||M.key==="ArrowUp")?(M.preventDefault(),R(M.key==="ArrowDown"?1:-1)):M.key==="Escape"&&_>=0?(M.preventDefault(),k(-1)):M.key==="Enter"&&N[_]?(M.preventDefault(),B(N[_])):M.key==="Enter"||M.key===c?(M.preventDefault(),S()):M.key==="Backspace"&&v===""&&b.length>0&&(M.preventDefault(),E(b.length-1))},D=M=>{const O=M.clipboardData.getData("text");O.includes(c)&&(M.preventDefault(),w(O.split(c)),y(""))};return e.jsxs("div",{role:"presentation",ref:j,className:`nice-tag-input ${p?"nice-tag-input--disabled":""} ${m}`,style:h,"data-testid":x??u,onClick:()=>C.current?.focus(),children:[e.jsxs("ul",{className:"nice-tag-input__tags",role:"list",children:[b.map((M,O)=>e.jsxs("li",{className:"nice-tag-input__tag",children:[e.jsx("span",{className:"nice-tag-input__tag-label",children:M}),e.jsx("button",{type:"button",className:"nice-tag-input__tag-remove","aria-label":f("tagInput.remove","Remove tag"),disabled:p,onClick:L=>{L.stopPropagation(),E(O)},children:e.jsx(l.NiceIcon,{name:"close",size:14})})]},`${M}-${O}`)),e.jsx("li",{className:"nice-tag-input__draft",children:e.jsx("input",{ref:C,type:"text",className:"nice-tag-input__input",value:v,placeholder:b.length===0?d:void 0,disabled:p||s!==void 0&&b.length>=s,onChange:M=>y(M.target.value),onKeyDown:I,onPaste:D,onBlur:S,...a?.length?{role:"combobox","aria-autocomplete":"list","aria-expanded":N.length>0,"aria-controls":N.length>0?P:void 0,"aria-activedescendant":N[_]?`${P}-${_}`:void 0}:{}})})]}),N.length>0&&e.jsx("ul",{id:P,className:"nice-tag-input__suggestions",role:"listbox",children:N.map((M,O)=>e.jsx("li",{id:`${P}-${O}`,role:"option","aria-selected":O===_,className:`nice-tag-input__suggestion${O===_?" nice-tag-input__suggestion--active":""}`,onMouseEnter:()=>k(O),onMouseDown:L=>{L.preventDefault(),B(M)},children:M},M))})]})};process.env.NODE_ENV!=="production"&&(Nh.displayName="NiceTagInput");const kE=[],_h=({open:t,images:n=kE,index:i,defaultIndex:a=0,onIndexChange:s,onClose:o,zoom:c=!0,download:d=!1,counter:p=!0,className:m="",style:h,testId:u,"data-testid":x})=>{const{t:f}=l.useNiceTranslation(),b=i!==void 0,[g,v]=r.useState(a),y=b?i:g,[C,w]=r.useState(1),E=r.useCallback(B=>{const R=Math.max(0,Math.min(n.length-1,B));b||v(R),s?.(R),w(1)},[n.length,b,s]),S=r.useCallback(()=>E(y-1),[y,E]),N=r.useCallback(()=>E(y+1),[y,E]);r.useEffect(()=>{t&&w(1)},[t]);const _=r.useRef(null),k=t&&n.length>0;l.useOverlayFocus(_,{open:k,onClose:o});const j=r.useCallback(B=>{w(R=>Math.min(4,Math.max(1,R+B)))},[]),T=B=>{if(B.key==="ArrowLeft")S();else if(B.key==="ArrowRight")N();else if(c&&(B.key==="+"||B.key==="="))j(.25);else if(c&&B.key==="-")j(-.25);else return;B.preventDefault()};if(l.useIntent(["sectionPrev","sectionNext","pagePrev","pageNext"],B=>{if(B.intent==="sectionPrev")S();else if(B.intent==="sectionNext")N();else{if(!c||B.source==="keyboard")return!1;j(B.intent==="pageNext"?.25:-.25)}},{ref:_,enabled:k}),l.useInputHints(_,k&&n.length>1?[{intent:"sectionPrev",label:f("lightbox.previous","Previous image")},{intent:"sectionNext",label:f("lightbox.next","Next image")},...c?[{intent:"pageNext",label:f("lightbox.zoomIn","Zoom in")},{intent:"pagePrev",label:f("lightbox.zoomOut","Zoom out")}]:[]]:[]),!k)return null;const P=n[y];return e.jsxs("div",{ref:_,className:`nice-lightbox ${m}`,style:h,role:"dialog","aria-modal":"true","aria-label":f("lightbox.aria","Image viewer"),"data-testid":x??u,onClick:B=>{B.target===B.currentTarget&&o()},onKeyDown:T,children:[e.jsxs("div",{className:"nice-lightbox__toolbar",children:[p&&e.jsxs("span",{className:"nice-lightbox__counter","aria-live":"polite",children:[y+1," / ",n.length]}),e.jsx("div",{className:"nice-lightbox__toolbar-spacer"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"nice-lightbox__btn","aria-label":f("lightbox.zoomOut","Zoom out"),onClick:()=>w(B=>Math.max(1,B-.25)),disabled:C<=1,children:e.jsx(l.NiceIcon,{name:"minus",size:16})}),e.jsx("button",{type:"button",className:"nice-lightbox__btn","aria-label":f("lightbox.zoomIn","Zoom in"),onClick:()=>w(B=>Math.min(4,B+.25)),disabled:C>=4,children:e.jsx(l.NiceIcon,{name:"plus",size:16})})]}),d&&e.jsx("a",{className:"nice-lightbox__btn",href:P.downloadUrl??P.src,download:!0,"aria-label":f("lightbox.download","Download"),children:e.jsx(l.NiceIcon,{name:"download",size:16})}),e.jsx("button",{type:"button",className:"nice-lightbox__btn nice-lightbox__btn--close","aria-label":f("lightbox.close","Close"),onClick:o,children:e.jsx(l.NiceIcon,{name:"close",size:16})})]}),n.length>1&&e.jsx("button",{type:"button",className:"nice-lightbox__nav nice-lightbox__nav--prev","aria-label":f("lightbox.previous","Previous image"),onClick:S,disabled:y===0,children:e.jsx(l.NiceIcon,{name:"chevron-left",size:20})}),e.jsxs("div",{className:"nice-lightbox__stage",children:[e.jsx("img",{src:P.src,alt:P.alt,className:"nice-lightbox__image",style:{transform:`scale(${C})`}}),P.caption&&e.jsx("div",{className:"nice-lightbox__caption",children:P.caption})]}),n.length>1&&e.jsx("button",{type:"button",className:"nice-lightbox__nav nice-lightbox__nav--next","aria-label":f("lightbox.next","Next image"),onClick:N,disabled:y===n.length-1,children:e.jsx(l.NiceIcon,{name:"chevron-right",size:20})})]})};process.env.NODE_ENV!=="production"&&(_h.displayName="NiceLightbox");const CE=[];function SE(t){const n=t.split("+").map(i=>i.trim().toLowerCase());return{ctrl:n.includes("ctrl"),meta:n.includes("meta")||n.includes("cmd"),shift:n.includes("shift"),alt:n.includes("alt")||n.includes("option"),key:n.find(i=>!["ctrl","meta","cmd","shift","alt","option"].includes(i))??""}}const jh=({commands:t=CE,open:n,onOpenChange:i,onCommand:a,placeholder:s,shortcut:o,className:c="",style:d,testId:p,"data-testid":m})=>{const{t:h}=l.useNiceTranslation(),u=n!==void 0,[x,f]=r.useState(!0),b=u?n:x,g=r.useCallback(I=>{u||f(I),i?.(I)},[u,i]),[v,y]=r.useState(""),C=r.useRef(null),w=r.useRef(null),E=r.useId(),S=`${E}-list`;r.useEffect(()=>{if(!o)return;const I=SE(o),D=M=>{M.ctrlKey===I.ctrl&&M.metaKey===I.meta&&M.shiftKey===I.shift&&M.altKey===I.alt&&M.key.toLowerCase()===I.key&&(M.preventDefault(),g(!0))};return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[o,g]),l.useOverlayFocus(w,{open:b,modal:!1,initialFocus:C,onClose:()=>g(!1)});const N=r.useMemo(()=>{if(!v)return t;const I=v.toLowerCase();return t.filter(D=>!!(D.label.toLowerCase().includes(I)||D.keywords?.some(M=>M.toLowerCase().includes(I))))},[t,v]),_=r.useMemo(()=>{const I=new Map;for(const D of N){const M=D.category??"";I.has(M)||I.set(M,[]),I.get(M).push(D)}return Array.from(I.entries())},[N]),k=r.useMemo(()=>_.flatMap(([,I])=>I.filter(D=>!D.disabled)),[_]),j=r.useCallback(I=>{I.onRun?.(),a?.(I),g(!1)},[a,g]),{activeIndex:T,setActiveIndex:P,handleKeyDown:B}=Vt.useListKeyboardNav(k,{open:b,onSelect:I=>j(I),loop:!0,intentRef:w});if(l.useInputHints(w,b?[{intent:"navigate",label:h("commandPalette.choose","Choose")},{intent:"activate",label:h("commandPalette.run","Run")}]:[]),!b)return null;const R=k[T];return e.jsxs("div",{ref:w,className:`nice-command-bar ${c}`,style:d,role:"dialog","aria-modal":"false","data-testid":m??p,children:[e.jsx("input",{ref:C,type:"text",role:"combobox","aria-expanded":"true","aria-autocomplete":"list","aria-controls":S,"aria-activedescendant":R?`${E}-opt-${R.id}`:void 0,className:"nice-command-bar__search",value:v,placeholder:s??h("commandBar.placeholder","Type a command..."),onChange:I=>{y(I.target.value),P(0)},onKeyDown:B}),e.jsxs("ul",{id:S,role:"listbox",className:"nice-command-bar__list",children:[_.map(([I,D])=>e.jsxs(r.Fragment,{children:[I&&e.jsx("li",{className:"nice-command-bar__category","aria-hidden":"true",children:I}),D.map(M=>{const O=k.indexOf(M),L=O===T;return e.jsxs("li",{id:`${E}-opt-${M.id}`,role:"option","aria-selected":L,"aria-disabled":M.disabled||void 0,className:`nice-command-bar__item ${L?"nice-command-bar__item--active":""} ${M.disabled?"nice-command-bar__item--disabled":""}`,onMouseEnter:()=>!M.disabled&&P(Math.max(0,O)),onMouseDown:V=>{V.preventDefault(),M.disabled||j(M)},children:[M.icon&&e.jsx("span",{className:"nice-command-bar__icon",children:M.icon}),e.jsx("span",{className:"nice-command-bar__label",children:M.label}),M.hint&&e.jsx("span",{className:"nice-command-bar__hint",children:M.hint}),M.shortcut&&e.jsx("kbd",{className:"nice-command-bar__shortcut",children:M.shortcut})]},M.id)})]},I||"_")),k.length===0&&e.jsx("li",{className:"nice-command-bar__empty","aria-live":"polite",children:h("commandBar.empty","No commands found")})]})]})};process.env.NODE_ENV!=="production"&&(jh.displayName="NiceCommandBar");Object.defineProperty(exports,"ANIMATION_VALUES",{enumerable:!0,get:()=>l.ANIMATION_VALUES});Object.defineProperty(exports,"BatchOperations",{enumerable:!0,get:()=>l.BatchOperations});Object.defineProperty(exports,"COMMON_SHORTCUTS",{enumerable:!0,get:()=>l.COMMON_SHORTCUTS});Object.defineProperty(exports,"ColumnFormulas",{enumerable:!0,get:()=>l.ColumnFormulas});Object.defineProperty(exports,"DEFAULT_VARIANT_CONFIG",{enumerable:!0,get:()=>l.DEFAULT_VARIANT_CONFIG});Object.defineProperty(exports,"DENSITY_VALUES",{enumerable:!0,get:()=>l.DENSITY_VALUES});Object.defineProperty(exports,"IndexedDBAdapter",{enumerable:!0,get:()=>l.IndexedDBAdapter});Object.defineProperty(exports,"LeakDetectorStatus",{enumerable:!0,get:()=>l.LeakDetectorStatus});Object.defineProperty(exports,"LocalStorageAdapter",{enumerable:!0,get:()=>l.LocalStorageAdapter});Object.defineProperty(exports,"NICE_BREAKPOINTS",{enumerable:!0,get:()=>l.NICE_BREAKPOINTS});Object.defineProperty(exports,"NICE_BUILTIN_ICONS",{enumerable:!0,get:()=>l.NICE_BUILTIN_ICONS});Object.defineProperty(exports,"NICE_DISPLAY_STYLES",{enumerable:!0,get:()=>l.NICE_DISPLAY_STYLES});Object.defineProperty(exports,"NICE_DISPLAY_STYLE_INFO",{enumerable:!0,get:()=>l.NICE_DISPLAY_STYLE_INFO});Object.defineProperty(exports,"NICE_INPUT_DEFAULTS",{enumerable:!0,get:()=>l.NICE_INPUT_DEFAULTS});Object.defineProperty(exports,"NICE_INTENTS",{enumerable:!0,get:()=>l.NICE_INTENTS});Object.defineProperty(exports,"NICE_INTENT_EVENT",{enumerable:!0,get:()=>l.NICE_INTENT_EVENT});Object.defineProperty(exports,"NICE_THEME_ARCHIVE",{enumerable:!0,get:()=>l.NICE_THEME_ARCHIVE});Object.defineProperty(exports,"NICE_THEME_CURATED",{enumerable:!0,get:()=>l.NICE_THEME_CURATED});Object.defineProperty(exports,"NICE_THEME_CURATED_PACKS",{enumerable:!0,get:()=>l.NICE_THEME_CURATED_PACKS});Object.defineProperty(exports,"NICE_THEME_DEFAULT",{enumerable:!0,get:()=>l.NICE_THEME_DEFAULT});Object.defineProperty(exports,"NICE_THEME_GALLERY",{enumerable:!0,get:()=>l.NICE_THEME_GALLERY});Object.defineProperty(exports,"NICE_THEME_PACKS",{enumerable:!0,get:()=>l.NICE_THEME_PACKS});Object.defineProperty(exports,"NICE_THEME_PACK_FONT_LINKS",{enumerable:!0,get:()=>l.NICE_THEME_PACK_FONT_LINKS});Object.defineProperty(exports,"NICE_THEME_PACK_FONT_LINKS_EXTENDED",{enumerable:!0,get:()=>l.NICE_THEME_PACK_FONT_LINKS_EXTENDED});Object.defineProperty(exports,"NICE_THEME_PACK_LIST",{enumerable:!0,get:()=>l.NICE_THEME_PACK_LIST});Object.defineProperty(exports,"NICE_THEME_PACK_LIST_EXTENDED",{enumerable:!0,get:()=>l.NICE_THEME_PACK_LIST_EXTENDED});Object.defineProperty(exports,"NICE_THEME_PRESETS",{enumerable:!0,get:()=>l.NICE_THEME_PRESETS});Object.defineProperty(exports,"NiceA11yProvider",{enumerable:!0,get:()=>l.NiceA11yProvider});Object.defineProperty(exports,"NiceAIProvider",{enumerable:!0,get:()=>l.NiceAIProvider});Object.defineProperty(exports,"NiceAccessControl",{enumerable:!0,get:()=>l.NiceAccessControl});Object.defineProperty(exports,"NiceButtonPrompt",{enumerable:!0,get:()=>l.NiceButtonPrompt});Object.defineProperty(exports,"NiceDataCache",{enumerable:!0,get:()=>l.NiceDataCache});Object.defineProperty(exports,"NiceDisplayStyleContext",{enumerable:!0,get:()=>l.NiceDisplayStyleContext});Object.defineProperty(exports,"NiceFieldStatus",{enumerable:!0,get:()=>l.NiceFieldStatus});Object.defineProperty(exports,"NiceFocusScope",{enumerable:!0,get:()=>l.NiceFocusScope});Object.defineProperty(exports,"NiceFocusable",{enumerable:!0,get:()=>l.NiceFocusable});Object.defineProperty(exports,"NiceHelpIcon",{enumerable:!0,get:()=>l.NiceHelpIcon});Object.defineProperty(exports,"NiceHelpProvider",{enumerable:!0,get:()=>l.NiceHelpProvider});Object.defineProperty(exports,"NiceI18nLazyProvider",{enumerable:!0,get:()=>l.NiceI18nLazyProvider});Object.defineProperty(exports,"NiceI18nProvider",{enumerable:!0,get:()=>l.NiceI18nProvider});Object.defineProperty(exports,"NiceIcon",{enumerable:!0,get:()=>l.NiceIcon});Object.defineProperty(exports,"NiceIconProvider",{enumerable:!0,get:()=>l.NiceIconProvider});Object.defineProperty(exports,"NiceInlineHelp",{enumerable:!0,get:()=>l.NiceInlineHelp});Object.defineProperty(exports,"NiceInputHintBar",{enumerable:!0,get:()=>l.NiceInputHintBar});Object.defineProperty(exports,"NiceInputProvider",{enumerable:!0,get:()=>l.NiceInputProvider});Object.defineProperty(exports,"NiceKeyCap",{enumerable:!0,get:()=>l.NiceKeyCap});Object.defineProperty(exports,"NiceKeyboardHint",{enumerable:!0,get:()=>l.NiceKeyboardHint});Object.defineProperty(exports,"NicePortalTargetProvider",{enumerable:!0,get:()=>l.NicePortalTargetProvider});Object.defineProperty(exports,"NicePreferencesPanel",{enumerable:!0,get:()=>l.NicePreferencesPanel});Object.defineProperty(exports,"NiceProfiler",{enumerable:!0,get:()=>l.NiceProfiler});Object.defineProperty(exports,"NicePullToRefresh",{enumerable:!0,get:()=>l.NicePullToRefresh});Object.defineProperty(exports,"NiceQuickHelp",{enumerable:!0,get:()=>l.NiceQuickHelp});Object.defineProperty(exports,"NiceRTLProvider",{enumerable:!0,get:()=>l.NiceRTLProvider});Object.defineProperty(exports,"NiceRequestDeduplicator",{enumerable:!0,get:()=>l.NiceRequestDeduplicator});Object.defineProperty(exports,"NiceSkipLink",{enumerable:!0,get:()=>l.NiceSkipLink});Object.defineProperty(exports,"NiceSpatialNavProvider",{enumerable:!0,get:()=>l.NiceSpatialNavProvider});Object.defineProperty(exports,"NiceStateIO",{enumerable:!0,get:()=>l.NiceStateIO});Object.defineProperty(exports,"NiceSwipeableListItem",{enumerable:!0,get:()=>l.NiceSwipeableListItem});Object.defineProperty(exports,"NiceTestWrapper",{enumerable:!0,get:()=>l.NiceTestWrapper});Object.defineProperty(exports,"NiceThemeContext",{enumerable:!0,get:()=>l.NiceThemeContext});Object.defineProperty(exports,"NiceThemeProvider",{enumerable:!0,get:()=>l.NiceThemeProvider});Object.defineProperty(exports,"NiceThemeVariantConfigurator",{enumerable:!0,get:()=>l.NiceThemeVariantConfigurator});Object.defineProperty(exports,"NiceThemeVariantProvider",{enumerable:!0,get:()=>l.NiceThemeVariantProvider});Object.defineProperty(exports,"NiceTouchTarget",{enumerable:!0,get:()=>l.NiceTouchTarget});Object.defineProperty(exports,"NiceTutorialButton",{enumerable:!0,get:()=>l.NiceTutorialButton});Object.defineProperty(exports,"NiceTutorialsProvider",{enumerable:!0,get:()=>l.NiceTutorialsProvider});Object.defineProperty(exports,"NiceUserPreferencesProvider",{enumerable:!0,get:()=>l.NiceUserPreferencesProvider});Object.defineProperty(exports,"NiceVisuallyHidden",{enumerable:!0,get:()=>l.NiceVisuallyHidden});Object.defineProperty(exports,"PRIVACY_LEVEL_ORDER",{enumerable:!0,get:()=>l.PRIVACY_LEVEL_ORDER});Object.defineProperty(exports,"ProfilerOverlay",{enumerable:!0,get:()=>l.ProfilerOverlay});Object.defineProperty(exports,"RADIUS_VALUES",{enumerable:!0,get:()=>l.RADIUS_VALUES});Object.defineProperty(exports,"RestAPISyncAdapter",{enumerable:!0,get:()=>l.RestAPISyncAdapter});Object.defineProperty(exports,"SHADOW_DARK_MODE_VALUES",{enumerable:!0,get:()=>l.SHADOW_DARK_MODE_VALUES});Object.defineProperty(exports,"SHADOW_VALUES",{enumerable:!0,get:()=>l.SHADOW_VALUES});Object.defineProperty(exports,"StorageAdapter",{enumerable:!0,get:()=>l.StorageAdapter});Object.defineProperty(exports,"THEME_DEFAULT_LINKS",{enumerable:!0,get:()=>l.THEME_DEFAULT_LINKS});Object.defineProperty(exports,"THEME_HEADER_CURVE",{enumerable:!0,get:()=>l.THEME_HEADER_CURVE});Object.defineProperty(exports,"THEME_HIGHLIGHT_CURVE",{enumerable:!0,get:()=>l.THEME_HIGHLIGHT_CURVE});Object.defineProperty(exports,"THEME_SURFACE_PATHS",{enumerable:!0,get:()=>l.THEME_SURFACE_PATHS});Object.defineProperty(exports,"TRACELESS_MODE_PRESETS",{enumerable:!0,get:()=>l.TRACELESS_MODE_PRESETS});Object.defineProperty(exports,"VARIANT_PRESETS",{enumerable:!0,get:()=>l.VARIANT_PRESETS});Object.defineProperty(exports,"ValidationRules",{enumerable:!0,get:()=>l.ValidationRules});Object.defineProperty(exports,"accessModeAttrs",{enumerable:!0,get:()=>l.accessModeAttrs});Object.defineProperty(exports,"aggregate",{enumerable:!0,get:()=>l.aggregate});Object.defineProperty(exports,"applyTheme",{enumerable:!0,get:()=>l.applyTheme});Object.defineProperty(exports,"applyVariantConfig",{enumerable:!0,get:()=>l.applyVariantConfig});Object.defineProperty(exports,"applyVariantsToTheme",{enumerable:!0,get:()=>l.applyVariantsToTheme});Object.defineProperty(exports,"auditStorageCompliance",{enumerable:!0,get:()=>l.auditStorageCompliance});Object.defineProperty(exports,"auditWCAG22AAA",{enumerable:!0,get:()=>l.auditWCAG22AAA});Object.defineProperty(exports,"buildAriaDescribedBy",{enumerable:!0,get:()=>l.buildAriaDescribedBy});Object.defineProperty(exports,"buildFormFieldAria",{enumerable:!0,get:()=>l.buildFormFieldAria});Object.defineProperty(exports,"calculateDataDiff",{enumerable:!0,get:()=>l.calculateDataDiff});Object.defineProperty(exports,"checkAriaCompliance",{enumerable:!0,get:()=>l.checkAriaCompliance});Object.defineProperty(exports,"checkContrastAAA",{enumerable:!0,get:()=>l.checkContrastAAA});Object.defineProperty(exports,"checkRegression",{enumerable:!0,get:()=>l.checkRegression});Object.defineProperty(exports,"clearLeakReports",{enumerable:!0,get:()=>l.clearLeakReports});Object.defineProperty(exports,"clearProfilingData",{enumerable:!0,get:()=>l.clearProfilingData});Object.defineProperty(exports,"clickOnActivationKey",{enumerable:!0,get:()=>l.clickOnActivationKey});Object.defineProperty(exports,"colorSetSnapshot",{enumerable:!0,get:()=>l.colorSetSnapshot});Object.defineProperty(exports,"configureLeakDetector",{enumerable:!0,get:()=>l.configureLeakDetector});Object.defineProperty(exports,"configureProfiler",{enumerable:!0,get:()=>l.configureProfiler});Object.defineProperty(exports,"createArrayDataSource",{enumerable:!0,get:()=>l.createArrayDataSource});Object.defineProperty(exports,"createCustomDataSource",{enumerable:!0,get:()=>l.createCustomDataSource});Object.defineProperty(exports,"createGraphQLDataSource",{enumerable:!0,get:()=>l.createGraphQLDataSource});Object.defineProperty(exports,"createGraphQLSubscriptionSource",{enumerable:!0,get:()=>l.createGraphQLSubscriptionSource});Object.defineProperty(exports,"createICUTranslator",{enumerable:!0,get:()=>l.createICUTranslator});Object.defineProperty(exports,"createId",{enumerable:!0,get:()=>l.createId});Object.defineProperty(exports,"createIndexedDBDataSource",{enumerable:!0,get:()=>l.createIndexedDBDataSource});Object.defineProperty(exports,"createInfiniteScroll",{enumerable:!0,get:()=>l.createInfiniteScroll});Object.defineProperty(exports,"createMockDataSource",{enumerable:!0,get:()=>l.createMockDataSource});Object.defineProperty(exports,"createNavigationActions",{enumerable:!0,get:()=>l.createNavigationActions});Object.defineProperty(exports,"createNiceReduxMiddleware",{enumerable:!0,get:()=>l.createNiceReduxMiddleware});Object.defineProperty(exports,"createODataDataSource",{enumerable:!0,get:()=>l.createODataDataSource});Object.defineProperty(exports,"createOfflineFirstDataSource",{enumerable:!0,get:()=>l.createOfflineFirstDataSource});Object.defineProperty(exports,"createReactQueryAdapter",{enumerable:!0,get:()=>l.createReactQueryAdapter});Object.defineProperty(exports,"createRestDataSource",{enumerable:!0,get:()=>l.createRestDataSource});Object.defineProperty(exports,"createSSEDataSource",{enumerable:!0,get:()=>l.createSSEDataSource});Object.defineProperty(exports,"createSignalRDataSource",{enumerable:!0,get:()=>l.createSignalRDataSource});Object.defineProperty(exports,"createTabEscape",{enumerable:!0,get:()=>l.createTabEscape});Object.defineProperty(exports,"createURLStateManager",{enumerable:!0,get:()=>l.createURLStateManager});Object.defineProperty(exports,"createUserPreferencesStore",{enumerable:!0,get:()=>l.createUserPreferencesStore});Object.defineProperty(exports,"createWebSocketDataSource",{enumerable:!0,get:()=>l.createWebSocketDataSource});Object.defineProperty(exports,"createZustandAdapter",{enumerable:!0,get:()=>l.createZustandAdapter});Object.defineProperty(exports,"defaultValidationMessage",{enumerable:!0,get:()=>l.defaultValidationMessage});Object.defineProperty(exports,"deprecateProp",{enumerable:!0,get:()=>l.deprecateProp});Object.defineProperty(exports,"deprecateSymbol",{enumerable:!0,get:()=>l.deprecateSymbol});Object.defineProperty(exports,"deriveColorSet",{enumerable:!0,get:()=>l.deriveColorSet});Object.defineProperty(exports,"deserializeTheme",{enumerable:!0,get:()=>l.deserializeTheme});Object.defineProperty(exports,"detectGamepadFamily",{enumerable:!0,get:()=>l.detectGamepadFamily});Object.defineProperty(exports,"endMark",{enumerable:!0,get:()=>l.endMark});Object.defineProperty(exports,"evaluateValidation",{enumerable:!0,get:()=>l.evaluateValidation});Object.defineProperty(exports,"evaluateValidationRule",{enumerable:!0,get:()=>l.evaluateValidationRule});Object.defineProperty(exports,"filterGroupToWhere",{enumerable:!0,get:()=>l.filterGroupToWhere});Object.defineProperty(exports,"filterNiceThemePacksByTag",{enumerable:!0,get:()=>l.filterNiceThemePacksByTag});Object.defineProperty(exports,"forceGC",{enumerable:!0,get:()=>l.forceGC});Object.defineProperty(exports,"formatICU",{enumerable:!0,get:()=>l.formatICU});Object.defineProperty(exports,"formatShortcut",{enumerable:!0,get:()=>l.formatShortcut});Object.defineProperty(exports,"gamepadButtonLabel",{enumerable:!0,get:()=>l.gamepadButtonLabel});Object.defineProperty(exports,"gamepadGlyphName",{enumerable:!0,get:()=>l.gamepadGlyphName});Object.defineProperty(exports,"generateBadgeStyles",{enumerable:!0,get:()=>l.generateBadgeStyles});Object.defineProperty(exports,"generateButtonStyles",{enumerable:!0,get:()=>l.generateButtonStyles});Object.defineProperty(exports,"generateCardStyles",{enumerable:!0,get:()=>l.generateCardStyles});Object.defineProperty(exports,"generateFillStyles",{enumerable:!0,get:()=>l.generateFillStyles});Object.defineProperty(exports,"generateFormFieldsFromOpenAPI",{enumerable:!0,get:()=>l.generateFormFieldsFromSchema});Object.defineProperty(exports,"generateFromOpenAPI",{enumerable:!0,get:()=>l.generateFromOpenAPI});Object.defineProperty(exports,"generateGridColumnsFromOpenAPI",{enumerable:!0,get:()=>l.generateColumnsFromSchema});Object.defineProperty(exports,"generateInputStyles",{enumerable:!0,get:()=>l.generateInputStyles});Object.defineProperty(exports,"generatePaletteFromColor",{enumerable:!0,get:()=>l.generatePaletteFromColor});Object.defineProperty(exports,"generateTabStyles",{enumerable:!0,get:()=>l.generateTabStyles});Object.defineProperty(exports,"generateTableStyles",{enumerable:!0,get:()=>l.generateTableStyles});Object.defineProperty(exports,"generateToggleStyles",{enumerable:!0,get:()=>l.generateToggleStyles});Object.defineProperty(exports,"generateTooltipStyles",{enumerable:!0,get:()=>l.generateTooltipStyles});Object.defineProperty(exports,"generateTracelessComplianceReport",{enumerable:!0,get:()=>l.generateTracelessComplianceReport});Object.defineProperty(exports,"generateVariantCSS",{enumerable:!0,get:()=>l.generateVariantCSS});Object.defineProperty(exports,"getComponentStats",{enumerable:!0,get:()=>l.getComponentStats});Object.defineProperty(exports,"getComponentStyleFromConfig",{enumerable:!0,get:()=>l.getComponentStyleFromConfig});Object.defineProperty(exports,"getComputedTheme",{enumerable:!0,get:()=>l.getComputedTheme});Object.defineProperty(exports,"getDisplayStyleDataAttrs",{enumerable:!0,get:()=>l.getDisplayStyleDataAttrs});Object.defineProperty(exports,"getInputEngine",{enumerable:!0,get:()=>l.getInputEngine});Object.defineProperty(exports,"getLeakReports",{enumerable:!0,get:()=>l.getLeakReports});Object.defineProperty(exports,"getLeakSummary",{enumerable:!0,get:()=>l.getLeakSummary});Object.defineProperty(exports,"getNiceAnimationClass",{enumerable:!0,get:()=>l.getNiceAnimationClass});Object.defineProperty(exports,"getNiceThemePack",{enumerable:!0,get:()=>l.getNiceThemePack});Object.defineProperty(exports,"getPerformanceReport",{enumerable:!0,get:()=>l.getPerformanceReport});Object.defineProperty(exports,"getProfilingStats",{enumerable:!0,get:()=>l.getProfilingStats});Object.defineProperty(exports,"getRecentTimings",{enumerable:!0,get:()=>l.getRecentTimings});Object.defineProperty(exports,"getSlowRenders",{enumerable:!0,get:()=>l.getSlowRenders});Object.defineProperty(exports,"getThemeValue",{enumerable:!0,get:()=>l.getThemeValue});Object.defineProperty(exports,"getTracelessBadgeInfo",{enumerable:!0,get:()=>l.getTracelessBadgeInfo});Object.defineProperty(exports,"groupBy",{enumerable:!0,get:()=>l.groupBy});Object.defineProperty(exports,"groupByHierarchical",{enumerable:!0,get:()=>l.groupByHierarchical});Object.defineProperty(exports,"isRecordValid",{enumerable:!0,get:()=>l.isRecordValid});Object.defineProperty(exports,"loadNiceDictionary",{enumerable:!0,get:()=>l.loadNiceDictionary});Object.defineProperty(exports,"logicalProps",{enumerable:!0,get:()=>l.logicalProps});Object.defineProperty(exports,"matchesShortcut",{enumerable:!0,get:()=>l.matchesShortcut});Object.defineProperty(exports,"measureAsync",{enumerable:!0,get:()=>l.measureAsync});Object.defineProperty(exports,"measureSync",{enumerable:!0,get:()=>l.measureSync});Object.defineProperty(exports,"niceReduxActions",{enumerable:!0,get:()=>l.niceReduxActions});Object.defineProperty(exports,"niceReduxReducer",{enumerable:!0,get:()=>l.niceReduxReducer});Object.defineProperty(exports,"niceSelectors",{enumerable:!0,get:()=>l.niceSelectors});Object.defineProperty(exports,"niceStaggerDelay",{enumerable:!0,get:()=>l.niceStaggerDelay});Object.defineProperty(exports,"niceThemeBankingV2",{enumerable:!0,get:()=>l.niceThemeBankingV2});Object.defineProperty(exports,"niceThemeBlackTieGala",{enumerable:!0,get:()=>l.niceThemeBlackTieGala});Object.defineProperty(exports,"niceThemeBlue",{enumerable:!0,get:()=>l.niceThemeBlue});Object.defineProperty(exports,"niceThemeBootstrap",{enumerable:!0,get:()=>l.niceThemeBootstrap});Object.defineProperty(exports,"niceThemeDark",{enumerable:!0,get:()=>l.niceThemeDark});Object.defineProperty(exports,"niceThemeFluent",{enumerable:!0,get:()=>l.niceThemeFluent});Object.defineProperty(exports,"niceThemeFluentV2",{enumerable:!0,get:()=>l.niceThemeFluentV2});Object.defineProperty(exports,"niceThemeHighContrast",{enumerable:!0,get:()=>l.niceThemeHighContrast});Object.defineProperty(exports,"niceThemeLight",{enumerable:!0,get:()=>l.niceThemeLight});Object.defineProperty(exports,"niceThemeMaterial",{enumerable:!0,get:()=>l.niceThemeMaterial});Object.defineProperty(exports,"niceThemeMinimalism",{enumerable:!0,get:()=>l.niceThemeMinimalism});Object.defineProperty(exports,"niceThemeObsidianV2",{enumerable:!0,get:()=>l.niceThemeObsidianV2});Object.defineProperty(exports,"niceThemeOnyxV2",{enumerable:!0,get:()=>l.niceThemeOnyxV2});Object.defineProperty(exports,"niceThemeShadowV2",{enumerable:!0,get:()=>l.niceThemeShadowV2});Object.defineProperty(exports,"niceThemeSlateV2",{enumerable:!0,get:()=>l.niceThemeSlateV2});Object.defineProperty(exports,"parseThemeRef",{enumerable:!0,get:()=>l.parseThemeRef});Object.defineProperty(exports,"pivot",{enumerable:!0,get:()=>l.pivot});Object.defineProperty(exports,"printPerformanceReport",{enumerable:!0,get:()=>l.printPerformanceReport});Object.defineProperty(exports,"removeTheme",{enumerable:!0,get:()=>l.removeTheme});Object.defineProperty(exports,"renameThemeRef",{enumerable:!0,get:()=>l.renameThemeRef});Object.defineProperty(exports,"resolveCssColor",{enumerable:!0,get:()=>l.resolveCssColor});Object.defineProperty(exports,"resolveDisplayStyleConfig",{enumerable:!0,get:()=>l.resolveDisplayStyleConfig});Object.defineProperty(exports,"resolveStepsI18n",{enumerable:!0,get:()=>l.resolveStepsI18n});Object.defineProperty(exports,"resolveTheme",{enumerable:!0,get:()=>l.resolveTheme});Object.defineProperty(exports,"resolveThemeValue",{enumerable:!0,get:()=>l.resolveThemeValue});Object.defineProperty(exports,"resolveTracelessPolicy",{enumerable:!0,get:()=>l.resolveTracelessPolicy});Object.defineProperty(exports,"resolveTutorial",{enumerable:!0,get:()=>l.resolveTutorial});Object.defineProperty(exports,"saveBaseline",{enumerable:!0,get:()=>l.saveBaseline});Object.defineProperty(exports,"serializeTheme",{enumerable:!0,get:()=>l.serializeTheme});Object.defineProperty(exports,"setupReactDevToolsIntegration",{enumerable:!0,get:()=>l.setupReactDevToolsIntegration});Object.defineProperty(exports,"simulateKeyboard",{enumerable:!0,get:()=>l.simulateKeyboard});Object.defineProperty(exports,"simulateType",{enumerable:!0,get:()=>l.simulateType});Object.defineProperty(exports,"sortModelToOrderBy",{enumerable:!0,get:()=>l.sortModelToOrderBy});Object.defineProperty(exports,"startMark",{enumerable:!0,get:()=>l.startMark});Object.defineProperty(exports,"takeMemorySnapshot",{enumerable:!0,get:()=>l.takeMemorySnapshot});Object.defineProperty(exports,"testId",{enumerable:!0,get:()=>l.testId});Object.defineProperty(exports,"themeAbyss",{enumerable:!0,get:()=>l.themeAbyss});Object.defineProperty(exports,"themeAfricanEarth",{enumerable:!0,get:()=>l.themeAfricanEarth});Object.defineProperty(exports,"themeAmber",{enumerable:!0,get:()=>l.themeAmber});Object.defineProperty(exports,"themeArctic",{enumerable:!0,get:()=>l.themeArctic});Object.defineProperty(exports,"themeAurora",{enumerable:!0,get:()=>l.themeAurora});Object.defineProperty(exports,"themeAutumn",{enumerable:!0,get:()=>l.themeAutumn});Object.defineProperty(exports,"themeBanking",{enumerable:!0,get:()=>l.themeBanking});Object.defineProperty(exports,"themeBrazilianCarnival",{enumerable:!0,get:()=>l.themeBrazilianCarnival});Object.defineProperty(exports,"themeCarbon",{enumerable:!0,get:()=>l.themeCarbon});Object.defineProperty(exports,"themeCharcoal",{enumerable:!0,get:()=>l.themeCharcoal});Object.defineProperty(exports,"themeCherryBlossom",{enumerable:!0,get:()=>l.themeCherryBlossom});Object.defineProperty(exports,"themeChineseNewYear",{enumerable:!0,get:()=>l.themeChineseNewYear});Object.defineProperty(exports,"themeChristmas",{enumerable:!0,get:()=>l.themeChristmas});Object.defineProperty(exports,"themeCoffee",{enumerable:!0,get:()=>l.themeCoffee});Object.defineProperty(exports,"themeCoolGray",{enumerable:!0,get:()=>l.themeCoolGray});Object.defineProperty(exports,"themeCoral",{enumerable:!0,get:()=>l.themeCoral});Object.defineProperty(exports,"themeCosmos",{enumerable:!0,get:()=>l.themeCosmos});Object.defineProperty(exports,"themeCyan",{enumerable:!0,get:()=>l.themeCyan});Object.defineProperty(exports,"themeCyberpunk",{enumerable:!0,get:()=>l.themeCyberpunk});Object.defineProperty(exports,"themeDesert",{enumerable:!0,get:()=>l.themeDesert});Object.defineProperty(exports,"themeDracula",{enumerable:!0,get:()=>l.themeDracula});Object.defineProperty(exports,"themeEaster",{enumerable:!0,get:()=>l.themeEaster});Object.defineProperty(exports,"themeEclipse",{enumerable:!0,get:()=>l.themeEclipse});Object.defineProperty(exports,"themeEducation",{enumerable:!0,get:()=>l.themeEducation});Object.defineProperty(exports,"themeEmerald",{enumerable:!0,get:()=>l.themeEmerald});Object.defineProperty(exports,"themeEmeraldDark",{enumerable:!0,get:()=>l.themeEmeraldDark});Object.defineProperty(exports,"themeEnhancedContrast",{enumerable:!0,get:()=>l.themeEnhancedContrast});Object.defineProperty(exports,"themeEnterprise",{enumerable:!0,get:()=>l.themeEnterprise});Object.defineProperty(exports,"themeForest",{enumerable:!0,get:()=>l.themeForest});Object.defineProperty(exports,"themeFuchsia",{enumerable:!0,get:()=>l.themeFuchsia});Object.defineProperty(exports,"themeGlassmorphism",{enumerable:!0,get:()=>l.themeGlassmorphism});Object.defineProperty(exports,"themeGovernment",{enumerable:!0,get:()=>l.themeGovernment});Object.defineProperty(exports,"themeHalloween",{enumerable:!0,get:()=>l.themeHalloween});Object.defineProperty(exports,"themeHarvest",{enumerable:!0,get:()=>l.themeHarvest});Object.defineProperty(exports,"themeHealthcare",{enumerable:!0,get:()=>l.themeHealthcare});Object.defineProperty(exports,"themeHighContrastDark",{enumerable:!0,get:()=>l.themeHighContrastDark});Object.defineProperty(exports,"themeIndianFestive",{enumerable:!0,get:()=>l.themeIndianFestive});Object.defineProperty(exports,"themeIndigo",{enumerable:!0,get:()=>l.themeIndigo});Object.defineProperty(exports,"themeIvory",{enumerable:!0,get:()=>l.themeIvory});Object.defineProperty(exports,"themeJapaneseZen",{enumerable:!0,get:()=>l.themeJapaneseZen});Object.defineProperty(exports,"themeLargeText",{enumerable:!0,get:()=>l.themeLargeText});Object.defineProperty(exports,"themeLavender",{enumerable:!0,get:()=>l.themeLavender});Object.defineProperty(exports,"themeLegal",{enumerable:!0,get:()=>l.themeLegal});Object.defineProperty(exports,"themeLime",{enumerable:!0,get:()=>l.themeLime});Object.defineProperty(exports,"themeMediterranean",{enumerable:!0,get:()=>l.themeMediterranean});Object.defineProperty(exports,"themeMidnight",{enumerable:!0,get:()=>l.themeMidnight});Object.defineProperty(exports,"themeMinimalist",{enumerable:!0,get:()=>l.themeMinimalist});Object.defineProperty(exports,"themeMonochrome",{enumerable:!0,get:()=>l.themeMonochrome});Object.defineProperty(exports,"themeMonokai",{enumerable:!0,get:()=>l.themeMonokai});Object.defineProperty(exports,"themeMoroccan",{enumerable:!0,get:()=>l.themeMoroccan});Object.defineProperty(exports,"themeNebula",{enumerable:!0,get:()=>l.themeNebula});Object.defineProperty(exports,"themeNeon",{enumerable:!0,get:()=>l.themeNeon});Object.defineProperty(exports,"themeNeumorphismDark",{enumerable:!0,get:()=>l.themeNeumorphismDark});Object.defineProperty(exports,"themeNeumorphismLight",{enumerable:!0,get:()=>l.themeNeumorphismLight});Object.defineProperty(exports,"themeNord",{enumerable:!0,get:()=>l.themeNord});Object.defineProperty(exports,"themeObsidian",{enumerable:!0,get:()=>l.themeObsidian});Object.defineProperty(exports,"themeOcean",{enumerable:!0,get:()=>l.themeOcean});Object.defineProperty(exports,"themeOneDark",{enumerable:!0,get:()=>l.themeOneDark});Object.defineProperty(exports,"themeOnyx",{enumerable:!0,get:()=>l.themeOnyx});Object.defineProperty(exports,"themeOrange",{enumerable:!0,get:()=>l.themeOrange});Object.defineProperty(exports,"themePastelCoral",{enumerable:!0,get:()=>l.themePastelCoral});Object.defineProperty(exports,"themePastelLavender",{enumerable:!0,get:()=>l.themePastelLavender});Object.defineProperty(exports,"themePastelLemon",{enumerable:!0,get:()=>l.themePastelLemon});Object.defineProperty(exports,"themePastelMint",{enumerable:!0,get:()=>l.themePastelMint});Object.defineProperty(exports,"themePastelPeach",{enumerable:!0,get:()=>l.themePastelPeach});Object.defineProperty(exports,"themePastelRose",{enumerable:!0,get:()=>l.themePastelRose});Object.defineProperty(exports,"themePastelSage",{enumerable:!0,get:()=>l.themePastelSage});Object.defineProperty(exports,"themePastelSky",{enumerable:!0,get:()=>l.themePastelSky});Object.defineProperty(exports,"themePink",{enumerable:!0,get:()=>l.themePink});Object.defineProperty(exports,"themePreviewRoles",{enumerable:!0,get:()=>l.themePreviewRoles});Object.defineProperty(exports,"themeRealEstate",{enumerable:!0,get:()=>l.themeRealEstate});Object.defineProperty(exports,"themeRefsIn",{enumerable:!0,get:()=>l.themeRefsIn});Object.defineProperty(exports,"themeRefsOf",{enumerable:!0,get:()=>l.themeRefsOf});Object.defineProperty(exports,"themeRetrowave",{enumerable:!0,get:()=>l.themeRetrowave});Object.defineProperty(exports,"themeRose",{enumerable:!0,get:()=>l.themeRose});Object.defineProperty(exports,"themeRuby",{enumerable:!0,get:()=>l.themeRuby});Object.defineProperty(exports,"themeScandinavian",{enumerable:!0,get:()=>l.themeScandinavian});Object.defineProperty(exports,"themeSepia",{enumerable:!0,get:()=>l.themeSepia});Object.defineProperty(exports,"themeShadow",{enumerable:!0,get:()=>l.themeShadow});Object.defineProperty(exports,"themeSilver",{enumerable:!0,get:()=>l.themeSilver});Object.defineProperty(exports,"themeSky",{enumerable:!0,get:()=>l.themeSky});Object.defineProperty(exports,"themeSlate",{enumerable:!0,get:()=>l.themeSlate});Object.defineProperty(exports,"themeSoftDark",{enumerable:!0,get:()=>l.themeSoftDark});Object.defineProperty(exports,"themeSolarizedDark",{enumerable:!0,get:()=>l.themeSolarizedDark});Object.defineProperty(exports,"themeSolarizedLight",{enumerable:!0,get:()=>l.themeSolarizedLight});Object.defineProperty(exports,"themeSpring",{enumerable:!0,get:()=>l.themeSpring});Object.defineProperty(exports,"themeStone",{enumerable:!0,get:()=>l.themeStone});Object.defineProperty(exports,"themeSummerBeach",{enumerable:!0,get:()=>l.themeSummerBeach});Object.defineProperty(exports,"themeSunset",{enumerable:!0,get:()=>l.themeSunset});Object.defineProperty(exports,"themeSynthwave",{enumerable:!0,get:()=>l.themeSynthwave});Object.defineProperty(exports,"themeTeal",{enumerable:!0,get:()=>l.themeTeal});Object.defineProperty(exports,"themeTechStartup",{enumerable:!0,get:()=>l.themeTechStartup});Object.defineProperty(exports,"themeTerminalGreen",{enumerable:!0,get:()=>l.themeTerminalGreen});Object.defineProperty(exports,"themeToCssVars",{enumerable:!0,get:()=>l.themeToCssVars});Object.defineProperty(exports,"themeTropical",{enumerable:!0,get:()=>l.themeTropical});Object.defineProperty(exports,"themeValentine",{enumerable:!0,get:()=>l.themeValentine});Object.defineProperty(exports,"themeVaporwave",{enumerable:!0,get:()=>l.themeVaporwave});Object.defineProperty(exports,"themeVintage",{enumerable:!0,get:()=>l.themeVintage});Object.defineProperty(exports,"themeViolet",{enumerable:!0,get:()=>l.themeViolet});Object.defineProperty(exports,"themeWarmDark",{enumerable:!0,get:()=>l.themeWarmDark});Object.defineProperty(exports,"themeWarmGray",{enumerable:!0,get:()=>l.themeWarmGray});Object.defineProperty(exports,"themeWine",{enumerable:!0,get:()=>l.themeWine});Object.defineProperty(exports,"themeWinterFrost",{enumerable:!0,get:()=>l.themeWinterFrost});Object.defineProperty(exports,"themeZinc",{enumerable:!0,get:()=>l.themeZinc});Object.defineProperty(exports,"toAriaKeyShortcuts",{enumerable:!0,get:()=>l.toAriaKeyShortcuts});Object.defineProperty(exports,"toGamepadButton",{enumerable:!0,get:()=>l.toGamepadButton});Object.defineProperty(exports,"triggerHaptic",{enumerable:!0,get:()=>l.triggerHaptic});Object.defineProperty(exports,"triggerNiceAction",{enumerable:!0,get:()=>l.triggerNiceAction});Object.defineProperty(exports,"useAICompletion",{enumerable:!0,get:()=>l.useAICompletion});Object.defineProperty(exports,"useAdaptiveVariant",{enumerable:!0,get:()=>l.useAdaptiveVariant});Object.defineProperty(exports,"useBrandColors",{enumerable:!0,get:()=>l.useBrandColors});Object.defineProperty(exports,"useBreakpoint",{enumerable:!0,get:()=>l.useBreakpoint});Object.defineProperty(exports,"useChartPreferences",{enumerable:!0,get:()=>l.useChartPreferences});Object.defineProperty(exports,"useChartSuggestion",{enumerable:!0,get:()=>l.useChartSuggestion});Object.defineProperty(exports,"useClickOutside",{enumerable:!0,get:()=>l.useClickOutside});Object.defineProperty(exports,"useCodeCompletion",{enumerable:!0,get:()=>l.useCodeCompletion});Object.defineProperty(exports,"useCognitiveAccessibility",{enumerable:!0,get:()=>l.useCognitiveAccessibility});Object.defineProperty(exports,"useComponentDisplayClass",{enumerable:!0,get:()=>l.useComponentDisplayClass});Object.defineProperty(exports,"useComponentDisplayStyle",{enumerable:!0,get:()=>l.useComponentDisplayStyle});Object.defineProperty(exports,"useComponentHelp",{enumerable:!0,get:()=>l.useComponentHelp});Object.defineProperty(exports,"useConnectedGamepads",{enumerable:!0,get:()=>l.useConnectedGamepads});Object.defineProperty(exports,"useContainerSize",{enumerable:!0,get:()=>l.useContainerSize});Object.defineProperty(exports,"useControlId",{enumerable:!0,get:()=>l.useControlId});Object.defineProperty(exports,"useControlPreferences",{enumerable:!0,get:()=>l.useControlPreferences});Object.defineProperty(exports,"useControllableState",{enumerable:!0,get:()=>l.useControllableState});Object.defineProperty(exports,"useDarkMode",{enumerable:!0,get:()=>l.useDarkMode});Object.defineProperty(exports,"useDebouncedValue",{enumerable:!0,get:()=>l.useDebouncedValue});Object.defineProperty(exports,"useDevice",{enumerable:!0,get:()=>l.useDevice});Object.defineProperty(exports,"useDisplayAnimation",{enumerable:!0,get:()=>l.useDisplayAnimation});Object.defineProperty(exports,"useDisplayDensity",{enumerable:!0,get:()=>l.useDisplayDensity});Object.defineProperty(exports,"useEngage",{enumerable:!0,get:()=>l.useEngage});Object.defineProperty(exports,"useFocusManagement",{enumerable:!0,get:()=>l.useFocusManagement});Object.defineProperty(exports,"useFocusScope",{enumerable:!0,get:()=>l.useFocusScope});Object.defineProperty(exports,"useFocusTrap",{enumerable:!0,get:()=>l.useFocusTrap});Object.defineProperty(exports,"useFormGeneration",{enumerable:!0,get:()=>l.useFormGeneration});Object.defineProperty(exports,"useGamepad",{enumerable:!0,get:()=>l.useGamepad});Object.defineProperty(exports,"useGamepadFamily",{enumerable:!0,get:()=>l.useGamepadFamily});Object.defineProperty(exports,"useGridFocus",{enumerable:!0,get:()=>l.useGridFocus});Object.defineProperty(exports,"useGridPreferences",{enumerable:!0,get:()=>l.useGridPreferences});Object.defineProperty(exports,"useHaptic",{enumerable:!0,get:()=>l.useHaptic});Object.defineProperty(exports,"useHintsVisible",{enumerable:!0,get:()=>l.useHintsVisible});Object.defineProperty(exports,"useInputEngine",{enumerable:!0,get:()=>l.useInputEngine});Object.defineProperty(exports,"useInputHints",{enumerable:!0,get:()=>l.useInputHints});Object.defineProperty(exports,"useInputMethod",{enumerable:!0,get:()=>l.useInputMethod});Object.defineProperty(exports,"useInputMode",{enumerable:!0,get:()=>l.useInputMode});Object.defineProperty(exports,"useInputPreferences",{enumerable:!0,get:()=>l.useInputPreferences});Object.defineProperty(exports,"useInputState",{enumerable:!0,get:()=>l.useInputState});Object.defineProperty(exports,"useIntent",{enumerable:!0,get:()=>l.useIntent});Object.defineProperty(exports,"useIsTouchDevice",{enumerable:!0,get:()=>l.useIsTouchDevice});Object.defineProperty(exports,"useLiveAnnouncement",{enumerable:!0,get:()=>l.useLiveAnnouncement});Object.defineProperty(exports,"useLongPress",{enumerable:!0,get:()=>l.useLongPress});Object.defineProperty(exports,"useMeasureEffect",{enumerable:!0,get:()=>l.useMeasureEffect});Object.defineProperty(exports,"useMediaQuery",{enumerable:!0,get:()=>l.useMediaQuery});Object.defineProperty(exports,"useMemoryMonitor",{enumerable:!0,get:()=>l.useMemoryMonitor});Object.defineProperty(exports,"useMenuButton",{enumerable:!0,get:()=>l.useMenuButton});Object.defineProperty(exports,"useNaturalLanguageFilter",{enumerable:!0,get:()=>l.useNaturalLanguageFilter});Object.defineProperty(exports,"useNiceA11y",{enumerable:!0,get:()=>l.useNiceA11y});Object.defineProperty(exports,"useNiceAI",{enumerable:!0,get:()=>l.useNiceAI});Object.defineProperty(exports,"useNiceAccessMode",{enumerable:!0,get:()=>l.useNiceAccessMode});Object.defineProperty(exports,"useNiceAction",{enumerable:!0,get:()=>l.useNiceAction});Object.defineProperty(exports,"useNiceActions",{enumerable:!0,get:()=>l.useNiceActions});Object.defineProperty(exports,"useNiceCollapse",{enumerable:!0,get:()=>l.useNiceCollapse});Object.defineProperty(exports,"useNiceDataSource",{enumerable:!0,get:()=>l.useNiceDataSource});Object.defineProperty(exports,"useNiceDisplayStyle",{enumerable:!0,get:()=>l.useNiceDisplayStyle});Object.defineProperty(exports,"useNiceField",{enumerable:!0,get:()=>l.useNiceField});Object.defineProperty(exports,"useNiceFullscreen",{enumerable:!0,get:()=>l.useNiceFullscreen});Object.defineProperty(exports,"useNiceHelp",{enumerable:!0,get:()=>l.useNiceHelp});Object.defineProperty(exports,"useNiceIcon",{enumerable:!0,get:()=>l.useNiceIcon});Object.defineProperty(exports,"useNiceLookupSource",{enumerable:!0,get:()=>l.useNiceLookupSource});Object.defineProperty(exports,"useNiceRTL",{enumerable:!0,get:()=>l.useNiceRTL});Object.defineProperty(exports,"useNiceRecord",{enumerable:!0,get:()=>l.useNiceRecord});Object.defineProperty(exports,"useNiceTheme",{enumerable:!0,get:()=>l.useNiceTheme});Object.defineProperty(exports,"useNiceTransition",{enumerable:!0,get:()=>l.useNiceTransition});Object.defineProperty(exports,"useNiceTranslation",{enumerable:!0,get:()=>l.useNiceTranslation});Object.defineProperty(exports,"useNiceTutorials",{enumerable:!0,get:()=>l.useNiceTutorials});Object.defineProperty(exports,"useNiceTutorialsEnabled",{enumerable:!0,get:()=>l.useNiceTutorialsEnabled});Object.defineProperty(exports,"useOrientation",{enumerable:!0,get:()=>l.useOrientation});Object.defineProperty(exports,"useOverlayFocus",{enumerable:!0,get:()=>l.useOverlayFocus});Object.defineProperty(exports,"usePan",{enumerable:!0,get:()=>l.usePan});Object.defineProperty(exports,"usePinch",{enumerable:!0,get:()=>l.usePinch});Object.defineProperty(exports,"usePullToRefresh",{enumerable:!0,get:()=>l.usePullToRefresh});Object.defineProperty(exports,"useRenderCount",{enumerable:!0,get:()=>l.useRenderCount});Object.defineProperty(exports,"useResolvedDisplayStyle",{enumerable:!0,get:()=>l.useResolvedDisplayStyle});Object.defineProperty(exports,"useResponsiveValue",{enumerable:!0,get:()=>l.useResponsiveValue});Object.defineProperty(exports,"useRestoreFocus",{enumerable:!0,get:()=>l.useRestoreFocus});Object.defineProperty(exports,"useRouteAnnouncement",{enumerable:!0,get:()=>l.useRouteAnnouncement});Object.defineProperty(exports,"useRovingFocus",{enumerable:!0,get:()=>l.useRovingFocus});Object.defineProperty(exports,"useRovingTabIndex",{enumerable:!0,get:()=>l.useRovingTabIndex});Object.defineProperty(exports,"useSafeAbortController",{enumerable:!0,get:()=>l.useSafeAbortController});Object.defineProperty(exports,"useSafeAreaInsets",{enumerable:!0,get:()=>l.useSafeAreaInsets});Object.defineProperty(exports,"useSafeEventListener",{enumerable:!0,get:()=>l.useSafeEventListener});Object.defineProperty(exports,"useSafeFetch",{enumerable:!0,get:()=>l.useSafeFetch});Object.defineProperty(exports,"useSafeInterval",{enumerable:!0,get:()=>l.useSafeInterval});Object.defineProperty(exports,"useSafeState",{enumerable:!0,get:()=>l.useSafeState});Object.defineProperty(exports,"useSafeSubscription",{enumerable:!0,get:()=>l.useSafeSubscription});Object.defineProperty(exports,"useSafeTimeout",{enumerable:!0,get:()=>l.useSafeTimeout});Object.defineProperty(exports,"useSafeWebSocket",{enumerable:!0,get:()=>l.useSafeWebSocket});Object.defineProperty(exports,"useShowAt",{enumerable:!0,get:()=>l.useShowAt});Object.defineProperty(exports,"useSpatialFocusable",{enumerable:!0,get:()=>l.useSpatialFocusable});Object.defineProperty(exports,"useSpatialNav",{enumerable:!0,get:()=>l.useSpatialNav});Object.defineProperty(exports,"useSpatialNavOptional",{enumerable:!0,get:()=>l.useSpatialNavOptional});Object.defineProperty(exports,"useSubmitOnEnter",{enumerable:!0,get:()=>l.useSubmitOnEnter});Object.defineProperty(exports,"useSwipe",{enumerable:!0,get:()=>l.useSwipe});Object.defineProperty(exports,"useTextImprovement",{enumerable:!0,get:()=>l.useTextImprovement});Object.defineProperty(exports,"useThemeVariants",{enumerable:!0,get:()=>l.useThemeVariants});Object.defineProperty(exports,"useTreeFocus",{enumerable:!0,get:()=>l.useTreeFocus});Object.defineProperty(exports,"useUnmountLog",{enumerable:!0,get:()=>l.useUnmountLog});Object.defineProperty(exports,"useUserPreferences",{enumerable:!0,get:()=>l.useUserPreferences});Object.defineProperty(exports,"useVirtualKeyboard",{enumerable:!0,get:()=>l.useVirtualKeyboard});Object.defineProperty(exports,"useVoiceControl",{enumerable:!0,get:()=>l.useVoiceControl});Object.defineProperty(exports,"useWhyDidYouRender",{enumerable:!0,get:()=>l.useWhyDidYouRender});Object.defineProperty(exports,"validateData",{enumerable:!0,get:()=>l.validateData});Object.defineProperty(exports,"withCaching",{enumerable:!0,get:()=>l.withCaching});Object.defineProperty(exports,"withCalculatedColumns",{enumerable:!0,get:()=>l.withCalculatedColumns});Object.defineProperty(exports,"withCrossTabSync",{enumerable:!0,get:()=>l.withCrossTabSync});Object.defineProperty(exports,"withCursorPagination",{enumerable:!0,get:()=>l.withCursorPagination});Object.defineProperty(exports,"withLeakTracking",{enumerable:!0,get:()=>l.withLeakTracking});Object.defineProperty(exports,"withOptimisticUpdates",{enumerable:!0,get:()=>l.withOptimisticUpdates});Object.defineProperty(exports,"withPolling",{enumerable:!0,get:()=>l.withPolling});Object.defineProperty(exports,"withWhyDidYouRender",{enumerable:!0,get:()=>l.withWhyDidYouRender});Object.defineProperty(exports,"wouldCreateCycle",{enumerable:!0,get:()=>l.wouldCreateCycle});exports.TracelessProvider=Ft.TracelessProvider;exports.useCookieBannerVisibility=Ft.useCookieBannerVisibility;exports.useEditorStatePersistence=Ft.useEditorStatePersistence;exports.useGridStatePersistence=Ft.useGridStatePersistence;exports.usePersistedState=Ft.usePersistedState;exports.useResolvedStorageProps=Ft.useResolvedStorageProps;exports.useStorageAdapter=Ft.useStorageAdapter;exports.useStorageAudit=Ft.useStorageAudit;exports.useTracelessLocalStorage=Ft.useTracelessLocalStorage;exports.useTracelessPolicy=Ft.useTracelessPolicy;exports.useTracelessPolicySafe=Ft.useTracelessPolicySafe;exports.useTracelessSessionStorage=Ft.useTracelessSessionStorage;exports.useTracelessStorage=Ft.useTracelessStorage;exports.NICE_NO_CODE_STEP_TYPES=Oe.NICE_NO_CODE_STEP_TYPES;exports.NiceAPIFlow=Oe.NiceAPIFlow;exports.NiceCheckbox=Oe.NiceCheckbox;exports.NiceCodePreview=Oe.NiceCodePreview;exports.NiceCodeTemplate=Oe.NiceCodeTemplate;exports.NiceComponentDesigner=Oe.NiceComponentDesigner;exports.NiceDataMapper=Oe.NiceDataMapper;exports.NiceEventOrchestrator=Oe.NiceEventOrchestrator;exports.NiceLowCodeStudio=Oe.NiceLowCodeStudio;exports.NiceNoCodeScriptEditor=Oe.NiceNoCodeScriptEditor;exports.NiceNumberInput=Oe.NiceNumberInput;exports.NicePageBuilder=Oe.NicePageBuilder;exports.NiceSelect=Oe.NiceSelect;exports.NiceStateDesigner=Oe.NiceStateDesigner;exports.NiceTestBuilder=Oe.NiceTestBuilder;exports.NiceTextInput=Oe.NiceTextInput;exports.evaluateNoCodeExpression=Oe.evaluateNoCodeExpression;exports.newNoCodeStep=Oe.newNoCodeStep;exports.noCodeConditionsHold=Oe.noCodeConditionsHold;exports.noCodePath=Oe.noCodePath;exports.runNoCodeScript=Oe.runNoCodeScript;exports.validateNoCodeScript=Oe.validateNoCodeScript;exports.COUNTRIES=dt.COUNTRIES;exports.NiceAddress=dt.NiceAddress;exports.NiceAutocomplete=dt.NiceAutocomplete;exports.NiceCalendar=dt.NiceCalendar;exports.NiceCountryPicker=dt.NiceCountryPicker;exports.NiceDateTimePicker=dt.NiceDateTimePicker;exports.NiceForm=dt.NiceForm;exports.NiceMaskedInput=dt.NiceMaskedInput;exports.NicePasswordInput=dt.NicePasswordInput;exports.NiceRadioGroup=dt.NiceRadioGroup;exports.NiceRating=dt.NiceRating;exports.NiceSlider=dt.NiceSlider;exports.NiceTagBox=dt.NiceTagBox;exports.NiceTextArea=dt.NiceTextArea;exports.NiceUpload=dt.NiceUpload;exports.FlagIcon=Vt.FlagIcon;exports.NiceTabs=Vt.NiceTabs;exports.NiceToggle=Vt.NiceToggle;exports.ThemePreviewSwatch=Vt.ThemePreviewSwatch;exports.NiceColorPicker=bn.NiceColorPicker;exports.DEFAULT_ASPECT_RATIOS=it.DEFAULT_ASPECT_RATIOS;exports.EMOJI_DATA=it.EMOJI_DATA;exports.GRADIENT_PRESETS=it.GRADIENT_PRESETS;exports.NICE_COLOR_PRESET_KEYS=it.NICE_COLOR_PRESET_KEYS;exports.NiceAccountPicker=it.NiceAccountPicker;exports.NiceAddressInput=it.NiceAddressInput;exports.NiceCodeEditorAI=it.NiceCodeEditorAI;exports.NiceColorPalette=it.NiceColorPalette;exports.NiceContactPicker=it.NiceContactPicker;exports.NiceCropEditor=it.NiceCropEditor;exports.NiceDateRangeBox=it.NiceDateRangeBox;exports.NiceDocumentEditor=it.NiceDocumentEditor;exports.NiceDropDownBox=it.NiceDropDownBox;exports.NiceEmojiPicker=it.NiceEmojiPicker;exports.NiceGradientPicker=it.NiceGradientPicker;exports.NiceHtmlEditorAI=it.NiceHtmlEditorAI;exports.NiceImageAnnotator=it.NiceImageAnnotator;exports.NiceImageEditor=it.NiceImageEditor;exports.NiceInputOtp=it.NiceInputOtp;exports.NiceInvoiceLineEditor=it.NiceInvoiceLineEditor;exports.NiceKeyValueEditor=it.NiceKeyValueEditor;exports.NiceKnob=it.NiceKnob;exports.NiceLogConsole=it.NiceLogConsole;exports.NiceLookup=it.NiceLookup;exports.NiceMarkdownEditor=it.NiceMarkdownEditor;exports.NiceMention=it.NiceMention;exports.NicePDFAnnotationEditor=it.NicePDFAnnotationEditor;exports.NicePickList=it.NicePickList;exports.NiceRangeSlider=it.NiceRangeSlider;exports.NiceScannerControl=it.NiceScannerControl;exports.NiceScriptRunner=it.NiceScriptRunner;exports.NiceSignature=it.NiceSignature;exports.NiceTreeSelect=it.NiceTreeSelect;exports.NiceWiki=it.NiceWiki;exports.applyPreset=it.applyPreset;exports.contrastRatio=it.contrastRatio;exports.cssToGradient=it.cssToGradient;exports.generateHarmony=it.generateHarmony;exports.generateVariations=it.generateVariations;exports.gradientToCss=it.gradientToCss;exports.hexToHsv=it.hexToHsv;exports.hexToRgb=it.hexToRgb;exports.hsvToHex=it.hsvToHex;exports.hsvToRgb=it.hsvToRgb;exports.randomPalette=it.randomPalette;exports.rgbToHex=it.rgbToHex;exports.rgbToHsl=it.rgbToHsl;exports.rgbToHsv=it.rgbToHsv;exports.wcagLevel=it.wcagLevel;exports.NiceHtmlEditor=Zl.NiceHtmlEditor;exports.NiceCodeDiffEditor=pi.NiceCodeDiffEditor;exports.NiceCodeEditor=pi.NiceCodeEditor;exports.NiceSimpleCodeEditor=pi.NiceSimpleCodeEditor;exports.LANGUAGES=Be.LANGUAGES;exports.NICE_THEME_PICKER_PRESETS=Be.NICE_THEME_PICKER_PRESETS;exports.NiceAccordion=Be.NiceAccordion;exports.NiceAppLayout=Be.NiceAppLayout;exports.NiceAuthButtons=Be.NiceAuthButtons;exports.NiceBreadcrumb=Be.NiceBreadcrumb;exports.NiceCard=Be.NiceCard;exports.NiceConsole=Be.NiceConsole;exports.NiceContextMenu=Be.NiceContextMenu;exports.NiceDashboardLayout=Be.NiceDashboardLayout;exports.NiceDashboardShell=Be.NiceDashboardShell;exports.NiceDesktop=Be.NiceDesktop;exports.NiceDock=Be.NiceDock;exports.NiceDynamicSidebar=Be.NiceDynamicSidebar;exports.NiceIconRail=Be.NiceIconRail;exports.NiceKioskShell=Be.NiceKioskShell;exports.NiceLanguagePicker=Be.NiceLanguagePicker;exports.NiceMdiWorkspace=Be.NiceMdiWorkspace;exports.NiceMenu=Be.NiceMenu;exports.NiceModeSelector=Be.NiceModeSelector;exports.NiceModuleLifecyclePanel=Be.NiceModuleLifecyclePanel;exports.NiceNavMenu=Be.NiceNavMenu;exports.NiceNavbar=Be.NiceNavbar;exports.NiceOrganizationProfileForm=Be.NiceOrganizationProfileForm;exports.NiceSetupWizard=Be.NiceSetupWizard;exports.NiceSidebarNav=Be.NiceSidebarNav;exports.NiceSpinner=Be.NiceSpinner;exports.NiceSplitter=Be.NiceSplitter;exports.NiceStepper=Be.NiceStepper;exports.NiceThemePicker=Be.NiceThemePicker;exports.NiceTooltip=Be.NiceTooltip;exports.NiceUserMenu=Be.NiceUserMenu;exports.NiceWizard=Be.NiceWizard;exports.PREFS_CATEGORIES=Be.PREFS_CATEGORIES;exports.SIDEBAR_DEFAULT_FAVORITE_LIST=Be.SIDEBAR_DEFAULT_FAVORITE_LIST;exports.activeSidebarFavoriteList=Be.activeSidebarFavoriteList;exports.buildPrefsCategoryViews=Be.buildPrefsCategoryViews;exports.filterSidebarItems=Be.filterSidebarItems;exports.findSidebarItemByRoute=Be.findSidebarItemByRoute;exports.mapSidebarViews=Be.mapSidebarViews;exports.normalizeSidebarSearch=Be.normalizeSidebarSearch;exports.sidebarFavoriteItems=Be.sidebarFavoriteItems;exports.sidebarFavoriteLists=Be.sidebarFavoriteLists;exports.sidebarFavoriteListsOf=Be.sidebarFavoriteListsOf;exports.sidebarFavoriteTree=Be.sidebarFavoriteTree;exports.sidebarItemMatches=Be.sidebarItemMatches;exports.sidebarPrefsHostControlled=Be.sidebarPrefsHostControlled;exports.toThemeDescriptor=Be.toThemeDescriptor;exports.useSetupWizard=Be.useSetupWizard;exports.useSidebarNavPrefs=Be.useSidebarNavPrefs;exports.walkSidebarNav=Be.walkSidebarNav;exports.NiceButton=Fe.NiceButton;exports.NiceButtonGroup=At.NiceButtonGroup;exports.NiceScheduler=At.NiceScheduler;exports.createEmptyRecipe=At.createEmptyRecipe;exports.newRecipeId=At.newRecipeId;exports.recipeTotalMinutes=At.recipeTotalMinutes;exports.recurrenceDates=At.recurrenceDates;exports.NiceDropDownButton=Wn.NiceDropDownButton;exports.NicePivotGrid=Wn.NicePivotGrid;exports.NicePivotGridFieldChooser=Wn.NicePivotGridFieldChooser;exports.NICE_TREE_ROW_MIME=ft.NICE_TREE_ROW_MIME;exports.NiceDataGridAI=ft.NiceDataGridAI;exports.NiceHighlight=ft.NiceHighlight;exports.NiceKanbanBoard=ft.NiceKanbanBoard;exports.NiceList=ft.NiceList;exports.NiceModuleGrid=ft.NiceModuleGrid;exports.NiceReconciliationView=ft.NiceReconciliationView;exports.NiceSavedQueryPanel=ft.NiceSavedQueryPanel;exports.NiceSpreadsheet=ft.NiceSpreadsheet;exports.NiceTable=ft.NiceTable;exports.NiceTileView=ft.NiceTileView;exports.NiceTreeGrid=ft.NiceTreeGrid;exports.NiceTreeList=ft.NiceTreeList;exports.NiceTreeView=ft.NiceTreeView;exports.treeDropPosition=ft.treeDropPosition;exports.treeKeyboardMove=ft.treeKeyboardMove;exports.treeKeyboardTarget=ft.treeKeyboardTarget;exports.useTreeRowDrop=ft.useTreeRowDrop;exports.NiceAppShell=_t.NiceAppShell;exports.NiceBranchManager=_t.NiceBranchManager;exports.NiceConfirmDialog=_t.NiceConfirmDialog;exports.NiceGitBlame=_t.NiceGitBlame;exports.NiceGitConflictResolver=_t.NiceGitConflictResolver;exports.NiceGitDiffViewer=_t.NiceGitDiffViewer;exports.NiceGitGraph=_t.NiceGitGraph;exports.NiceGitHooks=_t.NiceGitHooks;exports.NiceMergeRequestBuilder=_t.NiceMergeRequestBuilder;exports.NiceOnScreenKeyboard=_t.NiceOnScreenKeyboard;exports.NiceOnScreenKeyboardHost=_t.NiceOnScreenKeyboardHost;exports.NicePipelineEditor=_t.NicePipelineEditor;exports.NicePipelineMonitor=_t.NicePipelineMonitor;exports.NicePromptDialog=_t.NicePromptDialog;exports.useNiceDialogs=_t.useNiceDialogs;exports.NiceAlert=hn.NiceAlert;exports.NiceModal=Fi.NiceModal;exports.NiceCookieConsent=qt.NiceCookieConsent;exports.NiceDrawer=qt.NiceDrawer;exports.NiceErrorBoundary=qt.NiceErrorBoundary;exports.NiceLoginForm=qt.NiceLoginForm;exports.NiceOfflineBanner=qt.NiceOfflineBanner;exports.NiceRetryPanel=qt.NiceRetryPanel;exports.NiceTimeoutFeedback=qt.NiceTimeoutFeedback;exports.NiceToastContainer=qt.NiceToastContainer;exports.useNiceTimeout=qt.useNiceTimeout;exports.useNiceToast=qt.useNiceToast;exports.NicePagination=qr.NicePagination;exports.NiceDataGrid=fn.NiceDataGrid;exports.NiceFilterBuilder=fn.NiceFilterBuilder;exports.NiceRowEditDialog=fn.NiceRowEditDialog;exports.rowEditFormItems=fn.rowEditFormItems;exports.CHART_COLORS=Ze.CHART_COLORS;exports.NiceBarGauge=Ze.NiceBarGauge;exports.NiceBullet=Ze.NiceBullet;exports.NiceChart=Ze.NiceChart;exports.NiceChartAI=Ze.NiceChartAI;exports.NiceChartRangeSelector=Ze.NiceChartRangeSelector;exports.NiceCircularGauge=Ze.NiceCircularGauge;exports.NiceDrillDownChart=Ze.NiceDrillDownChart;exports.NiceForecastChart=Ze.NiceForecastChart;exports.NiceFunnel=Ze.NiceFunnel;exports.NiceHeatMap=Ze.NiceHeatMap;exports.NiceLinearGauge=Ze.NiceLinearGauge;exports.NiceLiveChart=Ze.NiceLiveChart;exports.NiceMapChart=Ze.NiceMapChart;exports.NiceOrganizationChart=Ze.NiceOrganizationChart;exports.NicePieChart=Ze.NicePieChart;exports.NicePolarChart=Ze.NicePolarChart;exports.NiceRealtimeChart=Ze.NiceRealtimeChart;exports.NiceSankey=Ze.NiceSankey;exports.NiceSparkline=Ze.NiceSparkline;exports.NiceStockChart=Ze.NiceStockChart;exports.NiceTreeMap=Ze.NiceTreeMap;exports.autoDetectColumns=Ze.autoDetectColumns;exports.createMockLiveChartSource=Ze.createMockLiveChartSource;exports.createSignalRLiveChartSource=Ze.createSignalRLiveChartSource;exports.createWebSocketLiveChartSource=Ze.createWebSocketLiveChartSource;exports.downloadCSV=Ze.downloadCSV;exports.downloadHTML=Ze.downloadHTML;exports.downloadJSON=Ze.downloadJSON;exports.downloadPDF=Ze.downloadPDF;exports.downloadXLSX=Ze.downloadXLSX;exports.exportToCSV=Ze.exportToCSV;exports.exportToHTML=Ze.exportToHTML;exports.exportToJSON=Ze.exportToJSON;exports.exportToPDF=Ze.exportToPDF;exports.exportToXLSX=Ze.exportToXLSX;exports.niceExport=Ze.niceExport;exports.orgChartToPng=Ze.orgChartToPng;exports.orgChartToSvg=Ze.orgChartToSvg;exports.tidyTreeLayout=Ze.tidyTreeLayout;exports.NiceActionSheet=kt.NiceActionSheet;exports.NiceBlockUI=kt.NiceBlockUI;exports.NiceBox=kt.NiceBox;exports.NiceCommandPaletteProvider=kt.NiceCommandPaletteProvider;exports.NiceLoadPanel=kt.NiceLoadPanel;exports.NicePopover=kt.NicePopover$1;exports.NiceResizable=kt.NiceResizable;exports.NiceResponsiveBox=kt.NiceResponsiveBox;exports.NiceScrollView=kt.NiceScrollView;exports.NiceTutorial=kt.NiceTutorial;exports.NiceTutorialProvider=kt.NiceTutorialProvider;exports.NiceWindow=kt.NiceWindow;exports.NiceWindowManager=kt.NiceWindowManager;exports.fuzzyMatch=kt.fuzzyMatch;exports.highlightMatches=kt.highlightMatches;exports.useCommandPalette=kt.useCommandPalette;exports.useNiceTutorial=kt.useNiceTutorial;exports.useRegisterCommands=kt.useRegisterCommands;exports.NiceGantt=ed.NiceGantt;exports.NiceDocumentViewer=wh.NiceDocumentViewer;exports.DefaultErrorFallback=En.DefaultErrorFallback;exports.DefaultLoadingFallback=En.DefaultLoadingFallback;exports.LazyComponents=En.LazyComponents;exports.createLazyComponent=En.createLazyComponent;exports.preloadAllHeavyComponents=En.preloadAllHeavyComponents;exports.preloadComponents=En.preloadComponents;exports.useLazyOnVisible=En.useLazyOnVisible;exports.usePreloadOnIdle=En.usePreloadOnIdle;exports.usePreloadOnRouteHint=En.usePreloadOnRouteHint;exports.NiceDataBranchGraph=qi.NiceDataBranchGraph;exports.NiceDataBranchManager=qi.NiceDataBranchManager;exports.NiceDataConflictResolver=qi.NiceDataConflictResolver;exports.NiceDataDiffViewer=qi.NiceDataDiffViewer;exports.NiceDataMergeBuilder=qi.NiceDataMergeBuilder;exports.NiceDataSnapshot=qi.NiceDataSnapshot;exports.AmazonMarketplaceConnector=qo;exports.CLI_COMMANDS=$r;exports.CONNECTORS_BY_CATEGORY=AC;exports.CONNECTOR_REGISTRY=Up;exports.CURRENT_SCHEMA_VERSION=uv;exports.DESIGN_CARD=Ot;exports.Dynamics365Connector=Io;exports.DynamicsBCConnector=Do;exports.EBayConnector=Vo;exports.FAQCategoryFilter=hd;exports.FAQGroup=xr;exports.FAQItemCard=Wr;exports.FAQSearchBar=md;exports.HubSpotConnector=Bo;exports.MailchimpConnector=zo;exports.NICE_DATATYPE_CONTROL_MAP=Jd;exports.NICE_DRAG_MIME=to;exports.NICE_MODULE_DATA_SOURCE_KINDS=bp;exports.NICE_QUERY_OPERATORS=ep;exports.NICE_SQL_DIALECTS=Zu;exports.NICE_SQL_FUNCTIONS=li;exports.NICE_THEME_ARCHIVE_CATALOG=v_;exports.NICE_THEME_CATALOG=Bn;exports.NICE_THEME_CATALOG_ENTRIES=zd;exports.NiceAccessManager=o0;exports.NiceAchievementBadge=yk;exports.NiceActionBuilder=Xd;exports.NiceAffix=Xm;exports.NiceAmountBreakdown=wk;exports.NiceAnalyticsTracker=Eh;exports.NiceAnchor=Km;exports.NiceApiExplorer=Aj;exports.NiceAspectRatio=Dm;exports.NiceAssessment=Wi;exports.NiceAuditLog=u_;exports.NiceAuthGuard=Rk;exports.NiceAutomationRuleEditor=J_;exports.NiceAvatar=Ht;exports.NiceAvatarGroup=Ur;exports.NiceBPMNDesigner=fj;exports.NiceBackTop=Qm;exports.NiceBackupDiffViewer=v1;exports.NiceBackupList=a1;exports.NiceBackupRestoreDialog=g1;exports.NiceBackupScheduler=_1;exports.NiceBackupStatusBadge=l1;exports.NiceBackupTagEditor=m1;exports.NiceBadge=Jt;exports.NiceBarcode=Au;exports.NiceBlockquote=Pm;exports.NiceBusinessCard=Ak;exports.NiceCallout=Vm;exports.NiceCardGrid=lh;exports.NiceCardGroup=rd;exports.NiceCarousel=dd;exports.NiceCascadeSelect=ph;exports.NiceCenter=Sm;exports.NiceCheckboxGroup=dh;exports.NiceClickOutside=Um;exports.NiceClipboardStack=eE;exports.NiceCollapse=rh;exports.NiceCollapsibleCard=ah;exports.NiceColumnChooser=WN;exports.NiceCommandBar=jh;exports.NiceComplianceDashboard=Rw;exports.NiceComponentPlayground=Oj;exports.NiceComponentTypeMapping=uu;exports.NiceConnectorConfigForm=$C;exports.NiceConnectorSelector=RC;exports.NiceConsentBanner=Ch;exports.NiceConsentPanel=Mk;exports.NiceContainer=Om;exports.NiceCopyButton=zm;exports.NiceCountUp=eh;exports.NiceCountdown=th;exports.NiceCountdownTimer=pE;exports.NiceDMS=jC;exports.NiceDataSourceBuilder=f0;exports.NiceDataSourceEditor=lk;exports.NiceDesignTokens=Nw;exports.NiceDeviceControlCard=P_;exports.NiceDeviceManager=Kh;exports.NiceDeviceTile=Hr;exports.NiceDiagramDesigner=Kw;exports.NiceDisplayStylePicker=zu;exports.NiceDivider=ps;exports.NiceDocumentApprovalFlow=Ik;exports.NiceDocumentVersionList=Sk;exports.NiceDocumentationViewer=PT;exports.NiceDraggable=Pd;exports.NiceERPReportDesigner=xC;exports.NiceEmpty=Gr;exports.NiceEnergyChart=ej;exports.NiceExam=J1;exports.NiceFAQ=lg;exports.NiceFeatureFlagsProvider=rv;exports.NiceFeatureGate=ov;exports.NiceFileManager=Ad;exports.NiceFilePicker=xh;exports.NiceFirstRunPreferences=Go;exports.NiceFlex=Em;exports.NiceFocusTrap=Hm;exports.NiceFooter=oh;exports.NiceGallery=no;exports.NiceGamepad=cd;exports.NiceGitManager=Hb;exports.NiceHeading=Rm;exports.NiceHelpDesk=uT;exports.NiceInbox=Pk;exports.NiceInputSettings=Xh;exports.NiceInstallPrompt=UT;exports.NiceInstanceMonitor=Pu;exports.NiceIntegrationHub=PC;exports.NiceLayout=bh;exports.NiceLeaderboard=xk;exports.NiceLifecycleHooksEditor=Cb;exports.NiceLightbox=_h;exports.NiceLink=Mm;exports.NiceLiveDataGrid=mg;exports.NiceLiveRegion=Gm;exports.NiceLoanCalculator=Tw;exports.NiceLocaleManager=dj;exports.NiceLockButton=Iu;exports.NiceLogo=Xp;exports.NiceMAM=mS;exports.NiceMap=Md;exports.NiceMealPlan=Qg;exports.NiceMediaObject=Zm;exports.NiceMenuBuilder=Dg;exports.NiceMicrophone=od;exports.NiceModuleHotSwap=dv;exports.NiceModuleLoaderProvider=iv;exports.NiceModuleRoute=av;exports.NiceNavShell=ZS;exports.NiceNavShellHome=Wo;exports.NiceNavShellPaneFooter=PS;exports.NiceNavShellPaneHeader=AS;exports.NiceNetworkDiscoveryPanel=Dj;exports.NiceNotificationPreferences=Ej;exports.NiceNotifications=Zp;exports.NiceNumericInput=fh;exports.NiceOTPInput=uh;exports.NicePDFViewer=Tu;exports.NicePageHeader=ch;exports.NiceParagraph=$m;exports.NicePermissionMatrix=Wu;exports.NicePlanningTimeline=sb;exports.NicePoll=X1;exports.NicePollLive=Z1;exports.NicePresenceAvatars=hT;exports.NicePresenceCursors=gT;exports.NicePresenceFocus=bT;exports.NicePresenceList=fT;exports.NicePresenceProvider=pT;exports.NicePrintPreview=XN;exports.NiceProgress=rs;exports.NiceQRCode=Ou;exports.NiceQueryDesigner=Np;exports.NiceQuestCard=_k;exports.NiceQuiz=Y1;exports.NiceRate=vh;exports.NiceRecipe=Vg;exports.NiceRecipeCollections=eb;exports.NiceRecipeEditor=ub;exports.NiceRecipeList=Dd;exports.NiceRecurrenceEditor=Bg;exports.NiceReportBuilder=Bp;exports.NiceResourceAllocation=cb;exports.NiceResult=mh;exports.NiceRevisionHistory=Pb;exports.NiceRibbon=sh;exports.NiceRoleEditor=s0;exports.NiceRoomGrid=aj;exports.NiceRulesEngine=CC;exports.NiceSceneActionBuilder=V_;exports.NiceSceneBar=oj;exports.NiceSearchBar=Mr;exports.NiceSearchInput=yh;exports.NiceSection=Lm;exports.NiceSegmentedControl=on;exports.NiceSensorGaugePanel=O_;exports.NiceShowcase=GN;exports.NiceSidebarPrefsDisplay=Ko;exports.NiceSidebarPrefsGeneral=Yo;exports.NiceSidebarPrefsHidden=Jo;exports.NiceSidebarPrefsOrder=Qo;exports.NiceSidebarPrefsReset=Xo;exports.NiceSkeleton=ha;exports.NiceSortable=Es;exports.NiceSortableTree=gd;exports.NiceSpacer=Im;exports.NiceSpeechToText=Od;exports.NiceSpeedDialAction=sd;exports.NiceStack=Tm;exports.NiceStatistic=ac;exports.NiceStopwatch=lE;exports.NiceStreamDashboard=KC;exports.NiceSurvey=Q1;exports.NiceSuspense=Wm;exports.NiceSwipeCard=hh;exports.NiceTabBar=gh;exports.NiceTag=us;exports.NiceTagInput=Nh;exports.NiceTaskInbox=Du;exports.NiceTempDial=Eu;exports.NiceTerminalUI=Lu;exports.NiceThemeDesigner=Wd;exports.NiceThemeGalleryPicker=bf;exports.NiceThemeGalleryPreview=Kd;exports.NiceThemePreview=ro;exports.NiceTimeline=ld;exports.NiceToggleGroup=yr;exports.NiceTopNav=em;exports.NiceTranscoder=iS;exports.NiceTruncate=Am;exports.NiceTutorialHost=cw;exports.NiceUndoManager=mo;exports.NiceUndoProvider=ju;exports.NiceUpdatePrompt=HT;exports.NiceValidationBuilder=$d;exports.NiceValidationGroup=ao;exports.NiceValidationSummary=so;exports.NiceValidator=gs;exports.NiceVideoAnnotator=cS;exports.NiceVideoEditor=BC;exports.NiceViewCache=ba;exports.NiceViewEditor=Ff;exports.NiceViewFetchError=jr;exports.NiceViewFetcher=Gf;exports.NiceViewHotReload=Qf;exports.NiceViewRegistry=Zd;exports.NiceViewRenderer=tu;exports.NiceVirtualScroller=ud;exports.NiceWorkflowInstanceMonitor=Pu;exports.NiceWorkflowTaskInbox=Du;exports.PARENT_KEYS_PARAMETER=wo;exports.PARENT_KEY_COLUMN=_s;exports.PayPalConnector=Mo;exports.QuickBooksConnector=Ao;exports.SAPConnector=ui;exports.SAPIdocConnector=To;exports.SAPRfcConnector=Eo;exports.SIDEBAR_PREFS_ROUTE_KEYS=qS;exports.SalesforceConnector=Po;exports.SendGridConnector=Lo;exports.ShopifyConnector=Fo;exports.SidebarPrefsScopeProvider=rm;exports.StripeConnector=$o;exports.TracelessBadge=td;exports.TracelessPanel=kh;exports.TracelessWarning=Sh;exports.TwilioConnector=Oo;exports.XeroConnector=Ro;exports.addCatalogPages=xd;exports.addMenuGroup=jd;exports.addRelatedTable=cp;exports.addTableInstance=_o;exports.assembleQueryRows=R0;exports.buildIcs=id;exports.buildSidebarPrefsRoutes=om;exports.catalogFromSidebarData=jg;exports.catalogPagesOf=Ng;exports.checkModuleHealth=lu;exports.checkPermissions=wv;exports.checkSingleModule=lv;exports.compareSemver=ci;exports.conditionsToFilter=lp;exports.createComponentMeta=Yk;exports.createDocIndex=$T;exports.createRoleId=No;exports.createStandardErpContracts=xv;exports.createUndoMiddleware=Qv;exports.datePartSql=Dr;exports.defaultTypeMapping=yv;exports.defaultViewRegistry=co;exports.deriveExportColumns=uo;exports.deserializeManifest=ev;exports.deserializeRbacPolicy=Cv;exports.deserializeView=ff;exports.diffObjects=g_;exports.diffViews=Uv;exports.downloadIcs=Rh;exports.duplicateRole=Yu;exports.emptyFilterGroup=di;exports.emptyQueryDesign=ap;exports.entityToView=Qd;exports.exportIcs=ad;exports.exportView=nu;exports.extractControlTypes=mv;exports.extractCssVariables=zT;exports.extractI18nKeys=BT;exports.extractTokensFromTheme=Bu;exports.fetchFigmaTokens=$p;exports.findMenuCatalogNode=bd;exports.findTreeNode=si;exports.formatDiffAsText=Wv;exports.functionSql=ko;exports.generateAdapters=Ap;exports.generateAllForRbac=Dv;exports.generateAllForView=Iv;exports.generateDartModel=bu;exports.generateInterface=LT;exports.generateMermaidSyntax=Jw;exports.generateQuerySql=js;exports.generateRbacDart=vu;exports.generateRbacTypescript=fu;exports.generateScaffold=Bv;exports.generateStoriesFromViews=Yv;exports.generateStoryFromView=Nu;exports.generateTokens=cs;exports.generateTypescriptModel=gu;exports.generateViewCatalog=Jv;exports.getComponentRegistry=Pp;exports.groupProps=OT;exports.indentTreeNode=Jr;exports.insertCatalogNodes=_d;exports.insertTreeNode=Hn;exports.isAllowed=mu;exports.isModuleDataSource=M0;exports.isTreeDescendant=Kr;exports.isVersionCompatible=cv;exports.isViewCompatibleWith=hv;exports.listScaffoldTemplates=Fv;exports.loadComponentDoc=RT;exports.menuCatalogPath=vd;exports.menuCheckedPages=Zr;exports.menuItemLabel=eo;exports.menuItemSource=hs;exports.menuOrphans=fd;exports.menuToSidebarData=kd;exports.menuToSidebarViews=wd;exports.moduleDataSourceColumns=Ps;exports.moduleDataSourceDependencies=L0;exports.moduleDataSourceParameters=xp;exports.moduleDataSourceTable=vp;exports.moveTreeNode=Ui;exports.moveTreeNodeBy=ms;exports.nestPathOf=Bi;exports.newModuleDataSource=Ar;exports.niceESLintPlugin=Lk;exports.noFullImport=wp;exports.operatorsFor=tp;exports.outdentTreeNode=Qr;exports.outputColumns=Gi;exports.parseAdapterCLIArgs=Rp;exports.parseCLIArgs=Ip;exports.parseTokensFromCSS=nC;exports.parseTokensFromJSON=tC;exports.permissionTree=Ku;exports.pickColumns=Ir;exports.planQuerySql=Co;exports.planSqlText=gp;exports.queryParameterNames=Ta;exports.quoteSqlName=va;exports.readNiceDrag=pb;exports.relatedTables=op;exports.removeCatalogPages=Nd;exports.removeRole=Ju;exports.removeTable=sp;exports.removeTreeNode=mi;exports.requireA11y=jp;exports.requireGridColumns=kp;exports.requireI18n=_p;exports.resolveExportRows=lo;exports.resolvePermissions=jv;exports.resolveRolePermissions=yo;exports.resolveUserPermissions=e0;exports.roleAncestors=xo;exports.roleInheritanceCycles=t0;exports.rootTableId=Ds;exports.runAdapterGenerator=eC;exports.runCLI=Hk;exports.runContractTests=vv;exports.scaffoldComponent=Cp;exports.scaffoldInit=Ep;exports.scaffoldPage=Sp;exports.scaffoldTheme=Tp;exports.searchDocs=FT;exports.serializeManifest=Zf;exports.serializeRbacPolicy=kv;exports.serializeView=Yd;exports.standardDataSources=O0;exports.suggestJoins=rp;exports.syncFromFigma=iC;exports.toViewDataSourceRef=m0;exports.tokensToCssVars=Op;exports.tokensToNiceTheme=Mp;exports.treeNodeHeight=_a;exports.treeNodeLocation=It;exports.updateFilterNode=jo;exports.updateTreeNode=ka;exports.useAnalytics=Th;exports.useAssessment=bm;exports.useAuditLog=h_;exports.useClipboardStack=tE;exports.useColumnChooser=KN;exports.useDMS=NC;exports.useERPReportDesigner=uC;exports.useFAQ=Ts;exports.useFeatureFlag=cu;exports.useFeatureFlags=ou;exports.useIntegrationHub=SC;exports.useMAM=uS;exports.useModuleLoader=su;exports.useNiceDataSourceTimeout=cj;exports.useNiceNavShellPane=Ho;exports.useNiceValidation=io;exports.useOnlineStatus=km;exports.usePWA=Cm;exports.usePresence=Ia;exports.usePrintPreview=ZN;exports.usePushNotifications=VT;exports.useReportBuilder=zp;exports.useRulesEngine=wC;exports.useServiceWorker=ic;exports.useSidebarPrefsScope=hi;exports.useSidebarUserId=LS;exports.useStreamDashboard=VC;exports.useTranscoder=QC;exports.useUndoKeyboard=Zv;exports.useUndoManager=Xv;exports.useVideoAnnotator=oS;exports.useVideoEditor=OC;exports.validateCrossPlatformView=du;exports.validateDiagramSchema=Yw;exports.validateDoc=MT;exports.validateModuleManifest=iu;exports.validateRbacPolicy=Sv;exports.validateViewDefinition=oo;exports.validateViewForDeploy=xu;exports.validateViewsBatch=Vv;exports.valueTypeOf=Sa;exports.viewToHtml=_r;exports.walkTreeNodes=sn;exports.wouldCreateRoleCycle=Tr;