@kosdev-code/base-ui-components 0.1.0-dev.5693 → 0.1.0-dev.5697
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/molecules/branded-header/types.d.ts +1 -1
- package/components/molecules/index.d.ts +13 -10
- package/components/molecules/index.d.ts.map +1 -1
- package/components/molecules/progress-button/future-aware-progress-button.d.ts +15 -0
- package/components/molecules/progress-button/future-aware-progress-button.d.ts.map +1 -0
- package/components/molecules/progress-button/index.d.ts +3 -0
- package/components/molecules/progress-button/index.d.ts.map +1 -0
- package/components/molecules/progress-button/progress-button.d.ts +17 -0
- package/components/molecules/progress-button/progress-button.d.ts.map +1 -0
- package/index.cjs +948 -907
- package/index.cjs.map +1 -1
- package/index.js +9674 -9569
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";var Wa=Object.defineProperty;var Pa=(e,t,o)=>t in e?Wa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var E=(e,t,o)=>(Pa(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"),Hr=require("react-dom"),R=require("@floating-ui/react"),Va=require("@use-gesture/react"),G=require("react-hook-form"),W=require("@kosdev-code/kos-ui-sdk"),It=require("mobx-react-lite"),_=require("mobx"),we=require("@tanstack/react-table"),q=require("date-fns");function Ha(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=Ha(d),Ua=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},Ga=e=>e instanceof RegExp,Ka=e=>typeof e=="string",Ya=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},qa=(e,t,o)=>{if(e===""||t==="")return e;let n=t;Ga(n)||(n=new RegExp("("+Ua(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},Ur=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),Ya(n.map(r=>Ka(r)?qa(r,t,o):r))},Dt=(e,t)=>t?e:`var(${e})`,F=(e,t)=>Dt(`--studio-g-${e}`,t),c=(e,t)=>Dt(`--studio-s-${e}`,t),Za={"actionable-blurb":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-20")}},Xa={"app-shell":{"bg-default":c("color-grey80"),"bg-offline":c("color-grey70"),"bg-locked":c("color-grey60"),color:c("color-white")}},Ja={"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")}},Qa={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")}},el={"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")}`}},tl={"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")}},ol={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)"}},nl={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`}},rl={"horizontal-rule":{"border-width":"0.5px","border-color":c("color-grey20")}},sl={"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)"}},il={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")}},al={"image-config-page-header":{gap:c("spacing-16"),"padding-bottom":c("spacing-12"),"title-gap":c("spacing-8"),bg:c("color-white")}},ll={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"}},cl={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")}},dl={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"}},ul={"named-section":{"border-radius":"2px","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")}},pl={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")}},hl={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"}},fl={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")}},gl={label:{gap:c("spacing-4")},"label-with-action":{gap:c("spacing-8")},"label-with-content-link":{color:c("color-primary")}},ml={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")}},bl={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")}},xl={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"}},yl={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")}},vl={"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"}},kl={"version-list-container":{gap:c("spacing-16")},"version-list-header":{gap:c("spacing-8"),itemBorderBottom:c("color-grey20"),itemBgColor:c("color-grey10")}},wl={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")}},Cl={"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")}},$l={"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")}},Sl={"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")}},jl={"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")}},Il={"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")}},Dl={"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")}},_l={"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")}},Tl={"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")}},El={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")}},zl={"resizable-panels":{"border-color":c("color-grey20"),"border-color-hover":c("color-grey30"),"border-color-drag":c("color-grey40"),"handle-width":c("border-sm")}},Ml={"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")}},Ol={"shell-icon-button":{padding:"5px"}},Rl={"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")}},Nl={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)"}},Fl={"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")}},Al={"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")}},Ll={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")}},Bl={"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")}},Wl={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")}},Pl={"view-container":{"vertical-gap":"0","horizontal-gap":c("spacing-16"),padding:"0","background-color":"transparent"}},Vl={...Za,...Xa,...Ja,...Qa,...el,...tl,...ol,...nl,...rl,...sl,...il,...al,...ll,...cl,...dl,...ul,...pl,...hl,...fl,...gl,...ml,...bl,...xl,...yl,...vl,...kl,...wl,...Cl,...Nl,...Fl,...$l,...Sl,...jl,...Il,...Dl,..._l,...Tl,...El,...zl,...Ml,...Ol,...Rl,...Al,...Ll,...Bl,...Wl,...Pl},Hl={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"}},Ul={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},Gl={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"}},Kl={...Hl,...Ul,...Gl},Yl={color:{white:F("color-grey0"),grey10:F("color-grey10"),grey15:F("color-grey15"),grey20:F("color-grey20"),grey30:F("color-grey30"),grey40:F("color-grey40"),grey50:F("color-grey50"),grey60:F("color-grey60"),grey65:F("color-grey65"),grey70:F("color-grey70"),grey80:F("color-grey80"),black:F("color-grey100"),primary:F("color-blue30"),primaryLight:F("color-blue0"),additional1:F("color-blue20"),additional2:F("color-blue40"),additional3:F("color-blue10"),green:F("color-green0"),orange:F("color-orange0"),red:F("color-red0"),purple:F("color-purple0"),blue:F("color-blue30"),yellow:F("color-yellow0")}},ql={"font-size":{sm:F("font-size-10px"),med:F("font-size-12px"),lrg:F("font-size-14px"),xlrg:F("font-size-16px")},"font-weight":{normal:F("font-weight-400"),bold:F("font-weight-700")},"font-family":{default:F("font-family-Arial")},"line-height":{default:F("line-height-120")}},Zl={spacing:{2:F("spacing-2px"),4:F("spacing-4px"),6:F("spacing-6px"),7:F("spacing-7px"),8:F("spacing-8px"),10:F("spacing-10px"),12:F("spacing-12px"),14:F("spacing-14px"),16:F("spacing-16px"),18:F("spacing-18px"),20:F("spacing-20px"),22:F("spacing-22px"),24:F("spacing-24px"),26:F("spacing-26px"),28:F("spacing-28px"),30:F("spacing-30px"),32:F("spacing-32px"),34:F("spacing-34px"),36:F("spacing-36px"),40:F("spacing-40px")},border:{xsm:F("spacing-0-5px"),sm:F("spacing-1px"),med:F("spacing-2px"),lrg:F("spacing-3px")}},Xl={...Yl,...ql,...Zl},pn=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),Jl=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=l=>l.map(a=>(u,p)=>Dt(`--${o}-${String(a)}-${u}`,p)),s=z.css`
|
|
1
|
+
"use strict";var Pa=Object.defineProperty;var Va=(e,t,o)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var E=(e,t,o)=>(Va(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"),Hr=require("react-dom"),R=require("@floating-ui/react"),Ha=require("@use-gesture/react"),q=require("date-fns"),G=require("react-hook-form"),W=require("@kosdev-code/kos-ui-sdk"),Dt=require("mobx-react-lite"),_=require("mobx"),we=require("@tanstack/react-table");function Ua(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=Ua(d),Ga=e=>{const t=/[\\^$.*+?()[\]{}|]/g;return RegExp(t.source).test(e)?e.replace(t,"\\$&"):e},Ka=e=>e instanceof RegExp,Ya=e=>typeof e=="string",qa=e=>{let t=[];return e.forEach(o=>{Array.isArray(o)?t=t.concat(o):o&&t.push(o)}),t},Za=(e,t,o)=>{if(e===""||t==="")return e;let n=t;Ka(n)||(n=new RegExp("("+Ga(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},Ur=(e,t,o)=>{let n=e;return Array.isArray(n)||(n=[n]),qa(n.map(r=>Ya(r)?Za(r,t,o):r))},_t=(e,t)=>t?e:`var(${e})`,F=(e,t)=>_t(`--studio-g-${e}`,t),c=(e,t)=>_t(`--studio-s-${e}`,t),Xa={"actionable-blurb":{"row-gap":c("spacing-4"),"icon-column-width":c("spacing-20")}},Ja={"app-shell":{"bg-default":c("color-grey80"),"bg-offline":c("color-grey70"),"bg-locked":c("color-grey60"),color:c("color-white")}},Qa={"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")}},el={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")}},tl={"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")}`}},ol={"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")}},nl={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)"}},rl={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`}},sl={"horizontal-rule":{"border-width":"0.5px","border-color":c("color-grey20")}},il={"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)"}},al={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")}},ll={"image-config-page-header":{gap:c("spacing-16"),"padding-bottom":c("spacing-12"),"title-gap":c("spacing-8"),bg:c("color-white")}},cl={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"}},dl={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")}},ul={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"}},pl={"named-section":{"border-radius":"2px","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")}},hl={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")}},fl={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"}},gl={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")}},ml={label:{gap:c("spacing-4")},"label-with-action":{gap:c("spacing-8")},"label-with-content-link":{color:c("color-primary")}},bl={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")}},xl={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")}},yl={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"}},vl={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")}},kl={"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"}},wl={"version-list-container":{gap:c("spacing-16")},"version-list-header":{gap:c("spacing-8"),itemBorderBottom:c("color-grey20"),itemBgColor:c("color-grey10")}},Cl={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")}},$l={"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")}},Sl={"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")}},jl={"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")}},Il={"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")}},Dl={"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")}},_l={"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")}},Tl={"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")}},El={"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")}},zl={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")}},Ml={"resizable-panels":{"border-color":c("color-grey20"),"border-color-hover":c("color-grey30"),"border-color-drag":c("color-grey40"),"handle-width":c("border-sm")}},Ol={"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")}},Rl={"shell-icon-button":{padding:"5px"}},Nl={"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")}},Fl={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)"}},Al={"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")}},Ll={"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")}},Bl={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")}},Wl={"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")}},Pl={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")}},Vl={"view-container":{"vertical-gap":"0","horizontal-gap":c("spacing-16"),padding:"0","background-color":"transparent"}},Hl={...Xa,...Ja,...Qa,...el,...tl,...ol,...nl,...rl,...sl,...il,...al,...ll,...cl,...dl,...ul,...pl,...hl,...fl,...gl,...ml,...bl,...xl,...yl,...vl,...kl,...wl,...Cl,...$l,...Fl,...Al,...Sl,...jl,...Il,...Dl,..._l,...Tl,...El,...zl,...Ml,...Ol,...Rl,...Nl,...Ll,...Bl,...Wl,...Pl,...Vl},Ul={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"}},Gl={"font-size":{"10px":"10px","12px":"12px","14px":"14px","16px":"16px"},"font-weight":{400:"400",700:"700"},"font-family":{Arial:"Arial, sans-serif"},"line-height":{120:"1.2"}},Kl={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"}},Yl={...Ul,...Gl,...Kl},ql={color:{white:F("color-grey0"),grey10:F("color-grey10"),grey15:F("color-grey15"),grey20:F("color-grey20"),grey30:F("color-grey30"),grey40:F("color-grey40"),grey50:F("color-grey50"),grey60:F("color-grey60"),grey65:F("color-grey65"),grey70:F("color-grey70"),grey80:F("color-grey80"),black:F("color-grey100"),primary:F("color-blue30"),primaryLight:F("color-blue0"),additional1:F("color-blue20"),additional2:F("color-blue40"),additional3:F("color-blue10"),green:F("color-green0"),orange:F("color-orange0"),red:F("color-red0"),purple:F("color-purple0"),blue:F("color-blue30"),yellow:F("color-yellow0")}},Zl={"font-size":{sm:F("font-size-10px"),med:F("font-size-12px"),lrg:F("font-size-14px"),xlrg:F("font-size-16px")},"font-weight":{normal:F("font-weight-400"),bold:F("font-weight-700")},"font-family":{default:F("font-family-Arial")},"line-height":{default:F("line-height-120")}},Xl={spacing:{2:F("spacing-2px"),4:F("spacing-4px"),6:F("spacing-6px"),7:F("spacing-7px"),8:F("spacing-8px"),10:F("spacing-10px"),12:F("spacing-12px"),14:F("spacing-14px"),16:F("spacing-16px"),18:F("spacing-18px"),20:F("spacing-20px"),22:F("spacing-22px"),24:F("spacing-24px"),26:F("spacing-26px"),28:F("spacing-28px"),30:F("spacing-30px"),32:F("spacing-32px"),34:F("spacing-34px"),36:F("spacing-36px"),40:F("spacing-40px")},border:{xsm:F("spacing-0-5px"),sm:F("spacing-1px"),med:F("spacing-2px"),lrg:F("spacing-3px")}},Jl={...ql,...Zl,...Xl},pn=(e,t="studio-c")=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`--${t}-${o}-${n}: ${e[o][n]}`)),Ql=(e,t={})=>{const{prefix:o="studio-c",cssRootSelector:n=":root"}=t,r=l=>l.map(a=>(u,p)=>_t(`--${o}-${String(a)}-${u}`,p)),s=z.css`
|
|
2
2
|
${n} {
|
|
3
3
|
${pn(e,o).join(`;
|
|
4
4
|
`)};
|
|
5
5
|
}
|
|
6
|
-
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},
|
|
6
|
+
`;return{getLocalComponentTokenHelpers:r,localComponentTokenCss:s}},ec=(e,t="studio-c")=>(o,n)=>_t(`--${t}-${e}-${o}`,n),tc=(e,t={})=>{const{prefix:o="studio-c"}=t;return z.css`
|
|
7
7
|
${pn(e,o).join(`;
|
|
8
8
|
`)};
|
|
9
|
-
`},M=e=>e.map(t=>(o,n)=>
|
|
9
|
+
`},M=e=>e.map(t=>(o,n)=>_t(`--studio-c-${t}-${o}`,n)),hn=(e,t)=>Object.keys(e).flatMap(o=>Object.keys(e[o]).map(n=>`${t(`${o}-${n}`,!0)}: ${e[o][n]}`)),oc=z.css`
|
|
10
10
|
:root {
|
|
11
|
-
${hn(
|
|
11
|
+
${hn(Jl,c)}
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,nc=z.css`
|
|
14
14
|
:root {
|
|
15
15
|
.rdp-root {
|
|
16
16
|
--rdp-accent-color: ${c("color-primary")};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
${hn(
|
|
19
|
+
${hn(Yl,F)}
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,rc=z.css`
|
|
22
22
|
:root {
|
|
23
|
-
${hn(
|
|
23
|
+
${hn(Hl,(e,t)=>_t(`--studio-c-${e}`,t))}
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,sc=z.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
|
+
`,ic=z.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
|
+
`,ac=z.css`
|
|
117
117
|
:root {
|
|
118
118
|
// list item
|
|
119
119
|
--studio-component-list-item-border-color-selected: var(
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
--studio-semantic-component-list-padding-inline
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
`,
|
|
149
|
+
`,lc=z.css`
|
|
150
150
|
:root {
|
|
151
151
|
//list
|
|
152
152
|
--studio-component-list-border-color-default: var(
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
`,Gr=z.css`
|
|
157
157
|
:root {
|
|
158
158
|
}
|
|
159
|
-
`,Zo=[Gr,
|
|
159
|
+
`,Zo=[Gr,sc,ic,ac,lc],Xo=z.css`
|
|
160
160
|
:root {
|
|
161
161
|
/* radius */
|
|
162
162
|
--studio-generic-border-radius-small: 4px;
|
|
@@ -530,14 +530,14 @@
|
|
|
530
530
|
code {
|
|
531
531
|
font-family: var(--ddk-generic-font-family-code);
|
|
532
532
|
}
|
|
533
|
-
`,lc=e=>e==="studio"?[Qo,Xo,...Zo,Jo]:[Qo,Xo,...Zo,Jo],Kr={"--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"},Yr={"--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)"},qr={"--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"},Zr={"--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"},cc={"--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"},uc={"--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"},sr={"--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"},pc=z.css`
|
|
533
|
+
`,cc=e=>e==="studio"?[Qo,Xo,...Zo,Jo]:[Qo,Xo,...Zo,Jo],Kr={"--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"},Yr={"--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)"},qr={"--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"},Zr={"--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"},dc={"--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)"},uc={"--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"},pc={"--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"},sr={"--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"},hc=z.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
|
+
`,fc=()=>z.css`
|
|
541
541
|
:root {
|
|
542
542
|
--kos-font-size-base: 10px;
|
|
543
543
|
--kos-font-size-small: 10px;
|
|
@@ -547,10 +547,10 @@
|
|
|
547
547
|
}
|
|
548
548
|
:root {
|
|
549
549
|
${z.css(Kr)}
|
|
550
|
+
${z.css(pc)}
|
|
550
551
|
${z.css(uc)}
|
|
551
|
-
${z.css(dc)}
|
|
552
552
|
${z.css(Zr)}
|
|
553
|
-
${z.css(
|
|
553
|
+
${z.css(dc)}
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
::-webkit-scrollbar {
|
|
@@ -671,7 +671,7 @@
|
|
|
671
671
|
--ant-font-size-base: var(--kos-font-size-base);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
`;function
|
|
674
|
+
`;function Tt(e){return d.forwardRef(e)}const[De]=M(["text"]),Xr=["blue","dark","disabled","green","grey","light","purple","red","yellow","orange"],gc=({bold:e,children:t,color:o,ellipsis:n,lineClamp:r,textAlign:s,underline:l,variant:a,...u},p)=>i.jsx(z.ClassNames,{children:({cx:h})=>i.jsx(bc,{"data-variant":a,"data-alignment":s,"data-color":o,ref:p,...u,className:h(u.className,{isBold:e,isUnderlined:l,isEllipsized:n,isLineClamped:r}),children:t})}),T=Tt(gc),mc=["left","right","center","justify"],bc=g.span`
|
|
675
675
|
font-family: ${De("font-family")};
|
|
676
676
|
line-height: ${De("line-height")};
|
|
677
677
|
vertical-align: bottom;
|
|
@@ -711,7 +711,7 @@
|
|
|
711
711
|
&[data-variant="small"] {
|
|
712
712
|
font-size: ${De("small-size")};
|
|
713
713
|
}
|
|
714
|
-
${
|
|
714
|
+
${mc.map(e=>`&[data-alignment="${e}"] {
|
|
715
715
|
text-align: ${e};
|
|
716
716
|
}`).join(`
|
|
717
717
|
`)}
|
|
@@ -720,9 +720,9 @@
|
|
|
720
720
|
}`).join(`
|
|
721
721
|
`)}
|
|
722
722
|
`,[lt]=M(["link"]),fn=d.forwardRef(({children:e,onClick:t,size:o="med",isDisabled:n,...r},s)=>i.jsx("span",{ref:s,css:z.css`
|
|
723
|
-
${
|
|
723
|
+
${xc}
|
|
724
724
|
font-size: ${lt(`font-size-${o}`)};
|
|
725
|
-
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),
|
|
725
|
+
`,onClick:t,className:n?"isDisabled":void 0,...r,children:e})),xc=z.css`
|
|
726
726
|
font-weight: ${lt("font-weight")};
|
|
727
727
|
font-family: ${lt("font-family")};
|
|
728
728
|
line-height: ${lt("line-height")};
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
color: ${lt("color-disabled")};
|
|
740
740
|
pointer-events: none;
|
|
741
741
|
}
|
|
742
|
-
`,en=["black","blue","green","grey","orange","purple","red","white","yellow"],
|
|
742
|
+
`,en=["black","blue","green","grey","orange","purple","red","white","yellow"],yc=["xxsm","xsm","sm","med","lrg","xlrg","xxlrg","xxxlrg"],Jr=d.createContext(null),vc=({children:e,publicPath:t})=>{const o=d.useMemo(()=>({basePath:t??"/ui/"}),[t]);return i.jsx(Jr.Provider,{value:o,children:e})},Qr=()=>{const e=d.useContext(Jr);if(!e)throw new Error("BaseUIComponentsContext cannot be used outside of its provider.");return e},[Ot]=M(["icon"]),kc=d.forwardRef(({iconId:e,size:t="sm",color:o,...n},r)=>{const{basePath:s}=Qr();return i.jsx(wc,{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}`})})}),O=d.memo(kc);O.displayName="Icon";const wc=g.svg`
|
|
743
743
|
fill: currentColor;
|
|
744
744
|
transition: fill 0.125s ease-in-out;
|
|
745
745
|
|
|
@@ -749,143 +749,35 @@
|
|
|
749
749
|
}`).join("")}
|
|
750
750
|
|
|
751
751
|
// Sizes
|
|
752
|
-
${
|
|
752
|
+
${yc.map(e=>`&[data-size="${e}"] {
|
|
753
753
|
max-height: ${Ot(`size-${e}`)};
|
|
754
754
|
max-width: ${Ot(`size-${e}`)};
|
|
755
755
|
min-height: ${Ot(`size-${e}`)};
|
|
756
756
|
min-width: ${Ot(`size-${e}`)};
|
|
757
757
|
}`).join("")}
|
|
758
|
-
`,[es]=M(["actionable-blurb"]),
|
|
758
|
+
`,[es]=M(["actionable-blurb"]),Cc=d.memo(({text:e,actions:t,icon:o,title:n,iconColor:r,iconSize:s,className:l})=>{const a=d.useMemo(()=>{if(!t)return e;let u=e;return t.forEach(({action:p,actionText:h})=>{u=Ur(u,h,f=>i.jsx(fn,{onClick:p,children:f},f))}),u},[t,e]);return i.jsxs($c,{className:l,children:[i.jsx(Sc,{children:i.jsx(O,{iconId:o,size:s??"xsm",color:r??"black"})}),i.jsxs(jc,{className:"blurb-wrapper",children:[i.jsx(T,{color:"dark",variant:"body",bold:!0,children:n}),i.jsx(T,{color:"dark",variant:"body",children:a})]})]})}),$c=g.div`
|
|
759
759
|
width: 100%;
|
|
760
760
|
display: grid;
|
|
761
761
|
grid-template-columns: ${es("icon-column-width")} 1fr;
|
|
762
|
-
|
|
762
|
+
`,Sc=g.div`
|
|
763
763
|
height: 100%;
|
|
764
764
|
display: flex;
|
|
765
765
|
align-items: flex-start;
|
|
766
766
|
justify-content: flex-start;
|
|
767
|
-
`,
|
|
767
|
+
`,jc=g.div`
|
|
768
768
|
display: flex;
|
|
769
769
|
align-items: flex-start;
|
|
770
770
|
justify-content: flex-start;
|
|
771
771
|
flex-direction: column;
|
|
772
772
|
row-gap: ${es("row-gap")};
|
|
773
|
-
`,
|
|
774
|
-
Copyright (c) 2018 Jed Watson.
|
|
775
|
-
Licensed under the MIT License (MIT), see
|
|
776
|
-
http://jedwatson.github.io/classnames
|
|
777
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",l=0;l<arguments.length;l++){var a=arguments[l];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 l="";for(var a in s)t.call(s,a)&&s[a]&&(l=r(l,a));return l}function r(s,l){return l?s?s+" "+l:s+l:s}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(ns);var Ic=ns.exports;const Tt=os(Ic),[Re]=M(["icon-button"]),ae=d.forwardRef(({iconId:e,badgeOffset:t,badgeBorderColor:o="white",color:n,className:r,size:s,type:l,isActive:a,badgeColor:u,hasBadge:p,...h},f)=>i.jsxs(Dc,{className:Tt({isActive:a},r),type:l??"button",ref:f,...h,children:[p&&i.jsx(_c,{"data-size":s,"data-border-color":o??n,"data-color":u??n,style:t?{right:t.x,top:t.y}:void 0}),i.jsx(O,{size:s,color:h.disabled?"grey":n??"white",iconId:e,className:"icon-button-icon"})]})),Dc=g.button`
|
|
778
|
-
box-sizing: border-box;
|
|
779
|
-
align-items: center;
|
|
780
|
-
justify-content: center;
|
|
781
|
-
display: flex;
|
|
782
|
-
position: relative;
|
|
783
|
-
border: 0px;
|
|
784
|
-
background-color: ${Re("background-color")};
|
|
785
|
-
border-color: ${Re("border-color")};
|
|
786
|
-
border-radius: ${Re("border-radius")};
|
|
787
|
-
padding: ${Re("padding")};
|
|
788
|
-
cursor: ${Re("cursor")};
|
|
789
|
-
&:disabled {
|
|
790
|
-
cursor: ${Re("disabled-cursor")};
|
|
791
|
-
}
|
|
792
|
-
> .icon-button-icon {
|
|
793
|
-
transition: fill-opacity 0.125s ease-in-out;
|
|
794
|
-
}
|
|
795
|
-
&:hover:not(:disabled) {
|
|
796
|
-
> .icon-button-icon {
|
|
797
|
-
fill-opacity: 0.85;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
&.isActive {
|
|
801
|
-
background-color: ${Re("active-background-color")};
|
|
802
|
-
}
|
|
803
|
-
`,_c=g.div`
|
|
804
|
-
position: absolute;
|
|
805
|
-
border: 1.5px solid ${c("color-black")};
|
|
806
|
-
border-radius: 50%;
|
|
807
|
-
top: ${Re("badge-top")};
|
|
808
|
-
right: ${Re("badge-right")};
|
|
809
|
-
transform: translate(50%, -50%);
|
|
810
|
-
// Border Colors
|
|
811
|
-
${en.map(e=>`&[data-border-color="${e}"] {
|
|
812
|
-
border-color: ${Re(`badge-fill-${e}`)};
|
|
813
|
-
}`).join("")}
|
|
814
|
-
// Colors
|
|
815
|
-
${en.map(e=>`&[data-color="${e}"] {
|
|
816
|
-
background-color: ${Re(`badge-fill-${e}`)};
|
|
817
|
-
}`).join("")}
|
|
818
|
-
width: ${c("spacing-8")};
|
|
819
|
-
height: ${c("spacing-8")};
|
|
820
|
-
`,Tc=g(ae)`
|
|
821
|
-
&.isLocked {
|
|
822
|
-
cursor: url("/ui/custom-cursors/locked-cursor.png"), not-allowed !important;
|
|
823
|
-
}
|
|
824
|
-
`,Ec=d.memo(({description:e})=>{const{open:t}=Xt();return i.jsx(zc,{color:"grey",variant:"small","data-state":t?"open":"closed",children:e})}),zc=g(T)`
|
|
825
|
-
width: 100%;
|
|
826
|
-
overflow: hidden;
|
|
827
|
-
text-overflow: ellipsis;
|
|
828
|
-
word-break: break-all;
|
|
829
|
-
white-space: nowrap;
|
|
830
|
-
&[data-state="open"] {
|
|
831
|
-
overflow: visible;
|
|
832
|
-
white-space: normal;
|
|
833
|
-
word-break: break-word;
|
|
834
|
-
}
|
|
835
|
-
`,[He]=M(["collapsible-artifact"]),Mc=d.memo(({onExternalClick:e,id:t,name:o,isSelected:n,description:r,VersionList:s,className:l})=>{const a=d.useCallback(()=>{e&&e(t)},[t,e]);return i.jsx(mo,{children:i.jsxs(Oc,{className:l,children:[i.jsxs(Nc,{children:[i.jsx(gn,{children:i.jsx(Fc,{color:"black",size:"xxsm",iconId:"CaretRight"})}),i.jsxs(Ac,{children:[i.jsxs(Lc,{children:[i.jsx(T,{css:z.css`
|
|
836
|
-
word-break: break-all;
|
|
837
|
-
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(T,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(Ec,{description:r})]}),!!e&&i.jsx(Rc,{color:"blue",iconId:"Export",onClick:a,size:"xsm"})]}),i.jsx(bo,{children:i.jsx(Bc,{children:i.jsx(Wc,{children:s})})})]})})}),Oc=g.div`
|
|
838
|
-
align-items: flex-start;
|
|
839
|
-
background-color: ${He("background-color")};
|
|
840
|
-
border-radius: ${He("border-radius")};
|
|
841
|
-
border: ${He("border-width")} solid ${He("border-color")};
|
|
842
|
-
display: flex;
|
|
843
|
-
flex-direction: column;
|
|
844
|
-
justify-content: flex-start;
|
|
845
|
-
position: relative;
|
|
846
|
-
width: 100%;
|
|
847
|
-
`,Rc=g(ae)`
|
|
848
|
-
z-index: 1;
|
|
849
|
-
`,Nc=g.div`
|
|
850
|
-
align-items: flex-start;
|
|
851
|
-
display: flex;
|
|
852
|
-
gap: ${He("name-and-selected-spacing")};
|
|
853
|
-
padding: ${He("padding")};
|
|
854
|
-
width: 100%;
|
|
855
|
-
`,Fc=g(ae)`
|
|
856
|
-
z-index: 1;
|
|
857
|
-
|
|
858
|
-
&[data-state="open"] {
|
|
859
|
-
transform: rotate(90deg);
|
|
860
|
-
}
|
|
861
|
-
`,Ac=g.div`
|
|
862
|
-
display: flex;
|
|
863
|
-
flex-direction: column;
|
|
864
|
-
flex: 1;
|
|
865
|
-
gap: ${He("name-and-desc-spacing")};
|
|
866
|
-
overflow: hidden;
|
|
867
|
-
`,Lc=g.div`
|
|
868
|
-
align-items: center;
|
|
869
|
-
display: flex;
|
|
870
|
-
flex-wrap: wrap;
|
|
871
|
-
flex: 1;
|
|
872
|
-
gap: ${He("name-and-selected-spacing")};
|
|
873
|
-
justify-content: flex-start;
|
|
874
|
-
width: 100%;
|
|
875
|
-
`,Bc=g.div`
|
|
876
|
-
border-top: 1px solid ${He("border-color")};
|
|
877
|
-
width: 100%;
|
|
878
|
-
`,Wc=g.div`
|
|
879
|
-
padding: ${He("name-and-selected-spacing")};
|
|
880
|
-
width: 100%;
|
|
881
|
-
`,Se=()=>{},Pc=e=>(t,o)=>e[t][o]??t,Vc=(e,t)=>d.useReducer(Pc(t),e),so=e=>(e==null?void 0:e.animationName)||"none",Hc=(e,t)=>{const[o,n]=d.useState(),r=d.useRef(),s=d.useRef(e),l=d.useRef("none"),a=d.useRef(t);d.useLayoutEffect(()=>{a.current=t},[t]);const[u,p]=Vc(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=so(r.current);l.current=u==="mounted"?m:"none"},[u]),d.useLayoutEffect(()=>{const m=r.current,b=s.current;if(b!==e){const y=l.current,k=so(m);e?p("MOUNT"):k==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(b&&y!==k?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),d.useLayoutEffect(()=>{if(o){const m=x=>{const k=so(r.current).includes(x.animationName);x.target===o&&k&&Hr.flushSync(()=>p("ANIMATION_END"))},b=x=>{x.target===o&&(l.current=so(r.current))};return o.addEventListener("animationstart",b),o.addEventListener("animationcancel",m),o.addEventListener("animationend",m),()=>{o.removeEventListener("animationstart",b),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)},[]),f=["mounted","unmounting"].includes(u);return d.useEffect(()=>{a.current&&a.current(f)},[f]),{isPresent:f,ref:h}},rs=d.memo(({present:e,children:t,onPresenceChange:o})=>{const n=Hc(e,o);return n.isPresent?d.cloneElement(t,{ref:n.ref,present:e}):null});rs.displayName="AnimatePresence";const Uc=({offlineContent:e,onlineContent:t})=>t?e?i.jsx(Gc,{children:i.jsxs(Kc,{children:[i.jsx(ir,{$front:!0,children:e}),i.jsx(ir,{$back:!0,children:t})]})}):t:e,Gc=g.div`
|
|
773
|
+
`,Se=()=>{},Ic=e=>(t,o)=>e[t][o]??t,Dc=(e,t)=>d.useReducer(Ic(t),e),so=e=>(e==null?void 0:e.animationName)||"none",_c=(e,t)=>{const[o,n]=d.useState(),r=d.useRef(),s=d.useRef(e),l=d.useRef("none"),a=d.useRef(t);d.useLayoutEffect(()=>{a.current=t},[t]);const[u,p]=Dc(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=so(r.current);l.current=u==="mounted"?m:"none"},[u]),d.useLayoutEffect(()=>{const m=r.current,b=s.current;if(b!==e){const y=l.current,k=so(m);e?p("MOUNT"):k==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(b&&y!==k?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,p]),d.useLayoutEffect(()=>{if(o){const m=x=>{const k=so(r.current).includes(x.animationName);x.target===o&&k&&Hr.flushSync(()=>p("ANIMATION_END"))},b=x=>{x.target===o&&(l.current=so(r.current))};return o.addEventListener("animationstart",b),o.addEventListener("animationcancel",m),o.addEventListener("animationend",m),()=>{o.removeEventListener("animationstart",b),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)},[]),f=["mounted","unmounting"].includes(u);return d.useEffect(()=>{a.current&&a.current(f)},[f]),{isPresent:f,ref:h}},ts=d.memo(({present:e,children:t,onPresenceChange:o})=>{const n=_c(e,o);return n.isPresent?d.cloneElement(t,{ref:n.ref,present:e}):null});ts.displayName="AnimatePresence";const Tc=({offlineContent:e,onlineContent:t})=>t?e?i.jsx(Ec,{children:i.jsxs(zc,{children:[i.jsx(ir,{$front:!0,children:e}),i.jsx(ir,{$back:!0,children:t})]})}):t:e,Ec=g.div`
|
|
882
774
|
flex: 1;
|
|
883
775
|
min-width: 0px;
|
|
884
776
|
height: 100%;
|
|
885
777
|
overflow: visible;
|
|
886
778
|
perspective: 300px;
|
|
887
779
|
perspective-origin: left center;
|
|
888
|
-
`,
|
|
780
|
+
`,zc=g.div`
|
|
889
781
|
width: 100%;
|
|
890
782
|
height: 100%;
|
|
891
783
|
position: relative;
|
|
@@ -920,7 +812,7 @@
|
|
|
920
812
|
${({$back:e})=>e&&`
|
|
921
813
|
transform: rotateX(180deg) translateZ(20px);
|
|
922
814
|
`}
|
|
923
|
-
`,[N,xe]=M(["button","icon"]),
|
|
815
|
+
`,[N,xe]=M(["button","icon"]),Mc=d.forwardRef(({variant:e,text:t,disabled:o,className:n,icon:r,...s},l)=>i.jsx(z.ClassNames,{children:({cx:a})=>i.jsxs(Oc,{disabled:o,className:a(e,n),ref:l,...s,children:[r&&i.jsx(Rc,{children:i.jsx(O,{iconId:r,size:"sm",color:"white"})}),t]})})),Le=d.memo(Mc);Le.displayName="StudioButton";const Oc=g.button`
|
|
924
816
|
font-weight: ${N("font-weight")};
|
|
925
817
|
font-size: ${N("font-size")};
|
|
926
818
|
line-height: ${N("line-height")};
|
|
@@ -1031,18 +923,18 @@
|
|
|
1031
923
|
${`${xe("fill-white",!0)}: ${N("color-disabled-borderless")}`};
|
|
1032
924
|
}
|
|
1033
925
|
}
|
|
1034
|
-
`,
|
|
926
|
+
`,Rc=g.span`
|
|
1035
927
|
display: flex;
|
|
1036
928
|
margin: ${N("icon-margin")};
|
|
1037
|
-
`,
|
|
929
|
+
`,os=d.createContext(void 0);function ns(){const e=d.useContext(os);if(!e)throw new Error("useButtonGroupContext must be used within a ButtonGroup component");return e}const[vt]=M(["button-group"]),Nc=({value:e,defaultValue:t,onValueChange:o,children:n,className:r})=>{const[s,l]=d.useState(t),a=e??s,u=o??l,p=d.useMemo(()=>({value:a,setValue:u}),[a,u]);return i.jsx(os.Provider,{value:p,children:i.jsx(Fc,{className:r,children:n})})},Fc=g.div`
|
|
1038
930
|
display: inline-flex;
|
|
1039
931
|
align-items: center;
|
|
1040
|
-
gap: ${
|
|
1041
|
-
background-color: ${
|
|
1042
|
-
border-radius: ${
|
|
1043
|
-
border: ${
|
|
1044
|
-
padding: ${
|
|
1045
|
-
`,[it,
|
|
932
|
+
gap: ${vt("gap")};
|
|
933
|
+
background-color: ${vt("background-color")};
|
|
934
|
+
border-radius: ${vt("border-radius")};
|
|
935
|
+
border: ${vt("border-width")} solid ${vt("border-color")};
|
|
936
|
+
padding: ${vt("padding")};
|
|
937
|
+
`,[it,Ac]=M(["button-group","icon"]),rs=d.memo(({value:e,iconId:t,label:o,tooltip:n,disabled:r})=>{const{value:s,setValue:l}=ns(),a=s===e,u=d.useCallback(()=>{r||l(e)},[e,l,r]);return i.jsxs(Lc,{type:"button","data-active":a,onClick:u,disabled:r,title:n,"aria-pressed":a,children:[t&&i.jsx(O,{iconId:t,size:"sm",color:a?"black":"grey",className:"button-group-icon"}),o&&i.jsx("span",{className:"button-group-label",children:o})]})});rs.displayName="ButtonGroupItem";const Lc=g.button`
|
|
1046
938
|
display: inline-flex;
|
|
1047
939
|
align-items: center;
|
|
1048
940
|
justify-content: center;
|
|
@@ -1080,9 +972,9 @@
|
|
|
1080
972
|
color: ${it("item-color-active")};
|
|
1081
973
|
}
|
|
1082
974
|
|
|
1083
|
-
${`${
|
|
975
|
+
${`${Ac("fill-grey",!0)}: ${it("item-color-active")}`};
|
|
1084
976
|
}
|
|
1085
|
-
`,[_e]=M(["checkbox"]),bt=d.forwardRef((e,t)=>i.jsxs(
|
|
977
|
+
`,[_e]=M(["checkbox"]),bt=d.forwardRef((e,t)=>i.jsxs(Bc,{children:[i.jsx(Wc,{ref:t,...e,type:"checkbox"}),i.jsx(ar,{className:"check-icon",children:i.jsx(O,{iconId:"CheckSmall",size:"xsm",color:"white"})}),i.jsx(ar,{className:"minus-icon",children:i.jsx(O,{iconId:"Minus",size:"xsm",color:"white"})})]})),Bc=g.div`
|
|
1086
978
|
height: ${_e("size")};
|
|
1087
979
|
width: ${_e("size")};
|
|
1088
980
|
pointer-events: none;
|
|
@@ -1121,7 +1013,7 @@
|
|
|
1121
1013
|
top: 0;
|
|
1122
1014
|
left: 0;
|
|
1123
1015
|
z-index: 1;
|
|
1124
|
-
`,
|
|
1016
|
+
`,Wc=g.input`
|
|
1125
1017
|
margin: 0px;
|
|
1126
1018
|
position: absolute;
|
|
1127
1019
|
top: 0;
|
|
@@ -1146,15 +1038,15 @@
|
|
|
1146
1038
|
opacity: 1;
|
|
1147
1039
|
}
|
|
1148
1040
|
}
|
|
1149
|
-
|
|
1041
|
+
`,Pc=({defaultOpen:e=!1,open:t,onOpenChange:o})=>{const[n,r]=d.useState(e),s=t??n,l=o??r;return d.useMemo(()=>({open:s,setOpen:l}),[s,l])},ss=d.createContext(null),Xt=()=>{const e=d.useContext(ss);if(e==null)throw new Error("Collapsible components must be wrapped in <Collapsible />");return e},mo=({children:e,...t})=>{const o=Pc(t);return i.jsx(ss.Provider,{value:o,children:e})},gn=({children:e})=>{const{open:t,setOpen:o}=Xt(),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")},bo=({children:e})=>{const{open:t}=Xt();return t?e:null};function is(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vc=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()}},Hc=Vc,lr={"text/plain":"Text","text/html":"Url",default:"Text"},Uc="Copy to clipboard: #{key}, Enter";function Gc(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Kc(e,t){var o,n,r,s,l,a,u=!1;t||(t={}),o=t.debug||!1;try{r=Hc(),s=document.createRange(),l=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 f=lr[t.format]||lr.default;window.clipboardData.setData(f,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),l.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(f){o&&console.error("unable to copy using clipboardData: ",f),o&&console.error("falling back to prompt"),n=Gc("message"in t?t.message:Uc),window.prompt(n,e)}}finally{l&&(typeof l.removeRange=="function"?l.removeRange(s):l.removeAllRanges()),a&&document.body.removeChild(a),r()}return u}var Yc=Kc;const qc=is(Yc),Zc=250,Xc=500,Jc=({children:e,color:t,copyable:o=!0,copyText:n,onClick:r,onMouseMove:s,onMouseOut:l,onMouseOver:a,style:u,...p})=>{const h=d.useRef(),f=d.useRef(),m=d.useRef(null),b=d.useRef(null),[x,y]=d.useState(!1),[k,v]=d.useState(!1),$=d.useCallback(I=>{let j=n;j||(j=typeof e=="string"?String(e):""),y(!0),qc(j);const D=()=>{y(!1)};clearTimeout(h.current),h.current=setTimeout(D,Xc),r==null||r(I)},[e,n,r]),C=d.useCallback(I=>{if(!m.current||!b.current){s==null||s(I);return}const j=b.current.getBoundingClientRect(),D=I.clientX-j.left+9,L=I.clientY-j.top+9;m.current.style.transform=`translate(${D}px, ${L}px)`,s==null||s(I)},[s]),S=d.useCallback(I=>{y(!1),v(!1),clearTimeout(f.current),l==null||l(I)},[l]),w=d.useCallback(I=>{const j=()=>{v(!0)};return clearTimeout(f.current),f.current=setTimeout(j,Zc),a==null||a(I),()=>{clearTimeout(f.current)}},[a]);return i.jsxs("div",{style:{position:"relative"},children:[i.jsx(Qc,{ref:b,children:e,onClick:o?$:r,onMouseMove:o?C:s,onMouseOut:o?S:l,onMouseOver:o?w:a,style:o?x?{...u,opacity:.5,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"}:{...u,cursor:"default",userSelect:"none"},...p}),o&&i.jsx(O,{ref:m,iconId:"CopyFilled",style:{position:"absolute",transition:"opacity 150ms ease-in-out",top:"0px",left:"0px",opacity:k&&!x?"1":"0"}})]})},Qc=g(T)`
|
|
1150
1042
|
position: relative;
|
|
1151
1043
|
transition: opacity 150ms ease-in-out;
|
|
1152
|
-
`,
|
|
1044
|
+
`,ed=({children:e,forwardedRef:t,setFloatingReference:o,getReferenceProps:n,open:r})=>{const s=e.ref,l=R.useMergeRefs([o,t,s]);if(d.isValidElement(e))return d.cloneElement(e,n({ref:l,...e.props,"data-state":r?"open":"closed"}));throw new Error("Passed useDecoratedFloatingUITrigger an invalid child element")};function as({defaultOpen:e=!1,open:t,onOpenChange:o,dismissOptions:n}={}){const[r,s]=d.useState(e),l=t??r,a=d.useCallback(b=>{t===void 0&&s(b),o==null||o(b)},[t,o]),u=R.useFloating({open:l,onOpenChange:a}),p=u.context,h=R.useClick(p),f=R.useDismiss(p,n?{outsidePressEvent:"mousedown",...n}:{outsidePressEvent:"mousedown"}),m=R.useInteractions([h,f]);return d.useMemo(()=>({open:l,setOpen:a,...m,...u}),[l,a,m,u])}const td=z.css`
|
|
1153
1045
|
background: rgba(0, 0, 0, 0.8);
|
|
1154
1046
|
display: grid;
|
|
1155
1047
|
place-items: center;
|
|
1156
1048
|
z-index: 1;
|
|
1157
|
-
`,
|
|
1049
|
+
`,ls=d.createContext(null),rt=()=>{const e=d.useContext(ls);if(e==null)throw new Error("Dialog components must be wrapped in <Dialog />");return e},mn=d.memo(({children:e,...t})=>{const o=as(t);return i.jsx(ls.Provider,{value:o,children:e})}),bn=d.forwardRef(({children:e},t)=>{const o=rt();return ed({children:e,forwardedRef:t,setFloatingReference:o.refs.setReference,getReferenceProps:o.getReferenceProps,open:o.open})}),xn=d.forwardRef(({disableScrollLock:e,modal:t,portalRoot:o,portalId:n,trapFocus:r,transitionDuration:s,OverlayStyles:l,disableFocusManagement:a,children:u,initialFocus:p,...h},f)=>{const{context:m,...b}=rt(),x=R.useMergeRefs([b.refs.setFloating,f]),{isMounted:y,status:k}=R.useTransitionStatus(m,{duration:s||0});if(!d.isValidElement(u))throw new Error("Passed an invalid child element to Dialog.");if(!y)return null;const v=t?td:l;return i.jsx(R.FloatingPortal,{id:n,root:o,children:i.jsx(R.FloatingFocusManager,{context:m,modal:r,returnFocus:!1,initialFocus:p,disabled:a,children:i.jsx(R.FloatingOverlay,{css:v,"data-status":k,lockScroll:!e,children:d.cloneElement(u,{...u.props,ref:x,"data-status":k==="initial"?"open":k,...b.getFloatingProps(h)})})})})}),yn=300;function vn(){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 od=g.div`
|
|
1158
1050
|
background-color: transparent;
|
|
1159
1051
|
box-sizing: border-box;
|
|
1160
1052
|
cursor: ew-resize;
|
|
@@ -1174,25 +1066,25 @@
|
|
|
1174
1066
|
right: -4px;
|
|
1175
1067
|
top: 0;
|
|
1176
1068
|
}
|
|
1177
|
-
`,Jt=({inverse:e=!1,maxSize:t,minSize:o=200,onChange:n,size:r,...s})=>{const l=d.useRef(0),a=
|
|
1069
|
+
`,Jt=({inverse:e=!1,maxSize:t,minSize:o=200,onChange:n,size:r,...s})=>{const l=d.useRef(0),a=Ha.useDrag(({down:u,movement:[p],first:h})=>{if(!u)return;h&&(l.current=r);let f=l.current-p*(e?-1:1);f<o&&(f=o),t!==void 0&&f>t&&(f=t),n(f)});return i.jsx(od,{...s,...a()})},nd=({defaultOpen:e=!1,minSize:t,mode:o,onOpenChange:n,open:r,size:s=440})=>{const[l,a]=d.useState(e),[u,p]=d.useState(s),h=r??l,f=n??a;return d.useMemo(()=>({mode:o,open:h,setOpen:f,setSize:p,size:u,minSize:t}),[t,o,h,f,u])},tn=d.createContext(null),ut=()=>{const e=d.useContext(tn);if(e==null)throw new Error("Drawer components must be wrapped in <Drawer />");return e},[ue]=M(["drawer"]),rd=g.div`
|
|
1178
1070
|
display: flex;
|
|
1179
1071
|
height: 100%;
|
|
1180
1072
|
position: absolute;
|
|
1181
1073
|
width: 100%;
|
|
1182
1074
|
z-index: 1;
|
|
1183
1075
|
pointer-events: none;
|
|
1184
|
-
`,
|
|
1076
|
+
`,cs=z.css`
|
|
1185
1077
|
pointer-events: none;
|
|
1186
1078
|
display: grid;
|
|
1187
1079
|
overflow: hidden !important;
|
|
1188
1080
|
z-index: 1;
|
|
1189
|
-
`,
|
|
1081
|
+
`,sd=z.css`
|
|
1190
1082
|
place-items: start;
|
|
1191
|
-
${
|
|
1192
|
-
`,
|
|
1083
|
+
${cs};
|
|
1084
|
+
`,id=z.css`
|
|
1193
1085
|
place-items: end;
|
|
1194
|
-
${
|
|
1195
|
-
`,
|
|
1086
|
+
${cs};
|
|
1087
|
+
`,ds=g.div`
|
|
1196
1088
|
align-items: flex-start;
|
|
1197
1089
|
animation-timing-function: ease-in-out;
|
|
1198
1090
|
border-color: ${ue("border-color")};
|
|
@@ -1208,33 +1100,33 @@
|
|
|
1208
1100
|
// We add 50ms here to hedge against a race condition between
|
|
1209
1101
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1210
1102
|
animation-duration: ${yn+10}ms;
|
|
1211
|
-
`,
|
|
1103
|
+
`,us=g.div`
|
|
1212
1104
|
display: flex;
|
|
1213
1105
|
height: 100%;
|
|
1214
1106
|
width: 100%;
|
|
1215
|
-
`,
|
|
1107
|
+
`,ps=g.div`
|
|
1216
1108
|
flex: 1;
|
|
1217
1109
|
width: 100%;
|
|
1218
1110
|
height: 100%;
|
|
1219
|
-
`,
|
|
1111
|
+
`,ad=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:l}=ut(),[a,u]=vn(),p=u!==void 0,h=s/(u||1);return i.jsx(us,{ref:a,children:p&&i.jsxs(i.Fragment,{children:[i.jsx(ds,{ref:n,className:t,style:{flexGrow:h},...o,children:e}),i.jsx(Jt,{inverse:!0,size:s,minSize:r,onChange:l}),i.jsx(ps,{style:{flexGrow:1-h}})]})})}),ld=d.forwardRef(({children:e,className:t,...o},n)=>{const{minSize:r,size:s,setSize:l}=ut(),[a,u]=vn(),p=u!==void 0,h=s/(u||1);return i.jsx(us,{ref:a,children:p&&i.jsxs(i.Fragment,{children:[i.jsx(ps,{style:{flexGrow:1-h}}),i.jsx(Jt,{size:s,minSize:r,onChange:l}),i.jsx(ds,{ref:n,className:t,style:{flexGrow:h},...o,children:e})]})})}),cd=z.keyframes({"0%":{transform:"translateX(-100%)"},"100%":{transform:"translateX(0%)"}}),dd=z.keyframes({"0%":{transform:"translateX(0%)"},"100%":{transform:"translateX(-100%)"}}),ud=g(ad)`
|
|
1220
1112
|
border-right-width: ${ue("border-width")};
|
|
1221
1113
|
box-shadow: ${ue("left-drop-shadow")};
|
|
1222
1114
|
&[data-status="open"] {
|
|
1223
|
-
animation-name: ${
|
|
1115
|
+
animation-name: ${cd};
|
|
1224
1116
|
}
|
|
1225
1117
|
&[data-status="close"] {
|
|
1226
|
-
animation-name: ${
|
|
1118
|
+
animation-name: ${dd};
|
|
1227
1119
|
}
|
|
1228
|
-
`,
|
|
1120
|
+
`,pd=z.keyframes({from:{transform:"translateX(100%)"},to:{transform:"translateX(0%)"}}),hd=z.keyframes({from:{transform:"translateX(0%)"},to:{transform:"translateX(100%)"}}),fd=g(ld)`
|
|
1229
1121
|
border-left-width: ${ue("border-width")};
|
|
1230
1122
|
box-shadow: ${ue("right-drop-shadow")};
|
|
1231
1123
|
&[data-status="open"] {
|
|
1232
|
-
animation-name: ${
|
|
1124
|
+
animation-name: ${pd};
|
|
1233
1125
|
}
|
|
1234
1126
|
&[data-status="close"] {
|
|
1235
|
-
animation-name: ${
|
|
1127
|
+
animation-name: ${hd};
|
|
1236
1128
|
}
|
|
1237
|
-
`,
|
|
1129
|
+
`,hs=g.div`
|
|
1238
1130
|
width: 100%;
|
|
1239
1131
|
pointer-events: all;
|
|
1240
1132
|
height: fit-content;
|
|
@@ -1245,23 +1137,23 @@
|
|
|
1245
1137
|
// We add 50ms here to hedge against a race condition between
|
|
1246
1138
|
// the css animation finishing and the floating-ui transition helper hiding the content.
|
|
1247
1139
|
animation-duration: ${yn+10}ms;
|
|
1248
|
-
`,
|
|
1140
|
+
`,gd=z.keyframes({from:{transform:"translateY(-30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),md=z.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-30px)",opacity:0}}),bd=g(hs)`
|
|
1249
1141
|
border-bottom-width: ${ue("border-width")};
|
|
1250
1142
|
&[data-status="open"] {
|
|
1251
|
-
animation-name: ${
|
|
1143
|
+
animation-name: ${gd};
|
|
1252
1144
|
}
|
|
1253
1145
|
&[data-status="close"] {
|
|
1254
|
-
animation-name: ${
|
|
1146
|
+
animation-name: ${md};
|
|
1255
1147
|
}
|
|
1256
|
-
`,
|
|
1148
|
+
`,fs=z.keyframes({from:{transform:"translateY(30px)",opacity:0},to:{transform:"translateY(0)",opacity:1}}),gs=z.keyframes({from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(30px)",opacity:0}}),xd=g(hs)`
|
|
1257
1149
|
border-top-width: ${ue("border-width")};
|
|
1258
1150
|
&[data-status="open"] {
|
|
1259
|
-
animation-name: ${
|
|
1151
|
+
animation-name: ${fs};
|
|
1260
1152
|
}
|
|
1261
1153
|
&[data-status="close"] {
|
|
1262
|
-
animation-name: ${
|
|
1154
|
+
animation-name: ${gs};
|
|
1263
1155
|
}
|
|
1264
|
-
`,
|
|
1156
|
+
`,ms=g.div`
|
|
1265
1157
|
display: flex;
|
|
1266
1158
|
align-items: flex-start;
|
|
1267
1159
|
justify-content: flex-start;
|
|
@@ -1272,30 +1164,81 @@
|
|
|
1272
1164
|
border-width: 0px;
|
|
1273
1165
|
border-color: ${ue("border-color")};
|
|
1274
1166
|
border-style: solid;
|
|
1275
|
-
`,
|
|
1167
|
+
`,yd=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=ut();return i.jsxs(i.Fragment,{children:[i.jsx(Jt,{inverse:!0,size:n,onChange:r}),i.jsx(ms,{ref:o,className:t,style:{width:n},children:e})]})}),vd=d.forwardRef(({children:e,className:t},o)=>{const{size:n,setSize:r}=ut();return i.jsxs(i.Fragment,{children:[i.jsx(Jt,{size:n,onChange:r}),i.jsx(ms,{ref:o,className:t,style:{width:n},children:e})]})}),kd=g(yd)`
|
|
1276
1168
|
border-right-width: ${ue("border-width")};
|
|
1277
1169
|
box-shadow: ${ue("left-drop-shadow")};
|
|
1278
|
-
`,
|
|
1170
|
+
`,wd=g(vd)`
|
|
1279
1171
|
border-left-width: ${ue("border-width")};
|
|
1280
1172
|
box-shadow: ${ue("right-drop-shadow")};
|
|
1281
|
-
`,
|
|
1173
|
+
`,bs=g.div`
|
|
1282
1174
|
width: 100%;
|
|
1283
1175
|
pointer-events: all;
|
|
1284
1176
|
height: fit-content;
|
|
1285
1177
|
border-width: 0px;
|
|
1286
1178
|
border-color: ${ue("border-color")};
|
|
1287
1179
|
border-style: solid;
|
|
1288
|
-
`,
|
|
1180
|
+
`,Cd=g(bs)`
|
|
1289
1181
|
border-bottom-width: ${ue("border-width")};
|
|
1290
|
-
|
|
1182
|
+
`,$d=g(bs)`
|
|
1291
1183
|
border-top-width: ${ue("border-width")};
|
|
1292
1184
|
&[data-status="open"] {
|
|
1293
|
-
animation-name: ${
|
|
1185
|
+
animation-name: ${fs};
|
|
1294
1186
|
}
|
|
1295
1187
|
&[data-status="close"] {
|
|
1296
|
-
animation-name: ${
|
|
1188
|
+
animation-name: ${gs};
|
|
1189
|
+
}
|
|
1190
|
+
`,Sd={escapeKey:!0,outsidePress:!1},jd=d.memo(({children:e,...t})=>{const o=nd(t);return t.mode==="dialog"?i.jsx(tn.Provider,{value:o,children:i.jsx(mn,{onOpenChange:o.setOpen,open:o.open,defaultOpen:t.defaultOpen??!1,dismissOptions:Sd,children:e})}):i.jsx(tn.Provider,{value:o,children:e})}),Id=d.memo(({children:e})=>{const{mode:t,open:o,setOpen:n}=ut(),r=d.useCallback(()=>{n(!o)},[o,n]);if(t==="dialog")return i.jsx(bn,{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")}),Dd=d.memo(({children:e,OverlayStyles:t,...o})=>{const{mode:n,open:r}=ut();if(n==="dialog")return i.jsx(xn,{disableScrollLock:!0,disableFocusManagement:!0,OverlayStyles:t,transitionDuration:yn,...o,children:e});if(t)throw new Error("OverlayStyles are not used in inline drawers.");return r?n==="inline-float"?i.jsx(rd,{children:e}):e:null});var xs={exports:{}};/*!
|
|
1191
|
+
Copyright (c) 2018 Jed Watson.
|
|
1192
|
+
Licensed under the MIT License (MIT), see
|
|
1193
|
+
http://jedwatson.github.io/classnames
|
|
1194
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function o(){for(var s="",l=0;l<arguments.length;l++){var a=arguments[l];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 l="";for(var a in s)t.call(s,a)&&s[a]&&(l=r(l,a));return l}function r(s,l){return l?s?s+" "+l:s+l:s}e.exports?(o.default=o,e.exports=o):window.classNames=o})()})(xs);var _d=xs.exports;const xt=is(_d),[Re]=M(["icon-button"]),ae=d.forwardRef(({iconId:e,badgeOffset:t,badgeBorderColor:o="white",color:n,className:r,size:s,type:l,isActive:a,badgeColor:u,hasBadge:p,...h},f)=>i.jsxs(Td,{className:xt({isActive:a},r),type:l??"button",ref:f,...h,children:[p&&i.jsx(Ed,{"data-size":s,"data-border-color":o??n,"data-color":u??n,style:t?{right:t.x,top:t.y}:void 0}),i.jsx(O,{size:s,color:h.disabled?"grey":n??"white",iconId:e,className:"icon-button-icon"})]})),Td=g.button`
|
|
1195
|
+
box-sizing: border-box;
|
|
1196
|
+
align-items: center;
|
|
1197
|
+
justify-content: center;
|
|
1198
|
+
display: flex;
|
|
1199
|
+
position: relative;
|
|
1200
|
+
border: 0px;
|
|
1201
|
+
background-color: ${Re("background-color")};
|
|
1202
|
+
border-color: ${Re("border-color")};
|
|
1203
|
+
border-radius: ${Re("border-radius")};
|
|
1204
|
+
padding: ${Re("padding")};
|
|
1205
|
+
cursor: ${Re("cursor")};
|
|
1206
|
+
&:disabled {
|
|
1207
|
+
cursor: ${Re("disabled-cursor")};
|
|
1297
1208
|
}
|
|
1298
|
-
|
|
1209
|
+
> .icon-button-icon {
|
|
1210
|
+
transition: fill-opacity 0.125s ease-in-out;
|
|
1211
|
+
}
|
|
1212
|
+
&:hover:not(:disabled) {
|
|
1213
|
+
> .icon-button-icon {
|
|
1214
|
+
fill-opacity: 0.85;
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
&.isActive {
|
|
1218
|
+
background-color: ${Re("active-background-color")};
|
|
1219
|
+
}
|
|
1220
|
+
`,Ed=g.div`
|
|
1221
|
+
position: absolute;
|
|
1222
|
+
border: 1.5px solid ${c("color-black")};
|
|
1223
|
+
border-radius: 50%;
|
|
1224
|
+
top: ${Re("badge-top")};
|
|
1225
|
+
right: ${Re("badge-right")};
|
|
1226
|
+
transform: translate(50%, -50%);
|
|
1227
|
+
// Border Colors
|
|
1228
|
+
${en.map(e=>`&[data-border-color="${e}"] {
|
|
1229
|
+
border-color: ${Re(`badge-fill-${e}`)};
|
|
1230
|
+
}`).join("")}
|
|
1231
|
+
// Colors
|
|
1232
|
+
${en.map(e=>`&[data-color="${e}"] {
|
|
1233
|
+
background-color: ${Re(`badge-fill-${e}`)};
|
|
1234
|
+
}`).join("")}
|
|
1235
|
+
width: ${c("spacing-8")};
|
|
1236
|
+
height: ${c("spacing-8")};
|
|
1237
|
+
`,zd=g(ae)`
|
|
1238
|
+
&.isLocked {
|
|
1239
|
+
cursor: url("/ui/custom-cursors/locked-cursor.png"), not-allowed !important;
|
|
1240
|
+
}
|
|
1241
|
+
`,[Rt]=M(["drawer"]),Md=d.memo(({children:e,className:t,closeIcon:o,showCloseButton:n=!0,title:r,textVariant:s="h2",textBold:l=!1,inheritTextColor:a=!1})=>{const{setOpen:u}=ut(),p=d.useCallback(()=>{u(!1)},[u]);return i.jsxs(Od,{className:t,children:[i.jsx(T,{bold:l,color:a?void 0:"dark",variant:s,children:r}),e,n&&i.jsx(ae,{onClick:p,iconId:o||"Close",size:"sm",color:a?void 0:"blue"})]})}),Od=g.div`
|
|
1299
1242
|
width: 100%;
|
|
1300
1243
|
display: flex;
|
|
1301
1244
|
align-items: center;
|
|
@@ -1304,16 +1247,16 @@
|
|
|
1304
1247
|
background-color: ${Rt("header-bg")};
|
|
1305
1248
|
border-bottom: ${Rt("header-border-size")} solid ${Rt("header-border-color")};
|
|
1306
1249
|
padding: 0px ${Rt("header-x-padding")};
|
|
1307
|
-
`,[cr]=M(["horizontal-rule"]),
|
|
1250
|
+
`,[cr]=M(["horizontal-rule"]),Rd=g.div`
|
|
1308
1251
|
width: 100%;
|
|
1309
1252
|
border-bottom: ${cr("border-width")} solid
|
|
1310
1253
|
${cr("border-color")};
|
|
1311
|
-
`,[ne]=M(["input"]),Et=d.forwardRef(({className:e,type:t,prefixIconId:o,prefixIconColor:n,prefixSize:r,isSmall:s,autoCapitalize:l="off",autoComplete:a="off",autoCorrect:u="off",suffixIconColor:p,suffixIcon:h,suffixIconId:f,suffixSize:m,onSuffixIconClick:b,onEnter:x,onKeyDown:y,onClear:k,...v},$)=>{const C=t==="password",[S,w]=d.useState(!1),[I,j]=d.useState(t),D=d.useCallback(()=>{j(S?"password":"text"),w(!S)},[S]),L=U=>{U.key==="Enter"&&(x==null||x()),y==null||y(U)};if(d.useEffect(()=>{j(t)},[t]),k&&C)throw new Error("Password inputs cannot have an onClear handler.");if(h&&C)throw new Error("Password inputs cannot have a suffix icon.");if(k&&h)throw new Error("Inputs with an onClear handler cannot have a suffix icon.");return i.jsx(z.ClassNames,{children:({cx:U})=>i.jsxs(
|
|
1254
|
+
`,[ne]=M(["input"]),Et=d.forwardRef(({className:e,type:t,prefixIconId:o,prefixIconColor:n,prefixSize:r,isSmall:s,autoCapitalize:l="off",autoComplete:a="off",autoCorrect:u="off",suffixIconColor:p,suffixIcon:h,suffixIconId:f,suffixSize:m,onSuffixIconClick:b,onEnter:x,onKeyDown:y,onClear:k,...v},$)=>{const C=t==="password",[S,w]=d.useState(!1),[I,j]=d.useState(t),D=d.useCallback(()=>{j(S?"password":"text"),w(!S)},[S]),L=U=>{U.key==="Enter"&&(x==null||x()),y==null||y(U)};if(d.useEffect(()=>{j(t)},[t]),k&&C)throw new Error("Password inputs cannot have an onClear handler.");if(h&&C)throw new Error("Password inputs cannot have a suffix icon.");if(k&&h)throw new Error("Inputs with an onClear handler cannot have a suffix icon.");return i.jsx(z.ClassNames,{children:({cx:U})=>i.jsxs(Nd,{children:[i.jsx(Fd,{type:I,className:U(e,{isSmall:s,hasLeftIcon:!!o,hasRightIcon:!!C||!!f||!!h}),ref:$,autoCapitalize:C?"off":l,autoComplete:C?"current-password":a,autoCorrect:C?"off":u,onKeyDown:L,...v}),o&&i.jsx(Ad,{iconId:o,color:n||"black",size:r||"sm"}),(C||!!f||!!h||k&&!!v.value)&&i.jsx(Ld,{children:h||(f?i.jsx(O,{iconId:f,color:p??"black",size:m||"sm",onClick:b}):k?i.jsx(ae,{iconId:"Close",size:"sm",color:"black",onClick:k}):i.jsx(ae,{onClick:D,iconId:S?"Eye":"EyeInvisible",size:"sm",color:n??"black"}))})]})})}),Nd=g.div`
|
|
1312
1255
|
width: 100%;
|
|
1313
1256
|
height: fit-content;
|
|
1314
1257
|
position: relative;
|
|
1315
1258
|
display: flex;
|
|
1316
|
-
`,
|
|
1259
|
+
`,Fd=g.input`
|
|
1317
1260
|
border: ${ne("border-width")} solid ${ne("border-color")};
|
|
1318
1261
|
border-radius: ${ne("border-radius")};
|
|
1319
1262
|
height: ${ne("height")};
|
|
@@ -1356,14 +1299,14 @@
|
|
|
1356
1299
|
&.hasRightIcon {
|
|
1357
1300
|
padding-right: ${ne("padding-right-icon")};
|
|
1358
1301
|
}
|
|
1359
|
-
`,
|
|
1302
|
+
`,Ad=g(O)`
|
|
1360
1303
|
position: absolute;
|
|
1361
1304
|
top: 50%;
|
|
1362
1305
|
transform: translateY(-50%);
|
|
1363
1306
|
pointer-events: none;
|
|
1364
1307
|
z-index: 1;
|
|
1365
1308
|
left: ${ne("icon-left")};
|
|
1366
|
-
`,
|
|
1309
|
+
`,Ld=g.div`
|
|
1367
1310
|
position: absolute;
|
|
1368
1311
|
right: 8px;
|
|
1369
1312
|
top: 50%;
|
|
@@ -1371,17 +1314,17 @@
|
|
|
1371
1314
|
z-index: 1;
|
|
1372
1315
|
display: grid;
|
|
1373
1316
|
place-content: center;
|
|
1374
|
-
`;Et.displayName="Input";const ys=d.forwardRef(({onSearch:e,onChange:t,value:o,placeholder:n,prefixIconColor:r,suffixIconColor:s,...l},a)=>i.jsx(Et,{...l,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})),[
|
|
1317
|
+
`;Et.displayName="Input";const ys=d.forwardRef(({onSearch:e,onChange:t,value:o,placeholder:n,prefixIconColor:r,suffixIconColor:s,...l},a)=>i.jsx(Et,{...l,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})),[Bd]=M(["label"]),vs=z.css`
|
|
1375
1318
|
align-items: center;
|
|
1376
1319
|
display: flex;
|
|
1377
|
-
gap: ${
|
|
1378
|
-
`,ks=({variant:e="body",...t})=>i.jsx(T,{css:vs,variant:e,...t}),kn=({children:e,prefix:t,suffix:o,...n})=>i.jsxs(ks,{...n,children:[t,e,o]}),[
|
|
1379
|
-
color: ${
|
|
1380
|
-
`,
|
|
1320
|
+
gap: ${Bd("gap")};
|
|
1321
|
+
`,ks=({variant:e="body",...t})=>i.jsx(T,{css:vs,variant:e,...t}),kn=({children:e,prefix:t,suffix:o,...n})=>i.jsxs(ks,{...n,children:[t,e,o]}),[Wd]=M(["label-with-action"]),Pd=z.css([vs,{gap:Wd("gap")}]),Vd=({action:e,variant:t="h2",...o})=>i.jsx(kn,{css:Pd,suffix:e,variant:t,...o}),[Hd]=M(["label-with-content-link"]),Ud=z.css`
|
|
1322
|
+
color: ${Hd("color")};
|
|
1323
|
+
`,Gd=e=>i.jsx(kn,{css:Ud,...e}),Kd=new RegExp(/^[a-zA-Z0-9 _.-]*$/),ws=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,}))$/),Yd=new RegExp(/^\d+$/),qd=new RegExp(/^\S*$/),Zd=new RegExp(/^[a-zA-Z].*/),Cs=new RegExp(/^[-a-zA-Z0-9-_'().-]+(\s+[-a-zA-Z0-9-_'().-]+)*$/);var $s=(e=>(e.email="email",e))($s||{});const Xd=()=>({email:e=>ws.test(e)}),Jd=12;var Vt=(e=>(e.noDigit="noDigit",e.noUpperCase="noUpperCase",e.noSpecialCharacter="noSpecialCharacter",e.tooSimilar="tooSimilar",e))(Vt||{});const Qd=(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)}),Ss=e=>typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string",eu=e=>{if(Ss(e))return e.message},tu=()=>{let e=!1,t=[];const o=new Map,n=new window.ResizeObserver((r,s)=>{t=t.concat(r),e||window.requestAnimationFrame(()=>{const l=new Set;t.forEach(a=>{if(!l.has(a.target)){l.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 l=o.get(r)??[];l.push(s),o.set(r,l)},unsubscribe(r,s){const l=o.get(r)??[];if(l.length===1){n.unobserve(r),o.delete(r);return}const a=l.indexOf(s);a!==-1&&l.splice(a,1),o.set(r,l)}}};let Ro;const ou=()=>Ro||(Ro=tu()),js=(e,t)=>{const o=ou(),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 l=(a,u)=>{r||n.current(a,u)};return o.subscribe(s,l),()=>{r=!0,o.unsubscribe(s,l)}},[e,o]),o.observer},xo=e=>{const t=d.useRef(null),o=d.useRef(null),n=d.useCallback(()=>{if(!t.current)return;const l=o.current,a=t.current;if(a!==null&&l!==null){const u=a.getAttribute("data-original");a.textContent!==u&&(a.textContent=u);const h=a.textContent,f=a.offsetWidth,m=l.offsetWidth;if(f>m&&h){const b=h.length,x=f/b,k=Math.ceil((f-m)/x)/2+1.5,v=Math.floor(b/2-k),$=Math.ceil(b/2+k),C=h.substr(0,v),S=h.substr($);a.textContent=`${C.trim()}...${S.trim()}`}}},[]),r=d.useCallback(l=>{n()},[n]);js(o,r),d.useEffect(()=>n(),[e.children,n]);const s=d.useCallback(l=>{t.current=l,o.current=(l==null?void 0:l.parentElement)??null},[]);return i.jsx(nu,{"data-original":e.children,ref:s,...e})},nu=g(T)`
|
|
1381
1324
|
white-space: nowrap;
|
|
1382
1325
|
word-break: keep-all;
|
|
1383
1326
|
overflow: visible;
|
|
1384
|
-
`,
|
|
1327
|
+
`,ru=g.div`
|
|
1385
1328
|
display: grid;
|
|
1386
1329
|
width: 100%;
|
|
1387
1330
|
height: 100%;
|
|
@@ -1390,7 +1333,7 @@
|
|
|
1390
1333
|
${({orientation:e})=>e==="horizontal"?"grid-template-columns: auto 2px auto;":"grid-template-rows: auto 2px auto;"}
|
|
1391
1334
|
`,Is=g.div`
|
|
1392
1335
|
overflow: auto;
|
|
1393
|
-
`,
|
|
1336
|
+
`,su=g(Is)``,iu=g(Is)``,au=g.div`
|
|
1394
1337
|
${({orientation:e})=>e==="horizontal"?"width: 1px; cursor: col-resize;":"height: 1px; cursor: row-resize;"}
|
|
1395
1338
|
|
|
1396
1339
|
background-color: ${c("color-grey20")};
|
|
@@ -1404,7 +1347,7 @@
|
|
|
1404
1347
|
${({orientation:e})=>e==="horizontal"?"top: 0; bottom: 0; left: -4px; right: -4px;":"left: 0; right: 0; top: -4px; bottom: -4px;"}
|
|
1405
1348
|
cursor: inherit;
|
|
1406
1349
|
}
|
|
1407
|
-
`;function
|
|
1350
|
+
`;function lu(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 cu=({initialStartSizePct:e=50,startClampSizePx:t=210,minStartSizePct:o=10,minEndSizePct:n=10,startContent:r,endContent:s,orientation:l="horizontal"})=>{const a=d.useRef(null),[u,p]=d.useState(null);d.useEffect(()=>{if(a.current&&u===null){const y=a.current.getBoundingClientRect(),k=l==="horizontal"?y.width:y.height,v=e/100*k,$=Math.max(t,v),C=$/k*100;p($);const S=C,w=100-C;l==="horizontal"?a.current.style.gridTemplateColumns=`${S}% 2px ${w}%`:a.current.style.gridTemplateRows=`${S}% 2px ${w}%`}},[e,t,u,l]);const h=d.useCallback(()=>{if(!a.current||u===null)return;const y=a.current.getBoundingClientRect(),k=l==="horizontal"?y.width:y.height;let v=Math.round(u/k*100),$=100-v;if($<n){$=n,v=100-$;const C=Math.round(v/100*k);p(C)}if(v<o){v=o,$=100-v;const C=Math.round(v/100*k);p(C)}l==="horizontal"?a.current.style.gridTemplateColumns=`${u}px 2px auto`:a.current.style.gridTemplateRows=`${u}px 2px auto`},[u,o,n,l]),f=d.useCallback(lu(h,50),[h]);d.useEffect(()=>(window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)),[f]);const m=y=>{y.preventDefault(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",x)},b=y=>{if(!a.current)return;const k=a.current.getBoundingClientRect(),v=l==="horizontal"?k.width:k.height,$=l==="horizontal"?y.clientX-k.left:y.clientY-k.top,C=Math.max(t,$),S=Math.round(C/v*100),w=100-S;S>=o&&w>=n&&(p($),l==="horizontal"?a.current.style.gridTemplateColumns=`${S}% 2px ${w}%`:a.current.style.gridTemplateRows=`${S}% 2px ${w}%`)},x=()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",x)};return i.jsxs(ru,{ref:a,orientation:l,children:[i.jsx(su,{children:r}),i.jsx(au,{onMouseDown:m,orientation:l}),i.jsx(iu,{children:s})]})},[Te]=M(["radio-button"]),wn=d.forwardRef(({checked:e,onChange:t,...o},n)=>i.jsx(du,{onClick:t,ref:n,readOnly:!0,type:"radio",checked:!!e,...o})),du=g.input`
|
|
1408
1351
|
appearance: none;
|
|
1409
1352
|
-webkit-appearance: none;
|
|
1410
1353
|
margin: 0;
|
|
@@ -1438,7 +1381,7 @@
|
|
|
1438
1381
|
}
|
|
1439
1382
|
background-color: ${Te("background-color-disabled")};
|
|
1440
1383
|
}
|
|
1441
|
-
`;function nt(e,t){if(!e)throw console.error(t),Error(t)}function
|
|
1384
|
+
`;function nt(e,t){if(!e)throw console.error(t),Error(t)}function uu(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 pu=e=>e.type.startsWith("mouse"),hu=e=>e.type.startsWith("pointer"),yo=e=>{if(hu(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(pu(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}},Ds=(e,t)=>{const o=e==="horizontal",{x:n,y:r}=yo(t);return o?n:r},_s=(e,t=document)=>{const o=t.querySelector(`[data-resizable-panel-group-handle-id="${e}"]`);return o||null},fu=(e,t,o,n,r)=>{const s=_s(t,r);nt(s,`No resize handle element found for id "${t}"`);const l=s.getAttribute("data-resizable-panel-group-id");nt(l,"Resize handle element has no group id attribute");const{initialCursorPosition:a}=n,u=Ds(o,e),p=uu(l,r);return nt(p,`No group element found for id "${l}"`),u-a},gu=(e,t,o,n,r)=>n==null?0:fu(e,t,o,n,r),dr=e=>{if(!e||e.dataset.resizablePanelGroupPanel===void 0)return!1;const t=window.getComputedStyle(e);return t.flex!=="1"&&t.flexGrow!=="1"},ur=(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(dr(s))return{element:s,panelPosition:"left"};const l=n[r+1];if(dr(l))return{element:l,panelPosition:"right"}}return null},No=(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),Ht=(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},mu=(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}`)},Fo=(e,t,o,n)=>{const r=t==="horizontal"?e.getBoundingClientRect().width:e.getBoundingClientRect().height,s=e.parentElement,l=t==="horizontal"?s==null?void 0:s.getBoundingClientRect().width:s==null?void 0:s.getBoundingClientRect().height,a=Ht(e,"resizablePanelMinSize",l),u=Ht(e,"resizablePanelMaxSize",l),p=Ht(e,"resizablePanelCollapsedSize",l);let h=o??r;const f=a?a*.33:50;a&&r===a?n&&h<a&&p&&a-h>f?h=p:h<a&&(h=a):u&&r===u?h>u&&(h=u):p&&r===p&&(!n&&h>p&&a&&h-p>f?h=a:h=p);const m=h===p;h===r||!l||mu(e,t,h,m,m?p:a,u)},Ts=d.createContext(null),Es=({children:e,direction:t,onResizeEnd:o})=>{const n=d.useId(),r=d.useRef(null),[s,l]=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((b,x)=>{const{direction:y}=a.current;if(!r.current)return;const k=_s(b,r.current);nt(k,`Drag handle element not found for id "${b}"`);const v=Ds(y,x);l({dragHandleId:b,dragHandleRect:k.getBoundingClientRect(),initialCursorPosition:v});const $=ur(b,a.current.id,r.current);if($){const{element:C,panelPosition:S}=$,w=C.getBoundingClientRect();a.current.initialResizePanelSize=y==="vertical"?w.height:w.width,a.current.lastResizedPanelId=C.dataset.resizablePanelId??null,a.current.panelPosition=S}},[]),p=d.useCallback(()=>{const{direction:b,lastResizedPanelId:x}=a.current;if(o&&x&&r.current){const k=No(a.current.id,r.current).find(v=>v.dataset.resizablePanelId===x);if(k){const v=k.getBoundingClientRect(),$=b==="vertical"?v.height:v.width;o(x,$)}}l(null),a.current.initialResizePanelSize=null,a.current.lastResizedPanelId=null,a.current.panelPosition="left"},[o]),h=d.useCallback(b=>{const{direction:x}=a.current,k=No(a.current.id,r.current??void 0).find(v=>v.dataset.resizablePanelId===b);if(k){const v=k.parentElement,$=x==="horizontal"?v==null?void 0:v.getBoundingClientRect().width:v==null?void 0:v.getBoundingClientRect().height,C=k.dataset.collapsed==="true",S=Ht(k,"resizablePanelMinSize",$),w=Ht(k,"resizablePanelCollapsedSize",$);Fo(k,x,C?S:w,!C)}},[]);d.useEffect(()=>{const b=()=>{No(a.current.id,r.current??void 0).forEach(y=>{Fo(y,a.current.direction)})};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}},[]);const f=d.useCallback(b=>x=>{x.preventDefault();const y=r.current;if(!y)return()=>null;const{direction:k,dragState:v,panelPosition:$}=a.current;let C=gu(x,b,k,v,y);if($==="right"&&(C=-C),C!==0&&r.current){const S=ur(b,a.current.id,r.current);if(S&&a.current.initialResizePanelSize!==null){const{element:w}=S,I=a.current.initialResizePanelSize;let j=I+C;j=j<0?0:j,Fo(w,k,j,I>j)}}},[]),m=d.useMemo(()=>({id:n,startDragging:u,stopDragging:p,direction:t,registerResizeHandle:f,togglePanelCollapse:h}),[n,u,p,t,f,h]);return i.jsx(Ts.Provider,{value:m,children:e(r,n)})},Cn=()=>{const e=d.useContext(Ts);if(!e)throw new Error("Unable to use ResizablePanelGroupContext outside of a ResizablePanelGroupContextProvider");return e},zs=({children:e,direction:t,className:o,onResizeEnd:n})=>i.jsx(Es,{direction:t,onResizeEnd:n,children:(r,s)=>i.jsx(bu,{"data-resizable-panel-group":"","data-resizable-panel-group-id":s,className:xt(o,{isVertical:t==="vertical"}),ref:r,children:e})}),bu=g.div`
|
|
1442
1385
|
width: 100%;
|
|
1443
1386
|
height: 100%;
|
|
1444
1387
|
overflow: auto;
|
|
@@ -1448,12 +1391,12 @@
|
|
|
1448
1391
|
&.isVertical {
|
|
1449
1392
|
flex-direction: column;
|
|
1450
1393
|
}
|
|
1451
|
-
`,$n=({children:e,maxSize:t,minSize:o,defaultSize:n,collapsedSize:r,className:s,panelId:l})=>{const{id:a,direction:u}=Cn(),p=typeof t=="string"?t:t?`${t}px`:void 0,h=typeof o=="string"?o:o?`${o}px`:void 0,f=typeof n=="string"?n:n?`${n}px`:void 0;return i.jsx(
|
|
1394
|
+
`,$n=({children:e,maxSize:t,minSize:o,defaultSize:n,collapsedSize:r,className:s,panelId:l})=>{const{id:a,direction:u}=Cn(),p=typeof t=="string"?t:t?`${t}px`:void 0,h=typeof o=="string"?o:o?`${o}px`:void 0,f=typeof n=="string"?n:n?`${n}px`:void 0;return i.jsx(xu,{className:s,style:u==="horizontal"?{maxWidth:p,minWidth:h,width:f??"auto",height:"100%"}:{maxHeight:p,minHeight:h,height:f??"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":l,"data-resizable-panel-group-id":a,"data-collapsed":!1,children:e})},xu=g.div`
|
|
1452
1395
|
flex-shrink: 0;
|
|
1453
1396
|
overflow: clip;
|
|
1454
1397
|
`,Ms=g($n)`
|
|
1455
1398
|
flex: 1;
|
|
1456
|
-
`;let on=null,ft=null;function
|
|
1399
|
+
`;let on=null,ft=null;function yu(e){switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize";default:return"auto"}}function vu(){ft!==null&&(document.head.removeChild(ft),on=null,ft=null)}function Ao(e){const t=yu(e);on!==t&&(on=t,ft===null&&(ft=document.createElement("style"),document.head.appendChild(ft)),ft.innerHTML=`*{cursor: ${t}!important;}`)}const ku=(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 wu(e,t){if(e===t)throw new Error("Cannot compare node with itself");const o={a:fr(e),b:fr(t)};let n;for(;o.a.at(-1)===o.b.at(-1);)e=o.a.pop(),t=o.b.pop(),n=e;nt(n,"Stacking order can only be calculated for elements with a common ancestor");const r={a:hr(pr(o.a)),b:hr(pr(o.b))};if(r.a===r.b){const s=n.childNodes,l={a:o.a.at(-1),b:o.b.at(-1)};let a=s.length;for(;a--;){const u=s[a];if(u===l.a)return 1;if(u===l.b)return-1}}return Math.sign(r.a-r.b)}const Cu=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function $u(e){const t=getComputedStyle(Os(e)??e).display;return t==="flex"||t==="inline-flex"}function Su(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||$u(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"||Cu.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function pr(e){let t=e.length;for(;t--;){const o=e[t];if(nt(o,"Missing node"),Su(o))return o}return null}function hr(e){return e&&Number(getComputedStyle(e).zIndex)||0}function fr(e){const t=[];for(;e;)t.push(e),e=Os(e);return t}function Os(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let St=!1;const ju=()=>{if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"},Ae=[],Kt=new Set,Iu=ju()==="coarse",ct=new Map,Du=(e,t,o,n)=>{const{ownerDocument:r}=e,s={direction:t,element:e,hitAreaMargins:o,setResizeHandlerState:n},l=ct.get(r)??0;return ct.set(r,l+1),Kt.add(s),po(),function(){Kt.delete(s);const u=ct.get(r)??1;if(ct.set(r,u-1),po(),u===1&&ct.delete(r),Ae.includes(s)){const p=Ae.indexOf(s);p>=0&&Ae.splice(p,1),jn(),n("up",!0,null)}}},Sn=({target:e,x:t,y:o})=>{Ae.splice(0);let n=null;e instanceof HTMLElement&&(n=e),Kt.forEach(r=>{const{element:s,hitAreaMargins:l}=r,a=s.getBoundingClientRect(),{bottom:u,left:p,right:h,top:f}=a,m=Iu?l.coarse:l.fine;if(t>=p-m&&t<=h+m&&o>=f-m&&o<=u+m){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&wu(n,s)>0){let x=n,y=!1;for(;x&&!x.contains(s);){if(ku(x.getBoundingClientRect(),a)){y=!0;break}x=x.parentElement}if(y)return}Ae.push(r)}})},gr=e=>{const{target:t}=e,{x:o,y:n}=yo(e);St=!0,Sn({target:t,x:o,y:n}),po(),Ae.length>0&&(ho("down",e),e.preventDefault(),e.stopPropagation())},Nt=e=>{const{x:t,y:o}=yo(e);if(St&&e.buttons===0&&(St=!1,ho("up",e)),!St){const{target:n}=e;Sn({target:n,x:t,y:o})}ho("move",e),jn(),Ae.length>0&&e.preventDefault()},kt=e=>{const{target:t}=e,{x:o,y:n}=yo(e);St=!1,Ae.length>0&&e.preventDefault(),ho("up",e),Sn({target:t,x:o,y:n}),jn(),po()},po=()=>{ct.forEach((e,t)=>{const{body:o}=t;o.removeEventListener("contextmenu",kt),o.removeEventListener("pointerdown",gr),o.removeEventListener("pointerleave",Nt),o.removeEventListener("pointermove",Nt)}),window.removeEventListener("pointerup",kt),window.removeEventListener("pointercancel",kt),Kt.size>0&&(St?(Ae.length>0&&ct.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("contextmenu",kt),o.addEventListener("pointerleave",Nt),o.addEventListener("pointermove",Nt))}),window.addEventListener("pointerup",kt),window.addEventListener("pointercancel",kt)):ct.forEach((e,t)=>{const{body:o}=t;e>0&&(o.addEventListener("pointerdown",gr,{capture:!0}),o.addEventListener("pointermove",Nt))}))},ho=(e,t)=>{Kt.forEach(o=>{const{setResizeHandlerState:n}=o,r=Ae.includes(o);n(e,r,t)})},jn=()=>{let e=!1,t=!1;Ae.forEach(o=>{const{direction:n}=o;n==="horizontal"?e=!0:t=!0}),e&&t?Ao("intersection"):e?Ao("horizontal"):t?Ao("vertical"):vu()},[Lo]=M(["resizable-panels"]),Rs=d.memo(({className:e,disabled:t})=>{const{id:o,startDragging:n,stopDragging:r,direction:s,registerResizeHandle:l}=Cn(),a=d.useId(),[u,p]=d.useState("inactive"),[h,f]=d.useState(null),m=d.useRef(null),b=d.useRef({state:u});return d.useLayoutEffect(()=>{b.current.state=u}),d.useEffect(()=>{if(t)f(null);else{const x=l(a);f(()=>x)}},[t,a,l]),d.useEffect(()=>{if(t||h==null)return;const x=m.current;return nt(x,"Element ref not attached"),Du(x,s,{coarse:15,fine:5},(k,v,$)=>{if(v)switch(k){case"down":{p("drag"),nt($,'Expected event to be defined for "down" action'),n(a,$);break}case"move":{const{state:C}=b.current;C!=="drag"&&p("hover"),nt($,'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(_u,{"data-resizable-panel-group-element":"","data-resizable-panel-group-id":o,"data-resizable-panel-group-handle-id":a,className:xt(e,{isVertical:s==="vertical",isHovered:u==="hover",isDragging:u==="drag"}),ref:m})}),_u=g.div`
|
|
1457
1400
|
height: 100%;
|
|
1458
1401
|
width: 1px;
|
|
1459
1402
|
flex-shrink: 0;
|
|
@@ -1469,18 +1412,18 @@
|
|
|
1469
1412
|
width: 100%;
|
|
1470
1413
|
height: 1px;
|
|
1471
1414
|
}
|
|
1472
|
-
`,Ns=({children:e,open:t,disableScrollLock:o,className:n,status:r})=>t?i.jsx(R.FloatingPortal,{children:i.jsx(
|
|
1415
|
+
`,Ns=({children:e,open:t,disableScrollLock:o,className:n,status:r})=>t?i.jsx(R.FloatingPortal,{children:i.jsx(Tu,{className:n,lockScroll:!o,"data-status":r,children:e})}):null,Tu=g(R.FloatingOverlay)`
|
|
1473
1416
|
background: rgba(0, 0, 0, 0.8);
|
|
1474
1417
|
display: grid;
|
|
1475
1418
|
place-items: center;
|
|
1476
1419
|
z-index: 1;
|
|
1477
|
-
`,
|
|
1420
|
+
`,Eu=[R.flip()],Fs=[R.flip(),R.size({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}})],[nn]=M(["select"]),In=d.createContext(null),Dn=()=>{const e=d.useContext(In);if(e===null)throw new Error("Select context used outside of the SelectContextProvider");return e},zu=()=>Promise.resolve(),zt=({children:e,onSelect:t,Reference:o,disabled:n,selectedIndex:r,onSelectedIndexChange:s,className:l,matchReferenceWidth:a,isFocusTrapDisabled:u,menuPlacement:p,onOpenChange:h,onBeforeOpen:f=zu,showOpenState:m=!1})=>{const[b,x]=d.useState(!1),[y,k]=d.useState(null),[v,$]=d.useState(null),C=r??v,S=s??$,w=d.useCallback(Q=>{Q?f().then(()=>{x(Q),h&&h(Q)}):(x(Q),h&&h(Q))},[f,h]),{refs:I,floatingStyles:j,context:D}=R.useFloating({placement:p||"bottom-end",open:b,onOpenChange:w,whileElementsMounted:R.autoUpdate,middleware:a?Fs:Eu}),L=d.useRef([]),U=d.useRef([]),P=d.useCallback(Q=>{var K;S(Q),Q!==null&&t(((K=L.current[Q])==null?void 0:K.dataset.key)||""),x(!1),h&&h(!1)},[h,t,S]),B=R.useListNavigation(D,{listRef:L,activeIndex:y,selectedIndex:C,focusItemOnHover:!u,focusItemOnOpen:!u,onNavigate:k}),Z=R.useClick(D,{enabled:!n}),ie=R.useDismiss(D),J=R.useRole(D,{role:"listbox"}),{getReferenceProps:X,getFloatingProps:Ie,getItemProps:le}=R.useInteractions([B,Z,ie,J]),pe=d.useMemo(()=>({activeIndex:y,selectedIndex:C,open:b,getItemProps:le,handleSelect:P,setIsOpen:x}),[y,b,C,le,P]);return i.jsxs(In.Provider,{value:pe,children:[i.jsx(Mu,{ref:I.setReference,tabIndex:0,...X({onClick(Q){Q.stopPropagation()}}),children:m?i.jsxs(Ru,{children:[o??i.jsx(ae,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"}),i.jsx(O,{size:"xsm",iconId:b?"CaretUp":"CaretDown"})]}):o??i.jsx(ae,{className:"select-reference",size:"sm",iconId:"Ellipsis",color:"blue"})}),b&&i.jsx(R.FloatingPortal,{children:i.jsx(R.FloatingFocusManager,{disabled:u,context:D,modal:!1,children:i.jsx(Ou,{ref:I.setFloating,style:j,className:l,...Ie(),children:i.jsx(R.FloatingList,{elementsRef:L,labelsRef:U,children:e})})})})]})},Mu=g.div`
|
|
1478
1421
|
align-items: center;
|
|
1479
1422
|
display: flex;
|
|
1480
1423
|
font-size: ${nn("font-size")};
|
|
1481
1424
|
cursor: default;
|
|
1482
1425
|
user-select: none;
|
|
1483
|
-
`,
|
|
1426
|
+
`,Ou=g.div`
|
|
1484
1427
|
display: flex;
|
|
1485
1428
|
flex-direction: column;
|
|
1486
1429
|
border: ${nn("border-size")} solid ${nn("border-color")};
|
|
@@ -1489,19 +1432,19 @@
|
|
|
1489
1432
|
outline: 0;
|
|
1490
1433
|
z-index: 2;
|
|
1491
1434
|
overflow: auto;
|
|
1492
|
-
`,
|
|
1435
|
+
`,Ru=g.div`
|
|
1493
1436
|
display: flex;
|
|
1494
1437
|
align-items: center;
|
|
1495
1438
|
justify-content: flex-start;
|
|
1496
1439
|
gap: 2px;
|
|
1497
|
-
`,[
|
|
1498
|
-
color: ${
|
|
1440
|
+
`,[Pe,mr]=M(["option","text"]),dt=d.memo(({label:e,optionKey:t,disabled:o,className:n,prefixIconId:r,prefixIconColor:s,suffixIconId:l,textColor:a,suffixIconColor:u,disableSelectionStyle:p,disableEnterSelection:h})=>{const{activeIndex:f,selectedIndex:m,getItemProps:b,handleSelect:x}=Dn(),{ref:y,index:k}=R.useListItem({label:t}),v=f!==null&&f!==-1&&f===k,$=!p&&m!==null&&m!==-1&&m===k,C=d.useCallback(S=>{o||(S.stopPropagation(),x(k))},[o,x,k]);return i.jsx(z.ClassNames,{children:({cx:S})=>i.jsxs(Nu,{className:S({isActive:v,isSelected:$,disabled:o},n),ref:y,"data-key":t,role:"option","data-color":a,"aria-selected":v&&$,tabIndex:v?0:-1,...b({onClick:w=>C(w),onKeyDown:!h&&!o?w=>{w.code==="Enter"&&x(k)}:void 0}),children:[!!r&&i.jsx(O,{iconId:r,size:"sm",color:o?"grey":s??"black"}),e,!!l&&i.jsx(Fu,{iconId:l,size:"sm",color:o?"grey":u??"black"})]})})}),Nu=g.div`
|
|
1441
|
+
color: ${Pe("color")};
|
|
1499
1442
|
cursor: pointer;
|
|
1500
1443
|
font-size: inherit;
|
|
1501
|
-
background-color: ${
|
|
1502
|
-
font-family: ${
|
|
1503
|
-
font-size: ${
|
|
1504
|
-
padding: ${
|
|
1444
|
+
background-color: ${Pe("bg-color")};
|
|
1445
|
+
font-family: ${Pe("font-family")};
|
|
1446
|
+
font-size: ${Pe("font-size")};
|
|
1447
|
+
padding: ${Pe("padding")};
|
|
1505
1448
|
min-width: 96px;
|
|
1506
1449
|
line-height: 18px;
|
|
1507
1450
|
display: flex;
|
|
@@ -1511,34 +1454,34 @@
|
|
|
1511
1454
|
overflow: hidden;
|
|
1512
1455
|
outline: 0;
|
|
1513
1456
|
flex-shrink: 0;
|
|
1514
|
-
column-gap: ${
|
|
1457
|
+
column-gap: ${Pe("column-gap")};
|
|
1515
1458
|
${Xr.map(e=>`&[data-color="${e}"] {
|
|
1516
1459
|
color: ${mr(`color-${e}`)};
|
|
1517
1460
|
}`).join(`
|
|
1518
1461
|
`)}
|
|
1519
|
-
${`${mr("body-size",!0)}: ${
|
|
1462
|
+
${`${mr("body-size",!0)}: ${Pe("font-size")}`};
|
|
1520
1463
|
&.isActive {
|
|
1521
|
-
background: ${
|
|
1464
|
+
background: ${Pe("bg-color-active")};
|
|
1522
1465
|
}
|
|
1523
1466
|
&.isSelected {
|
|
1524
|
-
font-weight: ${
|
|
1467
|
+
font-weight: ${Pe("font-weight-selected")};
|
|
1525
1468
|
}
|
|
1526
1469
|
&.disabled {
|
|
1527
|
-
color: ${
|
|
1470
|
+
color: ${Pe("color-disabled")};
|
|
1528
1471
|
cursor: not-allowed;
|
|
1529
1472
|
}
|
|
1530
|
-
`,
|
|
1473
|
+
`,Fu=g(O)`
|
|
1531
1474
|
transform: translate(-2px, -1px);
|
|
1532
|
-
`,
|
|
1475
|
+
`,Au=({actionItems:e,disabled:t,onSelect:o})=>{const n=d.useMemo(()=>e.map(r=>i.jsx(dt,{disabled:t||r.disabled,label:i.jsx(Lu,{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(zt,{disabled:t,onSelect:o,children:n})},io=e=>{switch(e){case"normal":return;case"info":return"blue";case"error":return"red";case"warn":return"yellow";default:return}},Lu=d.memo(({label:e,iconId:t,level:o,disabled:n,iconSize:r})=>i.jsxs(Bu,{children:[i.jsx(O,{iconId:t,size:r||"sm",color:n?"grey":io(o)?io(o):"black"}),i.jsx(T,{variant:"body",color:n?"grey":io(o)?io(o):"dark",children:e})]})),Bu=g.div`
|
|
1533
1476
|
display: flex;
|
|
1534
1477
|
gap: 8px;
|
|
1535
1478
|
align-items: center;
|
|
1536
|
-
`,[
|
|
1537
|
-
padding: ${
|
|
1479
|
+
`,[Wu]=M(["shell-icon-button"]),Pu=g(ae)`
|
|
1480
|
+
padding: ${Wu("padding")};
|
|
1538
1481
|
|
|
1539
1482
|
--studio-c-icon-button-badge-top: 6px;
|
|
1540
1483
|
--studio-c-icon-button-badge-right: 6px;
|
|
1541
|
-
`,
|
|
1484
|
+
`,Vu=e=>i.jsx(Pu,{badgeBorderColor:"black",...e}),As=d.createContext(null),vo=()=>{const e=d.useContext(As);if(e===null)throw new Error("Unable to use TabContext outside of a TabProvider");return e},Hu=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(As.Provider,{value:p,children:e})}),[re]=M(["tab"]),Uu=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}=vo(),b=e===h,x=a!=null&&(u===void 0?!0:u),y=d.useCallback(()=>{b||f(e)},[f,e,b]),k=d.useCallback(v=>{v.stopPropagation(),a==null||a(e)},[a,e]);return i.jsxs(Gu,{"data-value":e,"data-variant":m,"data-active":b,onClick:y,disabled:o,title:s,role:"tab","aria-selected":b,"aria-label":s??t,children:[!!r&&i.jsx(O,{iconId:r,color:n??"black",size:"sm"}),i.jsx(Ku,{"data-label":p?t:void 0,style:p?{maxWidth:typeof p=="number"?`${p}px`:p}:void 0,children:i.jsx(T,{color:o||m==="standard"&&!b?"grey":"dark",variant:"body",bold:b,children:t})}),l!==void 0&&i.jsx(Yu,{children:l}),x&&i.jsx(qu,{onClick:k,"aria-label":`Close ${t}`,title:`Close ${t}`,children:i.jsx(O,{iconId:"Close",size:"xsm"})})]})}),Gu=g.button`
|
|
1542
1485
|
cursor: pointer;
|
|
1543
1486
|
outline: none;
|
|
1544
1487
|
border: none;
|
|
@@ -1580,7 +1523,7 @@
|
|
|
1580
1523
|
outline: 2px solid var(--studio-s-color-primary, #0066cc);
|
|
1581
1524
|
outline-offset: -2px;
|
|
1582
1525
|
}
|
|
1583
|
-
`,
|
|
1526
|
+
`,Ku=g.span`
|
|
1584
1527
|
overflow: hidden;
|
|
1585
1528
|
text-overflow: ellipsis;
|
|
1586
1529
|
|
|
@@ -1593,7 +1536,7 @@
|
|
|
1593
1536
|
overflow: hidden;
|
|
1594
1537
|
visibility: hidden;
|
|
1595
1538
|
}
|
|
1596
|
-
`,
|
|
1539
|
+
`,Yu=g.span`
|
|
1597
1540
|
display: flex;
|
|
1598
1541
|
align-items: center;
|
|
1599
1542
|
justify-content: center;
|
|
@@ -1605,7 +1548,7 @@
|
|
|
1605
1548
|
color: ${re("badge-color")};
|
|
1606
1549
|
font-size: ${re("badge-font-size")};
|
|
1607
1550
|
font-weight: 600;
|
|
1608
|
-
`,
|
|
1551
|
+
`,qu=g.button`
|
|
1609
1552
|
display: flex;
|
|
1610
1553
|
align-items: center;
|
|
1611
1554
|
justify-content: center;
|
|
@@ -1630,7 +1573,7 @@
|
|
|
1630
1573
|
outline-offset: -2px;
|
|
1631
1574
|
opacity: 1;
|
|
1632
1575
|
}
|
|
1633
|
-
`,[
|
|
1576
|
+
`,[jt]=M(["tab"]),Zu=({children:e,className:t})=>{const{activeTab:o,variant:n}=vo(),r=d.useRef(null),s=d.useRef(null),l=n==="underline";return d.useEffect(()=>{if(l&&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,l]),i.jsxs(Xu,{ref:s,className:t,"data-variant":n,role:"tablist",children:[l&&i.jsx(Ju,{ref:r}),e]})},Xu=g.div`
|
|
1634
1577
|
width: 100%;
|
|
1635
1578
|
height: fit-content;
|
|
1636
1579
|
display: flex;
|
|
@@ -1650,9 +1593,9 @@
|
|
|
1650
1593
|
&[data-variant="underline"] {
|
|
1651
1594
|
justify-content: flex-start;
|
|
1652
1595
|
align-items: flex-start;
|
|
1653
|
-
column-gap: ${
|
|
1654
|
-
border-bottom: ${
|
|
1655
|
-
${
|
|
1596
|
+
column-gap: ${jt("column-gap")};
|
|
1597
|
+
border-bottom: ${jt("trigger-list-underline-height")} solid
|
|
1598
|
+
${jt("trigger-list-underline-color")};
|
|
1656
1599
|
}
|
|
1657
1600
|
|
|
1658
1601
|
/* Standard variant: start-aligned, separators handled by triggers */
|
|
@@ -1660,24 +1603,24 @@
|
|
|
1660
1603
|
justify-content: flex-start;
|
|
1661
1604
|
align-items: stretch;
|
|
1662
1605
|
}
|
|
1663
|
-
`,
|
|
1606
|
+
`,Ju=g.div`
|
|
1664
1607
|
position: absolute;
|
|
1665
1608
|
bottom: 0px;
|
|
1666
|
-
transform: translateY(${
|
|
1667
|
-
height: ${
|
|
1668
|
-
background-color: ${
|
|
1609
|
+
transform: translateY(${jt("trigger-list-underline-height")});
|
|
1610
|
+
height: ${jt("indicator-height")};
|
|
1611
|
+
background-color: ${jt("indicator-color")};
|
|
1669
1612
|
transition: all 0.25s ease-in-out;
|
|
1670
|
-
`,
|
|
1613
|
+
`,Qu=({children:e,className:t,style:o,value:n})=>{const{activeTab:r}=vo(),s=n===r;return i.jsx(ep,{className:t,"data-active":s?"true":"false",style:o,children:e})},ep=g.div`
|
|
1671
1614
|
display: none;
|
|
1672
1615
|
&[data-active="true"] {
|
|
1673
1616
|
display: block;
|
|
1674
1617
|
}
|
|
1675
|
-
`,[ke]=M(["tag"]),
|
|
1618
|
+
`,[ke]=M(["tag"]),tp={purple:ke("color-light"),orange:ke("color-light"),light:ke("color-dark"),blue:ke("color-dark"),green:ke("color-light"),red:ke("color-light"),disabled:ke("color-disabled")},op={purple:"light",orange:"light",light:"dark",blue:"dark",green:"light",red:"light",disabled:"disabled"},np=g.div`
|
|
1676
1619
|
background-color: ${e=>ke(`bg-color-${e.color}`)};
|
|
1677
1620
|
border-radius: ${ke("border-radius")};
|
|
1678
1621
|
border: 1px solid ${ke("border-color")};
|
|
1679
1622
|
display: flex;
|
|
1680
|
-
color: ${e=>
|
|
1623
|
+
color: ${e=>tp[e.color]};
|
|
1681
1624
|
height: ${ke("height")};
|
|
1682
1625
|
max-width: 160px;
|
|
1683
1626
|
align-items: center;
|
|
@@ -1685,11 +1628,11 @@
|
|
|
1685
1628
|
align-items: center;
|
|
1686
1629
|
justify-content: center;
|
|
1687
1630
|
gap: 4px;
|
|
1688
|
-
`,fo=e=>{const t=typeof e.children=="string"?i.jsx(T,{color:
|
|
1631
|
+
`,fo=e=>{const t=typeof e.children=="string"?i.jsx(T,{color:op[e.color],variant:"body",children:e.children}):e.children;return i.jsx(np,{...e,children:t})},rp=({tagName:e,onRemove:t,color:o="light"})=>i.jsxs(fo,{color:o,children:[i.jsx(T,{variant:"body",children:e}),i.jsx(O,{size:"xxsm",iconId:"Close",onClick:()=>t(e)})]},`key-tag-${e}`),sp=({search:e,style:t,children:o,highlightColor:n,highlightTextColor:r})=>{const s=n||"yellow",l=d.useMemo(()=>Array.isArray(e)?e:[e].filter(Boolean),[e]);if(!l||l.length===0)return i.jsx(i.Fragment,{children:o});const a=p=>{const h=new RegExp(`(${l.join("|")})`,"gi");return p.split(h).map((m,b)=>l.some(x=>x.toLowerCase()===m.toLowerCase())?i.jsx("span",{style:t||{backgroundColor:s,color:r??void 0},children:m},b):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)})},[ye]=M(["badge"]),ip=({color:e,children:t,position:o,radius:n,hide:r})=>i.jsxs(ap,{children:[!r&&i.jsx(lp,{"data-color":e,"data-position":o??"top-right","data-radius":n??4}),t]}),ap=g.div`
|
|
1689
1632
|
width: fit-content;
|
|
1690
1633
|
height: fit-content;
|
|
1691
1634
|
position: relative;
|
|
1692
|
-
`,
|
|
1635
|
+
`,lp=g.div`
|
|
1693
1636
|
position: absolute;
|
|
1694
1637
|
z-index: 2;
|
|
1695
1638
|
border-radius: 50%;
|
|
@@ -1765,7 +1708,7 @@
|
|
|
1765
1708
|
height: ${c("spacing-16")};
|
|
1766
1709
|
--xform-factor: ${c("spacing-8")};
|
|
1767
1710
|
}
|
|
1768
|
-
`,[fe]=M(["textarea"]),_n=d.forwardRef(({autoCapitalize:e="off",autoComplete:t="off",autoCorrect:o="off",className:n,...r},s)=>i.jsx(
|
|
1711
|
+
`,[fe]=M(["textarea"]),_n=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=g.textarea`
|
|
1769
1712
|
display: flex;
|
|
1770
1713
|
min-height: ${fe("min-height")};
|
|
1771
1714
|
padding: ${fe("padding")};
|
|
@@ -1791,16 +1734,16 @@
|
|
|
1791
1734
|
color: ${fe("color-disabled")};
|
|
1792
1735
|
background-color: ${fe("background-color-disabled")};
|
|
1793
1736
|
}
|
|
1794
|
-
`;_n.displayName="Textarea";const[
|
|
1737
|
+
`;_n.displayName="Textarea";const[dp,Ee,ve]=M(["toggle-container","toggle-track","toggle-thumb"]),br=g(O)`
|
|
1795
1738
|
opacity: 0;
|
|
1796
1739
|
position: absolute;
|
|
1797
1740
|
transition-duration: 150ms;
|
|
1798
1741
|
transition-property: opacity;
|
|
1799
1742
|
transition-timing-function: ease-in-out;
|
|
1800
|
-
`,
|
|
1743
|
+
`,up=g.div`
|
|
1801
1744
|
align-items: center;
|
|
1802
1745
|
display: flex;
|
|
1803
|
-
gap: ${
|
|
1746
|
+
gap: ${dp("gap")};
|
|
1804
1747
|
justify-content: center;
|
|
1805
1748
|
position: relative;
|
|
1806
1749
|
`,Ls=g.div`
|
|
@@ -1871,12 +1814,12 @@
|
|
|
1871
1814
|
transform: translate(calc(100% + 4px), 0px);
|
|
1872
1815
|
}
|
|
1873
1816
|
}
|
|
1874
|
-
`,ko=({checked:e,disabled:t,label:o,labelVariant:n="small",onChange:r,showIcons:s,readOnly:l,id:a,...u})=>{const[p,h]=d.useState(e??!1);d.useEffect(()=>{h(e??!1)},[e]);const f=d.useCallback(()=>{t||l||(h(!p),r==null||r(!p))},[p,t,l,r]);return i.jsx(z.ClassNames,{children:({cx:m})=>i.jsxs(
|
|
1817
|
+
`,ko=({checked:e,disabled:t,label:o,labelVariant:n="small",onChange:r,showIcons:s,readOnly:l,id:a,...u})=>{const[p,h]=d.useState(e??!1);d.useEffect(()=>{h(e??!1)},[e]);const f=d.useCallback(()=>{t||l||(h(!p),r==null||r(!p))},[p,t,l,r]);return i.jsx(z.ClassNames,{children:({cx:m})=>i.jsxs(up,{children:[o&&i.jsx(T,{color:t?"disabled":"grey",variant:n,children:o}),i.jsxs(Ls,{id:a,className:m({isReadOnly:l},p&&"isChecked",t&&"isDisabled",s&&"showIcons"),...u,onClick:f,children:[s&&i.jsxs(i.Fragment,{children:[i.jsx(br,{color:"white",iconId:"Close",size:"xxsm",style:{opacity:p?0:1,right:"3px"}}),i.jsx(br,{color:"white",iconId:"Check",size:"xxsm",style:{opacity:p?1:0}})]}),i.jsx(Bs,{className:m(p&&"isChecked",s&&"showIcons",{isReadOnly:l}),...u})]})]})})},pp=g.div`
|
|
1875
1818
|
display: inline-block;
|
|
1876
1819
|
line-height: 0;
|
|
1877
|
-
`,
|
|
1820
|
+
`,hp=g.div`
|
|
1878
1821
|
z-index: 2;
|
|
1879
|
-
`,Ws=({arrow:e,children:t,content:o,open:n,openDelay:r=250,className:s,placement:l,offset:a,disabled:u})=>{const p=d.useRef(null),[h,f]=d.useState(n);d.useEffect(()=>{n!==void 0&&f(n)},[n]);const{refs:m,floatingStyles:b,context:x}=R.useFloating({open:h,onOpenChange:n===void 0?f:void 0,placement:l??"top",whileElementsMounted:R.autoUpdate,middleware:[R.offset(a??12),R.flip({fallbackAxisSideDirection:"start"}),R.shift(),R.arrow({element:p})]}),y=R.useHover(x,{move:!1,restMs:r}),k=R.useFocus(x),v=R.useDismiss(x),$=R.useRole(x,{role:"tooltip"}),{getReferenceProps:C,getFloatingProps:S}=R.useInteractions(u?[]:[y,k,v,$]);return i.jsxs(i.Fragment,{children:[i.jsx(
|
|
1822
|
+
`,Ws=({arrow:e,children:t,content:o,open:n,openDelay:r=250,className:s,placement:l,offset:a,disabled:u})=>{const p=d.useRef(null),[h,f]=d.useState(n);d.useEffect(()=>{n!==void 0&&f(n)},[n]);const{refs:m,floatingStyles:b,context:x}=R.useFloating({open:h,onOpenChange:n===void 0?f:void 0,placement:l??"top",whileElementsMounted:R.autoUpdate,middleware:[R.offset(a??12),R.flip({fallbackAxisSideDirection:"start"}),R.shift(),R.arrow({element:p})]}),y=R.useHover(x,{move:!1,restMs:r}),k=R.useFocus(x),v=R.useDismiss(x),$=R.useRole(x,{role:"tooltip"}),{getReferenceProps:C,getFloatingProps:S}=R.useInteractions(u?[]:[y,k,v,$]);return i.jsxs(i.Fragment,{children:[i.jsx(pp,{className:s,ref:m.setReference,...C(),children:t}),i.jsx(R.FloatingPortal,{children:h&&i.jsxs(hp,{ref:m.setFloating,style:b,...S(),children:[i.jsx(R.FloatingArrow,{...e,ref:p,context:x}),o]})})]})},Ps=g.div`
|
|
1880
1823
|
background-color: #ffffff;
|
|
1881
1824
|
border-radius: 0px;
|
|
1882
1825
|
box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.12);
|
|
@@ -1884,30 +1827,30 @@
|
|
|
1884
1827
|
display: flex;
|
|
1885
1828
|
align-items: center;
|
|
1886
1829
|
padding: ${e=>e.contain&&"7px 10px"};
|
|
1887
|
-
`,Vs={fill:"#ffffff",height:12,tipRadius:0,width:14},wo=({arrow:e=Vs,children:t,contain:o=!0,content:n,...r})=>i.jsx(Ws,{arrow:e,content:i.jsx(Ps,{contain:o,children:i.jsx(T,{color:"dark",variant:"body",children:n})}),...r,children:t})
|
|
1830
|
+
`,Vs={fill:"#ffffff",height:12,tipRadius:0,width:14},wo=({arrow:e=Vs,children:t,contain:o=!0,content:n,...r})=>i.jsx(Ws,{arrow:e,content:i.jsx(Ps,{contain:o,children:i.jsx(T,{color:"dark",variant:"body",children:n})}),...r,children:t}),fp=g.div`
|
|
1888
1831
|
display: flex;
|
|
1889
1832
|
flex-direction: column;
|
|
1890
1833
|
min-width: 160px;
|
|
1891
|
-
`,
|
|
1834
|
+
`,gp=g.div`
|
|
1892
1835
|
display: flex;
|
|
1893
1836
|
gap: 8px;
|
|
1894
1837
|
height: 28px;
|
|
1895
1838
|
padding: 7px 10px;
|
|
1896
|
-
`,
|
|
1839
|
+
`,mp=g.div`
|
|
1897
1840
|
border-top: 1px solid #dfdfdf;
|
|
1898
|
-
`,
|
|
1841
|
+
`,bp=g.div`
|
|
1899
1842
|
padding: 7px 12px;
|
|
1900
|
-
`,
|
|
1843
|
+
`,xp=e=>{switch(e){case"error":return"red";case"info":return"blue";case"success":return"green";case"warning":return"orange";default:return"blue"}},yp=e=>{switch(e){case"error":case"info":return"ExclamationCircle";case"success":return"CheckCircle";case"warning":return"Warning";default:return"ExclamationCircle"}},vp=({message:e,title:t="Information",type:o="info"})=>i.jsxs(fp,{children:[i.jsxs(gp,{children:[i.jsx(O,{color:xp(o),iconId:yp(o)}),i.jsx(T,{bold:!0,variant:"body",children:t})]}),i.jsx(mp,{}),i.jsx(bp,{children:i.jsx(T,{variant:"body",children:e})})]}),Tn=({children:e,open:t,openDelay:o,className:n,...r})=>i.jsx(wo,{contain:!1,content:i.jsx(vp,{...r}),open:t,openDelay:o,className:n,children:e}),Hs=g.div`
|
|
1901
1844
|
background-color: #000000;
|
|
1902
1845
|
border-radius: 4px;
|
|
1903
1846
|
color: #ffffff;
|
|
1904
1847
|
display: flex;
|
|
1905
1848
|
gap: 8px;
|
|
1906
1849
|
padding: ${e=>e.contain&&"4px 8px"};
|
|
1907
|
-
`,Us={fill:"#000000",height:10,tipRadius:2,width:11},Co=d.forwardRef(({arrow:e=Us,children:t,contain:o=!0,content:n,...r},s)=>i.jsx(Ws,{arrow:e,content:i.jsx(Hs,{contain:o,children:i.jsx(T,{color:"light",variant:"small",children:n})}),...r,children:d.isValidElement(t)?d.cloneElement(t,{ref:s}):t})),Gs=({title:e,...t})=>i.jsx(Tn,{...t,title:e??"Error",type:"error"}),
|
|
1850
|
+
`,Us={fill:"#000000",height:10,tipRadius:2,width:11},Co=d.forwardRef(({arrow:e=Us,children:t,contain:o=!0,content:n,...r},s)=>i.jsx(Ws,{arrow:e,content:i.jsx(Hs,{contain:o,children:i.jsx(T,{color:"light",variant:"small",children:n})}),...r,children:d.isValidElement(t)?d.cloneElement(t,{ref:s}):t})),Gs=({title:e,...t})=>i.jsx(Tn,{...t,title:e??"Error",type:"error"}),kp=g.div`
|
|
1908
1851
|
display: flex;
|
|
1909
1852
|
gap: 4px;
|
|
1910
|
-
`,
|
|
1853
|
+
`,wp=({label:e,value:t})=>i.jsxs(kp,{children:[i.jsx(O,{iconId:"CheckSquare",size:"sm",color:"purple"}),i.jsxs(T,{bold:!0,variant:"body",children:[e,":"]}),i.jsx(T,{variant:"body",children:t})]}),Ks=({children:e,open:t,openDelay:o,...n})=>i.jsx(wo,{content:i.jsx(wp,{...n}),open:t,openDelay:o,children:e}),Ys=d.forwardRef(({variant:e,...t},o)=>{let n;switch(e){case"alert":n=Tn;break;case"dark":n=Co;break;case"error":n=Gs;break;case"light":n=wo;break;case"selector":n=Ks;break}return i.jsx(n,{...t,ref:o})}),qs=d.createContext(null),Cp=({children:e,value:t})=>i.jsx(qs.Provider,{value:t,children:e}),Zs=()=>{const e=d.useContext(qs);if(!e)throw new Error("Unable to use MultiSelectContext outside of its provider.");return e},[Ft]=M(["multi-select"]),Xs=g.div`
|
|
1911
1854
|
width: 100%;
|
|
1912
1855
|
padding: ${Ft("item-padding-y")} ${Ft("item-padding-x")};
|
|
1913
1856
|
display: flex;
|
|
@@ -1920,26 +1863,26 @@
|
|
|
1920
1863
|
&:hover {
|
|
1921
1864
|
background-color: ${Ft("item-hover-bg")};
|
|
1922
1865
|
}
|
|
1923
|
-
`,[ao]=M(["multi-select"])
|
|
1866
|
+
`,[ao]=M(["multi-select"]),$p=d.memo(({SelectAllItemTemplate:e,options:t})=>{const{selected:o,onSetSelected:n,setOpen:r}=Zs(),s=d.useRef(null),{isAllSelected:l,isPartiallySelected:a}=d.useMemo(()=>{const p=t.every(h=>o.some(f=>f.value===h.value));return{isAllSelected:p,isPartiallySelected:!p&&o.length!==0}},[o,t]),u=d.useCallback(()=>{n(l?[]:t),r(!1)},[l,r,n,t]);return d.useEffect(()=>{s.current&&(s.current.indeterminate=a)},[a]),e?i.jsx(e,{onToggleSelectAll:u,isAllSelected:l,isPartiallySelected:a}):i.jsxs(Sp,{onClick:u,children:[i.jsx(bt,{ref:s,onChange:Se,checked:l}),i.jsx(T,{variant:"body",color:"dark",children:l?"Deselect All":"Select All"})]})}),Sp=g(Xs)`
|
|
1924
1867
|
border-bottom: ${ao("border")} solid ${ao("select-all-border-color")};
|
|
1925
1868
|
position: sticky;
|
|
1926
1869
|
top: 0;
|
|
1927
1870
|
z-index: 2;
|
|
1928
1871
|
padding-top: calc(${ao("item-padding-y")} * 2);
|
|
1929
1872
|
background-color: ${ao("background")};
|
|
1930
|
-
`,
|
|
1931
|
-
padding: ${
|
|
1873
|
+
`,jp=d.memo(({value:e,label:t,isSelected:o,ListItemTemplate:n,onToggleSelect:r})=>n?i.jsx(n,{value:e,label:t,isSelected:o}):i.jsxs(Xs,{onClick:()=>r({value:e,label:t}),children:[i.jsx(bt,{onChange:Se,checked:o}),i.jsx(T,{variant:"body",color:"dark",children:t})]})),[wt]=M(["multi-select"]),Ip=d.memo(({value:e,label:t,onRemove:o,SelectedItemTemplate:n})=>n?i.jsx(n,{value:e,label:t,onRemove:o}):i.jsxs(Dp,{children:[i.jsx(T,{variant:"body",color:"dark",children:t}),i.jsx(ae,{size:"xxsm",color:"black",iconId:"Close",onClick:()=>o({value:e,label:t})})]})),Dp=g.div`
|
|
1874
|
+
padding: ${wt("selected-item-padding-y")} ${wt("selected-item-padding-x")};
|
|
1932
1875
|
display: flex;
|
|
1933
1876
|
align-items: center;
|
|
1934
1877
|
justify-content: flex-start;
|
|
1935
|
-
column-gap: ${
|
|
1936
|
-
background-color: ${
|
|
1878
|
+
column-gap: ${wt("selected-item-gap")};
|
|
1879
|
+
background-color: ${wt("selected-item-background")};
|
|
1937
1880
|
transition: background 0.125s ease-in-out;
|
|
1938
|
-
border-radius: ${
|
|
1881
|
+
border-radius: ${wt("selected-item-radius")};
|
|
1939
1882
|
:hover {
|
|
1940
|
-
background-color: ${
|
|
1883
|
+
background-color: ${wt("selected-item-background-hover")};
|
|
1941
1884
|
}
|
|
1942
|
-
`,[de]=M(["multi-select"]),Js=d.memo(({options:e,selected:t,className:o,closeOnSelect:n,onChange:r,disabled:s,selectAllHidden:l,SelectAllItemTemplate:a,ListItemTemplate:u,SelectedItemTemplate:p})=>{const[h,f]=d.useState(!1),m=d.useCallback(j=>{console.log({_open:j}),f(j)},[]),{refs:b,floatingStyles:x,context:y}=R.useFloating({placement:"bottom",open:h,onOpenChange:m,whileElementsMounted:R.autoUpdate,middleware:Fs}),k=R.useClick(y,{enabled:!s,toggle:!!n}),v=R.useDismiss(y),$=R.useRole(y,{role:"listbox"}),{getReferenceProps:C,getFloatingProps:S}=R.useInteractions([k,v,$]),w=d.useCallback(j=>{t.some(D=>D.value===j.value)?r(t.filter(D=>D.value!==j.value)):r([...t,j])},[r,t]),I=d.useMemo(()=>({open:h,setOpen:f,selected:t,onToggleSelect:w,onSetSelected:r}),[w,h,t,r]);return console.log({open:h}),i.jsx(
|
|
1885
|
+
`,[de]=M(["multi-select"]),Js=d.memo(({options:e,selected:t,className:o,closeOnSelect:n,onChange:r,disabled:s,selectAllHidden:l,SelectAllItemTemplate:a,ListItemTemplate:u,SelectedItemTemplate:p})=>{const[h,f]=d.useState(!1),m=d.useCallback(j=>{console.log({_open:j}),f(j)},[]),{refs:b,floatingStyles:x,context:y}=R.useFloating({placement:"bottom",open:h,onOpenChange:m,whileElementsMounted:R.autoUpdate,middleware:Fs}),k=R.useClick(y,{enabled:!s,toggle:!!n}),v=R.useDismiss(y),$=R.useRole(y,{role:"listbox"}),{getReferenceProps:C,getFloatingProps:S}=R.useInteractions([k,v,$]),w=d.useCallback(j=>{t.some(D=>D.value===j.value)?r(t.filter(D=>D.value!==j.value)):r([...t,j])},[r,t]),I=d.useMemo(()=>({open:h,setOpen:f,selected:t,onToggleSelect:w,onSetSelected:r}),[w,h,t,r]);return console.log({open:h}),i.jsx(Cp,{value:I,children:i.jsxs(_p,{ref:b.setReference,className:o,...C({onClick(j){j.stopPropagation()}}),children:[t.map(j=>z.createElement(Ip,{SelectedItemTemplate:p,...j,key:j.value,onRemove:w})),h&&i.jsx(R.FloatingPortal,{children:i.jsx(R.FloatingFocusManager,{context:y,modal:!1,children:i.jsxs(Tp,{ref:b.setFloating,style:x,className:xt({selectAllHidden:!!l||!!a}),...S(),children:[!l&&i.jsx($p,{SelectAllItemTemplate:a,options:e}),e.map(j=>i.jsx(jp,{label:j.label,value:j.value,onToggleSelect:w,isSelected:t.some(D=>j.value===D.value),ListItemTemplate:u},j.value))]})})})]})})}),_p=g.div`
|
|
1943
1886
|
width: 100%;
|
|
1944
1887
|
height: fit-content;
|
|
1945
1888
|
min-height: 28px;
|
|
@@ -1956,7 +1899,7 @@
|
|
|
1956
1899
|
&:hover {
|
|
1957
1900
|
border-color: ${de("hover-border-color")};
|
|
1958
1901
|
}
|
|
1959
|
-
`,
|
|
1902
|
+
`,Tp=g.div`
|
|
1960
1903
|
display: flex;
|
|
1961
1904
|
flex-direction: column;
|
|
1962
1905
|
border: ${de("border")} solid ${de("border-color")};
|
|
@@ -1973,119 +1916,270 @@
|
|
|
1973
1916
|
&.selectAllHidden {
|
|
1974
1917
|
padding-top: ${de("list-padding")};
|
|
1975
1918
|
}
|
|
1976
|
-
`,
|
|
1977
|
-
width: 100%;
|
|
1978
|
-
position: relative;
|
|
1979
|
-
display: flex;
|
|
1980
|
-
padding: ${ze("padding")};
|
|
1981
|
-
border-radius: ${ze("border-radius")};
|
|
1982
|
-
background-color: ${ze("background-color")};
|
|
1983
|
-
border: ${ze("border-width")} solid ${ze("border-color")};
|
|
1984
|
-
cursor: pointer;
|
|
1985
|
-
transition: border-color 0.125s ease-in-out, background 0.125s ease-in-out;
|
|
1986
|
-
&.isInherited {
|
|
1987
|
-
background-color: ${ze("background-color-inherited")};
|
|
1988
|
-
border-color: ${ze("border-color-inherited")};
|
|
1989
|
-
}
|
|
1990
|
-
&.isSelected {
|
|
1991
|
-
background-color: ${ze("background-color-selected")};
|
|
1992
|
-
border-color: ${ze("border-color-selected")};
|
|
1993
|
-
}
|
|
1994
|
-
:hover:not(.isSelected) {
|
|
1995
|
-
background-color: ${ze("background-color-hover")};
|
|
1996
|
-
}
|
|
1997
|
-
:hover:not(.isSelected):not(.isInherited) {
|
|
1998
|
-
border-color: ${ze("border-color-hover")};
|
|
1999
|
-
}
|
|
2000
|
-
`,Hp=g.div`
|
|
1919
|
+
`,Ep=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"})})]})]})}),zp=["settings","devices","tools","performance"],Mp=["viewBrowse","manage","configure","troubleshoot","store","main"],Op=zp.map(e=>Mp.map(t=>({start:e,end:t}))).flatMap(e=>e),[$e,Qs]=M(["branded-header","icon"]),Rp=g.div`
|
|
2001
1920
|
width: 100%;
|
|
2002
1921
|
display: flex;
|
|
1922
|
+
flex-direction: column;
|
|
2003
1923
|
align-items: flex-start;
|
|
2004
1924
|
justify-content: flex-start;
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
overflow: hidden;
|
|
2008
|
-
`,Up=g.div`
|
|
1925
|
+
border-bottom: ${$e("border-bottom-size")} solid ${$e("border-bottom-color")};
|
|
1926
|
+
`,Np=g.div`
|
|
2009
1927
|
width: 100%;
|
|
2010
1928
|
display: flex;
|
|
2011
1929
|
align-items: center;
|
|
2012
1930
|
justify-content: flex-start;
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
position: absolute;
|
|
2016
|
-
top: 50%;
|
|
2017
|
-
transform: translateY(-50%);
|
|
2018
|
-
right: 8px;
|
|
2019
|
-
`,[Ut,Bo,Kp]=M(["collapsible-list-container","collapsible-list-header-container","collapsible-list-toggled-container"]),Yp=({headerContent:e,toggledContent:t,isOpen:o,onOpenChange:n})=>i.jsx(mo,{open:o,onOpenChange:n,children:i.jsxs(Zp,{children:[i.jsx(gn,{children:i.jsxs(Xp,{children:[i.jsx(ae,{className:"caret-button",color:"black",size:"xsm",iconId:"CaretRight"}),e]})}),i.jsx(bo,{children:i.jsx(qp,{children:t})})]})}),qp=g.div`
|
|
2020
|
-
flex-direction: column;
|
|
2021
|
-
gap: ${Kp("gap")};
|
|
2022
|
-
`,Zp=g.div`
|
|
2023
|
-
border-radius: ${Ut("border-radius")};
|
|
2024
|
-
border: ${Ut("border-width")} solid ${Ut("border-color")};
|
|
2025
|
-
display: flex;
|
|
2026
|
-
flex-direction: column;
|
|
2027
|
-
overflow: hidden;
|
|
2028
|
-
position: relative;
|
|
2029
|
-
`,Xp=g.div`
|
|
2030
|
-
align-items: center;
|
|
2031
|
-
background-color: ${Bo("background-color")};
|
|
2032
|
-
cursor: pointer;
|
|
2033
|
-
display: flex;
|
|
2034
|
-
gap: ${Bo("gap")};
|
|
2035
|
-
padding: ${Bo("padding")};
|
|
2036
|
-
|
|
2037
|
-
&[data-state="open"] > .caret-button {
|
|
2038
|
-
transform: rotate(90deg);
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
&[data-state="open"] {
|
|
2042
|
-
border-bottom: ${Ut("border-width")} solid
|
|
2043
|
-
${Ut("border-color")};
|
|
2044
|
-
}
|
|
2045
|
-
`,[xr]=M(["combobox"]),Jp=d.memo(({isDeletable:e,inputText:t,setInputText:o,onSelectionChange:n,placeholder:r,setIsOpen:s,tooltipText:l,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(Qp,{children:[i.jsx(th,{value:t,onChange:u,onKeyDown:a,placeholder:r,autoFocus:!0,className:e?"isDeletable":void 0}),e&&i.jsx(eh,{children:i.jsx(Ys,{variant:"dark",content:l,children:i.jsx(ae,{onClick:p,iconId:"DeleteOutlined",color:"red",size:"sm"})})})]})}),Qp=g.div`
|
|
2046
|
-
width: 100%;
|
|
2047
|
-
position: relative;
|
|
1931
|
+
max-height: 52px;
|
|
1932
|
+
`;g.div``;const Fp=g.div`
|
|
2048
1933
|
display: flex;
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
1934
|
+
flex: 1;
|
|
1935
|
+
gap: 16px;
|
|
1936
|
+
padding: 12px 20px 12px 16px;
|
|
1937
|
+
`,Ap=g.div`
|
|
1938
|
+
flex: 1;
|
|
2053
1939
|
display: flex;
|
|
2054
1940
|
align-items: center;
|
|
2055
|
-
justify-content:
|
|
2056
|
-
transform: translateY(-50%);
|
|
2057
|
-
`,th=g(Et)`
|
|
2058
|
-
border-radius: ${xr("input-border-radius")};
|
|
2059
|
-
height: ${xr("height")};
|
|
2060
|
-
width: 100%;
|
|
1941
|
+
justify-content: flex-start;
|
|
2061
1942
|
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
1943
|
+
/* disabled as title usage was deprecated... */
|
|
1944
|
+
/* &.hasDescription {
|
|
1945
|
+
align-items: flex-start;
|
|
1946
|
+
} */
|
|
1947
|
+
`,Lp=g.div`
|
|
1948
|
+
flex: 1;
|
|
2067
1949
|
overflow: hidden;
|
|
2068
|
-
`,ih=g.div`
|
|
2069
|
-
width: 200px;
|
|
2070
|
-
height: auto;
|
|
2071
1950
|
display: flex;
|
|
2072
1951
|
flex-direction: column;
|
|
2073
1952
|
align-items: flex-start;
|
|
2074
1953
|
justify-content: flex-start;
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
1954
|
+
row-gap: ${$e("text-wrapper-gap")};
|
|
1955
|
+
`;g.img`
|
|
1956
|
+
height: 100%;
|
|
1957
|
+
`;const ei=z.css`
|
|
1958
|
+
${Op.map(({start:e,end:t})=>`&[data-gradient="${e}-${t}"] {
|
|
1959
|
+
background: linear-gradient(
|
|
1960
|
+
90deg,
|
|
1961
|
+
${$e(`startColor-${e}`)} 0%,
|
|
1962
|
+
${$e(`endColor-${t}`)} 100%
|
|
1963
|
+
);
|
|
1964
|
+
}`)}
|
|
1965
|
+
`,Bp=g.div`
|
|
1966
|
+
background-color: ${e=>e.color};
|
|
1967
|
+
height: ${$e("badge-size")};
|
|
1968
|
+
width: ${$e("badge-size")};
|
|
1969
|
+
border-radius: ${$e("badge-radius")};
|
|
1970
|
+
position: relative;
|
|
1971
|
+
${`${Qs("size-xxlrg",!0)}: 52px`};
|
|
1972
|
+
`;g.div`
|
|
1973
|
+
height: ${$e("badge-size")};
|
|
1974
|
+
width: ${$e("badge-size")};
|
|
1975
|
+
border-radius: ${$e("badge-radius")};
|
|
1976
|
+
position: relative;
|
|
1977
|
+
${`${Qs("size-xxlrg",!0)}: calc(100% - 2px)`};
|
|
1978
|
+
${ei}
|
|
1979
|
+
`;const Wp=g.div`
|
|
1980
|
+
width: 100%;
|
|
1981
|
+
height: 100%;
|
|
1982
|
+
position: absolute;
|
|
1983
|
+
top: 0;
|
|
1984
|
+
left: 0;
|
|
1985
|
+
display: flex;
|
|
1986
|
+
align-items: center;
|
|
1987
|
+
justify-content: center;
|
|
1988
|
+
z-index: 2;
|
|
1989
|
+
`;g.div`
|
|
1990
|
+
width: 100%;
|
|
1991
|
+
display: flex;
|
|
1992
|
+
align-items: center;
|
|
1993
|
+
justify-content: center;
|
|
1994
|
+
position: relative;
|
|
1995
|
+
height: ${$e("line-height")};
|
|
1996
|
+
overflow: hidden;
|
|
1997
|
+
${ei}
|
|
1998
|
+
`;const Pp=g.div`
|
|
1999
|
+
width: 100%;
|
|
2000
|
+
height: 100%;
|
|
2001
|
+
position: absolute;
|
|
2002
|
+
top: 0;
|
|
2003
|
+
left: 0;
|
|
2004
|
+
z-index: 1;
|
|
2005
|
+
background-color: ${c("color-grey60")};
|
|
2006
|
+
opacity: 0.5;
|
|
2007
|
+
`,Vp=g(T)`
|
|
2008
|
+
display: -webkit-box;
|
|
2009
|
+
-webkit-line-clamp: 2;
|
|
2010
|
+
-webkit-box-orient: vertical;
|
|
2011
|
+
overflow: hidden;
|
|
2012
|
+
text-overflow: ellipsis;
|
|
2013
|
+
`,Hp=e=>i.jsx(Vp,{...e,variant:"body",color:"dark"}),Up=d.memo(({color:e,title:t,description:o,icon:n,Action:r,isOffline:s})=>i.jsx(z.ClassNames,{children:({cx:l})=>i.jsx(Rp,{children:i.jsxs(Np,{children:[i.jsxs(Bp,{color:e,children:[i.jsx(Wp,{children:n&&i.jsx(O,{iconId:n,size:"xxlrg",color:"white"})}),!!s&&i.jsx(Pp,{})]}),i.jsxs(Fp,{children:[i.jsx(Ap,{className:l({hasDescription:!!o}),children:i.jsxs(Lp,{children:[i.jsx(T,{variant:"h1",children:t}),!!o&&i.jsx(Hp,{children:o})]})}),!!r&&i.jsx(r,{})]})]})})})),Gp=d.memo(({description:e})=>{const{open:t}=Xt();return i.jsx(Kp,{color:"grey",variant:"small","data-state":t?"open":"closed",children:e})}),Kp=g(T)`
|
|
2014
|
+
width: 100%;
|
|
2015
|
+
overflow: hidden;
|
|
2016
|
+
text-overflow: ellipsis;
|
|
2017
|
+
word-break: break-all;
|
|
2018
|
+
white-space: nowrap;
|
|
2019
|
+
&[data-state="open"] {
|
|
2020
|
+
overflow: visible;
|
|
2021
|
+
white-space: normal;
|
|
2022
|
+
word-break: break-word;
|
|
2023
|
+
}
|
|
2024
|
+
`,[Ue]=M(["collapsible-artifact"]),Yp=d.memo(({onExternalClick:e,id:t,name:o,isSelected:n,description:r,VersionList:s,className:l})=>{const a=d.useCallback(()=>{e&&e(t)},[t,e]);return i.jsx(mo,{children:i.jsxs(qp,{className:l,children:[i.jsxs(Xp,{children:[i.jsx(gn,{children:i.jsx(Jp,{color:"black",size:"xxsm",iconId:"CaretRight"})}),i.jsxs(Qp,{children:[i.jsxs(eh,{children:[i.jsx(T,{css:z.css`
|
|
2025
|
+
word-break: break-all;
|
|
2026
|
+
`,variant:"small",bold:!0,children:o}),!!n&&i.jsx(T,{variant:"small",color:"blue",children:"Selected"})]}),r&&i.jsx(Gp,{description:r})]}),!!e&&i.jsx(Zp,{color:"blue",iconId:"Export",onClick:a,size:"xsm"})]}),i.jsx(bo,{children:i.jsx(th,{children:i.jsx(oh,{children:s})})})]})})}),qp=g.div`
|
|
2027
|
+
align-items: flex-start;
|
|
2028
|
+
background-color: ${Ue("background-color")};
|
|
2029
|
+
border-radius: ${Ue("border-radius")};
|
|
2030
|
+
border: ${Ue("border-width")} solid ${Ue("border-color")};
|
|
2031
|
+
display: flex;
|
|
2032
|
+
flex-direction: column;
|
|
2033
|
+
justify-content: flex-start;
|
|
2034
|
+
position: relative;
|
|
2035
|
+
width: 100%;
|
|
2036
|
+
`,Zp=g(ae)`
|
|
2037
|
+
z-index: 1;
|
|
2038
|
+
`,Xp=g.div`
|
|
2039
|
+
align-items: flex-start;
|
|
2040
|
+
display: flex;
|
|
2041
|
+
gap: ${Ue("name-and-selected-spacing")};
|
|
2042
|
+
padding: ${Ue("padding")};
|
|
2043
|
+
width: 100%;
|
|
2044
|
+
`,Jp=g(ae)`
|
|
2045
|
+
z-index: 1;
|
|
2046
|
+
|
|
2047
|
+
&[data-state="open"] {
|
|
2048
|
+
transform: rotate(90deg);
|
|
2049
|
+
}
|
|
2050
|
+
`,Qp=g.div`
|
|
2051
|
+
display: flex;
|
|
2052
|
+
flex-direction: column;
|
|
2053
|
+
flex: 1;
|
|
2054
|
+
gap: ${Ue("name-and-desc-spacing")};
|
|
2055
|
+
overflow: hidden;
|
|
2056
|
+
`,eh=g.div`
|
|
2057
|
+
align-items: center;
|
|
2058
|
+
display: flex;
|
|
2059
|
+
flex-wrap: wrap;
|
|
2060
|
+
flex: 1;
|
|
2061
|
+
gap: ${Ue("name-and-selected-spacing")};
|
|
2062
|
+
justify-content: flex-start;
|
|
2063
|
+
width: 100%;
|
|
2064
|
+
`,th=g.div`
|
|
2065
|
+
border-top: 1px solid ${Ue("border-color")};
|
|
2066
|
+
width: 100%;
|
|
2067
|
+
`,oh=g.div`
|
|
2068
|
+
padding: ${Ue("name-and-selected-spacing")};
|
|
2069
|
+
width: 100%;
|
|
2070
|
+
`,[ze]=M(["collapsible-artifact-version"]),nh=d.memo(({onListItemAction:e,isSelected:t,isInherited:o,id:n,name:r,createdAt:s,description:l})=>{const a=d.useCallback(()=>{e&&!o&&e(n,t?"deselect":"select")},[n,o,t,e]);return i.jsx(z.ClassNames,{children:({cx:u})=>i.jsxs(rh,{onClick:a,className:u({isSelected:t,isInherited:o}),children:[i.jsxs(sh,{children:[i.jsxs(ih,{children:[i.jsx(T,{variant:"small",color:"dark",bold:!0,children:r}),!!s&&i.jsx(T,{color:"grey",variant:"small",children:s})]}),l&&i.jsx(xo,{color:"grey",variant:"small",children:`${l}${l}`})]}),t?i.jsx(ah,{size:"xsm",color:"blue",iconId:t?"Check":"InfoCircle"}):o?i.jsx(O,{iconId:"Inherited",color:"purple"}):null]})})}),rh=g.div`
|
|
2071
|
+
width: 100%;
|
|
2072
|
+
position: relative;
|
|
2073
|
+
display: flex;
|
|
2074
|
+
padding: ${ze("padding")};
|
|
2075
|
+
border-radius: ${ze("border-radius")};
|
|
2076
|
+
background-color: ${ze("background-color")};
|
|
2077
|
+
border: ${ze("border-width")} solid ${ze("border-color")};
|
|
2078
|
+
cursor: pointer;
|
|
2079
|
+
transition: border-color 0.125s ease-in-out, background 0.125s ease-in-out;
|
|
2080
|
+
&.isInherited {
|
|
2081
|
+
background-color: ${ze("background-color-inherited")};
|
|
2082
|
+
border-color: ${ze("border-color-inherited")};
|
|
2083
|
+
}
|
|
2084
|
+
&.isSelected {
|
|
2085
|
+
background-color: ${ze("background-color-selected")};
|
|
2086
|
+
border-color: ${ze("border-color-selected")};
|
|
2087
|
+
}
|
|
2088
|
+
:hover:not(.isSelected) {
|
|
2089
|
+
background-color: ${ze("background-color-hover")};
|
|
2090
|
+
}
|
|
2091
|
+
:hover:not(.isSelected):not(.isInherited) {
|
|
2092
|
+
border-color: ${ze("border-color-hover")};
|
|
2093
|
+
}
|
|
2094
|
+
`,sh=g.div`
|
|
2095
|
+
width: 100%;
|
|
2096
|
+
display: flex;
|
|
2097
|
+
align-items: flex-start;
|
|
2098
|
+
justify-content: flex-start;
|
|
2099
|
+
flex-direction: column;
|
|
2100
|
+
row-gap: 1px;
|
|
2101
|
+
overflow: hidden;
|
|
2102
|
+
`,ih=g.div`
|
|
2103
|
+
width: 100%;
|
|
2104
|
+
display: flex;
|
|
2105
|
+
align-items: center;
|
|
2106
|
+
justify-content: flex-start;
|
|
2107
|
+
gap: 8px;
|
|
2108
|
+
`,ah=g(O)`
|
|
2109
|
+
position: absolute;
|
|
2110
|
+
top: 50%;
|
|
2111
|
+
transform: translateY(-50%);
|
|
2112
|
+
right: 8px;
|
|
2113
|
+
`,[Ut,Bo,lh]=M(["collapsible-list-container","collapsible-list-header-container","collapsible-list-toggled-container"]),ch=({headerContent:e,toggledContent:t,isOpen:o,onOpenChange:n})=>i.jsx(mo,{open:o,onOpenChange:n,children:i.jsxs(uh,{children:[i.jsx(gn,{children:i.jsxs(ph,{children:[i.jsx(ae,{className:"caret-button",color:"black",size:"xsm",iconId:"CaretRight"}),e]})}),i.jsx(bo,{children:i.jsx(dh,{children:t})})]})}),dh=g.div`
|
|
2114
|
+
flex-direction: column;
|
|
2115
|
+
gap: ${lh("gap")};
|
|
2116
|
+
`,uh=g.div`
|
|
2117
|
+
border-radius: ${Ut("border-radius")};
|
|
2118
|
+
border: ${Ut("border-width")} solid ${Ut("border-color")};
|
|
2119
|
+
display: flex;
|
|
2120
|
+
flex-direction: column;
|
|
2121
|
+
overflow: hidden;
|
|
2122
|
+
position: relative;
|
|
2123
|
+
`,ph=g.div`
|
|
2124
|
+
align-items: center;
|
|
2125
|
+
background-color: ${Bo("background-color")};
|
|
2126
|
+
cursor: pointer;
|
|
2127
|
+
display: flex;
|
|
2128
|
+
gap: ${Bo("gap")};
|
|
2129
|
+
padding: ${Bo("padding")};
|
|
2130
|
+
|
|
2131
|
+
&[data-state="open"] > .caret-button {
|
|
2132
|
+
transform: rotate(90deg);
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
&[data-state="open"] {
|
|
2136
|
+
border-bottom: ${Ut("border-width")} solid
|
|
2137
|
+
${Ut("border-color")};
|
|
2138
|
+
}
|
|
2139
|
+
`,[xr]=M(["combobox"]),hh=d.memo(({isDeletable:e,inputText:t,setInputText:o,onSelectionChange:n,placeholder:r,setIsOpen:s,tooltipText:l,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(fh,{children:[i.jsx(mh,{value:t,onChange:u,onKeyDown:a,placeholder:r,autoFocus:!0,className:e?"isDeletable":void 0}),e&&i.jsx(gh,{children:i.jsx(Ys,{variant:"dark",content:l,children:i.jsx(ae,{onClick:p,iconId:"DeleteOutlined",color:"red",size:"sm"})})})]})}),fh=g.div`
|
|
2140
|
+
width: 100%;
|
|
2141
|
+
position: relative;
|
|
2142
|
+
display: flex;
|
|
2143
|
+
`,gh=g.div`
|
|
2144
|
+
position: absolute;
|
|
2145
|
+
right: 8px;
|
|
2146
|
+
top: 50%;
|
|
2147
|
+
display: flex;
|
|
2148
|
+
align-items: center;
|
|
2149
|
+
justify-content: center;
|
|
2150
|
+
transform: translateY(-50%);
|
|
2151
|
+
`,mh=g(Et)`
|
|
2152
|
+
border-radius: ${xr("input-border-radius")};
|
|
2153
|
+
height: ${xr("height")};
|
|
2154
|
+
width: 100%;
|
|
2155
|
+
|
|
2156
|
+
&.isDeletable {
|
|
2157
|
+
padding-right: ${c("spacing-32")};
|
|
2158
|
+
}
|
|
2159
|
+
`,bh=d.memo(({name:e})=>i.jsxs(i.Fragment,{children:[i.jsx(O,{iconId:"Check",color:"black",className:"option-label-icon",size:"xsm"}),i.jsx(xo,{variant:"body",color:"dark",children:e})]})),[Ne,xh]=M(["combobox","option"]),yh=({optionsToRender:e,inputText:t,handleSelectionChange:o,handleInputChange:n,isDeletable:r,OptionLabelComponent:s,placeholder:l,createNode:a,createText:u,className:p,onEnter:h,t:f})=>{const{setIsOpen:m,selectedIndex:b}=Dn(),x=d.useCallback(()=>{o("create",{id:t,name:t}),m(!1)},[t,m,o]),y=d.useMemo(()=>!e.length||!e.some(v=>v.name.toLowerCase()===t.toLowerCase()),[t,e]),k=d.useCallback(v=>{v.code==="Enter"&&t&&h&&h(t,()=>m(!1))},[t,h,m]);return i.jsxs(kh,{className:p,children:[i.jsx(hh,{inputText:t,setIsOpen:m,onSelectionChange:o,setInputText:n,isDeletable:r,onKeyDown:h?k:void 0,placeholder:l??"Enter a name",tooltipText:(f==null?void 0:f("comboBox.tooltipText"))??"Remove?"}),e.map((v,$)=>i.jsx($h,{label:s?i.jsx(s,{...v,selected:b===$}):i.jsx(bh,{name:v.name}),optionKey:v.id,disabled:v.isHeader},v.id)),y&&t?a?i.jsx(Ch,{onClick:x,children:a}):i.jsx(wh,{size:"med",onClick:x,children:u??"Create?"}):null]})},ti=({children:e,deletable:t,options:o,selected:n,onInputChange:r,onSelectionChange:s,requiresSelection:l,...a})=>{const u=d.useRef(n==null?void 0:n.id),[p,h]=d.useState(l?"":(n==null?void 0:n.name)??""),f=!!n&&n.name===p,m=t!==void 0?t:f&&!l;d.useLayoutEffect(()=>{u.current!==(n==null?void 0:n.id)&&(h(l?"":(n==null?void 0:n.name)??""),u.current=n==null?void 0:n.id)},[n,l]);const b=d.useCallback($=>{h($),r==null||r($)},[r]),x=d.useCallback(($,C)=>{u.current=C==null?void 0:C.id,h(l?"":(C==null?void 0:C.name)??""),s($,C==null?void 0:C.id)},[s,l]),y=d.useCallback($=>{const C=o.find(S=>S.id===$);C&&x("select",C)},[x,o]),k=d.useMemo(()=>f?o:o.filter($=>$.name.toLowerCase().includes(p.toLowerCase())||$.isHeader),[p,o,f]),v=d.useMemo(()=>k.findIndex($=>$.id===(n==null?void 0:n.id)),[k,n==null?void 0:n.id]);return i.jsx(vh,{selectedIndex:v,isFocusTrapDisabled:!0,onSelect:y,Reference:e,children:i.jsx(yh,{...a,handleInputChange:b,handleSelectionChange:x,optionsToRender:k,isDeletable:m,inputText:p})})},vh=g(zt)`
|
|
2160
|
+
border-radius: ${Ne("border-radius")};
|
|
2161
|
+
overflow: hidden;
|
|
2162
|
+
`,kh=g.div`
|
|
2163
|
+
width: 200px;
|
|
2164
|
+
height: auto;
|
|
2165
|
+
display: flex;
|
|
2166
|
+
flex-direction: column;
|
|
2167
|
+
align-items: flex-start;
|
|
2168
|
+
justify-content: flex-start;
|
|
2169
|
+
background-color: ${Ne("background-color")};
|
|
2170
|
+
border-radius: ${Ne("border-radius")};
|
|
2171
|
+
box-shadow: ${Ne("box-shadow")};
|
|
2172
|
+
padding: ${Ne("padding")};
|
|
2173
|
+
row-gap: ${Ne("row-gap")};
|
|
2174
|
+
`,wh=g(fn)`
|
|
2175
|
+
padding: ${xh("padding")};
|
|
2176
|
+
`,Ch=g.div`
|
|
2177
|
+
cursor: pointer;
|
|
2178
|
+
width: 100%;
|
|
2179
|
+
`,$h=g(dt)`
|
|
2180
|
+
width: 100%;
|
|
2181
|
+
display: flex;
|
|
2182
|
+
align-items: center;
|
|
2089
2183
|
justify-content: flex-start;
|
|
2090
2184
|
background-color: ${Ne("background-color")};
|
|
2091
2185
|
border-radius: ${Ne("selection-border-radius")};
|
|
@@ -2111,7 +2205,7 @@
|
|
|
2111
2205
|
font-weight: ${c("font-weight-bold")};
|
|
2112
2206
|
}
|
|
2113
2207
|
}
|
|
2114
|
-
`,
|
|
2208
|
+
`,oi=g.div`
|
|
2115
2209
|
height: 20px;
|
|
2116
2210
|
width: 240px;
|
|
2117
2211
|
display: grid;
|
|
@@ -2132,32 +2226,64 @@
|
|
|
2132
2226
|
pointer-events: none;
|
|
2133
2227
|
background-color: ${c("color-grey10")};
|
|
2134
2228
|
}
|
|
2135
|
-
`,dh=e=>typeof e=="string"?e.trim().length>0||"Required":!0,uh=e=>{const{register:t}=e,o=d.useCallback((r,s)=>{if(!s||!s.required)return t(r,s);const l=typeof s.validate=="function"?{default:s.validate}:s.validate,a={...s,validate:{...l,whitespaces:dh}};return t(r,a)},[t]),n=d.useMemo(()=>({...e.control,register:o}),[e.control,o]);return{...e,register:o,control:n}};function ti({children:e,onSubmit:t,onRootErrorChange:o,className:n,defaultValues:r,variant:s="submit",...l}){const a=G.useForm({shouldUnregister:!0,defaultValues:r,...l,mode:s==="blur"?"onBlur":l.mode}),u=uh(a),p=u.formState.errors.root;d.useEffect(()=>{o&&o(p)},[p,o]);const h=d.useCallback(async f=>{await t(f,u.setError)},[u.setError,t]);return i.jsx(G.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 ph=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"})})),hh=e=>e===void 0?i.jsx(ph,{}):e?i.jsx(O,{iconId:"Check",color:"green",size:"sm"}):i.jsx(O,{iconId:"Close",color:"red",size:"sm"}),oi=d.memo(({isBlank:e,requirements:t,metRequirements:o,bulletGetter:n,className:r,t:s,title:l})=>i.jsxs(fh,{className:r,children:[!!l&&i.jsx(T,{color:"dark",bold:!0,variant:"body",children:l}),i.jsx(gh,{children:t.map(a=>{const u=e?void 0:o.includes(a.id);return i.jsxs(mh,{children:[n?n(a.id,u):hh(u),i.jsx(bh,{variant:"body",color:"dark",children:s?s(a.textKey):a.id})]},a.id)})})]})),fh=g.div`
|
|
2229
|
+
`;function Sh(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 Wo={},Pt={};function gt(e,t){try{const n=(Wo[e]||(Wo[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Pt?Pt[n]:yr(n,n.split(":"))}catch{if(e in Pt)return Pt[e];const o=e==null?void 0:e.match(jh);return o?yr(e,o.slice(1)):NaN}}const jh=/([+-]\d\d):?(\d\d)?/;function yr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Pt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class Ge extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(gt(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)),ni(this),rn(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new Ge(...o,t):new Ge(Date.now(),t)}withTimeZone(t){return new Ge(+this,t)}getTimezoneOffset(){const t=-gt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),rn(this),+this}[Symbol.for("constructDateFrom")](t){return new Ge(+new Date(t),this.timeZone)}}const vr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!vr.test(e))return;const t=e.replace(vr,"$1UTC");Ge.prototype[t]&&(e.startsWith("get")?Ge.prototype[e]=function(){return this.internal[t]()}:(Ge.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ih(this),+this},Ge.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),rn(this),+this}))});function rn(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-gt(e.timeZone,e)*60))}function Ih(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()),ni(e)}function ni(e){const t=gt(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(-(gt(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=gt(e.timeZone,e),b=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-b,k=b!==o,v=y-u;if(k&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const $=gt(e.timeZone,e),C=$>0?Math.floor($):Math.ceil($),S=b-C;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class ce extends Ge{static tz(t,...o){return o.length?new ce(...o,t):new ce(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} (${Sh(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 ce(+this,t)}[Symbol.for("constructDateFrom")](t){return new ce(+new Date(t),this.timeZone)}}const Dh={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"}},_h=(e,t,o)=>{let n;const r=Dh[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 Po(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const Th={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Eh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mh={date:Po({formats:Th,defaultWidth:"full"}),time:Po({formats:Eh,defaultWidth:"full"}),dateTime:Po({formats:zh,defaultWidth:"full"})},Oh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Rh=(e,t,o,n)=>Oh[e];function At(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 Nh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Fh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ah={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"]},Lh={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"]},Bh={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"}},Wh={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"}},Ph=(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"},Vh={ordinalNumber:Ph,era:At({values:Nh,defaultWidth:"wide"}),quarter:At({values:Fh,defaultWidth:"wide",argumentCallback:e=>e-1}),month:At({values:Ah,defaultWidth:"wide"}),day:At({values:Lh,defaultWidth:"wide"}),dayPeriod:At({values:Bh,defaultWidth:"wide",formattingValues:Wh,defaultFormattingWidth:"wide"})};function Lt(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)?Uh(a,f=>f.test(l)):Hh(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 Hh(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function Uh(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Gh(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 Kh=/^(\d+)(th|st|nd|rd)?/i,Yh=/\d+/i,qh={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},Zh={any:[/^b/i,/^(a|c)/i]},Xh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Jh={any:[/1/i,/2/i,/3/i,/4/i]},Qh={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},ef={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]},tf={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},of={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]},nf={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},rf={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}},sf={ordinalNumber:Gh({matchPattern:Kh,parsePattern:Yh,valueCallback:e=>parseInt(e,10)}),era:Lt({matchPatterns:qh,defaultMatchWidth:"wide",parsePatterns:Zh,defaultParseWidth:"any"}),quarter:Lt({matchPatterns:Xh,defaultMatchWidth:"wide",parsePatterns:Jh,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Lt({matchPatterns:Qh,defaultMatchWidth:"wide",parsePatterns:ef,defaultParseWidth:"any"}),day:Lt({matchPatterns:tf,defaultMatchWidth:"wide",parsePatterns:of,defaultParseWidth:"any"}),dayPeriod:Lt({matchPatterns:nf,defaultMatchWidth:"any",parsePatterns:rf,defaultParseWidth:"any"})},ri={code:"en-US",formatDistance:_h,formatLong:Mh,formatRelative:Rh,localize:Vh,match:sf,options:{weekStartsOn:0,firstWeekContainsDate:1}},kr=5,af=4;function lf(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,kr*7-1);return t.getMonth(e)===t.getMonth(s)?kr:af}function si(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 cf(e,t){const o=si(e,t),n=lf(e,t);return t.addDays(o,n*7-1)}class st{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?ce.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 ce(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):q.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):q.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):q.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):q.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):q.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):q.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):q.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):cf(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):q.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):q.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):q.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):q.endOfYear(n)},this.format=(n,r,s)=>{var a;const l=(a=this.overrides)!=null&&a.format?this.overrides.format(n,r,this.options):q.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):q.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):q.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):q.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):q.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):q.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):q.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):q.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):q.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):q.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):q.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):q.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):q.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):q.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):q.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):si(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):q.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):q.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):q.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):q.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):q.startOfYear(n)},this.options={locale:ri,...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 Ye=new st;class ii{constructor(t,o,n=Ye){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 df{constructor(t,o){this.date=t,this.weeks=o}}class uf{constructor(t,o){this.days=o,this.weekNumber=t}}function pf(e){return d.createElement("button",{...e})}function hf(e){return d.createElement("span",{...e})}function ff(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 gf(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function mf(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 A;(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"})(A||(A={}));var se;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(se||(se={}));var Fe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Fe||(Fe={}));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 bf(e){const{options:t,className:o,components:n,classNames:r,...s}=e,l=[r[A.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[A.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[A.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function xf(e){return d.createElement("div",{...e})}function yf(e){return d.createElement("div",{...e})}function vf(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function kf(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function wf(e){return d.createElement("table",{...e})}function Cf(e){return d.createElement("div",{...e})}const ai=d.createContext(void 0);function Qt(){const e=d.useContext(ai);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function $f(e){const{components:t}=Qt();return d.createElement(t.Dropdown,{...e})}function Sf(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[A.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[A.Chevron],orientation:"left"})),d.createElement(l.NextMonthButton,{type:"button",className:a[A.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[A.Chevron]})))}function jf(e){const{components:t}=Qt();return d.createElement(t.Button,{...e})}function If(e){return d.createElement("option",{...e})}function Df(e){const{components:t}=Qt();return d.createElement(t.Button,{...e})}function _f(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function Tf(e){return d.createElement("select",{...e})}function Ef(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function zf(e){return d.createElement("th",{...e})}function Mf(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function Of(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function Rf(e){return d.createElement("th",{...e})}function Nf(e){return d.createElement("tbody",{...e})}function Ff(e){const{components:t}=Qt();return d.createElement(t.Dropdown,{...e})}const Af=Object.freeze(Object.defineProperty({__proto__:null,Button:pf,CaptionLabel:hf,Chevron:ff,Day:gf,DayButton:mf,Dropdown:bf,DropdownNav:xf,Footer:yf,Month:vf,MonthCaption:kf,MonthGrid:wf,Months:Cf,MonthsDropdown:$f,Nav:Sf,NextMonthButton:jf,Option:If,PreviousMonthButton:Df,Root:_f,Select:Tf,Week:Ef,WeekNumber:Of,WeekNumberHeader:Rf,Weekday:zf,Weekdays:Mf,Weeks:Nf,YearsDropdown:Ff},Symbol.toStringTag,{value:"Module"}));function tt(e,t,o=!1,n=Ye){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 li(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function En(e){return!!(e&&typeof e=="object"&&"from"in e)}function ci(e){return!!(e&&typeof e=="object"&&"after"in e)}function di(e){return!!(e&&typeof e=="object"&&"before"in e)}function ui(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function pi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,o=Ye){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(pi(a,o))return a.includes(e);if(En(a))return tt(a,e,!1,o);if(ui(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(li(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 ci(a)?s(e,a.after)>0:di(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function Lf(e,t,o,n,r){const{disabled:s,hidden:l,modifiers:a,showOutsideDays:u,broadcastCalendar:p,today:h}=t,{isSameDay:f,isSameMonth:m,startOfMonth:b,isBefore:x,endOfMonth:y,isAfter:k}=r,v=o&&b(o),$=n&&y(n),C={[se.focused]:[],[se.outside]:[],[se.disabled]:[],[se.hidden]:[],[se.today]:[]},S={};for(const w of e){const{date:I,displayMonth:j}=w,D=!!(j&&!m(I,j)),L=!!(v&&x(I,v)),U=!!($&&k(I,$)),P=!!(s&&ot(I,s,r)),B=!!(l&&ot(I,l,r))||L||U||!p&&!u&&D||p&&u===!1&&D,Z=f(I,h??r.today());D&&C.outside.push(w),P&&C.disabled.push(w),B&&C.hidden.push(w),Z&&C.today.push(w),a&&Object.keys(a).forEach(ie=>{const J=a==null?void 0:a[ie];J&&ot(I,J,r)&&(S[ie]?S[ie].push(w):S[ie]=[w])})}return w=>{const I={[se.focused]:!1,[se.disabled]:!1,[se.hidden]:!1,[se.outside]:!1,[se.today]:!1},j={};for(const D in C){const L=C[D];I[D]=L.some(U=>U===w)}for(const D in S)j[D]=S[D].some(L=>L===w);return{...I,...j}}}function Bf(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[se[s]]?r.push(t[se[s]]):t[Fe[s]]&&r.push(t[Fe[s]]),r),[t[A.Day]])}function Wf(e){return{...Af,...e}}function Pf(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 Vf(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in se)e[se[t]]=`rdp-${se[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in ge)e[ge[t]]=`rdp-${ge[t]}`;return e}function hi(e,t,o){return(o??new st(t)).format(e,"LLLL y")}const Hf=hi;function Uf(e,t,o){return(o??new st(t)).format(e,"d")}function Gf(e,t=Ye){return t.format(e,"LLLL")}function Kf(e,t,o){return(o??new st(t)).format(e,"cccccc")}function Yf(e,t=Ye){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function qf(){return""}function fi(e,t=Ye){return t.format(e,"yyyy")}const Zf=fi,Xf=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:hi,formatDay:Uf,formatMonthCaption:Hf,formatMonthDropdown:Gf,formatWeekNumber:Yf,formatWeekNumberHeader:qf,formatWeekdayName:Kf,formatYearCaption:Zf,formatYearDropdown:fi},Symbol.toStringTag,{value:"Module"}));function Jf(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Xf,...e}}function Qf(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 b=n.formatMonthDropdown(m,r),x=p(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:x,label:b,disabled:y}})}function eg(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function tg(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 og(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),b=[];let x=f;for(;p(x,m)||h(x,m);)b.push(x),x=a(x,1);return r&&b.reverse(),b.map(y=>{const k=o.formatYearDropdown(y,n);return{value:u(y),label:k,disabled:!1}})}function gi(e,t,o,n){let r=(n??new st(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const ng=gi;function mi(e,t,o){return(o??new st(t)).format(e,"LLLL y")}const rg=mi;function sg(e,t,o,n){let r=(n??new st(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function ig(e){return"Choose the Month"}function ag(){return""}function lg(e){return"Go to the Next Month"}function cg(e){return"Go to the Previous Month"}function dg(e,t,o){return(o??new st(t)).format(e,"cccc")}function ug(e,t){return`Week ${e}`}function pg(e){return"Week Number"}function hg(e){return"Choose the Year"}const fg=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:rg,labelDay:ng,labelDayButton:gi,labelGrid:mi,labelGridcell:sg,labelMonthDropdown:ig,labelNav:ag,labelNext:lg,labelPrevious:cg,labelWeekNumber:ug,labelWeekNumberHeader:pg,labelWeekday:dg,labelYearDropdown:hg},Symbol.toStringTag,{value:"Module"})),eo=e=>e instanceof HTMLElement?e:null,Vo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],gg=e=>eo(e.querySelector("[data-animated-month]")),Ho=e=>eo(e.querySelector("[data-animated-caption]")),Uo=e=>eo(e.querySelector("[data-animated-weeks]")),mg=e=>eo(e.querySelector("[data-animated-nav]")),bg=e=>eo(e.querySelector("[data-animated-weekdays]"));function xg(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],b=f?o[ge.weeks_after_enter]:o[ge.weeks_before_enter],x=l.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Vo(y).forEach(C=>{if(!(C instanceof HTMLElement))return;const S=gg(C);S&&C.contains(S)&&C.removeChild(S);const w=Ho(C);w&&w.classList.remove(m);const I=Uo(C);I&&I.classList.remove(b)}),l.current=y):l.current=null,u.current||h||r)return;const k=x instanceof HTMLElement?Vo(x):[],v=Vo(e.current);if(v!=null&&v.every($=>$ instanceof HTMLElement)&&k&&k.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=mg(e.current);$&&($.style.zIndex="1"),v.forEach((C,S)=>{const w=k[S];if(!w)return;C.style.position="relative",C.style.overflow="hidden";const I=Ho(C);I&&I.classList.add(m);const j=Uo(C);j&&j.classList.add(b);const D=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),I&&I.classList.remove(m),j&&j.classList.remove(b),C.style.position="",C.style.overflow="",C.contains(w)&&C.removeChild(w)};w.style.pointerEvents="none",w.style.position="absolute",w.style.overflow="hidden",w.setAttribute("aria-hidden","true");const L=bg(w);L&&(L.style.opacity="0");const U=Ho(w);U&&(U.classList.add(f?o[ge.caption_before_exit]:o[ge.caption_after_exit]),U.addEventListener("animationend",D));const P=Uo(w);P&&P.classList.add(f?o[ge.weeks_before_exit]:o[ge.weeks_after_exit]),C.insertBefore(w,C.firstChild)})}})}function yg(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:b,endOfMonth:x,endOfWeek:y,isAfter:k,startOfBroadcastWeek:v,startOfISOWeek:$,startOfWeek:C}=n,S=u?v(r,n):l?$(r):C(r),w=u?m(s):l?b(x(s)):y(x(s)),I=h(w,S),j=f(s,r)+1,D=[];for(let P=0;P<=I;P++){const B=p(S,P);if(t&&k(B,t))break;D.push(B)}const U=(u?35:42)*j;if(a&&D.length<U){const P=U-D.length;for(let B=0;B<P;B++){const Z=p(D[D.length-1],1);D.push(Z)}}return D}function vg(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 kg(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 wr(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 wg(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:l,endOfMonth:a,endOfWeek:u,getISOWeek:p,getWeek:h,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:b}=n,x=e.reduce((y,k)=>{const v=o.broadcastCalendar?f(k,n):o.ISOWeek?m(k):b(k),$=o.broadcastCalendar?s(k):o.ISOWeek?l(a(k)):u(a(k)),C=t.filter(j=>j>=v&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&C.length<S){const j=t.filter(D=>{const L=S-C.length;return D>$&&D<=r($,L)});C.push(...j)}const w=C.reduce((j,D)=>{const L=o.ISOWeek?p(D):h(D),U=j.find(B=>B.weekNumber===L),P=new ii(D,k,n);return U?U.days.push(P):j.push(new uf(L,[P])),j},[]),I=new df(k,w);return y.push(I),y},[]);return o.reverseMonths?x.reverse():x}function Cg(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:b,fromMonth:x,toMonth:y}=e;!o&&x&&(o=x),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&b&&(n=h(b,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=l(o):m?o=h(m,0,1):!o&&k&&(o=r(u(e.today??f(),-100))),n?n=a(n):b?n=h(b,11,31):!n&&k&&(n=p(e.today??f())),[o&&s(o),n&&s(n)]}function $g(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 Sg(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 jg(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function $o(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function Ig(e,t){const[o,n]=Cg(e,t),{startOfMonth:r,endOfMonth:s}=t,l=wr(e,o,n,t),[a,u]=$o(l,e.month?l:void 0);d.useEffect(()=>{const I=wr(e,o,n,t);u(I)},[e.timeZone]);const p=kg(a,n,e,t),h=yg(p,e.endMonth?s(e.endMonth):void 0,e,t),f=wg(p,h,e,t),m=jg(f),b=vg(f),x=Sg(a,o,e,t),y=$g(a,n,e,t),{disableNavigation:k,onMonthChange:v}=e,$=I=>m.some(j=>j.days.some(D=>D.isEqualTo(I))),C=I=>{if(k)return;let j=r(I);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),v==null||v(j)};return{months:f,weeks:m,days:b,navStart:o,navEnd:n,previousMonth:x,nextMonth:y,goToMonth:C,goToDay:I=>{$(I)||C(I.date)}}}var Ve;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ve||(Ve={}));function Cr(e){return!e[se.disabled]&&!e[se.hidden]&&!e[se.outside]}function Dg(e,t,o,n){let r,s=-1;for(const l of e){const a=t(l);Cr(a)&&(a[se.focused]&&s<Ve.FocusedModifier?(r=l,s=Ve.FocusedModifier):n!=null&&n.isEqualTo(l)&&s<Ve.LastFocused?(r=l,s=Ve.LastFocused):o(l.date)&&s<Ve.Selected?(r=l,s=Ve.Selected):a[se.today]&&s<Ve.Today&&(r=l,s=Ve.Today))}return r||(r=e.find(l=>Cr(t(l)))),r}function _g(e,t,o,n,r,s,l){const{ISOWeek:a,broadcastCalendar:u}=s,{addDays:p,addMonths:h,addWeeks:f,addYears:m,endOfBroadcastWeek:b,endOfISOWeek:x,endOfWeek:y,max:k,min:v,startOfBroadcastWeek:$,startOfISOWeek:C,startOfWeek:S}=l;let I={day:p,week:f,month:h,year:m,startOfWeek:j=>u?$(j,l):a?C(j):S(j),endOfWeek:j=>u?b(j):a?x(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?I=k([n,I]):t==="after"&&r&&(I=v([r,I])),I}function bi(e,t,o,n,r,s,l,a=0){if(a>365)return;const u=_g(e,t,o.date,n,r,s,l),p=!!(s.disabled&&ot(u,s.disabled,l)),h=!!(s.hidden&&ot(u,s.hidden,l)),f=u,m=new ii(u,f,l);return!p&&!h?m:bi(e,t,m,n,r,s,l,a+1)}function Tg(e,t,o,n,r){const{autoFocus:s}=e,[l,a]=d.useState(),u=Dg(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,k)=>{if(!p)return;const v=bi(y,k,p,t.navStart,t.navEnd,e,r);v&&(t.goToDay(v),h(v))}}}function Eg(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=$o(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t,p=b=>(a==null?void 0:a.some(x=>u(x,b)))??!1,{min:h,max:f}=e;return{selected:a,select:(b,x,y)=>{let k=[...a??[]];if(p(b)){if((a==null?void 0:a.length)===h||n&&(a==null?void 0:a.length)===1)return;k=a==null?void 0:a.filter(v=>!u(v,b))}else(a==null?void 0:a.length)===f?k=[b]:k=[...k,b];return r||l(k),r==null||r(k,b,x,y),k},isSelected:p}}function zg(e,t,o=0,n=0,r=!1,s=Ye){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 Mg(e,t,o=Ye){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 $r(e,t,o=Ye){return tt(e,t.from,!1,o)||tt(e,t.to,!1,o)||tt(t,e.from,!1,o)||tt(t,e.to,!1,o)}function Og(e,t,o=Ye){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:o.isDate(a)?tt(e,a,!1,o):pi(a,o)?a.some(u=>tt(e,u,!1,o)):En(a)?a.from&&a.to?$r(e,{from:a.from,to:a.to},o):!1:ui(a)?Mg(e,a.dayOfWeek,o):li(a)?o.isAfter(a.before,a.after)?$r(e,{from:o.addDays(a.after,1),to:o.addDays(a.before,-1)},o):ot(e.from,a,o)||ot(e.to,a,o):ci(a)||di(a)?ot(e.from,a,o)||ot(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 Rg(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:l}=e,[a,u]=$o(r,l?r:void 0),p=l?r:a;return{selected:p,select:(m,b,x)=>{const{min:y,max:k}=e,v=m?zg(m,p,y,k,s,t):void 0;return n&&o&&(v!=null&&v.from)&&v.to&&Og({from:v.from,to:v.to},o,t)&&(v.from=m,v.to=void 0),l||u(v),l==null||l(v,m,b,x),v},isSelected:m=>p&&tt(p,m,!1,t)}}function Ng(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=$o(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t;return{selected:a,select:(f,m,b)=>{let x=f;return!n&&a&&a&&u(f,a)&&(x=void 0),r||l(x),r==null||r(x,f,m,b),x},isSelected:f=>a?u(a,f):!1}}function Fg(e,t){const o=Ng(e,t),n=Eg(e,t),r=Rg(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function Ag(e){var rr;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new ce(t.today,t.timeZone)),t.month&&(t.month=new ce(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new ce(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new ce(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new ce(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new ce(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(rr=t.selected)==null?void 0:rr.map(H=>new ce(H,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new ce(t.selected.from,t.timeZone):void 0,to:t.selected.to?new ce(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:l,classNames:a}=d.useMemo(()=>{const H={...ri,...t.locale};return{dateLib:new st({locale:H,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Wf(t.components),formatters:Jf(t.formatters),labels:{...fg,...t.labels},locale:H,classNames:{...Vf(),...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:b,onDayFocus:x,onDayKeyDown:y,onDayMouseEnter:k,onDayMouseLeave:v,onNextClick:$,onPrevClick:C,showWeekNumber:S,styles:w}=t,{formatCaption:I,formatDay:j,formatMonthDropdown:D,formatWeekNumber:L,formatWeekNumberHeader:U,formatWeekdayName:P,formatYearDropdown:B}=n,Z=Ig(t,s),{days:ie,months:J,navStart:X,navEnd:Ie,previousMonth:le,nextMonth:pe,goToMonth:Q}=Z,K=Lf(ie,t,X,Ie,s),{isSelected:ee,select:Xe,selected:We}=Fg(t,s)??{},{blur:Qn,focused:no,isFocusTarget:ga,moveFocus:er,setFocused:ro}=Tg(t,Z,K,ee??(()=>!1),s),{labelDayButton:ma,labelGridcell:ba,labelGrid:xa,labelMonthDropdown:ya,labelNav:tr,labelPrevious:va,labelNext:ka,labelWeekday:wa,labelWeekNumber:Ca,labelWeekNumberHeader:$a,labelYearDropdown:Sa}=r,ja=d.useMemo(()=>tg(s,t.ISOWeek),[s,t.ISOWeek]),or=p!==void 0||b!==void 0,Eo=d.useCallback(()=>{le&&(Q(le),C==null||C(le))},[le,Q,C]),zo=d.useCallback(()=>{pe&&(Q(pe),$==null||$(pe))},[Q,pe,$]),Ia=d.useCallback((H,te)=>V=>{V.preventDefault(),V.stopPropagation(),ro(H),Xe==null||Xe(H.date,te,V),b==null||b(H.date,te,V)},[Xe,b,ro]),Da=d.useCallback((H,te)=>V=>{ro(H),x==null||x(H.date,te,V)},[x,ro]),_a=d.useCallback((H,te)=>V=>{Qn(),m==null||m(H.date,te,V)},[Qn,m]),Ta=d.useCallback((H,te)=>V=>{const oe={ArrowLeft:[V.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[V.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[V.shiftKey?"year":"week","after"],ArrowUp:[V.shiftKey?"year":"week","before"],PageUp:[V.shiftKey?"year":"month","before"],PageDown:[V.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(oe[V.key]){V.preventDefault(),V.stopPropagation();const[be,Y]=oe[V.key];er(be,Y)}y==null||y(H.date,te,V)},[er,y,t.dir]),Ea=d.useCallback((H,te)=>V=>{k==null||k(H.date,te,V)},[k]),za=d.useCallback((H,te)=>V=>{v==null||v(H.date,te,V)},[v]),Ma=d.useCallback(H=>te=>{const V=Number(te.target.value),oe=s.setMonth(s.startOfMonth(H),V);Q(oe)},[s,Q]),Oa=d.useCallback(H=>te=>{const V=Number(te.target.value),oe=s.setYear(s.startOfMonth(H),V);Q(oe)},[s,Q]),{className:Ra,style:Na}=d.useMemo(()=>({className:[a[A.Root],t.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[A.Root],...t.style}}),[a,t.className,t.style,w]),Fa=Pf(t),nr=d.useRef(null);xg(nr,!!t.animate,{classNames:a,months:J,focused:no,dateLib:s});const Aa={dayPickerProps:t,selected:We,select:Xe,isSelected:ee,months:J,nextMonth:pe,previousMonth:le,goToMonth:Q,getModifiers:K,components:o,classNames:a,styles:w,labels:r,formatters:n};return d.createElement(ai.Provider,{value:Aa},d.createElement(o.Root,{rootRef:t.animate?nr:void 0,className:Ra,style:Na,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Fa},d.createElement(o.Months,{className:a[A.Months],style:w==null?void 0:w[A.Months]},!t.hideNavigation&&!h&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:w==null?void 0:w[A.Nav],"aria-label":tr(),onPreviousClick:Eo,onNextClick:zo,previousMonth:le,nextMonth:pe}),J.map((H,te)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:a[A.Month],style:w==null?void 0:w[A.Month],key:te,displayIndex:te,calendarMonth:H},h==="around"&&!t.hideNavigation&&te===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:le?void 0:-1,"aria-disabled":le?void 0:!0,"aria-label":va(le),onClick:Eo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:le?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[A.MonthCaption],style:w==null?void 0:w[A.MonthCaption],calendarMonth:H,displayIndex:te},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:a[A.Dropdowns],style:w==null?void 0:w[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:a[A.MonthsDropdown],"aria-label":ya(),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Ma(H.date),options:Qf(H.date,X,Ie,n,s),style:w==null?void 0:w[A.Dropdown],value:s.getMonth(H.date)}):d.createElement("span",null,D(H.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:a[A.YearsDropdown],"aria-label":Sa(s.options),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Oa(H.date),options:og(X,Ie,n,s,!!t.reverseYears),style:w==null?void 0:w[A.Dropdown],value:s.getYear(H.date)}):d.createElement("span",null,B(H.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"}},I(H.date,s.options,s))):d.createElement(o.CaptionLabel,{className:a[A.CaptionLabel],role:"status","aria-live":"polite"},I(H.date,s.options,s))),h==="around"&&!t.hideNavigation&&te===f-1&&d.createElement(o.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:pe?void 0:-1,"aria-disabled":pe?void 0:!0,"aria-label":ka(pe),onClick:zo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:pe?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),te===f-1&&h==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:w==null?void 0:w[A.Nav],"aria-label":tr(),onPreviousClick:Eo,onNextClick:zo,previousMonth:le,nextMonth:pe}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":xa(H.date,s.options,s)||void 0,className:a[A.MonthGrid],style:w==null?void 0:w[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[A.Weekdays],style:w==null?void 0:w[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":$a(s.options),className:a[A.WeekNumberHeader],style:w==null?void 0:w[A.WeekNumberHeader],scope:"col"},U()),ja.map(V=>d.createElement(o.Weekday,{"aria-label":wa(V,s.options,s),className:a[A.Weekday],key:String(V),style:w==null?void 0:w[A.Weekday],scope:"col"},P(V,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[A.Weeks],style:w==null?void 0:w[A.Weeks]},H.weeks.map(V=>d.createElement(o.Week,{className:a[A.Week],key:V.weekNumber,style:w==null?void 0:w[A.Week],week:V},S&&d.createElement(o.WeekNumber,{week:V,style:w==null?void 0:w[A.WeekNumber],"aria-label":Ca(V.weekNumber,{locale:l}),className:a[A.WeekNumber],scope:"row",role:"rowheader"},L(V.weekNumber,s)),V.days.map(oe=>{const{date:be}=oe,Y=K(oe);if(Y[se.focused]=!Y.hidden&&!!(no!=null&&no.isEqualTo(oe)),Y[Fe.selected]=(ee==null?void 0:ee(be))||Y.selected,En(We)){const{from:Mo,to:Oo}=We;Y[Fe.range_start]=!!(Mo&&Oo&&s.isSameDay(be,Mo)),Y[Fe.range_end]=!!(Mo&&Oo&&s.isSameDay(be,Oo)),Y[Fe.range_middle]=tt(We,be,!0,s)}const La=eg(Y,w,t.modifiersStyles),Ba=Bf(Y,a,t.modifiersClassNames),Wa=!or&&!Y.hidden?ba(be,Y,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(be,"yyyy-MM-dd")}_${s.format(oe.displayMonth,"yyyy-MM")}`,day:oe,modifiers:Y,className:Ba.join(" "),style:La,role:"gridcell","aria-selected":Y.selected||void 0,"aria-label":Wa,"data-day":s.format(be,"yyyy-MM-dd"),"data-month":oe.outside?s.format(be,"yyyy-MM"):void 0,"data-selected":Y.selected||void 0,"data-disabled":Y.disabled||void 0,"data-hidden":Y.hidden||void 0,"data-outside":oe.outside||void 0,"data-focused":Y.focused||void 0,"data-today":Y.today||void 0},!Y.hidden&&or?d.createElement(o.DayButton,{className:a[A.DayButton],style:w==null?void 0:w[A.DayButton],type:"button",day:oe,modifiers:Y,disabled:Y.disabled||void 0,tabIndex:ga(oe)?0:-1,"aria-label":ma(be,Y,s.options,s),onClick:Ia(oe,Y),onBlur:_a(oe,Y),onFocus:Da(oe,Y),onKeyDown:Ta(oe,Y),onMouseEnter:Ea(oe,Y),onMouseLeave:za(oe,Y)},j(be,s.options,s)):!Y.hidden&&j(oe.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:a[A.Footer],style:w==null?void 0:w[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const Lg=d.memo(({...e})=>i.jsx(Bg,{mode:"single",...e})),Bg=g(Ag)`
|
|
2230
|
+
font-family: ${c("font-family-default")};
|
|
2231
|
+
`,xi=({disabled:e,isSmall:t,children:o,value:n,id:r,placeholder:s,prefixIcon:l,prefixIconColor:a,className:u,getLabel:p,getIcon:h,onSelect:f,onKeyDown:m})=>{var I,j;const b=d.useRef(n);d.useEffect(()=>{b.current=n},[n]);const x=d.useCallback(D=>{let L=h==null?void 0:h(D),U=p==null?void 0:p(D),P;return D&&d.Children.forEach(o,B=>{d.isValidElement(B)&&B.props.optionKey&&B.props.optionKey===D&&(P=B)}),P!==void 0&&d.isValidElement(P)&&P.props.label&&(U=U??P.props.label,L=L??P.props.prefixIconId),{label:U??"",iconId:L}},[o,h,p]),y=d.useCallback((D,L)=>{let U=null;return d.Children.forEach(D,(P,B)=>{d.isValidElement(P)&&P.props.optionKey&&P.props.optionKey===L&&(U=B)}),U},[]),[k,v]=d.useState(y(o,n));d.useEffect(()=>{v(y(o,b.current))},[o,y]);const[$,C]=d.useState((I=x(n))==null?void 0:I.label),[S,w]=d.useState((j=x(n))==null?void 0:j.iconId);return d.useEffect(()=>{const D=x(n);C(D==null?void 0:D.label),w(D==null?void 0:D.iconId)},[n,x]),i.jsx(z.ClassNames,{children:({cx:D})=>i.jsx(Pg,{onSelect:f,disabled:e,matchReferenceWidth:!0,selectedIndex:k,onSelectedIndexChange:v,Reference:i.jsx(Wg,{value:$??"",disabled:e,onChange:Se,id:r,onKeyDown:m,isSmall:t,prefixIconId:l||S,prefixIconColor:a,type:"text",placeholder:s,autoComplete:"off",className:D(u,"form-input"),suffixIconId:"Down",suffixIconColor:e?"grey":"black"}),children:o})})},Wg=g(Et)`
|
|
2232
|
+
caret-color: transparent;
|
|
2233
|
+
user-select: none;
|
|
2234
|
+
-webkit-user-select: none;
|
|
2235
|
+
`,Pg=g(zt)`
|
|
2236
|
+
max-height: 300px;
|
|
2237
|
+
`,[Go,Vg]=M(["option","select"]),zn=({trigger:e,onSelection:t,children:o})=>i.jsx(Ug,{Reference:e,onSelect:t,menuPlacement:"bottom-start",children:o}),Hg=g(dt)`
|
|
2238
|
+
${`${Go("bg-color",!0)}: ${c("color-black")}`};
|
|
2239
|
+
${`${Go("color",!0)}: ${c("color-white")}`};
|
|
2240
|
+
${`${Go("bg-color-active",!0)}: ${c("color-grey70")}`};
|
|
2241
|
+
gap: 0px;
|
|
2242
|
+
cursor: pointer;
|
|
2243
|
+
`,Ug=g(zt)`
|
|
2244
|
+
${`${Vg("border-color",!0)}: ${c("color-black")}`};
|
|
2245
|
+
z-index: 15;
|
|
2246
|
+
`,Mn=g.div`
|
|
2247
|
+
cursor: default;
|
|
2248
|
+
border-bottom: 0.5px solid ${c("color-grey60")};
|
|
2249
|
+
pointer-events: none;
|
|
2250
|
+
`,Gg=d.memo(({title:e,message:t})=>i.jsxs(Kg,{children:[i.jsx(T,{variant:"body",bold:!0,children:e}),i.jsx(T,{variant:"body",color:"grey",children:t})]})),Kg=g.div`
|
|
2251
|
+
display: flex;
|
|
2252
|
+
padding: ${c("spacing-8")} ${c("spacing-10")}
|
|
2253
|
+
${c("spacing-8")} ${c("spacing-20")};
|
|
2254
|
+
flex-direction: column;
|
|
2255
|
+
align-items: flex-start;
|
|
2256
|
+
gap: ${c("spacing-8")};
|
|
2257
|
+
align-self: stretch;
|
|
2258
|
+
max-width: 100%;
|
|
2259
|
+
word-wrap: break-word;
|
|
2260
|
+
overflow-wrap: break-word;
|
|
2261
|
+
`,Yg=e=>typeof e=="string"?e.trim().length>0||"Required":!0,qg=e=>{const{register:t}=e,o=d.useCallback((r,s)=>{if(!s||!s.required)return t(r,s);const l=typeof s.validate=="function"?{default:s.validate}:s.validate,a={...s,validate:{...l,whitespaces:Yg}};return t(r,a)},[t]),n=d.useMemo(()=>({...e.control,register:o}),[e.control,o]);return{...e,register:o,control:n}};function yi({children:e,onSubmit:t,onRootErrorChange:o,className:n,defaultValues:r,variant:s="submit",...l}){const a=G.useForm({shouldUnregister:!0,defaultValues:r,...l,mode:s==="blur"?"onBlur":l.mode}),u=qg(a),p=u.formState.errors.root;d.useEffect(()=>{o&&o(p)},[p,o]);const h=d.useCallback(async f=>{await t(f,u.setError)},[u.setError,t]);return i.jsx(G.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 Zg=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"})})),Xg=e=>e===void 0?i.jsx(Zg,{}):e?i.jsx(O,{iconId:"Check",color:"green",size:"sm"}):i.jsx(O,{iconId:"Close",color:"red",size:"sm"}),vi=d.memo(({isBlank:e,requirements:t,metRequirements:o,bulletGetter:n,className:r,t:s,title:l})=>i.jsxs(Jg,{className:r,children:[!!l&&i.jsx(T,{color:"dark",bold:!0,variant:"body",children:l}),i.jsx(Qg,{children:t.map(a=>{const u=e?void 0:o.includes(a.id);return i.jsxs(em,{children:[n?n(a.id,u):Xg(u),i.jsx(tm,{variant:"body",color:"dark",children:s?s(a.textKey):a.id})]},a.id)})})]})),Jg=g.div`
|
|
2136
2262
|
display: flex;
|
|
2137
2263
|
align-items: flex-start;
|
|
2138
2264
|
justify-content: flex-start;
|
|
2139
2265
|
flex-direction: column;
|
|
2140
|
-
`,
|
|
2266
|
+
`,Qg=g.ul`
|
|
2141
2267
|
margin: 0px;
|
|
2142
2268
|
padding-left: 0px;
|
|
2143
2269
|
row-gap: 4px;
|
|
2144
2270
|
list-style-type: none;
|
|
2145
2271
|
list-style-position: inside;
|
|
2146
|
-
`,
|
|
2272
|
+
`,em=g.li`
|
|
2147
2273
|
margin: 0;
|
|
2148
2274
|
align-items: center;
|
|
2149
2275
|
display: flex;
|
|
2150
2276
|
justify-content: flex-start;
|
|
2151
|
-
`,
|
|
2277
|
+
`,tm=g(T)`
|
|
2152
2278
|
margin-left: 4px;
|
|
2153
|
-
`,
|
|
2279
|
+
`,om=()=>G.useFormContext(),[Sr]=M(["form"]),On=[{textKey:"passwordRequirements.length",id:"length"},{textKey:"passwordRequirements.uppercaseAndNumber",id:"uppercaseAndNumber"},{textKey:"passwordRequirements.specialCharacter",id:"specialCharacter"}],ki=[{textKey:"passwordRequirements.tooSimilar",id:"tooSimilar"},...On],nm=d.memo(({name:e,t,hasLabel:o,includeTooSimilar:n})=>{const{getFieldState:r,formState:s}=om(),{error:l,isDirty:a}=r(e??"password",s),u=d.useMemo(()=>{const p=(l==null?void 0:l.types)??{},h=[];return!p.minLength&&!p.required&&h.push("length"),!p.tooSimilar&&n&&h.push("tooSimilar"),!p[Vt.noDigit]&&!p[Vt.noUpperCase]&&h.push("uppercaseAndNumber"),p[Vt.noSpecialCharacter]||h.push("specialCharacter"),h},[l==null?void 0:l.types,n]);return i.jsx(z.ClassNames,{children:({cx:p})=>i.jsx(rm,{t,className:p({hasLabel:o}),isBlank:!a&&!l,requirements:n?ki:On,title:(t==null?void 0:t("passwordRequirements.title"))??"Password Requirements",metRequirements:u})})}),rm=g(vi)`
|
|
2154
2280
|
width: 100%;
|
|
2155
2281
|
align-items: flex-start;
|
|
2156
2282
|
justify-content: flex-start;
|
|
2157
2283
|
&.hasLabel {
|
|
2158
|
-
padding-left: calc(${
|
|
2284
|
+
padding-left: calc(${Sr("label-width")} + ${Sr("label-column-gap")});
|
|
2159
2285
|
}
|
|
2160
|
-
`,[pt]=M(["form"]),me=d.forwardRef(({className:e,required:t,formItemId:o,isValid:n,...r},s)=>i.jsx(z.ClassNames,{children:({cx:l})=>i.jsx(
|
|
2286
|
+
`,[pt]=M(["form"]),me=d.forwardRef(({className:e,required:t,formItemId:o,isValid:n,...r},s)=>i.jsx(z.ClassNames,{children:({cx:l})=>i.jsx(sm,{ref:s,"aria-required":t,"aria-invalid":!n,className:l(e,"form-label"),htmlFor:o,...r})})),sm=g.label`
|
|
2161
2287
|
font-family: ${pt("label-font-family")};
|
|
2162
2288
|
font-size: ${pt("label-font-size")};
|
|
2163
2289
|
font-weight: ${pt("label-font-weight")};
|
|
@@ -2172,29 +2298,29 @@
|
|
|
2172
2298
|
color: ${pt("label-error-color")};
|
|
2173
2299
|
}
|
|
2174
2300
|
}
|
|
2175
|
-
`;me.displayName="FormLabel";const[
|
|
2301
|
+
`;me.displayName="FormLabel";const[Ko]=M(["form"]),qe=d.memo(({handleError:e,name:t,hasLabel:o})=>{const{getFieldState:n,formState:r}=G.useFormContext(),{error:s}=n(t,r);if(!s)return null;const l=e==="message"?s.message:e(s);return l?i.jsx(im,{className:o?"hasLabel":void 0,variant:"body",color:"red",children:l}):null}),im=g(T)`
|
|
2176
2302
|
width: 100%;
|
|
2177
|
-
margin-top: ${
|
|
2303
|
+
margin-top: ${Ko("error-message-top-margin")};
|
|
2178
2304
|
&.hasLabel {
|
|
2179
|
-
padding-left: calc(${
|
|
2305
|
+
padding-left: calc(${Ko("label-width")} + ${Ko("label-column-gap")});
|
|
2180
2306
|
}
|
|
2181
|
-
`,[
|
|
2307
|
+
`,[sn]=M(["form"]),Ze=g.div`
|
|
2182
2308
|
display: flex;
|
|
2183
2309
|
align-items: center;
|
|
2184
2310
|
justify-content: flex-start;
|
|
2185
2311
|
flex-direction: column;
|
|
2186
2312
|
width: 100%;
|
|
2187
2313
|
position: relative;
|
|
2188
|
-
`,
|
|
2314
|
+
`,Be=g.div`
|
|
2189
2315
|
display: grid;
|
|
2190
2316
|
align-items: center;
|
|
2191
2317
|
grid-template-columns: 1fr;
|
|
2192
2318
|
width: 100%;
|
|
2193
|
-
column-gap: ${
|
|
2319
|
+
column-gap: ${sn("label-column-gap")};
|
|
2194
2320
|
&.hasLabel {
|
|
2195
|
-
grid-template-columns: ${
|
|
2321
|
+
grid-template-columns: ${sn("label-width")} 1fr;
|
|
2196
2322
|
}
|
|
2197
|
-
`,
|
|
2323
|
+
`,wi=g(Be)`
|
|
2198
2324
|
align-items: flex-start;
|
|
2199
2325
|
|
|
2200
2326
|
/*
|
|
@@ -2205,33 +2331,27 @@
|
|
|
2205
2331
|
can help...
|
|
2206
2332
|
|
|
2207
2333
|
& label {
|
|
2208
|
-
padding: ${
|
|
2334
|
+
padding: ${sn("label-area-padding")};
|
|
2209
2335
|
} */
|
|
2210
|
-
`,
|
|
2336
|
+
`,Rn=g.input`
|
|
2211
2337
|
visibility: hidden;
|
|
2212
2338
|
position: absolute;
|
|
2213
2339
|
right: 0;
|
|
2214
2340
|
top: 0;
|
|
2215
2341
|
pointer-events: none;
|
|
2216
|
-
`,
|
|
2342
|
+
`,am=({name:e,disabled:t,label:o,className:n,handleError:r,showIcons:s,readOnly:l,...a})=>{const{control:u}=G.useFormContext(),{field:{onChange:p,value:h,disabled:f},fieldState:{error:m}}=G.useController({name:e,control:u,rules:a,disabled:t}),b=d.useId();return i.jsx(z.ClassNames,{children:({cx:x})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:x({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:b,isValid:!m,required:!!a.required,children:o}),i.jsx(lm,{children:i.jsx(ko,{checked:h,disabled:f,readOnly:l,onChange:p,showIcons:s,id:b})})]}),!!r&&i.jsx(qe,{handleError:r,name:e,hasLabel:!!o})]})})},lm=g.div`
|
|
2217
2343
|
width: 100%;
|
|
2218
2344
|
display: flex;
|
|
2219
2345
|
align-items: center;
|
|
2220
2346
|
justify-content: flex-start;
|
|
2221
|
-
`,
|
|
2222
|
-
caret-color: transparent;
|
|
2223
|
-
user-select: none;
|
|
2224
|
-
-webkit-user-select: none;
|
|
2225
|
-
`,_h=g(zt)`
|
|
2226
|
-
max-height: 300px;
|
|
2227
|
-
`,Th=({name:e,disabled:t,label:o,handleError:n,children:r,placeholder:s,prefixIcon:l,prefixIconColor:a,className:u,readOnly:p,onSelectionChange:h,...f})=>{const{control:m}=G.useFormContext(),{field:{ref:b,...x},fieldState:{error:y}}=G.useController({name:e,control:m,rules:f,disabled:t}),k=d.useId(),{onChange:v}=x,$=d.useCallback(C=>{v(C),h&&h(C)},[v,h]);return i.jsx(z.ClassNames,{children:({cx:C})=>i.jsxs(qe,{children:[i.jsxs(Le,{className:C({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:k,isValid:!y,required:!!f.required,children:o}),i.jsx(si,{disabled:t||p,onSelect:$,className:u,id:k,value:x.value,children:r})]}),!!n&&i.jsx(Ye,{handleError:n,name:e,hasLabel:!!o}),i.jsx(zn,{ref:b,...x})]})})},Eh=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:l,prefixIconId:a,prefixIconColor:u,suffixIconColor:p,suffixIconId:h,suffixIcon:f,autoFocus:m,readOnly:b,bold:x,...y},k)=>{const{control:v}=G.useFormContext(),{field:{ref:$,...C},fieldState:{error:S}}=G.useController({name:e,control:v,rules:y,disabled:t}),w=d.useId(),I=R.useMergeRefs([$,k]);return i.jsx(z.ClassNames,{children:({cx:j})=>i.jsxs(qe,{children:[i.jsxs(Le,{className:j({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:w,isValid:!S,required:!!y.required,children:o}),i.jsx(Et,{...C,onChange:D=>{y.autoTrim?C.onChange(D.target.value.trim()):C.onChange(D.target.value)},id:w,type:r,autoFocus:m,placeholder:n,ref:I,autoComplete:"off",prefixIconColor:u,prefixIconId:a,suffixIconId:h,suffixIconColor:p,suffixIcon:f,className:j(s,"form-input"),"aria-invalid":!!S,readOnly:b})]}),!!l&&i.jsx(Ye,{handleError:l,name:e,hasLabel:!!o})]})})},On=_t(Eh),zh=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:l,className:a,...u})=>{const{control:p}=G.useFormContext(),{field:h,fieldState:{error:f,...m}}=G.useController({name:t,control:p,rules:u,disabled:o}),b=d.useId(),x=e?ri:Le;return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(qe,{className:a,children:[i.jsxs(x,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(me,{formItemId:b,isValid:!f,required:!!u.required,children:r}),l(h,{error:f,readOnly:n,...m})]}),!!s&&i.jsx(Ye,{handleError:s,name:t,hasLabel:!!r})]})})},Mh=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...l},a)=>{const{control:u}=G.useFormContext(),{field:{ref:p,...h},fieldState:{error:f}}=G.useController({name:e,control:u,rules:l,disabled:t}),m=d.useId(),b=R.useMergeRefs([p,a]),x=d.useCallback(y=>{y.target.blur(),h.onChange(y)},[h]);return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(qe,{children:[i.jsxs(Le,{className:y({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:m,isValid:!f,required:!!l.required,children:o}),i.jsx(bt,{checked:!!h.value,disabled:h.disabled||s,onChange:x,id:m,ref:b,className:y(n,"form-checkbox"),"aria-invalid":!!f})]}),!!r&&i.jsx(Ye,{handleError:r,name:e,hasLabel:!!o})]})})},Oh=_t(Mh),[Gt]=M(["form"]),vr=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:l}}=G.useController({name:t,control:e,rules:{},disabled:!1}),a=d.useId();return i.jsxs(Rh,{children:[i.jsx(Nh,{isValid:!0,formItemId:a,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(ko,{checked:s,readOnly:l||n,onChange:r,id:a})]})},Rh=g.div`
|
|
2347
|
+
`,cm=({name:e,disabled:t,label:o,placeholder:n,className:r,handleError:s,autoFocus:l,wrap:a,readOnly:u,...p},h)=>{const{control:f}=G.useFormContext(),{field:{ref:m,...b},fieldState:{error:x}}=G.useController({name:e,control:f,rules:p,disabled:t}),y=d.useId(),k=R.useMergeRefs([m,h]);return i.jsx(z.ClassNames,{children:({cx:v})=>i.jsxs(Ze,{children:[i.jsxs(wi,{className:v({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:y,isValid:!x,required:!!p.required,children:o}),i.jsx(_n,{...b,id:y,placeholder:n,ref:k,autoComplete:"off",className:v(r,"form-text-area"),"aria-invalid":!!x,autoFocus:l,readOnly:u,wrap:a})]}),!!s&&i.jsx(qe,{handleError:s,name:e,hasLabel:!!o})]})})},dm=Tt(cm),um=({onSubmit:e,enabledIfClean:t,disabled:o,...n},r)=>{const{handleSubmit:s,setError:l,formState:{isValid:a,isSubmitting:u,dirtyFields:p}}=G.useFormContext(),h=d.useCallback(async b=>{console.log("[FormSubmit] _onSubmit data:",b),console.log("[FormSubmit] _onSubmit data keys:",Object.keys(b)),await e(b,l)},[l,e]),f=Object.keys(p).length>0,m=!a||u||!t&&!f||o;return i.jsx(Le,{type:"submit",...n,ref:r,disabled:m,onClick:s(h)})},Nn=Tt(um),pm=({name:e,disabled:t,label:o,handleError:n,children:r,placeholder:s,prefixIcon:l,prefixIconColor:a,className:u,readOnly:p,onSelectionChange:h,...f})=>{const{control:m}=G.useFormContext(),{field:{ref:b,...x},fieldState:{error:y}}=G.useController({name:e,control:m,rules:f,disabled:t}),k=d.useId(),{onChange:v}=x,$=d.useCallback(C=>{v(C),h&&h(C)},[v,h]);return i.jsx(z.ClassNames,{children:({cx:C})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:C({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:k,isValid:!y,required:!!f.required,children:o}),i.jsx(xi,{disabled:t||p,onSelect:$,className:u,id:k,value:x.value,children:r})]}),!!n&&i.jsx(qe,{handleError:n,name:e,hasLabel:!!o}),i.jsx(Rn,{ref:b,...x})]})})},hm=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:l,prefixIconId:a,prefixIconColor:u,suffixIconColor:p,suffixIconId:h,suffixIcon:f,autoFocus:m,readOnly:b,bold:x,...y},k)=>{const{control:v}=G.useFormContext(),{field:{ref:$,...C},fieldState:{error:S}}=G.useController({name:e,control:v,rules:y,disabled:t}),w=d.useId(),I=R.useMergeRefs([$,k]);return i.jsx(z.ClassNames,{children:({cx:j})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:j({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:w,isValid:!S,required:!!y.required,children:o}),i.jsx(Et,{...C,onChange:D=>{y.autoTrim?C.onChange(D.target.value.trim()):C.onChange(D.target.value)},id:w,type:r,autoFocus:m,placeholder:n,ref:I,autoComplete:"off",prefixIconColor:u,prefixIconId:a,suffixIconId:h,suffixIconColor:p,suffixIcon:f,className:j(s,"form-input"),"aria-invalid":!!S,readOnly:b})]}),!!l&&i.jsx(qe,{handleError:l,name:e,hasLabel:!!o})]})})},Fn=Tt(hm),fm=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:l,className:a,...u})=>{const{control:p}=G.useFormContext(),{field:h,fieldState:{error:f,...m}}=G.useController({name:t,control:p,rules:u,disabled:o}),b=d.useId(),x=e?wi:Be;return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(Ze,{className:a,children:[i.jsxs(x,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(me,{formItemId:b,isValid:!f,required:!!u.required,children:r}),l(h,{error:f,readOnly:n,...m})]}),!!s&&i.jsx(qe,{handleError:s,name:t,hasLabel:!!r})]})})},gm=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...l},a)=>{const{control:u}=G.useFormContext(),{field:{ref:p,...h},fieldState:{error:f}}=G.useController({name:e,control:u,rules:l,disabled:t}),m=d.useId(),b=R.useMergeRefs([p,a]),x=d.useCallback(y=>{y.target.blur(),h.onChange(y)},[h]);return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:y({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:m,isValid:!f,required:!!l.required,children:o}),i.jsx(bt,{checked:!!h.value,disabled:h.disabled||s,onChange:x,id:m,ref:b,className:y(n,"form-checkbox"),"aria-invalid":!!f})]}),!!r&&i.jsx(qe,{handleError:r,name:e,hasLabel:!!o})]})})},mm=Tt(gm),[Gt]=M(["form"]),jr=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:l}}=G.useController({name:t,control:e,rules:{},disabled:!1}),a=d.useId();return i.jsxs(bm,{children:[i.jsx(xm,{isValid:!0,formItemId:a,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(ko,{checked:s,readOnly:l||n,onChange:r,id:a})]})},bm=g.div`
|
|
2228
2348
|
display: flex;
|
|
2229
2349
|
align-items: center;
|
|
2230
2350
|
justify-content: flex-start;
|
|
2231
2351
|
column-gap: ${Gt("access-toggle-gap")};
|
|
2232
|
-
`,
|
|
2352
|
+
`,xm=g(me)`
|
|
2233
2353
|
width: auto;
|
|
2234
|
-
`,
|
|
2354
|
+
`,ym=({className:e,t,isAdmin:o,hideHide:n,hideLock:r})=>{const{control:s}=G.useFormContext(),l=G.useWatch();return o?i.jsxs(vm,{className:e,children:[i.jsx(T,{textAlign:"right",variant:"body",color:"dark",children:(t==null?void 0:t("access.label"))??"Access:"}),i.jsxs(km,{children:[!n&&i.jsx(jr,{name:"hidden",readOnly:!!l.locked,control:s}),!r&&i.jsx(jr,{name:"locked",control:s})]})]}):null},vm=g.div`
|
|
2235
2355
|
width: 100%;
|
|
2236
2356
|
display: grid;
|
|
2237
2357
|
align-items: center;
|
|
@@ -2240,30 +2360,30 @@
|
|
|
2240
2360
|
grid-template-columns: ${Gt("label-width")} 1fr;
|
|
2241
2361
|
height: ${Gt("access-toggle-height")};
|
|
2242
2362
|
column-gap: ${Gt("label-column-gap")};
|
|
2243
|
-
`,
|
|
2363
|
+
`,km=g.div`
|
|
2244
2364
|
width: 100%;
|
|
2245
2365
|
height: 100%;
|
|
2246
2366
|
display: flex;
|
|
2247
2367
|
align-items: center;
|
|
2248
2368
|
justify-content: flex-start;
|
|
2249
2369
|
column-gap: ${Gt("label-column-gap")};
|
|
2250
|
-
`,
|
|
2370
|
+
`,wm=d.memo(({nameBlackList:e,maxLength:t,t:o,...n})=>{const r=d.useCallback(s=>Cs.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(Fn,{validate:r,handleError:"message",name:"name",...n})}),Cm=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:l,prefixIconId:a,prefixIconColor:u,suffixIconColor:p,suffixIconId:h,autoFocus:f,readOnly:m,options:b,useLabelAsValue:x,...y})=>{const{control:k}=G.useFormContext(),{field:{ref:v,...$},fieldState:{error:C}}=G.useController({name:e,control:k,rules:y,disabled:t}),S=d.useId(),w=d.useCallback((j,D)=>{$.onChange(D??"")},[$]),I=d.useMemo(()=>{if($.value)return{id:$.value,name:$.value}},[$.value]);return i.jsx(z.ClassNames,{children:({cx:j})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:j({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:S,isValid:!C,required:!!y.required,children:o}),i.jsx(ti,{options:b,selected:I,onSelectionChange:w,children:i.jsxs($m,{children:[i.jsx(xo,{variant:"body",color:"dark",children:$.value}),i.jsx(Sm,{children:i.jsx(O,{iconId:"Down",size:"sm",color:"black"})})]})})]}),!!l&&i.jsx(qe,{handleError:l,name:e,hasLabel:!!o}),i.jsx(Rn,{ref:v,...$})]})})},$m=g(oi)`
|
|
2251
2371
|
height: 29px;
|
|
2252
2372
|
width: 100%;
|
|
2253
|
-
`,
|
|
2373
|
+
`,Sm=g.div`
|
|
2254
2374
|
width: 100%;
|
|
2255
2375
|
height: 100%;
|
|
2256
2376
|
display: flex;
|
|
2257
2377
|
align-items: center;
|
|
2258
2378
|
justify-content: center;
|
|
2259
|
-
`,
|
|
2379
|
+
`,jm=({name:e,disabled:t,label:o,handleError:n,readOnly:r,placeholder:s,...l})=>{const{control:a}=G.useFormContext(),u=d.useRef(null),{field:{ref:p,value:h,onChange:f,...m},fieldState:{error:b}}=G.useController({name:e,control:a,rules:l,disabled:t}),x=d.useId(),y=R.useMergeRefs([p,u]),k=d.useCallback(()=>{u.current&&u.current.click()},[]),v=d.useCallback(S=>{S.preventDefault()},[]),$=d.useCallback(S=>{S.preventDefault();let w=!1;if(S.dataTransfer.items.length)for(let I=0;I<S.dataTransfer.items.length&&!w;I++){const j=S.dataTransfer.items[I];if(j.kind==="file"){const D=j.getAsFile();D&&(w=!0,f(D))}}},[f]),C=d.useCallback(()=>{f(void 0)},[f]);return i.jsx(z.ClassNames,{children:({cx:S})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:S({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:x,isValid:!b,required:!!l.required,children:o}),h?i.jsxs(_m,{children:[i.jsx(O,{iconId:"File",size:"sm",color:"black"}),i.jsx(T,{variant:"body",color:"dark",children:h.name}),i.jsx(Tm,{onClick:C,iconId:"Close",size:"sm",color:"black"})]}):i.jsxs(Im,{onDrop:$,onClick:k,onDragOver:v,children:[i.jsx(O,{iconId:"File",size:"med",color:"black"}),i.jsx(T,{variant:"body",color:"dark",children:s})]}),i.jsx(Dm,{value:h==null?void 0:h.fileName,...m,id:x,onChange:w=>{w.target.files&&f(w.target.files[0])},type:"file",ref:y})]}),!!n&&i.jsx(qe,{handleError:n,name:e,hasLabel:!!o})]})})},Ci=g.div`
|
|
2260
2380
|
width: 100%;
|
|
2261
2381
|
padding: ${c("spacing-12")};
|
|
2262
2382
|
display: flex;
|
|
2263
2383
|
border: 1px solid ${c("color-grey30")};
|
|
2264
2384
|
background-color: ${c("color-grey10")};
|
|
2265
2385
|
border-radius: ${c("spacing-6")};
|
|
2266
|
-
`,
|
|
2386
|
+
`,Im=g(Ci)`
|
|
2267
2387
|
align-items: center;
|
|
2268
2388
|
justify-content: center;
|
|
2269
2389
|
flex-direction: column;
|
|
@@ -2273,21 +2393,21 @@
|
|
|
2273
2393
|
:hover {
|
|
2274
2394
|
border-color: ${c("color-grey50")};
|
|
2275
2395
|
}
|
|
2276
|
-
`,
|
|
2396
|
+
`,Dm=g.input`
|
|
2277
2397
|
display: none;
|
|
2278
|
-
`,
|
|
2398
|
+
`,_m=g(Ci)`
|
|
2279
2399
|
align-items: flex-start;
|
|
2280
2400
|
justify-content: flex-start;
|
|
2281
2401
|
column-gap: ${c("spacing-4")};
|
|
2282
|
-
`,
|
|
2402
|
+
`,Tm=g(ae)`
|
|
2283
2403
|
margin-left: auto;
|
|
2284
|
-
`,
|
|
2404
|
+
`,Em=({name:e,disabled:t,label:o,handleError:n,options:r,selectAllHidden:s,SelectAllItemTemplate:l,ListItemTemplate:a,SelectedItemTemplate:u,className:p,readOnly:h,closeOnSelect:f,...m})=>{const{control:b}=G.useFormContext(),{field:{value:x,onChange:y},fieldState:{error:k}}=G.useController({name:e,control:b,rules:m,disabled:t}),v=d.useId(),$=d.useCallback(C=>{y(C)},[y]);return i.jsx(z.ClassNames,{children:({cx:C})=>i.jsxs(Ze,{children:[i.jsxs(Be,{className:C({hasLabel:!!o}),children:[o&&i.jsx(me,{formItemId:v,isValid:!k,required:!!m.required,children:o}),i.jsx(Js,{disabled:t||h,options:r,closeOnSelect:f,onChange:$,selected:x,className:p,SelectAllItemTemplate:l,ListItemTemplate:a,SelectedItemTemplate:u})]}),!!n&&i.jsx(qe,{handleError:n,name:e,hasLabel:!!o})]})})},zm=({name:e,disabled:t})=>{const{control:o}=G.useFormContext();return G.useController({name:e,control:o,disabled:t}),null},Mm=({name:e,label:t,disabled:o})=>{const{control:n}=G.useFormContext(),{field:{value:r}}=G.useController({name:e,control:n,disabled:o}),s=d.useId(),l=r==null||r===""?"—":String(r);return i.jsx(z.ClassNames,{children:({cx:a})=>i.jsx(Ze,{children:i.jsxs(Be,{className:a({hasLabel:!!t}),children:[t&&i.jsx(me,{formItemId:s,isValid:!0,required:!1,children:t}),i.jsx(Om,{id:s,children:l})]})})})},Om=g.span`
|
|
2285
2405
|
font-size: 13px;
|
|
2286
2406
|
color: var(--kos-color-text-primary, #1f2937);
|
|
2287
2407
|
padding: 6px 0;
|
|
2288
2408
|
line-height: 1.4;
|
|
2289
2409
|
user-select: text;
|
|
2290
|
-
`,
|
|
2410
|
+
`,to=(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},yt=d.createContext({isSelected:()=>!1,selected:[],toggleSelection:Se,isDisabled:!1}),je=()=>{const e=d.useContext(yt);return e||{isSelected:()=>!1,selected:[],toggleSelection:Se,isDisabled:!1}},An=Symbol.for("kos.list.source"),Yt="__kos_source__";function go(e,t){return{...e,[An]:t}}function qt(e){return e[An]??e[Yt]}function Rm(e,t){if(t in e)return e[t];const o=qt(e);if(o&&typeof o=="object"&&t in o)return o[t]}function Nm(e){return typeof e=="object"&&e!==null&&"locked"in e&&typeof e.locked=="boolean"}const Ln=({groupName:e})=>i.jsx(Fm,{children:i.jsx(Am,{variant:"small",bold:!0,children:e})});Ln.displayName="AsyncListGroupHeader";const Fm=g.div`
|
|
2291
2411
|
display: flex;
|
|
2292
2412
|
align-items: center;
|
|
2293
2413
|
padding: 6px 12px 2px 12px;
|
|
@@ -2298,39 +2418,26 @@
|
|
|
2298
2418
|
border-top: none;
|
|
2299
2419
|
margin-top: 0;
|
|
2300
2420
|
}
|
|
2301
|
-
`,
|
|
2421
|
+
`,Am=g(T)`
|
|
2302
2422
|
text-transform: uppercase;
|
|
2303
2423
|
font-size: 10px;
|
|
2304
2424
|
letter-spacing: 0.5px;
|
|
2305
2425
|
opacity: 0.6;
|
|
2306
|
-
`;function
|
|
2307
|
-
${`${Po("bg-color",!0)}: ${c("color-black")}`};
|
|
2308
|
-
${`${Po("color",!0)}: ${c("color-white")}`};
|
|
2309
|
-
${`${Po("bg-color-active",!0)}: ${c("color-grey70")}`};
|
|
2310
|
-
gap: 0px;
|
|
2311
|
-
cursor: pointer;
|
|
2312
|
-
`,lf=g(zt)`
|
|
2313
|
-
${`${sf("border-color",!0)}: ${c("color-black")}`};
|
|
2314
|
-
z-index: 15;
|
|
2315
|
-
`,Ln=g.div`
|
|
2316
|
-
cursor: default;
|
|
2317
|
-
border-bottom: 0.5px solid ${c("color-grey60")};
|
|
2318
|
-
pointer-events: none;
|
|
2319
|
-
`,[Vo,cf]=M(["option","select"]),kr=3,Mt=d.memo(({actions:e,isSelected:t=!1,disableSelectionStyling:o=!1})=>{const{inlinePrimary:n,overflowPrimary:r,secondary:s}=d.useMemo(()=>{const f=e.filter(b=>b.isPrimary),m=e.filter(b=>!b.isPrimary);return{inlinePrimary:f.slice(0,kr),overflowPrimary:f.slice(kr),secondary:m}},[e]),l=r.length>0||s.length>0,a=t&&!o?"white":void 0,u=d.useMemo(()=>{const f=new Map;for(const m of e)f.set(m.id,m);return f},[e]),p=d.useCallback((f,m)=>{f.stopPropagation(),m.disabled||m.onClick()},[]),h=d.useCallback(f=>{const m=u.get(f);m&&!m.disabled&&m.onClick()},[u]);return e.length===0?null:i.jsxs(df,{onClick:f=>f.stopPropagation(),children:[n.map(f=>i.jsx(Cr,{onClick:m=>p(m,f),title:f.tooltip,type:"button",disabled:f.disabled,children:i.jsx(O,{size:"sm",iconId:f.iconId,color:a??f.color})},f.id)),l&&i.jsx(uf,{children:i.jsxs(An,{trigger:i.jsx(Cr,{title:"More actions",type:"button",children:i.jsx(O,{size:"sm",iconId:"Ellipsis",color:a??"blue"})}),onSelection:h,children:[r.map(f=>i.jsx(wr,{optionKey:f.id,label:i.jsxs($r,{children:[i.jsx(O,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}),i.jsx(Sr,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id)),r.length>0&&s.length>0&&i.jsx(Ln,{}),s.map(f=>i.jsx(wr,{optionKey:f.id,label:i.jsxs($r,{children:[f.iconId?i.jsx(O,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}):i.jsx(pf,{}),i.jsx(Sr,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id))]})})]})});Mt.displayName="ItemActionBar";const df=g.div`
|
|
2426
|
+
`;function $i(e){return(e==null?void 0:e.build)!==void 0}const Lm=W.kosComponent(({item:e,provider:t,ItemTemplate:o,itemIconMap:n,itemActions:r,itemDecorators:s,itemContentRenderer:l,disableSelectionStyling:a=!1})=>{var k;const u=d.useContext(yt),p=d.useMemo(()=>{if(!n)return;if(typeof n=="function")return n(e);const v=e.type;return v?n[v]:void 0},[n,e]),h=d.useMemo(()=>{if(!(r!=null&&r.length))return;const v=t.originalItems.get(e.id);if(v)return r.filter($=>!$.visibleFor||$.visibleFor(e)).map($=>({id:$.id,iconId:$.iconId,color:$.color,tooltip:$.tooltip,label:$.label,isPrimary:$.isPrimary,onClick:()=>$.onClick(e.id,v)}))},[r,e,t]),f=(()=>{if(s!=null&&s.length)return s.filter(v=>!v.visibleFor||v.visibleFor(e)).map(v=>({id:v.id,iconId:v.iconId,color:v.color,tooltip:v.tooltip}))})(),m=((k=u==null?void 0:u.selected)==null?void 0:k.includes(e.id))??!1,b=l?l(e,m):void 0,x=$i(o)?o.build(e):o,y=qt(e);return i.jsx(Dt.Observer,{children:()=>i.jsx(x,{...e,...y!==void 0?{[Yt]:y}:{},iconId:p==null?void 0:p.iconId,iconColor:p==null?void 0:p.color,actions:h,decorators:f,"data-disable-selection-styling":a,children:b},e.id)})}),Si=W.kosComponent(({dataProvider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,emptyState:l,loadingState:a,className:u,onInit:p,disableSelectionStyling:h=!1,groupExpression:f})=>{const[m,b]=d.useState(!1);return d.useEffect(()=>e?((async()=>{await e.init(),b(!0),p==null||p()})(),()=>{e.dispose()}):void 0,[e,p]),!m||!e?(typeof l=="function"?null:l)||null:i.jsx(Dt.Observer,{children:()=>{const x=e.isLoading??!1,y=e.items.length>0,k=typeof a=="function"?a(e):a,v=typeof l=="function"?l(e):l;return i.jsxs("div",{className:u,style:{width:"100%"},children:[x&&!y&&k,!x&&!y&&v,(()=>{const $=e.items,C=j=>i.jsx(Lm,{item:j,provider:e,ItemTemplate:t,itemIconMap:o,itemActions:n,itemDecorators:r,itemContentRenderer:s,disableSelectionStyling:h},j.id);if(!f)return $.map(C);const S=[],w=new Map;for(const j of $){const D=f(j);if(D===void 0)S.push(j);else{const L=w.get(D);L?L.push(j):w.set(D,[j])}}const I=Array.from(w.keys()).sort((j,D)=>j.localeCompare(D));return i.jsxs(i.Fragment,{children:[S.map(C),I.map(j=>i.jsxs(d.Fragment,{children:[i.jsx(Ln,{groupName:j}),(w.get(j)??[]).map(C)]},`group-${j}`))]})})()]})}})}),Bn=d.createContext({viewing:void 0,onItemView:Se}),ji=()=>{const e=d.useContext(Bn);return e||{viewing:void 0,onItemView:Se}},Bm=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]),l=d.useMemo(()=>{if(n)return{viewing:n.viewing,onItemView:n.onItemView}},[n]);let a=i.jsx(yt.Provider,{value:s,children:i.jsx(Si,{...r})});return l&&(a=i.jsx(Bn.Provider,{value:l,children:a})),a}),[Yo,Wm]=M(["option","select"]),Ir=3,Mt=d.memo(({actions:e,isSelected:t=!1,disableSelectionStyling:o=!1})=>{const{inlinePrimary:n,overflowPrimary:r,secondary:s}=d.useMemo(()=>{const f=e.filter(b=>b.isPrimary),m=e.filter(b=>!b.isPrimary);return{inlinePrimary:f.slice(0,Ir),overflowPrimary:f.slice(Ir),secondary:m}},[e]),l=r.length>0||s.length>0,a=t&&!o?"white":void 0,u=d.useMemo(()=>{const f=new Map;for(const m of e)f.set(m.id,m);return f},[e]),p=d.useCallback((f,m)=>{f.stopPropagation(),m.disabled||m.onClick()},[]),h=d.useCallback(f=>{const m=u.get(f);m&&!m.disabled&&m.onClick()},[u]);return e.length===0?null:i.jsxs(Pm,{onClick:f=>f.stopPropagation(),children:[n.map(f=>i.jsx(_r,{onClick:m=>p(m,f),title:f.tooltip,type:"button",disabled:f.disabled,children:i.jsx(O,{size:"sm",iconId:f.iconId,color:a??f.color})},f.id)),l&&i.jsx(Vm,{children:i.jsxs(zn,{trigger:i.jsx(_r,{title:"More actions",type:"button",children:i.jsx(O,{size:"sm",iconId:"Ellipsis",color:a??"blue"})}),onSelection:h,children:[r.map(f=>i.jsx(Dr,{optionKey:f.id,label:i.jsxs(Tr,{children:[i.jsx(O,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}),i.jsx(Er,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id)),r.length>0&&s.length>0&&i.jsx(Mn,{}),s.map(f=>i.jsx(Dr,{optionKey:f.id,label:i.jsxs(Tr,{children:[f.iconId?i.jsx(O,{iconId:f.iconId,color:f.disabled?"grey":f.color||"blue",size:"sm"}):i.jsx(Hm,{}),i.jsx(Er,{children:f.label||f.tooltip||f.id})]}),disabled:f.disabled,disableSelectionStyle:!0},f.id))]})})]})});Mt.displayName="ItemActionBar";const Pm=g.div`
|
|
2320
2427
|
display: flex;
|
|
2321
2428
|
align-items: center;
|
|
2322
2429
|
gap: 4px;
|
|
2323
2430
|
margin-left: auto;
|
|
2324
2431
|
padding-left: 8px;
|
|
2325
|
-
`,
|
|
2326
|
-
${`${
|
|
2327
|
-
${`${
|
|
2328
|
-
${`${
|
|
2432
|
+
`,Dr=g(dt)`
|
|
2433
|
+
${`${Yo("bg-color",!0)}: ${c("color-white")}`};
|
|
2434
|
+
${`${Yo("color",!0)}: ${c("color-black")}`};
|
|
2435
|
+
${`${Yo("bg-color-active",!0)}: ${c("color-grey20")}`};
|
|
2329
2436
|
gap: 0px;
|
|
2330
2437
|
cursor: pointer;
|
|
2331
|
-
`,
|
|
2332
|
-
${`${
|
|
2333
|
-
`,
|
|
2438
|
+
`,Vm=g.div`
|
|
2439
|
+
${`${Wm("border-color",!0)}: ${c("color-grey40")}`};
|
|
2440
|
+
`,_r=g.button`
|
|
2334
2441
|
background: none;
|
|
2335
2442
|
border: none;
|
|
2336
2443
|
padding: 4px;
|
|
@@ -2355,26 +2462,26 @@
|
|
|
2355
2462
|
cursor: not-allowed;
|
|
2356
2463
|
opacity: 0.3;
|
|
2357
2464
|
}
|
|
2358
|
-
|
|
2465
|
+
`,Tr=g.div`
|
|
2359
2466
|
display: flex;
|
|
2360
2467
|
align-items: center;
|
|
2361
2468
|
gap: 8px;
|
|
2362
|
-
`,
|
|
2469
|
+
`,Er=g.span`
|
|
2363
2470
|
font-size: 13px;
|
|
2364
2471
|
white-space: nowrap;
|
|
2365
|
-
`,
|
|
2472
|
+
`,Hm=g.div`
|
|
2366
2473
|
width: 16px;
|
|
2367
2474
|
height: 16px;
|
|
2368
|
-
`;function
|
|
2475
|
+
`;function an(e){return e.context!==void 0}const Wn=d.createContext(null),Pn=({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 l=u=>{r(u)};if(t&&an(t)){const u=t.context;(a=t.addContextChangeListener)==null||a.call(t,l),u&&r(u)}return()=>{var u;t&&an(t)&&((u=t==null?void 0:t.removeContextChangeListener)==null||u.call(t,l))}},[t]),i.jsx(Wn.Provider,{value:s,children:e})},Um=()=>{const e=d.useContext(Wn);return e||W.KosLog.info("useListDataContext must be used within a DataProviderContextProvider"),e},[Bt]=M(["studio-list-item"]),Gm=20,Ii=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:l,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":f=Gm})=>{const{selected:m,toggleSelection:b,isDisabled:x}=je(),y=m.includes(e),k=p||x,v=d.useCallback(()=>{k||b(e)},[e,b,k]),$=typeof f=="string"?Number(f):f,C=h>0?{marginLeft:`${h*$}px`}:void 0;return i.jsxs(Km,{className:u,onClick:v,$isSelected:y,$isDisabled:k,"data-depth":h,style:C,children:[i.jsx(bt,{checked:y,disabled:k,onChange:v}),r&&i.jsx(O,{size:"sm",iconId:r,color:s}),i.jsx(Ym,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(T,{variant:"body",bold:y,children:t}),o&&i.jsx(qm,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(Zm,{children:a.map(S=>i.jsx(Xm,{size:"sm",iconId:S.iconId,color:S.color,title:S.tooltip},S.id))}),l&&l.length>0&&i.jsx(Mt,{actions:l,isSelected:y})]})});Ii.displayName="StudioCheckListItem";const Km=g.div`
|
|
2369
2476
|
display: flex;
|
|
2370
2477
|
align-items: center;
|
|
2371
2478
|
width: 100%;
|
|
2372
2479
|
box-sizing: border-box;
|
|
2373
|
-
gap: ${
|
|
2374
|
-
padding-left: ${
|
|
2375
|
-
padding-top: ${
|
|
2376
|
-
padding-bottom: ${
|
|
2377
|
-
padding-right: ${
|
|
2480
|
+
gap: ${Bt("column-gap")};
|
|
2481
|
+
padding-left: ${Bt("padding-left")};
|
|
2482
|
+
padding-top: ${Bt("padding-y")};
|
|
2483
|
+
padding-bottom: ${Bt("padding-y")};
|
|
2484
|
+
padding-right: ${Bt("padding-right")};
|
|
2378
2485
|
min-height: 22px;
|
|
2379
2486
|
|
|
2380
2487
|
cursor: ${({$isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
@@ -2389,24 +2496,24 @@
|
|
|
2389
2496
|
&:active {
|
|
2390
2497
|
background-color: ${({$isDisabled:e})=>e?"transparent":"rgba(0, 0, 0, 0.1)"};
|
|
2391
2498
|
}
|
|
2392
|
-
`,
|
|
2499
|
+
`,Ym=g.div`
|
|
2393
2500
|
display: flex;
|
|
2394
2501
|
flex-direction: column;
|
|
2395
2502
|
gap: 2px;
|
|
2396
2503
|
flex: 1;
|
|
2397
2504
|
min-width: 0; /* Allow text truncation */
|
|
2398
|
-
`,
|
|
2505
|
+
`,qm=g(T)`
|
|
2399
2506
|
overflow: hidden;
|
|
2400
2507
|
text-overflow: ellipsis;
|
|
2401
2508
|
white-space: nowrap;
|
|
2402
|
-
`,
|
|
2509
|
+
`,Zm=g.div`
|
|
2403
2510
|
display: flex;
|
|
2404
2511
|
align-items: center;
|
|
2405
2512
|
gap: 4px;
|
|
2406
2513
|
padding-left: 8px;
|
|
2407
|
-
`,
|
|
2514
|
+
`,Xm=g(O)`
|
|
2408
2515
|
opacity: 0.8;
|
|
2409
|
-
`,[Je]=M(["studio-list-item"]),
|
|
2516
|
+
`,[Je]=M(["studio-list-item"]),Jm=20,Di=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:l,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":f=Jm,"data-disable-selection-styling":m=!1})=>{const{selected:b,toggleSelection:x,isDisabled:y}=je(),k=d.useCallback(()=>{!p&&!y&&x(e)},[e,x,p,y]),v=b.includes(e),$=p||y,C=typeof f=="string"?Number(f):f,S=h>0?{marginLeft:`${h*C}px`}:void 0;return i.jsxs(Qm,{className:u,onClick:k,$isSelected:v,$isDisabled:$,$disableSelectionStyling:m,"data-depth":h,style:S,children:[r&&i.jsx(O,{size:"sm",iconId:r,color:s}),i.jsx(eb,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(T,{variant:"body",bold:v,children:t}),o&&i.jsx(tb,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(ob,{children:a.map(w=>i.jsx(nb,{size:"sm",iconId:w.iconId,color:v&&!m?"white":w.color,title:w.tooltip},w.id))}),l&&l.length>0&&i.jsx(Mt,{actions:l,isSelected:v,disableSelectionStyling:m})]})});Di.displayName="StudioNamedListItem";const Qm=g.div`
|
|
2410
2517
|
display: flex;
|
|
2411
2518
|
align-items: center;
|
|
2412
2519
|
gap: ${Je("column-gap")};
|
|
@@ -2429,31 +2536,31 @@
|
|
|
2429
2536
|
&:active {
|
|
2430
2537
|
background-color: ${({$isDisabled:e,$disableSelectionStyling:t})=>e?"transparent":t?"rgba(0, 0, 0, 0.1)":Je("background-color-selected")};
|
|
2431
2538
|
}
|
|
2432
|
-
`,
|
|
2539
|
+
`,eb=g.div`
|
|
2433
2540
|
display: flex;
|
|
2434
2541
|
flex-direction: column;
|
|
2435
2542
|
gap: 2px;
|
|
2436
2543
|
flex: 1;
|
|
2437
2544
|
min-width: 0; /* Allow text truncation */
|
|
2438
|
-
`,
|
|
2545
|
+
`,tb=g(T)`
|
|
2439
2546
|
overflow: hidden;
|
|
2440
2547
|
text-overflow: ellipsis;
|
|
2441
2548
|
white-space: nowrap;
|
|
2442
|
-
|
|
2549
|
+
`,ob=g.div`
|
|
2443
2550
|
display: flex;
|
|
2444
2551
|
align-items: center;
|
|
2445
2552
|
gap: 4px;
|
|
2446
2553
|
padding-left: 8px;
|
|
2447
|
-
`,
|
|
2554
|
+
`,nb=g(O)`
|
|
2448
2555
|
opacity: 0.8;
|
|
2449
|
-
`,[
|
|
2556
|
+
`,[Wt]=M(["studio-list-item"]),rb=20,_i=W.kosComponent(({id:e,name:t,subText:o,children:n,iconId:r,iconColor:s,actions:l,decorators:a,className:u,disabled:p=!1,"data-depth":h=0,"data-indent-size":f=rb})=>{const{selected:m,toggleSelection:b,isDisabled:x}=je(),{viewing:y,onItemView:k}=ji(),v=d.useRef(null),$=m.includes(e),C=y===e,S=p||x,w=d.useCallback(()=>{S||b(e)},[e,b,S]),I=d.useCallback(L=>{v.current&&v.current.contains(L.target)||S||k(e)},[e,k,S]),j=typeof f=="string"?Number(f):f,D=h>0?{marginLeft:`${h*j}px`}:void 0;return i.jsxs(sb,{className:u,onClick:I,$isSelected:$,$isViewing:C,$isDisabled:S,"data-depth":h,style:D,children:[i.jsx(wn,{ref:v,checked:$,disabled:S,onChange:w}),r&&i.jsx(O,{size:"sm",iconId:r,color:s}),i.jsx(ib,{children:n||i.jsxs(i.Fragment,{children:[i.jsx(T,{variant:"body",bold:$,children:t}),o&&i.jsx(ab,{variant:"small",color:"dark",children:o})]})}),a&&a.length>0&&i.jsx(lb,{children:a.map(L=>i.jsx(cb,{size:"sm",iconId:L.iconId,color:L.color,title:L.tooltip},L.id))}),l&&l.length>0&&i.jsx(Mt,{actions:l,isSelected:$}),i.jsx(db,{children:i.jsx(O,{iconId:"Right",color:"blue",size:"sm"})})]})});_i.displayName="StudioSelectViewListItem";const sb=g.div`
|
|
2450
2557
|
display: flex;
|
|
2451
2558
|
align-items: center;
|
|
2452
|
-
gap: ${
|
|
2453
|
-
padding-left: ${
|
|
2454
|
-
padding-top: ${
|
|
2455
|
-
padding-bottom: ${
|
|
2456
|
-
padding-right: ${
|
|
2559
|
+
gap: ${Wt("column-gap")};
|
|
2560
|
+
padding-left: ${Wt("padding-left")};
|
|
2561
|
+
padding-top: ${Wt("padding-y")};
|
|
2562
|
+
padding-bottom: ${Wt("padding-y")};
|
|
2563
|
+
padding-right: ${Wt("padding-right")};
|
|
2457
2564
|
min-height: 22px;
|
|
2458
2565
|
|
|
2459
2566
|
cursor: ${({$isDisabled:e})=>e?"not-allowed":"pointer"};
|
|
@@ -2468,71 +2575,71 @@
|
|
|
2468
2575
|
&:active {
|
|
2469
2576
|
background-color: ${({$isDisabled:e})=>e?"transparent":"rgba(0, 0, 0, 0.1)"};
|
|
2470
2577
|
}
|
|
2471
|
-
`,
|
|
2578
|
+
`,ib=g.div`
|
|
2472
2579
|
display: flex;
|
|
2473
2580
|
flex-direction: column;
|
|
2474
2581
|
gap: 2px;
|
|
2475
2582
|
flex: 1;
|
|
2476
2583
|
min-width: 0; /* Allow text truncation */
|
|
2477
|
-
`,
|
|
2584
|
+
`,ab=g(T)`
|
|
2478
2585
|
overflow: hidden;
|
|
2479
2586
|
text-overflow: ellipsis;
|
|
2480
2587
|
white-space: nowrap;
|
|
2481
|
-
`,
|
|
2588
|
+
`,lb=g.div`
|
|
2482
2589
|
display: flex;
|
|
2483
2590
|
align-items: center;
|
|
2484
2591
|
gap: 4px;
|
|
2485
2592
|
padding-left: 8px;
|
|
2486
|
-
`,
|
|
2593
|
+
`,cb=g(O)`
|
|
2487
2594
|
opacity: 0.8;
|
|
2488
|
-
`,
|
|
2595
|
+
`,db=g.div`
|
|
2489
2596
|
display: flex;
|
|
2490
2597
|
align-items: center;
|
|
2491
2598
|
flex-shrink: 0;
|
|
2492
|
-
`,Mf=e=>t=>o=>()=>o.call(e,t);class Pn{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=_.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=_.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],_.makeObservable(this,{items:_.computed,initialized:_.observable,version:_.observable,refresh:_.action,resolvedItems:_.observable,context:_.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=Mf(this.parent)(this.context)(this.resolver);this.disposer=_.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 Of=e=>e.data!==void 0,hi=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];Of(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class Vn extends Pn{constructor(o,n,r,s){super(o,hi(o)(n),r,s);E(this,"_key");this._key=Array.isArray(n)?n:[n]}}class Rf extends Vn{constructor(t,o,n,r){super(t,o,n,r),_.makeObservable(this,{groups:_.computed,itemsByGroup:_.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 Nf{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]}))}}class fi{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=_.observable.map(new Map(Object.entries(s||{}))),this._nodes=_.observable.map(new Map),this._rootIds=_.observable.array([]),this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),_.makeObservable(this,{context:_.observable,version:_.observable,initialized:_.observable,tree:_.computed,rootItems:_.computed,loadingStates:_.computed,loadedChildren:_.computed,originalItems:_.computed,expandBranch:_.action,collapseBranch:_.action,clearCache:_.action,refresh:_.action,expandAll:_.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:go(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));_.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")){_.runInAction(()=>{n.fetchState="loading",n.timestamp=Date.now()});try{const r=await this.getChildren(o,this.context);_.runInAction(()=>{this.setChildren(t,r)}),this.setupChildReaction(t,o)}catch(r){_.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);_.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),_.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(),_.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&&_.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();_.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),_.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();_.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(),_.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1})}}function Zt(e){return e.build!==void 0}const Ff=g.div`
|
|
2599
|
+
`,ub=e=>t=>o=>()=>o.call(e,t);class Vn{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=_.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=_.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],_.makeObservable(this,{items:_.computed,initialized:_.observable,version:_.observable,refresh:_.action,resolvedItems:_.observable,context:_.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=ub(this.parent)(this.context)(this.resolver);this.disposer=_.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 pb=e=>e.data!==void 0,Ti=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];pb(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class Hn extends Vn{constructor(o,n,r,s){super(o,Ti(o)(n),r,s);E(this,"_key");this._key=Array.isArray(n)?n:[n]}}class hb extends Hn{constructor(t,o,n,r){super(t,o,n,r),_.makeObservable(this,{groups:_.computed,itemsByGroup:_.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 fb{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]}))}}class Ei{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=_.observable.map(new Map(Object.entries(s||{}))),this._nodes=_.observable.map(new Map),this._rootIds=_.observable.array([]),this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),_.makeObservable(this,{context:_.observable,version:_.observable,initialized:_.observable,tree:_.computed,rootItems:_.computed,loadingStates:_.computed,loadedChildren:_.computed,originalItems:_.computed,expandBranch:_.action,collapseBranch:_.action,clearCache:_.action,refresh:_.action,expandAll:_.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:go(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));_.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")){_.runInAction(()=>{n.fetchState="loading",n.timestamp=Date.now()});try{const r=await this.getChildren(o,this.context);_.runInAction(()=>{this.setChildren(t,r)}),this.setupChildReaction(t,o)}catch(r){_.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);_.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),_.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(),_.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&&_.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();_.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),_.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();_.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(),_.runInAction(()=>{this._nodes.clear(),this._rootIds.clear(),this.initialized=!1})}}function Zt(e){return e.build!==void 0}const gb=g.div`
|
|
2493
2600
|
width: 100%;
|
|
2494
|
-
`,
|
|
2601
|
+
`,mb=(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)}),Un=W.kosComponent(({dataProvider:e,firstChild:t,ItemTemplate:o,lastChild:n,onListItemAction:r,onInit:s,emptyState:l,className:a,itemListRenderer:u=mb})=>{const p=to(e,s),h=p&&e?u(e,o,r):[];return i.jsx(Pn,{dataProvider:e||void 0,onListItemAction:r,children:i.jsxs(gb,{className:a,children:[t,p?h.length===0&&l?l:h:null,n]})})}),So=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:l,className:a,...u})=>{const[p,h]=d.useState(o??[]),f=d.useRef(p??[]);d.useLayoutEffect(()=>{f.current=p},[p]),d.useEffect(()=>{h(o??[])},[o]);const m=d.useCallback(y=>{t(y,f.current.includes(y)?"unselected":"selected"),h(k=>e?[y]:k.includes(y)?k.filter(v=>v!==y):[...k,y])},[e,t]),b=d.useCallback(y=>f.current.includes(y),[]),x=d.useMemo(()=>({isSelected:b,selected:p,toggleSelection:m,isDisabled:!!n}),[b,p,m,n]);return d.useEffect(()=>{var y,k;if(r&&(s!=null&&s.items)&&f.current.length===0){let v;l?v=(y=l(s.items))==null?void 0:y.id:v=(k=s.items[0])==null?void 0:k.id,v&&m(v)}},[r,s==null?void 0:s.items,l,m]),i.jsx(yt.Provider,{value:x,children:i.jsx(Un,{dataProvider:s,className:a,...u})})});function zi(e){return e.build!==void 0}const bb=e=>(t,o,n)=>t.groups.reduce((s,l)=>s.find(a=>a.groupId===l.groupId)?s:[...s,l],[]).map(s=>{const l=zi(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(l,{groupId:s.groupId,name:s.name,children:u},s.groupId)}),Gn=d.createContext({openedGroups:[],toggleGroup:Se});function xb(e){const t=e.supportMultipleOpen??!0,[o,n]=d.useState(e.openedGroups??[]),r=d.useCallback(l=>{var a;(a=e.onGroupOpen)==null||a.call(e,l,o.includes(l)?"closed":"opened"),n(u=>t?u.includes(l)?u.filter(p=>p!==l):[...u,l]:[l])},[o,e,t]);d.useEffect(()=>{n(e.openedGroups??[])},[e.openedGroups]);const s=d.useMemo(()=>({openedGroups:o,toggleGroup:r}),[o,r]);return i.jsx(Gn.Provider,{value:s,children:i.jsx(So,{...e,itemListRenderer:bb(e.GroupTemplate)})})}const Mi=()=>{const e=d.useContext(Gn);return e||{openedGroups:[],toggleGroup:Se}},yb=({children:e,name:t,groupId:o,className:n})=>{const{openedGroups:r,toggleGroup:s}=Mi(),l=r.includes(o),a=d.useCallback(()=>{s(o)},[o,s]);return i.jsxs(Oi,{className:n,children:[i.jsxs(kb,{"data-open":l,onClick:a,children:[l?i.jsx(O,{iconId:"CaretDown",size:"xsm"}):i.jsx(O,{iconId:"CaretRight",size:"xsm"}),i.jsx(T,{variant:"body",bold:!0,children:t})]}),i.jsx(wb,{children:l?i.jsx(Cb,{className:"list-container",children:e}):null})]},o)},vb=({children:e,groupId:t,className:o})=>i.jsx(Oi,{className:o,children:e},t),Oi=g.div`
|
|
2495
2602
|
display: flex;
|
|
2496
2603
|
flex-direction: column;
|
|
2497
2604
|
padding-bottom: 8px;
|
|
2498
|
-
`,
|
|
2605
|
+
`,kb=g.div`
|
|
2499
2606
|
display: flex;
|
|
2500
2607
|
flex: 0;
|
|
2501
2608
|
cursor: pointer;
|
|
2502
2609
|
gap: 4px;
|
|
2503
2610
|
padding-inline: 12px 12px;
|
|
2504
2611
|
align-items: center;
|
|
2505
|
-
`,
|
|
2612
|
+
`,wb=g.div`
|
|
2506
2613
|
display: flex;
|
|
2507
2614
|
flex-direction: column;
|
|
2508
|
-
`,
|
|
2615
|
+
`,Cb=g.div`
|
|
2509
2616
|
padding-inline-start: 16px;
|
|
2510
2617
|
align-items: center;
|
|
2511
2618
|
gap: 6px;
|
|
2512
2619
|
padding-block-start: 8px;
|
|
2513
|
-
`,
|
|
2620
|
+
`,oo=g.div`
|
|
2514
2621
|
align-items: center;
|
|
2515
2622
|
align-self: stretch;
|
|
2516
2623
|
background: var(--Grey-White, #fff);
|
|
2517
2624
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2518
2625
|
display: flex;
|
|
2519
|
-
`,
|
|
2626
|
+
`,Kn=g(oo)`
|
|
2520
2627
|
padding: 0 0 6px 0;
|
|
2521
|
-
`,
|
|
2628
|
+
`,Ri=g(oo)`
|
|
2522
2629
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2523
|
-
`,
|
|
2630
|
+
`,Ni=g(Kn)`
|
|
2524
2631
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2525
|
-
`,
|
|
2632
|
+
`,jo=g.div`
|
|
2526
2633
|
align-items: center;
|
|
2527
2634
|
display: flex;
|
|
2528
2635
|
gap: 16px;
|
|
2529
2636
|
height: 30px;
|
|
2530
2637
|
justify-content: center;
|
|
2531
2638
|
padding: 8px;
|
|
2532
|
-
`,
|
|
2639
|
+
`,Fi=g(jo)`
|
|
2533
2640
|
height: initial;
|
|
2534
2641
|
padding: 0 4px 0 14px;
|
|
2535
|
-
`,
|
|
2642
|
+
`,Io=g.div`
|
|
2536
2643
|
align-items: center;
|
|
2537
2644
|
align-self: stretch;
|
|
2538
2645
|
display: flex;
|
|
@@ -2541,10 +2648,10 @@
|
|
|
2541
2648
|
height: 30px;
|
|
2542
2649
|
justify-content: space-between;
|
|
2543
2650
|
padding: 8px 8px 8px 4px;
|
|
2544
|
-
`,
|
|
2651
|
+
`,Ai=g(Io)`
|
|
2545
2652
|
height: initial;
|
|
2546
2653
|
padding: 0;
|
|
2547
|
-
`,
|
|
2654
|
+
`,Li=d.memo(({className:e,disabled:t,id:o,label:n,mode:r="standard",name:s,showDivider:l=!0})=>{const{selected:a,toggleSelection:u,isDisabled:p}=je(),h=d.useCallback(()=>{u(o)},[o,u]),f=r==="compact"?Fi:jo,m=r==="compact"?Ai:Io,b=l?r==="compact"?Ni:Ri:r==="compact"?Kn:oo;return i.jsxs(b,{className:e,children:[i.jsx(f,{children:i.jsx(bt,{disabled:p||t,checked:a.includes(o),onChange:h})}),i.jsxs(m,{children:[i.jsx(T,{variant:"body",children:s}),!!n&&i.jsx(T,{color:"grey",variant:"body",children:n})]})]})}),$b=g.div`
|
|
2548
2655
|
display: flex;
|
|
2549
2656
|
padding: 4px 12px 4px 4px;
|
|
2550
2657
|
align-items: center;
|
|
@@ -2552,14 +2659,14 @@
|
|
|
2552
2659
|
align-self: stretch;
|
|
2553
2660
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2554
2661
|
background: var(--Grey-White, #fff);
|
|
2555
|
-
`,
|
|
2662
|
+
`,Sb=g.div`
|
|
2556
2663
|
display: flex;
|
|
2557
2664
|
height: 30px;
|
|
2558
2665
|
padding: 8px;
|
|
2559
2666
|
justify-content: center;
|
|
2560
2667
|
align-items: center;
|
|
2561
2668
|
gap: 16px;
|
|
2562
|
-
`,
|
|
2669
|
+
`,jb=g.div`
|
|
2563
2670
|
flex: 1 1 auto;
|
|
2564
2671
|
display: flex;
|
|
2565
2672
|
align-items: center;
|
|
@@ -2568,15 +2675,15 @@
|
|
|
2568
2675
|
padding: 8px 8px 8px 4px;
|
|
2569
2676
|
gap: 4px;
|
|
2570
2677
|
align-self: stretch;
|
|
2571
|
-
`,
|
|
2678
|
+
`,Ib=e=>{const{selected:t,toggleSelection:o,isDisabled:n}=je(),r=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsxs($b,{children:[i.jsx(Sb,{children:i.jsx("input",{onChange:r,type:"checkbox",checked:t.includes(e.id),disabled:n})}),i.jsx(jb,{children:i.jsx(T,{variant:"body",children:e.name})})]})},[He]=M(["named-list-item"]),Db=d.memo(({id:e,iconId:t,iconColor:o,suffixIcons:n,name:r,className:s,subText:l,subTextColor:a})=>{const{selected:u,toggleSelection:p,isDisabled:h}=je(),f=d.useCallback(()=>{h||p(e)},[e,p,h]),m=u.includes(e);return i.jsx(z.ClassNames,{children:({cx:b})=>i.jsxs(_b,{className:b(s,{isSelected:m,isDisabled:h}),onClick:f,children:[i.jsxs(Tb,{children:[t&&i.jsx(O,{size:"sm",iconId:t,color:o}),i.jsx(T,{className:"named-list-item-text",variant:"body",children:r}),!!n&&i.jsx(zb,{children:n.map(({iconId:x,iconColor:y})=>i.jsx(O,{size:"xsm",iconId:x,color:m?"white":y},x))})]}),!!l&&i.jsx(Eb,{className:b({hasIcon:!!t}),children:i.jsx(Mb,{color:a??"dark",variant:"body",children:l})})]})})}),_b=g.div`
|
|
2572
2679
|
display: flex;
|
|
2573
|
-
padding-top: ${
|
|
2574
|
-
padding-right: ${
|
|
2575
|
-
padding-bottom: ${
|
|
2576
|
-
padding-left: ${
|
|
2680
|
+
padding-top: ${He("padding-y")};
|
|
2681
|
+
padding-right: ${He("padding-right")};
|
|
2682
|
+
padding-bottom: ${He("padding-y")};
|
|
2683
|
+
padding-left: ${He("padding-left")};
|
|
2577
2684
|
align-items: flex-start;
|
|
2578
2685
|
justify-content: flex-start;
|
|
2579
|
-
gap: ${
|
|
2686
|
+
gap: ${He("row-gap")};
|
|
2580
2687
|
color: inherit;
|
|
2581
2688
|
background-color: transparent;
|
|
2582
2689
|
flex-direction: column;
|
|
@@ -2585,37 +2692,37 @@
|
|
|
2585
2692
|
cursor: unset;
|
|
2586
2693
|
}
|
|
2587
2694
|
&.isSelected {
|
|
2588
|
-
color: ${
|
|
2589
|
-
background-color: ${
|
|
2695
|
+
color: ${He("color-selected")};
|
|
2696
|
+
background-color: ${He("background-color-selected")};
|
|
2590
2697
|
}
|
|
2591
|
-
`,
|
|
2698
|
+
`,Tb=g.div`
|
|
2592
2699
|
width: 100%;
|
|
2593
2700
|
display: flex;
|
|
2594
2701
|
align-items: center;
|
|
2595
2702
|
justify-content: flex-start;
|
|
2596
|
-
gap: ${
|
|
2597
|
-
`,
|
|
2703
|
+
gap: ${He("column-gap")};
|
|
2704
|
+
`,Eb=g.div`
|
|
2598
2705
|
width: 100%;
|
|
2599
2706
|
display: flex;
|
|
2600
2707
|
align-items: center;
|
|
2601
2708
|
justify-content: flex-start;
|
|
2602
2709
|
&.hasIcon {
|
|
2603
|
-
padding-left: ${
|
|
2710
|
+
padding-left: ${He("subtext-padding-with-icon")};
|
|
2604
2711
|
}
|
|
2605
|
-
`,
|
|
2712
|
+
`,zb=g.div`
|
|
2606
2713
|
display: flex;
|
|
2607
2714
|
align-items: center;
|
|
2608
2715
|
justify-content: flex-end;
|
|
2609
2716
|
margin-left: auto;
|
|
2610
|
-
gap: ${
|
|
2611
|
-
`,
|
|
2717
|
+
gap: ${He("column-gap")};
|
|
2718
|
+
`,Mb=g(T)`
|
|
2612
2719
|
-webkit-box-orient: vertical;
|
|
2613
2720
|
-webkit-line-clamp: 2;
|
|
2614
2721
|
display: -webkit-box;
|
|
2615
2722
|
overflow-wrap: anywhere;
|
|
2616
2723
|
overflow: hidden;
|
|
2617
2724
|
text-overflow: ellipsis;
|
|
2618
|
-
`,
|
|
2725
|
+
`,Ob=g.div`
|
|
2619
2726
|
display: flex;
|
|
2620
2727
|
padding: ${c("spacing-8")} ${c("spacing-10")};
|
|
2621
2728
|
align-items: center;
|
|
@@ -2628,11 +2735,11 @@
|
|
|
2628
2735
|
color: ${c("color-white")};
|
|
2629
2736
|
background-color: ${c("color-primary")};
|
|
2630
2737
|
}
|
|
2631
|
-
`,
|
|
2738
|
+
`,Rb=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(Ob,{className:r({isSelected:t.includes(e.id)}),onClick:n,children:[e.iconId&&i.jsx(O,{size:"sm",iconId:e.iconId}),i.jsx(T,{variant:"body",children:e.name})]})})},Nb=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}},Fb=(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}},Ab=(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 Lb extends Vn{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,_.makeObservable(this,{tree:_.computed,childBranchLookup:_.computed,itemsById:_.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 Bi=d.createContext(null),Bb=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 b=m[r.idKey],x=p.current.includes(b),y=v=>v.branches.flatMap($=>{const C=$[r.idKey];return $.branches.length?[C,...y($)]:[]}),k=y(m);if(t){const v=[],$=C=>{const S=C[r.parentIdKey];if(S){const w=r.itemsById[S];w&&(v.push(S),$(w))}};$(m),u(x?v:[...v,b])}else{const v=x?p.current.filter($=>b!==$&&!k.includes($)):[...p.current,b];u(v)}},[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(Bi.Provider,{value:f,children:e})}),Wi=()=>{const e=d.useContext(Bi);if(e===null)throw new Error("TreeContext can only be used inside children of TreeContextProvider");return e};function Pi(e){return e.build!==void 0}const Wb=e=>(t,o,n)=>{const r=(s,l)=>{if(!s.branches.length&&s.isGroup)return null;if(s.branches.length){const a=Pi(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))},Pb=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(Bb,{dataProvider:e,openedBranches:r,setOpenedBranches:s,singleBranchOnly:l,children:i.jsx(So,{onSelect:o,dataProvider:e,ItemTemplate:t,autoSelectFirstItem:u,emptyState:h,className:a,selected:p,onListItemAction:m,getFirstItem:f,itemListRenderer:Wb(n)})}));function Vb(e){return(e==null?void 0:e.build)!==void 0}const Vi=d.createContext(null),Hb=()=>{const e=d.useContext(Vi);if(e===null)throw new Error("useAsyncTreeContext can only be used inside AsyncTreeList");return e},Hi=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:b,expandedMode:x=!1,indentSize:y,isNodeSelectable:k,branchContentRenderer:v,itemContentRenderer:$,disableSelectionStyling:C=!1})=>{const S=Hb();d.useEffect(()=>{const K=S.openedBranches.includes(e.id),ee=e.loadingState.status==="idle",Xe=!e.isLeaf;if((K||x)&&ee&&Xe){const We=t.originalItems.get(e.id);We&&t.expandBranch(e.id,We)}},[S.openedBranches,e.id,e.loadingState.status,e.isLeaf,t,x]);const w=d.useMemo(()=>{if(!f)return;if(typeof f=="function")return f(e);const K=e.type;return K?f[K]:void 0},[f,e]),I=d.useMemo(()=>{if(!(m!=null&&m.length))return;const K=t.originalItems.get(e.id);if(K)return m.filter(ee=>!ee.visibleFor||ee.visibleFor(e)).map(ee=>({id:ee.id,iconId:ee.iconId,color:ee.color,tooltip:ee.tooltip,label:ee.label,isPrimary:ee.isPrimary,onClick:()=>ee.onClick(e.id,K)}))},[m,e,t]),j=(()=>{if(b!=null&&b.length)return b.filter(K=>!K.visibleFor||K.visibleFor(e)).map(K=>({id:K.id,iconId:K.iconId,color:K.color,tooltip:K.tooltip}))})(),D=async()=>{if(S.openedBranches.includes(e.id))s==null||s(e.id);else if(e.loadingState.status==="idle"){const ee=t.originalItems.get(e.id);ee&&(await(r==null?void 0:r(e.id,ee)),await t.expandBranch(e.id,ee))}S.toggleBranch(e.id)},L=()=>{const K=t.originalItems.get(e.id);K&&(a==null||a(e.id,K))},U=je();if(e.isLeaf){const K=Vb(n)?n.build(e):n,ee=U.selected.includes(e.id),Xe=$?$(e,ee):void 0,We=qt(e);return i.jsx(K,{"data-key":e.id,...e,...We!==void 0?{[Yt]:We}:{},onListItemAction:l,"data-depth":h,"data-indent-size":y,"data-disable-selection-styling":C,iconId:w==null?void 0:w.iconId,iconColor:w==null?void 0:w.color,actions:I,decorators:j,children:Xe},e.id)}const P=Pi(o)?o.build(e):o,B=x||S.openedBranches.includes(e.id),Z=e.loadingState.status==="loading",ie=e.loadingState.status==="error",J=e.loadingState.status==="loaded",X=u===e.id,Ie=B?e.branches.length>0?e.branches.map(K=>i.jsx(Hi,{branch:K,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:b,expandedMode:x,indentSize:y,isNodeSelectable:k,branchContentRenderer:v,itemContentRenderer:$,disableSelectionStyling:C},K.id)):J&&p?[p]:[]:[],le=v?v(e,X):void 0,pe=k?k(e):!0,Q=qt(e);return i.jsx(Dt.Observer,{children:()=>i.jsx(P,{className:e.className,...e,...Q!==void 0?{[Yt]:Q}:{},onClick:x?L:D,onSelect:L,"data-loading":Z,"data-error":ie,"data-open":B,"data-selected":X,"data-expanded-mode":x,"data-depth":h,"data-indent-size":y,"data-selectable":pe,"data-disable-selection-styling":C,iconId:w==null?void 0:w.iconId,iconColor:w==null?void 0:w.color,actions:I,decorators:j,content:le,children:Ie})})}),Ui=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:b,nodeIconMap:x,nodeActions:y,nodeDecorators:k,expandedMode:v=!1,indentSize:$,isNodeSelectable:C,branchContentRenderer:S,itemContentRenderer:w,disableSelectionStyling:I=!1})=>{const[j,D]=d.useState(!1),[L,U]=d.useState([]),P=m??L,B=b??U;d.useEffect(()=>e?((async()=>{await e.init(),D(!0)})(),()=>{e.dispose()}):void 0,[e]),d.useEffect(()=>{var X;!v||!j||!e||(X=e.expandAll)==null||X.call(e)},[v,j,e]);const Z=d.useCallback(X=>{const Ie=P.includes(X);B(f?Ie?[]:[X]:Ie?P.filter(le=>le!==X):[...P,X])},[P,B,f]),ie=d.useMemo(()=>({openedBranches:P,toggleBranch:Z}),[P,Z]);if(!j||!e)return u||null;const J=m&&m.length>0&&e.tree.some(X=>m.includes(X.id)&&!X.isLeaf&&X.loadingState.status!=="loaded");return i.jsx(Vi.Provider,{value:ie,children:i.jsx(Dt.Observer,{children:()=>i.jsxs("div",{className:h,style:J?{visibility:"hidden"}:void 0,children:[e.tree.length===0&&u,e.tree.map(X=>i.jsx(Hi,{branch:X,provider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:l,selectedBranchId:a,branchEmptyState:p,nodeIconMap:x,nodeActions:y,nodeDecorators:k,expandedMode:v,indentSize:$,isNodeSelectable:C,branchContentRenderer:S,itemContentRenderer:w,disableSelectionStyling:I},X.id))]})})})}),Ub=W.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,...l})=>{const[a,u]=d.useState(o??[]),p=d.useRef(a??[]);d.useLayoutEffect(()=>{p.current=a},[a]),d.useEffect(()=>{u(o??[])},[o]);const h=d.useCallback(b=>{t(b,p.current.includes(b)?"unselected":"selected"),u(x=>e?[b]:x.includes(b)?x.filter(y=>y!==b):[...x,b])},[e,t]),f=d.useCallback(b=>p.current.includes(b),[]),m=d.useMemo(()=>({isSelected:f,selected:a,toggleSelection:h,isDisabled:!!n}),[f,a,h,n]);return d.useEffect(()=>{var b;if(r&&(s!=null&&s.rootItems)&&p.current.length===0){const x=(b=s.rootItems[0])==null?void 0:b.id;x&&h(x)}},[r,s==null?void 0:s.rootItems,h]),i.jsx(yt.Provider,{value:m,children:i.jsx(Ui,{dataProvider:s,...l})})}),Gb=({children:e,id:t,className:o})=>i.jsx(z.ClassNames,{children:({cx:n})=>i.jsx(Kb,{className:n("anonymous-branch",o),children:e},t)}),Kb=g.div`
|
|
2632
2739
|
display: flex;
|
|
2633
2740
|
flex-direction: column;
|
|
2634
2741
|
width: 100%;
|
|
2635
|
-
`,[Oe]=M(["named-collapsible-branch"]),
|
|
2742
|
+
`,[Oe]=M(["named-collapsible-branch"]),Yb=20,qb=W.kosComponent(({children:e,className:t,onClick:o,onSelect:n,"data-loading":r,"data-open":s,"data-expanded-mode":l,"data-depth":a=0,"data-indent-size":u=Yb,"data-selectable":p=!0,"data-disable-selection-styling":h=!1,iconId:f,iconColor:m,actions:b,decorators:x,content:y,...k})=>{const{isSelected:v,toggleSelection:$,selected:C}=je(),S=p&&C.includes(k.id),w=L=>{L.stopPropagation(),o==null||o()},I=()=>{p?($(k.id),n==null||n()):o==null||o()},j=typeof u=="string"?Number(u):u,D=a>0?{marginLeft:`${a*j}px`}:void 0;return i.jsxs(Qb,{className:t,isOpen:s,style:D,children:[i.jsxs(ex,{"data-loading":r,"data-selected":S,onClick:I,$isSelected:S,$disableSelectionStyling:h,children:[!l&&i.jsx(Zb,{onClick:w,type:"button",children:i.jsx(Xb,{iconId:"CaretRight",size:"xxsm",$isOpen:s})}),f&&i.jsx(O,{size:"sm",iconId:f,color:m}),i.jsxs(Jb,{children:[y||i.jsx(T,{variant:"body",bold:!0,children:k.name}),r&&i.jsx(T,{variant:"body",children:"(Loading...)"})]}),x&&x.length>0&&i.jsx(nx,{children:x.map(L=>i.jsx(rx,{size:"sm",iconId:L.iconId,color:S&&!h?"white":L.color,title:L.tooltip},L.id))}),b&&b.length>0&&i.jsx(Mt,{actions:b,isSelected:S,disableSelectionStyling:h})]}),i.jsx(tx,{className:"inner-container",children:i.jsx(ox,{className:"list-container",children:e})})]},k.id)}),Zb=g.button`
|
|
2636
2743
|
background: none;
|
|
2637
2744
|
border: none;
|
|
2638
2745
|
padding: 0;
|
|
@@ -2651,19 +2758,19 @@
|
|
|
2651
2758
|
&:active {
|
|
2652
2759
|
opacity: 0.5;
|
|
2653
2760
|
}
|
|
2654
|
-
`,
|
|
2761
|
+
`,Xb=g(O)`
|
|
2655
2762
|
transition: transform 0.2s ease-in-out;
|
|
2656
2763
|
transform: ${({$isOpen:e})=>e?"rotate(90deg)":"rotate(0deg)"};
|
|
2657
|
-
`,
|
|
2764
|
+
`,Jb=g.div`
|
|
2658
2765
|
display: flex;
|
|
2659
2766
|
align-items: center;
|
|
2660
2767
|
gap: ${Oe("column-gap")};
|
|
2661
2768
|
flex: 1;
|
|
2662
|
-
`,
|
|
2769
|
+
`,Qb=g.div`
|
|
2663
2770
|
display: flex;
|
|
2664
2771
|
flex-direction: column;
|
|
2665
2772
|
${({isOpen:e})=>e?`gap: ${Oe("padding-y")}`:""}
|
|
2666
|
-
`,
|
|
2773
|
+
`,ex=g.div`
|
|
2667
2774
|
align-items: center;
|
|
2668
2775
|
gap: ${Oe("column-gap")};
|
|
2669
2776
|
display: flex;
|
|
@@ -2686,28 +2793,28 @@
|
|
|
2686
2793
|
&:active {
|
|
2687
2794
|
background-color: ${({$disableSelectionStyling:e})=>e?"rgba(0, 0, 0, 0.1)":Oe("background-color-selected")};
|
|
2688
2795
|
}
|
|
2689
|
-
`,
|
|
2796
|
+
`,tx=g.div`
|
|
2690
2797
|
display: flex;
|
|
2691
2798
|
flex-direction: column;
|
|
2692
|
-
|
|
2799
|
+
`,ox=g.div`
|
|
2693
2800
|
display: flex;
|
|
2694
2801
|
flex-direction: column;
|
|
2695
2802
|
row-gap: 4px;
|
|
2696
|
-
`,
|
|
2803
|
+
`,nx=g.div`
|
|
2697
2804
|
display: flex;
|
|
2698
2805
|
align-items: center;
|
|
2699
2806
|
gap: 4px;
|
|
2700
2807
|
padding-left: 8px;
|
|
2701
|
-
`,
|
|
2808
|
+
`,rx=g(O)`
|
|
2702
2809
|
opacity: 0.8;
|
|
2703
|
-
`,
|
|
2810
|
+
`,sx=W.kosComponent(({children:e,className:t,...o})=>{const{openedBranches:n,toggleBranch:r}=Wi(),s=n.includes(o.id),l=d.useCallback(()=>{r(o)},[o,r]);return i.jsxs(ix,{className:t,children:[i.jsxs(ax,{"data-open":s,onClick:l,children:[s?i.jsx(O,{iconId:"CaretDown",size:"xxsm"}):i.jsx(O,{iconId:"CaretRight",size:"xxsm"}),i.jsx(T,{variant:"body",bold:!0,children:o.name})]}),i.jsx(lx,{className:"inner-container",children:s?i.jsx(cx,{className:"list-container",children:e}):null})]},o.id)}),ix=g.div`
|
|
2704
2811
|
display: flex;
|
|
2705
2812
|
flex-direction: column;
|
|
2706
2813
|
|
|
2707
2814
|
&.isNotRoot {
|
|
2708
2815
|
padding-left: 12px;
|
|
2709
2816
|
}
|
|
2710
|
-
`,
|
|
2817
|
+
`,ax=g.div`
|
|
2711
2818
|
align-items: center;
|
|
2712
2819
|
column-gap: 4px;
|
|
2713
2820
|
cursor: pointer;
|
|
@@ -2715,75 +2822,70 @@
|
|
|
2715
2822
|
flex: 0;
|
|
2716
2823
|
min-height: 22px;
|
|
2717
2824
|
padding-right: 12px;
|
|
2718
|
-
`,
|
|
2825
|
+
`,lx=g.div`
|
|
2719
2826
|
display: flex;
|
|
2720
2827
|
flex-direction: column;
|
|
2721
|
-
`,
|
|
2828
|
+
`,cx=g.div`
|
|
2722
2829
|
display: flex;
|
|
2723
2830
|
flex-direction: column;
|
|
2724
2831
|
row-gap: 4px;
|
|
2725
|
-
`,
|
|
2832
|
+
`,Gi=d.memo(({autoScrollToBottom:e=!1,className:t,itemCount:o,itemHeight:n,onBottom:r,overscanAmount:s,renderRow:l})=>{const[a,u]=d.useState(0),[p,h]=d.useState(0),f=d.useRef(null),m=d.useRef(null),b=o*n,x=Math.ceil(p/n),y=Math.max(Math.floor(a/n-(s??0)),0),k=Math.min(o-1,y+x+(s??0)),v=C=>{u(C.currentTarget.scrollTop)};d.useLayoutEffect(()=>{const C=()=>{f.current&&h(f.current.clientHeight)};return C(),window.addEventListener("resize",C),()=>window.removeEventListener("resize",C)},[]),d.useEffect(()=>{e&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[o,e]);const $=[];for(let C=y;C<=k;C++)$.push(l(C,{top:C*n,height:n,position:"absolute",width:"100%"}));return d.useEffect(()=>{const C=()=>{const w=m.current;if(!w)return;const I=w.scrollHeight-w.scrollTop<=w.clientHeight+n;!e&&I&&(r==null||r())},S=m.current;return S&&S.addEventListener("scroll",C),()=>{S&&S.removeEventListener("scroll",C)}},[e,n,r]),i.jsx(dx,{ref:f,children:i.jsx(ux,{ref:m,style:{height:p},onScroll:v,className:t,children:i.jsx(px,{style:{height:b},children:$})})})}),dx=g.div`
|
|
2726
2833
|
height: 100%;
|
|
2727
2834
|
width: 100%;
|
|
2728
2835
|
overflow-y: hidden;
|
|
2729
2836
|
position: relative;
|
|
2730
|
-
`,
|
|
2837
|
+
`,ux=g.div`
|
|
2731
2838
|
overflow-y: auto;
|
|
2732
2839
|
width: 100%;
|
|
2733
2840
|
position: relative;
|
|
2734
|
-
`,
|
|
2841
|
+
`,px=g.div`
|
|
2735
2842
|
position: relative;
|
|
2736
2843
|
width: 100%;
|
|
2737
|
-
`,
|
|
2738
|
-
width:
|
|
2739
|
-
height:
|
|
2844
|
+
`,Ki=W.kosComponent(({dataProvider:e,ItemTemplate:t,onListItemAction:o,onInit:n,emptyState:r,...s})=>{const l=to(e,n),a=d.useCallback((u,p)=>{const h=e==null?void 0:e.items.find((f,m)=>m===u);if(h){const f=Zt(t)?t.build(h):t;return i.jsx(f,{"data-key":h.id,style:p,...h,onListItemAction:o},h.id)}return null},[t,e==null?void 0:e.items,o]);return i.jsx(Pn,{dataProvider:e||void 0,onListItemAction:o,children:l?(e==null?void 0:e.items.length)===0&&r?r:i.jsx(Gi,{itemCount:(e==null?void 0:e.items.length)??0,renderRow:a,...s}):null})}),hx=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(x=>{t(x,h.current.includes(x)?"unselected":"selected"),p(y=>e?[x]:y.includes(x)?y.filter(k=>k!==x):[...y,x])},[e,t]),m=d.useCallback(x=>h.current.includes(x),[]),b=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:f,isDisabled:!!n}),[m,u,f,n]);return d.useEffect(()=>{var x,y;if(r&&(s!=null&&s.items)&&h.current.length===0){let k;l?k=(x=l(s.items))==null?void 0:x.id:k=(y=s.items[0])==null?void 0:y.id,k&&f(k)}},[r,s==null?void 0:s.items,l,f]),i.jsx(yt.Provider,{value:b,children:i.jsx(Ki,{dataProvider:s,...a})})}),[et]=M(["ingredient-card"]),fx=d.memo(({id:e,name:t,trouble:o,ingredientName:n,assigned:r,onListItemAction:s,blocked:l,isSmall:a})=>{const{selected:u,toggleSelection:p}=je(),{t:h}=W.useKosTranslation("dispenser"),f=d.useMemo(()=>u.includes(e),[u,e]),m=d.useCallback(()=>{s&&s(e,"delete")},[e,s]),b=d.useCallback(y=>{s&&s(e,y)},[e,s]),x=d.useCallback(()=>{p(e)},[e,p]);return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(gx,{className:y("holder-list-item",{isSelected:f,isSmall:a}),onClick:x,children:[i.jsxs(mx,{children:[i.jsxs(bx,{children:[i.jsx(T,{variant:a?"small":"body",color:"dark",children:t}),!!o&&i.jsx(Co,{content:o,children:i.jsx(O,{iconId:"ExclamationCircle",color:"red",size:a?"xsm":"sm"})})]}),!!n&&i.jsxs(xx,{children:[i.jsx(ae,{iconId:"DeleteOutlined",color:"blue",size:a?"xsm":"sm",onClick:m,disabled:!r}),i.jsxs(zt,{Reference:i.jsx(ae,{iconId:"Ellipsis",color:"black",size:a?"xsm":"sm"}),onSelect:b,children:[i.jsx(dt,{optionKey:"remove",label:h("holder.removeOption"),disableSelectionStyle:!0,disabled:!r}),i.jsx(dt,{optionKey:"block",disableSelectionStyle:!0,disabled:!r,label:h(`holder.${l?"unblockOption":"blockOption"}`)})]})]})]}),i.jsx(yx,{className:y({isIngredientLess:n===void 0}),children:n?i.jsx(T,{color:"dark",variant:a?"small":"body",bold:!0,children:n}):i.jsx(Le,{variant:a?"borderless-small":"borderless",text:h("holder.assignButton"),icon:"Plus"})})]})})}),gx=g.div`
|
|
2845
|
+
width: 100%;
|
|
2846
|
+
height: 100%;
|
|
2847
|
+
min-height: 60px;
|
|
2848
|
+
border: ${et("border")} solid ${et("border-color")};
|
|
2849
|
+
transition: border 0.125s ease-in-out;
|
|
2850
|
+
border-radius: ${et("border-radius")};
|
|
2851
|
+
padding: ${et("padding")};
|
|
2740
2852
|
display: flex;
|
|
2853
|
+
flex-direction: column;
|
|
2741
2854
|
align-items: flex-start;
|
|
2742
2855
|
justify-content: flex-start;
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2856
|
+
cursor: pointer;
|
|
2857
|
+
&.isSmall {
|
|
2858
|
+
padding: ${et("padding-small")};
|
|
2859
|
+
}
|
|
2860
|
+
&.isSelected {
|
|
2861
|
+
border-color: ${et("border-color-selected")};
|
|
2862
|
+
}
|
|
2863
|
+
`,mx=g.div`
|
|
2748
2864
|
width: 100%;
|
|
2749
2865
|
display: flex;
|
|
2750
2866
|
align-items: center;
|
|
2751
2867
|
justify-content: flex-start;
|
|
2752
|
-
|
|
2753
|
-
`,
|
|
2754
|
-
|
|
2755
|
-
width: fit-content;
|
|
2756
|
-
`,Kn=g.div`
|
|
2757
|
-
padding: ${Ce("footerYPadding")} ${Ce("footerXPadding")};
|
|
2758
|
-
border-top: ${Ce("border-width")} solid ${Ce("border-color")};
|
|
2759
|
-
width: 100%;
|
|
2868
|
+
column-gap: ${et("column-gap")};
|
|
2869
|
+
`,bx=g.div`
|
|
2870
|
+
flex: 1;
|
|
2760
2871
|
display: flex;
|
|
2761
2872
|
align-items: center;
|
|
2762
|
-
justify-content: flex-end;
|
|
2763
|
-
`,Ng=g.div`
|
|
2764
|
-
width: ${Ce("base-content-width")};
|
|
2765
|
-
display: flex;
|
|
2766
|
-
align-items: flex-start;
|
|
2767
2873
|
justify-content: flex-start;
|
|
2768
|
-
|
|
2769
|
-
`,
|
|
2770
|
-
column-gap: ${Ag("footerGap")};
|
|
2771
|
-
`,Wg=d.memo(({headerText:e})=>i.jsxs(i.Fragment,{children:[i.jsx(O,{iconId:"ExclamationCircle",color:"red",size:"lrg"}),i.jsx(T,{variant:"h2",color:"dark",children:e})]})),Pg=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(Vg,{children:[i.jsx(T,{variant:"body",color:"dark",children:e}),i.jsx(On,{name:"matchText",handleError:n,validate:r})]})}),Vg=g.div`
|
|
2772
|
-
width: 288px;
|
|
2874
|
+
column-gap: ${et("column-gap")};
|
|
2875
|
+
`,xx=g.div`
|
|
2773
2876
|
display: flex;
|
|
2774
|
-
align-items:
|
|
2877
|
+
align-items: center;
|
|
2878
|
+
column-gap: ${et("column-gap")};
|
|
2879
|
+
`,yx=g.div`
|
|
2880
|
+
width: 100%;
|
|
2881
|
+
display: flex;
|
|
2882
|
+
align-items: center;
|
|
2775
2883
|
justify-content: flex-start;
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
`,Yg=({className:e,defaultValues:t,header:o,submitText:n,cancelText:r,onCancel:s,enabledIfClean:l,onSubmit:a,content:u,submitButtonVariant:p,cancelButtonVariant:h,variant:f="submit",ContentWrapper:m,disabled:b,...x},y)=>{const k=G.useForm({shouldUnregister:!0,defaultValues:t,disabled:b,...x,mode:f==="blur"?"onBlur":x.mode}),{setOpen:v}=rt(),{setError:$,reset:C}=k,S=d.useCallback(D=>{a({data:D,closeModal:()=>v(!1),setError:$,resetForm:C})},[a,C,$,v]),w=d.useCallback(()=>{s==null||s(C),v(!1)},[s,C,v]),I=d.useCallback(D=>S(D),[S]),j=m??Mi;return i.jsx(G.FormProvider,{...k,children:i.jsxs(Ei,{ref:y,as:"form",className:e,onSubmit:f==="blur"?void 0:k.handleSubmit(S),onBlur:f==="blur"?k.handleSubmit(S):void 0,children:[i.jsx(zi,{children:o}),i.jsx(j,{children:u}),i.jsxs(Kn,{children:[i.jsx(Ke,{text:r??"Cancel",onClick:w,type:"button",variant:h??"borderless"}),f!=="blur"&&i.jsx(Mn,{onSubmit:I,variant:p??"primary",text:n??"Submit",enabledIfClean:l,disabled:b})]})]})})},qg=_t(Yg),[Zg]=M(["modal"]),Xg={escapeKey:!0,outsidePress:!1,bubbles:!1};function Jg(e){const{type:t,open:o,defaultOpen:n,onOpenChange:r,children:s,initialFocus:l,...a}=e,u=t==="confirm"?Lg:t==="status"?Fg:t==="confirm-delete"?Gg:t==="form"?qg:Io;return i.jsxs(mn,{dismissOptions:Xg,open:o,defaultOpen:n,onOpenChange:r,children:[i.jsx(xn,{initialFocus:l,OverlayStyles:Oi,trapFocus:!0,children:i.jsx(u,{...a})}),!!s&&s]})}const Qg=({children:e})=>i.jsx(bn,{children:e}),Oi=z.css`
|
|
2782
|
-
background: ${Zg("overlay-background")};
|
|
2783
|
-
display: grid;
|
|
2784
|
-
place-items: center;
|
|
2785
|
-
z-index: 2;
|
|
2786
|
-
`,[ht]=M(["named-section-header"]),Ri=g.div`
|
|
2884
|
+
margin-top: auto;
|
|
2885
|
+
&.isIngredientLess {
|
|
2886
|
+
justify-content: center;
|
|
2887
|
+
}
|
|
2888
|
+
`,[ht]=M(["named-section-header"]),Yi=g.div`
|
|
2787
2889
|
align-items: flex-start;
|
|
2788
2890
|
background-color: ${ht("bg")};
|
|
2789
2891
|
border-bottom: ${ht("border-width")} solid ${ht("border-color")};
|
|
@@ -2794,7 +2896,7 @@
|
|
|
2794
2896
|
&.isCollapsed {
|
|
2795
2897
|
border-bottom-width: 0px;
|
|
2796
2898
|
}
|
|
2797
|
-
`,
|
|
2899
|
+
`,vx=d.memo(({children:e})=>{const{setOpen:t,open:o}=Xt(),n=d.useCallback(r=>{r.stopPropagation(),t(!o)},[o,t]);return i.jsxs(Yi,{className:xt("header-wrapper",{isCollapsed:o}),children:[i.jsx(ae,{iconId:o?"CaretDown":"CaretUp",onClick:n,size:"xsm",color:"black"}),e]})}),[Qe]=M(["named-section"]),kx=e=>e.variant==="selectable",qi=e=>{const{variant:t,className:o,children:n,header:r,isCollapsible:s}=e,l=d.useRef(null),[a,u,p]=kx(e)?[e.disabled,e.isSelected,e.onClick]:[e.disabled,!1,void 0],h=e.ContentWrapper??Cx,f=d.useCallback(m=>{p&&l.current&&l.current.contains(m.target)&&p()},[p]);return i.jsx(z.ClassNames,{children:({cx:m})=>i.jsx(wx,{"data-variant":t,className:m(o,{disabled:a,isSelected:u}),onClick:f,ref:l,children:s?i.jsxs(mo,{defaultOpen:!0,children:[i.jsx(vx,{children:r}),i.jsx(bo,{children:i.jsx(h,{children:n})})]}):i.jsxs(i.Fragment,{children:[i.jsx(Yi,{className:"header-wrapper",children:r}),i.jsx(h,{children:n})]})})})},wx=g.div`
|
|
2798
2900
|
border-color: ${Qe("border-color")};
|
|
2799
2901
|
border-radius: ${Qe("border-radius")};
|
|
2800
2902
|
border-style: solid;
|
|
@@ -2830,10 +2932,10 @@
|
|
|
2830
2932
|
top: 0;
|
|
2831
2933
|
}
|
|
2832
2934
|
}
|
|
2833
|
-
`,
|
|
2935
|
+
`,Cx=g.div`
|
|
2834
2936
|
display: flex;
|
|
2835
2937
|
width: 100%;
|
|
2836
|
-
`,[Do]=M(["named-section-header"])
|
|
2938
|
+
`,[Do]=M(["named-section-header"]),$x=d.memo(({name:e,description:t,prefix:o,suffix:n,children:r,...s})=>i.jsxs(Sx,{...s,className:t?"hasDesc":void 0,children:[i.jsxs(jx,{children:[i.jsxs(Ix,{children:[o,i.jsx(T,{color:"dark",bold:!0,variant:"body",children:e}),n]}),!!t&&i.jsx(T,{color:"grey",variant:"small",children:t})]}),!!r&&i.jsx(Dx,{children:r})]})),Sx=g.div`
|
|
2837
2939
|
width: 100%;
|
|
2838
2940
|
display: flex;
|
|
2839
2941
|
align-items: center;
|
|
@@ -2842,377 +2944,172 @@
|
|
|
2842
2944
|
&.hasDesc {
|
|
2843
2945
|
align-items: flex-start;
|
|
2844
2946
|
}
|
|
2845
|
-
`,
|
|
2947
|
+
`,jx=g.div`
|
|
2846
2948
|
display: flex;
|
|
2847
2949
|
align-items: flex-start;
|
|
2848
2950
|
justify-content: center;
|
|
2849
2951
|
flex-direction: column;
|
|
2850
2952
|
row-gap: ${Do("row-gap")};
|
|
2851
|
-
`,
|
|
2953
|
+
`,Ix=g.div`
|
|
2852
2954
|
display: flex;
|
|
2853
2955
|
align-items: center;
|
|
2854
2956
|
justify-content: flex-start;
|
|
2855
2957
|
column-gap: ${Do("row-gap")};
|
|
2856
|
-
`,
|
|
2958
|
+
`,Dx=g.div`
|
|
2857
2959
|
display: flex;
|
|
2858
2960
|
align-items: center;
|
|
2859
2961
|
justify-content: flex-end;
|
|
2860
2962
|
row-gap: ${Do("row-gap")};
|
|
2861
|
-
`,
|
|
2862
|
-
align-items: center;
|
|
2863
|
-
background: ${co("bg")};
|
|
2864
|
-
display: flex;
|
|
2865
|
-
gap: ${co("gap")};
|
|
2866
|
-
padding: 0 0 ${co("padding-bottom")} 0;
|
|
2867
|
-
width: 100%;
|
|
2868
|
-
`,pm=g.div`
|
|
2869
|
-
width: 100%;
|
|
2870
|
-
display: flex;
|
|
2871
|
-
align-items: center;
|
|
2872
|
-
column-gap: ${c("spacing-8")};
|
|
2873
|
-
justify-content: flex-start;
|
|
2874
|
-
`,hm=g.div`
|
|
2875
|
-
display: flex;
|
|
2876
|
-
flex-direction: column;
|
|
2877
|
-
flex: 1;
|
|
2878
|
-
gap: ${co("title-gap")};
|
|
2879
|
-
`,Fi=d.createContext(null),fm=()=>{const e=d.useContext(Fi);if(e===null)throw new Error("Unable to use SelectViewListContext outside of its provider.");return e};function gm(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 an=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]}),mm=(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("/")},[he]=M(["select-view-list"]),Ai=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:l}=fm(),a=d.useRef(null),u=d.useRef(null),p=d.useRef(!1),h=s===e,f=l===e;d.useEffect(()=>{u.current&&(h?(an.observe(u.current),p.current=!0):p.current&&(p.current=!1,an.unobserve(u.current)))},[h]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),b=d.useCallback(x=>{a.current&&a.current.contains(x.target)||n==null||n(e,"view")},[e,n]);return i.jsx(z.ClassNames,{children:({cx:x})=>i.jsx(bm,{ref:u,className:x({isSelected:h}),onClick:b,children:i.jsxs(xm,{className:x({isViewing:f}),children:[i.jsx(wn,{ref:a,checked:h,disabled:r,onChange:m}),i.jsxs(ym,{color:"dark",bold:h,variant:"body",children:[t,o]}),i.jsx(O,{iconId:"Right",color:"blue",size:"sm"})]})})})}),bm=g.div`
|
|
2880
|
-
width: 100%;
|
|
2881
|
-
display: flex;
|
|
2882
|
-
height: auto;
|
|
2883
|
-
flex-shrink: 0;
|
|
2884
|
-
align-items: center;
|
|
2885
|
-
justify-content: flex-start;
|
|
2886
|
-
border-bottom: ${he("border-width")} solid ${he("border-color")};
|
|
2887
|
-
|
|
2888
|
-
&:first-of-type {
|
|
2889
|
-
border-top-color: ${he("border-color")};
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
:not(:first-of-type):not(.isStuckBottom):has(div.isViewing) {
|
|
2893
|
-
border-top-color: ${he("background-color-viewing")};
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
&.isSelected {
|
|
2897
|
-
position: sticky;
|
|
2898
|
-
top: -1px;
|
|
2899
|
-
bottom: -1px;
|
|
2900
|
-
}
|
|
2901
|
-
|
|
2902
|
-
&.isStuckBottom {
|
|
2903
|
-
box-shadow: 0px -6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
2904
|
-
border-top: ${he("border-width")} solid ${he("background-color")};
|
|
2905
|
-
border-top-color: ${he("border-color")};
|
|
2906
|
-
}
|
|
2907
|
-
|
|
2908
|
-
&.isStuckTop {
|
|
2909
|
-
box-shadow: 0px 6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
2910
|
-
}
|
|
2911
|
-
`,xm=g.div`
|
|
2912
|
-
width: 100%;
|
|
2913
|
-
display: flex;
|
|
2914
|
-
flex-shrink: 0;
|
|
2915
|
-
align-items: center;
|
|
2916
|
-
justify-content: flex-start;
|
|
2917
|
-
height: ${he("item-height")};
|
|
2918
|
-
padding-left: ${he("padding-left")};
|
|
2919
|
-
padding-right: ${he("padding-right")};
|
|
2920
|
-
background-color: ${he("background-color")};
|
|
2921
|
-
transition: background 0.125s ease-in-out;
|
|
2922
|
-
&.isViewing {
|
|
2923
|
-
background-color: ${he("background-color-viewing")};
|
|
2924
|
-
}
|
|
2925
|
-
`,ym=g(T)`
|
|
2926
|
-
flex: 1;
|
|
2927
|
-
overflow: hidden;
|
|
2928
|
-
text-overflow: ellipsis;
|
|
2929
|
-
white-space: nowrap;
|
|
2930
|
-
padding-left: ${he("padding-left")};
|
|
2931
|
-
padding-right: ${he("padding-right")};
|
|
2932
|
-
gap: ${he("gap")};
|
|
2933
|
-
align-items: center;
|
|
2934
|
-
display: flex;
|
|
2935
|
-
`,vm=({className:e,dp:t,emptyState:o,firstChild:n,lastChild:r,onListItemAction:s,selected:l,viewing:a})=>{const u=d.useMemo(()=>({selected:l,viewing:a}),[l,a]);return i.jsx(Fi.Provider,{value:u,children:i.jsx(km,{className:e,dataProvider:t,emptyState:o,firstChild:n,ItemTemplate:Ai,lastChild:r,onListItemAction:s})})},km=g(Hn)`
|
|
2936
|
-
height: 100%;
|
|
2937
|
-
width: 100%;
|
|
2938
|
-
align-items: flex-start;
|
|
2939
|
-
justify-content: flex-start;
|
|
2940
|
-
flex-direction: column;
|
|
2941
|
-
overflow: auto;
|
|
2942
|
-
|
|
2943
|
-
::-webkit-scrollbar {
|
|
2944
|
-
border-left: 1px solid #dfdfdf;
|
|
2945
|
-
width: 9px;
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
::-webkit-scrollbar-thumb {
|
|
2949
|
-
border-left: 3px solid transparent;
|
|
2950
|
-
}
|
|
2951
|
-
`,Li=d.createContext(!1),wm=()=>d.useContext(Li),Cm=d.memo(({title:e,disabled:t,onToggleShowSelected:o,t:n})=>i.jsxs($m,{children:[i.jsx(T,{variant:"h2",color:"dark",children:e}),i.jsxs(Sm,{children:[i.jsx(T,{variant:"small",color:"grey",children:(n==null?void 0:n("selectedOnly"))??"MISSING T FUNC"}),i.jsx(ko,{disabled:t,onChange:o})]})]})),$m=g.div`
|
|
2963
|
+
`,Zi=d.createContext(!1),_x=()=>d.useContext(Zi),Tx=d.memo(({title:e,disabled:t,onToggleShowSelected:o,t:n})=>i.jsxs(Ex,{children:[i.jsx(T,{variant:"h2",color:"dark",children:e}),i.jsxs(zx,{children:[i.jsx(T,{variant:"small",color:"grey",children:(n==null?void 0:n("selectedOnly"))??"MISSING T FUNC"}),i.jsx(ko,{disabled:t,onChange:o})]})]})),Ex=g.div`
|
|
2952
2964
|
display: flex;
|
|
2953
2965
|
align-items: center;
|
|
2954
2966
|
width: 100%;
|
|
2955
2967
|
justify-content: space-between;
|
|
2956
2968
|
gap: ${c("spacing-8")};
|
|
2957
|
-
`,
|
|
2969
|
+
`,zx=g.div`
|
|
2958
2970
|
display: flex;
|
|
2959
2971
|
align-items: center;
|
|
2960
2972
|
gap: ${c("spacing-4")};
|
|
2961
|
-
`,
|
|
2973
|
+
`,Mx=d.memo(e=>{const{selected:t}=je(),o=_x(),n=t.includes(e.id);return o&&!n?null:i.jsx(Li,{...e})}),Ox=g(qi)`
|
|
2962
2974
|
overflow: hidden;
|
|
2963
|
-
`,
|
|
2975
|
+
`,Rx=g.div`
|
|
2964
2976
|
overflow-x: hidden;
|
|
2965
2977
|
overflow-y: auto;
|
|
2966
|
-
`,
|
|
2978
|
+
`,Nx=W.kosComponent(({defaultShowSelected:e,disabled:t,title:o,selected:n,onSelect:r,emptyMessage:s,dataProvider:l,className:a,onSelectAll:u,t:p})=>{const[h,f]=d.useState(e??!1),m=d.useRef(null),b=d.useCallback(y=>{f(y)},[]);d.useEffect(()=>{const y=l;y&&y.updateContextValue&&(y==null||y.updateContextValue("isOnlySelectedVisible",h))},[l,h]),d.useEffect(()=>{const y=l;y&&y.updateContextValue&&(y==null||y.updateContextValue("selected",n))},[l,n]),d.useEffect(()=>{m.current&&n&&(n.length&&n.length!==(l==null?void 0:l.items.length)?m.current.indeterminate!==!0&&(l!=null&&l.items.length)&&(m.current.indeterminate=!0):m.current.indeterminate===!0&&(m.current.indeterminate=!1))},[l==null?void 0:l.items,n]);const x=d.useCallback(()=>{u&&u(n&&n.length>0?"deselect":"select")},[u,n]);return i.jsx(Zi.Provider,{value:h,children:i.jsx(Ox,{className:a,variant:"display",header:i.jsx(Tx,{title:o,disabled:t,t:p,onToggleShowSelected:b}),ContentWrapper:Rx,children:i.jsxs(Fx,{children:[!!u&&!!(l!=null&&l.items.length)&&i.jsxs(oo,{children:[i.jsx(jo,{children:i.jsx(bt,{ref:m,disabled:t,checked:!!n&&!!n.length&&n.length===l.items.length,onChange:x})}),i.jsx(Io,{children:i.jsx(T,{bold:!0,variant:"body",children:(p==null?void 0:p("selectAll"))??"MISSING T FUNC"})})]}),i.jsx(So,{disabled:t,selected:n,isSingleSelect:!1,onSelect:r,emptyState:s?i.jsx(Ax,{children:i.jsx(T,{variant:"body",color:"grey",children:s})}):void 0,ItemTemplate:Mx,dataProvider:l})]})})})}),Fx=g.div`
|
|
2967
2979
|
width: 100%;
|
|
2968
2980
|
display: flex;
|
|
2969
2981
|
flex-direction: column;
|
|
2970
2982
|
align-items: flex-start;
|
|
2971
2983
|
justify-content: flex-start;
|
|
2972
|
-
`,
|
|
2984
|
+
`,Ax=g.div`
|
|
2973
2985
|
width: 100%;
|
|
2974
2986
|
display: flex;
|
|
2975
2987
|
align-items: center;
|
|
2976
2988
|
justify-content: center;
|
|
2977
2989
|
padding: ${c("spacing-12")} ${c("spacing-20")};
|
|
2978
|
-
`;class
|
|
2990
|
+
`;class Lx extends Hn{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=_.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),l=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=>!l.find(p=>p.id===u)).forEach(u=>{W.kosAction(()=>{this.observableItems.delete(u)})}),l.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 f=Object.assign(h,p);u.set(p.id,f)})}return u},this.observableItems),l.map(u=>this.observableItems.get(u.id))}}const Bx=({rightMenu:e,leftMenu:t,className:o})=>i.jsxs(Wx,{className:o,children:[t,i.jsx(Px,{children:e})]}),Wx=g.div`
|
|
2979
2991
|
align-items: center;
|
|
2980
|
-
|
|
2992
|
+
background-color: ${c("color-black")};
|
|
2981
2993
|
display: flex;
|
|
2982
|
-
|
|
2994
|
+
gap: 12px;
|
|
2995
|
+
height: ${c("spacing-32")};
|
|
2983
2996
|
justify-content: space-between;
|
|
2984
|
-
padding: 0px ${
|
|
2997
|
+
padding: 0px ${c("spacing-20")};
|
|
2985
2998
|
width: 100%;
|
|
2986
|
-
`,
|
|
2987
|
-
align-items: center;
|
|
2988
|
-
column-gap: ${ln("link-gap")};
|
|
2999
|
+
`,Px=g.div`
|
|
2989
3000
|
display: flex;
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
line-height: unset;
|
|
2995
|
-
cursor: pointer;
|
|
2996
|
-
`,[et]=M(["ingredient-card"]),Fm=d.memo(({id:e,name:t,trouble:o,ingredientName:n,assigned:r,onListItemAction:s,blocked:l,isSmall:a})=>{const{selected:u,toggleSelection:p}=je(),{t:h}=W.useKosTranslation("dispenser"),f=d.useMemo(()=>u.includes(e),[u,e]),m=d.useCallback(()=>{s&&s(e,"delete")},[e,s]),b=d.useCallback(y=>{s&&s(e,y)},[e,s]),x=d.useCallback(()=>{p(e)},[e,p]);return i.jsx(z.ClassNames,{children:({cx:y})=>i.jsxs(Am,{className:y("holder-list-item",{isSelected:f,isSmall:a}),onClick:x,children:[i.jsxs(Lm,{children:[i.jsxs(Bm,{children:[i.jsx(T,{variant:a?"small":"body",color:"dark",children:t}),!!o&&i.jsx(Co,{content:o,children:i.jsx(O,{iconId:"ExclamationCircle",color:"red",size:a?"xsm":"sm"})})]}),!!n&&i.jsxs(Wm,{children:[i.jsx(ae,{iconId:"DeleteOutlined",color:"blue",size:a?"xsm":"sm",onClick:m,disabled:!r}),i.jsxs(zt,{Reference:i.jsx(ae,{iconId:"Ellipsis",color:"black",size:a?"xsm":"sm"}),onSelect:b,children:[i.jsx(dt,{optionKey:"remove",label:h("holder.removeOption"),disableSelectionStyle:!0,disabled:!r}),i.jsx(dt,{optionKey:"block",disableSelectionStyle:!0,disabled:!r,label:h(`holder.${l?"unblockOption":"blockOption"}`)})]})]})]}),i.jsx(Pm,{className:y({isIngredientLess:n===void 0}),children:n?i.jsx(T,{color:"dark",variant:a?"small":"body",bold:!0,children:n}):i.jsx(Ke,{variant:a?"borderless-small":"borderless",text:h("holder.assignButton"),icon:"Plus"})})]})})}),Am=g.div`
|
|
2997
|
-
width: 100%;
|
|
2998
|
-
height: 100%;
|
|
2999
|
-
min-height: 60px;
|
|
3000
|
-
border: ${et("border")} solid ${et("border-color")};
|
|
3001
|
-
transition: border 0.125s ease-in-out;
|
|
3002
|
-
border-radius: ${et("border-radius")};
|
|
3003
|
-
padding: ${et("padding")};
|
|
3001
|
+
align-items: center;
|
|
3002
|
+
`,[Ce]=M(["modal"]),Xi=g.div`
|
|
3003
|
+
width: fit-content;
|
|
3004
|
+
height: fit-content;
|
|
3004
3005
|
display: flex;
|
|
3005
|
-
flex-direction: column;
|
|
3006
3006
|
align-items: flex-start;
|
|
3007
3007
|
justify-content: flex-start;
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
border-color: ${et("border-color-selected")};
|
|
3014
|
-
}
|
|
3015
|
-
`,Lm=g.div`
|
|
3008
|
+
flex-direction: column;
|
|
3009
|
+
background-color: ${Ce("background-color")};
|
|
3010
|
+
`,Ji=g.div`
|
|
3011
|
+
padding: ${Ce("headerPadding")};
|
|
3012
|
+
column-gap: ${Ce("headerGap")};
|
|
3016
3013
|
width: 100%;
|
|
3017
3014
|
display: flex;
|
|
3018
3015
|
align-items: center;
|
|
3019
3016
|
justify-content: flex-start;
|
|
3020
|
-
|
|
3021
|
-
`,
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
`,Wm=g.div`
|
|
3028
|
-
display: flex;
|
|
3029
|
-
align-items: center;
|
|
3030
|
-
column-gap: ${et("column-gap")};
|
|
3031
|
-
`,Pm=g.div`
|
|
3017
|
+
border-bottom: ${Ce("border-width")} solid ${Ce("border-color")};
|
|
3018
|
+
`,Qi=g.div`
|
|
3019
|
+
padding: ${Ce("contentYPadding")} ${Ce("contentXPadding")};
|
|
3020
|
+
width: fit-content;
|
|
3021
|
+
`,Yn=g.div`
|
|
3022
|
+
padding: ${Ce("footerYPadding")} ${Ce("footerXPadding")};
|
|
3023
|
+
border-top: ${Ce("border-width")} solid ${Ce("border-color")};
|
|
3032
3024
|
width: 100%;
|
|
3033
3025
|
display: flex;
|
|
3034
3026
|
align-items: center;
|
|
3035
|
-
justify-content: flex-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
justify-content: center;
|
|
3039
|
-
}
|
|
3040
|
-
`,Vm=["settings","devices","tools","performance"],Hm=["viewBrowse","manage","configure","troubleshoot","store","main"],Um=Vm.map(e=>Hm.map(t=>({start:e,end:t}))).flatMap(e=>e),[$e,Bi]=M(["branded-header","icon"]),Gm=g.div`
|
|
3041
|
-
width: 100%;
|
|
3027
|
+
justify-content: flex-end;
|
|
3028
|
+
`,Vx=g.div`
|
|
3029
|
+
width: ${Ce("base-content-width")};
|
|
3042
3030
|
display: flex;
|
|
3043
|
-
flex-direction: column;
|
|
3044
3031
|
align-items: flex-start;
|
|
3045
3032
|
justify-content: flex-start;
|
|
3046
|
-
|
|
3047
|
-
`,
|
|
3048
|
-
|
|
3033
|
+
flex-direction: column;
|
|
3034
|
+
`,_o=d.forwardRef(({header:e,footer:t,content:o,footerWrapper:n,headerWrapper:r,contentWrapper:s},l)=>{const a=r??Ji,u=s??Qi,p=n??Yn;return i.jsxs(Xi,{ref:l,children:[i.jsx(a,{children:e}),i.jsx(u,{children:o}),i.jsx(p,{children:t})]})}),Hx=d.forwardRef(({level:e,headerText:t,content:o,acceptButtonVariant:n,acceptButtonText:r,onAccept:s},l)=>{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}=rt(),p=d.useCallback(()=>{s&&s(),u(!1)},[u,s]);return i.jsx(_o,{ref:l,header:i.jsxs(i.Fragment,{children:[!!a&&i.jsx(O,{iconId:a.iconId,color:a.color}),i.jsx(T,{variant:"h2",color:"dark",children:t})]}),content:o,footer:i.jsx(Le,{onClick:p,variant:n??"primary",text:r??"Okay"})})}),[Ux]=M(["modal"]),Gx=d.forwardRef(({onConfirm:e,onCancel:t,headerText:o,confirmText:n,cancelText:r,content:s,confirmButtonVariant:l,cancelButtonVariant:a,confirmDisabled:u,headerIcon:p,headerIconColor:h,contentWrapper:f,cancelDisabled:m},b)=>{const{setOpen:x}=rt(),y=d.useCallback(()=>{e(()=>x(!1))},[e,x]),k=d.useCallback(()=>{t&&t(),x(!1)},[t,x]);return i.jsx(_o,{ref:b,header:i.jsxs(i.Fragment,{children:[!!p&&i.jsx(O,{iconId:p,color:h??"black"}),i.jsx(T,{variant:"h2",color:"dark",children:o})]}),contentWrapper:f,content:s,footerWrapper:Kx,footer:i.jsxs(i.Fragment,{children:[i.jsx(Le,{text:r??"Cancel",onClick:k,disabled:m,variant:a??"borderless"}),i.jsx(Le,{onClick:y,variant:l??"primary",text:n??"Confirm",disabled:u})]})})}),Kx=g(Yn)`
|
|
3035
|
+
column-gap: ${Ux("footerGap")};
|
|
3036
|
+
`,Yx=d.memo(({headerText:e})=>i.jsxs(i.Fragment,{children:[i.jsx(O,{iconId:"ExclamationCircle",color:"red",size:"lrg"}),i.jsx(T,{variant:"h2",color:"dark",children:e})]})),qx=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(Zx,{children:[i.jsx(T,{variant:"body",color:"dark",children:e}),i.jsx(Fn,{name:"matchText",handleError:n,validate:r})]})}),Zx=g.div`
|
|
3037
|
+
width: 288px;
|
|
3049
3038
|
display: flex;
|
|
3050
|
-
align-items:
|
|
3039
|
+
align-items: flex-start;
|
|
3051
3040
|
justify-content: flex-start;
|
|
3052
|
-
|
|
3053
|
-
|
|
3041
|
+
flex-direction: column;
|
|
3042
|
+
row-gap: 8px;
|
|
3043
|
+
`,Xx=d.memo(({onSubmit:e})=>{const{setOpen:t}=rt(),o=d.useCallback(()=>{t(!1)},[t]);return i.jsxs(i.Fragment,{children:[i.jsx(Le,{type:"button",text:"Cancel",onClick:o,variant:"borderless"}),i.jsx(Nn,{onSubmit:e,variant:"primary",text:"Delete"})]})}),Jx={matchText:""},Qx=d.forwardRef(({compareText:e,headerText:t,contentText:o,errorText:n,onConfirm:r},s)=>{const{setOpen:l}=rt(),a=d.useCallback((u,p)=>{r(u,()=>l(!1),p)},[r,l]);return i.jsx(e0,{onSubmit:a,mode:"onChange",delayError:400,defaultValues:Jx,children:i.jsx(_o,{ref:s,header:i.jsx(Yx,{headerText:t}),content:i.jsx(qx,{compareText:e,contentText:o,errorText:n}),footer:i.jsx(Xx,{onSubmit:a})})})}),e0=g(yi)`
|
|
3044
|
+
height: fit-content;
|
|
3045
|
+
width: fit-content;
|
|
3046
|
+
`,t0=({className:e,defaultValues:t,header:o,submitText:n,cancelText:r,onCancel:s,enabledIfClean:l,onSubmit:a,content:u,submitButtonVariant:p,cancelButtonVariant:h,variant:f="submit",ContentWrapper:m,disabled:b,...x},y)=>{const k=G.useForm({shouldUnregister:!0,defaultValues:t,disabled:b,...x,mode:f==="blur"?"onBlur":x.mode}),{setOpen:v}=rt(),{setError:$,reset:C}=k,S=d.useCallback(D=>{a({data:D,closeModal:()=>v(!1),setError:$,resetForm:C})},[a,C,$,v]),w=d.useCallback(()=>{s==null||s(C),v(!1)},[s,C,v]),I=d.useCallback(D=>S(D),[S]),j=m??Qi;return i.jsx(G.FormProvider,{...k,children:i.jsxs(Xi,{ref:y,as:"form",className:e,onSubmit:f==="blur"?void 0:k.handleSubmit(S),onBlur:f==="blur"?k.handleSubmit(S):void 0,children:[i.jsx(Ji,{children:o}),i.jsx(j,{children:u}),i.jsxs(Yn,{children:[i.jsx(Le,{text:r??"Cancel",onClick:w,type:"button",variant:h??"borderless"}),f!=="blur"&&i.jsx(Nn,{onSubmit:I,variant:p??"primary",text:n??"Submit",enabledIfClean:l,disabled:b})]})]})})},o0=Tt(t0),[n0]=M(["modal"]),r0={escapeKey:!0,outsidePress:!1,bubbles:!1};function s0(e){const{type:t,open:o,defaultOpen:n,onOpenChange:r,children:s,initialFocus:l,...a}=e,u=t==="confirm"?Gx:t==="status"?Hx:t==="confirm-delete"?Qx:t==="form"?o0:_o;return i.jsxs(mn,{dismissOptions:r0,open:o,defaultOpen:n,onOpenChange:r,children:[i.jsx(xn,{initialFocus:l,OverlayStyles:ea,trapFocus:!0,children:i.jsx(u,{...a})}),!!s&&s]})}const i0=({children:e})=>i.jsx(bn,{children:e}),ea=z.css`
|
|
3047
|
+
background: ${n0("overlay-background")};
|
|
3048
|
+
display: grid;
|
|
3049
|
+
place-items: center;
|
|
3050
|
+
z-index: 2;
|
|
3051
|
+
`,[co]=M(["image-config-page-header"]),a0=e=>e?Array.isArray(e)?e.map(t=>i.jsx(fo,{color:"light",children:t},t)):i.jsx(fo,{color:"light",children:e}):null,l0=({action:e,description:t,title:o,titleTag:n,subTitle:r,...s})=>i.jsxs(c0,{...s,children:[i.jsxs(u0,{children:[i.jsxs(d0,{children:[i.jsx(T,{variant:"h1",children:o}),a0(n)]}),t&&i.jsx(T,{variant:"body",color:"grey",children:t}),r&&i.jsx(T,{variant:"body",color:"dark",children:r})]}),e]}),c0=g.div`
|
|
3052
|
+
align-items: center;
|
|
3053
|
+
background: ${co("bg")};
|
|
3054
3054
|
display: flex;
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
`,
|
|
3059
|
-
|
|
3055
|
+
gap: ${co("gap")};
|
|
3056
|
+
padding: 0 0 ${co("padding-bottom")} 0;
|
|
3057
|
+
width: 100%;
|
|
3058
|
+
`,d0=g.div`
|
|
3059
|
+
width: 100%;
|
|
3060
3060
|
display: flex;
|
|
3061
3061
|
align-items: center;
|
|
3062
|
+
column-gap: ${c("spacing-8")};
|
|
3062
3063
|
justify-content: flex-start;
|
|
3063
|
-
|
|
3064
|
-
/* disabled as title usage was deprecated... */
|
|
3065
|
-
/* &.hasDescription {
|
|
3066
|
-
align-items: flex-start;
|
|
3067
|
-
} */
|
|
3068
|
-
`,Zm=g.div`
|
|
3069
|
-
flex: 1;
|
|
3070
|
-
overflow: hidden;
|
|
3064
|
+
`,u0=g.div`
|
|
3071
3065
|
display: flex;
|
|
3072
3066
|
flex-direction: column;
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
height:
|
|
3078
|
-
|
|
3079
|
-
${Um.map(({start:e,end:t})=>`&[data-gradient="${e}-${t}"] {
|
|
3080
|
-
background: linear-gradient(
|
|
3081
|
-
90deg,
|
|
3082
|
-
${$e(`startColor-${e}`)} 0%,
|
|
3083
|
-
${$e(`endColor-${t}`)} 100%
|
|
3084
|
-
);
|
|
3085
|
-
}`)}
|
|
3086
|
-
`,Xm=g.div`
|
|
3087
|
-
background-color: ${e=>e.color};
|
|
3088
|
-
height: ${$e("badge-size")};
|
|
3089
|
-
width: ${$e("badge-size")};
|
|
3090
|
-
border-radius: ${$e("badge-radius")};
|
|
3091
|
-
position: relative;
|
|
3092
|
-
${`${Bi("size-xxlrg",!0)}: 52px`};
|
|
3093
|
-
`;g.div`
|
|
3094
|
-
height: ${$e("badge-size")};
|
|
3095
|
-
width: ${$e("badge-size")};
|
|
3096
|
-
border-radius: ${$e("badge-radius")};
|
|
3097
|
-
position: relative;
|
|
3098
|
-
${`${Bi("size-xxlrg",!0)}: calc(100% - 2px)`};
|
|
3099
|
-
${Wi}
|
|
3100
|
-
`;const Jm=g.div`
|
|
3067
|
+
flex: 1;
|
|
3068
|
+
gap: ${co("title-gap")};
|
|
3069
|
+
`,p0=g.div`
|
|
3070
|
+
width: ${({variant:e})=>e.endsWith("small")?"100px":"128px"};
|
|
3071
|
+
height: ${({variant:e})=>e.endsWith("small")?"20px":"28px"};
|
|
3072
|
+
`,h0=g.div`
|
|
3101
3073
|
width: 100%;
|
|
3102
3074
|
height: 100%;
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
display: flex;
|
|
3107
|
-
align-items: center;
|
|
3108
|
-
justify-content: center;
|
|
3109
|
-
z-index: 2;
|
|
3110
|
-
`;g.div`
|
|
3111
|
-
width: 100%;
|
|
3075
|
+
background: #fff;
|
|
3076
|
+
border-radius: 6px;
|
|
3077
|
+
overflow: hidden;
|
|
3112
3078
|
display: flex;
|
|
3113
3079
|
align-items: center;
|
|
3114
|
-
|
|
3080
|
+
border: 1px solid ${c("color-primary")};
|
|
3081
|
+
|
|
3115
3082
|
position: relative;
|
|
3116
|
-
|
|
3117
|
-
overflow: hidden;
|
|
3118
|
-
${Wi}
|
|
3119
|
-
`;const Qm=g.div`
|
|
3083
|
+
`,f0=g(Le)`
|
|
3120
3084
|
width: 100%;
|
|
3085
|
+
border-radius: 6px;
|
|
3086
|
+
justify-content: center;
|
|
3087
|
+
`,g0=g.div`
|
|
3121
3088
|
height: 100%;
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
text-overflow: ellipsis;
|
|
3134
|
-
`,tb=e=>i.jsx(eb,{...e,variant:"body",color:"dark"}),ob=d.memo(({color:e,title:t,description:o,icon:n,Action:r,isOffline:s})=>i.jsx(z.ClassNames,{children:({cx:l})=>i.jsx(Gm,{children:i.jsxs(Km,{children:[i.jsxs(Xm,{color:e,children:[i.jsx(Jm,{children:n&&i.jsx(O,{iconId:n,size:"xxlrg",color:"white"})}),!!s&&i.jsx(Qm,{})]}),i.jsxs(Ym,{children:[i.jsx(qm,{className:l({hasDescription:!!o}),children:i.jsxs(Zm,{children:[i.jsx(T,{variant:"h1",children:t}),!!o&&i.jsx(tb,{children:o})]})}),!!r&&i.jsx(r,{})]})]})})})),Pi=d.createContext(null),Vi=W.kosComponent(({children:e,t,isSortable:o,onListItemAction:n})=>{const r=d.useMemo(()=>({t,isSortable:!!o,onListItemAction:n}),[o,t,n]);return i.jsx(Pi.Provider,{value:r,children:e})}),Yn=()=>{const e=d.useContext(Pi);if(e===null)throw new Error("TableContext must be used within a TableContextProvider");return e},[at]=M(["table"]),_o=g.td`
|
|
3135
|
-
padding: ${at("cell-padding-y")} ${at("cell-padding-x")};
|
|
3136
|
-
background-color: ${at("background-color")};
|
|
3137
|
-
color: ${at("cell-color")};
|
|
3138
|
-
font-size: ${at("cell-font-size")};
|
|
3139
|
-
font-weight: ${at("cell-font-weight")};
|
|
3140
|
-
&.isSortable {
|
|
3141
|
-
padding-right: ${at("cell-padding-right-sortable")};
|
|
3142
|
-
}
|
|
3143
|
-
&:first-of-type {
|
|
3144
|
-
padding-left: ${at("cell-padding-left-first-in-row")};
|
|
3145
|
-
}
|
|
3146
|
-
`,qn=d.memo(({cell:e})=>{const{isSortable:t}=Yn();return i.jsx(_o,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:we.flexRender(e.column.columnDef.cell,e.getContext())},e.id)}),[Dr]=M(["table"]),jt=g.tr`
|
|
3147
|
-
width: 100%;
|
|
3148
|
-
border-bottom: ${Dr("row-border-bottom-size")} solid ${Dr("border-color")};
|
|
3149
|
-
`,nb=d.memo(({row:e,TdComponent:t})=>{const o=t??qn;return i.jsx(jt,{children:e.getVisibleCells().map(n=>i.jsx(o,{cell:n},n.id))})}),[rb]=M(["table"]),sb=e=>e.id,ib=({items:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})=>{const[m,b]=d.useState([]),x=we.useReactTable({columns:t,meta:{disabled:h},data:e,getCoreRowModel:we.getCoreRowModel(),getSortedRowModel:r?we.getSortedRowModel():void 0,getRowId:o??sb,onSortingChange:r?b:void 0,state:{sorting:m}}),y=a??nb,k=!x.getRowModel().rows.length;return k&&p?n??null:i.jsx(Vi,{onListItemAction:u,isSortable:r,t:s,children:i.jsxs(cb,{...f,children:[i.jsx(db,{children:x.getHeaderGroups().map(v=>i.jsx(jt,{children:v.headers.map($=>i.jsx(d.Fragment,{children:we.flexRender($.column.columnDef.header,$.getContext())},$.id))},v.id))}),i.jsx(ub,{children:k?i.jsx(jt,{children:i.jsx(_o,{colSpan:t.length,children:n??null})}):x.getRowModel().rows.map(v=>i.jsx(y,{row:v,TdComponent:l??qn},v.id))})]})})},ab=[],lb=W.kosComponent(({dataProvider:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})=>{const m=Qt(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(It.Observer,{children:()=>{const b=m&&e?e.items:ab;return i.jsx(ib,{items:b,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})}})})}),cb=g.table`
|
|
3150
|
-
width: 100%;
|
|
3151
|
-
overflow: auto;
|
|
3152
|
-
border-collapse: collapse;
|
|
3153
|
-
font-family: ${rb("font-family")};
|
|
3154
|
-
table-layout: fixed;
|
|
3155
|
-
`,db=g.thead`
|
|
3156
|
-
width: 100%;
|
|
3157
|
-
`,ub=g.tbody`
|
|
3158
|
-
width: 100%;
|
|
3159
|
-
`,[Me]=M(["table"]),pb=(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",cn=d.memo(({width:e,isBlank:t,toggleSorting:o,id:n,alignment:r,sortValue:s,canSort:l,isVirtual:a})=>{const{isSortable:u,t:p}=Yn(),h=d.useCallback(()=>{o()},[o]);return i.jsx(hb,{className:Tt({isSortable:u&&l,isSorted:s!==!1}),style:{width:e??"auto",display:a?"flex":"table-cell"},children:i.jsxs(fb,{"data-alignment":r,children:[!t&&((p==null?void 0:p(`table.header.${n}`))??n),u&&l&&i.jsx(Co,{content:pb(s,p),children:i.jsx(ae,{iconId:s?s==="asc"?"SortAscending":"SortDescending":"Sort",size:"sm",onClick:h,color:"grey"})})]})})}),hb=g.th`
|
|
3160
|
-
padding: ${Me("cell-padding-y")} ${Me("cell-padding-x")};
|
|
3161
|
-
background-color: ${Me("header-background-color")};
|
|
3162
|
-
color: ${Me("head-color")};
|
|
3163
|
-
font-size: ${Me("head-font-size")};
|
|
3164
|
-
font-weight: ${Me("head-font-weight")};
|
|
3165
|
-
&.isSortable {
|
|
3166
|
-
transition: background 0.125s ease-in-out;
|
|
3167
|
-
padding-right: ${Me("cell-padding-right-sortable")};
|
|
3168
|
-
cursor: pointer;
|
|
3169
|
-
:hover {
|
|
3170
|
-
background-color: ${Me("header-background-color-hover")};
|
|
3171
|
-
}
|
|
3172
|
-
}
|
|
3173
|
-
&.isSorted {
|
|
3174
|
-
background-color: ${Me("header-background-color-hover")};
|
|
3175
|
-
}
|
|
3176
|
-
&:first-of-type {
|
|
3177
|
-
padding-left: ${Me("cell-padding-left-first-in-row")};
|
|
3178
|
-
}
|
|
3179
|
-
`,fb=g.div`
|
|
3089
|
+
background: ${c("color-primary")};
|
|
3090
|
+
width: ${({progress:e})=>e}%;
|
|
3091
|
+
transition: width 0.1s ease-in-out;
|
|
3092
|
+
`,m0=g.div`
|
|
3093
|
+
color: ${c("color-primary")};
|
|
3094
|
+
background: linear-gradient(
|
|
3095
|
+
90deg,
|
|
3096
|
+
#fff,
|
|
3097
|
+
#fff ${e=>e.progress}%,
|
|
3098
|
+
${c("color-primary")} ${e=>e.progress}%
|
|
3099
|
+
);
|
|
3180
3100
|
display: flex;
|
|
3101
|
+
position: absolute;
|
|
3181
3102
|
align-items: center;
|
|
3182
|
-
justify-content:
|
|
3183
|
-
|
|
3184
|
-
&[data-alignment="left"] {
|
|
3185
|
-
justify-content: flex-start;
|
|
3186
|
-
}
|
|
3187
|
-
&[data-alignment="right"] {
|
|
3188
|
-
justify-content: flex-end;
|
|
3189
|
-
}
|
|
3190
|
-
&[data-alignment="center"] {
|
|
3191
|
-
justify-content: center;
|
|
3192
|
-
}
|
|
3193
|
-
`,gb=()=>{const e=we.createColumnHelper();return{displayColumn:r=>s=>e.display({header:({column:l,header:a})=>{var u,p,h;return i.jsx(cn,{id:a.id,canSort:l.getCanSort(),width:(u=l.columnDef.meta)==null?void 0:u.width,alignment:(p=l.columnDef.meta)==null?void 0:p.headerAlign,isBlank:(h=l.columnDef.meta)==null?void 0:h.isBlank,toggleSorting:l.toggleSorting,sortValue:l.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},a.id)},...s,meta:{...s.meta,width:"auto",...r}}),accessorColumn:r=>(s,l)=>e.accessor(s,{header:({column:a,header:u})=>{var p,h,f;return i.jsx(cn,{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:(f=a.columnDef.meta)==null?void 0:f.isBlank,toggleSorting:a.toggleSorting,sortValue:a.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},u.id)},...l,meta:{...l.meta,width:"auto",...r}}),groupColumn:r=>s=>e.group({...s,meta:{...s.meta,width:"auto",...r}})}};function wt(e,t,o){let n=o.initialDeps??[],r;function s(){var l,a,u,p;let h;o.key&&((l=o.debug)!=null&&l.call(o))&&(h=Date.now());const f=e();if(!(f.length!==n.length||f.some((x,y)=>n[y]!==x)))return r;n=f;let b;if(o.key&&((a=o.debug)!=null&&a.call(o))&&(b=Date.now()),r=t(...f),o.key&&((u=o.debug)!=null&&u.call(o))){const x=Math.round((Date.now()-h)*100)/100,y=Math.round((Date.now()-b)*100)/100,k=y/16,v=($,C)=>{for($=String($);$.length<C;)$=" "+$;return $};console.info(`%c⏱ ${v(y,5)} /${v(x,5)} ms`,`
|
|
3194
|
-
font-size: .6rem;
|
|
3195
|
-
font-weight: bold;
|
|
3196
|
-
color: hsl(${Math.max(0,Math.min(120-120*k,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 _r(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const mb=(e,t)=>Math.abs(e-t)<1.01,bb=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},Tr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},xb=e=>e,yb=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},vb=(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(Tr(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(Tr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},Er={passive:!0},zr=typeof window>"u"?!0:"onscrollend"in window,kb=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&zr?()=>{}:bb(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,Er);const p=e.options.useScrollendEvent&&zr;return p&&o.addEventListener("scrollend",u,Er),()=>{o.removeEventListener("scroll",a),p&&o.removeEventListener("scrollend",u)}},wb=(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"]},Cb=(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 $b{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:xb,rangeExtractor:yb,onChange:()=>{},measureElement:wb,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=wt(()=>(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=wt(()=>[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=wt(()=>[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),b=m?m.end+this.options.gap:n+r,x=a.get(f),y=typeof x=="number"?x:this.options.estimateSize(h),k=b+y,v=m?m.lane:h%this.options.lanes;p[h]={index:h,start:b,size:y,end:k,key:f,lane:v}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=wt(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Sb({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=wt(()=>{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=wt(()=>[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 _r(n[Hi(0,n.length-1,r=>_r(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 b=this.getScrollOffset(),x=this.getOffsetForIndex(o,m);if(!x){console.warn("Failed to get offset for index:",o);return}mb(x[0],b)||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 Hi=(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 Sb({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=Hi(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 Mr=typeof document<"u"?uo.useLayoutEffect:uo.useEffect;function jb(e){const t=uo.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var l;s?Hr.flushSync(t):t(),(l=e.onChange)==null||l.call(e,r,s)}},[n]=uo.useState(()=>new $b(o));return n.setOptions(o),Mr(()=>n._didMount(),[]),Mr(()=>n._willUpdate()),n}function Ib(e){return jb({observeElementRect:vb,observeElementOffset:kb,scrollToFn:Cb,...e})}const[Ui]=M(["table"]),Db=e=>e.id,_b=({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([]),b=we.useReactTable({columns:t,data:e,getCoreRowModel:we.getCoreRowModel(),getSortedRowModel:s?we.getSortedRowModel():void 0,getRowId:n??Db,onSortingChange:s?m:void 0,state:{sorting:f}}),x=!b.getRowModel().rows.length;return x&&u?r??null:i.jsx(Vi,{onListItemAction:a,isSortable:s,t:l,children:i.jsx(Ob,{className:o,ref:h,children:i.jsxs(Rb,{...p,children:[i.jsx(Nb,{children:b.getHeaderGroups().map(y=>i.jsx(jt,{style:{display:"flex"},children:y.headers.map(k=>i.jsx(d.Fragment,{children:we.flexRender(k.column.columnDef.header,k.getContext())},k.id))},y.id))}),i.jsx(zb,{isEmpty:x,numColumns:t.length,emptyState:r,table:b,tableContainerRef:h})]})})})},Tb=[],Eb=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=Qt(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(It.Observer,{children:()=>{const b=m&&e?e.items:Tb;return i.jsx(_b,{items:b,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:p,renderEmptyAsStandalone:h,...f})}})})}),zb=W.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:l}=e.getRowModel(),a=Ib({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(Fb,{style:{position:"relative",height:`${a.getTotalSize()}px`},children:n?i.jsx(jt,{children:i.jsx(_o,{colSpan:s,children:r??null})}):a.getVirtualItems().map(u=>{const p=l[u.index];return i.jsx(Mb,{trClassName:o,row:p,virtualRow:u,rowVirtualizer:a},p.id)})})}),Mb=W.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(jt,{"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(_o,{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)),Ob=g.div`
|
|
3197
|
-
width: 100%;
|
|
3198
|
-
display: grid;
|
|
3199
|
-
overflow: auto;
|
|
3200
|
-
`,Rb=g.table`
|
|
3201
|
-
width: 100%;
|
|
3202
|
-
border-collapse: collapse;
|
|
3203
|
-
font-family: ${Ui("font-family")};
|
|
3204
|
-
table-layout: fixed;
|
|
3205
|
-
`,Nb=g.thead`
|
|
3206
|
-
width: 100%;
|
|
3207
|
-
position: sticky;
|
|
3208
|
-
background-color: ${Ui("header-background-color")};
|
|
3209
|
-
top: 0;
|
|
3210
|
-
z-index: 1;
|
|
3211
|
-
`,Fb=g.tbody`
|
|
3103
|
+
justify-content: center;
|
|
3104
|
+
height: 100%;
|
|
3212
3105
|
width: 100%;
|
|
3213
|
-
|
|
3106
|
+
background-clip: text;
|
|
3107
|
+
color: transparent;
|
|
3108
|
+
font-weight: bold;
|
|
3109
|
+
transition: background 0.1s ease;
|
|
3110
|
+
`,ta=({isInProgress:e,progress:t,onClick:o,isComplete:n,disabled:r,className:s,completedText:l,inProgressText:a,variant:u="secondary",...p})=>{const[h,f]=d.useState(!1),[m,b]=d.useState(!1);d.useEffect(()=>{e?b(!0):m&&!e&&b(!1)},[e,m]),d.useEffect(()=>{if(n&&m){f(!0);const y=setTimeout(()=>{f(!1)},2e3);return()=>clearTimeout(y)}},[n,m]);const x=h?100:t;return i.jsx(p0,{className:xt(s),variant:u,children:e||h?i.jsxs(h0,{children:[i.jsx(g0,{progress:x}),i.jsx(m0,{progress:x,children:h?l:a})]}):i.jsx(f0,{variant:u,onClick:o,color:"blue",disabled:r,...p})})},b0=W.kosComponent(({future:e,canceledText:t="Canceled",abortedText:o="Aborted",failedText:n="Failed",successText:r="Success",disabled:s,...l})=>{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(ta,{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,...l})}),[Ct]=M(["button"]),x0=d.memo(({onClick:e,open:t,buttonText:o,text:n})=>i.jsx(y0,{open:t,children:i.jsxs(v0,{children:[i.jsx(T,{variant:"h2",color:"light",children:n}),i.jsx(Le,{variant:"borderless",text:o,onClick:e})]})})),y0=g(Ns)`
|
|
3214
3111
|
z-index: 5;
|
|
3215
|
-
`,
|
|
3112
|
+
`,v0=g.div`
|
|
3216
3113
|
display: flex;
|
|
3217
3114
|
align-items: center;
|
|
3218
3115
|
justify-content: center;
|
|
@@ -3224,32 +3121,7 @@
|
|
|
3224
3121
|
${`${Ct("border-hover-borderless",!0)}: ${c("color-white")}`};
|
|
3225
3122
|
${`${Ct("color-hover-borderless",!0)}: ${c("color-white")}`};
|
|
3226
3123
|
${`${Ct("bg-hover-borderless",!0)}: transparent`};
|
|
3227
|
-
`;function Wb(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={},Pt={};function gt(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 Pt?Pt[n]:Or(n,n.split(":"))}catch{if(e in Pt)return Pt[e];const o=e==null?void 0:e.match(Pb);return o?Or(e,o.slice(1)):NaN}}const Pb=/([+-]\d\d):?(\d\d)?/;function Or(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Pt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class Ue extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(gt(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)),Gi(this),dn(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new Ue(...o,t):new Ue(Date.now(),t)}withTimeZone(t){return new Ue(+this,t)}getTimezoneOffset(){const t=-gt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),dn(this),+this}[Symbol.for("constructDateFrom")](t){return new Ue(+new Date(t),this.timeZone)}}const Rr=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Rr.test(e))return;const t=e.replace(Rr,"$1UTC");Ue.prototype[t]&&(e.startsWith("get")?Ue.prototype[e]=function(){return this.internal[t]()}:(Ue.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Vb(this),+this},Ue.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),dn(this),+this}))});function dn(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-gt(e.timeZone,e)*60))}function Vb(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()),Gi(e)}function Gi(e){const t=gt(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(-(gt(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=gt(e.timeZone,e),b=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-b,k=b!==o,v=y-u;if(k&&v){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+v);const $=gt(e.timeZone,e),C=$>0?Math.floor($):Math.ceil($),S=b-C;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class ce extends Ue{static tz(t,...o){return o.length?new ce(...o,t):new ce(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} (${Wb(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 ce(+this,t)}[Symbol.for("constructDateFrom")](t){return new ce(+new Date(t),this.timeZone)}}const Hb={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"}},Ub=(e,t,o)=>{let n;const r=Hb[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 Gb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Kb={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Yb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qb={date:Uo({formats:Gb,defaultWidth:"full"}),time:Uo({formats:Kb,defaultWidth:"full"}),dateTime:Uo({formats:Yb,defaultWidth:"full"})},Zb={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Xb=(e,t,o,n)=>Zb[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 Jb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Qb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ex={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"]},tx={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"]},ox={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"}},nx={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"}},rx=(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"},sx={ordinalNumber:rx,era:Bt({values:Jb,defaultWidth:"wide"}),quarter:Bt({values:Qb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Bt({values:ex,defaultWidth:"wide"}),day:Bt({values:tx,defaultWidth:"wide"}),dayPeriod:Bt({values:ox,defaultWidth:"wide",formattingValues:nx,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)?ax(a,f=>f.test(l)):ix(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 ix(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function ax(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function lx(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 cx=/^(\d+)(th|st|nd|rd)?/i,dx=/\d+/i,ux={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},px={any:[/^b/i,/^(a|c)/i]},hx={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fx={any:[/1/i,/2/i,/3/i,/4/i]},gx={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},mx={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]},bx={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},xx={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]},yx={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},vx={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}},kx={ordinalNumber:lx({matchPattern:cx,parsePattern:dx,valueCallback:e=>parseInt(e,10)}),era:Wt({matchPatterns:ux,defaultMatchWidth:"wide",parsePatterns:px,defaultParseWidth:"any"}),quarter:Wt({matchPatterns:hx,defaultMatchWidth:"wide",parsePatterns:fx,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Wt({matchPatterns:gx,defaultMatchWidth:"wide",parsePatterns:mx,defaultParseWidth:"any"}),day:Wt({matchPatterns:bx,defaultMatchWidth:"wide",parsePatterns:xx,defaultParseWidth:"any"}),dayPeriod:Wt({matchPatterns:yx,defaultMatchWidth:"any",parsePatterns:vx,defaultParseWidth:"any"})},Ki={code:"en-US",formatDistance:Ub,formatLong:qb,formatRelative:Xb,localize:sx,match:kx,options:{weekStartsOn:0,firstWeekContainsDate:1}},Nr=5,wx=4;function Cx(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,Nr*7-1);return t.getMonth(e)===t.getMonth(s)?Nr:wx}function Yi(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 $x(e,t){const o=Yi(e,t),n=Cx(e,t);return t.addDays(o,n*7-1)}class st{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?ce.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 ce(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):q.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):q.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):q.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):q.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):q.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):q.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):q.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):$x(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):q.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):q.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):q.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):q.endOfYear(n)},this.format=(n,r,s)=>{var a;const l=(a=this.overrides)!=null&&a.format?this.overrides.format(n,r,this.options):q.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):q.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):q.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):q.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):q.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):q.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):q.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):q.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):q.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):q.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):q.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):q.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):q.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):q.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):q.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):Yi(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):q.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):q.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):q.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):q.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):q.startOfYear(n)},this.options={locale:Ki,...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 Ze=new st;class qi{constructor(t,o,n=Ze){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 Sx{constructor(t,o){this.date=t,this.weeks=o}}class jx{constructor(t,o){this.days=o,this.weekNumber=t}}function Ix(e){return d.createElement("button",{...e})}function Dx(e){return d.createElement("span",{...e})}function _x(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 Tx(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function Ex(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 A;(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"})(A||(A={}));var se;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(se||(se={}));var Fe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Fe||(Fe={}));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 zx(e){const{options:t,className:o,components:n,classNames:r,...s}=e,l=[r[A.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[A.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[A.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function Mx(e){return d.createElement("div",{...e})}function Ox(e){return d.createElement("div",{...e})}function Rx(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function Nx(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function Fx(e){return d.createElement("table",{...e})}function Ax(e){return d.createElement("div",{...e})}const Zi=d.createContext(void 0);function to(){const e=d.useContext(Zi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Lx(e){const{components:t}=to();return d.createElement(t.Dropdown,{...e})}function Bx(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:l,classNames:a,labels:{labelPrevious:u,labelNext:p}}=to(),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[A.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[A.Chevron],orientation:"left"})),d.createElement(l.NextMonthButton,{type:"button",className:a[A.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[A.Chevron]})))}function Wx(e){const{components:t}=to();return d.createElement(t.Button,{...e})}function Px(e){return d.createElement("option",{...e})}function Vx(e){const{components:t}=to();return d.createElement(t.Button,{...e})}function Hx(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function Ux(e){return d.createElement("select",{...e})}function Gx(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function Kx(e){return d.createElement("th",{...e})}function Yx(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function qx(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function Zx(e){return d.createElement("th",{...e})}function Xx(e){return d.createElement("tbody",{...e})}function Jx(e){const{components:t}=to();return d.createElement(t.Dropdown,{...e})}const Qx=Object.freeze(Object.defineProperty({__proto__:null,Button:Ix,CaptionLabel:Dx,Chevron:_x,Day:Tx,DayButton:Ex,Dropdown:zx,DropdownNav:Mx,Footer:Ox,Month:Rx,MonthCaption:Nx,MonthGrid:Fx,Months:Ax,MonthsDropdown:Lx,Nav:Bx,NextMonthButton:Wx,Option:Px,PreviousMonthButton:Vx,Root:Hx,Select:Ux,Week:Gx,WeekNumber:qx,WeekNumberHeader:Zx,Weekday:Kx,Weekdays:Yx,Weeks:Xx,YearsDropdown:Jx},Symbol.toStringTag,{value:"Module"}));function tt(e,t,o=!1,n=Ze){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 Xi(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Zn(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ji(e){return!!(e&&typeof e=="object"&&"after"in e)}function Qi(e){return!!(e&&typeof e=="object"&&"before"in e)}function ea(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ta(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,o=Ze){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(ta(a,o))return a.includes(e);if(Zn(a))return tt(a,e,!1,o);if(ea(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(Xi(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 Ji(a)?s(e,a.after)>0:Qi(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function e0(e,t,o,n,r){const{disabled:s,hidden:l,modifiers:a,showOutsideDays:u,broadcastCalendar:p,today:h}=t,{isSameDay:f,isSameMonth:m,startOfMonth:b,isBefore:x,endOfMonth:y,isAfter:k}=r,v=o&&b(o),$=n&&y(n),C={[se.focused]:[],[se.outside]:[],[se.disabled]:[],[se.hidden]:[],[se.today]:[]},S={};for(const w of e){const{date:I,displayMonth:j}=w,D=!!(j&&!m(I,j)),L=!!(v&&x(I,v)),U=!!($&&k(I,$)),P=!!(s&&ot(I,s,r)),B=!!(l&&ot(I,l,r))||L||U||!p&&!u&&D||p&&u===!1&&D,Z=f(I,h??r.today());D&&C.outside.push(w),P&&C.disabled.push(w),B&&C.hidden.push(w),Z&&C.today.push(w),a&&Object.keys(a).forEach(ie=>{const J=a==null?void 0:a[ie];J&&ot(I,J,r)&&(S[ie]?S[ie].push(w):S[ie]=[w])})}return w=>{const I={[se.focused]:!1,[se.disabled]:!1,[se.hidden]:!1,[se.outside]:!1,[se.today]:!1},j={};for(const D in C){const L=C[D];I[D]=L.some(U=>U===w)}for(const D in S)j[D]=S[D].some(L=>L===w);return{...I,...j}}}function t0(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[se[s]]?r.push(t[se[s]]):t[Fe[s]]&&r.push(t[Fe[s]]),r),[t[A.Day]])}function o0(e){return{...Qx,...e}}function n0(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 r0(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in se)e[se[t]]=`rdp-${se[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in ge)e[ge[t]]=`rdp-${ge[t]}`;return e}function oa(e,t,o){return(o??new st(t)).format(e,"LLLL y")}const s0=oa;function i0(e,t,o){return(o??new st(t)).format(e,"d")}function a0(e,t=Ze){return t.format(e,"LLLL")}function l0(e,t,o){return(o??new st(t)).format(e,"cccccc")}function c0(e,t=Ze){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function d0(){return""}function na(e,t=Ze){return t.format(e,"yyyy")}const u0=na,p0=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:oa,formatDay:i0,formatMonthCaption:s0,formatMonthDropdown:a0,formatWeekNumber:c0,formatWeekNumberHeader:d0,formatWeekdayName:l0,formatYearCaption:u0,formatYearDropdown:na},Symbol.toStringTag,{value:"Module"}));function h0(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...p0,...e}}function f0(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 b=n.formatMonthDropdown(m,r),x=p(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:x,label:b,disabled:y}})}function g0(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function m0(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 b0(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),b=[];let x=f;for(;p(x,m)||h(x,m);)b.push(x),x=a(x,1);return r&&b.reverse(),b.map(y=>{const k=o.formatYearDropdown(y,n);return{value:u(y),label:k,disabled:!1}})}function ra(e,t,o,n){let r=(n??new st(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const x0=ra;function sa(e,t,o){return(o??new st(t)).format(e,"LLLL y")}const y0=sa;function v0(e,t,o,n){let r=(n??new st(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function k0(e){return"Choose the Month"}function w0(){return""}function C0(e){return"Go to the Next Month"}function $0(e){return"Go to the Previous Month"}function S0(e,t,o){return(o??new st(t)).format(e,"cccc")}function j0(e,t){return`Week ${e}`}function I0(e){return"Week Number"}function D0(e){return"Choose the Year"}const _0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:y0,labelDay:x0,labelDayButton:ra,labelGrid:sa,labelGridcell:v0,labelMonthDropdown:k0,labelNav:w0,labelNext:C0,labelPrevious:$0,labelWeekNumber:j0,labelWeekNumberHeader:I0,labelWeekday:S0,labelYearDropdown:D0},Symbol.toStringTag,{value:"Module"})),oo=e=>e instanceof HTMLElement?e:null,Go=e=>[...e.querySelectorAll("[data-animated-month]")??[]],T0=e=>oo(e.querySelector("[data-animated-month]")),Ko=e=>oo(e.querySelector("[data-animated-caption]")),Yo=e=>oo(e.querySelector("[data-animated-weeks]")),E0=e=>oo(e.querySelector("[data-animated-nav]")),z0=e=>oo(e.querySelector("[data-animated-weekdays]"));function M0(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],b=f?o[ge.weeks_after_enter]:o[ge.weeks_before_enter],x=l.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(Go(y).forEach(C=>{if(!(C instanceof HTMLElement))return;const S=T0(C);S&&C.contains(S)&&C.removeChild(S);const w=Ko(C);w&&w.classList.remove(m);const I=Yo(C);I&&I.classList.remove(b)}),l.current=y):l.current=null,u.current||h||r)return;const k=x instanceof HTMLElement?Go(x):[],v=Go(e.current);if(v!=null&&v.every($=>$ instanceof HTMLElement)&&k&&k.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=E0(e.current);$&&($.style.zIndex="1"),v.forEach((C,S)=>{const w=k[S];if(!w)return;C.style.position="relative",C.style.overflow="hidden";const I=Ko(C);I&&I.classList.add(m);const j=Yo(C);j&&j.classList.add(b);const D=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),I&&I.classList.remove(m),j&&j.classList.remove(b),C.style.position="",C.style.overflow="",C.contains(w)&&C.removeChild(w)};w.style.pointerEvents="none",w.style.position="absolute",w.style.overflow="hidden",w.setAttribute("aria-hidden","true");const L=z0(w);L&&(L.style.opacity="0");const U=Ko(w);U&&(U.classList.add(f?o[ge.caption_before_exit]:o[ge.caption_after_exit]),U.addEventListener("animationend",D));const P=Yo(w);P&&P.classList.add(f?o[ge.weeks_before_exit]:o[ge.weeks_after_exit]),C.insertBefore(w,C.firstChild)})}})}function O0(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:b,endOfMonth:x,endOfWeek:y,isAfter:k,startOfBroadcastWeek:v,startOfISOWeek:$,startOfWeek:C}=n,S=u?v(r,n):l?$(r):C(r),w=u?m(s):l?b(x(s)):y(x(s)),I=h(w,S),j=f(s,r)+1,D=[];for(let P=0;P<=I;P++){const B=p(S,P);if(t&&k(B,t))break;D.push(B)}const U=(u?35:42)*j;if(a&&D.length<U){const P=U-D.length;for(let B=0;B<P;B++){const Z=p(D[D.length-1],1);D.push(Z)}}return D}function R0(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 N0(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 Fr(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 F0(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:l,endOfMonth:a,endOfWeek:u,getISOWeek:p,getWeek:h,startOfBroadcastWeek:f,startOfISOWeek:m,startOfWeek:b}=n,x=e.reduce((y,k)=>{const v=o.broadcastCalendar?f(k,n):o.ISOWeek?m(k):b(k),$=o.broadcastCalendar?s(k):o.ISOWeek?l(a(k)):u(a(k)),C=t.filter(j=>j>=v&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&C.length<S){const j=t.filter(D=>{const L=S-C.length;return D>$&&D<=r($,L)});C.push(...j)}const w=C.reduce((j,D)=>{const L=o.ISOWeek?p(D):h(D),U=j.find(B=>B.weekNumber===L),P=new qi(D,k,n);return U?U.days.push(P):j.push(new jx(L,[P])),j},[]),I=new Sx(k,w);return y.push(I),y},[]);return o.reverseMonths?x.reverse():x}function A0(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:b,fromMonth:x,toMonth:y}=e;!o&&x&&(o=x),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&b&&(n=h(b,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=l(o):m?o=h(m,0,1):!o&&k&&(o=r(u(e.today??f(),-100))),n?n=a(n):b?n=h(b,11,31):!n&&k&&(n=p(e.today??f())),[o&&s(o),n&&s(n)]}function L0(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 B0(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 W0(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function To(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function P0(e,t){const[o,n]=A0(e,t),{startOfMonth:r,endOfMonth:s}=t,l=Fr(e,o,n,t),[a,u]=To(l,e.month?l:void 0);d.useEffect(()=>{const I=Fr(e,o,n,t);u(I)},[e.timeZone]);const p=N0(a,n,e,t),h=O0(p,e.endMonth?s(e.endMonth):void 0,e,t),f=F0(p,h,e,t),m=W0(f),b=R0(f),x=B0(a,o,e,t),y=L0(a,n,e,t),{disableNavigation:k,onMonthChange:v}=e,$=I=>m.some(j=>j.days.some(D=>D.isEqualTo(I))),C=I=>{if(k)return;let j=r(I);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),v==null||v(j)};return{months:f,weeks:m,days:b,navStart:o,navEnd:n,previousMonth:x,nextMonth:y,goToMonth:C,goToDay:I=>{$(I)||C(I.date)}}}var Pe;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Pe||(Pe={}));function Ar(e){return!e[se.disabled]&&!e[se.hidden]&&!e[se.outside]}function V0(e,t,o,n){let r,s=-1;for(const l of e){const a=t(l);Ar(a)&&(a[se.focused]&&s<Pe.FocusedModifier?(r=l,s=Pe.FocusedModifier):n!=null&&n.isEqualTo(l)&&s<Pe.LastFocused?(r=l,s=Pe.LastFocused):o(l.date)&&s<Pe.Selected?(r=l,s=Pe.Selected):a[se.today]&&s<Pe.Today&&(r=l,s=Pe.Today))}return r||(r=e.find(l=>Ar(t(l)))),r}function H0(e,t,o,n,r,s,l){const{ISOWeek:a,broadcastCalendar:u}=s,{addDays:p,addMonths:h,addWeeks:f,addYears:m,endOfBroadcastWeek:b,endOfISOWeek:x,endOfWeek:y,max:k,min:v,startOfBroadcastWeek:$,startOfISOWeek:C,startOfWeek:S}=l;let I={day:p,week:f,month:h,year:m,startOfWeek:j=>u?$(j,l):a?C(j):S(j),endOfWeek:j=>u?b(j):a?x(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?I=k([n,I]):t==="after"&&r&&(I=v([r,I])),I}function ia(e,t,o,n,r,s,l,a=0){if(a>365)return;const u=H0(e,t,o.date,n,r,s,l),p=!!(s.disabled&&ot(u,s.disabled,l)),h=!!(s.hidden&&ot(u,s.hidden,l)),f=u,m=new qi(u,f,l);return!p&&!h?m:ia(e,t,m,n,r,s,l,a+1)}function U0(e,t,o,n,r){const{autoFocus:s}=e,[l,a]=d.useState(),u=V0(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,k)=>{if(!p)return;const v=ia(y,k,p,t.navStart,t.navEnd,e,r);v&&(t.goToDay(v),h(v))}}}function G0(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=To(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t,p=b=>(a==null?void 0:a.some(x=>u(x,b)))??!1,{min:h,max:f}=e;return{selected:a,select:(b,x,y)=>{let k=[...a??[]];if(p(b)){if((a==null?void 0:a.length)===h||n&&(a==null?void 0:a.length)===1)return;k=a==null?void 0:a.filter(v=>!u(v,b))}else(a==null?void 0:a.length)===f?k=[b]:k=[...k,b];return r||l(k),r==null||r(k,b,x,y),k},isSelected:p}}function K0(e,t,o=0,n=0,r=!1,s=Ze){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 Y0(e,t,o=Ze){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 Lr(e,t,o=Ze){return tt(e,t.from,!1,o)||tt(e,t.to,!1,o)||tt(t,e.from,!1,o)||tt(t,e.to,!1,o)}function q0(e,t,o=Ze){const n=Array.isArray(t)?t:[t];if(n.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:o.isDate(a)?tt(e,a,!1,o):ta(a,o)?a.some(u=>tt(e,u,!1,o)):Zn(a)?a.from&&a.to?Lr(e,{from:a.from,to:a.to},o):!1:ea(a)?Y0(e,a.dayOfWeek,o):Xi(a)?o.isAfter(a.before,a.after)?Lr(e,{from:o.addDays(a.after,1),to:o.addDays(a.before,-1)},o):ot(e.from,a,o)||ot(e.to,a,o):Ji(a)||Qi(a)?ot(e.from,a,o)||ot(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 Z0(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:l}=e,[a,u]=To(r,l?r:void 0),p=l?r:a;return{selected:p,select:(m,b,x)=>{const{min:y,max:k}=e,v=m?K0(m,p,y,k,s,t):void 0;return n&&o&&(v!=null&&v.from)&&v.to&&q0({from:v.from,to:v.to},o,t)&&(v.from=m,v.to=void 0),l||u(v),l==null||l(v,m,b,x),v},isSelected:m=>p&&tt(p,m,!1,t)}}function X0(e,t){const{selected:o,required:n,onSelect:r}=e,[s,l]=To(o,r?o:void 0),a=r?o:s,{isSameDay:u}=t;return{selected:a,select:(f,m,b)=>{let x=f;return!n&&a&&a&&u(f,a)&&(x=void 0),r||l(x),r==null||r(x,f,m,b),x},isSelected:f=>a?u(a,f):!1}}function J0(e,t){const o=X0(e,t),n=G0(e,t),r=Z0(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function Q0(e){var rr;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new ce(t.today,t.timeZone)),t.month&&(t.month=new ce(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new ce(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new ce(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new ce(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new ce(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(rr=t.selected)==null?void 0:rr.map(H=>new ce(H,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new ce(t.selected.from,t.timeZone):void 0,to:t.selected.to?new ce(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:l,classNames:a}=d.useMemo(()=>{const H={...Ki,...t.locale};return{dateLib:new st({locale:H,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:o0(t.components),formatters:h0(t.formatters),labels:{..._0,...t.labels},locale:H,classNames:{...r0(),...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:b,onDayFocus:x,onDayKeyDown:y,onDayMouseEnter:k,onDayMouseLeave:v,onNextClick:$,onPrevClick:C,showWeekNumber:S,styles:w}=t,{formatCaption:I,formatDay:j,formatMonthDropdown:D,formatWeekNumber:L,formatWeekNumberHeader:U,formatWeekdayName:P,formatYearDropdown:B}=n,Z=P0(t,s),{days:ie,months:J,navStart:X,navEnd:Ie,previousMonth:le,nextMonth:pe,goToMonth:Q}=Z,K=e0(ie,t,X,Ie,s),{isSelected:ee,select:Xe,selected:Be}=J0(t,s)??{},{blur:Qn,focused:no,isFocusTarget:fa,moveFocus:er,setFocused:ro}=U0(t,Z,K,ee??(()=>!1),s),{labelDayButton:ga,labelGridcell:ma,labelGrid:ba,labelMonthDropdown:xa,labelNav:tr,labelPrevious:ya,labelNext:va,labelWeekday:ka,labelWeekNumber:wa,labelWeekNumberHeader:Ca,labelYearDropdown:$a}=r,Sa=d.useMemo(()=>m0(s,t.ISOWeek),[s,t.ISOWeek]),or=p!==void 0||b!==void 0,Eo=d.useCallback(()=>{le&&(Q(le),C==null||C(le))},[le,Q,C]),zo=d.useCallback(()=>{pe&&(Q(pe),$==null||$(pe))},[Q,pe,$]),ja=d.useCallback((H,te)=>V=>{V.preventDefault(),V.stopPropagation(),ro(H),Xe==null||Xe(H.date,te,V),b==null||b(H.date,te,V)},[Xe,b,ro]),Ia=d.useCallback((H,te)=>V=>{ro(H),x==null||x(H.date,te,V)},[x,ro]),Da=d.useCallback((H,te)=>V=>{Qn(),m==null||m(H.date,te,V)},[Qn,m]),_a=d.useCallback((H,te)=>V=>{const oe={ArrowLeft:[V.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[V.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[V.shiftKey?"year":"week","after"],ArrowUp:[V.shiftKey?"year":"week","before"],PageUp:[V.shiftKey?"year":"month","before"],PageDown:[V.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(oe[V.key]){V.preventDefault(),V.stopPropagation();const[be,Y]=oe[V.key];er(be,Y)}y==null||y(H.date,te,V)},[er,y,t.dir]),Ta=d.useCallback((H,te)=>V=>{k==null||k(H.date,te,V)},[k]),Ea=d.useCallback((H,te)=>V=>{v==null||v(H.date,te,V)},[v]),za=d.useCallback(H=>te=>{const V=Number(te.target.value),oe=s.setMonth(s.startOfMonth(H),V);Q(oe)},[s,Q]),Ma=d.useCallback(H=>te=>{const V=Number(te.target.value),oe=s.setYear(s.startOfMonth(H),V);Q(oe)},[s,Q]),{className:Oa,style:Ra}=d.useMemo(()=>({className:[a[A.Root],t.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[A.Root],...t.style}}),[a,t.className,t.style,w]),Na=n0(t),nr=d.useRef(null);M0(nr,!!t.animate,{classNames:a,months:J,focused:no,dateLib:s});const Fa={dayPickerProps:t,selected:Be,select:Xe,isSelected:ee,months:J,nextMonth:pe,previousMonth:le,goToMonth:Q,getModifiers:K,components:o,classNames:a,styles:w,labels:r,formatters:n};return d.createElement(Zi.Provider,{value:Fa},d.createElement(o.Root,{rootRef:t.animate?nr:void 0,className:Oa,style:Ra,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Na},d.createElement(o.Months,{className:a[A.Months],style:w==null?void 0:w[A.Months]},!t.hideNavigation&&!h&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:w==null?void 0:w[A.Nav],"aria-label":tr(),onPreviousClick:Eo,onNextClick:zo,previousMonth:le,nextMonth:pe}),J.map((H,te)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:a[A.Month],style:w==null?void 0:w[A.Month],key:te,displayIndex:te,calendarMonth:H},h==="around"&&!t.hideNavigation&&te===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:le?void 0:-1,"aria-disabled":le?void 0:!0,"aria-label":ya(le),onClick:Eo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:le?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[A.MonthCaption],style:w==null?void 0:w[A.MonthCaption],calendarMonth:H,displayIndex:te},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:a[A.Dropdowns],style:w==null?void 0:w[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:a[A.MonthsDropdown],"aria-label":xa(),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:za(H.date),options:f0(H.date,X,Ie,n,s),style:w==null?void 0:w[A.Dropdown],value:s.getMonth(H.date)}):d.createElement("span",null,D(H.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:a[A.YearsDropdown],"aria-label":$a(s.options),classNames:a,components:o,disabled:!!t.disableNavigation,onChange:Ma(H.date),options:b0(X,Ie,n,s,!!t.reverseYears),style:w==null?void 0:w[A.Dropdown],value:s.getYear(H.date)}):d.createElement("span",null,B(H.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"}},I(H.date,s.options,s))):d.createElement(o.CaptionLabel,{className:a[A.CaptionLabel],role:"status","aria-live":"polite"},I(H.date,s.options,s))),h==="around"&&!t.hideNavigation&&te===f-1&&d.createElement(o.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:pe?void 0:-1,"aria-disabled":pe?void 0:!0,"aria-label":va(pe),onClick:zo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:pe?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),te===f-1&&h==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:w==null?void 0:w[A.Nav],"aria-label":tr(),onPreviousClick:Eo,onNextClick:zo,previousMonth:le,nextMonth:pe}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":ba(H.date,s.options,s)||void 0,className:a[A.MonthGrid],style:w==null?void 0:w[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[A.Weekdays],style:w==null?void 0:w[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":Ca(s.options),className:a[A.WeekNumberHeader],style:w==null?void 0:w[A.WeekNumberHeader],scope:"col"},U()),Sa.map(V=>d.createElement(o.Weekday,{"aria-label":ka(V,s.options,s),className:a[A.Weekday],key:String(V),style:w==null?void 0:w[A.Weekday],scope:"col"},P(V,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[A.Weeks],style:w==null?void 0:w[A.Weeks]},H.weeks.map(V=>d.createElement(o.Week,{className:a[A.Week],key:V.weekNumber,style:w==null?void 0:w[A.Week],week:V},S&&d.createElement(o.WeekNumber,{week:V,style:w==null?void 0:w[A.WeekNumber],"aria-label":wa(V.weekNumber,{locale:l}),className:a[A.WeekNumber],scope:"row",role:"rowheader"},L(V.weekNumber,s)),V.days.map(oe=>{const{date:be}=oe,Y=K(oe);if(Y[se.focused]=!Y.hidden&&!!(no!=null&&no.isEqualTo(oe)),Y[Fe.selected]=(ee==null?void 0:ee(be))||Y.selected,Zn(Be)){const{from:Mo,to:Oo}=Be;Y[Fe.range_start]=!!(Mo&&Oo&&s.isSameDay(be,Mo)),Y[Fe.range_end]=!!(Mo&&Oo&&s.isSameDay(be,Oo)),Y[Fe.range_middle]=tt(Be,be,!0,s)}const Aa=g0(Y,w,t.modifiersStyles),La=t0(Y,a,t.modifiersClassNames),Ba=!or&&!Y.hidden?ma(be,Y,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(be,"yyyy-MM-dd")}_${s.format(oe.displayMonth,"yyyy-MM")}`,day:oe,modifiers:Y,className:La.join(" "),style:Aa,role:"gridcell","aria-selected":Y.selected||void 0,"aria-label":Ba,"data-day":s.format(be,"yyyy-MM-dd"),"data-month":oe.outside?s.format(be,"yyyy-MM"):void 0,"data-selected":Y.selected||void 0,"data-disabled":Y.disabled||void 0,"data-hidden":Y.hidden||void 0,"data-outside":oe.outside||void 0,"data-focused":Y.focused||void 0,"data-today":Y.today||void 0},!Y.hidden&&or?d.createElement(o.DayButton,{className:a[A.DayButton],style:w==null?void 0:w[A.DayButton],type:"button",day:oe,modifiers:Y,disabled:Y.disabled||void 0,tabIndex:fa(oe)?0:-1,"aria-label":ga(be,Y,s.options,s),onClick:ja(oe,Y),onBlur:Da(oe,Y),onFocus:Ia(oe,Y),onKeyDown:_a(oe,Y),onMouseEnter:Ta(oe,Y),onMouseLeave:Ea(oe,Y)},j(be,s.options,s)):!Y.hidden&&j(oe.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:a[A.Footer],style:w==null?void 0:w[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const ey=d.memo(({...e})=>i.jsx(ty,{mode:"single",...e})),ty=g(Q0)`
|
|
3228
|
-
font-family: ${c("font-family-default")};
|
|
3229
|
-
`,oy=({rightMenu:e,leftMenu:t,className:o})=>i.jsxs(ny,{className:o,children:[t,i.jsx(ry,{children:e})]}),ny=g.div`
|
|
3230
|
-
align-items: center;
|
|
3231
|
-
background-color: ${c("color-black")};
|
|
3232
|
-
display: flex;
|
|
3233
|
-
gap: 12px;
|
|
3234
|
-
height: ${c("spacing-32")};
|
|
3235
|
-
justify-content: space-between;
|
|
3236
|
-
padding: 0px ${c("spacing-20")};
|
|
3237
|
-
width: 100%;
|
|
3238
|
-
`,ry=g.div`
|
|
3239
|
-
display: flex;
|
|
3240
|
-
align-items: center;
|
|
3241
|
-
`,sy=d.memo(({title:e,message:t})=>i.jsxs(iy,{children:[i.jsx(T,{variant:"body",bold:!0,children:e}),i.jsx(T,{variant:"body",color:"grey",children:t})]})),iy=g.div`
|
|
3242
|
-
display: flex;
|
|
3243
|
-
padding: ${c("spacing-8")} ${c("spacing-10")}
|
|
3244
|
-
${c("spacing-8")} ${c("spacing-20")};
|
|
3245
|
-
flex-direction: column;
|
|
3246
|
-
align-items: flex-start;
|
|
3247
|
-
gap: ${c("spacing-8")};
|
|
3248
|
-
align-self: stretch;
|
|
3249
|
-
max-width: 100%;
|
|
3250
|
-
word-wrap: break-word;
|
|
3251
|
-
overflow-wrap: break-word;
|
|
3252
|
-
`,ay=({groups:e,onSelectionChange:t,value:o,showSelectAll:n=!0,showClearAll:r=!0,placement:s="bottom-end",className:l,buttonContent:a,disabled:u=!1})=>{const[p,h]=d.useState(()=>{const B={};return e.forEach(Z=>{B[Z.id]=new Set}),B}),[f,m]=d.useState(!1),b=o??p,x=o!==void 0,y=d.useCallback(B=>{x||h(B),t(B)},[x,t]),{refs:k,floatingStyles:v,context:$}=R.useFloating({placement:s,open:f,onOpenChange:m,whileElementsMounted:R.autoUpdate,middleware:[R.offset(4),R.flip(),R.shift({padding:8})]}),C=R.useClick($,{enabled:!u}),S=R.useDismiss($),w=R.useRole($),{getReferenceProps:I,getFloatingProps:j}=R.useInteractions([C,S,w]),D=d.useCallback((B,Z)=>{const ie={...b},J=new Set(b[B]);J.has(Z)?J.delete(Z):J.add(Z),ie[B]=J,y(ie)},[b,y]),L=d.useCallback(B=>{const Z=e.find(J=>J.id===B);if(!Z)return;const ie={...b};ie[B]=new Set(Z.options.map(J=>J.value)),y(ie)},[e,b,y]),U=d.useCallback(()=>{const B={};e.forEach(Z=>{B[Z.id]=new Set}),y(B)},[e,y]),P=d.useMemo(()=>Object.values(b).some(B=>B.size>0),[b]);return i.jsxs(i.Fragment,{children:[i.jsx(ly,{ref:k.setReference,className:l,$isActive:P,$isDisabled:u,...I(),children:a||i.jsxs(i.Fragment,{children:[i.jsx(O,{iconId:"Filter",size:"sm",color:P?"blue":"grey"}),P&&i.jsx(cy,{})]})}),f&&i.jsx(R.FloatingPortal,{children:i.jsx(R.FloatingFocusManager,{context:$,modal:!1,children:i.jsxs(dy,{ref:k.setFloating,style:v,...j(),children:[i.jsxs(uy,{children:[i.jsx(T,{variant:"body",bold:!0,children:"Filters"}),i.jsxs(py,{children:[r&&P&&i.jsx(hy,{onClick:U,children:i.jsx(T,{variant:"small",color:"blue",children:"Clear all"})}),i.jsx(fy,{onClick:()=>m(!1),children:i.jsx(O,{iconId:"Close",size:"sm",color:"grey"})})]})]}),i.jsx(gy,{children:e.map(B=>i.jsxs(my,{children:[i.jsxs(by,{children:[i.jsx(T,{variant:"small",bold:!0,children:B.label}),n&&i.jsx(xy,{onClick:()=>L(B.id),children:i.jsx(T,{variant:"small",color:"blue",children:"Select all"})})]}),i.jsx(yy,{children:B.options.map(Z=>{var J;const ie=((J=b[B.id])==null?void 0:J.has(Z.value))||!1;return i.jsxs(vy,{$isSelected:ie,onClick:()=>D(B.id,Z.value),children:[i.jsx(ky,{$isChecked:ie,children:ie&&i.jsx(O,{iconId:"Check",size:"xsm",color:"white"})}),i.jsx(T,{variant:"small",children:Z.label})]},Z.value)})})]},B.id))})]})})})]})},ly=g.button`
|
|
3124
|
+
`,k0=({groups:e,onSelectionChange:t,value:o,showSelectAll:n=!0,showClearAll:r=!0,placement:s="bottom-end",className:l,buttonContent:a,disabled:u=!1})=>{const[p,h]=d.useState(()=>{const B={};return e.forEach(Z=>{B[Z.id]=new Set}),B}),[f,m]=d.useState(!1),b=o??p,x=o!==void 0,y=d.useCallback(B=>{x||h(B),t(B)},[x,t]),{refs:k,floatingStyles:v,context:$}=R.useFloating({placement:s,open:f,onOpenChange:m,whileElementsMounted:R.autoUpdate,middleware:[R.offset(4),R.flip(),R.shift({padding:8})]}),C=R.useClick($,{enabled:!u}),S=R.useDismiss($),w=R.useRole($),{getReferenceProps:I,getFloatingProps:j}=R.useInteractions([C,S,w]),D=d.useCallback((B,Z)=>{const ie={...b},J=new Set(b[B]);J.has(Z)?J.delete(Z):J.add(Z),ie[B]=J,y(ie)},[b,y]),L=d.useCallback(B=>{const Z=e.find(J=>J.id===B);if(!Z)return;const ie={...b};ie[B]=new Set(Z.options.map(J=>J.value)),y(ie)},[e,b,y]),U=d.useCallback(()=>{const B={};e.forEach(Z=>{B[Z.id]=new Set}),y(B)},[e,y]),P=d.useMemo(()=>Object.values(b).some(B=>B.size>0),[b]);return i.jsxs(i.Fragment,{children:[i.jsx(w0,{ref:k.setReference,className:l,$isActive:P,$isDisabled:u,...I(),children:a||i.jsxs(i.Fragment,{children:[i.jsx(O,{iconId:"Filter",size:"sm",color:P?"blue":"grey"}),P&&i.jsx(C0,{})]})}),f&&i.jsx(R.FloatingPortal,{children:i.jsx(R.FloatingFocusManager,{context:$,modal:!1,children:i.jsxs($0,{ref:k.setFloating,style:v,...j(),children:[i.jsxs(S0,{children:[i.jsx(T,{variant:"body",bold:!0,children:"Filters"}),i.jsxs(j0,{children:[r&&P&&i.jsx(I0,{onClick:U,children:i.jsx(T,{variant:"small",color:"blue",children:"Clear all"})}),i.jsx(D0,{onClick:()=>m(!1),children:i.jsx(O,{iconId:"Close",size:"sm",color:"grey"})})]})]}),i.jsx(_0,{children:e.map(B=>i.jsxs(T0,{children:[i.jsxs(E0,{children:[i.jsx(T,{variant:"small",bold:!0,children:B.label}),n&&i.jsx(z0,{onClick:()=>L(B.id),children:i.jsx(T,{variant:"small",color:"blue",children:"Select all"})})]}),i.jsx(M0,{children:B.options.map(Z=>{var J;const ie=((J=b[B.id])==null?void 0:J.has(Z.value))||!1;return i.jsxs(O0,{$isSelected:ie,onClick:()=>D(B.id,Z.value),children:[i.jsx(R0,{$isChecked:ie,children:ie&&i.jsx(O,{iconId:"Check",size:"xsm",color:"white"})}),i.jsx(T,{variant:"small",children:Z.label})]},Z.value)})})]},B.id))})]})})})]})},w0=g.button`
|
|
3253
3125
|
display: flex;
|
|
3254
3126
|
align-items: center;
|
|
3255
3127
|
justify-content: center;
|
|
@@ -3268,7 +3140,7 @@
|
|
|
3268
3140
|
background-color: ${e=>e.$isActive?c("color-additional1"):c("color-grey10")};
|
|
3269
3141
|
border-color: ${e=>e.$isActive?c("color-blue"):c("color-grey40")};
|
|
3270
3142
|
}
|
|
3271
|
-
`,
|
|
3143
|
+
`,C0=g.div`
|
|
3272
3144
|
position: absolute;
|
|
3273
3145
|
top: 4px;
|
|
3274
3146
|
right: 4px;
|
|
@@ -3276,7 +3148,7 @@
|
|
|
3276
3148
|
height: 6px;
|
|
3277
3149
|
background-color: ${c("color-blue")};
|
|
3278
3150
|
border-radius: 50%;
|
|
3279
|
-
|
|
3151
|
+
`,$0=g.div`
|
|
3280
3152
|
background-color: ${c("color-white")};
|
|
3281
3153
|
border: 1px solid ${c("color-grey30")};
|
|
3282
3154
|
border-radius: ${c("spacing-4")};
|
|
@@ -3284,17 +3156,17 @@
|
|
|
3284
3156
|
min-width: 280px;
|
|
3285
3157
|
max-width: 320px;
|
|
3286
3158
|
z-index: 1000;
|
|
3287
|
-
`,
|
|
3159
|
+
`,S0=g.div`
|
|
3288
3160
|
display: flex;
|
|
3289
3161
|
align-items: center;
|
|
3290
3162
|
justify-content: space-between;
|
|
3291
3163
|
padding: ${c("spacing-12")} ${c("spacing-16")};
|
|
3292
3164
|
border-bottom: 1px solid ${c("color-grey20")};
|
|
3293
|
-
`,
|
|
3165
|
+
`,j0=g.div`
|
|
3294
3166
|
display: flex;
|
|
3295
3167
|
align-items: center;
|
|
3296
3168
|
gap: ${c("spacing-8")};
|
|
3297
|
-
`,
|
|
3169
|
+
`,I0=g.button`
|
|
3298
3170
|
background: none;
|
|
3299
3171
|
border: none;
|
|
3300
3172
|
padding: 0;
|
|
@@ -3304,7 +3176,7 @@
|
|
|
3304
3176
|
&:hover {
|
|
3305
3177
|
text-decoration: underline;
|
|
3306
3178
|
}
|
|
3307
|
-
`,
|
|
3179
|
+
`,D0=g.button`
|
|
3308
3180
|
background: none;
|
|
3309
3181
|
border: none;
|
|
3310
3182
|
padding: 0;
|
|
@@ -3319,20 +3191,20 @@
|
|
|
3319
3191
|
&:hover {
|
|
3320
3192
|
background-color: ${c("color-grey10")};
|
|
3321
3193
|
}
|
|
3322
|
-
`,
|
|
3194
|
+
`,_0=g.div`
|
|
3323
3195
|
padding: ${c("spacing-12")};
|
|
3324
3196
|
max-height: 400px;
|
|
3325
3197
|
overflow-y: auto;
|
|
3326
|
-
`,
|
|
3198
|
+
`,T0=g.div`
|
|
3327
3199
|
&:not(:last-child) {
|
|
3328
3200
|
margin-bottom: ${c("spacing-16")};
|
|
3329
3201
|
}
|
|
3330
|
-
`,
|
|
3202
|
+
`,E0=g.div`
|
|
3331
3203
|
display: flex;
|
|
3332
3204
|
align-items: center;
|
|
3333
3205
|
justify-content: space-between;
|
|
3334
3206
|
margin-bottom: ${c("spacing-8")};
|
|
3335
|
-
`,
|
|
3207
|
+
`,z0=g.button`
|
|
3336
3208
|
background: none;
|
|
3337
3209
|
border: none;
|
|
3338
3210
|
padding: 0;
|
|
@@ -3342,11 +3214,11 @@
|
|
|
3342
3214
|
&:hover {
|
|
3343
3215
|
text-decoration: underline;
|
|
3344
3216
|
}
|
|
3345
|
-
`,
|
|
3217
|
+
`,M0=g.div`
|
|
3346
3218
|
display: flex;
|
|
3347
3219
|
flex-direction: column;
|
|
3348
3220
|
gap: ${c("spacing-4")};
|
|
3349
|
-
`,
|
|
3221
|
+
`,O0=g.div`
|
|
3350
3222
|
display: flex;
|
|
3351
3223
|
align-items: center;
|
|
3352
3224
|
gap: ${c("spacing-8")};
|
|
@@ -3358,7 +3230,7 @@
|
|
|
3358
3230
|
&:hover {
|
|
3359
3231
|
background-color: ${e=>e.$isSelected?c("color-additional1"):c("color-grey10")};
|
|
3360
3232
|
}
|
|
3361
|
-
`,
|
|
3233
|
+
`,R0=g.div`
|
|
3362
3234
|
width: 16px;
|
|
3363
3235
|
height: 16px;
|
|
3364
3236
|
border: 1.5px solid
|
|
@@ -3369,20 +3241,20 @@
|
|
|
3369
3241
|
align-items: center;
|
|
3370
3242
|
justify-content: center;
|
|
3371
3243
|
flex-shrink: 0;
|
|
3372
|
-
`,[
|
|
3244
|
+
`,[N0,qo,F0]=M(["view-header","option","select"]),zr=3,qn=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,zr),overflowPrimary:a.slice(zr),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]),l=d.useCallback(a=>{const u=s.get(a);u&&!u.disabled&&u.onClick()},[s]);return e.length===0?null:i.jsxs(A0,{children:[t.map(a=>i.jsx(ae,{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(L0,{children:i.jsxs(zn,{trigger:i.jsx(B0,{title:"More actions",type:"button",children:i.jsx(O,{size:"sm",iconId:"Ellipsis",color:"blue"})}),onSelection:l,children:[o.map(a=>i.jsx(Mr,{optionKey:a.id,label:i.jsxs(Or,{children:[i.jsx(O,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}),i.jsx(Rr,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id)),o.length>0&&n.length>0&&i.jsx(Mn,{}),n.map(a=>i.jsx(Mr,{optionKey:a.id,label:i.jsxs(Or,{children:[a.iconId?i.jsx(O,{iconId:a.iconId,color:a.disabled?"grey":a.color||"blue",size:"sm"}):i.jsx(W0,{}),i.jsx(Rr,{children:a.label||a.tooltip||a.id})]}),disabled:a.disabled,disableSelectionStyle:!0},a.id))]})})]})});qn.displayName="ActionBar";const A0=g.div`
|
|
3373
3245
|
display: flex;
|
|
3374
3246
|
align-items: center;
|
|
3375
|
-
gap: ${
|
|
3247
|
+
gap: ${N0("actions-gap")};
|
|
3376
3248
|
flex-shrink: 0;
|
|
3377
|
-
`,
|
|
3249
|
+
`,Mr=g(dt)`
|
|
3378
3250
|
${`${qo("bg-color",!0)}: ${c("color-white")}`};
|
|
3379
3251
|
${`${qo("color",!0)}: ${c("color-black")}`};
|
|
3380
3252
|
${`${qo("bg-color-active",!0)}: ${c("color-grey20")}`};
|
|
3381
3253
|
gap: 0px;
|
|
3382
3254
|
cursor: pointer;
|
|
3383
|
-
`,
|
|
3384
|
-
${`${
|
|
3385
|
-
`,
|
|
3255
|
+
`,L0=g.div`
|
|
3256
|
+
${`${F0("border-color",!0)}: ${c("color-grey40")}`};
|
|
3257
|
+
`,B0=g.button`
|
|
3386
3258
|
background: none;
|
|
3387
3259
|
border: none;
|
|
3388
3260
|
padding: 4px;
|
|
@@ -3407,49 +3279,49 @@
|
|
|
3407
3279
|
cursor: not-allowed;
|
|
3408
3280
|
opacity: 0.3;
|
|
3409
3281
|
}
|
|
3410
|
-
`,
|
|
3282
|
+
`,Or=g.div`
|
|
3411
3283
|
display: flex;
|
|
3412
3284
|
align-items: center;
|
|
3413
3285
|
gap: 8px;
|
|
3414
|
-
`,
|
|
3286
|
+
`,Rr=g.span`
|
|
3415
3287
|
font-size: 13px;
|
|
3416
3288
|
white-space: nowrap;
|
|
3417
|
-
`,
|
|
3289
|
+
`,W0=g.div`
|
|
3418
3290
|
width: 16px;
|
|
3419
3291
|
height: 16px;
|
|
3420
|
-
`,[
|
|
3421
|
-
background-color: ${
|
|
3422
|
-
border-bottom: ${
|
|
3423
|
-
padding: ${
|
|
3424
|
-
`,
|
|
3292
|
+
`,[Ke]=M(["view-header"]),Zn=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:s,collapsed:l,onToggleCollapse:a})=>{const u=d.useMemo(()=>n&&n.length>0,[n]);return i.jsx(P0,{children:i.jsxs(V0,{children:[i.jsxs(H0,{children:[s&&i.jsx(ae,{iconId:l?"CaretRight":"CaretDown",color:"grey",size:"sm",onClick:a,"aria-label":l?"Expand view":"Collapse view"}),o&&i.jsx(U0,{children:i.jsx(O,{iconId:o.iconId,color:o.color||"blue",size:"sm"})}),i.jsxs(G0,{children:[i.jsx(T,{variant:"h2",children:e}),t&&i.jsx(K0,{variant:"small",color:"grey",children:t})]})]}),(r||n&&n.length>0)&&i.jsxs(Y0,{children:[r,u&&n?i.jsx(qn,{actions:n}):n==null?void 0:n.map(p=>i.jsx(ae,{iconId:p.iconId,color:p.color||"grey",size:"sm",onClick:p.onClick,disabled:p.disabled,title:p.tooltip,"aria-label":p.tooltip||p.id},p.id))]})]})})});Zn.displayName="ViewHeader";const P0=g.div`
|
|
3293
|
+
background-color: ${Ke("background-color")};
|
|
3294
|
+
border-bottom: ${Ke("border-bottom-width")} solid ${Ke("border-color")};
|
|
3295
|
+
padding: ${Ke("padding")};
|
|
3296
|
+
`,V0=g.div`
|
|
3425
3297
|
display: flex;
|
|
3426
3298
|
align-items: center;
|
|
3427
3299
|
justify-content: space-between;
|
|
3428
|
-
gap: ${
|
|
3429
|
-
min-height: ${
|
|
3430
|
-
`,
|
|
3300
|
+
gap: ${Ke("gap")};
|
|
3301
|
+
min-height: ${Ke("content-min-height")};
|
|
3302
|
+
`,H0=g.div`
|
|
3431
3303
|
display: flex;
|
|
3432
3304
|
align-items: center;
|
|
3433
|
-
gap: ${
|
|
3305
|
+
gap: ${Ke("left-gap")};
|
|
3434
3306
|
flex: 1;
|
|
3435
3307
|
min-width: 0; /* Allow text truncation */
|
|
3436
|
-
`,
|
|
3308
|
+
`,U0=g.div`
|
|
3437
3309
|
display: flex;
|
|
3438
3310
|
align-items: center;
|
|
3439
3311
|
flex-shrink: 0;
|
|
3440
|
-
`,
|
|
3312
|
+
`,G0=g.div`
|
|
3441
3313
|
display: flex;
|
|
3442
3314
|
flex-direction: column;
|
|
3443
|
-
gap: ${
|
|
3315
|
+
gap: ${Ke("text-gap")};
|
|
3444
3316
|
min-width: 0; /* Allow text truncation */
|
|
3445
|
-
`,
|
|
3446
|
-
font-size: ${
|
|
3447
|
-
`,
|
|
3317
|
+
`,K0=g(T)`
|
|
3318
|
+
font-size: ${Ke("subtitle-font-size")};
|
|
3319
|
+
`,Y0=g.div`
|
|
3448
3320
|
display: flex;
|
|
3449
3321
|
align-items: center;
|
|
3450
|
-
gap: ${
|
|
3322
|
+
gap: ${Ke("actions-gap")};
|
|
3451
3323
|
flex-shrink: 0;
|
|
3452
|
-
`,[mt]=M(["view"]),
|
|
3324
|
+
`,[mt]=M(["view"]),oa=d.memo(({title:e,subtitle:t,icon:o,actions:n,headerContent:r,toolbarContent:s,collapsible:l=!1,defaultCollapsed:a=!1,collapsed:u,onToggleCollapse:p,children:h,className:f,onFocus:m})=>{const[b,x]=d.useState(a),y=u!==void 0?u:b,k=d.useCallback(()=>{p?p():x(v=>!v)},[p]);return i.jsxs(q0,{className:f,tabIndex:0,onFocus:m,collapsed:y,children:[i.jsx(Zn,{title:e,subtitle:t,icon:o,actions:n,headerContent:r,collapsible:l,collapsed:y,onToggleCollapse:k}),!y&&s&&i.jsx(Z0,{children:s}),!y&&i.jsx(X0,{children:h})]})});oa.displayName="View";const q0=g.div`
|
|
3453
3325
|
display: flex;
|
|
3454
3326
|
flex-direction: column;
|
|
3455
3327
|
width: 100%;
|
|
@@ -3466,28 +3338,28 @@
|
|
|
3466
3338
|
${({collapsed:e})=>e&&`
|
|
3467
3339
|
flex: 0 0 auto !important;
|
|
3468
3340
|
`}
|
|
3469
|
-
`,
|
|
3341
|
+
`,Z0=g.div`
|
|
3470
3342
|
flex: 0 0 auto;
|
|
3471
3343
|
border-bottom: ${mt("border-width")} solid ${mt("border-color")};
|
|
3472
|
-
`,
|
|
3344
|
+
`,X0=g.div`
|
|
3473
3345
|
display: flex;
|
|
3474
3346
|
flex-direction: column;
|
|
3475
3347
|
flex: 1;
|
|
3476
3348
|
overflow: auto;
|
|
3477
3349
|
padding: ${mt("content-padding")};
|
|
3478
|
-
`,
|
|
3350
|
+
`,na=d.memo(({searchValue:e,onSearchChange:t,onSearch:o,placeholder:n="Search...",filterPanel:r})=>i.jsxs(J0,{children:[i.jsx(Q0,{children:i.jsx(ys,{value:e,onChange:t,onSearch:o??t,placeholder:n})}),r&&i.jsx(ey,{children:r})]}));na.displayName="ViewToolbar";const J0=g.div`
|
|
3479
3351
|
display: flex;
|
|
3480
3352
|
align-items: center;
|
|
3481
3353
|
gap: ${c("spacing-8")};
|
|
3482
3354
|
padding: ${c("spacing-8")} ${c("spacing-12")};
|
|
3483
|
-
`,
|
|
3355
|
+
`,Q0=g.div`
|
|
3484
3356
|
flex: 1;
|
|
3485
3357
|
min-width: 0;
|
|
3486
|
-
`,
|
|
3358
|
+
`,ey=g.div`
|
|
3487
3359
|
flex-shrink: 0;
|
|
3488
3360
|
display: flex;
|
|
3489
3361
|
align-items: center;
|
|
3490
|
-
`,[lo]=M(["view-container"]),
|
|
3362
|
+
`,[lo]=M(["view-container"]),ra=d.memo(({id:e,direction:t="vertical",gap:o,children:n,className:r})=>i.jsx(ty,{id:e,direction:t,gap:o,className:r,children:n}));ra.displayName="ViewContainer";const ty=g.div`
|
|
3491
3363
|
display: flex;
|
|
3492
3364
|
flex-direction: ${({direction:e})=>e==="vertical"?"column":"row"};
|
|
3493
3365
|
gap: ${({direction:e,gap:t})=>t!==void 0?typeof t=="number"?`${t}px`:t:lo(e==="vertical"?"vertical-gap":"horizontal-gap")};
|
|
@@ -3502,20 +3374,189 @@
|
|
|
3502
3374
|
min-height: 0;
|
|
3503
3375
|
min-width: 0;
|
|
3504
3376
|
}
|
|
3505
|
-
`,
|
|
3377
|
+
`,sa=d.createContext(null),oy=()=>{const e=d.useContext(sa);if(e===null)throw new Error("Unable to use SelectViewListContext outside of its provider.");return e};function ny(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 ln=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]}),ry=(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("/")},[he]=M(["select-view-list"]),ia=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:l}=oy(),a=d.useRef(null),u=d.useRef(null),p=d.useRef(!1),h=s===e,f=l===e;d.useEffect(()=>{u.current&&(h?(ln.observe(u.current),p.current=!0):p.current&&(p.current=!1,ln.unobserve(u.current)))},[h]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),b=d.useCallback(x=>{a.current&&a.current.contains(x.target)||n==null||n(e,"view")},[e,n]);return i.jsx(z.ClassNames,{children:({cx:x})=>i.jsx(sy,{ref:u,className:x({isSelected:h}),onClick:b,children:i.jsxs(iy,{className:x({isViewing:f}),children:[i.jsx(wn,{ref:a,checked:h,disabled:r,onChange:m}),i.jsxs(ay,{color:"dark",bold:h,variant:"body",children:[t,o]}),i.jsx(O,{iconId:"Right",color:"blue",size:"sm"})]})})})}),sy=g.div`
|
|
3378
|
+
width: 100%;
|
|
3379
|
+
display: flex;
|
|
3380
|
+
height: auto;
|
|
3381
|
+
flex-shrink: 0;
|
|
3382
|
+
align-items: center;
|
|
3383
|
+
justify-content: flex-start;
|
|
3384
|
+
border-bottom: ${he("border-width")} solid ${he("border-color")};
|
|
3385
|
+
|
|
3386
|
+
&:first-of-type {
|
|
3387
|
+
border-top-color: ${he("border-color")};
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
:not(:first-of-type):not(.isStuckBottom):has(div.isViewing) {
|
|
3391
|
+
border-top-color: ${he("background-color-viewing")};
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
&.isSelected {
|
|
3395
|
+
position: sticky;
|
|
3396
|
+
top: -1px;
|
|
3397
|
+
bottom: -1px;
|
|
3398
|
+
}
|
|
3399
|
+
|
|
3400
|
+
&.isStuckBottom {
|
|
3401
|
+
box-shadow: 0px -6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
3402
|
+
border-top: ${he("border-width")} solid ${he("background-color")};
|
|
3403
|
+
border-top-color: ${he("border-color")};
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3406
|
+
&.isStuckTop {
|
|
3407
|
+
box-shadow: 0px 6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
3408
|
+
}
|
|
3409
|
+
`,iy=g.div`
|
|
3410
|
+
width: 100%;
|
|
3411
|
+
display: flex;
|
|
3412
|
+
flex-shrink: 0;
|
|
3413
|
+
align-items: center;
|
|
3414
|
+
justify-content: flex-start;
|
|
3415
|
+
height: ${he("item-height")};
|
|
3416
|
+
padding-left: ${he("padding-left")};
|
|
3417
|
+
padding-right: ${he("padding-right")};
|
|
3418
|
+
background-color: ${he("background-color")};
|
|
3419
|
+
transition: background 0.125s ease-in-out;
|
|
3420
|
+
&.isViewing {
|
|
3421
|
+
background-color: ${he("background-color-viewing")};
|
|
3422
|
+
}
|
|
3423
|
+
`,ay=g(T)`
|
|
3424
|
+
flex: 1;
|
|
3425
|
+
overflow: hidden;
|
|
3426
|
+
text-overflow: ellipsis;
|
|
3427
|
+
white-space: nowrap;
|
|
3428
|
+
padding-left: ${he("padding-left")};
|
|
3429
|
+
padding-right: ${he("padding-right")};
|
|
3430
|
+
gap: ${he("gap")};
|
|
3431
|
+
align-items: center;
|
|
3432
|
+
display: flex;
|
|
3433
|
+
`,ly=({className:e,dp:t,emptyState:o,firstChild:n,lastChild:r,onListItemAction:s,selected:l,viewing:a})=>{const u=d.useMemo(()=>({selected:l,viewing:a}),[l,a]);return i.jsx(sa.Provider,{value:u,children:i.jsx(cy,{className:e,dataProvider:t,emptyState:o,firstChild:n,ItemTemplate:ia,lastChild:r,onListItemAction:s})})},cy=g(Un)`
|
|
3434
|
+
height: 100%;
|
|
3435
|
+
width: 100%;
|
|
3436
|
+
align-items: flex-start;
|
|
3437
|
+
justify-content: flex-start;
|
|
3438
|
+
flex-direction: column;
|
|
3439
|
+
overflow: auto;
|
|
3440
|
+
|
|
3441
|
+
::-webkit-scrollbar {
|
|
3442
|
+
border-left: 1px solid #dfdfdf;
|
|
3443
|
+
width: 9px;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
::-webkit-scrollbar-thumb {
|
|
3447
|
+
border-left: 3px solid transparent;
|
|
3448
|
+
}
|
|
3449
|
+
`,[cn]=M(["shell-menu"]),dy=({className:e,left:t,right:o})=>i.jsxs(uy,{className:e,children:[i.jsx(Nr,{children:t}),!!o&&i.jsx(Nr,{children:o})]}),uy=g.div`
|
|
3450
|
+
align-items: center;
|
|
3451
|
+
column-gap: ${cn("section-gap")};
|
|
3452
|
+
display: flex;
|
|
3453
|
+
height: 100%;
|
|
3454
|
+
justify-content: space-between;
|
|
3455
|
+
padding: 0px ${cn("padding-x")};
|
|
3456
|
+
width: 100%;
|
|
3457
|
+
`,Nr=g.div`
|
|
3458
|
+
align-items: center;
|
|
3459
|
+
column-gap: ${cn("link-gap")};
|
|
3460
|
+
display: flex;
|
|
3461
|
+
height: 100%;
|
|
3462
|
+
justify-content: flex-start;
|
|
3463
|
+
`,[Fr]=M(["shell-menu"]),py=d.memo(({text:e,onClick:t,isActive:o})=>i.jsx(hy,{onClick:t,variant:"body",color:"light",bold:o,children:e})),hy=g(T)`
|
|
3464
|
+
padding: ${Fr("link-padding-y")} ${Fr("link-padding-x")};
|
|
3465
|
+
line-height: unset;
|
|
3466
|
+
cursor: pointer;
|
|
3467
|
+
`,aa=d.createContext(null),la=W.kosComponent(({children:e,t,isSortable:o,onListItemAction:n})=>{const r=d.useMemo(()=>({t,isSortable:!!o,onListItemAction:n}),[o,t,n]);return i.jsx(aa.Provider,{value:r,children:e})}),Xn=()=>{const e=d.useContext(aa);if(e===null)throw new Error("TableContext must be used within a TableContextProvider");return e},[at]=M(["table"]),To=g.td`
|
|
3468
|
+
padding: ${at("cell-padding-y")} ${at("cell-padding-x")};
|
|
3469
|
+
background-color: ${at("background-color")};
|
|
3470
|
+
color: ${at("cell-color")};
|
|
3471
|
+
font-size: ${at("cell-font-size")};
|
|
3472
|
+
font-weight: ${at("cell-font-weight")};
|
|
3473
|
+
&.isSortable {
|
|
3474
|
+
padding-right: ${at("cell-padding-right-sortable")};
|
|
3475
|
+
}
|
|
3476
|
+
&:first-of-type {
|
|
3477
|
+
padding-left: ${at("cell-padding-left-first-in-row")};
|
|
3478
|
+
}
|
|
3479
|
+
`,Jn=d.memo(({cell:e})=>{const{isSortable:t}=Xn();return i.jsx(To,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:we.flexRender(e.column.columnDef.cell,e.getContext())},e.id)}),[Ar]=M(["table"]),It=g.tr`
|
|
3480
|
+
width: 100%;
|
|
3481
|
+
border-bottom: ${Ar("row-border-bottom-size")} solid ${Ar("border-color")};
|
|
3482
|
+
`,fy=d.memo(({row:e,TdComponent:t})=>{const o=t??Jn;return i.jsx(It,{children:e.getVisibleCells().map(n=>i.jsx(o,{cell:n},n.id))})}),[gy]=M(["table"]),my=e=>e.id,by=({items:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})=>{const[m,b]=d.useState([]),x=we.useReactTable({columns:t,meta:{disabled:h},data:e,getCoreRowModel:we.getCoreRowModel(),getSortedRowModel:r?we.getSortedRowModel():void 0,getRowId:o??my,onSortingChange:r?b:void 0,state:{sorting:m}}),y=a??fy,k=!x.getRowModel().rows.length;return k&&p?n??null:i.jsx(la,{onListItemAction:u,isSortable:r,t:s,children:i.jsxs(vy,{...f,children:[i.jsx(ky,{children:x.getHeaderGroups().map(v=>i.jsx(It,{children:v.headers.map($=>i.jsx(d.Fragment,{children:we.flexRender($.column.columnDef.header,$.getContext())},$.id))},v.id))}),i.jsx(wy,{children:k?i.jsx(It,{children:i.jsx(To,{colSpan:t.length,children:n??null})}):x.getRowModel().rows.map(v=>i.jsx(y,{row:v,TdComponent:l??Jn},v.id))})]})})},xy=[],yy=W.kosComponent(({dataProvider:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})=>{const m=to(e);return i.jsx(d.Suspense,{fallback:null,children:i.jsx(Dt.Observer,{children:()=>{const b=m&&e?e.items:xy;return i.jsx(by,{items:b,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:l,TrComponent:a,onListItemAction:u,renderEmptyAsStandalone:p,disabled:h,...f})}})})}),vy=g.table`
|
|
3483
|
+
width: 100%;
|
|
3484
|
+
overflow: auto;
|
|
3485
|
+
border-collapse: collapse;
|
|
3486
|
+
font-family: ${gy("font-family")};
|
|
3487
|
+
table-layout: fixed;
|
|
3488
|
+
`,ky=g.thead`
|
|
3489
|
+
width: 100%;
|
|
3490
|
+
`,wy=g.tbody`
|
|
3491
|
+
width: 100%;
|
|
3492
|
+
`,[Me]=M(["table"]),Cy=(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",dn=d.memo(({width:e,isBlank:t,toggleSorting:o,id:n,alignment:r,sortValue:s,canSort:l,isVirtual:a})=>{const{isSortable:u,t:p}=Xn(),h=d.useCallback(()=>{o()},[o]);return i.jsx($y,{className:xt({isSortable:u&&l,isSorted:s!==!1}),style:{width:e??"auto",display:a?"flex":"table-cell"},children:i.jsxs(Sy,{"data-alignment":r,children:[!t&&((p==null?void 0:p(`table.header.${n}`))??n),u&&l&&i.jsx(Co,{content:Cy(s,p),children:i.jsx(ae,{iconId:s?s==="asc"?"SortAscending":"SortDescending":"Sort",size:"sm",onClick:h,color:"grey"})})]})})}),$y=g.th`
|
|
3493
|
+
padding: ${Me("cell-padding-y")} ${Me("cell-padding-x")};
|
|
3494
|
+
background-color: ${Me("header-background-color")};
|
|
3495
|
+
color: ${Me("head-color")};
|
|
3496
|
+
font-size: ${Me("head-font-size")};
|
|
3497
|
+
font-weight: ${Me("head-font-weight")};
|
|
3498
|
+
&.isSortable {
|
|
3499
|
+
transition: background 0.125s ease-in-out;
|
|
3500
|
+
padding-right: ${Me("cell-padding-right-sortable")};
|
|
3501
|
+
cursor: pointer;
|
|
3502
|
+
:hover {
|
|
3503
|
+
background-color: ${Me("header-background-color-hover")};
|
|
3504
|
+
}
|
|
3505
|
+
}
|
|
3506
|
+
&.isSorted {
|
|
3507
|
+
background-color: ${Me("header-background-color-hover")};
|
|
3508
|
+
}
|
|
3509
|
+
&:first-of-type {
|
|
3510
|
+
padding-left: ${Me("cell-padding-left-first-in-row")};
|
|
3511
|
+
}
|
|
3512
|
+
`,Sy=g.div`
|
|
3513
|
+
display: flex;
|
|
3514
|
+
align-items: center;
|
|
3515
|
+
justify-content: space-between;
|
|
3516
|
+
column-gap: ${Me("head-gap-sortable")};
|
|
3517
|
+
&[data-alignment="left"] {
|
|
3518
|
+
justify-content: flex-start;
|
|
3519
|
+
}
|
|
3520
|
+
&[data-alignment="right"] {
|
|
3521
|
+
justify-content: flex-end;
|
|
3522
|
+
}
|
|
3523
|
+
&[data-alignment="center"] {
|
|
3524
|
+
justify-content: center;
|
|
3525
|
+
}
|
|
3526
|
+
`,jy=()=>{const e=we.createColumnHelper();return{displayColumn:r=>s=>e.display({header:({column:l,header:a})=>{var u,p,h;return i.jsx(dn,{id:a.id,canSort:l.getCanSort(),width:(u=l.columnDef.meta)==null?void 0:u.width,alignment:(p=l.columnDef.meta)==null?void 0:p.headerAlign,isBlank:(h=l.columnDef.meta)==null?void 0:h.isBlank,toggleSorting:l.toggleSorting,sortValue:l.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},a.id)},...s,meta:{...s.meta,width:"auto",...r}}),accessorColumn:r=>(s,l)=>e.accessor(s,{header:({column:a,header:u})=>{var p,h,f;return i.jsx(dn,{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:(f=a.columnDef.meta)==null?void 0:f.isBlank,toggleSorting:a.toggleSorting,sortValue:a.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},u.id)},...l,meta:{...l.meta,width:"auto",...r}}),groupColumn:r=>s=>e.group({...s,meta:{...s.meta,width:"auto",...r}})}};function $t(e,t,o){let n=o.initialDeps??[],r;function s(){var l,a,u,p;let h;o.key&&((l=o.debug)!=null&&l.call(o))&&(h=Date.now());const f=e();if(!(f.length!==n.length||f.some((x,y)=>n[y]!==x)))return r;n=f;let b;if(o.key&&((a=o.debug)!=null&&a.call(o))&&(b=Date.now()),r=t(...f),o.key&&((u=o.debug)!=null&&u.call(o))){const x=Math.round((Date.now()-h)*100)/100,y=Math.round((Date.now()-b)*100)/100,k=y/16,v=($,C)=>{for($=String($);$.length<C;)$=" "+$;return $};console.info(`%c⏱ ${v(y,5)} /${v(x,5)} ms`,`
|
|
3527
|
+
font-size: .6rem;
|
|
3528
|
+
font-weight: bold;
|
|
3529
|
+
color: hsl(${Math.max(0,Math.min(120-120*k,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 Lr(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Iy=(e,t)=>Math.abs(e-t)<1.01,Dy=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},Br=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},_y=e=>e,Ty=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},Ey=(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(Br(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(Br(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},Wr={passive:!0},Pr=typeof window>"u"?!0:"onscrollend"in window,zy=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&Pr?()=>{}:Dy(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,Wr);const p=e.options.useScrollendEvent&⪻return p&&o.addEventListener("scrollend",u,Wr),()=>{o.removeEventListener("scroll",a),p&&o.removeEventListener("scrollend",u)}},My=(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"]},Oy=(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 Ry{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:_y,rangeExtractor:Ty,onChange:()=>{},measureElement:My,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=$t(()=>(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=$t(()=>[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=$t(()=>[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),b=m?m.end+this.options.gap:n+r,x=a.get(f),y=typeof x=="number"?x:this.options.estimateSize(h),k=b+y,v=m?m.lane:h%this.options.lanes;p[h]={index:h,start:b,size:y,end:k,key:f,lane:v}}return this.measurementsCache=p,p},{key:!1,debug:()=>this.options.debug}),this.calculateRange=$t(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Ny({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=$t(()=>{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=$t(()=>[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 Lr(n[ca(0,n.length-1,r=>Lr(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 b=this.getScrollOffset(),x=this.getOffsetForIndex(o,m);if(!x){console.warn("Failed to get offset for index:",o);return}Iy(x[0],b)||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 ca=(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 Ny({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=ca(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 Vr=typeof document<"u"?uo.useLayoutEffect:uo.useEffect;function Fy(e){const t=uo.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var l;s?Hr.flushSync(t):t(),(l=e.onChange)==null||l.call(e,r,s)}},[n]=uo.useState(()=>new Ry(o));return n.setOptions(o),Vr(()=>n._didMount(),[]),Vr(()=>n._willUpdate()),n}function Ay(e){return Fy({observeElementRect:Ey,observeElementOffset:zy,scrollToFn:Oy,...e})}const[da]=M(["table"]),Ly=e=>e.id,By=({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([]),b=we.useReactTable({columns:t,data:e,getCoreRowModel:we.getCoreRowModel(),getSortedRowModel:s?we.getSortedRowModel():void 0,getRowId:n??Ly,onSortingChange:s?m:void 0,state:{sorting:f}}),x=!b.getRowModel().rows.length;return x&&u?r??null:i.jsx(la,{onListItemAction:a,isSortable:s,t:l,children:i.jsx(Uy,{className:o,ref:h,children:i.jsxs(Gy,{...p,children:[i.jsx(Ky,{children:b.getHeaderGroups().map(y=>i.jsx(It,{style:{display:"flex"},children:y.headers.map(k=>i.jsx(d.Fragment,{children:we.flexRender(k.column.columnDef.header,k.getContext())},k.id))},y.id))}),i.jsx(Vy,{isEmpty:x,numColumns:t.length,emptyState:r,table:b,tableContainerRef:h})]})})})},Wy=[],Py=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(Dt.Observer,{children:()=>{const b=m&&e?e.items:Wy;return i.jsx(By,{items:b,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:l,onListItemAction:p,renderEmptyAsStandalone:h,...f})}})})}),Vy=W.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:l}=e.getRowModel(),a=Ay({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(Yy,{style:{position:"relative",height:`${a.getTotalSize()}px`},children:n?i.jsx(It,{children:i.jsx(To,{colSpan:s,children:r??null})}):a.getVirtualItems().map(u=>{const p=l[u.index];return i.jsx(Hy,{trClassName:o,row:p,virtualRow:u,rowVirtualizer:a},p.id)})})}),Hy=W.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(It,{"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(To,{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)),Uy=g.div`
|
|
3530
|
+
width: 100%;
|
|
3531
|
+
display: grid;
|
|
3532
|
+
overflow: auto;
|
|
3533
|
+
`,Gy=g.table`
|
|
3534
|
+
width: 100%;
|
|
3535
|
+
border-collapse: collapse;
|
|
3536
|
+
font-family: ${da("font-family")};
|
|
3537
|
+
table-layout: fixed;
|
|
3538
|
+
`,Ky=g.thead`
|
|
3539
|
+
width: 100%;
|
|
3540
|
+
position: sticky;
|
|
3541
|
+
background-color: ${da("header-background-color")};
|
|
3542
|
+
top: 0;
|
|
3543
|
+
z-index: 1;
|
|
3544
|
+
`,Yy=g.tbody`
|
|
3545
|
+
width: 100%;
|
|
3546
|
+
`,qy=d.memo(({listMaxSize:e,listMinSize:t,listCollapsedSize:o,disabled:n,List:r,Details:s,ListPanelComponent:l=$n})=>i.jsx(Zy,{style:{"--studio-c-table-cell-padding-y":c("spacing-8")},children:i.jsxs(zs,{direction:"horizontal",children:[i.jsx(l,{minSize:t,maxSize:e,collapsedSize:o,children:i.jsx(ua,{children:i.jsx(r,{disabled:n})})}),i.jsx(Rs,{}),i.jsx(Ms,{children:i.jsx(Xy,{children:i.jsx(s,{})})})]})})),Zy=g.div`
|
|
3506
3547
|
width: 100%;
|
|
3507
3548
|
height: 100%;
|
|
3508
3549
|
display: flex;
|
|
3509
3550
|
align-items: flex-start;
|
|
3510
3551
|
justify-content: flex-start;
|
|
3511
|
-
`,
|
|
3552
|
+
`,ua=g.div`
|
|
3512
3553
|
height: 100%;
|
|
3513
3554
|
width: 100%;
|
|
3514
3555
|
display: flex;
|
|
3515
3556
|
align-items: flex-start;
|
|
3516
3557
|
justify-content: flex-start;
|
|
3517
3558
|
flex-direction: column;
|
|
3518
|
-
`,
|
|
3559
|
+
`,Xy=g(ua)`
|
|
3519
3560
|
overflow: auto;
|
|
3520
|
-
`;let un=null;const Uy=()=>un,Gy=({ref:e,data:t,canDrag:o=!0,transformDragData:n=p=>p,onDrop:r,onDragStart:s,onDragEnd:l,onDragOver:a,onDragLeave:u})=>{const[p,h]=d.useState(!1),[f,m]=d.useState(!1),b=C=>{C.preventDefault(),C.stopPropagation()},x=d.useCallback(C=>{b(C),m(!0),C.dataTransfer&&(C.dataTransfer.dropEffect="move"),a==null||a(C)},[a]),y=d.useCallback(C=>{b(C),m(!1),u==null||u(C)},[u]),k=d.useCallback(C=>{b(C),h(!1),m(!1),un=null,l==null||l(C)},[l]),v=d.useCallback(C=>{var w;b(C),h(!1),m(!1);let S=null;try{S=JSON.parse(((w=C.dataTransfer)==null?void 0:w.getData("application/json"))??"null")}catch(I){console.error("Invalid drag data:",I)}S&&(r==null||r(S,C))},[r]),$=d.useCallback(C=>{var w;if(!o)return;C.stopPropagation(),h(!0),m(!1),C.dataTransfer&&(C.dataTransfer.effectAllowed="move");const S=n(t);un=S,(w=C.dataTransfer)==null||w.setData("application/json",JSON.stringify(S)),s==null||s(t,C)},[o,t,s,n]);return d.useEffect(()=>{const C=e.current,S={dragover:w=>x(w),dragenter:w=>x(w),dragleave:w=>y(w),drop:w=>v(w),dragstart:w=>$(w),dragend:w=>k(w)};return C&&Object.entries(S).forEach(([w,I])=>C.addEventListener(w,I)),()=>{Object.entries(S).forEach(([w,I])=>{C&&C.removeEventListener(w,I)})}},[e,x,y,v,$,k]),{dragging:p,over:f}};class Ky{constructor(t){E(this,"model");E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose");E(this,"_itemsById",_.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,_.makeObservable(this,{items:_.computed})}get items(){return Array.from(this._itemsById.values()).sort((t,o)=>t.name.localeCompare(o.name))}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=_.reaction(()=>{try{if(!this.model)return{raw:[],transformed:[]};const t=this.itemsExpression(this.model)||[],o=t.map(n=>go(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])}),_.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=>go(this.transformer(n),n));this.updateItemsFromTransformed(t,o)}}function ua(e){return new Ky(e)}const Yy="/kos/model/ready/";class pa{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,"_items",_.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,_.makeObservable(this,{_innerProvider:_.observable.ref,_isLoading:_.observable,items:_.computed,model:_.computed,isLoading:_.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=_.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),_.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=`${Yy}${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=ua({model:t,itemsExpression:this.itemsExpression,transformer:this.transformer,autoDispose:!1});_.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)&&(_.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{_.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),_.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 qy(e){return new pa(e)}const Zy="/kos/model/ready/";class Xy extends fi{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 ha{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,_.makeObservable(this,{_innerProvider:_.observable.ref,_isLoading:_.observable,_isInitialized:_.observable,tree:_.computed,originalItems:_.computed,initialized:_.computed,isLoading:_.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=_.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);_.runInAction(()=>{this._isInitialized=!0,this._isInitializing=!1})}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),_.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=`${Zy}${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 Xy(t,this._rootsExpression,this._childrenExpression,this._hasChildrenExpression,this._getItemIdFn,this._transformer);_.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)&&(_.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{_.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),_.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._isInitializing=!1,this._currentModelId=void 0)}}function Jy(e){return new ha(e)}Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>G.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>G.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>G.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>we.flexRender});exports.ActionBar=Xn;exports.ActionSelect=Yu;exports.ActionableBlurb=wc;exports.AlertTooltip=Tn;exports.AlternatingStatus=Uc;exports.AnimatePresence=rs;exports.AnonymousBranch=fg;exports.AnonymousGroup=Pf;exports.ArtifactVersion=Pp;exports.AsyncList=li;exports.AsyncListGroupHeader=Nn;exports.AsyncNamedCollapsibleBranch=bg;exports.AsyncSelectViewList=rf;exports.AsyncTreeList=Di;exports.Badge=mp;exports.BaseAsyncTreeDataProvider=fi;exports.BaseModalContent=Ng;exports.BaseObservableDataProvider=Pn;exports.BaseUIComponentsContextProvider=yc;exports.BottomDialogDrawer=zd;exports.BottomInlineDrawer=Ad;exports.BrandedHeader=ob;exports.Button=Ke;exports.ButtonGroup=Xc;exports.ButtonGroupItem=as;exports.CheckBox=bt;exports.CheckListItemCheck=So;exports.CheckListItemCheckCompact=vi;exports.CheckListItemContainer=eo;exports.CheckListItemContainerCompact=Gn;exports.CheckListItemContainerWithDivider=xi;exports.CheckListItemContainerWithDividerCompact=yi;exports.CheckListItemName=jo;exports.CheckListItemNameCompact=ki;exports.CheckListItemTemplate=wi;exports.Collapsible=mo;exports.CollapsibleArtifact=Mc;exports.CollapsibleContent=bo;exports.CollapsibleList=Yp;exports.CollapsibleTrigger=gn;exports.ComboBox=Qs;exports.CopyableText=pd;exports.DarkTooltip=Co;exports.DarkTooltipStyle=Hs;exports.DatePicker=ey;exports.DescriptionListItemTemplate=qf;exports.Dialog=mn;exports.DialogContent=xn;exports.DialogTrigger=bn;exports.Drawer=Bd;exports.DrawerContent=Pd;exports.DrawerHeader=Vd;exports.DrawerTrigger=Wd;exports.Dropdown=si;exports.DropdownMenu=An;exports.EMAIL_PATTERN=ws;exports.EmailRequirementKeys=$s;exports.EmptyListMessage=sy;exports.EndOverlayStyle=vd;exports.ErrorTooltip=Gs;exports.FIRST_CHAR_ALPHA=iu;exports.FakeInputReference=ei;exports.FilterPanel=ay;exports.FlexHandle=Jt;exports.FlexResizablePanel=Ms;exports.Form=ti;exports.FormAccessToggles=Fh;exports.FormCheckbox=Oh;exports.FormComboBox=Wh;exports.FormErrorMessage=Ye;exports.FormField=zh;exports.FormFileInput=Hh;exports.FormHiddenField=Zh;exports.FormInput=On;exports.FormInputWrapper=Le;exports.FormLabel=me;exports.FormMultiSelect=qh;exports.FormNameInput=Bh;exports.FormSelect=Th;exports.FormStaticField=Xh;exports.FormSubmit=Mn;exports.FormTextArea=jh;exports.FormToggle=Ch;exports.GroupContext=Un;exports.GroupList=Bf;exports.GroupedObservableDataProvider=Rf;exports.HiddenFormInput=zn;exports.HolderListItemTemplate=Fm;exports.HorizontalRule=Ud;exports.Icon=O;exports.IconButton=ae;exports.Input=Et;exports.InputSearch=ys;exports.ItemActionBar=Mt;exports.ItemSelectionList=_m;exports.ItemSelectionListDataProvider=zm;exports.KOSLogo=Wp;exports.Label=ks;exports.LabelWithAction=Qd;exports.LabelWithContent=kn;exports.LabelWithContentLink=ou;exports.LeftDialogDrawer=Sd;exports.LeftInlineDrawer=Rd;exports.LifecycleAwareListProvider=pa;exports.LifecycleAwareTreeProvider=ha;exports.LightTooltip=wo;exports.LightTooltipStyle=Ps;exports.Link=fn;exports.List=Hn;exports.ListContext=Bn;exports.ListContextProvider=Wn;exports.ListWithDetailsLayout=Py;exports.LockedButton=Tc;exports.MenuWrapper=oy;exports.MiddleTruncateText=xo;exports.Modal=Jg;exports.ModalOverlayStyles=Oi;exports.ModalTrigger=Qg;exports.MultiSelect=Js;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=Cs;exports.NO_SPACES_PATTERN=su;exports.NUMBERS_ONLY_PATTERN=ru;exports.NamedCollapsibleBranch=Ig;exports.NamedCollapsibleGroup=Wf;exports.NamedListItemTemplate=Zf;exports.NamedSection=Ni;exports.NamedSectionHeader=rm;exports.ObservableDataProvider=Vn;exports.Option=dt;exports.PASSWORD_MIN_LENGTH=lu;exports.PASSWORD_REQUIREMENTS=En;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=ni;exports.PageHeader=dm;exports.PaneSplitter=yu;exports.PasswordRequirementKeys=Vt;exports.PasswordRequirementsList=yh;exports.PropertyDataProvider=Nf;exports.RadioButton=wn;exports.RequirementsList=oi;exports.ResizablePanel=$n;exports.ResizablePanelGroup=zs;exports.ResizablePanelGroupContextProvider=Es;exports.ResizablePanelHandle=Rs;exports.RightDialogDrawer=Dd;exports.RightInlineDrawer=Nd;exports.SOURCE_PROP_KEY=Yt;exports.SOURCE_SYMBOL=Rn;exports.ScreenOverlay=Ns;exports.ScreenOverlayWithAction=Ab;exports.Select=zt;exports.SelectAsyncTreeList=hg;exports.SelectContext=In;exports.SelectList=$o;exports.SelectListContext=xt;exports.SelectSeparator=Ln;exports.SelectViewList=vm;exports.SelectViewListItem=Ai;exports.SelectorTooltip=Ks;exports.ShellIconButton=Qu;exports.ShellMenu=Mm;exports.ShellMenuLink=Rm;exports.StartOverlayStyle=yd;exports.StickyObserver=an;exports.StudioCheckListItem=di;exports.StudioNamedListItem=ui;exports.StudioSelectViewListItem=pi;exports.StyledSelectOption=af;exports.Tab=ep;exports.TabPane=cp;exports.TabTrigger=tp;exports.TabTriggerList=ip;exports.Table=lb;exports.TableHeader=cn;exports.TableNamedListItemTemplate=ng;exports.TableTd=qn;exports.Tag=fo;exports.TagWithRemove=fp;exports.Text=T;exports.TextHighlight=gp;exports.Textarea=_n;exports.Toggle=ko;exports.ToggleThumb=Bs;exports.ToggleTrack=Ls;exports.Tooltip=Ys;exports.TopDialogDrawer=Ed;exports.TopInlineDrawer=Fd;exports.TreeDataProvider=ag;exports.TreeList=dg;exports.USERNAME_PATTERN=nu;exports.View=aa;exports.ViewActionContext=Fn;exports.ViewContainer=ca;exports.ViewHeader=Jn;exports.ViewToolbar=la;exports.VirtualList=_i;exports.VirtualTable=Eb;exports.VirtualizedList=Ti;exports.VirtualizedSelectList=Rg;exports.attachSource=go;exports.baseComponentStyles=Gr;exports.baseGenericStyles=Xo;exports.baseSemanticStyles=Jo;exports.componentStudioTokenCss=nc;exports.componentStyles=Zo;exports.createLifecycleAwareProvider=qy;exports.createLifecycleAwareTreeProvider=Jy;exports.createLocalComponentHelper=Ql;exports.createLocalComponentTokenCss=ec;exports.createLocalTokenSystem=Jl;exports.createObservableListProvider=ua;exports.createTableColumnHelper=gb;exports.darkTooltipArrow=Us;exports.getByteString=gm;exports.getComponentTokenHelpers=M;exports.getCurrentDragData=Uy;exports.getEmailValidation=au;exports.getErrorMessage=du;exports.getGlobalToken=F;exports.getPasswordValidation=cu;exports.getPropertyWithFallback=Qh;exports.getSemanticToken=c;exports.getSource=qt;exports.getStyles=lc;exports.globalStudioTokenCss=oc;exports.isContextAware=sn;exports.isErrorWithMessage=Ss;exports.isGroupFactory=gi;exports.isItemTemplateFactory=ai;exports.isLockedAware=ef;exports.keyResolver=hi;exports.lightTooltipArrow=Vs;exports.noop=Se;exports.normalizePathDisplay=mm;exports.rootStyles=Qo;exports.scrollbarStyle=pc;exports.semanticStudioTokenCss=tc;exports.stringComponentInsert=Ur;exports.studioColors=Kr;exports.studioDarkColors=qr;exports.studioGenericColor=Zr;exports.studioLightColors=Yr;exports.studioTheme=hc;exports.transformLocalTokenObject=pn;exports.useBaseUIComponentsContext=Qr;exports.useButtonGroupContext=is;exports.useCollapsibleContext=Xt;exports.useContainerWidth=vn;exports.useDialogContext=rt;exports.useDialogContextValue=ls;exports.useDragDrop=Gy;exports.useDrawerContext=ut;exports.useGroupSelection=sg;exports.useListContext=hf;exports.useListGroupContext=mi;exports.useLoadDataProvider=Qt;exports.useModalContext=rt;exports.useMultiSelectContext=Zs;exports.useOpenedGroups=rg;exports.useResizablePanelGroupContext=Cn;exports.useResizeObserver=js;exports.useSelectContext=Dn;exports.useSelectListContext=je;exports.useSelection=ig;exports.useTabContext=vo;exports.useTableContext=Yn;exports.useTreeListContext=$i;exports.useViewActionContext=ci;
|
|
3561
|
+
`;let un=null;const Jy=()=>un,Qy=({ref:e,data:t,canDrag:o=!0,transformDragData:n=p=>p,onDrop:r,onDragStart:s,onDragEnd:l,onDragOver:a,onDragLeave:u})=>{const[p,h]=d.useState(!1),[f,m]=d.useState(!1),b=C=>{C.preventDefault(),C.stopPropagation()},x=d.useCallback(C=>{b(C),m(!0),C.dataTransfer&&(C.dataTransfer.dropEffect="move"),a==null||a(C)},[a]),y=d.useCallback(C=>{b(C),m(!1),u==null||u(C)},[u]),k=d.useCallback(C=>{b(C),h(!1),m(!1),un=null,l==null||l(C)},[l]),v=d.useCallback(C=>{var w;b(C),h(!1),m(!1);let S=null;try{S=JSON.parse(((w=C.dataTransfer)==null?void 0:w.getData("application/json"))??"null")}catch(I){console.error("Invalid drag data:",I)}S&&(r==null||r(S,C))},[r]),$=d.useCallback(C=>{var w;if(!o)return;C.stopPropagation(),h(!0),m(!1),C.dataTransfer&&(C.dataTransfer.effectAllowed="move");const S=n(t);un=S,(w=C.dataTransfer)==null||w.setData("application/json",JSON.stringify(S)),s==null||s(t,C)},[o,t,s,n]);return d.useEffect(()=>{const C=e.current,S={dragover:w=>x(w),dragenter:w=>x(w),dragleave:w=>y(w),drop:w=>v(w),dragstart:w=>$(w),dragend:w=>k(w)};return C&&Object.entries(S).forEach(([w,I])=>C.addEventListener(w,I)),()=>{Object.entries(S).forEach(([w,I])=>{C&&C.removeEventListener(w,I)})}},[e,x,y,v,$,k]),{dragging:p,over:f}};class ev{constructor(t){E(this,"model");E(this,"itemsExpression");E(this,"transformer");E(this,"autoDispose");E(this,"_itemsById",_.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,_.makeObservable(this,{items:_.computed})}get items(){return Array.from(this._itemsById.values()).sort((t,o)=>t.name.localeCompare(o.name))}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=_.reaction(()=>{try{if(!this.model)return{raw:[],transformed:[]};const t=this.itemsExpression(this.model)||[],o=t.map(n=>go(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])}),_.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=>go(this.transformer(n),n));this.updateItemsFromTransformed(t,o)}}function pa(e){return new ev(e)}const tv="/kos/model/ready/";class ha{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,"_items",_.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,_.makeObservable(this,{_innerProvider:_.observable.ref,_isLoading:_.observable,items:_.computed,model:_.computed,isLoading:_.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=_.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),_.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=`${tv}${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=pa({model:t,itemsExpression:this.itemsExpression,transformer:this.transformer,autoDispose:!1});_.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)&&(_.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{_.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),_.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 ov(e){return new ha(e)}const nv="/kos/model/ready/";class rv extends Ei{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 fa{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,_.makeObservable(this,{_innerProvider:_.observable.ref,_isLoading:_.observable,_isInitialized:_.observable,tree:_.computed,originalItems:_.computed,initialized:_.computed,isLoading:_.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=_.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);_.runInAction(()=>{this._isInitialized=!0,this._isInitializing=!1})}}handleModelIdChange(t){this._eventBusUnsubscribe&&(this._eventBusUnsubscribe(),this._eventBusUnsubscribe=null),_.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=`${nv}${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 rv(t,this._rootsExpression,this._childrenExpression,this._hasChildrenExpression,this._getItemIdFn,this._transformer);_.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)&&(_.runInAction(()=>{this._isLoading=!0}),n.model.activate().finally(()=>{_.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),_.runInAction(()=>{this._innerProvider&&(this._innerProvider.dispose(),this._innerProvider=null)}),this._isDisposed=!0,this._isInitialized=!1,this._isInitializing=!1,this._currentModelId=void 0)}}function sv(e){return new fa(e)}Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>G.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>G.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>G.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>we.flexRender});exports.ActionBar=qn;exports.ActionSelect=Au;exports.ActionableBlurb=Cc;exports.AlertTooltip=Tn;exports.AlternatingStatus=Tc;exports.AnimatePresence=ts;exports.AnonymousBranch=Gb;exports.AnonymousGroup=vb;exports.ArtifactVersion=nh;exports.AsyncList=Si;exports.AsyncListGroupHeader=Ln;exports.AsyncNamedCollapsibleBranch=qb;exports.AsyncSelectViewList=Bm;exports.AsyncTreeList=Ui;exports.Badge=ip;exports.BaseAsyncTreeDataProvider=Ei;exports.BaseModalContent=Vx;exports.BaseObservableDataProvider=Vn;exports.BaseUIComponentsContextProvider=vc;exports.BottomDialogDrawer=xd;exports.BottomInlineDrawer=$d;exports.BrandedHeader=Up;exports.Button=Le;exports.ButtonGroup=Nc;exports.ButtonGroupItem=rs;exports.CheckBox=bt;exports.CheckListItemCheck=jo;exports.CheckListItemCheckCompact=Fi;exports.CheckListItemContainer=oo;exports.CheckListItemContainerCompact=Kn;exports.CheckListItemContainerWithDivider=Ri;exports.CheckListItemContainerWithDividerCompact=Ni;exports.CheckListItemName=Io;exports.CheckListItemNameCompact=Ai;exports.CheckListItemTemplate=Li;exports.Collapsible=mo;exports.CollapsibleArtifact=Yp;exports.CollapsibleContent=bo;exports.CollapsibleList=ch;exports.CollapsibleTrigger=gn;exports.ComboBox=ti;exports.CopyableText=Jc;exports.DarkTooltip=Co;exports.DarkTooltipStyle=Hs;exports.DatePicker=Lg;exports.DescriptionListItemTemplate=Ib;exports.Dialog=mn;exports.DialogContent=xn;exports.DialogTrigger=bn;exports.Drawer=jd;exports.DrawerContent=Dd;exports.DrawerHeader=Md;exports.DrawerTrigger=Id;exports.Dropdown=xi;exports.DropdownMenu=zn;exports.EMAIL_PATTERN=ws;exports.EmailRequirementKeys=$s;exports.EmptyListMessage=Gg;exports.EndOverlayStyle=id;exports.ErrorTooltip=Gs;exports.FIRST_CHAR_ALPHA=Zd;exports.FakeInputReference=oi;exports.FilterPanel=k0;exports.FlexHandle=Jt;exports.FlexResizablePanel=Ms;exports.Form=yi;exports.FormAccessToggles=ym;exports.FormCheckbox=mm;exports.FormComboBox=Cm;exports.FormErrorMessage=qe;exports.FormField=fm;exports.FormFileInput=jm;exports.FormHiddenField=zm;exports.FormInput=Fn;exports.FormInputWrapper=Be;exports.FormLabel=me;exports.FormMultiSelect=Em;exports.FormNameInput=wm;exports.FormSelect=pm;exports.FormStaticField=Mm;exports.FormSubmit=Nn;exports.FormTextArea=dm;exports.FormToggle=am;exports.FutureAwareProgressButton=b0;exports.GroupContext=Gn;exports.GroupList=xb;exports.GroupedObservableDataProvider=hb;exports.HiddenFormInput=Rn;exports.HolderListItemTemplate=fx;exports.HorizontalRule=Rd;exports.Icon=O;exports.IconButton=ae;exports.Input=Et;exports.InputSearch=ys;exports.ItemActionBar=Mt;exports.ItemSelectionList=Nx;exports.ItemSelectionListDataProvider=Lx;exports.KOSLogo=Ep;exports.Label=ks;exports.LabelWithAction=Vd;exports.LabelWithContent=kn;exports.LabelWithContentLink=Gd;exports.LeftDialogDrawer=ud;exports.LeftInlineDrawer=kd;exports.LifecycleAwareListProvider=ha;exports.LifecycleAwareTreeProvider=fa;exports.LightTooltip=wo;exports.LightTooltipStyle=Ps;exports.Link=fn;exports.List=Un;exports.ListContext=Wn;exports.ListContextProvider=Pn;exports.ListWithDetailsLayout=qy;exports.LockedButton=zd;exports.MenuWrapper=Bx;exports.MiddleTruncateText=xo;exports.Modal=s0;exports.ModalOverlayStyles=ea;exports.ModalTrigger=i0;exports.MultiSelect=Js;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=Cs;exports.NO_SPACES_PATTERN=qd;exports.NUMBERS_ONLY_PATTERN=Yd;exports.NamedCollapsibleBranch=sx;exports.NamedCollapsibleGroup=yb;exports.NamedListItemTemplate=Db;exports.NamedSection=qi;exports.NamedSectionHeader=$x;exports.ObservableDataProvider=Hn;exports.Option=dt;exports.PASSWORD_MIN_LENGTH=Jd;exports.PASSWORD_REQUIREMENTS=On;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=ki;exports.PageHeader=l0;exports.PaneSplitter=cu;exports.PasswordRequirementKeys=Vt;exports.PasswordRequirementsList=nm;exports.ProgressButton=ta;exports.PropertyDataProvider=fb;exports.RadioButton=wn;exports.RequirementsList=vi;exports.ResizablePanel=$n;exports.ResizablePanelGroup=zs;exports.ResizablePanelGroupContextProvider=Es;exports.ResizablePanelHandle=Rs;exports.RightDialogDrawer=fd;exports.RightInlineDrawer=wd;exports.SOURCE_PROP_KEY=Yt;exports.SOURCE_SYMBOL=An;exports.ScreenOverlay=Ns;exports.ScreenOverlayWithAction=x0;exports.Select=zt;exports.SelectAsyncTreeList=Ub;exports.SelectContext=In;exports.SelectList=So;exports.SelectListContext=yt;exports.SelectSeparator=Mn;exports.SelectViewList=ly;exports.SelectViewListItem=ia;exports.SelectorTooltip=Ks;exports.ShellIconButton=Vu;exports.ShellMenu=dy;exports.ShellMenuLink=py;exports.StartOverlayStyle=sd;exports.StickyObserver=ln;exports.StudioCheckListItem=Ii;exports.StudioNamedListItem=Di;exports.StudioSelectViewListItem=_i;exports.StyledSelectOption=Hg;exports.Tab=Hu;exports.TabPane=Qu;exports.TabTrigger=Uu;exports.TabTriggerList=Zu;exports.Table=yy;exports.TableHeader=dn;exports.TableNamedListItemTemplate=Rb;exports.TableTd=Jn;exports.Tag=fo;exports.TagWithRemove=rp;exports.Text=T;exports.TextHighlight=sp;exports.Textarea=_n;exports.Toggle=ko;exports.ToggleThumb=Bs;exports.ToggleTrack=Ls;exports.Tooltip=Ys;exports.TopDialogDrawer=bd;exports.TopInlineDrawer=Cd;exports.TreeDataProvider=Lb;exports.TreeList=Pb;exports.USERNAME_PATTERN=Kd;exports.View=oa;exports.ViewActionContext=Bn;exports.ViewContainer=ra;exports.ViewHeader=Zn;exports.ViewToolbar=na;exports.VirtualList=Gi;exports.VirtualTable=Py;exports.VirtualizedList=Ki;exports.VirtualizedSelectList=hx;exports.attachSource=go;exports.baseComponentStyles=Gr;exports.baseGenericStyles=Xo;exports.baseSemanticStyles=Jo;exports.componentStudioTokenCss=rc;exports.componentStyles=Zo;exports.createLifecycleAwareProvider=ov;exports.createLifecycleAwareTreeProvider=sv;exports.createLocalComponentHelper=ec;exports.createLocalComponentTokenCss=tc;exports.createLocalTokenSystem=Ql;exports.createObservableListProvider=pa;exports.createTableColumnHelper=jy;exports.darkTooltipArrow=Us;exports.getByteString=ny;exports.getComponentTokenHelpers=M;exports.getCurrentDragData=Jy;exports.getEmailValidation=Xd;exports.getErrorMessage=eu;exports.getGlobalToken=F;exports.getPasswordValidation=Qd;exports.getPropertyWithFallback=Rm;exports.getSemanticToken=c;exports.getSource=qt;exports.getStyles=cc;exports.globalStudioTokenCss=nc;exports.isContextAware=an;exports.isErrorWithMessage=Ss;exports.isGroupFactory=zi;exports.isItemTemplateFactory=$i;exports.isLockedAware=Nm;exports.keyResolver=Ti;exports.lightTooltipArrow=Vs;exports.noop=Se;exports.normalizePathDisplay=ry;exports.rootStyles=Qo;exports.scrollbarStyle=hc;exports.semanticStudioTokenCss=oc;exports.stringComponentInsert=Ur;exports.studioColors=Kr;exports.studioDarkColors=qr;exports.studioGenericColor=Zr;exports.studioLightColors=Yr;exports.studioTheme=fc;exports.transformLocalTokenObject=pn;exports.useBaseUIComponentsContext=Qr;exports.useButtonGroupContext=ns;exports.useCollapsibleContext=Xt;exports.useContainerWidth=vn;exports.useDialogContext=rt;exports.useDialogContextValue=as;exports.useDragDrop=Qy;exports.useDrawerContext=ut;exports.useGroupSelection=Fb;exports.useListContext=Um;exports.useListGroupContext=Mi;exports.useLoadDataProvider=to;exports.useModalContext=rt;exports.useMultiSelectContext=Zs;exports.useOpenedGroups=Nb;exports.useResizablePanelGroupContext=Cn;exports.useResizeObserver=js;exports.useSelectContext=Dn;exports.useSelectListContext=je;exports.useSelection=Ab;exports.useTabContext=vo;exports.useTableContext=Xn;exports.useTreeListContext=Wi;exports.useViewActionContext=ji;
|
|
3521
3562
|
//# sourceMappingURL=index.cjs.map
|