@kosdev-code/base-ui-components 0.1.0-dev.5802 → 0.1.0-dev.5827
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/components/atoms/icon/common/types.d.ts +1 -1
- package/components/atoms/icon/common/types.d.ts.map +1 -1
- package/components/atoms/icon-button/icon-button.d.ts +4 -0
- package/components/atoms/icon-button/icon-button.d.ts.map +1 -1
- package/components/atoms/index.d.ts +1 -0
- package/components/atoms/index.d.ts.map +1 -1
- package/components/atoms/shell-button/index.d.ts +2 -0
- package/components/atoms/shell-button/index.d.ts.map +1 -0
- package/components/atoms/shell-button/shell-button.d.ts +10 -0
- package/components/atoms/shell-button/shell-button.d.ts.map +1 -0
- package/components/atoms/shell-icon-button/shell-icon-button.d.ts.map +1 -1
- package/components/molecules/branded-header/branded-header-styles.d.ts.map +1 -1
- package/components/molecules/empty-list-message/empty-list-message.d.ts.map +1 -1
- package/components/molecules/empty-message/empty-message.d.ts +25 -0
- package/components/molecules/empty-message/empty-message.d.ts.map +1 -0
- package/components/molecules/empty-message/index.d.ts +2 -0
- package/components/molecules/empty-message/index.d.ts.map +1 -0
- package/components/molecules/index.d.ts +2 -0
- package/components/molecules/index.d.ts.map +1 -1
- package/components/molecules/sectioned-drawer/components/collapsible-section.d.ts +9 -0
- package/components/molecules/sectioned-drawer/components/collapsible-section.d.ts.map +1 -0
- package/components/molecules/sectioned-drawer/components/sectioned-drawer-header.d.ts +10 -0
- package/components/molecules/sectioned-drawer/components/sectioned-drawer-header.d.ts.map +1 -0
- package/components/molecules/sectioned-drawer/index.d.ts +2 -0
- package/components/molecules/sectioned-drawer/index.d.ts.map +1 -0
- package/components/molecules/sectioned-drawer/sectioned-drawer.d.ts +42 -0
- package/components/molecules/sectioned-drawer/sectioned-drawer.d.ts.map +1 -0
- package/components/molecules/table/common/types.d.ts.map +1 -1
- package/components/molecules/table/virtual-table/common/types.d.ts +16 -0
- package/components/molecules/table/virtual-table/common/types.d.ts.map +1 -0
- package/components/molecules/table/virtual-table/components/virtual-table-body.d.ts +17 -0
- package/components/molecules/table/virtual-table/components/virtual-table-body.d.ts.map +1 -0
- package/components/molecules/table/virtual-table/index.d.ts +3 -0
- package/components/molecules/table/virtual-table/index.d.ts.map +1 -0
- package/components/molecules/table/virtual-table/virtual-table.d.ts +6 -0
- package/components/molecules/table/virtual-table/virtual-table.d.ts.map +1 -0
- package/index.cjs +820 -722
- package/index.cjs.map +1 -1
- package/index.js +3113 -2842
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/tokens/component-tokens/icon-button/index.d.ts +3 -0
- package/styles/tokens/component-tokens/icon-button/index.d.ts.map +1 -1
- package/styles/tokens/component-tokens/index.d.ts +3 -0
- package/styles/tokens/component-tokens/index.d.ts.map +1 -1
- package/styles/tokens/index.d.ts +3 -0
- package/styles/tokens/index.d.ts.map +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/index.d.ts.map +1 -1
- package/utils/use-context-guard.d.ts +2 -0
- package/utils/use-context-guard.d.ts.map +1 -0
- package/components/molecules/table/virtual-table.d.ts +0 -7
- package/components/molecules/table/virtual-table.d.ts.map +0 -1
package/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";var Ja=Object.defineProperty;var Qa=(e,t,o)=>t in e?Ja(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var E=(e,t,o)=>(Qa(e,typeof t!="symbol"?t+"":t,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),d=require("react"),g=require("@emotion/styled"),z=require("@emotion/react"),Qr=require("react-dom"),A=require("@floating-ui/react"),el=require("@use-gesture/react"),X=require("date-fns"),K=require("react-hook-form"),W=require("@kosdev-code/kos-ui-sdk"),Et=require("mobx-react-lite"),T=require("mobx"),we=require("@tanstack/react-table");function tl(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const uo=tl(d),ol=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},nl=e=>e instanceof RegExp,rl=e=>typeof e=="string",sl=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},il=(e,t,o)=>{if(e===""||t==="")return e;let n=t;nl(n)||(n=new RegExp("("+ol(n)+")","gi"));const r=e.split(n);for(let s=1,l=r.length;s<l;s+=2){if(r[s]===void 0||r[s-1]===void 0){console.warn("Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}r[s]=o(r[s],s)}return r},es=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),sl(n.map(r=>rl(r)?il(r,t,o):r))},zt=(e,t)=>t?e:`var(${e})`,R=(e,t)=>zt(`--studio-g-${e}`,t),c=(e,t)=>zt(`--studio-s-${e}`,t),al={"actionable-blurb":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-20")}},ll={"app-shell":{"bg-default":c("color-grey80"),"bg-offline":c("color-grey70"),"bg-locked":c("color-grey60"),color:c("color-white")}},cl={"artifact-drawer":{"background-color":c("color-grey10"),"border-color":c("color-grey20"),"border-width":c("border-sm"),"padding-x":c("spacing-16"),"branch-padding-x":c("spacing-8"),"artifact-list-y-padding":c("spacing-10"),"artifact-items-gap":c("spacing-10"),"version-items-gap":c("spacing-8"),"version-list-padding":c("spacing-8")}},dl={checkbox:{"background-color":c("color-white"),"border-color":c("color-grey30"),"background-color-disabled":c("color-grey15"),"background-color-checked":c("color-primary"),"border-color-checked":c("color-primary"),"background-color-checked-disabled":c("color-additional3"),"border-color-checked-disabled":c("color-additional3"),size:"14px","border-radius":c("spacing-2"),"border-width":c("border-sm")}},ul={"collapsible-artifact":{"background-color":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-6"),"border-width":c("border-xsm"),"button-left-or-right":c("spacing-4"),"button-top":"3px","name-and-desc-spacing":c("spacing-2"),"name-and-selected-spacing":c("spacing-8"),padding:`${c("spacing-6")} ${c("spacing-8")}`},"collapsible-artifact-version":{"background-color-hover":c("color-grey20"),"background-color-inherited":"#9747FF12","background-color-selected":c("color-additional3"),"background-color":c("color-grey10"),"border-color-hover":c("color-grey30"),"border-color-inherited":"#9747FF33","border-color-selected":c("color-primary"),"border-color":c("color-grey20"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),padding:`${c("spacing-6")} ${c("spacing-8")}`}},pl={"collapsible-list-container":{"border-radius":c("spacing-2"),"border-width":"0.5px","border-color":c("color-grey20")},"collapsible-list-header-container":{"background-color":c("color-grey10"),gap:c("spacing-8"),padding:"7px 8px"},"collapsible-list-toggled-container":{"background-color":c("color-white"),gap:c("spacing-8"),padding:c("spacing-8")}},hl={drawer:{"header-height":c("spacing-30"),"header-bg":c("color-grey10"),"header-border-size":"1px","header-border-color":c("color-grey20"),"header-x-padding":c("spacing-10"),"border-width":"1px","border-color":c("color-grey20"),"left-drop-shadow":"4px 0px 8px -1px rgba(0,0,0,0.2)","right-drop-shadow":"-4px 0px 8px -1px rgba(0,0,0,0.2)"}},fl={form:{"access-toggle-gap":c("spacing-16"),"access-toggle-height":c("spacing-36"),"error-message-top-margin":c("spacing-4"),"label-column-gap":c("spacing-16"),"label-error-color":c("color-red"),"label-font-family":c("font-family-default"),"label-font-size":c("font-size-med"),"label-font-weight":c("font-weight-normal"),"label-height":"14px","label-line-height":c("line-height-default"),"label-star-padding":c("spacing-4"),"label-width":"112px","label-area-padding":`${c("spacing-7")} 0`}},gl={"horizontal-rule":{"border-width":"0.5px","border-color":c("color-grey20")}},ml={"icon-button":{padding:"0","border-radius":c("spacing-2"),"background-color":"transparent","border-color":"transparent",cursor:"pointer","disabled-cursor":"not-allowed","badge-fill-black":c("color-black"),"badge-fill-blue":c("color-primary"),"badge-fill-green":c("color-green"),"badge-fill-grey":c("color-grey50"),"badge-fill-orange":c("color-orange"),"badge-fill-purple":c("color-purple"),"badge-fill-red":c("color-red"),"badge-fill-white":c("color-white"),"badge-fill-yellow":c("color-yellow"),"badge-right":"1px","badge-top":"1px","active-background-color":"rgba(255, 255, 255, 0.1)"}},bl={icon:{"fill-black":c("color-black"),"fill-blue":c("color-primary"),"fill-green":c("color-green"),"fill-grey":c("color-grey50"),"fill-orange":c("color-orange"),"fill-purple":c("color-purple"),"fill-red":c("color-red"),"fill-white":c("color-white"),"fill-yellow":c("color-yellow"),"size-lrg":c("spacing-18"),"size-med":c("spacing-16"),"size-sm":c("spacing-14"),"size-xlrg":c("spacing-20"),"size-xsm":c("spacing-12"),"size-xxlrg":c("spacing-22"),"size-xxxlrg":c("spacing-32"),"size-xxsm":c("spacing-10")}},xl={"image-config-page-header":{gap:c("spacing-16"),"padding-bottom":c("spacing-12"),"title-gap":c("spacing-8"),bg:c("color-white")}},yl={input:{"background-color-disabled":c("color-grey10"),"background-color":c("color-white"),"border-color-active":c("color-black"),"border-color-invalid":c("color-red"),"border-color":c("color-grey30"),"border-radius":c("spacing-2"),"border-width":c("border-sm"),"color-disabled":c("color-grey30"),"font-family":c("font-family-default"),"font-size-small":c("font-size-sm"),"font-size":c("font-size-med"),"font-weight":c("font-weight-normal"),"icon-left":c("spacing-8"),"line-height":c("line-height-default"),"padding-left-icon":c("spacing-28"),"padding-right-icon":c("spacing-28"),"padding-x":c("spacing-8"),"padding-y-small":"2px","padding-y":c("spacing-7"),color:c("color-black"),height:"28px"}},vl={link:{"font-size-med":c("font-size-med"),"font-size-sm":c("font-size-sm"),"font-size-lrg":c("font-size-lrg"),"font-size-xlrg":c("font-size-xlrg"),"font-family":c("font-family-default"),"font-weight":c("font-weight-bold"),"line-height":c("line-height-default"),color:c("color-primary"),"color-hover":c("color-additional1"),"color-active":c("color-additional2"),"color-disabled":c("color-grey30")}},kl={modal:{"overlay-background":"rgba(0, 0, 0, 0.8)","background-color":c("color-white"),headerPadding:c("spacing-10"),headerGap:c("spacing-8"),contentYPadding:c("spacing-10"),contentXPadding:c("spacing-12"),footerYPadding:c("spacing-10"),footerXPadding:c("spacing-12"),footerGap:c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"base-content-width":"400xp"}},wl={"named-section":{"border-radius":"6px","border-width":"0.5px","selected-border-width":"2px","hover-border-width":c("border-sm"),"border-color":c("color-grey20"),"selected-border-color":c("color-primary")},"named-section-header":{bg:c("color-grey10"),"border-width":"0.5px","border-color":c("color-grey20"),"border-radius":"2px",padding:"8px 10px",gap:c("spacing-8"),"row-gap":c("spacing-4")}},Cl={segmented:{"border-width":c("border-sm"),"border-radius":c("spacing-2"),padding:c("spacing-2"),"background-color":c("color-grey15"),"border-color":c("color-grey20"),"button-color":c("color-grey60"),"button-color-disabled":c("color-grey40"),"button-background-color":c("color-grey15"),"button-background-color-hover":c("color-grey20"),"button-background-color-active":c("color-grey40"),"button-padding-y":"5px","button-padding-x":"11px","button-border-width":c("border-sm"),"button-border-color":"transparent","button-font-size":c("font-size-med"),"button-font-weight":c("font-weight-normal"),"button-font-family":c("font-family-default"),"button-gap":c("spacing-4"),"indicator-background-color":c("color-white"),"indicator-color":c("color-black")}},$l={select:{"font-size":c("font-size-med"),"border-size":c("border-sm"),"border-color":c("color-grey20")},option:{"column-gap":c("spacing-8"),"font-family":c("font-family-default"),"font-size":c("font-size-med"),"bg-color-active":c("color-grey20"),"bg-color":c("color-white"),"font-weight-selected":c("font-weight-bold"),color:c("color-black"),"color-disabled":c("color-grey40"),padding:"2px 4px"}},Sl={button:{xpadding:c("spacing-16"),ypadding:c("spacing-6"),br:c("spacing-2"),cursor:"pointer","line-height":c("line-height-default"),"font-size":c("font-size-med"),"ypadding-small":c("spacing-2"),"border-width":"1px","font-weight":c("font-weight-bold"),"icon-margin":`0px ${c("spacing-4")} 0px 0px`,"flex-direction":"row",bg:c("color-primary"),"bg-hover":c("color-additional1"),"bg-active":c("color-additional2"),"bg-disabled":c("color-grey30"),border:c("color-primary"),"border-hover":c("color-additional1"),"border-active":c("color-additional2"),"border-disabled":c("color-grey30"),color:c("color-white"),"color-hover":c("color-white"),"color-active":c("color-white"),"color-disabled":c("color-white"),"bg-secondary":c("color-white"),"bg-hover-secondary":c("color-white"),"bg-active-secondary":c("color-white"),"bg-disabled-secondary":c("color-grey10"),"border-secondary":c("color-primary"),"border-hover-secondary":c("color-additional1"),"border-active-secondary":c("color-additional2"),"border-disabled-secondary":c("color-grey30"),"color-secondary":c("color-primary"),"color-hover-secondary":c("color-additional1"),"color-active-secondary":c("color-additional2"),"color-disabled-secondary":c("color-grey30"),"bg-borderless":c("color-white"),"bg-hover-borderless":c("color-white"),"bg-active-borderless":c("color-white"),"bg-disabled-borderless":c("color-white"),"border-borderless":c("color-white"),"border-hover-borderless":c("color-white"),"border-active-borderless":c("color-white"),"border-disabled-borderless":c("color-white"),"color-borderless":c("color-primary"),"color-hover-borderless":c("color-additional1"),"color-active-borderless":c("color-additional2"),"color-disabled-borderless":c("color-grey30")}},jl={label:{gap:c("spacing-4")},"label-with-action":{gap:c("spacing-8")},"label-with-content-link":{color:c("color-primary")}},Il={text:{"font-family":c("font-family-default"),"line-height":c("line-height-default"),"h1-size":c("font-size-xlrg"),"h2-size":c("font-size-lrg"),"body-size":c("font-size-med"),"small-size":c("font-size-sm"),"font-weight-bold":c("font-weight-bold"),"font-weight-normal":c("font-weight-normal"),"color-dark":c("color-black"),"color-light":c("color-white"),"color-green":c("color-green"),"color-purple":c("color-purple"),"color-red":c("color-red"),"color-blue":c("color-primary"),"color-grey":c("color-grey60"),"color-disabled":c("color-grey40"),"color-yellow":c("color-yellow"),"color-orange":c("color-orange")}},Dl={tab:{"trigger-padding-y":c("spacing-8"),"trigger-padding-x":"0","column-gap":c("spacing-8"),"indicator-height":c("border-lrg"),"indicator-color":c("color-grey60"),"trigger-list-underline-color":c("color-grey20"),"trigger-list-underline-height":c("border-sm"),"standard-active-color":c("color-grey80"),"standard-active-bg":"transparent","standard-inactive-color":c("color-grey50"),"standard-inactive-bg":c("color-grey10"),"standard-separator-color":c("color-grey20"),"badge-min-width":"18px","badge-height":"18px","badge-padding":`0 ${c("spacing-4")}`,"badge-border-radius":"9px","badge-bg":c("color-primary"),"badge-color":c("color-white"),"badge-font-size":"11px","close-size":"18px","close-border-radius":c("spacing-4"),"close-hover-bg":c("color-grey20"),"close-color":c("color-grey50")}},_l={tag:{"font-family":c("font-family-default"),"bg-color-orange":c("color-orange"),"bg-color-light":c("color-white"),"bg-color-green":c("color-green"),"bg-color-red":c("color-red"),"bg-color-purple":c("color-purple"),"bg-color-blue":c("color-blue"),"bg-color-disabled":c("color-white"),"color-light":c("color-white"),"color-dark":c("color-black"),"color-disabled":c("color-grey40"),"border-radius":c("border-sm"),"border-color":c("color-grey20"),height:c("spacing-18"),padding:"0px 4px"}},Tl={textarea:{padding:c("spacing-8"),"background-color":c("color-white"),"font-size":c("font-size-med"),"font-family":c("font-family-default"),"font-weight":c("font-weight-normal"),color:c("color-black"),"border-width":c("border-sm"),"border-color":c("color-grey30"),"min-height":"60px","border-color-active":c("color-black"),"border-radius":c("spacing-2"),"border-color-invalid":c("color-red"),"background-color-disabled":c("color-grey10"),"color-disabled":c("color-grey30")}},El={"toggle-container":{gap:"4px"},"toggle-track":{"background-color-checked-disabled":c("color-additional3"),"background-color-checked-enabled":c("color-primary"),"background-color-unchecked-disabled":c("color-grey20"),"background-color-unchecked-enabled":c("color-grey50"),"border-radius":c("spacing-20"),"padding-horizontal":"3px","padding-vertical":"2px","transition-duration":"150ms"},"toggle-thumb":{"background-color-checked-enabled":c("color-white"),"background-color-checked-disabled":c("color-white"),"background-color-unchecked-enabled":c("color-white"),"background-color-unchecked-disabled":c("color-grey15"),"border-radius":"15px","box-shadow":"0px 1px 3px 0px rgba(16, 24, 40, 0.1), 0px 1px 2px -1px rgba(16, 24, 40, 0.1)",height:"8px",width:"8px","transition-duration":"150ms"}},zl={"version-list-container":{gap:c("spacing-16")},"version-list-header":{gap:c("spacing-8"),itemBorderBottom:c("color-grey20"),itemBgColor:c("color-grey10")}},Ml={combobox:{"background-color-active":c("color-grey15"),"background-color-selected":c("color-additional3"),"background-color":c("color-white"),"border-radius":"4px","box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.25)","input-border-radius":"6px","option-column-gap":c("spacing-4"),"row-gap":c("spacing-6"),"selection-border-radius":"4px",height:"22px",padding:c("spacing-8")}},Ol={"radio-button":{size:c("spacing-14"),"check-size":c("spacing-8"),"border-color":c("color-grey20"),"background-color":c("color-white"),"border-width":c("border-sm"),"border-radius":"50%","border-color-checked":c("color-primary"),"background-color-disabled":c("color-grey10")}},Rl={"select-view-list":{"item-height":c("spacing-36"),"padding-left":c("spacing-16"),"padding-right":c("spacing-8"),"border-width":c("border-sm"),"border-color":c("color-grey20"),"background-color":c("color-white"),"background-color-viewing":c("color-grey15"),gap:c("spacing-4")}},Nl={"shell-menu":{"padding-x":c("spacing-20"),"link-gap":c("spacing-12"),"section-gap":c("spacing-8"),"link-padding-y":c("spacing-2"),"link-padding-x":c("spacing-4")}},Fl={"named-list-item":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-20"),"subtext-padding-with-icon":c("spacing-20")}},Al={"error-list-item":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-26"),"padding-x":c("spacing-4"),"padding-y":c("spacing-12"),"background-color":c("color-white"),"background-color-overview":c("color-grey10"),"background-color-hover":c("color-grey10"),"background-color-overview-hover":c("color-white"),"border-color":c("color-grey20"),"border-radius":c("spacing-2")}},Ll={"ingredient-card":{border:c("border-sm"),"border-color":c("color-grey20"),"border-color-selected":c("color-primary"),padding:c("spacing-12"),"padding-small":c("spacing-8"),"border-radius":c("spacing-2"),"row-gap":c("spacing-4"),"column-gap":c("spacing-4")}},Bl={"branded-header":{"startColor-settings":"#048FEC","startColor-devices":"#9747FF","startColor-tools":"#01528A","startColor-performance":"#B4DEFA","endColor-viewBrowse":"#1C00D8","endColor-configure":"#4CC9F0","endColor-manage":"#9A99F2","endColor-troubleshoot":"#53D7C7","endColor-store":"#193C60","endColor-main":"#048FEC","border-bottom-size":c("border-sm"),"border-bottom-color":c("color-grey20"),"background-color":c("color-white"),"column-gap":c("spacing-16"),padding:"12px 20px","badge-size":"52px","badge-radius":"0","line-height":c("spacing-6"),"info-column-gap":c("spacing-10"),"text-wrapper-gap":c("spacing-4")}},Wl={"artifact-store-settings":{"row-columns-published":"minmax(96px, 1fr) 64px minmax(244px, 2fr) 96px 60px","row-columns-market":"minmax(96px, 1fr) 64px minmax(244px, 2fr)","row-divider-color":c("color-grey20"),"row-gap":c("spacing-4"),"header-padding":"0px 8px 0px 4px","cell-padding":"12px 8px 12px 4px","name-column-gap":c("spacing-4")}},Pl={table:{"row-border-bottom-size":c("border-xsm"),"border-color":c("color-grey20"),"header-background-color-hover":c("color-grey20"),"header-background-color":c("color-grey15"),"cell-padding-x":c("spacing-4"),"cell-padding-y":"11px","cell-padding-right-sortable":c("spacing-8"),"cell-padding-left-first-in-row":c("spacing-8"),"head-gap-sortable":c("spacing-4"),"background-color":c("color-white"),"head-font-size":c("font-size-med"),"head-color":c("color-black"),"head-font-weight":c("font-weight-bold"),"cell-font-size":c("font-size-med"),"cell-color":c("color-black"),"cell-font-weight":c("font-weight-normal"),"font-family":c("font-family-default")}},Vl={"resizable-panels":{"border-color":c("color-grey20"),"border-color-hover":c("color-grey30"),"border-color-drag":c("color-grey40"),"handle-width":c("border-sm")}},Hl={"file-picker":{"background-color":c("color-grey10"),"background-color-accent":c("color-white"),"selected-background":c("color-primary"),"header-x-padding":c("spacing-20"),"header-y-padding":c("spacing-12"),"header-border-size":c("border-sm"),"header-gap":c("spacing-8"),"header-border-color":c("color-grey20"),"footer-padding-x":c("spacing-12"),"footer-padding-y":c("spacing-10"),"footer-controls-gap":c("spacing-4"),"footer-border-size":c("border-xsm"),"footer-border-color":c("color-grey20"),"search-bar-height":c("spacing-36"),"search-bar-border-size":c("border-sm"),"search-bar-border-color":c("color-grey30"),"search-bar-nav-buttons-gap":c("spacing-12"),"search-bar-padding-x":c("spacing-20"),"search-bar-padding-y":"6.5px","search-bar-radius":c("spacing-2"),"search-bar-edit-button-width":c("spacing-22"),"search-bar-breadcrumb-padding-x":c("spacing-4"),"search-bar-breadcrumb-hover-border":c("color-grey50"),"search-bar-export-button-radius":c("spacing-2"),"search-bar-export-button-background":c("color-primary"),"search-bar-export-button-background-disabled":c("color-grey30"),"nav-panel-y-padding":c("spacing-20"),"nav-panel-x-padding":c("spacing-20"),"nav-panel-gap":c("spacing-40"),"nav-panel-header-bottom-margin":c("spacing-4"),"nav-panel-section-gap":c("spacing-4"),"nav-panel-item-gap":c("spacing-4"),"nav-panel-item-y-padding":c("spacing-2"),"explorer-panel-right-gutter-size":c("spacing-12"),"explorer-panel-padding-y":c("spacing-4"),"explorer-panel-padding-x":c("spacing-10"),"explorer-panel-gap":c("spacing-4"),"explorer-panel-item-padding-x":c("spacing-4"),"explorer-panel-item-padding-y":c("spacing-2"),"explorer-panel-item-icon-gap-left":c("spacing-4"),"explorer-panel-item-icon-gap-right":c("spacing-4"),"explorer-panel-kab-background":c("color-grey10"),"preview-details-gap":c("spacing-10"),"preview-details-gap-small":c("spacing-8"),"preview-icon-size":c("spacing-40"),"preview-icon-y-padding":c("spacing-40"),"preview-icon-y-padding-small":c("spacing-12"),"preview-details-x-padding":c("spacing-20"),"preview-details-x-padding-small":c("spacing-8"),"preview-details-y-padding":c("spacing-10"),"preview-details-item-gap":c("spacing-8"),"preview-details-collapsible-bg":c("color-grey10"),"preview-details-collapsible-gap":c("spacing-4"),"preview-details-collapsible-y-padding":c("spacing-4"),"preview-details-collapsible-border-color":c("color-grey20")}},Ul={"shell-icon-button":{padding:"5px"}},Gl={"multi-select":{"list-padding":c("spacing-4"),"padding-x":c("spacing-12"),"padding-y":c("spacing-4"),"border-radius":c("spacing-6"),border:c("border-sm"),"border-color":c("color-grey20"),"select-all-border-color":c("color-grey10"),"hover-border-color":c("color-grey40"),gap:c("spacing-4"),background:c("color-white"),"item-padding-x":c("spacing-12"),"item-padding-y":c("spacing-4"),"item-gap":c("spacing-8"),"item-hover-bg":c("color-grey10"),"selected-item-padding-y":c("spacing-2"),"selected-item-padding-x":c("spacing-4"),"selected-item-gap":c("spacing-4"),"selected-item-background":c("color-grey10"),"selected-item-background-hover":c("color-grey20"),"selected-item-radius":c("spacing-4")}},Kl={badge:{"color-blue":c("color-blue"),"color-blue-border":"rgba(4, 143, 236, 0.5)","color-red":c("color-red"),"color-red-border":"rgba(244, 0, 0, 0.5)","color-white":c("color-white"),"color-white-border":"rgba(255, 255, 255, 0.5)","color-black":c("color-black"),"color-black-border":"rgba(0, 0, 0, 0.5)","color-orange":c("color-orange"),"color-orange-border":"rgba(255, 133, 0, 0.5)","color-green":c("color-green"),"color-green-border":"rgba(82, 196, 26, 0.5)"}},Yl={"button-group":{gap:c("spacing-2"),"background-color":"transparent","border-radius":c("spacing-4"),"border-width":"0","border-color":"transparent",padding:"0","item-padding":c("spacing-4"),"item-border-radius":c("spacing-4"),"item-background-color":"transparent","item-background-color-hover":"rgba(0, 0, 0, 0.08)","item-background-color-active":"rgba(0, 0, 0, 0.15)","item-color":c("color-grey50"),"item-color-active":c("color-black")}},ql={"named-collapsible-branch":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-12"),"subtext-padding-with-icon":c("spacing-12")}},Zl={notification:{"bg-success":c("color-white"),"bg-error":c("color-white"),"bg-warning":c("color-white"),"bg-info":c("color-white"),"border-success":c("color-green"),"border-error":c("color-red"),"border-warning":c("color-orange"),"border-info":c("color-blue"),"icon-success":c("color-green"),"icon-error":c("color-red"),"icon-warning":c("color-orange"),"icon-info":c("color-blue"),"border-outer":c("color-grey20"),"border-outer-dark":c("color-grey70"),"color-title":c("color-black"),"color-message":c("color-grey60"),"color-close":c("color-grey50"),"color-action":c("color-blue"),"bg-action-hover":c("color-grey10"),"bg-close-hover":c("color-grey10"),"bg-success-dark":c("color-grey80"),"bg-error-dark":c("color-grey80"),"bg-warning-dark":c("color-grey80"),"bg-info-dark":c("color-grey80"),"bg-action-hover-dark":c("color-grey70"),"bg-close-hover-dark":c("color-grey70"),"color-title-dark":c("color-grey10"),"color-message-dark":c("color-grey40")}},Xl={"studio-list-item":{"column-gap":c("spacing-6"),"row-gap":c("spacing-4"),"color-selected":c("color-white"),"background-color-selected":c("color-primary"),"padding-y":c("spacing-4"),"padding-right":c("spacing-12"),"padding-left":c("spacing-12"),"subtext-padding-with-icon":c("spacing-12")}},Jl={"studio-shell":{"bg-start":R("color-navy0"),"bg-end":R("color-navy1"),"text-color":R("color-slate0"),"text-muted":R("color-slate1"),"border-color":R("color-slate2"),"content-bg":R("color-grey5"),"panel-bg":c("color-white"),"panel-border":R("color-grey25"),"status-online":R("color-green1"),"status-offline":R("color-red1"),"accent-color":R("color-blue50"),"accent-hover":R("color-blue60")}},Ql={view:{"background-color":c("color-white"),"border-color":c("color-grey20"),"border-width":"1px","border-radius":c("spacing-4"),"content-padding":"0"},"view-header":{"background-color":c("color-grey10"),"border-color":c("color-grey20"),"border-bottom-width":"1px",padding:`${c("spacing-8")} ${c("spacing-12")}`,gap:c("spacing-8"),"left-gap":c("spacing-8"),"text-gap":c("spacing-2"),"actions-gap":c("spacing-4"),"content-min-height":"22px","subtitle-font-size":c("font-size-sm")}},ec={"view-container":{"vertical-gap":"0","horizontal-gap":c("spacing-16"),padding:"0","background-color":"transparent"}},tc={...al,...ll,...cl,...dl,...ul,...pl,...hl,...fl,...gl,...ml,...bl,...xl,...yl,...vl,...kl,...wl,...Cl,...$l,...Sl,...jl,...Il,...Dl,..._l,...Tl,...El,...zl,...Ml,...Ol,...Kl,...Yl,...Rl,...Nl,...Fl,...Al,...Ll,...Bl,...Wl,...Pl,...Vl,...Hl,...Ul,...Gl,...ql,...Zl,...Xl,...Jl,...Ql,...ec},oc={color:{grey0:"#FFFFFF",grey10:"#F6F6F6",grey15:"#F1F1F1",grey20:"#DFDFDF",grey30:"#D9D9D9",grey40:"#C4C4C4",grey50:"#ABABAB",grey60:"#868686",grey65:"#676767",grey70:"#484848",grey80:"#2F2F2F",grey100:"#262626",blue0:"#E6F7FF",blue10:"#C8E8FF",blue20:"#40A9FF",blue30:"#048FEC",blue40:"#096DD9",green0:"#52C41A",red0:"#F40000",orange0:"#FF8500",purple0:"#9747FF",yellow0:"#fffd87",yellow1:"#FFD600",navy0:"#082F49",navy1:"#036AA1",slate0:"#cdd6f4",slate1:"#6c7086",slate2:"#313244",green1:"#a6e3a1",red1:"#f38ba8",blue50:"#89b4fa",blue60:"#b4befe",grey5:"#f5f5f7",grey25:"#e5e5e5"}},nc={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","24px":"24px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},rc={spacing:{"0-5px":"0.5px","1px":"1px","2px":"2px","3px":"3px","4px":"4px","6px":"6px","7px":"7px","8px":"8px","10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","22px":"22px","24px":"24px","26px":"26px","28px":"28px","30px":"30px","32px":"32px","34px":"34px","36px":"36px","40px":"40px"}},sc={...oc,...nc,...rc},ic={color:{white:R("color-grey0"),grey10:R("color-grey10"),grey15:R("color-grey15"),grey20:R("color-grey20"),grey30:R("color-grey30"),grey40:R("color-grey40"),grey50:R("color-grey50"),grey60:R("color-grey60"),grey65:R("color-grey65"),grey70:R("color-grey70"),grey80:R("color-grey80"),black:R("color-grey100"),primary:R("color-blue30"),primaryLight:R("color-blue0"),additional1:R("color-blue20"),additional2:R("color-blue40"),additional3:R("color-blue10"),green:R("color-green0"),orange:R("color-orange0"),red:R("color-red0"),purple:R("color-purple0"),blue:R("color-blue30"),yellow:R("color-yellow0")}},ac={"font-size":{sm:R("font-size-10px"),med:R("font-size-12px"),lrg:R("font-size-14px"),xlrg:R("font-size-16px")},"font-weight":{normal:R("font-weight-400"),bold:R("font-weight-700")},"font-family":{default:R("font-family-Arial")},"line-height":{default:R("line-height-120")}},lc={spacing:{2:R("spacing-2px"),4:R("spacing-4px"),6:R("spacing-6px"),7:R("spacing-7px"),8:R("spacing-8px"),10:R("spacing-10px"),12:R("spacing-12px"),14:R("spacing-14px"),16:R("spacing-16px"),18:R("spacing-18px"),20:R("spacing-20px"),22:R("spacing-22px"),24:R("spacing-24px"),26:R("spacing-26px"),28:R("spacing-28px"),30:R("spacing-30px"),32:R("spacing-32px"),34:R("spacing-34px"),36:R("spacing-36px"),40:R("spacing-40px")},border:{xsm:R("spacing-0-5px"),sm:R("spacing-1px"),med:R("spacing-2px"),lrg:R("spacing-3px")}},cc={...ic,...ac,...lc},gn=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),dc=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=l=>l.map(a=>(u,p)=>zt(`--${o}-${String(a)}-${u}`,p)),s=z.css`
|
|
1
|
+
"use strict";var rl=Object.defineProperty;var sl=(e,t,o)=>t in e?rl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var E=(e,t,o)=>(sl(e,typeof t!="symbol"?t+"":t,o),o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),d=require("react"),f=require("@emotion/styled"),M=require("@emotion/react"),os=require("react-dom"),A=require("@floating-ui/react"),il=require("@use-gesture/react"),X=require("date-fns"),K=require("react-hook-form"),W=require("@kosdev-code/kos-ui-sdk"),Tt=require("mobx-react-lite"),T=require("mobx"),Ce=require("@tanstack/react-table");function al(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const ho=al(d),ll=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},cl=e=>e instanceof RegExp,dl=e=>typeof e=="string",ul=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},pl=(e,t,o)=>{if(e===""||t==="")return e;let n=t;cl(n)||(n=new RegExp("("+ll(n)+")","gi"));const r=e.split(n);for(let s=1,c=r.length;s<c;s+=2){if(r[s]===void 0||r[s-1]===void 0){console.warn("Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}r[s]=o(r[s],s)}return r},ns=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),ul(n.map(r=>dl(r)?pl(r,t,o):r))},Et=(e,t)=>t?e:`var(${e})`,R=(e,t)=>Et(`--studio-g-${e}`,t),l=(e,t)=>Et(`--studio-s-${e}`,t),hl={"actionable-blurb":{"row-gap":l("spacing-4"),"icon-column-width":l("spacing-20")}},gl={"app-shell":{"bg-default":l("color-grey80"),"bg-offline":l("color-grey70"),"bg-locked":l("color-grey60"),color:l("color-white")}},fl={"artifact-drawer":{"background-color":l("color-grey10"),"border-color":l("color-grey20"),"border-width":l("border-sm"),"padding-x":l("spacing-16"),"branch-padding-x":l("spacing-8"),"artifact-list-y-padding":l("spacing-10"),"artifact-items-gap":l("spacing-10"),"version-items-gap":l("spacing-8"),"version-list-padding":l("spacing-8")}},ml={checkbox:{"background-color":l("color-white"),"border-color":l("color-grey30"),"background-color-disabled":l("color-grey15"),"background-color-checked":l("color-primary"),"border-color-checked":l("color-primary"),"background-color-checked-disabled":l("color-additional3"),"border-color-checked-disabled":l("color-additional3"),size:"14px","border-radius":l("spacing-2"),"border-width":l("border-sm")}},bl={"collapsible-artifact":{"background-color":l("color-white"),"border-color":l("color-grey20"),"border-radius":l("spacing-6"),"border-width":l("border-xsm"),"button-left-or-right":l("spacing-4"),"button-top":"3px","name-and-desc-spacing":l("spacing-2"),"name-and-selected-spacing":l("spacing-8"),padding:`${l("spacing-6")} ${l("spacing-8")}`},"collapsible-artifact-version":{"background-color-hover":l("color-grey20"),"background-color-inherited":"#9747FF12","background-color-selected":l("color-additional3"),"background-color":l("color-grey10"),"border-color-hover":l("color-grey30"),"border-color-inherited":"#9747FF33","border-color-selected":l("color-primary"),"border-color":l("color-grey20"),"border-radius":l("spacing-2"),"border-width":l("border-sm"),padding:`${l("spacing-6")} ${l("spacing-8")}`}},xl={"collapsible-list-container":{"border-radius":l("spacing-2"),"border-width":"0.5px","border-color":l("color-grey20")},"collapsible-list-header-container":{"background-color":l("color-grey10"),gap:l("spacing-8"),padding:"7px 8px"},"collapsible-list-toggled-container":{"background-color":l("color-white"),gap:l("spacing-8"),padding:l("spacing-8")}},yl={drawer:{"header-height":l("spacing-30"),"header-bg":l("color-grey10"),"header-border-size":"1px","header-border-color":l("color-grey20"),"header-x-padding":l("spacing-10"),"border-width":"1px","border-color":l("color-grey20"),"left-drop-shadow":"4px 0px 8px -1px rgba(0,0,0,0.2)","right-drop-shadow":"-4px 0px 8px -1px rgba(0,0,0,0.2)"}},vl={form:{"access-toggle-gap":l("spacing-16"),"access-toggle-height":l("spacing-36"),"error-message-top-margin":l("spacing-4"),"label-column-gap":l("spacing-16"),"label-error-color":l("color-red"),"label-font-family":l("font-family-default"),"label-font-size":l("font-size-med"),"label-font-weight":l("font-weight-normal"),"label-height":"14px","label-line-height":l("line-height-default"),"label-star-padding":l("spacing-4"),"label-width":"112px","label-area-padding":`${l("spacing-7")} 0`}},kl={"horizontal-rule":{"border-width":"0.5px","border-color":l("color-grey20")}},wl={"icon-button":{padding:"0","border-radius":l("spacing-2"),"background-color":"transparent","border-color":"transparent",cursor:"pointer","disabled-cursor":"not-allowed","badge-fill-black":l("color-black"),"badge-fill-blue":l("color-primary"),"badge-fill-green":l("color-green"),"badge-fill-grey":l("color-grey50"),"badge-fill-orange":l("color-orange"),"badge-fill-purple":l("color-purple"),"badge-fill-red":l("color-red"),"badge-fill-white":l("color-white"),"badge-fill-yellow":l("color-yellow"),"badge-right":"1px","badge-top":"1px","active-background-color":"rgba(255, 255, 255, 0.3)","padding-4":l("spacing-4"),"padding-8":l("spacing-8"),radius:l("spacing-4")}},Cl={icon:{"fill-black":l("color-black"),"fill-blue":l("color-primary"),"fill-green":l("color-green"),"fill-grey":l("color-grey50"),"fill-orange":l("color-orange"),"fill-purple":l("color-purple"),"fill-red":l("color-red"),"fill-white":l("color-white"),"fill-yellow":l("color-yellow"),"size-lrg":l("spacing-18"),"size-med":l("spacing-16"),"size-sm":l("spacing-14"),"size-xlrg":l("spacing-20"),"size-xsm":l("spacing-12"),"size-xxlrg":l("spacing-22"),"size-xxxlrg":l("spacing-32"),"size-xxsm":l("spacing-10")}},$l={"image-config-page-header":{gap:l("spacing-16"),"padding-bottom":l("spacing-12"),"title-gap":l("spacing-8"),bg:l("color-white")}},jl={input:{"background-color-disabled":l("color-grey10"),"background-color":l("color-white"),"border-color-active":l("color-black"),"border-color-invalid":l("color-red"),"border-color":l("color-grey30"),"border-radius":l("spacing-2"),"border-width":l("border-sm"),"color-disabled":l("color-grey30"),"font-family":l("font-family-default"),"font-size-small":l("font-size-sm"),"font-size":l("font-size-med"),"font-weight":l("font-weight-normal"),"icon-left":l("spacing-8"),"line-height":l("line-height-default"),"padding-left-icon":l("spacing-28"),"padding-right-icon":l("spacing-28"),"padding-x":l("spacing-8"),"padding-y-small":"2px","padding-y":l("spacing-7"),color:l("color-black"),height:"28px"}},Sl={link:{"font-size-med":l("font-size-med"),"font-size-sm":l("font-size-sm"),"font-size-lrg":l("font-size-lrg"),"font-size-xlrg":l("font-size-xlrg"),"font-family":l("font-family-default"),"font-weight":l("font-weight-bold"),"line-height":l("line-height-default"),color:l("color-primary"),"color-hover":l("color-additional1"),"color-active":l("color-additional2"),"color-disabled":l("color-grey30")}},Il={modal:{"overlay-background":"rgba(0, 0, 0, 0.8)","background-color":l("color-white"),headerPadding:l("spacing-10"),headerGap:l("spacing-8"),contentYPadding:l("spacing-10"),contentXPadding:l("spacing-12"),footerYPadding:l("spacing-10"),footerXPadding:l("spacing-12"),footerGap:l("spacing-8"),"border-width":l("border-sm"),"border-color":l("color-grey20"),"base-content-width":"400xp"}},Dl={"named-section":{"border-radius":"6px","border-width":"0.5px","selected-border-width":"2px","hover-border-width":l("border-sm"),"border-color":l("color-grey20"),"selected-border-color":l("color-primary")},"named-section-header":{bg:l("color-grey10"),"border-width":"0.5px","border-color":l("color-grey20"),"border-radius":"2px",padding:"8px 10px",gap:l("spacing-8"),"row-gap":l("spacing-4")}},_l={segmented:{"border-width":l("border-sm"),"border-radius":l("spacing-2"),padding:l("spacing-2"),"background-color":l("color-grey15"),"border-color":l("color-grey20"),"button-color":l("color-grey60"),"button-color-disabled":l("color-grey40"),"button-background-color":l("color-grey15"),"button-background-color-hover":l("color-grey20"),"button-background-color-active":l("color-grey40"),"button-padding-y":"5px","button-padding-x":"11px","button-border-width":l("border-sm"),"button-border-color":"transparent","button-font-size":l("font-size-med"),"button-font-weight":l("font-weight-normal"),"button-font-family":l("font-family-default"),"button-gap":l("spacing-4"),"indicator-background-color":l("color-white"),"indicator-color":l("color-black")}},Tl={select:{"font-size":l("font-size-med"),"border-size":l("border-sm"),"border-color":l("color-grey20")},option:{"column-gap":l("spacing-8"),"font-family":l("font-family-default"),"font-size":l("font-size-med"),"bg-color-active":l("color-grey20"),"bg-color":l("color-white"),"font-weight-selected":l("font-weight-bold"),color:l("color-black"),"color-disabled":l("color-grey40"),padding:"2px 4px"}},El={button:{xpadding:l("spacing-16"),ypadding:l("spacing-6"),br:l("spacing-2"),cursor:"pointer","line-height":l("line-height-default"),"font-size":l("font-size-med"),"ypadding-small":l("spacing-2"),"border-width":"1px","font-weight":l("font-weight-bold"),"icon-margin":`0px ${l("spacing-4")} 0px 0px`,"flex-direction":"row",bg:l("color-primary"),"bg-hover":l("color-additional1"),"bg-active":l("color-additional2"),"bg-disabled":l("color-grey30"),border:l("color-primary"),"border-hover":l("color-additional1"),"border-active":l("color-additional2"),"border-disabled":l("color-grey30"),color:l("color-white"),"color-hover":l("color-white"),"color-active":l("color-white"),"color-disabled":l("color-white"),"bg-secondary":l("color-white"),"bg-hover-secondary":l("color-white"),"bg-active-secondary":l("color-white"),"bg-disabled-secondary":l("color-grey10"),"border-secondary":l("color-primary"),"border-hover-secondary":l("color-additional1"),"border-active-secondary":l("color-additional2"),"border-disabled-secondary":l("color-grey30"),"color-secondary":l("color-primary"),"color-hover-secondary":l("color-additional1"),"color-active-secondary":l("color-additional2"),"color-disabled-secondary":l("color-grey30"),"bg-borderless":l("color-white"),"bg-hover-borderless":l("color-white"),"bg-active-borderless":l("color-white"),"bg-disabled-borderless":l("color-white"),"border-borderless":l("color-white"),"border-hover-borderless":l("color-white"),"border-active-borderless":l("color-white"),"border-disabled-borderless":l("color-white"),"color-borderless":l("color-primary"),"color-hover-borderless":l("color-additional1"),"color-active-borderless":l("color-additional2"),"color-disabled-borderless":l("color-grey30")}},zl={label:{gap:l("spacing-4")},"label-with-action":{gap:l("spacing-8")},"label-with-content-link":{color:l("color-primary")}},Ml={text:{"font-family":l("font-family-default"),"line-height":l("line-height-default"),"h1-size":l("font-size-xlrg"),"h2-size":l("font-size-lrg"),"body-size":l("font-size-med"),"small-size":l("font-size-sm"),"font-weight-bold":l("font-weight-bold"),"font-weight-normal":l("font-weight-normal"),"color-dark":l("color-black"),"color-light":l("color-white"),"color-green":l("color-green"),"color-purple":l("color-purple"),"color-red":l("color-red"),"color-blue":l("color-primary"),"color-grey":l("color-grey60"),"color-disabled":l("color-grey40"),"color-yellow":l("color-yellow"),"color-orange":l("color-orange")}},Ol={tab:{"trigger-padding-y":l("spacing-8"),"trigger-padding-x":"0","column-gap":l("spacing-8"),"indicator-height":l("border-lrg"),"indicator-color":l("color-grey60"),"trigger-list-underline-color":l("color-grey20"),"trigger-list-underline-height":l("border-sm"),"standard-active-color":l("color-grey80"),"standard-active-bg":"transparent","standard-inactive-color":l("color-grey50"),"standard-inactive-bg":l("color-grey10"),"standard-separator-color":l("color-grey20"),"badge-min-width":"18px","badge-height":"18px","badge-padding":`0 ${l("spacing-4")}`,"badge-border-radius":"9px","badge-bg":l("color-primary"),"badge-color":l("color-white"),"badge-font-size":"11px","close-size":"18px","close-border-radius":l("spacing-4"),"close-hover-bg":l("color-grey20"),"close-color":l("color-grey50")}},Rl={tag:{"font-family":l("font-family-default"),"bg-color-orange":l("color-orange"),"bg-color-light":l("color-white"),"bg-color-green":l("color-green"),"bg-color-red":l("color-red"),"bg-color-purple":l("color-purple"),"bg-color-blue":l("color-blue"),"bg-color-disabled":l("color-white"),"color-light":l("color-white"),"color-dark":l("color-black"),"color-disabled":l("color-grey40"),"border-radius":l("border-sm"),"border-color":l("color-grey20"),height:l("spacing-18"),padding:"0px 4px"}},Nl={textarea:{padding:l("spacing-8"),"background-color":l("color-white"),"font-size":l("font-size-med"),"font-family":l("font-family-default"),"font-weight":l("font-weight-normal"),color:l("color-black"),"border-width":l("border-sm"),"border-color":l("color-grey30"),"min-height":"60px","border-color-active":l("color-black"),"border-radius":l("spacing-2"),"border-color-invalid":l("color-red"),"background-color-disabled":l("color-grey10"),"color-disabled":l("color-grey30")}},Fl={"toggle-container":{gap:"4px"},"toggle-track":{"background-color-checked-disabled":l("color-additional3"),"background-color-checked-enabled":l("color-primary"),"background-color-unchecked-disabled":l("color-grey20"),"background-color-unchecked-enabled":l("color-grey50"),"border-radius":l("spacing-20"),"padding-horizontal":"3px","padding-vertical":"2px","transition-duration":"150ms"},"toggle-thumb":{"background-color-checked-enabled":l("color-white"),"background-color-checked-disabled":l("color-white"),"background-color-unchecked-enabled":l("color-white"),"background-color-unchecked-disabled":l("color-grey15"),"border-radius":"15px","box-shadow":"0px 1px 3px 0px rgba(16, 24, 40, 0.1), 0px 1px 2px -1px rgba(16, 24, 40, 0.1)",height:"8px",width:"8px","transition-duration":"150ms"}},Al={"version-list-container":{gap:l("spacing-16")},"version-list-header":{gap:l("spacing-8"),itemBorderBottom:l("color-grey20"),itemBgColor:l("color-grey10")}},Ll={combobox:{"background-color-active":l("color-grey15"),"background-color-selected":l("color-additional3"),"background-color":l("color-white"),"border-radius":"4px","box-shadow":"0px 0px 4px 0px rgba(0, 0, 0, 0.25)","input-border-radius":"6px","option-column-gap":l("spacing-4"),"row-gap":l("spacing-6"),"selection-border-radius":"4px",height:"22px",padding:l("spacing-8")}},Bl={"radio-button":{size:l("spacing-14"),"check-size":l("spacing-8"),"border-color":l("color-grey20"),"background-color":l("color-white"),"border-width":l("border-sm"),"border-radius":"50%","border-color-checked":l("color-primary"),"background-color-disabled":l("color-grey10")}},Wl={"select-view-list":{"item-height":l("spacing-36"),"padding-left":l("spacing-16"),"padding-right":l("spacing-8"),"border-width":l("border-sm"),"border-color":l("color-grey20"),"background-color":l("color-white"),"background-color-viewing":l("color-grey15"),gap:l("spacing-4")}},Pl={"shell-menu":{"padding-x":l("spacing-20"),"link-gap":l("spacing-12"),"section-gap":l("spacing-8"),"link-padding-y":l("spacing-2"),"link-padding-x":l("spacing-4")}},Vl={"named-list-item":{"column-gap":l("spacing-6"),"row-gap":l("spacing-4"),"color-selected":l("color-white"),"background-color-selected":l("color-primary"),"padding-y":l("spacing-4"),"padding-right":l("spacing-12"),"padding-left":l("spacing-20"),"subtext-padding-with-icon":l("spacing-20")}},Hl={"error-list-item":{"row-gap":l("spacing-4"),"icon-column-width":l("spacing-26"),"padding-x":l("spacing-4"),"padding-y":l("spacing-12"),"background-color":l("color-white"),"background-color-overview":l("color-grey10"),"background-color-hover":l("color-grey10"),"background-color-overview-hover":l("color-white"),"border-color":l("color-grey20"),"border-radius":l("spacing-2")}},Ul={"ingredient-card":{border:l("border-sm"),"border-color":l("color-grey20"),"border-color-selected":l("color-primary"),padding:l("spacing-12"),"padding-small":l("spacing-8"),"border-radius":l("spacing-2"),"row-gap":l("spacing-4"),"column-gap":l("spacing-4")}},Gl={"branded-header":{"startColor-settings":"#048FEC","startColor-devices":"#9747FF","startColor-tools":"#01528A","startColor-performance":"#B4DEFA","endColor-viewBrowse":"#1C00D8","endColor-configure":"#4CC9F0","endColor-manage":"#9A99F2","endColor-troubleshoot":"#53D7C7","endColor-store":"#193C60","endColor-main":"#048FEC","border-bottom-size":l("border-sm"),"border-bottom-color":l("color-grey20"),"background-color":l("color-white"),"column-gap":l("spacing-16"),padding:"12px 20px","badge-size":"52px","badge-radius":"0","line-height":l("spacing-6"),"info-column-gap":l("spacing-10"),"text-wrapper-gap":l("spacing-4")}},Kl={"artifact-store-settings":{"row-columns-published":"minmax(96px, 1fr) 64px minmax(244px, 2fr) 96px 60px","row-columns-market":"minmax(96px, 1fr) 64px minmax(244px, 2fr)","row-divider-color":l("color-grey20"),"row-gap":l("spacing-4"),"header-padding":"0px 8px 0px 4px","cell-padding":"12px 8px 12px 4px","name-column-gap":l("spacing-4")}},Yl={table:{"row-border-bottom-size":l("border-xsm"),"border-color":l("color-grey20"),"header-background-color-hover":l("color-grey20"),"header-background-color":l("color-grey15"),"cell-padding-x":l("spacing-4"),"cell-padding-y":"11px","cell-padding-right-sortable":l("spacing-8"),"cell-padding-left-first-in-row":l("spacing-8"),"head-gap-sortable":l("spacing-4"),"background-color":l("color-white"),"head-font-size":l("font-size-med"),"head-color":l("color-black"),"head-font-weight":l("font-weight-bold"),"cell-font-size":l("font-size-med"),"cell-color":l("color-black"),"cell-font-weight":l("font-weight-normal"),"font-family":l("font-family-default")}},ql={"resizable-panels":{"border-color":l("color-grey20"),"border-color-hover":l("color-grey30"),"border-color-drag":l("color-grey40"),"handle-width":l("border-sm")}},Zl={"file-picker":{"background-color":l("color-grey10"),"background-color-accent":l("color-white"),"selected-background":l("color-primary"),"header-x-padding":l("spacing-20"),"header-y-padding":l("spacing-12"),"header-border-size":l("border-sm"),"header-gap":l("spacing-8"),"header-border-color":l("color-grey20"),"footer-padding-x":l("spacing-12"),"footer-padding-y":l("spacing-10"),"footer-controls-gap":l("spacing-4"),"footer-border-size":l("border-xsm"),"footer-border-color":l("color-grey20"),"search-bar-height":l("spacing-36"),"search-bar-border-size":l("border-sm"),"search-bar-border-color":l("color-grey30"),"search-bar-nav-buttons-gap":l("spacing-12"),"search-bar-padding-x":l("spacing-20"),"search-bar-padding-y":"6.5px","search-bar-radius":l("spacing-2"),"search-bar-edit-button-width":l("spacing-22"),"search-bar-breadcrumb-padding-x":l("spacing-4"),"search-bar-breadcrumb-hover-border":l("color-grey50"),"search-bar-export-button-radius":l("spacing-2"),"search-bar-export-button-background":l("color-primary"),"search-bar-export-button-background-disabled":l("color-grey30"),"nav-panel-y-padding":l("spacing-20"),"nav-panel-x-padding":l("spacing-20"),"nav-panel-gap":l("spacing-40"),"nav-panel-header-bottom-margin":l("spacing-4"),"nav-panel-section-gap":l("spacing-4"),"nav-panel-item-gap":l("spacing-4"),"nav-panel-item-y-padding":l("spacing-2"),"explorer-panel-right-gutter-size":l("spacing-12"),"explorer-panel-padding-y":l("spacing-4"),"explorer-panel-padding-x":l("spacing-10"),"explorer-panel-gap":l("spacing-4"),"explorer-panel-item-padding-x":l("spacing-4"),"explorer-panel-item-padding-y":l("spacing-2"),"explorer-panel-item-icon-gap-left":l("spacing-4"),"explorer-panel-item-icon-gap-right":l("spacing-4"),"explorer-panel-kab-background":l("color-grey10"),"preview-details-gap":l("spacing-10"),"preview-details-gap-small":l("spacing-8"),"preview-icon-size":l("spacing-40"),"preview-icon-y-padding":l("spacing-40"),"preview-icon-y-padding-small":l("spacing-12"),"preview-details-x-padding":l("spacing-20"),"preview-details-x-padding-small":l("spacing-8"),"preview-details-y-padding":l("spacing-10"),"preview-details-item-gap":l("spacing-8"),"preview-details-collapsible-bg":l("color-grey10"),"preview-details-collapsible-gap":l("spacing-4"),"preview-details-collapsible-y-padding":l("spacing-4"),"preview-details-collapsible-border-color":l("color-grey20")}},Xl={"shell-icon-button":{padding:"5px"}},Jl={"multi-select":{"list-padding":l("spacing-4"),"padding-x":l("spacing-12"),"padding-y":l("spacing-4"),"border-radius":l("spacing-6"),border:l("border-sm"),"border-color":l("color-grey20"),"select-all-border-color":l("color-grey10"),"hover-border-color":l("color-grey40"),gap:l("spacing-4"),background:l("color-white"),"item-padding-x":l("spacing-12"),"item-padding-y":l("spacing-4"),"item-gap":l("spacing-8"),"item-hover-bg":l("color-grey10"),"selected-item-padding-y":l("spacing-2"),"selected-item-padding-x":l("spacing-4"),"selected-item-gap":l("spacing-4"),"selected-item-background":l("color-grey10"),"selected-item-background-hover":l("color-grey20"),"selected-item-radius":l("spacing-4")}},Ql={badge:{"color-blue":l("color-blue"),"color-blue-border":"rgba(4, 143, 236, 0.5)","color-red":l("color-red"),"color-red-border":"rgba(244, 0, 0, 0.5)","color-white":l("color-white"),"color-white-border":"rgba(255, 255, 255, 0.5)","color-black":l("color-black"),"color-black-border":"rgba(0, 0, 0, 0.5)","color-orange":l("color-orange"),"color-orange-border":"rgba(255, 133, 0, 0.5)","color-green":l("color-green"),"color-green-border":"rgba(82, 196, 26, 0.5)"}},ec={"button-group":{gap:l("spacing-2"),"background-color":"transparent","border-radius":l("spacing-4"),"border-width":"0","border-color":"transparent",padding:"0","item-padding":l("spacing-4"),"item-border-radius":l("spacing-4"),"item-background-color":"transparent","item-background-color-hover":"rgba(0, 0, 0, 0.08)","item-background-color-active":"rgba(0, 0, 0, 0.15)","item-color":l("color-grey50"),"item-color-active":l("color-black")}},tc={"named-collapsible-branch":{"column-gap":l("spacing-6"),"row-gap":l("spacing-4"),"color-selected":l("color-white"),"background-color-selected":l("color-primary"),"padding-y":l("spacing-4"),"padding-right":l("spacing-12"),"padding-left":l("spacing-12"),"subtext-padding-with-icon":l("spacing-12")}},oc={notification:{"bg-success":l("color-white"),"bg-error":l("color-white"),"bg-warning":l("color-white"),"bg-info":l("color-white"),"border-success":l("color-green"),"border-error":l("color-red"),"border-warning":l("color-orange"),"border-info":l("color-blue"),"icon-success":l("color-green"),"icon-error":l("color-red"),"icon-warning":l("color-orange"),"icon-info":l("color-blue"),"border-outer":l("color-grey20"),"border-outer-dark":l("color-grey70"),"color-title":l("color-black"),"color-message":l("color-grey60"),"color-close":l("color-grey50"),"color-action":l("color-blue"),"bg-action-hover":l("color-grey10"),"bg-close-hover":l("color-grey10"),"bg-success-dark":l("color-grey80"),"bg-error-dark":l("color-grey80"),"bg-warning-dark":l("color-grey80"),"bg-info-dark":l("color-grey80"),"bg-action-hover-dark":l("color-grey70"),"bg-close-hover-dark":l("color-grey70"),"color-title-dark":l("color-grey10"),"color-message-dark":l("color-grey40")}},nc={"studio-list-item":{"column-gap":l("spacing-6"),"row-gap":l("spacing-4"),"color-selected":l("color-white"),"background-color-selected":l("color-primary"),"padding-y":l("spacing-4"),"padding-right":l("spacing-12"),"padding-left":l("spacing-12"),"subtext-padding-with-icon":l("spacing-12")}},rc={"studio-shell":{"bg-start":R("color-navy0"),"bg-end":R("color-navy1"),"text-color":R("color-slate0"),"text-muted":R("color-slate1"),"border-color":R("color-slate2"),"content-bg":R("color-grey5"),"panel-bg":l("color-white"),"panel-border":R("color-grey25"),"status-online":R("color-green1"),"status-offline":R("color-red1"),"accent-color":R("color-blue50"),"accent-hover":R("color-blue60")}},sc={view:{"background-color":l("color-white"),"border-color":l("color-grey20"),"border-width":"1px","border-radius":l("spacing-4"),"content-padding":"0"},"view-header":{"background-color":l("color-grey10"),"border-color":l("color-grey20"),"border-bottom-width":"1px",padding:`${l("spacing-8")} ${l("spacing-12")}`,gap:l("spacing-8"),"left-gap":l("spacing-8"),"text-gap":l("spacing-2"),"actions-gap":l("spacing-4"),"content-min-height":"22px","subtitle-font-size":l("font-size-sm")}},ic={"view-container":{"vertical-gap":"0","horizontal-gap":l("spacing-16"),padding:"0","background-color":"transparent"}},ac={...hl,...gl,...fl,...ml,...bl,...xl,...yl,...vl,...kl,...wl,...Cl,...$l,...jl,...Sl,...Il,...Dl,..._l,...Tl,...El,...zl,...Ml,...Ol,...Rl,...Nl,...Fl,...Al,...Ll,...Bl,...Ql,...ec,...Wl,...Pl,...Vl,...Hl,...Ul,...Gl,...Kl,...Yl,...ql,...Zl,...Xl,...Jl,...tc,...oc,...nc,...rc,...sc,...ic},lc={color:{grey0:"#FFFFFF",grey10:"#F6F6F6",grey15:"#F1F1F1",grey20:"#DFDFDF",grey30:"#D9D9D9",grey40:"#C4C4C4",grey50:"#ABABAB",grey60:"#868686",grey65:"#676767",grey70:"#484848",grey80:"#2F2F2F",grey100:"#262626",blue0:"#E6F7FF",blue10:"#C8E8FF",blue20:"#40A9FF",blue30:"#048FEC",blue40:"#096DD9",green0:"#52C41A",red0:"#F40000",orange0:"#FF8500",purple0:"#9747FF",yellow0:"#fffd87",yellow1:"#FFD600",navy0:"#082F49",navy1:"#036AA1",slate0:"#cdd6f4",slate1:"#6c7086",slate2:"#313244",green1:"#a6e3a1",red1:"#f38ba8",blue50:"#89b4fa",blue60:"#b4befe",grey5:"#f5f5f7",grey25:"#e5e5e5"}},cc={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","24px":"24px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},dc={spacing:{"0-5px":"0.5px","1px":"1px","2px":"2px","3px":"3px","4px":"4px","6px":"6px","7px":"7px","8px":"8px","10px":"10px","12px":"12px","14px":"14px","16px":"16px","18px":"18px","20px":"20px","22px":"22px","24px":"24px","26px":"26px","28px":"28px","30px":"30px","32px":"32px","34px":"34px","36px":"36px","40px":"40px"}},uc={...lc,...cc,...dc},pc={color:{white:R("color-grey0"),grey10:R("color-grey10"),grey15:R("color-grey15"),grey20:R("color-grey20"),grey30:R("color-grey30"),grey40:R("color-grey40"),grey50:R("color-grey50"),grey60:R("color-grey60"),grey65:R("color-grey65"),grey70:R("color-grey70"),grey80:R("color-grey80"),black:R("color-grey100"),primary:R("color-blue30"),primaryLight:R("color-blue0"),additional1:R("color-blue20"),additional2:R("color-blue40"),additional3:R("color-blue10"),green:R("color-green0"),orange:R("color-orange0"),red:R("color-red0"),purple:R("color-purple0"),blue:R("color-blue30"),yellow:R("color-yellow0")}},hc={"font-size":{sm:R("font-size-10px"),med:R("font-size-12px"),lrg:R("font-size-14px"),xlrg:R("font-size-16px")},"font-weight":{normal:R("font-weight-400"),bold:R("font-weight-700")},"font-family":{default:R("font-family-Arial")},"line-height":{default:R("line-height-120")}},gc={spacing:{2:R("spacing-2px"),4:R("spacing-4px"),6:R("spacing-6px"),7:R("spacing-7px"),8:R("spacing-8px"),10:R("spacing-10px"),12:R("spacing-12px"),14:R("spacing-14px"),16:R("spacing-16px"),18:R("spacing-18px"),20:R("spacing-20px"),22:R("spacing-22px"),24:R("spacing-24px"),26:R("spacing-26px"),28:R("spacing-28px"),30:R("spacing-30px"),32:R("spacing-32px"),34:R("spacing-34px"),36:R("spacing-36px"),40:R("spacing-40px")},border:{xsm:R("spacing-0-5px"),sm:R("spacing-1px"),med:R("spacing-2px"),lrg:R("spacing-3px")}},fc={...pc,...hc,...gc},fn=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),mc=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=c=>c.map(a=>(u,p)=>Et(`--${o}-${String(a)}-${u}`,p)),s=M.css`
|
|
2
2
|
${n} {
|
|
3
|
-
${
|
|
3
|
+
${fn(e,o).join(`;
|
|
4
4
|
`)};
|
|
5
5
|
}
|
|
6
|
-
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},
|
|
7
|
-
${
|
|
6
|
+
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},bc=(e,t="studio-c")=>(o,n)=>Et(`--${t}-${e}-${o}`,n),xc=(e,t={})=>{const{prefix:o="studio-c"}=t;return M.css`
|
|
7
|
+
${fn(e,o).join(`;
|
|
8
8
|
`)};
|
|
9
|
-
`},
|
|
9
|
+
`},O=e=>e.map(t=>(o,n)=>Et(`--studio-c-${t}-${o}`,n)),mn=(e,t)=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`${t(`${o}-${n}`,!0)}: ${e[o][n]}`)),yc=M.css`
|
|
10
10
|
:root {
|
|
11
|
-
${mn(
|
|
11
|
+
${mn(fc,l)}
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,vc=M.css`
|
|
14
14
|
:root {
|
|
15
15
|
.rdp-root {
|
|
16
|
-
--rdp-accent-color: ${
|
|
16
|
+
--rdp-accent-color: ${l("color-primary")};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${mn(
|
|
19
|
+
${mn(uc,R)}
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,kc=M.css`
|
|
22
22
|
:root {
|
|
23
|
-
${mn(
|
|
23
|
+
${mn(ac,(e,t)=>Et(`--studio-c-${e}`,t))}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,wc=M.css`
|
|
26
26
|
:root {
|
|
27
27
|
// viewable list item
|
|
28
28
|
--studio-component-viewable-list-item-padding-inline: var(
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
--studio-generic-padding-x-small
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
`,
|
|
50
|
+
`,Cc=M.css`
|
|
51
51
|
:root {
|
|
52
52
|
// button
|
|
53
53
|
--studio-component-button-background-color-active: var(
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
--studio-component-button-gap: var(--studio-semantic-control-gap);
|
|
114
114
|
--studio-component-button-padding: 10px 40px;
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
`,$c=M.css`
|
|
117
117
|
:root {
|
|
118
118
|
// list item
|
|
119
119
|
--studio-component-list-item-border-color-selected: var(
|
|
@@ -146,17 +146,17 @@
|
|
|
146
146
|
--studio-semantic-component-list-padding-inline
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
`,
|
|
149
|
+
`,jc=M.css`
|
|
150
150
|
:root {
|
|
151
151
|
//list
|
|
152
152
|
--studio-component-list-border-color-default: var(
|
|
153
153
|
--studio-generic-color-grey-20
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
|
-
`,
|
|
156
|
+
`,rs=M.css`
|
|
157
157
|
:root {
|
|
158
158
|
}
|
|
159
|
-
`,Qo=[
|
|
159
|
+
`,Qo=[rs,wc,Cc,$c,jc],en=M.css`
|
|
160
160
|
:root {
|
|
161
161
|
/* radius */
|
|
162
162
|
--studio-generic-border-radius-small: 4px;
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
--studio-generic-center-text-align: center;
|
|
256
256
|
// --studio-generic-center-text-align: var(--studio-generic-color-white, #f0f0f0);
|
|
257
257
|
}
|
|
258
|
-
`,tn=
|
|
258
|
+
`,tn=M.css`
|
|
259
259
|
:root {
|
|
260
260
|
// colour
|
|
261
261
|
--studio-semantic-color-system-green: var(--studio-generic-color-green-100);
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
)
|
|
510
510
|
var(--studio-generic-padding-small);
|
|
511
511
|
}
|
|
512
|
-
`,on=
|
|
512
|
+
`,on=M.css`
|
|
513
513
|
::-webkit-scrollbar {
|
|
514
514
|
background-color: transparent;
|
|
515
515
|
height: 8px;
|
|
@@ -530,14 +530,14 @@
|
|
|
530
530
|
code {
|
|
531
531
|
font-family: var(--ddk-generic-font-family-code);
|
|
532
532
|
}
|
|
533
|
-
`,vc=e=>e==="studio"?[on,en,...Qo,tn]:[on,en,...Qo,tn],os={"--palette-red-0":"hsl(0, 80%, 94%);","--palette-red-1":"hsl(0, 80%, 90%);","--palette-red-2":"hsl(0, 80%, 86%);","--palette-red-3":"hsl(0, 80%, 77%);","--palette-red-4":"hsl(0, 80%, 68%);","--palette-red-5":"hsl(0, 80%, 59%);","--palette-red-6":"hsl(0, 80%, 50%);","--palette-red-7":"hsl(0, 80%, 41%);","--palette-red-8":"hsl(0, 80%, 32%);","--palette-red-9":"hsl(0, 80%, 23%);","--palette-pink-0":"hsl(339, 80%, 94%);","--palette-pink-1":"hsl(339, 80%, 90%);","--palette-pink-2":"hsl(339, 80%, 86%);","--palette-pink-3":"hsl(339, 80%, 77%);","--palette-pink-4":"hsl(339, 80%, 68%);","--palette-pink-5":"hsl(339, 80%, 59%);","--palette-pink-6":"hsl(339, 80%, 50%);","--palette-pink-7":"hsl(339, 80%, 41%);","--palette-pink-8":"hsl(339, 80%, 32%);","--palette-pink-9":"hsl(339, 80%, 23%);","--palette-grape-0":"hsl(288, 80%, 94%);","--palette-grape-1":"hsl(288, 80%, 90%);","--palette-grape-2":"hsl(288, 80%, 86%);","--palette-grape-3":"hsl(288, 80%, 77%);","--palette-grape-4":"hsl(288, 80%, 68%);","--palette-grape-5":"hsl(288, 80%, 59%);","--palette-grape-6":"hsl(288, 80%, 50%);","--palette-grape-7":"hsl(288, 80%, 41%);","--palette-grape-8":"hsl(288, 80%, 32%);","--palette-grape-9":"hsl(288, 80%, 23%);","--palette-violet-0":"hsl(255, 80%, 94%);","--palette-violet-1":"hsl(255, 80%, 90%);","--palette-violet-2":"hsl(255, 80%, 86%);","--palette-violet-3":"hsl(255, 80%, 77%);","--palette-violet-4":"hsl(255, 80%, 68%);","--palette-violet-5":"hsl(255, 80%, 59%);","--palette-violet-6":"hsl(255, 80%, 50%);","--palette-violet-7":"hsl(255, 80%, 41%);","--palette-violet-8":"hsl(255, 80%, 32%);","--palette-violet-9":"hsl(255, 80%, 23%);","--palette-indigo-0":"hsl(230, 80%, 94%);","--palette-indigo-1":"hsl(230, 80%, 90%);","--palette-indigo-2":"hsl(230, 80%, 86%);","--palette-indigo-3":"hsl(230, 80%, 77%);","--palette-indigo-4":"hsl(230, 80%, 68%);","--palette-indigo-5":"hsl(230, 80%, 59%);","--palette-indigo-6":"hsl(230, 80%, 50%);","--palette-indigo-7":"hsl(230, 80%, 41%);","--palette-indigo-8":"hsl(230, 80%, 32%);","--palette-indigo-9":"hsl(230, 80%, 23%);","--palette-blue-0":"hsl(208, 80%, 94%);","--palette-blue-1":"hsl(208, 80%, 90%);","--palette-blue-2":"hsl(208, 80%, 86%);","--palette-blue-3":"hsl(208, 80%, 77%);","--palette-blue-4":"hsl(208, 80%, 68%);","--palette-blue-5":"hsl(208, 80%, 59%);","--palette-blue-6":"hsl(208, 80%, 50%);","--palette-blue-7":"hsl(208, 80%, 41%);","--palette-blue-8":"hsl(208, 80%, 32%);","--palette-blue-9":"hsl(208, 80%, 23%);","--palette-cyan-0":"hsl(188, 80%, 94%);","--palette-cyan-1":"hsl(188, 80%, 90%);","--palette-cyan-2":"hsl(188, 80%, 86%);","--palette-cyan-3":"hsl(188, 80%, 77%);","--palette-cyan-4":"hsl(188, 80%, 68%);","--palette-cyan-5":"hsl(188, 80%, 59%);","--palette-cyan-6":"hsl(188, 80%, 50%);","--palette-cyan-7":"hsl(188, 80%, 41%);","--palette-cyan-8":"hsl(188, 80%, 32%);","--palette-cyan-9":"hsl(188, 80%, 23%);","--palette-teal-0":"hsl(162, 80%, 94%);","--palette-teal-1":"hsl(162, 80%, 90%);","--palette-teal-2":"hsl(162, 80%, 86%);","--palette-teal-3":"hsl(162, 80%, 77%);","--palette-teal-4":"hsl(162, 80%, 68%);","--palette-teal-5":"hsl(162, 80%, 59%);","--palette-teal-6":"hsl(162, 80%, 50%);","--palette-teal-7":"hsl(162, 80%, 41%);","--palette-teal-8":"hsl(162, 80%, 32%);","--palette-teal-9":"hsl(162, 80%, 23%);","--palette-green-0":"hsl(131, 80%, 94%);","--palette-green-1":"hsl(131, 80%, 90%);","--palette-green-2":"hsl(131, 80%, 86%);","--palette-green-3":"hsl(131, 80%, 77%);","--palette-green-4":"hsl(131, 80%, 68%);","--palette-green-5":"hsl(131, 80%, 59%);","--palette-green-6":"hsl(131, 80%, 50%);","--palette-green-7":"hsl(131, 80%, 41%);","--palette-green-8":"hsl(131, 80%, 32%);","--palette-green-9":"hsl(131, 80%, 23%);","--palette-lime-0":"hsl(85, 80%, 94%);","--palette-lime-1":"hsl(85, 80%, 90%);","--palette-lime-2":"hsl(85, 80%, 86%);","--palette-lime-3":"hsl(85, 80%, 77%);","--palette-lime-4":"hsl(85, 80%, 68%);","--palette-lime-5":"hsl(85, 80%, 59%);","--palette-lime-6":"hsl(85, 80%, 50%);","--palette-lime-7":"hsl(85, 80%, 41%);","--palette-lime-8":"hsl(85, 80%, 32%);","--palette-lime-9":"hsl(85, 80%, 23%);","--palette-yellow-0":"hsl(39, 80%, 94%);","--palette-yellow-1":"hsl(39, 80%, 90%);","--palette-yellow-2":"hsl(39, 80%, 86%);","--palette-yellow-3":"hsl(39, 80%, 77%);","--palette-yellow-4":"hsl(39, 80%, 68%);","--palette-yellow-5":"hsl(39, 80%, 59%);","--palette-yellow-6":"hsl(39, 80%, 50%);","--palette-yellow-7":"hsl(39, 80%, 41%);","--palette-yellow-8":"hsl(39, 80%, 32%);","--palette-yellow-9":"hsl(39, 80%, 23%);","--palette-orange-0":"hsl(24, 80%, 94%);","--palette-orange-1":"hsl(24, 80%, 90%);","--palette-orange-2":"hsl(24, 80%, 86%);","--palette-orange-3":"hsl(24, 80%, 77%);","--palette-orange-4":"hsl(24, 80%, 68%);","--palette-orange-5":"hsl(24, 80%, 59%);","--palette-orange-6":"hsl(24, 80%, 50%);","--palette-orange-7":"hsl(24, 80%, 41%);","--palette-orange-8":"hsl(24, 80%, 32%);","--palette-orange-9":"hsl(24, 80%, 23%);","--palette-neutral":"hsl(0, 0%, 98%);","--palette-neutral-0":"hsl(0, 0%, 97%);","--palette-neutral-1":"hsl(0, 0%, 93%);","--palette-neutral-2":"hsl(0, 0%, 87%);","--palette-neutral-3":"hsl(0, 0%, 77%);","--palette-neutral-4":"hsl(0, 0%, 68%);","--palette-neutral-5":"hsl(0, 0%, 59%);","--palette-neutral-6":"hsl(0, 0%, 50%);","--palette-neutral-7":"hsl(0, 0%, 41%);","--palette-neutral-8":"hsl(0, 0%, 32%);","--palette-neutral-9":"hsl(0, 0%, 18%);","--color-grey-0":"var(--palette-neutral-0)","--color-grey-1":"var(--palette-neutral-1)","--color-grey-2":"var(--palette-neutral-2)","--color-grey-3":"var(--palette-neutral-3)","--color-grey-4":"var(--palette-neutral-4)","--color-grey-5":"var(--palette-neutral-5)","--color-grey-6":"var(--palette-neutral-6)","--color-grey-7":"var(--palette-neutral-7)","--color-grey-8":"var(--palette-neutral-8)","--color-grey-9":"var(--palette-neutral-9)","--color-clouds-0":"hsl(192, 15%, 99%);","--color-clouds-1":"hsl(192, 15%, 97%);","--color-clouds-2":"hsl(192, 15%, 96%);","--color-clouds-3":"hsl(192, 15%, 95%);","--color-clouds-4":"hsl(192, 15%, 94%);","--color-error":"#F40000","--color-success":"#52C41A"},ns={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"#048FEC","--kos-primary-button-color":"#048FEC","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF","--kos-shell-menu-button-hover-color":"var(--kos-generic-color-grey-70)"},rs={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF"},ss={"--kos-generic-color-black":"#262626","--kos-generic-color-blue-additional-1":"#40A9FF","--kos-generic-color-blue-additional-2":"#096DD9","--kos-generic-color-blue-additional-3":"#C8E8FF","--kos-generic-color-blue-primary":"#048FEC","--kos-generic-color-grey-10":"#FAFAFA","--kos-generic-color-grey-15":"#f1f1f1","--kos-generic-color-grey-20":"#DFDFDF","--kos-generic-color-grey-30":"#D9D9D9","--kos-generic-color-grey-40":"#C4C4C4","--kos-generic-color-grey-50":"#ABABAB","--kos-generic-color-grey-60":"#868686","--kos-generic-color-grey-70":"#484848","--kos-generic-color-grey-80":"#2F2F2F","--kos-generic-color-white":"#FFFFFF","--kos-generic-table-header":"#F6F6F6","--kos-system-orange":"#FF8500","--kos-system-green":"#52C41A"},kc={"--kos-connection-manager-heading-font-family":"var(--kos-font-family)","--kos-connection-manager-heading-font-size":"14px","--kos-connection-manager-heading-font-style":"","--kos-connection-manager-heading-font-weight":"","--kos-connection-manager-heading-line-height":"","--kos-connection-manager-item-heading-font-family":"","--kos-connection-manager-item-heading-font-size":"","--kos-connection-manager-item-heading-font-style":"","--kos-connection-manager-item-heading-font-weight":"","--kos-connection-manager-item-heading-line-height":"","--kos-connection-manager-image-name-font-family":"","--kos-connection-manager-image-name-font-size":"","--kos-connection-manager-image-name-font-style":"","--kos-connection-manager-image-name-font-weight":"","--kos-connection-manager-image-name-line-height":"","--kos-connection-manager-view-name-font-family":"","--kos-connection-manager-view-name-font-size":"","--kos-connection-manager-view-name-font-style":"","--kos-connection-manager-view-name-font-weight":"","--kos-connection-manager-view-name-line-height":"","--kos-connection-manager-status-label-font-family":"","--kos-connection-manager-status-label-font-size":"10px","--kos-connection-manager-status-label-font-style":"","--kos-connection-manager-status-label-font-weight":"","--kos-connection-manager-status-label-line-height":"","--kos-connection-manager-status-text-font-family":"","--kos-connection-manager-status-text-font-size":"","--kos-connection-manager-status-text-font-style":"","--kos-connection-manager-status-text-font-weight":"","--kos-connection-manager-status-text-line-height":"","--kos-connection-manager-active-tools-heading-font-family":"","--kos-connection-manager-active-tools-heading-font-size":"10px","--kos-connection-manager-active-tools-heading-font-style":"","--kos-connection-manager-active-tools-heading-font-weight":"700","--kos-connection-manager-active-tools-heading-line-height":"","--kos-connection-manager-active-tools-item-font-family":"","--kos-connection-manager-active-tools-item-font-size":"10px","--kos-connection-manager-active-tools-item-font-style":"","--kos-connection-manager-active-tools-item-font-weight":"400","--kos-connection-manager-active-tools-item-line-height":"","--kos-connection-manager-start-new-tool-font-family":"","--kos-connection-manager-start-new-tool-font-size":"12px","--kos-connection-manager-start-new-tool-font-style":"","--kos-connection-manager-start-new-tool-font-weight":"","--kos-connection-manager-start-new-tool-line-height":"","--kos-connection-manager-input-font-family":"","--kos-connection-manager-input-font-size":"","--kos-connection-manager-input-font-style":"","--kos-connection-manager-input-font-weight":"","--kos-connection-manager-input-line-height":"10px","--kos-connection-manager-icon-small-font-size":"10px","--kos-connection-manager-icon-medium-font-size":"12px","--kos-connection-manager-icon-busy-color":"#0000F4","--kos-connection-manager-icon-error-color":"#F40000","--kos-connection-manager-icon-idle-color":"#858585","--kos-connection-manager-icon-success-color":"#52C41A","--kos-connection-manager-connecting-effect-background-color":"#ECFBDF","--kos-component-button-primary-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-background-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color-disabled":"var(--kos-generic-color-grey-10)","--kos-component-button-secondary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-secondary-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-borderless-background-color":"transparent","--kos-component-button-borderless-border-color":"transparent","--kos-component-button-borderless-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-borderless-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-borderless-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-borderless-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-background-color":"var(--kos-generic-color-white)","--kos-component-checkbox-default-border-color-default":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-border-color-hover":"var(--kos-generic-color-grey-10)","--kos-component-checkbox-default-border-color-clicked":"var(--kos-generic-color-grey-50)","--kos-component-checkbox-default-color":"transparent","--kos-component-checkbox-filled-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-color":"var(--kos-generic-color-white)","--kos-component-checkbox-disabled-background-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-border-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-color":"var(--kos-generic-color-white)","--kos-simulator-config-details-border":"var(--kos-generic-color-grey-30)"},wc={"--kos-size-xxxxs":"1.5rem","--kos-size-xxxs":"3rem","--kos-size-xxs":"6rem","--kos-size-xs":"12rem","--kos-size-s":"15rem","--kos-size-m":"20rem","--kos-size-lg":"25rem","--kos-size-xl":"40rem","--kos-size-xxl":"60rem"},Cc={"--kos-border-radius-circle":"50%","--kos-border-radius-large":"0.5rem","--kos-border-radius-medium":"0.25rem","--kos-border-radius-small":"0.125rem","--kos-border-radius":"var(--kos-border-radius-medium)","--kos-spacing-xxxs":".125rem","--kos-spacing-xxs":".25rem","--kos-spacing-xs":".5rem","--kos-spacing-s":".75rem","--kos-spacing-m":"1rem","--kos-spacing-lg":"1.5rem","--kos-spacing-xlg":"2rem","--kos-spacing-xxlg":"3rem"},pr={"--kos-font-family":"Arial, Helvetica, sans-serif","--kos-line-height-body":"14.4px","--kos-line-height-small":"12px","--kos-line-height-body-modal":"14px","--kos-line-height-body-bold":"13px","--kos-line-height-card-title":"18px","--kos-line-height-card-detail":"14px","--kos-line-height-heading-small":"20px","--kos-line-height-heading-medium":"24px","--kos-line-height-heading-large":"30px","--kos-font-family-body":"var(--kos-font-family)","--kos-font-family-body-bold":"var(--kos-font-family)","--kos-font-family-card-title":"var(--kos-font-family)","--kos-font-family-card-detail":"var(--kos-font-family)","--kos-font-family-heading-small":"var(--kos-font-family)","--kos-font-family-heading-medium":"var(--kos-font-family)","--kos-font-family-heading-large":"var(--kos-font-family)","--kos-font-size-body-modal":"12px","--kos-font-size-body":"12px","--kos-font-size-body-bold":"14px","--kos-font-size-card-title":"16px","--kos-font-size-card-detail":"12px","--kos-font-size-heading-small":"14px","--kos-font-size-heading-medium":"16px","--kos-font-size-heading-large":"20px","--kos-font-weight-body":"400","--kos-font-weight-body-bold":"700","--kos-font-weight-card-title":"700","--kos-font-weight-card-detail":"400","--kos-font-weight-heading-small":"700","--kos-font-weight-heading-medium":"700","--kos-font-weight-heading-large":"700"},$c=z.css`
|
|
533
|
+
`,Sc=e=>e==="studio"?[on,en,...Qo,tn]:[on,en,...Qo,tn],ss={"--palette-red-0":"hsl(0, 80%, 94%);","--palette-red-1":"hsl(0, 80%, 90%);","--palette-red-2":"hsl(0, 80%, 86%);","--palette-red-3":"hsl(0, 80%, 77%);","--palette-red-4":"hsl(0, 80%, 68%);","--palette-red-5":"hsl(0, 80%, 59%);","--palette-red-6":"hsl(0, 80%, 50%);","--palette-red-7":"hsl(0, 80%, 41%);","--palette-red-8":"hsl(0, 80%, 32%);","--palette-red-9":"hsl(0, 80%, 23%);","--palette-pink-0":"hsl(339, 80%, 94%);","--palette-pink-1":"hsl(339, 80%, 90%);","--palette-pink-2":"hsl(339, 80%, 86%);","--palette-pink-3":"hsl(339, 80%, 77%);","--palette-pink-4":"hsl(339, 80%, 68%);","--palette-pink-5":"hsl(339, 80%, 59%);","--palette-pink-6":"hsl(339, 80%, 50%);","--palette-pink-7":"hsl(339, 80%, 41%);","--palette-pink-8":"hsl(339, 80%, 32%);","--palette-pink-9":"hsl(339, 80%, 23%);","--palette-grape-0":"hsl(288, 80%, 94%);","--palette-grape-1":"hsl(288, 80%, 90%);","--palette-grape-2":"hsl(288, 80%, 86%);","--palette-grape-3":"hsl(288, 80%, 77%);","--palette-grape-4":"hsl(288, 80%, 68%);","--palette-grape-5":"hsl(288, 80%, 59%);","--palette-grape-6":"hsl(288, 80%, 50%);","--palette-grape-7":"hsl(288, 80%, 41%);","--palette-grape-8":"hsl(288, 80%, 32%);","--palette-grape-9":"hsl(288, 80%, 23%);","--palette-violet-0":"hsl(255, 80%, 94%);","--palette-violet-1":"hsl(255, 80%, 90%);","--palette-violet-2":"hsl(255, 80%, 86%);","--palette-violet-3":"hsl(255, 80%, 77%);","--palette-violet-4":"hsl(255, 80%, 68%);","--palette-violet-5":"hsl(255, 80%, 59%);","--palette-violet-6":"hsl(255, 80%, 50%);","--palette-violet-7":"hsl(255, 80%, 41%);","--palette-violet-8":"hsl(255, 80%, 32%);","--palette-violet-9":"hsl(255, 80%, 23%);","--palette-indigo-0":"hsl(230, 80%, 94%);","--palette-indigo-1":"hsl(230, 80%, 90%);","--palette-indigo-2":"hsl(230, 80%, 86%);","--palette-indigo-3":"hsl(230, 80%, 77%);","--palette-indigo-4":"hsl(230, 80%, 68%);","--palette-indigo-5":"hsl(230, 80%, 59%);","--palette-indigo-6":"hsl(230, 80%, 50%);","--palette-indigo-7":"hsl(230, 80%, 41%);","--palette-indigo-8":"hsl(230, 80%, 32%);","--palette-indigo-9":"hsl(230, 80%, 23%);","--palette-blue-0":"hsl(208, 80%, 94%);","--palette-blue-1":"hsl(208, 80%, 90%);","--palette-blue-2":"hsl(208, 80%, 86%);","--palette-blue-3":"hsl(208, 80%, 77%);","--palette-blue-4":"hsl(208, 80%, 68%);","--palette-blue-5":"hsl(208, 80%, 59%);","--palette-blue-6":"hsl(208, 80%, 50%);","--palette-blue-7":"hsl(208, 80%, 41%);","--palette-blue-8":"hsl(208, 80%, 32%);","--palette-blue-9":"hsl(208, 80%, 23%);","--palette-cyan-0":"hsl(188, 80%, 94%);","--palette-cyan-1":"hsl(188, 80%, 90%);","--palette-cyan-2":"hsl(188, 80%, 86%);","--palette-cyan-3":"hsl(188, 80%, 77%);","--palette-cyan-4":"hsl(188, 80%, 68%);","--palette-cyan-5":"hsl(188, 80%, 59%);","--palette-cyan-6":"hsl(188, 80%, 50%);","--palette-cyan-7":"hsl(188, 80%, 41%);","--palette-cyan-8":"hsl(188, 80%, 32%);","--palette-cyan-9":"hsl(188, 80%, 23%);","--palette-teal-0":"hsl(162, 80%, 94%);","--palette-teal-1":"hsl(162, 80%, 90%);","--palette-teal-2":"hsl(162, 80%, 86%);","--palette-teal-3":"hsl(162, 80%, 77%);","--palette-teal-4":"hsl(162, 80%, 68%);","--palette-teal-5":"hsl(162, 80%, 59%);","--palette-teal-6":"hsl(162, 80%, 50%);","--palette-teal-7":"hsl(162, 80%, 41%);","--palette-teal-8":"hsl(162, 80%, 32%);","--palette-teal-9":"hsl(162, 80%, 23%);","--palette-green-0":"hsl(131, 80%, 94%);","--palette-green-1":"hsl(131, 80%, 90%);","--palette-green-2":"hsl(131, 80%, 86%);","--palette-green-3":"hsl(131, 80%, 77%);","--palette-green-4":"hsl(131, 80%, 68%);","--palette-green-5":"hsl(131, 80%, 59%);","--palette-green-6":"hsl(131, 80%, 50%);","--palette-green-7":"hsl(131, 80%, 41%);","--palette-green-8":"hsl(131, 80%, 32%);","--palette-green-9":"hsl(131, 80%, 23%);","--palette-lime-0":"hsl(85, 80%, 94%);","--palette-lime-1":"hsl(85, 80%, 90%);","--palette-lime-2":"hsl(85, 80%, 86%);","--palette-lime-3":"hsl(85, 80%, 77%);","--palette-lime-4":"hsl(85, 80%, 68%);","--palette-lime-5":"hsl(85, 80%, 59%);","--palette-lime-6":"hsl(85, 80%, 50%);","--palette-lime-7":"hsl(85, 80%, 41%);","--palette-lime-8":"hsl(85, 80%, 32%);","--palette-lime-9":"hsl(85, 80%, 23%);","--palette-yellow-0":"hsl(39, 80%, 94%);","--palette-yellow-1":"hsl(39, 80%, 90%);","--palette-yellow-2":"hsl(39, 80%, 86%);","--palette-yellow-3":"hsl(39, 80%, 77%);","--palette-yellow-4":"hsl(39, 80%, 68%);","--palette-yellow-5":"hsl(39, 80%, 59%);","--palette-yellow-6":"hsl(39, 80%, 50%);","--palette-yellow-7":"hsl(39, 80%, 41%);","--palette-yellow-8":"hsl(39, 80%, 32%);","--palette-yellow-9":"hsl(39, 80%, 23%);","--palette-orange-0":"hsl(24, 80%, 94%);","--palette-orange-1":"hsl(24, 80%, 90%);","--palette-orange-2":"hsl(24, 80%, 86%);","--palette-orange-3":"hsl(24, 80%, 77%);","--palette-orange-4":"hsl(24, 80%, 68%);","--palette-orange-5":"hsl(24, 80%, 59%);","--palette-orange-6":"hsl(24, 80%, 50%);","--palette-orange-7":"hsl(24, 80%, 41%);","--palette-orange-8":"hsl(24, 80%, 32%);","--palette-orange-9":"hsl(24, 80%, 23%);","--palette-neutral":"hsl(0, 0%, 98%);","--palette-neutral-0":"hsl(0, 0%, 97%);","--palette-neutral-1":"hsl(0, 0%, 93%);","--palette-neutral-2":"hsl(0, 0%, 87%);","--palette-neutral-3":"hsl(0, 0%, 77%);","--palette-neutral-4":"hsl(0, 0%, 68%);","--palette-neutral-5":"hsl(0, 0%, 59%);","--palette-neutral-6":"hsl(0, 0%, 50%);","--palette-neutral-7":"hsl(0, 0%, 41%);","--palette-neutral-8":"hsl(0, 0%, 32%);","--palette-neutral-9":"hsl(0, 0%, 18%);","--color-grey-0":"var(--palette-neutral-0)","--color-grey-1":"var(--palette-neutral-1)","--color-grey-2":"var(--palette-neutral-2)","--color-grey-3":"var(--palette-neutral-3)","--color-grey-4":"var(--palette-neutral-4)","--color-grey-5":"var(--palette-neutral-5)","--color-grey-6":"var(--palette-neutral-6)","--color-grey-7":"var(--palette-neutral-7)","--color-grey-8":"var(--palette-neutral-8)","--color-grey-9":"var(--palette-neutral-9)","--color-clouds-0":"hsl(192, 15%, 99%);","--color-clouds-1":"hsl(192, 15%, 97%);","--color-clouds-2":"hsl(192, 15%, 96%);","--color-clouds-3":"hsl(192, 15%, 95%);","--color-clouds-4":"hsl(192, 15%, 94%);","--color-error":"#F40000","--color-success":"#52C41A"},is={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"#048FEC","--kos-primary-button-color":"#048FEC","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF","--kos-shell-menu-button-hover-color":"var(--kos-generic-color-grey-70)"},as={"--kos-layer-1-color":"var(--palette-neutral-2);","--kos-layer-2-color":"var(--palette-neutral-1);","--kos-layer-3-color":"var(--palette-neutral-0);","--kos-primary-1":"var(--palette-neutral-1);","--kos-primary-2":"var(--palette-neutral-2);","--kos-primary-3":"var(--palette-neutral-3);","--kos-primary-4":"var(--palette-neutral-4);","--kos-primary-5":"var(--palette-neutral-5);","--kos-primary-6":"var(--palette-neutral-6);","--kos-primary-7":"var(--palette-neutral-7);","--kos-primary-8":"var(--palette-neutral-8);","--kos-primary-9":"var(--palette-neutral-9);","--kos-accent-1":"var(--palette-blue-1)","--kos-accent-2":"var(--palette-blue-2)","--kos-accent-3":"var(--palette-blue-3)","--kos-accent-4":"var(--palette-blue-4)","--kos-accent-5":"var(--palette-blue-5)","--kos-accent-6":"var(--palette-blue-6)","--kos-accent-7":"var(--palette-blue-7)","--kos-accent-8":"var(--palette-blue-8)","--kos-accent-9":"var(--palette-blue-9)","--kos-primary-color":"var(--kos-primary-8);","--kos-border-color":"var(--palette-neutral-3)","--kos-primary-color-hover":"var(--kos-primary-7);","--kos-primary-color-active":"var(--kos-primary-9);","--kos-primary-color-outline":"var(--kos-primary-6);","--kos-background-color":"var(--palette-neutral-1);","--kos-background-color-hover":"var(--palette-neutral-1);","--kos-background-color-active":"var(--palette-neutral-1);","--kos-background-color-outline":"var(--palette-neutral-1);","--kos-accent-background-color":"var(--kos-primary-9);","--kos-accent-typography-color":"white;","--kos-typography-color":"var(--palette-neutral-9);","--kos-typography-color-hover":"var(--kos-primary-color-hover);","--kos-typography-color-selected":"var(--kos-primary-color-active);","--kos-app-header-background-color":"var(--kos-accent-background-color);","--kos-app-header-typography-color":"white;","--kos-app-sidebar-background-color":"var(--kos-layer-1-color);","--kos-page-header-background-color":"var(--kos-layer-2-color);","--kos-artifact-qualifier-tag-color":"var(--kos-accent-6);","--kos-table-header-background-color":"var(--kos-accent-background-color);","--kos-table-header-typography-color":"var(--kos-accent-typography-color);","--kos-list-item-header-background-color":"white;","--kos-typography-color-link":"hsl(204, 97%, 40%);","--kos-typography-color-link-hover":"hsl(204, 97%, 60%);","--kos-list-item-color-selected":"hsl(204, 97%, 47%);","--kos-list-item-icon-color-selected":"white","--kos-accent-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-color":"var(--kos-generic-color-blue-primary)","--kos-primary-button-hover-color":"#40A9FF","--kos-primary-button-active-color":"#096DD9","--kos-primary-button-text-color":"#FFFFFF"},ls={"--kos-generic-color-black":"#262626","--kos-generic-color-blue-additional-1":"#40A9FF","--kos-generic-color-blue-additional-2":"#096DD9","--kos-generic-color-blue-additional-3":"#C8E8FF","--kos-generic-color-blue-primary":"#048FEC","--kos-generic-color-grey-10":"#FAFAFA","--kos-generic-color-grey-15":"#f1f1f1","--kos-generic-color-grey-20":"#DFDFDF","--kos-generic-color-grey-30":"#D9D9D9","--kos-generic-color-grey-40":"#C4C4C4","--kos-generic-color-grey-50":"#ABABAB","--kos-generic-color-grey-60":"#868686","--kos-generic-color-grey-70":"#484848","--kos-generic-color-grey-80":"#2F2F2F","--kos-generic-color-white":"#FFFFFF","--kos-generic-table-header":"#F6F6F6","--kos-system-orange":"#FF8500","--kos-system-green":"#52C41A"},Ic={"--kos-connection-manager-heading-font-family":"var(--kos-font-family)","--kos-connection-manager-heading-font-size":"14px","--kos-connection-manager-heading-font-style":"","--kos-connection-manager-heading-font-weight":"","--kos-connection-manager-heading-line-height":"","--kos-connection-manager-item-heading-font-family":"","--kos-connection-manager-item-heading-font-size":"","--kos-connection-manager-item-heading-font-style":"","--kos-connection-manager-item-heading-font-weight":"","--kos-connection-manager-item-heading-line-height":"","--kos-connection-manager-image-name-font-family":"","--kos-connection-manager-image-name-font-size":"","--kos-connection-manager-image-name-font-style":"","--kos-connection-manager-image-name-font-weight":"","--kos-connection-manager-image-name-line-height":"","--kos-connection-manager-view-name-font-family":"","--kos-connection-manager-view-name-font-size":"","--kos-connection-manager-view-name-font-style":"","--kos-connection-manager-view-name-font-weight":"","--kos-connection-manager-view-name-line-height":"","--kos-connection-manager-status-label-font-family":"","--kos-connection-manager-status-label-font-size":"10px","--kos-connection-manager-status-label-font-style":"","--kos-connection-manager-status-label-font-weight":"","--kos-connection-manager-status-label-line-height":"","--kos-connection-manager-status-text-font-family":"","--kos-connection-manager-status-text-font-size":"","--kos-connection-manager-status-text-font-style":"","--kos-connection-manager-status-text-font-weight":"","--kos-connection-manager-status-text-line-height":"","--kos-connection-manager-active-tools-heading-font-family":"","--kos-connection-manager-active-tools-heading-font-size":"10px","--kos-connection-manager-active-tools-heading-font-style":"","--kos-connection-manager-active-tools-heading-font-weight":"700","--kos-connection-manager-active-tools-heading-line-height":"","--kos-connection-manager-active-tools-item-font-family":"","--kos-connection-manager-active-tools-item-font-size":"10px","--kos-connection-manager-active-tools-item-font-style":"","--kos-connection-manager-active-tools-item-font-weight":"400","--kos-connection-manager-active-tools-item-line-height":"","--kos-connection-manager-start-new-tool-font-family":"","--kos-connection-manager-start-new-tool-font-size":"12px","--kos-connection-manager-start-new-tool-font-style":"","--kos-connection-manager-start-new-tool-font-weight":"","--kos-connection-manager-start-new-tool-line-height":"","--kos-connection-manager-input-font-family":"","--kos-connection-manager-input-font-size":"","--kos-connection-manager-input-font-style":"","--kos-connection-manager-input-font-weight":"","--kos-connection-manager-input-line-height":"10px","--kos-connection-manager-icon-small-font-size":"10px","--kos-connection-manager-icon-medium-font-size":"12px","--kos-connection-manager-icon-busy-color":"#0000F4","--kos-connection-manager-icon-error-color":"#F40000","--kos-connection-manager-icon-idle-color":"#858585","--kos-connection-manager-icon-success-color":"#52C41A","--kos-connection-manager-connecting-effect-background-color":"#ECFBDF","--kos-component-button-primary-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-background-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-primary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-primary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-primary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-primary-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color":"var(--kos-generic-color-white)","--kos-component-button-secondary-background-color-disabled":"var(--kos-generic-color-grey-10)","--kos-component-button-secondary-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-border-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-secondary-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-secondary-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-secondary-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-secondary-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-button-borderless-background-color":"transparent","--kos-component-button-borderless-border-color":"transparent","--kos-component-button-borderless-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-button-borderless-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-button-borderless-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-button-borderless-color-disabled":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-background-color":"var(--kos-generic-color-white)","--kos-component-checkbox-default-border-color-default":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-default-border-color-hover":"var(--kos-generic-color-grey-10)","--kos-component-checkbox-default-border-color-clicked":"var(--kos-generic-color-grey-50)","--kos-component-checkbox-default-color":"transparent","--kos-component-checkbox-filled-background-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-background-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-background-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-border-color-default":"var(--kos-generic-color-blue-primary)","--kos-component-checkbox-filled-border-color-hover":"var(--kos-generic-color-blue-additional-1)","--kos-component-checkbox-filled-border-color-clicked":"var(--kos-generic-color-blue-additional-2)","--kos-component-checkbox-filled-color":"var(--kos-generic-color-white)","--kos-component-checkbox-disabled-background-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-border-color":"var(--kos-generic-color-grey-30)","--kos-component-checkbox-disabled-color":"var(--kos-generic-color-white)","--kos-simulator-config-details-border":"var(--kos-generic-color-grey-30)"},Dc={"--kos-size-xxxxs":"1.5rem","--kos-size-xxxs":"3rem","--kos-size-xxs":"6rem","--kos-size-xs":"12rem","--kos-size-s":"15rem","--kos-size-m":"20rem","--kos-size-lg":"25rem","--kos-size-xl":"40rem","--kos-size-xxl":"60rem"},_c={"--kos-border-radius-circle":"50%","--kos-border-radius-large":"0.5rem","--kos-border-radius-medium":"0.25rem","--kos-border-radius-small":"0.125rem","--kos-border-radius":"var(--kos-border-radius-medium)","--kos-spacing-xxxs":".125rem","--kos-spacing-xxs":".25rem","--kos-spacing-xs":".5rem","--kos-spacing-s":".75rem","--kos-spacing-m":"1rem","--kos-spacing-lg":"1.5rem","--kos-spacing-xlg":"2rem","--kos-spacing-xxlg":"3rem"},pr={"--kos-font-family":"Arial, Helvetica, sans-serif","--kos-line-height-body":"14.4px","--kos-line-height-small":"12px","--kos-line-height-body-modal":"14px","--kos-line-height-body-bold":"13px","--kos-line-height-card-title":"18px","--kos-line-height-card-detail":"14px","--kos-line-height-heading-small":"20px","--kos-line-height-heading-medium":"24px","--kos-line-height-heading-large":"30px","--kos-font-family-body":"var(--kos-font-family)","--kos-font-family-body-bold":"var(--kos-font-family)","--kos-font-family-card-title":"var(--kos-font-family)","--kos-font-family-card-detail":"var(--kos-font-family)","--kos-font-family-heading-small":"var(--kos-font-family)","--kos-font-family-heading-medium":"var(--kos-font-family)","--kos-font-family-heading-large":"var(--kos-font-family)","--kos-font-size-body-modal":"12px","--kos-font-size-body":"12px","--kos-font-size-body-bold":"14px","--kos-font-size-card-title":"16px","--kos-font-size-card-detail":"12px","--kos-font-size-heading-small":"14px","--kos-font-size-heading-medium":"16px","--kos-font-size-heading-large":"20px","--kos-font-weight-body":"400","--kos-font-weight-body-bold":"700","--kos-font-weight-card-title":"700","--kos-font-weight-card-detail":"400","--kos-font-weight-heading-small":"700","--kos-font-weight-heading-medium":"700","--kos-font-weight-heading-large":"700"},Tc=M.css`
|
|
534
534
|
scrollbar-gutter: stable;
|
|
535
535
|
//AUTO might be the one that overlays things
|
|
536
536
|
|
|
537
537
|
/* Hide scrollbar for IE, Edge, Firefox, and other browsers */
|
|
538
538
|
scrollbar-width: thin; /* Firefox */
|
|
539
539
|
overflow-y: auto;
|
|
540
|
-
`,
|
|
540
|
+
`,Ec=()=>M.css`
|
|
541
541
|
:root {
|
|
542
542
|
--kos-font-size-base: 10px;
|
|
543
543
|
--kos-font-size-small: 10px;
|
|
@@ -546,11 +546,11 @@
|
|
|
546
546
|
font-size: var(--kos-base-font-size);
|
|
547
547
|
}
|
|
548
548
|
:root {
|
|
549
|
-
${
|
|
550
|
-
${
|
|
551
|
-
${
|
|
552
|
-
${
|
|
553
|
-
${
|
|
549
|
+
${M.css(ss)}
|
|
550
|
+
${M.css(_c)}
|
|
551
|
+
${M.css(Dc)}
|
|
552
|
+
${M.css(ls)}
|
|
553
|
+
${M.css(Ic)}
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
::-webkit-scrollbar {
|
|
@@ -625,17 +625,17 @@
|
|
|
625
625
|
|
|
626
626
|
@media (-webkit-max-device-pixel-ratio: 1.25) {
|
|
627
627
|
:root {
|
|
628
|
-
${
|
|
628
|
+
${M.css(pr)}
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
@media (-webkit-min-device-pixel-ratio: 1.25) {
|
|
632
632
|
:root {
|
|
633
|
-
${
|
|
633
|
+
${M.css(pr)}
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
@media (prefers-color-scheme: light) {
|
|
637
637
|
:root {
|
|
638
|
-
${
|
|
638
|
+
${M.css(is)}
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
:root {
|
|
@@ -654,7 +654,7 @@
|
|
|
654
654
|
}
|
|
655
655
|
@media (prefers-color-scheme: dark) {
|
|
656
656
|
:root {
|
|
657
|
-
${
|
|
657
|
+
${M.css(as)}
|
|
658
658
|
}
|
|
659
659
|
:root {
|
|
660
660
|
--ant-primary-color: var(--kos-primary-color);
|
|
@@ -671,15 +671,15 @@
|
|
|
671
671
|
--ant-font-size-base: var(--kos-font-size-base);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
`;function
|
|
675
|
-
font-family: ${
|
|
676
|
-
line-height: ${
|
|
674
|
+
`;function zt(e){return d.forwardRef(e)}const[Ee]=O(["text"]),cs=["blue","dark","disabled","green","grey","light","purple","red","yellow","orange"],zc=({bold:e,children:t,color:o,ellipsis:n,lineClamp:r,textAlign:s,underline:c,variant:a,...u},p)=>i.jsx(M.ClassNames,{children:({cx:h})=>i.jsx(Oc,{"data-variant":a,"data-alignment":s,"data-color":o,ref:p,...u,className:h(u.className,{isBold:e,isUnderlined:c,isEllipsized:n,isLineClamped:r}),children:t})}),_=zt(zc),Mc=["left","right","center","justify"],Oc=f.span`
|
|
675
|
+
font-family: ${Ee("font-family")};
|
|
676
|
+
line-height: ${Ee("line-height")};
|
|
677
677
|
vertical-align: bottom;
|
|
678
|
-
font-weight: ${
|
|
678
|
+
font-weight: ${Ee("font-weight-normal")};
|
|
679
679
|
margin: 0;
|
|
680
680
|
color: inherit;
|
|
681
681
|
&.isBold {
|
|
682
|
-
font-weight: ${
|
|
682
|
+
font-weight: ${Ee("font-weight-bold")};
|
|
683
683
|
}
|
|
684
684
|
&.isEllipsized {
|
|
685
685
|
text-overflow: ellipsis;
|
|
@@ -698,48 +698,48 @@
|
|
|
698
698
|
text-decoration: underline;
|
|
699
699
|
}
|
|
700
700
|
&[data-variant="h1"] {
|
|
701
|
-
font-size: ${
|
|
702
|
-
font-weight: ${
|
|
701
|
+
font-size: ${Ee("h1-size")};
|
|
702
|
+
font-weight: ${Ee("font-weight-bold")};
|
|
703
703
|
}
|
|
704
704
|
&[data-variant="h2"] {
|
|
705
|
-
font-size: ${
|
|
706
|
-
font-weight: ${
|
|
705
|
+
font-size: ${Ee("h2-size")};
|
|
706
|
+
font-weight: ${Ee("font-weight-bold")};
|
|
707
707
|
}
|
|
708
708
|
&[data-variant="body"] {
|
|
709
|
-
font-size: ${
|
|
709
|
+
font-size: ${Ee("body-size")};
|
|
710
710
|
}
|
|
711
711
|
&[data-variant="small"] {
|
|
712
|
-
font-size: ${
|
|
712
|
+
font-size: ${Ee("small-size")};
|
|
713
713
|
}
|
|
714
|
-
${
|
|
714
|
+
${Mc.map(e=>`&[data-alignment="${e}"] {
|
|
715
715
|
text-align: ${e};
|
|
716
716
|
}`).join(`
|
|
717
717
|
`)}
|
|
718
|
-
${
|
|
719
|
-
color: ${
|
|
718
|
+
${cs.map(e=>`&[data-color="${e}"] {
|
|
719
|
+
color: ${Ee(`color-${e}`)};
|
|
720
720
|
}`).join(`
|
|
721
721
|
`)}
|
|
722
|
-
`,[
|
|
723
|
-
${
|
|
724
|
-
font-size: ${
|
|
725
|
-
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),
|
|
726
|
-
font-weight: ${
|
|
727
|
-
font-family: ${
|
|
728
|
-
line-height: ${
|
|
729
|
-
color: ${
|
|
722
|
+
`,[ut]=O(["link"]),bn=d.forwardRef(({children:e,onClick:t,size:o="med",isDisabled:n,...r},s)=>i.jsx("span",{ref:s,css:M.css`
|
|
723
|
+
${Rc}
|
|
724
|
+
font-size: ${ut(`font-size-${o}`)};
|
|
725
|
+
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),Rc=M.css`
|
|
726
|
+
font-weight: ${ut("font-weight")};
|
|
727
|
+
font-family: ${ut("font-family")};
|
|
728
|
+
line-height: ${ut("line-height")};
|
|
729
|
+
color: ${ut("color")};
|
|
730
730
|
transition: color 0.125s ease-in-out;
|
|
731
731
|
cursor: pointer;
|
|
732
732
|
&:hover:not(.isDisabled) {
|
|
733
|
-
color: ${
|
|
733
|
+
color: ${ut("color-hover")};
|
|
734
734
|
}
|
|
735
735
|
&:active:not(.isDisabled) {
|
|
736
|
-
color: ${
|
|
736
|
+
color: ${ut("color-active")};
|
|
737
737
|
}
|
|
738
738
|
&.isDisabled {
|
|
739
|
-
color: ${
|
|
739
|
+
color: ${ut("color-disabled")};
|
|
740
740
|
pointer-events: none;
|
|
741
741
|
}
|
|
742
|
-
`,nn=["black","blue","green","grey","orange","purple","red","white","yellow"],
|
|
742
|
+
`,nn=["black","blue","green","grey","orange","purple","red","white","yellow"],Nc=["xxsm","xsm","sm","med","lrg","xlrg","xxlrg","xxxlrg"],ds=d.createContext(null),Fc=({children:e,publicPath:t})=>{const o=d.useMemo(()=>({basePath:t??"/ui/"}),[t]);return i.jsx(ds.Provider,{value:o,children:e})},us=()=>{const e=d.useContext(ds);if(!e)throw new Error("BaseUIComponentsContext cannot be used outside of its provider.");return e},[Nt]=O(["icon"]),Ac=d.forwardRef(({iconId:e,size:t="sm",color:o,...n},r)=>{const{basePath:s}=us();return i.jsx(Lc,{viewBox:"0 0 36 36",ref:r,"data-size":t,"data-color":o,xmlns:"http://www.w3.org/2000/svg",...n,children:i.jsx("use",{href:`${s}icon-sprite.svg#${e}`})})}),F=d.memo(Ac);F.displayName="Icon";const Lc=f.svg`
|
|
743
743
|
fill: currentColor;
|
|
744
744
|
transition: fill 0.125s ease-in-out;
|
|
745
745
|
|
|
@@ -749,35 +749,35 @@
|
|
|
749
749
|
}`).join("")}
|
|
750
750
|
|
|
751
751
|
// Sizes
|
|
752
|
-
${
|
|
752
|
+
${Nc.map(e=>`&[data-size="${e}"] {
|
|
753
753
|
max-height: ${Nt(`size-${e}`)};
|
|
754
754
|
max-width: ${Nt(`size-${e}`)};
|
|
755
755
|
min-height: ${Nt(`size-${e}`)};
|
|
756
756
|
min-width: ${Nt(`size-${e}`)};
|
|
757
757
|
}`).join("")}
|
|
758
|
-
`,[
|
|
758
|
+
`,[ps]=O(["actionable-blurb"]),Bc=d.memo(({text:e,actions:t,icon:o,title:n,iconColor:r,iconSize:s,className:c})=>{const a=d.useMemo(()=>{if(!t)return e;let u=e;return t.forEach(({action:p,actionText:h})=>{u=ns(u,h,g=>i.jsx(bn,{onClick:p,children:g},g))}),u},[t,e]);return i.jsxs(Wc,{className:c,children:[i.jsx(Pc,{children:i.jsx(F,{iconId:o,size:s??"xsm",color:r??"black"})}),i.jsxs(Vc,{className:"blurb-wrapper",children:[i.jsx(_,{color:"dark",variant:"body",bold:!0,children:n}),i.jsx(_,{color:"dark",variant:"body",children:a})]})]})}),Wc=f.div`
|
|
759
759
|
width: 100%;
|
|
760
760
|
display: grid;
|
|
761
|
-
grid-template-columns: ${
|
|
762
|
-
`,
|
|
761
|
+
grid-template-columns: ${ps("icon-column-width")} 1fr;
|
|
762
|
+
`,Pc=f.div`
|
|
763
763
|
height: 100%;
|
|
764
764
|
display: flex;
|
|
765
765
|
align-items: flex-start;
|
|
766
766
|
justify-content: flex-start;
|
|
767
|
-
`,
|
|
767
|
+
`,Vc=f.div`
|
|
768
768
|
display: flex;
|
|
769
769
|
align-items: flex-start;
|
|
770
770
|
justify-content: flex-start;
|
|
771
771
|
flex-direction: column;
|
|
772
|
-
row-gap: ${
|
|
773
|
-
`,Se=()=>{},
|
|
772
|
+
row-gap: ${ps("row-gap")};
|
|
773
|
+
`,Se=()=>{},Hc=e=>(t,o)=>e[t][o]??t,Uc=(e,t)=>d.useReducer(Hc(t),e),ao=e=>(e==null?void 0:e.animationName)||"none",Gc=(e,t)=>{const[o,n]=d.useState(),r=d.useRef(),s=d.useRef(e),c=d.useRef("none"),a=d.useRef(t);d.useLayoutEffect(()=>{a.current=t},[t]);const[u,p]=Uc(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmounting"},unmounted:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounting:{MOUNT:"mounted",ANIMATION_END:"unmounted"}});d.useEffect(()=>{const m=ao(r.current);c.current=u==="mounted"?m:"none"},[u]),d.useLayoutEffect(()=>{const m=r.current,x=s.current;if(x!==e){const y=c.current,v=ao(m);e?p("MOUNT"):v==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(x&&y!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),d.useLayoutEffect(()=>{if(o){const m=b=>{const v=ao(r.current).includes(b.animationName);b.target===o&&v&&os.flushSync(()=>p("ANIMATION_END"))},x=b=>{b.target===o&&(c.current=ao(r.current))};return o.addEventListener("animationstart",x),o.addEventListener("animationcancel",m),o.addEventListener("animationend",m),()=>{o.removeEventListener("animationstart",x),o.removeEventListener("animationcancel",m),o.removeEventListener("animationend",m)}}else return p("ANIMATION_END"),Se},[o,p]);const h=d.useCallback(m=>{m&&(r.current=getComputedStyle(m)),n(m)},[]),g=["mounted","unmounting"].includes(u);return d.useEffect(()=>{a.current&&a.current(g)},[g]),{isPresent:g,ref:h}},hs=d.memo(({present:e,children:t,onPresenceChange:o})=>{const n=Gc(e,o);return n.isPresent?d.cloneElement(t,{ref:n.ref,present:e}):null});hs.displayName="AnimatePresence";const Kc=({offlineContent:e,onlineContent:t})=>t?e?i.jsx(Yc,{children:i.jsxs(qc,{children:[i.jsx(hr,{$front:!0,children:e}),i.jsx(hr,{$back:!0,children:t})]})}):t:e,Yc=f.div`
|
|
774
774
|
flex: 1;
|
|
775
775
|
min-width: 0px;
|
|
776
776
|
height: 100%;
|
|
777
777
|
overflow: visible;
|
|
778
778
|
perspective: 300px;
|
|
779
779
|
perspective-origin: left center;
|
|
780
|
-
`,
|
|
780
|
+
`,qc=f.div`
|
|
781
781
|
width: 100%;
|
|
782
782
|
height: 100%;
|
|
783
783
|
position: relative;
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
transform: rotateX(360deg);
|
|
798
798
|
}
|
|
799
799
|
}
|
|
800
|
-
`,hr=
|
|
800
|
+
`,hr=f.div`
|
|
801
801
|
position: absolute;
|
|
802
802
|
width: 100%;
|
|
803
803
|
height: 100%;
|
|
@@ -812,7 +812,7 @@
|
|
|
812
812
|
${({$back:e})=>e&&`
|
|
813
813
|
transform: rotateX(180deg) translateZ(20px);
|
|
814
814
|
`}
|
|
815
|
-
`,[L,
|
|
815
|
+
`,[L,ye]=O(["button","icon"]),Zc=d.forwardRef(({variant:e,text:t,disabled:o,className:n,icon:r,...s},c)=>i.jsx(M.ClassNames,{children:({cx:a})=>i.jsxs(Xc,{disabled:o,className:a(e,n),ref:c,...s,children:[r&&i.jsx(Jc,{children:i.jsx(F,{iconId:r,size:"sm",color:"white"})}),t]})})),We=d.memo(Zc);We.displayName="StudioButton";const Xc=f.button`
|
|
816
816
|
font-weight: ${L("font-weight")};
|
|
817
817
|
font-size: ${L("font-size")};
|
|
818
818
|
line-height: ${L("line-height")};
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
// This token will let us flip the icon and text if we want to
|
|
835
835
|
flex-direction: ${L("flex-direction")};
|
|
836
836
|
|
|
837
|
-
${`${
|
|
837
|
+
${`${ye("fill-white",!0)}: ${L("color")}`};
|
|
838
838
|
|
|
839
839
|
&.primary-small,
|
|
840
840
|
&.secondary-small,
|
|
@@ -847,14 +847,14 @@
|
|
|
847
847
|
border-color: ${L("border-hover")};
|
|
848
848
|
color: ${L("color-hover")};
|
|
849
849
|
background-color: ${L("bg-hover")};
|
|
850
|
-
${`${
|
|
850
|
+
${`${ye("fill-white",!0)}: ${L("color-hover")}`};
|
|
851
851
|
}
|
|
852
852
|
|
|
853
853
|
&:active {
|
|
854
854
|
border-color: ${L("border-active")};
|
|
855
855
|
color: ${L("color-active")};
|
|
856
856
|
background-color: ${L("bg-active")};
|
|
857
|
-
${`${
|
|
857
|
+
${`${ye("fill-white",!0)}: ${L("color-active")}`};
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
&:disabled {
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
border-color: ${L("border-disabled")};
|
|
863
863
|
color: ${L("color-disabled")};
|
|
864
864
|
background-color: ${L("bg-disabled")};
|
|
865
|
-
${`${
|
|
865
|
+
${`${ye("fill-white",!0)}: ${L("color-disabled")}`};
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
// Re-assign bg and color vars for secondary buttons.
|
|
@@ -871,26 +871,26 @@
|
|
|
871
871
|
background-color: ${L("bg-secondary")};
|
|
872
872
|
color: ${L("color-secondary")};
|
|
873
873
|
border-color: ${L("border-secondary")};
|
|
874
|
-
${`${
|
|
874
|
+
${`${ye("fill-white",!0)}: ${L("color-secondary")}`};
|
|
875
875
|
&:hover {
|
|
876
876
|
border-color: ${L("border-hover-secondary")};
|
|
877
877
|
color: ${L("color-hover-secondary")};
|
|
878
878
|
background-color: ${L("bg-hover-secondary")};
|
|
879
|
-
${`${
|
|
879
|
+
${`${ye("fill-white",!0)}: ${L("color-hover-secondary")}`};
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
&:active {
|
|
883
883
|
border-color: ${L("border-active-secondary")};
|
|
884
884
|
color: ${L("color-active-secondary")};
|
|
885
885
|
background-color: ${L("bg-active-secondary")};
|
|
886
|
-
${`${
|
|
886
|
+
${`${ye("fill-white",!0)}: ${L("color-active-secondary")}`};
|
|
887
887
|
}
|
|
888
888
|
|
|
889
889
|
&:disabled {
|
|
890
890
|
border-color: ${L("border-disabled-secondary")};
|
|
891
891
|
color: ${L("color-disabled-secondary")};
|
|
892
892
|
background-color: ${L("bg-disabled-secondary")};
|
|
893
|
-
${`${
|
|
893
|
+
${`${ye("fill-white",!0)}: ${L("color-disabled-secondary")}`};
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
|
|
@@ -900,19 +900,19 @@
|
|
|
900
900
|
background-color: ${L("bg-borderless")};
|
|
901
901
|
color: ${L("color-borderless")};
|
|
902
902
|
border-color: ${L("border-borderless")};
|
|
903
|
-
${`${
|
|
903
|
+
${`${ye("fill-white",!0)}: ${L("color-borderless")}`};
|
|
904
904
|
&:hover {
|
|
905
905
|
border-color: ${L("border-hover-borderless")};
|
|
906
906
|
color: ${L("color-hover-borderless")};
|
|
907
907
|
background-color: ${L("bg-hover-borderless")};
|
|
908
|
-
${`${
|
|
908
|
+
${`${ye("fill-white",!0)}: ${L("color-hover-borderless")}`};
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
&:active {
|
|
912
912
|
border-color: ${L("border-active-borderless")};
|
|
913
913
|
color: ${L("color-active-borderless")};
|
|
914
914
|
background-color: ${L("bg-active-borderless")};
|
|
915
|
-
${`${
|
|
915
|
+
${`${ye("fill-white",!0)}: ${L("color-active-borderless")}`};
|
|
916
916
|
}
|
|
917
917
|
|
|
918
918
|
&:disabled {
|
|
@@ -920,13 +920,13 @@
|
|
|
920
920
|
border-color: ${L("border-disabled-borderless")};
|
|
921
921
|
color: ${L("color-disabled-borderless")};
|
|
922
922
|
background-color: ${L("bg-disabled-borderless")};
|
|
923
|
-
${`${
|
|
923
|
+
${`${ye("fill-white",!0)}: ${L("color-disabled-borderless")}`};
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
|
-
`,
|
|
926
|
+
`,Jc=f.span`
|
|
927
927
|
display: flex;
|
|
928
928
|
margin: ${L("icon-margin")};
|
|
929
|
-
`,
|
|
929
|
+
`,gs=d.createContext(void 0);function fs(){const e=d.useContext(gs);if(!e)throw new Error("useButtonGroupContext must be used within a ButtonGroup component");return e}const[Ct]=O(["button-group"]),Qc=({value:e,defaultValue:t,onValueChange:o,children:n,className:r})=>{const[s,c]=d.useState(t),a=e??s,u=o??c,p=d.useMemo(()=>({value:a,setValue:u}),[a,u]);return i.jsx(gs.Provider,{value:p,children:i.jsx(ed,{className:r,children:n})})},ed=f.div`
|
|
930
930
|
display: inline-flex;
|
|
931
931
|
align-items: center;
|
|
932
932
|
gap: ${Ct("gap")};
|
|
@@ -934,20 +934,20 @@
|
|
|
934
934
|
border-radius: ${Ct("border-radius")};
|
|
935
935
|
border: ${Ct("border-width")} solid ${Ct("border-color")};
|
|
936
936
|
padding: ${Ct("padding")};
|
|
937
|
-
`,[
|
|
937
|
+
`,[ct,td]=O(["button-group","icon"]),ms=d.memo(({value:e,iconId:t,label:o,tooltip:n,disabled:r})=>{const{value:s,setValue:c}=fs(),a=s===e,u=d.useCallback(()=>{r||c(e)},[e,c,r]);return i.jsxs(od,{type:"button","data-active":a,onClick:u,disabled:r,title:n,"aria-pressed":a,children:[t&&i.jsx(F,{iconId:t,size:"sm",color:a?"black":"grey",className:"button-group-icon"}),o&&i.jsx("span",{className:"button-group-label",children:o})]})});ms.displayName="ButtonGroupItem";const od=f.button`
|
|
938
938
|
display: inline-flex;
|
|
939
939
|
align-items: center;
|
|
940
940
|
justify-content: center;
|
|
941
941
|
gap: 4px;
|
|
942
942
|
border: none;
|
|
943
|
-
background-color: ${
|
|
944
|
-
border-radius: ${
|
|
945
|
-
padding: ${
|
|
943
|
+
background-color: ${ct("item-background-color")};
|
|
944
|
+
border-radius: ${ct("item-border-radius")};
|
|
945
|
+
padding: ${ct("item-padding")};
|
|
946
946
|
cursor: pointer;
|
|
947
947
|
transition: background-color 0.125s ease-in-out;
|
|
948
948
|
|
|
949
949
|
.button-group-label {
|
|
950
|
-
color: ${
|
|
950
|
+
color: ${ct("item-color")};
|
|
951
951
|
font-size: 12px;
|
|
952
952
|
transition: color 0.125s ease-in-out;
|
|
953
953
|
}
|
|
@@ -957,7 +957,7 @@
|
|
|
957
957
|
}
|
|
958
958
|
|
|
959
959
|
&:hover:not(:disabled) {
|
|
960
|
-
background-color: ${
|
|
960
|
+
background-color: ${ct("item-background-color-hover")};
|
|
961
961
|
}
|
|
962
962
|
|
|
963
963
|
&:disabled {
|
|
@@ -966,42 +966,42 @@
|
|
|
966
966
|
}
|
|
967
967
|
|
|
968
968
|
&[data-active="true"] {
|
|
969
|
-
background-color: ${
|
|
969
|
+
background-color: ${ct("item-background-color-active")};
|
|
970
970
|
|
|
971
971
|
.button-group-label {
|
|
972
|
-
color: ${
|
|
972
|
+
color: ${ct("item-color-active")};
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
-
${`${
|
|
975
|
+
${`${td("fill-grey",!0)}: ${ct("item-color-active")}`};
|
|
976
976
|
}
|
|
977
|
-
`,[
|
|
978
|
-
height: ${
|
|
979
|
-
width: ${
|
|
977
|
+
`,[ze]=O(["checkbox"]),yt=d.forwardRef((e,t)=>i.jsxs(nd,{children:[i.jsx(rd,{ref:t,...e,type:"checkbox"}),i.jsx(gr,{className:"check-icon",children:i.jsx(F,{iconId:"CheckSmall",size:"xsm",color:"white"})}),i.jsx(gr,{className:"minus-icon",children:i.jsx(F,{iconId:"Minus",size:"xsm",color:"white"})})]})),nd=f.div`
|
|
978
|
+
height: ${ze("size")};
|
|
979
|
+
width: ${ze("size")};
|
|
980
980
|
pointer-events: none;
|
|
981
981
|
position: relative;
|
|
982
982
|
display: flex;
|
|
983
983
|
flex-shrink: 0;
|
|
984
|
-
border: ${
|
|
985
|
-
background-color: ${
|
|
986
|
-
border-radius: ${
|
|
984
|
+
border: ${ze("border-width")} solid ${ze("border-color")};
|
|
985
|
+
background-color: ${ze("background-color")};
|
|
986
|
+
border-radius: ${ze("border-radius")};
|
|
987
987
|
overflow: hidden;
|
|
988
988
|
cursor: pointer;
|
|
989
989
|
transition: background 0.125s ease-in-out, border 0.125s ease-in-out;
|
|
990
990
|
:has(> input:disabled) {
|
|
991
|
-
background-color: ${
|
|
991
|
+
background-color: ${ze("background-color-disabled")};
|
|
992
992
|
cursor: not-allowed;
|
|
993
993
|
}
|
|
994
994
|
:has(> input:checked),
|
|
995
995
|
:has(> input:indeterminate) {
|
|
996
|
-
background-color: ${
|
|
997
|
-
border-color: ${
|
|
996
|
+
background-color: ${ze("background-color-checked")};
|
|
997
|
+
border-color: ${ze("border-color-checked")};
|
|
998
998
|
}
|
|
999
999
|
:has(> input:checked:disabled),
|
|
1000
1000
|
:has(> input:indeterminate:disabled) {
|
|
1001
|
-
border-color: ${
|
|
1002
|
-
background-color: ${
|
|
1001
|
+
border-color: ${ze("border-color-checked-disabled")};
|
|
1002
|
+
background-color: ${ze("background-color-checked-disabled")};
|
|
1003
1003
|
}
|
|
1004
|
-
`,
|
|
1004
|
+
`,gr=f.div`
|
|
1005
1005
|
opacity: 0;
|
|
1006
1006
|
width: 100%;
|
|
1007
1007
|
height: 100%;
|
|
@@ -1013,7 +1013,7 @@
|
|
|
1013
1013
|
top: 0;
|
|
1014
1014
|
left: 0;
|
|
1015
1015
|
z-index: 1;
|
|
1016
|
-
`,
|
|
1016
|
+
`,rd=f.input`
|
|
1017
1017
|
margin: 0px;
|
|
1018
1018
|
position: absolute;
|
|
1019
1019
|
top: 0;
|
|
@@ -1038,15 +1038,15 @@
|
|
|
1038
1038
|
opacity: 1;
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
|
-
`,
|
|
1041
|
+
`,sd=({defaultOpen:e=!1,open:t,onOpenChange:o})=>{const[n,r]=d.useState(e),s=t??n,c=o??r;return d.useMemo(()=>({open:s,setOpen:c}),[s,c])},bs=d.createContext(null),Mt=()=>{const e=d.useContext(bs);if(e==null)throw new Error("Collapsible components must be wrapped in <Collapsible />");return e},Jt=({children:e,...t})=>{const o=sd(t);return i.jsx(bs.Provider,{value:o,children:e})},xn=({children:e})=>{const{open:t,setOpen:o}=Mt(),n=d.useCallback(()=>{o(!t)},[t,o]);if(d.isValidElement(e))return d.cloneElement(e,{...e.props,onClick:n,"data-state":t?"open":"closed"});throw new Error("Passed CollapsibleTrigger an invalid element")},Qt=({children:e})=>{const{open:t}=Mt();return t?e:null};function xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var id=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n<e.rangeCount;n++)o.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||o.forEach(function(r){e.addRange(r)}),t&&t.focus()}},ad=id,fr={"text/plain":"Text","text/html":"Url",default:"Text"},ld="Copy to clipboard: #{key}, Enter";function cd(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function dd(e,t){var o,n,r,s,c,a,u=!1;t||(t={}),o=t.debug||!1;try{r=ad(),s=document.createRange(),c=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(h){if(h.stopPropagation(),t.format)if(h.preventDefault(),typeof h.clipboardData>"u"){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var g=fr[t.format]||fr.default;window.clipboardData.setData(g,e)}else h.clipboardData.clearData(),h.clipboardData.setData(t.format,e);t.onCopy&&(h.preventDefault(),t.onCopy(h.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),c.addRange(s);var p=document.execCommand("copy");if(!p)throw new Error("copy command was unsuccessful");u=!0}catch(h){o&&console.error("unable to copy using execCommand: ",h),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(g){o&&console.error("unable to copy using clipboardData: ",g),o&&console.error("falling back to prompt"),n=cd("message"in t?t.message:ld),window.prompt(n,e)}}finally{c&&(typeof c.removeRange=="function"?c.removeRange(s):c.removeAllRanges()),a&&document.body.removeChild(a),r()}return u}var ud=dd;const pd=xs(ud),hd=250,gd=500,fd=({children:e,color:t,copyable:o=!0,copyText:n,onClick:r,onMouseMove:s,onMouseOut:c,onMouseOver:a,style:u,className:p,textClassName:h,...g})=>{const m=d.useRef(),x=d.useRef(),b=d.useRef(null),y=d.useRef(null),[v,w]=d.useState(!1),[$,k]=d.useState(!1),j=d.useCallback(S=>{let z=n;z||(z=typeof e=="string"?String(e):""),w(!0),pd(z);const V=()=>{w(!1)};clearTimeout(m.current),m.current=setTimeout(V,gd),r==null||r(S)},[e,n,r]),C=d.useCallback(S=>{if(!b.current||!y.current){s==null||s(S);return}const z=y.current.getBoundingClientRect(),V=S.clientX-z.left+9,P=S.clientY-z.top+9;b.current.style.transform=`translate(${V}px, ${P}px)`,s==null||s(S)},[s]),D=d.useCallback(S=>{w(!1),k(!1),clearTimeout(x.current),c==null||c(S)},[c]),I=d.useCallback(S=>{const z=()=>{k(!0)};return clearTimeout(x.current),x.current=setTimeout(z,hd),a==null||a(S),()=>{clearTimeout(x.current)}},[a]);return i.jsxs("div",{className:p,style:{position:"relative"},children:[i.jsx(md,{ref:y,children:e,onClick:o?j:r,onMouseMove:o?C:s,onMouseOut:o?D:c,onMouseOver:o?I:a,className:h,style:o?v?{...u,opacity:.5,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"},...g}),o&&i.jsx(F,{ref:b,iconId:"CopyFilled",style:{position:"absolute",transition:"opacity 150ms ease-in-out",top:"0px",left:"0px",opacity:$&&!v?"1":"0"}})]})},md=f(_)`
|
|
1042
1042
|
position: relative;
|
|
1043
1043
|
transition: opacity 150ms ease-in-out;
|
|
1044
|
-
`,
|
|
1044
|
+
`,bd=({children:e,forwardedRef:t,setFloatingReference:o,getReferenceProps:n,open:r})=>{const s=e.ref,c=A.useMergeRefs([o,t,s]);if(d.isValidElement(e))return d.cloneElement(e,n({ref:c,...e.props,"data-state":r?"open":"closed"}));throw new Error("Passed useDecoratedFloatingUITrigger an invalid child element")};function ys({defaultOpen:e=!1,open:t,onOpenChange:o,dismissOptions:n}={}){const[r,s]=d.useState(e),c=t??r,a=d.useCallback(x=>{t===void 0&&s(x),o==null||o(x)},[t,o]),u=A.useFloating({open:c,onOpenChange:a}),p=u.context,h=A.useClick(p),g=A.useDismiss(p,n?{outsidePressEvent:"mousedown",...n}:{outsidePressEvent:"mousedown"}),m=A.useInteractions([h,g]);return d.useMemo(()=>({open:c,setOpen:a,...m,...u}),[c,a,m,u])}const xd=M.css`
|
|
1045
1045
|
background: rgba(0, 0, 0, 0.8);
|
|
1046
1046
|
display: grid;
|
|
1047
1047
|
place-items: center;
|
|
1048
1048
|
z-index: 1;
|
|
1049
|
-
`,
|
|
1049
|
+
`,vs=d.createContext(null),Xe=()=>{const e=d.useContext(vs);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e},yn=d.memo(({children:e,...t})=>{const o=ys(t);return i.jsx(vs.Provider,{value:o,children:e})}),vn=d.forwardRef(({children:e},t)=>{const o=Xe();return bd({children:e,forwardedRef:t,setFloatingReference:o.refs.setReference,getReferenceProps:o.getReferenceProps,open:o.open})}),kn=d.forwardRef(({disableScrollLock:e,modal:t,portalRoot:o,portalId:n,trapFocus:r,transitionDuration:s,OverlayStyles:c,disableFocusManagement:a,children:u,initialFocus:p,...h},g)=>{const{context:m,...x}=Xe(),b=A.useMergeRefs([x.refs.setFloating,g]),{isMounted:y,status:v}=A.useTransitionStatus(m,{duration:s||0});if(!d.isValidElement(u))throw new Error("Passed an invalid child element to Dialog.");if(!y)return null;const w=t?xd:c;return i.jsx(A.FloatingPortal,{id:n,root:o,children:i.jsx(A.FloatingFocusManager,{context:m,modal:r,returnFocus:!1,initialFocus:p,disabled:a,children:i.jsx(A.FloatingOverlay,{css:w,"data-status":v,lockScroll:!e,children:d.cloneElement(u,{...u.props,ref:b,"data-status":v==="initial"?"open":v,...x.getFloatingProps(h)})})})})}),wn=300;function Cn(){const e=d.useRef(null),[t,o]=d.useState();return d.useEffect(()=>{const n=new ResizeObserver(([r])=>{r&&o(r.contentRect.width)});return e.current&&n.observe(e.current),()=>n.disconnect()},[]),[e,t]}const yd=f.div`
|
|
1050
1050
|
background-color: transparent;
|
|
1051
1051
|
box-sizing: border-box;
|
|
1052
1052
|
cursor: ew-resize;
|
|
@@ -1066,25 +1066,25 @@
|
|
|
1066
1066
|
right: -4px;
|
|
1067
1067
|
top: 0;
|
|
1068
1068
|
}
|
|
1069
|
-
`,
|
|
1069
|
+
`,eo=({inverse:e=!1,maxSize:t,minSize:o=200,onChange:n,size:r,...s})=>{const c=d.useRef(0),a=il.useDrag(({down:u,movement:[p],first:h})=>{if(!u)return;h&&(c.current=r);let g=c.current-p*(e?-1:1);g<o&&(g=o),t!==void 0&&g>t&&(g=t),n(g)});return i.jsx(yd,{...s,...a()})},vd=({defaultOpen:e=!1,minSize:t,mode:o,onOpenChange:n,open:r,size:s=440})=>{const[c,a]=d.useState(e),[u,p]=d.useState(s),h=r??c,g=n??a;return d.useMemo(()=>({mode:o,open:h,setOpen:g,setSize:p,size:u,minSize:t}),[t,o,h,g,u])},rn=d.createContext(null),at=()=>{const e=d.useContext(rn);if(e==null)throw new Error("Drawer components must be wrapped in <Drawer />");return e},[pe]=O(["drawer"]),kd=f.div`
|
|
1070
1070
|
display: flex;
|
|
1071
1071
|
height: 100%;
|
|
1072
1072
|
position: absolute;
|
|
1073
1073
|
width: 100%;
|
|
1074
1074
|
z-index: 1;
|
|
1075
1075
|
pointer-events: none;
|
|
1076
|
-
`,
|
|
1076
|
+
`,ks=M.css`
|
|
1077
1077
|
pointer-events: none;
|
|
1078
1078
|
display: grid;
|
|
1079
1079
|
overflow: hidden !important;
|
|
1080
1080
|
z-index: 1;
|
|
1081
|
-
`,
|
|
1081
|
+
`,wd=M.css`
|
|
1082
1082
|
place-items: start;
|
|
1083
|
-
${
|
|
1084
|
-
`,
|
|
1083
|
+
${ks};
|
|
1084
|
+
`,Cd=M.css`
|
|
1085
1085
|
place-items: end;
|
|
1086
|
-
${
|
|
1087
|
-
`,
|
|
1086
|
+
${ks};
|
|
1087
|
+
`,ws=f.div`
|
|
1088
1088
|
align-items: flex-start;
|
|
1089
1089
|
animation-timing-function: ease-in-out;
|
|
1090
1090
|
border-color: ${pe("border-color")};
|
|
@@ -1100,33 +1100,33 @@
|
|
|
1100
1100
|
// We add 50ms here to hedge against a race condition between
|
|
1101
1101
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1102
1102
|
animation-duration: ${wn+10}ms;
|
|
1103
|
-
`,
|
|
1103
|
+
`,Cs=f.div`
|
|
1104
1104
|
display: flex;
|
|
1105
1105
|
height: 100%;
|
|
1106
1106
|
width: 100%;
|
|
1107
|
-
|
|
1107
|
+
`,$s=f.div`
|
|
1108
1108
|
flex: 1;
|
|
1109
1109
|
width: 100%;
|
|
1110
1110
|
height: 100%;
|
|
1111
|
-
|
|
1111
|
+
`,$d=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:c}=at(),[a,u]=Cn(),p=u!==void 0,h=s/(u||1);return i.jsx(Cs,{ref:a,children:p&&i.jsxs(i.Fragment,{children:[i.jsx(ws,{ref:n,className:t,style:{flexGrow:h},...o,children:e}),i.jsx(eo,{inverse:!0,size:s,minSize:r,onChange:c}),i.jsx($s,{style:{flexGrow:1-h}})]})})}),jd=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:c}=at(),[a,u]=Cn(),p=u!==void 0,h=s/(u||1);return i.jsx(Cs,{ref:a,children:p&&i.jsxs(i.Fragment,{children:[i.jsx($s,{style:{flexGrow:1-h}}),i.jsx(eo,{size:s,minSize:r,onChange:c}),i.jsx(ws,{ref:n,className:t,style:{flexGrow:h},...o,children:e})]})})}),Sd=M.keyframes({"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(0%)"}}),Id=M.keyframes({"0%":{transform:"translateX(0%)"},"100%":{transform:"translateX(-100%)"}}),Dd=f($d)`
|
|
1112
1112
|
border-right-width: ${pe("border-width")};
|
|
1113
1113
|
box-shadow: ${pe("left-drop-shadow")};
|
|
1114
1114
|
&[data-status="open"] {
|
|
1115
|
-
animation-name: ${
|
|
1115
|
+
animation-name: ${Sd};
|
|
1116
1116
|
}
|
|
1117
1117
|
&[data-status="close"] {
|
|
1118
|
-
animation-name: ${
|
|
1118
|
+
animation-name: ${Id};
|
|
1119
1119
|
}
|
|
1120
|
-
`,
|
|
1120
|
+
`,_d=M.keyframes({from:{transform:"translateX(100%)"},to:{transform:"translateX(0%)"}}),Td=M.keyframes({from:{transform:"translateX(0%)"},to:{transform:"translateX(100%)"}}),js=f(jd)`
|
|
1121
1121
|
border-left-width: ${pe("border-width")};
|
|
1122
1122
|
box-shadow: ${pe("right-drop-shadow")};
|
|
1123
1123
|
&[data-status="open"] {
|
|
1124
|
-
animation-name: ${
|
|
1124
|
+
animation-name: ${_d};
|
|
1125
1125
|
}
|
|
1126
1126
|
&[data-status="close"] {
|
|
1127
|
-
animation-name: ${
|
|
1127
|
+
animation-name: ${Td};
|
|
1128
1128
|
}
|
|
1129
|
-
`,
|
|
1129
|
+
`,Ss=f.div`
|
|
1130
1130
|
width: 100%;
|
|
1131
1131
|
pointer-events: all;
|
|
1132
1132
|
height: fit-content;
|
|
@@ -1137,23 +1137,23 @@
|
|
|
1137
1137
|
// We add 50ms here to hedge against a race condition between
|
|
1138
1138
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1139
1139
|
animation-duration: ${wn+10}ms;
|
|
1140
|
-
`,
|
|
1140
|
+
`,Ed=M.keyframes({from:{transform:"translateY(-30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),zd=M.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-30px)",opacity:0}}),Md=f(Ss)`
|
|
1141
1141
|
border-bottom-width: ${pe("border-width")};
|
|
1142
1142
|
&[data-status="open"] {
|
|
1143
|
-
animation-name: ${
|
|
1143
|
+
animation-name: ${Ed};
|
|
1144
1144
|
}
|
|
1145
1145
|
&[data-status="close"] {
|
|
1146
|
-
animation-name: ${
|
|
1146
|
+
animation-name: ${zd};
|
|
1147
1147
|
}
|
|
1148
|
-
`,
|
|
1148
|
+
`,Is=M.keyframes({from:{transform:"translateY(30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),Ds=M.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(30px)",opacity:0}}),Od=f(Ss)`
|
|
1149
1149
|
border-top-width: ${pe("border-width")};
|
|
1150
1150
|
&[data-status="open"] {
|
|
1151
|
-
animation-name: ${
|
|
1151
|
+
animation-name: ${Is};
|
|
1152
1152
|
}
|
|
1153
1153
|
&[data-status="close"] {
|
|
1154
|
-
animation-name: ${
|
|
1154
|
+
animation-name: ${Ds};
|
|
1155
1155
|
}
|
|
1156
|
-
`,
|
|
1156
|
+
`,_s=f.div`
|
|
1157
1157
|
display: flex;
|
|
1158
1158
|
align-items: flex-start;
|
|
1159
1159
|
justify-content: flex-start;
|
|
@@ -1164,47 +1164,51 @@
|
|
|
1164
1164
|
border-width: 0px;
|
|
1165
1165
|
border-color: ${pe("border-color")};
|
|
1166
1166
|
border-style: solid;
|
|
1167
|
-
`,
|
|
1167
|
+
`,Rd=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=at();return i.jsxs(i.Fragment,{children:[i.jsx(eo,{inverse:!0,size:n,onChange:r}),i.jsx(_s,{ref:o,className:t,style:{width:n},children:e})]})}),Nd=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=at();return i.jsxs(i.Fragment,{children:[i.jsx(eo,{size:n,onChange:r}),i.jsx(_s,{ref:o,className:t,style:{width:n},children:e})]})}),Fd=f(Rd)`
|
|
1168
1168
|
border-right-width: ${pe("border-width")};
|
|
1169
1169
|
box-shadow: ${pe("left-drop-shadow")};
|
|
1170
|
-
`,
|
|
1170
|
+
`,Ad=f(Nd)`
|
|
1171
1171
|
border-left-width: ${pe("border-width")};
|
|
1172
1172
|
box-shadow: ${pe("right-drop-shadow")};
|
|
1173
|
-
`,
|
|
1173
|
+
`,Ts=f.div`
|
|
1174
1174
|
width: 100%;
|
|
1175
1175
|
pointer-events: all;
|
|
1176
1176
|
height: fit-content;
|
|
1177
1177
|
border-width: 0px;
|
|
1178
1178
|
border-color: ${pe("border-color")};
|
|
1179
1179
|
border-style: solid;
|
|
1180
|
-
`,
|
|
1180
|
+
`,Ld=f(Ts)`
|
|
1181
1181
|
border-bottom-width: ${pe("border-width")};
|
|
1182
|
-
`,
|
|
1182
|
+
`,Bd=f(Ts)`
|
|
1183
1183
|
border-top-width: ${pe("border-width")};
|
|
1184
1184
|
&[data-status="open"] {
|
|
1185
|
-
animation-name: ${
|
|
1185
|
+
animation-name: ${Is};
|
|
1186
1186
|
}
|
|
1187
1187
|
&[data-status="close"] {
|
|
1188
|
-
animation-name: ${
|
|
1188
|
+
animation-name: ${Ds};
|
|
1189
1189
|
}
|
|
1190
|
-
`,
|
|
1190
|
+
`,Wd={escapeKey:!0,outsidePress:!1},Es=d.memo(({children:e,...t})=>{const o=vd(t);return t.mode==="dialog"?i.jsx(rn.Provider,{value:o,children:i.jsx(yn,{onOpenChange:o.setOpen,open:o.open,defaultOpen:t.defaultOpen??!1,dismissOptions:Wd,children:e})}):i.jsx(rn.Provider,{value:o,children:e})}),Pd=d.memo(({children:e})=>{const{mode:t,open:o,setOpen:n}=at(),r=d.useCallback(()=>{n(!o)},[o,n]);if(t==="dialog")return i.jsx(vn,{children:e});if(d.isValidElement(e))return d.cloneElement(e,{...e.props,onClick:r,"data-state":o?"open":"closed"});throw new Error("Passed DialogTrigger an invalid element")}),zs=d.memo(({children:e,OverlayStyles:t,...o})=>{const{mode:n,open:r}=at();if(n==="dialog")return i.jsx(kn,{disableScrollLock:!0,disableFocusManagement:!0,OverlayStyles:t,transitionDuration:wn,...o,children:e});if(t)throw new Error("OverlayStyles are not used in inline drawers.");return r?n==="inline-float"?i.jsx(kd,{children:e}):e:null});var Ms={exports:{}};/*!
|
|
1191
1191
|
Copyright (c) 2018 Jed Watson.
|
|
1192
1192
|
Licensed under the MIT License (MIT), see
|
|
1193
1193
|
http://jedwatson.github.io/classnames
|
|
1194
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",
|
|
1194
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",c=0;c<arguments.length;c++){var a=arguments[c];a&&(s=r(s,n(a)))}return s}function n(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return o.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var c="";for(var a in s)t.call(s,a)&&s[a]&&(c=r(c,a));return c}function r(s,c){return c?s?s+" "+c:s+c:s}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(Ms);var Vd=Ms.exports;const vt=xs(Vd),[fe]=O(["icon-button"]),Hd=[4,8],te=d.forwardRef(({iconId:e,badgeOffset:t,badgeBorderColor:o="white",color:n,className:r,size:s,type:c,isActive:a,badgeColor:u,hasBadge:p,withPadding:h,withRadius:g,...m},x)=>i.jsxs(Ud,{className:vt({isActive:a,withRadius:g},r),type:c??"button",ref:x,"data-pad-amount":h,...m,children:[p&&i.jsx(Gd,{"data-size":s,"data-border-color":o??n,"data-color":u??n,style:t?{right:t.x,top:t.y}:void 0}),i.jsx(F,{size:s,color:m.disabled?"grey":n??"white",iconId:e,className:"icon-button-icon"})]})),Ud=f.button`
|
|
1195
1195
|
box-sizing: border-box;
|
|
1196
1196
|
align-items: center;
|
|
1197
1197
|
justify-content: center;
|
|
1198
1198
|
display: flex;
|
|
1199
1199
|
position: relative;
|
|
1200
1200
|
border: 0px;
|
|
1201
|
-
background-color: ${
|
|
1202
|
-
border-color: ${
|
|
1203
|
-
border-radius: ${
|
|
1204
|
-
padding: ${
|
|
1205
|
-
cursor: ${
|
|
1201
|
+
background-color: ${fe("background-color")};
|
|
1202
|
+
border-color: ${fe("border-color")};
|
|
1203
|
+
border-radius: ${fe("border-radius")};
|
|
1204
|
+
padding: ${fe("padding")};
|
|
1205
|
+
cursor: ${fe("cursor")};
|
|
1206
|
+
&.withRadius {
|
|
1207
|
+
border-radius: ${fe("radius")};
|
|
1208
|
+
overflow: hidden;
|
|
1209
|
+
}
|
|
1206
1210
|
&:disabled {
|
|
1207
|
-
cursor: ${
|
|
1211
|
+
cursor: ${fe("disabled-cursor")};
|
|
1208
1212
|
}
|
|
1209
1213
|
> .icon-button-icon {
|
|
1210
1214
|
transition: fill-opacity 0.125s ease-in-out;
|
|
@@ -1215,30 +1219,33 @@
|
|
|
1215
1219
|
}
|
|
1216
1220
|
}
|
|
1217
1221
|
&.isActive {
|
|
1218
|
-
background-color: ${
|
|
1222
|
+
background-color: ${fe("active-background-color")};
|
|
1219
1223
|
}
|
|
1220
|
-
|
|
1224
|
+
${Hd.map(e=>`&[data-pad-amount="${e}"] {
|
|
1225
|
+
padding: ${fe(`padding-${e}`)};
|
|
1226
|
+
}`).join("")}
|
|
1227
|
+
`,Gd=f.div`
|
|
1221
1228
|
position: absolute;
|
|
1222
|
-
border: 1.5px solid ${
|
|
1229
|
+
border: 1.5px solid ${l("color-black")};
|
|
1223
1230
|
border-radius: 50%;
|
|
1224
|
-
top: ${
|
|
1225
|
-
right: ${
|
|
1231
|
+
top: ${fe("badge-top")};
|
|
1232
|
+
right: ${fe("badge-right")};
|
|
1226
1233
|
transform: translate(50%, -50%);
|
|
1227
1234
|
// Border Colors
|
|
1228
1235
|
${nn.map(e=>`&[data-border-color="${e}"] {
|
|
1229
|
-
border-color: ${
|
|
1236
|
+
border-color: ${fe(`badge-fill-${e}`)};
|
|
1230
1237
|
}`).join("")}
|
|
1231
1238
|
// Colors
|
|
1232
1239
|
${nn.map(e=>`&[data-color="${e}"] {
|
|
1233
|
-
background-color: ${
|
|
1240
|
+
background-color: ${fe(`badge-fill-${e}`)};
|
|
1234
1241
|
}`).join("")}
|
|
1235
|
-
width: ${
|
|
1236
|
-
height: ${
|
|
1237
|
-
`,
|
|
1242
|
+
width: ${l("spacing-8")};
|
|
1243
|
+
height: ${l("spacing-8")};
|
|
1244
|
+
`,Kd=f(te)`
|
|
1238
1245
|
&.isLocked {
|
|
1239
1246
|
cursor: url("/ui/custom-cursors/locked-cursor.png"), not-allowed !important;
|
|
1240
1247
|
}
|
|
1241
|
-
`,[Ft]=
|
|
1248
|
+
`,[Ft]=O(["drawer"]),Yd=d.memo(({children:e,className:t,closeIcon:o,showCloseButton:n=!0,title:r,textVariant:s="h2",textBold:c=!1,inheritTextColor:a=!1})=>{const{setOpen:u}=at(),p=d.useCallback(()=>{u(!1)},[u]);return i.jsxs(qd,{className:t,children:[i.jsx(_,{bold:c,color:a?void 0:"dark",variant:s,children:r}),e,n&&i.jsx(te,{onClick:p,iconId:o||"Close",size:"sm",color:a?void 0:"blue"})]})}),qd=f.div`
|
|
1242
1249
|
width: 100%;
|
|
1243
1250
|
display: flex;
|
|
1244
1251
|
align-items: center;
|
|
@@ -1247,16 +1254,16 @@
|
|
|
1247
1254
|
background-color: ${Ft("header-bg")};
|
|
1248
1255
|
border-bottom: ${Ft("header-border-size")} solid ${Ft("header-border-color")};
|
|
1249
1256
|
padding: 0px ${Ft("header-x-padding")};
|
|
1250
|
-
`,[mr]=
|
|
1257
|
+
`,[mr]=O(["horizontal-rule"]),Zd=f.div`
|
|
1251
1258
|
width: 100%;
|
|
1252
1259
|
border-bottom: ${mr("border-width")} solid
|
|
1253
1260
|
${mr("border-color")};
|
|
1254
|
-
`,[ie]=
|
|
1261
|
+
`,[ie]=O(["input"]),kt=d.forwardRef(({className:e,type:t,prefixIconId:o,prefixIconColor:n,prefixSize:r,isSmall:s,autoCapitalize:c="off",autoComplete:a="off",autoCorrect:u="off",suffixIconColor:p,suffixIcon:h,suffixIconId:g,suffixSize:m,onSuffixIconClick:x,onEnter:b,onKeyDown:y,onClear:v,...w},$)=>{const k=t==="password",[j,C]=d.useState(!1),[D,I]=d.useState(t),S=d.useCallback(()=>{I(j?"password":"text"),C(!j)},[j]),z=V=>{V.key==="Enter"&&(b==null||b()),y==null||y(V)};if(d.useEffect(()=>{I(t)},[t]),v&&k)throw new Error("Password inputs cannot have an onClear handler.");if(h&&k)throw new Error("Password inputs cannot have a suffix icon.");if(v&&h)throw new Error("Inputs with an onClear handler cannot have a suffix icon.");return i.jsx(M.ClassNames,{children:({cx:V})=>i.jsxs(Xd,{children:[i.jsx(Jd,{type:D,className:V(e,{isSmall:s,hasLeftIcon:!!o,hasRightIcon:!!k||!!g||!!h}),ref:$,autoCapitalize:k?"off":c,autoComplete:k?"current-password":a,autoCorrect:k?"off":u,onKeyDown:z,...w}),o&&i.jsx(Qd,{iconId:o,color:n||"black",size:r||"sm"}),(k||!!g||!!h||v&&!!w.value)&&i.jsx(eu,{children:h||(g?i.jsx(F,{iconId:g,color:p??"black",size:m||"sm",onClick:x}):v?i.jsx(te,{iconId:"Close",size:"sm",color:"black",onClick:v}):i.jsx(te,{onClick:S,iconId:j?"Eye":"EyeInvisible",size:"sm",color:n??"black"}))})]})})}),Xd=f.div`
|
|
1255
1262
|
width: 100%;
|
|
1256
1263
|
height: fit-content;
|
|
1257
1264
|
position: relative;
|
|
1258
1265
|
display: flex;
|
|
1259
|
-
`,
|
|
1266
|
+
`,Jd=f.input`
|
|
1260
1267
|
border: ${ie("border-width")} solid ${ie("border-color")};
|
|
1261
1268
|
border-radius: ${ie("border-radius")};
|
|
1262
1269
|
height: ${ie("height")};
|
|
@@ -1299,14 +1306,14 @@
|
|
|
1299
1306
|
&.hasRightIcon {
|
|
1300
1307
|
padding-right: ${ie("padding-right-icon")};
|
|
1301
1308
|
}
|
|
1302
|
-
`,
|
|
1309
|
+
`,Qd=f(F)`
|
|
1303
1310
|
position: absolute;
|
|
1304
1311
|
top: 50%;
|
|
1305
1312
|
transform: translateY(-50%);
|
|
1306
1313
|
pointer-events: none;
|
|
1307
1314
|
z-index: 1;
|
|
1308
1315
|
left: ${ie("icon-left")};
|
|
1309
|
-
`,
|
|
1316
|
+
`,eu=f.div`
|
|
1310
1317
|
position: absolute;
|
|
1311
1318
|
right: 8px;
|
|
1312
1319
|
top: 50%;
|
|
@@ -1314,29 +1321,29 @@
|
|
|
1314
1321
|
z-index: 1;
|
|
1315
1322
|
display: grid;
|
|
1316
1323
|
place-content: center;
|
|
1317
|
-
`;kt.displayName="Input";const
|
|
1324
|
+
`;kt.displayName="Input";const Os=d.forwardRef(({onSearch:e,onChange:t,value:o,placeholder:n,prefixIconColor:r,suffixIconColor:s,...c},a)=>i.jsx(kt,{...c,ref:a,autoComplete:"off",prefixIconColor:r??"black",prefixIconId:"Search",prefixSize:"xsm",suffixIconColor:s??"blue",suffixIconId:o?"Close":void 0,suffixSize:"xsm",onSuffixIconClick:()=>{t==null||t(""),e==null||e("")},placeholder:n||"Search for...",onKeyPress:u=>{u.key==="Enter"&&(u.preventDefault(),e(u.currentTarget.value))},onChange:u=>{t==null||t(u.target.value)},value:o})),[tu]=O(["label"]),Rs=M.css`
|
|
1318
1325
|
align-items: center;
|
|
1319
1326
|
display: flex;
|
|
1320
|
-
gap: ${
|
|
1321
|
-
`,
|
|
1322
|
-
color: ${
|
|
1323
|
-
`,
|
|
1327
|
+
gap: ${tu("gap")};
|
|
1328
|
+
`,Ns=({variant:e="body",...t})=>i.jsx(_,{css:Rs,variant:e,...t}),$n=({children:e,prefix:t,suffix:o,...n})=>i.jsxs(Ns,{...n,children:[t,e,o]}),[ou]=O(["label-with-action"]),nu=M.css([Rs,{gap:ou("gap")}]),ru=({action:e,variant:t="h2",...o})=>i.jsx($n,{css:nu,suffix:e,variant:t,...o}),[su]=O(["label-with-content-link"]),iu=M.css`
|
|
1329
|
+
color: ${su("color")};
|
|
1330
|
+
`,au=e=>i.jsx($n,{css:iu,...e}),lu=new RegExp(/^[a-zA-Z0-9 _.-]*$/),Fs=new RegExp(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),cu=new RegExp(/^\d+$/),du=new RegExp(/^\S*$/),uu=new RegExp(/^[a-zA-Z].*/),As=new RegExp(/^[-a-zA-Z0-9-_'().-]+(\s+[-a-zA-Z0-9-_'().-]+)*$/);var Ls=(e=>(e.email="email",e))(Ls||{});const pu=()=>({email:e=>Fs.test(e)}),hu=12;var Ut=(e=>(e.noDigit="noDigit",e.noUpperCase="noUpperCase",e.noSpecialCharacter="noSpecialCharacter",e.tooSimilar="tooSimilar",e))(Ut||{});const gu=(e,t)=>({...e?{tooSimilar:(o,n)=>{const r=n[t??"password_current"];return r?o!==r:!0}}:{tooSimilar:()=>!0},noDigit:o=>new RegExp(/\d/).test(o),noSpecialCharacter:o=>new RegExp(/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]+/).test(o),noUpperCase:o=>new RegExp(/[A-Z]+/).test(o)}),Bs=e=>typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string",fu=e=>{if(Bs(e))return e.message},mu=()=>{let e=!1,t=[];const o=new Map,n=new window.ResizeObserver((r,s)=>{t=t.concat(r),e||window.requestAnimationFrame(()=>{const c=new Set;t.forEach(a=>{if(!c.has(a.target)){c.add(a.target);const u=o.get(a.target);u&&u.forEach(p=>p(a,s))}}),t=[],e=!1}),e=!0});return{observer:n,subscribe(r,s){n.observe(r);const c=o.get(r)??[];c.push(s),o.set(r,c)},unsubscribe(r,s){const c=o.get(r)??[];if(c.length===1){n.unobserve(r),o.delete(r);return}const a=c.indexOf(s);a!==-1&&c.splice(a,1),o.set(r,c)}}};let Ao;const bu=()=>Ao||(Ao=mu()),Ws=(e,t)=>{const o=bu(),n=d.useRef(t);return d.useLayoutEffect(()=>{n.current=t},[t]),d.useLayoutEffect(()=>{let r=!1;const s=e&&"current"in e?e.current:e;if(!s)return Se;const c=(a,u)=>{r||n.current(a,u)};return o.subscribe(s,c),()=>{r=!0,o.unsubscribe(s,c)}},[e,o]),o.observer},yo=e=>{const t=d.useRef(null),o=d.useRef(null),n=d.useCallback(()=>{if(!t.current)return;const c=o.current,a=t.current;if(a!==null&&c!==null){const u=a.getAttribute("data-original");a.textContent!==u&&(a.textContent=u);const h=a.textContent,g=a.offsetWidth,m=c.offsetWidth;if(g>m&&h){const x=h.length,b=g/x,v=Math.ceil((g-m)/b)/2+1.5,w=Math.floor(x/2-v),$=Math.ceil(x/2+v),k=h.substr(0,w),j=h.substr($);a.textContent=`${k.trim()}...${j.trim()}`}}},[]),r=d.useCallback(c=>{n()},[n]);Ws(o,r),d.useEffect(()=>n(),[e.children,n]);const s=d.useCallback(c=>{t.current=c,o.current=(c==null?void 0:c.parentElement)??null},[]);return i.jsx(xu,{"data-original":e.children,ref:s,...e})},xu=f(_)`
|
|
1324
1331
|
white-space: nowrap;
|
|
1325
1332
|
word-break: keep-all;
|
|
1326
1333
|
overflow: visible;
|
|
1327
|
-
`,
|
|
1334
|
+
`,yu=f.div`
|
|
1328
1335
|
display: grid;
|
|
1329
1336
|
width: 100%;
|
|
1330
1337
|
height: 100%;
|
|
1331
1338
|
position: relative;
|
|
1332
1339
|
|
|
1333
1340
|
${({orientation:e})=>e==="horizontal"?"grid-template-columns: auto 2px auto;":"grid-template-rows: auto 2px auto;"}
|
|
1334
|
-
`,
|
|
1341
|
+
`,Ps=f.div`
|
|
1335
1342
|
overflow: auto;
|
|
1336
|
-
`,
|
|
1343
|
+
`,vu=f(Ps)``,ku=f(Ps)``,wu=f.div`
|
|
1337
1344
|
${({orientation:e})=>e==="horizontal"?"width: 1px; cursor: col-resize;":"height: 1px; cursor: row-resize;"}
|
|
1338
1345
|
|
|
1339
|
-
background-color: ${
|
|
1346
|
+
background-color: ${l("color-grey20")};
|
|
1340
1347
|
position: relative;
|
|
1341
1348
|
user-select: none;
|
|
1342
1349
|
|
|
@@ -1347,41 +1354,41 @@
|
|
|
1347
1354
|
${({orientation:e})=>e==="horizontal"?"top: 0; bottom: 0; left: -4px; right: -4px;":"left: 0; right: 0; top: -4px; bottom: -4px;"}
|
|
1348
1355
|
cursor: inherit;
|
|
1349
1356
|
}
|
|
1350
|
-
`;function
|
|
1357
|
+
`;function Cu(e,t){let o,n;return function(...r){const s=this;n?(clearTimeout(o),o=setTimeout(function(){Date.now()-n>=t&&(e.apply(s,r),n=Date.now())},t-(Date.now()-n))):(e.apply(s,r),n=Date.now())}}const $u=({initialStartSizePct:e=50,startClampSizePx:t=210,minStartSizePct:o=10,minEndSizePct:n=10,startContent:r,endContent:s,orientation:c="horizontal"})=>{const a=d.useRef(null),[u,p]=d.useState(null);d.useEffect(()=>{if(a.current&&u===null){const y=a.current.getBoundingClientRect(),v=c==="horizontal"?y.width:y.height,w=e/100*v,$=Math.max(t,w),k=$/v*100;p($);const j=k,C=100-k;c==="horizontal"?a.current.style.gridTemplateColumns=`${j}% 2px ${C}%`:a.current.style.gridTemplateRows=`${j}% 2px ${C}%`}},[e,t,u,c]);const h=d.useCallback(()=>{if(!a.current||u===null)return;const y=a.current.getBoundingClientRect(),v=c==="horizontal"?y.width:y.height;let w=Math.round(u/v*100),$=100-w;if($<n){$=n,w=100-$;const k=Math.round(w/100*v);p(k)}if(w<o){w=o,$=100-w;const k=Math.round(w/100*v);p(k)}c==="horizontal"?a.current.style.gridTemplateColumns=`${u}px 2px auto`:a.current.style.gridTemplateRows=`${u}px 2px auto`},[u,o,n,c]),g=d.useCallback(Cu(h,50),[h]);d.useEffect(()=>(window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)),[g]);const m=y=>{y.preventDefault(),document.addEventListener("mousemove",x),document.addEventListener("mouseup",b)},x=y=>{if(!a.current)return;const v=a.current.getBoundingClientRect(),w=c==="horizontal"?v.width:v.height,$=c==="horizontal"?y.clientX-v.left:y.clientY-v.top,k=Math.max(t,$),j=Math.round(k/w*100),C=100-j;j>=o&&C>=n&&(p($),c==="horizontal"?a.current.style.gridTemplateColumns=`${j}% 2px ${C}%`:a.current.style.gridTemplateRows=`${j}% 2px ${C}%`)},b=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",b)};return i.jsxs(yu,{ref:a,orientation:c,children:[i.jsx(vu,{children:r}),i.jsx(wu,{onMouseDown:m,orientation:c}),i.jsx(ku,{children:s})]})},[Me]=O(["radio-button"]),jn=d.forwardRef(({checked:e,onChange:t,...o},n)=>i.jsx(ju,{onClick:t,ref:n,readOnly:!0,type:"radio",checked:!!e,...o})),ju=f.input`
|
|
1351
1358
|
appearance: none;
|
|
1352
1359
|
-webkit-appearance: none;
|
|
1353
1360
|
margin: 0;
|
|
1354
|
-
background-color: ${
|
|
1361
|
+
background-color: ${Me("background-color")};
|
|
1355
1362
|
appearance: none;
|
|
1356
|
-
width: ${
|
|
1357
|
-
height: ${
|
|
1358
|
-
border: ${
|
|
1363
|
+
width: ${Me("size")};
|
|
1364
|
+
height: ${Me("size")};
|
|
1365
|
+
border: ${Me("border-width")} solid ${Me("border-color")};
|
|
1359
1366
|
border-radius: 50%;
|
|
1360
1367
|
display: grid;
|
|
1361
1368
|
place-content: center;
|
|
1362
1369
|
::before {
|
|
1363
1370
|
content: "";
|
|
1364
|
-
width: ${
|
|
1365
|
-
height: ${
|
|
1371
|
+
width: ${Me("check-size")};
|
|
1372
|
+
height: ${Me("check-size")};
|
|
1366
1373
|
border-radius: 50%;
|
|
1367
1374
|
transform: scale(0);
|
|
1368
1375
|
transition: transform 0.125s ease-in-out;
|
|
1369
|
-
background-color: ${
|
|
1376
|
+
background-color: ${Me("border-color-checked")};
|
|
1370
1377
|
}
|
|
1371
1378
|
:checked::before {
|
|
1372
1379
|
transform: scale(1);
|
|
1373
1380
|
}
|
|
1374
1381
|
:checked:not(:disabled) {
|
|
1375
|
-
border-color: ${
|
|
1382
|
+
border-color: ${Me("border-color-checked")};
|
|
1376
1383
|
}
|
|
1377
1384
|
:disabled {
|
|
1378
1385
|
cursor: not-allowed;
|
|
1379
1386
|
::before {
|
|
1380
|
-
background-color: ${
|
|
1387
|
+
background-color: ${Me("border-color")};
|
|
1381
1388
|
}
|
|
1382
|
-
background-color: ${
|
|
1389
|
+
background-color: ${Me("background-color-disabled")};
|
|
1383
1390
|
}
|
|
1384
|
-
`;function it(e,t){if(!e)throw console.error(t),Error(t)}function
|
|
1391
|
+
`;function it(e,t){if(!e)throw console.error(t),Error(t)}function Su(e,t=document){var n;if(t instanceof HTMLElement&&((n=t==null?void 0:t.dataset)==null?void 0:n.resizablePanelGroupId)===e)return t;const o=t.querySelector(`[data-resizable-panel-group][data-resizable-panel-group-id="${e}"]`);return o||null}const Iu=e=>e.type.startsWith("mouse"),Du=e=>e.type.startsWith("pointer"),vo=e=>{if(Du(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Iu(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}},Vs=(e,t)=>{const o=e==="horizontal",{x:n,y:r}=vo(t);return o?n:r},Hs=(e,t=document)=>{const o=t.querySelector(`[data-resizable-panel-group-handle-id="${e}"]`);return o||null},_u=(e,t,o,n,r)=>{const s=Hs(t,r);it(s,`No resize handle element found for id "${t}"`);const c=s.getAttribute("data-resizable-panel-group-id");it(c,"Resize handle element has no group id attribute");const{initialCursorPosition:a}=n,u=Vs(o,e),p=Su(c,r);return it(p,`No group element found for id "${c}"`),u-a},Tu=(e,t,o,n,r)=>n==null?0:_u(e,t,o,n,r),br=e=>{if(!e||e.dataset.resizablePanelGroupPanel===void 0)return!1;const t=window.getComputedStyle(e);return t.flex!=="1"&&t.flexGrow!=="1"},xr=(e,t,o=document)=>{const n=Array.from(o.querySelectorAll(`[data-resizable-panel-group-element][data-resizable-panel-group-id="${t}"]`)),r=n.findIndex(s=>!!(s.dataset&&s.dataset.resizablePanelGroupHandleId===e));if(r>=0){const s=n[r-1];if(br(s))return{element:s,panelPosition:"left"};const c=n[r+1];if(br(c))return{element:c,panelPosition:"right"}}return null},Lo=(e,t=document)=>Array.from(t.querySelectorAll(`[data-resizable-panel-group-element][data-resizable-panel-group-id="${e}"]`)).filter(n=>n.dataset&&n.dataset.resizablePanelGroupPanel!==void 0),Gt=(e,t,o)=>{const n=e.dataset[t];let r;if(n)if(n.includes("px"))r=Number(n.replace("px",""));else if(n.includes("%")){if(o){const s=Number(n.replace("%",""));r=o*(s/100)}}else r=Number(n);return r},Eu=(e,t,o,n,r,s)=>{t==="vertical"?(e.style.height=`${o}px`,r&&(e.style.minHeight=`${r}px`),s&&(e.style.maxHeight=`${s}px`)):(e.style.width=`${o}px`,r&&(e.style.minWidth=`${r}px`),s&&(e.style.maxWidth=`${s}px`)),e.setAttribute("data-collapsed",`${n}`)},Bo=(e,t,o,n)=>{const r=t==="horizontal"?e.getBoundingClientRect().width:e.getBoundingClientRect().height,s=e.parentElement,c=t==="horizontal"?s==null?void 0:s.getBoundingClientRect().width:s==null?void 0:s.getBoundingClientRect().height,a=Gt(e,"resizablePanelMinSize",c),u=Gt(e,"resizablePanelMaxSize",c),p=Gt(e,"resizablePanelCollapsedSize",c);let h=o??r;const g=a?a*.33:50;a&&r===a?n&&h<a&&p&&a-h>g?h=p:h<a&&(h=a):u&&r===u?h>u&&(h=u):p&&r===p&&(!n&&h>p&&a&&h-p>g?h=a:h=p);const m=h===p;h===r||!c||Eu(e,t,h,m,m?p:a,u)},Us=d.createContext(null),Gs=({children:e,direction:t,onResizeEnd:o})=>{const n=d.useId(),r=d.useRef(null),[s,c]=d.useState(null),a=d.useRef({dragState:s,id:n,initialResizePanelSize:null,direction:t,lastResizedPanelId:null,panelPosition:"left"});d.useLayoutEffect(()=>{a.current.direction=t,a.current.dragState=s,a.current.id=n});const u=d.useCallback((x,b)=>{const{direction:y}=a.current;if(!r.current)return;const v=Hs(x,r.current);it(v,`Drag handle element not found for id "${x}"`);const w=Vs(y,b);c({dragHandleId:x,dragHandleRect:v.getBoundingClientRect(),initialCursorPosition:w});const $=xr(x,a.current.id,r.current);if($){const{element:k,panelPosition:j}=$,C=k.getBoundingClientRect();a.current.initialResizePanelSize=y==="vertical"?C.height:C.width,a.current.lastResizedPanelId=k.dataset.resizablePanelId??null,a.current.panelPosition=j}},[]),p=d.useCallback(()=>{const{direction:x,lastResizedPanelId:b}=a.current;if(o&&b&&r.current){const v=Lo(a.current.id,r.current).find(w=>w.dataset.resizablePanelId===b);if(v){const w=v.getBoundingClientRect(),$=x==="vertical"?w.height:w.width;o(b,$)}}c(null),a.current.initialResizePanelSize=null,a.current.lastResizedPanelId=null,a.current.panelPosition="left"},[o]),h=d.useCallback(x=>{const{direction:b}=a.current,v=Lo(a.current.id,r.current??void 0).find(w=>w.dataset.resizablePanelId===x);if(v){const w=v.parentElement,$=b==="horizontal"?w==null?void 0:w.getBoundingClientRect().width:w==null?void 0:w.getBoundingClientRect().height,k=v.dataset.collapsed==="true",j=Gt(v,"resizablePanelMinSize",$),C=Gt(v,"resizablePanelCollapsedSize",$);Bo(v,b,k?j:C,!k)}},[]);d.useEffect(()=>{const x=()=>{Lo(a.current.id,r.current??void 0).forEach(y=>{Bo(y,a.current.direction)})};return window.addEventListener("resize",x),()=>{window.removeEventListener("resize",x)}},[]);const g=d.useCallback(x=>b=>{b.preventDefault();const y=r.current;if(!y)return()=>null;const{direction:v,dragState:w,panelPosition:$}=a.current;let k=Tu(b,x,v,w,y);if($==="right"&&(k=-k),k!==0&&r.current){const j=xr(x,a.current.id,r.current);if(j&&a.current.initialResizePanelSize!==null){const{element:C}=j,D=a.current.initialResizePanelSize;let I=D+k;I=I<0?0:I,Bo(C,v,I,D>I)}}},[]),m=d.useMemo(()=>({id:n,startDragging:u,stopDragging:p,direction:t,registerResizeHandle:g,togglePanelCollapse:h}),[n,u,p,t,g,h]);return i.jsx(Us.Provider,{value:m,children:e(r,n)})},Sn=()=>{const e=d.useContext(Us);if(!e)throw new Error("Unable to use ResizablePanelGroupContext outside of a ResizablePanelGroupContextProvider");return e},Ks=({children:e,direction:t,className:o,onResizeEnd:n})=>i.jsx(Gs,{direction:t,onResizeEnd:n,children:(r,s)=>i.jsx(zu,{"data-resizable-panel-group":"","data-resizable-panel-group-id":s,className:vt(o,{isVertical:t==="vertical"}),ref:r,children:e})}),zu=f.div`
|
|
1385
1392
|
width: 100%;
|
|
1386
1393
|
height: 100%;
|
|
1387
1394
|
overflow: auto;
|
|
@@ -1391,14 +1398,14 @@
|
|
|
1391
1398
|
&.isVertical {
|
|
1392
1399
|
flex-direction: column;
|
|
1393
1400
|
}
|
|
1394
|
-
`,In=({children:e,maxSize:t,minSize:o,defaultSize:n,collapsedSize:r,className:s,panelId:
|
|
1401
|
+
`,In=({children:e,maxSize:t,minSize:o,defaultSize:n,collapsedSize:r,className:s,panelId:c})=>{const{id:a,direction:u}=Sn(),p=typeof t=="string"?t:t?`${t}px`:void 0,h=typeof o=="string"?o:o?`${o}px`:void 0,g=typeof n=="string"?n:n?`${n}px`:void 0;return i.jsx(Mu,{className:s,style:u==="horizontal"?{maxWidth:p,minWidth:h,width:g??"auto",height:"100%"}:{maxHeight:p,minHeight:h,height:g??"auto",width:"100%"},"data-resizable-panel-group-element":"","data-resizable-panel-group-panel":"","data-resizable-panel-max-size":t,"data-resizable-panel-min-size":o,"data-resizable-panel-collapsed-size":r,"data-resizable-panel-id":c,"data-resizable-panel-group-id":a,"data-collapsed":!1,children:e})},Mu=f.div`
|
|
1395
1402
|
flex-shrink: 0;
|
|
1396
1403
|
overflow: clip;
|
|
1397
|
-
`,
|
|
1404
|
+
`,Ys=f(In)`
|
|
1398
1405
|
flex: 1;
|
|
1399
1406
|
min-width: 0px;
|
|
1400
1407
|
overflow: hidden;
|
|
1401
|
-
`;let sn=null,mt=null;function
|
|
1408
|
+
`;let sn=null,mt=null;function Ou(e){switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize";default:return"auto"}}function Ru(){mt!==null&&(document.head.removeChild(mt),sn=null,mt=null)}function Wo(e){const t=Ou(e);sn!==t&&(sn=t,mt===null&&(mt=document.createElement("style"),document.head.appendChild(mt)),mt.innerHTML=`*{cursor: ${t}!important;}`)}const Nu=(e,t,o)=>e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y;function Fu(e,t){if(e===t)throw new Error("Cannot compare node with itself");const o={a:kr(e),b:kr(t)};let n;for(;o.a.at(-1)===o.b.at(-1);)e=o.a.pop(),t=o.b.pop(),n=e;it(n,"Stacking order can only be calculated for elements with a common ancestor");const r={a:vr(yr(o.a)),b:vr(yr(o.b))};if(r.a===r.b){const s=n.childNodes,c={a:o.a.at(-1),b:o.b.at(-1)};let a=s.length;for(;a--;){const u=s[a];if(u===c.a)return 1;if(u===c.b)return-1}}return Math.sign(r.a-r.b)}const Au=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Lu(e){const t=getComputedStyle(qs(e)??e).display;return t==="flex"||t==="inline-flex"}function Bu(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Lu(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Au.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function yr(e){let t=e.length;for(;t--;){const o=e[t];if(it(o,"Missing node"),Bu(o))return o}return null}function vr(e){return e&&Number(getComputedStyle(e).zIndex)||0}function kr(e){const t=[];for(;e;)t.push(e),e=qs(e);return t}function qs(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let Dt=!1;const Wu=()=>{if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"},Be=[],qt=new Set,Pu=Wu()==="coarse",pt=new Map,Vu=(e,t,o,n)=>{const{ownerDocument:r}=e,s={direction:t,element:e,hitAreaMargins:o,setResizeHandlerState:n},c=pt.get(r)??0;return pt.set(r,c+1),qt.add(s),go(),function(){qt.delete(s);const u=pt.get(r)??1;if(pt.set(r,u-1),go(),u===1&&pt.delete(r),Be.includes(s)){const p=Be.indexOf(s);p>=0&&Be.splice(p,1),_n(),n("up",!0,null)}}},Dn=({target:e,x:t,y:o})=>{Be.splice(0);let n=null;e instanceof HTMLElement&&(n=e),qt.forEach(r=>{const{element:s,hitAreaMargins:c}=r,a=s.getBoundingClientRect(),{bottom:u,left:p,right:h,top:g}=a,m=Pu?c.coarse:c.fine;if(t>=p-m&&t<=h+m&&o>=g-m&&o<=u+m){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&Fu(n,s)>0){let b=n,y=!1;for(;b&&!b.contains(s);){if(Nu(b.getBoundingClientRect(),a)){y=!0;break}b=b.parentElement}if(y)return}Be.push(r)}})},wr=e=>{const{target:t}=e,{x:o,y:n}=vo(e);Dt=!0,Dn({target:t,x:o,y:n}),go(),Be.length>0&&(fo("down",e),e.preventDefault(),e.stopPropagation())},At=e=>{const{x:t,y:o}=vo(e);if(Dt&&e.buttons===0&&(Dt=!1,fo("up",e)),!Dt){const{target:n}=e;Dn({target:n,x:t,y:o})}fo("move",e),_n(),Be.length>0&&e.preventDefault()},$t=e=>{const{target:t}=e,{x:o,y:n}=vo(e);Dt=!1,Be.length>0&&e.preventDefault(),fo("up",e),Dn({target:t,x:o,y:n}),_n(),go()},go=()=>{pt.forEach((e,t)=>{const{body:o}=t;o.removeEventListener("contextmenu",$t),o.removeEventListener("pointerdown",wr),o.removeEventListener("pointerleave",At),o.removeEventListener("pointermove",At)}),window.removeEventListener("pointerup",$t),window.removeEventListener("pointercancel",$t),qt.size>0&&(Dt?(Be.length>0&&pt.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("contextmenu",$t),o.addEventListener("pointerleave",At),o.addEventListener("pointermove",At))}),window.addEventListener("pointerup",$t),window.addEventListener("pointercancel",$t)):pt.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("pointerdown",wr,{capture:!0}),o.addEventListener("pointermove",At))}))},fo=(e,t)=>{qt.forEach(o=>{const{setResizeHandlerState:n}=o,r=Be.includes(o);n(e,r,t)})},_n=()=>{let e=!1,t=!1;Be.forEach(o=>{const{direction:n}=o;n==="horizontal"?e=!0:t=!0}),e&&t?Wo("intersection"):e?Wo("horizontal"):t?Wo("vertical"):Ru()},[Po]=O(["resizable-panels"]),Zs=d.memo(({className:e,disabled:t})=>{const{id:o,startDragging:n,stopDragging:r,direction:s,registerResizeHandle:c}=Sn(),a=d.useId(),[u,p]=d.useState("inactive"),[h,g]=d.useState(null),m=d.useRef(null),x=d.useRef({state:u});return d.useLayoutEffect(()=>{x.current.state=u}),d.useEffect(()=>{if(t)g(null);else{const b=c(a);g(()=>b)}},[t,a,c]),d.useEffect(()=>{if(t||h==null)return;const b=m.current;return it(b,"Element ref not attached"),Vu(b,s,{coarse:15,fine:5},(v,w,$)=>{if(w)switch(v){case"down":{p("drag"),it($,'Expected event to be defined for "down" action'),n(a,$);break}case"move":{const{state:k}=x.current;k!=="drag"&&p("hover"),it($,'Expected event to be defined for "move" action'),h($);break}case"up":{p("hover"),r();break}}else p("inactive")})},[s,t,a,h,n,r]),i.jsx(Hu,{"data-resizable-panel-group-element":"","data-resizable-panel-group-id":o,"data-resizable-panel-group-handle-id":a,className:vt(e,{isVertical:s==="vertical",isHovered:u==="hover",isDragging:u==="drag"}),ref:m})}),Hu=f.div`
|
|
1402
1409
|
height: 100%;
|
|
1403
1410
|
width: 1px;
|
|
1404
1411
|
flex-shrink: 0;
|
|
@@ -1448,32 +1455,32 @@
|
|
|
1448
1455
|
height: 3px;
|
|
1449
1456
|
}
|
|
1450
1457
|
}
|
|
1451
|
-
`,
|
|
1458
|
+
`,Xs=({children:e,open:t,disableScrollLock:o,className:n,status:r})=>t?i.jsx(A.FloatingPortal,{children:i.jsx(Uu,{className:n,lockScroll:!o,"data-status":r,children:e})}):null,Uu=f(A.FloatingOverlay)`
|
|
1452
1459
|
background: rgba(0, 0, 0, 0.8);
|
|
1453
1460
|
display: grid;
|
|
1454
1461
|
place-items: center;
|
|
1455
1462
|
z-index: 1;
|
|
1456
|
-
`,
|
|
1463
|
+
`,Gu=[A.flip()],Js=[A.flip(),A.size({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})],[an]=O(["select"]),Tn=d.createContext(null),En=()=>{const e=d.useContext(Tn);if(e===null)throw new Error("Select context used outside of the SelectContextProvider");return e},Ku=()=>Promise.resolve(),Ot=({children:e,onSelect:t,Reference:o,disabled:n,selectedIndex:r,onSelectedIndexChange:s,className:c,matchReferenceWidth:a,isFocusTrapDisabled:u,menuPlacement:p,onOpenChange:h,onBeforeOpen:g=Ku,showOpenState:m=!1})=>{const[x,b]=d.useState(!1),[y,v]=d.useState(null),[w,$]=d.useState(null),k=r??w,j=s??$,C=d.useCallback(q=>{q?g().then(()=>{b(q),h&&h(q)}):(b(q),h&&h(q))},[g,h]),{refs:D,floatingStyles:I,context:S}=A.useFloating({placement:p||"bottom-end",open:x,onOpenChange:C,whileElementsMounted:A.autoUpdate,middleware:a?Js:Gu}),z=d.useRef([]),V=d.useRef([]),P=d.useCallback(q=>{var U;j(q),q!==null&&t(((U=z.current[q])==null?void 0:U.dataset.key)||""),b(!1),h&&h(!1)},[h,t,j]),N=A.useListNavigation(S,{listRef:z,activeIndex:y,selectedIndex:k,focusItemOnHover:!u,focusItemOnOpen:!u,onNavigate:v}),J=A.useClick(S,{enabled:!n}),ee=A.useDismiss(S),oe=A.useRole(S,{role:"listbox"}),{getReferenceProps:De,getFloatingProps:Ve,getItemProps:ce}=A.useInteractions([N,J,ee,oe]),Y=d.useMemo(()=>({activeIndex:y,selectedIndex:k,open:x,getItemProps:ce,handleSelect:P,setIsOpen:b}),[y,x,k,ce,P]);return i.jsxs(Tn.Provider,{value:Y,children:[i.jsx(Yu,{ref:D.setReference,tabIndex:0,...De({onClick(q){q.stopPropagation()}}),children:m?i.jsxs(Zu,{children:[o??i.jsx(te,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"}),i.jsx(F,{size:"xsm",iconId:x?"CaretUp":"CaretDown"})]}):o??i.jsx(te,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"})}),x&&i.jsx(A.FloatingPortal,{children:i.jsx(A.FloatingFocusManager,{disabled:u,context:S,modal:!1,children:i.jsx(qu,{ref:D.setFloating,style:I,className:c,...Ve(),children:i.jsx(A.FloatingList,{elementsRef:z,labelsRef:V,children:e})})})})]})},Yu=f.div`
|
|
1457
1464
|
align-items: center;
|
|
1458
1465
|
display: flex;
|
|
1459
1466
|
font-size: ${an("font-size")};
|
|
1460
1467
|
cursor: default;
|
|
1461
1468
|
user-select: none;
|
|
1462
|
-
`,
|
|
1469
|
+
`,qu=f.div`
|
|
1463
1470
|
display: flex;
|
|
1464
1471
|
flex-direction: column;
|
|
1465
1472
|
border: ${an("border-size")} solid ${an("border-color")};
|
|
1466
1473
|
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
1467
|
-
background-color: ${
|
|
1474
|
+
background-color: ${l("color-white")};
|
|
1468
1475
|
outline: 0;
|
|
1469
1476
|
z-index: 2;
|
|
1470
1477
|
overflow: auto;
|
|
1471
|
-
`,
|
|
1478
|
+
`,Zu=f.div`
|
|
1472
1479
|
display: flex;
|
|
1473
1480
|
align-items: center;
|
|
1474
1481
|
justify-content: flex-start;
|
|
1475
1482
|
gap: 2px;
|
|
1476
|
-
`,[He,Cr]=
|
|
1483
|
+
`,[He,Cr]=O(["option","text"]),ht=d.memo(({label:e,optionKey:t,disabled:o,className:n,prefixIconId:r,prefixIconColor:s,suffixIconId:c,textColor:a,suffixIconColor:u,disableSelectionStyle:p,disableEnterSelection:h})=>{const{activeIndex:g,selectedIndex:m,getItemProps:x,handleSelect:b}=En(),{ref:y,index:v}=A.useListItem({label:t}),w=g!==null&&g!==-1&&g===v,$=!p&&m!==null&&m!==-1&&m===v,k=d.useCallback(j=>{o||(j.stopPropagation(),b(v))},[o,b,v]);return i.jsx(M.ClassNames,{children:({cx:j})=>i.jsxs(Xu,{className:j({isActive:w,isSelected:$,disabled:o},n),ref:y,"data-key":t,role:"option","data-color":a,"aria-selected":w&&$,tabIndex:w?0:-1,...x({onClick:C=>k(C),onKeyDown:!h&&!o?C=>{C.code==="Enter"&&b(v)}:void 0}),children:[!!r&&i.jsx(F,{iconId:r,size:"sm",color:o?"grey":s??"black"}),e,!!c&&i.jsx(Ju,{iconId:c,size:"sm",color:o?"grey":u??"black"})]})})}),Xu=f.div`
|
|
1477
1484
|
color: ${He("color")};
|
|
1478
1485
|
cursor: pointer;
|
|
1479
1486
|
font-size: inherit;
|
|
@@ -1491,7 +1498,7 @@
|
|
|
1491
1498
|
outline: 0;
|
|
1492
1499
|
flex-shrink: 0;
|
|
1493
1500
|
column-gap: ${He("column-gap")};
|
|
1494
|
-
${
|
|
1501
|
+
${cs.map(e=>`&[data-color="${e}"] {
|
|
1495
1502
|
color: ${Cr(`color-${e}`)};
|
|
1496
1503
|
}`).join(`
|
|
1497
1504
|
`)}
|
|
@@ -1506,18 +1513,17 @@
|
|
|
1506
1513
|
color: ${He("color-disabled")};
|
|
1507
1514
|
cursor: not-allowed;
|
|
1508
1515
|
}
|
|
1509
|
-
`,
|
|
1516
|
+
`,Ju=f(F)`
|
|
1510
1517
|
transform: translate(-2px, -1px);
|
|
1511
|
-
`,
|
|
1518
|
+
`,Qu=({actionItems:e,disabled:t,onSelect:o})=>{const n=d.useMemo(()=>e.map(r=>i.jsx(ht,{disabled:t||r.disabled,label:i.jsx(ep,{label:r.label,iconId:r.iconId,iconSize:r.iconSize,disabled:r.disabled,level:r.level},r.key),optionKey:r.key},r.key)),[e,t]);return i.jsx(Ot,{disabled:t,onSelect:o,children:n})},lo=e=>{switch(e){case"normal":return;case"info":return"blue";case"error":return"red";case"warn":return"yellow";default:return}},ep=d.memo(({label:e,iconId:t,level:o,disabled:n,iconSize:r})=>i.jsxs(tp,{children:[i.jsx(F,{iconId:t,size:r||"sm",color:n?"grey":lo(o)?lo(o):"black"}),i.jsx(_,{variant:"body",color:n?"grey":lo(o)?lo(o):"dark",children:e})]})),tp=f.div`
|
|
1512
1519
|
display: flex;
|
|
1513
1520
|
gap: 8px;
|
|
1514
1521
|
align-items: center;
|
|
1515
|
-
`,[
|
|
1516
|
-
padding: ${
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
`,ep=e=>i.jsx(Qu,{badgeBorderColor:"black",...e}),Ks=d.createContext(null),ko=()=>{const e=d.useContext(Ks);if(e===null)throw new Error("Unable to use TabContext outside of a TabProvider");return e},tp=d.memo(({children:e,activeTab:t,onTabChange:o,defaultActiveTab:n,variant:r="underline"})=>{const[s,l]=d.useState(n),a=o??l,u=t??s,p=d.useMemo(()=>({onTabChange:a,activeTab:u,variant:r}),[u,a,r]);return i.jsx(Ks.Provider,{value:p,children:e})}),[ae]=M(["tab"]),op=d.memo(({value:e,text:t,disabled:o,iconColor:n,iconId:r,tooltip:s,badge:l,onClose:a,closeable:u,maxWidth:p})=>{const{activeTab:h,onTabChange:f,variant:m}=ko(),x=e===h,b=a!=null&&(u===void 0?!0:u),y=d.useCallback(()=>{x||f(e)},[f,e,x]),v=d.useCallback(w=>{w.stopPropagation(),a==null||a(e)},[a,e]);return i.jsxs(np,{"data-value":e,"data-variant":m,"data-active":x,onClick:y,disabled:o,title:s,role:"tab","aria-selected":x,"aria-label":s??t,children:[!!r&&i.jsx(F,{iconId:r,color:n??"black",size:"sm"}),i.jsx(rp,{"data-label":p?t:void 0,style:p?{maxWidth:typeof p=="number"?`${p}px`:p}:void 0,children:i.jsx(_,{color:o||m==="standard"&&!x?"grey":"dark",variant:"body",bold:x,children:t})}),l!==void 0&&i.jsx(sp,{children:l}),b&&i.jsx(ip,{onClick:v,"aria-label":`Close ${t}`,title:`Close ${t}`,children:i.jsx(F,{iconId:"Close",size:"xsm"})})]})}),np=g.button`
|
|
1522
|
+
`,[op,$r]=O(["shell-icon-button","icon-button"]),np=e=>i.jsx(rp,{badgeBorderColor:"black",...e}),rp=f(te)`
|
|
1523
|
+
padding: ${op("padding")};
|
|
1524
|
+
${`${$r("badge-top",!0)}: ${l("spacing-6")}`};
|
|
1525
|
+
${`${$r("badge-right",!0)}: ${l("spacing-6")}`};
|
|
1526
|
+
`,Qs=d.createContext(null),ko=()=>{const e=d.useContext(Qs);if(e===null)throw new Error("Unable to use TabContext outside of a TabProvider");return e},sp=d.memo(({children:e,activeTab:t,onTabChange:o,defaultActiveTab:n,variant:r="underline"})=>{const[s,c]=d.useState(n),a=o??c,u=t??s,p=d.useMemo(()=>({onTabChange:a,activeTab:u,variant:r}),[u,a,r]);return i.jsx(Qs.Provider,{value:p,children:e})}),[ae]=O(["tab"]),ip=d.memo(({value:e,text:t,disabled:o,iconColor:n,iconId:r,tooltip:s,badge:c,onClose:a,closeable:u,maxWidth:p})=>{const{activeTab:h,onTabChange:g,variant:m}=ko(),x=e===h,b=a!=null&&(u===void 0?!0:u),y=d.useCallback(()=>{x||g(e)},[g,e,x]),v=d.useCallback(w=>{w.stopPropagation(),a==null||a(e)},[a,e]);return i.jsxs(ap,{"data-value":e,"data-variant":m,"data-active":x,onClick:y,disabled:o,title:s,role:"tab","aria-selected":x,"aria-label":s??t,children:[!!r&&i.jsx(F,{iconId:r,color:n??"black",size:"sm"}),i.jsx(lp,{"data-label":p?t:void 0,style:p?{maxWidth:typeof p=="number"?`${p}px`:p}:void 0,children:i.jsx(_,{color:o||m==="standard"&&!x?"grey":"dark",variant:"body",bold:x,children:t})}),c!==void 0&&i.jsx(cp,{children:c}),b&&i.jsx(dp,{onClick:v,"aria-label":`Close ${t}`,title:`Close ${t}`,children:i.jsx(F,{iconId:"Close",size:"xsm"})})]})}),ap=f.button`
|
|
1521
1527
|
cursor: pointer;
|
|
1522
1528
|
outline: none;
|
|
1523
1529
|
border: none;
|
|
@@ -1559,7 +1565,7 @@
|
|
|
1559
1565
|
outline: 2px solid var(--studio-s-color-primary, #0066cc);
|
|
1560
1566
|
outline-offset: -2px;
|
|
1561
1567
|
}
|
|
1562
|
-
`,
|
|
1568
|
+
`,lp=f.span`
|
|
1563
1569
|
overflow: hidden;
|
|
1564
1570
|
text-overflow: ellipsis;
|
|
1565
1571
|
|
|
@@ -1572,7 +1578,7 @@
|
|
|
1572
1578
|
overflow: hidden;
|
|
1573
1579
|
visibility: hidden;
|
|
1574
1580
|
}
|
|
1575
|
-
`,
|
|
1581
|
+
`,cp=f.span`
|
|
1576
1582
|
display: flex;
|
|
1577
1583
|
align-items: center;
|
|
1578
1584
|
justify-content: center;
|
|
@@ -1584,7 +1590,7 @@
|
|
|
1584
1590
|
color: ${ae("badge-color")};
|
|
1585
1591
|
font-size: ${ae("badge-font-size")};
|
|
1586
1592
|
font-weight: 600;
|
|
1587
|
-
`,
|
|
1593
|
+
`,dp=f.button`
|
|
1588
1594
|
display: flex;
|
|
1589
1595
|
align-items: center;
|
|
1590
1596
|
justify-content: center;
|
|
@@ -1609,7 +1615,7 @@
|
|
|
1609
1615
|
outline-offset: -2px;
|
|
1610
1616
|
opacity: 1;
|
|
1611
1617
|
}
|
|
1612
|
-
`,[_t]=
|
|
1618
|
+
`,[_t]=O(["tab"]),up=({children:e,className:t})=>{const{activeTab:o,variant:n}=ko(),r=d.useRef(null),s=d.useRef(null),c=n==="underline";return d.useEffect(()=>{if(c&&s.current&&r.current){const a=s.current.querySelector(`[data-value=${o}]`);if(a){const u=a.getBoundingClientRect(),p=a.offsetLeft;r.current.style.width=`${u.width}px`,r.current.style.left=`${p}px`}}},[o,e,c]),i.jsxs(pp,{ref:s,className:t,"data-variant":n,role:"tablist",children:[c&&i.jsx(hp,{ref:r}),e]})},pp=f.div`
|
|
1613
1619
|
width: 100%;
|
|
1614
1620
|
height: fit-content;
|
|
1615
1621
|
display: flex;
|
|
@@ -1639,36 +1645,36 @@
|
|
|
1639
1645
|
justify-content: flex-start;
|
|
1640
1646
|
align-items: stretch;
|
|
1641
1647
|
}
|
|
1642
|
-
`,
|
|
1648
|
+
`,hp=f.div`
|
|
1643
1649
|
position: absolute;
|
|
1644
1650
|
bottom: 0px;
|
|
1645
1651
|
transform: translateY(${_t("trigger-list-underline-height")});
|
|
1646
1652
|
height: ${_t("indicator-height")};
|
|
1647
1653
|
background-color: ${_t("indicator-color")};
|
|
1648
1654
|
transition: all 0.25s ease-in-out;
|
|
1649
|
-
`,
|
|
1655
|
+
`,gp=({children:e,className:t,style:o,value:n})=>{const{activeTab:r}=ko(),s=n===r;return i.jsx(fp,{className:t,"data-active":s?"true":"false",style:o,children:e})},fp=f.div`
|
|
1650
1656
|
display: none;
|
|
1651
1657
|
&[data-active="true"] {
|
|
1652
1658
|
display: block;
|
|
1653
1659
|
}
|
|
1654
|
-
`,[
|
|
1655
|
-
background-color: ${e=>
|
|
1656
|
-
border-radius: ${
|
|
1657
|
-
border: 1px solid ${
|
|
1660
|
+
`,[we]=O(["tag"]),mp={purple:we("color-light"),orange:we("color-light"),light:we("color-dark"),blue:we("color-dark"),green:we("color-light"),red:we("color-light"),disabled:we("color-disabled")},bp={purple:"light",orange:"light",light:"dark",blue:"dark",green:"light",red:"light",disabled:"disabled"},xp=f.div`
|
|
1661
|
+
background-color: ${e=>we(`bg-color-${e.color}`)};
|
|
1662
|
+
border-radius: ${we("border-radius")};
|
|
1663
|
+
border: 1px solid ${we("border-color")};
|
|
1658
1664
|
display: flex;
|
|
1659
|
-
color: ${e=>
|
|
1660
|
-
height: ${
|
|
1665
|
+
color: ${e=>mp[e.color]};
|
|
1666
|
+
height: ${we("height")};
|
|
1661
1667
|
max-width: 160px;
|
|
1662
1668
|
align-items: center;
|
|
1663
|
-
padding: ${
|
|
1669
|
+
padding: ${we("padding")};
|
|
1664
1670
|
align-items: center;
|
|
1665
1671
|
justify-content: center;
|
|
1666
1672
|
gap: 4px;
|
|
1667
|
-
`,
|
|
1673
|
+
`,mo=e=>{const t=typeof e.children=="string"?i.jsx(_,{color:bp[e.color],variant:"body",children:e.children}):e.children;return i.jsx(xp,{...e,children:t})},yp=({tagName:e,onRemove:t,color:o="light"})=>i.jsxs(mo,{color:o,children:[i.jsx(_,{variant:"body",children:e}),i.jsx(F,{size:"xxsm",iconId:"Close",onClick:()=>t(e)})]},`key-tag-${e}`),bo=({search:e,style:t,children:o,highlightColor:n,highlightTextColor:r})=>{const s=n||"yellow",c=d.useMemo(()=>Array.isArray(e)?e:[e].filter(Boolean),[e]);if(!c||c.length===0)return i.jsx(i.Fragment,{children:o});const a=p=>{const h=new RegExp(`(${c.join("|")})`,"gi");return p.split(h).map((m,x)=>c.some(b=>b.toLowerCase()===m.toLowerCase())?i.jsx("span",{style:t||{backgroundColor:s,color:r??void 0},children:m},x):m)},u=p=>typeof p=="string"?a(p):d.isValidElement(p)?d.cloneElement(p,{children:d.Children.map(p.props.children,u)}):p;return i.jsx(i.Fragment,{children:d.Children.map(o,u)})},[ve]=O(["badge"]),vp=({color:e,children:t,position:o,radius:n,hide:r})=>i.jsxs(kp,{children:[!r&&i.jsx(wp,{"data-color":e,"data-position":o??"top-right","data-radius":n??4}),t]}),kp=f.div`
|
|
1668
1674
|
width: fit-content;
|
|
1669
1675
|
height: fit-content;
|
|
1670
1676
|
position: relative;
|
|
1671
|
-
`,
|
|
1677
|
+
`,wp=f.div`
|
|
1672
1678
|
position: absolute;
|
|
1673
1679
|
z-index: 2;
|
|
1674
1680
|
border-radius: 50%;
|
|
@@ -1680,28 +1686,28 @@
|
|
|
1680
1686
|
0 8px 8px hsl(0deg 0% 0% / 0.075), 0 16px 16px hsl(0deg 0% 0% / 0.075);
|
|
1681
1687
|
// Color
|
|
1682
1688
|
&[data-color="blue"] {
|
|
1683
|
-
background-color: ${
|
|
1684
|
-
border-color: ${
|
|
1689
|
+
background-color: ${ve("color-blue")};
|
|
1690
|
+
border-color: ${ve("color-blue-border")};
|
|
1685
1691
|
}
|
|
1686
1692
|
&[data-color="red"] {
|
|
1687
|
-
background-color: ${
|
|
1688
|
-
border-color: ${
|
|
1693
|
+
background-color: ${ve("color-red")};
|
|
1694
|
+
border-color: ${ve("color-red-border")};
|
|
1689
1695
|
}
|
|
1690
1696
|
&[data-color="white"] {
|
|
1691
|
-
background-color: ${
|
|
1692
|
-
border-color: ${
|
|
1697
|
+
background-color: ${ve("color-white")};
|
|
1698
|
+
border-color: ${ve("color-white-border")};
|
|
1693
1699
|
}
|
|
1694
1700
|
&[data-color="black"] {
|
|
1695
|
-
background-color: ${
|
|
1696
|
-
border-color: ${
|
|
1701
|
+
background-color: ${ve("color-black")};
|
|
1702
|
+
border-color: ${ve("color-black-border")};
|
|
1697
1703
|
}
|
|
1698
1704
|
&[data-color="orange"] {
|
|
1699
|
-
background-color: ${
|
|
1700
|
-
border-color: ${
|
|
1705
|
+
background-color: ${ve("color-orange")};
|
|
1706
|
+
border-color: ${ve("color-orange-border")};
|
|
1701
1707
|
}
|
|
1702
1708
|
&[data-color="green"] {
|
|
1703
|
-
background-color: ${
|
|
1704
|
-
border-color: ${
|
|
1709
|
+
background-color: ${ve("color-green")};
|
|
1710
|
+
border-color: ${ve("color-green-border")};
|
|
1705
1711
|
}
|
|
1706
1712
|
// Position
|
|
1707
1713
|
&[data-position="top-right"] {
|
|
@@ -1730,114 +1736,114 @@
|
|
|
1730
1736
|
}
|
|
1731
1737
|
// Size
|
|
1732
1738
|
&[data-radius="4"] {
|
|
1733
|
-
width: ${
|
|
1734
|
-
height: ${
|
|
1735
|
-
--xform-factor: ${
|
|
1739
|
+
width: ${l("spacing-8")};
|
|
1740
|
+
height: ${l("spacing-8")};
|
|
1741
|
+
--xform-factor: ${l("spacing-4")};
|
|
1736
1742
|
}
|
|
1737
1743
|
&[data-radius="6"] {
|
|
1738
|
-
width: ${
|
|
1739
|
-
height: ${
|
|
1740
|
-
--xform-factor: ${
|
|
1744
|
+
width: ${l("spacing-12")};
|
|
1745
|
+
height: ${l("spacing-12")};
|
|
1746
|
+
--xform-factor: ${l("spacing-6")};
|
|
1741
1747
|
}
|
|
1742
1748
|
&[data-radius="8"] {
|
|
1743
|
-
width: ${
|
|
1744
|
-
height: ${
|
|
1745
|
-
--xform-factor: ${
|
|
1749
|
+
width: ${l("spacing-16")};
|
|
1750
|
+
height: ${l("spacing-16")};
|
|
1751
|
+
--xform-factor: ${l("spacing-8")};
|
|
1746
1752
|
}
|
|
1747
|
-
`,[
|
|
1753
|
+
`,[ge]=O(["textarea"]),zn=d.forwardRef(({autoCapitalize:e="off",autoComplete:t="off",autoCorrect:o="off",className:n,...r},s)=>i.jsx(Cp,{autoCapitalize:e,autoComplete:t,autoCorrect:o,className:n,ref:s,...r})),Cp=f.textarea`
|
|
1748
1754
|
display: flex;
|
|
1749
|
-
min-height: ${
|
|
1750
|
-
padding: ${
|
|
1751
|
-
font-size: ${
|
|
1752
|
-
font-family: ${
|
|
1753
|
-
font-weight: ${
|
|
1754
|
-
color: ${
|
|
1755
|
+
min-height: ${ge("min-height")};
|
|
1756
|
+
padding: ${ge("padding")};
|
|
1757
|
+
font-size: ${ge("font-size")};
|
|
1758
|
+
font-family: ${ge("font-family")};
|
|
1759
|
+
font-weight: ${ge("font-weight")};
|
|
1760
|
+
color: ${ge("color")};
|
|
1755
1761
|
width: 100%;
|
|
1756
1762
|
outline: none;
|
|
1757
1763
|
box-shadow: none;
|
|
1758
|
-
border: ${
|
|
1759
|
-
border-radius: ${
|
|
1764
|
+
border: ${ge("border-width")} solid ${ge("border-color")};
|
|
1765
|
+
border-radius: ${ge("border-radius")};
|
|
1760
1766
|
:active:not(:disabled):not(:read-only),
|
|
1761
1767
|
:focus:not(:disabled):not(:read-only) {
|
|
1762
|
-
border-color: ${
|
|
1768
|
+
border-color: ${ge("border-color-active")};
|
|
1763
1769
|
}
|
|
1764
1770
|
&[aria-invalid="true"]:not(:disabled):not(:read-only) {
|
|
1765
|
-
border-color: ${
|
|
1771
|
+
border-color: ${ge("border-color-invalid")};
|
|
1766
1772
|
}
|
|
1767
1773
|
:disabled,
|
|
1768
1774
|
:read-only {
|
|
1769
1775
|
cursor: not-allowed;
|
|
1770
|
-
color: ${
|
|
1771
|
-
background-color: ${
|
|
1776
|
+
color: ${ge("color-disabled")};
|
|
1777
|
+
background-color: ${ge("background-color-disabled")};
|
|
1772
1778
|
}
|
|
1773
|
-
`;zn.displayName="Textarea";const[
|
|
1779
|
+
`;zn.displayName="Textarea";const[$p,Oe,ke]=O(["toggle-container","toggle-track","toggle-thumb"]),jr=f(F)`
|
|
1774
1780
|
opacity: 0;
|
|
1775
1781
|
position: absolute;
|
|
1776
1782
|
transition-duration: 150ms;
|
|
1777
1783
|
transition-property: opacity;
|
|
1778
1784
|
transition-timing-function: ease-in-out;
|
|
1779
|
-
`,
|
|
1785
|
+
`,jp=f.div`
|
|
1780
1786
|
align-items: center;
|
|
1781
1787
|
display: flex;
|
|
1782
|
-
gap: ${
|
|
1788
|
+
gap: ${$p("gap")};
|
|
1783
1789
|
justify-content: center;
|
|
1784
1790
|
position: relative;
|
|
1785
|
-
`,
|
|
1791
|
+
`,ei=f.div`
|
|
1786
1792
|
align-items: center;
|
|
1787
|
-
border-radius: ${
|
|
1793
|
+
border-radius: ${Oe("border-radius")};
|
|
1788
1794
|
cursor: pointer;
|
|
1789
1795
|
display: flex;
|
|
1790
|
-
height: calc(${
|
|
1791
|
-
padding: ${
|
|
1796
|
+
height: calc(${Oe("padding-vertical")} * 2 + ${ke("height")} + 2px);
|
|
1797
|
+
padding: ${Oe("padding-vertical")} ${Oe("padding-horizontal")};
|
|
1792
1798
|
position: relative;
|
|
1793
|
-
transition-duration: ${
|
|
1799
|
+
transition-duration: ${Oe("transition-duration")};
|
|
1794
1800
|
transition-property: background-color;
|
|
1795
1801
|
transition-timing-function: ease-in-out;
|
|
1796
1802
|
|
|
1797
1803
|
// background-color...
|
|
1798
|
-
background-color: ${
|
|
1804
|
+
background-color: ${Oe("background-color-unchecked-enabled")};
|
|
1799
1805
|
&.isDisabled,
|
|
1800
1806
|
&.isReadOnly {
|
|
1801
|
-
background-color: ${
|
|
1807
|
+
background-color: ${Oe("background-color-unchecked-disabled")};
|
|
1802
1808
|
cursor: not-allowed;
|
|
1803
1809
|
}
|
|
1804
1810
|
&.isChecked {
|
|
1805
|
-
background-color: ${
|
|
1811
|
+
background-color: ${Oe("background-color-checked-enabled")};
|
|
1806
1812
|
&.isDisabled,
|
|
1807
1813
|
&.isReadOnly {
|
|
1808
|
-
background-color: ${
|
|
1814
|
+
background-color: ${Oe("background-color-checked-disabled")};
|
|
1809
1815
|
cursor: not-allowed;
|
|
1810
1816
|
}
|
|
1811
1817
|
}
|
|
1812
1818
|
|
|
1813
1819
|
// width...
|
|
1814
|
-
width: calc(${
|
|
1820
|
+
width: calc(${Oe("padding-horizontal")} * 2 + ${ke("width")} * 2);
|
|
1815
1821
|
&.showIcons {
|
|
1816
1822
|
width: ${`calc(
|
|
1817
|
-
${
|
|
1823
|
+
${Oe("padding-horizontal")} * 2 + ${ke("width")} * 2 + 4px
|
|
1818
1824
|
)`};
|
|
1819
1825
|
}
|
|
1820
|
-
`,
|
|
1821
|
-
border-radius: ${
|
|
1822
|
-
box-shadow: ${
|
|
1823
|
-
height: ${
|
|
1824
|
-
transition-duration: ${
|
|
1826
|
+
`,ti=f.div`
|
|
1827
|
+
border-radius: ${ke("border-radius")};
|
|
1828
|
+
box-shadow: ${ke("box-shadow")};
|
|
1829
|
+
height: ${ke("height")};
|
|
1830
|
+
transition-duration: ${ke("transition-duration")};
|
|
1825
1831
|
transition-property: transform;
|
|
1826
1832
|
transition-timing-function: ease-in-out;
|
|
1827
|
-
width: ${
|
|
1833
|
+
width: ${ke("width")};
|
|
1828
1834
|
|
|
1829
1835
|
// background-color...
|
|
1830
|
-
background-color: ${
|
|
1836
|
+
background-color: ${ke("background-color-unchecked-enabled")};
|
|
1831
1837
|
&.isDisabled,
|
|
1832
1838
|
&.isReadOnly {
|
|
1833
|
-
background-color: ${
|
|
1839
|
+
background-color: ${ke("background-color-unchecked-disabled")};
|
|
1834
1840
|
cursor: not-allowed;
|
|
1835
1841
|
}
|
|
1836
1842
|
&.isChecked {
|
|
1837
|
-
background-color: ${
|
|
1843
|
+
background-color: ${ke("background-color-checked-enabled")};
|
|
1838
1844
|
&.isDisabled,
|
|
1839
1845
|
&.isReadOnly {
|
|
1840
|
-
background-color: ${
|
|
1846
|
+
background-color: ${ke("background-color-checked-disabled")};
|
|
1841
1847
|
cursor: not-allowed;
|
|
1842
1848
|
}
|
|
1843
1849
|
}
|
|
@@ -1850,12 +1856,12 @@
|
|
|
1850
1856
|
transform: translate(calc(100% + 4px), 0px);
|
|
1851
1857
|
}
|
|
1852
1858
|
}
|
|
1853
|
-
`,wo=({checked:e,disabled:t,label:o,labelVariant:n="small",onChange:r,showIcons:s,readOnly:
|
|
1859
|
+
`,wo=({checked:e,disabled:t,label:o,labelVariant:n="small",onChange:r,showIcons:s,readOnly:c,id:a,...u})=>{const[p,h]=d.useState(e??!1);d.useEffect(()=>{h(e??!1)},[e]);const g=d.useCallback(()=>{t||c||(h(!p),r==null||r(!p))},[p,t,c,r]);return i.jsx(M.ClassNames,{children:({cx:m})=>i.jsxs(jp,{children:[o&&i.jsx(_,{color:t?"disabled":"grey",variant:n,children:o}),i.jsxs(ei,{id:a,className:m({isReadOnly:c},p&&"isChecked",t&&"isDisabled",s&&"showIcons"),...u,onClick:g,children:[s&&i.jsxs(i.Fragment,{children:[i.jsx(jr,{color:"white",iconId:"Close",size:"xxsm",style:{opacity:p?0:1,right:"3px"}}),i.jsx(jr,{color:"white",iconId:"Check",size:"xxsm",style:{opacity:p?1:0}})]}),i.jsx(ti,{className:m(p&&"isChecked",s&&"showIcons",{isReadOnly:c}),...u})]})]})})},Sp=f.div`
|
|
1854
1860
|
display: inline-block;
|
|
1855
1861
|
line-height: 0;
|
|
1856
|
-
`,
|
|
1862
|
+
`,Ip=f.div`
|
|
1857
1863
|
z-index: 2;
|
|
1858
|
-
`,
|
|
1864
|
+
`,oi=({arrow:e,children:t,content:o,open:n,openDelay:r=250,className:s,placement:c,offset:a,disabled:u})=>{const p=d.useRef(null),[h,g]=d.useState(n);d.useEffect(()=>{n!==void 0&&g(n)},[n]);const{refs:m,floatingStyles:x,context:b}=A.useFloating({open:h,onOpenChange:n===void 0?g:void 0,placement:c??"top",whileElementsMounted:A.autoUpdate,middleware:[A.offset(a??12),A.flip({fallbackAxisSideDirection:"start"}),A.shift(),A.arrow({element:p})]}),y=A.useHover(b,{move:!1,restMs:r}),v=A.useFocus(b),w=A.useDismiss(b),$=A.useRole(b,{role:"tooltip"}),{getReferenceProps:k,getFloatingProps:j}=A.useInteractions(u?[]:[y,v,w,$]);return i.jsxs(i.Fragment,{children:[i.jsx(Sp,{className:s,ref:m.setReference,...k(),children:t}),i.jsx(A.FloatingPortal,{children:h&&i.jsxs(Ip,{ref:m.setFloating,style:x,...j(),children:[i.jsx(A.FloatingArrow,{...e,ref:p,context:b}),o]})})]})},ni=f.div`
|
|
1859
1865
|
background-color: #ffffff;
|
|
1860
1866
|
border-radius: 0px;
|
|
1861
1867
|
box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.12);
|
|
@@ -1863,30 +1869,30 @@
|
|
|
1863
1869
|
display: flex;
|
|
1864
1870
|
align-items: center;
|
|
1865
1871
|
padding: ${e=>e.contain&&"7px 10px"};
|
|
1866
|
-
`,
|
|
1872
|
+
`,ri={fill:"#ffffff",height:12,tipRadius:0,width:14},Co=({arrow:e=ri,children:t,contain:o=!0,content:n,...r})=>i.jsx(oi,{arrow:e,content:i.jsx(ni,{contain:o,children:i.jsx(_,{color:"dark",variant:"body",children:n})}),...r,children:t}),Dp=f.div`
|
|
1867
1873
|
display: flex;
|
|
1868
1874
|
flex-direction: column;
|
|
1869
1875
|
min-width: 160px;
|
|
1870
|
-
`,
|
|
1876
|
+
`,_p=f.div`
|
|
1871
1877
|
display: flex;
|
|
1872
1878
|
gap: 8px;
|
|
1873
1879
|
height: 28px;
|
|
1874
1880
|
padding: 7px 10px;
|
|
1875
|
-
`,
|
|
1881
|
+
`,Tp=f.div`
|
|
1876
1882
|
border-top: 1px solid #dfdfdf;
|
|
1877
|
-
`,
|
|
1883
|
+
`,Ep=f.div`
|
|
1878
1884
|
padding: 7px 12px;
|
|
1879
|
-
`,
|
|
1885
|
+
`,zp=e=>{switch(e){case"error":return"red";case"info":return"blue";case"success":return"green";case"warning":return"orange";default:return"blue"}},Mp=e=>{switch(e){case"error":case"info":return"ExclamationCircle";case"success":return"CheckCircle";case"warning":return"Warning";default:return"ExclamationCircle"}},Op=({message:e,title:t="Information",type:o="info"})=>i.jsxs(Dp,{children:[i.jsxs(_p,{children:[i.jsx(F,{color:zp(o),iconId:Mp(o)}),i.jsx(_,{bold:!0,variant:"body",children:t})]}),i.jsx(Tp,{}),i.jsx(Ep,{children:i.jsx(_,{variant:"body",children:e})})]}),Mn=({children:e,open:t,openDelay:o,className:n,...r})=>i.jsx(Co,{contain:!1,content:i.jsx(Op,{...r}),open:t,openDelay:o,className:n,children:e}),si=f.div`
|
|
1880
1886
|
background-color: #000000;
|
|
1881
1887
|
border-radius: 4px;
|
|
1882
1888
|
color: #ffffff;
|
|
1883
1889
|
display: flex;
|
|
1884
1890
|
gap: 8px;
|
|
1885
1891
|
padding: ${e=>e.contain&&"4px 8px"};
|
|
1886
|
-
`,
|
|
1892
|
+
`,ii={fill:"#000000",height:10,tipRadius:2,width:11},$o=d.forwardRef(({arrow:e=ii,children:t,contain:o=!0,content:n,...r},s)=>i.jsx(oi,{arrow:e,content:i.jsx(si,{contain:o,children:i.jsx(_,{color:"light",variant:"small",children:n})}),...r,children:d.isValidElement(t)?d.cloneElement(t,{ref:s}):t})),ai=({title:e,...t})=>i.jsx(Mn,{...t,title:e??"Error",type:"error"}),Rp=f.div`
|
|
1887
1893
|
display: flex;
|
|
1888
1894
|
gap: 4px;
|
|
1889
|
-
`,
|
|
1895
|
+
`,Np=({label:e,value:t})=>i.jsxs(Rp,{children:[i.jsx(F,{iconId:"CheckSquare",size:"sm",color:"purple"}),i.jsxs(_,{bold:!0,variant:"body",children:[e,":"]}),i.jsx(_,{variant:"body",children:t})]}),li=({children:e,open:t,openDelay:o,...n})=>i.jsx(Co,{content:i.jsx(Np,{...n}),open:t,openDelay:o,children:e}),ci=d.forwardRef(({variant:e,...t},o)=>{let n;switch(e){case"alert":n=Mn;break;case"dark":n=$o;break;case"error":n=ai;break;case"light":n=Co;break;case"selector":n=li;break}return i.jsx(n,{...t,ref:o})}),di=d.createContext(null),Fp=({children:e,value:t})=>i.jsx(di.Provider,{value:t,children:e}),ui=()=>{const e=d.useContext(di);if(!e)throw new Error("Unable to use MultiSelectContext outside of its provider.");return e},[Lt]=O(["multi-select"]),pi=f.div`
|
|
1890
1896
|
width: 100%;
|
|
1891
1897
|
padding: ${Lt("item-padding-y")} ${Lt("item-padding-x")};
|
|
1892
1898
|
display: flex;
|
|
@@ -1899,26 +1905,26 @@
|
|
|
1899
1905
|
&:hover {
|
|
1900
1906
|
background-color: ${Lt("item-hover-bg")};
|
|
1901
1907
|
}
|
|
1902
|
-
`,[
|
|
1903
|
-
border-bottom: ${
|
|
1908
|
+
`,[co]=O(["multi-select"]),Ap=d.memo(({SelectAllItemTemplate:e,options:t})=>{const{selected:o,onSetSelected:n,setOpen:r}=ui(),s=d.useRef(null),{isAllSelected:c,isPartiallySelected:a}=d.useMemo(()=>{const p=t.every(h=>o.some(g=>g.value===h.value));return{isAllSelected:p,isPartiallySelected:!p&&o.length!==0}},[o,t]),u=d.useCallback(()=>{n(c?[]:t),r(!1)},[c,r,n,t]);return d.useEffect(()=>{s.current&&(s.current.indeterminate=a)},[a]),e?i.jsx(e,{onToggleSelectAll:u,isAllSelected:c,isPartiallySelected:a}):i.jsxs(Lp,{onClick:u,children:[i.jsx(yt,{ref:s,onChange:Se,checked:c}),i.jsx(_,{variant:"body",color:"dark",children:c?"Deselect All":"Select All"})]})}),Lp=f(pi)`
|
|
1909
|
+
border-bottom: ${co("border")} solid ${co("select-all-border-color")};
|
|
1904
1910
|
position: sticky;
|
|
1905
1911
|
top: 0;
|
|
1906
1912
|
z-index: 2;
|
|
1907
|
-
padding-top: calc(${
|
|
1908
|
-
background-color: ${
|
|
1909
|
-
`,
|
|
1910
|
-
padding: ${
|
|
1913
|
+
padding-top: calc(${co("item-padding-y")} * 2);
|
|
1914
|
+
background-color: ${co("background")};
|
|
1915
|
+
`,Bp=d.memo(({value:e,label:t,isSelected:o,ListItemTemplate:n,onToggleSelect:r})=>n?i.jsx(n,{value:e,label:t,isSelected:o}):i.jsxs(pi,{onClick:()=>r({value:e,label:t}),children:[i.jsx(yt,{onChange:Se,checked:o}),i.jsx(_,{variant:"body",color:"dark",children:t})]})),[jt]=O(["multi-select"]),Wp=d.memo(({value:e,label:t,onRemove:o,SelectedItemTemplate:n})=>n?i.jsx(n,{value:e,label:t,onRemove:o}):i.jsxs(Pp,{children:[i.jsx(_,{variant:"body",color:"dark",children:t}),i.jsx(te,{size:"xxsm",color:"black",iconId:"Close",onClick:()=>o({value:e,label:t})})]})),Pp=f.div`
|
|
1916
|
+
padding: ${jt("selected-item-padding-y")} ${jt("selected-item-padding-x")};
|
|
1911
1917
|
display: flex;
|
|
1912
1918
|
align-items: center;
|
|
1913
1919
|
justify-content: flex-start;
|
|
1914
|
-
column-gap: ${
|
|
1915
|
-
background-color: ${
|
|
1920
|
+
column-gap: ${jt("selected-item-gap")};
|
|
1921
|
+
background-color: ${jt("selected-item-background")};
|
|
1916
1922
|
transition: background 0.125s ease-in-out;
|
|
1917
|
-
border-radius: ${
|
|
1923
|
+
border-radius: ${jt("selected-item-radius")};
|
|
1918
1924
|
:hover {
|
|
1919
|
-
background-color: ${
|
|
1925
|
+
background-color: ${jt("selected-item-background-hover")};
|
|
1920
1926
|
}
|
|
1921
|
-
`,[ue]=
|
|
1927
|
+
`,[ue]=O(["multi-select"]),hi=d.memo(({options:e,selected:t,className:o,closeOnSelect:n,onChange:r,disabled:s,selectAllHidden:c,SelectAllItemTemplate:a,ListItemTemplate:u,SelectedItemTemplate:p})=>{const[h,g]=d.useState(!1),m=d.useCallback(I=>{console.log({_open:I}),g(I)},[]),{refs:x,floatingStyles:b,context:y}=A.useFloating({placement:"bottom",open:h,onOpenChange:m,whileElementsMounted:A.autoUpdate,middleware:Js}),v=A.useClick(y,{enabled:!s,toggle:!!n}),w=A.useDismiss(y),$=A.useRole(y,{role:"listbox"}),{getReferenceProps:k,getFloatingProps:j}=A.useInteractions([v,w,$]),C=d.useCallback(I=>{t.some(S=>S.value===I.value)?r(t.filter(S=>S.value!==I.value)):r([...t,I])},[r,t]),D=d.useMemo(()=>({open:h,setOpen:g,selected:t,onToggleSelect:C,onSetSelected:r}),[C,h,t,r]);return console.log({open:h}),i.jsx(Fp,{value:D,children:i.jsxs(Vp,{ref:x.setReference,className:o,...k({onClick(I){I.stopPropagation()}}),children:[t.map(I=>M.createElement(Wp,{SelectedItemTemplate:p,...I,key:I.value,onRemove:C})),h&&i.jsx(A.FloatingPortal,{children:i.jsx(A.FloatingFocusManager,{context:y,modal:!1,children:i.jsxs(Hp,{ref:x.setFloating,style:b,className:vt({selectAllHidden:!!c||!!a}),...j(),children:[!c&&i.jsx(Ap,{SelectAllItemTemplate:a,options:e}),e.map(I=>i.jsx(Bp,{label:I.label,value:I.value,onToggleSelect:C,isSelected:t.some(S=>I.value===S.value),ListItemTemplate:u},I.value))]})})})]})})}),Vp=f.div`
|
|
1922
1928
|
width: 100%;
|
|
1923
1929
|
height: fit-content;
|
|
1924
1930
|
min-height: 28px;
|
|
@@ -1935,7 +1941,7 @@
|
|
|
1935
1941
|
&:hover {
|
|
1936
1942
|
border-color: ${ue("hover-border-color")};
|
|
1937
1943
|
}
|
|
1938
|
-
`,
|
|
1944
|
+
`,Hp=f.div`
|
|
1939
1945
|
display: flex;
|
|
1940
1946
|
flex-direction: column;
|
|
1941
1947
|
border: ${ue("border")} solid ${ue("border-color")};
|
|
@@ -1952,25 +1958,44 @@
|
|
|
1952
1958
|
&.selectAllHidden {
|
|
1953
1959
|
padding-top: ${ue("list-padding")};
|
|
1954
1960
|
}
|
|
1955
|
-
`,
|
|
1961
|
+
`,Up=d.memo(({className:e})=>{const t=d.useId();return i.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",className:e,xmlns:"http://www.w3.org/2000/svg",children:[i.jsxs("g",{clipPath:`url(#${t}-clip-0)`,children:[i.jsx("mask",{id:`${t}-mask-1`,style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"48",height:"48",children:i.jsx("path",{d:"M47.95 0H0V47.95H47.95V0Z",fill:"white"})}),i.jsxs("g",{mask:`url(#${t}-mask-1)`,children:[i.jsx("path",{d:"M36.9766 0H10.9735C4.913 0 0 4.913 0 10.9735V36.9766C0 43.037 4.913 47.95 10.9735 47.95H36.9766C43.037 47.95 47.95 43.037 47.95 36.9766V10.9735C47.95 4.913 43.037 0 36.9766 0Z",fill:"black"}),i.jsx("path",{d:"M30.8827 24.7424C30.8827 25.7291 30.6646 26.6208 30.2341 27.393C29.8056 28.1617 29.2034 28.7704 28.4449 29.2013C27.6857 29.6323 26.8124 29.8504 25.8494 29.8504C24.8864 29.8504 24.0126 29.6323 23.2536 29.2013C22.495 28.7704 21.8929 28.1623 21.4643 27.393C21.0339 26.6208 20.8157 25.7291 20.8157 24.7424C20.8157 24.0474 20.9643 23.4216 21.258 22.8811C21.5493 22.345 21.9583 21.92 22.4736 21.6186C22.9907 21.3166 23.5864 21.1638 24.245 21.1638C24.9037 21.1638 25.5 21.3166 26.0166 21.6186C26.5319 21.92 26.9409 22.3444 27.2321 22.8811C27.5259 23.4216 27.6744 24.0481 27.6744 24.7424C27.6744 23.7556 27.4563 22.864 27.0259 22.0917C26.5973 21.3226 25.9951 20.7144 25.2366 20.2834C24.4781 19.8524 23.6049 19.6343 22.6407 19.6343C21.6764 19.6343 20.8039 19.8524 20.0453 20.2834C19.2867 20.7144 18.6846 21.3231 18.256 22.0917C17.8256 22.864 17.6074 23.7556 17.6074 24.7424C17.6074 25.9764 17.8951 27.0964 18.4628 28.0707C19.0311 29.0468 19.8288 29.8184 20.833 30.3636C21.8334 30.9068 22.9819 31.182 24.2457 31.182C25.5094 31.182 26.6586 30.9068 27.659 30.3636C28.663 29.8184 29.4607 29.0474 30.029 28.0707C30.5967 27.0964 30.8844 25.9764 30.8844 24.7424H30.8827Z",fill:"white"}),i.jsx("path",{d:"M17.6073 24.7424C17.6073 23.7556 17.8255 22.864 18.2558 22.0917C18.6845 21.3232 19.2866 20.7144 20.0452 20.2834C20.8042 19.8524 21.6775 19.6343 22.6405 19.6343C23.6035 19.6343 24.4773 19.8524 25.2365 20.2834C25.9949 20.7144 26.5972 21.3226 27.0258 22.0917C27.456 22.864 27.6743 23.7556 27.6743 24.7424C27.6743 25.4373 27.5256 26.0633 27.232 26.6036C26.9408 27.1399 26.5318 27.5649 26.0163 27.8663C25.4992 28.1682 24.9036 28.321 24.2449 28.321C23.5862 28.321 22.99 28.1682 22.4735 27.8663C21.958 27.5649 21.549 27.1404 21.2578 26.6036C20.9642 26.0633 20.8155 25.4367 20.8155 24.7424C20.8155 25.7292 21.0338 26.6209 21.464 27.393C21.8926 28.1623 22.4949 28.7704 23.2533 29.2014C24.0119 29.6323 24.8852 29.8506 25.8493 29.8506C26.8135 29.8506 27.6862 29.6323 28.4446 29.2014C29.2032 28.7704 29.8053 28.1617 30.234 27.393C30.6643 26.6209 30.8825 25.7292 30.8825 24.7424C30.8825 23.5083 30.5948 22.3884 30.027 21.4142C29.4588 20.438 28.661 19.6664 27.657 19.1213C26.6566 18.578 25.508 18.3027 24.2443 18.3027C22.9805 18.3027 21.8315 18.578 20.831 19.1213C19.8269 19.6664 19.0292 20.4374 18.4609 21.4142C17.8932 22.3884 17.6055 23.5083 17.6055 24.7424H17.6073Z",fill:"white"}),i.jsx("path",{d:"M17.6072 24.7424C17.6072 23.7556 17.8253 22.864 18.2558 22.0917C18.6843 21.3232 19.2865 20.7144 20.045 20.2834C20.8042 19.8524 21.6775 19.6343 22.6405 19.6343C23.6035 19.6343 24.4773 19.8524 25.2363 20.2834C25.9949 20.7144 26.597 21.3226 27.0256 22.0917C27.456 22.864 27.6742 23.7556 27.6742 24.7424C27.6742 25.4373 27.5256 26.0633 27.2319 26.6036C26.9406 27.1399 26.5316 27.5649 26.0163 27.8663C25.4992 28.1682 24.9035 28.321 24.2449 28.321C23.5862 28.321 22.9899 28.1682 22.4733 27.8663C21.958 27.5649 21.549 27.1404 21.2578 26.6036C20.964 26.0633 20.8155 25.4367 20.8155 24.7424C20.8155 25.7292 21.0336 26.6209 21.464 27.393C21.8926 28.1623 22.4948 28.7704 23.2533 29.2014C24.0118 29.6323 24.885 29.8504 25.8492 29.8504C26.8135 29.8504 27.686 29.6323 28.4446 29.2014C29.2032 28.7704 29.8053 28.1617 30.2339 27.393C30.6643 26.6209 30.8825 25.7292 30.8825 24.7424C30.8825 23.5083 30.5948 22.3884 30.027 21.4142C29.4588 20.438 28.661 19.6664 27.657 19.1213C26.6565 18.578 25.508 18.3027 24.2442 18.3027C22.9805 18.3027 21.8313 18.578 20.8309 19.1213C19.8269 19.6664 19.0292 20.4374 18.4609 21.4142C17.8932 22.3884 17.6055 23.5083 17.6055 24.7424H17.6072Z",fill:`url(#${t}-paint-0)`}),i.jsx("path",{d:"M41.6791 24.6258C41.0531 23.9767 40.1179 23.5308 38.8969 23.3002L36.5435 22.8692C35.7981 22.7276 35.4831 22.5744 35.3499 22.4704C35.1865 22.3431 35.1073 22.2075 35.1073 22.0559C35.1073 21.9627 35.1073 21.6791 35.6429 21.4015C36.0525 21.1892 36.5798 21.0817 37.2099 21.0817C38.3548 21.0817 39.4248 21.4585 40.3902 22.2022C40.4639 22.2592 40.5561 22.2902 40.6488 22.2902C40.7791 22.2902 40.8991 22.2314 40.9793 22.1291L42.2705 20.4789C42.4096 20.3012 42.3841 20.0462 42.2116 19.8981C41.5946 19.3691 40.8641 18.9702 40.0383 18.7128C39.1662 18.4411 38.2425 18.3032 37.2925 18.3032C36.2821 18.3032 35.3618 18.4595 34.5569 18.7675C33.7378 19.0814 33.0875 19.5409 32.6238 20.1329C32.1535 20.7339 31.9152 21.4479 31.9152 22.2539C31.9152 23.1479 32.2159 23.9077 32.8086 24.5122C33.3906 25.1061 34.2698 25.5175 35.4218 25.7362L37.9572 26.2165C38.5236 26.3301 38.9231 26.4757 39.1449 26.6487C39.3392 26.8009 39.4296 26.9691 39.4296 27.1795C39.4296 27.4749 39.2572 27.7247 38.9029 27.9428C38.5142 28.1818 37.9839 28.3036 37.3271 28.3036C35.9058 28.3036 34.6585 27.8589 33.6206 26.9816C33.5452 26.9179 33.4495 26.8829 33.3508 26.8829C33.2242 26.8829 33.1052 26.9388 33.0251 27.0369L31.6275 28.7369C31.4823 28.9135 31.5038 29.1704 31.6756 29.3219C32.2921 29.8652 33.0988 30.2998 34.0736 30.6137C35.1062 30.9465 36.2398 31.1154 37.4435 31.1154C38.4576 31.1154 39.3642 30.9465 40.1388 30.6137C40.9258 30.2754 41.5446 29.7887 41.9798 29.1662C42.4173 28.5397 42.6391 27.8102 42.6391 26.9982C42.6391 26.0834 42.3168 25.2851 41.6808 24.6252L41.6791 24.6258Z",fill:`url(#${t}-paint-1)`}),i.jsx("path",{d:"M12.9952 24.6802L18.8296 19.0464C19.0549 18.8271 19.0123 18.6261 18.9817 18.5529C18.9513 18.4799 18.8477 18.3032 18.5312 18.3032H15.5957C15.3764 18.3032 15.0963 18.4129 14.9319 18.5712L10.0172 23.3951V18.7357C10.0172 18.4981 9.82227 18.3032 9.58476 18.3032H7.26443C7.02692 18.3032 6.83203 18.4981 6.83203 18.7357V30.6249C6.83203 30.8624 7.02692 31.0574 7.26443 31.0574H9.58476C9.82227 31.0574 10.0172 30.8624 10.0172 30.6249V25.9655L14.9319 30.7894C15.0902 30.9417 15.3703 31.0574 15.5896 31.0574H18.525C18.8417 31.0574 18.9453 30.8807 18.9757 30.8077C19.0062 30.7345 19.0487 30.5335 18.8234 30.3142L12.9952 24.6802Z",fill:"white"})]})]}),i.jsxs("defs",{children:[i.jsxs("linearGradient",{id:`${t}-paint-0`,x1:"24.2439",y1:"19.4779",x2:"24.2439",y2:"28.6754",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{offset:"0.0358168",stopColor:"#82E1FF"}),i.jsx("stop",{offset:"0.228529",stopColor:"#78E6A0"}),i.jsx("stop",{offset:"0.436866",stopColor:"#FFB400"}),i.jsx("stop",{offset:"0.619161",stopColor:"#FF8700"}),i.jsx("stop",{offset:"0.811872",stopColor:"#FF5A00"}),i.jsx("stop",{offset:"1",stopColor:"#F40000"})]}),i.jsxs("linearGradient",{id:`${t}-paint-1`,x1:"37.0852",y1:"19.6069",x2:"37.0852",y2:"29.8117",gradientUnits:"userSpaceOnUse",children:[i.jsx("stop",{offset:"0.0358168",stopColor:"#82E1FF"}),i.jsx("stop",{offset:"0.228529",stopColor:"#78E6A0"}),i.jsx("stop",{offset:"0.436866",stopColor:"#FFB400"}),i.jsx("stop",{offset:"0.619161",stopColor:"#FF8700"}),i.jsx("stop",{offset:"0.811872",stopColor:"#FF5A00"}),i.jsx("stop",{offset:"1",stopColor:"#F40000"})]}),i.jsx("clipPath",{id:`${t}-clip-0`,children:i.jsx("rect",{width:"48",height:"48",fill:"white"})})]})]})}),Gp=({onClick:e,onClear:t,text:o,value:n,active:r})=>{const s=d.useRef(null),c=d.useCallback(a=>{var u;if((u=s.current)!=null&&u.contains(a.target)){console.log("adawda");return}e(n)},[e,n]);return i.jsxs(Yp,{"data-active":r,onClick:c,children:[i.jsx(_,{variant:"body",color:"light",children:o}),!!t&&i.jsx(te,{onClick:()=>t(n),ref:s,iconId:"Close",size:"xsm",color:"white"})]})},Kp=d.memo(Gp),Yp=f.div`
|
|
1962
|
+
padding: ${l("spacing-4")};
|
|
1963
|
+
display: flex;
|
|
1964
|
+
align-items: center;
|
|
1965
|
+
justify-content: flex-start;
|
|
1966
|
+
column-gap: ${l("spacing-4")};
|
|
1967
|
+
border-radius: ${l("spacing-2")};
|
|
1968
|
+
background-color: ${l("color-grey70")};
|
|
1969
|
+
transition: background 0.125s ease-in-out;
|
|
1970
|
+
cursor: pointer;
|
|
1971
|
+
&[data-active="true"] {
|
|
1972
|
+
background-color: ${l("color-grey60")};
|
|
1973
|
+
:hover {
|
|
1974
|
+
background-color: ${l("color-grey50")};
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
:hover {
|
|
1978
|
+
background-color: ${l("color-grey65")};
|
|
1979
|
+
}
|
|
1980
|
+
`,qp=["settings","devices","tools","performance"],Zp=["viewBrowse","manage","configure","troubleshoot","store","main"],Xp=qp.map(e=>Zp.map(t=>({start:e,end:t}))).flatMap(e=>e),[je,gi]=O(["branded-header","icon"]),Jp=f.div`
|
|
1956
1981
|
width: 100%;
|
|
1957
1982
|
display: flex;
|
|
1958
1983
|
flex-direction: column;
|
|
1959
1984
|
align-items: flex-start;
|
|
1960
1985
|
justify-content: flex-start;
|
|
1961
|
-
border-bottom: ${
|
|
1962
|
-
`,
|
|
1986
|
+
border-bottom: ${je("border-bottom-size")} solid ${je("border-bottom-color")};
|
|
1987
|
+
`,Qp=f.div`
|
|
1963
1988
|
width: 100%;
|
|
1964
1989
|
display: flex;
|
|
1965
1990
|
align-items: center;
|
|
1966
1991
|
justify-content: flex-start;
|
|
1967
1992
|
max-height: 52px;
|
|
1968
|
-
`;
|
|
1993
|
+
`;f.div``;const eh=f.div`
|
|
1969
1994
|
display: flex;
|
|
1970
1995
|
flex: 1;
|
|
1971
1996
|
gap: 16px;
|
|
1972
1997
|
padding: 12px 20px 12px 16px;
|
|
1973
|
-
`,
|
|
1998
|
+
`,th=f.div`
|
|
1974
1999
|
flex: 1;
|
|
1975
2000
|
display: flex;
|
|
1976
2001
|
align-items: center;
|
|
@@ -1980,39 +2005,40 @@
|
|
|
1980
2005
|
/* &.hasDescription {
|
|
1981
2006
|
align-items: flex-start;
|
|
1982
2007
|
} */
|
|
1983
|
-
`,
|
|
2008
|
+
`,oh=f.div`
|
|
1984
2009
|
flex: 1;
|
|
1985
2010
|
overflow: hidden;
|
|
1986
2011
|
display: flex;
|
|
1987
2012
|
flex-direction: column;
|
|
1988
2013
|
align-items: flex-start;
|
|
1989
2014
|
justify-content: flex-start;
|
|
1990
|
-
row-gap: ${
|
|
1991
|
-
`;
|
|
2015
|
+
row-gap: ${je("text-wrapper-gap")};
|
|
2016
|
+
`;f.img`
|
|
1992
2017
|
height: 100%;
|
|
1993
|
-
`;const
|
|
1994
|
-
${
|
|
2018
|
+
`;const fi=M.css`
|
|
2019
|
+
${Xp.map(({start:e,end:t})=>`&[data-gradient="${e}-${t}"] {
|
|
1995
2020
|
background: linear-gradient(
|
|
1996
2021
|
90deg,
|
|
1997
|
-
${
|
|
1998
|
-
${
|
|
2022
|
+
${je(`startColor-${e}`)} 0%,
|
|
2023
|
+
${je(`endColor-${t}`)} 100%
|
|
1999
2024
|
);
|
|
2000
2025
|
}`)}
|
|
2001
|
-
`,
|
|
2026
|
+
`,nh=f.div`
|
|
2002
2027
|
background-color: ${e=>e.color};
|
|
2003
|
-
height: ${
|
|
2004
|
-
width: ${
|
|
2005
|
-
border-radius: ${
|
|
2028
|
+
height: ${je("badge-size")};
|
|
2029
|
+
width: ${je("badge-size")};
|
|
2030
|
+
border-radius: ${je("badge-radius")};
|
|
2006
2031
|
position: relative;
|
|
2007
|
-
${
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2032
|
+
color: ${l("color-white")};
|
|
2033
|
+
${`${gi("size-xxlrg",!0)}: 52px`};
|
|
2034
|
+
`;f.div`
|
|
2035
|
+
height: ${je("badge-size")};
|
|
2036
|
+
width: ${je("badge-size")};
|
|
2037
|
+
border-radius: ${je("badge-radius")};
|
|
2012
2038
|
position: relative;
|
|
2013
|
-
${`${
|
|
2014
|
-
${
|
|
2015
|
-
`;const
|
|
2039
|
+
${`${gi("size-xxlrg",!0)}: calc(100% - 2px)`};
|
|
2040
|
+
${fi}
|
|
2041
|
+
`;const rh=f.div`
|
|
2016
2042
|
width: 100%;
|
|
2017
2043
|
height: 100%;
|
|
2018
2044
|
position: absolute;
|
|
@@ -2023,31 +2049,31 @@
|
|
|
2023
2049
|
justify-content: center;
|
|
2024
2050
|
z-index: 2;
|
|
2025
2051
|
color: white;
|
|
2026
|
-
`;
|
|
2052
|
+
`;f.div`
|
|
2027
2053
|
width: 100%;
|
|
2028
2054
|
display: flex;
|
|
2029
2055
|
align-items: center;
|
|
2030
2056
|
justify-content: center;
|
|
2031
2057
|
position: relative;
|
|
2032
|
-
height: ${
|
|
2058
|
+
height: ${je("line-height")};
|
|
2033
2059
|
overflow: hidden;
|
|
2034
|
-
${
|
|
2035
|
-
`;const
|
|
2060
|
+
${fi}
|
|
2061
|
+
`;const sh=f.div`
|
|
2036
2062
|
width: 100%;
|
|
2037
2063
|
height: 100%;
|
|
2038
2064
|
position: absolute;
|
|
2039
2065
|
top: 0;
|
|
2040
2066
|
left: 0;
|
|
2041
2067
|
z-index: 1;
|
|
2042
|
-
background-color: ${
|
|
2068
|
+
background-color: ${l("color-grey60")};
|
|
2043
2069
|
opacity: 0.5;
|
|
2044
|
-
`,
|
|
2070
|
+
`,ih=f(_)`
|
|
2045
2071
|
display: -webkit-box;
|
|
2046
2072
|
-webkit-line-clamp: 2;
|
|
2047
2073
|
-webkit-box-orient: vertical;
|
|
2048
2074
|
overflow: hidden;
|
|
2049
2075
|
text-overflow: ellipsis;
|
|
2050
|
-
`,
|
|
2076
|
+
`,ah=e=>i.jsx(ih,{...e,variant:"body",color:"dark"}),lh=d.memo(({color:e,title:t,description:o,icon:n,Action:r,isOffline:s})=>i.jsx(M.ClassNames,{children:({cx:c})=>i.jsx(Jp,{children:i.jsxs(Qp,{children:[i.jsxs(nh,{color:e,children:[i.jsx(rh,{children:n&&i.jsx(F,{iconId:n,size:"xxlrg",color:"white"})}),!!s&&i.jsx(sh,{})]}),i.jsxs(eh,{children:[i.jsx(th,{className:c({hasDescription:!!o}),children:i.jsxs(oh,{children:[i.jsx(_,{variant:"h1",children:t}),!!o&&i.jsx(ah,{children:o})]})}),!!r&&i.jsx(r,{})]})]})})})),ch=d.memo(({description:e})=>{const{open:t}=Mt();return i.jsx(dh,{color:"grey",variant:"small","data-state":t?"open":"closed",children:e})}),dh=f(_)`
|
|
2051
2077
|
width: 100%;
|
|
2052
2078
|
overflow: hidden;
|
|
2053
2079
|
text-overflow: ellipsis;
|
|
@@ -2058,9 +2084,9 @@
|
|
|
2058
2084
|
white-space: normal;
|
|
2059
2085
|
word-break: break-word;
|
|
2060
2086
|
}
|
|
2061
|
-
`,[Ye]=
|
|
2087
|
+
`,[Ye]=O(["collapsible-artifact"]),uh=d.memo(({onExternalClick:e,id:t,name:o,isSelected:n,description:r,VersionList:s,className:c})=>{const a=d.useCallback(()=>{e&&e(t)},[t,e]);return i.jsx(Jt,{children:i.jsxs(ph,{className:c,children:[i.jsxs(gh,{children:[i.jsx(xn,{children:i.jsx(fh,{color:"black",size:"xxsm",iconId:"CaretRight"})}),i.jsxs(mh,{children:[i.jsxs(bh,{children:[i.jsx(_,{css:M.css`
|
|
2062
2088
|
word-break: break-all;
|
|
2063
|
-
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(_,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(
|
|
2089
|
+
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(_,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(ch,{description:r})]}),!!e&&i.jsx(hh,{color:"blue",iconId:"Export",onClick:a,size:"xsm"})]}),i.jsx(Qt,{children:i.jsx(xh,{children:i.jsx(yh,{children:s})})})]})})}),ph=f.div`
|
|
2064
2090
|
align-items: flex-start;
|
|
2065
2091
|
background-color: ${Ye("background-color")};
|
|
2066
2092
|
border-radius: ${Ye("border-radius")};
|
|
@@ -2070,27 +2096,27 @@
|
|
|
2070
2096
|
justify-content: flex-start;
|
|
2071
2097
|
position: relative;
|
|
2072
2098
|
width: 100%;
|
|
2073
|
-
`,
|
|
2099
|
+
`,hh=f(te)`
|
|
2074
2100
|
z-index: 1;
|
|
2075
|
-
`,
|
|
2101
|
+
`,gh=f.div`
|
|
2076
2102
|
align-items: flex-start;
|
|
2077
2103
|
display: flex;
|
|
2078
2104
|
gap: ${Ye("name-and-selected-spacing")};
|
|
2079
2105
|
padding: ${Ye("padding")};
|
|
2080
2106
|
width: 100%;
|
|
2081
|
-
`,
|
|
2107
|
+
`,fh=f(te)`
|
|
2082
2108
|
z-index: 1;
|
|
2083
2109
|
|
|
2084
2110
|
&[data-state="open"] {
|
|
2085
2111
|
transform: rotate(90deg);
|
|
2086
2112
|
}
|
|
2087
|
-
`,
|
|
2113
|
+
`,mh=f.div`
|
|
2088
2114
|
display: flex;
|
|
2089
2115
|
flex-direction: column;
|
|
2090
2116
|
flex: 1;
|
|
2091
2117
|
gap: ${Ye("name-and-desc-spacing")};
|
|
2092
2118
|
overflow: hidden;
|
|
2093
|
-
`,
|
|
2119
|
+
`,bh=f.div`
|
|
2094
2120
|
align-items: center;
|
|
2095
2121
|
display: flex;
|
|
2096
2122
|
flex-wrap: wrap;
|
|
@@ -2098,37 +2124,37 @@
|
|
|
2098
2124
|
gap: ${Ye("name-and-selected-spacing")};
|
|
2099
2125
|
justify-content: flex-start;
|
|
2100
2126
|
width: 100%;
|
|
2101
|
-
`,
|
|
2127
|
+
`,xh=f.div`
|
|
2102
2128
|
border-top: 1px solid ${Ye("border-color")};
|
|
2103
2129
|
width: 100%;
|
|
2104
|
-
`,
|
|
2130
|
+
`,yh=f.div`
|
|
2105
2131
|
padding: ${Ye("name-and-selected-spacing")};
|
|
2106
2132
|
width: 100%;
|
|
2107
|
-
`,[
|
|
2133
|
+
`,[Re]=O(["collapsible-artifact-version"]),vh=d.memo(({onListItemAction:e,isSelected:t,isInherited:o,id:n,name:r,createdAt:s,description:c})=>{const a=d.useCallback(()=>{e&&!o&&e(n,t?"deselect":"select")},[n,o,t,e]);return i.jsx(M.ClassNames,{children:({cx:u})=>i.jsxs(kh,{onClick:a,className:u({isSelected:t,isInherited:o}),children:[i.jsxs(wh,{children:[i.jsxs(Ch,{children:[i.jsx(_,{variant:"small",color:"dark",bold:!0,children:r}),!!s&&i.jsx(_,{color:"grey",variant:"small",children:s})]}),c&&i.jsx(yo,{color:"grey",variant:"small",children:`${c}${c}`})]}),t?i.jsx($h,{size:"xsm",color:"blue",iconId:t?"Check":"InfoCircle"}):o?i.jsx(F,{iconId:"Inherited",color:"purple"}):null]})})}),kh=f.div`
|
|
2108
2134
|
width: 100%;
|
|
2109
2135
|
position: relative;
|
|
2110
2136
|
display: flex;
|
|
2111
|
-
padding: ${
|
|
2112
|
-
border-radius: ${
|
|
2113
|
-
background-color: ${
|
|
2114
|
-
border: ${
|
|
2137
|
+
padding: ${Re("padding")};
|
|
2138
|
+
border-radius: ${Re("border-radius")};
|
|
2139
|
+
background-color: ${Re("background-color")};
|
|
2140
|
+
border: ${Re("border-width")} solid ${Re("border-color")};
|
|
2115
2141
|
cursor: pointer;
|
|
2116
2142
|
transition: border-color 0.125s ease-in-out, background 0.125s ease-in-out;
|
|
2117
2143
|
&.isInherited {
|
|
2118
|
-
background-color: ${
|
|
2119
|
-
border-color: ${
|
|
2144
|
+
background-color: ${Re("background-color-inherited")};
|
|
2145
|
+
border-color: ${Re("border-color-inherited")};
|
|
2120
2146
|
}
|
|
2121
2147
|
&.isSelected {
|
|
2122
|
-
background-color: ${
|
|
2123
|
-
border-color: ${
|
|
2148
|
+
background-color: ${Re("background-color-selected")};
|
|
2149
|
+
border-color: ${Re("border-color-selected")};
|
|
2124
2150
|
}
|
|
2125
2151
|
:hover:not(.isSelected) {
|
|
2126
|
-
background-color: ${
|
|
2152
|
+
background-color: ${Re("background-color-hover")};
|
|
2127
2153
|
}
|
|
2128
2154
|
:hover:not(.isSelected):not(.isInherited) {
|
|
2129
|
-
border-color: ${
|
|
2155
|
+
border-color: ${Re("border-color-hover")};
|
|
2130
2156
|
}
|
|
2131
|
-
`,
|
|
2157
|
+
`,wh=f.div`
|
|
2132
2158
|
width: 100%;
|
|
2133
2159
|
display: flex;
|
|
2134
2160
|
align-items: flex-start;
|
|
@@ -2136,28 +2162,28 @@
|
|
|
2136
2162
|
flex-direction: column;
|
|
2137
2163
|
row-gap: 1px;
|
|
2138
2164
|
overflow: hidden;
|
|
2139
|
-
`,
|
|
2165
|
+
`,Ch=f.div`
|
|
2140
2166
|
width: 100%;
|
|
2141
2167
|
display: flex;
|
|
2142
2168
|
align-items: center;
|
|
2143
2169
|
justify-content: flex-start;
|
|
2144
2170
|
gap: 8px;
|
|
2145
|
-
|
|
2171
|
+
`,$h=f(F)`
|
|
2146
2172
|
position: absolute;
|
|
2147
2173
|
top: 50%;
|
|
2148
2174
|
transform: translateY(-50%);
|
|
2149
2175
|
right: 8px;
|
|
2150
|
-
`,[Kt,Vo,
|
|
2176
|
+
`,[Kt,Vo,jh]=O(["collapsible-list-container","collapsible-list-header-container","collapsible-list-toggled-container"]),Sh=({headerContent:e,toggledContent:t,isOpen:o,onOpenChange:n})=>i.jsx(Jt,{open:o,onOpenChange:n,children:i.jsxs(Dh,{children:[i.jsx(xn,{children:i.jsxs(_h,{children:[i.jsx(te,{className:"caret-button",color:"black",size:"xsm",iconId:"CaretRight"}),e]})}),i.jsx(Qt,{children:i.jsx(Ih,{children:t})})]})}),Ih=f.div`
|
|
2151
2177
|
flex-direction: column;
|
|
2152
|
-
gap: ${
|
|
2153
|
-
`,
|
|
2178
|
+
gap: ${jh("gap")};
|
|
2179
|
+
`,Dh=f.div`
|
|
2154
2180
|
border-radius: ${Kt("border-radius")};
|
|
2155
2181
|
border: ${Kt("border-width")} solid ${Kt("border-color")};
|
|
2156
2182
|
display: flex;
|
|
2157
2183
|
flex-direction: column;
|
|
2158
2184
|
overflow: hidden;
|
|
2159
2185
|
position: relative;
|
|
2160
|
-
`,
|
|
2186
|
+
`,_h=f.div`
|
|
2161
2187
|
align-items: center;
|
|
2162
2188
|
background-color: ${Vo("background-color")};
|
|
2163
2189
|
cursor: pointer;
|
|
@@ -2173,11 +2199,11 @@
|
|
|
2173
2199
|
border-bottom: ${Kt("border-width")} solid
|
|
2174
2200
|
${Kt("border-color")};
|
|
2175
2201
|
}
|
|
2176
|
-
`,[Sr]=
|
|
2202
|
+
`,[Sr]=O(["combobox"]),Th=d.memo(({isDeletable:e,inputText:t,setInputText:o,onSelectionChange:n,placeholder:r,setIsOpen:s,tooltipText:c,onKeyDown:a})=>{const u=d.useCallback(h=>{o(h.target.value??"")},[o]),p=d.useCallback(()=>{o(""),n("select",void 0),s(!1)},[n,o,s]);return i.jsxs(Eh,{children:[i.jsx(Mh,{value:t,onChange:u,onKeyDown:a,placeholder:r,autoFocus:!0,className:e?"isDeletable":void 0}),e&&i.jsx(zh,{children:i.jsx(ci,{variant:"dark",content:c,children:i.jsx(te,{onClick:p,iconId:"DeleteOutlined",color:"red",size:"sm"})})})]})}),Eh=f.div`
|
|
2177
2203
|
width: 100%;
|
|
2178
2204
|
position: relative;
|
|
2179
2205
|
display: flex;
|
|
2180
|
-
`,
|
|
2206
|
+
`,zh=f.div`
|
|
2181
2207
|
position: absolute;
|
|
2182
2208
|
right: 8px;
|
|
2183
2209
|
top: 50%;
|
|
@@ -2185,18 +2211,18 @@
|
|
|
2185
2211
|
align-items: center;
|
|
2186
2212
|
justify-content: center;
|
|
2187
2213
|
transform: translateY(-50%);
|
|
2188
|
-
`,
|
|
2214
|
+
`,Mh=f(kt)`
|
|
2189
2215
|
border-radius: ${Sr("input-border-radius")};
|
|
2190
2216
|
height: ${Sr("height")};
|
|
2191
2217
|
width: 100%;
|
|
2192
2218
|
|
|
2193
2219
|
&.isDeletable {
|
|
2194
|
-
padding-right: ${
|
|
2220
|
+
padding-right: ${l("spacing-32")};
|
|
2195
2221
|
}
|
|
2196
|
-
`,
|
|
2222
|
+
`,Oh=d.memo(({name:e})=>i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"Check",color:"black",className:"option-label-icon",size:"xsm"}),i.jsx(yo,{variant:"body",color:"dark",children:e})]})),[Ae,Rh]=O(["combobox","option"]),Nh=({optionsToRender:e,inputText:t,handleSelectionChange:o,handleInputChange:n,isDeletable:r,OptionLabelComponent:s,placeholder:c,createNode:a,createText:u,className:p,onEnter:h,t:g})=>{const{setIsOpen:m,selectedIndex:x}=En(),b=d.useCallback(()=>{o("create",{id:t,name:t}),m(!1)},[t,m,o]),y=d.useMemo(()=>!e.length||!e.some(w=>w.name.toLowerCase()===t.toLowerCase()),[t,e]),v=d.useCallback(w=>{w.code==="Enter"&&t&&h&&h(t,()=>m(!1))},[t,h,m]);return i.jsxs(Ah,{className:p,children:[i.jsx(Th,{inputText:t,setIsOpen:m,onSelectionChange:o,setInputText:n,isDeletable:r,onKeyDown:h?v:void 0,placeholder:c??"Enter a name",tooltipText:(g==null?void 0:g("comboBox.tooltipText"))??"Remove?"}),e.map((w,$)=>i.jsx(Wh,{label:s?i.jsx(s,{...w,selected:x===$}):i.jsx(Oh,{name:w.name}),optionKey:w.id,disabled:w.isHeader},w.id)),y&&t?a?i.jsx(Bh,{onClick:b,children:a}):i.jsx(Lh,{size:"med",onClick:b,children:u??"Create?"}):null]})},mi=({children:e,deletable:t,options:o,selected:n,onInputChange:r,onSelectionChange:s,requiresSelection:c,...a})=>{const u=d.useRef(n==null?void 0:n.id),[p,h]=d.useState(c?"":(n==null?void 0:n.name)??""),g=!!n&&n.name===p,m=t!==void 0?t:g&&!c;d.useLayoutEffect(()=>{u.current!==(n==null?void 0:n.id)&&(h(c?"":(n==null?void 0:n.name)??""),u.current=n==null?void 0:n.id)},[n,c]);const x=d.useCallback($=>{h($),r==null||r($)},[r]),b=d.useCallback(($,k)=>{u.current=k==null?void 0:k.id,h(c?"":(k==null?void 0:k.name)??""),s($,k==null?void 0:k.id)},[s,c]),y=d.useCallback($=>{const k=o.find(j=>j.id===$);k&&b("select",k)},[b,o]),v=d.useMemo(()=>g?o:o.filter($=>$.name.toLowerCase().includes(p.toLowerCase())||$.isHeader),[p,o,g]),w=d.useMemo(()=>v.findIndex($=>$.id===(n==null?void 0:n.id)),[v,n==null?void 0:n.id]);return i.jsx(Fh,{selectedIndex:w,isFocusTrapDisabled:!0,onSelect:y,Reference:e,children:i.jsx(Nh,{...a,handleInputChange:x,handleSelectionChange:b,optionsToRender:v,isDeletable:m,inputText:p})})},Fh=f(Ot)`
|
|
2197
2223
|
border-radius: ${Ae("border-radius")};
|
|
2198
2224
|
overflow: hidden;
|
|
2199
|
-
`,
|
|
2225
|
+
`,Ah=f.div`
|
|
2200
2226
|
width: 200px;
|
|
2201
2227
|
height: auto;
|
|
2202
2228
|
display: flex;
|
|
@@ -2208,12 +2234,12 @@
|
|
|
2208
2234
|
box-shadow: ${Ae("box-shadow")};
|
|
2209
2235
|
padding: ${Ae("padding")};
|
|
2210
2236
|
row-gap: ${Ae("row-gap")};
|
|
2211
|
-
`,
|
|
2212
|
-
padding: ${
|
|
2213
|
-
`,
|
|
2237
|
+
`,Lh=f(bn)`
|
|
2238
|
+
padding: ${Rh("padding")};
|
|
2239
|
+
`,Bh=f.div`
|
|
2214
2240
|
cursor: pointer;
|
|
2215
2241
|
width: 100%;
|
|
2216
|
-
`,
|
|
2242
|
+
`,Wh=f(ht)`
|
|
2217
2243
|
width: 100%;
|
|
2218
2244
|
display: flex;
|
|
2219
2245
|
align-items: center;
|
|
@@ -2239,116 +2265,116 @@
|
|
|
2239
2265
|
cursor: initial;
|
|
2240
2266
|
pointer-events: none;
|
|
2241
2267
|
span {
|
|
2242
|
-
font-weight: ${
|
|
2268
|
+
font-weight: ${l("font-weight-bold")};
|
|
2243
2269
|
}
|
|
2244
2270
|
}
|
|
2245
|
-
`,
|
|
2271
|
+
`,bi=f.div`
|
|
2246
2272
|
height: 20px;
|
|
2247
2273
|
width: 240px;
|
|
2248
2274
|
display: grid;
|
|
2249
2275
|
align-items: center;
|
|
2250
2276
|
grid-template-columns: 1fr 20px;
|
|
2251
|
-
border-radius: ${
|
|
2252
|
-
padding: ${
|
|
2253
|
-
grid-gap: ${
|
|
2277
|
+
border-radius: ${l("spacing-2")};
|
|
2278
|
+
padding: ${l("spacing-2")} ${l("spacing-6")};
|
|
2279
|
+
grid-gap: ${l("spacing-6")};
|
|
2254
2280
|
cursor: pointer;
|
|
2255
2281
|
overflow: hidden;
|
|
2256
|
-
border: ${
|
|
2257
|
-
${
|
|
2282
|
+
border: ${l("border-sm")} solid
|
|
2283
|
+
${l("color-grey30")};
|
|
2258
2284
|
:hover {
|
|
2259
|
-
border-color: ${
|
|
2285
|
+
border-color: ${l("color-grey60")};
|
|
2260
2286
|
}
|
|
2261
2287
|
transition: border 0.2s ease-in-out;
|
|
2262
2288
|
&.isDisabled {
|
|
2263
2289
|
pointer-events: none;
|
|
2264
|
-
background-color: ${
|
|
2290
|
+
background-color: ${l("color-grey10")};
|
|
2265
2291
|
}
|
|
2266
|
-
`;function Rh(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Ho={},Ht={};function bt(e,t){try{const n=(Ho[e]||(Ho[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Ht?Ht[n]:jr(n,n.split(":"))}catch{if(e in Ht)return Ht[e];const o=e==null?void 0:e.match(Nh);return o?jr(e,o.slice(1)):NaN}}const Nh=/([+-]\d\d):?(\d\d)?/;function jr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Ht[e]=o*60+n>0?o*60+n+r:o*60-n-r}class qe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(bt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),pi(this),ln(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new qe(...o,t):new qe(Date.now(),t)}withTimeZone(t){return new qe(+this,t)}getTimezoneOffset(){const t=-bt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ln(this),+this}[Symbol.for("constructDateFrom")](t){return new qe(+new Date(t),this.timeZone)}}const Ir=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ir.test(e))return;const t=e.replace(Ir,"$1UTC");qe.prototype[t]&&(e.startsWith("get")?qe.prototype[e]=function(){return this.internal[t]()}:(qe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Fh(this),+this},qe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ln(this),+this}))});function ln(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-bt(e.timeZone,e)*60))}function Fh(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),pi(e)}function pi(e){const t=bt(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),l=r-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();l&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+l);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const p=new Date(+e);p.setUTCSeconds(0);const h=r>0?p.getSeconds():(p.getSeconds()-60)%60,f=Math.round(-(bt(e.timeZone,e)*60))%60;(f||h)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+f),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+f+h));const m=bt(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,v=x!==o,w=y-u;if(v&&w){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w);const $=bt(e.timeZone,e),k=$>0?Math.floor($):Math.ceil($),S=x-k;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class de extends qe{static tz(t,...o){return o.length?new de(...o,t):new de(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${Rh(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new de(+this,t)}[Symbol.for("constructDateFrom")](t){return new de(+new Date(t),this.timeZone)}}const Ah={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Lh=(e,t,o)=>{let n;const r=Ah[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Uo(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const Bh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ph={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vh={date:Uo({formats:Bh,defaultWidth:"full"}),time:Uo({formats:Wh,defaultWidth:"full"}),dateTime:Uo({formats:Ph,defaultWidth:"full"})},Hh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uh=(e,t,o,n)=>Hh[e];function Bt(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,a=o!=null&&o.width?String(o.width):l;r=e.formattingValues[a]||e.formattingValues[l]}else{const l=e.defaultWidth,a=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[a]||e.values[l]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const Gh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Yh={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qh={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Xh={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Jh=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},Qh={ordinalNumber:Jh,era:Bt({values:Gh,defaultWidth:"wide"}),quarter:Bt({values:Kh,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bt({values:Yh,defaultWidth:"wide"}),day:Bt({values:qh,defaultWidth:"wide"}),dayPeriod:Bt({values:Zh,defaultWidth:"wide",formattingValues:Xh,defaultFormattingWidth:"wide"})};function Wt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const l=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?tf(a,f=>f.test(l)):ef(a,f=>f.test(l));let p;p=e.valueCallback?e.valueCallback(u):u,p=o.valueCallback?o.valueCallback(p):p;const h=t.slice(l.length);return{value:p,rest:h}}}function ef(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function tf(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function of(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let l=e.valueCallback?e.valueCallback(s[0]):s[0];l=o.valueCallback?o.valueCallback(l):l;const a=t.slice(r.length);return{value:l,rest:a}}}const nf=/^(\d+)(th|st|nd|rd)?/i,rf=/\d+/i,sf={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},af={any:[/^b/i,/^(a|c)/i]},lf={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cf={any:[/1/i,/2/i,/3/i,/4/i]},df={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},uf={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},pf={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},hf={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ff={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gf={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mf={ordinalNumber:of({matchPattern:nf,parsePattern:rf,valueCallback:e=>parseInt(e,10)}),era:Wt({matchPatterns:sf,defaultMatchWidth:"wide",parsePatterns:af,defaultParseWidth:"any"}),quarter:Wt({matchPatterns:lf,defaultMatchWidth:"wide",parsePatterns:cf,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wt({matchPatterns:df,defaultMatchWidth:"wide",parsePatterns:uf,defaultParseWidth:"any"}),day:Wt({matchPatterns:pf,defaultMatchWidth:"wide",parsePatterns:hf,defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:ff,defaultMatchWidth:"any",parsePatterns:gf,defaultParseWidth:"any"})},hi={code:"en-US",formatDistance:Lh,formatLong:Vh,formatRelative:Uh,localize:Qh,match:mf,options:{weekStartsOn:0,firstWeekContainsDate:1}},Dr=5,bf=4;function xf(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,Dr*7-1);return t.getMonth(e)===t.getMonth(s)?Dr:bf}function fi(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function yf(e,t){const o=fi(e,t),n=xf(e,t);return t.addDays(o,n*7-1)}class at{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?de.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var l;return(l=this.overrides)!=null&&l.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new de(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):X.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):X.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):X.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):X.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):X.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):X.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):X.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):yf(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):X.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):X.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):X.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):X.endOfYear(n)},this.format=(n,r,s)=>{var a;const l=(a=this.overrides)!=null&&a.format?this.overrides.format(n,r,this.options):X.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(l):l},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):X.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):X.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):X.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):X.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):X.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):X.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):X.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):X.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):X.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):X.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):X.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):X.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):X.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):X.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):fi(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):X.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):X.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):X.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):X.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):X.startOfYear(n)},this.options={locale:hi,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Je=new at;class gi{constructor(t,o,n=Je){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class vf{constructor(t,o){this.date=t,this.weeks=o}}class kf{constructor(t,o){this.days=o,this.weekNumber=t}}function wf(e){return d.createElement("button",{...e})}function Cf(e){return d.createElement("span",{...e})}function $f(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Sf(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function jf(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var B;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(B||(B={}));var le;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(le||(le={}));var Le;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Le||(Le={}));var ge;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ge||(ge={}));function If(e){const{options:t,className:o,components:n,classNames:r,...s}=e,l=[r[B.Dropdown],o].join(" "),a=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[B.DropdownRoot]},d.createElement(n.Select,{className:l,...s},t==null?void 0:t.map(({value:u,label:p,disabled:h})=>d.createElement(n.Option,{key:u,value:u,disabled:h},p))),d.createElement("span",{className:r[B.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[B.Chevron]})))}function Df(e){return d.createElement("div",{...e})}function _f(e){return d.createElement("div",{...e})}function Tf(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function Ef(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function zf(e){return d.createElement("table",{...e})}function Mf(e){return d.createElement("div",{...e})}const mi=d.createContext(void 0);function Qt(){const e=d.useContext(mi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Of(e){const{components:t}=Qt();return d.createElement(t.Dropdown,{...e})}function Rf(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:l,classNames:a,labels:{labelPrevious:u,labelNext:p}}=Qt(),h=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),f=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(l.PreviousMonthButton,{type:"button",className:a[B.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:f},d.createElement(l.Chevron,{disabled:n?void 0:!0,className:a[B.Chevron],orientation:"left"})),d.createElement(l.NextMonthButton,{type:"button",className:a[B.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":p(r),onClick:h},d.createElement(l.Chevron,{disabled:r?void 0:!0,orientation:"right",className:a[B.Chevron]})))}function Nf(e){const{components:t}=Qt();return d.createElement(t.Button,{...e})}function Ff(e){return d.createElement("option",{...e})}function Af(e){const{components:t}=Qt();return d.createElement(t.Button,{...e})}function Lf(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function Bf(e){return d.createElement("select",{...e})}function Wf(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function Pf(e){return d.createElement("th",{...e})}function Vf(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function Hf(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function Uf(e){return d.createElement("th",{...e})}function Gf(e){return d.createElement("tbody",{...e})}function Kf(e){const{components:t}=Qt();return d.createElement(t.Dropdown,{...e})}const Yf=Object.freeze(Object.defineProperty({__proto__:null,Button:wf,CaptionLabel:Cf,Chevron:$f,Day:Sf,DayButton:jf,Dropdown:If,DropdownNav:Df,Footer:_f,Month:Tf,MonthCaption:Ef,MonthGrid:zf,Months:Mf,MonthsDropdown:Of,Nav:Rf,NextMonthButton:Nf,Option:Ff,PreviousMonthButton:Af,Root:Lf,Select:Bf,Week:Wf,WeekNumber:Hf,WeekNumberHeader:Uf,Weekday:Pf,Weekdays:Vf,Weeks:Gf,YearsDropdown:Kf},Symbol.toStringTag,{value:"Module"}));function rt(e,t,o=!1,n=Je){let{from:r,to:s}=e;const{differenceInCalendarDays:l,isSameDay:a}=n;return r&&s?(l(s,r)<0&&([r,s]=[s,r]),l(t,r)>=(o?1:0)&&l(s,t)>=(o?1:0)):!o&&s?a(s,t):!o&&r?a(r,t):!1}function bi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function On(e){return!!(e&&typeof e=="object"&&"from"in e)}function xi(e){return!!(e&&typeof e=="object"&&"after"in e)}function yi(e){return!!(e&&typeof e=="object"&&"before"in e)}function vi(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ki(e,t){return Array.isArray(e)&&e.every(t.isDate)}function st(e,t,o=Je){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:l}=o;return n.some(a=>{if(typeof a=="boolean")return a;if(o.isDate(a))return r(e,a);if(ki(a,o))return a.includes(e);if(On(a))return rt(a,e,!1,o);if(vi(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(bi(a)){const u=s(a.before,e),p=s(a.after,e),h=u>0,f=p<0;return l(a.before,a.after)?f&&h:h||f}return xi(a)?s(e,a.after)>0:yi(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function qf(e,t,o,n,r){const{disabled:s,hidden:l,modifiers:a,showOutsideDays:u,broadcastCalendar:p,today:h}=t,{isSameDay:f,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:v}=r,w=o&&x(o),$=n&&y(n),k={[le.focused]:[],[le.outside]:[],[le.disabled]:[],[le.hidden]:[],[le.today]:[]},S={};for(const C of e){const{date:D,displayMonth:j}=C,I=!!(j&&!m(D,j)),O=!!(w&&b(D,w)),V=!!($&&v(D,$)),P=!!(s&&st(D,s,r)),N=!!(l&&st(D,l,r))||O||V||!p&&!u&&I||p&&u===!1&&I,J=f(D,h??r.today());I&&k.outside.push(C),P&&k.disabled.push(C),N&&k.hidden.push(C),J&&k.today.push(C),a&&Object.keys(a).forEach(ee=>{const te=a==null?void 0:a[ee];te&&st(D,te,r)&&(S[ee]?S[ee].push(C):S[ee]=[C])})}return C=>{const D={[le.focused]:!1,[le.disabled]:!1,[le.hidden]:!1,[le.outside]:!1,[le.today]:!1},j={};for(const I in k){const O=k[I];D[I]=O.some(V=>V===C)}for(const I in S)j[I]=S[I].some(O=>O===C);return{...D,...j}}}function Zf(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[le[s]]?r.push(t[le[s]]):t[Le[s]]&&r.push(t[Le[s]]),r),[t[B.Day]])}function Xf(e){return{...Yf,...e}}function Jf(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function Qf(){const e={};for(const t in B)e[B[t]]=`rdp-${B[t]}`;for(const t in le)e[le[t]]=`rdp-${le[t]}`;for(const t in Le)e[Le[t]]=`rdp-${Le[t]}`;for(const t in ge)e[ge[t]]=`rdp-${ge[t]}`;return e}function wi(e,t,o){return(o??new at(t)).format(e,"LLLL y")}const eg=wi;function tg(e,t,o){return(o??new at(t)).format(e,"d")}function og(e,t=Je){return t.format(e,"LLLL")}function ng(e,t,o){return(o??new at(t)).format(e,"cccccc")}function rg(e,t=Je){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function sg(){return""}function Ci(e,t=Je){return t.format(e,"yyyy")}const ig=Ci,ag=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:wi,formatDay:tg,formatMonthCaption:eg,formatMonthDropdown:og,formatWeekNumber:rg,formatWeekNumberHeader:sg,formatWeekdayName:ng,formatYearCaption:ig,formatYearDropdown:Ci},Symbol.toStringTag,{value:"Module"}));function lg(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ag,...e}}function cg(e,t,o,n,r){const{startOfMonth:s,startOfYear:l,endOfYear:a,eachMonthOfInterval:u,getMonth:p}=r;return u({start:l(e),end:a(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=p(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function dg(e,t={},o={}){let n={...t==null?void 0:t[B.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function ug(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let l=0;l<7;l++){const a=e.addDays(r,l);s.push(a)}return s}function pg(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:l,addYears:a,getYear:u,isBefore:p,isSameYear:h}=n,f=s(e),m=l(t),x=[];let b=f;for(;p(b,m)||h(b,m);)x.push(b),b=a(b,1);return r&&x.reverse(),x.map(y=>{const v=o.formatYearDropdown(y,n);return{value:u(y),label:v,disabled:!1}})}function $i(e,t,o,n){let r=(n??new at(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const hg=$i;function Si(e,t,o){return(o??new at(t)).format(e,"LLLL y")}const fg=Si;function gg(e,t,o,n){let r=(n??new at(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function mg(e){return"Choose the Month"}function bg(){return""}function xg(e){return"Go to the Next Month"}function yg(e){return"Go to the Previous Month"}function vg(e,t,o){return(o??new at(t)).format(e,"cccc")}function kg(e,t){return`Week ${e}`}function wg(e){return"Week Number"}function Cg(e){return"Choose the Year"}const $g=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:fg,labelDay:hg,labelDayButton:$i,labelGrid:Si,labelGridcell:gg,labelMonthDropdown:mg,labelNav:bg,labelNext:xg,labelPrevious:yg,labelWeekNumber:kg,labelWeekNumberHeader:wg,labelWeekday:vg,labelYearDropdown:Cg},Symbol.toStringTag,{value:"Module"})),eo=e=>e instanceof HTMLElement?e:null,Go=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Sg=e=>eo(e.querySelector("[data-animated-month]")),Ko=e=>eo(e.querySelector("[data-animated-caption]")),Yo=e=>eo(e.querySelector("[data-animated-weeks]")),jg=e=>eo(e.querySelector("[data-animated-nav]")),Ig=e=>eo(e.querySelector("[data-animated-weekdays]"));function Dg(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const l=d.useRef(null),a=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const p=a.current;if(a.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||p.length===0||n.length!==p.length)return;const h=s.isSameMonth(n[0].date,p[0].date),f=s.isAfter(n[0].date,p[0].date),m=f?o[ge.caption_after_enter]:o[ge.caption_before_enter],x=f?o[ge.weeks_after_enter]:o[ge.weeks_before_enter],b=l.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Go(y).forEach(k=>{if(!(k instanceof HTMLElement))return;const S=Sg(k);S&&k.contains(S)&&k.removeChild(S);const C=Ko(k);C&&C.classList.remove(m);const D=Yo(k);D&&D.classList.remove(x)}),l.current=y):l.current=null,u.current||h||r)return;const v=b instanceof HTMLElement?Go(b):[],w=Go(e.current);if(w!=null&&w.every($=>$ instanceof HTMLElement)&&v&&v.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=jg(e.current);$&&($.style.zIndex="1"),w.forEach((k,S)=>{const C=v[S];if(!C)return;k.style.position="relative",k.style.overflow="hidden";const D=Ko(k);D&&D.classList.add(m);const j=Yo(k);j&&j.classList.add(x);const I=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),D&&D.classList.remove(m),j&&j.classList.remove(x),k.style.position="",k.style.overflow="",k.contains(C)&&k.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const O=Ig(C);O&&(O.style.opacity="0");const V=Ko(C);V&&(V.classList.add(f?o[ge.caption_before_exit]:o[ge.caption_after_exit]),V.addEventListener("animationend",I));const P=Yo(C);P&&P.classList.add(f?o[ge.weeks_before_exit]:o[ge.weeks_after_exit]),k.insertBefore(C,k.firstChild)})}})}function _g(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:l,fixedWeeks:a,broadcastCalendar:u}=o??{},{addDays:p,differenceInCalendarDays:h,differenceInCalendarMonths:f,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:$,startOfWeek:k}=n,S=u?w(r,n):l?$(r):k(r),C=u?m(s):l?x(b(s)):y(b(s)),D=h(C,S),j=f(s,r)+1,I=[];for(let P=0;P<=D;P++){const N=p(S,P);if(t&&v(N,t))break;I.push(N)}const V=(u?35:42)*j;if(a&&I.length<V){const P=V-I.length;for(let N=0;N<P;N++){const J=p(I[I.length-1],1);I.push(J)}}return I}function Tg(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,l)=>s.concat(l.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function Eg(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let l=0;l<r;l++){const a=n.addMonths(e,l);if(t&&a>t)break;s.push(a)}return s}function _r(e,t,o,n){const{month:r,defaultMonth:s,today:l=n.today(),numberOfMonths:a=1}=e;let u=r||s||l;const{differenceInCalendarMonths:p,addMonths:h,startOfMonth:f}=n;if(o&&p(o,u)<a-1){const m=-1*(a-1);u=h(o,m)}return t&&p(u,t)<0&&(u=t),f(u)}function zg(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:l,endOfMonth:a,endOfWeek:u,getISOWeek:p,getWeek:h,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,v)=>{const w=o.broadcastCalendar?f(v,n):o.ISOWeek?m(v):x(v),$=o.broadcastCalendar?s(v):o.ISOWeek?l(a(v)):u(a(v)),k=t.filter(j=>j>=w&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&k.length<S){const j=t.filter(I=>{const O=S-k.length;return I>$&&I<=r($,O)});k.push(...j)}const C=k.reduce((j,I)=>{const O=o.ISOWeek?p(I):h(I),V=j.find(N=>N.weekNumber===O),P=new gi(I,v,n);return V?V.days.push(P):j.push(new kf(O,[P])),j},[]),D=new vf(v,C);return y.push(D),y},[]);return o.reverseMonths?b.reverse():b}function Mg(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:l,endOfMonth:a,addYears:u,endOfYear:p,newDate:h,today:f}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=h(x,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=l(o):m?o=h(m,0,1):!o&&v&&(o=r(u(e.today??f(),-100))),n?n=a(n):x?n=h(x,11,31):!n&&v&&(n=p(e.today??f())),[o&&s(o),n&&s(n)]}function Og(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:l,addMonths:a,differenceInCalendarMonths:u}=n,p=r?s:1,h=l(e);if(!t)return a(h,p);if(!(u(t,e)<s))return a(h,p)}function Rg(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:l,addMonths:a,differenceInCalendarMonths:u}=n,p=r?s??1:1,h=l(e);if(!t)return a(h,-p);if(!(u(h,t)<=0))return a(h,-p)}function Ng(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function So(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function Fg(e,t){const[o,n]=Mg(e,t),{startOfMonth:r,endOfMonth:s}=t,l=_r(e,o,n,t),[a,u]=So(l,e.month?l:void 0);d.useEffect(()=>{const D=_r(e,o,n,t);u(D)},[e.timeZone]);const p=Eg(a,n,e,t),h=_g(p,e.endMonth?s(e.endMonth):void 0,e,t),f=zg(p,h,e,t),m=Ng(f),x=Tg(f),b=Rg(a,o,e,t),y=Og(a,n,e,t),{disableNavigation:v,onMonthChange:w}=e,$=D=>m.some(j=>j.days.some(I=>I.isEqualTo(D))),k=D=>{if(v)return;let j=r(D);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),w==null||w(j)};return{months:f,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:k,goToDay:D=>{$(D)||k(D.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function Tr(e){return!e[le.disabled]&&!e[le.hidden]&&!e[le.outside]}function Ag(e,t,o,n){let r,s=-1;for(const l of e){const a=t(l);Tr(a)&&(a[le.focused]&&s<Ge.FocusedModifier?(r=l,s=Ge.FocusedModifier):n!=null&&n.isEqualTo(l)&&s<Ge.LastFocused?(r=l,s=Ge.LastFocused):o(l.date)&&s<Ge.Selected?(r=l,s=Ge.Selected):a[le.today]&&s<Ge.Today&&(r=l,s=Ge.Today))}return r||(r=e.find(l=>Tr(t(l)))),r}function Lg(e,t,o,n,r,s,l){const{ISOWeek:a,broadcastCalendar:u}=s,{addDays:p,addMonths:h,addWeeks:f,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:v,min:w,startOfBroadcastWeek:$,startOfISOWeek:k,startOfWeek:S}=l;let D={day:p,week:f,month:h,year:m,startOfWeek:j=>u?$(j,l):a?k(j):S(j),endOfWeek:j=>u?x(j):a?b(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?D=v([n,D]):t==="after"&&r&&(D=w([r,D])),D}function ji(e,t,o,n,r,s,l,a=0){if(a>365)return;const u=Lg(e,t,o.date,n,r,s,l),p=!!(s.disabled&&st(u,s.disabled,l)),h=!!(s.hidden&&st(u,s.hidden,l)),f=u,m=new gi(u,f,l);return!p&&!h?m:ji(e,t,m,n,r,s,l,a+1)}function Bg(e,t,o,n,r){const{autoFocus:s}=e,[l,a]=d.useState(),u=Ag(t.days,o,n||(()=>!1),l),[p,h]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:h,focused:p,blur:()=>{a(p),h(void 0)},moveFocus:(y,v)=>{if(!p)return;const w=ji(y,v,p,t.navStart,t.navEnd,e,r);w&&(t.goToDay(w),h(w))}}}function Wg(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=So(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t,p=x=>(a==null?void 0:a.some(b=>u(b,x)))??!1,{min:h,max:f}=e;return{selected:a,select:(x,b,y)=>{let v=[...a??[]];if(p(x)){if((a==null?void 0:a.length)===h||n&&(a==null?void 0:a.length)===1)return;v=a==null?void 0:a.filter(w=>!u(w,x))}else(a==null?void 0:a.length)===f?v=[x]:v=[...v,x];return r||l(v),r==null||r(v,x,b,y),v},isSelected:p}}function Pg(e,t,o=0,n=0,r=!1,s=Je){const{from:l,to:a}=t||{},{isSameDay:u,isAfter:p,isBefore:h}=s;let f;if(!l&&!a)f={from:e,to:o>0?void 0:e};else if(l&&!a)u(l,e)?o===0?f={from:l,to:e}:r?f={from:l,to:void 0}:f=void 0:h(e,l)?f={from:e,to:l}:f={from:l,to:e};else if(l&&a)if(u(l,e)&&u(a,e))r?f={from:l,to:a}:f=void 0;else if(u(l,e))f={from:l,to:o>0?void 0:e};else if(u(a,e))f={from:e,to:o>0?void 0:e};else if(h(e,l))f={from:e,to:a};else if(p(e,l))f={from:l,to:e};else if(p(e,a))f={from:l,to:e};else throw new Error("Invalid range");if(f!=null&&f.from&&(f!=null&&f.to)){const m=s.differenceInCalendarDays(f.to,f.from);n>0&&m>n?f={from:e,to:void 0}:o>1&&m<o&&(f={from:e,to:void 0})}return f}function Vg(e,t,o=Je){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),l=Math.min(s,6);for(let a=0;a<=l;a++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function Er(e,t,o=Je){return rt(e,t.from,!1,o)||rt(e,t.to,!1,o)||rt(t,e.from,!1,o)||rt(t,e.to,!1,o)}function Hg(e,t,o=Je){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:o.isDate(a)?rt(e,a,!1,o):ki(a,o)?a.some(u=>rt(e,u,!1,o)):On(a)?a.from&&a.to?Er(e,{from:a.from,to:a.to},o):!1:vi(a)?Vg(e,a.dayOfWeek,o):bi(a)?o.isAfter(a.before,a.after)?Er(e,{from:o.addDays(a.after,1),to:o.addDays(a.before,-1)},o):st(e.from,a,o)||st(e.to,a,o):xi(a)||yi(a)?st(e.from,a,o)||st(e.to,a,o):!1))return!0;const l=n.filter(a=>typeof a=="function");if(l.length){let a=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let p=0;p<=u;p++){if(l.some(h=>h(a)))return!0;a=o.addDays(a,1)}}return!1}function Ug(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:l}=e,[a,u]=So(r,l?r:void 0),p=l?r:a;return{selected:p,select:(m,x,b)=>{const{min:y,max:v}=e,w=m?Pg(m,p,y,v,s,t):void 0;return n&&o&&(w!=null&&w.from)&&w.to&&Hg({from:w.from,to:w.to},o,t)&&(w.from=m,w.to=void 0),l||u(w),l==null||l(w,m,x,b),w},isSelected:m=>p&&rt(p,m,!1,t)}}function Gg(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=So(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t;return{selected:a,select:(f,m,x)=>{let b=f;return!n&&a&&a&&u(f,a)&&(b=void 0),r||l(b),r==null||r(b,f,m,x),b},isSelected:f=>a?u(a,f):!1}}function Kg(e,t){const o=Gg(e,t),n=Wg(e,t),r=Ug(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function Yg(e){var ur;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new de(t.today,t.timeZone)),t.month&&(t.month=new de(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new de(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new de(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new de(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new de(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(ur=t.selected)==null?void 0:ur.map(G=>new de(G,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new de(t.selected.from,t.timeZone):void 0,to:t.selected.to?new de(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:l,classNames:a}=d.useMemo(()=>{const G={...hi,...t.locale};return{dateLib:new at({locale:G,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Xf(t.components),formatters:lg(t.formatters),labels:{...$g,...t.labels},locale:G,classNames:{...Qf(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:p,navLayout:h,numberOfMonths:f=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:$,onPrevClick:k,showWeekNumber:S,styles:C}=t,{formatCaption:D,formatDay:j,formatMonthDropdown:I,formatWeekNumber:O,formatWeekNumberHeader:V,formatWeekdayName:P,formatYearDropdown:N}=n,J=Fg(t,s),{days:ee,months:te,navStart:Ie,navEnd:Ve,previousMonth:ce,nextMonth:Y,goToMonth:q}=J,U=qf(ee,t,Ie,Ve,s),{isSelected:Q,select:De,selected:ne}=Kg(t,s)??{},{blur:_e,focused:tt,isFocusTarget:Sa,moveFocus:ar,setFocused:ro}=Bg(t,J,U,Q??(()=>!1),s),{labelDayButton:ja,labelGridcell:Ia,labelGrid:Da,labelMonthDropdown:_a,labelNav:lr,labelPrevious:Ta,labelNext:Ea,labelWeekday:za,labelWeekNumber:Ma,labelWeekNumberHeader:Oa,labelYearDropdown:Ra}=r,Na=d.useMemo(()=>ug(s,t.ISOWeek),[s,t.ISOWeek]),cr=p!==void 0||x!==void 0,Oo=d.useCallback(()=>{ce&&(q(ce),k==null||k(ce))},[ce,q,k]),Ro=d.useCallback(()=>{Y&&(q(Y),$==null||$(Y))},[q,Y,$]),Fa=d.useCallback((G,re)=>H=>{H.preventDefault(),H.stopPropagation(),ro(G),De==null||De(G.date,re,H),x==null||x(G.date,re,H)},[De,x,ro]),Aa=d.useCallback((G,re)=>H=>{ro(G),b==null||b(G.date,re,H)},[b,ro]),La=d.useCallback((G,re)=>H=>{_e(),m==null||m(G.date,re,H)},[_e,m]),Ba=d.useCallback((G,re)=>H=>{const se={ArrowLeft:[H.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[H.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[H.shiftKey?"year":"week","after"],ArrowUp:[H.shiftKey?"year":"week","before"],PageUp:[H.shiftKey?"year":"month","before"],PageDown:[H.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(se[H.key]){H.preventDefault(),H.stopPropagation();const[be,Z]=se[H.key];ar(be,Z)}y==null||y(G.date,re,H)},[ar,y,t.dir]),Wa=d.useCallback((G,re)=>H=>{v==null||v(G.date,re,H)},[v]),Pa=d.useCallback((G,re)=>H=>{w==null||w(G.date,re,H)},[w]),Va=d.useCallback(G=>re=>{const H=Number(re.target.value),se=s.setMonth(s.startOfMonth(G),H);q(se)},[s,q]),Ha=d.useCallback(G=>re=>{const H=Number(re.target.value),se=s.setYear(s.startOfMonth(G),H);q(se)},[s,q]),{className:Ua,style:Ga}=d.useMemo(()=>({className:[a[B.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[B.Root],...t.style}}),[a,t.className,t.style,C]),Ka=Jf(t),dr=d.useRef(null);Dg(dr,!!t.animate,{classNames:a,months:te,focused:tt,dateLib:s});const Ya={dayPickerProps:t,selected:ne,select:De,isSelected:Q,months:te,nextMonth:Y,previousMonth:ce,goToMonth:q,getModifiers:U,components:o,classNames:a,styles:C,labels:r,formatters:n};return d.createElement(mi.Provider,{value:Ya},d.createElement(o.Root,{rootRef:t.animate?dr:void 0,className:Ua,style:Ga,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Ka},d.createElement(o.Months,{className:a[B.Months],style:C==null?void 0:C[B.Months]},!t.hideNavigation&&!h&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[B.Nav],style:C==null?void 0:C[B.Nav],"aria-label":lr(),onPreviousClick:Oo,onNextClick:Ro,previousMonth:ce,nextMonth:Y}),te.map((G,re)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:a[B.Month],style:C==null?void 0:C[B.Month],key:re,displayIndex:re,calendarMonth:G},h==="around"&&!t.hideNavigation&&re===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:a[B.PreviousMonthButton],tabIndex:ce?void 0:-1,"aria-disabled":ce?void 0:!0,"aria-label":Ta(ce),onClick:Oo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ce?void 0:!0,className:a[B.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[B.MonthCaption],style:C==null?void 0:C[B.MonthCaption],calendarMonth:G,displayIndex:re},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:a[B.Dropdowns],style:C==null?void 0:C[B.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:a[B.MonthsDropdown],"aria-label":_a(),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Va(G.date),options:cg(G.date,Ie,Ve,n,s),style:C==null?void 0:C[B.Dropdown],value:s.getMonth(G.date)}):d.createElement("span",null,I(G.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:a[B.YearsDropdown],"aria-label":Ra(s.options),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Ha(G.date),options:pg(Ie,Ve,n,s,!!t.reverseYears),style:C==null?void 0:C[B.Dropdown],value:s.getYear(G.date)}):d.createElement("span",null,N(G.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(G.date,s.options,s))):d.createElement(o.CaptionLabel,{className:a[B.CaptionLabel],role:"status","aria-live":"polite"},D(G.date,s.options,s))),h==="around"&&!t.hideNavigation&&re===f-1&&d.createElement(o.NextMonthButton,{type:"button",className:a[B.NextMonthButton],tabIndex:Y?void 0:-1,"aria-disabled":Y?void 0:!0,"aria-label":Ea(Y),onClick:Ro,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:Y?void 0:!0,className:a[B.Chevron],orientation:t.dir==="rtl"?"left":"right"})),re===f-1&&h==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[B.Nav],style:C==null?void 0:C[B.Nav],"aria-label":lr(),onPreviousClick:Oo,onNextClick:Ro,previousMonth:ce,nextMonth:Y}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Da(G.date,s.options,s)||void 0,className:a[B.MonthGrid],style:C==null?void 0:C[B.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[B.Weekdays],style:C==null?void 0:C[B.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":Oa(s.options),className:a[B.WeekNumberHeader],style:C==null?void 0:C[B.WeekNumberHeader],scope:"col"},V()),Na.map(H=>d.createElement(o.Weekday,{"aria-label":za(H,s.options,s),className:a[B.Weekday],key:String(H),style:C==null?void 0:C[B.Weekday],scope:"col"},P(H,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[B.Weeks],style:C==null?void 0:C[B.Weeks]},G.weeks.map(H=>d.createElement(o.Week,{className:a[B.Week],key:H.weekNumber,style:C==null?void 0:C[B.Week],week:H},S&&d.createElement(o.WeekNumber,{week:H,style:C==null?void 0:C[B.WeekNumber],"aria-label":Ma(H.weekNumber,{locale:l}),className:a[B.WeekNumber],scope:"row",role:"rowheader"},O(H.weekNumber,s)),H.days.map(se=>{const{date:be}=se,Z=U(se);if(Z[le.focused]=!Z.hidden&&!!(tt!=null&&tt.isEqualTo(se)),Z[Le.selected]=(Q==null?void 0:Q(be))||Z.selected,On(ne)){const{from:No,to:Fo}=ne;Z[Le.range_start]=!!(No&&Fo&&s.isSameDay(be,No)),Z[Le.range_end]=!!(No&&Fo&&s.isSameDay(be,Fo)),Z[Le.range_middle]=rt(ne,be,!0,s)}const qa=dg(Z,C,t.modifiersStyles),Za=Zf(Z,a,t.modifiersClassNames),Xa=!cr&&!Z.hidden?Ia(be,Z,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(be,"yyyy-MM-dd")}_${s.format(se.displayMonth,"yyyy-MM")}`,day:se,modifiers:Z,className:Za.join(" "),style:qa,role:"gridcell","aria-selected":Z.selected||void 0,"aria-label":Xa,"data-day":s.format(be,"yyyy-MM-dd"),"data-month":se.outside?s.format(be,"yyyy-MM"):void 0,"data-selected":Z.selected||void 0,"data-disabled":Z.disabled||void 0,"data-hidden":Z.hidden||void 0,"data-outside":se.outside||void 0,"data-focused":Z.focused||void 0,"data-today":Z.today||void 0},!Z.hidden&&cr?d.createElement(o.DayButton,{className:a[B.DayButton],style:C==null?void 0:C[B.DayButton],type:"button",day:se,modifiers:Z,disabled:Z.disabled||void 0,tabIndex:Sa(se)?0:-1,"aria-label":ja(be,Z,s.options,s),onClick:Fa(se,Z),onBlur:La(se,Z),onFocus:Aa(se,Z),onKeyDown:Ba(se,Z),onMouseEnter:Wa(se,Z),onMouseLeave:Pa(se,Z)},j(be,s.options,s)):!Z.hidden&&j(se.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:a[B.Footer],style:C==null?void 0:C[B.Footer],role:"status","aria-live":"polite"},t.footer)))}const qg=d.memo(({...e})=>i.jsx(Zg,{mode:"single",...e})),Zg=g(Yg)`
|
|
2267
|
-
font-family: ${
|
|
2268
|
-
`,
|
|
2292
|
+
`;function Ph(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Ho={},Ht={};function bt(e,t){try{const n=(Ho[e]||(Ho[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Ht?Ht[n]:Ir(n,n.split(":"))}catch{if(e in Ht)return Ht[e];const o=e==null?void 0:e.match(Vh);return o?Ir(e,o.slice(1)):NaN}}const Vh=/([+-]\d\d):?(\d\d)?/;function Ir(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Ht[e]=o*60+n>0?o*60+n+r:o*60-n-r}class qe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(bt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),xi(this),ln(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new qe(...o,t):new qe(Date.now(),t)}withTimeZone(t){return new qe(+this,t)}getTimezoneOffset(){const t=-bt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ln(this),+this}[Symbol.for("constructDateFrom")](t){return new qe(+new Date(t),this.timeZone)}}const Dr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Dr.test(e))return;const t=e.replace(Dr,"$1UTC");qe.prototype[t]&&(e.startsWith("get")?qe.prototype[e]=function(){return this.internal[t]()}:(qe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Hh(this),+this},qe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ln(this),+this}))});function ln(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-bt(e.timeZone,e)*60))}function Hh(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),xi(e)}function xi(e){const t=bt(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),c=r-s,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();c&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+c);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const p=new Date(+e);p.setUTCSeconds(0);const h=r>0?p.getSeconds():(p.getSeconds()-60)%60,g=Math.round(-(bt(e.timeZone,e)*60))%60;(g||h)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+g),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+g+h));const m=bt(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,v=x!==o,w=y-u;if(v&&w){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w);const $=bt(e.timeZone,e),k=$>0?Math.floor($):Math.ceil($),j=x-k;j&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+j),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+j))}}class de extends qe{static tz(t,...o){return o.length?new de(...o,t):new de(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${Ph(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new de(+this,t)}[Symbol.for("constructDateFrom")](t){return new de(+new Date(t),this.timeZone)}}const Uh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gh=(e,t,o)=>{let n;const r=Uh[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Uo(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const Kh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},qh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zh={date:Uo({formats:Kh,defaultWidth:"full"}),time:Uo({formats:Yh,defaultWidth:"full"}),dateTime:Uo({formats:qh,defaultWidth:"full"})},Xh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jh=(e,t,o,n)=>Xh[e];function Bt(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const c=e.defaultFormattingWidth||e.defaultWidth,a=o!=null&&o.width?String(o.width):c;r=e.formattingValues[a]||e.formattingValues[c]}else{const c=e.defaultWidth,a=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[a]||e.values[c]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const Qh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},og={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ng={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},rg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},sg=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},ig={ordinalNumber:sg,era:Bt({values:Qh,defaultWidth:"wide"}),quarter:Bt({values:eg,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bt({values:tg,defaultWidth:"wide"}),day:Bt({values:og,defaultWidth:"wide"}),dayPeriod:Bt({values:ng,defaultWidth:"wide",formattingValues:rg,defaultFormattingWidth:"wide"})};function Wt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const c=s[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?lg(a,g=>g.test(c)):ag(a,g=>g.test(c));let p;p=e.valueCallback?e.valueCallback(u):u,p=o.valueCallback?o.valueCallback(p):p;const h=t.slice(c.length);return{value:p,rest:h}}}function ag(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function lg(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function cg(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let c=e.valueCallback?e.valueCallback(s[0]):s[0];c=o.valueCallback?o.valueCallback(c):c;const a=t.slice(r.length);return{value:c,rest:a}}}const dg=/^(\d+)(th|st|nd|rd)?/i,ug=/\d+/i,pg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},hg={any:[/^b/i,/^(a|c)/i]},gg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fg={any:[/1/i,/2/i,/3/i,/4/i]},mg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},xg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},yg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},vg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},kg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},wg={ordinalNumber:cg({matchPattern:dg,parsePattern:ug,valueCallback:e=>parseInt(e,10)}),era:Wt({matchPatterns:pg,defaultMatchWidth:"wide",parsePatterns:hg,defaultParseWidth:"any"}),quarter:Wt({matchPatterns:gg,defaultMatchWidth:"wide",parsePatterns:fg,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wt({matchPatterns:mg,defaultMatchWidth:"wide",parsePatterns:bg,defaultParseWidth:"any"}),day:Wt({matchPatterns:xg,defaultMatchWidth:"wide",parsePatterns:yg,defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:vg,defaultMatchWidth:"any",parsePatterns:kg,defaultParseWidth:"any"})},yi={code:"en-US",formatDistance:Gh,formatLong:Zh,formatRelative:Jh,localize:ig,match:wg,options:{weekStartsOn:0,firstWeekContainsDate:1}},_r=5,Cg=4;function $g(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,_r*7-1);return t.getMonth(e)===t.getMonth(s)?_r:Cg}function vi(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function jg(e,t){const o=vi(e,t),n=$g(e,t);return t.addDays(o,n*7-1)}class lt{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?de.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var c;return(c=this.overrides)!=null&&c.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new de(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):X.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):X.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):X.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):X.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):X.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):X.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):X.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):jg(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):X.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):X.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):X.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):X.endOfYear(n)},this.format=(n,r,s)=>{var a;const c=(a=this.overrides)!=null&&a.format?this.overrides.format(n,r,this.options):X.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(c):c},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):X.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):X.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):X.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):X.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):X.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):X.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):X.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):X.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):X.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):X.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):X.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):X.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):X.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):X.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):vi(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):X.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):X.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):X.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):X.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):X.startOfYear(n)},this.options={locale:yi,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Je=new lt;class ki{constructor(t,o,n=Je){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Sg{constructor(t,o){this.date=t,this.weeks=o}}class Ig{constructor(t,o){this.days=o,this.weekNumber=t}}function Dg(e){return d.createElement("button",{...e})}function _g(e){return d.createElement("span",{...e})}function Tg(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Eg(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function zg(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var B;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(B||(B={}));var le;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(le||(le={}));var Le;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Le||(Le={}));var me;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(me||(me={}));function Mg(e){const{options:t,className:o,components:n,classNames:r,...s}=e,c=[r[B.Dropdown],o].join(" "),a=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[B.DropdownRoot]},d.createElement(n.Select,{className:c,...s},t==null?void 0:t.map(({value:u,label:p,disabled:h})=>d.createElement(n.Option,{key:u,value:u,disabled:h},p))),d.createElement("span",{className:r[B.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[B.Chevron]})))}function Og(e){return d.createElement("div",{...e})}function Rg(e){return d.createElement("div",{...e})}function Ng(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function Fg(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function Ag(e){return d.createElement("table",{...e})}function Lg(e){return d.createElement("div",{...e})}const wi=d.createContext(void 0);function to(){const e=d.useContext(wi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Bg(e){const{components:t}=to();return d.createElement(t.Dropdown,{...e})}function Wg(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:c,classNames:a,labels:{labelPrevious:u,labelNext:p}}=to(),h=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),g=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(c.PreviousMonthButton,{type:"button",className:a[B.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:g},d.createElement(c.Chevron,{disabled:n?void 0:!0,className:a[B.Chevron],orientation:"left"})),d.createElement(c.NextMonthButton,{type:"button",className:a[B.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":p(r),onClick:h},d.createElement(c.Chevron,{disabled:r?void 0:!0,orientation:"right",className:a[B.Chevron]})))}function Pg(e){const{components:t}=to();return d.createElement(t.Button,{...e})}function Vg(e){return d.createElement("option",{...e})}function Hg(e){const{components:t}=to();return d.createElement(t.Button,{...e})}function Ug(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function Gg(e){return d.createElement("select",{...e})}function Kg(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function Yg(e){return d.createElement("th",{...e})}function qg(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function Zg(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function Xg(e){return d.createElement("th",{...e})}function Jg(e){return d.createElement("tbody",{...e})}function Qg(e){const{components:t}=to();return d.createElement(t.Dropdown,{...e})}const ef=Object.freeze(Object.defineProperty({__proto__:null,Button:Dg,CaptionLabel:_g,Chevron:Tg,Day:Eg,DayButton:zg,Dropdown:Mg,DropdownNav:Og,Footer:Rg,Month:Ng,MonthCaption:Fg,MonthGrid:Ag,Months:Lg,MonthsDropdown:Bg,Nav:Wg,NextMonthButton:Pg,Option:Vg,PreviousMonthButton:Hg,Root:Ug,Select:Gg,Week:Kg,WeekNumber:Zg,WeekNumberHeader:Xg,Weekday:Yg,Weekdays:qg,Weeks:Jg,YearsDropdown:Qg},Symbol.toStringTag,{value:"Module"}));function rt(e,t,o=!1,n=Je){let{from:r,to:s}=e;const{differenceInCalendarDays:c,isSameDay:a}=n;return r&&s?(c(s,r)<0&&([r,s]=[s,r]),c(t,r)>=(o?1:0)&&c(s,t)>=(o?1:0)):!o&&s?a(s,t):!o&&r?a(r,t):!1}function Ci(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function On(e){return!!(e&&typeof e=="object"&&"from"in e)}function $i(e){return!!(e&&typeof e=="object"&&"after"in e)}function ji(e){return!!(e&&typeof e=="object"&&"before"in e)}function Si(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ii(e,t){return Array.isArray(e)&&e.every(t.isDate)}function st(e,t,o=Je){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:c}=o;return n.some(a=>{if(typeof a=="boolean")return a;if(o.isDate(a))return r(e,a);if(Ii(a,o))return a.includes(e);if(On(a))return rt(a,e,!1,o);if(Si(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Ci(a)){const u=s(a.before,e),p=s(a.after,e),h=u>0,g=p<0;return c(a.before,a.after)?g&&h:h||g}return $i(a)?s(e,a.after)>0:ji(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function tf(e,t,o,n,r){const{disabled:s,hidden:c,modifiers:a,showOutsideDays:u,broadcastCalendar:p,today:h}=t,{isSameDay:g,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:v}=r,w=o&&x(o),$=n&&y(n),k={[le.focused]:[],[le.outside]:[],[le.disabled]:[],[le.hidden]:[],[le.today]:[]},j={};for(const C of e){const{date:D,displayMonth:I}=C,S=!!(I&&!m(D,I)),z=!!(w&&b(D,w)),V=!!($&&v(D,$)),P=!!(s&&st(D,s,r)),N=!!(c&&st(D,c,r))||z||V||!p&&!u&&S||p&&u===!1&&S,J=g(D,h??r.today());S&&k.outside.push(C),P&&k.disabled.push(C),N&&k.hidden.push(C),J&&k.today.push(C),a&&Object.keys(a).forEach(ee=>{const oe=a==null?void 0:a[ee];oe&&st(D,oe,r)&&(j[ee]?j[ee].push(C):j[ee]=[C])})}return C=>{const D={[le.focused]:!1,[le.disabled]:!1,[le.hidden]:!1,[le.outside]:!1,[le.today]:!1},I={};for(const S in k){const z=k[S];D[S]=z.some(V=>V===C)}for(const S in j)I[S]=j[S].some(z=>z===C);return{...D,...I}}}function of(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[le[s]]?r.push(t[le[s]]):t[Le[s]]&&r.push(t[Le[s]]),r),[t[B.Day]])}function nf(e){return{...ef,...e}}function rf(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function sf(){const e={};for(const t in B)e[B[t]]=`rdp-${B[t]}`;for(const t in le)e[le[t]]=`rdp-${le[t]}`;for(const t in Le)e[Le[t]]=`rdp-${Le[t]}`;for(const t in me)e[me[t]]=`rdp-${me[t]}`;return e}function Di(e,t,o){return(o??new lt(t)).format(e,"LLLL y")}const af=Di;function lf(e,t,o){return(o??new lt(t)).format(e,"d")}function cf(e,t=Je){return t.format(e,"LLLL")}function df(e,t,o){return(o??new lt(t)).format(e,"cccccc")}function uf(e,t=Je){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function pf(){return""}function _i(e,t=Je){return t.format(e,"yyyy")}const hf=_i,gf=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Di,formatDay:lf,formatMonthCaption:af,formatMonthDropdown:cf,formatWeekNumber:uf,formatWeekNumberHeader:pf,formatWeekdayName:df,formatYearCaption:hf,formatYearDropdown:_i},Symbol.toStringTag,{value:"Module"}));function ff(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...gf,...e}}function mf(e,t,o,n,r){const{startOfMonth:s,startOfYear:c,endOfYear:a,eachMonthOfInterval:u,getMonth:p}=r;return u({start:c(e),end:a(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=p(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function bf(e,t={},o={}){let n={...t==null?void 0:t[B.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function xf(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let c=0;c<7;c++){const a=e.addDays(r,c);s.push(a)}return s}function yf(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:c,addYears:a,getYear:u,isBefore:p,isSameYear:h}=n,g=s(e),m=c(t),x=[];let b=g;for(;p(b,m)||h(b,m);)x.push(b),b=a(b,1);return r&&x.reverse(),x.map(y=>{const v=o.formatYearDropdown(y,n);return{value:u(y),label:v,disabled:!1}})}function Ti(e,t,o,n){let r=(n??new lt(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const vf=Ti;function Ei(e,t,o){return(o??new lt(t)).format(e,"LLLL y")}const kf=Ei;function wf(e,t,o,n){let r=(n??new lt(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function Cf(e){return"Choose the Month"}function $f(){return""}function jf(e){return"Go to the Next Month"}function Sf(e){return"Go to the Previous Month"}function If(e,t,o){return(o??new lt(t)).format(e,"cccc")}function Df(e,t){return`Week ${e}`}function _f(e){return"Week Number"}function Tf(e){return"Choose the Year"}const Ef=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:kf,labelDay:vf,labelDayButton:Ti,labelGrid:Ei,labelGridcell:wf,labelMonthDropdown:Cf,labelNav:$f,labelNext:jf,labelPrevious:Sf,labelWeekNumber:Df,labelWeekNumberHeader:_f,labelWeekday:If,labelYearDropdown:Tf},Symbol.toStringTag,{value:"Module"})),oo=e=>e instanceof HTMLElement?e:null,Go=e=>[...e.querySelectorAll("[data-animated-month]")??[]],zf=e=>oo(e.querySelector("[data-animated-month]")),Ko=e=>oo(e.querySelector("[data-animated-caption]")),Yo=e=>oo(e.querySelector("[data-animated-weeks]")),Mf=e=>oo(e.querySelector("[data-animated-nav]")),Of=e=>oo(e.querySelector("[data-animated-weekdays]"));function Rf(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const c=d.useRef(null),a=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const p=a.current;if(a.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||p.length===0||n.length!==p.length)return;const h=s.isSameMonth(n[0].date,p[0].date),g=s.isAfter(n[0].date,p[0].date),m=g?o[me.caption_after_enter]:o[me.caption_before_enter],x=g?o[me.weeks_after_enter]:o[me.weeks_before_enter],b=c.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Go(y).forEach(k=>{if(!(k instanceof HTMLElement))return;const j=zf(k);j&&k.contains(j)&&k.removeChild(j);const C=Ko(k);C&&C.classList.remove(m);const D=Yo(k);D&&D.classList.remove(x)}),c.current=y):c.current=null,u.current||h||r)return;const v=b instanceof HTMLElement?Go(b):[],w=Go(e.current);if(w!=null&&w.every($=>$ instanceof HTMLElement)&&v&&v.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=Mf(e.current);$&&($.style.zIndex="1"),w.forEach((k,j)=>{const C=v[j];if(!C)return;k.style.position="relative",k.style.overflow="hidden";const D=Ko(k);D&&D.classList.add(m);const I=Yo(k);I&&I.classList.add(x);const S=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),D&&D.classList.remove(m),I&&I.classList.remove(x),k.style.position="",k.style.overflow="",k.contains(C)&&k.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const z=Of(C);z&&(z.style.opacity="0");const V=Ko(C);V&&(V.classList.add(g?o[me.caption_before_exit]:o[me.caption_after_exit]),V.addEventListener("animationend",S));const P=Yo(C);P&&P.classList.add(g?o[me.weeks_before_exit]:o[me.weeks_after_exit]),k.insertBefore(C,k.firstChild)})}})}function Nf(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:c,fixedWeeks:a,broadcastCalendar:u}=o??{},{addDays:p,differenceInCalendarDays:h,differenceInCalendarMonths:g,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:$,startOfWeek:k}=n,j=u?w(r,n):c?$(r):k(r),C=u?m(s):c?x(b(s)):y(b(s)),D=h(C,j),I=g(s,r)+1,S=[];for(let P=0;P<=D;P++){const N=p(j,P);if(t&&v(N,t))break;S.push(N)}const V=(u?35:42)*I;if(a&&S.length<V){const P=V-S.length;for(let N=0;N<P;N++){const J=p(S[S.length-1],1);S.push(J)}}return S}function Ff(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,c)=>s.concat(c.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function Af(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let c=0;c<r;c++){const a=n.addMonths(e,c);if(t&&a>t)break;s.push(a)}return s}function Tr(e,t,o,n){const{month:r,defaultMonth:s,today:c=n.today(),numberOfMonths:a=1}=e;let u=r||s||c;const{differenceInCalendarMonths:p,addMonths:h,startOfMonth:g}=n;if(o&&p(o,u)<a-1){const m=-1*(a-1);u=h(o,m)}return t&&p(u,t)<0&&(u=t),g(u)}function Lf(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:c,endOfMonth:a,endOfWeek:u,getISOWeek:p,getWeek:h,startOfBroadcastWeek:g,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,v)=>{const w=o.broadcastCalendar?g(v,n):o.ISOWeek?m(v):x(v),$=o.broadcastCalendar?s(v):o.ISOWeek?c(a(v)):u(a(v)),k=t.filter(I=>I>=w&&I<=$),j=o.broadcastCalendar?35:42;if(o.fixedWeeks&&k.length<j){const I=t.filter(S=>{const z=j-k.length;return S>$&&S<=r($,z)});k.push(...I)}const C=k.reduce((I,S)=>{const z=o.ISOWeek?p(S):h(S),V=I.find(N=>N.weekNumber===z),P=new ki(S,v,n);return V?V.days.push(P):I.push(new Ig(z,[P])),I},[]),D=new Sg(v,C);return y.push(D),y},[]);return o.reverseMonths?b.reverse():b}function Bf(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:c,endOfMonth:a,addYears:u,endOfYear:p,newDate:h,today:g}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=h(x,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=c(o):m?o=h(m,0,1):!o&&v&&(o=r(u(e.today??g(),-100))),n?n=a(n):x?n=h(x,11,31):!n&&v&&(n=p(e.today??g())),[o&&s(o),n&&s(n)]}function Wf(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:c,addMonths:a,differenceInCalendarMonths:u}=n,p=r?s:1,h=c(e);if(!t)return a(h,p);if(!(u(t,e)<s))return a(h,p)}function Pf(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:c,addMonths:a,differenceInCalendarMonths:u}=n,p=r?s??1:1,h=c(e);if(!t)return a(h,-p);if(!(u(h,t)<=0))return a(h,-p)}function Vf(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function jo(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function Hf(e,t){const[o,n]=Bf(e,t),{startOfMonth:r,endOfMonth:s}=t,c=Tr(e,o,n,t),[a,u]=jo(c,e.month?c:void 0);d.useEffect(()=>{const D=Tr(e,o,n,t);u(D)},[e.timeZone]);const p=Af(a,n,e,t),h=Nf(p,e.endMonth?s(e.endMonth):void 0,e,t),g=Lf(p,h,e,t),m=Vf(g),x=Ff(g),b=Pf(a,o,e,t),y=Wf(a,n,e,t),{disableNavigation:v,onMonthChange:w}=e,$=D=>m.some(I=>I.days.some(S=>S.isEqualTo(D))),k=D=>{if(v)return;let I=r(D);o&&I<r(o)&&(I=r(o)),n&&I>r(n)&&(I=r(n)),u(I),w==null||w(I)};return{months:g,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:k,goToDay:D=>{$(D)||k(D.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function Er(e){return!e[le.disabled]&&!e[le.hidden]&&!e[le.outside]}function Uf(e,t,o,n){let r,s=-1;for(const c of e){const a=t(c);Er(a)&&(a[le.focused]&&s<Ge.FocusedModifier?(r=c,s=Ge.FocusedModifier):n!=null&&n.isEqualTo(c)&&s<Ge.LastFocused?(r=c,s=Ge.LastFocused):o(c.date)&&s<Ge.Selected?(r=c,s=Ge.Selected):a[le.today]&&s<Ge.Today&&(r=c,s=Ge.Today))}return r||(r=e.find(c=>Er(t(c)))),r}function Gf(e,t,o,n,r,s,c){const{ISOWeek:a,broadcastCalendar:u}=s,{addDays:p,addMonths:h,addWeeks:g,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:v,min:w,startOfBroadcastWeek:$,startOfISOWeek:k,startOfWeek:j}=c;let D={day:p,week:g,month:h,year:m,startOfWeek:I=>u?$(I,c):a?k(I):j(I),endOfWeek:I=>u?x(I):a?b(I):y(I)}[e](o,t==="after"?1:-1);return t==="before"&&n?D=v([n,D]):t==="after"&&r&&(D=w([r,D])),D}function zi(e,t,o,n,r,s,c,a=0){if(a>365)return;const u=Gf(e,t,o.date,n,r,s,c),p=!!(s.disabled&&st(u,s.disabled,c)),h=!!(s.hidden&&st(u,s.hidden,c)),g=u,m=new ki(u,g,c);return!p&&!h?m:zi(e,t,m,n,r,s,c,a+1)}function Kf(e,t,o,n,r){const{autoFocus:s}=e,[c,a]=d.useState(),u=Uf(t.days,o,n||(()=>!1),c),[p,h]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:h,focused:p,blur:()=>{a(p),h(void 0)},moveFocus:(y,v)=>{if(!p)return;const w=zi(y,v,p,t.navStart,t.navEnd,e,r);w&&(t.goToDay(w),h(w))}}}function Yf(e,t){const{selected:o,required:n,onSelect:r}=e,[s,c]=jo(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t,p=x=>(a==null?void 0:a.some(b=>u(b,x)))??!1,{min:h,max:g}=e;return{selected:a,select:(x,b,y)=>{let v=[...a??[]];if(p(x)){if((a==null?void 0:a.length)===h||n&&(a==null?void 0:a.length)===1)return;v=a==null?void 0:a.filter(w=>!u(w,x))}else(a==null?void 0:a.length)===g?v=[x]:v=[...v,x];return r||c(v),r==null||r(v,x,b,y),v},isSelected:p}}function qf(e,t,o=0,n=0,r=!1,s=Je){const{from:c,to:a}=t||{},{isSameDay:u,isAfter:p,isBefore:h}=s;let g;if(!c&&!a)g={from:e,to:o>0?void 0:e};else if(c&&!a)u(c,e)?o===0?g={from:c,to:e}:r?g={from:c,to:void 0}:g=void 0:h(e,c)?g={from:e,to:c}:g={from:c,to:e};else if(c&&a)if(u(c,e)&&u(a,e))r?g={from:c,to:a}:g=void 0;else if(u(c,e))g={from:c,to:o>0?void 0:e};else if(u(a,e))g={from:e,to:o>0?void 0:e};else if(h(e,c))g={from:e,to:a};else if(p(e,c))g={from:c,to:e};else if(p(e,a))g={from:c,to:e};else throw new Error("Invalid range");if(g!=null&&g.from&&(g!=null&&g.to)){const m=s.differenceInCalendarDays(g.to,g.from);n>0&&m>n?g={from:e,to:void 0}:o>1&&m<o&&(g={from:e,to:void 0})}return g}function Zf(e,t,o=Je){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),c=Math.min(s,6);for(let a=0;a<=c;a++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function zr(e,t,o=Je){return rt(e,t.from,!1,o)||rt(e,t.to,!1,o)||rt(t,e.from,!1,o)||rt(t,e.to,!1,o)}function Xf(e,t,o=Je){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:o.isDate(a)?rt(e,a,!1,o):Ii(a,o)?a.some(u=>rt(e,u,!1,o)):On(a)?a.from&&a.to?zr(e,{from:a.from,to:a.to},o):!1:Si(a)?Zf(e,a.dayOfWeek,o):Ci(a)?o.isAfter(a.before,a.after)?zr(e,{from:o.addDays(a.after,1),to:o.addDays(a.before,-1)},o):st(e.from,a,o)||st(e.to,a,o):$i(a)||ji(a)?st(e.from,a,o)||st(e.to,a,o):!1))return!0;const c=n.filter(a=>typeof a=="function");if(c.length){let a=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let p=0;p<=u;p++){if(c.some(h=>h(a)))return!0;a=o.addDays(a,1)}}return!1}function Jf(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:c}=e,[a,u]=jo(r,c?r:void 0),p=c?r:a;return{selected:p,select:(m,x,b)=>{const{min:y,max:v}=e,w=m?qf(m,p,y,v,s,t):void 0;return n&&o&&(w!=null&&w.from)&&w.to&&Xf({from:w.from,to:w.to},o,t)&&(w.from=m,w.to=void 0),c||u(w),c==null||c(w,m,x,b),w},isSelected:m=>p&&rt(p,m,!1,t)}}function Qf(e,t){const{selected:o,required:n,onSelect:r}=e,[s,c]=jo(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t;return{selected:a,select:(g,m,x)=>{let b=g;return!n&&a&&a&&u(g,a)&&(b=void 0),r||c(b),r==null||r(b,g,m,x),b},isSelected:g=>a?u(a,g):!1}}function em(e,t){const o=Qf(e,t),n=Yf(e,t),r=Jf(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function tm(e){var ur;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new de(t.today,t.timeZone)),t.month&&(t.month=new de(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new de(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new de(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new de(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new de(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(ur=t.selected)==null?void 0:ur.map(G=>new de(G,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new de(t.selected.from,t.timeZone):void 0,to:t.selected.to?new de(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:c,classNames:a}=d.useMemo(()=>{const G={...yi,...t.locale};return{dateLib:new lt({locale:G,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:nf(t.components),formatters:ff(t.formatters),labels:{...Ef,...t.labels},locale:G,classNames:{...sf(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:p,navLayout:h,numberOfMonths:g=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:$,onPrevClick:k,showWeekNumber:j,styles:C}=t,{formatCaption:D,formatDay:I,formatMonthDropdown:S,formatWeekNumber:z,formatWeekNumberHeader:V,formatWeekdayName:P,formatYearDropdown:N}=n,J=Hf(t,s),{days:ee,months:oe,navStart:De,navEnd:Ve,previousMonth:ce,nextMonth:Y,goToMonth:q}=J,U=tf(ee,t,De,Ve,s),{isSelected:Q,select:_e,selected:ne}=em(t,s)??{},{blur:Te,focused:tt,isFocusTarget:Ea,moveFocus:ar,setFocused:io}=Kf(t,J,U,Q??(()=>!1),s),{labelDayButton:za,labelGridcell:Ma,labelGrid:Oa,labelMonthDropdown:Ra,labelNav:lr,labelPrevious:Na,labelNext:Fa,labelWeekday:Aa,labelWeekNumber:La,labelWeekNumberHeader:Ba,labelYearDropdown:Wa}=r,Pa=d.useMemo(()=>xf(s,t.ISOWeek),[s,t.ISOWeek]),cr=p!==void 0||x!==void 0,Oo=d.useCallback(()=>{ce&&(q(ce),k==null||k(ce))},[ce,q,k]),Ro=d.useCallback(()=>{Y&&(q(Y),$==null||$(Y))},[q,Y,$]),Va=d.useCallback((G,re)=>H=>{H.preventDefault(),H.stopPropagation(),io(G),_e==null||_e(G.date,re,H),x==null||x(G.date,re,H)},[_e,x,io]),Ha=d.useCallback((G,re)=>H=>{io(G),b==null||b(G.date,re,H)},[b,io]),Ua=d.useCallback((G,re)=>H=>{Te(),m==null||m(G.date,re,H)},[Te,m]),Ga=d.useCallback((G,re)=>H=>{const se={ArrowLeft:[H.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[H.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[H.shiftKey?"year":"week","after"],ArrowUp:[H.shiftKey?"year":"week","before"],PageUp:[H.shiftKey?"year":"month","before"],PageDown:[H.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(se[H.key]){H.preventDefault(),H.stopPropagation();const[xe,Z]=se[H.key];ar(xe,Z)}y==null||y(G.date,re,H)},[ar,y,t.dir]),Ka=d.useCallback((G,re)=>H=>{v==null||v(G.date,re,H)},[v]),Ya=d.useCallback((G,re)=>H=>{w==null||w(G.date,re,H)},[w]),qa=d.useCallback(G=>re=>{const H=Number(re.target.value),se=s.setMonth(s.startOfMonth(G),H);q(se)},[s,q]),Za=d.useCallback(G=>re=>{const H=Number(re.target.value),se=s.setYear(s.startOfMonth(G),H);q(se)},[s,q]),{className:Xa,style:Ja}=d.useMemo(()=>({className:[a[B.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[B.Root],...t.style}}),[a,t.className,t.style,C]),Qa=rf(t),dr=d.useRef(null);Rf(dr,!!t.animate,{classNames:a,months:oe,focused:tt,dateLib:s});const el={dayPickerProps:t,selected:ne,select:_e,isSelected:Q,months:oe,nextMonth:Y,previousMonth:ce,goToMonth:q,getModifiers:U,components:o,classNames:a,styles:C,labels:r,formatters:n};return d.createElement(wi.Provider,{value:el},d.createElement(o.Root,{rootRef:t.animate?dr:void 0,className:Xa,style:Ja,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Qa},d.createElement(o.Months,{className:a[B.Months],style:C==null?void 0:C[B.Months]},!t.hideNavigation&&!h&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[B.Nav],style:C==null?void 0:C[B.Nav],"aria-label":lr(),onPreviousClick:Oo,onNextClick:Ro,previousMonth:ce,nextMonth:Y}),oe.map((G,re)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:a[B.Month],style:C==null?void 0:C[B.Month],key:re,displayIndex:re,calendarMonth:G},h==="around"&&!t.hideNavigation&&re===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:a[B.PreviousMonthButton],tabIndex:ce?void 0:-1,"aria-disabled":ce?void 0:!0,"aria-label":Na(ce),onClick:Oo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ce?void 0:!0,className:a[B.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[B.MonthCaption],style:C==null?void 0:C[B.MonthCaption],calendarMonth:G,displayIndex:re},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:a[B.Dropdowns],style:C==null?void 0:C[B.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:a[B.MonthsDropdown],"aria-label":Ra(),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:qa(G.date),options:mf(G.date,De,Ve,n,s),style:C==null?void 0:C[B.Dropdown],value:s.getMonth(G.date)}):d.createElement("span",null,S(G.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:a[B.YearsDropdown],"aria-label":Wa(s.options),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Za(G.date),options:yf(De,Ve,n,s,!!t.reverseYears),style:C==null?void 0:C[B.Dropdown],value:s.getYear(G.date)}):d.createElement("span",null,N(G.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(G.date,s.options,s))):d.createElement(o.CaptionLabel,{className:a[B.CaptionLabel],role:"status","aria-live":"polite"},D(G.date,s.options,s))),h==="around"&&!t.hideNavigation&&re===g-1&&d.createElement(o.NextMonthButton,{type:"button",className:a[B.NextMonthButton],tabIndex:Y?void 0:-1,"aria-disabled":Y?void 0:!0,"aria-label":Fa(Y),onClick:Ro,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:Y?void 0:!0,className:a[B.Chevron],orientation:t.dir==="rtl"?"left":"right"})),re===g-1&&h==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[B.Nav],style:C==null?void 0:C[B.Nav],"aria-label":lr(),onPreviousClick:Oo,onNextClick:Ro,previousMonth:ce,nextMonth:Y}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":Oa(G.date,s.options,s)||void 0,className:a[B.MonthGrid],style:C==null?void 0:C[B.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[B.Weekdays],style:C==null?void 0:C[B.Weekdays]},j&&d.createElement(o.WeekNumberHeader,{"aria-label":Ba(s.options),className:a[B.WeekNumberHeader],style:C==null?void 0:C[B.WeekNumberHeader],scope:"col"},V()),Pa.map(H=>d.createElement(o.Weekday,{"aria-label":Aa(H,s.options,s),className:a[B.Weekday],key:String(H),style:C==null?void 0:C[B.Weekday],scope:"col"},P(H,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[B.Weeks],style:C==null?void 0:C[B.Weeks]},G.weeks.map(H=>d.createElement(o.Week,{className:a[B.Week],key:H.weekNumber,style:C==null?void 0:C[B.Week],week:H},j&&d.createElement(o.WeekNumber,{week:H,style:C==null?void 0:C[B.WeekNumber],"aria-label":La(H.weekNumber,{locale:c}),className:a[B.WeekNumber],scope:"row",role:"rowheader"},z(H.weekNumber,s)),H.days.map(se=>{const{date:xe}=se,Z=U(se);if(Z[le.focused]=!Z.hidden&&!!(tt!=null&&tt.isEqualTo(se)),Z[Le.selected]=(Q==null?void 0:Q(xe))||Z.selected,On(ne)){const{from:No,to:Fo}=ne;Z[Le.range_start]=!!(No&&Fo&&s.isSameDay(xe,No)),Z[Le.range_end]=!!(No&&Fo&&s.isSameDay(xe,Fo)),Z[Le.range_middle]=rt(ne,xe,!0,s)}const tl=bf(Z,C,t.modifiersStyles),ol=of(Z,a,t.modifiersClassNames),nl=!cr&&!Z.hidden?Ma(xe,Z,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(xe,"yyyy-MM-dd")}_${s.format(se.displayMonth,"yyyy-MM")}`,day:se,modifiers:Z,className:ol.join(" "),style:tl,role:"gridcell","aria-selected":Z.selected||void 0,"aria-label":nl,"data-day":s.format(xe,"yyyy-MM-dd"),"data-month":se.outside?s.format(xe,"yyyy-MM"):void 0,"data-selected":Z.selected||void 0,"data-disabled":Z.disabled||void 0,"data-hidden":Z.hidden||void 0,"data-outside":se.outside||void 0,"data-focused":Z.focused||void 0,"data-today":Z.today||void 0},!Z.hidden&&cr?d.createElement(o.DayButton,{className:a[B.DayButton],style:C==null?void 0:C[B.DayButton],type:"button",day:se,modifiers:Z,disabled:Z.disabled||void 0,tabIndex:Ea(se)?0:-1,"aria-label":za(xe,Z,s.options,s),onClick:Va(se,Z),onBlur:Ua(se,Z),onFocus:Ha(se,Z),onKeyDown:Ga(se,Z),onMouseEnter:Ka(se,Z),onMouseLeave:Ya(se,Z)},I(xe,s.options,s)):!Z.hidden&&I(se.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:a[B.Footer],style:C==null?void 0:C[B.Footer],role:"status","aria-live":"polite"},t.footer)))}const om=d.memo(({...e})=>i.jsx(nm,{mode:"single",...e})),nm=f(tm)`
|
|
2293
|
+
font-family: ${l("font-family-default")};
|
|
2294
|
+
`,Mi=({disabled:e,isSmall:t,children:o,value:n,id:r,placeholder:s,prefixIcon:c,prefixIconColor:a,className:u,getLabel:p,getIcon:h,onSelect:g,onKeyDown:m})=>{var D,I;const x=d.useRef(n);d.useEffect(()=>{x.current=n},[n]);const b=d.useCallback(S=>{let z=h==null?void 0:h(S),V=p==null?void 0:p(S),P;return S&&d.Children.forEach(o,N=>{d.isValidElement(N)&&N.props.optionKey&&N.props.optionKey===S&&(P=N)}),P!==void 0&&d.isValidElement(P)&&P.props.label&&(V=V??P.props.label,z=z??P.props.prefixIconId),{label:V??"",iconId:z}},[o,h,p]),y=d.useCallback((S,z)=>{let V=null;return d.Children.forEach(S,(P,N)=>{d.isValidElement(P)&&P.props.optionKey&&P.props.optionKey===z&&(V=N)}),V},[]),[v,w]=d.useState(y(o,n));d.useEffect(()=>{w(y(o,x.current))},[o,y]);const[$,k]=d.useState((D=b(n))==null?void 0:D.label),[j,C]=d.useState((I=b(n))==null?void 0:I.iconId);return d.useEffect(()=>{const S=b(n);k(S==null?void 0:S.label),C(S==null?void 0:S.iconId)},[n,b]),i.jsx(M.ClassNames,{children:({cx:S})=>i.jsx(sm,{onSelect:g,disabled:e,matchReferenceWidth:!0,selectedIndex:v,onSelectedIndexChange:w,Reference:i.jsx(rm,{value:$??"",disabled:e,onChange:Se,id:r,onKeyDown:m,isSmall:t,prefixIconId:c||j,prefixIconColor:a,type:"text",placeholder:s,autoComplete:"off",className:S(u,"form-input"),suffixIconId:"Down",suffixIconColor:e?"grey":"black"}),children:o})})},rm=f(kt)`
|
|
2269
2295
|
caret-color: transparent;
|
|
2270
2296
|
user-select: none;
|
|
2271
2297
|
-webkit-user-select: none;
|
|
2272
|
-
`,
|
|
2298
|
+
`,sm=f(Ot)`
|
|
2273
2299
|
max-height: 300px;
|
|
2274
|
-
`,[qo,
|
|
2275
|
-
${`${qo("bg-color",!0)}: ${
|
|
2276
|
-
${`${qo("color",!0)}: ${
|
|
2277
|
-
${`${qo("bg-color-active",!0)}: ${
|
|
2300
|
+
`,[qo,im]=O(["option","select"]),Rn=({trigger:e,onSelection:t,children:o})=>i.jsx(lm,{Reference:e,onSelect:t,menuPlacement:"bottom-start",children:o}),am=f(ht)`
|
|
2301
|
+
${`${qo("bg-color",!0)}: ${l("color-black")}`};
|
|
2302
|
+
${`${qo("color",!0)}: ${l("color-white")}`};
|
|
2303
|
+
${`${qo("bg-color-active",!0)}: ${l("color-grey70")}`};
|
|
2278
2304
|
gap: 0px;
|
|
2279
2305
|
cursor: pointer;
|
|
2280
|
-
`,
|
|
2281
|
-
${`${
|
|
2306
|
+
`,lm=f(Ot)`
|
|
2307
|
+
${`${im("border-color",!0)}: ${l("color-black")}`};
|
|
2282
2308
|
z-index: 15;
|
|
2283
|
-
`,Nn=
|
|
2309
|
+
`,Nn=f.div`
|
|
2284
2310
|
cursor: default;
|
|
2285
|
-
border-bottom: 0.5px solid ${
|
|
2311
|
+
border-bottom: 0.5px solid ${l("color-grey60")};
|
|
2286
2312
|
pointer-events: none;
|
|
2287
|
-
`,
|
|
2313
|
+
`,cm=d.memo(({title:e,message:t})=>i.jsxs(dm,{children:[i.jsx(_,{variant:"body",bold:!0,children:e}),i.jsx(_,{variant:"body",color:"grey",children:t})]})),dm=f.div`
|
|
2288
2314
|
display: flex;
|
|
2289
|
-
padding: ${
|
|
2290
|
-
${
|
|
2315
|
+
padding: ${l("spacing-8")} ${l("spacing-10")}
|
|
2316
|
+
${l("spacing-8")} ${l("spacing-20")};
|
|
2291
2317
|
flex-direction: column;
|
|
2292
2318
|
align-items: flex-start;
|
|
2293
|
-
gap: ${
|
|
2319
|
+
gap: ${l("spacing-8")};
|
|
2294
2320
|
align-self: stretch;
|
|
2295
2321
|
max-width: 100%;
|
|
2296
2322
|
word-wrap: break-word;
|
|
2297
2323
|
overflow-wrap: break-word;
|
|
2298
|
-
`,
|
|
2324
|
+
`,um=e=>typeof e=="string"?e.trim().length>0||"Required":!0,pm=e=>{const{register:t}=e,o=d.useCallback((r,s)=>{if(!s||!s.required)return t(r,s);const c=typeof s.validate=="function"?{default:s.validate}:s.validate,a={...s,validate:{...c,whitespaces:um}};return t(r,a)},[t]),n=d.useMemo(()=>({...e.control,register:o}),[e.control,o]);return{...e,register:o,control:n}};function Oi({children:e,onSubmit:t,onRootErrorChange:o,className:n,defaultValues:r,variant:s="submit",...c}){const a=K.useForm({shouldUnregister:!0,defaultValues:r,...c,mode:s==="blur"?"onBlur":c.mode}),u=pm(a),p=u.formState.errors.root;d.useEffect(()=>{o&&o(p)},[p,o]);const h=d.useCallback(async g=>{await t(g,u.setError)},[u.setError,t]);return i.jsx(K.FormProvider,{...u,children:i.jsx("form",{className:n,onSubmit:s==="blur"?void 0:u.handleSubmit(h),onBlur:s==="blur"?u.handleSubmit(h):void 0,children:e})})}const hm=d.memo(()=>i.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:i.jsx("path",{d:"M5.99961 3.6001C5.35761 3.6001 4.75761 3.8481 4.30361 4.3041C3.84961 4.7581 3.59961 5.3581 3.59961 6.0001C3.59961 6.6421 3.84961 7.2421 4.30361 7.6961C4.75761 8.1481 5.35961 8.4001 5.99961 8.4001C6.63961 8.4001 7.24161 8.1501 7.69561 7.6961C8.14761 7.2421 8.39961 6.6401 8.39961 6.0001C8.39961 5.3601 8.14961 4.7581 7.69561 4.3041C7.24161 3.8481 6.64161 3.6001 5.99961 3.6001Z",fill:"#262626"})})),gm=e=>e===void 0?i.jsx(hm,{}):e?i.jsx(F,{iconId:"Check",color:"green",size:"sm"}):i.jsx(F,{iconId:"Close",color:"red",size:"sm"}),Ri=d.memo(({isBlank:e,requirements:t,metRequirements:o,bulletGetter:n,className:r,t:s,title:c})=>i.jsxs(fm,{className:r,children:[!!c&&i.jsx(_,{color:"dark",bold:!0,variant:"body",children:c}),i.jsx(mm,{children:t.map(a=>{const u=e?void 0:o.includes(a.id);return i.jsxs(bm,{children:[n?n(a.id,u):gm(u),i.jsx(xm,{variant:"body",color:"dark",children:s?s(a.textKey):a.id})]},a.id)})})]})),fm=f.div`
|
|
2299
2325
|
display: flex;
|
|
2300
2326
|
align-items: flex-start;
|
|
2301
2327
|
justify-content: flex-start;
|
|
2302
2328
|
flex-direction: column;
|
|
2303
|
-
`,
|
|
2329
|
+
`,mm=f.ul`
|
|
2304
2330
|
margin: 0px;
|
|
2305
2331
|
padding-left: 0px;
|
|
2306
2332
|
row-gap: 4px;
|
|
2307
2333
|
list-style-type: none;
|
|
2308
2334
|
list-style-position: inside;
|
|
2309
|
-
`,
|
|
2335
|
+
`,bm=f.li`
|
|
2310
2336
|
margin: 0;
|
|
2311
2337
|
align-items: center;
|
|
2312
2338
|
display: flex;
|
|
2313
2339
|
justify-content: flex-start;
|
|
2314
|
-
`,
|
|
2340
|
+
`,xm=f(_)`
|
|
2315
2341
|
margin-left: 4px;
|
|
2316
|
-
`,
|
|
2342
|
+
`,ym=()=>K.useFormContext(),[Mr]=O(["form"]),Fn=[{textKey:"passwordRequirements.length",id:"length"},{textKey:"passwordRequirements.uppercaseAndNumber",id:"uppercaseAndNumber"},{textKey:"passwordRequirements.specialCharacter",id:"specialCharacter"}],Ni=[{textKey:"passwordRequirements.tooSimilar",id:"tooSimilar"},...Fn],vm=d.memo(({name:e,t,hasLabel:o,includeTooSimilar:n})=>{const{getFieldState:r,formState:s}=ym(),{error:c,isDirty:a}=r(e??"password",s),u=d.useMemo(()=>{const p=(c==null?void 0:c.types)??{},h=[];return!p.minLength&&!p.required&&h.push("length"),!p.tooSimilar&&n&&h.push("tooSimilar"),!p[Ut.noDigit]&&!p[Ut.noUpperCase]&&h.push("uppercaseAndNumber"),p[Ut.noSpecialCharacter]||h.push("specialCharacter"),h},[c==null?void 0:c.types,n]);return i.jsx(M.ClassNames,{children:({cx:p})=>i.jsx(km,{t,className:p({hasLabel:o}),isBlank:!a&&!c,requirements:n?Ni:Fn,title:(t==null?void 0:t("passwordRequirements.title"))??"Password Requirements",metRequirements:u})})}),km=f(Ri)`
|
|
2317
2343
|
width: 100%;
|
|
2318
2344
|
align-items: flex-start;
|
|
2319
2345
|
justify-content: flex-start;
|
|
2320
2346
|
&.hasLabel {
|
|
2321
|
-
padding-left: calc(${
|
|
2322
|
-
}
|
|
2323
|
-
`,[
|
|
2324
|
-
font-family: ${
|
|
2325
|
-
font-size: ${
|
|
2326
|
-
font-weight: ${
|
|
2327
|
-
height: ${
|
|
2328
|
-
line-height: ${
|
|
2347
|
+
padding-left: calc(${Mr("label-width")} + ${Mr("label-column-gap")});
|
|
2348
|
+
}
|
|
2349
|
+
`,[gt]=O(["form"]),be=d.forwardRef(({className:e,required:t,formItemId:o,isValid:n,...r},s)=>i.jsx(M.ClassNames,{children:({cx:c})=>i.jsx(wm,{ref:s,"aria-required":t,"aria-invalid":!n,className:c(e,"form-label"),htmlFor:o,...r})})),wm=f.label`
|
|
2350
|
+
font-family: ${gt("label-font-family")};
|
|
2351
|
+
font-size: ${gt("label-font-size")};
|
|
2352
|
+
font-weight: ${gt("label-font-weight")};
|
|
2353
|
+
height: ${gt("label-height")};
|
|
2354
|
+
line-height: ${gt("label-line-height")};
|
|
2329
2355
|
text-align: right;
|
|
2330
2356
|
width: 100%;
|
|
2331
2357
|
&[aria-required="true"] {
|
|
2332
2358
|
::before {
|
|
2333
2359
|
content: "*";
|
|
2334
|
-
padding-right: ${
|
|
2335
|
-
color: ${
|
|
2360
|
+
padding-right: ${gt("label-star-padding")};
|
|
2361
|
+
color: ${gt("label-error-color")};
|
|
2336
2362
|
}
|
|
2337
2363
|
}
|
|
2338
|
-
`;
|
|
2364
|
+
`;be.displayName="FormLabel";const[Zo]=O(["form"]),Qe=d.memo(({handleError:e,name:t,hasLabel:o})=>{const{getFieldState:n,formState:r}=K.useFormContext(),{error:s}=n(t,r);if(!s)return null;const c=e==="message"?s.message:e(s);return c?i.jsx(Cm,{className:o?"hasLabel":void 0,variant:"body",color:"red",children:c}):null}),Cm=f(_)`
|
|
2339
2365
|
width: 100%;
|
|
2340
2366
|
margin-top: ${Zo("error-message-top-margin")};
|
|
2341
2367
|
&.hasLabel {
|
|
2342
2368
|
padding-left: calc(${Zo("label-width")} + ${Zo("label-column-gap")});
|
|
2343
2369
|
}
|
|
2344
|
-
`,[cn]=
|
|
2370
|
+
`,[cn]=O(["form"]),et=f.div`
|
|
2345
2371
|
display: flex;
|
|
2346
2372
|
align-items: center;
|
|
2347
2373
|
justify-content: flex-start;
|
|
2348
2374
|
flex-direction: column;
|
|
2349
2375
|
width: 100%;
|
|
2350
2376
|
position: relative;
|
|
2351
|
-
`,Pe=
|
|
2377
|
+
`,Pe=f.div`
|
|
2352
2378
|
display: grid;
|
|
2353
2379
|
align-items: center;
|
|
2354
2380
|
grid-template-columns: 1fr;
|
|
@@ -2357,7 +2383,7 @@
|
|
|
2357
2383
|
&.hasLabel {
|
|
2358
2384
|
grid-template-columns: ${cn("label-width")} 1fr;
|
|
2359
2385
|
}
|
|
2360
|
-
`,
|
|
2386
|
+
`,Fi=f(Pe)`
|
|
2361
2387
|
align-items: flex-start;
|
|
2362
2388
|
|
|
2363
2389
|
/*
|
|
@@ -2370,88 +2396,88 @@
|
|
|
2370
2396
|
& label {
|
|
2371
2397
|
padding: ${cn("label-area-padding")};
|
|
2372
2398
|
} */
|
|
2373
|
-
`,An=
|
|
2399
|
+
`,An=f.input`
|
|
2374
2400
|
visibility: hidden;
|
|
2375
2401
|
position: absolute;
|
|
2376
2402
|
right: 0;
|
|
2377
2403
|
top: 0;
|
|
2378
2404
|
pointer-events: none;
|
|
2379
|
-
|
|
2405
|
+
`,$m=({name:e,disabled:t,label:o,className:n,handleError:r,showIcons:s,readOnly:c,...a})=>{const{control:u}=K.useFormContext(),{field:{onChange:p,value:h,disabled:g},fieldState:{error:m}}=K.useController({name:e,control:u,rules:a,disabled:t}),x=d.useId();return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:b({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:x,isValid:!m,required:!!a.required,children:o}),i.jsx(jm,{children:i.jsx(wo,{checked:h,disabled:g,readOnly:c,onChange:p,showIcons:s,id:x})})]}),!!r&&i.jsx(Qe,{handleError:r,name:e,hasLabel:!!o})]})})},jm=f.div`
|
|
2380
2406
|
width: 100%;
|
|
2381
2407
|
display: flex;
|
|
2382
2408
|
align-items: center;
|
|
2383
2409
|
justify-content: flex-start;
|
|
2384
|
-
`,
|
|
2410
|
+
`,Sm=({name:e,disabled:t,label:o,placeholder:n,className:r,handleError:s,autoFocus:c,wrap:a,readOnly:u,...p},h)=>{const{control:g}=K.useFormContext(),{field:{ref:m,...x},fieldState:{error:b}}=K.useController({name:e,control:g,rules:p,disabled:t}),y=d.useId(),v=A.useMergeRefs([m,h]);return i.jsx(M.ClassNames,{children:({cx:w})=>i.jsxs(et,{children:[i.jsxs(Fi,{className:w({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:y,isValid:!b,required:!!p.required,children:o}),i.jsx(zn,{...x,id:y,placeholder:n,ref:v,autoComplete:"off",className:w(r,"form-text-area"),"aria-invalid":!!b,autoFocus:c,readOnly:u,wrap:a})]}),!!s&&i.jsx(Qe,{handleError:s,name:e,hasLabel:!!o})]})})},Im=zt(Sm),Dm=({onSubmit:e,enabledIfClean:t,disabled:o,...n},r)=>{const{handleSubmit:s,setError:c,formState:{isValid:a,isSubmitting:u,dirtyFields:p}}=K.useFormContext(),h=d.useCallback(async x=>{console.log("[FormSubmit] _onSubmit data:",x),console.log("[FormSubmit] _onSubmit data keys:",Object.keys(x)),await e(x,c)},[c,e]),g=Object.keys(p).length>0,m=!a||u||!t&&!g||o;return i.jsx(We,{type:"submit",...n,ref:r,disabled:m,onClick:s(h)})},Ln=zt(Dm),_m=({name:e,disabled:t,label:o,handleError:n,children:r,placeholder:s,prefixIcon:c,prefixIconColor:a,className:u,readOnly:p,onSelectionChange:h,...g})=>{const{control:m}=K.useFormContext(),{field:{ref:x,...b},fieldState:{error:y}}=K.useController({name:e,control:m,rules:g,disabled:t}),v=d.useId(),{onChange:w}=b,$=d.useCallback(k=>{w(k),h&&h(k)},[w,h]);return i.jsx(M.ClassNames,{children:({cx:k})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:k({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:v,isValid:!y,required:!!g.required,children:o}),i.jsx(Mi,{disabled:t||p,onSelect:$,className:u,id:v,value:b.value,children:r})]}),!!n&&i.jsx(Qe,{handleError:n,name:e,hasLabel:!!o}),i.jsx(An,{ref:x,...b})]})})},Tm=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:c,prefixIconId:a,prefixIconColor:u,suffixIconColor:p,suffixIconId:h,suffixIcon:g,autoFocus:m,readOnly:x,bold:b,...y},v)=>{const{control:w}=K.useFormContext(),{field:{ref:$,...k},fieldState:{error:j}}=K.useController({name:e,control:w,rules:y,disabled:t}),C=d.useId(),D=A.useMergeRefs([$,v]);return i.jsx(M.ClassNames,{children:({cx:I})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:I({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:C,isValid:!j,required:!!y.required,children:o}),i.jsx(kt,{...k,onChange:S=>{y.autoTrim?k.onChange(S.target.value.trim()):k.onChange(S.target.value)},id:C,type:r,autoFocus:m,placeholder:n,ref:D,autoComplete:"off",prefixIconColor:u,prefixIconId:a,suffixIconId:h,suffixIconColor:p,suffixIcon:g,className:I(s,"form-input"),"aria-invalid":!!j,readOnly:x})]}),!!c&&i.jsx(Qe,{handleError:c,name:e,hasLabel:!!o})]})})},Bn=zt(Tm),Em=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:c,className:a,...u})=>{const{control:p}=K.useFormContext(),{field:h,fieldState:{error:g,...m}}=K.useController({name:t,control:p,rules:u,disabled:o}),x=d.useId(),b=e?Fi:Pe;return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(et,{className:a,children:[i.jsxs(b,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(be,{formItemId:x,isValid:!g,required:!!u.required,children:r}),c(h,{error:g,readOnly:n,...m})]}),!!s&&i.jsx(Qe,{handleError:s,name:t,hasLabel:!!r})]})})},zm=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...c},a)=>{const{control:u}=K.useFormContext(),{field:{ref:p,...h},fieldState:{error:g}}=K.useController({name:e,control:u,rules:c,disabled:t}),m=d.useId(),x=A.useMergeRefs([p,a]),b=d.useCallback(y=>{y.target.blur(),h.onChange(y)},[h]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:y({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:m,isValid:!g,required:!!c.required,children:o}),i.jsx(yt,{checked:!!h.value,disabled:h.disabled||s,onChange:b,id:m,ref:x,className:y(n,"form-checkbox"),"aria-invalid":!!g})]}),!!r&&i.jsx(Qe,{handleError:r,name:e,hasLabel:!!o})]})})},Mm=zt(zm),[Yt]=O(["form"]),Or=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:c}}=K.useController({name:t,control:e,rules:{},disabled:!1}),a=d.useId();return i.jsxs(Om,{children:[i.jsx(Rm,{isValid:!0,formItemId:a,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(wo,{checked:s,readOnly:c||n,onChange:r,id:a})]})},Om=f.div`
|
|
2385
2411
|
display: flex;
|
|
2386
2412
|
align-items: center;
|
|
2387
2413
|
justify-content: flex-start;
|
|
2388
2414
|
column-gap: ${Yt("access-toggle-gap")};
|
|
2389
|
-
`,
|
|
2415
|
+
`,Rm=f(be)`
|
|
2390
2416
|
width: auto;
|
|
2391
|
-
`,
|
|
2417
|
+
`,Nm=({className:e,t,isAdmin:o,hideHide:n,hideLock:r})=>{const{control:s}=K.useFormContext(),c=K.useWatch();return o?i.jsxs(Fm,{className:e,children:[i.jsx(_,{textAlign:"right",variant:"body",color:"dark",children:(t==null?void 0:t("access.label"))??"Access:"}),i.jsxs(Am,{children:[!n&&i.jsx(Or,{name:"hidden",readOnly:!!c.locked,control:s}),!r&&i.jsx(Or,{name:"locked",control:s})]})]}):null},Fm=f.div`
|
|
2392
2418
|
width: 100%;
|
|
2393
2419
|
display: grid;
|
|
2394
2420
|
align-items: center;
|
|
2395
|
-
background-color: ${
|
|
2396
|
-
border-radius: ${
|
|
2421
|
+
background-color: ${l("color-grey10")};
|
|
2422
|
+
border-radius: ${l("spacing-4")};
|
|
2397
2423
|
grid-template-columns: ${Yt("label-width")} 1fr;
|
|
2398
2424
|
height: ${Yt("access-toggle-height")};
|
|
2399
2425
|
column-gap: ${Yt("label-column-gap")};
|
|
2400
|
-
`,
|
|
2426
|
+
`,Am=f.div`
|
|
2401
2427
|
width: 100%;
|
|
2402
2428
|
height: 100%;
|
|
2403
2429
|
display: flex;
|
|
2404
2430
|
align-items: center;
|
|
2405
2431
|
justify-content: flex-start;
|
|
2406
2432
|
column-gap: ${Yt("label-column-gap")};
|
|
2407
|
-
`,
|
|
2433
|
+
`,Lm=d.memo(({nameBlackList:e,maxLength:t,t:o,...n})=>{const r=d.useCallback(s=>As.test(s)?t&&s.length>t?(o==null?void 0:o("form.tooLongName"))??`Cannot be longer than ${t}.`:e&&e.includes(s)?(o==null?void 0:o("form.duplicateName"))??"This name is already taken":!0:(o==null?void 0:o("form.noLeadingOrTrailingSpacesName"))??"Cannot have leading or trailing spaces.",[t,e,o]);return i.jsx(Bn,{validate:r,handleError:"message",name:"name",...n})}),Bm=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:c,prefixIconId:a,prefixIconColor:u,suffixIconColor:p,suffixIconId:h,autoFocus:g,readOnly:m,options:x,useLabelAsValue:b,...y})=>{const{control:v}=K.useFormContext(),{field:{ref:w,...$},fieldState:{error:k}}=K.useController({name:e,control:v,rules:y,disabled:t}),j=d.useId(),C=d.useCallback((I,S)=>{$.onChange(S??"")},[$]),D=d.useMemo(()=>{if($.value)return{id:$.value,name:$.value}},[$.value]);return i.jsx(M.ClassNames,{children:({cx:I})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:I({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:j,isValid:!k,required:!!y.required,children:o}),i.jsx(mi,{options:x,selected:D,onSelectionChange:C,children:i.jsxs(Wm,{children:[i.jsx(yo,{variant:"body",color:"dark",children:$.value}),i.jsx(Pm,{children:i.jsx(F,{iconId:"Down",size:"sm",color:"black"})})]})})]}),!!c&&i.jsx(Qe,{handleError:c,name:e,hasLabel:!!o}),i.jsx(An,{ref:w,...$})]})})},Wm=f(bi)`
|
|
2408
2434
|
height: 29px;
|
|
2409
2435
|
width: 100%;
|
|
2410
|
-
`,
|
|
2436
|
+
`,Pm=f.div`
|
|
2411
2437
|
width: 100%;
|
|
2412
2438
|
height: 100%;
|
|
2413
2439
|
display: flex;
|
|
2414
2440
|
align-items: center;
|
|
2415
2441
|
justify-content: center;
|
|
2416
|
-
`,
|
|
2442
|
+
`,Vm=({name:e,disabled:t,label:o,handleError:n,readOnly:r,placeholder:s,...c})=>{const{control:a}=K.useFormContext(),u=d.useRef(null),{field:{ref:p,value:h,onChange:g,...m},fieldState:{error:x}}=K.useController({name:e,control:a,rules:c,disabled:t}),b=d.useId(),y=A.useMergeRefs([p,u]),v=d.useCallback(()=>{u.current&&u.current.click()},[]),w=d.useCallback(j=>{j.preventDefault()},[]),$=d.useCallback(j=>{j.preventDefault();let C=!1;if(j.dataTransfer.items.length)for(let D=0;D<j.dataTransfer.items.length&&!C;D++){const I=j.dataTransfer.items[D];if(I.kind==="file"){const S=I.getAsFile();S&&(C=!0,g(S))}}},[g]),k=d.useCallback(()=>{g(void 0)},[g]);return i.jsx(M.ClassNames,{children:({cx:j})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:j({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:b,isValid:!x,required:!!c.required,children:o}),h?i.jsxs(Gm,{children:[i.jsx(F,{iconId:"File",size:"sm",color:"black"}),i.jsx(_,{variant:"body",color:"dark",children:h.name}),i.jsx(Km,{onClick:k,iconId:"Close",size:"sm",color:"black"})]}):i.jsxs(Hm,{onDrop:$,onClick:v,onDragOver:w,children:[i.jsx(F,{iconId:"File",size:"med",color:"black"}),i.jsx(_,{variant:"body",color:"dark",children:s})]}),i.jsx(Um,{value:h==null?void 0:h.fileName,...m,id:b,onChange:C=>{C.target.files&&g(C.target.files[0])},type:"file",ref:y})]}),!!n&&i.jsx(Qe,{handleError:n,name:e,hasLabel:!!o})]})})},Ai=f.div`
|
|
2417
2443
|
width: 100%;
|
|
2418
|
-
padding: ${
|
|
2444
|
+
padding: ${l("spacing-12")};
|
|
2419
2445
|
display: flex;
|
|
2420
|
-
border: 1px solid ${
|
|
2421
|
-
background-color: ${
|
|
2422
|
-
border-radius: ${
|
|
2423
|
-
`,
|
|
2446
|
+
border: 1px solid ${l("color-grey30")};
|
|
2447
|
+
background-color: ${l("color-grey10")};
|
|
2448
|
+
border-radius: ${l("spacing-6")};
|
|
2449
|
+
`,Hm=f(Ai)`
|
|
2424
2450
|
align-items: center;
|
|
2425
2451
|
justify-content: center;
|
|
2426
2452
|
flex-direction: column;
|
|
2427
|
-
row-gap: ${
|
|
2453
|
+
row-gap: ${l("spacing-16")};
|
|
2428
2454
|
transition: border 0.125s ease-in-out;
|
|
2429
2455
|
cursor: pointer;
|
|
2430
2456
|
:hover {
|
|
2431
|
-
border-color: ${
|
|
2457
|
+
border-color: ${l("color-grey50")};
|
|
2432
2458
|
}
|
|
2433
|
-
`,
|
|
2459
|
+
`,Um=f.input`
|
|
2434
2460
|
display: none;
|
|
2435
|
-
`,
|
|
2461
|
+
`,Gm=f(Ai)`
|
|
2436
2462
|
align-items: flex-start;
|
|
2437
2463
|
justify-content: flex-start;
|
|
2438
|
-
column-gap: ${
|
|
2439
|
-
`,
|
|
2464
|
+
column-gap: ${l("spacing-4")};
|
|
2465
|
+
`,Km=f(te)`
|
|
2440
2466
|
margin-left: auto;
|
|
2441
|
-
`,
|
|
2467
|
+
`,Ym=({name:e,disabled:t,label:o,handleError:n,options:r,selectAllHidden:s,SelectAllItemTemplate:c,ListItemTemplate:a,SelectedItemTemplate:u,className:p,readOnly:h,closeOnSelect:g,...m})=>{const{control:x}=K.useFormContext(),{field:{value:b,onChange:y},fieldState:{error:v}}=K.useController({name:e,control:x,rules:m,disabled:t}),w=d.useId(),$=d.useCallback(k=>{y(k)},[y]);return i.jsx(M.ClassNames,{children:({cx:k})=>i.jsxs(et,{children:[i.jsxs(Pe,{className:k({hasLabel:!!o}),children:[o&&i.jsx(be,{formItemId:w,isValid:!v,required:!!m.required,children:o}),i.jsx(hi,{disabled:t||h,options:r,closeOnSelect:g,onChange:$,selected:b,className:p,SelectAllItemTemplate:c,ListItemTemplate:a,SelectedItemTemplate:u})]}),!!n&&i.jsx(Qe,{handleError:n,name:e,hasLabel:!!o})]})})},qm=({name:e,disabled:t})=>{const{control:o}=K.useFormContext();return K.useController({name:e,control:o,disabled:t}),null},Zm=({name:e,label:t,disabled:o})=>{const{control:n}=K.useFormContext(),{field:{value:r}}=K.useController({name:e,control:n,disabled:o}),s=d.useId(),c=r==null||r===""?"—":String(r);return i.jsx(M.ClassNames,{children:({cx:a})=>i.jsx(et,{children:i.jsxs(Pe,{className:a({hasLabel:!!t}),children:[t&&i.jsx(be,{formItemId:s,isValid:!0,required:!1,children:t}),i.jsx(Xm,{id:s,children:c})]})})})},Xm=f.span`
|
|
2442
2468
|
font-size: 13px;
|
|
2443
2469
|
color: var(--kos-color-text-primary, #1f2937);
|
|
2444
2470
|
padding: 6px 0;
|
|
2445
2471
|
line-height: 1.4;
|
|
2446
2472
|
user-select: text;
|
|
2447
|
-
`,
|
|
2473
|
+
`,no=(e,t)=>{const[o,n]=d.useState(!1);return d.useEffect(()=>{async function r(){var s;e!=null&&e.init&&(await((s=e.init)==null?void 0:s.call(e)),t==null||t()),n(!0)}return r(),()=>{var s;(s=e==null?void 0:e.dispose)==null||s.call(e)}},[t,e]),o},So=d.createContext(void 0),Wn=()=>d.useContext(So),Io=d.createContext(void 0),Pn=()=>d.useContext(Io),wt=d.createContext({isSelected:()=>!1,selected:[],toggleSelection:Se,isDisabled:!1}),Ie=()=>{const e=d.useContext(wt);return e||{isSelected:()=>!1,selected:[],toggleSelection:Se,isDisabled:!1}};let dn=null;const Li=()=>dn,Vn=({ref:e,data:t,canDrag:o=!0,transformDragData:n=p=>p,onDrop:r,onDragStart:s,onDragEnd:c,onDragOver:a,onDragLeave:u})=>{const[p,h]=d.useState(!1),[g,m]=d.useState(!1),x=k=>{k.preventDefault(),k.stopPropagation()},b=d.useCallback(k=>{x(k),m(!0),k.dataTransfer&&(k.dataTransfer.dropEffect="move"),a==null||a(k)},[a]),y=d.useCallback(k=>{x(k),m(!1),u==null||u(k)},[u]),v=d.useCallback(k=>{x(k),h(!1),m(!1),dn=null,c==null||c(k)},[c]),w=d.useCallback(k=>{var C;x(k),h(!1),m(!1);let j=null;try{j=JSON.parse(((C=k.dataTransfer)==null?void 0:C.getData("application/json"))??"null")}catch(D){console.error("Invalid drag data:",D)}j&&(r==null||r(j,k))},[r]),$=d.useCallback(k=>{var C;if(!o)return;k.stopPropagation(),h(!0),m(!1),k.dataTransfer&&(k.dataTransfer.effectAllowed="move");const j=n(t);dn=j,(C=k.dataTransfer)==null||C.setData("application/json",JSON.stringify(j)),s==null||s(t,k)},[o,t,s,n]);return d.useEffect(()=>{const k=e.current,j={dragover:C=>b(C),dragenter:C=>b(C),dragleave:C=>y(C),drop:C=>w(C),dragstart:C=>$(C),dragend:C=>v(C)};return k&&Object.entries(j).forEach(([C,D])=>k.addEventListener(C,D)),()=>{Object.entries(j).forEach(([C,D])=>{k&&k.removeEventListener(C,D)})}},[e,b,y,w,$,v]),{dragging:p,over:g}},Jm=f.div`
|
|
2448
2474
|
opacity: ${e=>e.$dragging?.5:1};
|
|
2449
2475
|
cursor: ${e=>e.$canDrag?"grab":"default"};
|
|
2450
2476
|
|
|
2451
2477
|
&:active {
|
|
2452
2478
|
cursor: ${e=>e.$canDrag?"grabbing":"default"};
|
|
2453
2479
|
}
|
|
2454
|
-
`,Hn=({itemId:e,dragType:t,canDrag:o=!0,dragData:n,transformDragData:r,children:s})=>{const
|
|
2480
|
+
`,Hn=({itemId:e,dragType:t,canDrag:o=!0,dragData:n,transformDragData:r,children:s})=>{const c=d.useRef(null),{dragging:a}=Vn({ref:c,data:{...n,type:t},canDrag:o,transformDragData:r});return i.jsx(Jm,{ref:c,draggable:o,$dragging:a,$canDrag:o,"data-draggable-item":e,children:s})},Do=({groupName:e})=>i.jsx(Qm,{children:i.jsx(eb,{variant:"small",bold:!0,children:e})});Do.displayName="AsyncListGroupHeader";const Qm=f.div`
|
|
2455
2481
|
display: flex;
|
|
2456
2482
|
align-items: center;
|
|
2457
2483
|
padding: 6px 12px 2px 12px;
|
|
@@ -2462,12 +2488,12 @@
|
|
|
2462
2488
|
border-top: none;
|
|
2463
2489
|
margin-top: 0;
|
|
2464
2490
|
}
|
|
2465
|
-
`,
|
|
2491
|
+
`,eb=f(_)`
|
|
2466
2492
|
text-transform: uppercase;
|
|
2467
2493
|
font-size: 10px;
|
|
2468
2494
|
letter-spacing: 0.5px;
|
|
2469
2495
|
opacity: 0.6;
|
|
2470
|
-
`;function
|
|
2496
|
+
`;function Bi(e){return(e==null?void 0:e.build)!==void 0}const tb=W.kosComponent(({item:e,provider:t,ItemTemplate:o,itemIconMap:n,itemActions:r,itemDecorators:s,itemContentRenderer:c,disableSelectionStyling:a=!1})=>{var w;const u=d.useContext(wt),p=d.useMemo(()=>{if(!n)return;if(typeof n=="function")return n(e);const $=e.type;return $?n[$]:void 0},[n,e]),h=d.useMemo(()=>{if(!(r!=null&&r.length))return;const $=t.originalItems.get(e.id);if($)return r.filter(k=>!k.visibleFor||k.visibleFor(e)).map(k=>({id:k.id,iconId:k.iconId,color:k.color,tooltip:k.tooltip,label:k.label,isPrimary:k.isPrimary,onClick:()=>k.onClick(e.id,$)}))},[r,e,t]),g=(()=>{if(s!=null&&s.length)return s.filter($=>!$.visibleFor||$.visibleFor(e)).map($=>({id:$.id,iconId:$.iconId,color:$.color,tooltip:$.tooltip,position:$.position}))})(),m=((w=u==null?void 0:u.selected)==null?void 0:w.includes(e.id))??!1,x=c?c(e,m):void 0,b=Bi(o)?o.build(e):o,y=Wn(),v=i.jsx(Tt.Observer,{children:()=>i.jsx(b,{...e,iconId:p==null?void 0:p.iconId,iconColor:p==null?void 0:p.color,actions:h,decorators:g,"data-disable-selection-styling":a,children:x},e.id)});if(y){const $=t.originalItems.get(e.id),k=y.canDrag?y.canDrag($??{}):!0;return i.jsx(Hn,{itemId:e.id,dragType:y.dragType,canDrag:k,dragData:{id:e.id,...$??{}},transformDragData:y.transformDragData,children:v},e.id)}return v}),Wi=W.kosComponent(({dataProvider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,emptyState:c,loadingState:a,className:u,onInit:p,disableSelectionStyling:h=!1,groupExpression:g,searchTerm:m,dragConfig:x})=>{const[b,y]=d.useState(!1);return d.useEffect(()=>e?((async()=>{await e.init(),y(!0),p==null||p()})(),()=>{e.dispose()}):void 0,[e,p]),!b||!e?(typeof c=="function"?null:c)||null:i.jsx(So.Provider,{value:x,children:i.jsx(Io.Provider,{value:m,children:i.jsx(Tt.Observer,{children:()=>{const v=e.isLoading??!1,w=e.items.length>0,$=typeof a=="function"?a(e):a,k=typeof c=="function"?c(e):c;return i.jsxs("div",{className:u,style:{width:"100%"},children:[v&&!w&&$,!v&&!w&&k,(()=>{const j=e.items,C=z=>i.jsx(tb,{item:z,provider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,disableSelectionStyling:h},z.id);if(!g)return j.map(C);const D=[],I=new Map;for(const z of j){const V=g(z);if(V===void 0)D.push(z);else{const P=I.get(V);P?P.push(z):I.set(V,[z])}}const S=Array.from(I.keys()).sort((z,V)=>z.localeCompare(V));return i.jsxs(i.Fragment,{children:[D.map(C),S.map(z=>i.jsxs(d.Fragment,{children:[i.jsx(Do,{groupName:z}),(I.get(z)??[]).map(C)]},`group-${z}`))]})})()]})}})})})}),Un=d.createContext({viewing:void 0,onItemView:Se}),Gn=()=>{const e=d.useContext(Un);return e||{viewing:void 0,onItemView:Se}},ob=W.kosComponent(({selected:e,onSelect:t,disabled:o,viewAction:n,...r})=>{const s=d.useMemo(()=>({selected:e,isSelected:u=>e.includes(u),toggleSelection:t,isDisabled:!!o}),[e,t,o]),c=d.useMemo(()=>{if(n)return{viewing:n.viewing,onItemView:n.onItemView}},[n]);let a=i.jsx(wt.Provider,{value:s,children:i.jsx(Wi,{...r})});return c&&(a=i.jsx(Un.Provider,{value:c,children:a})),a}),[Xo,nb]=O(["option","select"]),Rr=3,Rt=d.memo(({actions:e,isSelected:t=!1,disableSelectionStyling:o=!1})=>{const{inlinePrimary:n,overflowPrimary:r,secondary:s}=d.useMemo(()=>{const g=e.filter(x=>x.isPrimary),m=e.filter(x=>!x.isPrimary);return{inlinePrimary:g.slice(0,Rr),overflowPrimary:g.slice(Rr),secondary:m}},[e]),c=r.length>0||s.length>0,a=t&&!o?"white":void 0,u=d.useMemo(()=>{const g=new Map;for(const m of e)g.set(m.id,m);return g},[e]),p=d.useCallback((g,m)=>{g.stopPropagation(),m.disabled||m.onClick()},[]),h=d.useCallback(g=>{const m=u.get(g);m&&!m.disabled&&m.onClick()},[u]);return e.length===0?null:i.jsxs(rb,{className:"item-action-bar",onClick:g=>g.stopPropagation(),children:[n.map(g=>i.jsx(Fr,{onClick:m=>p(m,g),title:g.tooltip,type:"button",disabled:g.disabled,children:i.jsx(F,{size:"sm",iconId:g.iconId,color:a??g.color})},g.id)),c&&i.jsx(sb,{children:i.jsxs(Rn,{trigger:i.jsx(Fr,{title:"More actions",type:"button",children:i.jsx(F,{size:"sm",iconId:"Ellipsis",color:a??"blue"})}),onSelection:h,children:[r.map(g=>i.jsx(Nr,{optionKey:g.id,label:i.jsxs(Ar,{children:[i.jsx(F,{iconId:g.iconId,color:g.disabled?"grey":g.color||"blue",size:"sm"}),i.jsx(Lr,{children:g.label||g.tooltip||g.id})]}),disabled:g.disabled,disableSelectionStyle:!0},g.id)),r.length>0&&s.length>0&&i.jsx(Nn,{}),s.map(g=>i.jsx(Nr,{optionKey:g.id,label:i.jsxs(Ar,{children:[g.iconId?i.jsx(F,{iconId:g.iconId,color:g.disabled?"grey":g.color||"blue",size:"sm"}):i.jsx(ib,{}),i.jsx(Lr,{children:g.label||g.tooltip||g.id})]}),disabled:g.disabled,disableSelectionStyle:!0},g.id))]})})]})});Rt.displayName="ItemActionBar";const rb=f.div`
|
|
2471
2497
|
display: flex;
|
|
2472
2498
|
align-items: center;
|
|
2473
2499
|
gap: 4px;
|
|
@@ -2484,15 +2510,15 @@
|
|
|
2484
2510
|
visibility: hidden;
|
|
2485
2511
|
pointer-events: none;
|
|
2486
2512
|
z-index: 1;
|
|
2487
|
-
`,
|
|
2488
|
-
${`${Xo("bg-color",!0)}: ${
|
|
2489
|
-
${`${Xo("color",!0)}: ${
|
|
2490
|
-
${`${Xo("bg-color-active",!0)}: ${
|
|
2513
|
+
`,Nr=f(ht)`
|
|
2514
|
+
${`${Xo("bg-color",!0)}: ${l("color-white")}`};
|
|
2515
|
+
${`${Xo("color",!0)}: ${l("color-black")}`};
|
|
2516
|
+
${`${Xo("bg-color-active",!0)}: ${l("color-grey20")}`};
|
|
2491
2517
|
gap: 0px;
|
|
2492
2518
|
cursor: pointer;
|
|
2493
|
-
`,
|
|
2494
|
-
${`${
|
|
2495
|
-
`,
|
|
2519
|
+
`,sb=f.div`
|
|
2520
|
+
${`${nb("border-color",!0)}: ${l("color-grey40")}`};
|
|
2521
|
+
`,Fr=f.button`
|
|
2496
2522
|
background: none;
|
|
2497
2523
|
border: none;
|
|
2498
2524
|
padding: 4px;
|
|
@@ -2517,17 +2543,17 @@
|
|
|
2517
2543
|
cursor: not-allowed;
|
|
2518
2544
|
opacity: 0.3;
|
|
2519
2545
|
}
|
|
2520
|
-
`,
|
|
2546
|
+
`,Ar=f.div`
|
|
2521
2547
|
display: flex;
|
|
2522
2548
|
align-items: center;
|
|
2523
2549
|
gap: 8px;
|
|
2524
|
-
`,
|
|
2550
|
+
`,Lr=f.span`
|
|
2525
2551
|
font-size: 13px;
|
|
2526
2552
|
white-space: nowrap;
|
|
2527
|
-
`,
|
|
2553
|
+
`,ib=f.div`
|
|
2528
2554
|
width: 16px;
|
|
2529
2555
|
height: 16px;
|
|
2530
|
-
`;function un(e){return e.context!==void 0}const Kn=d.createContext(null),Yn=({children:e,dataProvider:t,onListItemAction:o})=>{const[n,r]=d.useState(),s=d.useMemo(()=>t?{action:o,data:n}:{data:new Map,action:o},[t,n,o]);return d.useEffect(()=>{var a;const
|
|
2556
|
+
`;function un(e){return e.context!==void 0}const Kn=d.createContext(null),Yn=({children:e,dataProvider:t,onListItemAction:o})=>{const[n,r]=d.useState(),s=d.useMemo(()=>t?{action:o,data:n}:{data:new Map,action:o},[t,n,o]);return d.useEffect(()=>{var a;const c=u=>{r(u)};if(t&&un(t)){const u=t.context;(a=t.addContextChangeListener)==null||a.call(t,c),u&&r(u)}return()=>{var u;t&&un(t)&&((u=t==null?void 0:t.removeContextChangeListener)==null||u.call(t,c))}},[t]),i.jsx(Kn.Provider,{value:s,children:e})},ab=()=>{const e=d.useContext(Kn);return e||W.KosLog.info("useListDataContext must be used within a DataProviderContextProvider"),e},[Pt]=O(["studio-list-item"]),lb=20,Pi=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:c,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":g=lb})=>{const{selected:m,toggleSelection:x,isDisabled:b}=Ie(),{onItemView:y}=Gn(),v=m.includes(e),w=p||b,$=d.useCallback(()=>{w||x(e)},[e,x,w]),k=d.useCallback(I=>{I.stopPropagation()},[]),j=d.useCallback(()=>{y(e)},[e,y]),C=typeof g=="string"?Number(g):g,D=typeof h=="string"?Number(h):h;return i.jsxs(cb,{className:u,onClick:j,$isSelected:v,$isDisabled:w,$depth:D,$indentSize:C,"data-depth":h,children:[i.jsx("span",{onClick:k,children:i.jsx(yt,{checked:v,disabled:w,onChange:$})}),r&&i.jsx(F,{size:"sm",iconId:r,color:s}),i.jsx(db,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(_,{variant:"body",bold:v,children:t}),o&&i.jsx(ub,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(pb,{children:a.map(I=>i.jsx(hb,{size:"sm",iconId:I.iconId,color:I.color,title:I.tooltip},I.id))}),c&&c.length>0&&i.jsx(Rt,{actions:c,isSelected:v})]})});Pi.displayName="StudioCheckListItem";const cb=f.div`
|
|
2531
2557
|
display: flex;
|
|
2532
2558
|
align-items: center;
|
|
2533
2559
|
position: relative;
|
|
@@ -2561,24 +2587,24 @@
|
|
|
2561
2587
|
&:active {
|
|
2562
2588
|
background-color: ${({$isDisabled:e})=>e?"transparent":"rgba(0, 0, 0, 0.1)"};
|
|
2563
2589
|
}
|
|
2564
|
-
`,
|
|
2590
|
+
`,db=f.div`
|
|
2565
2591
|
display: flex;
|
|
2566
2592
|
flex-direction: column;
|
|
2567
2593
|
gap: 2px;
|
|
2568
2594
|
flex: 1;
|
|
2569
2595
|
min-width: 0; /* Allow text truncation */
|
|
2570
|
-
`,
|
|
2596
|
+
`,ub=f(_)`
|
|
2571
2597
|
overflow: hidden;
|
|
2572
2598
|
text-overflow: ellipsis;
|
|
2573
2599
|
white-space: nowrap;
|
|
2574
|
-
`,
|
|
2600
|
+
`,pb=f.div`
|
|
2575
2601
|
display: flex;
|
|
2576
2602
|
align-items: center;
|
|
2577
2603
|
gap: 4px;
|
|
2578
2604
|
padding-left: 8px;
|
|
2579
|
-
`,
|
|
2605
|
+
`,hb=f(F)`
|
|
2580
2606
|
opacity: 0.8;
|
|
2581
|
-
`,[Ue]=
|
|
2607
|
+
`,[Ue]=O(["studio-list-item"]),gb=20,Vi=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:c,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":g=gb,"data-disable-selection-styling":m=!1})=>{const{selected:x,toggleSelection:b,isDisabled:y}=Ie(),v=Pn(),w=d.useCallback(()=>{!p&&!y&&b(e)},[e,b,p,y]),$=x.includes(e),k=p||y,j=(a==null?void 0:a.filter(S=>S.position==="start"))??[],C=(a==null?void 0:a.filter(S=>S.position!=="start"))??[],D=typeof g=="string"?Number(g):g,I=typeof h=="string"?Number(h):h;return i.jsxs(fb,{className:u,onClick:w,$isSelected:$,$isDisabled:k,$disableSelectionStyling:m,$depth:I,$indentSize:D,"data-depth":h,children:[r&&i.jsx(F,{size:"sm",iconId:r,color:s}),i.jsx(mb,{children:n||i.jsxs(i.Fragment,{children:[i.jsxs(bb,{children:[i.jsx(xb,{children:i.jsx(_,{variant:"body",bold:$,children:i.jsx(bo,{search:v||"",children:t})})}),j.length>0&&i.jsx(yb,{children:j.map(S=>i.jsx(Br,{size:"sm",iconId:S.iconId,color:$&&!m?"white":S.color,title:S.tooltip},S.id))})]}),o&&i.jsx(vb,{variant:"small",color:"dark",children:i.jsx(bo,{search:v||"",children:o})})]})}),C.length>0&&i.jsx(kb,{children:C.map(S=>i.jsx(Br,{size:"sm",iconId:S.iconId,color:$&&!m?"white":S.color,title:S.tooltip},S.id))}),c&&c.length>0&&i.jsx(Rt,{actions:c,isSelected:$,disableSelectionStyling:m})]})});Vi.displayName="StudioNamedListItem";const fb=f.div`
|
|
2582
2608
|
display: flex;
|
|
2583
2609
|
align-items: center;
|
|
2584
2610
|
position: relative;
|
|
@@ -2611,40 +2637,40 @@
|
|
|
2611
2637
|
&:active {
|
|
2612
2638
|
background-color: ${({$isDisabled:e,$disableSelectionStyling:t})=>e?"transparent":t?"rgba(0, 0, 0, 0.1)":Ue("background-color-selected")};
|
|
2613
2639
|
}
|
|
2614
|
-
`,
|
|
2640
|
+
`,mb=f.div`
|
|
2615
2641
|
display: flex;
|
|
2616
2642
|
flex-direction: column;
|
|
2617
2643
|
gap: 2px;
|
|
2618
2644
|
flex: 1;
|
|
2619
2645
|
min-width: 0;
|
|
2620
|
-
`,
|
|
2646
|
+
`,bb=f.div`
|
|
2621
2647
|
display: flex;
|
|
2622
2648
|
align-items: center;
|
|
2623
2649
|
min-width: 0;
|
|
2624
|
-
`,
|
|
2650
|
+
`,xb=f.div`
|
|
2625
2651
|
display: -webkit-box;
|
|
2626
2652
|
-webkit-line-clamp: 2;
|
|
2627
2653
|
-webkit-box-orient: vertical;
|
|
2628
2654
|
overflow: hidden;
|
|
2629
2655
|
flex: 0 1 auto;
|
|
2630
2656
|
min-width: 0;
|
|
2631
|
-
`,
|
|
2657
|
+
`,yb=f.div`
|
|
2632
2658
|
display: flex;
|
|
2633
2659
|
align-items: center;
|
|
2634
2660
|
gap: 4px;
|
|
2635
2661
|
flex: 0 0 auto;
|
|
2636
2662
|
margin-left: 4px;
|
|
2637
|
-
`,
|
|
2663
|
+
`,vb=f(_)`
|
|
2638
2664
|
overflow: hidden;
|
|
2639
2665
|
text-overflow: ellipsis;
|
|
2640
2666
|
white-space: nowrap;
|
|
2641
|
-
`,
|
|
2667
|
+
`,kb=f.div`
|
|
2642
2668
|
display: flex;
|
|
2643
2669
|
align-items: center;
|
|
2644
2670
|
gap: 4px;
|
|
2645
|
-
`,
|
|
2671
|
+
`,Br=f(F)`
|
|
2646
2672
|
opacity: 0.8;
|
|
2647
|
-
`,[Vt]=
|
|
2673
|
+
`,[Vt]=O(["studio-list-item"]),wb=20,Hi=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:c,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":g=wb})=>{const{selected:m,toggleSelection:x,isDisabled:b}=Ie(),{viewing:y,onItemView:v}=Gn(),w=d.useRef(null),$=m.includes(e),k=y===e,j=p||b,C=d.useCallback(()=>{j||x(e)},[e,x,j]),D=d.useCallback(z=>{w.current&&w.current.contains(z.target)||j||v(e)},[e,v,j]),I=typeof g=="string"?Number(g):g,S=typeof h=="string"?Number(h):h;return i.jsxs(Cb,{className:u,onClick:D,$isSelected:$,$isViewing:k,$isDisabled:j,$depth:S,$indentSize:I,"data-depth":h,children:[i.jsx(jn,{ref:w,checked:$,disabled:j,onChange:C}),r&&i.jsx(F,{size:"sm",iconId:r,color:s}),i.jsx($b,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(_,{variant:"body",bold:$,children:t}),o&&i.jsx(jb,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(Sb,{children:a.map(z=>i.jsx(Ib,{size:"sm",iconId:z.iconId,color:z.color,title:z.tooltip},z.id))}),c&&c.length>0&&i.jsx(Rt,{actions:c,isSelected:$}),i.jsx(Db,{children:i.jsx(F,{iconId:"Right",color:"blue",size:"sm"})})]})});Hi.displayName="StudioSelectViewListItem";const Cb=f.div`
|
|
2648
2674
|
display: flex;
|
|
2649
2675
|
align-items: center;
|
|
2650
2676
|
position: relative;
|
|
@@ -2676,71 +2702,71 @@
|
|
|
2676
2702
|
&:active {
|
|
2677
2703
|
background-color: ${({$isDisabled:e})=>e?"transparent":"rgba(0, 0, 0, 0.1)"};
|
|
2678
2704
|
}
|
|
2679
|
-
|
|
2705
|
+
`,$b=f.div`
|
|
2680
2706
|
display: flex;
|
|
2681
2707
|
flex-direction: column;
|
|
2682
2708
|
gap: 2px;
|
|
2683
2709
|
flex: 1;
|
|
2684
2710
|
min-width: 0; /* Allow text truncation */
|
|
2685
|
-
`,
|
|
2711
|
+
`,jb=f(_)`
|
|
2686
2712
|
overflow: hidden;
|
|
2687
2713
|
text-overflow: ellipsis;
|
|
2688
2714
|
white-space: nowrap;
|
|
2689
|
-
`,
|
|
2715
|
+
`,Sb=f.div`
|
|
2690
2716
|
display: flex;
|
|
2691
2717
|
align-items: center;
|
|
2692
2718
|
gap: 4px;
|
|
2693
2719
|
padding-left: 8px;
|
|
2694
|
-
`,
|
|
2720
|
+
`,Ib=f(F)`
|
|
2695
2721
|
opacity: 0.8;
|
|
2696
|
-
`,
|
|
2722
|
+
`,Db=f.div`
|
|
2697
2723
|
display: flex;
|
|
2698
2724
|
align-items: center;
|
|
2699
2725
|
flex-shrink: 0;
|
|
2700
|
-
`,wb=e=>t=>o=>()=>o.call(e,t);class qn{constructor(t,o,n,r){E(this,"parent");E(this,"_itemMap");E(this,"disposer");E(this,"_items");E(this,"listeners",[]);E(this,"context");E(this,"resolvedItems");E(this,"resolver");E(this,"version");E(this,"initialized");this.parent=t,this.context=T.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=T.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],T.makeObservable(this,{items:T.computed,initialized:T.observable,version:T.observable,refresh:T.action,resolvedItems:T.observable,context:T.observable})}filterByInputItem(t,o){return!!t}sortByInputItem(t,o){var n;return t.name?(n=t.name)==null?void 0:n.localeCompare(o.name):-1}filterItem(t,o){return!0}sortItem(t,o){return 0}refresh(){this.version=this.version+1}get items(){if(!this.initialized||this.version<0)return[];const t=this.resolvedItems,o=[...new Set(t)],n=p=>this._itemMap(p,this.context),r=p=>this.filterByInputItem(p,this.context),s=o.filter(r.bind(this)).sort(this.sortByInputItem.bind(this)).map(n),l=p=>this.filterItem(p,this.context),a=s.filter(l.bind(this)).sort(this.sortItem.bind(this));return Array.from(this._items.keys()).filter(p=>!a.find(h=>h.id===p)).forEach(p=>{W.kosAction(()=>{this._items.delete(p)})}),a.reduce((p,h)=>{if(!p.has(h.id))W.kosAction(()=>{p.set(h.id,h)});else{const f=p.get(h.id);f&&W.kosAction(()=>{const m=Object.assign(f,h);p.set(h.id,m)})}return p},this._items),a.map(p=>this._items.get(p.id))}async init(){if(!this.initialized){if(W.isKosDataModel(this.parent)&&await W.whenReady(this.parent),this.resolver){const t=wb(this.parent)(this.context)(this.resolver);this.disposer=T.reaction(t,o=>{this.resolvedItems=o,this.refresh()},{fireImmediately:!0})}W.kosAction(()=>{this.initialized=!0})}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}dispose(){this.disposer&&this.disposer(),W.kosAction(()=>{this.initialized=!1})}}const Cb=e=>e.data!==void 0,Li=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];Cb(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class Zn extends qn{constructor(o,n,r,s){super(o,Li(o)(n),r,s);E(this,"_key");this._key=Array.isArray(n)?n:[n]}}class $b extends Zn{constructor(t,o,n,r){super(t,o,n,r),T.makeObservable(this,{groups:T.computed,itemsByGroup:T.computed})}get itemsByGroup(){return this.items.reduce((t,o)=>{const n=o.group.groupId;return t[n]||(t[n]=[]),t[n].push(o),t},{})}get groups(){return this.items.map(t=>t.group).sort(this.sortGroup.bind(this))}getGroupItems(t){return this.itemsByGroup[t]||[]}sortGroup(t,o){return t.name.localeCompare(o.name)}}class Sb{constructor(t,o=[]){E(this,"items");E(this,"parent");this.parent=t,this.items=o.map(n=>({id:`${this.parent.id}-${n.name.toString()}`,name:n.key||n.name.toString(),data:n,value:this.parent[n.name]}))}}const Xn=Symbol.for("kos.list.source"),Jn="__kos_source__";function mo(e,t){return{...e,[Xn]:t,[Jn]:t}}function Bi(e){return e[Xn]??e[Jn]}function jb(e,t){if(t in e)return e[t];const o=Bi(e);if(o&&typeof o=="object"&&t in o)return o[t]}function Ib(e){return typeof e=="object"&&e!==null&&"locked"in e&&typeof e.locked=="boolean"}class Wi{constructor(t,o,n,r,s){E(this,"parent");E(this,"_itemMap");E(this,"rootResolver");E(this,"childResolver");E(this,"rootDisposer");E(this,"rootTrackingFn");E(this,"childTrackingFn");E(this,"_nodes");E(this,"_rootIds");E(this,"context");E(this,"version");E(this,"initialized");E(this,"_expandingAll",!1);E(this,"_childDisposers",new Map);this.parent=t,this.context=T.observable.map(new Map(Object.entries(s||{}))),this._nodes=T.observable.map(new Map),this._rootIds=T.observable.array([]),this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),T.makeObservable(this,{context:T.observable,version:T.observable,initialized:T.observable,tree:T.computed,rootItems:T.computed,loadingStates:T.computed,loadedChildren:T.computed,originalItems:T.computed,expandBranch:T.action,collapseBranch:T.action,clearCache:T.action,refresh:T.action,expandAll:T.action})}filterByInputItem(t,o){return!0}sortByInputItem(t,o){return 0}filterItem(t,o){return!0}sortItem(t,o){return 0}async getRootItems(){return await this.rootResolver.call(this.parent,this.context)}async getChildren(t,o){return await this.childResolver.call(this.parent,t,o)}itemMap(t,o){return this._itemMap(t,o)}refresh(){this.version=this.version+1}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}get tree(){return this.version,this._rootIds.map(t=>this.buildBranch(t)).filter(t=>t!==null)}get rootItems(){return this._rootIds.map(t=>{var o;return(o=this._nodes.get(t))==null?void 0:o.original}).filter(t=>t!==void 0)}get loadingStates(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,{status:o.fetchState,error:o.error,timestamp:o.timestamp})}),t}get loadedChildren(){const t=new Map;return this._nodes.forEach((o,n)=>{if(o.fetchState==="loaded"&&o.childIds.length>0){const r=o.childIds.map(s=>{var l;return(l=this._nodes.get(s))==null?void 0:l.original}).filter(s=>s!==void 0);t.set(n,r)}}),t}get originalItems(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,o.original)}),t}buildBranch(t){const o=this._nodes.get(t);if(!o||!this.filterByInputItem(o.original,this.context)||!this.filterItem(o.transformed,this.context))return null;const n=o.childIds.map(r=>this.buildBranch(r)).filter(r=>r!==null);return n.sort((r,s)=>this.sortItem(r,s)),{...o.transformed,branches:n,loadingState:{status:o.fetchState,error:o.error,timestamp:o.timestamp},hasChildren:o.hasChildren,isLeaf:o.hasChildren===!1}}setNode(t,o,n="idle"){const r=this.getItemId(t),s=this._nodes.get(r);if(s&&s.parentId!==o){const a=s.parentId;if(a){const u=this._nodes.get(a);if(u){const p=u.childIds.indexOf(r);p!==-1&&u.childIds.splice(p,1)}}}const l={original:t,transformed:mo(this._itemMap(t,this.context),t),parentId:o,childIds:(s==null?void 0:s.childIds)??[],hasChildren:this.hasChildren(t),fetchState:(s==null?void 0:s.fetchState)??n,error:s==null?void 0:s.error,timestamp:s==null?void 0:s.timestamp};return this._nodes.set(r,l),r}setChildren(t,o){const n=this._nodes.get(t);if(!n)return;const l=[...o.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a,t));T.runInAction(()=>{n.childIds=l,n.fetchState="loaded",n.timestamp=Date.now()})}async expandBranch(t,o){const n=this._nodes.get(t);if(!n){console.warn(`expandBranch: Node ${t} not found`);return}if(!(n.fetchState==="loading"||n.fetchState==="loaded")){T.runInAction(()=>{n.fetchState="loading",n.timestamp=Date.now()});try{const r=await this.getChildren(o,this.context);T.runInAction(()=>{this.setChildren(t,r)}),this.setupChildReaction(t,o)}catch(r){T.runInAction(()=>{n.fetchState="error",n.error=r,n.timestamp=Date.now()})}}}setupChildReaction(t,o){const n=this._childDisposers.get(t);n&&n();const r=W.kosAutoEffect(()=>{this.childTrackingFn?this.childTrackingFn(this.parent,o,this.context):this.childResolver.call(this.parent,o,this.context),this.reloadChildren(t,o)});this._childDisposers.set(t,r)}async reloadChildren(t,o){const n=this._nodes.get(t);if(!(!n||n.fetchState!=="loaded"))try{const r=await this.getChildren(o,this.context);T.runInAction(()=>{const s=new Set(n.childIds),u=[...r.filter(h=>this.filterByInputItem(h,this.context))].sort(this.sortByInputItem.bind(this)).map(h=>this.setNode(h,t)),p=new Set(u);for(const h of s)if(!p.has(h)){const f=this._nodes.get(h);f&&(this.disposeChildReaction(h),this.removeChildrenRecursively(f.childIds)),this._nodes.delete(h)}n.childIds=u,n.timestamp=Date.now()})}catch(r){console.error(`Failed to reload children for ${t}:`,r)}}disposeChildReaction(t){const o=this._childDisposers.get(t);o&&(o(),this._childDisposers.delete(t))}async expandAll(){if(!this._expandingAll){this._expandingAll=!0;try{await this.expandNodesRecursively(this._rootIds.slice())}finally{this._expandingAll=!1}}}async expandNodesRecursively(t){const o=t.map(s=>this._nodes.get(s)).filter(s=>s!==void 0&&s.hasChildren!==!1);if(o.length===0)return;const n=o.filter(s=>s.fetchState==="idle");n.length>0&&await Promise.all(n.map(s=>this.expandBranch(this.getItemId(s.original),s.original)));const r=[];for(const s of o)r.push(...s.childIds);r.length>0&&await this.expandNodesRecursively(r)}collapseBranch(t){const o=this._nodes.get(t);o&&(this.disposeChildReaction(t),T.runInAction(()=>{this.disposeDescendantReactions(o.childIds),this.removeChildrenRecursively(o.childIds),o.childIds=[],o.fetchState="idle",o.error=void 0,o.timestamp=Date.now()}))}disposeDescendantReactions(t){for(const o of t){this.disposeChildReaction(o);const n=this._nodes.get(o);n&&this.disposeDescendantReactions(n.childIds)}}removeChildrenRecursively(t){for(const o of t){const n=this._nodes.get(o);n&&(this.removeChildrenRecursively(n.childIds),this._nodes.delete(o))}}clearCache(t){t?this.collapseBranch(t):(this._childDisposers.forEach(o=>o()),this._childDisposers.clear(),T.runInAction(()=>{const o=new Set(this._rootIds),n=[];this._nodes.forEach((r,s)=>{o.has(s)?(r.childIds=[],r.fetchState="idle",r.error=void 0):n.push(s)}),n.forEach(r=>this._nodes.delete(r))}))}async init(){this.initialized&&T.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1}),W.isKosDataModel(this.parent)&&await W.whenReady(this.parent);try{const t=await this.getRootItems();T.runInAction(()=>{const r=[...t.filter(s=>this.filterByInputItem(s,this.context))].sort(this.sortByInputItem.bind(this)).map(s=>this.setNode(s));this._rootIds.replace(r),this.initialized=!0})}catch(t){console.error("Failed to load root items:",t),T.runInAction(()=>{this.initialized=!0})}this.rootDisposer=W.kosAutoEffect(()=>{this.rootTrackingFn?this.rootTrackingFn(this.parent,this.context):this.rootResolver.call(this.parent,this.context),this.reloadRoots()})}async reloadRoots(){if(this.initialized)try{const t=await this.getRootItems();T.runInAction(()=>{const o=new Set(this._rootIds),s=[...t.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a)),l=new Set(s);for(const a of o)if(!l.has(a)){const u=this._nodes.get(a);u&&this.removeChildrenRecursively(u.childIds),this._nodes.delete(a)}this._rootIds.replace(s)})}catch(t){console.error("Failed to reload root items:",t)}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}dispose(){this.rootDisposer&&this.rootDisposer(),this._childDisposers.forEach(t=>t()),this._childDisposers.clear(),T.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1})}}function Zt(e){return e.build!==void 0}const Db=g.div`
|
|
2726
|
+
`,_b=e=>t=>o=>()=>o.call(e,t);class qn{constructor(t,o,n,r){E(this,"parent");E(this,"_itemMap");E(this,"disposer");E(this,"_items");E(this,"listeners",[]);E(this,"context");E(this,"resolvedItems");E(this,"resolver");E(this,"version");E(this,"initialized");this.parent=t,this.context=T.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=T.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],T.makeObservable(this,{items:T.computed,initialized:T.observable,version:T.observable,refresh:T.action,resolvedItems:T.observable,context:T.observable})}filterByInputItem(t,o){return!!t}sortByInputItem(t,o){var n;return t.name?(n=t.name)==null?void 0:n.localeCompare(o.name):-1}filterItem(t,o){return!0}sortItem(t,o){return 0}refresh(){this.version=this.version+1}get items(){if(!this.initialized||this.version<0)return[];const t=this.resolvedItems,o=[...new Set(t)],n=p=>this._itemMap(p,this.context),r=p=>this.filterByInputItem(p,this.context),s=o.filter(r.bind(this)).sort(this.sortByInputItem.bind(this)).map(n),c=p=>this.filterItem(p,this.context),a=s.filter(c.bind(this)).sort(this.sortItem.bind(this));return Array.from(this._items.keys()).filter(p=>!a.find(h=>h.id===p)).forEach(p=>{W.kosAction(()=>{this._items.delete(p)})}),a.reduce((p,h)=>{if(!p.has(h.id))W.kosAction(()=>{p.set(h.id,h)});else{const g=p.get(h.id);g&&W.kosAction(()=>{const m=Object.assign(g,h);p.set(h.id,m)})}return p},this._items),a.map(p=>this._items.get(p.id))}async init(){if(!this.initialized){if(W.isKosDataModel(this.parent)&&await W.whenReady(this.parent),this.resolver){const t=_b(this.parent)(this.context)(this.resolver);this.disposer=T.reaction(t,o=>{this.resolvedItems=o,this.refresh()},{fireImmediately:!0})}W.kosAction(()=>{this.initialized=!0})}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}dispose(){this.disposer&&this.disposer(),W.kosAction(()=>{this.initialized=!1})}}const Tb=e=>e.data!==void 0,Ui=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];Tb(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class Zn extends qn{constructor(o,n,r,s){super(o,Ui(o)(n),r,s);E(this,"_key");this._key=Array.isArray(n)?n:[n]}}class Eb extends Zn{constructor(t,o,n,r){super(t,o,n,r),T.makeObservable(this,{groups:T.computed,itemsByGroup:T.computed})}get itemsByGroup(){return this.items.reduce((t,o)=>{const n=o.group.groupId;return t[n]||(t[n]=[]),t[n].push(o),t},{})}get groups(){return this.items.map(t=>t.group).sort(this.sortGroup.bind(this))}getGroupItems(t){return this.itemsByGroup[t]||[]}sortGroup(t,o){return t.name.localeCompare(o.name)}}class zb{constructor(t,o=[]){E(this,"items");E(this,"parent");this.parent=t,this.items=o.map(n=>({id:`${this.parent.id}-${n.name.toString()}`,name:n.key||n.name.toString(),data:n,value:this.parent[n.name]}))}}const Xn=Symbol.for("kos.list.source"),Jn="__kos_source__";function xo(e,t){return{...e,[Xn]:t,[Jn]:t}}function Gi(e){return e[Xn]??e[Jn]}function Mb(e,t){if(t in e)return e[t];const o=Gi(e);if(o&&typeof o=="object"&&t in o)return o[t]}function Ob(e){return typeof e=="object"&&e!==null&&"locked"in e&&typeof e.locked=="boolean"}class Ki{constructor(t,o,n,r,s){E(this,"parent");E(this,"_itemMap");E(this,"rootResolver");E(this,"childResolver");E(this,"rootDisposer");E(this,"rootTrackingFn");E(this,"childTrackingFn");E(this,"_nodes");E(this,"_rootIds");E(this,"context");E(this,"version");E(this,"initialized");E(this,"_expandingAll",!1);E(this,"_childDisposers",new Map);this.parent=t,this.context=T.observable.map(new Map(Object.entries(s||{}))),this._nodes=T.observable.map(new Map),this._rootIds=T.observable.array([]),this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),T.makeObservable(this,{context:T.observable,version:T.observable,initialized:T.observable,tree:T.computed,rootItems:T.computed,loadingStates:T.computed,loadedChildren:T.computed,originalItems:T.computed,expandBranch:T.action,collapseBranch:T.action,clearCache:T.action,refresh:T.action,expandAll:T.action})}filterByInputItem(t,o){return!0}sortByInputItem(t,o){return 0}filterItem(t,o){return!0}sortItem(t,o){return 0}async getRootItems(){return await this.rootResolver.call(this.parent,this.context)}async getChildren(t,o){return await this.childResolver.call(this.parent,t,o)}itemMap(t,o){return this._itemMap(t,o)}refresh(){this.version=this.version+1}updateContextValue(t,o){W.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}get tree(){return this.version,this._rootIds.map(t=>this.buildBranch(t)).filter(t=>t!==null)}get rootItems(){return this._rootIds.map(t=>{var o;return(o=this._nodes.get(t))==null?void 0:o.original}).filter(t=>t!==void 0)}get loadingStates(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,{status:o.fetchState,error:o.error,timestamp:o.timestamp})}),t}get loadedChildren(){const t=new Map;return this._nodes.forEach((o,n)=>{if(o.fetchState==="loaded"&&o.childIds.length>0){const r=o.childIds.map(s=>{var c;return(c=this._nodes.get(s))==null?void 0:c.original}).filter(s=>s!==void 0);t.set(n,r)}}),t}get originalItems(){const t=new Map;return this._nodes.forEach((o,n)=>{t.set(n,o.original)}),t}buildBranch(t){const o=this._nodes.get(t);if(!o||!this.filterByInputItem(o.original,this.context)||!this.filterItem(o.transformed,this.context))return null;const n=o.childIds.map(r=>this.buildBranch(r)).filter(r=>r!==null);return n.sort((r,s)=>this.sortItem(r,s)),{...o.transformed,branches:n,loadingState:{status:o.fetchState,error:o.error,timestamp:o.timestamp},hasChildren:o.hasChildren,isLeaf:o.hasChildren===!1}}setNode(t,o,n="idle"){const r=this.getItemId(t),s=this._nodes.get(r);if(s&&s.parentId!==o){const a=s.parentId;if(a){const u=this._nodes.get(a);if(u){const p=u.childIds.indexOf(r);p!==-1&&u.childIds.splice(p,1)}}}const c={original:t,transformed:xo(this._itemMap(t,this.context),t),parentId:o,childIds:(s==null?void 0:s.childIds)??[],hasChildren:this.hasChildren(t),fetchState:(s==null?void 0:s.fetchState)??n,error:s==null?void 0:s.error,timestamp:s==null?void 0:s.timestamp};return this._nodes.set(r,c),r}setChildren(t,o){const n=this._nodes.get(t);if(!n)return;const c=[...o.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a,t));T.runInAction(()=>{n.childIds=c,n.fetchState="loaded",n.timestamp=Date.now()})}async expandBranch(t,o){const n=this._nodes.get(t);if(!n){console.warn(`expandBranch: Node ${t} not found`);return}if(!(n.fetchState==="loading"||n.fetchState==="loaded")){T.runInAction(()=>{n.fetchState="loading",n.timestamp=Date.now()});try{const r=await this.getChildren(o,this.context);T.runInAction(()=>{this.setChildren(t,r)}),this.setupChildReaction(t,o)}catch(r){T.runInAction(()=>{n.fetchState="error",n.error=r,n.timestamp=Date.now()})}}}setupChildReaction(t,o){const n=this._childDisposers.get(t);n&&n();const r=W.kosAutoEffect(()=>{this.childTrackingFn?this.childTrackingFn(this.parent,o,this.context):this.childResolver.call(this.parent,o,this.context),this.reloadChildren(t,o)});this._childDisposers.set(t,r)}async reloadChildren(t,o){const n=this._nodes.get(t);if(!(!n||n.fetchState!=="loaded"))try{const r=await this.getChildren(o,this.context);T.runInAction(()=>{const s=new Set(n.childIds),u=[...r.filter(h=>this.filterByInputItem(h,this.context))].sort(this.sortByInputItem.bind(this)).map(h=>this.setNode(h,t)),p=new Set(u);for(const h of s)if(!p.has(h)){const g=this._nodes.get(h);g&&(this.disposeChildReaction(h),this.removeChildrenRecursively(g.childIds)),this._nodes.delete(h)}n.childIds=u,n.timestamp=Date.now()})}catch(r){console.error(`Failed to reload children for ${t}:`,r)}}disposeChildReaction(t){const o=this._childDisposers.get(t);o&&(o(),this._childDisposers.delete(t))}async expandAll(){if(!this._expandingAll){this._expandingAll=!0;try{await this.expandNodesRecursively(this._rootIds.slice())}finally{this._expandingAll=!1}}}async expandNodesRecursively(t){const o=t.map(s=>this._nodes.get(s)).filter(s=>s!==void 0&&s.hasChildren!==!1);if(o.length===0)return;const n=o.filter(s=>s.fetchState==="idle");n.length>0&&await Promise.all(n.map(s=>this.expandBranch(this.getItemId(s.original),s.original)));const r=[];for(const s of o)r.push(...s.childIds);r.length>0&&await this.expandNodesRecursively(r)}collapseBranch(t){const o=this._nodes.get(t);o&&(this.disposeChildReaction(t),T.runInAction(()=>{this.disposeDescendantReactions(o.childIds),this.removeChildrenRecursively(o.childIds),o.childIds=[],o.fetchState="idle",o.error=void 0,o.timestamp=Date.now()}))}disposeDescendantReactions(t){for(const o of t){this.disposeChildReaction(o);const n=this._nodes.get(o);n&&this.disposeDescendantReactions(n.childIds)}}removeChildrenRecursively(t){for(const o of t){const n=this._nodes.get(o);n&&(this.removeChildrenRecursively(n.childIds),this._nodes.delete(o))}}clearCache(t){t?this.collapseBranch(t):(this._childDisposers.forEach(o=>o()),this._childDisposers.clear(),T.runInAction(()=>{const o=new Set(this._rootIds),n=[];this._nodes.forEach((r,s)=>{o.has(s)?(r.childIds=[],r.fetchState="idle",r.error=void 0):n.push(s)}),n.forEach(r=>this._nodes.delete(r))}))}async init(){this.initialized&&T.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1}),W.isKosDataModel(this.parent)&&await W.whenReady(this.parent);try{const t=await this.getRootItems();T.runInAction(()=>{const r=[...t.filter(s=>this.filterByInputItem(s,this.context))].sort(this.sortByInputItem.bind(this)).map(s=>this.setNode(s));this._rootIds.replace(r),this.initialized=!0})}catch(t){console.error("Failed to load root items:",t),T.runInAction(()=>{this.initialized=!0})}this.rootDisposer=W.kosAutoEffect(()=>{this.rootTrackingFn?this.rootTrackingFn(this.parent,this.context):this.rootResolver.call(this.parent,this.context),this.reloadRoots()})}async reloadRoots(){if(this.initialized)try{const t=await this.getRootItems();T.runInAction(()=>{const o=new Set(this._rootIds),s=[...t.filter(a=>this.filterByInputItem(a,this.context))].sort(this.sortByInputItem.bind(this)).map(a=>this.setNode(a)),c=new Set(s);for(const a of o)if(!c.has(a)){const u=this._nodes.get(a);u&&this.removeChildrenRecursively(u.childIds),this._nodes.delete(a)}this._rootIds.replace(s)})}catch(t){console.error("Failed to reload root items:",t)}}whenReady(){return new Promise(t=>{const o=W.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}dispose(){this.rootDisposer&&this.rootDisposer(),this._childDisposers.forEach(t=>t()),this._childDisposers.clear(),T.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1})}}function Zt(e){return e.build!==void 0}const Rb=f.div`
|
|
2701
2727
|
width: 100%;
|
|
2702
|
-
`,
|
|
2728
|
+
`,Nb=(e,t,o)=>e.items.map(n=>{const r=Zt(t)?t.build(n):t;return i.jsx(r,{"data-key":n.id,...n,onListItemAction:o},n.id)}),Qn=W.kosComponent(({dataProvider:e,firstChild:t,ItemTemplate:o,lastChild:n,onListItemAction:r,onInit:s,emptyState:c,className:a,itemListRenderer:u=Nb})=>{const p=no(e,s),h=p&&e?u(e,o,r):[];return i.jsx(Yn,{dataProvider:e||void 0,onListItemAction:r,children:i.jsxs(Rb,{className:a,children:[t,p?h.length===0&&c?c:h:null,n]})})}),_o=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:c,className:a,...u})=>{const[p,h]=d.useState(o??[]),g=d.useRef(p??[]);d.useLayoutEffect(()=>{g.current=p},[p]),d.useEffect(()=>{h(o??[])},[o]);const m=d.useCallback(y=>{t(y,g.current.includes(y)?"unselected":"selected"),h(v=>e?[y]:v.includes(y)?v.filter(w=>w!==y):[...v,y])},[e,t]),x=d.useCallback(y=>g.current.includes(y),[]),b=d.useMemo(()=>({isSelected:x,selected:p,toggleSelection:m,isDisabled:!!n}),[x,p,m,n]);return d.useEffect(()=>{var y,v;if(r&&(s!=null&&s.items)&&g.current.length===0){let w;c?w=(y=c(s.items))==null?void 0:y.id:w=(v=s.items[0])==null?void 0:v.id,w&&m(w)}},[r,s==null?void 0:s.items,c,m]),i.jsx(wt.Provider,{value:b,children:i.jsx(Qn,{dataProvider:s,className:a,...u})})});function Yi(e){return e.build!==void 0}const Fb=e=>(t,o,n)=>t.groups.reduce((s,c)=>s.find(a=>a.groupId===c.groupId)?s:[...s,c],[]).map(s=>{const c=Yi(e)?e.build(s):e,u=t.getGroupItems(s.groupId).map(p=>{const h=Zt(o)?o.build(p):o;return i.jsx(h,{"data-key":p.id,...p,onListItemAction:n},p.id)});return i.jsx(c,{groupId:s.groupId,name:s.name,children:u},s.groupId)}),er=d.createContext({openedGroups:[],toggleGroup:Se});function Ab(e){const t=e.supportMultipleOpen??!0,[o,n]=d.useState(e.openedGroups??[]),r=d.useCallback(c=>{var a;(a=e.onGroupOpen)==null||a.call(e,c,o.includes(c)?"closed":"opened"),n(u=>t?u.includes(c)?u.filter(p=>p!==c):[...u,c]:[c])},[o,e,t]);d.useEffect(()=>{n(e.openedGroups??[])},[e.openedGroups]);const s=d.useMemo(()=>({openedGroups:o,toggleGroup:r}),[o,r]);return i.jsx(er.Provider,{value:s,children:i.jsx(_o,{...e,itemListRenderer:Fb(e.GroupTemplate)})})}const qi=()=>{const e=d.useContext(er);return e||{openedGroups:[],toggleGroup:Se}},Lb=({children:e,name:t,groupId:o,className:n})=>{const{openedGroups:r,toggleGroup:s}=qi(),c=r.includes(o),a=d.useCallback(()=>{s(o)},[o,s]);return i.jsxs(Zi,{className:n,children:[i.jsxs(Wb,{"data-open":c,onClick:a,children:[c?i.jsx(F,{iconId:"CaretDown",size:"xsm"}):i.jsx(F,{iconId:"CaretRight",size:"xsm"}),i.jsx(_,{variant:"body",bold:!0,children:t})]}),i.jsx(Pb,{children:c?i.jsx(Vb,{className:"list-container",children:e}):null})]},o)},Bb=({children:e,groupId:t,className:o})=>i.jsx(Zi,{className:o,children:e},t),Zi=f.div`
|
|
2703
2729
|
display: flex;
|
|
2704
2730
|
flex-direction: column;
|
|
2705
2731
|
padding-bottom: 8px;
|
|
2706
|
-
`,
|
|
2732
|
+
`,Wb=f.div`
|
|
2707
2733
|
display: flex;
|
|
2708
2734
|
flex: 0;
|
|
2709
2735
|
cursor: pointer;
|
|
2710
2736
|
gap: 4px;
|
|
2711
2737
|
padding-inline: 12px 12px;
|
|
2712
2738
|
align-items: center;
|
|
2713
|
-
`,
|
|
2739
|
+
`,Pb=f.div`
|
|
2714
2740
|
display: flex;
|
|
2715
2741
|
flex-direction: column;
|
|
2716
|
-
`,
|
|
2742
|
+
`,Vb=f.div`
|
|
2717
2743
|
padding-inline-start: 16px;
|
|
2718
2744
|
align-items: center;
|
|
2719
2745
|
gap: 6px;
|
|
2720
2746
|
padding-block-start: 8px;
|
|
2721
|
-
`,
|
|
2747
|
+
`,ro=f.div`
|
|
2722
2748
|
align-items: center;
|
|
2723
2749
|
align-self: stretch;
|
|
2724
2750
|
background: var(--Grey-White, #fff);
|
|
2725
2751
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2726
2752
|
display: flex;
|
|
2727
|
-
`,tr=
|
|
2753
|
+
`,tr=f(ro)`
|
|
2728
2754
|
padding: 0 0 6px 0;
|
|
2729
|
-
`,
|
|
2755
|
+
`,Xi=f(ro)`
|
|
2730
2756
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2731
|
-
`,
|
|
2757
|
+
`,Ji=f(tr)`
|
|
2732
2758
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2733
|
-
`,To=
|
|
2759
|
+
`,To=f.div`
|
|
2734
2760
|
align-items: center;
|
|
2735
2761
|
display: flex;
|
|
2736
2762
|
gap: 16px;
|
|
2737
2763
|
height: 30px;
|
|
2738
2764
|
justify-content: center;
|
|
2739
2765
|
padding: 8px;
|
|
2740
|
-
`,
|
|
2766
|
+
`,Qi=f(To)`
|
|
2741
2767
|
height: initial;
|
|
2742
2768
|
padding: 0 4px 0 14px;
|
|
2743
|
-
`,Eo=
|
|
2769
|
+
`,Eo=f.div`
|
|
2744
2770
|
align-items: center;
|
|
2745
2771
|
align-self: stretch;
|
|
2746
2772
|
display: flex;
|
|
@@ -2749,10 +2775,10 @@
|
|
|
2749
2775
|
height: 30px;
|
|
2750
2776
|
justify-content: space-between;
|
|
2751
2777
|
padding: 8px 8px 8px 4px;
|
|
2752
|
-
`,
|
|
2778
|
+
`,ea=f(Eo)`
|
|
2753
2779
|
height: initial;
|
|
2754
2780
|
padding: 0;
|
|
2755
|
-
`,
|
|
2781
|
+
`,ta=d.memo(({className:e,disabled:t,id:o,label:n,mode:r="standard",name:s,showDivider:c=!0})=>{const{selected:a,toggleSelection:u,isDisabled:p}=Ie(),h=d.useCallback(()=>{u(o)},[o,u]),g=r==="compact"?Qi:To,m=r==="compact"?ea:Eo,x=c?r==="compact"?Ji:Xi:r==="compact"?tr:ro;return i.jsxs(x,{className:e,children:[i.jsx(g,{children:i.jsx(yt,{disabled:p||t,checked:a.includes(o),onChange:h})}),i.jsxs(m,{children:[i.jsx(_,{variant:"body",children:s}),!!n&&i.jsx(_,{color:"grey",variant:"body",children:n})]})]})}),Hb=f.div`
|
|
2756
2782
|
display: flex;
|
|
2757
2783
|
padding: 4px 12px 4px 4px;
|
|
2758
2784
|
align-items: center;
|
|
@@ -2760,14 +2786,14 @@
|
|
|
2760
2786
|
align-self: stretch;
|
|
2761
2787
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2762
2788
|
background: var(--Grey-White, #fff);
|
|
2763
|
-
`,
|
|
2789
|
+
`,Ub=f.div`
|
|
2764
2790
|
display: flex;
|
|
2765
2791
|
height: 30px;
|
|
2766
2792
|
padding: 8px;
|
|
2767
2793
|
justify-content: center;
|
|
2768
2794
|
align-items: center;
|
|
2769
2795
|
gap: 16px;
|
|
2770
|
-
`,
|
|
2796
|
+
`,Gb=f.div`
|
|
2771
2797
|
flex: 1 1 auto;
|
|
2772
2798
|
display: flex;
|
|
2773
2799
|
align-items: center;
|
|
@@ -2776,7 +2802,7 @@
|
|
|
2776
2802
|
padding: 8px 8px 8px 4px;
|
|
2777
2803
|
gap: 4px;
|
|
2778
2804
|
align-self: stretch;
|
|
2779
|
-
`,
|
|
2805
|
+
`,Kb=e=>{const{selected:t,toggleSelection:o,isDisabled:n}=Ie(),r=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsxs(Hb,{children:[i.jsx(Ub,{children:i.jsx("input",{onChange:r,type:"checkbox",checked:t.includes(e.id),disabled:n})}),i.jsx(Gb,{children:i.jsx(_,{variant:"body",children:e.name})})]})},[Ke]=O(["named-list-item"]),Yb=d.memo(({id:e,iconId:t,iconColor:o,suffixIcons:n,name:r,className:s,subText:c,subTextColor:a})=>{const{selected:u,toggleSelection:p,isDisabled:h}=Ie(),g=d.useCallback(()=>{h||p(e)},[e,p,h]),m=u.includes(e);return i.jsx(M.ClassNames,{children:({cx:x})=>i.jsxs(qb,{className:x("named-list-item",s,{isSelected:m,isDisabled:h}),"data-named-item-id":e,onClick:g,children:[i.jsxs(Zb,{className:"named-list-item-text-wrapper",children:[t&&i.jsx(F,{size:"sm",iconId:t,color:o}),i.jsx(_,{className:"named-list-item-text",variant:"body",children:r}),!!n&&i.jsx(Jb,{children:n.map(({iconId:b,iconColor:y})=>i.jsx(F,{size:"xsm",iconId:b,color:m?"white":y},b))})]}),!!c&&i.jsx(Xb,{className:x({hasIcon:!!t}),children:i.jsx(Qb,{color:a??"dark",variant:"body",children:c})})]})})}),qb=f.div`
|
|
2780
2806
|
display: flex;
|
|
2781
2807
|
padding-top: ${Ke("padding-y")};
|
|
2782
2808
|
padding-right: ${Ke("padding-right")};
|
|
@@ -2796,7 +2822,7 @@
|
|
|
2796
2822
|
color: ${Ke("color-selected")};
|
|
2797
2823
|
background-color: ${Ke("background-color-selected")};
|
|
2798
2824
|
}
|
|
2799
|
-
`,
|
|
2825
|
+
`,Zb=f.div`
|
|
2800
2826
|
width: 100%;
|
|
2801
2827
|
display: flex;
|
|
2802
2828
|
align-items: center;
|
|
@@ -2805,7 +2831,7 @@
|
|
|
2805
2831
|
.named-list-item-text {
|
|
2806
2832
|
word-break: break-word;
|
|
2807
2833
|
}
|
|
2808
|
-
`,
|
|
2834
|
+
`,Xb=f.div`
|
|
2809
2835
|
width: 100%;
|
|
2810
2836
|
display: flex;
|
|
2811
2837
|
align-items: center;
|
|
@@ -2813,37 +2839,37 @@
|
|
|
2813
2839
|
&.hasIcon {
|
|
2814
2840
|
padding-left: ${Ke("subtext-padding-with-icon")};
|
|
2815
2841
|
}
|
|
2816
|
-
`,
|
|
2842
|
+
`,Jb=f.div`
|
|
2817
2843
|
display: flex;
|
|
2818
2844
|
align-items: center;
|
|
2819
2845
|
justify-content: flex-end;
|
|
2820
2846
|
margin-left: auto;
|
|
2821
2847
|
gap: ${Ke("column-gap")};
|
|
2822
|
-
`,
|
|
2848
|
+
`,Qb=f(_)`
|
|
2823
2849
|
-webkit-box-orient: vertical;
|
|
2824
2850
|
-webkit-line-clamp: 2;
|
|
2825
2851
|
display: -webkit-box;
|
|
2826
2852
|
overflow-wrap: anywhere;
|
|
2827
2853
|
overflow: hidden;
|
|
2828
2854
|
text-overflow: ellipsis;
|
|
2829
|
-
`,
|
|
2855
|
+
`,ex=f.div`
|
|
2830
2856
|
display: flex;
|
|
2831
|
-
padding: ${
|
|
2857
|
+
padding: ${l("spacing-8")} ${l("spacing-10")};
|
|
2832
2858
|
align-items: center;
|
|
2833
2859
|
gap: 6px;
|
|
2834
2860
|
align-self: stretch;
|
|
2835
2861
|
color: inherit;
|
|
2836
2862
|
background-color: transparent;
|
|
2837
|
-
border-bottom: 1px solid ${
|
|
2863
|
+
border-bottom: 1px solid ${l("color-grey20")};
|
|
2838
2864
|
&.isSelected {
|
|
2839
|
-
color: ${
|
|
2840
|
-
background-color: ${
|
|
2865
|
+
color: ${l("color-white")};
|
|
2866
|
+
background-color: ${l("color-primary")};
|
|
2841
2867
|
}
|
|
2842
|
-
`,Yb=e=>{const{selected:t,toggleSelection:o}=je(),n=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsx(z.ClassNames,{children:({cx:r})=>i.jsxs(Kb,{className:r({isSelected:t.includes(e.id)}),onClick:n,children:[e.iconId&&i.jsx(F,{size:"sm",iconId:e.iconId}),i.jsx(_,{variant:"body",children:e.name})]})})},qb=e=>{const[t,o]=d.useState(e);return{onGroupOpen:d.useCallback(async(r,s)=>{o((l=[])=>s==="opened"&&!(l!=null&&l.includes(r))?[...l,r]:s==="closed"&&l.includes(r)?l.filter(a=>a!==r):l)},[]),openedGroups:t}},Zb=(e,t={})=>{const[o,n]=d.useState(t),r=d.useCallback((l,a)=>{var f;const u=(f=e==null?void 0:e.items.find(m=>m.id===l))==null?void 0:f.group.groupId;if(!u)return;const p=o[u]||[],h=a==="selected"?{...o,[u]:[...p,l]}:{...o,[u]:p.filter(m=>m!==l)};n(h)},[e==null?void 0:e.items,o]);return{clear:d.useCallback(()=>{n({})},[]),groupSelection:o,onSelect:r}},Xb=(e=[],t=!0)=>{const[o,n]=d.useState(e),r=d.useCallback(l=>{n(a=>t?[l]:a.includes(l)?a.filter(u=>u!==l):[...a,l])},[t]);return{clear:d.useCallback(()=>{n([])},[]),onSelect:r,selected:o}};class Jb extends qn{constructor(o,n,r,s,l){super(o,n,r,l);E(this,"parentIdKey");E(this,"idKey");this.parentIdKey=s.parentIdKey,this.idKey=s.idKey,T.makeObservable(this,{tree:T.computed,childBranchLookup:T.computed,itemsById:T.computed})}sortBranch(o,n){return o.name.localeCompare(n.name)}get itemsById(){return this.items.reduce((o,n)=>({...o,[n[this.idKey]]:n}),{})}get childBranchLookup(){return this.items.reduce((o,n)=>{let r=n[this.parentIdKey];return(!r||this.itemsById[r]===void 0)&&(r="ROOT"),r&&o[r]?(o[r].push(n),o):(o[r]=[n],o)},{ROOT:[]})}get tree(){const o=r=>{const s=[];for(const l in r){let a={...r[l],branches:[]};const u=this.childBranchLookup[a[this.idKey]];a&&(u&&(a={...a,branches:o(u)}),s.push(a))}return s},n=this.childBranchLookup.ROOT;return n?o(n):[]}}const Zi=d.createContext(null),Qb=W.kosComponent(({children:e,singleBranchOnly:t,openedBranches:o,setOpenedBranches:n,dataProvider:r})=>{const[s,l]=d.useState([]),a=o??s,u=n??l,p=d.useRef(a);d.useLayoutEffect(()=>{p.current=a},[a]);const h=d.useCallback(m=>{if(!(r!=null&&r.tree))return;const x=m[r.idKey],b=p.current.includes(x),y=w=>w.branches.flatMap($=>{const k=$[r.idKey];return $.branches.length?[k,...y($)]:[]}),v=y(m);if(t){const w=[],$=k=>{const S=k[r.parentIdKey];if(S){const C=r.itemsById[S];C&&(w.push(S),$(C))}};$(m),u(b?w:[...w,x])}else{const w=b?p.current.filter($=>x!==$&&!v.includes($)):[...p.current,x];u(w)}},[r==null?void 0:r.idKey,r==null?void 0:r.itemsById,r==null?void 0:r.parentIdKey,r==null?void 0:r.tree,u,t]),f=d.useMemo(()=>({openedBranches:a,toggleBranch:h}),[a,h]);return i.jsx(Zi.Provider,{value:f,children:e})}),Xi=()=>{const e=d.useContext(Zi);if(e===null)throw new Error("TreeContext can only be used inside children of TreeContextProvider");return e};function Ji(e){return e.build!==void 0}const ex=e=>(t,o,n)=>{const r=(s,l)=>{if(!s.branches.length&&s.isGroup)return null;if(s.branches.length){const a=Ji(e)?e.build(s):e,u=s.branches.map(p=>{if(p.branches.length)return r(p,!0);{const h=Zt(o)?o.build(p):o;return i.jsx(h,{"data-key":p.id,...p,onListItemAction:n},p.id)}});return i.jsx(z.ClassNames,{children:({cx:p})=>i.jsx(a,{className:p({isNotRoot:l},s.className),...s,children:u},s.id)},s.id)}else{const a=Zt(o)?o.build(s):o;return i.jsx(a,{"data-key":s.id,...s,onListItemAction:n},s.id)}};return t.tree.map(s=>r(s))},tx=W.kosComponent(({dataProvider:e,ItemTemplate:t,onSelect:o,BranchTemplate:n,openedBranches:r,setOpenedBranches:s,singleBranchOnly:l,className:a,autoSelectFirstItem:u,selected:p,emptyState:h,getFirstItem:f,onListItemAction:m})=>i.jsx(Qb,{dataProvider:e,openedBranches:r,setOpenedBranches:s,singleBranchOnly:l,children:i.jsx(_o,{onSelect:o,dataProvider:e,ItemTemplate:t,autoSelectFirstItem:u,emptyState:h,className:a,selected:p,onListItemAction:m,getFirstItem:f,itemListRenderer:ex(n)})}));function ox(e){return(e==null?void 0:e.build)!==void 0}const Qi=d.createContext(null),nx=()=>{const e=d.useContext(Qi);if(e===null)throw new Error("useAsyncTreeContext can only be used inside AsyncTreeList");return e},ea=W.kosComponent(({branch:e,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:l,onBranchSelect:a,selectedBranchId:u,branchEmptyState:p=i.jsx("div",{style:{paddingLeft:"32px",color:"#999"},children:"No items"}),depth:h=0,nodeIconMap:f,nodeActions:m,nodeDecorators:x,expandedMode:b=!1,indentSize:y,isNodeSelectable:v,branchContentRenderer:w,itemContentRenderer:$,disableSelectionStyling:k=!1})=>{const S=nx();d.useEffect(()=>{const U=S.openedBranches.includes(e.id),Q=e.loadingState.status==="idle",De=!e.isLeaf;if((U||b)&&Q&&De){const ne=t.originalItems.get(e.id);ne&&t.expandBranch(e.id,ne)}},[S.openedBranches,e.id,e.loadingState.status,e.isLeaf,t,b]);const C=d.useMemo(()=>{if(!f)return;if(typeof f=="function")return f(e);const U=e.type;return U?f[U]:void 0},[f,e]),D=d.useMemo(()=>{if(!(m!=null&&m.length))return;const U=t.originalItems.get(e.id);if(U)return m.filter(Q=>!Q.visibleFor||Q.visibleFor(e)).map(Q=>({id:Q.id,iconId:Q.iconId,color:Q.color,tooltip:Q.tooltip,label:Q.label,isPrimary:Q.isPrimary,onClick:()=>Q.onClick(e.id,U)}))},[m,e,t]),j=(()=>{if(x!=null&&x.length)return x.filter(U=>!U.visibleFor||U.visibleFor(e)).map(U=>({id:U.id,iconId:U.iconId,color:U.color,tooltip:U.tooltip,position:U.position}))})(),I=async()=>{if(S.openedBranches.includes(e.id))s==null||s(e.id);else if(e.loadingState.status==="idle"){const Q=t.originalItems.get(e.id);Q&&(await(r==null?void 0:r(e.id,Q)),await t.expandBranch(e.id,Q))}S.toggleBranch(e.id)},O=()=>{const U=t.originalItems.get(e.id);U&&(a==null||a(e.id,U))},V=je(),P=Wn();if(e.isLeaf){const U=ox(n)?n.build(e):n,Q=V.selected.includes(e.id),De=$?$(e,Q):void 0,ne=i.jsx(U,{"data-key":e.id,...e,onListItemAction:l,"data-depth":h,"data-indent-size":y,"data-disable-selection-styling":k,iconId:C==null?void 0:C.iconId,iconColor:C==null?void 0:C.color,actions:D,decorators:j,children:De},e.id);if(P){const _e=t.originalItems.get(e.id),tt=P.canDrag?P.canDrag(_e??{}):!0;return i.jsx(Hn,{itemId:e.id,dragType:P.dragType,canDrag:tt,dragData:{id:e.id,..._e??{}},transformDragData:P.transformDragData,children:ne},e.id)}return ne}const N=Ji(o)?o.build(e):o,J=b||S.openedBranches.includes(e.id),ee=e.loadingState.status==="loading",te=e.loadingState.status==="error",Ie=e.loadingState.status==="loaded",Ve=u===e.id,ce=J?e.branches.length>0?e.branches.map(U=>i.jsx(ea,{branch:U,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:l,onBranchSelect:a,selectedBranchId:u,branchEmptyState:p,depth:h+1,nodeIconMap:f,nodeActions:m,nodeDecorators:x,expandedMode:b,indentSize:y,isNodeSelectable:v,branchContentRenderer:w,itemContentRenderer:$,disableSelectionStyling:k},U.id)):Ie&&p?[p]:[]:[],Y=w?w(e,Ve):void 0,q=v?v(e):!0;return i.jsx(Et.Observer,{children:()=>i.jsx(N,{className:e.className,...e,onClick:b?O:I,onSelect:O,"data-loading":ee,"data-error":te,"data-open":J,"data-selected":Ve,"data-expanded-mode":b,"data-depth":h,"data-indent-size":y,"data-selectable":q,"data-disable-selection-styling":k,iconId:C==null?void 0:C.iconId,iconColor:C==null?void 0:C.color,actions:D,decorators:j,content:Y,children:ce})})}),ta=W.kosComponent(({dataProvider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:l,selectedBranchId:a,emptyState:u,branchEmptyState:p,className:h,singleBranchOnly:f,openedBranches:m,setOpenedBranches:x,nodeIconMap:b,nodeActions:y,nodeDecorators:v,expandedMode:w=!1,indentSize:$,isNodeSelectable:k,branchContentRenderer:S,itemContentRenderer:C,disableSelectionStyling:D=!1,searchTerm:j,dragConfig:I,groupExpression:O})=>{const[V,P]=d.useState(!1),[N,J]=d.useState([]),ee=m??N,te=x??J;d.useEffect(()=>e?((async()=>{await e.init(),P(!0)})(),()=>{e.dispose()}):void 0,[e]),d.useEffect(()=>{var Y;!w||!V||!e||(Y=e.expandAll)==null||Y.call(e)},[w,V,e]);const Ie=d.useCallback(Y=>{const q=ee.includes(Y);te(f?q?[]:[Y]:q?ee.filter(U=>U!==Y):[...ee,Y])},[ee,te,f]),Ve=d.useMemo(()=>({openedBranches:ee,toggleBranch:Ie}),[ee,Ie]);if(!V||!e)return u||null;const ce=m&&m.length>0&&e.tree.some(Y=>m.includes(Y.id)&&!Y.isLeaf&&Y.loadingState.status!=="loaded");return i.jsx(jo.Provider,{value:I,children:i.jsx(Io.Provider,{value:j,children:i.jsx(Qi.Provider,{value:Ve,children:i.jsx(Et.Observer,{children:()=>i.jsxs("div",{className:h,style:ce?{visibility:"hidden"}:void 0,children:[e.tree.length===0&&u,(()=>{const Y=e.tree,q=ne=>i.jsx(ea,{branch:ne,provider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:l,selectedBranchId:a,branchEmptyState:p,nodeIconMap:b,nodeActions:y,nodeDecorators:v,expandedMode:w,indentSize:$,isNodeSelectable:k,branchContentRenderer:S,itemContentRenderer:C,disableSelectionStyling:D},ne.id);if(!O)return Y.map(q);const U=[],Q=new Map;for(const ne of Y){const _e=O(ne);if(_e===void 0)U.push(ne);else{const tt=Q.get(_e);tt?tt.push(ne):Q.set(_e,[ne])}}const De=Array.from(Q.keys()).sort((ne,_e)=>ne.localeCompare(_e));return i.jsxs(i.Fragment,{children:[U.map(q),De.map(ne=>i.jsxs(d.Fragment,{children:[i.jsx(Do,{groupName:ne}),(Q.get(ne)??[]).map(q)]},`group-${ne}`))]})})()]})})})})})}),rx=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:l,...a})=>{const[u,p]=d.useState(o??[]),h=d.useRef(u??[]);d.useLayoutEffect(()=>{h.current=u},[u]),d.useEffect(()=>{p(o??[])},[o]);const f=d.useCallback(b=>{t(b,h.current.includes(b)?"unselected":"selected"),p(y=>e?[b]:y.includes(b)?y.filter(v=>v!==b):[...y,b])},[e,t]),m=d.useCallback(b=>h.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:f,isDisabled:!!n}),[m,u,f,n]);return d.useEffect(()=>{var b;if(r&&(s!=null&&s.rootItems)&&h.current.length===0){const y=l?l(s.rootItems):(b=s.rootItems[0])==null?void 0:b.id;y&&f(y)}},[r,s==null?void 0:s.rootItems,l,f]),i.jsx(wt.Provider,{value:x,children:i.jsx(ta,{dataProvider:s,...a})})}),sx=({children:e,id:t,className:o})=>i.jsx(z.ClassNames,{children:({cx:n})=>i.jsx(ix,{className:n("anonymous-branch",o),children:e},t)}),ix=g.div`
|
|
2868
|
+
`,tx=e=>{const{selected:t,toggleSelection:o}=Ie(),n=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsx(M.ClassNames,{children:({cx:r})=>i.jsxs(ex,{className:r({isSelected:t.includes(e.id)}),onClick:n,children:[e.iconId&&i.jsx(F,{size:"sm",iconId:e.iconId}),i.jsx(_,{variant:"body",children:e.name})]})})},ox=e=>{const[t,o]=d.useState(e);return{onGroupOpen:d.useCallback(async(r,s)=>{o((c=[])=>s==="opened"&&!(c!=null&&c.includes(r))?[...c,r]:s==="closed"&&c.includes(r)?c.filter(a=>a!==r):c)},[]),openedGroups:t}},nx=(e,t={})=>{const[o,n]=d.useState(t),r=d.useCallback((c,a)=>{var g;const u=(g=e==null?void 0:e.items.find(m=>m.id===c))==null?void 0:g.group.groupId;if(!u)return;const p=o[u]||[],h=a==="selected"?{...o,[u]:[...p,c]}:{...o,[u]:p.filter(m=>m!==c)};n(h)},[e==null?void 0:e.items,o]);return{clear:d.useCallback(()=>{n({})},[]),groupSelection:o,onSelect:r}},rx=(e=[],t=!0)=>{const[o,n]=d.useState(e),r=d.useCallback(c=>{n(a=>t?[c]:a.includes(c)?a.filter(u=>u!==c):[...a,c])},[t]);return{clear:d.useCallback(()=>{n([])},[]),onSelect:r,selected:o}};class sx extends qn{constructor(o,n,r,s,c){super(o,n,r,c);E(this,"parentIdKey");E(this,"idKey");this.parentIdKey=s.parentIdKey,this.idKey=s.idKey,T.makeObservable(this,{tree:T.computed,childBranchLookup:T.computed,itemsById:T.computed})}sortBranch(o,n){return o.name.localeCompare(n.name)}get itemsById(){return this.items.reduce((o,n)=>({...o,[n[this.idKey]]:n}),{})}get childBranchLookup(){return this.items.reduce((o,n)=>{let r=n[this.parentIdKey];return(!r||this.itemsById[r]===void 0)&&(r="ROOT"),r&&o[r]?(o[r].push(n),o):(o[r]=[n],o)},{ROOT:[]})}get tree(){const o=r=>{const s=[];for(const c in r){let a={...r[c],branches:[]};const u=this.childBranchLookup[a[this.idKey]];a&&(u&&(a={...a,branches:o(u)}),s.push(a))}return s},n=this.childBranchLookup.ROOT;return n?o(n):[]}}const oa=d.createContext(null),ix=W.kosComponent(({children:e,singleBranchOnly:t,openedBranches:o,setOpenedBranches:n,dataProvider:r})=>{const[s,c]=d.useState([]),a=o??s,u=n??c,p=d.useRef(a);d.useLayoutEffect(()=>{p.current=a},[a]);const h=d.useCallback(m=>{if(!(r!=null&&r.tree))return;const x=m[r.idKey],b=p.current.includes(x),y=w=>w.branches.flatMap($=>{const k=$[r.idKey];return $.branches.length?[k,...y($)]:[]}),v=y(m);if(t){const w=[],$=k=>{const j=k[r.parentIdKey];if(j){const C=r.itemsById[j];C&&(w.push(j),$(C))}};$(m),u(b?w:[...w,x])}else{const w=b?p.current.filter($=>x!==$&&!v.includes($)):[...p.current,x];u(w)}},[r==null?void 0:r.idKey,r==null?void 0:r.itemsById,r==null?void 0:r.parentIdKey,r==null?void 0:r.tree,u,t]),g=d.useMemo(()=>({openedBranches:a,toggleBranch:h}),[a,h]);return i.jsx(oa.Provider,{value:g,children:e})}),na=()=>{const e=d.useContext(oa);if(e===null)throw new Error("TreeContext can only be used inside children of TreeContextProvider");return e};function ra(e){return e.build!==void 0}const ax=e=>(t,o,n)=>{const r=(s,c)=>{if(!s.branches.length&&s.isGroup)return null;if(s.branches.length){const a=ra(e)?e.build(s):e,u=s.branches.map(p=>{if(p.branches.length)return r(p,!0);{const h=Zt(o)?o.build(p):o;return i.jsx(h,{"data-key":p.id,...p,onListItemAction:n},p.id)}});return i.jsx(M.ClassNames,{children:({cx:p})=>i.jsx(a,{className:p({isNotRoot:c},s.className),...s,children:u},s.id)},s.id)}else{const a=Zt(o)?o.build(s):o;return i.jsx(a,{"data-key":s.id,...s,onListItemAction:n},s.id)}};return t.tree.map(s=>r(s))},lx=W.kosComponent(({dataProvider:e,ItemTemplate:t,onSelect:o,BranchTemplate:n,openedBranches:r,setOpenedBranches:s,singleBranchOnly:c,className:a,autoSelectFirstItem:u,selected:p,emptyState:h,getFirstItem:g,onListItemAction:m})=>i.jsx(ix,{dataProvider:e,openedBranches:r,setOpenedBranches:s,singleBranchOnly:c,children:i.jsx(_o,{onSelect:o,dataProvider:e,ItemTemplate:t,autoSelectFirstItem:u,emptyState:h,className:a,selected:p,onListItemAction:m,getFirstItem:g,itemListRenderer:ax(n)})}));function cx(e){return(e==null?void 0:e.build)!==void 0}const sa=d.createContext(null),dx=()=>{const e=d.useContext(sa);if(e===null)throw new Error("useAsyncTreeContext can only be used inside AsyncTreeList");return e},ia=W.kosComponent(({branch:e,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:c,onBranchSelect:a,selectedBranchId:u,branchEmptyState:p=i.jsx("div",{style:{paddingLeft:"32px",color:"#999"},children:"No items"}),depth:h=0,nodeIconMap:g,nodeActions:m,nodeDecorators:x,expandedMode:b=!1,indentSize:y,isNodeSelectable:v,branchContentRenderer:w,itemContentRenderer:$,disableSelectionStyling:k=!1})=>{const j=dx();d.useEffect(()=>{const U=j.openedBranches.includes(e.id),Q=e.loadingState.status==="idle",_e=!e.isLeaf;if((U||b)&&Q&&_e){const ne=t.originalItems.get(e.id);ne&&t.expandBranch(e.id,ne)}},[j.openedBranches,e.id,e.loadingState.status,e.isLeaf,t,b]);const C=d.useMemo(()=>{if(!g)return;if(typeof g=="function")return g(e);const U=e.type;return U?g[U]:void 0},[g,e]),D=d.useMemo(()=>{if(!(m!=null&&m.length))return;const U=t.originalItems.get(e.id);if(U)return m.filter(Q=>!Q.visibleFor||Q.visibleFor(e)).map(Q=>({id:Q.id,iconId:Q.iconId,color:Q.color,tooltip:Q.tooltip,label:Q.label,isPrimary:Q.isPrimary,onClick:()=>Q.onClick(e.id,U)}))},[m,e,t]),I=(()=>{if(x!=null&&x.length)return x.filter(U=>!U.visibleFor||U.visibleFor(e)).map(U=>({id:U.id,iconId:U.iconId,color:U.color,tooltip:U.tooltip,position:U.position}))})(),S=async()=>{if(j.openedBranches.includes(e.id))s==null||s(e.id);else if(e.loadingState.status==="idle"){const Q=t.originalItems.get(e.id);Q&&(await(r==null?void 0:r(e.id,Q)),await t.expandBranch(e.id,Q))}j.toggleBranch(e.id)},z=()=>{const U=t.originalItems.get(e.id);U&&(a==null||a(e.id,U))},V=Ie(),P=Wn();if(e.isLeaf){const U=cx(n)?n.build(e):n,Q=V.selected.includes(e.id),_e=$?$(e,Q):void 0,ne=i.jsx(U,{"data-key":e.id,...e,onListItemAction:c,"data-depth":h,"data-indent-size":y,"data-disable-selection-styling":k,iconId:C==null?void 0:C.iconId,iconColor:C==null?void 0:C.color,actions:D,decorators:I,children:_e},e.id);if(P){const Te=t.originalItems.get(e.id),tt=P.canDrag?P.canDrag(Te??{}):!0;return i.jsx(Hn,{itemId:e.id,dragType:P.dragType,canDrag:tt,dragData:{id:e.id,...Te??{}},transformDragData:P.transformDragData,children:ne},e.id)}return ne}const N=ra(o)?o.build(e):o,J=b||j.openedBranches.includes(e.id),ee=e.loadingState.status==="loading",oe=e.loadingState.status==="error",De=e.loadingState.status==="loaded",Ve=u===e.id,ce=J?e.branches.length>0?e.branches.map(U=>i.jsx(ia,{branch:U,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:c,onBranchSelect:a,selectedBranchId:u,branchEmptyState:p,depth:h+1,nodeIconMap:g,nodeActions:m,nodeDecorators:x,expandedMode:b,indentSize:y,isNodeSelectable:v,branchContentRenderer:w,itemContentRenderer:$,disableSelectionStyling:k},U.id)):De&&p?[p]:[]:[],Y=w?w(e,Ve):void 0,q=v?v(e):!0;return i.jsx(Tt.Observer,{children:()=>i.jsx(N,{className:e.className,...e,onClick:b?z:S,onSelect:z,"data-loading":ee,"data-error":oe,"data-open":J,"data-selected":Ve,"data-expanded-mode":b,"data-depth":h,"data-indent-size":y,"data-selectable":q,"data-disable-selection-styling":k,iconId:C==null?void 0:C.iconId,iconColor:C==null?void 0:C.color,actions:D,decorators:I,content:Y,children:ce})})}),aa=W.kosComponent(({dataProvider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:c,selectedBranchId:a,emptyState:u,branchEmptyState:p,className:h,singleBranchOnly:g,openedBranches:m,setOpenedBranches:x,nodeIconMap:b,nodeActions:y,nodeDecorators:v,expandedMode:w=!1,indentSize:$,isNodeSelectable:k,branchContentRenderer:j,itemContentRenderer:C,disableSelectionStyling:D=!1,searchTerm:I,dragConfig:S,groupExpression:z})=>{const[V,P]=d.useState(!1),[N,J]=d.useState([]),ee=m??N,oe=x??J;d.useEffect(()=>e?((async()=>{await e.init(),P(!0)})(),()=>{e.dispose()}):void 0,[e]),d.useEffect(()=>{var Y;!w||!V||!e||(Y=e.expandAll)==null||Y.call(e)},[w,V,e]);const De=d.useCallback(Y=>{const q=ee.includes(Y);oe(g?q?[]:[Y]:q?ee.filter(U=>U!==Y):[...ee,Y])},[ee,oe,g]),Ve=d.useMemo(()=>({openedBranches:ee,toggleBranch:De}),[ee,De]);if(!V||!e)return u||null;const ce=m&&m.length>0&&e.tree.some(Y=>m.includes(Y.id)&&!Y.isLeaf&&Y.loadingState.status!=="loaded");return i.jsx(So.Provider,{value:S,children:i.jsx(Io.Provider,{value:I,children:i.jsx(sa.Provider,{value:Ve,children:i.jsx(Tt.Observer,{children:()=>i.jsxs("div",{className:h,style:ce?{visibility:"hidden"}:void 0,children:[e.tree.length===0&&u,(()=>{const Y=e.tree,q=ne=>i.jsx(ia,{branch:ne,provider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:c,selectedBranchId:a,branchEmptyState:p,nodeIconMap:b,nodeActions:y,nodeDecorators:v,expandedMode:w,indentSize:$,isNodeSelectable:k,branchContentRenderer:j,itemContentRenderer:C,disableSelectionStyling:D},ne.id);if(!z)return Y.map(q);const U=[],Q=new Map;for(const ne of Y){const Te=z(ne);if(Te===void 0)U.push(ne);else{const tt=Q.get(Te);tt?tt.push(ne):Q.set(Te,[ne])}}const _e=Array.from(Q.keys()).sort((ne,Te)=>ne.localeCompare(Te));return i.jsxs(i.Fragment,{children:[U.map(q),_e.map(ne=>i.jsxs(d.Fragment,{children:[i.jsx(Do,{groupName:ne}),(Q.get(ne)??[]).map(q)]},`group-${ne}`))]})})()]})})})})})}),ux=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:c,...a})=>{const[u,p]=d.useState(o??[]),h=d.useRef(u??[]);d.useLayoutEffect(()=>{h.current=u},[u]),d.useEffect(()=>{p(o??[])},[o]);const g=d.useCallback(b=>{t(b,h.current.includes(b)?"unselected":"selected"),p(y=>e?[b]:y.includes(b)?y.filter(v=>v!==b):[...y,b])},[e,t]),m=d.useCallback(b=>h.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:g,isDisabled:!!n}),[m,u,g,n]);return d.useEffect(()=>{var b;if(r&&(s!=null&&s.rootItems)&&h.current.length===0){const y=c?c(s.rootItems):(b=s.rootItems[0])==null?void 0:b.id;y&&g(y)}},[r,s==null?void 0:s.rootItems,c,g]),i.jsx(wt.Provider,{value:x,children:i.jsx(aa,{dataProvider:s,...a})})}),px=({children:e,id:t,className:o})=>i.jsx(M.ClassNames,{children:({cx:n})=>i.jsx(hx,{className:n("anonymous-branch",o),children:e},t)}),hx=f.div`
|
|
2843
2869
|
display: flex;
|
|
2844
2870
|
flex-direction: column;
|
|
2845
2871
|
width: 100%;
|
|
2846
|
-
`,[
|
|
2872
|
+
`,[Ne]=O(["named-collapsible-branch"]),gx=20,fx=W.kosComponent(({children:e,className:t,onClick:o,onSelect:n,"data-loading":r,"data-open":s,"data-expanded-mode":c,"data-depth":a=0,"data-indent-size":u=gx,"data-selectable":p=!0,"data-disable-selection-styling":h=!1,iconId:g,iconColor:m,actions:x,decorators:b,content:y,...v})=>{const{isSelected:w,toggleSelection:$,selected:k}=Ie(),j=Pn(),C=p&&k.includes(v.id),D=N=>{N.stopPropagation(),o==null||o()},I=()=>{p?($(v.id),n==null||n()):o==null||o()},S=(b==null?void 0:b.filter(N=>N.position==="start"))??[],z=(b==null?void 0:b.filter(N=>N.position!=="start"))??[],V=typeof u=="string"?Number(u):u,P=typeof a=="string"?Number(a):a;return i.jsxs(wx,{className:t,isOpen:s,children:[i.jsxs(Cx,{"data-loading":r,"data-selected":C,onClick:I,$isSelected:C,$disableSelectionStyling:h,$depth:P,$indentSize:V,children:[!c&&i.jsx(mx,{onClick:D,type:"button",children:i.jsx(bx,{iconId:"CaretRight",size:"xxsm",$isOpen:s})}),g&&i.jsx(F,{size:"sm",iconId:g,color:m}),i.jsxs(xx,{children:[y||i.jsxs(i.Fragment,{children:[i.jsx(yx,{children:i.jsx(_,{variant:"body",bold:!0,children:i.jsx(bo,{search:j||"",children:v.name})})}),S.length>0&&i.jsx(vx,{children:S.map(N=>i.jsx(Wr,{size:"sm",iconId:N.iconId,color:C&&!h?"white":N.color,title:N.tooltip},N.id))})]}),r&&i.jsx(kx,{variant:"body",children:"(Loading...)"})]}),z.length>0&&i.jsx(Sx,{children:z.map(N=>i.jsx(Wr,{size:"sm",iconId:N.iconId,color:C&&!h?"white":N.color,title:N.tooltip},N.id))}),x&&x.length>0&&i.jsx(Rt,{actions:x,isSelected:C,disableSelectionStyling:h})]}),i.jsx($x,{className:"inner-container",children:i.jsx(jx,{className:"list-container",children:e})})]},v.id)}),mx=f.button`
|
|
2847
2873
|
background: none;
|
|
2848
2874
|
border: none;
|
|
2849
2875
|
padding: 0;
|
|
@@ -2862,90 +2888,90 @@
|
|
|
2862
2888
|
&:active {
|
|
2863
2889
|
opacity: 0.5;
|
|
2864
2890
|
}
|
|
2865
|
-
`,
|
|
2891
|
+
`,bx=f(F)`
|
|
2866
2892
|
transition: transform 0.2s ease-in-out;
|
|
2867
2893
|
transform: ${({$isOpen:e})=>e?"rotate(90deg)":"rotate(0deg)"};
|
|
2868
|
-
`,
|
|
2894
|
+
`,xx=f.div`
|
|
2869
2895
|
display: flex;
|
|
2870
2896
|
align-items: center;
|
|
2871
2897
|
flex: 1;
|
|
2872
2898
|
min-width: 0;
|
|
2873
|
-
`,
|
|
2899
|
+
`,yx=f.div`
|
|
2874
2900
|
display: -webkit-box;
|
|
2875
2901
|
-webkit-line-clamp: 2;
|
|
2876
2902
|
-webkit-box-orient: vertical;
|
|
2877
2903
|
overflow: hidden;
|
|
2878
2904
|
flex: 0 1 auto;
|
|
2879
2905
|
min-width: 0;
|
|
2880
|
-
`,
|
|
2906
|
+
`,vx=f.div`
|
|
2881
2907
|
display: flex;
|
|
2882
2908
|
align-items: center;
|
|
2883
2909
|
gap: 4px;
|
|
2884
2910
|
flex: 0 0 auto;
|
|
2885
2911
|
margin-left: 4px;
|
|
2886
|
-
`,
|
|
2912
|
+
`,kx=f(_)`
|
|
2887
2913
|
margin-left: 4px;
|
|
2888
2914
|
flex: 0 0 auto;
|
|
2889
|
-
`;
|
|
2915
|
+
`;f(_)`
|
|
2890
2916
|
word-break: break-word;
|
|
2891
|
-
`;const
|
|
2917
|
+
`;const wx=f.div`
|
|
2892
2918
|
display: flex;
|
|
2893
2919
|
flex-direction: column;
|
|
2894
|
-
${({isOpen:e})=>e?`gap: ${
|
|
2895
|
-
`,
|
|
2920
|
+
${({isOpen:e})=>e?`gap: ${Ne("padding-y")}`:""}
|
|
2921
|
+
`,Cx=f.div`
|
|
2896
2922
|
align-items: center;
|
|
2897
|
-
gap: ${
|
|
2923
|
+
gap: ${Ne("column-gap")};
|
|
2898
2924
|
display: flex;
|
|
2899
2925
|
position: relative;
|
|
2900
2926
|
flex: 0;
|
|
2901
2927
|
min-height: 22px;
|
|
2902
2928
|
padding-left: calc(
|
|
2903
|
-
${
|
|
2929
|
+
${Ne("padding-left")} + ${({$depth:e=0,$indentSize:t=20})=>e*t}px
|
|
2904
2930
|
);
|
|
2905
|
-
padding-top: ${
|
|
2906
|
-
padding-bottom: ${
|
|
2907
|
-
padding-right: ${
|
|
2931
|
+
padding-top: ${Ne("padding-y")};
|
|
2932
|
+
padding-bottom: ${Ne("padding-y")};
|
|
2933
|
+
padding-right: ${Ne("padding-right")};
|
|
2908
2934
|
|
|
2909
2935
|
cursor: pointer;
|
|
2910
|
-
color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?
|
|
2911
|
-
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?
|
|
2936
|
+
color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?Ne("color-selected"):"inherit"};
|
|
2937
|
+
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?Ne("background-color-selected"):"transparent"};
|
|
2912
2938
|
transition: background-color 0.15s ease;
|
|
2913
2939
|
|
|
2914
2940
|
&:hover {
|
|
2915
|
-
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>t?"rgba(0, 0, 0, 0.05)":e?
|
|
2941
|
+
background-color: ${({$isSelected:e,$disableSelectionStyling:t})=>t?"rgba(0, 0, 0, 0.05)":e?Ne("background-color-selected"):"rgba(0, 0, 0, 0.05)"};
|
|
2916
2942
|
}
|
|
2917
2943
|
|
|
2918
2944
|
&:hover > .item-action-bar,
|
|
2919
2945
|
&:focus-within > .item-action-bar {
|
|
2920
2946
|
visibility: visible;
|
|
2921
2947
|
pointer-events: auto;
|
|
2922
|
-
background: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?
|
|
2948
|
+
background: ${({$isSelected:e,$disableSelectionStyling:t})=>e&&!t?Ne("background-color-selected"):"linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.05)), white"};
|
|
2923
2949
|
}
|
|
2924
2950
|
|
|
2925
2951
|
&:active {
|
|
2926
|
-
background-color: ${({$disableSelectionStyling:e})=>e?"rgba(0, 0, 0, 0.1)":
|
|
2952
|
+
background-color: ${({$disableSelectionStyling:e})=>e?"rgba(0, 0, 0, 0.1)":Ne("background-color-selected")};
|
|
2927
2953
|
}
|
|
2928
|
-
|
|
2954
|
+
`,$x=f.div`
|
|
2929
2955
|
display: flex;
|
|
2930
2956
|
flex-direction: column;
|
|
2931
|
-
`,
|
|
2957
|
+
`,jx=f.div`
|
|
2932
2958
|
display: flex;
|
|
2933
2959
|
flex-direction: column;
|
|
2934
2960
|
row-gap: 4px;
|
|
2935
|
-
`,
|
|
2961
|
+
`,Sx=f.div`
|
|
2936
2962
|
display: flex;
|
|
2937
2963
|
align-items: center;
|
|
2938
2964
|
gap: 4px;
|
|
2939
|
-
`,
|
|
2965
|
+
`,Wr=f(F)`
|
|
2940
2966
|
opacity: 0.8;
|
|
2941
|
-
`,
|
|
2967
|
+
`,Ix=W.kosComponent(({children:e,className:t,...o})=>{const{openedBranches:n,toggleBranch:r}=na(),s=n.includes(o.id),c=d.useCallback(()=>{r(o)},[o,r]);return i.jsxs(Dx,{className:t,children:[i.jsxs(_x,{"data-open":s,onClick:c,children:[s?i.jsx(F,{iconId:"CaretDown",size:"xxsm"}):i.jsx(F,{iconId:"CaretRight",size:"xxsm"}),i.jsx(_,{variant:"body",bold:!0,children:o.name})]}),i.jsx(Tx,{className:"inner-container",children:s?i.jsx(Ex,{className:"list-container",children:e}):null})]},o.id)}),Dx=f.div`
|
|
2942
2968
|
display: flex;
|
|
2943
2969
|
flex-direction: column;
|
|
2944
2970
|
|
|
2945
2971
|
&.isNotRoot {
|
|
2946
2972
|
padding-left: 12px;
|
|
2947
2973
|
}
|
|
2948
|
-
`,
|
|
2974
|
+
`,_x=f.div`
|
|
2949
2975
|
align-items: center;
|
|
2950
2976
|
column-gap: 4px;
|
|
2951
2977
|
cursor: pointer;
|
|
@@ -2953,26 +2979,26 @@
|
|
|
2953
2979
|
flex: 0;
|
|
2954
2980
|
min-height: 22px;
|
|
2955
2981
|
padding-right: 12px;
|
|
2956
|
-
`,
|
|
2982
|
+
`,Tx=f.div`
|
|
2957
2983
|
display: flex;
|
|
2958
2984
|
flex-direction: column;
|
|
2959
|
-
|
|
2985
|
+
`,Ex=f.div`
|
|
2960
2986
|
display: flex;
|
|
2961
2987
|
flex-direction: column;
|
|
2962
2988
|
row-gap: 4px;
|
|
2963
|
-
`,
|
|
2989
|
+
`,la=d.memo(({autoScrollToBottom:e=!1,className:t,itemCount:o,itemHeight:n,onBottom:r,overscanAmount:s,renderRow:c})=>{const[a,u]=d.useState(0),[p,h]=d.useState(0),g=d.useRef(null),m=d.useRef(null),x=o*n,b=Math.ceil(p/n),y=Math.max(Math.floor(a/n-(s??0)),0),v=Math.min(o-1,y+b+(s??0)),w=k=>{u(k.currentTarget.scrollTop)};d.useLayoutEffect(()=>{const k=()=>{g.current&&h(g.current.clientHeight)};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]),d.useEffect(()=>{e&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[o,e]);const $=[];for(let k=y;k<=v;k++)$.push(c(k,{top:k*n,height:n,position:"absolute",width:"100%"}));return d.useEffect(()=>{const k=()=>{const C=m.current;if(!C)return;const D=C.scrollHeight-C.scrollTop<=C.clientHeight+n;!e&&D&&(r==null||r())},j=m.current;return j&&j.addEventListener("scroll",k),()=>{j&&j.removeEventListener("scroll",k)}},[e,n,r]),i.jsx(zx,{ref:g,children:i.jsx(Mx,{ref:m,style:{height:p},onScroll:w,className:t,children:i.jsx(Ox,{style:{height:x},children:$})})})}),zx=f.div`
|
|
2964
2990
|
height: 100%;
|
|
2965
2991
|
width: 100%;
|
|
2966
2992
|
overflow-y: hidden;
|
|
2967
2993
|
position: relative;
|
|
2968
|
-
`,
|
|
2994
|
+
`,Mx=f.div`
|
|
2969
2995
|
overflow-y: auto;
|
|
2970
2996
|
width: 100%;
|
|
2971
2997
|
position: relative;
|
|
2972
|
-
`,
|
|
2998
|
+
`,Ox=f.div`
|
|
2973
2999
|
position: relative;
|
|
2974
3000
|
width: 100%;
|
|
2975
|
-
`,
|
|
3001
|
+
`,ca=W.kosComponent(({dataProvider:e,ItemTemplate:t,onListItemAction:o,onInit:n,emptyState:r,...s})=>{const c=no(e,n),a=d.useCallback((u,p)=>{const h=e==null?void 0:e.items.find((g,m)=>m===u);if(h){const g=Zt(t)?t.build(h):t;return i.jsx(g,{"data-key":h.id,style:p,...h,onListItemAction:o},h.id)}return null},[t,e==null?void 0:e.items,o]);return i.jsx(Yn,{dataProvider:e||void 0,onListItemAction:o,children:c?(e==null?void 0:e.items.length)===0&&r?r:i.jsx(la,{itemCount:(e==null?void 0:e.items.length)??0,renderRow:a,...s}):null})}),Rx=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:c,...a})=>{const[u,p]=d.useState(o??[]),h=d.useRef(u??[]);d.useLayoutEffect(()=>{h.current=u},[u]),d.useEffect(()=>{p(o??[])},[o]);const g=d.useCallback(b=>{t(b,h.current.includes(b)?"unselected":"selected"),p(y=>e?[b]:y.includes(b)?y.filter(v=>v!==b):[...y,b])},[e,t]),m=d.useCallback(b=>h.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:g,isDisabled:!!n}),[m,u,g,n]);return d.useEffect(()=>{var b,y;if(r&&(s!=null&&s.items)&&h.current.length===0){let v;c?v=(b=c(s.items))==null?void 0:b.id:v=(y=s.items[0])==null?void 0:y.id,v&&g(v)}},[r,s==null?void 0:s.items,c,g]),i.jsx(wt.Provider,{value:x,children:i.jsx(ca,{dataProvider:s,...a})})}),[nt]=O(["ingredient-card"]),Nx=d.memo(({id:e,name:t,trouble:o,ingredientName:n,assigned:r,onListItemAction:s,blocked:c,isSmall:a})=>{const{selected:u,toggleSelection:p}=Ie(),{t:h}=W.useKosTranslation("dispenser"),g=d.useMemo(()=>u.includes(e),[u,e]),m=d.useCallback(()=>{s&&s(e,"delete")},[e,s]),x=d.useCallback(y=>{s&&s(e,y)},[e,s]),b=d.useCallback(()=>{p(e)},[e,p]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(Fx,{className:y("holder-list-item",{isSelected:g,isSmall:a}),onClick:b,children:[i.jsxs(Ax,{children:[i.jsxs(Lx,{children:[i.jsx(_,{variant:a?"small":"body",color:"dark",children:t}),!!o&&i.jsx($o,{content:o,children:i.jsx(F,{iconId:"ExclamationCircle",color:"red",size:a?"xsm":"sm"})})]}),!!n&&i.jsxs(Bx,{children:[i.jsx(te,{iconId:"DeleteOutlined",color:"blue",size:a?"xsm":"sm",onClick:m,disabled:!r}),i.jsxs(Ot,{Reference:i.jsx(te,{iconId:"Ellipsis",color:"black",size:a?"xsm":"sm"}),onSelect:x,children:[i.jsx(ht,{optionKey:"remove",label:h("holder.removeOption"),disableSelectionStyle:!0,disabled:!r}),i.jsx(ht,{optionKey:"block",disableSelectionStyle:!0,disabled:!r,label:h(`holder.${c?"unblockOption":"blockOption"}`)})]})]})]}),i.jsx(Wx,{className:y({isIngredientLess:n===void 0}),children:n?i.jsx(_,{color:"dark",variant:a?"small":"body",bold:!0,children:n}):i.jsx(We,{variant:a?"borderless-small":"borderless",text:h("holder.assignButton"),icon:"Plus"})})]})})}),Fx=f.div`
|
|
2976
3002
|
width: 100%;
|
|
2977
3003
|
height: 100%;
|
|
2978
3004
|
min-height: 60px;
|
|
@@ -2991,23 +3017,23 @@
|
|
|
2991
3017
|
&.isSelected {
|
|
2992
3018
|
border-color: ${nt("border-color-selected")};
|
|
2993
3019
|
}
|
|
2994
|
-
`,
|
|
3020
|
+
`,Ax=f.div`
|
|
2995
3021
|
width: 100%;
|
|
2996
3022
|
display: flex;
|
|
2997
3023
|
align-items: center;
|
|
2998
3024
|
justify-content: flex-start;
|
|
2999
3025
|
column-gap: ${nt("column-gap")};
|
|
3000
|
-
`,
|
|
3026
|
+
`,Lx=f.div`
|
|
3001
3027
|
flex: 1;
|
|
3002
3028
|
display: flex;
|
|
3003
3029
|
align-items: center;
|
|
3004
3030
|
justify-content: flex-start;
|
|
3005
3031
|
column-gap: ${nt("column-gap")};
|
|
3006
|
-
`,
|
|
3032
|
+
`,Bx=f.div`
|
|
3007
3033
|
display: flex;
|
|
3008
3034
|
align-items: center;
|
|
3009
3035
|
column-gap: ${nt("column-gap")};
|
|
3010
|
-
`,
|
|
3036
|
+
`,Wx=f.div`
|
|
3011
3037
|
width: 100%;
|
|
3012
3038
|
display: flex;
|
|
3013
3039
|
align-items: center;
|
|
@@ -3016,18 +3042,18 @@
|
|
|
3016
3042
|
&.isIngredientLess {
|
|
3017
3043
|
justify-content: center;
|
|
3018
3044
|
}
|
|
3019
|
-
`,[
|
|
3045
|
+
`,[ft]=O(["named-section-header"]),da=f.div`
|
|
3020
3046
|
align-items: flex-start;
|
|
3021
|
-
background-color: ${
|
|
3022
|
-
border-bottom: ${
|
|
3023
|
-
border-radius: ${
|
|
3047
|
+
background-color: ${ft("bg")};
|
|
3048
|
+
border-bottom: ${ft("border-width")} solid ${ft("border-color")};
|
|
3049
|
+
border-radius: ${ft("border-radius")} ${ft("border-radius")} 0px 0px;
|
|
3024
3050
|
display: flex;
|
|
3025
|
-
padding: ${
|
|
3026
|
-
column-gap: ${
|
|
3051
|
+
padding: ${ft("padding")};
|
|
3052
|
+
column-gap: ${ft("gap")};
|
|
3027
3053
|
&.isCollapsed {
|
|
3028
3054
|
border-bottom-width: 0px;
|
|
3029
3055
|
}
|
|
3030
|
-
`,
|
|
3056
|
+
`,Px=d.memo(({children:e})=>{const{setOpen:t,open:o}=Mt(),n=d.useCallback(r=>{r.stopPropagation(),t(!o)},[o,t]);return i.jsxs(da,{className:vt("header-wrapper",{isCollapsed:o}),children:[i.jsx(te,{iconId:o?"CaretDown":"CaretUp",onClick:n,size:"xsm",color:"black"}),e]})}),[ot]=O(["named-section"]),Vx=e=>e.variant==="selectable",ua=e=>{const{variant:t,className:o,children:n,header:r,isCollapsible:s}=e,c=d.useRef(null),[a,u,p]=Vx(e)?[e.disabled,e.isSelected,e.onClick]:[e.disabled,!1,void 0],h=e.ContentWrapper??Ux,g=d.useCallback(m=>{p&&c.current&&c.current.contains(m.target)&&p()},[p]);return i.jsx(M.ClassNames,{children:({cx:m})=>i.jsx(Hx,{"data-variant":t,className:m(o,{disabled:a,isSelected:u}),onClick:g,ref:c,children:s?i.jsxs(Jt,{defaultOpen:!0,children:[i.jsx(Px,{children:r}),i.jsx(Qt,{children:i.jsx(h,{children:n})})]}):i.jsxs(i.Fragment,{children:[i.jsx(da,{className:"header-wrapper",children:r}),i.jsx(h,{children:n})]})})})},Hx=f.div`
|
|
3031
3057
|
border-color: ${ot("border-color")};
|
|
3032
3058
|
border-radius: ${ot("border-radius")};
|
|
3033
3059
|
border-style: solid;
|
|
@@ -3064,10 +3090,10 @@
|
|
|
3064
3090
|
top: 0;
|
|
3065
3091
|
}
|
|
3066
3092
|
}
|
|
3067
|
-
`,
|
|
3093
|
+
`,Ux=f.div`
|
|
3068
3094
|
display: flex;
|
|
3069
3095
|
width: 100%;
|
|
3070
|
-
`,[zo]=
|
|
3096
|
+
`,[zo]=O(["named-section-header"]),Gx=d.memo(({name:e,description:t,prefix:o,suffix:n,children:r,...s})=>i.jsxs(Kx,{...s,className:t?"hasDesc":void 0,children:[i.jsxs(Yx,{children:[i.jsxs(qx,{children:[o,i.jsx(_,{color:"dark",bold:!0,variant:"body",children:e}),n]}),!!t&&i.jsx(_,{color:"grey",variant:"small",children:t})]}),!!r&&i.jsx(Zx,{children:r})]})),Kx=f.div`
|
|
3071
3097
|
width: 100%;
|
|
3072
3098
|
display: flex;
|
|
3073
3099
|
align-items: center;
|
|
@@ -3076,62 +3102,62 @@
|
|
|
3076
3102
|
&.hasDesc {
|
|
3077
3103
|
align-items: flex-start;
|
|
3078
3104
|
}
|
|
3079
|
-
`,
|
|
3105
|
+
`,Yx=f.div`
|
|
3080
3106
|
display: flex;
|
|
3081
3107
|
align-items: flex-start;
|
|
3082
3108
|
justify-content: center;
|
|
3083
3109
|
flex-direction: column;
|
|
3084
3110
|
row-gap: ${zo("row-gap")};
|
|
3085
|
-
`,
|
|
3111
|
+
`,qx=f.div`
|
|
3086
3112
|
display: flex;
|
|
3087
3113
|
align-items: center;
|
|
3088
3114
|
justify-content: flex-start;
|
|
3089
3115
|
column-gap: ${zo("row-gap")};
|
|
3090
|
-
`,
|
|
3116
|
+
`,Zx=f.div`
|
|
3091
3117
|
display: flex;
|
|
3092
3118
|
align-items: center;
|
|
3093
3119
|
justify-content: flex-end;
|
|
3094
3120
|
row-gap: ${zo("row-gap")};
|
|
3095
|
-
`,
|
|
3121
|
+
`,pa=d.createContext(!1),Xx=()=>d.useContext(pa),Jx=d.memo(({title:e,disabled:t,onToggleShowSelected:o,t:n})=>i.jsxs(Qx,{children:[i.jsx(_,{variant:"h2",color:"dark",children:e}),i.jsxs(e0,{children:[i.jsx(_,{variant:"small",color:"grey",children:(n==null?void 0:n("selectedOnly"))??"MISSING T FUNC"}),i.jsx(wo,{disabled:t,onChange:o})]})]})),Qx=f.div`
|
|
3096
3122
|
display: flex;
|
|
3097
3123
|
align-items: center;
|
|
3098
3124
|
width: 100%;
|
|
3099
3125
|
justify-content: space-between;
|
|
3100
|
-
gap: ${
|
|
3101
|
-
`,
|
|
3126
|
+
gap: ${l("spacing-8")};
|
|
3127
|
+
`,e0=f.div`
|
|
3102
3128
|
display: flex;
|
|
3103
3129
|
align-items: center;
|
|
3104
|
-
gap: ${
|
|
3105
|
-
`,
|
|
3130
|
+
gap: ${l("spacing-4")};
|
|
3131
|
+
`,t0=d.memo(e=>{const{selected:t}=Ie(),o=Xx(),n=t.includes(e.id);return o&&!n?null:i.jsx(ta,{...e})}),o0=f(ua)`
|
|
3106
3132
|
overflow: hidden;
|
|
3107
|
-
`,
|
|
3133
|
+
`,n0=f.div`
|
|
3108
3134
|
overflow-x: hidden;
|
|
3109
3135
|
overflow-y: auto;
|
|
3110
|
-
`,
|
|
3136
|
+
`,r0=W.kosComponent(({defaultShowSelected:e,disabled:t,title:o,selected:n,onSelect:r,emptyMessage:s,dataProvider:c,className:a,onSelectAll:u,t:p})=>{const[h,g]=d.useState(e??!1),m=d.useRef(null),x=d.useCallback(y=>{g(y)},[]);d.useEffect(()=>{const y=c;y&&y.updateContextValue&&(y==null||y.updateContextValue("isOnlySelectedVisible",h))},[c,h]),d.useEffect(()=>{const y=c;y&&y.updateContextValue&&(y==null||y.updateContextValue("selected",n))},[c,n]),d.useEffect(()=>{m.current&&n&&(n.length&&n.length!==(c==null?void 0:c.items.length)?m.current.indeterminate!==!0&&(c!=null&&c.items.length)&&(m.current.indeterminate=!0):m.current.indeterminate===!0&&(m.current.indeterminate=!1))},[c==null?void 0:c.items,n]);const b=d.useCallback(()=>{u&&u(n&&n.length>0?"deselect":"select")},[u,n]);return i.jsx(pa.Provider,{value:h,children:i.jsx(o0,{className:a,variant:"display",header:i.jsx(Jx,{title:o,disabled:t,t:p,onToggleShowSelected:x}),ContentWrapper:n0,children:i.jsxs(s0,{children:[!!u&&!!(c!=null&&c.items.length)&&i.jsxs(ro,{children:[i.jsx(To,{children:i.jsx(yt,{ref:m,disabled:t,checked:!!n&&!!n.length&&n.length===c.items.length,onChange:b})}),i.jsx(Eo,{children:i.jsx(_,{bold:!0,variant:"body",children:(p==null?void 0:p("selectAll"))??"MISSING T FUNC"})})]}),i.jsx(_o,{disabled:t,selected:n,isSingleSelect:!1,onSelect:r,emptyState:s?i.jsx(i0,{children:i.jsx(_,{variant:"body",color:"grey",children:s})}):void 0,ItemTemplate:t0,dataProvider:c})]})})})}),s0=f.div`
|
|
3111
3137
|
width: 100%;
|
|
3112
3138
|
display: flex;
|
|
3113
3139
|
flex-direction: column;
|
|
3114
3140
|
align-items: flex-start;
|
|
3115
3141
|
justify-content: flex-start;
|
|
3116
|
-
`,
|
|
3142
|
+
`,i0=f.div`
|
|
3117
3143
|
width: 100%;
|
|
3118
3144
|
display: flex;
|
|
3119
3145
|
align-items: center;
|
|
3120
3146
|
justify-content: center;
|
|
3121
|
-
padding: ${
|
|
3122
|
-
`;class
|
|
3147
|
+
padding: ${l("spacing-12")} ${l("spacing-20")};
|
|
3148
|
+
`;class a0 extends Zn{constructor(o,n,r,s){super(o,n,r,{...s,isOnlySelectedVisible:(s==null?void 0:s.isOnlySelectedVisible)??!1,selected:(s==null?void 0:s.selected)??[]});E(this,"itemMapper");E(this,"observableItems");this.itemMapper=r,this.observableItems=T.observable.map(new Map)}get items(){if(!this.initialized||this.version<0)return[];const o=this.resolvedItems,n=[...new Set(o)],r=u=>this.itemMapper(u,this.context),s=u=>this.filterByInputItem(u,this.context),c=n.filter(s.bind(this)).filter(this.context.get("isOnlySelectedVisible")===!0?u=>(this.context.get("selected")??[]).includes(u.id):()=>!0).sort(this.sortByInputItem.bind(this)).map(r);return Array.from(this.observableItems.keys()).filter(u=>!c.find(p=>p.id===u)).forEach(u=>{W.kosAction(()=>{this.observableItems.delete(u)})}),c.reduce((u,p)=>{if(!u.has(p.id))W.kosAction(()=>{u.set(p.id,p)});else{const h=u.get(p.id);h&&W.kosAction(()=>{const g=Object.assign(h,p);u.set(p.id,g)})}return u},this.observableItems),c.map(u=>this.observableItems.get(u.id))}}const l0=({rightMenu:e,leftMenu:t,className:o})=>i.jsxs(c0,{className:o,children:[t,i.jsx(d0,{children:e})]}),c0=f.div`
|
|
3123
3149
|
align-items: center;
|
|
3124
|
-
background-color: ${
|
|
3150
|
+
background-color: ${l("color-black")};
|
|
3125
3151
|
display: flex;
|
|
3126
3152
|
gap: 12px;
|
|
3127
|
-
height: ${
|
|
3153
|
+
height: ${l("spacing-32")};
|
|
3128
3154
|
justify-content: space-between;
|
|
3129
|
-
padding: 0px ${
|
|
3155
|
+
padding: 0px ${l("spacing-20")};
|
|
3130
3156
|
width: 100%;
|
|
3131
|
-
`,
|
|
3157
|
+
`,d0=f.div`
|
|
3132
3158
|
display: flex;
|
|
3133
3159
|
align-items: center;
|
|
3134
|
-
`,[
|
|
3160
|
+
`,[$e]=O(["modal"]),ha=f.div`
|
|
3135
3161
|
border-radius: 6px;
|
|
3136
3162
|
width: fit-content;
|
|
3137
3163
|
height: fit-content;
|
|
@@ -3139,75 +3165,75 @@
|
|
|
3139
3165
|
align-items: flex-start;
|
|
3140
3166
|
justify-content: flex-start;
|
|
3141
3167
|
flex-direction: column;
|
|
3142
|
-
background-color: ${
|
|
3143
|
-
`,
|
|
3144
|
-
padding: ${
|
|
3145
|
-
column-gap: ${
|
|
3168
|
+
background-color: ${$e("background-color")};
|
|
3169
|
+
`,ga=f.div`
|
|
3170
|
+
padding: ${$e("headerPadding")};
|
|
3171
|
+
column-gap: ${$e("headerGap")};
|
|
3146
3172
|
width: 100%;
|
|
3147
3173
|
display: flex;
|
|
3148
3174
|
align-items: center;
|
|
3149
3175
|
justify-content: flex-start;
|
|
3150
|
-
border-bottom: ${
|
|
3151
|
-
`,
|
|
3152
|
-
padding: ${
|
|
3176
|
+
border-bottom: ${$e("border-width")} solid ${$e("border-color")};
|
|
3177
|
+
`,fa=f.div`
|
|
3178
|
+
padding: ${$e("contentYPadding")} ${$e("contentXPadding")};
|
|
3153
3179
|
width: fit-content;
|
|
3154
|
-
`,or=
|
|
3155
|
-
padding: ${
|
|
3156
|
-
border-top: ${
|
|
3180
|
+
`,or=f.div`
|
|
3181
|
+
padding: ${$e("footerYPadding")} ${$e("footerXPadding")};
|
|
3182
|
+
border-top: ${$e("border-width")} solid ${$e("border-color")};
|
|
3157
3183
|
width: 100%;
|
|
3158
3184
|
display: flex;
|
|
3159
3185
|
align-items: center;
|
|
3160
3186
|
justify-content: flex-end;
|
|
3161
|
-
`,
|
|
3162
|
-
width: ${
|
|
3187
|
+
`,u0=f.div`
|
|
3188
|
+
width: ${$e("base-content-width")};
|
|
3163
3189
|
display: flex;
|
|
3164
3190
|
align-items: flex-start;
|
|
3165
3191
|
justify-content: flex-start;
|
|
3166
3192
|
flex-direction: column;
|
|
3167
|
-
`,
|
|
3168
|
-
column-gap: ${
|
|
3169
|
-
`,
|
|
3193
|
+
`,so=d.forwardRef(({header:e,footer:t,content:o,footerWrapper:n,headerWrapper:r,contentWrapper:s},c)=>{const a=r??ga,u=s??fa,p=n??or;return i.jsxs(ha,{ref:c,children:[e&&i.jsx(a,{children:e}),i.jsx(u,{children:o}),t&&i.jsx(p,{children:t})]})}),p0=d.forwardRef(({level:e,headerText:t,content:o,acceptButtonVariant:n,acceptButtonText:r,onAccept:s},c)=>{const a=d.useMemo(()=>{if(e==="error")return{iconId:"ExclamationCircle",color:"red"};if(e==="warn")return{iconId:"Warning",color:"orange"};if(e==="success")return{iconId:"CheckCircle",color:"green"};if(e==="info")return{iconId:"InfoCircle",color:"blue"}},[e]),{setOpen:u}=Xe(),p=d.useCallback(()=>{s&&s(),u(!1)},[u,s]);return i.jsx(so,{ref:c,header:i.jsxs(i.Fragment,{children:[!!a&&i.jsx(F,{iconId:a.iconId,color:a.color}),i.jsx(_,{variant:"h2",color:"dark",children:t})]}),content:o,footer:i.jsx(We,{onClick:p,variant:n??"primary",text:r??"Okay"})})}),[h0]=O(["modal"]),g0=d.forwardRef(({onConfirm:e,onCancel:t,headerText:o,confirmText:n,cancelText:r,content:s,confirmButtonVariant:c,cancelButtonVariant:a,confirmDisabled:u,headerIcon:p,headerIconColor:h,contentWrapper:g,cancelDisabled:m},x)=>{const{setOpen:b}=Xe(),y=d.useCallback(()=>{e(()=>b(!1))},[e,b]),v=d.useCallback(()=>{t&&t(),b(!1)},[t,b]);return i.jsx(so,{ref:x,header:i.jsxs(i.Fragment,{children:[!!p&&i.jsx(F,{iconId:p,color:h??"black"}),i.jsx(_,{variant:"h2",color:"dark",children:o})]}),contentWrapper:g,content:s,footerWrapper:f0,footer:i.jsxs(i.Fragment,{children:[i.jsx(We,{text:r??"Cancel",onClick:v,disabled:m,variant:a??"borderless"}),i.jsx(We,{onClick:y,variant:c??"primary",text:n??"Confirm",disabled:u})]})})}),f0=f(or)`
|
|
3194
|
+
column-gap: ${h0("footerGap")};
|
|
3195
|
+
`,m0=d.memo(({headerText:e})=>i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"ExclamationCircle",color:"red",size:"lrg"}),i.jsx(_,{variant:"h2",color:"dark",children:e})]})),b0=d.memo(({contentText:e,compareText:t,errorText:o})=>{const n=d.useCallback(s=>s.message&&s.message!==""?s.message:o??"That does not match.",[o]),r=d.useCallback(s=>s===t,[t]);return i.jsxs(x0,{children:[i.jsx(_,{variant:"body",color:"dark",children:e}),i.jsx(Bn,{name:"matchText",handleError:n,validate:r})]})}),x0=f.div`
|
|
3170
3196
|
width: 288px;
|
|
3171
3197
|
display: flex;
|
|
3172
3198
|
align-items: flex-start;
|
|
3173
3199
|
justify-content: flex-start;
|
|
3174
3200
|
flex-direction: column;
|
|
3175
3201
|
row-gap: 8px;
|
|
3176
|
-
`,
|
|
3202
|
+
`,y0=d.memo(({onSubmit:e})=>{const{setOpen:t}=Xe(),o=d.useCallback(()=>{t(!1)},[t]);return i.jsxs(i.Fragment,{children:[i.jsx(We,{type:"button",text:"Cancel",onClick:o,variant:"borderless"}),i.jsx(Ln,{onSubmit:e,variant:"primary",text:"Delete"})]})}),v0={matchText:""},k0=d.forwardRef(({compareText:e,headerText:t,contentText:o,errorText:n,onConfirm:r},s)=>{const{setOpen:c}=Xe(),a=d.useCallback((u,p)=>{r(u,()=>c(!1),p)},[r,c]);return i.jsx(w0,{onSubmit:a,mode:"onChange",delayError:400,defaultValues:v0,children:i.jsx(so,{ref:s,header:i.jsx(m0,{headerText:t}),content:i.jsx(b0,{compareText:e,contentText:o,errorText:n}),footer:i.jsx(y0,{onSubmit:a})})})}),w0=f(Oi)`
|
|
3177
3203
|
height: fit-content;
|
|
3178
3204
|
width: fit-content;
|
|
3179
|
-
`,
|
|
3205
|
+
`,C0=({className:e,defaultValues:t,header:o,submitText:n,cancelText:r,onCancel:s,enabledIfClean:c,onSubmit:a,content:u,submitButtonVariant:p,cancelButtonVariant:h,variant:g="submit",ContentWrapper:m,disabled:x,...b},y)=>{const v=K.useForm({shouldUnregister:!0,defaultValues:t,disabled:x,...b,mode:g==="blur"?"onBlur":b.mode}),{setOpen:w}=Xe(),{setError:$,reset:k}=v,j=d.useCallback(S=>{a({data:S,closeModal:()=>w(!1),setError:$,resetForm:k})},[a,k,$,w]),C=d.useCallback(()=>{s==null||s(k),w(!1)},[s,k,w]),D=d.useCallback(S=>j(S),[j]),I=m??fa;return i.jsx(K.FormProvider,{...v,children:i.jsxs(ha,{ref:y,as:"form",className:e,onSubmit:g==="blur"?void 0:v.handleSubmit(j),onBlur:g==="blur"?v.handleSubmit(j):void 0,children:[i.jsx(ga,{children:o}),i.jsx(I,{children:u}),i.jsxs(or,{children:[i.jsx(We,{text:r??"Cancel",onClick:C,type:"button",variant:h??"borderless"}),g!=="blur"&&i.jsx(Ln,{onSubmit:D,variant:p??"primary",text:n??"Submit",enabledIfClean:c,disabled:x})]})]})})},$0=zt(C0),j0=f.div`
|
|
3180
3206
|
display: flex;
|
|
3181
3207
|
justify-content: space-between;
|
|
3182
3208
|
gap: 8px;
|
|
3183
3209
|
width: 100%;
|
|
3184
|
-
`,
|
|
3185
|
-
background: ${
|
|
3210
|
+
`,S0=d.forwardRef(({headerText:e,content:t,onClose:o},n)=>{const{setOpen:r}=Xe(),s=d.useCallback(()=>{o==null||o(),r(!1)},[o,r]);return i.jsx(so,{ref:n,header:i.jsxs(j0,{children:[i.jsx(_,{variant:"h2",color:"dark",children:e}),i.jsx(te,{iconId:"Close",color:"blue",onPointerDown:s})]}),content:t})}),[I0]=O(["modal"]),D0={escapeKey:!0,outsidePress:!1,bubbles:!1};function _0(e){const{type:t,open:o,defaultOpen:n,onOpenChange:r,children:s,initialFocus:c,...a}=e,u=t==="confirm"?g0:t==="status"?p0:t==="confirm-delete"?k0:t==="form"?$0:t==="info"?S0:so;return i.jsxs(yn,{dismissOptions:D0,open:o,defaultOpen:n,onOpenChange:r,children:[i.jsx(kn,{initialFocus:c,OverlayStyles:ma,trapFocus:!0,children:i.jsx(u,{...a})}),!!s&&s]})}const T0=({children:e})=>i.jsx(vn,{children:e}),ma=M.css`
|
|
3211
|
+
background: ${I0("overlay-background")};
|
|
3186
3212
|
display: grid;
|
|
3187
3213
|
place-items: center;
|
|
3188
3214
|
z-index: 2;
|
|
3189
|
-
`,[
|
|
3215
|
+
`,[po]=O(["image-config-page-header"]),E0=e=>e?Array.isArray(e)?e.map(t=>i.jsx(mo,{color:"light",children:t},t)):i.jsx(mo,{color:"light",children:e}):null,z0=({action:e,description:t,title:o,titleTag:n,subTitle:r,...s})=>i.jsxs(M0,{...s,children:[i.jsxs(R0,{children:[i.jsxs(O0,{children:[i.jsx(_,{variant:"h1",children:o}),E0(n)]}),t&&i.jsx(_,{variant:"body",color:"grey",children:t}),r&&i.jsx(_,{variant:"body",color:"dark",children:r})]}),e]}),M0=f.div`
|
|
3190
3216
|
align-items: center;
|
|
3191
|
-
background: ${
|
|
3217
|
+
background: ${po("bg")};
|
|
3192
3218
|
display: flex;
|
|
3193
|
-
gap: ${
|
|
3194
|
-
padding: 0 0 ${
|
|
3219
|
+
gap: ${po("gap")};
|
|
3220
|
+
padding: 0 0 ${po("padding-bottom")} 0;
|
|
3195
3221
|
width: 100%;
|
|
3196
|
-
`,
|
|
3222
|
+
`,O0=f.div`
|
|
3197
3223
|
width: 100%;
|
|
3198
3224
|
display: flex;
|
|
3199
3225
|
align-items: center;
|
|
3200
|
-
column-gap: ${
|
|
3226
|
+
column-gap: ${l("spacing-8")};
|
|
3201
3227
|
justify-content: flex-start;
|
|
3202
|
-
`,
|
|
3228
|
+
`,R0=f.div`
|
|
3203
3229
|
display: flex;
|
|
3204
3230
|
flex-direction: column;
|
|
3205
3231
|
flex: 1;
|
|
3206
|
-
gap: ${
|
|
3207
|
-
`,
|
|
3232
|
+
gap: ${po("title-gap")};
|
|
3233
|
+
`,N0=f.div`
|
|
3208
3234
|
width: ${({variant:e})=>e.endsWith("small")?"100px":"128px"};
|
|
3209
3235
|
height: ${({variant:e})=>e.endsWith("small")?"20px":"28px"};
|
|
3210
|
-
`,
|
|
3236
|
+
`,F0=f.div`
|
|
3211
3237
|
width: 100%;
|
|
3212
3238
|
height: 100%;
|
|
3213
3239
|
background: #fff;
|
|
@@ -3215,25 +3241,25 @@
|
|
|
3215
3241
|
overflow: hidden;
|
|
3216
3242
|
display: flex;
|
|
3217
3243
|
align-items: center;
|
|
3218
|
-
border: 1px solid ${
|
|
3244
|
+
border: 1px solid ${l("color-primary")};
|
|
3219
3245
|
|
|
3220
3246
|
position: relative;
|
|
3221
|
-
`,
|
|
3247
|
+
`,A0=f(We)`
|
|
3222
3248
|
width: 100%;
|
|
3223
3249
|
border-radius: 6px;
|
|
3224
3250
|
justify-content: center;
|
|
3225
|
-
`,
|
|
3251
|
+
`,L0=f.div`
|
|
3226
3252
|
height: 100%;
|
|
3227
|
-
background: ${
|
|
3253
|
+
background: ${l("color-primary")};
|
|
3228
3254
|
width: ${({progress:e})=>e}%;
|
|
3229
3255
|
transition: width 0.1s ease-in-out;
|
|
3230
|
-
`,
|
|
3231
|
-
color: ${
|
|
3256
|
+
`,B0=f.div`
|
|
3257
|
+
color: ${l("color-primary")};
|
|
3232
3258
|
background: linear-gradient(
|
|
3233
3259
|
90deg,
|
|
3234
3260
|
#fff,
|
|
3235
3261
|
#fff ${e=>e.progress}%,
|
|
3236
|
-
${
|
|
3262
|
+
${l("color-primary")} ${e=>e.progress}%
|
|
3237
3263
|
);
|
|
3238
3264
|
display: flex;
|
|
3239
3265
|
position: absolute;
|
|
@@ -3245,76 +3271,76 @@
|
|
|
3245
3271
|
color: transparent;
|
|
3246
3272
|
font-weight: bold;
|
|
3247
3273
|
transition: background 0.1s ease;
|
|
3248
|
-
`,
|
|
3274
|
+
`,ba=({isInProgress:e,progress:t,onClick:o,isComplete:n,disabled:r,className:s,completedText:c,inProgressText:a,variant:u="secondary",...p})=>{const[h,g]=d.useState(!1),[m,x]=d.useState(!1);d.useEffect(()=>{e?x(!0):m&&!e&&x(!1)},[e,m]),d.useEffect(()=>{if(n&&m){g(!0);const y=setTimeout(()=>{g(!1)},2e3);return()=>clearTimeout(y)}},[n,m]);const b=h?100:t;return i.jsx(N0,{className:vt(s),variant:u,children:e||h?i.jsxs(F0,{children:[i.jsx(L0,{progress:b}),i.jsx(B0,{progress:b,children:h?c:a})]}):i.jsx(A0,{variant:u,onClick:o,color:"blue",disabled:r,...p})})},W0=W.kosComponent(({future:e,canceledText:t="Canceled",abortedText:o="Aborted",failedText:n="Failed",successText:r="Success",disabled:s,...c})=>{const a=(e==null?void 0:e.endState)===W.FutureEndState.Aborted,u=(e==null?void 0:e.endState)===W.FutureEndState.Canceled,p=(e==null?void 0:e.endState)===W.FutureEndState.Fail,h=()=>a?o:u?t:p?n:r;return i.jsx(ba,{isInProgress:(e==null?void 0:e.status)==="IN_PROGRESS",progress:(e==null?void 0:e.progress)??0,isComplete:(e==null?void 0:e.status)==="SUCCESS"||(e==null?void 0:e.status)==="FAIL"||(e==null?void 0:e.status)==="CANCELED"||(e==null?void 0:e.status)==="ABORT",hasError:p||u||a,completedText:h(),disabled:s,...c})}),[St]=O(["button"]),P0=d.memo(({onClick:e,open:t,buttonText:o,text:n})=>i.jsx(V0,{open:t,children:i.jsxs(H0,{children:[i.jsx(_,{variant:"h2",color:"light",children:n}),i.jsx(We,{variant:"borderless",text:o,onClick:e})]})})),V0=f(Xs)`
|
|
3249
3275
|
z-index: 5;
|
|
3250
|
-
`,
|
|
3276
|
+
`,H0=f.div`
|
|
3251
3277
|
display: flex;
|
|
3252
3278
|
align-items: center;
|
|
3253
3279
|
justify-content: center;
|
|
3254
3280
|
flex-direction: column;
|
|
3255
|
-
row-gap: ${
|
|
3256
|
-
${`${
|
|
3257
|
-
${`${
|
|
3258
|
-
${`${
|
|
3259
|
-
${`${
|
|
3260
|
-
${`${
|
|
3261
|
-
${`${
|
|
3262
|
-
`,
|
|
3281
|
+
row-gap: ${l("spacing-12")};
|
|
3282
|
+
${`${St("bg-borderless",!0)}: transparent`};
|
|
3283
|
+
${`${St("border-borderless",!0)}: transparent`};
|
|
3284
|
+
${`${St("color-borderless",!0)}: ${l("color-white")}`};
|
|
3285
|
+
${`${St("border-hover-borderless",!0)}: ${l("color-white")}`};
|
|
3286
|
+
${`${St("color-hover-borderless",!0)}: ${l("color-white")}`};
|
|
3287
|
+
${`${St("bg-hover-borderless",!0)}: transparent`};
|
|
3288
|
+
`,U0=({groups:e,onSelectionChange:t,value:o,showSelectAll:n=!0,showClearAll:r=!0,placement:s="bottom-end",className:c,buttonContent:a,disabled:u=!1})=>{const[p,h]=d.useState(()=>{const N={};return e.forEach(J=>{N[J.id]=new Set}),N}),[g,m]=d.useState(!1),x=o??p,b=o!==void 0,y=d.useCallback(N=>{b||h(N),t(N)},[b,t]),{refs:v,floatingStyles:w,context:$}=A.useFloating({placement:s,open:g,onOpenChange:m,whileElementsMounted:A.autoUpdate,middleware:[A.offset(4),A.flip(),A.shift({padding:8})]}),k=A.useClick($,{enabled:!u}),j=A.useDismiss($),C=A.useRole($),{getReferenceProps:D,getFloatingProps:I}=A.useInteractions([k,j,C]),S=d.useCallback((N,J)=>{const ee={...x},oe=new Set(x[N]);oe.has(J)?oe.delete(J):oe.add(J),ee[N]=oe,y(ee)},[x,y]),z=d.useCallback(N=>{const J=e.find(oe=>oe.id===N);if(!J)return;const ee={...x};ee[N]=new Set(J.options.map(oe=>oe.value)),y(ee)},[e,x,y]),V=d.useCallback(()=>{const N={};e.forEach(J=>{N[J.id]=new Set}),y(N)},[e,y]),P=d.useMemo(()=>Object.values(x).some(N=>N.size>0),[x]);return i.jsxs(i.Fragment,{children:[i.jsx(G0,{ref:v.setReference,className:c,$isActive:P,$isDisabled:u,...D(),children:a||i.jsxs(i.Fragment,{children:[i.jsx(F,{iconId:"Filter",size:"sm",color:P?"blue":"grey"}),P&&i.jsx(K0,{})]})}),g&&i.jsx(A.FloatingPortal,{children:i.jsx(A.FloatingFocusManager,{context:$,modal:!1,children:i.jsxs(Y0,{ref:v.setFloating,style:w,...I(),children:[i.jsxs(q0,{children:[i.jsx(_,{variant:"body",bold:!0,children:"Filters"}),i.jsxs(Z0,{children:[r&&P&&i.jsx(X0,{onClick:V,children:i.jsx(_,{variant:"small",color:"blue",children:"Clear all"})}),i.jsx(J0,{onClick:()=>m(!1),children:i.jsx(F,{iconId:"Close",size:"sm",color:"grey"})})]})]}),i.jsx(Q0,{children:e.map(N=>i.jsxs(ey,{children:[i.jsxs(ty,{children:[i.jsx(_,{variant:"small",bold:!0,children:N.label}),n&&i.jsx(oy,{onClick:()=>z(N.id),children:i.jsx(_,{variant:"small",color:"blue",children:"Select all"})})]}),i.jsx(ny,{children:N.options.map(J=>{var oe;const ee=((oe=x[N.id])==null?void 0:oe.has(J.value))||!1;return i.jsxs(ry,{$isSelected:ee,onClick:()=>S(N.id,J.value),children:[i.jsx(sy,{$isChecked:ee,children:ee&&i.jsx(F,{iconId:"Check",size:"xsm",color:"white"})}),i.jsx(_,{variant:"small",children:J.label})]},J.value)})})]},N.id))})]})})})]})},G0=f.button`
|
|
3263
3289
|
display: flex;
|
|
3264
3290
|
align-items: center;
|
|
3265
3291
|
justify-content: center;
|
|
3266
3292
|
width: 32px;
|
|
3267
3293
|
height: 32px;
|
|
3268
|
-
background-color: ${e=>e.$isActive?
|
|
3294
|
+
background-color: ${e=>e.$isActive?l("color-additional3"):l("color-white")};
|
|
3269
3295
|
border: 1px solid
|
|
3270
|
-
${e=>e.$isActive?
|
|
3271
|
-
border-radius: ${
|
|
3296
|
+
${e=>e.$isActive?l("color-blue"):l("color-grey30")};
|
|
3297
|
+
border-radius: ${l("spacing-4")};
|
|
3272
3298
|
cursor: ${e=>e.$isDisabled?"not-allowed":"pointer"};
|
|
3273
3299
|
position: relative;
|
|
3274
3300
|
transition: all 0.2s ease;
|
|
3275
3301
|
opacity: ${e=>e.$isDisabled?.5:1};
|
|
3276
3302
|
|
|
3277
3303
|
&:hover:not(:disabled) {
|
|
3278
|
-
background-color: ${e=>e.$isActive?
|
|
3279
|
-
border-color: ${e=>e.$isActive?
|
|
3304
|
+
background-color: ${e=>e.$isActive?l("color-additional1"):l("color-grey10")};
|
|
3305
|
+
border-color: ${e=>e.$isActive?l("color-blue"):l("color-grey40")};
|
|
3280
3306
|
}
|
|
3281
|
-
`,
|
|
3307
|
+
`,K0=f.div`
|
|
3282
3308
|
position: absolute;
|
|
3283
3309
|
top: 4px;
|
|
3284
3310
|
right: 4px;
|
|
3285
3311
|
width: 6px;
|
|
3286
3312
|
height: 6px;
|
|
3287
|
-
background-color: ${
|
|
3313
|
+
background-color: ${l("color-blue")};
|
|
3288
3314
|
border-radius: 50%;
|
|
3289
|
-
`,
|
|
3290
|
-
background-color: ${
|
|
3291
|
-
border: 1px solid ${
|
|
3292
|
-
border-radius: ${
|
|
3315
|
+
`,Y0=f.div`
|
|
3316
|
+
background-color: ${l("color-white")};
|
|
3317
|
+
border: 1px solid ${l("color-grey30")};
|
|
3318
|
+
border-radius: ${l("spacing-4")};
|
|
3293
3319
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
3294
3320
|
min-width: 280px;
|
|
3295
3321
|
max-width: 320px;
|
|
3296
3322
|
z-index: 1000;
|
|
3297
|
-
`,
|
|
3323
|
+
`,q0=f.div`
|
|
3298
3324
|
display: flex;
|
|
3299
3325
|
align-items: center;
|
|
3300
3326
|
justify-content: space-between;
|
|
3301
|
-
padding: ${
|
|
3302
|
-
border-bottom: 1px solid ${
|
|
3303
|
-
`,
|
|
3327
|
+
padding: ${l("spacing-12")} ${l("spacing-16")};
|
|
3328
|
+
border-bottom: 1px solid ${l("color-grey20")};
|
|
3329
|
+
`,Z0=f.div`
|
|
3304
3330
|
display: flex;
|
|
3305
3331
|
align-items: center;
|
|
3306
|
-
gap: ${
|
|
3307
|
-
`,
|
|
3332
|
+
gap: ${l("spacing-8")};
|
|
3333
|
+
`,X0=f.button`
|
|
3308
3334
|
background: none;
|
|
3309
3335
|
border: none;
|
|
3310
3336
|
padding: 0;
|
|
3311
3337
|
cursor: pointer;
|
|
3312
|
-
color: ${
|
|
3338
|
+
color: ${l("color-blue")};
|
|
3313
3339
|
|
|
3314
3340
|
&:hover {
|
|
3315
3341
|
text-decoration: underline;
|
|
3316
3342
|
}
|
|
3317
|
-
`,
|
|
3343
|
+
`,J0=f.button`
|
|
3318
3344
|
background: none;
|
|
3319
3345
|
border: none;
|
|
3320
3346
|
padding: 0;
|
|
@@ -3327,72 +3353,72 @@
|
|
|
3327
3353
|
border-radius: 50%;
|
|
3328
3354
|
|
|
3329
3355
|
&:hover {
|
|
3330
|
-
background-color: ${
|
|
3356
|
+
background-color: ${l("color-grey10")};
|
|
3331
3357
|
}
|
|
3332
|
-
`,
|
|
3333
|
-
padding: ${
|
|
3358
|
+
`,Q0=f.div`
|
|
3359
|
+
padding: ${l("spacing-12")};
|
|
3334
3360
|
max-height: 400px;
|
|
3335
3361
|
overflow-y: auto;
|
|
3336
|
-
`,
|
|
3362
|
+
`,ey=f.div`
|
|
3337
3363
|
&:not(:last-child) {
|
|
3338
|
-
margin-bottom: ${
|
|
3364
|
+
margin-bottom: ${l("spacing-16")};
|
|
3339
3365
|
}
|
|
3340
|
-
`,
|
|
3366
|
+
`,ty=f.div`
|
|
3341
3367
|
display: flex;
|
|
3342
3368
|
align-items: center;
|
|
3343
3369
|
justify-content: space-between;
|
|
3344
|
-
margin-bottom: ${
|
|
3345
|
-
`,
|
|
3370
|
+
margin-bottom: ${l("spacing-8")};
|
|
3371
|
+
`,oy=f.button`
|
|
3346
3372
|
background: none;
|
|
3347
3373
|
border: none;
|
|
3348
3374
|
padding: 0;
|
|
3349
3375
|
cursor: pointer;
|
|
3350
|
-
color: ${
|
|
3376
|
+
color: ${l("color-blue")};
|
|
3351
3377
|
|
|
3352
3378
|
&:hover {
|
|
3353
3379
|
text-decoration: underline;
|
|
3354
3380
|
}
|
|
3355
|
-
`,
|
|
3381
|
+
`,ny=f.div`
|
|
3356
3382
|
display: flex;
|
|
3357
3383
|
flex-direction: column;
|
|
3358
|
-
gap: ${
|
|
3359
|
-
`,
|
|
3384
|
+
gap: ${l("spacing-4")};
|
|
3385
|
+
`,ry=f.div`
|
|
3360
3386
|
display: flex;
|
|
3361
3387
|
align-items: center;
|
|
3362
|
-
gap: ${
|
|
3363
|
-
padding: ${
|
|
3388
|
+
gap: ${l("spacing-8")};
|
|
3389
|
+
padding: ${l("spacing-8")};
|
|
3364
3390
|
cursor: pointer;
|
|
3365
|
-
border-radius: ${
|
|
3366
|
-
background-color: ${e=>e.$isSelected?
|
|
3391
|
+
border-radius: ${l("spacing-4")};
|
|
3392
|
+
background-color: ${e=>e.$isSelected?l("color-additional3"):l("color-white")};
|
|
3367
3393
|
|
|
3368
3394
|
&:hover {
|
|
3369
|
-
background-color: ${e=>e.$isSelected?
|
|
3395
|
+
background-color: ${e=>e.$isSelected?l("color-additional1"):l("color-grey10")};
|
|
3370
3396
|
}
|
|
3371
|
-
`,
|
|
3397
|
+
`,sy=f.div`
|
|
3372
3398
|
width: 16px;
|
|
3373
3399
|
height: 16px;
|
|
3374
3400
|
border: 1.5px solid
|
|
3375
|
-
${e=>e.$isChecked?
|
|
3401
|
+
${e=>e.$isChecked?l("color-blue"):l("color-grey40")};
|
|
3376
3402
|
border-radius: 3px;
|
|
3377
|
-
background-color: ${e=>e.$isChecked?
|
|
3403
|
+
background-color: ${e=>e.$isChecked?l("color-blue"):"transparent"};
|
|
3378
3404
|
display: flex;
|
|
3379
3405
|
align-items: center;
|
|
3380
3406
|
justify-content: center;
|
|
3381
3407
|
flex-shrink: 0;
|
|
3382
|
-
`,[
|
|
3408
|
+
`,[iy,Jo,ay]=O(["view-header","option","select"]),Pr=3,nr=d.memo(({actions:e})=>{const{inlinePrimary:t,overflowPrimary:o,secondary:n}=d.useMemo(()=>{const a=e.filter(p=>p.isPrimary),u=e.filter(p=>!p.isPrimary);return{inlinePrimary:a.slice(0,Pr),overflowPrimary:a.slice(Pr),secondary:u}},[e]),r=o.length>0||n.length>0,s=d.useMemo(()=>{const a=new Map;for(const u of e)a.set(u.id,u);return a},[e]),c=d.useCallback(a=>{const u=s.get(a);u&&!u.disabled&&u.onClick()},[s]);return e.length===0?null:i.jsxs(ly,{children:[t.map(a=>i.jsx(te,{iconId:a.iconId,color:a.color||"grey",size:"sm",onClick:a.onClick,disabled:a.disabled,title:a.tooltip,"aria-label":a.tooltip||a.label||a.id},a.id)),r&&i.jsx(cy,{children:i.jsxs(Rn,{trigger:i.jsx(dy,{title:"More actions",type:"button",children:i.jsx(F,{size:"sm",iconId:"Ellipsis",color:"blue"})}),onSelection:c,children:[o.map(a=>i.jsx(Vr,{optionKey:a.id,label:i.jsxs(Hr,{children:[i.jsx(F,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}),i.jsx(Ur,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id)),o.length>0&&n.length>0&&i.jsx(Nn,{}),n.map(a=>i.jsx(Vr,{optionKey:a.id,label:i.jsxs(Hr,{children:[a.iconId?i.jsx(F,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}):i.jsx(uy,{}),i.jsx(Ur,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id))]})})]})});nr.displayName="ActionBar";const ly=f.div`
|
|
3383
3409
|
display: flex;
|
|
3384
3410
|
align-items: center;
|
|
3385
|
-
gap: ${
|
|
3411
|
+
gap: ${iy("actions-gap")};
|
|
3386
3412
|
flex-shrink: 0;
|
|
3387
|
-
`,
|
|
3388
|
-
${`${Jo("bg-color",!0)}: ${
|
|
3389
|
-
${`${Jo("color",!0)}: ${
|
|
3390
|
-
${`${Jo("bg-color-active",!0)}: ${
|
|
3413
|
+
`,Vr=f(ht)`
|
|
3414
|
+
${`${Jo("bg-color",!0)}: ${l("color-white")}`};
|
|
3415
|
+
${`${Jo("color",!0)}: ${l("color-black")}`};
|
|
3416
|
+
${`${Jo("bg-color-active",!0)}: ${l("color-grey20")}`};
|
|
3391
3417
|
gap: 0px;
|
|
3392
3418
|
cursor: pointer;
|
|
3393
|
-
`,
|
|
3394
|
-
${`${
|
|
3395
|
-
`,
|
|
3419
|
+
`,cy=f.div`
|
|
3420
|
+
${`${ay("border-color",!0)}: ${l("color-grey40")}`};
|
|
3421
|
+
`,dy=f.button`
|
|
3396
3422
|
background: none;
|
|
3397
3423
|
border: none;
|
|
3398
3424
|
padding: 4px;
|
|
@@ -3417,49 +3443,49 @@
|
|
|
3417
3443
|
cursor: not-allowed;
|
|
3418
3444
|
opacity: 0.3;
|
|
3419
3445
|
}
|
|
3420
|
-
`,
|
|
3446
|
+
`,Hr=f.div`
|
|
3421
3447
|
display: flex;
|
|
3422
3448
|
align-items: center;
|
|
3423
3449
|
gap: 8px;
|
|
3424
|
-
`,
|
|
3450
|
+
`,Ur=f.span`
|
|
3425
3451
|
font-size: 13px;
|
|
3426
3452
|
white-space: nowrap;
|
|
3427
|
-
`,
|
|
3453
|
+
`,uy=f.div`
|
|
3428
3454
|
width: 16px;
|
|
3429
3455
|
height: 16px;
|
|
3430
|
-
`,[Ze]=
|
|
3456
|
+
`,[Ze]=O(["view-header"]),rr=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:s,collapsed:c,onToggleCollapse:a,hideHeaderBorder:u})=>{const p=d.useMemo(()=>n&&n.length>0,[n]);return i.jsx(py,{$hideBorder:u,children:i.jsxs(hy,{children:[i.jsxs(gy,{children:[s&&i.jsx(te,{iconId:c?"CaretRight":"CaretDown",color:"grey",size:"sm",onClick:a,"aria-label":c?"Expand view":"Collapse view"}),o&&i.jsx(fy,{children:i.jsx(F,{iconId:o.iconId,color:o.color||"blue",size:"sm"})}),i.jsxs(my,{children:[i.jsx(_,{variant:"h2",children:e}),t&&i.jsx(by,{variant:"small",color:"grey",children:t})]})]}),(r||n&&n.length>0)&&i.jsxs(xy,{children:[r,p&&n?i.jsx(nr,{actions:n}):n==null?void 0:n.map(h=>i.jsx(te,{iconId:h.iconId,color:h.color||"grey",size:"sm",onClick:h.onClick,disabled:h.disabled,title:h.tooltip,"aria-label":h.tooltip||h.id},h.id))]})]})})});rr.displayName="ViewHeader";const py=f.div`
|
|
3431
3457
|
background-color: ${Ze("background-color")};
|
|
3432
3458
|
border-bottom: ${({$hideBorder:e})=>e?"none":`${Ze("border-bottom-width")} solid ${Ze("border-color")}`};
|
|
3433
3459
|
padding: ${Ze("padding")};
|
|
3434
|
-
`,
|
|
3460
|
+
`,hy=f.div`
|
|
3435
3461
|
display: flex;
|
|
3436
3462
|
align-items: center;
|
|
3437
3463
|
justify-content: space-between;
|
|
3438
3464
|
gap: ${Ze("gap")};
|
|
3439
3465
|
min-height: ${Ze("content-min-height")};
|
|
3440
|
-
`,
|
|
3466
|
+
`,gy=f.div`
|
|
3441
3467
|
display: flex;
|
|
3442
3468
|
align-items: center;
|
|
3443
3469
|
gap: ${Ze("left-gap")};
|
|
3444
3470
|
flex: 1;
|
|
3445
3471
|
min-width: 0; /* Allow text truncation */
|
|
3446
|
-
`,
|
|
3472
|
+
`,fy=f.div`
|
|
3447
3473
|
display: flex;
|
|
3448
3474
|
align-items: center;
|
|
3449
3475
|
flex-shrink: 0;
|
|
3450
|
-
`,
|
|
3476
|
+
`,my=f.div`
|
|
3451
3477
|
display: flex;
|
|
3452
3478
|
flex-direction: column;
|
|
3453
3479
|
gap: ${Ze("text-gap")};
|
|
3454
3480
|
min-width: 0; /* Allow text truncation */
|
|
3455
|
-
`,
|
|
3481
|
+
`,by=f(_)`
|
|
3456
3482
|
font-size: ${Ze("subtitle-font-size")};
|
|
3457
|
-
`,
|
|
3483
|
+
`,xy=f.div`
|
|
3458
3484
|
display: flex;
|
|
3459
3485
|
align-items: center;
|
|
3460
3486
|
gap: ${Ze("actions-gap")};
|
|
3461
3487
|
flex-shrink: 0;
|
|
3462
|
-
`,[xt]=
|
|
3488
|
+
`,[xt]=O(["view"]),xa=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,toolbarContent:s,collapsible:c=!1,defaultCollapsed:a=!1,collapsed:u,onToggleCollapse:p,hideHeaderBorder:h,children:g,className:m,onFocus:x})=>{const[b,y]=d.useState(a),v=u!==void 0?u:b,w=d.useCallback(()=>{p?p():y($=>!$)},[p]);return i.jsxs(yy,{className:m,tabIndex:0,onFocus:x,collapsed:v,children:[i.jsx(rr,{title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:c,collapsed:v,onToggleCollapse:w,hideHeaderBorder:h}),!v&&s&&i.jsx(vy,{children:s}),!v&&i.jsx(ky,{children:g})]})});xa.displayName="View";const yy=f.div`
|
|
3463
3489
|
display: flex;
|
|
3464
3490
|
flex-direction: column;
|
|
3465
3491
|
width: 100%;
|
|
@@ -3476,33 +3502,33 @@
|
|
|
3476
3502
|
${({collapsed:e})=>e&&`
|
|
3477
3503
|
flex: 0 0 auto !important;
|
|
3478
3504
|
`}
|
|
3479
|
-
`,
|
|
3505
|
+
`,vy=f.div`
|
|
3480
3506
|
flex: 0 0 auto;
|
|
3481
3507
|
border-bottom: ${xt("border-width")} solid ${xt("border-color")};
|
|
3482
|
-
`,
|
|
3508
|
+
`,ky=f.div`
|
|
3483
3509
|
display: flex;
|
|
3484
3510
|
flex-direction: column;
|
|
3485
3511
|
flex: 1;
|
|
3486
3512
|
overflow: auto;
|
|
3487
3513
|
padding: ${xt("content-padding")};
|
|
3488
|
-
`,
|
|
3514
|
+
`,ya=d.memo(({searchValue:e,onSearchChange:t,onSearch:o,placeholder:n="Search...",filterPanel:r})=>i.jsxs(wy,{children:[i.jsx(Cy,{children:i.jsx(Os,{value:e,onChange:t,onSearch:o??t,placeholder:n})}),r&&i.jsx($y,{children:r})]}));ya.displayName="ViewToolbar";const wy=f.div`
|
|
3489
3515
|
display: flex;
|
|
3490
3516
|
align-items: center;
|
|
3491
|
-
gap: ${
|
|
3492
|
-
padding: ${
|
|
3493
|
-
`,
|
|
3517
|
+
gap: ${l("spacing-8")};
|
|
3518
|
+
padding: ${l("spacing-8")} ${l("spacing-12")};
|
|
3519
|
+
`,Cy=f.div`
|
|
3494
3520
|
flex: 1;
|
|
3495
3521
|
min-width: 0;
|
|
3496
|
-
|
|
3522
|
+
`,$y=f.div`
|
|
3497
3523
|
flex-shrink: 0;
|
|
3498
3524
|
display: flex;
|
|
3499
3525
|
align-items: center;
|
|
3500
|
-
`,[
|
|
3526
|
+
`,[uo]=O(["view-container"]),va=d.memo(({id:e,direction:t="vertical",gap:o,children:n,className:r})=>i.jsx(jy,{id:e,direction:t,gap:o,className:r,children:n}));va.displayName="ViewContainer";const jy=f.div`
|
|
3501
3527
|
display: flex;
|
|
3502
3528
|
flex-direction: ${({direction:e})=>e==="vertical"?"column":"row"};
|
|
3503
|
-
gap: ${({direction:e,gap:t})=>t!==void 0?typeof t=="number"?`${t}px`:t:
|
|
3504
|
-
padding: ${
|
|
3505
|
-
background-color: ${
|
|
3529
|
+
gap: ${({direction:e,gap:t})=>t!==void 0?typeof t=="number"?`${t}px`:t:uo(e==="vertical"?"vertical-gap":"horizontal-gap")};
|
|
3530
|
+
padding: ${uo("padding")};
|
|
3531
|
+
background-color: ${uo("background-color")};
|
|
3506
3532
|
width: 100%;
|
|
3507
3533
|
height: 100%;
|
|
3508
3534
|
|
|
@@ -3512,7 +3538,7 @@
|
|
|
3512
3538
|
min-height: 0;
|
|
3513
3539
|
min-width: 0;
|
|
3514
3540
|
}
|
|
3515
|
-
`,
|
|
3541
|
+
`,Sy=f.div`
|
|
3516
3542
|
position: relative;
|
|
3517
3543
|
width: 100%;
|
|
3518
3544
|
height: 100%;
|
|
@@ -3525,7 +3551,7 @@
|
|
|
3525
3551
|
cursor: ${e=>{switch(e.$state){case"valid-over":return"copy";case"invalid-over":return"no-drop";default:return"default"}}};
|
|
3526
3552
|
|
|
3527
3553
|
border-radius: 4px;
|
|
3528
|
-
`,
|
|
3554
|
+
`,Iy=({accept:e,onDrop:t,canDrop:o,children:n,className:r,idleStyle:s="dashed",activeStyle:c="solid",invalidStyle:a="red"})=>{const u=d.useRef(null),[p,h]=d.useState("idle"),g=Array.isArray(e)?e:[e],m=d.useCallback(v=>{if(!v)return!1;const w=v.type;return!(!w||!g.includes(w)||o&&!o(v))},[g.join(","),o]),x=d.useCallback(v=>{const w=Li();h(m(w)?"valid-over":"invalid-over")},[m]),b=d.useCallback(()=>{h("idle")},[]),y=d.useCallback((v,w)=>{h("idle"),m(v)&&t(v,w)},[m,t]);return Vn({ref:u,data:{id:"__drop-zone__"},canDrag:!1,onDrop:y,onDragOver:x,onDragLeave:b}),i.jsx(Sy,{ref:u,className:r,$state:p,$idleStyle:s,$activeStyle:c,$invalidStyle:a,children:n})},Dy=f.div`
|
|
3529
3555
|
position: relative;
|
|
3530
3556
|
height: 2px;
|
|
3531
3557
|
background-color: var(--color-primary, #1976d2);
|
|
@@ -3545,7 +3571,7 @@
|
|
|
3545
3571
|
border-radius: 50%;
|
|
3546
3572
|
background-color: var(--color-primary, #1976d2);
|
|
3547
3573
|
}
|
|
3548
|
-
`,
|
|
3574
|
+
`,_y=({position:e,isActive:t})=>t?i.jsx(Dy,{$position:e,$active:t}):null,ka=d.createContext(null),Ty=()=>{const e=d.useContext(ka);if(e===null)throw new Error("Unable to use SelectViewListContext outside of its provider.");return e};function Ey(e){if(e=typeof e=="number"?e:parseInt(e),e===0)return"0.00 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}const pn=new IntersectionObserver(([e])=>{const t=e.boundingClientRect.top-e.intersectionRect.top<0,o=e.boundingClientRect.bottom-e.intersectionRect.bottom>0;e.target.classList.toggle("isStuckTop",t),e.target.classList.toggle("isStuckBottom",o)},{threshold:[1]}),zy=(e,t)=>{if(e==="\\"||e==="/")return"/";if(e.length<=1)return e;const n=e.replace(/\\/g,"/").split(/[/\\]+/);return t!==!1&&n[n.length-1]===""&&n.pop(),n.join("/")},My=e=>{const t=d.useContext(e);if(!t)throw new Error("Unable to use context outside of its provider.");return t},[he]=O(["select-view-list"]),wa=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:c}=Ty(),a=d.useRef(null),u=d.useRef(null),p=d.useRef(!1),h=s===e,g=c===e;d.useEffect(()=>{u.current&&(h?(pn.observe(u.current),p.current=!0):p.current&&(p.current=!1,pn.unobserve(u.current)))},[h]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),x=d.useCallback(b=>{a.current&&a.current.contains(b.target)||n==null||n(e,"view")},[e,n]);return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsx(Oy,{ref:u,className:b({isSelected:h}),onClick:x,children:i.jsxs(Ry,{className:b({isViewing:g}),children:[i.jsx(jn,{ref:a,checked:h,disabled:r,onChange:m}),i.jsxs(Ny,{color:"dark",bold:h,variant:"body",children:[t,o]}),i.jsx(F,{iconId:"Right",color:"blue",size:"sm"})]})})})}),Oy=f.div`
|
|
3549
3575
|
width: 100%;
|
|
3550
3576
|
display: flex;
|
|
3551
3577
|
height: auto;
|
|
@@ -3577,7 +3603,7 @@
|
|
|
3577
3603
|
&.isStuckTop {
|
|
3578
3604
|
box-shadow: 0px 6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
3579
3605
|
}
|
|
3580
|
-
`,
|
|
3606
|
+
`,Ry=f.div`
|
|
3581
3607
|
width: 100%;
|
|
3582
3608
|
display: flex;
|
|
3583
3609
|
flex-shrink: 0;
|
|
@@ -3591,7 +3617,7 @@
|
|
|
3591
3617
|
&.isViewing {
|
|
3592
3618
|
background-color: ${he("background-color-viewing")};
|
|
3593
3619
|
}
|
|
3594
|
-
`,
|
|
3620
|
+
`,Ny=f(_)`
|
|
3595
3621
|
flex: 1;
|
|
3596
3622
|
overflow: hidden;
|
|
3597
3623
|
text-overflow: ellipsis;
|
|
@@ -3601,7 +3627,7 @@
|
|
|
3601
3627
|
gap: ${he("gap")};
|
|
3602
3628
|
align-items: center;
|
|
3603
3629
|
display: flex;
|
|
3604
|
-
`,
|
|
3630
|
+
`,Fy=({className:e,dp:t,emptyState:o,firstChild:n,lastChild:r,onListItemAction:s,selected:c,viewing:a})=>{const u=d.useMemo(()=>({selected:c,viewing:a}),[c,a]);return i.jsx(ka.Provider,{value:u,children:i.jsx(Ay,{className:e,dataProvider:t,emptyState:o,firstChild:n,ItemTemplate:wa,lastChild:r,onListItemAction:s})})},Ay=f(Qn)`
|
|
3605
3631
|
height: 100%;
|
|
3606
3632
|
width: 100%;
|
|
3607
3633
|
align-items: flex-start;
|
|
@@ -3617,7 +3643,7 @@
|
|
|
3617
3643
|
::-webkit-scrollbar-thumb {
|
|
3618
3644
|
border-left: 3px solid transparent;
|
|
3619
3645
|
}
|
|
3620
|
-
`,[hn]=
|
|
3646
|
+
`,[hn]=O(["shell-menu"]),Ly=({className:e,left:t,right:o})=>i.jsxs(By,{className:e,children:[i.jsx(Gr,{children:t}),!!o&&i.jsx(Gr,{children:o})]}),By=f.div`
|
|
3621
3647
|
align-items: center;
|
|
3622
3648
|
column-gap: ${hn("section-gap")};
|
|
3623
3649
|
display: flex;
|
|
@@ -3625,66 +3651,66 @@
|
|
|
3625
3651
|
justify-content: space-between;
|
|
3626
3652
|
padding: 0px ${hn("padding-x")};
|
|
3627
3653
|
width: 100%;
|
|
3628
|
-
`,
|
|
3654
|
+
`,Gr=f.div`
|
|
3629
3655
|
align-items: center;
|
|
3630
3656
|
column-gap: ${hn("link-gap")};
|
|
3631
3657
|
display: flex;
|
|
3632
3658
|
height: 100%;
|
|
3633
3659
|
justify-content: flex-start;
|
|
3634
|
-
`,[
|
|
3635
|
-
padding: ${
|
|
3660
|
+
`,[Kr]=O(["shell-menu"]),Wy=d.memo(({text:e,onClick:t,isActive:o})=>i.jsx(Py,{onClick:t,variant:"body",color:"light",bold:o,children:e})),Py=f(_)`
|
|
3661
|
+
padding: ${Kr("link-padding-y")} ${Kr("link-padding-x")};
|
|
3636
3662
|
line-height: unset;
|
|
3637
3663
|
cursor: pointer;
|
|
3638
|
-
`,
|
|
3639
|
-
padding: ${
|
|
3640
|
-
background-color: ${
|
|
3641
|
-
color: ${
|
|
3642
|
-
font-size: ${
|
|
3643
|
-
font-weight: ${
|
|
3664
|
+
`,Ca=d.createContext(null),$a=W.kosComponent(({children:e,t,isSortable:o,onListItemAction:n})=>{const r=d.useMemo(()=>({t,isSortable:!!o,onListItemAction:n}),[o,t,n]);return i.jsx(Ca.Provider,{value:r,children:e})}),sr=()=>{const e=d.useContext(Ca);if(e===null)throw new Error("TableContext must be used within a TableContextProvider");return e},[dt]=O(["table"]),Mo=f.td`
|
|
3665
|
+
padding: ${dt("cell-padding-y")} ${dt("cell-padding-x")};
|
|
3666
|
+
background-color: ${dt("background-color")};
|
|
3667
|
+
color: ${dt("cell-color")};
|
|
3668
|
+
font-size: ${dt("cell-font-size")};
|
|
3669
|
+
font-weight: ${dt("cell-font-weight")};
|
|
3644
3670
|
&.isSortable {
|
|
3645
|
-
padding-right: ${
|
|
3671
|
+
padding-right: ${dt("cell-padding-right-sortable")};
|
|
3646
3672
|
}
|
|
3647
3673
|
&:first-of-type {
|
|
3648
|
-
padding-left: ${
|
|
3674
|
+
padding-left: ${dt("cell-padding-left-first-in-row")};
|
|
3649
3675
|
}
|
|
3650
|
-
`,ir=d.memo(({cell:e})=>{const{isSortable:t}=sr();return i.jsx(Mo,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:
|
|
3676
|
+
`,ir=d.memo(({cell:e})=>{const{isSortable:t}=sr();return i.jsx(Mo,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:Ce.flexRender(e.column.columnDef.cell,e.getContext())},e.id)}),[Yr]=O(["table"]),Xt=f.tr`
|
|
3651
3677
|
width: 100%;
|
|
3652
|
-
border-bottom: ${
|
|
3653
|
-
`,
|
|
3678
|
+
border-bottom: ${Yr("row-border-bottom-size")} solid ${Yr("border-color")};
|
|
3679
|
+
`,Vy=d.memo(({row:e,TdComponent:t})=>{const o=t??ir;return i.jsx(Xt,{children:e.getVisibleCells().map(n=>i.jsx(o,{cell:n},n.id))})}),[Hy]=O(["table"]),Uy=e=>e.id,Gy=({items:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:c,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...g})=>{const[m,x]=d.useState([]),b=Ce.useReactTable({columns:t,meta:{disabled:h},data:e,getCoreRowModel:Ce.getCoreRowModel(),getSortedRowModel:r?Ce.getSortedRowModel():void 0,getRowId:o??Uy,onSortingChange:r?x:void 0,state:{sorting:m}}),y=a??Vy,v=!b.getRowModel().rows.length;return v&&p?n??null:i.jsx($a,{onListItemAction:u,isSortable:r,t:s,children:i.jsxs(qy,{...g,children:[i.jsx(Zy,{children:b.getHeaderGroups().map(w=>i.jsx(Xt,{children:w.headers.map($=>i.jsx(d.Fragment,{children:Ce.flexRender($.column.columnDef.header,$.getContext())},$.id))},w.id))}),i.jsx(Xy,{children:v?i.jsx(Xt,{children:i.jsx(Mo,{colSpan:t.length,children:n??null})}):b.getRowModel().rows.map(w=>i.jsx(y,{row:w,TdComponent:c??ir},w.id))})]})})},Ky=[],Yy=W.kosComponent(({dataProvider:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:c,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...g})=>{const m=no(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(Tt.Observer,{children:()=>{const x=m&&e?e.items:Ky;return i.jsx(Gy,{items:x,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:c,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...g})}})})}),qy=f.table`
|
|
3654
3680
|
width: 100%;
|
|
3655
3681
|
overflow: auto;
|
|
3656
3682
|
border-collapse: collapse;
|
|
3657
|
-
font-family: ${
|
|
3683
|
+
font-family: ${Hy("font-family")};
|
|
3658
3684
|
table-layout: fixed;
|
|
3659
|
-
`,
|
|
3685
|
+
`,Zy=f.thead`
|
|
3660
3686
|
width: 100%;
|
|
3661
|
-
`,
|
|
3687
|
+
`,Xy=f.tbody`
|
|
3662
3688
|
width: 100%;
|
|
3663
|
-
`,[
|
|
3664
|
-
padding: ${
|
|
3665
|
-
background-color: ${
|
|
3666
|
-
color: ${
|
|
3667
|
-
font-size: ${
|
|
3668
|
-
font-weight: ${
|
|
3689
|
+
`,[Fe]=O(["table"]),Jy=(e,t)=>e?e==="desc"?(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.ascending"),defaultValue:"Click to sort ascending"}))??"Click to sort ascending":(t==null?void 0:t("table.cancelSort",{defaultValue:"Cancel sort"}))??"Cancel sort":(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.descending"),defaultValue:"Click to sort descending"}))??"Click to sort descending",gn=d.memo(({width:e,isBlank:t,toggleSorting:o,id:n,alignment:r,sortValue:s,canSort:c,isVirtual:a})=>{const{isSortable:u,t:p}=sr(),h=d.useCallback(()=>{o()},[o]);return i.jsx(Qy,{className:vt({isSortable:u&&c,isSorted:s!==!1}),style:{width:e??"auto",display:a?"flex":"table-cell"},children:i.jsxs(ev,{"data-alignment":r,children:[!t&&((p==null?void 0:p(`table.header.${n}`))??n),u&&c&&i.jsx($o,{content:Jy(s,p),children:i.jsx(te,{iconId:s?s==="asc"?"SortAscending":"SortDescending":"Sort",size:"sm",onClick:h,color:"grey"})})]})})}),Qy=f.th`
|
|
3690
|
+
padding: ${Fe("cell-padding-y")} ${Fe("cell-padding-x")};
|
|
3691
|
+
background-color: ${Fe("header-background-color")};
|
|
3692
|
+
color: ${Fe("head-color")};
|
|
3693
|
+
font-size: ${Fe("head-font-size")};
|
|
3694
|
+
font-weight: ${Fe("head-font-weight")};
|
|
3669
3695
|
&.isSortable {
|
|
3670
3696
|
transition: background 0.125s ease-in-out;
|
|
3671
|
-
padding-right: ${
|
|
3697
|
+
padding-right: ${Fe("cell-padding-right-sortable")};
|
|
3672
3698
|
cursor: pointer;
|
|
3673
3699
|
:hover {
|
|
3674
|
-
background-color: ${
|
|
3700
|
+
background-color: ${Fe("header-background-color-hover")};
|
|
3675
3701
|
}
|
|
3676
3702
|
}
|
|
3677
3703
|
&.isSorted {
|
|
3678
|
-
background-color: ${
|
|
3704
|
+
background-color: ${Fe("header-background-color-hover")};
|
|
3679
3705
|
}
|
|
3680
3706
|
&:first-of-type {
|
|
3681
|
-
padding-left: ${
|
|
3707
|
+
padding-left: ${Fe("cell-padding-left-first-in-row")};
|
|
3682
3708
|
}
|
|
3683
|
-
`,
|
|
3709
|
+
`,ev=f.div`
|
|
3684
3710
|
display: flex;
|
|
3685
3711
|
align-items: center;
|
|
3686
3712
|
justify-content: space-between;
|
|
3687
|
-
column-gap: ${
|
|
3713
|
+
column-gap: ${Fe("head-gap-sortable")};
|
|
3688
3714
|
&[data-alignment="left"] {
|
|
3689
3715
|
justify-content: flex-start;
|
|
3690
3716
|
}
|
|
@@ -3694,36 +3720,46 @@
|
|
|
3694
3720
|
&[data-alignment="center"] {
|
|
3695
3721
|
justify-content: center;
|
|
3696
3722
|
}
|
|
3697
|
-
`,
|
|
3723
|
+
`,tv=()=>{const e=Ce.createColumnHelper();return{displayColumn:r=>s=>e.display({header:({column:c,header:a})=>{var u,p,h;return i.jsx(gn,{id:a.id,canSort:c.getCanSort(),width:(u=c.columnDef.meta)==null?void 0:u.width,alignment:(p=c.columnDef.meta)==null?void 0:p.headerAlign,isBlank:(h=c.columnDef.meta)==null?void 0:h.isBlank,toggleSorting:c.toggleSorting,sortValue:c.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},a.id)},...s,meta:{...s.meta,width:"auto",...r}}),accessorColumn:r=>(s,c)=>e.accessor(s,{header:({column:a,header:u})=>{var p,h,g;return i.jsx(gn,{id:u.id,canSort:a.getCanSort(),width:(p=a.columnDef.meta)==null?void 0:p.width,alignment:(h=a.columnDef.meta)==null?void 0:h.headerAlign,isBlank:(g=a.columnDef.meta)==null?void 0:g.isBlank,toggleSorting:a.toggleSorting,sortValue:a.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},u.id)},...c,meta:{...c.meta,width:"auto",...r}}),groupColumn:r=>s=>e.group({...s,meta:{...s.meta,width:"auto",...r}})}};function It(e,t,o){let n=o.initialDeps??[],r;function s(){var c,a,u,p;let h;o.key&&((c=o.debug)!=null&&c.call(o))&&(h=Date.now());const g=e();if(!(g.length!==n.length||g.some((b,y)=>n[y]!==b)))return r;n=g;let x;if(o.key&&((a=o.debug)!=null&&a.call(o))&&(x=Date.now()),r=t(...g),o.key&&((u=o.debug)!=null&&u.call(o))){const b=Math.round((Date.now()-h)*100)/100,y=Math.round((Date.now()-x)*100)/100,v=y/16,w=($,k)=>{for($=String($);$.length<k;)$=" "+$;return $};console.info(`%c⏱ ${w(y,5)} /${w(b,5)} ms`,`
|
|
3698
3724
|
font-size: .6rem;
|
|
3699
3725
|
font-weight: bold;
|
|
3700
|
-
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(p=o==null?void 0:o.onChange)==null||p.call(o,r),r}return s.updateDeps=l=>{n=l},s}function Yr(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Yy=(e,t)=>Math.abs(e-t)<1.01,qy=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},qr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},Zy=e=>e,Xy=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},Jy=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=l=>{const{width:a,height:u}=l;t({width:Math.round(a),height:Math.round(u)})};if(r(qr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(l=>{const a=()=>{const u=l[0];if(u!=null&&u.borderBoxSize){const p=u.borderBoxSize[0];if(p){r({width:p.inlineSize,height:p.blockSize});return}}r(qr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},Zr={passive:!0},Xr=typeof window>"u"?!0:"onscrollend"in window,Qy=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&Xr?()=>{}:qy(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:f,isRtl:m}=e.options;r=f?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,h)},a=l(!0),u=l(!1);u(),o.addEventListener("scroll",a,Zr);const p=e.options.useScrollendEvent&&Xr;return p&&o.addEventListener("scrollend",u,Zr),()=>{o.removeEventListener("scroll",a),p&&o.removeEventListener("scrollend",u)}},ev=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},tv=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const l=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:l,behavior:o})};class ov{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const l=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Zy,rangeExtractor:Xy,onChange:()=>{},measureElement:ev,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=It(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let l=n-1;l>=0;l--){const a=o[l];if(r.has(a.lane))continue;const u=s.get(a.lane);if(u==null||a.end>u.end?s.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((l,a)=>l.end===a.end?l.index-a.index:l.end-a.end)[0]:void 0},this.getMeasurementOptions=It(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,l)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:l}),{key:!1}),this.getMeasurements=It(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:l},a)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const p=this.measurementsCache.slice(0,u);for(let h=u;h<o;h++){const f=s(h),m=this.options.lanes===1?p[h-1]:this.getFurthestMeasurement(p,h),x=m?m.end+this.options.gap:n+r,b=a.get(f),y=typeof b=="number"?b:this.options.estimateSize(h),v=x+y,w=m?m.lane:h%this.options.lanes;p[h]={index:h,start:x,size:y,end:v,key:f,lane:w}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=It(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?nv({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=It(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,l)=>s===null||l===null?[]:o({startIndex:s,endIndex:l,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const l=s.key,a=this.elementsCache.get(l);a!==o&&(a&&this.observer.unobserve(a),this.observer.observe(o),this.elementsCache.set(l,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,l=n-s;l!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,l,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=l,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=It(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,l=o.length;s<l;s++){const a=o[s],u=n[a];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return Yr(n[ya(0,n.length-1,r=>Yr(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),l=this.getScrollOffset();n==="auto"&&(n=o>=l+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),l=this.getScrollOffset();if(n==="auto")if(r.end>=l+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=l+this.options.scrollPaddingStart)n="start";else return[l,n];const a=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const l=10,a=p=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(o,p);if(!h){console.warn("Failed to get offset for index:",o);return}const[f,m]=h;this._scrollToOffset(f,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}Yy(b[0],x)||u(m)})},u=p=>{this.targetWindow&&(s++,s<l?this.targetWindow.requestAnimationFrame(()=>a(p)):console.warn(`Failed to scroll to index ${o} after ${l} attempts.`))};a(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let l=n.length-1;for(;l>=0&&s.some(a=>a===null);){const a=n[l];s[a.lane]===null&&(s[a.lane]=a.end),l--}r=Math.max(...s.filter(a=>a!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ya=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function nv({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let l=ya(0,r,s,o),a=l;if(n===1)for(;a<r&&e[a].end<o+t;)a++;else if(n>1){const u=Array(n).fill(0);for(;a<r&&u.some(h=>h<o+t);){const h=e[a];u[h.lane]=h.end,a++}const p=Array(n).fill(o+t);for(;l>=0&&p.some(h=>h>=o);){const h=e[l];p[h.lane]=h.start,l--}l=Math.max(0,l-l%n),a=Math.min(r,a+(n-1-a%n))}return{startIndex:l,endIndex:a}}const Jr=typeof document<"u"?uo.useLayoutEffect:uo.useEffect;function rv(e){const t=uo.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var l;s?Qr.flushSync(t):t(),(l=e.onChange)==null||l.call(e,r,s)}},[n]=uo.useState(()=>new ov(o));return n.setOptions(o),Jr(()=>n._didMount(),[]),Jr(()=>n._willUpdate()),n}function sv(e){return rv({observeElementRect:Jy,observeElementOffset:Qy,scrollToFn:tv,...e})}const[va]=M(["table"]),iv=e=>e.id,av=({items:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:a,renderEmptyAsStandalone:u,...p})=>{const h=d.useRef(null),[f,m]=d.useState([]),x=we.useReactTable({columns:t,data:e,getCoreRowModel:we.getCoreRowModel(),getSortedRowModel:s?we.getSortedRowModel():void 0,getRowId:n??iv,onSortingChange:s?m:void 0,state:{sorting:f}}),b=!x.getRowModel().rows.length;return b&&u?r??null:i.jsx(xa,{onListItemAction:a,isSortable:s,t:l,children:i.jsx(pv,{className:o,ref:h,children:i.jsxs(hv,{...p,children:[i.jsx(fv,{children:x.getHeaderGroups().map(y=>i.jsx(Tt,{style:{display:"flex"},children:y.headers.map(v=>i.jsx(d.Fragment,{children:we.flexRender(v.column.columnDef.header,v.getContext())},v.id))},y.id))}),i.jsx(dv,{isEmpty:b,numColumns:t.length,emptyState:r,table:x,tableContainerRef:h})]})})})},lv=[],cv=W.kosComponent(({dataProvider:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,TdComponent:a,TrComponent:u,onListItemAction:p,renderEmptyAsStandalone:h,...f})=>{const m=to(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(Et.Observer,{children:()=>{const x=m&&e?e.items:lv;return i.jsx(av,{items:x,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:p,renderEmptyAsStandalone:h,...f})}})})}),dv=W.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:l}=e.getRowModel(),a=sv({count:l.length,estimateSize:()=>33,getScrollElement:()=>t.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?u=>u==null?void 0:u.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(gv,{style:{position:"relative",height:`${a.getTotalSize()}px`},children:n?i.jsx(Tt,{children:i.jsx(Mo,{colSpan:s,children:r??null})}):a.getVirtualItems().map(u=>{const p=l[u.index];return i.jsx(uv,{trClassName:o,row:p,virtualRow:u,rowVirtualizer:a},p.id)})})}),uv=W.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(Tt,{"data-index":o.index,ref:r=>n.measureElement(r),className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(r=>{var s;return i.jsx(Mo,{style:{display:"flex",width:((s=r.column.columnDef.meta)==null?void 0:s.width)??r.column.getSize()},children:we.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)),pv=g.div`
|
|
3726
|
+
color: hsl(${Math.max(0,Math.min(120-120*v,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(p=o==null?void 0:o.onChange)==null||p.call(o,r),r}return s.updateDeps=c=>{n=c},s}function qr(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const ov=(e,t)=>Math.abs(e-t)<1.01,nv=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},Zr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},rv=e=>e,sv=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},iv=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=c=>{const{width:a,height:u}=c;t({width:Math.round(a),height:Math.round(u)})};if(r(Zr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(c=>{const a=()=>{const u=c[0];if(u!=null&&u.borderBoxSize){const p=u.borderBoxSize[0];if(p){r({width:p.inlineSize,height:p.blockSize});return}}r(Zr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},Xr={passive:!0},Jr=typeof window>"u"?!0:"onscrollend"in window,av=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&Jr?()=>{}:nv(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),c=h=>()=>{const{horizontal:g,isRtl:m}=e.options;r=g?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,h)},a=c(!0),u=c(!1);u(),o.addEventListener("scroll",a,Xr);const p=e.options.useScrollendEvent&&Jr;return p&&o.addEventListener("scrollend",u,Xr),()=>{o.removeEventListener("scroll",a),p&&o.removeEventListener("scrollend",u)}},lv=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},cv=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const c=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:c,behavior:o})};class dv{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const c=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rv,rangeExtractor:sv,onChange:()=>{},measureElement:lv,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=It(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let c=n-1;c>=0;c--){const a=o[c];if(r.has(a.lane))continue;const u=s.get(a.lane);if(u==null||a.end>u.end?s.set(a.lane,a):a.end<u.end&&r.set(a.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((c,a)=>c.end===a.end?c.index-a.index:c.end-a.end)[0]:void 0},this.getMeasurementOptions=It(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,c)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:c}),{key:!1}),this.getMeasurements=It(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:c},a)=>{if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(h=>{this.itemSizeCache.set(h.key,h.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const p=this.measurementsCache.slice(0,u);for(let h=u;h<o;h++){const g=s(h),m=this.options.lanes===1?p[h-1]:this.getFurthestMeasurement(p,h),x=m?m.end+this.options.gap:n+r,b=a.get(g),y=typeof b=="number"?b:this.options.estimateSize(h),v=x+y,w=m?m.lane:h%this.options.lanes;p[h]={index:h,start:x,size:y,end:v,key:g,lane:w}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=It(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?uv({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=It(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,c)=>s===null||c===null?[]:o({startIndex:s,endIndex:c,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const c=s.key,a=this.elementsCache.get(c);a!==o&&(a&&this.observer.unobserve(a),this.observer.observe(o),this.elementsCache.set(c,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,c=n-s;c!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,c,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=It(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,c=o.length;s<c;s++){const a=o[s],u=n[a];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return qr(n[ja(0,n.length-1,r=>qr(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),c=this.getScrollOffset();n==="auto"&&(n=o>=c+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),c=this.getScrollOffset();if(n==="auto")if(r.end>=c+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=c+this.options.scrollPaddingStart)n="start";else return[c,n];const a=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const c=10,a=p=>{if(!this.targetWindow)return;const h=this.getOffsetForIndex(o,p);if(!h){console.warn("Failed to get offset for index:",o);return}const[g,m]=h;this._scrollToOffset(g,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}ov(b[0],x)||u(m)})},u=p=>{this.targetWindow&&(s++,s<c?this.targetWindow.requestAnimationFrame(()=>a(p)):console.warn(`Failed to scroll to index ${o} after ${c} attempts.`))};a(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let c=n.length-1;for(;c>=0&&s.some(a=>a===null);){const a=n[c];s[a.lane]===null&&(s[a.lane]=a.end),c--}r=Math.max(...s.filter(a=>a!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ja=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function uv({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let c=ja(0,r,s,o),a=c;if(n===1)for(;a<r&&e[a].end<o+t;)a++;else if(n>1){const u=Array(n).fill(0);for(;a<r&&u.some(h=>h<o+t);){const h=e[a];u[h.lane]=h.end,a++}const p=Array(n).fill(o+t);for(;c>=0&&p.some(h=>h>=o);){const h=e[c];p[h.lane]=h.start,c--}c=Math.max(0,c-c%n),a=Math.min(r,a+(n-1-a%n))}return{startIndex:c,endIndex:a}}const Qr=typeof document<"u"?ho.useLayoutEffect:ho.useEffect;function pv(e){const t=ho.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var c;s?os.flushSync(t):t(),(c=e.onChange)==null||c.call(e,r,s)}},[n]=ho.useState(()=>new dv(o));return n.setOptions(o),Qr(()=>n._didMount(),[]),Qr(()=>n._willUpdate()),n}function hv(e){return pv({observeElementRect:iv,observeElementOffset:av,scrollToFn:cv,...e})}const gv=W.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n,TrComponent:r,TdComponent:s})=>{const c=r??Xt,a=s??Mo;return i.jsx(c,{"data-index":o.index,ref:u=>n.measureElement(u),rowId:t.id,className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(u=>{var p;return i.jsx(a,{cell:u,style:{display:"flex",width:((p=u.column.columnDef.meta)==null?void 0:p.width)??u.column.getSize()},children:Ce.flexRender(u.column.columnDef.cell,u.getContext())},u.id)})},t.id)}),fv=W.kosComponent(({tableContainerRef:e,trClassName:t,isEmpty:o,emptyState:n,numColumns:r,TdComponent:s,TrComponent:c,rows:a})=>{const u=hv({count:a.length,estimateSize:()=>33,getScrollElement:()=>e.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?p=>p==null?void 0:p.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(bv,{style:{position:"relative",height:o?"80%":`${u.getTotalSize()}px`},children:o?i.jsx(mv,{children:i.jsx(Mo,{colSpan:r,children:n??null})}):u.getVirtualItems().map(p=>{const h=a[p.index];return i.jsx(gv,{TrComponent:c,TdComponent:s,trClassName:t,row:h,virtualRow:p,rowVirtualizer:u},h.id)})})}),mv=f.tr`
|
|
3727
|
+
width: 100%;
|
|
3728
|
+
height: 100%;
|
|
3729
|
+
display: flex;
|
|
3730
|
+
align-items: center;
|
|
3731
|
+
justify-content: center;
|
|
3732
|
+
`,bv=f.tbody`
|
|
3733
|
+
width: 100%;
|
|
3734
|
+
display: flex;
|
|
3735
|
+
`,[Sa]=O(["table"]),xv=e=>e.id,yv=W.kosComponent(({columns:e,getRowId:t,emptyState:o,isSortable:n,t:r,TrComponent:s,TdComponent:c,onListItemAction:a,renderEmptyAsStandalone:u,hasMoreToFetch:p,fetching:h,loadMore:g,className:m,fetchDistance:x=300,items:b,...y})=>{const v=d.useRef(null),[w,$]=d.useState([]),k=Ce.useReactTable({columns:e,data:b,getCoreRowModel:Ce.getCoreRowModel(),getSortedRowModel:n?Ce.getSortedRowModel():void 0,getRowId:t??xv,onSortingChange:n?$:void 0,state:{sorting:w}}),j=k.getRowModel().rows,C=!b.length;console.log({items:b,isEmpty:C});const D=d.useCallback(S=>{if(S&&g&&h!==void 0&&p!==void 0){const{scrollHeight:z,scrollTop:V,clientHeight:P}=S,N=z-V-P;z>P&&N<x&&!h&&p&&g()}},[g,h,x,p]),I=d.useMemo(()=>W.debounce(null,()=>D(v.current),150),[D]);return d.useEffect(()=>{D(v.current)},[]),C&&u?o??null:i.jsx($a,{onListItemAction:a,isSortable:n,t:r,children:i.jsx(wv,{className:m,onScroll:g?I:void 0,ref:v,children:i.jsxs(Cv,{...y,children:[i.jsx($v,{children:k.getHeaderGroups().map(S=>i.jsx(Xt,{style:{display:"flex"},children:S.headers.map(z=>i.jsx(d.Fragment,{children:Ce.flexRender(z.column.columnDef.header,z.getContext())},z.id))},S.id))}),i.jsx(fv,{isEmpty:C,numColumns:e.length,emptyState:o,rows:j,TdComponent:c,TrComponent:s,tableContainerRef:v})]})})})}),vv=[],kv=W.kosComponent(({dataProvider:e,...t})=>{const o=no(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(Tt.Observer,{children:()=>{const n=o&&e?e.items:vv;return i.jsx(yv,{items:n,...t})}})})}),wv=f.div`
|
|
3701
3736
|
width: 100%;
|
|
3702
3737
|
display: grid;
|
|
3703
3738
|
overflow: auto;
|
|
3704
|
-
|
|
3739
|
+
position: relative;
|
|
3740
|
+
`,Cv=f.table`
|
|
3705
3741
|
width: 100%;
|
|
3742
|
+
display: block;
|
|
3706
3743
|
border-collapse: collapse;
|
|
3707
|
-
font-family: ${
|
|
3744
|
+
font-family: ${Sa("font-family")};
|
|
3708
3745
|
table-layout: fixed;
|
|
3709
|
-
|
|
3746
|
+
`,$v=f.thead`
|
|
3710
3747
|
width: 100%;
|
|
3711
3748
|
position: sticky;
|
|
3712
|
-
|
|
3749
|
+
display: flex;
|
|
3750
|
+
background-color: ${Sa("header-background-color")};
|
|
3713
3751
|
top: 0;
|
|
3714
3752
|
z-index: 1;
|
|
3715
|
-
`,
|
|
3716
|
-
width: 100%;
|
|
3717
|
-
`,mv=d.forwardRef(({onSearch:e,searchDelay:t=100,prefixSize:o,prefixIconColor:n,className:r,placeholder:s,resultTotal:l,resultCurrent:a,defaultValue:u,inputClassName:p,onNext:h,onPrev:f},m)=>{const[x,b]=d.useState(u??""),y=d.useMemo(()=>W.debounce(null,e,t),[e,t]),v=d.useCallback(k=>{const S=k.currentTarget.value;b(S),y(S)},[y]),w=d.useCallback(()=>{b(""),e("")},[e]),$=l!==void 0&&a!==void 0&&!!h&&!!f;return(l!==void 0||a!==void 0||h!==void 0||f!==void 0)&&!$&&(console.error("Unable to show results in search input without full results config"),h||console.error("- onNext is missing."),f||console.error("- onPrev is missing."),a===void 0&&console.error("- resultCurrent is missing."),l===void 0&&console.error("- resultTotal is missing.")),i.jsxs(bv,{className:r,children:[i.jsx(xv,{value:x,ref:m,className:p,prefixIconId:"Search",prefixIconColor:n??"black",prefixSize:o,placeholder:s,onChange:v,"data-show-results":$}),$&&i.jsxs(yv,{children:[i.jsx(_,{variant:"body",color:"grey",children:`${a}/${l}`}),i.jsx(oe,{iconId:"CaretUp",size:"sm",color:"blue",disabled:a===1,onClick:f}),i.jsx(oe,{iconId:"CaretDown",size:"sm",color:"blue",disabled:a>=l,onClick:h}),i.jsx(vv,{}),i.jsx(oe,{iconId:"Close",color:"blue",size:"sm",onClick:w,disabled:!x})]})]})}),bv=g.div`
|
|
3753
|
+
`,jv=d.forwardRef(({onSearch:e,searchDelay:t=100,prefixSize:o,prefixIconColor:n,className:r,placeholder:s,resultTotal:c,resultCurrent:a,defaultValue:u,inputClassName:p,onNext:h,onPrev:g},m)=>{const[x,b]=d.useState(u??""),y=d.useMemo(()=>W.debounce(null,e,t),[e,t]),v=d.useCallback(k=>{const j=k.currentTarget.value;b(j),y(j)},[y]),w=d.useCallback(()=>{b(""),e("")},[e]),$=c!==void 0&&a!==void 0&&!!h&&!!g;return(c!==void 0||a!==void 0||h!==void 0||g!==void 0)&&!$&&(console.error("Unable to show results in search input without full results config"),h||console.error("- onNext is missing."),g||console.error("- onPrev is missing."),a===void 0&&console.error("- resultCurrent is missing."),c===void 0&&console.error("- resultTotal is missing.")),i.jsxs(Sv,{className:r,children:[i.jsx(Iv,{value:x,ref:m,className:p,prefixIconId:"Search",prefixIconColor:n??"black",prefixSize:o,placeholder:s,onChange:v,"data-show-results":$}),$&&i.jsxs(Dv,{children:[i.jsx(_,{variant:"body",color:"grey",children:`${a}/${c}`}),i.jsx(te,{iconId:"CaretUp",size:"sm",color:"blue",disabled:a===1,onClick:g}),i.jsx(te,{iconId:"CaretDown",size:"sm",color:"blue",disabled:a>=c,onClick:h}),i.jsx(_v,{}),i.jsx(te,{iconId:"Close",color:"blue",size:"sm",onClick:w,disabled:!x})]})]})}),Sv=f.div`
|
|
3718
3754
|
width: 100%;
|
|
3719
3755
|
height: fit-content;
|
|
3720
3756
|
position: relative;
|
|
3721
3757
|
display: flex;
|
|
3722
|
-
`,
|
|
3758
|
+
`,Iv=f(kt)`
|
|
3723
3759
|
&[data-show-results="true"] {
|
|
3724
3760
|
padding-right: 102px;
|
|
3725
3761
|
}
|
|
3726
|
-
`,
|
|
3762
|
+
`,Dv=f.div`
|
|
3727
3763
|
position: absolute;
|
|
3728
3764
|
top: 50%;
|
|
3729
3765
|
transform: translateY(-50%);
|
|
@@ -3731,27 +3767,89 @@
|
|
|
3731
3767
|
display: flex;
|
|
3732
3768
|
height: 100%;
|
|
3733
3769
|
align-items: center;
|
|
3734
|
-
padding-right: ${
|
|
3770
|
+
padding-right: ${l("spacing-8")};
|
|
3735
3771
|
justify-content: flex-end;
|
|
3736
|
-
column-gap: ${
|
|
3737
|
-
`,
|
|
3772
|
+
column-gap: ${l("spacing-8")};
|
|
3773
|
+
`,_v=f.div`
|
|
3738
3774
|
width: 1px;
|
|
3739
3775
|
height: 40%;
|
|
3740
|
-
background-color: ${
|
|
3741
|
-
`,
|
|
3776
|
+
background-color: ${l("color-grey30")};
|
|
3777
|
+
`,Tv=e=>{switch(e){default:return i.jsxs("svg",{viewBox:"0 0 144 88",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i.jsx("rect",{x:"32",width:"88",height:"88",rx:"6",fill:"#F6F6F6"}),i.jsx("rect",{x:"16",y:"12",width:"81",height:"16",rx:"6",fill:"#DFDFDF"}),i.jsx("rect",{x:"55",y:"36",width:"81",height:"16",rx:"6",fill:"#DFDFDF"}),i.jsx("rect",{x:"20",y:"60",width:"83",height:"16",rx:"6",fill:"#DFDFDF"})]})}},Ev=({title:e,description:t,image:o,className:n,CustomImage:r})=>i.jsxs(zv,{className:n,children:[!!o&&i.jsx(es,{className:"em-image-wrapper",children:Tv(o)}),!!r&&!o&&i.jsx(es,{className:"em-image-wrapper",children:r}),i.jsx(_,{variant:"body",color:"dark",bold:!0,className:"em-title",children:e}),!!t&&i.jsx(_,{variant:"body",color:"grey",className:"em-description",children:t})]}),zv=f.div`
|
|
3778
|
+
display: flex;
|
|
3779
|
+
align-items: center;
|
|
3780
|
+
justify-content: center;
|
|
3781
|
+
flex-direction: column;
|
|
3782
|
+
row-gap: ${l("spacing-8")};
|
|
3783
|
+
`,es=f.div`
|
|
3784
|
+
max-width: 144px;
|
|
3785
|
+
display: flex;
|
|
3786
|
+
width: fit-content;
|
|
3787
|
+
margin-bottom: ${l("spacing-8")};
|
|
3788
|
+
svg {
|
|
3789
|
+
width: 100%;
|
|
3790
|
+
}
|
|
3791
|
+
`,Mv=d.memo(({title:e})=>{const{open:t,setOpen:o}=Mt();return i.jsxs(Ov,{onClick:()=>o(!t),children:[i.jsx(F,{iconId:t?"CaretDown":"CaretUp",color:"black",size:"sm"}),i.jsx(_,{variant:"body",color:"dark",bold:!0,children:e})]})}),Ov=f.div`
|
|
3792
|
+
width: 100%;
|
|
3793
|
+
display: flex;
|
|
3794
|
+
align-items: center;
|
|
3795
|
+
justify-content: flex-start;
|
|
3796
|
+
column-gap: ${l("spacing-6")};
|
|
3797
|
+
height: 22px;
|
|
3798
|
+
padding-left: ${l("spacing-20")};
|
|
3799
|
+
cursor: pointer;
|
|
3800
|
+
padding-right: ${l("spacing-20")};
|
|
3801
|
+
border-bottom: ${l("border-xsm")} solid ${l("color-grey20")};
|
|
3802
|
+
border-top: ${l("border-xsm")} solid ${l("color-grey20")};
|
|
3803
|
+
background-color: ${l("color-grey10")};
|
|
3804
|
+
user-select: none;
|
|
3805
|
+
`,ts=({title:e,children:t})=>i.jsxs(Jt,{defaultOpen:!0,children:[i.jsx(Mv,{title:e}),i.jsx(Qt,{children:t})]}),Rv=d.memo(({title:e,iconColor:t,iconId:o})=>{const{setOpen:n}=at(),r=d.useCallback(()=>n(!1),[n]);return i.jsxs(Nv,{className:"sd-header",children:[!!o&&i.jsx(F,{iconId:o,color:t??"black",size:"sm"}),i.jsx(_,{color:"dark",variant:"h2",children:e}),i.jsx(Fv,{iconId:"Close",color:"blue",onClick:r,size:"sm"})]})}),Nv=f.div`
|
|
3806
|
+
align-items: center;
|
|
3807
|
+
background-color: ${l("color-grey10")};
|
|
3808
|
+
gap: ${l("spacing-4")};
|
|
3809
|
+
display: flex;
|
|
3810
|
+
height: 30px;
|
|
3811
|
+
justify-content: flex-start;
|
|
3812
|
+
padding: 0 ${l("spacing-20")};
|
|
3813
|
+
width: 100%;
|
|
3814
|
+
`,Fv=f(te)`
|
|
3815
|
+
margin-left: auto;
|
|
3816
|
+
`,Av=W.kosComponent(({onClose:e,open:t,defaultOpen:o,size:n,headerTitle:r,headerIcon:s,headerIconColor:c,firstSectionTitle:a,FirstSectionContents:u,SecondSectionContents:p,secondSectionTitle:h,className:g})=>{const m=d.useCallback(x=>{x||e==null||e()},[e]);return i.jsx(Es,{onOpenChange:m,mode:"inline-float",open:t,defaultOpen:o??!1,size:n??356,children:i.jsx(zs,{className:g,children:i.jsxs(js,{className:"sd-wrapper",children:[i.jsx(Rv,{title:r,iconColor:c,iconId:s}),i.jsxs(Lv,{className:"sd-inner",children:[i.jsx(ts,{title:a,children:i.jsx(Bv,{className:"sd-section-one",children:u})}),i.jsx(ts,{title:h,children:i.jsx(Wv,{className:"sd-section-two",children:p})})]})]})})})}),Lv=f.div`
|
|
3817
|
+
display: flex;
|
|
3818
|
+
flex-direction: column;
|
|
3819
|
+
align-items: flex-start;
|
|
3820
|
+
justify-content: flex-start;
|
|
3821
|
+
flex: 1;
|
|
3822
|
+
width: 100%;
|
|
3823
|
+
background-color: white;
|
|
3824
|
+
overflow: hidden;
|
|
3825
|
+
`,Bv=f.div`
|
|
3826
|
+
display: flex;
|
|
3827
|
+
align-items: flex-start;
|
|
3828
|
+
justify-content: flex-start;
|
|
3829
|
+
flex-direction: column;
|
|
3830
|
+
width: 100%;
|
|
3831
|
+
padding: ${l("spacing-10")} ${l("spacing-20")};
|
|
3832
|
+
`,Wv=f.div`
|
|
3833
|
+
display: flex;
|
|
3834
|
+
flex-direction: column;
|
|
3835
|
+
width: 100%;
|
|
3836
|
+
flex: 1;
|
|
3837
|
+
overflow: auto;
|
|
3838
|
+
padding: ${l("spacing-10")} ${l("spacing-20")};
|
|
3839
|
+
`,Pv=d.memo(({listMaxSize:e,listMinSize:t,listCollapsedSize:o,disabled:n,List:r,Details:s,ListPanelComponent:c=In})=>i.jsx(Vv,{style:{"--studio-c-table-cell-padding-y":l("spacing-8")},children:i.jsxs(Ks,{direction:"horizontal",children:[i.jsx(c,{minSize:t,maxSize:e,collapsedSize:o,children:i.jsx(Ia,{children:i.jsx(r,{disabled:n})})}),i.jsx(Zs,{}),i.jsx(Ys,{children:i.jsx(Hv,{children:i.jsx(s,{})})})]})})),Vv=f.div`
|
|
3742
3840
|
width: 100%;
|
|
3743
3841
|
height: 100%;
|
|
3744
3842
|
display: flex;
|
|
3745
3843
|
align-items: flex-start;
|
|
3746
3844
|
justify-content: flex-start;
|
|
3747
|
-
`,
|
|
3845
|
+
`,Ia=f.div`
|
|
3748
3846
|
height: 100%;
|
|
3749
3847
|
width: 100%;
|
|
3750
3848
|
display: flex;
|
|
3751
3849
|
align-items: flex-start;
|
|
3752
3850
|
justify-content: flex-start;
|
|
3753
3851
|
flex-direction: column;
|
|
3754
|
-
`,
|
|
3852
|
+
`,Hv=f(Ia)`
|
|
3755
3853
|
overflow: auto;
|
|
3756
|
-
`;class $v{constructor(t){E(this,"model");E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose");E(this,"_sortComparator");E(this,"_itemsById",T.observable.map(new Map));E(this,"originalItems",new Map);E(this,"_isInitialized",!1);E(this,"_isDisposed",!1);E(this,"_reactionDisposer",null);this.model=t.model,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,this.autoDispose=t.autoDispose??!0,this._sortComparator=t.sortComparator,T.makeObservable(this,{items:T.computed})}get items(){const t=Array.from(this._itemsById.values());if(this._sortComparator===!1)return t;const o=this._sortComparator??((n,r)=>n.name.localeCompare(r.name));return t.sort(o)}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}async init(){if(!this._isInitialized){if(this._isDisposed)throw new Error("Cannot initialize a disposed ObservableListDataProvider");this._reactionDisposer=T.reaction(()=>{try{if(!this.model)return{raw:[],transformed:[]};const t=this.itemsExpression(this.model)||[],o=t.map(n=>mo(this.transformer(n),n));return{raw:t,transformed:o}}catch{return{raw:[],transformed:[]}}},({raw:t,transformed:o})=>{this.updateItemsFromTransformed(t,o)},{fireImmediately:!0}),this._isInitialized=!0}}dispose(){this._isDisposed||(this._reactionDisposer&&(this._reactionDisposer(),this._reactionDisposer=null),this._itemsById.clear(),this.originalItems.clear(),this._isDisposed=!0,this._isInitialized=!1)}async whenReady(){if(!this._isInitialized)throw new Error("ObservableListDataProvider must be initialized before calling whenReady()");return Promise.resolve()}async refresh(){if(!this._isInitialized||this._isDisposed)return;const t=this.itemsExpression(this.model);this.updateItems(t)}updateItemsFromTransformed(t,o){const n=new Map,r=new Map;o.forEach((s,l)=>{n.set(s.id,s),r.set(s.id,t[l])}),T.runInAction(()=>{for(const[s]of this._itemsById)n.has(s)||(this._itemsById.delete(s),this.originalItems.delete(s));for(const[s,l]of n)this._itemsById.set(s,l),this.originalItems.set(s,r.get(s))})}updateItems(t){const o=t.map(n=>mo(this.transformer(n),n));this.updateItemsFromTransformed(t,o)}}function wa(e){return new $v(e)}const Sv="/kos/model/ready/";class Ca{constructor(t){E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose",!0);E(this,"_modelId");E(this,"_context");E(this,"_innerProvider",null);E(this,"_isInitialized",!1);E(this,"_isDisposed",!1);E(this,"_isLoading",!1);E(this,"_eventBusUnsubscribe",null);E(this,"_modelIdReactionDisposer",null);E(this,"_currentModelId");E(this,"_modelType");E(this,"_shouldActivate");E(this,"_sortComparator");E(this,"_items",T.observable.array([]));this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,this._sortComparator=t.sortComparator,T.makeObservable(this,{_innerProvider:T.observable.ref,_isLoading:T.observable,items:T.computed,model:T.computed,isLoading:T.computed})}get model(){var t;return(t=this._innerProvider)==null?void 0:t.model}get items(){var t;return((t=this._innerProvider)==null?void 0:t.items)??[]}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}async init(){if(!this._isInitialized){if(this._isDisposed&&(this._isDisposed=!1),typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=T.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,this.subscribeToModelLifecycle(this._modelId);this._isInitialized=!0}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}subscribeToModelLifecycle(t){const o=this.getModelFromManager(t);if(o){this.createInnerProvider(o);return}const n=`${Sv}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=wa({model:t,itemsExpression:this.itemsExpression,transformer:this.transformer,autoDispose:!1,sortComparator:this._sortComparator});T.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(T.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{T.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._currentModelId=void 0)}async whenReady(){if(!this._isInitialized)throw new Error("LifecycleAwareListProvider must be initialized before calling whenReady()");return this._innerProvider&&this._innerProvider.whenReady?this._innerProvider.whenReady():Promise.resolve()}async refresh(){return this._innerProvider&&this._innerProvider.refresh?this._innerProvider.refresh():Promise.resolve()}}function jv(e){return new Ca(e)}const Iv="/kos/model/ready/";class Dv extends Wi{constructor(o,n,r,s,l,a){super(o,async function(){return n(this)},async function(u){return r(this,u)},a);E(this,"_hasChildrenExpr");E(this,"_childrenExpr");E(this,"_getItemIdFn");this._hasChildrenExpr=s,this._childrenExpr=r,this._getItemIdFn=l,this.rootTrackingFn=u=>{n(u)},this.childTrackingFn=(u,p)=>{r(u,p)}}hasChildren(o){return this._hasChildrenExpr(this.parent,o)}getItemId(o){return this._getItemIdFn(o)}}class $a{constructor(t){E(this,"_modelId");E(this,"_context");E(this,"_innerProvider",null);E(this,"_isInitialized",!1);E(this,"_isInitializing",!1);E(this,"_isDisposed",!1);E(this,"_isLoading",!1);E(this,"_eventBusUnsubscribe",null);E(this,"_modelIdReactionDisposer",null);E(this,"_currentModelId");E(this,"_modelType");E(this,"_shouldActivate");E(this,"_rootsExpression");E(this,"_childrenExpression");E(this,"_hasChildrenExpression");E(this,"_getItemIdFn");E(this,"_transformer");this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this._rootsExpression=t.rootsExpression,this._childrenExpression=t.childrenExpression,this._hasChildrenExpression=t.hasChildrenExpression,this._getItemIdFn=t.getItemId,this._transformer=t.transformer,T.makeObservable(this,{_innerProvider:T.observable.ref,_isLoading:T.observable,_isInitialized:T.observable,tree:T.computed,originalItems:T.computed,initialized:T.computed,isLoading:T.computed})}get tree(){var t;return((t=this._innerProvider)==null?void 0:t.tree)??[]}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}get initialized(){var t;return this._isInitialized&&!!((t=this._innerProvider)!=null&&t.initialized)}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}hasChildren(t){return this._innerProvider?this._innerProvider.hasChildren(t):"unknown"}getItemId(t){return this._getItemIdFn(t)}async init(){if(!this._isInitializing){if(this._isInitialized&&(this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._isInitialized=!1,this._currentModelId=void 0),this._isDisposed&&(this._isDisposed=!1),this._isInitializing=!0,typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=T.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,await this.subscribeToModelLifecycle(this._modelId);T.runInAction(()=>{this._isInitialized=!0,this._isInitializing=!1})}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}async subscribeToModelLifecycle(t){if(this._innerProvider)return;const o=this.getModelFromManager(t);if(o){await this.createInnerProvider(o);return}const n=`${Iv}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=new Dv(t,this._rootsExpression,this._childrenExpression,this._hasChildrenExpression,this._getItemIdFn,this._transformer);T.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(T.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{T.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}async expandBranch(t,o){return this._innerProvider?this._innerProvider.expandBranch(t,o):Promise.resolve()}async expandAll(){return this._innerProvider?this._innerProvider.expandAll():Promise.resolve()}collapseBranch(t){this._innerProvider&&this._innerProvider.collapseBranch(t)}clearCache(t){this._innerProvider&&this._innerProvider.clearCache(t)}refresh(){this._innerProvider&&this._innerProvider.refresh()}async whenReady(){return this._innerProvider?this._innerProvider.whenReady():Promise.resolve()}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._isInitializing=!1,this._currentModelId=void 0)}}function _v(e){return new $a(e)}Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>K.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>K.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>K.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>we.flexRender});exports.ActionBar=nr;exports.ActionSelect=qu;exports.ActionableBlurb=Oc;exports.AlertTooltip=Mn;exports.AlternatingStatus=Wc;exports.AnimatePresence=ds;exports.AnonymousBranch=sx;exports.AnonymousGroup=Mb;exports.ArtifactVersion=hh;exports.AsyncList=Ri;exports.AsyncListGroupHeader=Do;exports.AsyncNamedCollapsibleBranch=lx;exports.AsyncSelectViewList=qm;exports.AsyncTreeList=ta;exports.Badge=mp;exports.BaseAsyncTreeDataProvider=Wi;exports.BaseModalContent=r0;exports.BaseObservableDataProvider=qn;exports.BaseUIComponentsContextProvider=Ec;exports.BottomDialogDrawer=_d;exports.BottomInlineDrawer=Rd;exports.BrandedHeader=th;exports.Button=We;exports.ButtonGroup=Kc;exports.ButtonGroupItem=hs;exports.CheckBox=yt;exports.CheckListItemCheck=To;exports.CheckListItemCheckCompact=Ki;exports.CheckListItemContainer=oo;exports.CheckListItemContainerCompact=tr;exports.CheckListItemContainerWithDivider=Ui;exports.CheckListItemContainerWithDividerCompact=Gi;exports.CheckListItemName=Eo;exports.CheckListItemNameCompact=Yi;exports.CheckListItemTemplate=qi;exports.Collapsible=bo;exports.CollapsibleArtifact=rh;exports.CollapsibleContent=xo;exports.CollapsibleList=yh;exports.CollapsibleTrigger=xn;exports.ComboBox=di;exports.CopyableText=cd;exports.DarkTooltip=$o;exports.DarkTooltipStyle=Qs;exports.DatePicker=qg;exports.DescriptionListItemTemplate=Bb;exports.Dialog=yn;exports.DialogContent=kn;exports.DialogTrigger=vn;exports.DragContext=jo;exports.DraggableItemWrapper=Hn;exports.Drawer=Fd;exports.DrawerContent=Ld;exports.DrawerHeader=Hd;exports.DrawerTrigger=Ad;exports.DropIndicator=wy;exports.DropZone=vy;exports.Dropdown=Ii;exports.DropdownMenu=Rn;exports.EMAIL_PATTERN=Es;exports.EmailRequirementKeys=Ms;exports.EmptyListMessage=om;exports.EndOverlayStyle=bd;exports.ErrorTooltip=ti;exports.FIRST_CHAR_ALPHA=au;exports.FakeInputReference=ui;exports.FilterPanel=A0;exports.FlexHandle=Jt;exports.FlexResizablePanel=Ps;exports.Form=Di;exports.FormAccessToggles=_m;exports.FormCheckbox=jm;exports.FormComboBox=Mm;exports.FormErrorMessage=Qe;exports.FormField=$m;exports.FormFileInput=Nm;exports.FormHiddenField=Pm;exports.FormInput=Bn;exports.FormInputWrapper=Pe;exports.FormLabel=me;exports.FormMultiSelect=Wm;exports.FormNameInput=zm;exports.FormSelect=wm;exports.FormStaticField=Vm;exports.FormSubmit=Ln;exports.FormTextArea=vm;exports.FormToggle=bm;exports.FutureAwareProgressButton=O0;exports.GroupContext=er;exports.GroupList=Eb;exports.GroupedObservableDataProvider=$b;exports.HiddenFormInput=An;exports.HolderListItemTemplate=_x;exports.HorizontalRule=Gd;exports.Icon=F;exports.IconButton=oe;exports.Input=kt;exports.InputSearch=Ds;exports.ItemActionBar=Rt;exports.ItemSelectionList=Xx;exports.ItemSelectionListDataProvider=e0;exports.KOSLogo=Wp;exports.Label=Ts;exports.LabelWithAction=eu;exports.LabelWithContent=$n;exports.LabelWithContentLink=nu;exports.LeftDialogDrawer=wd;exports.LeftInlineDrawer=zd;exports.LifecycleAwareListProvider=Ca;exports.LifecycleAwareTreeProvider=$a;exports.LightTooltip=Co;exports.LightTooltipStyle=Xs;exports.Link=bn;exports.List=Qn;exports.ListContext=Kn;exports.ListContextProvider=Yn;exports.ListWithDetailsLayout=kv;exports.LockedButton=Vd;exports.MenuWrapper=t0;exports.MiddleTruncateText=yo;exports.Modal=w0;exports.ModalOverlayStyles=da;exports.ModalTrigger=C0;exports.MultiSelect=ai;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=zs;exports.NO_SPACES_PATTERN=iu;exports.NUMBERS_ONLY_PATTERN=su;exports.NamedCollapsibleBranch=vx;exports.NamedCollapsibleGroup=zb;exports.NamedListItemTemplate=Wb;exports.NamedSection=sa;exports.NamedSectionHeader=Lx;exports.ObservableDataProvider=Zn;exports.Option=pt;exports.PASSWORD_MIN_LENGTH=cu;exports.PASSWORD_REQUIREMENTS=Fn;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=Ti;exports.PageHeader=S0;exports.PaneSplitter=vu;exports.PasswordRequirementKeys=Ut;exports.PasswordRequirementsList=hm;exports.ProgressButton=ua;exports.PropertyDataProvider=Sb;exports.RadioButton=Sn;exports.RequirementsList=_i;exports.ResizablePanel=In;exports.ResizablePanelGroup=Ws;exports.ResizablePanelGroupContextProvider=Bs;exports.ResizablePanelHandle=Hs;exports.RightDialogDrawer=Sd;exports.RightInlineDrawer=Md;exports.SOURCE_PROP_KEY=Jn;exports.SOURCE_SYMBOL=Xn;exports.ScreenOverlay=Us;exports.ScreenOverlayWithAction=R0;exports.SearchHighlightContext=Io;exports.SearchInput=mv;exports.Select=Ot;exports.SelectAsyncTreeList=rx;exports.SelectContext=Tn;exports.SelectList=_o;exports.SelectListContext=wt;exports.SelectSeparator=Nn;exports.SelectViewList=_y;exports.SelectViewListItem=ma;exports.SelectorTooltip=oi;exports.ShellIconButton=ep;exports.ShellMenu=Ey;exports.ShellMenuLink=My;exports.StartOverlayStyle=md;exports.StickyObserver=pn;exports.StudioCheckListItem=Ni;exports.StudioNamedListItem=Fi;exports.StudioSelectViewListItem=Ai;exports.StyledSelectOption=em;exports.Tab=tp;exports.TabPane=dp;exports.TabTrigger=op;exports.TabTriggerList=ap;exports.Table=By;exports.TableHeader=fn;exports.TableNamedListItemTemplate=Yb;exports.TableTd=ir;exports.Tag=fo;exports.TagWithRemove=gp;exports.Text=_;exports.TextHighlight=go;exports.Textarea=zn;exports.Toggle=wo;exports.ToggleThumb=qs;exports.ToggleTrack=Ys;exports.Tooltip=ni;exports.TopDialogDrawer=Dd;exports.TopInlineDrawer=Od;exports.TreeDataProvider=Jb;exports.TreeList=tx;exports.USERNAME_PATTERN=ru;exports.View=pa;exports.ViewActionContext=Un;exports.ViewContainer=fa;exports.ViewHeader=rr;exports.ViewToolbar=ha;exports.VirtualList=oa;exports.VirtualTable=cv;exports.VirtualizedList=na;exports.VirtualizedSelectList=Dx;exports.attachSource=mo;exports.baseComponentStyles=ts;exports.baseGenericStyles=en;exports.baseSemanticStyles=tn;exports.componentStudioTokenCss=gc;exports.componentStyles=Qo;exports.createLifecycleAwareProvider=jv;exports.createLifecycleAwareTreeProvider=_v;exports.createLocalComponentHelper=uc;exports.createLocalComponentTokenCss=pc;exports.createLocalTokenSystem=dc;exports.createObservableListProvider=wa;exports.createTableColumnHelper=Ky;exports.darkTooltipArrow=ei;exports.getByteString=$y;exports.getComponentTokenHelpers=M;exports.getCurrentDragData=Mi;exports.getEmailValidation=lu;exports.getErrorMessage=uu;exports.getGlobalToken=R;exports.getPasswordValidation=du;exports.getPropertyWithFallback=jb;exports.getSemanticToken=c;exports.getSource=Bi;exports.getStyles=vc;exports.globalStudioTokenCss=fc;exports.isContextAware=un;exports.isErrorWithMessage=Os;exports.isGroupFactory=Pi;exports.isItemTemplateFactory=Oi;exports.isLockedAware=Ib;exports.keyResolver=Li;exports.lightTooltipArrow=Js;exports.noop=Se;exports.normalizePathDisplay=Sy;exports.rootStyles=on;exports.scrollbarStyle=$c;exports.semanticStudioTokenCss=hc;exports.stringComponentInsert=es;exports.studioColors=os;exports.studioDarkColors=rs;exports.studioGenericColor=ss;exports.studioLightColors=ns;exports.studioTheme=Sc;exports.transformLocalTokenObject=gn;exports.useBaseUIComponentsContext=ls;exports.useButtonGroupContext=ps;exports.useCollapsibleContext=Xt;exports.useContainerWidth=Cn;exports.useDialogContext=Xe;exports.useDialogContextValue=ms;exports.useDragConfig=Wn;exports.useDragDrop=Vn;exports.useDrawerContext=ht;exports.useGroupSelection=Zb;exports.useListContext=eb;exports.useListGroupContext=Vi;exports.useLoadDataProvider=to;exports.useModalContext=Xe;exports.useMultiSelectContext=si;exports.useOpenedGroups=qb;exports.useResizablePanelGroupContext=jn;exports.useResizeObserver=Rs;exports.useSearchHighlight=Pn;exports.useSelectContext=En;exports.useSelectListContext=je;exports.useSelection=Xb;exports.useTabContext=ko;exports.useTableContext=sr;exports.useTreeListContext=Xi;exports.useViewActionContext=Gn;
|
|
3854
|
+
`;class Uv{constructor(t){E(this,"model");E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose");E(this,"_sortComparator");E(this,"_itemsById",T.observable.map(new Map));E(this,"originalItems",new Map);E(this,"_isInitialized",!1);E(this,"_isDisposed",!1);E(this,"_reactionDisposer",null);this.model=t.model,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,this.autoDispose=t.autoDispose??!0,this._sortComparator=t.sortComparator,T.makeObservable(this,{items:T.computed})}get items(){const t=Array.from(this._itemsById.values());if(this._sortComparator===!1)return t;const o=this._sortComparator??((n,r)=>n.name.localeCompare(r.name));return t.sort(o)}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}async init(){if(!this._isInitialized){if(this._isDisposed)throw new Error("Cannot initialize a disposed ObservableListDataProvider");this._reactionDisposer=T.reaction(()=>{try{if(!this.model)return{raw:[],transformed:[]};const t=this.itemsExpression(this.model)||[],o=t.map(n=>xo(this.transformer(n),n));return{raw:t,transformed:o}}catch{return{raw:[],transformed:[]}}},({raw:t,transformed:o})=>{this.updateItemsFromTransformed(t,o)},{fireImmediately:!0}),this._isInitialized=!0}}dispose(){this._isDisposed||(this._reactionDisposer&&(this._reactionDisposer(),this._reactionDisposer=null),this._itemsById.clear(),this.originalItems.clear(),this._isDisposed=!0,this._isInitialized=!1)}async whenReady(){if(!this._isInitialized)throw new Error("ObservableListDataProvider must be initialized before calling whenReady()");return Promise.resolve()}async refresh(){if(!this._isInitialized||this._isDisposed)return;const t=this.itemsExpression(this.model);this.updateItems(t)}updateItemsFromTransformed(t,o){const n=new Map,r=new Map;o.forEach((s,c)=>{n.set(s.id,s),r.set(s.id,t[c])}),T.runInAction(()=>{for(const[s]of this._itemsById)n.has(s)||(this._itemsById.delete(s),this.originalItems.delete(s));for(const[s,c]of n)this._itemsById.set(s,c),this.originalItems.set(s,r.get(s))})}updateItems(t){const o=t.map(n=>xo(this.transformer(n),n));this.updateItemsFromTransformed(t,o)}}function Da(e){return new Uv(e)}const Gv="/kos/model/ready/";class _a{constructor(t){E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose",!0);E(this,"_modelId");E(this,"_context");E(this,"_innerProvider",null);E(this,"_isInitialized",!1);E(this,"_isDisposed",!1);E(this,"_isLoading",!1);E(this,"_eventBusUnsubscribe",null);E(this,"_modelIdReactionDisposer",null);E(this,"_currentModelId");E(this,"_modelType");E(this,"_shouldActivate");E(this,"_sortComparator");E(this,"_items",T.observable.array([]));this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this.itemsExpression=t.itemsExpression,this.transformer=t.transformer,this._sortComparator=t.sortComparator,T.makeObservable(this,{_innerProvider:T.observable.ref,_isLoading:T.observable,items:T.computed,model:T.computed,isLoading:T.computed})}get model(){var t;return(t=this._innerProvider)==null?void 0:t.model}get items(){var t;return((t=this._innerProvider)==null?void 0:t.items)??[]}get isInitialized(){return this._isInitialized}get isDisposed(){return this._isDisposed}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}async init(){if(!this._isInitialized){if(this._isDisposed&&(this._isDisposed=!1),typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=T.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,this.subscribeToModelLifecycle(this._modelId);this._isInitialized=!0}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}subscribeToModelLifecycle(t){const o=this.getModelFromManager(t);if(o){this.createInnerProvider(o);return}const n=`${Gv}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=Da({model:t,itemsExpression:this.itemsExpression,transformer:this.transformer,autoDispose:!1,sortComparator:this._sortComparator});T.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(T.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{T.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._currentModelId=void 0)}async whenReady(){if(!this._isInitialized)throw new Error("LifecycleAwareListProvider must be initialized before calling whenReady()");return this._innerProvider&&this._innerProvider.whenReady?this._innerProvider.whenReady():Promise.resolve()}async refresh(){return this._innerProvider&&this._innerProvider.refresh?this._innerProvider.refresh():Promise.resolve()}}function Kv(e){return new _a(e)}const Yv="/kos/model/ready/";class qv extends Ki{constructor(o,n,r,s,c,a){super(o,async function(){return n(this)},async function(u){return r(this,u)},a);E(this,"_hasChildrenExpr");E(this,"_childrenExpr");E(this,"_getItemIdFn");this._hasChildrenExpr=s,this._childrenExpr=r,this._getItemIdFn=c,this.rootTrackingFn=u=>{n(u)},this.childTrackingFn=(u,p)=>{r(u,p)}}hasChildren(o){return this._hasChildrenExpr(this.parent,o)}getItemId(o){return this._getItemIdFn(o)}}class Ta{constructor(t){E(this,"_modelId");E(this,"_context");E(this,"_innerProvider",null);E(this,"_isInitialized",!1);E(this,"_isInitializing",!1);E(this,"_isDisposed",!1);E(this,"_isLoading",!1);E(this,"_eventBusUnsubscribe",null);E(this,"_modelIdReactionDisposer",null);E(this,"_currentModelId");E(this,"_modelType");E(this,"_shouldActivate");E(this,"_rootsExpression");E(this,"_childrenExpression");E(this,"_hasChildrenExpression");E(this,"_getItemIdFn");E(this,"_transformer");this._modelType=t.modelType,this._modelId=t.modelId,this._context=t.context,this._shouldActivate=t.activate??!1,this._rootsExpression=t.rootsExpression,this._childrenExpression=t.childrenExpression,this._hasChildrenExpression=t.hasChildrenExpression,this._getItemIdFn=t.getItemId,this._transformer=t.transformer,T.makeObservable(this,{_innerProvider:T.observable.ref,_isLoading:T.observable,_isInitialized:T.observable,tree:T.computed,originalItems:T.computed,initialized:T.computed,isLoading:T.computed})}get tree(){var t;return((t=this._innerProvider)==null?void 0:t.tree)??[]}get originalItems(){var t;return((t=this._innerProvider)==null?void 0:t.originalItems)??new Map}get initialized(){var t;return this._isInitialized&&!!((t=this._innerProvider)!=null&&t.initialized)}get isLoading(){return this._isLoading||!!this._currentModelId&&!this._innerProvider&&this._isInitialized}hasChildren(t){return this._innerProvider?this._innerProvider.hasChildren(t):"unknown"}getItemId(t){return this._getItemIdFn(t)}async init(){if(!this._isInitializing){if(this._isInitialized&&(this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._isInitialized=!1,this._currentModelId=void 0),this._isDisposed&&(this._isDisposed=!1),this._isInitializing=!0,typeof this._modelId=="function"){const t=this._modelId;this._modelIdReactionDisposer=T.reaction(()=>{try{return t(this._context)}catch{return}},o=>{o!==this._currentModelId&&this.handleModelIdChange(o)},{fireImmediately:!0,scheduler:o=>queueMicrotask(o)})}else this._currentModelId=this._modelId,await this.subscribeToModelLifecycle(this._modelId);T.runInAction(()=>{this._isInitialized=!0,this._isInitializing=!1})}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null),this._currentModelId=t}),t&&this.subscribeToModelLifecycle(t)}async subscribeToModelLifecycle(t){if(this._innerProvider)return;const o=this.getModelFromManager(t);if(o){await this.createInnerProvider(o);return}const n=`${Yv}${this._modelType}/${t}`,r=W.EventBus.subscribe(n,()=>{const s=this.getModelFromManager(t);s&&this.createInnerProvider(s)});this._eventBusUnsubscribe=r.unsubscribe}async createInnerProvider(t){if(this._innerProvider)return;const o=new qv(t,this._rootsExpression,this._childrenExpression,this._hasChildrenExpression,this._getItemIdFn,this._transformer);T.runInAction(()=>{this._isLoading=!1,this._innerProvider=o}),await o.init()}getModelFromManager(t){var o;try{const n=W.getKosModelSync(t);return this._shouldActivate&&((o=n==null?void 0:n.model)!=null&&o.activate)&&(T.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{T.runInAction(()=>{this._isLoading=!1})})),n==null?void 0:n.model}catch{return null}}async expandBranch(t,o){return this._innerProvider?this._innerProvider.expandBranch(t,o):Promise.resolve()}async expandAll(){return this._innerProvider?this._innerProvider.expandAll():Promise.resolve()}collapseBranch(t){this._innerProvider&&this._innerProvider.collapseBranch(t)}clearCache(t){this._innerProvider&&this._innerProvider.clearCache(t)}refresh(){this._innerProvider&&this._innerProvider.refresh()}async whenReady(){return this._innerProvider?this._innerProvider.whenReady():Promise.resolve()}dispose(){this._isDisposed||(this._modelIdReactionDisposer&&(this._modelIdReactionDisposer(),this._modelIdReactionDisposer=null),this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),T.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._isInitializing=!1,this._currentModelId=void 0)}}function Zv(e){return new Ta(e)}Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>K.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>K.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>K.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>Ce.flexRender});exports.ActionBar=nr;exports.ActionSelect=Qu;exports.ActionableBlurb=Bc;exports.AlertTooltip=Mn;exports.AlternatingStatus=Kc;exports.AnimatePresence=hs;exports.AnonymousBranch=px;exports.AnonymousGroup=Bb;exports.ArtifactVersion=vh;exports.AsyncList=Wi;exports.AsyncListGroupHeader=Do;exports.AsyncNamedCollapsibleBranch=fx;exports.AsyncSelectViewList=ob;exports.AsyncTreeList=aa;exports.Badge=vp;exports.BaseAsyncTreeDataProvider=Ki;exports.BaseModalContent=u0;exports.BaseObservableDataProvider=qn;exports.BaseUIComponentsContextProvider=Fc;exports.BottomDialogDrawer=Od;exports.BottomInlineDrawer=Bd;exports.BrandedHeader=lh;exports.Button=We;exports.ButtonGroup=Qc;exports.ButtonGroupItem=ms;exports.CheckBox=yt;exports.CheckListItemCheck=To;exports.CheckListItemCheckCompact=Qi;exports.CheckListItemContainer=ro;exports.CheckListItemContainerCompact=tr;exports.CheckListItemContainerWithDivider=Xi;exports.CheckListItemContainerWithDividerCompact=Ji;exports.CheckListItemName=Eo;exports.CheckListItemNameCompact=ea;exports.CheckListItemTemplate=ta;exports.Collapsible=Jt;exports.CollapsibleArtifact=uh;exports.CollapsibleContent=Qt;exports.CollapsibleList=Sh;exports.CollapsibleTrigger=xn;exports.ComboBox=mi;exports.CopyableText=fd;exports.DarkTooltip=$o;exports.DarkTooltipStyle=si;exports.DatePicker=om;exports.DescriptionListItemTemplate=Kb;exports.Dialog=yn;exports.DialogContent=kn;exports.DialogTrigger=vn;exports.DragContext=So;exports.DraggableItemWrapper=Hn;exports.Drawer=Es;exports.DrawerContent=zs;exports.DrawerHeader=Yd;exports.DrawerTrigger=Pd;exports.DropIndicator=_y;exports.DropZone=Iy;exports.Dropdown=Mi;exports.DropdownMenu=Rn;exports.EMAIL_PATTERN=Fs;exports.EmailRequirementKeys=Ls;exports.EmptyListMessage=cm;exports.EmptyMessage=Ev;exports.EndOverlayStyle=Cd;exports.ErrorTooltip=ai;exports.FIRST_CHAR_ALPHA=uu;exports.FakeInputReference=bi;exports.FilterPanel=U0;exports.FlexHandle=eo;exports.FlexResizablePanel=Ys;exports.Form=Oi;exports.FormAccessToggles=Nm;exports.FormCheckbox=Mm;exports.FormComboBox=Bm;exports.FormErrorMessage=Qe;exports.FormField=Em;exports.FormFileInput=Vm;exports.FormHiddenField=qm;exports.FormInput=Bn;exports.FormInputWrapper=Pe;exports.FormLabel=be;exports.FormMultiSelect=Ym;exports.FormNameInput=Lm;exports.FormSelect=_m;exports.FormStaticField=Zm;exports.FormSubmit=Ln;exports.FormTextArea=Im;exports.FormToggle=$m;exports.FutureAwareProgressButton=W0;exports.GroupContext=er;exports.GroupList=Ab;exports.GroupedObservableDataProvider=Eb;exports.HiddenFormInput=An;exports.HolderListItemTemplate=Nx;exports.HorizontalRule=Zd;exports.Icon=F;exports.IconButton=te;exports.Input=kt;exports.InputSearch=Os;exports.ItemActionBar=Rt;exports.ItemSelectionList=r0;exports.ItemSelectionListDataProvider=a0;exports.KOSLogo=Up;exports.Label=Ns;exports.LabelWithAction=ru;exports.LabelWithContent=$n;exports.LabelWithContentLink=au;exports.LeftDialogDrawer=Dd;exports.LeftInlineDrawer=Fd;exports.LifecycleAwareListProvider=_a;exports.LifecycleAwareTreeProvider=Ta;exports.LightTooltip=Co;exports.LightTooltipStyle=ni;exports.Link=bn;exports.List=Qn;exports.ListContext=Kn;exports.ListContextProvider=Yn;exports.ListWithDetailsLayout=Pv;exports.LockedButton=Kd;exports.MenuWrapper=l0;exports.MiddleTruncateText=yo;exports.Modal=_0;exports.ModalOverlayStyles=ma;exports.ModalTrigger=T0;exports.MultiSelect=hi;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=As;exports.NO_SPACES_PATTERN=du;exports.NUMBERS_ONLY_PATTERN=cu;exports.NamedCollapsibleBranch=Ix;exports.NamedCollapsibleGroup=Lb;exports.NamedListItemTemplate=Yb;exports.NamedSection=ua;exports.NamedSectionHeader=Gx;exports.ObservableDataProvider=Zn;exports.Option=ht;exports.PASSWORD_MIN_LENGTH=hu;exports.PASSWORD_REQUIREMENTS=Fn;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=Ni;exports.PageHeader=z0;exports.PaneSplitter=$u;exports.PasswordRequirementKeys=Ut;exports.PasswordRequirementsList=vm;exports.ProgressButton=ba;exports.PropertyDataProvider=zb;exports.RadioButton=jn;exports.RequirementsList=Ri;exports.ResizablePanel=In;exports.ResizablePanelGroup=Ks;exports.ResizablePanelGroupContextProvider=Gs;exports.ResizablePanelHandle=Zs;exports.RightDialogDrawer=js;exports.RightInlineDrawer=Ad;exports.SOURCE_PROP_KEY=Jn;exports.SOURCE_SYMBOL=Xn;exports.ScreenOverlay=Xs;exports.ScreenOverlayWithAction=P0;exports.SearchHighlightContext=Io;exports.SearchInput=jv;exports.SectionedDrawer=Av;exports.Select=Ot;exports.SelectAsyncTreeList=ux;exports.SelectContext=Tn;exports.SelectList=_o;exports.SelectListContext=wt;exports.SelectSeparator=Nn;exports.SelectViewList=Fy;exports.SelectViewListItem=wa;exports.SelectorTooltip=li;exports.ShellButton=Kp;exports.ShellIconButton=np;exports.ShellMenu=Ly;exports.ShellMenuLink=Wy;exports.StartOverlayStyle=wd;exports.StickyObserver=pn;exports.StudioCheckListItem=Pi;exports.StudioNamedListItem=Vi;exports.StudioSelectViewListItem=Hi;exports.StyledSelectOption=am;exports.Tab=sp;exports.TabPane=gp;exports.TabTrigger=ip;exports.TabTriggerList=up;exports.Table=Yy;exports.TableHeader=gn;exports.TableNamedListItemTemplate=tx;exports.TableTd=ir;exports.Tag=mo;exports.TagWithRemove=yp;exports.Text=_;exports.TextHighlight=bo;exports.Textarea=zn;exports.Toggle=wo;exports.ToggleThumb=ti;exports.ToggleTrack=ei;exports.Tooltip=ci;exports.TopDialogDrawer=Md;exports.TopInlineDrawer=Ld;exports.TreeDataProvider=sx;exports.TreeList=lx;exports.USERNAME_PATTERN=lu;exports.View=xa;exports.ViewActionContext=Un;exports.ViewContainer=va;exports.ViewHeader=rr;exports.ViewToolbar=ya;exports.VirtualList=la;exports.VirtualTable=kv;exports.VirtualizedList=ca;exports.VirtualizedSelectList=Rx;exports.attachSource=xo;exports.baseComponentStyles=rs;exports.baseGenericStyles=en;exports.baseSemanticStyles=tn;exports.componentStudioTokenCss=kc;exports.componentStyles=Qo;exports.createLifecycleAwareProvider=Kv;exports.createLifecycleAwareTreeProvider=Zv;exports.createLocalComponentHelper=bc;exports.createLocalComponentTokenCss=xc;exports.createLocalTokenSystem=mc;exports.createObservableListProvider=Da;exports.createTableColumnHelper=tv;exports.darkTooltipArrow=ii;exports.getByteString=Ey;exports.getComponentTokenHelpers=O;exports.getCurrentDragData=Li;exports.getEmailValidation=pu;exports.getErrorMessage=fu;exports.getGlobalToken=R;exports.getPasswordValidation=gu;exports.getPropertyWithFallback=Mb;exports.getSemanticToken=l;exports.getSource=Gi;exports.getStyles=Sc;exports.globalStudioTokenCss=vc;exports.isContextAware=un;exports.isErrorWithMessage=Bs;exports.isGroupFactory=Yi;exports.isItemTemplateFactory=Bi;exports.isLockedAware=Ob;exports.keyResolver=Ui;exports.lightTooltipArrow=ri;exports.noop=Se;exports.normalizePathDisplay=zy;exports.rootStyles=on;exports.scrollbarStyle=Tc;exports.semanticStudioTokenCss=yc;exports.stringComponentInsert=ns;exports.studioColors=ss;exports.studioDarkColors=as;exports.studioGenericColor=ls;exports.studioLightColors=is;exports.studioTheme=Ec;exports.transformLocalTokenObject=fn;exports.useBaseUIComponentsContext=us;exports.useButtonGroupContext=fs;exports.useCollapsibleContext=Mt;exports.useContainerWidth=Cn;exports.useContextGuard=My;exports.useDialogContext=Xe;exports.useDialogContextValue=ys;exports.useDragConfig=Wn;exports.useDragDrop=Vn;exports.useDrawerContext=at;exports.useGroupSelection=nx;exports.useListContext=ab;exports.useListGroupContext=qi;exports.useLoadDataProvider=no;exports.useModalContext=Xe;exports.useMultiSelectContext=ui;exports.useOpenedGroups=ox;exports.useResizablePanelGroupContext=Sn;exports.useResizeObserver=Ws;exports.useSearchHighlight=Pn;exports.useSelectContext=En;exports.useSelectListContext=Ie;exports.useSelection=rx;exports.useTabContext=ko;exports.useTableContext=sr;exports.useTreeListContext=na;exports.useViewActionContext=Gn;
|
|
3757
3855
|
//# sourceMappingURL=index.cjs.map
|