@editora/ui-react 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react"),ne=require("./_internals-b9f3e909.js"),Hr=require("./Input.cjs.js"),Ir=require("./Textarea.cjs.js"),Pr=require("./Combobox.cjs.js"),kr=require("./Wizard.cjs.js"),Tr=require("./Rating.cjs.js"),Dr=require("./QuickActions.cjs.js"),Fr=require("./Menubar.cjs.js"),se=require("@editora/ui-core"),$r=require("./Popover.cjs.js"),xr=require("./Tabs.cjs.js"),we=require("./Menu-010405cb.js"),te=require("@editora/toast"),Mr=require("./FloatingToolbar.cjs.js"),Ge=require("./Command-da77cea8.js"),Je=require("./CommandPalette-e827844c.js"),qr=require("react-dom"),Br=require("./SelectionPopup.cjs.js"),jr=require("./Form.cjs.js"),Gr=require("./Sidebar.cjs.js"),Jr=require("./Tree.cjs.js"),_r=require("./Breadcrumb.cjs.js"),pe=require("./AppHeader-5c427700.js"),Ur=require("./Drawer.cjs.js"),Qr=require("./Layout.cjs.js"),Wr=require("./Switch.cjs.js"),_e=require("./ToggleGroup-4e0917a9.js"),Xr=require("./Collapsible.cjs.js"),Yr=require("./HoverCard.cjs.js"),zr=require("./Card.cjs.js"),Kr=require("./Label.cjs.js"),Zr=require("./Select.cjs.js"),Or=f=>f&&f.__esModule?f:{default:f};function Vr(f){if(f&&f.__esModule)return f;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(f){for(const t in f)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(f,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>f[t]})}}return e.default=f,Object.freeze(e)}const y=Vr(m),Cr=Or(te);function ge(f,e,t){if(t==null||!t){f.removeAttribute(e);return}f.setAttribute(e,"")}function ue(f,e,t){if(!t){f.removeAttribute(e);return}f.setAttribute(e,t)}const Ue=y.default.forwardRef(function({children:e,onClick:t,variant:i,size:r,recipe:l,radius:d,scale:c,icon:s,startIcon:o,endIcon:p,loading:u,loadingLabel:b,state:E,tone:L,block:A,headless:v,disabled:n,animation:a,theme:w,type:h,ariaLabel:g,...R},N){const S=m.useRef(null),I=typeof window<"u"?y.default.useLayoutEffect:y.default.useEffect;m.useImperativeHandle(N,()=>S.current),m.useEffect(()=>{ne.warnIfElementNotRegistered("ui-button","Button")},[]),m.useEffect(()=>{const $=S.current;if(!$||!t)return;const M=J=>t(J);return $.addEventListener("click",M),()=>$.removeEventListener("click",M)},[t]),I(()=>{const $=S.current;if(!$)return;ue($,"variant",i),r&&r!=="md"?ue($,"size",r):$.removeAttribute("size"),ue($,"icon",s);const M=E||(u?"loading":"idle");M==="idle"?$.removeAttribute("state"):ue($,"state",M),ge($,"loading",!!u),ge($,"block",!!A),ge($,"headless",!!v),ge($,"disabled",!!n),ue($,"animation",a),w&&w!=="default"?ue($,"theme",w):$.removeAttribute("theme"),ue($,"tone",L),h&&h!=="button"?ue($,"type",h):$.removeAttribute("type"),b!==void 0&&ue($,"loading-label",b),g!==void 0&&ue($,"aria-label",g),ue($,"recipe",l),ue($,"radius",d!=null?String(d):void 0),ue($,"scale",c)},[i,r,l,d,c,s,u,E,A,v,n,a,w,L,h,b,g]);const B={ref:S,...R,variant:i,size:r&&r!=="md"?r:void 0,recipe:l,radius:d!=null?String(d):void 0,scale:c,icon:s,animation:a,tone:L,type:h&&h!=="button"?h:void 0,loading:u?"":void 0,block:A?"":void 0,headless:v?"":void 0,disabled:n?"":void 0,theme:w&&w!=="default"?w:void 0,state:E&&E!=="idle"?E:void 0,"loading-label":b,"aria-label":g},T=o==null?null:y.default.createElement("span",{slot:"prefix","aria-hidden":"true"},o),D=p==null?null:y.default.createElement("span",{slot:"suffix","aria-hidden":"true"},p);return y.default.createElement("ui-button",B,T,e,D)});Ue.displayName="Button";const ei=typeof window<"u"?m.useLayoutEffect:m.useEffect,Qe=y.default.forwardRef(function({children:e,text:t,placement:i,open:r,disabled:l,headless:d,variant:c,size:s,tone:o,delay:p,closeDelay:u,trigger:b,offset:E,interactive:L,arrow:A,onOpen:v,onClose:n,onOpenChange:a,...w},h){const g=m.useRef(null);return m.useImperativeHandle(h,()=>g.current),m.useEffect(()=>{const R=g.current;if(!R)return;const N=()=>{v==null||v()},S=()=>{n==null||n()},I=B=>{const T=B.detail;T&&typeof T.open=="boolean"&&(a==null||a(T.open))};return R.addEventListener("open",N),R.addEventListener("close",S),R.addEventListener("change",I),()=>{R.removeEventListener("open",N),R.removeEventListener("close",S),R.removeEventListener("change",I)}},[v,n,a]),ei(()=>{const R=g.current;if(!R)return;const N=(I,B)=>{const T=R.getAttribute(I);if(B==null){T!=null&&R.removeAttribute(I);return}T!==B&&R.setAttribute(I,B)},S=(I,B)=>{B?N(I,""):N(I,null)};N("text",t||null),N("placement",i||null),S("open",r),S("disabled",l),S("headless",d),N("variant",c&&c!=="default"?c:null),N("size",s&&s!=="md"?s:null),N("tone",o&&o!=="default"?o:null),N("delay",typeof p=="number"&&Number.isFinite(p)?String(p):null),N("close-delay",typeof u=="number"&&Number.isFinite(u)?String(u):null),N("trigger",b||null),N("offset",typeof E=="number"&&Number.isFinite(E)?String(E):null),S("interactive",L),typeof A=="boolean"?N("arrow",A?"true":"false"):N("arrow",null)},[t,i,r,l,d,c,s,o,p,u,b,E,L,A]),y.default.createElement("ui-tooltip",{ref:g,...w},e)});Qe.displayName="Tooltip";const ti=typeof window<"u"?m.useLayoutEffect:m.useEffect;function ri(f){const{title:e,description:t,tone:i,variant:r,layout:l,size:d,radius:c,elevation:s,indicator:o,dismissible:p,open:u,headless:b,onClose:E,children:L,...A}=f,v=m.useRef(null);return m.useEffect(()=>{const n=v.current;if(!n)return;const a=()=>E==null?void 0:E();return n.addEventListener("close",a),()=>n.removeEventListener("close",a)},[E]),ti(()=>{const n=v.current;n&&(e?n.setAttribute("title",e):n.removeAttribute("title"),t?n.setAttribute("description",t):n.removeAttribute("description"),i?n.setAttribute("tone",i):n.removeAttribute("tone"),r?n.setAttribute("variant",r):n.removeAttribute("variant"),l?n.setAttribute("layout",l):n.removeAttribute("layout"),d&&d!=="md"?n.setAttribute("size",d):n.removeAttribute("size"),c!=null?n.setAttribute("radius",String(c)):n.removeAttribute("radius"),s&&s!=="low"?n.setAttribute("elevation",s):n.removeAttribute("elevation"),o&&o!=="line"?n.setAttribute("indicator",o):n.removeAttribute("indicator"),p?n.setAttribute("dismissible",""):n.removeAttribute("dismissible"),b?n.setAttribute("headless",""):n.removeAttribute("headless"),typeof u=="boolean"?u?n.removeAttribute("hidden"):n.setAttribute("hidden",""):n.removeAttribute("hidden"))},[e,t,i,r,l,d,c,s,o,p,u,b]),y.default.createElement("ui-alert",{ref:v,...A},L)}function he(f,e,t,i){const r=y.default.forwardRef(function({as:d,children:c,style:s,...o},p){const u=d||f,b={ref:p,...o};return t&&(b.slot=t),i&&(b[i]=""),s&&(b.style=s),y.default.createElement(u,b,c)});return r.displayName=e,r}const ii=he("span","AlertIcon","icon","data-ui-alert-icon"),ni=he("div","AlertTitle","title","data-ui-alert-title"),ui=he("div","AlertDescription",void 0,"data-ui-alert-description"),li=he("div","AlertActions","actions","data-ui-alert-actions"),si=typeof window<"u"?m.useLayoutEffect:m.useEffect,We=y.default.forwardRef(function({children:e,open:t,placement:i,variant:r,size:l,density:d,radius:c,shape:s,elevation:o,tone:p,closeOnSelect:u,typeahead:b,onOpen:E,onClose:L,onChange:A,onChangeDetail:v,onRequestClose:n,onSelect:a,...w},h){const g=m.useRef(null);return m.useImperativeHandle(h,()=>g.current),m.useEffect(()=>{const R=g.current;if(!R)return;const N=()=>E==null?void 0:E(),S=()=>L==null?void 0:L(),I=D=>{const $=D.detail||{};typeof $.open=="boolean"&&(A==null||A($.open)),typeof $.open=="boolean"&&(v==null||v({open:$.open,reason:$.reason}))},B=D=>{const $=D.detail||{};typeof $.reason=="string"&&(n==null||n({reason:$.reason}))},T=D=>{a==null||a(D.detail||{})};return R.addEventListener("open",N),R.addEventListener("close",S),R.addEventListener("change",I),R.addEventListener("request-close",B),R.addEventListener("select",T),()=>{R.removeEventListener("open",N),R.removeEventListener("close",S),R.removeEventListener("change",I),R.removeEventListener("request-close",B),R.removeEventListener("select",T)}},[E,L,A,v,n,a]),si(()=>{const R=g.current;if(!R)return;const N=(I,B)=>{const T=R.getAttribute(I);if(B==null){T!=null&&R.removeAttribute(I);return}T!==B&&R.setAttribute(I,B)},S=(I,B,T="presence")=>{if(T==="presence"){B?R.hasAttribute(I)||R.setAttribute(I,""):R.hasAttribute(I)&&R.removeAttribute(I);return}if(B==null){R.hasAttribute(I)&&R.removeAttribute(I);return}const D=B?"true":"false";R.getAttribute(I)!==D&&R.setAttribute(I,D)};S("open",t),N("placement",i||null),N("variant",r&&r!=="default"&&r!=="surface"?r:null),N("size",l&&l!=="md"&&l!=="2"?l:null),N("density",d&&d!=="default"?d:null),N("radius",c==null||c===""||c==="default"?null:String(c)),N("shape",s&&s!=="default"&&s!=="rounded"?s:null),N("elevation",o&&o!=="default"?o:null),N("tone",p&&p!=="default"&&p!=="brand"?p:null),S("close-on-select",u,"value"),S("typeahead",b,"value")},[t,i,r,l,d,c,s,o,p,u,b]),y.default.createElement("ui-dropdown",{ref:g,...w},e)});We.displayName="Dropdown";const Ie=y.default.forwardRef(function(e,t){return y.default.createElement("button",{...e,ref:t,slot:"trigger"})});Ie.displayName="Dropdown.Trigger";const Pe=y.default.forwardRef(function({as:e="div",...t},i){return y.default.createElement(e,{...t,ref:i,slot:"content"})});Pe.displayName="Dropdown.Content";const ke=y.default.forwardRef(function({children:e,icon:t,shortcut:i,caption:r,tone:l,role:d="menuitem",checked:c,className:s,value:o,label:p,"aria-label":u,...b},E){const L=["item",s].filter(Boolean).join(" "),A=d==="menuitemcheckbox"||d==="menuitemradio"?y.default.createElement("span",{className:"selection-icon","aria-hidden":"true"}):null;return y.default.createElement("div",{...b,ref:E,role:d,tabIndex:b.tabIndex??-1,className:L,"data-tone":l,"data-value":o,"aria-label":p??u,"aria-checked":d==="menuitemcheckbox"||d==="menuitemradio"?c?"true":"false":void 0,"data-menu-item":"true"},A,t?y.default.createElement("span",{className:"icon","aria-hidden":"true"},t):null,y.default.createElement("span",{className:"label"},y.default.createElement("span",{className:"text"},e),r?y.default.createElement("span",{className:"caption"},r):null),i?y.default.createElement("span",{className:"shortcut"},i):null)});ke.displayName="Dropdown.Item";const Te=y.default.forwardRef(function({className:e,...t},i){const r=["separator",e].filter(Boolean).join(" ");return y.default.createElement("div",{...t,ref:i,role:"separator",className:r})});Te.displayName="Dropdown.Separator";const De=y.default.forwardRef(function({children:e,className:t,...i},r){const l=["section-label",t].filter(Boolean).join(" ");return y.default.createElement("div",{...i,ref:r,className:l},e)});De.displayName="Dropdown.SectionLabel";const oi=Object.assign(We,{Trigger:Ie,Content:Pe,Item:ke,Separator:Te,SectionLabel:De}),ci=typeof window<"u"?m.useLayoutEffect:m.useEffect,Xe=y.default.forwardRef(function(e,t){const{value:i,onChange:r,onInput:l,onDebouncedInput:d,onClear:c,onVisibilityChange:s,onStrengthChange:o,clearable:p,debounce:u,validation:b,size:E,minlength:L,maxlength:A,readOnly:v,autofocus:n,disabled:a,counter:w,floatingLabel:h,name:g,required:R,pattern:N,autoComplete:S,spellCheck:I,placeholder:B,variant:T,tone:D,density:$,shape:M,color:J,radius:P,label:F,description:j,error:x,showStrength:H,revealable:k,strengthEvaluator:q,children:_,...W}=e,U=m.useRef(null);return m.useImperativeHandle(t,()=>U.current),m.useEffect(()=>{const G=U.current;if(!G)return;const Q=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(l==null||l(V.value))},z=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(r==null||r(V.value))},X=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(d==null||d(V.value))},K=()=>c==null?void 0:c(),Z=O=>{const V=O.detail;s==null||s(!!(V!=null&&V.revealed))},ee=O=>{const V=O.detail;V&&(o==null||o(V))};return G.addEventListener("input",Q),G.addEventListener("change",z),G.addEventListener("debounced-input",X),G.addEventListener("clear",K),G.addEventListener("visibility-change",Z),G.addEventListener("strength-change",ee),()=>{G.removeEventListener("input",Q),G.removeEventListener("change",z),G.removeEventListener("debounced-input",X),G.removeEventListener("clear",K),G.removeEventListener("visibility-change",Z),G.removeEventListener("strength-change",ee)}},[r,c,d,l,o,s]),ci(()=>{const G=U.current;if(!G)return;const Q=(X,K)=>{const Z=G.getAttribute(X);if(K==null){Z!=null&&G.removeAttribute(X);return}Z!==K&&G.setAttribute(X,K)},z=(X,K)=>{K?G.hasAttribute(X)||G.setAttribute(X,""):G.hasAttribute(X)&&G.removeAttribute(X)};i!==void 0&&Q("value",i??null),Q("debounce",typeof u=="number"&&Number.isFinite(u)?String(u):null),Q("validation",b&&b!=="none"?b:null),Q("size",E&&E!=="md"&&E!=="2"?String(E):null),Q("minlength",typeof L=="number"?String(L):null),Q("maxlength",typeof A=="number"?String(A):null),Q("pattern",N??null),Q("autocomplete",S??null),Q("spellcheck",typeof I=="boolean"?String(I):null),Q("placeholder",B??null),Q("variant",T&&T!=="classic"?T:null),Q("tone",D&&D!=="default"?D:null),Q("density",$&&$!=="default"?$:null),Q("shape",M&&M!=="default"?M:null),Q("color",J??null),Q("radius",P?String(P):null),Q("label",F??null),Q("description",j??null),Q("data-error",x??null),Q("name",g??null),z("clearable",p),z("readonly",v),z("autofocus",n),z("disabled",a),z("counter",w),z("floating-label",h),z("required",R),z("show-strength",H),typeof k=="boolean"?Q("revealable",String(k)):G.removeAttribute("revealable"),G.strengthEvaluator=q??null},[S,n,p,J,w,u,$,j,a,x,h,F,A,L,g,N,B,P,v,R,k,H,M,E,I,q,D,b,i,T]),y.default.createElement("ui-password-field",{ref:U,...W},_)});Xe.displayName="PasswordField";const fi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function ai(f){return f==null?null:Array.isArray(f)?JSON.stringify(f):f}const Ye=y.default.forwardRef(function({value:e,name:t,label:i,description:r,placeholder:l,required:d,disabled:c,readOnly:s,counter:o,maxTags:p,allowDuplicates:u,addOnBlur:b,onChange:E,onTagAdd:L,onTagRemove:A,children:v,...n},a){const w=m.useRef(null);return m.useImperativeHandle(a,()=>w.current),m.useEffect(()=>{const h=w.current;if(!h)return;const g=S=>{const I=S.detail;Array.isArray(I==null?void 0:I.value)&&(E==null||E(I.value))},R=S=>{const I=S.detail;I&&(L==null||L(I))},N=S=>{const I=S.detail;I&&(A==null||A(I))};return h.addEventListener("change",g),h.addEventListener("tag-add",R),h.addEventListener("tag-remove",N),()=>{h.removeEventListener("change",g),h.removeEventListener("tag-add",R),h.removeEventListener("tag-remove",N)}},[E,L,A]),fi(()=>{const h=w.current;if(!h)return;const g=(N,S)=>{const I=h.getAttribute(N);if(S==null){I!=null&&h.removeAttribute(N);return}I!==S&&h.setAttribute(N,S)},R=(N,S)=>{S?h.hasAttribute(N)||h.setAttribute(N,""):h.hasAttribute(N)&&h.removeAttribute(N)};g("value",ai(e)),g("name",t??null),g("label",i??null),g("description",r??null),g("placeholder",l??null),R("required",d),R("disabled",c),R("readonly",s),R("counter",o),R("allow-duplicates",u),R("add-on-blur",b),g("max-tags",typeof p=="number"?String(p):null)},[e,t,i,r,l,d,c,s,o,u,b,p]),y.default.createElement("ui-tags-input",{ref:w,...n},v)});Ye.displayName="TagsInput";const di=typeof window<"u"?m.useLayoutEffect:m.useEffect,Fe=y.default.forwardRef(function({value:e,onChange:t,onComplete:i,length:r,name:l,label:d,description:c,error:s,mode:o,mask:p,required:u,disabled:b,readOnly:E,placeholderChar:L,size:A,density:v,shape:n,invalid:a,children:w,...h},g){const R=m.useRef(null);return m.useImperativeHandle(g,()=>R.current),m.useEffect(()=>{const N=R.current;if(!N)return;const S=B=>{t==null||t(B.detail.value||"")},I=B=>{i==null||i(B.detail.value||"")};return N.addEventListener("change",S),N.addEventListener("complete",I),()=>{N.removeEventListener("change",S),N.removeEventListener("complete",I)}},[t,i]),di(()=>{const N=R.current;N&&(e!=null&&e!==""?N.setAttribute("value",e):N.removeAttribute("value"),typeof r=="number"&&Number.isFinite(r)?N.setAttribute("length",String(r)):N.removeAttribute("length"),l?N.setAttribute("name",l):N.removeAttribute("name"),d?N.setAttribute("label",d):N.removeAttribute("label"),c?N.setAttribute("description",c):N.removeAttribute("description"),s?N.setAttribute("error",s):N.removeAttribute("error"),o&&o!=="numeric"?N.setAttribute("mode",o):N.removeAttribute("mode"),p?N.setAttribute("mask",""):N.removeAttribute("mask"),u?N.setAttribute("required",""):N.removeAttribute("required"),b?N.setAttribute("disabled",""):N.removeAttribute("disabled"),E?N.setAttribute("readonly",""):N.removeAttribute("readonly"),L?N.setAttribute("placeholder-char",L):N.removeAttribute("placeholder-char"),A&&A!=="md"&&A!=="2"?N.setAttribute("size",A):N.removeAttribute("size"),v&&v!=="default"?N.setAttribute("density",v):N.removeAttribute("density"),n&&n!=="default"?N.setAttribute("shape",n):N.removeAttribute("shape"),a?N.setAttribute("invalid",""):N.removeAttribute("invalid"))},[e,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a]),y.default.createElement("ui-pin-input",{ref:R,...h},w)});Fe.displayName="PinInput";const mi=Fe,bi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function ze(f,{onChange:e,onReject:t,onUploadStart:i,onUploadProgress:r,onUploadSuccess:l,onUploadError:d,onUploadCancel:c,onUploadComplete:s}){m.useEffect(()=>{const o=f.current;if(!o)return;const p=w=>{const h=w.detail;Array.isArray(h==null?void 0:h.files)&&(e==null||e(h.files))},u=w=>{const h=w.detail;Array.isArray(h==null?void 0:h.rejected)&&(t==null||t(h.rejected))},b=w=>h=>{w==null||w(h.detail||{})},E=b(i),L=b(r),A=b(l),v=b(d),n=b(c),a=b(s);return o.addEventListener("change",p),o.addEventListener("reject",u),o.addEventListener("upload-start",E),o.addEventListener("upload-progress",L),o.addEventListener("upload-success",A),o.addEventListener("upload-error",v),o.addEventListener("upload-cancel",n),o.addEventListener("upload-complete",a),()=>{o.removeEventListener("change",p),o.removeEventListener("reject",u),o.removeEventListener("upload-start",E),o.removeEventListener("upload-progress",L),o.removeEventListener("upload-success",A),o.removeEventListener("upload-error",v),o.removeEventListener("upload-cancel",n),o.removeEventListener("upload-complete",a)}},[e,t,c,s,d,r,i,l,f])}function Ke(f,{name:e,label:t,description:i,accept:r,multiple:l,disabled:d,required:c,maxFiles:s,maxSize:o,buttonText:p,dropLabel:u,showPreviews:b,progress:E,uploadOnSelect:L,uploadButtonText:A,onUploadRequest:v}){bi(()=>{const n=f.current;if(!n)return;const a=(h,g)=>{const R=n.getAttribute(h);if(g==null){R!=null&&n.removeAttribute(h);return}R!==g&&n.setAttribute(h,g)},w=(h,g)=>{g?n.hasAttribute(h)||n.setAttribute(h,""):n.hasAttribute(h)&&n.removeAttribute(h)};a("name",e??null),a("label",t??null),a("description",i??null),a("accept",r??null),w("multiple",l),w("disabled",d),w("required",c),a("max-files",typeof s=="number"?String(s):null),a("max-size",typeof o=="number"?String(o):null),a("button-text",p??null),a("drop-label",u??null),w("show-previews",b),w("upload-on-select",L),a("upload-button-text",A??null),a("progress",E?JSON.stringify(E):null),n.uploadRequest=v??null},[r,p,i,d,u,t,s,o,l,e,f,c,b,E,L,A,v])}const Ze=y.default.forwardRef(function({onChange:e,onReject:t,children:i,...r},l){const d=m.useRef(null);return m.useImperativeHandle(l,()=>d.current),ze(d,{onChange:e,onReject:t,...r}),Ke(d,r),y.default.createElement("ui-file-upload",{ref:d,...r},i)}),Oe=y.default.forwardRef(function({onChange:e,onReject:t,children:i,...r},l){const d=m.useRef(null);return m.useImperativeHandle(l,()=>d.current),ze(d,{onChange:e,onReject:t,...r}),Ke(d,r),y.default.createElement("ui-dropzone",{ref:d,...r},i)});Ze.displayName="FileUpload";Oe.displayName="Dropzone";const vi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Ai(f){const{children:e,label:t,description:i,error:r,htmlFor:l,required:d,invalid:c,orientation:s,variant:o,tone:p,density:u,shape:b,shell:E,labelWidth:L,headless:A,...v}=f,n=m.useRef(null);return vi(()=>{const a=n.current;a&&(t!=null&&t!==""?a.setAttribute("label",t):a.removeAttribute("label"),i!=null&&i!==""?a.setAttribute("description",i):a.removeAttribute("description"),r!=null&&r!==""?a.setAttribute("error",r):a.removeAttribute("error"),l?a.setAttribute("for",l):a.removeAttribute("for"),d?a.setAttribute("required",""):a.removeAttribute("required"),c?a.setAttribute("invalid",""):a.removeAttribute("invalid"),s&&s!=="vertical"?a.setAttribute("orientation",s):a.removeAttribute("orientation"),o&&o!=="default"?a.setAttribute("variant",o):a.removeAttribute("variant"),p&&p!=="default"?a.setAttribute("tone",p):a.removeAttribute("tone"),u&&u!=="default"?a.setAttribute("density",u):a.removeAttribute("density"),b&&b!=="default"?a.setAttribute("shape",b):a.removeAttribute("shape"),E&&E!=="none"?a.setAttribute("shell",E):a.removeAttribute("shell"),L?a.setAttribute("label-width",L):a.removeAttribute("label-width"),A?a.setAttribute("headless",""):a.removeAttribute("headless"))},[t,i,r,l,d,c,s,o,p,u,b,E,L,A]),y.default.createElement("ui-field",{ref:n,...v},e)}const Ne=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ve=y.default.forwardRef(function({children:e,htmlFor:t,for:i,tone:r,size:l,variant:d,hidden:c,...s},o){const p=m.useRef(null);return m.useImperativeHandle(o,()=>p.current),Ne(()=>{const u=p.current;if(!u)return;const b=t||i;b?u.setAttribute("for",b):u.removeAttribute("for"),r&&r!=="default"?u.setAttribute("tone",r):u.removeAttribute("tone"),l&&l!=="md"&&l!=="2"?u.setAttribute("size",l):u.removeAttribute("size"),d&&d!=="default"?u.setAttribute("variant",d):u.removeAttribute("variant"),c?u.setAttribute("hidden",""):u.removeAttribute("hidden")},[t,i,r,l,d,c]),y.default.createElement("ui-description",{ref:p,...s},e)});Ve.displayName="Description";const Ce=y.default.forwardRef(function({children:e,htmlFor:t,for:i,active:r,size:l,variant:d,hidden:c,...s},o){const p=m.useRef(null);return m.useImperativeHandle(o,()=>p.current),Ne(()=>{const u=p.current;if(!u)return;const b=t||i;b?u.setAttribute("for",b):u.removeAttribute("for"),r?u.setAttribute("active",""):u.removeAttribute("active"),l&&l!=="md"&&l!=="2"?u.setAttribute("size",l):u.removeAttribute("size"),d&&d!=="default"?u.setAttribute("variant",d):u.removeAttribute("variant"),c?u.setAttribute("hidden",""):u.removeAttribute("hidden")},[t,i,r,l,d,c]),y.default.createElement("ui-field-error",{ref:p,...s},e)});Ce.displayName="FieldError";const et=y.default.forwardRef(function({children:e,label:t,orientation:i,variant:r,density:l,hidden:d,...c},s){const o=m.useRef(null);return m.useImperativeHandle(s,()=>o.current),Ne(()=>{const p=o.current;p&&(t?p.setAttribute("label",t):p.removeAttribute("label"),i&&i!=="vertical"?p.setAttribute("orientation",i):p.removeAttribute("orientation"),r&&r!=="default"?p.setAttribute("variant",r):p.removeAttribute("variant"),l&&l!=="default"?p.setAttribute("density",l):p.removeAttribute("density"),d?p.setAttribute("hidden",""):p.removeAttribute("hidden"))},[t,i,r,l,d]),y.default.createElement("ui-control-group",{ref:o,...c},e)});et.displayName="ControlGroup";const tt=y.default.forwardRef(function({children:e,legend:t,description:i,error:r,required:l,invalid:d,orientation:c,variant:s,tone:o,density:p,shape:u,headless:b,...E},L){const A=m.useRef(null);return m.useImperativeHandle(L,()=>A.current),Ne(()=>{const v=A.current;v&&(t!=null&&t!==""?v.setAttribute("legend",t):v.removeAttribute("legend"),i!=null&&i!==""?v.setAttribute("description",i):v.removeAttribute("description"),r!=null&&r!==""?v.setAttribute("error",r):v.removeAttribute("error"),l?v.setAttribute("required",""):v.removeAttribute("required"),d?v.setAttribute("invalid",""):v.removeAttribute("invalid"),c&&c!=="vertical"?v.setAttribute("orientation",c):v.removeAttribute("orientation"),s&&s!=="default"?v.setAttribute("variant",s):v.removeAttribute("variant"),o&&o!=="default"?v.setAttribute("tone",o):v.removeAttribute("tone"),p&&p!=="default"?v.setAttribute("density",p):v.removeAttribute("density"),u&&u!=="default"?v.setAttribute("shape",u):v.removeAttribute("shape"),b?v.setAttribute("headless",""):v.removeAttribute("headless"))},[t,i,r,l,d,c,s,o,p,u,b]),y.default.createElement("ui-fieldset",{ref:A,...E},e)});tt.displayName="Fieldset";const pi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Ei(f){const{text:e,tone:t,variant:i,size:r,radius:l,elevation:d,state:c,pill:s,dot:o,interactive:p,truncate:u,maxWidth:b,removable:E,autoRemove:L,iconOnly:A,disabled:v,onRemove:n,children:a,...w}=f,h=m.useRef(null);return m.useEffect(()=>{const g=h.current;if(!g)return;const R=N=>n==null?void 0:n(N.detail);return g.addEventListener("remove",R),()=>g.removeEventListener("remove",R)},[n]),pi(()=>{const g=h.current;g&&(e?g.setAttribute("text",e):g.removeAttribute("text"),t?g.setAttribute("tone",t):g.removeAttribute("tone"),i&&i!=="surface"?g.setAttribute("variant",i):g.removeAttribute("variant"),r&&r!=="md"&&r!=="2"?g.setAttribute("size",r):g.removeAttribute("size"),l!=null?g.setAttribute("radius",String(l)):g.removeAttribute("radius"),d&&d!=="none"?g.setAttribute("elevation",d):g.removeAttribute("elevation"),c&&c!=="idle"?g.setAttribute("state",c):g.removeAttribute("state"),s?g.setAttribute("pill",""):g.removeAttribute("pill"),o?g.setAttribute("dot",""):g.removeAttribute("dot"),p?g.setAttribute("interactive",""):g.removeAttribute("interactive"),u?g.setAttribute("truncate",""):g.removeAttribute("truncate"),b?g.setAttribute("max-width",b):g.removeAttribute("max-width"),E?g.setAttribute("removable",""):g.removeAttribute("removable"),L?g.setAttribute("auto-remove",""):g.removeAttribute("auto-remove"),A?g.setAttribute("icon-only",""):g.removeAttribute("icon-only"),v?g.setAttribute("disabled",""):g.removeAttribute("disabled"))},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v]),y.default.createElement("ui-badge",{ref:h,...w},a)}const yi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Li(f){const{title:e,description:t,actionLabel:i,tone:r,compact:l,headless:d,onAction:c,children:s,...o}=f,p=m.useRef(null);return m.useEffect(()=>{const u=p.current;if(!u)return;const b=()=>c==null?void 0:c();return u.addEventListener("action",b),()=>u.removeEventListener("action",b)},[c]),yi(()=>{const u=p.current;u&&(e?u.setAttribute("title",e):u.removeAttribute("title"),t?u.setAttribute("description",t):u.removeAttribute("description"),i?u.setAttribute("action-label",i):u.removeAttribute("action-label"),r?u.setAttribute("tone",r):u.removeAttribute("tone"),l?u.setAttribute("compact",""):u.removeAttribute("compact"),d?u.setAttribute("headless",""):u.removeAttribute("headless"))},[e,t,i,r,l,d]),y.default.createElement("ui-empty-state",{ref:p,...o},s)}function gi(f){const{sortable:e,selectable:t,multiSelect:i,striped:r,hover:l,compact:d,bordered:c,stickyHeader:s,loading:o,headless:p,emptyText:u,onSortChange:b,onRowSelect:E,children:L,...A}=f,v=m.useRef(null);return m.useEffect(()=>{const n=v.current;if(!n)return;const a=h=>{const g=h.detail;g&&(b==null||b(g))},w=h=>{const g=h.detail;g&&(E==null||E(g))};return n.addEventListener("sort-change",a),n.addEventListener("row-select",w),()=>{n.removeEventListener("sort-change",a),n.removeEventListener("row-select",w)}},[b,E]),y.default.createElement("ui-table",{ref:v,...A,...e?{sortable:""}:{},...t?{selectable:""}:{},...i?{"multi-select":""}:{},...r?{striped:""}:{},...l?{hover:""}:{},...d?{compact:""}:{},...c?{bordered:""}:{},...s?{"sticky-header":""}:{},...o?{loading:""}:{},...p?{headless:""}:{},...u?{"empty-text":u}:{}},L)}function wi(f){const{sortable:e,selectable:t,multiSelect:i,shape:r,variant:l,elevation:d,striped:c,hover:s,compact:o,bordered:p,stickyHeader:u,stickyFooter:b,loading:E,state:L,stateText:A,headless:v,hideSummary:n,emptyText:a,page:w,pageSize:h,paginationId:g,filterQuery:R,filterColumn:N,filterRules:S,columnOrder:I,pinColumns:B,draggableColumns:T,resizableColumns:D,bulkActionsLabel:$,bulkClearLabel:M,virtualize:J,rowHeight:P,overscan:F,onSortChange:j,onRowSelect:x,onPageChange:H,onFilterChange:k,onColumnResize:q,onVirtualRangeChange:_,onColumnOrderChange:W,onBulkClear:U,children:G,...Q}=f,z=m.useRef(null);m.useEffect(()=>{const Z=z.current;if(!Z)return;const ee=re=>{const C=re.detail;C&&(j==null||j(C))},O=re=>{const C=re.detail;C&&(x==null||x(C))},V=re=>{const C=re.detail;C&&(H==null||H(C))},oe=re=>{const C=re.detail;C&&(k==null||k(C))},ce=re=>{const C=re.detail;C&&(q==null||q(C))},fe=re=>{const C=re.detail;C&&(_==null||_(C))},ae=re=>{const C=re.detail;C&&(W==null||W(C))},de=re=>{const C=re.detail;C&&(U==null||U(C))};return Z.addEventListener("sort-change",ee),Z.addEventListener("row-select",O),Z.addEventListener("page-change",V),Z.addEventListener("filter-change",oe),Z.addEventListener("column-resize",ce),Z.addEventListener("virtual-range-change",fe),Z.addEventListener("column-order-change",ae),Z.addEventListener("bulk-clear",de),()=>{Z.removeEventListener("sort-change",ee),Z.removeEventListener("row-select",O),Z.removeEventListener("page-change",V),Z.removeEventListener("filter-change",oe),Z.removeEventListener("column-resize",ce),Z.removeEventListener("virtual-range-change",fe),Z.removeEventListener("column-order-change",ae),Z.removeEventListener("bulk-clear",de)}},[j,x,H,k,q,_,W,U]);const X=S&&S.length?(()=>{try{return JSON.stringify(S)}catch{return}})():void 0,K=typeof B=="string"?B.trim()||void 0:B&&typeof B=="object"?(()=>{try{return JSON.stringify(B)}catch{return}})():void 0;return y.default.createElement("ui-data-table",{ref:z,...Q,...e?{sortable:""}:{},...t?{selectable:""}:{},...i?{"multi-select":""}:{},...r&&r!=="default"?{shape:r}:{},...l&&l!=="default"?{variant:l}:{},...d&&d!=="default"?{elevation:d}:{},...c?{striped:""}:{},...s?{hover:""}:{},...o?{compact:""}:{},...p?{bordered:""}:{},...u?{"sticky-header":""}:{},...b?{"sticky-footer":""}:{},...E?{loading:""}:{},...L&&L!=="idle"?{state:L}:{},...A?{"state-text":A}:{},...v?{headless:""}:{},...n?{"hide-summary":""}:{},...a?{"empty-text":a}:{},...typeof w=="number"&&Number.isFinite(w)?{page:String(w)}:{},...typeof h=="number"&&Number.isFinite(h)?{"page-size":String(h)}:{},...g?{"pagination-id":g}:{},...typeof R=="string"?{"filter-query":R}:{},...typeof N=="number"&&Number.isFinite(N)?{"filter-column":String(N)}:typeof N=="string"&&N.trim()?{"filter-column":N}:{},...X?{filters:X}:{},...I?{"column-order":I}:{},...K?{"pin-columns":K}:{},...T?{"draggable-columns":""}:{},...D?{"resizable-columns":""}:{},...$?{"bulk-actions-label":$}:{},...M?{"bulk-clear-label":M}:{},...J?{virtualize:""}:{},...typeof P=="number"&&Number.isFinite(P)?{"row-height":String(P)}:{},...typeof F=="number"&&Number.isFinite(F)?{overscan:String(F)}:{}},G)}const hi=typeof window<"u"?m.useLayoutEffect:m.useEffect,Se=y.default.forwardRef(function({data:e,series:t,values:i,labels:r,type:l,variant:d,title:c,subtitle:s,state:o,disabled:p,interactive:u,showLegend:b,showSummary:E,headless:L,valuePrefix:A,valueSuffix:v,ariaLabel:n,onPointSelect:a,children:w,...h},g){const R=m.useRef(null);return m.useImperativeHandle(g,()=>R.current),m.useEffect(()=>{ne.warnIfElementNotRegistered("ui-chart","Chart")},[]),m.useEffect(()=>{const N=R.current;if(!N||!a)return;const S=I=>{const B=I.detail;B&&a(B)};return N.addEventListener("ui-point-select",S),()=>{N.removeEventListener("ui-point-select",S)}},[a]),hi(()=>{const N=R.current;if(!N)return;const S=(B,T)=>{const D=N.getAttribute(B);if(T==null){D!=null&&N.removeAttribute(B);return}D!==T&&N.setAttribute(B,T)},I=(B,T)=>{T?S(B,""):S(B,null)};if(e&&e.length)try{S("data",JSON.stringify(e))}catch{S("data",null)}else S("data",null);if(t&&t.length)try{S("series",JSON.stringify(t))}catch{S("series",null)}else S("series",null);i&&i.length?S("values",i.join(",")):S("values",null),r&&r.length?S("labels",r.join(",")):S("labels",null),S("type",l&&l!=="line"?l:null),S("variant",d&&d!=="default"?d:null),S("title",c||null),S("subtitle",s||null),S("state",o&&o!=="idle"?o:null),S("interactive",u===!1?"false":null),S("show-legend",typeof b=="boolean"?b?"true":"false":null),S("show-summary",typeof E=="boolean"?E?"true":"false":null),S("value-prefix",A||null),S("value-suffix",v||null),S("aria-label",n||null),I("disabled",p),I("headless",L)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n]),y.default.createElement("ui-chart",{ref:R,...h},w)});Se.displayName="Chart";const rt=y.default.forwardRef(function({children:e,...t},i){return y.default.createElement("div",{ref:i,slot:"header",...t},e)});rt.displayName="ChartHeader";const it=y.default.forwardRef(function({children:e,...t},i){return y.default.createElement("h3",{ref:i,slot:"title",...t},e)});it.displayName="ChartTitle";const nt=y.default.forwardRef(function({children:e,...t},i){return y.default.createElement("p",{ref:i,slot:"subtitle",...t},e)});nt.displayName="ChartSubtitle";const Ni=Object.assign(Se,{Root:Se,Header:rt,Title:it,Subtitle:nt}),Ri=typeof window<"u"?m.useLayoutEffect:m.useEffect,ut=y.default.forwardRef(function({items:e,variant:t,headless:i,children:r,...l},d){const c=m.useRef(null);return m.useImperativeHandle(d,()=>c.current),Ri(()=>{const s=c.current;if(!s)return;const o=(u,b)=>{const E=s.getAttribute(u);if(b==null){E!=null&&s.removeAttribute(u);return}E!==b&&s.setAttribute(u,b)},p=(u,b)=>{b?o(u,""):o(u,null)};if(e&&e.length)try{o("items",JSON.stringify(e))}catch{o("items",null)}else o("items",null);o("variant",t&&t!=="default"?t:null),p("headless",i)},[e,t,i]),y.default.createElement("ui-timeline",{ref:c,...l},r)});ut.displayName="Timeline";const Si=typeof window<"u"?m.useLayoutEffect:m.useEffect,lt=y.default.forwardRef(function({year:e,month:t,value:i,events:r,variant:l,selection:d,min:c,max:s,disabled:o,readOnly:p,locale:u,translations:b,weekStart:E,outsideClick:L,eventsMax:A,eventsDisplay:v,maxSelections:n,size:a,bare:w,tone:h,state:g,headless:R,hideToday:N,showToday:S,ariaLabel:I,onSelect:B,onChange:T,onCalendarChange:D,onMonthChange:$,onValueChange:M,children:J,...P},F){const j=m.useRef(null);return m.useImperativeHandle(F,()=>j.current),m.useEffect(()=>{ne.warnIfElementNotRegistered("ui-calendar","Calendar")},[]),m.useEffect(()=>{const x=j.current;if(!x)return;const H=_=>{const W=_.detail;W&&(B==null||B(W),T==null||T(W),M==null||M(W.value))},k=_=>{const W=_.detail;W&&(D==null||D(W))},q=_=>{const W=_.detail;W&&($==null||$(W))};return x.addEventListener("ui-select",H),x.addEventListener("ui-change",k),x.addEventListener("ui-month-change",q),()=>{x.removeEventListener("ui-select",H),x.removeEventListener("ui-change",k),x.removeEventListener("ui-month-change",q)}},[B,T,D,$,M]),Si(()=>{const x=j.current;if(!x)return;const H=(q,_)=>{const W=x.getAttribute(q);if(_==null){W!=null&&x.removeAttribute(q);return}W!==_&&x.setAttribute(q,_)},k=(q,_)=>{_?x.hasAttribute(q)||x.setAttribute(q,""):x.hasAttribute(q)&&x.removeAttribute(q)};if(typeof e=="number"&&Number.isFinite(e)?H("year",String(e)):H("year",null),typeof t=="number"&&Number.isFinite(t)?H("month",String(t)):H("month",null),H("value",i||null),H("selection",d&&d!=="single"?d:null),H("min",c||null),H("max",s||null),H("locale",u||null),H("translations",ne.serializeTranslations(b)),H("week-start",typeof E=="number"?String(E):null),H("outside-click",L&&L!=="navigate"?L:null),H("events-max",typeof A=="number"&&Number.isFinite(A)?String(A):null),H("events-display",v&&v!=="dots"?v:null),H("max-selections",typeof n=="number"&&Number.isFinite(n)?String(n):null),H("size",a&&a!=="md"?a:null),k("bare",w),H("tone",h||null),H("state",g&&g!=="idle"?g:null),H("show-today",typeof S=="boolean"?S?"true":"false":null),H("aria-label",I||null),k("disabled",o),k("readonly",p),k("hide-today",N),k("headless",R),r&&r.length)try{H("events",JSON.stringify(r))}catch{H("events",null)}else H("events",null);H("variant",l&&l!=="default"?l:null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I]),y.default.createElement("ui-calendar",{ref:j,...P},J)});lt.displayName="Calendar";const Hi=typeof window<"u"?m.useLayoutEffect:m.useEffect,st=y.default.forwardRef(function({value:e,format:t,alpha:i,disabled:r,readOnly:l,size:d,variant:c,state:s,tone:o,mode:p,open:u,closeOnEscape:b,placeholder:E,presets:L,recent:A,maxRecent:v,persist:n,onInput:a,onChange:w,onValueChange:h,onOpen:g,onClose:R,onOpenDetail:N,onCloseDetail:S,onInvalid:I,children:B,...T},D){const $=m.useRef(null);m.useImperativeHandle(D,()=>$.current),m.useEffect(()=>{const J=$.current;if(!J)return;const P=k=>{const q=k.detail;q&&(a==null||a(q))},F=k=>{const q=k.detail;q&&(w==null||w(q),h==null||h(q.value))},j=k=>{const q=k.detail;q&&(I==null||I(q))},x=k=>{const q=k.detail;g==null||g(),q&&(N==null||N(q))},H=k=>{const q=k.detail;R==null||R(),q&&(S==null||S(q))};return J.addEventListener("input",P),J.addEventListener("change",F),J.addEventListener("open",x),J.addEventListener("close",H),J.addEventListener("invalid",j),()=>{J.removeEventListener("input",P),J.removeEventListener("change",F),J.removeEventListener("open",x),J.removeEventListener("close",H),J.removeEventListener("invalid",j)}},[a,w,h,g,R,N,S,I]),Hi(()=>{const J=$.current;if(!J)return;const P=(j,x)=>{const H=J.getAttribute(j);x==null?H!=null&&J.removeAttribute(j):H!==x&&J.setAttribute(j,x)},F=(j,x)=>{x?P(j,""):P(j,null)};if(P("value",e??null),P("format",t&&t!=="hex"?t:null),F("alpha",i),F("disabled",r),F("readonly",l),P("size",d&&d!=="md"?d:null),P("variant",c&&c!=="default"?c:null),P("state",s&&s!=="idle"?s:null),P("tone",o&&o!=="brand"?o:null),P("mode",p&&p!=="inline"?p:null),typeof u=="boolean"?F("open",u):P("open",null),P("close-on-escape",typeof b=="boolean"?b?"true":"false":null),P("placeholder",E??null),F("recent",A),P("max-recent",typeof v=="number"?String(v):null),F("persist",n),L&&L.length>0)try{P("presets",JSON.stringify(L))}catch{P("presets",null)}else P("presets",null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n]);const M={ref:$,...T};if(p&&p!=="inline"&&(M.mode=p),typeof u=="boolean"&&u&&(M.open=""),e!=null&&(M.value=e),t&&t!=="hex"&&(M.format=t),i&&(M.alpha=""),r&&(M.disabled=""),l&&(M.readonly=""),d&&d!=="md"&&(M.size=d),c&&c!=="default"&&(M.variant=c),s&&s!=="idle"&&(M.state=s),o&&o!=="brand"&&(M.tone=o),E&&(M.placeholder=E),typeof b=="boolean"&&(M["close-on-escape"]=b?"true":"false"),A&&(M.recent=""),typeof v=="number"&&(M["max-recent"]=String(v)),n&&(M.persist=""),L&&L.length>0)try{M.presets=JSON.stringify(L)}catch{}return y.default.createElement("ui-color-picker",M,B)});st.displayName="ColorPicker";const Ii=typeof window<"u"?m.useLayoutEffect:m.useEffect,ot=y.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:o,size:p,shape:u,bare:b,variant:E,state:L,placeholder:A,label:v,hint:n,error:a,clearable:w,allowInput:h,closeOnSelect:g,outsideClick:R,disabled:N,readOnly:S,required:I,name:B,mode:T,showFooter:D,events:$,eventsMax:M,eventsDisplay:J,format:P,displayFormat:F,onInput:j,onChange:x,onValueChange:H,onOpen:k,onClose:q,onInvalid:_,children:W,...U},G){const Q=m.useRef(null);return m.useImperativeHandle(G,()=>Q.current),m.useEffect(()=>{const z=Q.current;if(!z)return;const X=ee=>{const O=ee.detail;O&&(j==null||j(O))},K=ee=>{const O=ee.detail;O&&(x==null||x(O),H==null||H(O.value))},Z=ee=>{const O=ee.detail;O&&(_==null||_(O))};return z.addEventListener("input",X),z.addEventListener("change",K),z.addEventListener("open",k),z.addEventListener("close",q),z.addEventListener("invalid",Z),()=>{z.removeEventListener("input",X),z.removeEventListener("change",K),z.removeEventListener("open",k),z.removeEventListener("close",q),z.removeEventListener("invalid",Z)}},[j,x,H,k,q,_]),Ii(()=>{const z=Q.current;if(!z)return;const X=(Z,ee)=>{const O=z.getAttribute(Z);ee==null?O!=null&&z.removeAttribute(Z):O!==ee&&z.setAttribute(Z,ee)},K=(Z,ee)=>{ee?X(Z,""):X(Z,null)};if(X("value",e??null),X("default-value",t??null),typeof i=="boolean"?K("open",i):X("open",null),K("default-open",r),X("min",l??null),X("max",d??null),X("locale",c??null),X("translations",ne.serializeTranslations(s)),X("week-start",typeof o=="number"?String(o):null),X("size",p&&p!=="md"?p:null),X("shape",u&&u!=="default"?u:null),K("bare",b),X("variant",E&&E!=="default"?E:null),X("state",L&&L!=="idle"?L:null),X("placeholder",A??null),X("label",v??null),X("hint",n??null),X("error",a??null),K("clearable",w),K("allow-input",h),K("close-on-select",g),X("outside-click",R&&R!=="navigate"?R:null),K("disabled",N),K("readonly",S),K("required",I),X("name",B??null),X("mode",T&&T!=="popover"?T:null),X("show-footer",typeof D=="boolean"?String(D):null),X("events-max",typeof M=="number"?String(M):null),X("events-display",J&&J!=="dots"?J:null),X("format",P&&P!=="locale"?P:null),X("display-format",F??null),$!=null&&$.length)try{X("events",JSON.stringify($))}catch{X("events",null)}else X("events",null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I,B,T,D,$,M,J,P,F]),y.default.createElement("ui-date-picker",{ref:Q,...U},W)});ot.displayName="DatePicker";const Pi=typeof window<"u"?m.useLayoutEffect:m.useEffect,ct=y.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:o,size:p,shape:u,bare:b,variant:E,state:L,rangeVariant:A,label:v,hint:n,error:a,allowSameDay:w,allowPartial:h,closeOnSelect:g,clearable:R,disabled:N,readOnly:S,required:I,name:B,nameStart:T,nameEnd:D,mode:$,showFooter:M,onInput:J,onChange:P,onValueChange:F,onOpen:j,onClose:x,onInvalid:H,children:k,...q},_){const W=m.useRef(null);return m.useImperativeHandle(_,()=>W.current),m.useEffect(()=>{const U=W.current;if(!U)return;const G=X=>{const K=X.detail;K&&(J==null||J(K))},Q=X=>{const K=X.detail;K&&(P==null||P(K),F==null||F(K.value?JSON.stringify(K.value):null))},z=X=>{const K=X.detail;K&&(H==null||H(K))};return U.addEventListener("input",G),U.addEventListener("change",Q),U.addEventListener("open",j),U.addEventListener("close",x),U.addEventListener("invalid",z),()=>{U.removeEventListener("input",G),U.removeEventListener("change",Q),U.removeEventListener("open",j),U.removeEventListener("close",x),U.removeEventListener("invalid",z)}},[J,P,F,j,x,H]),Pi(()=>{const U=W.current;if(!U)return;const G=(z,X)=>{const K=U.getAttribute(z);X==null?K!=null&&U.removeAttribute(z):K!==X&&U.setAttribute(z,X)},Q=(z,X)=>{X?G(z,""):G(z,null)};G("value",e??null),G("default-value",t??null),typeof i=="boolean"?Q("open",i):G("open",null),Q("default-open",r),G("min",l??null),G("max",d??null),G("locale",c??null),G("translations",ne.serializeTranslations(s)),G("week-start",typeof o=="number"?String(o):null),G("size",p&&p!=="md"?p:null),G("shape",u&&u!=="default"?u:null),Q("bare",b),G("variant",E&&E!=="default"?E:null),G("state",L&&L!=="idle"?L:null),G("range-variant",A&&A!=="two-fields"?A:null),G("label",v??null),G("hint",n??null),G("error",a??null),Q("allow-same-day",w),Q("allow-partial",h),Q("close-on-select",g),Q("clearable",R),Q("disabled",N),Q("readonly",S),Q("required",I),G("name",B??null),G("name-start",T??null),G("name-end",D??null),G("mode",$&&$!=="popover"?$:null),G("show-footer",typeof M=="boolean"?String(M):null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I,B,T,D,$,M]),y.default.createElement("ui-date-range-picker",{ref:W,...q},k)});ct.displayName="DateRangePicker";const ft=typeof window<"u"?m.useLayoutEffect:m.useEffect;function at(f,e,t){m.useEffect(()=>{const i=f.current;if(!i)return;const r=l=>{const d=l.detail;d&&(e==null||e(d),t==null||t(d.value))};return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e,t,f])}const dt=y.default.forwardRef(function({value:e,min:t,max:i,locale:r,label:l,description:d,error:c,name:s,required:o,disabled:p,readOnly:u,onChange:b,onValueChange:E,children:L,...A},v){const n=m.useRef(null);return m.useImperativeHandle(v,()=>n.current),at(n,b,E),ft(()=>{const a=n.current;if(!a)return;const w=(g,R)=>{const N=a.getAttribute(g);if(R==null){N!=null&&a.removeAttribute(g);return}N!==R&&a.setAttribute(g,R)},h=(g,R)=>{R?a.hasAttribute(g)||a.setAttribute(g,""):a.hasAttribute(g)&&a.removeAttribute(g)};w("value",e??null),w("min",t??null),w("max",i??null),w("locale",r??null),w("label",l??null),w("description",d??null),w("data-error",c??null),w("name",s??null),h("required",o),h("disabled",p),h("readonly",u)},[e,t,i,r,l,d,c,s,o,p,u]),y.default.createElement("ui-date-field",{ref:n,...A},L)}),mt=y.default.forwardRef(function({value:e,min:t,max:i,locale:r,label:l,description:d,error:c,name:s,required:o,disabled:p,readOnly:u,format:b,seconds:E,onChange:L,onValueChange:A,children:v,...n},a){const w=m.useRef(null);return m.useImperativeHandle(a,()=>w.current),at(w,L,A),ft(()=>{const h=w.current;if(!h)return;const g=(N,S)=>{const I=h.getAttribute(N);if(S==null){I!=null&&h.removeAttribute(N);return}I!==S&&h.setAttribute(N,S)},R=(N,S)=>{S?h.hasAttribute(N)||h.setAttribute(N,""):h.hasAttribute(N)&&h.removeAttribute(N)};g("value",e??null),g("min",t??null),g("max",i??null),g("locale",r??null),g("label",l??null),g("description",d??null),g("data-error",c??null),g("name",s??null),g("format",b&&b!=="24h"?b:null),R("seconds",E),R("required",o),R("disabled",p),R("readonly",u)},[e,t,i,r,l,d,c,s,o,p,u,b,E]),y.default.createElement("ui-time-field",{ref:w,...n},v)});dt.displayName="DateField";mt.displayName="TimeField";const ki=typeof window<"u"?m.useLayoutEffect:m.useEffect,bt=y.default.forwardRef(function({value:e,min:t,max:i,step:r,precision:l,locale:d,format:c,placeholder:s,label:o,description:p,error:u,name:b,required:E,disabled:L,readOnly:A,allowWheel:v,showSteppers:n,clampOnBlur:a,autoComplete:w,inputMode:h,invalid:g,prefix:R,suffix:N,incrementTrigger:S,decrementTrigger:I,children:B,onValueChange:T,onInvalidValue:D,...$},M){const J=m.useRef(null);return m.useImperativeHandle(M,()=>J.current),m.useEffect(()=>{const P=J.current;if(!P)return;const F=x=>{const H=x.detail;H&&(T==null||T(H))},j=x=>{const H=x.detail;H!=null&&H.reason&&(D==null||D(H.reason))};return P.addEventListener("value-change",F),P.addEventListener("invalid",j),()=>{P.removeEventListener("value-change",F),P.removeEventListener("invalid",j)}},[D,T]),ki(()=>{const P=J.current;if(!P)return;const F=(x,H)=>{const k=P.getAttribute(x);if(H==null){k!=null&&P.removeAttribute(x);return}k!==H&&P.setAttribute(x,H)},j=(x,H)=>{H?P.hasAttribute(x)||P.setAttribute(x,""):P.hasAttribute(x)&&P.removeAttribute(x)};F("value",e!=null&&e!==""?String(e):null),F("min",t!=null?String(t):null),F("max",i!=null?String(i):null),F("step",r!=null?String(r):null),F("precision",l!=null?String(l):null),F("locale",d??null),F("format",c&&c!=="grouped"?c:null),F("placeholder",s??null),F("label",o??null),F("description",p??null),F("data-error",u??null),F("name",b??null),F("autocomplete",w??null),F("inputmode",h??null),j("required",E),j("disabled",L),j("readonly",A),j("allow-wheel",v),j("show-steppers",n),j("clamp-on-blur",a),j("invalid",g)},[w,v,a,p,L,u,c,h,g,o,d,i,t,b,s,l,A,E,n,r,e]),y.default.createElement("ui-number-field",{ref:J,...$},R!=null?y.default.createElement("span",{slot:"prefix"},R):null,N!=null?y.default.createElement("span",{slot:"suffix"},N):null,I!=null?y.default.createElement("span",{slot:"decrement-trigger"},I):null,S!=null?y.default.createElement("span",{slot:"increment-trigger"},S):null,B)});bt.displayName="NumberField";const Ti=typeof window<"u"?m.useLayoutEffect:m.useEffect,vt=y.default.forwardRef(function({options:e,value:t,placeholder:i,label:r,description:l,error:d,name:c,required:s,disabled:o,readOnly:p,loading:u,loadingText:b,clearable:E,maxSelections:L,renderLimit:A,selectionIndicator:v,optionBorder:n,variant:a,tone:w,density:h,shape:g,radius:R,optionRadius:N,elevation:S,size:I,onChange:B,onValueChange:T,children:D,...$},M){const J=m.useRef(null);return m.useImperativeHandle(M,()=>J.current),m.useEffect(()=>{const P=J.current;if(!P)return;const F=j=>{const x=j.detail;x&&(B==null||B(x),T==null||T(x.value))};return P.addEventListener("change",F),()=>{P.removeEventListener("change",F)}},[B,T]),Ti(()=>{const P=J.current;if(!P)return;const F=(x,H)=>{const k=P.getAttribute(x);if(H==null){k!=null&&P.removeAttribute(x);return}k!==H&&P.setAttribute(x,H)},j=(x,H)=>{H?P.hasAttribute(x)||P.setAttribute(x,""):P.hasAttribute(x)&&P.removeAttribute(x)};F("options",JSON.stringify(e||[])),F("value",t!=null&&t.length?JSON.stringify(t):null),F("placeholder",i??null),F("label",r??null),F("description",l??null),F("data-error",d??null),F("name",c??null),F("max-selections",typeof L=="number"?String(L):null),F("render-limit",typeof A=="number"?String(A):null),F("loading-text",b??null),F("selection-indicator",v??null),j("option-border",n),F("variant",a&&a!=="default"?a:null),F("tone",w&&w!=="default"?w:null),F("density",h&&h!=="default"?h:null),F("shape",g&&g!=="default"?g:null),F("radius",R!=null?String(R):null),F("option-radius",N!=null?String(N):null),F("elevation",S&&S!=="low"?S:null),F("size",I&&I!=="md"&&I!=="2"?I:null),j("required",s),j("disabled",o),j("readonly",p),j("loading",u),j("clearable",E)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I]),y.default.createElement("ui-multi-select",{ref:J,...$},D)});vt.displayName="MultiSelect";const Di=typeof window<"u"?m.useLayoutEffect:m.useEffect,At=y.default.forwardRef(function({children:e,label:t,menuLabel:i,menuHeading:r,menuDescription:l,variant:d,density:c,menuDensity:s,menuShape:o,disabled:p,items:u,onPrimaryAction:b,onSelect:E,...L},A){const v=m.useRef(null);m.useImperativeHandle(A,()=>v.current),m.useEffect(()=>{const a=v.current;if(!a)return;const w=()=>b==null?void 0:b(),h=g=>E==null?void 0:E(g.detail);return a.addEventListener("primary-action",w),a.addEventListener("select",h),()=>{a.removeEventListener("primary-action",w),a.removeEventListener("select",h)}},[b,E]),Di(()=>{const a=v.current;a&&(t?a.setAttribute("label",t):a.removeAttribute("label"),i?a.setAttribute("menu-label",i):a.removeAttribute("menu-label"),r?a.setAttribute("menu-heading",r):a.removeAttribute("menu-heading"),l?a.setAttribute("menu-description",l):a.removeAttribute("menu-description"),d&&d!=="primary"?a.setAttribute("variant",d):a.removeAttribute("variant"),c&&c!=="default"?a.setAttribute("density",c):a.removeAttribute("density"),s&&s!=="default"?a.setAttribute("menu-density",s):a.removeAttribute("menu-density"),o&&o!=="default"?a.setAttribute("menu-shape",o):a.removeAttribute("menu-shape"),p?a.setAttribute("disabled",""):a.removeAttribute("disabled"))},[t,i,r,l,d,c,s,o,p]);const n=(u==null?void 0:u.map(a=>y.default.createElement("button",{key:a.value,slot:"menuitem",type:"button","data-value":a.value,"data-label":a.label,"data-tone":a.tone||"default",disabled:a.disabled},y.default.createElement("span",{"data-menu-text":"true"},y.default.createElement("span",{"data-menu-label":"true"},a.label),a.description?y.default.createElement("span",{"data-menu-description":"true"},a.description):null),a.shortcut?y.default.createElement("span",{"data-menu-shortcut":"true"},a.shortcut):null)))||null;return y.default.createElement("ui-split-button",{ref:v,...L},n,e)});At.displayName="SplitButton";const Fi=typeof window<"u"?m.useLayoutEffect:m.useEffect,pt=y.default.forwardRef(function({options:e,value:t,label:i,description:r,error:l,name:d,disabled:c,onChange:s,onValueChange:o,children:p,...u},b){const E=m.useRef(null);return m.useImperativeHandle(b,()=>E.current),m.useEffect(()=>{const L=E.current;if(!L)return;const A=v=>{const n=v.detail;s==null||s(n),o==null||o(n.value)};return L.addEventListener("change",A),()=>L.removeEventListener("change",A)},[s,o]),Fi(()=>{const L=E.current;if(!L)return;const A=(v,n)=>{n==null?L.removeAttribute(v):L.setAttribute(v,n)};A("options",JSON.stringify(e||[])),A("value",t!=null&&t.length?JSON.stringify(t):null),A("label",i??null),A("description",r??null),A("error",l??null),A("name",d??null),c?L.setAttribute("disabled",""):L.removeAttribute("disabled")},[e,t,i,r,l,d,c]),y.default.createElement("ui-transfer-list",{ref:E,...u},p)});pt.displayName="TransferList";const $i=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=y.default.forwardRef(function({value:e,placeholder:t,editing:i,multiline:r,disabled:l,readOnly:d,name:c,onChange:s,onValueChange:o,onSave:p,onCancel:u,children:b,...E},L){const A=m.useRef(null);return m.useImperativeHandle(L,()=>A.current),m.useEffect(()=>{const v=A.current;if(!v)return;const n=h=>{const g=h.detail;s==null||s(g),o==null||o(g.value)},a=h=>p==null?void 0:p(h.detail),w=h=>u==null?void 0:u(h.detail.value);return v.addEventListener("change",n),v.addEventListener("save",a),v.addEventListener("cancel",w),()=>{v.removeEventListener("change",n),v.removeEventListener("save",a),v.removeEventListener("cancel",w)}},[s,o,p,u]),$i(()=>{const v=A.current;if(!v)return;const n=(a,w)=>{w==null?v.removeAttribute(a):v.setAttribute(a,w)};n("value",e??null),n("placeholder",t??null),n("name",c??null),i?v.setAttribute("editing",""):v.removeAttribute("editing"),r?v.setAttribute("multiline",""):v.removeAttribute("multiline"),l?v.setAttribute("disabled",""):v.removeAttribute("disabled"),d?v.setAttribute("readonly",""):v.removeAttribute("readonly")},[e,t,c,i,r,l,d]),y.default.createElement("ui-inline-edit",{ref:A,...E},b)});Et.displayName="InlineEdit";const xi=typeof window<"u"?m.useLayoutEffect:m.useEffect,yt=y.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,format:l,step:d,seconds:c,stepSeconds:s,min:o,max:p,disabled:u,readOnly:b,required:E,name:L,clearable:A,allowInput:v,mode:n,label:a,hint:w,error:h,locale:g,translations:R,variant:N,onInput:S,onChange:I,onValueChange:B,onOpen:T,onClose:D,onInvalid:$,children:M,...J},P){const F=m.useRef(null);return m.useImperativeHandle(P,()=>F.current),m.useEffect(()=>{const j=F.current;if(!j)return;const x=q=>{const _=q.detail;_&&(S==null||S(_))},H=q=>{const _=q.detail;_&&(I==null||I(_),B==null||B(_.value))},k=q=>{const _=q.detail;_&&($==null||$(_))};return j.addEventListener("input",x),j.addEventListener("change",H),j.addEventListener("open",T),j.addEventListener("close",D),j.addEventListener("invalid",k),()=>{j.removeEventListener("input",x),j.removeEventListener("change",H),j.removeEventListener("open",T),j.removeEventListener("close",D),j.removeEventListener("invalid",k)}},[S,I,B,T,D,$]),xi(()=>{const j=F.current;if(!j)return;const x=(k,q)=>{const _=j.getAttribute(k);q==null?_!=null&&j.removeAttribute(k):_!==q&&j.setAttribute(k,q)},H=(k,q)=>{q?x(k,""):x(k,null)};x("value",e??null),x("default-value",t??null),typeof i=="boolean"?H("open",i):x("open",null),H("default-open",r),x("format",l&&l!=="24h"?l:null),x("step",typeof d=="number"?String(d):null),H("seconds",c),x("step-seconds",typeof s=="number"?String(s):null),x("min",o??null),x("max",p??null),H("disabled",u),H("readonly",b),H("required",E),x("name",L??null),H("clearable",A),H("allow-input",v),x("mode",n&&n!=="popover"?n:null),x("label",a??null),x("hint",w??null),x("error",h??null),x("locale",g??null),x("translations",ne.serializeTranslations(R)),x("variant",N&&N!=="default"?N:null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N]),y.default.createElement("ui-time-picker",{ref:F,...J},M)});yt.displayName="TimePicker";const Mi=typeof window<"u"?m.useLayoutEffect:m.useEffect,Lt=y.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:o,size:p,bare:u,variant:b,step:E,format:L,disabled:A,readOnly:v,required:n,name:a,closeOnSelect:w,clearable:h,allowInput:g,mode:R,showFooter:N,label:S,hint:I,error:B,onInput:T,onChange:D,onValueChange:$,onOpen:M,onClose:J,onInvalid:P,children:F,...j},x){const H=m.useRef(null);return m.useImperativeHandle(x,()=>H.current),m.useEffect(()=>{const k=H.current;if(!k)return;const q=U=>{const G=U.detail;G&&(T==null||T(G))},_=U=>{const G=U.detail;G&&(D==null||D(G),$==null||$(G.value))},W=U=>{const G=U.detail;G&&(P==null||P(G))};return k.addEventListener("input",q),k.addEventListener("change",_),k.addEventListener("open",M),k.addEventListener("close",J),k.addEventListener("invalid",W),()=>{k.removeEventListener("input",q),k.removeEventListener("change",_),k.removeEventListener("open",M),k.removeEventListener("close",J),k.removeEventListener("invalid",W)}},[T,D,$,M,J,P]),Mi(()=>{const k=H.current;if(!k)return;const q=(W,U)=>{const G=k.getAttribute(W);U==null?G!=null&&k.removeAttribute(W):G!==U&&k.setAttribute(W,U)},_=(W,U)=>{U?q(W,""):q(W,null)};q("value",e??null),q("default-value",t??null),typeof i=="boolean"?_("open",i):q("open",null),_("default-open",r),q("min",l??null),q("max",d??null),q("locale",c??null),q("translations",ne.serializeTranslations(s)),q("week-start",typeof o=="number"?String(o):null),q("size",p&&p!=="md"?p:null),_("bare",u),q("variant",b&&b!=="default"?b:null),q("step",typeof E=="number"?String(E):null),q("format",L&&L!=="24h"?L:null),_("disabled",A),_("readonly",v),_("required",n),q("name",a??null),_("close-on-select",w),_("clearable",h),_("allow-input",g),q("mode",R&&R!=="popover"?R:null),q("show-footer",typeof N=="boolean"?String(N):null),q("label",S??null),q("hint",I??null),q("error",B??null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I,B]),y.default.createElement("ui-date-time-picker",{ref:H,...j},F)});Lt.displayName="DateTimePicker";const qi=typeof window<"u"?m.useLayoutEffect:m.useEffect,gt=y.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:o,size:p,bare:u,variant:b,step:E,autoNormalize:L,allowPartial:A,disabled:v,readOnly:n,required:a,name:w,closeOnSelect:h,clearable:g,mode:R,showFooter:N,label:S,hint:I,error:B,onInput:T,onChange:D,onValueChange:$,onOpen:M,onClose:J,onInvalid:P,children:F,...j},x){const H=m.useRef(null);return m.useImperativeHandle(x,()=>H.current),m.useEffect(()=>{const k=H.current;if(!k)return;const q=U=>{const G=U.detail;G&&(T==null||T(G))},_=U=>{const G=U.detail;G&&(D==null||D(G),$==null||$(G.value?JSON.stringify(G.value):null))},W=U=>{const G=U.detail;G&&(P==null||P(G))};return k.addEventListener("input",q),k.addEventListener("change",_),k.addEventListener("open",M),k.addEventListener("close",J),k.addEventListener("invalid",W),()=>{k.removeEventListener("input",q),k.removeEventListener("change",_),k.removeEventListener("open",M),k.removeEventListener("close",J),k.removeEventListener("invalid",W)}},[T,D,$,M,J,P]),qi(()=>{const k=H.current;if(!k)return;const q=(W,U)=>{const G=k.getAttribute(W);U==null?G!=null&&k.removeAttribute(W):G!==U&&k.setAttribute(W,U)},_=(W,U)=>{U?q(W,""):q(W,null)};q("value",e??null),q("default-value",t??null),typeof i=="boolean"?_("open",i):q("open",null),_("default-open",r),q("min",l??null),q("max",d??null),q("locale",c??null),q("translations",ne.serializeTranslations(s)),q("week-start",typeof o=="number"?String(o):null),q("size",p&&p!=="md"?p:null),_("bare",u),q("variant",b&&b!=="default"?b:null),q("step",typeof E=="number"?String(E):null),_("auto-normalize",L),_("allow-partial",A),_("disabled",v),_("readonly",n),_("required",a),q("name",w??null),_("close-on-select",h),_("clearable",g),q("mode",R&&R!=="popover"?R:null),q("show-footer",typeof N=="boolean"?String(N):null),q("label",S??null),q("hint",I??null),q("error",B??null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I,B]),y.default.createElement("ui-date-range-time-picker",{ref:H,...j},F)});gt.displayName="DateRangeTimePicker";const Bi=typeof window<"u"?m.useLayoutEffect:m.useEffect,wt=y.default.forwardRef(function({tasks:e,variant:t,headless:i,children:r,...l},d){const c=m.useRef(null);return m.useImperativeHandle(d,()=>c.current),Bi(()=>{const s=c.current;if(!s)return;const o=(u,b)=>{const E=s.getAttribute(u);if(b==null){E!=null&&s.removeAttribute(u);return}E!==b&&s.setAttribute(u,b)},p=(u,b)=>{b?o(u,""):o(u,null)};if(e&&e.length)try{o("tasks",JSON.stringify(e))}catch{o("tasks",null)}else o("tasks",null);o("variant",t&&t!=="default"?t:null),p("headless",i)},[e,t,i]),y.default.createElement("ui-gantt",{ref:c,...l},r)});wt.displayName="Gantt";const ji=typeof window<"u"?m.useLayoutEffect:m.useEffect,ht=y.default.forwardRef(function({steps:e,value:t,orientation:i,variant:r,size:l,clickable:d,linear:c,headless:s,onChange:o,onSelect:p,children:u,...b},E){const L=m.useRef(null);return m.useImperativeHandle(E,()=>L.current),m.useEffect(()=>{const A=L.current;if(!A)return;const v=a=>{const w=a.detail;w&&(o==null||o(w))},n=a=>{const w=a.detail;w&&(p==null||p(w))};return A.addEventListener("change",v),A.addEventListener("select",n),()=>{A.removeEventListener("change",v),A.removeEventListener("select",n)}},[o,p]),ji(()=>{const A=L.current;if(!A)return;const v=(a,w)=>{const h=A.getAttribute(a);if(w==null){h!=null&&A.removeAttribute(a);return}h!==w&&A.setAttribute(a,w)},n=(a,w)=>{w?v(a,""):v(a,null)};if(e&&e.length)try{v("steps",JSON.stringify(e))}catch{v("steps",null)}else v("steps",null);v("value",t||null),v("orientation",i&&i!=="horizontal"?i:null),v("variant",r&&r!=="default"?r:null),v("size",l&&l!=="md"?l:null),n("clickable",d),n("linear",c),n("headless",s)},[e,t,i,r,l,d,c,s]),y.default.createElement("ui-stepper",{ref:L,...b},u)});ht.displayName="Stepper";const Gi=typeof window<"u"?m.useLayoutEffect:m.useEffect,Re=y.default.createContext(null);function He(f){const{selected:e,orientation:t,activation:i,variant:r,size:l,radius:d,elevation:c,tone:s,loop:o,collapsible:p,headless:u,onChange:b,onSelect:E,children:L,...A}=f,v=m.useRef(null);return m.useEffect(()=>{const n=v.current;if(!n)return;const a=w=>{const h=w.detail;h&&(b==null||b(h),E==null||E(h.selected))};return n.addEventListener("change",a),()=>n.removeEventListener("change",a)},[b,E]),Gi(()=>{const n=v.current;n&&(typeof e=="number"?n.setAttribute("selected",String(e)):n.removeAttribute("selected"),t?n.setAttribute("orientation",t):n.removeAttribute("orientation"),i?n.setAttribute("activation",i):n.removeAttribute("activation"),r&&r!=="surface"?n.setAttribute("variant",r):n.removeAttribute("variant"),l&&l!=="md"&&l!=="2"?n.setAttribute("size",l):n.removeAttribute("size"),d==null||d===""||d==="default"?n.removeAttribute("radius"):n.setAttribute("radius",String(d)),c&&c!=="low"?n.setAttribute("elevation",c):n.removeAttribute("elevation"),s&&s!=="default"?n.setAttribute("tone",s):n.removeAttribute("tone"),typeof o=="boolean"?n.setAttribute("loop",String(o)):n.removeAttribute("loop"),p?n.setAttribute("collapsible",""):n.removeAttribute("collapsible"),u?n.setAttribute("headless",""):n.removeAttribute("headless"))},[e,t,i,r,l,d,c,s,o,p,u]),y.default.createElement("ui-navigation-menu",{ref:v,...A},L)}function Nt({children:f}){return y.default.createElement(y.default.Fragment,null,f)}function Rt({children:f}){const e=m.useRef(`ui-nav-item-${Math.random().toString(36).slice(2,10)}`),[t,i]=m.useState(!1);return y.default.createElement(Re.Provider,{value:{itemKey:e.current,hasContent:t,setHasContent:i}},f)}function St({children:f,...e}){const t=y.default.useContext(Re),i=m.useRef(null),[r,l]=m.useState(!1);return m.useEffect(()=>{const d=i.current;if(!d)return;const c=()=>{l(d.getAttribute("aria-expanded")==="true")};c();const s=new MutationObserver(c);return s.observe(d,{attributes:!0,attributeFilter:["aria-expanded"]}),()=>s.disconnect()},[]),y.default.createElement("button",{type:"button",ref:i,slot:"item","data-nav-key":(t==null?void 0:t.itemKey)??void 0,...e},f,t!=null&&t.hasContent?y.default.createElement("span",{"aria-hidden":"true",style:{marginLeft:6,display:"inline-flex",alignItems:"center",lineHeight:1}},y.default.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms cubic-bezier(0.2, 0.9, 0.24, 1)"}},y.default.createElement("path",{d:"M3 4.75L6 7.25L9 4.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):null)}function Ht({children:f,...e}){const t=y.default.useContext(Re);return y.default.createElement("a",{slot:"item","data-nav-key":(t==null?void 0:t.itemKey)??void 0,...e},f)}function It({children:f,...e}){const t=y.default.useContext(Re);return m.useEffect(()=>{if(t)return t.setHasContent(!0),()=>t.setHasContent(!1)},[t]),y.default.createElement("section",{slot:"panel","data-nav-panel-for":(t==null?void 0:t.itemKey)??void 0,...e},f)}function Pt(){return null}function kt(){return null}const Ji=Object.assign(He,{Root:He,List:Nt,Item:Rt,Trigger:St,Link:Ht,Content:It,Indicator:Pt,Viewport:kt}),_i=typeof window<"u"?y.default.useLayoutEffect:y.default.useEffect,Tt=y.default.forwardRef(function(e,t){const{open:i,title:r,description:l,closable:d,dismissible:c,closeOnOverlay:s,closeOnEsc:o,lockWhileLoading:p,roleType:u,size:b,state:E,initialFocus:L,submitText:A,cancelText:v,loadingText:n,dialogId:a,config:w,headless:h,onOpen:g,onClose:R,onRequestClose:N,onDialogOpen:S,onDialogSubmit:I,onDialogCancel:B,onDialogDismiss:T,onDialogClose:D,children:$,...M}=e,J=m.useRef(null);return y.default.useImperativeHandle(t,()=>J.current),m.useEffect(()=>{const P=J.current;if(!P)return;const F=()=>g==null?void 0:g(),j=()=>R==null?void 0:R(),x=U=>{const G=U.detail;G&&(N==null||N(G))},H=U=>S==null?void 0:S(U.detail),k=U=>I==null?void 0:I(U.detail),q=U=>B==null?void 0:B(U.detail),_=U=>T==null?void 0:T(U.detail),W=U=>D==null?void 0:D(U.detail);return P.addEventListener("open",F),P.addEventListener("close",j),P.addEventListener("request-close",x),P.addEventListener("ui-open",H),P.addEventListener("ui-submit",k),P.addEventListener("ui-cancel",q),P.addEventListener("ui-dismiss",_),P.addEventListener("ui-close",W),()=>{P.removeEventListener("open",F),P.removeEventListener("close",j),P.removeEventListener("request-close",x),P.removeEventListener("ui-open",H),P.removeEventListener("ui-submit",k),P.removeEventListener("ui-cancel",q),P.removeEventListener("ui-dismiss",_),P.removeEventListener("ui-close",W)}},[g,R,N,S,I,B,T,D]),_i(()=>{const P=J.current;if(!P)return;typeof i=="boolean"&&(i?P.setAttribute("open",""):P.removeAttribute("open")),r?P.setAttribute("title",r):P.removeAttribute("title"),l?P.setAttribute("description",l):P.removeAttribute("description");const F=typeof c=="boolean"?c:d;typeof F=="boolean"?(P.setAttribute("dismissible",String(F)),P.setAttribute("closable",String(F))):(P.removeAttribute("dismissible"),P.removeAttribute("closable")),typeof s=="boolean"?(P.setAttribute("close-on-overlay",String(s)),P.setAttribute("close-on-backdrop",String(s))):(P.removeAttribute("close-on-overlay"),P.removeAttribute("close-on-backdrop")),typeof o=="boolean"?P.setAttribute("close-on-esc",String(o)):P.removeAttribute("close-on-esc"),typeof p=="boolean"?P.setAttribute("lock-while-loading",String(p)):P.removeAttribute("lock-while-loading"),u?P.setAttribute("role",u):P.removeAttribute("role"),b&&b!=="md"&&b!=="2"?P.setAttribute("size",b):P.removeAttribute("size"),E&&E!=="idle"?P.setAttribute("state",E):P.removeAttribute("state"),L?P.setAttribute("initial-focus",L):P.removeAttribute("initial-focus"),A?P.setAttribute("submit-text",A):P.removeAttribute("submit-text"),v?P.setAttribute("cancel-text",v):P.removeAttribute("cancel-text"),n?P.setAttribute("loading-text",n):P.removeAttribute("loading-text"),a&&(P.dialogId=a),w&&(P.config=w),h?P.setAttribute("headless",""):P.removeAttribute("headless")},[i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h]),y.default.createElement("ui-dialog",{ref:J,...M},$)});Tt.displayName="Dialog";const Dt=m.createContext(null),Ee="data-ui-dialog-react-host-refcount";function Ui({children:f,hostId:e="ui-dialog-react-host"}){const t=m.useRef(null);t.current||(t.current=se.createDialogManager()),m.useEffect(()=>{var c;if(typeof document>"u")return;let r=document.getElementById(e);const l=!r;r||(r=document.createElement("div"),r.id=e,r.setAttribute("data-ui-dialog-react-host","true"),document.body.appendChild(r));const d=Number(r.getAttribute(Ee)||"0");return r.setAttribute(Ee,String(Math.max(0,d)+1)),(c=t.current)==null||c.setContainer(r),()=>{var p,u;if((p=t.current)==null||p.destroy("unmount"),t.current=null,!r||!r.isConnected)return;const s=Number(r.getAttribute(Ee)||"1"),o=Math.max(0,s-1);o===0?(r.removeAttribute(Ee),l&&((u=r.parentElement)==null||u.removeChild(r))):r.setAttribute(Ee,String(o))}},[e]);const i=m.useMemo(()=>({open:(r={})=>{var l;return((l=t.current)==null?void 0:l.open(r))??Promise.resolve({id:"",action:"dismiss"})},confirm:(r={})=>{var l;return((l=t.current)==null?void 0:l.confirm(r))??Promise.resolve({id:"",action:"dismiss"})}}),[]);return y.default.createElement(Dt.Provider,{value:i},f)}function Qi(){const f=m.useContext(Dt);if(!f)throw new Error("useDialog must be used within <DialogProvider>.");return f}const Wi=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ft=y.default.forwardRef(function({children:e,name:t,iconVariant:i,size:r,color:l,secondaryColor:d,variant:c,tone:s,shape:o,spin:p,pulse:u,badge:b,label:E,decorative:L,strokeWidth:A,absoluteStrokeWidth:v,strokeLinecap:n,strokeLinejoin:a,rotate:w,flip:h,rtl:g,...R},N){const S=m.useRef(null);return m.useImperativeHandle(N,()=>S.current),Wi(()=>{const I=S.current;I&&(t?I.setAttribute("name",t):I.removeAttribute("name"),i?I.setAttribute("icon-variant",i):I.removeAttribute("icon-variant"),r!=null&&r!==""?I.setAttribute("size",String(r)):I.removeAttribute("size"),l?I.setAttribute("color",l):I.removeAttribute("color"),d?I.setAttribute("secondary-color",d):I.removeAttribute("secondary-color"),c&&c!=="default"?I.setAttribute("variant",c):I.removeAttribute("variant"),s&&s!=="default"?I.setAttribute("tone",s):I.removeAttribute("tone"),o&&o!=="default"?I.setAttribute("shape",o):I.removeAttribute("shape"),p?I.setAttribute("spin",""):I.removeAttribute("spin"),u?I.setAttribute("pulse",""):I.removeAttribute("pulse"),b?I.setAttribute("badge",""):I.removeAttribute("badge"),E?I.setAttribute("label",E):I.removeAttribute("label"),L?I.setAttribute("decorative",""):I.removeAttribute("decorative"),A!=null&&A!==""?I.setAttribute("stroke-width",String(A)):I.removeAttribute("stroke-width"),v?I.setAttribute("absolute-stroke-width",""):I.removeAttribute("absolute-stroke-width"),n?I.setAttribute("stroke-linecap",n):I.removeAttribute("stroke-linecap"),a?I.setAttribute("stroke-linejoin",a):I.removeAttribute("stroke-linejoin"),w!=null&&Number.isFinite(w)?I.setAttribute("rotate",String(w)):I.removeAttribute("rotate"),h?I.setAttribute("flip",h):I.removeAttribute("flip"),g?I.setAttribute("rtl",""):I.removeAttribute("rtl"))},[t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g]),y.default.createElement("ui-icon",{ref:S,...R},e)});Ft.displayName="Icon";function be(f){if(!f)return{};const e={...f};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}function Xi(f,e={}){return te.toastAdvanced.show({message:f,level:"info",...be(e)})}const $e={show(f,e={}){return te.toastAdvanced.show({message:f,...be(e)})},success(f,e={}){return te.toastAdvanced.success(f,be(e))},error(f,e={}){return te.toastAdvanced.error(f,be(e))},warning(f,e={}){return te.toastAdvanced.warning(f,be(e))},info(f,e={}){return te.toastAdvanced.info(f,be(e))},loading(f,e={}){return te.toastAdvanced.loading(f,be(e))},dismiss(f){return te.toastAdvanced.dismiss(String(f))},clear(){return te.toastAdvanced.clear()},configure(f){return te.toastAdvanced.configure(f)}},$t=m.createContext(null);function Yi({config:f}={}){return m.useEffect(()=>{f&&te.toastAdvanced.configure(f)},[f]),null}function zi({children:f,config:e}){m.useEffect(()=>{e&&te.toastAdvanced.configure(e)},[e]);const t=m.useMemo(()=>$e,[]);return y.default.createElement($t.Provider,{value:t},f)}function Ki(){const f=m.useContext($t);return f||$e}const Zi=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Oi(f){if(!f)return{};const e={...f};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}const xt=y.default.forwardRef(function({children:e,position:t,maxVisible:i,theme:r,config:l,headless:d,onShow:c,onHide:s,...o},p){const u=m.useRef(c),b=m.useRef(s);return m.useEffect(()=>{u.current=c},[c]),m.useEffect(()=>{b.current=s},[s]),m.useImperativeHandle(p,()=>({show(E,L){let A="";const v=Oi(L),n=v.onShow,a=v.onHide;return A=te.toastAdvanced.show({message:E,...v,onShow:()=>{var h;n==null||n(),(h=u.current)==null||h.call(u,{id:A,message:E})},onHide:()=>{var h;a==null||a(),(h=b.current)==null||h.call(b,{id:A})}}).id,A},hide(E){te.toastAdvanced.dismiss(String(E))},clear(){te.toastAdvanced.clear()},configure(E){te.toastAdvanced.configure(E)}}),[]),Zi(()=>{const E={...l||{}};t&&(E.position=t),r&&(E.theme=r),typeof i=="number"&&Number.isFinite(i)&&(E.maxVisible=Math.max(1,Math.trunc(i))),Object.keys(E).length>0&&te.toastAdvanced.configure(E)},[t,i,r,l]),e==null&&Object.keys(o).length===0?null:y.default.createElement("div",{...o},e)});xt.displayName="Toast";const Vi=typeof window<"u"?y.useLayoutEffect:y.useEffect,Mt=y.forwardRef(function({children:e,orientation:t,variant:i,tone:r,state:l,elevation:d,size:c,radius:s,density:o,wrap:p,loop:u,disabled:b,activeIndex:E,ariaLabel:L,onNavigate:A,...v},n){const a=y.useRef(null);return y.useImperativeHandle(n,()=>a.current),y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-block-controls","BlockControls")},[]),y.useEffect(()=>{const w=a.current;if(!w||!A)return;const h=g=>A(g.detail);return w.addEventListener("ui-navigate",h),()=>w.removeEventListener("ui-navigate",h)},[A]),Vi(()=>{const w=a.current;w&&(t?w.setAttribute("orientation",t):w.removeAttribute("orientation"),i&&i!=="surface"&&i!=="floating"?w.setAttribute("variant",i):w.removeAttribute("variant"),r&&r!=="neutral"?w.setAttribute("tone",r):w.removeAttribute("tone"),l&&l!=="idle"?w.setAttribute("state",l):w.removeAttribute("state"),d&&d!=="low"&&d!=="md"?w.setAttribute("elevation",d):w.removeAttribute("elevation"),c&&c!=="md"&&c!=="2"?w.setAttribute("size",c):w.removeAttribute("size"),s!=null?w.setAttribute("radius",String(s)):w.removeAttribute("radius"),o?w.setAttribute("density",o):w.removeAttribute("density"),p==null?w.removeAttribute("wrap"):p?w.setAttribute("wrap",""):w.removeAttribute("wrap"),u==null?(w.removeAttribute("loop"),w.removeAttribute("no-loop")):u?(w.setAttribute("loop",""),w.removeAttribute("no-loop")):(w.removeAttribute("loop"),w.setAttribute("no-loop","")),b==null?w.removeAttribute("disabled"):b?w.setAttribute("disabled",""):w.removeAttribute("disabled"),typeof E=="number"&&Number.isFinite(E)?w.setAttribute("active-index",String(E)):w.removeAttribute("active-index"),L?w.setAttribute("aria-label",L):w.removeAttribute("aria-label"))},[t,i,r,l,d,c,s,o,p,u,b,E,L]),y.createElement("ui-block-controls",{ref:a,...v},e)});Mt.displayName="BlockControls";function Ci(f){const{items:e,anchorId:t,anchorEl:i,anchorPoint:r,open:l,disabled:d,state:c,stateText:s,variant:o,size:p,radius:u,density:b,shape:E,elevation:L,tone:A,closeOnSelect:v,closeOnEscape:n,typeahead:a,children:w,onOpenDetail:h,onCloseDetail:g,onOpen:R,onClose:N,onChange:S,onSelect:I,...B}=f,T=m.useRef(null),D=m.useRef(""),[$,M]=m.useState(null),J=H=>{queueMicrotask(()=>{var k;M(((k=H.getPortalContentHost)==null?void 0:k.call(H))||null)}),requestAnimationFrame(()=>{var k;M(((k=H.getPortalContentHost)==null?void 0:k.call(H))||null)}),window.setTimeout(()=>{var k;M(((k=H.getPortalContentHost)==null?void 0:k.call(H))||null)},0)};m.useEffect(()=>{const H=T.current;if(!H)return;const k=U=>{var Q;const G=U.detail;M(((Q=H.getPortalContentHost)==null?void 0:Q.call(H))||null),R==null||R(),G&&(h==null||h(G))},q=U=>{const G=U.detail;M(null),N==null||N(),G&&(g==null||g(G))},_=U=>{var Q;const G=(Q=U.detail)==null?void 0:Q.open;typeof G=="boolean"&&(S==null||S(G))},W=U=>{const G=U.detail;I==null||I(G)};return H.addEventListener("open",k),H.addEventListener("close",q),H.addEventListener("change",_),H.addEventListener("select",W),()=>{H.removeEventListener("open",k),H.removeEventListener("close",q),H.removeEventListener("change",_),H.removeEventListener("select",W)}},[R,N,h,g,S,I]),m.useEffect(()=>{var k,q,_,W,U,G;const H=T.current;if(!(!H||l==null)){if(!l){D.current="closed",M(null),H.close?H.close():H.open=!1;return}if(r&&H.openAt){const Q=`point:${r.x}:${r.y}`;(D.current!==Q||!H.open)&&(H.openAt(r),D.current=Q),M(((k=H.getPortalContentHost)==null?void 0:k.call(H))||null),J(H);return}if(i){const Q="anchor:element";if(H.openForAnchor){(D.current!==Q||!H.open)&&(H.openForAnchor(i),D.current=Q),M(((q=H.getPortalContentHost)==null?void 0:q.call(H))||null),J(H);return}if(H.openFor){(D.current!==Q||!H.open)&&(H.openFor(i),D.current=Q),M(((_=H.getPortalContentHost)==null?void 0:_.call(H))||null),J(H);return}}if(t){const Q=`anchor:${t}`;if(H.openForAnchorId){(D.current!==Q||!H.open)&&(H.openForAnchorId(t),D.current=Q),M(((W=H.getPortalContentHost)==null?void 0:W.call(H))||null),J(H);return}if(H.showForAnchorId){(D.current!==Q||!H.open)&&(H.showForAnchorId(t),D.current=Q),M(((U=H.getPortalContentHost)==null?void 0:U.call(H))||null),J(H);return}}H.open||(H.open=!0),D.current="open",M(((G=H.getPortalContentHost)==null?void 0:G.call(H))||null),J(H)}},[l,t,i,r]),m.useEffect(()=>{var k;const H=T.current;!$||!H||!l||(k=H.refreshLayout)==null||k.call(H)},[w,e,l,$]);const P=H=>H?H.map((k,q)=>{if(k.separator)return y.default.createElement("div",{key:q,className:"separator",role:"separator"});let _=null;k.icon&&(_=y.default.createElement("span",{className:"icon"},k.icon));let W=null;return k.submenu&&(W=y.default.createElement("div",{className:"submenu"},P(k.submenu))),y.default.createElement("div",{key:q,className:"menuitem",role:"menuitem",tabIndex:k.disabled?-1:0,"aria-disabled":k.disabled?"true":void 0,"data-value":k.value,"data-tone":k.tone&&k.tone!=="default"?k.tone:void 0,onClick:k.disabled?void 0:k.onClick},_,y.default.createElement("span",{className:"label"},y.default.createElement("span",{className:"text"},k.label),k.description?y.default.createElement("span",{className:"caption"},k.description):null),k.shortcut?y.default.createElement("span",{className:"shortcut"},k.shortcut):null,k.submenu&&y.default.createElement("span",{className:"submenu-arrow"},"▶"),W)}):null,F=y.default.Children.count(w)>0,j=!!l&&!r&&!t,x=F?w:P(e);return y.default.createElement(y.default.Fragment,null,y.default.createElement("ui-context-menu",{ref:T,...B,...j?{open:""}:{},...o&&o!=="default"&&o!=="surface"?{variant:o}:{},...p&&p!=="md"&&p!=="2"?{size:p}:{},...u!=null&&u!==""&&u!=="md"?{radius:String(u)}:{},...!p&&b&&b!=="default"?{density:b}:{},...!u&&E&&E!=="default"?{shape:E}:{},...L&&L!=="default"?{elevation:L}:{},...A&&A!=="default"&&A!=="brand"?{tone:A}:{},...d?{disabled:""}:{},...c&&c!=="idle"?{state:c}:{},...s?{"state-text":s}:{},...v==null?{}:{"close-on-select":v?"true":"false"},...n==null?{}:{"close-on-escape":n?"true":"false"},...a==null?{}:{typeahead:a?"true":"false"}}),$?qr.createPortal(y.default.createElement("div",{slot:"menu"},x),$):null)}const en=typeof window<"u"?y.useLayoutEffect:y.useEffect,qt=y.forwardRef(function({children:e,open:t,position:i,size:r,title:l,description:d,headless:c,dismissible:s,onOpen:o,onClose:p,onOpenChange:u,...b},E){const L=y.useRef(null);return y.useImperativeHandle(E,()=>L.current),y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-plugin-panel","PluginPanel")},[]),y.useEffect(()=>{const A=L.current;if(!A)return;const v=()=>o==null?void 0:o(),n=()=>p==null?void 0:p(),a=w=>{const h=w.detail;h&&(u==null||u(h))};return A.addEventListener("open",v),A.addEventListener("close",n),A.addEventListener("open-change",a),()=>{A.removeEventListener("open",v),A.removeEventListener("close",n),A.removeEventListener("open-change",a)}},[p,o,u]),en(()=>{const A=L.current;if(!A)return;const v=(n,a,w=!0)=>{if(!w)return;const h=A.getAttribute(n);if(a==null){h!=null&&A.removeAttribute(n);return}h!==a&&A.setAttribute(n,a)};typeof t=="boolean"&&v("open",t?"":null),v("position",i??null,i!==void 0),v("size",r&&r!=="md"?r:null,r!==void 0),v("title",l??null,l!==void 0),v("description",d??null,d!==void 0),typeof c=="boolean"&&v("headless",c?"":null),typeof s=="boolean"&&v("dismissible",s?"":null)},[t,i,r,l,d,c,s]),y.createElement("ui-plugin-panel",{ref:L,...b},e)});qt.displayName="PluginPanel";function tn(){const f=m.useRef(null),e=m.useCallback(async()=>{const c=f.current;return c?await c.submit():!1},[]),t=m.useCallback(async()=>{const c=f.current;return c?await c.validate():{valid:!0,errors:{}}},[]),i=m.useCallback(()=>{var s;const c=f.current;return c?(s=c.getValues)==null?void 0:s.call(c):{}},[]),r=m.useCallback(c=>{var o;const s=f.current;return(o=s==null?void 0:s.reset)==null?void 0:o.call(s,c)},[]),l=m.useCallback(()=>{var s;const c=f.current;return c?typeof c.isDirty=="function"?!!c.isDirty():((s=c.hasAttribute)==null?void 0:s.call(c,"dirty"))||!1:!1},[]),d=m.useCallback(c=>{var o;const s=f.current;return(o=s==null?void 0:s.markClean)==null?void 0:o.call(s,c)},[]);return{ref:f,submit:e,validate:t,getValues:i,reset:r,isDirty:l,markClean:d}}function Me(f,e){if(f){if(typeof f=="function"){f(e);return}f.current=e}}function rn(f){const{placement:e="bottom",offset:t=8,open:i,onOpen:r,onClose:l,role:d="menu"}=f||{},c=m.useRef(null),s=m.useRef(null),o=m.useRef(null),p=m.useRef(`floating-${Math.random().toString(36).slice(2,9)}`),[u,b]=m.useState({top:0,left:0,placement:e}),E=typeof i<"u",[L,A]=m.useState(!!i),v=E?!!i:L,n=m.useCallback(()=>{const P=c.current,F=s.current;if(!P||!F)return;const j=se.computePosition(P,F,{placement:e,offset:t});b({top:Math.round(j.top),left:Math.round(j.left),placement:j.placement,arrow:j.x||j.y?{x:j.x,y:j.y}:void 0})},[e,t]),a=m.useCallback(P=>{E||A(P),P?r==null||r():l==null||l()},[E,r,l]),w=m.useCallback(()=>a(!v),[v,a]),h=m.useCallback(()=>a(!0),[a]),g=m.useCallback(()=>a(!1),[a]);m.useEffect(()=>{if(!v)return;const P=c.current,F=s.current;if(!P||!F)return;n();const j=()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>n())},x=()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>n())};window.addEventListener("scroll",j,!0),window.addEventListener("resize",x);let H=null,k=null;try{typeof ResizeObserver<"u"&&(H=new ResizeObserver(x),k=new ResizeObserver(x),H.observe(P),k.observe(F))}catch{H=k=null}return()=>{window.removeEventListener("scroll",j,!0),window.removeEventListener("resize",x),H==null||H.disconnect(),k==null||k.disconnect(),o.current&&cancelAnimationFrame(o.current),o.current=null}},[v,n]);const R=m.useCallback(P=>{c.current=P},[]),N=m.useCallback(P=>{s.current=P},[]),S=()=>s.current?Array.from(s.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')).filter(Boolean):[],I=P=>{const F=S();if(!F.length)return;const j=Math.max(0,Math.min(F.length-1,P));try{F[j].focus()}catch{}},B=()=>I(0),T=()=>{const P=S();P.length&&I(P.length-1)},D=()=>{const P=S(),F=P.findIndex(j=>j===document.activeElement);I(F<0?0:(F+1)%P.length)},$=()=>{const P=S(),F=P.findIndex(j=>j===document.activeElement);I(F<=0?P.length-1:F-1)};return{referenceRef:R,floatingRef:N,coords:u,update:n,open:v,setOpen:a,toggle:w,openPopup:h,closePopup:g,getReferenceProps:(P={})=>{const{onClick:F,onKeyDown:j,ref:x,...H}=P;return{...H,ref:k=>{R(k),Me(x,k)},"aria-haspopup":d,"aria-controls":p.current,"aria-expanded":v?"true":"false",onClick:k=>{F==null||F(k),!k.defaultPrevented&&w()},onKeyDown:k=>{j==null||j(k),!k.defaultPrevented&&k.key==="ArrowDown"&&(k.preventDefault(),h(),setTimeout(()=>B(),0))}}},getFloatingProps:(P={})=>{const{onKeyDown:F,style:j,ref:x,...H}=P;return{...H,id:p.current,ref:k=>{N(k),Me(x,k)},role:d,tabIndex:-1,style:{...j||{},position:"absolute",top:`${u.top}px`,left:`${u.left}px`},hidden:!v,onKeyDown:k=>{F==null||F(k),!k.defaultPrevented&&(k.key==="Escape"?(k.preventDefault(),g()):k.key==="ArrowDown"?(k.preventDefault(),D()):k.key==="ArrowUp"?(k.preventDefault(),$()):k.key==="Home"?(k.preventDefault(),B()):k.key==="End"&&(k.preventDefault(),T()))}}},focusFirstItem:B,focusLastItem:T,focusNext:D,focusPrev:$}}function Y(f){if(f!=null){if(typeof f=="object")try{return JSON.stringify(f)}catch{return}return String(f)}}function nn(f){const{children:e,className:t,variant:i,tone:r,state:l,elevation:d,radius:c,interactive:s,disabled:o,headless:p,p:u,px:b,py:E,pt:L,pr:A,pb:v,pl:n,m:a,mx:w,my:h,mt:g,mr:R,mb:N,ml:S,width:I,w:B,minWidth:T,minW:D,maxWidth:$,maxW:M,height:J,h:P,minHeight:F,minH:j,maxHeight:x,maxH:H,display:k,position:q,inset:_,top:W,right:U,bottom:G,left:Q,justify:z,alignSelf:X,alignContent:K,gap:Z,rowGap:ee,columnGap:O,flexBasis:V,flexGrow:oe,flexShrink:ce,gridArea:fe,gridColumn:ae,gridColumnStart:de,gridColumnEnd:re,gridRow:C,gridRowStart:vr,gridRowEnd:Ar,align:pr,bg:Er,color:yr,opacity:Lr,overflow:gr,overflowX:wr,overflowY:hr,zIndex:Nr,...Rr}=f,Sr={className:t,...Rr,p:Y(u),px:Y(b),py:Y(E),pt:Y(L),pr:Y(A),pb:Y(v),pl:Y(n),m:Y(a),mx:Y(w),my:Y(h),mt:Y(g),mr:Y(R),mb:Y(N),ml:Y(S),width:Y(I),w:Y(B),minwidth:Y(T??D),maxwidth:Y($??M),height:Y(J),h:Y(P),minheight:Y(F??j),maxheight:Y(x??H),display:Y(k),position:Y(q),inset:Y(_),top:Y(W),right:Y(U),bottom:Y(G),left:Y(Q),justify:Y(z),flexbasis:Y(V),flexgrow:Y(oe),flexshrink:Y(ce),alignself:Y(X),aligncontent:Y(K),gap:Y(Z),rowgap:Y(ee),columngap:Y(O),gridarea:Y(fe),gridcolumn:Y(ae),gridcolumnstart:Y(de),gridcolumnend:Y(re),gridrow:Y(C),gridrowstart:Y(vr),gridrowend:Y(Ar),align:Y(pr),bg:Y(Er),color:Y(yr),opacity:Y(Lr),overflow:Y(gr),overflowx:Y(wr),overflowy:Y(hr),zindex:Y(Nr),variant:i&&i!=="default"?i:void 0,tone:r&&r!=="default"?r:void 0,state:l&&l!=="idle"?l:void 0,elevation:d&&d!=="default"?d:void 0,radius:c&&c!=="default"?c:void 0,interactive:s?"":void 0,disabled:o?"":void 0,headless:p?"":void 0};return y.default.createElement("ui-box",Sr,e)}function le(f){if(f!=null){if(typeof f=="object")try{return JSON.stringify(f)}catch{return}return String(f)}}function un(f){const{children:e,className:t,direction:i,align:r,justify:l,wrap:d,gap:c,rowGap:s,columnGap:o,display:p,headless:u,...b}=f,E={className:t,...b,direction:le(i),align:le(r),justify:le(l),wrap:le(d),gap:le(c),rowgap:le(s),columngap:le(o),display:le(p),headless:u?"":void 0};return y.default.createElement("ui-flex",E,e)}function ie(f){if(f!=null){if(typeof f=="object")try{return JSON.stringify(f)}catch{return}return String(f)}}function ln(f){const{children:e,className:t,columns:i,rows:r,gap:l,rowGap:d,columnGap:c,autoFlow:s,autoRows:o,autoColumns:p,align:u,justify:b,place:E,alignContent:L,justifyContent:A,placeContent:v,display:n,headless:a,...w}=f,h={className:t,...w,columns:ie(i),rows:ie(r),gap:ie(l),rowgap:ie(d),columngap:ie(c),autoflow:ie(s),autorows:ie(o),autocolumns:ie(p),align:ie(u),justify:ie(b),place:ie(E),aligncontent:ie(L),justifycontent:ie(A),placecontent:ie(v),display:ie(n),headless:a?"":void 0};return y.default.createElement("ui-grid",h,e)}const sn=typeof window<"u"?m.useLayoutEffect:m.useEffect,Bt=y.default.forwardRef(function({size:e="medium",variant:t="default",tone:i="neutral",radius:r="md",density:l="comfortable",inset:d,children:c,...s},o){const p=m.useRef(null);return y.default.useImperativeHandle(o,()=>p.current),sn(()=>{const u=p.current;if(!u)return;const b=(L,A)=>{const v=u.getAttribute(L);if(A==null){v!=null&&u.removeAttribute(L);return}v!==A&&u.setAttribute(L,A)},E=(L,A)=>{A?u.hasAttribute(L)||u.setAttribute(L,""):u.hasAttribute(L)&&u.removeAttribute(L)};b("size",e!=="medium"?e:null),b("variant",t!=="default"?t:null),b("tone",i!=="neutral"?i:null),b("radius",r!=="md"?r:null),b("density",l!=="comfortable"?l:null),E("inset",d)},[e,t,i,r,l,d]),y.default.createElement("ui-section",{ref:p,...s},c)});Bt.displayName="Section";function on(f){const{children:e,size:t="md",...i}=f;return y.default.createElement("ui-container",{size:t,...i},e)}const xe=typeof window<"u"?m.useLayoutEffect:m.useEffect,jt=y.default.forwardRef(function({orientation:e,storageKey:t,autoSave:i,children:r,onLayoutChange:l,onResizeStart:d,onResize:c,onResizeEnd:s,...o},p){const u=m.useRef(null);return m.useImperativeHandle(p,()=>u.current),m.useEffect(()=>{const b=u.current;if(!b)return;const E=n=>l==null?void 0:l(n.detail),L=n=>d==null?void 0:d(n.detail),A=n=>c==null?void 0:c(n.detail),v=n=>s==null?void 0:s(n.detail);return b.addEventListener("layout-change",E),b.addEventListener("resize-start",L),b.addEventListener("resize",A),b.addEventListener("resize-end",v),()=>{b.removeEventListener("layout-change",E),b.removeEventListener("resize-start",L),b.removeEventListener("resize",A),b.removeEventListener("resize-end",v)}},[l,c,s,d]),xe(()=>{const b=u.current;b&&(e&&e!=="horizontal"?b.setAttribute("orientation",e):b.removeAttribute("orientation"),t?b.setAttribute("storage-key",t):b.removeAttribute("storage-key"),i?b.setAttribute("auto-save",""):b.removeAttribute("auto-save"))},[e,t,i]),y.default.createElement("ui-panel-group",{ref:u,...o},r)}),Gt=y.default.forwardRef(function({size:e,minSize:t,maxSize:i,collapsedSize:r,collapsed:l,children:d,...c},s){const o=m.useRef(null);return m.useImperativeHandle(s,()=>o.current),xe(()=>{const p=o.current;if(!p)return;const u=(b,E)=>{const L=p.getAttribute(b);if(E==null){L!=null&&p.removeAttribute(b);return}L!==E&&p.setAttribute(b,E)};l?p.setAttribute("collapsed",""):p.removeAttribute("collapsed"),u("size",e!=null?String(e):null),u("min-size",t!=null?String(t):null),u("max-size",i!=null?String(i):null),u("collapsed-size",r!=null?String(r):null)},[l,r,i,t,e]),y.default.createElement("ui-panel",{ref:o,...c},d)}),Jt=y.default.forwardRef(function({disabled:e,orientation:t,ariaLabel:i,children:r,...l},d){const c=m.useRef(null);return m.useImperativeHandle(d,()=>c.current),xe(()=>{const s=c.current;s&&(e?s.setAttribute("disabled",""):s.removeAttribute("disabled"),t?s.setAttribute("orientation",t):s.removeAttribute("orientation"),i?s.setAttribute("aria-label",i):s.removeAttribute("aria-label"))},[i,e,t]),y.default.createElement("ui-splitter",{ref:c,...l},r)});jt.displayName="PanelGroup";Gt.displayName="Panel";Jt.displayName="Splitter";const _t=m.createContext(null),cn=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Ae(f,e){var t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R,N,S,I,B,T,D,$,M,J,P,F,j,x,H,k,q,_,W,U,G,Q,z,X,K,Z,ee,O,V,oe,ce,fe,ae,de;return e?{...f,...e,colors:{...f.colors,...e.colors||{}},palette:{...f.palette||{},...e.palette||{},gray:{...((t=f.palette)==null?void 0:t.gray)||{},...((i=e.palette)==null?void 0:i.gray)||{}},grayAlpha:{...((r=f.palette)==null?void 0:r.grayAlpha)||{},...((l=e.palette)==null?void 0:l.grayAlpha)||{}},blackAlpha:{...((d=f.palette)==null?void 0:d.blackAlpha)||{},...((c=e.palette)==null?void 0:c.blackAlpha)||{}},whiteAlpha:{...((s=f.palette)==null?void 0:s.whiteAlpha)||{},...((o=e.palette)==null?void 0:o.whiteAlpha)||{}},accent:{...((p=f.palette)==null?void 0:p.accent)||{},...((u=e.palette)==null?void 0:u.accent)||{}},accentAlpha:{...((b=f.palette)==null?void 0:b.accentAlpha)||{},...((E=e.palette)==null?void 0:E.accentAlpha)||{}}},surfaces:{...f.surfaces||{},...e.surfaces||{}},shadows:{...f.shadows||{},...e.shadows||{}},spacing:{...f.spacing||{},...e.spacing||{}},spaceScale:{...f.spaceScale||{},...e.spaceScale||{}},radiusScale:{...f.radiusScale||{},...e.radiusScale||{}},typography:{...f.typography||{},...e.typography||{},size:{...((L=f.typography)==null?void 0:L.size)||{},...((A=e.typography)==null?void 0:A.size)||{}},fontScale:{...((v=f.typography)==null?void 0:v.fontScale)||{},...((n=e.typography)==null?void 0:n.fontScale)||{}},lineHeight:{...((a=f.typography)==null?void 0:a.lineHeight)||{},...((w=e.typography)==null?void 0:w.lineHeight)||{}},letterSpacing:{...((h=f.typography)==null?void 0:h.letterSpacing)||{},...((g=e.typography)==null?void 0:g.letterSpacing)||{}}},motion:{...f.motion||{},...e.motion||{}},effects:{...f.effects||{},...e.effects||{}},components:{...f.components||{},...e.components||{},button:{...((R=f.components)==null?void 0:R.button)||{},...((N=e.components)==null?void 0:N.button)||{}},badge:{...((S=f.components)==null?void 0:S.badge)||{},...((I=e.components)==null?void 0:I.badge)||{}},sidebar:{...((B=f.components)==null?void 0:B.sidebar)||{},...((T=e.components)==null?void 0:T.sidebar)||{}},blockControls:{...((D=f.components)==null?void 0:D.blockControls)||{},...(($=e.components)==null?void 0:$.blockControls)||{}},box:{...((M=f.components)==null?void 0:M.box)||{},...((J=e.components)==null?void 0:J.box)||{}},breadcrumb:{...((P=f.components)==null?void 0:P.breadcrumb)||{},...((F=e.components)==null?void 0:F.breadcrumb)||{}},card:{...((j=f.components)==null?void 0:j.card)||{},...((x=e.components)==null?void 0:x.card)||{}},contextMenu:{...((H=f.components)==null?void 0:H.contextMenu)||{},...((k=e.components)==null?void 0:k.contextMenu)||{}},alert:{...((q=f.components)==null?void 0:q.alert)||{},...((_=e.components)==null?void 0:_.alert)||{}},alertDialog:{...((W=f.components)==null?void 0:W.alertDialog)||{},...((U=e.components)==null?void 0:U.alertDialog)||{}},appHeader:{...((G=f.components)==null?void 0:G.appHeader)||{},...((Q=e.components)==null?void 0:Q.appHeader)||{}},aspectRatio:{...((z=f.components)==null?void 0:z.aspectRatio)||{},...((X=e.components)==null?void 0:X.aspectRatio)||{}},avatar:{...((K=f.components)==null?void 0:K.avatar)||{},...((Z=e.components)==null?void 0:Z.avatar)||{}},menu:{...((ee=f.components)==null?void 0:ee.menu)||{},...((O=e.components)==null?void 0:O.menu)||{}},multiSelect:{...((V=f.components)==null?void 0:V.multiSelect)||{},...((oe=e.components)==null?void 0:oe.multiSelect)||{}},panel:{...((ce=f.components)==null?void 0:ce.panel)||{},...((fe=e.components)==null?void 0:fe.panel)||{}},input:{...((ae=f.components)==null?void 0:ae.input)||{},...((de=e.components)==null?void 0:de.input)||{}}},zIndex:{...f.zIndex||{},...e.zIndex||{}},breakpoints:{...f.breakpoints||{},...e.breakpoints||{}}}:f}function fn(){try{const f=getComputedStyle(document.documentElement),e=f.getPropertyValue("--ui-color-primary").trim();return e?{colors:{primary:e||void 0,text:f.getPropertyValue("--ui-color-text").trim()||void 0,background:f.getPropertyValue("--ui-color-background").trim()||void 0}}:{}}catch{return{}}}function an(f,e){const t=typeof e=="function"?e(f):e;return Ae(f,t)}function dn({tokens:f,children:e,storageKey:t="editora.theme.tokens"}){const i=m.useRef(null),r=()=>{if(typeof window<"u"&&t)try{const s=localStorage.getItem(t);if(s){const o=JSON.parse(s);return Ae(se.defaultTokens,o)}}catch{}if(f&&Object.keys(f).length)return Ae(se.defaultTokens,f);if(typeof window<"u"){const s=fn();if(s.colors&&s.colors.primary)return Ae(se.defaultTokens,s)}return Ae(se.defaultTokens,f||{})},[l,d]=m.useState(()=>r());m.useEffect(()=>{!f||!Object.keys(f).length||d(s=>Ae(s,f))},[f]),cn(()=>{const s=i.current;s&&se.applyTheme(l,s)},[l]),m.useEffect(()=>{if(typeof window>"u"||!t)return;const s=JSON.stringify(l);let o;const p=()=>{try{localStorage.setItem(t,s)}catch{}};return window.requestIdleCallback?o=window.requestIdleCallback(p,{timeout:1e3}):o=window.setTimeout(p,250),()=>{try{window.cancelIdleCallback&&o?window.cancelIdleCallback(o):o&&clearTimeout(o)}catch{}}},[l,t]);const c=m.useMemo(()=>({tokens:l,setTokens:s=>{d(o=>an(o,s))}}),[l]);return y.default.createElement(_t.Provider,{value:c},y.default.createElement("div",{ref:i,style:{display:"contents"}},e))}function mn(){const f=m.useContext(_t);if(!f)throw new Error("useTheme must be used within ThemeProvider");return f}const bn=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ut=y.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,itemRole:r,container:l,items:d,onCollectionChange:c,...s},o){const p=m.useRef(null);return m.useImperativeHandle(o,()=>p.current),m.useEffect(()=>{const u=p.current;if(!u)return;const b=()=>c==null?void 0:c();return u.addEventListener("collection-change",b),()=>{u.removeEventListener("collection-change",b)}},[c]),bn(()=>{const u=p.current;u&&(t?u.setAttribute("item-selector",t):u.removeAttribute("item-selector"),i?u.setAttribute("direct-item-selector",i):u.removeAttribute("direct-item-selector"),r?u.setAttribute("item-role",r):u.removeAttribute("item-role"),u.container=l??null,u.items=d??null)},[l,i,r,t,d]),y.default.createElement("ui-collection",{ref:p,...s},e)});Ut.displayName="Collection";const vn=typeof window<"u"?m.useLayoutEffect:m.useEffect,Qt=y.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,itemRole:r,activeAttribute:l,container:d,items:c,onCollectionChange:s,...o},p){const u=m.useRef(null);return m.useImperativeHandle(p,()=>u.current),m.useEffect(()=>{const b=u.current;if(!b)return;const E=()=>s==null?void 0:s();return b.addEventListener("collection-change",E),()=>{b.removeEventListener("collection-change",E)}},[s]),vn(()=>{const b=u.current;b&&(t?b.setAttribute("item-selector",t):b.removeAttribute("item-selector"),i?b.setAttribute("direct-item-selector",i):b.removeAttribute("direct-item-selector"),r?b.setAttribute("item-role",r):b.removeAttribute("item-role"),l?b.setAttribute("active-attribute",l):b.removeAttribute("active-attribute"),b.container=d??null,b.items=c??null)},[l,d,i,r,t,c]),y.default.createElement("ui-listbox",{ref:u,...o},e)});Qt.displayName="Listbox";const An=typeof window<"u"?m.useLayoutEffect:m.useEffect,Wt=y.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,activeAttribute:r,loop:l,container:d,onActiveItemChange:c,...s},o){const p=m.useRef(null);return m.useImperativeHandle(o,()=>p.current),m.useEffect(()=>{const u=p.current;if(!u)return;const b=E=>{const L=E.detail;L&&(c==null||c(L))};return u.addEventListener("active-item-change",b),()=>{u.removeEventListener("active-item-change",b)}},[c]),An(()=>{const u=p.current;u&&(t?u.setAttribute("item-selector",t):u.removeAttribute("item-selector"),i?u.setAttribute("direct-item-selector",i):u.removeAttribute("direct-item-selector"),r===null?u.setAttribute("active-attribute",""):r?u.setAttribute("active-attribute",r):u.removeAttribute("active-attribute"),l===!1?u.setAttribute("loop","false"):u.removeAttribute("loop"),u.container=d??null)},[r,d,i,t,l]),y.default.createElement("ui-roving-focus-group",{ref:p,...s},e)});Wt.displayName="RovingFocusGroup";const pn=typeof window<"u"?m.useLayoutEffect:m.useEffect,Xt=y.default.forwardRef(function({children:e,open:t,modal:i,closeOnEscape:r,closeOnPointerOutside:l,closeOnFocusOutside:d,disableOutsidePointerEvents:c,headless:s,onBeforeClose:o,onClose:p,onInteractOutside:u,onEscapeKeyDown:b,...E},L){const A=m.useRef(null);return m.useImperativeHandle(L,()=>A.current),m.useEffect(()=>{const v=A.current;if(!v)return;const n=g=>o==null?void 0:o(g.detail),a=g=>p==null?void 0:p(g.detail),w=g=>u==null?void 0:u(g.detail||{}),h=g=>b==null?void 0:b(g.detail||{});return v.addEventListener("before-close",n),v.addEventListener("close",a),v.addEventListener("interact-outside",w),v.addEventListener("escape-key-down",h),()=>{v.removeEventListener("before-close",n),v.removeEventListener("close",a),v.removeEventListener("interact-outside",w),v.removeEventListener("escape-key-down",h)}},[o,p,b,u]),pn(()=>{const v=A.current;v&&(t?v.setAttribute("open",""):v.removeAttribute("open"),i?v.setAttribute("modal",""):v.removeAttribute("modal"),r===!1?v.setAttribute("close-on-escape","false"):r?v.setAttribute("close-on-escape",""):v.removeAttribute("close-on-escape"),l===!1?v.setAttribute("close-on-pointer-outside","false"):l?v.setAttribute("close-on-pointer-outside",""):v.removeAttribute("close-on-pointer-outside"),d?v.setAttribute("close-on-focus-outside",""):v.removeAttribute("close-on-focus-outside"),c?v.setAttribute("disable-outside-pointer-events",""):v.removeAttribute("disable-outside-pointer-events"),s?v.setAttribute("headless",""):v.removeAttribute("headless"))},[r,d,l,c,s,i,t]),y.default.createElement("ui-dismissable-layer",{ref:A,...E},e)});Xt.displayName="DismissableLayer";const En=typeof window<"u"?m.useLayoutEffect:m.useEffect,Yt=y.default.forwardRef(function({children:e,active:t,trapped:i,loop:r,restoreFocus:l,autoFocus:d,inertOthers:c,headless:s,onEscape:o,onFocusScopeMount:p,...u},b){const E=m.useRef(null);return m.useImperativeHandle(b,()=>E.current),m.useEffect(()=>{const L=E.current;if(!L)return;const A=n=>o==null?void 0:o(n.detail||{}),v=()=>p==null?void 0:p();return L.addEventListener("escape",A),L.addEventListener("focus-scope-mount",v),()=>{L.removeEventListener("escape",A),L.removeEventListener("focus-scope-mount",v)}},[o,p]),En(()=>{const L=E.current;L&&(t?L.setAttribute("active",""):L.removeAttribute("active"),i===!1?L.setAttribute("trapped","false"):i?L.setAttribute("trapped",""):L.removeAttribute("trapped"),r===!1?L.setAttribute("loop","false"):r?L.setAttribute("loop",""):L.removeAttribute("loop"),l===!1?L.setAttribute("restore-focus","false"):l?L.setAttribute("restore-focus",""):L.removeAttribute("restore-focus"),d?L.setAttribute("auto-focus",d):L.removeAttribute("auto-focus"),c?L.setAttribute("inert-others",""):L.removeAttribute("inert-others"),s?L.setAttribute("headless",""):L.removeAttribute("headless"))},[t,d,s,c,r,l,i]),y.default.createElement("ui-focus-scope",{ref:E,...u},e)});Yt.displayName="FocusScope";const yn=typeof window<"u"?m.useLayoutEffect:m.useEffect,zt=y.default.forwardRef(function({children:e,open:t,placement:i,strategy:r,offset:l,crossOffset:d,flip:c,shift:s,matchWidth:o,fitViewport:p,anchor:u,headless:b,onPositionChange:E,...L},A){const v=m.useRef(null);return m.useImperativeHandle(A,()=>v.current),m.useEffect(()=>{const n=v.current;if(!n)return;const a=w=>E==null?void 0:E(w.detail);return n.addEventListener("position-change",a),()=>{n.removeEventListener("position-change",a)}},[E]),yn(()=>{const n=v.current;n&&(t?n.setAttribute("open",""):n.removeAttribute("open"),i?n.setAttribute("placement",i):n.removeAttribute("placement"),r&&r!=="fixed"?n.setAttribute("strategy",r):n.removeAttribute("strategy"),l!=null?n.setAttribute("offset",String(l)):n.removeAttribute("offset"),d!=null?n.setAttribute("cross-offset",String(d)):n.removeAttribute("cross-offset"),c===!1?n.setAttribute("flip","false"):c?n.setAttribute("flip",""):n.removeAttribute("flip"),s===!1?n.setAttribute("shift","false"):s?n.setAttribute("shift",""):n.removeAttribute("shift"),o?n.setAttribute("match-width",""):n.removeAttribute("match-width"),p?n.setAttribute("fit-viewport",""):n.removeAttribute("fit-viewport"),u?n.setAttribute("anchor",u):n.removeAttribute("anchor"),b?n.setAttribute("headless",""):n.removeAttribute("headless"))},[u,d,p,c,b,o,l,t,i,s,r]),y.default.createElement("ui-positioner",{ref:v,...L},e)});zt.displayName="Positioner";const Kt=y.default.forwardRef(function({children:e,...t},i){const r=m.useRef(null);return m.useImperativeHandle(i,()=>r.current),y.default.createElement("ui-anchor",{ref:r,...t},e)});Kt.displayName="Anchor";function ve(f,e,t){if(t==null){f.removeAttribute(e);return}t?f.setAttribute(e,""):f.removeAttribute(e)}function qe(f,e,t,i){const r=t&&t!==i?t:void 0;if(!r){f.removeAttribute(e);return}f.setAttribute(e,r)}const Zt=y.forwardRef(function({checked:e,disabled:t,indeterminate:i,loading:r,headless:l,invalid:d,density:c,preset:s,onCheckedChange:o,onChange:p,onInput:u,children:b,...E},L){const A=y.useRef(null);y.useImperativeHandle(L,()=>A.current);const v=typeof window<"u"?y.useLayoutEffect:y.useEffect;y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-checkbox","Checkbox")},[]),v(()=>{const a=A.current;a&&(ve(a,"checked",e),ve(a,"disabled",t),ve(a,"indeterminate",i),ve(a,"loading",r),ve(a,"headless",l),ve(a,"invalid",d),qe(a,"density",c,"default"),qe(a,"preset",s,"default"))},[e,t,i,r,l,d,c,s]),y.useEffect(()=>{const a=A.current;if(!a||!o&&!p&&!u)return;const w=g=>{var N;const R=g;u==null||u(R),typeof((N=R.detail)==null?void 0:N.checked)=="boolean"&&(o==null||o(R.detail.checked,R.detail))},h=g=>{const R=g;p==null||p(R)};return a.addEventListener("input",w),a.addEventListener("change",h),()=>{a.removeEventListener("input",w),a.removeEventListener("change",h)}},[o,p,u]);const n={ref:A,...E,checked:e?"":void 0,disabled:t?"":void 0,indeterminate:i?"":void 0,loading:r?"":void 0,headless:l?"":void 0,invalid:d?"":void 0,density:c&&c!=="default"?c:void 0,preset:s&&s!=="default"?s:void 0};return y.createElement("ui-checkbox",n,b)});Zt.displayName="Checkbox";const Ln=typeof window<"u"?m.useLayoutEffect:m.useEffect,Ot=y.default.forwardRef(function({value:e,disabled:t,required:i,name:r,orientation:l,variant:d,size:c,tone:s,options:o,onValueChange:p,children:u,...b},E){const L=m.useRef(null);return y.default.useImperativeHandle(E,()=>L.current),m.useEffect(()=>{const A=L.current;if(!A)return;const v=n=>{const a=n.detail;a&&(p==null||p(a))};return A.addEventListener("change",v),()=>A.removeEventListener("change",v)},[p]),Ln(()=>{const A=L.current;if(!A)return;const v=(a,w)=>{const h=A.getAttribute(a);if(w==null){h!=null&&A.removeAttribute(a);return}h!==w&&A.setAttribute(a,w)},n=(a,w)=>{w?A.hasAttribute(a)||A.setAttribute(a,""):A.hasAttribute(a)&&A.removeAttribute(a)};v("value",e??null),n("disabled",t),n("required",i),v("name",r||null),v("orientation",l&&l!=="vertical"?l:null),v("variant",d&&d!=="default"?d:null),v("size",c&&c!=="md"?c:null),v("tone",s&&s!=="brand"?s:null),o&&o.length?v("options",JSON.stringify(o)):v("options",null)},[e,t,i,r,l,d,c,s,o]),y.default.createElement("ui-radio-group",{ref:L,...b},u)});Ot.displayName="RadioGroup";const gn=typeof window<"u"?y.useLayoutEffect:y.useEffect;function wn(f){if(f!=null){if(typeof f=="string")return f;if(!(!Number.isFinite(f)||f<=0))return Math.abs(f-16/9)<.01?"16/9":Math.abs(f-4/3)<.01?"4/3":Math.abs(f-1)<.01?"1/1":`${f}/1`}}const Vt=y.forwardRef(function({ratio:e,fit:t,tone:i,variant:r,size:l,radius:d,elevation:c,interactive:s,showRatioBadge:o,headless:p,children:u,...b},E){const L=y.useRef(null);return y.useImperativeHandle(E,()=>L.current),y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-aspect-ratio","AspectRatio")},[]),gn(()=>{const A=L.current;if(!A)return;const v=wn(e);v?A.setAttribute("ratio",v):A.removeAttribute("ratio"),t?A.setAttribute("fit",t):A.removeAttribute("fit"),i&&i!=="neutral"?A.setAttribute("tone",i):A.removeAttribute("tone"),r&&r!=="surface"?A.setAttribute("variant",r):A.removeAttribute("variant"),l&&l!=="md"?A.setAttribute("size",l):A.removeAttribute("size"),d!=null?A.setAttribute("radius",String(d)):A.removeAttribute("radius"),c&&c!=="none"?A.setAttribute("elevation",c):A.removeAttribute("elevation"),s?A.setAttribute("interactive",""):A.removeAttribute("interactive"),o?A.setAttribute("show-ratio-badge",""):A.removeAttribute("show-ratio-badge"),p?A.setAttribute("headless",""):A.removeAttribute("headless")},[e,t,i,r,l,d,c,s,o,p]),y.createElement("ui-aspect-ratio",{ref:L,...b},u)});Vt.displayName="AspectRatio";const hn=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Be(f){const e=f.trim().split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,2).toUpperCase():`${e[0][0]||""}${e[1][0]||""}`.toUpperCase()}function Nn(f){if(f!=null)return f==="lazy"||f==="eager"?f:f?"eager":"lazy"}function Rn(f,e,t){return f&&f.trim()?f.trim().slice(0,2).toUpperCase():e&&e.trim()?Be(e):typeof t=="string"&&t.trim()?Be(t):"?"}const Ct=y.forwardRef(function({src:e,alt:t,initials:i,size:r,bg:l,color:d,radius:c,fontWeight:s,shape:o,tone:p,variant:u,elevation:b,status:E,state:L,badge:A,ring:v,interactive:n,disabled:a,loading:w,onAvatarLoad:h,onAvatarError:g,children:R,...N},S){const I=y.useRef(null),B=y.useMemo(()=>Rn(i,t,R),[i,t,R]);return y.useImperativeHandle(S,()=>I.current),y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-avatar","Avatar")},[]),y.useEffect(()=>{const T=I.current;if(!T||!h&&!g)return;const D=M=>h==null?void 0:h(M.detail),$=M=>g==null?void 0:g(M.detail);return T.addEventListener("avatar-load",D),T.addEventListener("avatar-error",$),()=>{T.removeEventListener("avatar-load",D),T.removeEventListener("avatar-error",$)}},[h,g]),hn(()=>{const T=I.current;if(!T)return;e?T.setAttribute("src",e):T.removeAttribute("src"),t?T.setAttribute("alt",t):T.removeAttribute("alt"),i?T.setAttribute("initials",i):T.removeAttribute("initials"),r!=null?T.setAttribute("size",String(r)):T.removeAttribute("size"),l?T.setAttribute("bg",l):T.removeAttribute("bg"),d?T.setAttribute("color",d):T.removeAttribute("color"),c!=null?T.setAttribute("radius",String(c)):T.removeAttribute("radius"),s!=null?T.setAttribute("fontweight",String(s)):T.removeAttribute("fontweight"),o?T.setAttribute("shape",o):T.removeAttribute("shape"),p&&p!=="neutral"?T.setAttribute("tone",p):T.removeAttribute("tone"),u&&u!=="surface"?T.setAttribute("variant",u):T.removeAttribute("variant"),b&&b!=="low"?T.setAttribute("elevation",b):T.removeAttribute("elevation"),E?T.setAttribute("status",E):T.removeAttribute("status"),L&&L!=="idle"?T.setAttribute("state",L):T.removeAttribute("state"),A?T.setAttribute("badge",A):T.removeAttribute("badge"),v==null?T.removeAttribute("ring"):v?T.setAttribute("ring",""):T.removeAttribute("ring"),n==null?T.removeAttribute("interactive"):n?T.setAttribute("interactive",""):T.removeAttribute("interactive"),a==null?T.removeAttribute("disabled"):a?T.setAttribute("disabled",""):T.removeAttribute("disabled");const D=Nn(w);D?T.setAttribute("loading",D):T.removeAttribute("loading")},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w]),y.createElement("ui-avatar",{ref:I,...N},B)});Ct.displayName="Avatar";const Sn=typeof window<"u"?m.useLayoutEffect:m.useEffect,er=y.default.forwardRef(function({present:e,headless:t,mode:i,size:r,variant:l,keepMounted:d,lazy:c,enterDuration:s,exitDuration:o,delay:p,onBeforeEnter:u,onEnter:b,onAfterEnter:E,onBeforeExit:L,onExit:A,onAfterExit:v,children:n,...a},w){const h=m.useRef(null);return y.default.useImperativeHandle(w,()=>h.current),m.useEffect(()=>{const g=h.current;if(!g)return;const R=$=>{const M=$.detail;return(M==null?void 0:M.state)||"hidden"},N=$=>u==null?void 0:u(R($)),S=$=>b==null?void 0:b(R($)),I=$=>E==null?void 0:E(R($)),B=$=>L==null?void 0:L(R($)),T=$=>A==null?void 0:A(R($)),D=$=>v==null?void 0:v(R($));return g.addEventListener("before-enter",N),g.addEventListener("enter",S),g.addEventListener("after-enter",I),g.addEventListener("before-exit",B),g.addEventListener("exit",T),g.addEventListener("after-exit",D),()=>{g.removeEventListener("before-enter",N),g.removeEventListener("enter",S),g.removeEventListener("after-enter",I),g.removeEventListener("before-exit",B),g.removeEventListener("exit",T),g.removeEventListener("after-exit",D)}},[u,b,E,L,A,v]),Sn(()=>{const g=h.current;g&&(e?g.setAttribute("present",""):g.removeAttribute("present"),t?g.setAttribute("headless",""):g.removeAttribute("headless"),i&&i!=="fade"?g.setAttribute("mode",i):g.removeAttribute("mode"),r&&r!=="md"?g.setAttribute("size",r):g.removeAttribute("size"),l&&l!=="default"?g.setAttribute("variant",l):g.removeAttribute("variant"),d?g.setAttribute("keep-mounted",""):g.removeAttribute("keep-mounted"),c?g.setAttribute("lazy",""):g.removeAttribute("lazy"),typeof s=="number"?g.setAttribute("enter-duration",String(s)):g.removeAttribute("enter-duration"),typeof o=="number"?g.setAttribute("exit-duration",String(o)):g.removeAttribute("exit-duration"),typeof p=="number"?g.setAttribute("delay",String(p)):g.removeAttribute("delay"))},[e,t,i,r,l,d,c,s,o,p]),y.default.createElement("ui-presence",{ref:h,...a},n)});er.displayName="Presence";const Hn=typeof window<"u"?m.useLayoutEffect:m.useEffect,tr=y.default.forwardRef(function({value:e,buffer:t,max:i,min:r,indeterminate:l,striped:d,animated:c,showLabel:s,label:o,format:p,precision:u,size:b,variant:E,tone:L,shape:A,mode:v,onValueChange:n,onComplete:a,children:w,...h},g){const R=m.useRef(null);return y.default.useImperativeHandle(g,()=>R.current),m.useEffect(()=>{const N=R.current;if(!N)return;const S=B=>{const T=B.detail;T&&(n==null||n(T))},I=B=>{const T=B.detail;T&&(a==null||a(T))};return N.addEventListener("change",S),N.addEventListener("complete",I),()=>{N.removeEventListener("change",S),N.removeEventListener("complete",I)}},[n,a]),Hn(()=>{const N=R.current;if(!N)return;const S=(B,T)=>{const D=N.getAttribute(B);if(T==null){D!=null&&N.removeAttribute(B);return}D!==T&&N.setAttribute(B,T)},I=(B,T)=>{T?N.hasAttribute(B)||N.setAttribute(B,""):N.hasAttribute(B)&&N.removeAttribute(B)};S("value",e!=null?String(e):null),S("buffer",t!=null?String(t):null),S("max",i!=null?String(i):null),S("min",r!=null?String(r):null),I("indeterminate",l),I("striped",d),I("animated",c),I("show-label",s),S("label",o!=null&&o!==""?o:null),S("format",p!=null&&p!=="percent"?p:null),S("precision",u!=null?String(u):null),S("size",b&&b!=="md"?b:null),S("variant",E&&E!=="default"?E:null),S("tone",L&&L!=="brand"?L:null),S("shape",A&&A!=="pill"?A:null),S("mode",v&&v!=="line"?v:null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A,v]),y.default.createElement("ui-progress",{ref:R,...h},w)});tr.displayName="Progress";const In=typeof window<"u"?m.useLayoutEffect:m.useEffect,rr=y.default.forwardRef(function({value:e,min:t,max:i,low:r,high:l,optimum:d,label:c,showLabel:s,format:o,precision:p,size:u,variant:b,tone:E,shape:L,mode:A,onValueChange:v,children:n,...a},w){const h=m.useRef(null);return y.default.useImperativeHandle(w,()=>h.current),m.useEffect(()=>{const g=h.current;if(!g)return;const R=N=>{const S=N.detail;S&&(v==null||v(S))};return g.addEventListener("change",R),()=>{g.removeEventListener("change",R)}},[v]),In(()=>{const g=h.current;if(!g)return;const R=(S,I)=>{const B=g.getAttribute(S);if(I==null){B!=null&&g.removeAttribute(S);return}B!==I&&g.setAttribute(S,I)},N=(S,I)=>{I?g.hasAttribute(S)||g.setAttribute(S,""):g.hasAttribute(S)&&g.removeAttribute(S)};R("value",e!=null?String(e):null),R("min",t!=null?String(t):null),R("max",i!=null?String(i):null),R("low",r!=null?String(r):null),R("high",l!=null?String(l):null),R("optimum",d!=null?String(d):null),R("label",c!=null&&c!==""?c:null),N("show-label",s),R("format",o!=null&&o!=="value"?o:null),R("precision",p!=null?String(p):null),R("size",u&&u!=="md"?u:null),R("variant",b&&b!=="default"?b:null),R("tone",E&&E!=="auto"?E:null),R("shape",L&&L!=="pill"?L:null),R("mode",A&&A!=="line"?A:null)},[e,t,i,r,l,d,c,s,o,p,u,b,E,L,A]),y.default.createElement("ui-meter",{ref:h,...a},n)});rr.displayName="Meter";const Pn=typeof window<"u"?m.useLayoutEffect:m.useEffect,ir=y.default.forwardRef(function({target:e,headless:t,disabled:i,strategy:r,onMount:l,onUnmount:d,onSync:c,onTargetMissing:s,children:o,...p},u){const b=m.useRef(null);return y.default.useImperativeHandle(u,()=>b.current),m.useEffect(()=>{const E=b.current;if(!E)return;const L=a=>l==null?void 0:l(a.detail||{count:0}),A=a=>d==null?void 0:d(a.detail||{count:0}),v=a=>c==null?void 0:c(a.detail||{count:0}),n=a=>{const w=a.detail;w&&(s==null||s(w))};return E.addEventListener("mount",L),E.addEventListener("unmount",A),E.addEventListener("sync",v),E.addEventListener("target-missing",n),()=>{E.removeEventListener("mount",L),E.removeEventListener("unmount",A),E.removeEventListener("sync",v),E.removeEventListener("target-missing",n)}},[l,d,c,s]),Pn(()=>{const E=b.current;E&&(e?E.setAttribute("target",e):E.removeAttribute("target"),r&&r!=="append"?E.setAttribute("strategy",r):E.removeAttribute("strategy"),t?E.setAttribute("headless",""):E.removeAttribute("headless"),i?E.setAttribute("disabled",""):E.removeAttribute("disabled"))},[e,r,t,i]),y.default.createElement("ui-portal",{ref:b,...p},o)});ir.displayName="Portal";const kn=typeof window<"u"?m.useLayoutEffect:m.useEffect,nr=y.default.forwardRef(function({orientation:e,size:t,variant:i,tone:r,autoHide:l,shadows:d,onScrollChange:c,onReachStart:s,onReachEnd:o,children:p,...u},b){const E=m.useRef(null);return y.default.useImperativeHandle(b,()=>E.current),m.useEffect(()=>{const L=E.current;if(!L)return;const A=a=>{const w=a.detail;w&&(c==null||c(w))},v=()=>s==null?void 0:s(),n=()=>o==null?void 0:o();return L.addEventListener("scroll",A),L.addEventListener("reach-start",v),L.addEventListener("reach-end",n),()=>{L.removeEventListener("scroll",A),L.removeEventListener("reach-start",v),L.removeEventListener("reach-end",n)}},[c,s,o]),kn(()=>{const L=E.current;if(!L)return;const A=(n,a)=>{const w=L.getAttribute(n);if(a==null){w!=null&&L.removeAttribute(n);return}w!==a&&L.setAttribute(n,a)},v=(n,a)=>{const w=L.getAttribute(n);if(a==null){w!=null&&L.removeAttribute(n);return}const h=a?"true":"false";w!==h&&L.setAttribute(n,h)};A("orientation",e&&e!=="vertical"?e:null),A("size",t&&t!=="md"?t:null),A("variant",i&&i!=="default"?i:null),A("tone",r&&r!=="neutral"?r:null),v("auto-hide",l),v("shadows",d)},[e,t,i,r,l,d]),y.default.createElement("ui-scroll-area",{ref:E,...u},p)});nr.displayName="ScrollArea";const ur=y.forwardRef((f,e)=>y.createElement("ui-separator",{ref:e,...f}));ur.displayName="Separator";const Tn=typeof window<"u"?m.useLayoutEffect:m.useEffect,lr=y.default.forwardRef(function({children:e,name:t,fallback:i,required:r,inline:l,align:d,size:c,variant:s,tone:o,headless:p,onSlotChange:u,onMissing:b,onResolved:E,...L},A){const v=m.useRef(null);return m.useImperativeHandle(A,()=>v.current),m.useEffect(()=>{const n=v.current;if(!n)return;const a=g=>{const R=g.detail;R&&(u==null||u(R))},w=()=>b==null?void 0:b(),h=()=>E==null?void 0:E();return n.addEventListener("slotchange",a),n.addEventListener("missing",w),n.addEventListener("resolved",h),()=>{n.removeEventListener("slotchange",a),n.removeEventListener("missing",w),n.removeEventListener("resolved",h)}},[u,b,E]),Tn(()=>{const n=v.current;if(!n)return;const a=(h,g)=>{const R=n.getAttribute(h);if(g==null){R!=null&&n.removeAttribute(h);return}R!==g&&n.setAttribute(h,g)},w=(h,g)=>{g?a(h,""):a(h,null)};a("name",t||null),a("fallback",i||null),w("required",r),typeof l=="boolean"?a("inline",l?"true":"false"):a("inline",null),a("align",d&&d!=="start"?d:null),a("size",c&&c!=="md"?c:null),a("variant",s&&s!=="plain"?s:null),a("tone",o&&o!=="brand"?o:null),w("headless",p)},[t,i,r,l,d,c,s,o,p]),y.default.createElement("ui-slot",{ref:v,...L},e)});lr.displayName="Slot";const Dn=typeof window<"u"?m.useLayoutEffect:m.useEffect,sr=y.default.forwardRef(function({children:e,orientation:t,variant:i,size:r,density:l,wrap:d,loop:c,headless:s,...o},p){const u=m.useRef(null);return m.useImperativeHandle(p,()=>u.current),Dn(()=>{const b=u.current;if(!b)return;const E=(A,v)=>{const n=b.getAttribute(A);if(v==null){n!=null&&b.removeAttribute(A);return}n!==v&&b.setAttribute(A,v)},L=(A,v)=>{v?E(A,""):E(A,null)};E("orientation",t&&t!=="horizontal"?t:null),E("variant",i&&i!=="default"?i:null),E("size",r&&r!=="md"?r:null),E("density",l&&l!=="default"?l:null),L("wrap",d),typeof c=="boolean"?L("loop",c):E("loop",null),L("headless",s)},[t,i,r,l,d,c,s]),y.default.createElement("ui-toolbar",{ref:u,...o},e)});sr.displayName="Toolbar";const or=y.forwardRef((f,e)=>y.createElement("ui-visually-hidden",{ref:e,...f}));or.displayName="VisuallyHidden";const Fn=typeof window<"u"?y.useLayoutEffect:y.useEffect,cr=y.forwardRef(function({page:e,count:t,size:i,variant:r,headless:l,ariaLabel:d,onPageChange:c,onChange:s,onFirst:o,onPrev:p,onNext:u,onLast:b,children:E,...L},A){const v=y.useRef(null);return y.useImperativeHandle(A,()=>v.current),y.useEffect(()=>{const n=v.current;if(!n)return;const a=N=>{const S=N.detail;S&&(c==null||c(S),s==null||s(S))},w=N=>{const S=N.detail;S&&(o==null||o(S))},h=N=>{const S=N.detail;S&&(p==null||p(S))},g=N=>{const S=N.detail;S&&(u==null||u(S))},R=N=>{const S=N.detail;S&&(b==null||b(S))};return n.addEventListener("change",a),n.addEventListener("first",w),n.addEventListener("prev",h),n.addEventListener("next",g),n.addEventListener("last",R),()=>{n.removeEventListener("change",a),n.removeEventListener("first",w),n.removeEventListener("prev",h),n.removeEventListener("next",g),n.removeEventListener("last",R)}},[c,s,o,p,u,b]),Fn(()=>{const n=v.current;if(!n)return;const a=(h,g)=>{const R=n.getAttribute(h);if(g==null){R!=null&&n.removeAttribute(h);return}R!==g&&n.setAttribute(h,g)},w=(h,g)=>{g?n.hasAttribute(h)||n.setAttribute(h,""):n.hasAttribute(h)&&n.removeAttribute(h)};a("page",typeof e=="number"&&Number.isFinite(e)?String(e):null),a("count",typeof t=="number"&&Number.isFinite(t)?String(t):null),a("size",i&&i!=="md"?i:null),a("variant",r&&r!=="default"?r:null),a("aria-label",d??null),w("headless",l)},[e,t,i,r,d,l]),y.createElement("ui-pagination",{ref:v,...L},E)});cr.displayName="Pagination";const $n=typeof window<"u"?y.useLayoutEffect:y.useEffect;function xn(f,e,t){if(t==null){f.removeAttribute(e);return}t?f.setAttribute(e,""):f.removeAttribute(e)}function me(f,e,t){const i=f.getAttribute(e);if(t==null||t===""){i!=null&&f.removeAttribute(e);return}i!==t&&f.setAttribute(e,t)}function je(f){var e;return(e=f.detail)==null?void 0:e.open}const fr=y.forwardRef(function({multiple:e,collapsible:t,open:i,variant:r,size:l,radius:d,tone:c,indicator:s,shape:o,elevation:p,onToggle:u,onChangeOpen:b,children:E,...L},A){const v=y.useRef(null);return y.useImperativeHandle(A,()=>v.current),y.useEffect(()=>{ne.warnIfElementNotRegistered("ui-accordion","Accordion")},[]),$n(()=>{const n=v.current;n&&(xn(n,"multiple",e),t==null?n.removeAttribute("collapsible"):n.setAttribute("collapsible",String(!!t)),i==null?n.removeAttribute("open"):n.setAttribute("open",Array.isArray(i)?JSON.stringify(i):String(i)),me(n,"variant",r&&r!=="surface"?r:null),me(n,"size",l&&l!=="md"?l:null),me(n,"radius",d!=null?String(d):null),me(n,"tone",c&&c!=="neutral"?c:null),me(n,"indicator",s&&s!=="line"?s:null),me(n,"shape",o&&o!=="default"?o:null),me(n,"elevation",p&&p!=="default"?p:null))},[e,t,i,r,l,d,c,s,o,p]),y.useEffect(()=>{const n=v.current;if(!n||!u&&!b)return;const a=h=>{const g=je(h);g!=null&&(u==null||u(g))},w=h=>{const g=je(h);g!=null&&(b==null||b(g))};return n.addEventListener("toggle",a),n.addEventListener("change",w),()=>{n.removeEventListener("toggle",a),n.removeEventListener("change",w)}},[u,b]),y.createElement("ui-accordion",{ref:v,...L},E)});fr.displayName="Accordion";const Mn=y.forwardRef(function({disabled:e,description:t,badge:i,children:r,...l},d){const c={ref:d,"data-ui-accordion-item":"",...l};return e&&(c.disabled=!0),t!=null&&(c["data-description"]=String(t)),i!=null&&(c["data-badge"]=String(i)),y.createElement("div",c,r)});Mn.displayName="AccordionItem";const qn=y.forwardRef(function({type:e,children:t,...i},r){return y.createElement("button",{ref:r,type:e||"button","data-ui-accordion-trigger":"",...i},t)});qn.displayName="AccordionTrigger";const Bn=y.forwardRef(function({children:e,...t},i){return y.createElement("div",{ref:i,"data-ui-accordion-panel":"",...t},e)});Bn.displayName="AccordionPanel";const ar=y.forwardRef((f,e)=>y.createElement("ui-direction-provider",{ref:e,...f}));ar.displayName="DirectionProvider";const jn=typeof window<"u"?y.default.useLayoutEffect:y.default.useEffect,dr=y.default.forwardRef(function({children:e,open:t,headless:i,dismissible:r,closeOnEsc:l,closeOnBackdrop:d,lockWhileLoading:c,roleType:s,tone:o,variant:p,size:u,radius:b,elevation:E,indicator:L,state:A,initialFocus:v,dialogId:n,config:a,onOpen:w,onConfirm:h,onCancel:g,onDismiss:R,onClose:N,onChange:S,...I},B){const T=m.useRef(null);return y.default.useImperativeHandle(B,()=>T.current),m.useEffect(()=>{const D=T.current;if(!D)return;const $=x=>w==null?void 0:w(x.detail),M=x=>h==null?void 0:h(x.detail),J=x=>g==null?void 0:g(x.detail),P=x=>R==null?void 0:R(x.detail),F=x=>N==null?void 0:N(x.detail),j=x=>S==null?void 0:S(x.detail);return D.addEventListener("ui-open",$),D.addEventListener("ui-confirm",M),D.addEventListener("ui-cancel",J),D.addEventListener("ui-dismiss",P),D.addEventListener("ui-close",F),D.addEventListener("ui-change",j),()=>{D.removeEventListener("ui-open",$),D.removeEventListener("ui-confirm",M),D.removeEventListener("ui-cancel",J),D.removeEventListener("ui-dismiss",P),D.removeEventListener("ui-close",F),D.removeEventListener("ui-change",j)}},[w,h,g,R,N,S]),jn(()=>{const D=T.current;D&&(i?D.setAttribute("headless",""):D.removeAttribute("headless"),typeof t=="boolean"&&t?D.setAttribute("open",""):D.removeAttribute("open"),typeof r=="boolean"?D.setAttribute("dismissible",String(r)):D.removeAttribute("dismissible"),typeof l=="boolean"?D.setAttribute("close-on-esc",String(l)):D.removeAttribute("close-on-esc"),typeof d=="boolean"?D.setAttribute("close-on-backdrop",String(d)):D.removeAttribute("close-on-backdrop"),typeof c=="boolean"?D.setAttribute("lock-while-loading",String(c)):D.removeAttribute("lock-while-loading"),s?D.setAttribute("role",s):D.removeAttribute("role"),o&&o!=="neutral"?D.setAttribute("tone",o):D.removeAttribute("tone"),p&&p!=="surface"?D.setAttribute("variant",p):D.removeAttribute("variant"),u&&u!=="md"&&u!=="2"?D.setAttribute("size",u):D.removeAttribute("size"),b!=null?D.setAttribute("radius",String(b)):D.removeAttribute("radius"),E&&E!=="low"?D.setAttribute("elevation",E):D.removeAttribute("elevation"),L&&L!=="line"?D.setAttribute("indicator",L):D.removeAttribute("indicator"),A&&A!=="idle"?D.setAttribute("state",A):D.removeAttribute("state"),v?D.setAttribute("initial-focus",v):D.removeAttribute("initial-focus"),n&&(D.dialogId=n),a?D.config=a:D.config={})},[t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a]),y.default.createElement("ui-alert-dialog",{ref:T,...I},e)});dr.displayName="AlertDialog";function Le(f,e,t,i){const r=y.default.forwardRef(function({as:d,children:c,style:s,...o},p){const u=d||f,b={ref:p,...o};return t&&(b.slot=t),i&&(b[i]=""),s&&(b.style=s),y.default.createElement(u,b,c)});return r.displayName=e,r}const Gn=Le("span","AlertDialogIcon","icon","data-ui-alert-dialog-icon"),Jn=Le("div","AlertDialogTitle","title","data-ui-alert-dialog-title"),_n=Le("div","AlertDialogDescription","description","data-ui-alert-dialog-description"),Un=Le("div","AlertDialogContent","content","data-ui-alert-dialog-content"),Qn=Le("div","AlertDialogActions","footer","data-ui-alert-dialog-actions"),mr=m.createContext(null),ye="data-ui-alert-dialog-react-host-refcount";function Wn({children:f,hostId:e="ui-alert-dialog-react-host",defaults:t}){const i=m.useRef(null);i.current||(i.current=se.createAlertDialogManager()),m.useEffect(()=>{var l;(l=i.current)==null||l.setDefaults(t||null)},[t]),m.useEffect(()=>{var s;if(typeof document>"u")return;let l=document.getElementById(e);const d=!l;l||(l=document.createElement("div"),l.id=e,l.setAttribute("data-ui-alert-dialog-react-host","true"),document.body.appendChild(l));const c=Number(l.getAttribute(ye)||"0");return l.setAttribute(ye,String(Math.max(0,c)+1)),(s=i.current)==null||s.setContainer(l),()=>{var u,b;if((u=i.current)==null||u.destroy("unmount"),i.current=null,!l||!l.isConnected)return;const o=Number(l.getAttribute(ye)||"1"),p=Math.max(0,o-1);p===0?(l.removeAttribute(ye),d&&((b=l.parentElement)==null||b.removeChild(l))):l.setAttribute(ye,String(p))}},[e]);const r=m.useMemo(()=>({alert:(l={})=>{var d;return((d=i.current)==null?void 0:d.alert(l))??Promise.resolve({id:"",action:"dismiss"})},confirm:(l={})=>{var d;return((d=i.current)==null?void 0:d.confirm(l))??Promise.resolve({id:"",action:"dismiss"})},prompt:(l={})=>{var d;return((d=i.current)==null?void 0:d.prompt(l))??Promise.resolve({id:"",action:"dismiss",value:""})}}),[]);return y.default.createElement(mr.Provider,{value:r},f)}function Xn(){const f=m.useContext(mr);if(!f)throw new Error("useAlertDialog must be used within <AlertDialogProvider>.");return f}const Yn=typeof window<"u"?m.useLayoutEffect:m.useEffect,br=y.default.forwardRef(function({children:e,value:t,valueStart:i,valueEnd:r,min:l,max:d,step:c,range:s,disabled:o,headless:p,orientation:u,size:b,variant:E,tone:L,showValue:A,format:v,label:n,description:a,marks:w,name:h,nameStart:g,nameEnd:R,onInput:N,onChange:S,onValueChange:I,...B},T){const D=m.useRef(null);return m.useImperativeHandle(T,()=>D.current),m.useEffect(()=>{const $=D.current;if(!$)return;const M=P=>{const F=P.detail;F&&(N==null||N(Number(F.value)),I==null||I(F))},J=P=>{const F=P.detail;F&&(S==null||S(Number(F.value)),I==null||I(F))};return $.addEventListener("input",M),$.addEventListener("change",J),()=>{$.removeEventListener("input",M),$.removeEventListener("change",J)}},[N,S,I]),Yn(()=>{const $=D.current;if(!$)return;const M=(P,F)=>{const j=$.getAttribute(P);if(F==null){j!=null&&$.removeAttribute(P);return}j!==F&&$.setAttribute(P,F)},J=(P,F,j)=>{if(F==null){j!==void 0&&j===!1&&M(P,null);return}F?M(P,""):M(P,null)};if(M("value",typeof t=="number"&&Number.isFinite(t)?String(t):null),M("value-start",typeof i=="number"&&Number.isFinite(i)?String(i):null),M("value-end",typeof r=="number"&&Number.isFinite(r)?String(r):null),M("min",typeof l=="number"&&Number.isFinite(l)?String(l):null),M("max",typeof d=="number"&&Number.isFinite(d)?String(d):null),M("step",typeof c=="number"&&Number.isFinite(c)?String(c):null),J("range",s),J("disabled",o),J("headless",p),M("orientation",u&&u!=="horizontal"?u:null),M("size",b&&b!=="md"?b:null),M("variant",E&&E!=="default"?E:null),M("tone",L&&L!=="brand"?L:null),typeof A=="boolean"?M("show-value",A?"true":"false"):M("show-value",null),M("format",v||null),M("label",n||null),M("description",a||null),M("name",h||null),M("name-start",g||null),M("name-end",R||null),w&&w.length)try{M("marks",JSON.stringify(w))}catch{M("marks",null)}else M("marks",null)},[t,i,r,l,d,c,s,o,p,u,b,E,L,A,v,n,a,w,h,g,R]),y.default.createElement("ui-slider",{ref:D,...B},e)});br.displayName="Slider";const zn=typeof window<"u"?m.useLayoutEffect:m.useEffect;function Kn(f){const{count:e,width:t,height:i,radius:r,gap:l,duration:d,variant:c,animation:s,density:o,tone:p,animated:u,headless:b,...E}=f,L=m.useRef(null);return zn(()=>{const A=L.current;A&&(typeof e=="number"&&Number.isFinite(e)?A.setAttribute("count",String(e)):A.removeAttribute("count"),t?A.setAttribute("width",t):A.removeAttribute("width"),i?A.setAttribute("height",i):A.removeAttribute("height"),r?A.setAttribute("radius",r):A.removeAttribute("radius"),l?A.setAttribute("gap",l):A.removeAttribute("gap"),d?A.setAttribute("duration",d):A.removeAttribute("duration"),c?A.setAttribute("variant",c):A.removeAttribute("variant"),s&&s!=="none"?A.setAttribute("animation",s):s==="none"?A.setAttribute("animation","none"):A.removeAttribute("animation"),o&&o!=="default"?A.setAttribute("density",o):A.removeAttribute("density"),p&&p!=="default"?A.setAttribute("tone",p):A.removeAttribute("tone"),u?A.setAttribute("animated",""):A.removeAttribute("animated"),b?A.setAttribute("headless",""):A.removeAttribute("headless"))},[e,t,i,r,l,d,c,s,o,p,u,b]),y.default.createElement("ui-skeleton",{ref:L,...E})}exports.Input=Hr.Input;exports.Textarea=Ir.Textarea;exports.Combobox=Pr.Combobox;exports.Wizard=kr.Wizard;exports.Rating=Tr.Rating;exports.QuickActions=Dr.QuickActions;exports.Menubar=Fr.Menubar;exports.Popover=$r.Popover;exports.Tabs=xr.Tabs;exports.Menu=we.Menu;exports.MenuItem=we.MenuItem;exports.MenuSectionLabel=we.MenuSectionLabel;exports.MenuSeparator=we.MenuSeparator;Object.defineProperty(exports,"toastAdvanced",{enumerable:!0,get:()=>te.toastAdvanced});Object.defineProperty(exports,"toastLegacy",{enumerable:!0,get:()=>Cr.default});Object.defineProperty(exports,"toastPro",{enumerable:!0,get:()=>te.toastPro});exports.FloatingToolbar=Mr.FloatingToolbar;exports.Command=Ge.Command;exports.CommandItem=Ge.CommandItem;exports.CommandPalette=Je.CommandPalette;exports.CommandPaletteItem=Je.CommandPaletteItem;exports.SelectionPopup=Br.SelectionPopup;exports.Form=jr.Form;exports.Sidebar=Gr.Sidebar;exports.Tree=Jr.Tree;exports.Breadcrumb=_r.Breadcrumb;exports.AppHeader=pe.ComposedAppHeader;exports.AppHeaderCenter=pe.AppHeaderCenter;exports.AppHeaderEnd=pe.AppHeaderEnd;exports.AppHeaderStart=pe.AppHeaderStart;exports.AppHeaderSubtitle=pe.AppHeaderSubtitle;exports.AppHeaderTitle=pe.AppHeaderTitle;exports.Drawer=Ur.Drawer;exports.Layout=Qr.Layout;exports.Switch=Wr.Switch;exports.Toggle=_e.Toggle;exports.ToggleGroup=_e.ToggleGroup;exports.Collapsible=Xr.Collapsible;exports.HoverCard=Yr.HoverCard;exports.Card=zr.Card;exports.Label=Kr.Label;exports.Select=Zr.Select;exports.Accordion=fr;exports.Alert=ri;exports.AlertActions=li;exports.AlertDescription=ui;exports.AlertDialog=dr;exports.AlertDialogActions=Qn;exports.AlertDialogContent=Un;exports.AlertDialogDescription=_n;exports.AlertDialogIcon=Gn;exports.AlertDialogProvider=Wn;exports.AlertDialogTitle=Jn;exports.AlertIcon=ii;exports.AlertTitle=ni;exports.Anchor=Kt;exports.AspectRatio=Vt;exports.Avatar=Ct;exports.Badge=Ei;exports.BlockControls=Mt;exports.Box=nn;exports.Button=Ue;exports.Calendar=lt;exports.Chart=Ni;exports.Checkbox=Zt;exports.Collection=Ut;exports.ColorPicker=st;exports.Container=on;exports.ContextMenu=Ci;exports.ControlGroup=et;exports.DataTable=wi;exports.DateField=dt;exports.DatePicker=ot;exports.DateRangePicker=ct;exports.DateRangeTimePicker=gt;exports.DateTimePicker=Lt;exports.Description=Ve;exports.Dialog=Tt;exports.DialogProvider=Ui;exports.DirectionProvider=ar;exports.DismissableLayer=Xt;exports.Dropdown=oi;exports.DropdownContent=Pe;exports.DropdownItem=ke;exports.DropdownSectionLabel=De;exports.DropdownSeparator=Te;exports.DropdownTrigger=Ie;exports.Dropzone=Oe;exports.EmptyState=Li;exports.Field=Ai;exports.FieldError=Ce;exports.Fieldset=tt;exports.FileUpload=Ze;exports.Flex=un;exports.FocusScope=Yt;exports.Gantt=wt;exports.Grid=ln;exports.Icon=Ft;exports.InlineEdit=Et;exports.Listbox=Qt;exports.Meter=rr;exports.MultiSelect=vt;exports.NavigationMenu=Ji;exports.NavigationMenuContent=It;exports.NavigationMenuIndicator=Pt;exports.NavigationMenuItem=Rt;exports.NavigationMenuLink=Ht;exports.NavigationMenuList=Nt;exports.NavigationMenuRoot=He;exports.NavigationMenuTrigger=St;exports.NavigationMenuViewport=kt;exports.NumberField=bt;exports.OTPInput=mi;exports.Pagination=cr;exports.Panel=Gt;exports.PanelGroup=jt;exports.PasswordField=Xe;exports.PinInput=Fe;exports.PluginPanel=qt;exports.Portal=ir;exports.Positioner=zt;exports.Presence=er;exports.Progress=tr;exports.RadioGroup=Ot;exports.RovingFocusGroup=Wt;exports.ScrollArea=nr;exports.Section=Bt;exports.Separator=ur;exports.Skeleton=Kn;exports.Slider=br;exports.Slot=lr;exports.SplitButton=At;exports.Splitter=Jt;exports.Stepper=ht;exports.Table=gi;exports.TagsInput=Ye;exports.ThemeProvider=dn;exports.TimeField=mt;exports.TimePicker=yt;exports.Timeline=ut;exports.Toast=xt;exports.ToastAPI=Yi;exports.ToastProvider=zi;exports.Toolbar=sr;exports.Tooltip=Qe;exports.TransferList=pt;exports.VisuallyHidden=or;exports.toast=Xi;exports.toastApi=$e;exports.useAlertDialog=Xn;exports.useDialog=Qi;exports.useFloating=rn;exports.useForm=tn;exports.useTheme=mn;exports.useToast=Ki;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react"),ie=require("./_internals-b9f3e909.js"),ye=require("./Alert.cjs.js"),Nr=require("./Input.cjs.js"),Rr=require("./Textarea.cjs.js"),Sr=require("./Combobox.cjs.js"),Hr=require("./Wizard.cjs.js"),kr=require("./Rating.cjs.js"),Pr=require("./QuickActions.cjs.js"),Ir=require("./Menubar.cjs.js"),se=require("@editora/ui-core"),Tr=require("./Popover.cjs.js"),Dr=require("./Tabs.cjs.js"),we=require("./Menu-010405cb.js"),te=require("@editora/toast"),Fr=require("./FloatingToolbar.cjs.js"),Be=require("./Command-da77cea8.js"),je=require("./CommandPalette-e827844c.js"),$r=require("react-dom"),xr=require("./SelectionPopup.cjs.js"),qr=require("./Form.cjs.js"),Mr=require("./Sidebar.cjs.js"),Br=require("./Tree.cjs.js"),jr=require("./Breadcrumb.cjs.js"),pe=require("./AppHeader-5c427700.js"),Gr=require("./Drawer.cjs.js"),Jr=require("./Layout.cjs.js"),_r=require("./Switch.cjs.js"),Ge=require("./ToggleGroup-4e0917a9.js"),Ur=require("./Collapsible.cjs.js"),Qr=require("./Accordion.cjs.js"),Wr=require("./HoverCard.cjs.js"),Xr=require("./Card.cjs.js"),Yr=require("./Label.cjs.js"),Kr=require("./Select.cjs.js"),Zr=a=>a&&a.__esModule?a:{default:a};function zr(a){if(a&&a.__esModule)return a;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const g=zr(f),Or=Zr(te);function ge(a,e,t){if(t==null||!t){a.removeAttribute(e);return}a.setAttribute(e,"")}function le(a,e,t){if(!t){a.removeAttribute(e);return}a.setAttribute(e,t)}const Je=g.default.forwardRef(function({children:e,onClick:t,variant:i,size:r,recipe:l,radius:d,scale:c,icon:s,startIcon:u,endIcon:A,loading:n,loadingLabel:p,state:E,tone:y,block:v,headless:b,disabled:m,animation:o,theme:w,type:h,ariaLabel:L,...R},N){const S=f.useRef(null),k=typeof window<"u"?g.default.useLayoutEffect:g.default.useEffect;f.useImperativeHandle(N,()=>S.current),f.useEffect(()=>{ie.warnIfElementNotRegistered("ui-button","Button")},[]),f.useEffect(()=>{const $=S.current;if(!$||!t)return;const q=J=>t(J);return $.addEventListener("click",q),()=>$.removeEventListener("click",q)},[t]),k(()=>{const $=S.current;if(!$)return;le($,"variant",i),r&&r!=="md"?le($,"size",r):$.removeAttribute("size"),le($,"icon",s);const q=E||(n?"loading":"idle");q==="idle"?$.removeAttribute("state"):le($,"state",q),ge($,"loading",!!n),ge($,"block",!!v),ge($,"headless",!!b),ge($,"disabled",!!m),le($,"animation",o),w&&w!=="default"?le($,"theme",w):$.removeAttribute("theme"),le($,"tone",y),h&&h!=="button"?le($,"type",h):$.removeAttribute("type"),p!==void 0&&le($,"loading-label",p),L!==void 0&&le($,"aria-label",L),le($,"recipe",l),le($,"radius",d!=null?String(d):void 0),le($,"scale",c)},[i,r,l,d,c,s,n,E,v,b,m,o,w,y,h,p,L]);const B={ref:S,...R,variant:i,size:r&&r!=="md"?r:void 0,recipe:l,radius:d!=null?String(d):void 0,scale:c,icon:s,animation:o,tone:y,type:h&&h!=="button"?h:void 0,loading:n?"":void 0,block:v?"":void 0,headless:b?"":void 0,disabled:m?"":void 0,theme:w&&w!=="default"?w:void 0,state:E&&E!=="idle"?E:void 0,"loading-label":p,"aria-label":L},T=u==null?null:g.default.createElement("span",{slot:"prefix","aria-hidden":"true"},u),D=A==null?null:g.default.createElement("span",{slot:"suffix","aria-hidden":"true"},A);return g.default.createElement("ui-button",B,T,e,D)});Je.displayName="Button";const Vr=typeof window<"u"?f.useLayoutEffect:f.useEffect,_e=g.default.forwardRef(function({children:e,text:t,placement:i,open:r,disabled:l,headless:d,variant:c,size:s,tone:u,delay:A,closeDelay:n,trigger:p,offset:E,interactive:y,arrow:v,onOpen:b,onClose:m,onOpenChange:o,...w},h){const L=f.useRef(null);return f.useImperativeHandle(h,()=>L.current),f.useEffect(()=>{const R=L.current;if(!R)return;const N=()=>{b==null||b()},S=()=>{m==null||m()},k=B=>{const T=B.detail;T&&typeof T.open=="boolean"&&(o==null||o(T.open))};return R.addEventListener("open",N),R.addEventListener("close",S),R.addEventListener("change",k),()=>{R.removeEventListener("open",N),R.removeEventListener("close",S),R.removeEventListener("change",k)}},[b,m,o]),Vr(()=>{const R=L.current;if(!R)return;const N=(k,B)=>{const T=R.getAttribute(k);if(B==null){T!=null&&R.removeAttribute(k);return}T!==B&&R.setAttribute(k,B)},S=(k,B)=>{B?N(k,""):N(k,null)};N("text",t||null),N("placement",i||null),S("open",r),S("disabled",l),S("headless",d),N("variant",c&&c!=="default"?c:null),N("size",s&&s!=="md"?s:null),N("tone",u&&u!=="default"?u:null),N("delay",typeof A=="number"&&Number.isFinite(A)?String(A):null),N("close-delay",typeof n=="number"&&Number.isFinite(n)?String(n):null),N("trigger",p||null),N("offset",typeof E=="number"&&Number.isFinite(E)?String(E):null),S("interactive",y),typeof v=="boolean"?N("arrow",v?"true":"false"):N("arrow",null)},[t,i,r,l,d,c,s,u,A,n,p,E,y,v]),g.default.createElement("ui-tooltip",{ref:L,...w},e)});_e.displayName="Tooltip";const Cr=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ue=g.default.forwardRef(function({children:e,open:t,placement:i,variant:r,size:l,density:d,radius:c,shape:s,elevation:u,tone:A,closeOnSelect:n,typeahead:p,onOpen:E,onClose:y,onChange:v,onChangeDetail:b,onRequestClose:m,onSelect:o,...w},h){const L=f.useRef(null);return f.useImperativeHandle(h,()=>L.current),f.useEffect(()=>{const R=L.current;if(!R)return;const N=()=>E==null?void 0:E(),S=()=>y==null?void 0:y(),k=D=>{const $=D.detail||{};typeof $.open=="boolean"&&(v==null||v($.open)),typeof $.open=="boolean"&&(b==null||b({open:$.open,reason:$.reason}))},B=D=>{const $=D.detail||{};typeof $.reason=="string"&&(m==null||m({reason:$.reason}))},T=D=>{o==null||o(D.detail||{})};return R.addEventListener("open",N),R.addEventListener("close",S),R.addEventListener("change",k),R.addEventListener("request-close",B),R.addEventListener("select",T),()=>{R.removeEventListener("open",N),R.removeEventListener("close",S),R.removeEventListener("change",k),R.removeEventListener("request-close",B),R.removeEventListener("select",T)}},[E,y,v,b,m,o]),Cr(()=>{const R=L.current;if(!R)return;const N=(k,B)=>{const T=R.getAttribute(k);if(B==null){T!=null&&R.removeAttribute(k);return}T!==B&&R.setAttribute(k,B)},S=(k,B,T="presence")=>{if(T==="presence"){B?R.hasAttribute(k)||R.setAttribute(k,""):R.hasAttribute(k)&&R.removeAttribute(k);return}if(B==null){R.hasAttribute(k)&&R.removeAttribute(k);return}const D=B?"true":"false";R.getAttribute(k)!==D&&R.setAttribute(k,D)};S("open",t),N("placement",i||null),N("variant",r&&r!=="default"&&r!=="surface"?r:null),N("size",l&&l!=="md"&&l!=="2"?l:null),N("density",d&&d!=="default"?d:null),N("radius",c==null||c===""||c==="default"?null:String(c)),N("shape",s&&s!=="default"&&s!=="rounded"?s:null),N("elevation",u&&u!=="default"?u:null),N("tone",A&&A!=="default"&&A!=="brand"?A:null),S("close-on-select",n,"value"),S("typeahead",p,"value")},[t,i,r,l,d,c,s,u,A,n,p]),g.default.createElement("ui-dropdown",{ref:L,...w},e)});Ue.displayName="Dropdown";const He=g.default.forwardRef(function(e,t){return g.default.createElement("button",{...e,ref:t,slot:"trigger"})});He.displayName="Dropdown.Trigger";const ke=g.default.forwardRef(function({as:e="div",...t},i){return g.default.createElement(e,{...t,ref:i,slot:"content"})});ke.displayName="Dropdown.Content";const Pe=g.default.forwardRef(function({children:e,icon:t,shortcut:i,caption:r,tone:l,role:d="menuitem",checked:c,className:s,value:u,label:A,"aria-label":n,...p},E){const y=["item",s].filter(Boolean).join(" "),v=d==="menuitemcheckbox"||d==="menuitemradio"?g.default.createElement("span",{className:"selection-icon","aria-hidden":"true"}):null;return g.default.createElement("div",{...p,ref:E,role:d,tabIndex:p.tabIndex??-1,className:y,"data-tone":l,"data-value":u,"aria-label":A??n,"aria-checked":d==="menuitemcheckbox"||d==="menuitemradio"?c?"true":"false":void 0,"data-menu-item":"true"},v,t?g.default.createElement("span",{className:"icon","aria-hidden":"true"},t):null,g.default.createElement("span",{className:"label"},g.default.createElement("span",{className:"text"},e),r?g.default.createElement("span",{className:"caption"},r):null),i?g.default.createElement("span",{className:"shortcut"},i):null)});Pe.displayName="Dropdown.Item";const Ie=g.default.forwardRef(function({className:e,...t},i){const r=["separator",e].filter(Boolean).join(" ");return g.default.createElement("div",{...t,ref:i,role:"separator",className:r})});Ie.displayName="Dropdown.Separator";const Te=g.default.forwardRef(function({children:e,className:t,...i},r){const l=["section-label",t].filter(Boolean).join(" ");return g.default.createElement("div",{...i,ref:r,className:l},e)});Te.displayName="Dropdown.SectionLabel";const en=Object.assign(Ue,{Trigger:He,Content:ke,Item:Pe,Separator:Ie,SectionLabel:Te}),tn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Qe=g.default.forwardRef(function(e,t){const{value:i,onChange:r,onInput:l,onDebouncedInput:d,onClear:c,onVisibilityChange:s,onStrengthChange:u,clearable:A,debounce:n,validation:p,size:E,minlength:y,maxlength:v,readOnly:b,autofocus:m,disabled:o,counter:w,floatingLabel:h,name:L,required:R,pattern:N,autoComplete:S,spellCheck:k,placeholder:B,variant:T,tone:D,density:$,shape:q,color:J,radius:P,label:F,description:j,error:x,showStrength:H,revealable:I,strengthEvaluator:M,children:_,...W}=e,U=f.useRef(null);return f.useImperativeHandle(t,()=>U.current),f.useEffect(()=>{const G=U.current;if(!G)return;const Q=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(l==null||l(V.value))},K=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(r==null||r(V.value))},X=O=>{const V=O.detail;typeof(V==null?void 0:V.value)=="string"&&(d==null||d(V.value))},Z=()=>c==null?void 0:c(),z=O=>{const V=O.detail;s==null||s(!!(V!=null&&V.revealed))},ee=O=>{const V=O.detail;V&&(u==null||u(V))};return G.addEventListener("input",Q),G.addEventListener("change",K),G.addEventListener("debounced-input",X),G.addEventListener("clear",Z),G.addEventListener("visibility-change",z),G.addEventListener("strength-change",ee),()=>{G.removeEventListener("input",Q),G.removeEventListener("change",K),G.removeEventListener("debounced-input",X),G.removeEventListener("clear",Z),G.removeEventListener("visibility-change",z),G.removeEventListener("strength-change",ee)}},[r,c,d,l,u,s]),tn(()=>{const G=U.current;if(!G)return;const Q=(X,Z)=>{const z=G.getAttribute(X);if(Z==null){z!=null&&G.removeAttribute(X);return}z!==Z&&G.setAttribute(X,Z)},K=(X,Z)=>{Z?G.hasAttribute(X)||G.setAttribute(X,""):G.hasAttribute(X)&&G.removeAttribute(X)};i!==void 0&&Q("value",i??null),Q("debounce",typeof n=="number"&&Number.isFinite(n)?String(n):null),Q("validation",p&&p!=="none"?p:null),Q("size",E&&E!=="md"&&E!=="2"?String(E):null),Q("minlength",typeof y=="number"?String(y):null),Q("maxlength",typeof v=="number"?String(v):null),Q("pattern",N??null),Q("autocomplete",S??null),Q("spellcheck",typeof k=="boolean"?String(k):null),Q("placeholder",B??null),Q("variant",T&&T!=="classic"?T:null),Q("tone",D&&D!=="default"?D:null),Q("density",$&&$!=="default"?$:null),Q("shape",q&&q!=="default"?q:null),Q("color",J??null),Q("radius",P?String(P):null),Q("label",F??null),Q("description",j??null),Q("data-error",x??null),Q("name",L??null),K("clearable",A),K("readonly",b),K("autofocus",m),K("disabled",o),K("counter",w),K("floating-label",h),K("required",R),K("show-strength",H),typeof I=="boolean"?Q("revealable",String(I)):G.removeAttribute("revealable"),G.strengthEvaluator=M??null},[S,m,A,J,w,n,$,j,o,x,h,F,v,y,L,N,B,P,b,R,I,H,q,E,k,M,D,p,i,T]),g.default.createElement("ui-password-field",{ref:U,...W},_)});Qe.displayName="PasswordField";const rn=typeof window<"u"?f.useLayoutEffect:f.useEffect;function nn(a){return a==null?null:Array.isArray(a)?JSON.stringify(a):a}const We=g.default.forwardRef(function({value:e,name:t,label:i,description:r,placeholder:l,required:d,disabled:c,readOnly:s,counter:u,maxTags:A,allowDuplicates:n,addOnBlur:p,onChange:E,onTagAdd:y,onTagRemove:v,children:b,...m},o){const w=f.useRef(null);return f.useImperativeHandle(o,()=>w.current),f.useEffect(()=>{const h=w.current;if(!h)return;const L=S=>{const k=S.detail;Array.isArray(k==null?void 0:k.value)&&(E==null||E(k.value))},R=S=>{const k=S.detail;k&&(y==null||y(k))},N=S=>{const k=S.detail;k&&(v==null||v(k))};return h.addEventListener("change",L),h.addEventListener("tag-add",R),h.addEventListener("tag-remove",N),()=>{h.removeEventListener("change",L),h.removeEventListener("tag-add",R),h.removeEventListener("tag-remove",N)}},[E,y,v]),rn(()=>{const h=w.current;if(!h)return;const L=(N,S)=>{const k=h.getAttribute(N);if(S==null){k!=null&&h.removeAttribute(N);return}k!==S&&h.setAttribute(N,S)},R=(N,S)=>{S?h.hasAttribute(N)||h.setAttribute(N,""):h.hasAttribute(N)&&h.removeAttribute(N)};L("value",nn(e)),L("name",t??null),L("label",i??null),L("description",r??null),L("placeholder",l??null),R("required",d),R("disabled",c),R("readonly",s),R("counter",u),R("allow-duplicates",n),R("add-on-blur",p),L("max-tags",typeof A=="number"?String(A):null)},[e,t,i,r,l,d,c,s,u,n,p,A]),g.default.createElement("ui-tags-input",{ref:w,...m},b)});We.displayName="TagsInput";const ln=typeof window<"u"?f.useLayoutEffect:f.useEffect,De=g.default.forwardRef(function({value:e,onChange:t,onComplete:i,length:r,name:l,label:d,description:c,error:s,mode:u,mask:A,required:n,disabled:p,readOnly:E,placeholderChar:y,size:v,density:b,shape:m,invalid:o,children:w,...h},L){const R=f.useRef(null);return f.useImperativeHandle(L,()=>R.current),f.useEffect(()=>{const N=R.current;if(!N)return;const S=B=>{t==null||t(B.detail.value||"")},k=B=>{i==null||i(B.detail.value||"")};return N.addEventListener("change",S),N.addEventListener("complete",k),()=>{N.removeEventListener("change",S),N.removeEventListener("complete",k)}},[t,i]),ln(()=>{const N=R.current;N&&(e!=null&&e!==""?N.setAttribute("value",e):N.removeAttribute("value"),typeof r=="number"&&Number.isFinite(r)?N.setAttribute("length",String(r)):N.removeAttribute("length"),l?N.setAttribute("name",l):N.removeAttribute("name"),d?N.setAttribute("label",d):N.removeAttribute("label"),c?N.setAttribute("description",c):N.removeAttribute("description"),s?N.setAttribute("error",s):N.removeAttribute("error"),u&&u!=="numeric"?N.setAttribute("mode",u):N.removeAttribute("mode"),A?N.setAttribute("mask",""):N.removeAttribute("mask"),n?N.setAttribute("required",""):N.removeAttribute("required"),p?N.setAttribute("disabled",""):N.removeAttribute("disabled"),E?N.setAttribute("readonly",""):N.removeAttribute("readonly"),y?N.setAttribute("placeholder-char",y):N.removeAttribute("placeholder-char"),v&&v!=="md"&&v!=="2"?N.setAttribute("size",v):N.removeAttribute("size"),b&&b!=="default"?N.setAttribute("density",b):N.removeAttribute("density"),m&&m!=="default"?N.setAttribute("shape",m):N.removeAttribute("shape"),o?N.setAttribute("invalid",""):N.removeAttribute("invalid"))},[e,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o]),g.default.createElement("ui-pin-input",{ref:R,...h},w)});De.displayName="PinInput";const un=De,sn=typeof window<"u"?f.useLayoutEffect:f.useEffect;function Xe(a,{onChange:e,onReject:t,onUploadStart:i,onUploadProgress:r,onUploadSuccess:l,onUploadError:d,onUploadCancel:c,onUploadComplete:s}){f.useEffect(()=>{const u=a.current;if(!u)return;const A=w=>{const h=w.detail;Array.isArray(h==null?void 0:h.files)&&(e==null||e(h.files))},n=w=>{const h=w.detail;Array.isArray(h==null?void 0:h.rejected)&&(t==null||t(h.rejected))},p=w=>h=>{w==null||w(h.detail||{})},E=p(i),y=p(r),v=p(l),b=p(d),m=p(c),o=p(s);return u.addEventListener("change",A),u.addEventListener("reject",n),u.addEventListener("upload-start",E),u.addEventListener("upload-progress",y),u.addEventListener("upload-success",v),u.addEventListener("upload-error",b),u.addEventListener("upload-cancel",m),u.addEventListener("upload-complete",o),()=>{u.removeEventListener("change",A),u.removeEventListener("reject",n),u.removeEventListener("upload-start",E),u.removeEventListener("upload-progress",y),u.removeEventListener("upload-success",v),u.removeEventListener("upload-error",b),u.removeEventListener("upload-cancel",m),u.removeEventListener("upload-complete",o)}},[e,t,c,s,d,r,i,l,a])}function Ye(a,{name:e,label:t,description:i,accept:r,multiple:l,disabled:d,required:c,maxFiles:s,maxSize:u,buttonText:A,dropLabel:n,showPreviews:p,progress:E,uploadOnSelect:y,uploadButtonText:v,onUploadRequest:b}){sn(()=>{const m=a.current;if(!m)return;const o=(h,L)=>{const R=m.getAttribute(h);if(L==null){R!=null&&m.removeAttribute(h);return}R!==L&&m.setAttribute(h,L)},w=(h,L)=>{L?m.hasAttribute(h)||m.setAttribute(h,""):m.hasAttribute(h)&&m.removeAttribute(h)};o("name",e??null),o("label",t??null),o("description",i??null),o("accept",r??null),w("multiple",l),w("disabled",d),w("required",c),o("max-files",typeof s=="number"?String(s):null),o("max-size",typeof u=="number"?String(u):null),o("button-text",A??null),o("drop-label",n??null),w("show-previews",p),w("upload-on-select",y),o("upload-button-text",v??null),o("progress",E?JSON.stringify(E):null),m.uploadRequest=b??null},[r,A,i,d,n,t,s,u,l,e,a,c,p,E,y,v,b])}const Ke=g.default.forwardRef(function({onChange:e,onReject:t,children:i,...r},l){const d=f.useRef(null);return f.useImperativeHandle(l,()=>d.current),Xe(d,{onChange:e,onReject:t,...r}),Ye(d,r),g.default.createElement("ui-file-upload",{ref:d,...r},i)}),Ze=g.default.forwardRef(function({onChange:e,onReject:t,children:i,...r},l){const d=f.useRef(null);return f.useImperativeHandle(l,()=>d.current),Xe(d,{onChange:e,onReject:t,...r}),Ye(d,r),g.default.createElement("ui-dropzone",{ref:d,...r},i)});Ke.displayName="FileUpload";Ze.displayName="Dropzone";const on=typeof window<"u"?f.useLayoutEffect:f.useEffect;function cn(a){const{children:e,label:t,description:i,error:r,htmlFor:l,required:d,invalid:c,orientation:s,variant:u,tone:A,density:n,shape:p,shell:E,labelWidth:y,headless:v,...b}=a,m=f.useRef(null);return on(()=>{const o=m.current;o&&(t!=null&&t!==""?o.setAttribute("label",t):o.removeAttribute("label"),i!=null&&i!==""?o.setAttribute("description",i):o.removeAttribute("description"),r!=null&&r!==""?o.setAttribute("error",r):o.removeAttribute("error"),l?o.setAttribute("for",l):o.removeAttribute("for"),d?o.setAttribute("required",""):o.removeAttribute("required"),c?o.setAttribute("invalid",""):o.removeAttribute("invalid"),s&&s!=="vertical"?o.setAttribute("orientation",s):o.removeAttribute("orientation"),u&&u!=="default"?o.setAttribute("variant",u):o.removeAttribute("variant"),A&&A!=="default"?o.setAttribute("tone",A):o.removeAttribute("tone"),n&&n!=="default"?o.setAttribute("density",n):o.removeAttribute("density"),p&&p!=="default"?o.setAttribute("shape",p):o.removeAttribute("shape"),E&&E!=="none"?o.setAttribute("shell",E):o.removeAttribute("shell"),y?o.setAttribute("label-width",y):o.removeAttribute("label-width"),v?o.setAttribute("headless",""):o.removeAttribute("headless"))},[t,i,r,l,d,c,s,u,A,n,p,E,y,v]),g.default.createElement("ui-field",{ref:m,...b},e)}const he=typeof window<"u"?f.useLayoutEffect:f.useEffect,ze=g.default.forwardRef(function({children:e,htmlFor:t,for:i,tone:r,size:l,variant:d,hidden:c,...s},u){const A=f.useRef(null);return f.useImperativeHandle(u,()=>A.current),he(()=>{const n=A.current;if(!n)return;const p=t||i;p?n.setAttribute("for",p):n.removeAttribute("for"),r&&r!=="default"?n.setAttribute("tone",r):n.removeAttribute("tone"),l&&l!=="md"&&l!=="2"?n.setAttribute("size",l):n.removeAttribute("size"),d&&d!=="default"?n.setAttribute("variant",d):n.removeAttribute("variant"),c?n.setAttribute("hidden",""):n.removeAttribute("hidden")},[t,i,r,l,d,c]),g.default.createElement("ui-description",{ref:A,...s},e)});ze.displayName="Description";const Oe=g.default.forwardRef(function({children:e,htmlFor:t,for:i,active:r,size:l,variant:d,hidden:c,...s},u){const A=f.useRef(null);return f.useImperativeHandle(u,()=>A.current),he(()=>{const n=A.current;if(!n)return;const p=t||i;p?n.setAttribute("for",p):n.removeAttribute("for"),r?n.setAttribute("active",""):n.removeAttribute("active"),l&&l!=="md"&&l!=="2"?n.setAttribute("size",l):n.removeAttribute("size"),d&&d!=="default"?n.setAttribute("variant",d):n.removeAttribute("variant"),c?n.setAttribute("hidden",""):n.removeAttribute("hidden")},[t,i,r,l,d,c]),g.default.createElement("ui-field-error",{ref:A,...s},e)});Oe.displayName="FieldError";const Ve=g.default.forwardRef(function({children:e,label:t,orientation:i,variant:r,density:l,hidden:d,...c},s){const u=f.useRef(null);return f.useImperativeHandle(s,()=>u.current),he(()=>{const A=u.current;A&&(t?A.setAttribute("label",t):A.removeAttribute("label"),i&&i!=="vertical"?A.setAttribute("orientation",i):A.removeAttribute("orientation"),r&&r!=="default"?A.setAttribute("variant",r):A.removeAttribute("variant"),l&&l!=="default"?A.setAttribute("density",l):A.removeAttribute("density"),d?A.setAttribute("hidden",""):A.removeAttribute("hidden"))},[t,i,r,l,d]),g.default.createElement("ui-control-group",{ref:u,...c},e)});Ve.displayName="ControlGroup";const Ce=g.default.forwardRef(function({children:e,legend:t,description:i,error:r,required:l,invalid:d,orientation:c,variant:s,tone:u,density:A,shape:n,headless:p,...E},y){const v=f.useRef(null);return f.useImperativeHandle(y,()=>v.current),he(()=>{const b=v.current;b&&(t!=null&&t!==""?b.setAttribute("legend",t):b.removeAttribute("legend"),i!=null&&i!==""?b.setAttribute("description",i):b.removeAttribute("description"),r!=null&&r!==""?b.setAttribute("error",r):b.removeAttribute("error"),l?b.setAttribute("required",""):b.removeAttribute("required"),d?b.setAttribute("invalid",""):b.removeAttribute("invalid"),c&&c!=="vertical"?b.setAttribute("orientation",c):b.removeAttribute("orientation"),s&&s!=="default"?b.setAttribute("variant",s):b.removeAttribute("variant"),u&&u!=="default"?b.setAttribute("tone",u):b.removeAttribute("tone"),A&&A!=="default"?b.setAttribute("density",A):b.removeAttribute("density"),n&&n!=="default"?b.setAttribute("shape",n):b.removeAttribute("shape"),p?b.setAttribute("headless",""):b.removeAttribute("headless"))},[t,i,r,l,d,c,s,u,A,n,p]),g.default.createElement("ui-fieldset",{ref:v,...E},e)});Ce.displayName="Fieldset";const fn=typeof window<"u"?f.useLayoutEffect:f.useEffect;function an(a){const{text:e,tone:t,variant:i,size:r,radius:l,elevation:d,state:c,pill:s,dot:u,interactive:A,truncate:n,maxWidth:p,removable:E,autoRemove:y,iconOnly:v,disabled:b,onRemove:m,children:o,...w}=a,h=f.useRef(null);return f.useEffect(()=>{const L=h.current;if(!L)return;const R=N=>m==null?void 0:m(N.detail);return L.addEventListener("remove",R),()=>L.removeEventListener("remove",R)},[m]),fn(()=>{const L=h.current;L&&(e?L.setAttribute("text",e):L.removeAttribute("text"),t?L.setAttribute("tone",t):L.removeAttribute("tone"),i&&i!=="surface"?L.setAttribute("variant",i):L.removeAttribute("variant"),r&&r!=="md"&&r!=="2"?L.setAttribute("size",r):L.removeAttribute("size"),l!=null?L.setAttribute("radius",String(l)):L.removeAttribute("radius"),d&&d!=="none"?L.setAttribute("elevation",d):L.removeAttribute("elevation"),c&&c!=="idle"?L.setAttribute("state",c):L.removeAttribute("state"),s?L.setAttribute("pill",""):L.removeAttribute("pill"),u?L.setAttribute("dot",""):L.removeAttribute("dot"),A?L.setAttribute("interactive",""):L.removeAttribute("interactive"),n?L.setAttribute("truncate",""):L.removeAttribute("truncate"),p?L.setAttribute("max-width",p):L.removeAttribute("max-width"),E?L.setAttribute("removable",""):L.removeAttribute("removable"),y?L.setAttribute("auto-remove",""):L.removeAttribute("auto-remove"),v?L.setAttribute("icon-only",""):L.removeAttribute("icon-only"),b?L.setAttribute("disabled",""):L.removeAttribute("disabled"))},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b]),g.default.createElement("ui-badge",{ref:h,...w},o)}const dn=typeof window<"u"?f.useLayoutEffect:f.useEffect;function mn(a){const{title:e,description:t,actionLabel:i,tone:r,compact:l,headless:d,onAction:c,children:s,...u}=a,A=f.useRef(null);return f.useEffect(()=>{const n=A.current;if(!n)return;const p=()=>c==null?void 0:c();return n.addEventListener("action",p),()=>n.removeEventListener("action",p)},[c]),dn(()=>{const n=A.current;n&&(e?n.setAttribute("title",e):n.removeAttribute("title"),t?n.setAttribute("description",t):n.removeAttribute("description"),i?n.setAttribute("action-label",i):n.removeAttribute("action-label"),r?n.setAttribute("tone",r):n.removeAttribute("tone"),l?n.setAttribute("compact",""):n.removeAttribute("compact"),d?n.setAttribute("headless",""):n.removeAttribute("headless"))},[e,t,i,r,l,d]),g.default.createElement("ui-empty-state",{ref:A,...u},s)}function bn(a){const{sortable:e,selectable:t,multiSelect:i,striped:r,hover:l,compact:d,bordered:c,stickyHeader:s,loading:u,headless:A,emptyText:n,onSortChange:p,onRowSelect:E,children:y,...v}=a,b=f.useRef(null);return f.useEffect(()=>{const m=b.current;if(!m)return;const o=h=>{const L=h.detail;L&&(p==null||p(L))},w=h=>{const L=h.detail;L&&(E==null||E(L))};return m.addEventListener("sort-change",o),m.addEventListener("row-select",w),()=>{m.removeEventListener("sort-change",o),m.removeEventListener("row-select",w)}},[p,E]),g.default.createElement("ui-table",{ref:b,...v,...e?{sortable:""}:{},...t?{selectable:""}:{},...i?{"multi-select":""}:{},...r?{striped:""}:{},...l?{hover:""}:{},...d?{compact:""}:{},...c?{bordered:""}:{},...s?{"sticky-header":""}:{},...u?{loading:""}:{},...A?{headless:""}:{},...n?{"empty-text":n}:{}},y)}function vn(a){const{sortable:e,selectable:t,multiSelect:i,shape:r,variant:l,elevation:d,striped:c,hover:s,compact:u,bordered:A,stickyHeader:n,stickyFooter:p,loading:E,state:y,stateText:v,headless:b,hideSummary:m,emptyText:o,page:w,pageSize:h,paginationId:L,filterQuery:R,filterColumn:N,filterRules:S,columnOrder:k,pinColumns:B,draggableColumns:T,resizableColumns:D,bulkActionsLabel:$,bulkClearLabel:q,virtualize:J,rowHeight:P,overscan:F,onSortChange:j,onRowSelect:x,onPageChange:H,onFilterChange:I,onColumnResize:M,onVirtualRangeChange:_,onColumnOrderChange:W,onBulkClear:U,children:G,...Q}=a,K=f.useRef(null);f.useEffect(()=>{const z=K.current;if(!z)return;const ee=re=>{const C=re.detail;C&&(j==null||j(C))},O=re=>{const C=re.detail;C&&(x==null||x(C))},V=re=>{const C=re.detail;C&&(H==null||H(C))},oe=re=>{const C=re.detail;C&&(I==null||I(C))},ce=re=>{const C=re.detail;C&&(M==null||M(C))},fe=re=>{const C=re.detail;C&&(_==null||_(C))},ae=re=>{const C=re.detail;C&&(W==null||W(C))},de=re=>{const C=re.detail;C&&(U==null||U(C))};return z.addEventListener("sort-change",ee),z.addEventListener("row-select",O),z.addEventListener("page-change",V),z.addEventListener("filter-change",oe),z.addEventListener("column-resize",ce),z.addEventListener("virtual-range-change",fe),z.addEventListener("column-order-change",ae),z.addEventListener("bulk-clear",de),()=>{z.removeEventListener("sort-change",ee),z.removeEventListener("row-select",O),z.removeEventListener("page-change",V),z.removeEventListener("filter-change",oe),z.removeEventListener("column-resize",ce),z.removeEventListener("virtual-range-change",fe),z.removeEventListener("column-order-change",ae),z.removeEventListener("bulk-clear",de)}},[j,x,H,I,M,_,W,U]);const X=S&&S.length?(()=>{try{return JSON.stringify(S)}catch{return}})():void 0,Z=typeof B=="string"?B.trim()||void 0:B&&typeof B=="object"?(()=>{try{return JSON.stringify(B)}catch{return}})():void 0;return g.default.createElement("ui-data-table",{ref:K,...Q,...e?{sortable:""}:{},...t?{selectable:""}:{},...i?{"multi-select":""}:{},...r&&r!=="default"?{shape:r}:{},...l&&l!=="default"?{variant:l}:{},...d&&d!=="default"?{elevation:d}:{},...c?{striped:""}:{},...s?{hover:""}:{},...u?{compact:""}:{},...A?{bordered:""}:{},...n?{"sticky-header":""}:{},...p?{"sticky-footer":""}:{},...E?{loading:""}:{},...y&&y!=="idle"?{state:y}:{},...v?{"state-text":v}:{},...b?{headless:""}:{},...m?{"hide-summary":""}:{},...o?{"empty-text":o}:{},...typeof w=="number"&&Number.isFinite(w)?{page:String(w)}:{},...typeof h=="number"&&Number.isFinite(h)?{"page-size":String(h)}:{},...L?{"pagination-id":L}:{},...typeof R=="string"?{"filter-query":R}:{},...typeof N=="number"&&Number.isFinite(N)?{"filter-column":String(N)}:typeof N=="string"&&N.trim()?{"filter-column":N}:{},...X?{filters:X}:{},...k?{"column-order":k}:{},...Z?{"pin-columns":Z}:{},...T?{"draggable-columns":""}:{},...D?{"resizable-columns":""}:{},...$?{"bulk-actions-label":$}:{},...q?{"bulk-clear-label":q}:{},...J?{virtualize:""}:{},...typeof P=="number"&&Number.isFinite(P)?{"row-height":String(P)}:{},...typeof F=="number"&&Number.isFinite(F)?{overscan:String(F)}:{}},G)}const pn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Re=g.default.forwardRef(function({data:e,series:t,values:i,labels:r,type:l,variant:d,title:c,subtitle:s,state:u,disabled:A,interactive:n,showLegend:p,showSummary:E,headless:y,valuePrefix:v,valueSuffix:b,ariaLabel:m,onPointSelect:o,children:w,...h},L){const R=f.useRef(null);return f.useImperativeHandle(L,()=>R.current),f.useEffect(()=>{ie.warnIfElementNotRegistered("ui-chart","Chart")},[]),f.useEffect(()=>{const N=R.current;if(!N||!o)return;const S=k=>{const B=k.detail;B&&o(B)};return N.addEventListener("ui-point-select",S),()=>{N.removeEventListener("ui-point-select",S)}},[o]),pn(()=>{const N=R.current;if(!N)return;const S=(B,T)=>{const D=N.getAttribute(B);if(T==null){D!=null&&N.removeAttribute(B);return}D!==T&&N.setAttribute(B,T)},k=(B,T)=>{T?S(B,""):S(B,null)};if(e&&e.length)try{S("data",JSON.stringify(e))}catch{S("data",null)}else S("data",null);if(t&&t.length)try{S("series",JSON.stringify(t))}catch{S("series",null)}else S("series",null);i&&i.length?S("values",i.join(",")):S("values",null),r&&r.length?S("labels",r.join(",")):S("labels",null),S("type",l&&l!=="line"?l:null),S("variant",d&&d!=="default"?d:null),S("title",c||null),S("subtitle",s||null),S("state",u&&u!=="idle"?u:null),S("interactive",n===!1?"false":null),S("show-legend",typeof p=="boolean"?p?"true":"false":null),S("show-summary",typeof E=="boolean"?E?"true":"false":null),S("value-prefix",v||null),S("value-suffix",b||null),S("aria-label",m||null),k("disabled",A),k("headless",y)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m]),g.default.createElement("ui-chart",{ref:R,...h},w)});Re.displayName="Chart";const et=g.default.forwardRef(function({children:e,...t},i){return g.default.createElement("div",{ref:i,slot:"header",...t},e)});et.displayName="ChartHeader";const tt=g.default.forwardRef(function({children:e,...t},i){return g.default.createElement("h3",{ref:i,slot:"title",...t},e)});tt.displayName="ChartTitle";const rt=g.default.forwardRef(function({children:e,...t},i){return g.default.createElement("p",{ref:i,slot:"subtitle",...t},e)});rt.displayName="ChartSubtitle";const An=Object.assign(Re,{Root:Re,Header:et,Title:tt,Subtitle:rt}),En=typeof window<"u"?f.useLayoutEffect:f.useEffect,nt=g.default.forwardRef(function({items:e,variant:t,headless:i,children:r,...l},d){const c=f.useRef(null);return f.useImperativeHandle(d,()=>c.current),En(()=>{const s=c.current;if(!s)return;const u=(n,p)=>{const E=s.getAttribute(n);if(p==null){E!=null&&s.removeAttribute(n);return}E!==p&&s.setAttribute(n,p)},A=(n,p)=>{p?u(n,""):u(n,null)};if(e&&e.length)try{u("items",JSON.stringify(e))}catch{u("items",null)}else u("items",null);u("variant",t&&t!=="default"?t:null),A("headless",i)},[e,t,i]),g.default.createElement("ui-timeline",{ref:c,...l},r)});nt.displayName="Timeline";const yn=typeof window<"u"?f.useLayoutEffect:f.useEffect,it=g.default.forwardRef(function({year:e,month:t,value:i,events:r,variant:l,selection:d,min:c,max:s,disabled:u,readOnly:A,locale:n,translations:p,weekStart:E,outsideClick:y,eventsMax:v,eventsDisplay:b,maxSelections:m,size:o,bare:w,tone:h,state:L,headless:R,hideToday:N,showToday:S,ariaLabel:k,onSelect:B,onChange:T,onCalendarChange:D,onMonthChange:$,onValueChange:q,children:J,...P},F){const j=f.useRef(null);return f.useImperativeHandle(F,()=>j.current),f.useEffect(()=>{ie.warnIfElementNotRegistered("ui-calendar","Calendar")},[]),f.useEffect(()=>{const x=j.current;if(!x)return;const H=_=>{const W=_.detail;W&&(B==null||B(W),T==null||T(W),q==null||q(W.value))},I=_=>{const W=_.detail;W&&(D==null||D(W))},M=_=>{const W=_.detail;W&&($==null||$(W))};return x.addEventListener("ui-select",H),x.addEventListener("ui-change",I),x.addEventListener("ui-month-change",M),()=>{x.removeEventListener("ui-select",H),x.removeEventListener("ui-change",I),x.removeEventListener("ui-month-change",M)}},[B,T,D,$,q]),yn(()=>{const x=j.current;if(!x)return;const H=(M,_)=>{const W=x.getAttribute(M);if(_==null){W!=null&&x.removeAttribute(M);return}W!==_&&x.setAttribute(M,_)},I=(M,_)=>{_?x.hasAttribute(M)||x.setAttribute(M,""):x.hasAttribute(M)&&x.removeAttribute(M)};if(typeof e=="number"&&Number.isFinite(e)?H("year",String(e)):H("year",null),typeof t=="number"&&Number.isFinite(t)?H("month",String(t)):H("month",null),H("value",i||null),H("selection",d&&d!=="single"?d:null),H("min",c||null),H("max",s||null),H("locale",n||null),H("translations",ie.serializeTranslations(p)),H("week-start",typeof E=="number"?String(E):null),H("outside-click",y&&y!=="navigate"?y:null),H("events-max",typeof v=="number"&&Number.isFinite(v)?String(v):null),H("events-display",b&&b!=="dots"?b:null),H("max-selections",typeof m=="number"&&Number.isFinite(m)?String(m):null),H("size",o&&o!=="md"?o:null),I("bare",w),H("tone",h||null),H("state",L&&L!=="idle"?L:null),H("show-today",typeof S=="boolean"?S?"true":"false":null),H("aria-label",k||null),I("disabled",u),I("readonly",A),I("hide-today",N),I("headless",R),r&&r.length)try{H("events",JSON.stringify(r))}catch{H("events",null)}else H("events",null);H("variant",l&&l!=="default"?l:null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k]),g.default.createElement("ui-calendar",{ref:j,...P},J)});it.displayName="Calendar";const Ln=typeof window<"u"?f.useLayoutEffect:f.useEffect,lt=g.default.forwardRef(function({value:e,format:t,alpha:i,disabled:r,readOnly:l,size:d,variant:c,state:s,tone:u,mode:A,open:n,closeOnEscape:p,placeholder:E,presets:y,recent:v,maxRecent:b,persist:m,onInput:o,onChange:w,onValueChange:h,onOpen:L,onClose:R,onOpenDetail:N,onCloseDetail:S,onInvalid:k,children:B,...T},D){const $=f.useRef(null);f.useImperativeHandle(D,()=>$.current),f.useEffect(()=>{const J=$.current;if(!J)return;const P=I=>{const M=I.detail;M&&(o==null||o(M))},F=I=>{const M=I.detail;M&&(w==null||w(M),h==null||h(M.value))},j=I=>{const M=I.detail;M&&(k==null||k(M))},x=I=>{const M=I.detail;L==null||L(),M&&(N==null||N(M))},H=I=>{const M=I.detail;R==null||R(),M&&(S==null||S(M))};return J.addEventListener("input",P),J.addEventListener("change",F),J.addEventListener("open",x),J.addEventListener("close",H),J.addEventListener("invalid",j),()=>{J.removeEventListener("input",P),J.removeEventListener("change",F),J.removeEventListener("open",x),J.removeEventListener("close",H),J.removeEventListener("invalid",j)}},[o,w,h,L,R,N,S,k]),Ln(()=>{const J=$.current;if(!J)return;const P=(j,x)=>{const H=J.getAttribute(j);x==null?H!=null&&J.removeAttribute(j):H!==x&&J.setAttribute(j,x)},F=(j,x)=>{x?P(j,""):P(j,null)};if(P("value",e??null),P("format",t&&t!=="hex"?t:null),F("alpha",i),F("disabled",r),F("readonly",l),P("size",d&&d!=="md"?d:null),P("variant",c&&c!=="default"?c:null),P("state",s&&s!=="idle"?s:null),P("tone",u&&u!=="brand"?u:null),P("mode",A&&A!=="inline"?A:null),typeof n=="boolean"?F("open",n):P("open",null),P("close-on-escape",typeof p=="boolean"?p?"true":"false":null),P("placeholder",E??null),F("recent",v),P("max-recent",typeof b=="number"?String(b):null),F("persist",m),y&&y.length>0)try{P("presets",JSON.stringify(y))}catch{P("presets",null)}else P("presets",null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m]);const q={ref:$,...T};if(A&&A!=="inline"&&(q.mode=A),typeof n=="boolean"&&n&&(q.open=""),e!=null&&(q.value=e),t&&t!=="hex"&&(q.format=t),i&&(q.alpha=""),r&&(q.disabled=""),l&&(q.readonly=""),d&&d!=="md"&&(q.size=d),c&&c!=="default"&&(q.variant=c),s&&s!=="idle"&&(q.state=s),u&&u!=="brand"&&(q.tone=u),E&&(q.placeholder=E),typeof p=="boolean"&&(q["close-on-escape"]=p?"true":"false"),v&&(q.recent=""),typeof b=="number"&&(q["max-recent"]=String(b)),m&&(q.persist=""),y&&y.length>0)try{q.presets=JSON.stringify(y)}catch{}return g.default.createElement("ui-color-picker",q,B)});lt.displayName="ColorPicker";const gn=typeof window<"u"?f.useLayoutEffect:f.useEffect,ut=g.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:u,size:A,shape:n,bare:p,variant:E,state:y,placeholder:v,label:b,hint:m,error:o,clearable:w,allowInput:h,closeOnSelect:L,outsideClick:R,disabled:N,readOnly:S,required:k,name:B,mode:T,showFooter:D,events:$,eventsMax:q,eventsDisplay:J,format:P,displayFormat:F,onInput:j,onChange:x,onValueChange:H,onOpen:I,onClose:M,onInvalid:_,children:W,...U},G){const Q=f.useRef(null);return f.useImperativeHandle(G,()=>Q.current),f.useEffect(()=>{const K=Q.current;if(!K)return;const X=ee=>{const O=ee.detail;O&&(j==null||j(O))},Z=ee=>{const O=ee.detail;O&&(x==null||x(O),H==null||H(O.value))},z=ee=>{const O=ee.detail;O&&(_==null||_(O))};return K.addEventListener("input",X),K.addEventListener("change",Z),K.addEventListener("open",I),K.addEventListener("close",M),K.addEventListener("invalid",z),()=>{K.removeEventListener("input",X),K.removeEventListener("change",Z),K.removeEventListener("open",I),K.removeEventListener("close",M),K.removeEventListener("invalid",z)}},[j,x,H,I,M,_]),gn(()=>{const K=Q.current;if(!K)return;const X=(z,ee)=>{const O=K.getAttribute(z);ee==null?O!=null&&K.removeAttribute(z):O!==ee&&K.setAttribute(z,ee)},Z=(z,ee)=>{ee?X(z,""):X(z,null)};if(X("value",e??null),X("default-value",t??null),typeof i=="boolean"?Z("open",i):X("open",null),Z("default-open",r),X("min",l??null),X("max",d??null),X("locale",c??null),X("translations",ie.serializeTranslations(s)),X("week-start",typeof u=="number"?String(u):null),X("size",A&&A!=="md"?A:null),X("shape",n&&n!=="default"?n:null),Z("bare",p),X("variant",E&&E!=="default"?E:null),X("state",y&&y!=="idle"?y:null),X("placeholder",v??null),X("label",b??null),X("hint",m??null),X("error",o??null),Z("clearable",w),Z("allow-input",h),Z("close-on-select",L),X("outside-click",R&&R!=="navigate"?R:null),Z("disabled",N),Z("readonly",S),Z("required",k),X("name",B??null),X("mode",T&&T!=="popover"?T:null),X("show-footer",typeof D=="boolean"?String(D):null),X("events-max",typeof q=="number"?String(q):null),X("events-display",J&&J!=="dots"?J:null),X("format",P&&P!=="locale"?P:null),X("display-format",F??null),$!=null&&$.length)try{X("events",JSON.stringify($))}catch{X("events",null)}else X("events",null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k,B,T,D,$,q,J,P,F]),g.default.createElement("ui-date-picker",{ref:Q,...U},W)});ut.displayName="DatePicker";const wn=typeof window<"u"?f.useLayoutEffect:f.useEffect,st=g.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:u,size:A,shape:n,bare:p,variant:E,state:y,rangeVariant:v,label:b,hint:m,error:o,allowSameDay:w,allowPartial:h,closeOnSelect:L,clearable:R,disabled:N,readOnly:S,required:k,name:B,nameStart:T,nameEnd:D,mode:$,showFooter:q,onInput:J,onChange:P,onValueChange:F,onOpen:j,onClose:x,onInvalid:H,children:I,...M},_){const W=f.useRef(null);return f.useImperativeHandle(_,()=>W.current),f.useEffect(()=>{const U=W.current;if(!U)return;const G=X=>{const Z=X.detail;Z&&(J==null||J(Z))},Q=X=>{const Z=X.detail;Z&&(P==null||P(Z),F==null||F(Z.value?JSON.stringify(Z.value):null))},K=X=>{const Z=X.detail;Z&&(H==null||H(Z))};return U.addEventListener("input",G),U.addEventListener("change",Q),U.addEventListener("open",j),U.addEventListener("close",x),U.addEventListener("invalid",K),()=>{U.removeEventListener("input",G),U.removeEventListener("change",Q),U.removeEventListener("open",j),U.removeEventListener("close",x),U.removeEventListener("invalid",K)}},[J,P,F,j,x,H]),wn(()=>{const U=W.current;if(!U)return;const G=(K,X)=>{const Z=U.getAttribute(K);X==null?Z!=null&&U.removeAttribute(K):Z!==X&&U.setAttribute(K,X)},Q=(K,X)=>{X?G(K,""):G(K,null)};G("value",e??null),G("default-value",t??null),typeof i=="boolean"?Q("open",i):G("open",null),Q("default-open",r),G("min",l??null),G("max",d??null),G("locale",c??null),G("translations",ie.serializeTranslations(s)),G("week-start",typeof u=="number"?String(u):null),G("size",A&&A!=="md"?A:null),G("shape",n&&n!=="default"?n:null),Q("bare",p),G("variant",E&&E!=="default"?E:null),G("state",y&&y!=="idle"?y:null),G("range-variant",v&&v!=="two-fields"?v:null),G("label",b??null),G("hint",m??null),G("error",o??null),Q("allow-same-day",w),Q("allow-partial",h),Q("close-on-select",L),Q("clearable",R),Q("disabled",N),Q("readonly",S),Q("required",k),G("name",B??null),G("name-start",T??null),G("name-end",D??null),G("mode",$&&$!=="popover"?$:null),G("show-footer",typeof q=="boolean"?String(q):null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k,B,T,D,$,q]),g.default.createElement("ui-date-range-picker",{ref:W,...M},I)});st.displayName="DateRangePicker";const ot=typeof window<"u"?f.useLayoutEffect:f.useEffect;function ct(a,e,t){f.useEffect(()=>{const i=a.current;if(!i)return;const r=l=>{const d=l.detail;d&&(e==null||e(d),t==null||t(d.value))};return i.addEventListener("change",r),()=>{i.removeEventListener("change",r)}},[e,t,a])}const ft=g.default.forwardRef(function({value:e,min:t,max:i,locale:r,label:l,description:d,error:c,name:s,required:u,disabled:A,readOnly:n,onChange:p,onValueChange:E,children:y,...v},b){const m=f.useRef(null);return f.useImperativeHandle(b,()=>m.current),ct(m,p,E),ot(()=>{const o=m.current;if(!o)return;const w=(L,R)=>{const N=o.getAttribute(L);if(R==null){N!=null&&o.removeAttribute(L);return}N!==R&&o.setAttribute(L,R)},h=(L,R)=>{R?o.hasAttribute(L)||o.setAttribute(L,""):o.hasAttribute(L)&&o.removeAttribute(L)};w("value",e??null),w("min",t??null),w("max",i??null),w("locale",r??null),w("label",l??null),w("description",d??null),w("data-error",c??null),w("name",s??null),h("required",u),h("disabled",A),h("readonly",n)},[e,t,i,r,l,d,c,s,u,A,n]),g.default.createElement("ui-date-field",{ref:m,...v},y)}),at=g.default.forwardRef(function({value:e,min:t,max:i,locale:r,label:l,description:d,error:c,name:s,required:u,disabled:A,readOnly:n,format:p,seconds:E,onChange:y,onValueChange:v,children:b,...m},o){const w=f.useRef(null);return f.useImperativeHandle(o,()=>w.current),ct(w,y,v),ot(()=>{const h=w.current;if(!h)return;const L=(N,S)=>{const k=h.getAttribute(N);if(S==null){k!=null&&h.removeAttribute(N);return}k!==S&&h.setAttribute(N,S)},R=(N,S)=>{S?h.hasAttribute(N)||h.setAttribute(N,""):h.hasAttribute(N)&&h.removeAttribute(N)};L("value",e??null),L("min",t??null),L("max",i??null),L("locale",r??null),L("label",l??null),L("description",d??null),L("data-error",c??null),L("name",s??null),L("format",p&&p!=="24h"?p:null),R("seconds",E),R("required",u),R("disabled",A),R("readonly",n)},[e,t,i,r,l,d,c,s,u,A,n,p,E]),g.default.createElement("ui-time-field",{ref:w,...m},b)});ft.displayName="DateField";at.displayName="TimeField";const hn=typeof window<"u"?f.useLayoutEffect:f.useEffect,dt=g.default.forwardRef(function({value:e,min:t,max:i,step:r,precision:l,locale:d,format:c,placeholder:s,label:u,description:A,error:n,name:p,required:E,disabled:y,readOnly:v,allowWheel:b,showSteppers:m,clampOnBlur:o,autoComplete:w,inputMode:h,invalid:L,prefix:R,suffix:N,incrementTrigger:S,decrementTrigger:k,children:B,onValueChange:T,onInvalidValue:D,...$},q){const J=f.useRef(null);return f.useImperativeHandle(q,()=>J.current),f.useEffect(()=>{const P=J.current;if(!P)return;const F=x=>{const H=x.detail;H&&(T==null||T(H))},j=x=>{const H=x.detail;H!=null&&H.reason&&(D==null||D(H.reason))};return P.addEventListener("value-change",F),P.addEventListener("invalid",j),()=>{P.removeEventListener("value-change",F),P.removeEventListener("invalid",j)}},[D,T]),hn(()=>{const P=J.current;if(!P)return;const F=(x,H)=>{const I=P.getAttribute(x);if(H==null){I!=null&&P.removeAttribute(x);return}I!==H&&P.setAttribute(x,H)},j=(x,H)=>{H?P.hasAttribute(x)||P.setAttribute(x,""):P.hasAttribute(x)&&P.removeAttribute(x)};F("value",e!=null&&e!==""?String(e):null),F("min",t!=null?String(t):null),F("max",i!=null?String(i):null),F("step",r!=null?String(r):null),F("precision",l!=null?String(l):null),F("locale",d??null),F("format",c&&c!=="grouped"?c:null),F("placeholder",s??null),F("label",u??null),F("description",A??null),F("data-error",n??null),F("name",p??null),F("autocomplete",w??null),F("inputmode",h??null),j("required",E),j("disabled",y),j("readonly",v),j("allow-wheel",b),j("show-steppers",m),j("clamp-on-blur",o),j("invalid",L)},[w,b,o,A,y,n,c,h,L,u,d,i,t,p,s,l,v,E,m,r,e]),g.default.createElement("ui-number-field",{ref:J,...$},R!=null?g.default.createElement("span",{slot:"prefix"},R):null,N!=null?g.default.createElement("span",{slot:"suffix"},N):null,k!=null?g.default.createElement("span",{slot:"decrement-trigger"},k):null,S!=null?g.default.createElement("span",{slot:"increment-trigger"},S):null,B)});dt.displayName="NumberField";const Nn=typeof window<"u"?f.useLayoutEffect:f.useEffect,mt=g.default.forwardRef(function({options:e,value:t,placeholder:i,label:r,description:l,error:d,name:c,required:s,disabled:u,readOnly:A,loading:n,loadingText:p,clearable:E,maxSelections:y,renderLimit:v,selectionIndicator:b,optionBorder:m,variant:o,tone:w,density:h,shape:L,radius:R,optionRadius:N,elevation:S,size:k,onChange:B,onValueChange:T,children:D,...$},q){const J=f.useRef(null);return f.useImperativeHandle(q,()=>J.current),f.useEffect(()=>{const P=J.current;if(!P)return;const F=j=>{const x=j.detail;x&&(B==null||B(x),T==null||T(x.value))};return P.addEventListener("change",F),()=>{P.removeEventListener("change",F)}},[B,T]),Nn(()=>{const P=J.current;if(!P)return;const F=(x,H)=>{const I=P.getAttribute(x);if(H==null){I!=null&&P.removeAttribute(x);return}I!==H&&P.setAttribute(x,H)},j=(x,H)=>{H?P.hasAttribute(x)||P.setAttribute(x,""):P.hasAttribute(x)&&P.removeAttribute(x)};F("options",JSON.stringify(e||[])),F("value",t!=null&&t.length?JSON.stringify(t):null),F("placeholder",i??null),F("label",r??null),F("description",l??null),F("data-error",d??null),F("name",c??null),F("max-selections",typeof y=="number"?String(y):null),F("render-limit",typeof v=="number"?String(v):null),F("loading-text",p??null),F("selection-indicator",b??null),j("option-border",m),F("variant",o&&o!=="default"?o:null),F("tone",w&&w!=="default"?w:null),F("density",h&&h!=="default"?h:null),F("shape",L&&L!=="default"?L:null),F("radius",R!=null?String(R):null),F("option-radius",N!=null?String(N):null),F("elevation",S&&S!=="low"?S:null),F("size",k&&k!=="md"&&k!=="2"?k:null),j("required",s),j("disabled",u),j("readonly",A),j("loading",n),j("clearable",E)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k]),g.default.createElement("ui-multi-select",{ref:J,...$},D)});mt.displayName="MultiSelect";const Rn=typeof window<"u"?f.useLayoutEffect:f.useEffect,bt=g.default.forwardRef(function({children:e,label:t,menuLabel:i,menuHeading:r,menuDescription:l,variant:d,density:c,menuDensity:s,menuShape:u,disabled:A,items:n,onPrimaryAction:p,onSelect:E,...y},v){const b=f.useRef(null);f.useImperativeHandle(v,()=>b.current),f.useEffect(()=>{const o=b.current;if(!o)return;const w=()=>p==null?void 0:p(),h=L=>E==null?void 0:E(L.detail);return o.addEventListener("primary-action",w),o.addEventListener("select",h),()=>{o.removeEventListener("primary-action",w),o.removeEventListener("select",h)}},[p,E]),Rn(()=>{const o=b.current;o&&(t?o.setAttribute("label",t):o.removeAttribute("label"),i?o.setAttribute("menu-label",i):o.removeAttribute("menu-label"),r?o.setAttribute("menu-heading",r):o.removeAttribute("menu-heading"),l?o.setAttribute("menu-description",l):o.removeAttribute("menu-description"),d&&d!=="primary"?o.setAttribute("variant",d):o.removeAttribute("variant"),c&&c!=="default"?o.setAttribute("density",c):o.removeAttribute("density"),s&&s!=="default"?o.setAttribute("menu-density",s):o.removeAttribute("menu-density"),u&&u!=="default"?o.setAttribute("menu-shape",u):o.removeAttribute("menu-shape"),A?o.setAttribute("disabled",""):o.removeAttribute("disabled"))},[t,i,r,l,d,c,s,u,A]);const m=(n==null?void 0:n.map(o=>g.default.createElement("button",{key:o.value,slot:"menuitem",type:"button","data-value":o.value,"data-label":o.label,"data-tone":o.tone||"default",disabled:o.disabled},g.default.createElement("span",{"data-menu-text":"true"},g.default.createElement("span",{"data-menu-label":"true"},o.label),o.description?g.default.createElement("span",{"data-menu-description":"true"},o.description):null),o.shortcut?g.default.createElement("span",{"data-menu-shortcut":"true"},o.shortcut):null)))||null;return g.default.createElement("ui-split-button",{ref:b,...y},m,e)});bt.displayName="SplitButton";const Sn=typeof window<"u"?f.useLayoutEffect:f.useEffect,vt=g.default.forwardRef(function({options:e,value:t,label:i,description:r,error:l,name:d,disabled:c,onChange:s,onValueChange:u,children:A,...n},p){const E=f.useRef(null);return f.useImperativeHandle(p,()=>E.current),f.useEffect(()=>{const y=E.current;if(!y)return;const v=b=>{const m=b.detail;s==null||s(m),u==null||u(m.value)};return y.addEventListener("change",v),()=>y.removeEventListener("change",v)},[s,u]),Sn(()=>{const y=E.current;if(!y)return;const v=(b,m)=>{m==null?y.removeAttribute(b):y.setAttribute(b,m)};v("options",JSON.stringify(e||[])),v("value",t!=null&&t.length?JSON.stringify(t):null),v("label",i??null),v("description",r??null),v("error",l??null),v("name",d??null),c?y.setAttribute("disabled",""):y.removeAttribute("disabled")},[e,t,i,r,l,d,c]),g.default.createElement("ui-transfer-list",{ref:E,...n},A)});vt.displayName="TransferList";const Hn=typeof window<"u"?f.useLayoutEffect:f.useEffect,pt=g.default.forwardRef(function({value:e,placeholder:t,editing:i,multiline:r,disabled:l,readOnly:d,name:c,onChange:s,onValueChange:u,onSave:A,onCancel:n,children:p,...E},y){const v=f.useRef(null);return f.useImperativeHandle(y,()=>v.current),f.useEffect(()=>{const b=v.current;if(!b)return;const m=h=>{const L=h.detail;s==null||s(L),u==null||u(L.value)},o=h=>A==null?void 0:A(h.detail),w=h=>n==null?void 0:n(h.detail.value);return b.addEventListener("change",m),b.addEventListener("save",o),b.addEventListener("cancel",w),()=>{b.removeEventListener("change",m),b.removeEventListener("save",o),b.removeEventListener("cancel",w)}},[s,u,A,n]),Hn(()=>{const b=v.current;if(!b)return;const m=(o,w)=>{w==null?b.removeAttribute(o):b.setAttribute(o,w)};m("value",e??null),m("placeholder",t??null),m("name",c??null),i?b.setAttribute("editing",""):b.removeAttribute("editing"),r?b.setAttribute("multiline",""):b.removeAttribute("multiline"),l?b.setAttribute("disabled",""):b.removeAttribute("disabled"),d?b.setAttribute("readonly",""):b.removeAttribute("readonly")},[e,t,c,i,r,l,d]),g.default.createElement("ui-inline-edit",{ref:v,...E},p)});pt.displayName="InlineEdit";const kn=typeof window<"u"?f.useLayoutEffect:f.useEffect,At=g.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,format:l,step:d,seconds:c,stepSeconds:s,min:u,max:A,disabled:n,readOnly:p,required:E,name:y,clearable:v,allowInput:b,mode:m,label:o,hint:w,error:h,locale:L,translations:R,variant:N,onInput:S,onChange:k,onValueChange:B,onOpen:T,onClose:D,onInvalid:$,children:q,...J},P){const F=f.useRef(null);return f.useImperativeHandle(P,()=>F.current),f.useEffect(()=>{const j=F.current;if(!j)return;const x=M=>{const _=M.detail;_&&(S==null||S(_))},H=M=>{const _=M.detail;_&&(k==null||k(_),B==null||B(_.value))},I=M=>{const _=M.detail;_&&($==null||$(_))};return j.addEventListener("input",x),j.addEventListener("change",H),j.addEventListener("open",T),j.addEventListener("close",D),j.addEventListener("invalid",I),()=>{j.removeEventListener("input",x),j.removeEventListener("change",H),j.removeEventListener("open",T),j.removeEventListener("close",D),j.removeEventListener("invalid",I)}},[S,k,B,T,D,$]),kn(()=>{const j=F.current;if(!j)return;const x=(I,M)=>{const _=j.getAttribute(I);M==null?_!=null&&j.removeAttribute(I):_!==M&&j.setAttribute(I,M)},H=(I,M)=>{M?x(I,""):x(I,null)};x("value",e??null),x("default-value",t??null),typeof i=="boolean"?H("open",i):x("open",null),H("default-open",r),x("format",l&&l!=="24h"?l:null),x("step",typeof d=="number"?String(d):null),H("seconds",c),x("step-seconds",typeof s=="number"?String(s):null),x("min",u??null),x("max",A??null),H("disabled",n),H("readonly",p),H("required",E),x("name",y??null),H("clearable",v),H("allow-input",b),x("mode",m&&m!=="popover"?m:null),x("label",o??null),x("hint",w??null),x("error",h??null),x("locale",L??null),x("translations",ie.serializeTranslations(R)),x("variant",N&&N!=="default"?N:null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N]),g.default.createElement("ui-time-picker",{ref:F,...J},q)});At.displayName="TimePicker";const Pn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Et=g.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:u,size:A,bare:n,variant:p,step:E,format:y,disabled:v,readOnly:b,required:m,name:o,closeOnSelect:w,clearable:h,allowInput:L,mode:R,showFooter:N,label:S,hint:k,error:B,onInput:T,onChange:D,onValueChange:$,onOpen:q,onClose:J,onInvalid:P,children:F,...j},x){const H=f.useRef(null);return f.useImperativeHandle(x,()=>H.current),f.useEffect(()=>{const I=H.current;if(!I)return;const M=U=>{const G=U.detail;G&&(T==null||T(G))},_=U=>{const G=U.detail;G&&(D==null||D(G),$==null||$(G.value))},W=U=>{const G=U.detail;G&&(P==null||P(G))};return I.addEventListener("input",M),I.addEventListener("change",_),I.addEventListener("open",q),I.addEventListener("close",J),I.addEventListener("invalid",W),()=>{I.removeEventListener("input",M),I.removeEventListener("change",_),I.removeEventListener("open",q),I.removeEventListener("close",J),I.removeEventListener("invalid",W)}},[T,D,$,q,J,P]),Pn(()=>{const I=H.current;if(!I)return;const M=(W,U)=>{const G=I.getAttribute(W);U==null?G!=null&&I.removeAttribute(W):G!==U&&I.setAttribute(W,U)},_=(W,U)=>{U?M(W,""):M(W,null)};M("value",e??null),M("default-value",t??null),typeof i=="boolean"?_("open",i):M("open",null),_("default-open",r),M("min",l??null),M("max",d??null),M("locale",c??null),M("translations",ie.serializeTranslations(s)),M("week-start",typeof u=="number"?String(u):null),M("size",A&&A!=="md"?A:null),_("bare",n),M("variant",p&&p!=="default"?p:null),M("step",typeof E=="number"?String(E):null),M("format",y&&y!=="24h"?y:null),_("disabled",v),_("readonly",b),_("required",m),M("name",o??null),_("close-on-select",w),_("clearable",h),_("allow-input",L),M("mode",R&&R!=="popover"?R:null),M("show-footer",typeof N=="boolean"?String(N):null),M("label",S??null),M("hint",k??null),M("error",B??null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k,B]),g.default.createElement("ui-date-time-picker",{ref:H,...j},F)});Et.displayName="DateTimePicker";const In=typeof window<"u"?f.useLayoutEffect:f.useEffect,yt=g.default.forwardRef(function({value:e,defaultValue:t,open:i,defaultOpen:r,min:l,max:d,locale:c,translations:s,weekStart:u,size:A,bare:n,variant:p,step:E,autoNormalize:y,allowPartial:v,disabled:b,readOnly:m,required:o,name:w,closeOnSelect:h,clearable:L,mode:R,showFooter:N,label:S,hint:k,error:B,onInput:T,onChange:D,onValueChange:$,onOpen:q,onClose:J,onInvalid:P,children:F,...j},x){const H=f.useRef(null);return f.useImperativeHandle(x,()=>H.current),f.useEffect(()=>{const I=H.current;if(!I)return;const M=U=>{const G=U.detail;G&&(T==null||T(G))},_=U=>{const G=U.detail;G&&(D==null||D(G),$==null||$(G.value?JSON.stringify(G.value):null))},W=U=>{const G=U.detail;G&&(P==null||P(G))};return I.addEventListener("input",M),I.addEventListener("change",_),I.addEventListener("open",q),I.addEventListener("close",J),I.addEventListener("invalid",W),()=>{I.removeEventListener("input",M),I.removeEventListener("change",_),I.removeEventListener("open",q),I.removeEventListener("close",J),I.removeEventListener("invalid",W)}},[T,D,$,q,J,P]),In(()=>{const I=H.current;if(!I)return;const M=(W,U)=>{const G=I.getAttribute(W);U==null?G!=null&&I.removeAttribute(W):G!==U&&I.setAttribute(W,U)},_=(W,U)=>{U?M(W,""):M(W,null)};M("value",e??null),M("default-value",t??null),typeof i=="boolean"?_("open",i):M("open",null),_("default-open",r),M("min",l??null),M("max",d??null),M("locale",c??null),M("translations",ie.serializeTranslations(s)),M("week-start",typeof u=="number"?String(u):null),M("size",A&&A!=="md"?A:null),_("bare",n),M("variant",p&&p!=="default"?p:null),M("step",typeof E=="number"?String(E):null),_("auto-normalize",y),_("allow-partial",v),_("disabled",b),_("readonly",m),_("required",o),M("name",w??null),_("close-on-select",h),_("clearable",L),M("mode",R&&R!=="popover"?R:null),M("show-footer",typeof N=="boolean"?String(N):null),M("label",S??null),M("hint",k??null),M("error",B??null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k,B]),g.default.createElement("ui-date-range-time-picker",{ref:H,...j},F)});yt.displayName="DateRangeTimePicker";const Tn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Lt=g.default.forwardRef(function({tasks:e,variant:t,headless:i,children:r,...l},d){const c=f.useRef(null);return f.useImperativeHandle(d,()=>c.current),Tn(()=>{const s=c.current;if(!s)return;const u=(n,p)=>{const E=s.getAttribute(n);if(p==null){E!=null&&s.removeAttribute(n);return}E!==p&&s.setAttribute(n,p)},A=(n,p)=>{p?u(n,""):u(n,null)};if(e&&e.length)try{u("tasks",JSON.stringify(e))}catch{u("tasks",null)}else u("tasks",null);u("variant",t&&t!=="default"?t:null),A("headless",i)},[e,t,i]),g.default.createElement("ui-gantt",{ref:c,...l},r)});Lt.displayName="Gantt";const Dn=typeof window<"u"?f.useLayoutEffect:f.useEffect,gt=g.default.forwardRef(function({steps:e,value:t,orientation:i,variant:r,size:l,clickable:d,linear:c,headless:s,onChange:u,onSelect:A,children:n,...p},E){const y=f.useRef(null);return f.useImperativeHandle(E,()=>y.current),f.useEffect(()=>{const v=y.current;if(!v)return;const b=o=>{const w=o.detail;w&&(u==null||u(w))},m=o=>{const w=o.detail;w&&(A==null||A(w))};return v.addEventListener("change",b),v.addEventListener("select",m),()=>{v.removeEventListener("change",b),v.removeEventListener("select",m)}},[u,A]),Dn(()=>{const v=y.current;if(!v)return;const b=(o,w)=>{const h=v.getAttribute(o);if(w==null){h!=null&&v.removeAttribute(o);return}h!==w&&v.setAttribute(o,w)},m=(o,w)=>{w?b(o,""):b(o,null)};if(e&&e.length)try{b("steps",JSON.stringify(e))}catch{b("steps",null)}else b("steps",null);b("value",t||null),b("orientation",i&&i!=="horizontal"?i:null),b("variant",r&&r!=="default"?r:null),b("size",l&&l!=="md"?l:null),m("clickable",d),m("linear",c),m("headless",s)},[e,t,i,r,l,d,c,s]),g.default.createElement("ui-stepper",{ref:y,...p},n)});gt.displayName="Stepper";const Fn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ne=g.default.createContext(null);function Se(a){const{selected:e,orientation:t,activation:i,variant:r,size:l,radius:d,elevation:c,tone:s,loop:u,collapsible:A,headless:n,onChange:p,onSelect:E,children:y,...v}=a,b=f.useRef(null);return f.useEffect(()=>{const m=b.current;if(!m)return;const o=w=>{const h=w.detail;h&&(p==null||p(h),E==null||E(h.selected))};return m.addEventListener("change",o),()=>m.removeEventListener("change",o)},[p,E]),Fn(()=>{const m=b.current;m&&(typeof e=="number"?m.setAttribute("selected",String(e)):m.removeAttribute("selected"),t?m.setAttribute("orientation",t):m.removeAttribute("orientation"),i?m.setAttribute("activation",i):m.removeAttribute("activation"),r&&r!=="surface"?m.setAttribute("variant",r):m.removeAttribute("variant"),l&&l!=="md"&&l!=="2"?m.setAttribute("size",l):m.removeAttribute("size"),d==null||d===""||d==="default"?m.removeAttribute("radius"):m.setAttribute("radius",String(d)),c&&c!=="low"?m.setAttribute("elevation",c):m.removeAttribute("elevation"),s&&s!=="default"?m.setAttribute("tone",s):m.removeAttribute("tone"),typeof u=="boolean"?m.setAttribute("loop",String(u)):m.removeAttribute("loop"),A?m.setAttribute("collapsible",""):m.removeAttribute("collapsible"),n?m.setAttribute("headless",""):m.removeAttribute("headless"))},[e,t,i,r,l,d,c,s,u,A,n]),g.default.createElement("ui-navigation-menu",{ref:b,...v},y)}function wt({children:a}){return g.default.createElement(g.default.Fragment,null,a)}function ht({children:a}){const e=f.useRef(`ui-nav-item-${Math.random().toString(36).slice(2,10)}`),[t,i]=f.useState(!1);return g.default.createElement(Ne.Provider,{value:{itemKey:e.current,hasContent:t,setHasContent:i}},a)}function Nt({children:a,...e}){const t=g.default.useContext(Ne),i=f.useRef(null),[r,l]=f.useState(!1);return f.useEffect(()=>{const d=i.current;if(!d)return;const c=()=>{l(d.getAttribute("aria-expanded")==="true")};c();const s=new MutationObserver(c);return s.observe(d,{attributes:!0,attributeFilter:["aria-expanded"]}),()=>s.disconnect()},[]),g.default.createElement("button",{type:"button",ref:i,slot:"item","data-nav-key":(t==null?void 0:t.itemKey)??void 0,...e},a,t!=null&&t.hasContent?g.default.createElement("span",{"aria-hidden":"true",style:{marginLeft:6,display:"inline-flex",alignItems:"center",lineHeight:1}},g.default.createElement("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{display:"block",transform:r?"rotate(180deg)":"rotate(0deg)",transition:"transform 180ms cubic-bezier(0.2, 0.9, 0.24, 1)"}},g.default.createElement("path",{d:"M3 4.75L6 7.25L9 4.75",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))):null)}function Rt({children:a,...e}){const t=g.default.useContext(Ne);return g.default.createElement("a",{slot:"item","data-nav-key":(t==null?void 0:t.itemKey)??void 0,...e},a)}function St({children:a,...e}){const t=g.default.useContext(Ne);return f.useEffect(()=>{if(t)return t.setHasContent(!0),()=>t.setHasContent(!1)},[t]),g.default.createElement("section",{slot:"panel","data-nav-panel-for":(t==null?void 0:t.itemKey)??void 0,...e},a)}function Ht(){return null}function kt(){return null}const $n=Object.assign(Se,{Root:Se,List:wt,Item:ht,Trigger:Nt,Link:Rt,Content:St,Indicator:Ht,Viewport:kt}),xn=typeof window<"u"?g.default.useLayoutEffect:g.default.useEffect,Pt=g.default.forwardRef(function(e,t){const{open:i,title:r,description:l,closable:d,dismissible:c,closeOnOverlay:s,closeOnEsc:u,lockWhileLoading:A,roleType:n,size:p,state:E,initialFocus:y,submitText:v,cancelText:b,loadingText:m,dialogId:o,config:w,headless:h,onOpen:L,onClose:R,onRequestClose:N,onDialogOpen:S,onDialogSubmit:k,onDialogCancel:B,onDialogDismiss:T,onDialogClose:D,children:$,...q}=e,J=f.useRef(null);return g.default.useImperativeHandle(t,()=>J.current),f.useEffect(()=>{const P=J.current;if(!P)return;const F=()=>L==null?void 0:L(),j=()=>R==null?void 0:R(),x=U=>{const G=U.detail;G&&(N==null||N(G))},H=U=>S==null?void 0:S(U.detail),I=U=>k==null?void 0:k(U.detail),M=U=>B==null?void 0:B(U.detail),_=U=>T==null?void 0:T(U.detail),W=U=>D==null?void 0:D(U.detail);return P.addEventListener("open",F),P.addEventListener("close",j),P.addEventListener("request-close",x),P.addEventListener("ui-open",H),P.addEventListener("ui-submit",I),P.addEventListener("ui-cancel",M),P.addEventListener("ui-dismiss",_),P.addEventListener("ui-close",W),()=>{P.removeEventListener("open",F),P.removeEventListener("close",j),P.removeEventListener("request-close",x),P.removeEventListener("ui-open",H),P.removeEventListener("ui-submit",I),P.removeEventListener("ui-cancel",M),P.removeEventListener("ui-dismiss",_),P.removeEventListener("ui-close",W)}},[L,R,N,S,k,B,T,D]),xn(()=>{const P=J.current;if(!P)return;typeof i=="boolean"&&(i?P.setAttribute("open",""):P.removeAttribute("open")),r?P.setAttribute("title",r):P.removeAttribute("title"),l?P.setAttribute("description",l):P.removeAttribute("description");const F=typeof c=="boolean"?c:d;typeof F=="boolean"?(P.setAttribute("dismissible",String(F)),P.setAttribute("closable",String(F))):(P.removeAttribute("dismissible"),P.removeAttribute("closable")),typeof s=="boolean"?(P.setAttribute("close-on-overlay",String(s)),P.setAttribute("close-on-backdrop",String(s))):(P.removeAttribute("close-on-overlay"),P.removeAttribute("close-on-backdrop")),typeof u=="boolean"?P.setAttribute("close-on-esc",String(u)):P.removeAttribute("close-on-esc"),typeof A=="boolean"?P.setAttribute("lock-while-loading",String(A)):P.removeAttribute("lock-while-loading"),n?P.setAttribute("role",n):P.removeAttribute("role"),p&&p!=="md"&&p!=="2"?P.setAttribute("size",p):P.removeAttribute("size"),E&&E!=="idle"?P.setAttribute("state",E):P.removeAttribute("state"),y?P.setAttribute("initial-focus",y):P.removeAttribute("initial-focus"),v?P.setAttribute("submit-text",v):P.removeAttribute("submit-text"),b?P.setAttribute("cancel-text",b):P.removeAttribute("cancel-text"),m?P.setAttribute("loading-text",m):P.removeAttribute("loading-text"),o&&(P.dialogId=o),w&&(P.config=w),h?P.setAttribute("headless",""):P.removeAttribute("headless")},[i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h]),g.default.createElement("ui-dialog",{ref:J,...q},$)});Pt.displayName="Dialog";const It=f.createContext(null),Ae="data-ui-dialog-react-host-refcount";function qn({children:a,hostId:e="ui-dialog-react-host"}){const t=f.useRef(null);t.current||(t.current=se.createDialogManager()),f.useEffect(()=>{var c;if(typeof document>"u")return;let r=document.getElementById(e);const l=!r;r||(r=document.createElement("div"),r.id=e,r.setAttribute("data-ui-dialog-react-host","true"),document.body.appendChild(r));const d=Number(r.getAttribute(Ae)||"0");return r.setAttribute(Ae,String(Math.max(0,d)+1)),(c=t.current)==null||c.setContainer(r),()=>{var A,n;if((A=t.current)==null||A.destroy("unmount"),t.current=null,!r||!r.isConnected)return;const s=Number(r.getAttribute(Ae)||"1"),u=Math.max(0,s-1);u===0?(r.removeAttribute(Ae),l&&((n=r.parentElement)==null||n.removeChild(r))):r.setAttribute(Ae,String(u))}},[e]);const i=f.useMemo(()=>({open:(r={})=>{var l;return((l=t.current)==null?void 0:l.open(r))??Promise.resolve({id:"",action:"dismiss"})},confirm:(r={})=>{var l;return((l=t.current)==null?void 0:l.confirm(r))??Promise.resolve({id:"",action:"dismiss"})}}),[]);return g.default.createElement(It.Provider,{value:i},a)}function Mn(){const a=f.useContext(It);if(!a)throw new Error("useDialog must be used within <DialogProvider>.");return a}const Bn=typeof window<"u"?f.useLayoutEffect:f.useEffect,Tt=g.default.forwardRef(function({children:e,name:t,iconVariant:i,size:r,color:l,secondaryColor:d,variant:c,tone:s,shape:u,spin:A,pulse:n,badge:p,label:E,decorative:y,strokeWidth:v,absoluteStrokeWidth:b,strokeLinecap:m,strokeLinejoin:o,rotate:w,flip:h,rtl:L,...R},N){const S=f.useRef(null);return f.useImperativeHandle(N,()=>S.current),Bn(()=>{const k=S.current;k&&(t?k.setAttribute("name",t):k.removeAttribute("name"),i?k.setAttribute("icon-variant",i):k.removeAttribute("icon-variant"),r!=null&&r!==""?k.setAttribute("size",String(r)):k.removeAttribute("size"),l?k.setAttribute("color",l):k.removeAttribute("color"),d?k.setAttribute("secondary-color",d):k.removeAttribute("secondary-color"),c&&c!=="default"?k.setAttribute("variant",c):k.removeAttribute("variant"),s&&s!=="default"?k.setAttribute("tone",s):k.removeAttribute("tone"),u&&u!=="default"?k.setAttribute("shape",u):k.removeAttribute("shape"),A?k.setAttribute("spin",""):k.removeAttribute("spin"),n?k.setAttribute("pulse",""):k.removeAttribute("pulse"),p?k.setAttribute("badge",""):k.removeAttribute("badge"),E?k.setAttribute("label",E):k.removeAttribute("label"),y?k.setAttribute("decorative",""):k.removeAttribute("decorative"),v!=null&&v!==""?k.setAttribute("stroke-width",String(v)):k.removeAttribute("stroke-width"),b?k.setAttribute("absolute-stroke-width",""):k.removeAttribute("absolute-stroke-width"),m?k.setAttribute("stroke-linecap",m):k.removeAttribute("stroke-linecap"),o?k.setAttribute("stroke-linejoin",o):k.removeAttribute("stroke-linejoin"),w!=null&&Number.isFinite(w)?k.setAttribute("rotate",String(w)):k.removeAttribute("rotate"),h?k.setAttribute("flip",h):k.removeAttribute("flip"),L?k.setAttribute("rtl",""):k.removeAttribute("rtl"))},[t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L]),g.default.createElement("ui-icon",{ref:S,...R},e)});Tt.displayName="Icon";function me(a){if(!a)return{};const e={...a};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}function jn(a,e={}){return te.toastAdvanced.show({message:a,level:"info",...me(e)})}const Fe={show(a,e={}){return te.toastAdvanced.show({message:a,...me(e)})},success(a,e={}){return te.toastAdvanced.success(a,me(e))},error(a,e={}){return te.toastAdvanced.error(a,me(e))},warning(a,e={}){return te.toastAdvanced.warning(a,me(e))},info(a,e={}){return te.toastAdvanced.info(a,me(e))},loading(a,e={}){return te.toastAdvanced.loading(a,me(e))},dismiss(a){return te.toastAdvanced.dismiss(String(a))},clear(){return te.toastAdvanced.clear()},configure(a){return te.toastAdvanced.configure(a)}},Dt=f.createContext(null);function Gn({config:a}={}){return f.useEffect(()=>{a&&te.toastAdvanced.configure(a)},[a]),null}function Jn({children:a,config:e}){f.useEffect(()=>{e&&te.toastAdvanced.configure(e)},[e]);const t=f.useMemo(()=>Fe,[]);return g.default.createElement(Dt.Provider,{value:t},a)}function _n(){const a=f.useContext(Dt);return a||Fe}const Un=typeof window<"u"?f.useLayoutEffect:f.useEffect;function Qn(a){if(!a)return{};const e={...a};return e.type!=null&&e.level==null&&(e.level=e.type),delete e.type,e}const Ft=g.default.forwardRef(function({children:e,position:t,maxVisible:i,theme:r,config:l,headless:d,onShow:c,onHide:s,...u},A){const n=f.useRef(c),p=f.useRef(s);return f.useEffect(()=>{n.current=c},[c]),f.useEffect(()=>{p.current=s},[s]),f.useImperativeHandle(A,()=>({show(E,y){let v="";const b=Qn(y),m=b.onShow,o=b.onHide;return v=te.toastAdvanced.show({message:E,...b,onShow:()=>{var h;m==null||m(),(h=n.current)==null||h.call(n,{id:v,message:E})},onHide:()=>{var h;o==null||o(),(h=p.current)==null||h.call(p,{id:v})}}).id,v},hide(E){te.toastAdvanced.dismiss(String(E))},clear(){te.toastAdvanced.clear()},configure(E){te.toastAdvanced.configure(E)}}),[]),Un(()=>{const E={...l||{}};t&&(E.position=t),r&&(E.theme=r),typeof i=="number"&&Number.isFinite(i)&&(E.maxVisible=Math.max(1,Math.trunc(i))),Object.keys(E).length>0&&te.toastAdvanced.configure(E)},[t,i,r,l]),e==null&&Object.keys(u).length===0?null:g.default.createElement("div",{...u},e)});Ft.displayName="Toast";const Wn=typeof window<"u"?g.useLayoutEffect:g.useEffect,$t=g.forwardRef(function({children:e,orientation:t,variant:i,tone:r,state:l,elevation:d,size:c,radius:s,density:u,wrap:A,loop:n,disabled:p,activeIndex:E,ariaLabel:y,onNavigate:v,...b},m){const o=g.useRef(null);return g.useImperativeHandle(m,()=>o.current),g.useEffect(()=>{ie.warnIfElementNotRegistered("ui-block-controls","BlockControls")},[]),g.useEffect(()=>{const w=o.current;if(!w||!v)return;const h=L=>v(L.detail);return w.addEventListener("ui-navigate",h),()=>w.removeEventListener("ui-navigate",h)},[v]),Wn(()=>{const w=o.current;w&&(t?w.setAttribute("orientation",t):w.removeAttribute("orientation"),i&&i!=="surface"&&i!=="floating"?w.setAttribute("variant",i):w.removeAttribute("variant"),r&&r!=="neutral"?w.setAttribute("tone",r):w.removeAttribute("tone"),l&&l!=="idle"?w.setAttribute("state",l):w.removeAttribute("state"),d&&d!=="low"&&d!=="md"?w.setAttribute("elevation",d):w.removeAttribute("elevation"),c&&c!=="md"&&c!=="2"?w.setAttribute("size",c):w.removeAttribute("size"),s!=null?w.setAttribute("radius",String(s)):w.removeAttribute("radius"),u?w.setAttribute("density",u):w.removeAttribute("density"),A==null?w.removeAttribute("wrap"):A?w.setAttribute("wrap",""):w.removeAttribute("wrap"),n==null?(w.removeAttribute("loop"),w.removeAttribute("no-loop")):n?(w.setAttribute("loop",""),w.removeAttribute("no-loop")):(w.removeAttribute("loop"),w.setAttribute("no-loop","")),p==null?w.removeAttribute("disabled"):p?w.setAttribute("disabled",""):w.removeAttribute("disabled"),typeof E=="number"&&Number.isFinite(E)?w.setAttribute("active-index",String(E)):w.removeAttribute("active-index"),y?w.setAttribute("aria-label",y):w.removeAttribute("aria-label"))},[t,i,r,l,d,c,s,u,A,n,p,E,y]),g.createElement("ui-block-controls",{ref:o,...b},e)});$t.displayName="BlockControls";function Xn(a){const{items:e,anchorId:t,anchorEl:i,anchorPoint:r,open:l,disabled:d,state:c,stateText:s,variant:u,size:A,radius:n,density:p,shape:E,elevation:y,tone:v,closeOnSelect:b,closeOnEscape:m,typeahead:o,children:w,onOpenDetail:h,onCloseDetail:L,onOpen:R,onClose:N,onChange:S,onSelect:k,...B}=a,T=f.useRef(null),D=f.useRef(""),[$,q]=f.useState(null),J=H=>{queueMicrotask(()=>{var I;q(((I=H.getPortalContentHost)==null?void 0:I.call(H))||null)}),requestAnimationFrame(()=>{var I;q(((I=H.getPortalContentHost)==null?void 0:I.call(H))||null)}),window.setTimeout(()=>{var I;q(((I=H.getPortalContentHost)==null?void 0:I.call(H))||null)},0)};f.useEffect(()=>{const H=T.current;if(!H)return;const I=U=>{var Q;const G=U.detail;q(((Q=H.getPortalContentHost)==null?void 0:Q.call(H))||null),R==null||R(),G&&(h==null||h(G))},M=U=>{const G=U.detail;q(null),N==null||N(),G&&(L==null||L(G))},_=U=>{var Q;const G=(Q=U.detail)==null?void 0:Q.open;typeof G=="boolean"&&(S==null||S(G))},W=U=>{const G=U.detail;k==null||k(G)};return H.addEventListener("open",I),H.addEventListener("close",M),H.addEventListener("change",_),H.addEventListener("select",W),()=>{H.removeEventListener("open",I),H.removeEventListener("close",M),H.removeEventListener("change",_),H.removeEventListener("select",W)}},[R,N,h,L,S,k]),f.useEffect(()=>{var I,M,_,W,U,G;const H=T.current;if(!(!H||l==null)){if(!l){D.current="closed",q(null),H.close?H.close():H.open=!1;return}if(r&&H.openAt){const Q=`point:${r.x}:${r.y}`;(D.current!==Q||!H.open)&&(H.openAt(r),D.current=Q),q(((I=H.getPortalContentHost)==null?void 0:I.call(H))||null),J(H);return}if(i){const Q="anchor:element";if(H.openForAnchor){(D.current!==Q||!H.open)&&(H.openForAnchor(i),D.current=Q),q(((M=H.getPortalContentHost)==null?void 0:M.call(H))||null),J(H);return}if(H.openFor){(D.current!==Q||!H.open)&&(H.openFor(i),D.current=Q),q(((_=H.getPortalContentHost)==null?void 0:_.call(H))||null),J(H);return}}if(t){const Q=`anchor:${t}`;if(H.openForAnchorId){(D.current!==Q||!H.open)&&(H.openForAnchorId(t),D.current=Q),q(((W=H.getPortalContentHost)==null?void 0:W.call(H))||null),J(H);return}if(H.showForAnchorId){(D.current!==Q||!H.open)&&(H.showForAnchorId(t),D.current=Q),q(((U=H.getPortalContentHost)==null?void 0:U.call(H))||null),J(H);return}}H.open||(H.open=!0),D.current="open",q(((G=H.getPortalContentHost)==null?void 0:G.call(H))||null),J(H)}},[l,t,i,r]),f.useEffect(()=>{var I;const H=T.current;!$||!H||!l||(I=H.refreshLayout)==null||I.call(H)},[w,e,l,$]);const P=H=>H?H.map((I,M)=>{if(I.separator)return g.default.createElement("div",{key:M,className:"separator",role:"separator"});let _=null;I.icon&&(_=g.default.createElement("span",{className:"icon"},I.icon));let W=null;return I.submenu&&(W=g.default.createElement("div",{className:"submenu"},P(I.submenu))),g.default.createElement("div",{key:M,className:"menuitem",role:"menuitem",tabIndex:I.disabled?-1:0,"aria-disabled":I.disabled?"true":void 0,"data-value":I.value,"data-tone":I.tone&&I.tone!=="default"?I.tone:void 0,onClick:I.disabled?void 0:I.onClick},_,g.default.createElement("span",{className:"label"},g.default.createElement("span",{className:"text"},I.label),I.description?g.default.createElement("span",{className:"caption"},I.description):null),I.shortcut?g.default.createElement("span",{className:"shortcut"},I.shortcut):null,I.submenu&&g.default.createElement("span",{className:"submenu-arrow"},"▶"),W)}):null,F=g.default.Children.count(w)>0,j=!!l&&!r&&!t,x=F?w:P(e);return g.default.createElement(g.default.Fragment,null,g.default.createElement("ui-context-menu",{ref:T,...B,...j?{open:""}:{},...u&&u!=="default"&&u!=="surface"?{variant:u}:{},...A&&A!=="md"&&A!=="2"?{size:A}:{},...n!=null&&n!==""&&n!=="md"?{radius:String(n)}:{},...!A&&p&&p!=="default"?{density:p}:{},...!n&&E&&E!=="default"?{shape:E}:{},...y&&y!=="default"?{elevation:y}:{},...v&&v!=="default"&&v!=="brand"?{tone:v}:{},...d?{disabled:""}:{},...c&&c!=="idle"?{state:c}:{},...s?{"state-text":s}:{},...b==null?{}:{"close-on-select":b?"true":"false"},...m==null?{}:{"close-on-escape":m?"true":"false"},...o==null?{}:{typeahead:o?"true":"false"}}),$?$r.createPortal(g.default.createElement("div",{slot:"menu"},x),$):null)}const Yn=typeof window<"u"?g.useLayoutEffect:g.useEffect,xt=g.forwardRef(function({children:e,open:t,position:i,size:r,title:l,description:d,headless:c,dismissible:s,onOpen:u,onClose:A,onOpenChange:n,...p},E){const y=g.useRef(null);return g.useImperativeHandle(E,()=>y.current),g.useEffect(()=>{ie.warnIfElementNotRegistered("ui-plugin-panel","PluginPanel")},[]),g.useEffect(()=>{const v=y.current;if(!v)return;const b=()=>u==null?void 0:u(),m=()=>A==null?void 0:A(),o=w=>{const h=w.detail;h&&(n==null||n(h))};return v.addEventListener("open",b),v.addEventListener("close",m),v.addEventListener("open-change",o),()=>{v.removeEventListener("open",b),v.removeEventListener("close",m),v.removeEventListener("open-change",o)}},[A,u,n]),Yn(()=>{const v=y.current;if(!v)return;const b=(m,o,w=!0)=>{if(!w)return;const h=v.getAttribute(m);if(o==null){h!=null&&v.removeAttribute(m);return}h!==o&&v.setAttribute(m,o)};typeof t=="boolean"&&b("open",t?"":null),b("position",i??null,i!==void 0),b("size",r&&r!=="md"?r:null,r!==void 0),b("title",l??null,l!==void 0),b("description",d??null,d!==void 0),typeof c=="boolean"&&b("headless",c?"":null),typeof s=="boolean"&&b("dismissible",s?"":null)},[t,i,r,l,d,c,s]),g.createElement("ui-plugin-panel",{ref:y,...p},e)});xt.displayName="PluginPanel";function Kn(){const a=f.useRef(null),e=f.useCallback(async()=>{const c=a.current;return c?await c.submit():!1},[]),t=f.useCallback(async()=>{const c=a.current;return c?await c.validate():{valid:!0,errors:{}}},[]),i=f.useCallback(()=>{var s;const c=a.current;return c?(s=c.getValues)==null?void 0:s.call(c):{}},[]),r=f.useCallback(c=>{var u;const s=a.current;return(u=s==null?void 0:s.reset)==null?void 0:u.call(s,c)},[]),l=f.useCallback(()=>{var s;const c=a.current;return c?typeof c.isDirty=="function"?!!c.isDirty():((s=c.hasAttribute)==null?void 0:s.call(c,"dirty"))||!1:!1},[]),d=f.useCallback(c=>{var u;const s=a.current;return(u=s==null?void 0:s.markClean)==null?void 0:u.call(s,c)},[]);return{ref:a,submit:e,validate:t,getValues:i,reset:r,isDirty:l,markClean:d}}function xe(a,e){if(a){if(typeof a=="function"){a(e);return}a.current=e}}function Zn(a){const{placement:e="bottom",offset:t=8,open:i,onOpen:r,onClose:l,role:d="menu"}=a||{},c=f.useRef(null),s=f.useRef(null),u=f.useRef(null),A=f.useRef(`floating-${Math.random().toString(36).slice(2,9)}`),[n,p]=f.useState({top:0,left:0,placement:e}),E=typeof i<"u",[y,v]=f.useState(!!i),b=E?!!i:y,m=f.useCallback(()=>{const P=c.current,F=s.current;if(!P||!F)return;const j=se.computePosition(P,F,{placement:e,offset:t});p({top:Math.round(j.top),left:Math.round(j.left),placement:j.placement,arrow:j.x||j.y?{x:j.x,y:j.y}:void 0})},[e,t]),o=f.useCallback(P=>{E||v(P),P?r==null||r():l==null||l()},[E,r,l]),w=f.useCallback(()=>o(!b),[b,o]),h=f.useCallback(()=>o(!0),[o]),L=f.useCallback(()=>o(!1),[o]);f.useEffect(()=>{if(!b)return;const P=c.current,F=s.current;if(!P||!F)return;m();const j=()=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>m())},x=()=>{u.current&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>m())};window.addEventListener("scroll",j,!0),window.addEventListener("resize",x);let H=null,I=null;try{typeof ResizeObserver<"u"&&(H=new ResizeObserver(x),I=new ResizeObserver(x),H.observe(P),I.observe(F))}catch{H=I=null}return()=>{window.removeEventListener("scroll",j,!0),window.removeEventListener("resize",x),H==null||H.disconnect(),I==null||I.disconnect(),u.current&&cancelAnimationFrame(u.current),u.current=null}},[b,m]);const R=f.useCallback(P=>{c.current=P},[]),N=f.useCallback(P=>{s.current=P},[]),S=()=>s.current?Array.from(s.current.querySelectorAll('[role="menuitem"], .item, [data-menu-item]')).filter(Boolean):[],k=P=>{const F=S();if(!F.length)return;const j=Math.max(0,Math.min(F.length-1,P));try{F[j].focus()}catch{}},B=()=>k(0),T=()=>{const P=S();P.length&&k(P.length-1)},D=()=>{const P=S(),F=P.findIndex(j=>j===document.activeElement);k(F<0?0:(F+1)%P.length)},$=()=>{const P=S(),F=P.findIndex(j=>j===document.activeElement);k(F<=0?P.length-1:F-1)};return{referenceRef:R,floatingRef:N,coords:n,update:m,open:b,setOpen:o,toggle:w,openPopup:h,closePopup:L,getReferenceProps:(P={})=>{const{onClick:F,onKeyDown:j,ref:x,...H}=P;return{...H,ref:I=>{R(I),xe(x,I)},"aria-haspopup":d,"aria-controls":A.current,"aria-expanded":b?"true":"false",onClick:I=>{F==null||F(I),!I.defaultPrevented&&w()},onKeyDown:I=>{j==null||j(I),!I.defaultPrevented&&I.key==="ArrowDown"&&(I.preventDefault(),h(),setTimeout(()=>B(),0))}}},getFloatingProps:(P={})=>{const{onKeyDown:F,style:j,ref:x,...H}=P;return{...H,id:A.current,ref:I=>{N(I),xe(x,I)},role:d,tabIndex:-1,style:{...j||{},position:"absolute",top:`${n.top}px`,left:`${n.left}px`},hidden:!b,onKeyDown:I=>{F==null||F(I),!I.defaultPrevented&&(I.key==="Escape"?(I.preventDefault(),L()):I.key==="ArrowDown"?(I.preventDefault(),D()):I.key==="ArrowUp"?(I.preventDefault(),$()):I.key==="Home"?(I.preventDefault(),B()):I.key==="End"&&(I.preventDefault(),T()))}}},focusFirstItem:B,focusLastItem:T,focusNext:D,focusPrev:$}}function Y(a){if(a!=null){if(typeof a=="object")try{return JSON.stringify(a)}catch{return}return String(a)}}function zn(a){const{children:e,className:t,variant:i,tone:r,state:l,elevation:d,radius:c,interactive:s,disabled:u,headless:A,p:n,px:p,py:E,pt:y,pr:v,pb:b,pl:m,m:o,mx:w,my:h,mt:L,mr:R,mb:N,ml:S,width:k,w:B,minWidth:T,minW:D,maxWidth:$,maxW:q,height:J,h:P,minHeight:F,minH:j,maxHeight:x,maxH:H,display:I,position:M,inset:_,top:W,right:U,bottom:G,left:Q,justify:K,alignSelf:X,alignContent:Z,gap:z,rowGap:ee,columnGap:O,flexBasis:V,flexGrow:oe,flexShrink:ce,gridArea:fe,gridColumn:ae,gridColumnStart:de,gridColumnEnd:re,gridRow:C,gridRowStart:dr,gridRowEnd:mr,align:br,bg:vr,color:pr,opacity:Ar,overflow:Er,overflowX:yr,overflowY:Lr,zIndex:gr,...wr}=a,hr={className:t,...wr,p:Y(n),px:Y(p),py:Y(E),pt:Y(y),pr:Y(v),pb:Y(b),pl:Y(m),m:Y(o),mx:Y(w),my:Y(h),mt:Y(L),mr:Y(R),mb:Y(N),ml:Y(S),width:Y(k),w:Y(B),minwidth:Y(T??D),maxwidth:Y($??q),height:Y(J),h:Y(P),minheight:Y(F??j),maxheight:Y(x??H),display:Y(I),position:Y(M),inset:Y(_),top:Y(W),right:Y(U),bottom:Y(G),left:Y(Q),justify:Y(K),flexbasis:Y(V),flexgrow:Y(oe),flexshrink:Y(ce),alignself:Y(X),aligncontent:Y(Z),gap:Y(z),rowgap:Y(ee),columngap:Y(O),gridarea:Y(fe),gridcolumn:Y(ae),gridcolumnstart:Y(de),gridcolumnend:Y(re),gridrow:Y(C),gridrowstart:Y(dr),gridrowend:Y(mr),align:Y(br),bg:Y(vr),color:Y(pr),opacity:Y(Ar),overflow:Y(Er),overflowx:Y(yr),overflowy:Y(Lr),zindex:Y(gr),variant:i&&i!=="default"?i:void 0,tone:r&&r!=="default"?r:void 0,state:l&&l!=="idle"?l:void 0,elevation:d&&d!=="default"?d:void 0,radius:c&&c!=="default"?c:void 0,interactive:s?"":void 0,disabled:u?"":void 0,headless:A?"":void 0};return g.default.createElement("ui-box",hr,e)}function ue(a){if(a!=null){if(typeof a=="object")try{return JSON.stringify(a)}catch{return}return String(a)}}function On(a){const{children:e,className:t,direction:i,align:r,justify:l,wrap:d,gap:c,rowGap:s,columnGap:u,display:A,headless:n,...p}=a,E={className:t,...p,direction:ue(i),align:ue(r),justify:ue(l),wrap:ue(d),gap:ue(c),rowgap:ue(s),columngap:ue(u),display:ue(A),headless:n?"":void 0};return g.default.createElement("ui-flex",E,e)}function ne(a){if(a!=null){if(typeof a=="object")try{return JSON.stringify(a)}catch{return}return String(a)}}function Vn(a){const{children:e,className:t,columns:i,rows:r,gap:l,rowGap:d,columnGap:c,autoFlow:s,autoRows:u,autoColumns:A,align:n,justify:p,place:E,alignContent:y,justifyContent:v,placeContent:b,display:m,headless:o,...w}=a,h={className:t,...w,columns:ne(i),rows:ne(r),gap:ne(l),rowgap:ne(d),columngap:ne(c),autoflow:ne(s),autorows:ne(u),autocolumns:ne(A),align:ne(n),justify:ne(p),place:ne(E),aligncontent:ne(y),justifycontent:ne(v),placecontent:ne(b),display:ne(m),headless:o?"":void 0};return g.default.createElement("ui-grid",h,e)}const Cn=typeof window<"u"?f.useLayoutEffect:f.useEffect,qt=g.default.forwardRef(function({size:e="medium",variant:t="default",tone:i="neutral",radius:r="md",density:l="comfortable",inset:d,children:c,...s},u){const A=f.useRef(null);return g.default.useImperativeHandle(u,()=>A.current),Cn(()=>{const n=A.current;if(!n)return;const p=(y,v)=>{const b=n.getAttribute(y);if(v==null){b!=null&&n.removeAttribute(y);return}b!==v&&n.setAttribute(y,v)},E=(y,v)=>{v?n.hasAttribute(y)||n.setAttribute(y,""):n.hasAttribute(y)&&n.removeAttribute(y)};p("size",e!=="medium"?e:null),p("variant",t!=="default"?t:null),p("tone",i!=="neutral"?i:null),p("radius",r!=="md"?r:null),p("density",l!=="comfortable"?l:null),E("inset",d)},[e,t,i,r,l,d]),g.default.createElement("ui-section",{ref:A,...s},c)});qt.displayName="Section";function ei(a){const{children:e,size:t="md",...i}=a;return g.default.createElement("ui-container",{size:t,...i},e)}const $e=typeof window<"u"?f.useLayoutEffect:f.useEffect,Mt=g.default.forwardRef(function({orientation:e,storageKey:t,autoSave:i,children:r,onLayoutChange:l,onResizeStart:d,onResize:c,onResizeEnd:s,...u},A){const n=f.useRef(null);return f.useImperativeHandle(A,()=>n.current),f.useEffect(()=>{const p=n.current;if(!p)return;const E=m=>l==null?void 0:l(m.detail),y=m=>d==null?void 0:d(m.detail),v=m=>c==null?void 0:c(m.detail),b=m=>s==null?void 0:s(m.detail);return p.addEventListener("layout-change",E),p.addEventListener("resize-start",y),p.addEventListener("resize",v),p.addEventListener("resize-end",b),()=>{p.removeEventListener("layout-change",E),p.removeEventListener("resize-start",y),p.removeEventListener("resize",v),p.removeEventListener("resize-end",b)}},[l,c,s,d]),$e(()=>{const p=n.current;p&&(e&&e!=="horizontal"?p.setAttribute("orientation",e):p.removeAttribute("orientation"),t?p.setAttribute("storage-key",t):p.removeAttribute("storage-key"),i?p.setAttribute("auto-save",""):p.removeAttribute("auto-save"))},[e,t,i]),g.default.createElement("ui-panel-group",{ref:n,...u},r)}),Bt=g.default.forwardRef(function({size:e,minSize:t,maxSize:i,collapsedSize:r,collapsed:l,children:d,...c},s){const u=f.useRef(null);return f.useImperativeHandle(s,()=>u.current),$e(()=>{const A=u.current;if(!A)return;const n=(p,E)=>{const y=A.getAttribute(p);if(E==null){y!=null&&A.removeAttribute(p);return}y!==E&&A.setAttribute(p,E)};l?A.setAttribute("collapsed",""):A.removeAttribute("collapsed"),n("size",e!=null?String(e):null),n("min-size",t!=null?String(t):null),n("max-size",i!=null?String(i):null),n("collapsed-size",r!=null?String(r):null)},[l,r,i,t,e]),g.default.createElement("ui-panel",{ref:u,...c},d)}),jt=g.default.forwardRef(function({disabled:e,orientation:t,ariaLabel:i,children:r,...l},d){const c=f.useRef(null);return f.useImperativeHandle(d,()=>c.current),$e(()=>{const s=c.current;s&&(e?s.setAttribute("disabled",""):s.removeAttribute("disabled"),t?s.setAttribute("orientation",t):s.removeAttribute("orientation"),i?s.setAttribute("aria-label",i):s.removeAttribute("aria-label"))},[i,e,t]),g.default.createElement("ui-splitter",{ref:c,...l},r)});Mt.displayName="PanelGroup";Bt.displayName="Panel";jt.displayName="Splitter";const Gt=f.createContext(null),ti=typeof window<"u"?f.useLayoutEffect:f.useEffect;function ve(a,e){var t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R,N,S,k,B,T,D,$,q,J,P,F,j,x,H,I,M,_,W,U,G,Q,K,X,Z,z,ee,O,V,oe,ce,fe,ae,de;return e?{...a,...e,colors:{...a.colors,...e.colors||{}},palette:{...a.palette||{},...e.palette||{},gray:{...((t=a.palette)==null?void 0:t.gray)||{},...((i=e.palette)==null?void 0:i.gray)||{}},grayAlpha:{...((r=a.palette)==null?void 0:r.grayAlpha)||{},...((l=e.palette)==null?void 0:l.grayAlpha)||{}},blackAlpha:{...((d=a.palette)==null?void 0:d.blackAlpha)||{},...((c=e.palette)==null?void 0:c.blackAlpha)||{}},whiteAlpha:{...((s=a.palette)==null?void 0:s.whiteAlpha)||{},...((u=e.palette)==null?void 0:u.whiteAlpha)||{}},accent:{...((A=a.palette)==null?void 0:A.accent)||{},...((n=e.palette)==null?void 0:n.accent)||{}},accentAlpha:{...((p=a.palette)==null?void 0:p.accentAlpha)||{},...((E=e.palette)==null?void 0:E.accentAlpha)||{}}},surfaces:{...a.surfaces||{},...e.surfaces||{}},shadows:{...a.shadows||{},...e.shadows||{}},spacing:{...a.spacing||{},...e.spacing||{}},spaceScale:{...a.spaceScale||{},...e.spaceScale||{}},radiusScale:{...a.radiusScale||{},...e.radiusScale||{}},typography:{...a.typography||{},...e.typography||{},size:{...((y=a.typography)==null?void 0:y.size)||{},...((v=e.typography)==null?void 0:v.size)||{}},fontScale:{...((b=a.typography)==null?void 0:b.fontScale)||{},...((m=e.typography)==null?void 0:m.fontScale)||{}},lineHeight:{...((o=a.typography)==null?void 0:o.lineHeight)||{},...((w=e.typography)==null?void 0:w.lineHeight)||{}},letterSpacing:{...((h=a.typography)==null?void 0:h.letterSpacing)||{},...((L=e.typography)==null?void 0:L.letterSpacing)||{}}},motion:{...a.motion||{},...e.motion||{}},effects:{...a.effects||{},...e.effects||{}},components:{...a.components||{},...e.components||{},button:{...((R=a.components)==null?void 0:R.button)||{},...((N=e.components)==null?void 0:N.button)||{}},badge:{...((S=a.components)==null?void 0:S.badge)||{},...((k=e.components)==null?void 0:k.badge)||{}},sidebar:{...((B=a.components)==null?void 0:B.sidebar)||{},...((T=e.components)==null?void 0:T.sidebar)||{}},blockControls:{...((D=a.components)==null?void 0:D.blockControls)||{},...(($=e.components)==null?void 0:$.blockControls)||{}},box:{...((q=a.components)==null?void 0:q.box)||{},...((J=e.components)==null?void 0:J.box)||{}},breadcrumb:{...((P=a.components)==null?void 0:P.breadcrumb)||{},...((F=e.components)==null?void 0:F.breadcrumb)||{}},card:{...((j=a.components)==null?void 0:j.card)||{},...((x=e.components)==null?void 0:x.card)||{}},contextMenu:{...((H=a.components)==null?void 0:H.contextMenu)||{},...((I=e.components)==null?void 0:I.contextMenu)||{}},alert:{...((M=a.components)==null?void 0:M.alert)||{},...((_=e.components)==null?void 0:_.alert)||{}},alertDialog:{...((W=a.components)==null?void 0:W.alertDialog)||{},...((U=e.components)==null?void 0:U.alertDialog)||{}},appHeader:{...((G=a.components)==null?void 0:G.appHeader)||{},...((Q=e.components)==null?void 0:Q.appHeader)||{}},aspectRatio:{...((K=a.components)==null?void 0:K.aspectRatio)||{},...((X=e.components)==null?void 0:X.aspectRatio)||{}},avatar:{...((Z=a.components)==null?void 0:Z.avatar)||{},...((z=e.components)==null?void 0:z.avatar)||{}},menu:{...((ee=a.components)==null?void 0:ee.menu)||{},...((O=e.components)==null?void 0:O.menu)||{}},multiSelect:{...((V=a.components)==null?void 0:V.multiSelect)||{},...((oe=e.components)==null?void 0:oe.multiSelect)||{}},panel:{...((ce=a.components)==null?void 0:ce.panel)||{},...((fe=e.components)==null?void 0:fe.panel)||{}},input:{...((ae=a.components)==null?void 0:ae.input)||{},...((de=e.components)==null?void 0:de.input)||{}}},zIndex:{...a.zIndex||{},...e.zIndex||{}},breakpoints:{...a.breakpoints||{},...e.breakpoints||{}}}:a}function ri(){try{const a=getComputedStyle(document.documentElement),e=a.getPropertyValue("--ui-color-primary").trim();return e?{colors:{primary:e||void 0,text:a.getPropertyValue("--ui-color-text").trim()||void 0,background:a.getPropertyValue("--ui-color-background").trim()||void 0}}:{}}catch{return{}}}function ni(a,e){const t=typeof e=="function"?e(a):e;return ve(a,t)}function ii({tokens:a,children:e,storageKey:t="editora.theme.tokens"}){const i=f.useRef(null),r=()=>{if(typeof window<"u"&&t)try{const s=localStorage.getItem(t);if(s){const u=JSON.parse(s);return ve(se.defaultTokens,u)}}catch{}if(a&&Object.keys(a).length)return ve(se.defaultTokens,a);if(typeof window<"u"){const s=ri();if(s.colors&&s.colors.primary)return ve(se.defaultTokens,s)}return ve(se.defaultTokens,a||{})},[l,d]=f.useState(()=>r());f.useEffect(()=>{!a||!Object.keys(a).length||d(s=>ve(s,a))},[a]),ti(()=>{const s=i.current;s&&se.applyTheme(l,s)},[l]),f.useEffect(()=>{if(typeof window>"u"||!t)return;const s=JSON.stringify(l);let u;const A=()=>{try{localStorage.setItem(t,s)}catch{}};return window.requestIdleCallback?u=window.requestIdleCallback(A,{timeout:1e3}):u=window.setTimeout(A,250),()=>{try{window.cancelIdleCallback&&u?window.cancelIdleCallback(u):u&&clearTimeout(u)}catch{}}},[l,t]);const c=f.useMemo(()=>({tokens:l,setTokens:s=>{d(u=>ni(u,s))}}),[l]);return g.default.createElement(Gt.Provider,{value:c},g.default.createElement("div",{ref:i,style:{display:"contents"}},e))}function li(){const a=f.useContext(Gt);if(!a)throw new Error("useTheme must be used within ThemeProvider");return a}const ui=typeof window<"u"?f.useLayoutEffect:f.useEffect,Jt=g.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,itemRole:r,container:l,items:d,onCollectionChange:c,...s},u){const A=f.useRef(null);return f.useImperativeHandle(u,()=>A.current),f.useEffect(()=>{const n=A.current;if(!n)return;const p=()=>c==null?void 0:c();return n.addEventListener("collection-change",p),()=>{n.removeEventListener("collection-change",p)}},[c]),ui(()=>{const n=A.current;n&&(t?n.setAttribute("item-selector",t):n.removeAttribute("item-selector"),i?n.setAttribute("direct-item-selector",i):n.removeAttribute("direct-item-selector"),r?n.setAttribute("item-role",r):n.removeAttribute("item-role"),n.container=l??null,n.items=d??null)},[l,i,r,t,d]),g.default.createElement("ui-collection",{ref:A,...s},e)});Jt.displayName="Collection";const si=typeof window<"u"?f.useLayoutEffect:f.useEffect,_t=g.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,itemRole:r,activeAttribute:l,container:d,items:c,onCollectionChange:s,...u},A){const n=f.useRef(null);return f.useImperativeHandle(A,()=>n.current),f.useEffect(()=>{const p=n.current;if(!p)return;const E=()=>s==null?void 0:s();return p.addEventListener("collection-change",E),()=>{p.removeEventListener("collection-change",E)}},[s]),si(()=>{const p=n.current;p&&(t?p.setAttribute("item-selector",t):p.removeAttribute("item-selector"),i?p.setAttribute("direct-item-selector",i):p.removeAttribute("direct-item-selector"),r?p.setAttribute("item-role",r):p.removeAttribute("item-role"),l?p.setAttribute("active-attribute",l):p.removeAttribute("active-attribute"),p.container=d??null,p.items=c??null)},[l,d,i,r,t,c]),g.default.createElement("ui-listbox",{ref:n,...u},e)});_t.displayName="Listbox";const oi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ut=g.default.forwardRef(function({children:e,itemSelector:t,directItemSelector:i,activeAttribute:r,loop:l,container:d,onActiveItemChange:c,...s},u){const A=f.useRef(null);return f.useImperativeHandle(u,()=>A.current),f.useEffect(()=>{const n=A.current;if(!n)return;const p=E=>{const y=E.detail;y&&(c==null||c(y))};return n.addEventListener("active-item-change",p),()=>{n.removeEventListener("active-item-change",p)}},[c]),oi(()=>{const n=A.current;n&&(t?n.setAttribute("item-selector",t):n.removeAttribute("item-selector"),i?n.setAttribute("direct-item-selector",i):n.removeAttribute("direct-item-selector"),r===null?n.setAttribute("active-attribute",""):r?n.setAttribute("active-attribute",r):n.removeAttribute("active-attribute"),l===!1?n.setAttribute("loop","false"):n.removeAttribute("loop"),n.container=d??null)},[r,d,i,t,l]),g.default.createElement("ui-roving-focus-group",{ref:A,...s},e)});Ut.displayName="RovingFocusGroup";const ci=typeof window<"u"?f.useLayoutEffect:f.useEffect,Qt=g.default.forwardRef(function({children:e,open:t,modal:i,closeOnEscape:r,closeOnPointerOutside:l,closeOnFocusOutside:d,disableOutsidePointerEvents:c,headless:s,onBeforeClose:u,onClose:A,onInteractOutside:n,onEscapeKeyDown:p,...E},y){const v=f.useRef(null);return f.useImperativeHandle(y,()=>v.current),f.useEffect(()=>{const b=v.current;if(!b)return;const m=L=>u==null?void 0:u(L.detail),o=L=>A==null?void 0:A(L.detail),w=L=>n==null?void 0:n(L.detail||{}),h=L=>p==null?void 0:p(L.detail||{});return b.addEventListener("before-close",m),b.addEventListener("close",o),b.addEventListener("interact-outside",w),b.addEventListener("escape-key-down",h),()=>{b.removeEventListener("before-close",m),b.removeEventListener("close",o),b.removeEventListener("interact-outside",w),b.removeEventListener("escape-key-down",h)}},[u,A,p,n]),ci(()=>{const b=v.current;b&&(t?b.setAttribute("open",""):b.removeAttribute("open"),i?b.setAttribute("modal",""):b.removeAttribute("modal"),r===!1?b.setAttribute("close-on-escape","false"):r?b.setAttribute("close-on-escape",""):b.removeAttribute("close-on-escape"),l===!1?b.setAttribute("close-on-pointer-outside","false"):l?b.setAttribute("close-on-pointer-outside",""):b.removeAttribute("close-on-pointer-outside"),d?b.setAttribute("close-on-focus-outside",""):b.removeAttribute("close-on-focus-outside"),c?b.setAttribute("disable-outside-pointer-events",""):b.removeAttribute("disable-outside-pointer-events"),s?b.setAttribute("headless",""):b.removeAttribute("headless"))},[r,d,l,c,s,i,t]),g.default.createElement("ui-dismissable-layer",{ref:v,...E},e)});Qt.displayName="DismissableLayer";const fi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Wt=g.default.forwardRef(function({children:e,active:t,trapped:i,loop:r,restoreFocus:l,autoFocus:d,inertOthers:c,headless:s,onEscape:u,onFocusScopeMount:A,...n},p){const E=f.useRef(null);return f.useImperativeHandle(p,()=>E.current),f.useEffect(()=>{const y=E.current;if(!y)return;const v=m=>u==null?void 0:u(m.detail||{}),b=()=>A==null?void 0:A();return y.addEventListener("escape",v),y.addEventListener("focus-scope-mount",b),()=>{y.removeEventListener("escape",v),y.removeEventListener("focus-scope-mount",b)}},[u,A]),fi(()=>{const y=E.current;y&&(t?y.setAttribute("active",""):y.removeAttribute("active"),i===!1?y.setAttribute("trapped","false"):i?y.setAttribute("trapped",""):y.removeAttribute("trapped"),r===!1?y.setAttribute("loop","false"):r?y.setAttribute("loop",""):y.removeAttribute("loop"),l===!1?y.setAttribute("restore-focus","false"):l?y.setAttribute("restore-focus",""):y.removeAttribute("restore-focus"),d?y.setAttribute("auto-focus",d):y.removeAttribute("auto-focus"),c?y.setAttribute("inert-others",""):y.removeAttribute("inert-others"),s?y.setAttribute("headless",""):y.removeAttribute("headless"))},[t,d,s,c,r,l,i]),g.default.createElement("ui-focus-scope",{ref:E,...n},e)});Wt.displayName="FocusScope";const ai=typeof window<"u"?f.useLayoutEffect:f.useEffect,Xt=g.default.forwardRef(function({children:e,open:t,placement:i,strategy:r,offset:l,crossOffset:d,flip:c,shift:s,matchWidth:u,fitViewport:A,anchor:n,headless:p,onPositionChange:E,...y},v){const b=f.useRef(null);return f.useImperativeHandle(v,()=>b.current),f.useEffect(()=>{const m=b.current;if(!m)return;const o=w=>E==null?void 0:E(w.detail);return m.addEventListener("position-change",o),()=>{m.removeEventListener("position-change",o)}},[E]),ai(()=>{const m=b.current;m&&(t?m.setAttribute("open",""):m.removeAttribute("open"),i?m.setAttribute("placement",i):m.removeAttribute("placement"),r&&r!=="fixed"?m.setAttribute("strategy",r):m.removeAttribute("strategy"),l!=null?m.setAttribute("offset",String(l)):m.removeAttribute("offset"),d!=null?m.setAttribute("cross-offset",String(d)):m.removeAttribute("cross-offset"),c===!1?m.setAttribute("flip","false"):c?m.setAttribute("flip",""):m.removeAttribute("flip"),s===!1?m.setAttribute("shift","false"):s?m.setAttribute("shift",""):m.removeAttribute("shift"),u?m.setAttribute("match-width",""):m.removeAttribute("match-width"),A?m.setAttribute("fit-viewport",""):m.removeAttribute("fit-viewport"),n?m.setAttribute("anchor",n):m.removeAttribute("anchor"),p?m.setAttribute("headless",""):m.removeAttribute("headless"))},[n,d,A,c,p,u,l,t,i,s,r]),g.default.createElement("ui-positioner",{ref:b,...y},e)});Xt.displayName="Positioner";const Yt=g.default.forwardRef(function({children:e,...t},i){const r=f.useRef(null);return f.useImperativeHandle(i,()=>r.current),g.default.createElement("ui-anchor",{ref:r,...t},e)});Yt.displayName="Anchor";function be(a,e,t){if(t==null){a.removeAttribute(e);return}t?a.setAttribute(e,""):a.removeAttribute(e)}function qe(a,e,t,i){const r=t&&t!==i?t:void 0;if(!r){a.removeAttribute(e);return}a.setAttribute(e,r)}const Kt=g.forwardRef(function({checked:e,disabled:t,indeterminate:i,loading:r,headless:l,invalid:d,density:c,preset:s,onCheckedChange:u,onChange:A,onInput:n,children:p,...E},y){const v=g.useRef(null);g.useImperativeHandle(y,()=>v.current);const b=typeof window<"u"?g.useLayoutEffect:g.useEffect;g.useEffect(()=>{ie.warnIfElementNotRegistered("ui-checkbox","Checkbox")},[]),b(()=>{const o=v.current;o&&(be(o,"checked",e),be(o,"disabled",t),be(o,"indeterminate",i),be(o,"loading",r),be(o,"headless",l),be(o,"invalid",d),qe(o,"density",c,"default"),qe(o,"preset",s,"default"))},[e,t,i,r,l,d,c,s]),g.useEffect(()=>{const o=v.current;if(!o||!u&&!A&&!n)return;const w=L=>{var N;const R=L;n==null||n(R),typeof((N=R.detail)==null?void 0:N.checked)=="boolean"&&(u==null||u(R.detail.checked,R.detail))},h=L=>{const R=L;A==null||A(R)};return o.addEventListener("input",w),o.addEventListener("change",h),()=>{o.removeEventListener("input",w),o.removeEventListener("change",h)}},[u,A,n]);const m={ref:v,...E,checked:e?"":void 0,disabled:t?"":void 0,indeterminate:i?"":void 0,loading:r?"":void 0,headless:l?"":void 0,invalid:d?"":void 0,density:c&&c!=="default"?c:void 0,preset:s&&s!=="default"?s:void 0};return g.createElement("ui-checkbox",m,p)});Kt.displayName="Checkbox";const di=typeof window<"u"?f.useLayoutEffect:f.useEffect,Zt=g.default.forwardRef(function({value:e,disabled:t,required:i,name:r,orientation:l,variant:d,size:c,tone:s,options:u,onValueChange:A,children:n,...p},E){const y=f.useRef(null);return g.default.useImperativeHandle(E,()=>y.current),f.useEffect(()=>{const v=y.current;if(!v)return;const b=m=>{const o=m.detail;o&&(A==null||A(o))};return v.addEventListener("change",b),()=>v.removeEventListener("change",b)},[A]),di(()=>{const v=y.current;if(!v)return;const b=(o,w)=>{const h=v.getAttribute(o);if(w==null){h!=null&&v.removeAttribute(o);return}h!==w&&v.setAttribute(o,w)},m=(o,w)=>{w?v.hasAttribute(o)||v.setAttribute(o,""):v.hasAttribute(o)&&v.removeAttribute(o)};b("value",e??null),m("disabled",t),m("required",i),b("name",r||null),b("orientation",l&&l!=="vertical"?l:null),b("variant",d&&d!=="default"?d:null),b("size",c&&c!=="md"?c:null),b("tone",s&&s!=="brand"?s:null),u&&u.length?b("options",JSON.stringify(u)):b("options",null)},[e,t,i,r,l,d,c,s,u]),g.default.createElement("ui-radio-group",{ref:y,...p},n)});Zt.displayName="RadioGroup";const mi=typeof window<"u"?g.useLayoutEffect:g.useEffect;function bi(a){if(a!=null){if(typeof a=="string")return a;if(!(!Number.isFinite(a)||a<=0))return Math.abs(a-16/9)<.01?"16/9":Math.abs(a-4/3)<.01?"4/3":Math.abs(a-1)<.01?"1/1":`${a}/1`}}const zt=g.forwardRef(function({ratio:e,fit:t,tone:i,variant:r,size:l,radius:d,elevation:c,interactive:s,showRatioBadge:u,headless:A,children:n,...p},E){const y=g.useRef(null);return g.useImperativeHandle(E,()=>y.current),g.useEffect(()=>{ie.warnIfElementNotRegistered("ui-aspect-ratio","AspectRatio")},[]),mi(()=>{const v=y.current;if(!v)return;const b=bi(e);b?v.setAttribute("ratio",b):v.removeAttribute("ratio"),t?v.setAttribute("fit",t):v.removeAttribute("fit"),i&&i!=="neutral"?v.setAttribute("tone",i):v.removeAttribute("tone"),r&&r!=="surface"?v.setAttribute("variant",r):v.removeAttribute("variant"),l&&l!=="md"?v.setAttribute("size",l):v.removeAttribute("size"),d!=null?v.setAttribute("radius",String(d)):v.removeAttribute("radius"),c&&c!=="none"?v.setAttribute("elevation",c):v.removeAttribute("elevation"),s?v.setAttribute("interactive",""):v.removeAttribute("interactive"),u?v.setAttribute("show-ratio-badge",""):v.removeAttribute("show-ratio-badge"),A?v.setAttribute("headless",""):v.removeAttribute("headless")},[e,t,i,r,l,d,c,s,u,A]),g.createElement("ui-aspect-ratio",{ref:y,...p},n)});zt.displayName="AspectRatio";const vi=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Me(a){const e=a.trim().split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,2).toUpperCase():`${e[0][0]||""}${e[1][0]||""}`.toUpperCase()}function pi(a){if(a!=null)return a==="lazy"||a==="eager"?a:a?"eager":"lazy"}function Ai(a,e,t){return a&&a.trim()?a.trim().slice(0,2).toUpperCase():e&&e.trim()?Me(e):typeof t=="string"&&t.trim()?Me(t):"?"}const Ot=g.forwardRef(function({src:e,alt:t,initials:i,size:r,bg:l,color:d,radius:c,fontWeight:s,shape:u,tone:A,variant:n,elevation:p,status:E,state:y,badge:v,ring:b,interactive:m,disabled:o,loading:w,onAvatarLoad:h,onAvatarError:L,children:R,...N},S){const k=g.useRef(null),B=g.useMemo(()=>Ai(i,t,R),[i,t,R]);return g.useImperativeHandle(S,()=>k.current),g.useEffect(()=>{ie.warnIfElementNotRegistered("ui-avatar","Avatar")},[]),g.useEffect(()=>{const T=k.current;if(!T||!h&&!L)return;const D=q=>h==null?void 0:h(q.detail),$=q=>L==null?void 0:L(q.detail);return T.addEventListener("avatar-load",D),T.addEventListener("avatar-error",$),()=>{T.removeEventListener("avatar-load",D),T.removeEventListener("avatar-error",$)}},[h,L]),vi(()=>{const T=k.current;if(!T)return;e?T.setAttribute("src",e):T.removeAttribute("src"),t?T.setAttribute("alt",t):T.removeAttribute("alt"),i?T.setAttribute("initials",i):T.removeAttribute("initials"),r!=null?T.setAttribute("size",String(r)):T.removeAttribute("size"),l?T.setAttribute("bg",l):T.removeAttribute("bg"),d?T.setAttribute("color",d):T.removeAttribute("color"),c!=null?T.setAttribute("radius",String(c)):T.removeAttribute("radius"),s!=null?T.setAttribute("fontweight",String(s)):T.removeAttribute("fontweight"),u?T.setAttribute("shape",u):T.removeAttribute("shape"),A&&A!=="neutral"?T.setAttribute("tone",A):T.removeAttribute("tone"),n&&n!=="surface"?T.setAttribute("variant",n):T.removeAttribute("variant"),p&&p!=="low"?T.setAttribute("elevation",p):T.removeAttribute("elevation"),E?T.setAttribute("status",E):T.removeAttribute("status"),y&&y!=="idle"?T.setAttribute("state",y):T.removeAttribute("state"),v?T.setAttribute("badge",v):T.removeAttribute("badge"),b==null?T.removeAttribute("ring"):b?T.setAttribute("ring",""):T.removeAttribute("ring"),m==null?T.removeAttribute("interactive"):m?T.setAttribute("interactive",""):T.removeAttribute("interactive"),o==null?T.removeAttribute("disabled"):o?T.setAttribute("disabled",""):T.removeAttribute("disabled");const D=pi(w);D?T.setAttribute("loading",D):T.removeAttribute("loading")},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w]),g.createElement("ui-avatar",{ref:k,...N},B)});Ot.displayName="Avatar";const Ei=typeof window<"u"?f.useLayoutEffect:f.useEffect,Vt=g.default.forwardRef(function({present:e,headless:t,mode:i,size:r,variant:l,keepMounted:d,lazy:c,enterDuration:s,exitDuration:u,delay:A,onBeforeEnter:n,onEnter:p,onAfterEnter:E,onBeforeExit:y,onExit:v,onAfterExit:b,children:m,...o},w){const h=f.useRef(null);return g.default.useImperativeHandle(w,()=>h.current),f.useEffect(()=>{const L=h.current;if(!L)return;const R=$=>{const q=$.detail;return(q==null?void 0:q.state)||"hidden"},N=$=>n==null?void 0:n(R($)),S=$=>p==null?void 0:p(R($)),k=$=>E==null?void 0:E(R($)),B=$=>y==null?void 0:y(R($)),T=$=>v==null?void 0:v(R($)),D=$=>b==null?void 0:b(R($));return L.addEventListener("before-enter",N),L.addEventListener("enter",S),L.addEventListener("after-enter",k),L.addEventListener("before-exit",B),L.addEventListener("exit",T),L.addEventListener("after-exit",D),()=>{L.removeEventListener("before-enter",N),L.removeEventListener("enter",S),L.removeEventListener("after-enter",k),L.removeEventListener("before-exit",B),L.removeEventListener("exit",T),L.removeEventListener("after-exit",D)}},[n,p,E,y,v,b]),Ei(()=>{const L=h.current;L&&(e?L.setAttribute("present",""):L.removeAttribute("present"),t?L.setAttribute("headless",""):L.removeAttribute("headless"),i&&i!=="fade"?L.setAttribute("mode",i):L.removeAttribute("mode"),r&&r!=="md"?L.setAttribute("size",r):L.removeAttribute("size"),l&&l!=="default"?L.setAttribute("variant",l):L.removeAttribute("variant"),d?L.setAttribute("keep-mounted",""):L.removeAttribute("keep-mounted"),c?L.setAttribute("lazy",""):L.removeAttribute("lazy"),typeof s=="number"?L.setAttribute("enter-duration",String(s)):L.removeAttribute("enter-duration"),typeof u=="number"?L.setAttribute("exit-duration",String(u)):L.removeAttribute("exit-duration"),typeof A=="number"?L.setAttribute("delay",String(A)):L.removeAttribute("delay"))},[e,t,i,r,l,d,c,s,u,A]),g.default.createElement("ui-presence",{ref:h,...o},m)});Vt.displayName="Presence";const yi=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ct=g.default.forwardRef(function({value:e,buffer:t,max:i,min:r,indeterminate:l,striped:d,animated:c,showLabel:s,label:u,format:A,precision:n,size:p,variant:E,tone:y,shape:v,mode:b,onValueChange:m,onComplete:o,children:w,...h},L){const R=f.useRef(null);return g.default.useImperativeHandle(L,()=>R.current),f.useEffect(()=>{const N=R.current;if(!N)return;const S=B=>{const T=B.detail;T&&(m==null||m(T))},k=B=>{const T=B.detail;T&&(o==null||o(T))};return N.addEventListener("change",S),N.addEventListener("complete",k),()=>{N.removeEventListener("change",S),N.removeEventListener("complete",k)}},[m,o]),yi(()=>{const N=R.current;if(!N)return;const S=(B,T)=>{const D=N.getAttribute(B);if(T==null){D!=null&&N.removeAttribute(B);return}D!==T&&N.setAttribute(B,T)},k=(B,T)=>{T?N.hasAttribute(B)||N.setAttribute(B,""):N.hasAttribute(B)&&N.removeAttribute(B)};S("value",e!=null?String(e):null),S("buffer",t!=null?String(t):null),S("max",i!=null?String(i):null),S("min",r!=null?String(r):null),k("indeterminate",l),k("striped",d),k("animated",c),k("show-label",s),S("label",u!=null&&u!==""?u:null),S("format",A!=null&&A!=="percent"?A:null),S("precision",n!=null?String(n):null),S("size",p&&p!=="md"?p:null),S("variant",E&&E!=="default"?E:null),S("tone",y&&y!=="brand"?y:null),S("shape",v&&v!=="pill"?v:null),S("mode",b&&b!=="line"?b:null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v,b]),g.default.createElement("ui-progress",{ref:R,...h},w)});Ct.displayName="Progress";const Li=typeof window<"u"?f.useLayoutEffect:f.useEffect,er=g.default.forwardRef(function({value:e,min:t,max:i,low:r,high:l,optimum:d,label:c,showLabel:s,format:u,precision:A,size:n,variant:p,tone:E,shape:y,mode:v,onValueChange:b,children:m,...o},w){const h=f.useRef(null);return g.default.useImperativeHandle(w,()=>h.current),f.useEffect(()=>{const L=h.current;if(!L)return;const R=N=>{const S=N.detail;S&&(b==null||b(S))};return L.addEventListener("change",R),()=>{L.removeEventListener("change",R)}},[b]),Li(()=>{const L=h.current;if(!L)return;const R=(S,k)=>{const B=L.getAttribute(S);if(k==null){B!=null&&L.removeAttribute(S);return}B!==k&&L.setAttribute(S,k)},N=(S,k)=>{k?L.hasAttribute(S)||L.setAttribute(S,""):L.hasAttribute(S)&&L.removeAttribute(S)};R("value",e!=null?String(e):null),R("min",t!=null?String(t):null),R("max",i!=null?String(i):null),R("low",r!=null?String(r):null),R("high",l!=null?String(l):null),R("optimum",d!=null?String(d):null),R("label",c!=null&&c!==""?c:null),N("show-label",s),R("format",u!=null&&u!=="value"?u:null),R("precision",A!=null?String(A):null),R("size",n&&n!=="md"?n:null),R("variant",p&&p!=="default"?p:null),R("tone",E&&E!=="auto"?E:null),R("shape",y&&y!=="pill"?y:null),R("mode",v&&v!=="line"?v:null)},[e,t,i,r,l,d,c,s,u,A,n,p,E,y,v]),g.default.createElement("ui-meter",{ref:h,...o},m)});er.displayName="Meter";const gi=typeof window<"u"?f.useLayoutEffect:f.useEffect,tr=g.default.forwardRef(function({target:e,headless:t,disabled:i,strategy:r,onMount:l,onUnmount:d,onSync:c,onTargetMissing:s,children:u,...A},n){const p=f.useRef(null);return g.default.useImperativeHandle(n,()=>p.current),f.useEffect(()=>{const E=p.current;if(!E)return;const y=o=>l==null?void 0:l(o.detail||{count:0}),v=o=>d==null?void 0:d(o.detail||{count:0}),b=o=>c==null?void 0:c(o.detail||{count:0}),m=o=>{const w=o.detail;w&&(s==null||s(w))};return E.addEventListener("mount",y),E.addEventListener("unmount",v),E.addEventListener("sync",b),E.addEventListener("target-missing",m),()=>{E.removeEventListener("mount",y),E.removeEventListener("unmount",v),E.removeEventListener("sync",b),E.removeEventListener("target-missing",m)}},[l,d,c,s]),gi(()=>{const E=p.current;E&&(e?E.setAttribute("target",e):E.removeAttribute("target"),r&&r!=="append"?E.setAttribute("strategy",r):E.removeAttribute("strategy"),t?E.setAttribute("headless",""):E.removeAttribute("headless"),i?E.setAttribute("disabled",""):E.removeAttribute("disabled"))},[e,r,t,i]),g.default.createElement("ui-portal",{ref:p,...A},u)});tr.displayName="Portal";const wi=typeof window<"u"?f.useLayoutEffect:f.useEffect,rr=g.default.forwardRef(function({orientation:e,size:t,variant:i,tone:r,autoHide:l,shadows:d,onScrollChange:c,onReachStart:s,onReachEnd:u,children:A,...n},p){const E=f.useRef(null);return g.default.useImperativeHandle(p,()=>E.current),f.useEffect(()=>{const y=E.current;if(!y)return;const v=o=>{const w=o.detail;w&&(c==null||c(w))},b=()=>s==null?void 0:s(),m=()=>u==null?void 0:u();return y.addEventListener("scroll",v),y.addEventListener("reach-start",b),y.addEventListener("reach-end",m),()=>{y.removeEventListener("scroll",v),y.removeEventListener("reach-start",b),y.removeEventListener("reach-end",m)}},[c,s,u]),wi(()=>{const y=E.current;if(!y)return;const v=(m,o)=>{const w=y.getAttribute(m);if(o==null){w!=null&&y.removeAttribute(m);return}w!==o&&y.setAttribute(m,o)},b=(m,o)=>{const w=y.getAttribute(m);if(o==null){w!=null&&y.removeAttribute(m);return}const h=o?"true":"false";w!==h&&y.setAttribute(m,h)};v("orientation",e&&e!=="vertical"?e:null),v("size",t&&t!=="md"?t:null),v("variant",i&&i!=="default"?i:null),v("tone",r&&r!=="neutral"?r:null),b("auto-hide",l),b("shadows",d)},[e,t,i,r,l,d]),g.default.createElement("ui-scroll-area",{ref:E,...n},A)});rr.displayName="ScrollArea";const nr=g.forwardRef((a,e)=>g.createElement("ui-separator",{ref:e,...a}));nr.displayName="Separator";const hi=typeof window<"u"?f.useLayoutEffect:f.useEffect,ir=g.default.forwardRef(function({children:e,name:t,fallback:i,required:r,inline:l,align:d,size:c,variant:s,tone:u,headless:A,onSlotChange:n,onMissing:p,onResolved:E,...y},v){const b=f.useRef(null);return f.useImperativeHandle(v,()=>b.current),f.useEffect(()=>{const m=b.current;if(!m)return;const o=L=>{const R=L.detail;R&&(n==null||n(R))},w=()=>p==null?void 0:p(),h=()=>E==null?void 0:E();return m.addEventListener("slotchange",o),m.addEventListener("missing",w),m.addEventListener("resolved",h),()=>{m.removeEventListener("slotchange",o),m.removeEventListener("missing",w),m.removeEventListener("resolved",h)}},[n,p,E]),hi(()=>{const m=b.current;if(!m)return;const o=(h,L)=>{const R=m.getAttribute(h);if(L==null){R!=null&&m.removeAttribute(h);return}R!==L&&m.setAttribute(h,L)},w=(h,L)=>{L?o(h,""):o(h,null)};o("name",t||null),o("fallback",i||null),w("required",r),typeof l=="boolean"?o("inline",l?"true":"false"):o("inline",null),o("align",d&&d!=="start"?d:null),o("size",c&&c!=="md"?c:null),o("variant",s&&s!=="plain"?s:null),o("tone",u&&u!=="brand"?u:null),w("headless",A)},[t,i,r,l,d,c,s,u,A]),g.default.createElement("ui-slot",{ref:b,...y},e)});ir.displayName="Slot";const Ni=typeof window<"u"?f.useLayoutEffect:f.useEffect,lr=g.default.forwardRef(function({children:e,orientation:t,variant:i,size:r,density:l,wrap:d,loop:c,headless:s,...u},A){const n=f.useRef(null);return f.useImperativeHandle(A,()=>n.current),Ni(()=>{const p=n.current;if(!p)return;const E=(v,b)=>{const m=p.getAttribute(v);if(b==null){m!=null&&p.removeAttribute(v);return}m!==b&&p.setAttribute(v,b)},y=(v,b)=>{b?E(v,""):E(v,null)};E("orientation",t&&t!=="horizontal"?t:null),E("variant",i&&i!=="default"?i:null),E("size",r&&r!=="md"?r:null),E("density",l&&l!=="default"?l:null),y("wrap",d),typeof c=="boolean"?y("loop",c):E("loop",null),y("headless",s)},[t,i,r,l,d,c,s]),g.default.createElement("ui-toolbar",{ref:n,...u},e)});lr.displayName="Toolbar";const ur=g.forwardRef((a,e)=>g.createElement("ui-visually-hidden",{ref:e,...a}));ur.displayName="VisuallyHidden";const Ri=typeof window<"u"?g.useLayoutEffect:g.useEffect,sr=g.forwardRef(function({page:e,count:t,size:i,variant:r,headless:l,ariaLabel:d,onPageChange:c,onChange:s,onFirst:u,onPrev:A,onNext:n,onLast:p,children:E,...y},v){const b=g.useRef(null);return g.useImperativeHandle(v,()=>b.current),g.useEffect(()=>{const m=b.current;if(!m)return;const o=N=>{const S=N.detail;S&&(c==null||c(S),s==null||s(S))},w=N=>{const S=N.detail;S&&(u==null||u(S))},h=N=>{const S=N.detail;S&&(A==null||A(S))},L=N=>{const S=N.detail;S&&(n==null||n(S))},R=N=>{const S=N.detail;S&&(p==null||p(S))};return m.addEventListener("change",o),m.addEventListener("first",w),m.addEventListener("prev",h),m.addEventListener("next",L),m.addEventListener("last",R),()=>{m.removeEventListener("change",o),m.removeEventListener("first",w),m.removeEventListener("prev",h),m.removeEventListener("next",L),m.removeEventListener("last",R)}},[c,s,u,A,n,p]),Ri(()=>{const m=b.current;if(!m)return;const o=(h,L)=>{const R=m.getAttribute(h);if(L==null){R!=null&&m.removeAttribute(h);return}R!==L&&m.setAttribute(h,L)},w=(h,L)=>{L?m.hasAttribute(h)||m.setAttribute(h,""):m.hasAttribute(h)&&m.removeAttribute(h)};o("page",typeof e=="number"&&Number.isFinite(e)?String(e):null),o("count",typeof t=="number"&&Number.isFinite(t)?String(t):null),o("size",i&&i!=="md"?i:null),o("variant",r&&r!=="default"?r:null),o("aria-label",d??null),w("headless",l)},[e,t,i,r,d,l]),g.createElement("ui-pagination",{ref:b,...y},E)});sr.displayName="Pagination";const or=g.forwardRef((a,e)=>g.createElement("ui-direction-provider",{ref:e,...a}));or.displayName="DirectionProvider";const Si=typeof window<"u"?g.default.useLayoutEffect:g.default.useEffect,cr=g.default.forwardRef(function({children:e,open:t,headless:i,dismissible:r,closeOnEsc:l,closeOnBackdrop:d,lockWhileLoading:c,roleType:s,tone:u,variant:A,size:n,radius:p,elevation:E,indicator:y,state:v,initialFocus:b,dialogId:m,config:o,onOpen:w,onConfirm:h,onCancel:L,onDismiss:R,onClose:N,onChange:S,...k},B){const T=f.useRef(null);return g.default.useImperativeHandle(B,()=>T.current),f.useEffect(()=>{const D=T.current;if(!D)return;const $=x=>w==null?void 0:w(x.detail),q=x=>h==null?void 0:h(x.detail),J=x=>L==null?void 0:L(x.detail),P=x=>R==null?void 0:R(x.detail),F=x=>N==null?void 0:N(x.detail),j=x=>S==null?void 0:S(x.detail);return D.addEventListener("ui-open",$),D.addEventListener("ui-confirm",q),D.addEventListener("ui-cancel",J),D.addEventListener("ui-dismiss",P),D.addEventListener("ui-close",F),D.addEventListener("ui-change",j),()=>{D.removeEventListener("ui-open",$),D.removeEventListener("ui-confirm",q),D.removeEventListener("ui-cancel",J),D.removeEventListener("ui-dismiss",P),D.removeEventListener("ui-close",F),D.removeEventListener("ui-change",j)}},[w,h,L,R,N,S]),Si(()=>{const D=T.current;D&&(i?D.setAttribute("headless",""):D.removeAttribute("headless"),typeof t=="boolean"&&t?D.setAttribute("open",""):D.removeAttribute("open"),typeof r=="boolean"?D.setAttribute("dismissible",String(r)):D.removeAttribute("dismissible"),typeof l=="boolean"?D.setAttribute("close-on-esc",String(l)):D.removeAttribute("close-on-esc"),typeof d=="boolean"?D.setAttribute("close-on-backdrop",String(d)):D.removeAttribute("close-on-backdrop"),typeof c=="boolean"?D.setAttribute("lock-while-loading",String(c)):D.removeAttribute("lock-while-loading"),s?D.setAttribute("role",s):D.removeAttribute("role"),u&&u!=="neutral"?D.setAttribute("tone",u):D.removeAttribute("tone"),A&&A!=="surface"?D.setAttribute("variant",A):D.removeAttribute("variant"),n&&n!=="md"&&n!=="2"?D.setAttribute("size",n):D.removeAttribute("size"),p!=null?D.setAttribute("radius",String(p)):D.removeAttribute("radius"),E&&E!=="low"?D.setAttribute("elevation",E):D.removeAttribute("elevation"),y&&y!=="line"?D.setAttribute("indicator",y):D.removeAttribute("indicator"),v&&v!=="idle"?D.setAttribute("state",v):D.removeAttribute("state"),b?D.setAttribute("initial-focus",b):D.removeAttribute("initial-focus"),m&&(D.dialogId=m),o?D.config=o:D.config={})},[t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o]),g.default.createElement("ui-alert-dialog",{ref:T,...k},e)});cr.displayName="AlertDialog";function Le(a,e,t,i){const r=g.default.forwardRef(function({as:d,children:c,style:s,...u},A){const n=d||a,p={ref:A,...u};return t&&(p.slot=t),i&&(p[i]=""),s&&(p.style=s),g.default.createElement(n,p,c)});return r.displayName=e,r}const Hi=Le("span","AlertDialogIcon","icon","data-ui-alert-dialog-icon"),ki=Le("div","AlertDialogTitle","title","data-ui-alert-dialog-title"),Pi=Le("div","AlertDialogDescription","description","data-ui-alert-dialog-description"),Ii=Le("div","AlertDialogContent","content","data-ui-alert-dialog-content"),Ti=Le("div","AlertDialogActions","footer","data-ui-alert-dialog-actions"),fr=f.createContext(null),Ee="data-ui-alert-dialog-react-host-refcount";function Di({children:a,hostId:e="ui-alert-dialog-react-host",defaults:t}){const i=f.useRef(null);i.current||(i.current=se.createAlertDialogManager()),f.useEffect(()=>{var l;(l=i.current)==null||l.setDefaults(t||null)},[t]),f.useEffect(()=>{var s;if(typeof document>"u")return;let l=document.getElementById(e);const d=!l;l||(l=document.createElement("div"),l.id=e,l.setAttribute("data-ui-alert-dialog-react-host","true"),document.body.appendChild(l));const c=Number(l.getAttribute(Ee)||"0");return l.setAttribute(Ee,String(Math.max(0,c)+1)),(s=i.current)==null||s.setContainer(l),()=>{var n,p;if((n=i.current)==null||n.destroy("unmount"),i.current=null,!l||!l.isConnected)return;const u=Number(l.getAttribute(Ee)||"1"),A=Math.max(0,u-1);A===0?(l.removeAttribute(Ee),d&&((p=l.parentElement)==null||p.removeChild(l))):l.setAttribute(Ee,String(A))}},[e]);const r=f.useMemo(()=>({alert:(l={})=>{var d;return((d=i.current)==null?void 0:d.alert(l))??Promise.resolve({id:"",action:"dismiss"})},confirm:(l={})=>{var d;return((d=i.current)==null?void 0:d.confirm(l))??Promise.resolve({id:"",action:"dismiss"})},prompt:(l={})=>{var d;return((d=i.current)==null?void 0:d.prompt(l))??Promise.resolve({id:"",action:"dismiss",value:""})}}),[]);return g.default.createElement(fr.Provider,{value:r},a)}function Fi(){const a=f.useContext(fr);if(!a)throw new Error("useAlertDialog must be used within <AlertDialogProvider>.");return a}const $i=typeof window<"u"?f.useLayoutEffect:f.useEffect,ar=g.default.forwardRef(function({children:e,value:t,valueStart:i,valueEnd:r,min:l,max:d,step:c,range:s,disabled:u,headless:A,orientation:n,size:p,variant:E,tone:y,showValue:v,format:b,label:m,description:o,marks:w,name:h,nameStart:L,nameEnd:R,onInput:N,onChange:S,onValueChange:k,...B},T){const D=f.useRef(null);return f.useImperativeHandle(T,()=>D.current),f.useEffect(()=>{const $=D.current;if(!$)return;const q=P=>{const F=P.detail;F&&(N==null||N(Number(F.value)),k==null||k(F))},J=P=>{const F=P.detail;F&&(S==null||S(Number(F.value)),k==null||k(F))};return $.addEventListener("input",q),$.addEventListener("change",J),()=>{$.removeEventListener("input",q),$.removeEventListener("change",J)}},[N,S,k]),$i(()=>{const $=D.current;if(!$)return;const q=(P,F)=>{const j=$.getAttribute(P);if(F==null){j!=null&&$.removeAttribute(P);return}j!==F&&$.setAttribute(P,F)},J=(P,F,j)=>{if(F==null){j!==void 0&&j===!1&&q(P,null);return}F?q(P,""):q(P,null)};if(q("value",typeof t=="number"&&Number.isFinite(t)?String(t):null),q("value-start",typeof i=="number"&&Number.isFinite(i)?String(i):null),q("value-end",typeof r=="number"&&Number.isFinite(r)?String(r):null),q("min",typeof l=="number"&&Number.isFinite(l)?String(l):null),q("max",typeof d=="number"&&Number.isFinite(d)?String(d):null),q("step",typeof c=="number"&&Number.isFinite(c)?String(c):null),J("range",s),J("disabled",u),J("headless",A),q("orientation",n&&n!=="horizontal"?n:null),q("size",p&&p!=="md"?p:null),q("variant",E&&E!=="default"?E:null),q("tone",y&&y!=="brand"?y:null),typeof v=="boolean"?q("show-value",v?"true":"false"):q("show-value",null),q("format",b||null),q("label",m||null),q("description",o||null),q("name",h||null),q("name-start",L||null),q("name-end",R||null),w&&w.length)try{q("marks",JSON.stringify(w))}catch{q("marks",null)}else q("marks",null)},[t,i,r,l,d,c,s,u,A,n,p,E,y,v,b,m,o,w,h,L,R]),g.default.createElement("ui-slider",{ref:D,...B},e)});ar.displayName="Slider";const xi=typeof window<"u"?f.useLayoutEffect:f.useEffect;function qi(a){const{count:e,width:t,height:i,radius:r,gap:l,duration:d,variant:c,animation:s,density:u,tone:A,animated:n,headless:p,...E}=a,y=f.useRef(null);return xi(()=>{const v=y.current;v&&(typeof e=="number"&&Number.isFinite(e)?v.setAttribute("count",String(e)):v.removeAttribute("count"),t?v.setAttribute("width",t):v.removeAttribute("width"),i?v.setAttribute("height",i):v.removeAttribute("height"),r?v.setAttribute("radius",r):v.removeAttribute("radius"),l?v.setAttribute("gap",l):v.removeAttribute("gap"),d?v.setAttribute("duration",d):v.removeAttribute("duration"),c?v.setAttribute("variant",c):v.removeAttribute("variant"),s&&s!=="none"?v.setAttribute("animation",s):s==="none"?v.setAttribute("animation","none"):v.removeAttribute("animation"),u&&u!=="default"?v.setAttribute("density",u):v.removeAttribute("density"),A&&A!=="default"?v.setAttribute("tone",A):v.removeAttribute("tone"),n?v.setAttribute("animated",""):v.removeAttribute("animated"),p?v.setAttribute("headless",""):v.removeAttribute("headless"))},[e,t,i,r,l,d,c,s,u,A,n,p]),g.default.createElement("ui-skeleton",{ref:y,...E})}exports.Alert=ye.Alert;exports.AlertActions=ye.AlertActions;exports.AlertDescription=ye.AlertDescription;exports.AlertIcon=ye.AlertIcon;exports.AlertTitle=ye.AlertTitle;exports.Input=Nr.Input;exports.Textarea=Rr.Textarea;exports.Combobox=Sr.Combobox;exports.Wizard=Hr.Wizard;exports.Rating=kr.Rating;exports.QuickActions=Pr.QuickActions;exports.Menubar=Ir.Menubar;exports.Popover=Tr.Popover;exports.Tabs=Dr.Tabs;exports.Menu=we.Menu;exports.MenuItem=we.MenuItem;exports.MenuSectionLabel=we.MenuSectionLabel;exports.MenuSeparator=we.MenuSeparator;Object.defineProperty(exports,"toastAdvanced",{enumerable:!0,get:()=>te.toastAdvanced});Object.defineProperty(exports,"toastLegacy",{enumerable:!0,get:()=>Or.default});Object.defineProperty(exports,"toastPro",{enumerable:!0,get:()=>te.toastPro});exports.FloatingToolbar=Fr.FloatingToolbar;exports.Command=Be.Command;exports.CommandItem=Be.CommandItem;exports.CommandPalette=je.CommandPalette;exports.CommandPaletteItem=je.CommandPaletteItem;exports.SelectionPopup=xr.SelectionPopup;exports.Form=qr.Form;exports.Sidebar=Mr.Sidebar;exports.Tree=Br.Tree;exports.Breadcrumb=jr.Breadcrumb;exports.AppHeader=pe.ComposedAppHeader;exports.AppHeaderCenter=pe.AppHeaderCenter;exports.AppHeaderEnd=pe.AppHeaderEnd;exports.AppHeaderStart=pe.AppHeaderStart;exports.AppHeaderSubtitle=pe.AppHeaderSubtitle;exports.AppHeaderTitle=pe.AppHeaderTitle;exports.Drawer=Gr.Drawer;exports.Layout=Jr.Layout;exports.Switch=_r.Switch;exports.Toggle=Ge.Toggle;exports.ToggleGroup=Ge.ToggleGroup;exports.Collapsible=Ur.Collapsible;exports.Accordion=Qr.Accordion;exports.HoverCard=Wr.HoverCard;exports.Card=Xr.Card;exports.Label=Yr.Label;exports.Select=Kr.Select;exports.AlertDialog=cr;exports.AlertDialogActions=Ti;exports.AlertDialogContent=Ii;exports.AlertDialogDescription=Pi;exports.AlertDialogIcon=Hi;exports.AlertDialogProvider=Di;exports.AlertDialogTitle=ki;exports.Anchor=Yt;exports.AspectRatio=zt;exports.Avatar=Ot;exports.Badge=an;exports.BlockControls=$t;exports.Box=zn;exports.Button=Je;exports.Calendar=it;exports.Chart=An;exports.Checkbox=Kt;exports.Collection=Jt;exports.ColorPicker=lt;exports.Container=ei;exports.ContextMenu=Xn;exports.ControlGroup=Ve;exports.DataTable=vn;exports.DateField=ft;exports.DatePicker=ut;exports.DateRangePicker=st;exports.DateRangeTimePicker=yt;exports.DateTimePicker=Et;exports.Description=ze;exports.Dialog=Pt;exports.DialogProvider=qn;exports.DirectionProvider=or;exports.DismissableLayer=Qt;exports.Dropdown=en;exports.DropdownContent=ke;exports.DropdownItem=Pe;exports.DropdownSectionLabel=Te;exports.DropdownSeparator=Ie;exports.DropdownTrigger=He;exports.Dropzone=Ze;exports.EmptyState=mn;exports.Field=cn;exports.FieldError=Oe;exports.Fieldset=Ce;exports.FileUpload=Ke;exports.Flex=On;exports.FocusScope=Wt;exports.Gantt=Lt;exports.Grid=Vn;exports.Icon=Tt;exports.InlineEdit=pt;exports.Listbox=_t;exports.Meter=er;exports.MultiSelect=mt;exports.NavigationMenu=$n;exports.NavigationMenuContent=St;exports.NavigationMenuIndicator=Ht;exports.NavigationMenuItem=ht;exports.NavigationMenuLink=Rt;exports.NavigationMenuList=wt;exports.NavigationMenuRoot=Se;exports.NavigationMenuTrigger=Nt;exports.NavigationMenuViewport=kt;exports.NumberField=dt;exports.OTPInput=un;exports.Pagination=sr;exports.Panel=Bt;exports.PanelGroup=Mt;exports.PasswordField=Qe;exports.PinInput=De;exports.PluginPanel=xt;exports.Portal=tr;exports.Positioner=Xt;exports.Presence=Vt;exports.Progress=Ct;exports.RadioGroup=Zt;exports.RovingFocusGroup=Ut;exports.ScrollArea=rr;exports.Section=qt;exports.Separator=nr;exports.Skeleton=qi;exports.Slider=ar;exports.Slot=ir;exports.SplitButton=bt;exports.Splitter=jt;exports.Stepper=gt;exports.Table=bn;exports.TagsInput=We;exports.ThemeProvider=ii;exports.TimeField=at;exports.TimePicker=At;exports.Timeline=nt;exports.Toast=Ft;exports.ToastAPI=Gn;exports.ToastProvider=Jn;exports.Toolbar=lr;exports.Tooltip=_e;exports.TransferList=vt;exports.VisuallyHidden=ur;exports.toast=jn;exports.toastApi=Fe;exports.useAlertDialog=Fi;exports.useDialog=Mn;exports.useFloating=Zn;exports.useForm=Kn;exports.useTheme=li;exports.useToast=_n;