@llmops/app 0.1.3-beta.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +261 -167
- package/dist/assets/Form-B1Xes2HX.js +1 -0
- package/dist/assets/_environment-BHroMRce.js +1 -0
- package/dist/assets/_settings-B87EsM9n.css +1 -0
- package/dist/assets/_settings-BK4LOT_O.js +1 -0
- package/dist/assets/{_tabs-f2ku-dN-.js → _tabs-DWvdcnbx.js} +1 -1
- package/dist/assets/{_tabs-DqcWXw0k.js → _tabs-spsrS7rN.js} +1 -1
- package/dist/assets/{_variant-D5crm4Ds.js → _variant-i8-2ZjCg.js} +1 -1
- package/dist/assets/{_variants-B0pPx_AW.js → _variants-DiPU43aS.js} +1 -1
- package/dist/assets/area.css-d_0zeUpe.js +1 -0
- package/dist/assets/{button-DO9sNXVT.js → button-D46pme1q.js} +1 -1
- package/dist/assets/check-Cp187nGx.js +1 -0
- package/dist/assets/{chevron-right-C4hlJkjh.js → chevron-right-CS1Toe_9.js} +1 -1
- package/dist/assets/configs-BWQEZkYp.js +1 -0
- package/dist/assets/{copy-8RnLMadS.js → copy-BQ-62Ur4.js} +1 -1
- package/dist/assets/environments-CxEwSvmp.js +1 -0
- package/dist/assets/formatDistance-CEmiEHX5.js +1 -0
- package/dist/assets/index-BEbVINNT.js +1 -0
- package/dist/assets/{index-Cr1VB5iR.js → index-CadPnEMv.js} +1 -1
- package/dist/assets/index-D3G5uHLZ.js +1 -0
- package/dist/assets/{index-CzBp_9q8.css → index-DnQMGf2R.css} +1 -1
- package/dist/assets/index-KuidudiV.js +1 -0
- package/dist/assets/index-nHWjhrFW.js +16 -0
- package/dist/assets/index.esm-DJMnkOur.js +1 -0
- package/dist/assets/info-box-JXSyJ9E4.css +1 -0
- package/dist/assets/info-box.css-DyjK40Ax.js +1 -0
- package/dist/assets/new-config-state.css-zldOiAQS.js +1 -0
- package/dist/assets/{plus-BNVL12hi.js → plus-5oc_diIr.js} +1 -1
- package/dist/assets/route-CYSM3PkP.js +1 -0
- package/dist/assets/{route-DCt595Gm.js → route-CpTvuTp9.js} +1 -1
- package/dist/assets/{route-D_ra2qKi.js → route-TG1bSyy8.js} +1 -1
- package/dist/assets/{secrets-DoNAc8Mo.js → secrets-dM6OVjcE.js} +1 -1
- package/dist/assets/{settings-CdtZpv34.js → settings-C74FVCr5.js} +1 -1
- package/dist/assets/{settings-C9bl_jrl.js → settings-D4fugFLx.js} +1 -1
- package/dist/assets/{table-6j4oSY37.js → table-SKwX9qUc.js} +1 -1
- package/dist/assets/{tabs.css-BDs200M3.js → tabs.css-BvfbDFW8.js} +1 -1
- package/dist/assets/{targeting-BOZ8PRbu.js → targeting-rpE0HiKJ.js} +1 -1
- package/dist/assets/{update-or-create-name-B72U1gm0.js → update-or-create-name-Cd1zyalO.js} +2 -2
- package/dist/assets/{useButton-CAZmhHhe.js → useButton-DfUAk02P.js} +1 -1
- package/dist/assets/useConfigList-CN-eUdau.js +1 -0
- package/dist/assets/{useConfigVariants-DoAiT4HN.js → useConfigVariants-CIAilMey.js} +1 -1
- package/dist/assets/useEnvironments-D798jdLi.js +1 -0
- package/dist/assets/{useMutation-B5RT6zjK.js → useMutation-ppBqjQps.js} +1 -1
- package/dist/assets/{useRole-BBEFofTs.js → useRole-D2HhbdS4.js} +1 -1
- package/dist/assets/useSetTargeting-C3RG0vdV.js +1 -0
- package/dist/assets/useSetTargeting-CQWutQzN.css +1 -0
- package/dist/assets/useTargetingRules-Bi-hIPWR.js +1 -0
- package/dist/assets/useValueChanged-2Bqw2vWT.js +12 -0
- package/dist/assets/user-profile-CvRPKkVY.js +1 -0
- package/dist/assets/variants-CZaBWam0.js +1 -0
- package/dist/assets/variants.css-C4fJhzPe.js +1 -0
- package/dist/assets/workspace-general-ET4CEZQV.css +1 -0
- package/dist/assets/workspace-general-umhuExNi.js +1 -0
- package/dist/index.cjs +42 -15
- package/dist/index.mjs +42 -15
- package/package.json +3 -3
- package/dist/assets/Form-CR9iKNJV.js +0 -1
- package/dist/assets/_environment-DUWlgl3c.js +0 -1
- package/dist/assets/check-DqI6mrEe.js +0 -1
- package/dist/assets/configs-D7rrXGVw.js +0 -1
- package/dist/assets/environments-CQ_2r1iM.js +0 -1
- package/dist/assets/formatDistance-fxR--uRk.js +0 -1
- package/dist/assets/index-8q56yhPq.js +0 -16
- package/dist/assets/index-CAAXzvj0.js +0 -1
- package/dist/assets/index-Dd3OazzV.js +0 -1
- package/dist/assets/index.esm-Du3lv78y.js +0 -1
- package/dist/assets/new-config-state.css-BkrgBLVT.js +0 -1
- package/dist/assets/useConfigList-DVy2f9Ka.js +0 -1
- package/dist/assets/useEnvironments-B9zdgoPZ.js +0 -1
- package/dist/assets/useSetTargeting-DIyb-zyZ.css +0 -1
- package/dist/assets/useSetTargeting-x-2mNQAV.js +0 -1
- package/dist/assets/useTargetingRules-DWyIfOXq.js +0 -1
- package/dist/assets/useValueChanged-DLCw33hO.js +0 -12
- package/dist/assets/variants-CLcQicJ2.js +0 -1
- package/dist/assets/variants.css-CRQAZpOT.js +0 -1
- /package/dist/assets/{formatDistance-DoOD1Loz.css → area-DoOD1Loz.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{V as $,W as H,X as B,Y as A,r as s,Z as J,_ as X,$ as Z,a0 as W,a1 as q,a2 as z,a3 as V,a4 as Q,a5 as ee,a6 as O,a7 as te,a8 as ne,a9 as oe,j as k,aa as M,ab as _,ac as K,ad as se,ae as j,af as F,ag as re,ah as ae,ai as ie,aj as le,ak as ue,al as U,am as ce,an as de}from"./index-nHWjhrFW.js";import{u as pe,a as fe,F as ge,I as me,i as Ce,b as Se,c as Re,d as he}from"./useValueChanged-2Bqw2vWT.js";import{u as xe,C as Ee}from"./useRole-D2HhbdS4.js";import{u as G}from"./useButton-DfUAk02P.js";function ve(t){const{store:e,parentContext:o,actionsRef:C}=t,l=e.useState("open"),r=e.useState("disablePointerDismissal"),u=e.useState("modal"),i=e.useState("popupElement"),{openMethod:n,triggerProps:g,reset:p}=pe(l);$(e);const{forceUnmount:f}=H(l,e,()=>{p()}),a=B(E=>{const b=A(E);return b.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},b}),S=s.useCallback(()=>{e.setOpen(!1,a(J))},[e,a]);s.useImperativeHandle(C,()=>({unmount:f,close:S}),[f,S]);const d=X({popupStore:e,onOpenChange:e.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[R,v]=s.useState(0),h=R===0,y=xe(d),c=Z(d,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?"intentional":{mouse:u==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(E){if("button"in E&&E.button!==0||"touches"in E&&E.touches.length!==1)return!1;const b=q(E);if(h&&!r){const w=b;return u&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===w||e.context.backdropRef.current===w||z(w,i)&&!w?.hasAttribute("data-base-ui-portal"):!0}return!1},escapeKey:h});fe(l&&u===!0,i);const{getReferenceProps:m,getFloatingProps:P,getTriggerProps:x}=W([y,c]);e.useContextCallback("onNestedDialogOpen",E=>{v(E+1)}),e.useContextCallback("onNestedDialogClose",()=>{v(0)}),s.useEffect(()=>(o?.onNestedDialogOpen&&l&&o.onNestedDialogOpen(R),o?.onNestedDialogClose&&!l&&o.onNestedDialogClose(),()=>{o?.onNestedDialogClose&&l&&o.onNestedDialogClose()}),[l,o,R]);const D=s.useMemo(()=>m(g),[m,g]),I=s.useMemo(()=>x(g),[x,g]),N=s.useMemo(()=>P(),[P]);e.useSyncedValues({openMethod:n,activeTriggerProps:D,inactiveTriggerProps:I,popupProps:N,floatingRootContext:d,nestedOpenDialogCount:R})}const Y=s.createContext(void 0);function T(t){const e=s.useContext(Y);if(t===!1&&e===void 0)throw new Error(V(27));return e}const Ie={...te,modal:O(t=>t.modal),nested:O(t=>t.nested),nestedOpenDialogCount:O(t=>t.nestedOpenDialogCount),disablePointerDismissal:O(t=>t.disablePointerDismissal),openMethod:O(t=>t.openMethod),descriptionElementId:O(t=>t.descriptionElementId),titleElementId:O(t=>t.titleElementId),viewportElement:O(t=>t.viewportElement),role:O(t=>t.role)};class Pe extends Q{constructor(e){super(be(e),{popupRef:s.createRef(),backdropRef:s.createRef(),internalBackdropRef:s.createRef(),triggerElements:new ee,onOpenChange:void 0,onOpenChangeComplete:void 0},Ie)}setOpen=(e,o)=>{if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!e&&o.trigger==null&&this.state.activeTriggerId!=null&&(o.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,o),o.isCanceled)return;const C={open:e,nativeEvent:o.event,reason:o.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",C);const l={open:e},r=o.trigger?.id??null;(r||e)&&(l.activeTriggerId=r,l.activeTriggerElement=o.trigger??null),this.update(l)}}function be(t={}){return{...ne(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...t}}function Be(t){const{children:e,open:o,defaultOpen:C=!1,onOpenChange:l,onOpenChangeComplete:r,actionsRef:u,handle:i,triggerId:n,defaultTriggerId:g=null}=t,p=T(),f=!!p,a=oe(()=>i?.store??new Pe({open:o??C,activeTriggerId:n!==void 0?n:g,modal:!0,disablePointerDismissal:!0,nested:f,role:"alertdialog"})).current;a.useControlledProp("open",o,C),a.useControlledProp("activeTriggerId",n,g),a.useSyncedValue("nested",f),a.useContextCallback("onOpenChange",l),a.useContextCallback("onOpenChangeComplete",r);const S=a.useState("payload");ve({store:a,actionsRef:u,parentContext:p?.store.context});const d=s.useMemo(()=>({store:a}),[a]);return k.jsx(Y.Provider,{value:d,children:typeof e=="function"?e({payload:S}):e})}const Oe={..._,...K},Ve=s.forwardRef(function(e,o){const{render:C,className:l,forceRender:r=!1,...u}=e,{store:i}=T(),n=i.useState("open"),g=i.useState("nested"),p=i.useState("mounted"),f=i.useState("transitionStatus"),a=s.useMemo(()=>({open:n,transitionStatus:f}),[n,f]);return M("div",e,{state:a,ref:[i.context.backdropRef,o],stateAttributesMapping:Oe,props:[{role:"presentation",hidden:!p,style:{userSelect:"none",WebkitUserSelect:"none"}},u],enabled:r||!g})}),je=s.forwardRef(function(e,o){const{render:C,className:l,disabled:r=!1,nativeButton:u=!0,...i}=e,{store:n}=T(),g=n.useState("open");function p(d){g&&n.setOpen(!1,A(se,d.nativeEvent))}const{getButtonProps:f,buttonRef:a}=G({disabled:r,native:u}),S=s.useMemo(()=>({disabled:r}),[r]);return M("button",e,{state:S,ref:[o,a],props:[{onClick:p},i,f]})}),Ue=s.forwardRef(function(e,o){const{render:C,className:l,id:r,...u}=e,{store:i}=T(),n=j(r);return i.useSyncedValueWithCleanup("descriptionElementId",n),M("p",e,{ref:o,props:[{id:n},u]})});let De=(function(t){return t.nestedDialogs="--nested-dialogs",t})({}),Te=(function(t){return t[t.open=F.open]="open",t[t.closed=F.closed]="closed",t[t.startingStyle=F.startingStyle]="startingStyle",t[t.endingStyle=F.endingStyle]="endingStyle",t.nested="data-nested",t.nestedDialogOpen="data-nested-dialog-open",t})({});const L=s.createContext(void 0);function ye(){const t=s.useContext(L);if(t===void 0)throw new Error(V(26));return t}const Me={..._,...K,nestedDialogOpen(t){return t?{[Te.nestedDialogOpen]:""}:null}},Ae=s.forwardRef(function(e,o){const{className:C,finalFocus:l,initialFocus:r,render:u,...i}=e,{store:n}=T(),g=n.useState("descriptionElementId"),p=n.useState("disablePointerDismissal"),f=n.useState("floatingRootContext"),a=n.useState("popupProps"),S=n.useState("modal"),d=n.useState("mounted"),R=n.useState("nested"),v=n.useState("nestedOpenDialogCount"),h=n.useState("open"),y=n.useState("openMethod"),c=n.useState("titleElementId"),m=n.useState("transitionStatus"),P=n.useState("role");ye(),re({open:h,ref:n.context.popupRef,onComplete(){h&&n.context.onOpenChangeComplete?.(!0)}});function x(b){return b==="touch"?n.context.popupRef.current:!0}const D=r===void 0?x:r,I=v>0,N=s.useMemo(()=>({open:h,nested:R,transitionStatus:m,nestedDialogOpen:I}),[h,R,m,I]),E=M("div",e,{state:N,props:[a,{"aria-labelledby":c??void 0,"aria-describedby":g??void 0,role:P,tabIndex:-1,hidden:!d,onKeyDown(b){Ee.has(b.key)&&b.stopPropagation()},style:{[De.nestedDialogs]:v}},i],ref:[o,n.context.popupRef,n.useStateSetter("popupElement")],stateAttributesMapping:Me});return k.jsx(ge,{context:f,openInteractionType:y,disabled:!d,closeOnFocusOut:!p,initialFocus:D,returnFocus:l,modal:S!==!1,restoreFocus:"popup",children:E})}),We=s.forwardRef(function(e,o){const{keepMounted:C=!1,...l}=e,{store:r}=T(),u=r.useState("mounted"),i=r.useState("modal");return u||C?k.jsx(L.Provider,{value:C,children:k.jsxs(ae,{ref:o,...l,children:[u&&i===!0&&k.jsx(me,{ref:r.context.internalBackdropRef,inert:Ce(!open)}),e.children]})}):null}),_e=s.forwardRef(function(e,o){const{render:C,className:l,id:r,...u}=e,{store:i}=T(),n=j(r);return i.useSyncedValueWithCleanup("titleElementId",n),M("h2",e,{ref:o,props:[{id:n},u]})}),Ke=s.forwardRef(function(e,o){const{render:C,className:l,disabled:r=!1,nativeButton:u=!0,id:i,payload:n,handle:g,...p}=e,f=T(!0),a=g?.store??f?.store;if(!a)throw new Error(V(79));const S=j(i),d=a.useState("floatingRootContext"),R=a.useState("isOpenedByTrigger",S),v=s.useRef(null),{registerTrigger:h,isMountedByThisTrigger:y}=ie(S,v,a,{payload:n}),{getButtonProps:c,buttonRef:m}=G({disabled:r,native:u}),P=Se(d,{enabled:d!=null}),x=W([P]),D=s.useMemo(()=>({disabled:r,open:R}),[r,R]),I=a.useState("triggerProps",y);return M("button",e,{state:D,ref:[m,o,h,v],props:[x.getReferenceProps(),I,{[le]:"",id:S},p,c],stateAttributesMapping:ue})}),Ge=s.forwardRef(function(e,o){const{render:C,className:l,validationMode:r="onSubmit",errors:u,onSubmit:i,onFormSubmit:n,...g}=e,p=s.useRef({fields:new Map}),f=s.useRef(!1),a=s.useRef(!1),S=B(c=>{c&&(c.focus(),c.tagName==="INPUT"&&c.select())}),[d,R]=s.useState(u);Re(u,()=>{R(u)}),s.useEffect(()=>{if(!f.current)return;f.current=!1;const c=Array.from(p.current.fields.values()).filter(m=>m.validityData.state.valid===!1);c.length&&S(c[0].controlRef.current)},[d,S]);const v=M("form",e,{ref:o,props:[{noValidate:!0,onSubmit(c){a.current=!0;let m=Array.from(p.current.fields.values());m.forEach(x=>{x.validate()}),m=Array.from(p.current.fields.values());const P=m.filter(x=>!x.validityData.state.valid);if(P.length)c.preventDefault(),S(P[0].controlRef.current);else if(f.current=!0,i?.(c),n){c.preventDefault();const x=m.reduce((D,I)=>(I.name&&(D[I.name]=I.getValue()),D),{});n(x,ce(de,c.nativeEvent))}}},g]}),h=B(c=>{if(c&&d&&U.hasOwnProperty.call(d,c)){const m={...d};delete m[c],R(m)}}),y=s.useMemo(()=>({formRef:p,validationMode:r,errors:d??U,clearErrors:h,submitAttemptedRef:a}),[p,r,d,h]);return k.jsx(he.Provider,{value:y,children:v})});export{Be as A,Ke as D,Ge as F,We as a,Ve as b,Ae as c,_e as d,Ue as e,je as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Q,bp as X,j as i,d as Y,r as D,I as Z}from"./index-nHWjhrFW.js";import{B as ee}from"./button-D46pme1q.js";import{p as te,q as ne,j as G,v as J,k as K,i as M,S as ie,r as se,t as ae}from"./useSetTargeting-C3RG0vdV.js";import{u as re}from"./useEnvironments-D798jdLi.js";import{u as oe}from"./useConfigVariants-CIAilMey.js";import{u as le}from"./useTargetingRules-Bi-hIPWR.js";import{i as ce,a as de}from"./info-box.css-DyjK40Ax.js";/* empty css */import"./useButton-DfUAk02P.js";import"./useValueChanged-2Bqw2vWT.js";import"./useMutation-ppBqjQps.js";function Ce(){const t=Q.c(17),{id:e,environment:a}=X.useParams(),{data:c,isLoading:j}=re(),{data:o,isLoading:y}=oe(e),{data:L,isLoading:I}=le(e);if(j||y||I){let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{children:"Loading..."}),t[0]=s):s=t[0],s}let n;t[1]!==a||t[2]!==c?(n=c?.find(s=>s.id===a),t[1]=a,t[2]=c,t[3]=n):n=t[3];const S=n;if(!S){let s;return t[4]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{children:"Environment not found"}),t[4]=s):s=t[4],s}let r;t[5]!==a||t[6]!==L?(r=L?.find(s=>s.environmentId===a),t[5]=a,t[6]=L,t[7]=r):r=t[7];const R=r;let l;t[8]!==o?(l=o??[],t[8]=o,t[9]=l):l=t[9];const B=R?.configVariantId??null,E=R?.variantVersionId??null;let g;return t[10]!==e||t[11]!==S||t[12]!==a||t[13]!==l||t[14]!==B||t[15]!==E?(g=i.jsx(me,{configId:e,environmentId:a,environment:S,variants:l,initialVariantId:B,initialVariantVersionId:E}),t[10]=e,t[11]=S,t[12]=a,t[13]=l,t[14]=B,t[15]=E,t[16]=g):g=t[16],g}function me(t){const e=Q.c(67),{configId:a,environmentId:c,environment:j,variants:o,initialVariantId:y,initialVariantVersionId:L}=t,I=Y(),v=te(),[n,S]=D.useState(y),[r,R]=D.useState(L??null);let l;if(e[0]!==n||e[1]!==o){let m;e[3]!==n?(m=P=>P.id===n,e[3]=n,e[4]=m):m=e[4],l=o.find(m),e[0]=n,e[1]=o,e[2]=l}else l=e[2];const E=l?.variantId??"",{data:g,isLoading:s}=ne(E);let $,w;e[5]!==y||e[6]!==n?($=()=>{n!==y&&R(null)},w=[n,y],e[5]=y,e[6]=n,e[7]=$,e[8]=w):($=e[7],w=e[8]),D.useEffect($,w);let k;e[9]!==o?(k=o.map(ge),e[9]=o,e[10]=k):k=e[10];const u=k;let p,b,h,x,V,N,d;if(e[11]!==a||e[12]!==j.name||e[13]!==c||e[14]!==s||e[15]!==I||e[16]!==n||e[17]!==r||e[18]!==v||e[19]!==u||e[20]!==o||e[21]!==g){d=g?.map(ve)??[];let m;e[29]!==a||e[30]!==c||e[31]!==I||e[32]!==n||e[33]!==r||e[34]!==v?(m=async()=>{if(!(!n||!r))try{await v.mutateAsync({environmentId:c,configId:a,configVariantId:n,variantVersionId:r}),I({to:"/configs/$id/targeting",params:{id:a}})}catch(f){console.error("Error setting targeting:",f)}},e[29]=a,e[30]=c,e[31]=I,e[32]=n,e[33]=r,e[34]=v,e[35]=m):m=e[35];const P=m;let z;e[36]===Symbol.for("react.memo_cache_sentinel")?(z={justifyContent:"flex-end"},e[36]=z):z=e[36];const W=!n||!r||v.isPending;let F;e[37]===Symbol.for("react.memo_cache_sentinel")?(F=i.jsx(Z,{icon:ie,size:"sm"}),e[37]=F):F=e[37];const A=v.isPending?"Saving...":"Save";e[38]!==P||e[39]!==W||e[40]!==A?(p=i.jsx("div",{className:se,style:z,children:i.jsxs(ee,{variant:"primary",onClick:P,disabled:W,children:[F,A]})}),e[38]=P,e[39]=W,e[40]=A,e[41]=p):p=e[41],b=ae,e[42]!==j.name?(h=i.jsxs("div",{className:ce,children:["The selected variant will be served to all requests in the"," ",i.jsx("span",{className:de,children:j.name})," ","environment"]}),e[42]=j.name,e[43]=h):h=e[43];let H;e[44]===Symbol.for("react.memo_cache_sentinel")?(H=i.jsx("div",{className:J,style:{minWidth:"120px"},children:"Variant"}),e[44]=H):H=e[44];let T;e[45]!==o?(T=f=>{if(!f)return"";const O=o.find(U=>U.id===f);return O?O.name:f},e[45]=o,e[46]=T):T=e[46],e[47]!==n||e[48]!==T||e[49]!==u?(x=i.jsxs("div",{className:G,children:[H,i.jsx("div",{className:K,children:i.jsx(M,{items:u,value:n,onValueChange:S,placeholder:"Select a variant...",itemToString:T})})]}),e[47]=n,e[48]=T,e[49]=u,e[50]=x):x=e[50],e[51]!==u.length?(V=u.length===0&&i.jsx("div",{style:{marginTop:"1rem",opacity:.6},children:"No variants available. Create a variant first to configure targeting."}),e[51]=u.length,e[52]=V):V=e[52],N=n&&i.jsxs("div",{className:G,children:[i.jsx("div",{className:J,style:{minWidth:"120px"},children:"Version"}),i.jsx("div",{className:K,children:s?i.jsx("span",{style:{opacity:.6},children:"Loading versions..."}):d.length===0?i.jsx("span",{style:{opacity:.6},children:"No versions available"}):i.jsx(M,{items:d,value:d.find(f=>f.id===r)??null,onValueChange:f=>R(f?.id??null),placeholder:"Select version...",itemToString:fe})})]}),e[11]=a,e[12]=j.name,e[13]=c,e[14]=s,e[15]=I,e[16]=n,e[17]=r,e[18]=v,e[19]=u,e[20]=o,e[21]=g,e[22]=p,e[23]=b,e[24]=h,e[25]=x,e[26]=V,e[27]=N,e[28]=d}else p=e[22],b=e[23],h=e[24],x=e[25],V=e[26],N=e[27],d=e[28];let C;e[53]!==n||e[54]!==r||e[55]!==d?(C=n&&!r&&d.length>0&&i.jsx("div",{style:{marginTop:"0.5rem",fontSize:"0.75rem",color:"var(--gray9)"},children:"Select a version to deploy to this environment."}),e[53]=n,e[54]=r,e[55]=d,e[56]=C):C=e[56];let _;e[57]!==C||e[58]!==b||e[59]!==h||e[60]!==x||e[61]!==V||e[62]!==N?(_=i.jsxs("div",{className:b,children:[h,x,V,N,C]}),e[57]=C,e[58]=b,e[59]=h,e[60]=x,e[61]=V,e[62]=N,e[63]=_):_=e[63];let q;return e[64]!==p||e[65]!==_?(q=i.jsxs("div",{children:[p,_]}),e[64]=p,e[65]=_,e[66]=q):q=e[66],q}function fe(t){return t?.label??""}function ve(t){return{id:t.id,label:`Version ${t.version}`,version:t.version}}function ge(t){return t.id}export{Ce as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.iks4pd0{display:flex;height:100%}.iks4pd2{width:200px;border-right:1px solid var(--tyy9ow1n);flex-shrink:0}.iks4pd6{font-weight:500;letter-spacing:.05em}.iks4pd8{line-height:1rem;align-items:center;gap:.5rem;border-radius:.25rem;text-decoration:none;cursor:pointer;transition:all .2s ease-in-out;border:none;width:100%;font-weight:400;text-align:left;color:var(--tyy9ow1s);background-color:transparent}.iks4pd8:hover{background-color:var(--tyy9ow1m)}.iks4pd8.active{background-color:var(--tyy9ow1n);color:var(--tyy9ow1u)}.iks4pda{flex:1;overflow-y:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,j as s,L as f,I as p,U as j,B as S,u as v,b as N,e as y,O as B}from"./index-nHWjhrFW.js";import{w as D,b as C,C as w,c as I,B as L,H as R,a as E,h as T,g as U}from"./area.css-d_0zeUpe.js";import{B as G}from"./button-D46pme1q.js";import{C as H}from"./chevron-right-CS1Toe_9.js";/* empty css */import"./useButton-DfUAk02P.js";var O="iks4pd0",W="iks4pd2 iks4pd1 _1lg22bks0 _1lg22bksi _1lg22bktr _1lg22bk6 _1lg22bkpr",_="iks4pd4 iks4pd3 _1lg22bks0 _1lg22bksi _1lg22bkto",h="iks4pd6 iks4pd5 _1lg22bkux _1lg22bkw0 _1lg22bkj3 _1lg22bk3",x="iks4pd8 iks4pd7 _1lg22bks0 _1lg22bk3 _1lg22bkv0 _1lg22bkj9 _1lg22bkw0",$="iks4pda iks4pd9 _1lg22bk9";function z(){const e=u.c(4);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("span",{className:h,children:"User"}),e[0]=a):a=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:_,children:[a,s.jsxs(f,{to:"/settings/user-profile",className:x,children:[s.jsx(p,{icon:j}),"Profile"]})]}),e[1]=i):i=e[1];let t;e[2]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("span",{className:h,children:"Workspace"}),e[2]=t):t=e[2];let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("nav",{className:W,children:[i,s.jsxs("div",{className:_,children:[t,s.jsxs(f,{to:"/settings/workspace-general",className:x,children:[s.jsx(p,{icon:S}),"General"]})]})]}),e[3]=l):l=e[3],l}function V(){const e=u.c(16),{toggleSidebar:a}=v(),i=N();let t;e[0]!==i?(t=i.filter(F).map(A),e[0]=i,e[1]=t):t=e[1];const l=t;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(p,{icon:w}),e[2]=c):c=e[2];let r;e[3]!==a?(r=s.jsx(G,{onClick:a,size:"icon",variant:"ghost",scheme:"gray",children:c}),e[3]=a,e[4]=r):r=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(p,{icon:H,className:I}),e[5]=m):m=e[5];let n;e[6]!==l?(n=s.jsx(L,{items:l}),e[6]=l,e[7]=n):n=e[7];let o;e[8]!==r||e[9]!==n?(o=s.jsx(R,{className:E,children:s.jsxs("div",{className:T,children:[r,m,n]})}),e[8]=r,e[9]=n,e[10]=o):o=e[10];let d,b;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=y(D,O),b=s.jsx(z,{}),e[11]=d,e[12]=b):(d=e[11],b=e[12]);let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:U,children:s.jsxs("div",{className:d,children:[b,s.jsx("div",{className:$,children:s.jsx(B,{})})]})}),e[13]=g):g=e[13];let k;return e[14]!==o?(k=s.jsxs(s.Fragment,{children:[o,g]}),e[14]=o,e[15]=k):k=e[15],k}function A(e){const a=e.loaderData?.title,i=e.staticData.customData?.title,t=a??i;return{key:e.id,label:s.jsx(f,{to:e.pathname,className:C,children:t}),prefix:e.staticData.customData?.icon}}function F(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{V as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as b,
|
|
1
|
+
import{a as b,w as S,j as s,L as g,O as y}from"./index-nHWjhrFW.js";import{t as _,a as N}from"./tabs.css-BvfbDFW8.js";/* empty css *//* empty css */function E(){const e=b.c(25),{id:t}=S.useParams();if(!t)return null;let l;e[0]!==t?(l={id:t},e[0]=t,e[1]=l):l=e[1];let m,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=_(),f=s.jsx("span",{children:"Variants"}),e[2]=m,e[3]=f):(m=e[2],f=e[3]);let i;e[4]!==l?(i=s.jsx(g,{to:"/configs/$id/variants",params:l,className:m,children:f}),e[4]=l,e[5]=i):i=e[5];let a;e[6]!==t?(a={id:t},e[6]=t,e[7]=a):a=e[7];let p,d;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=_(),d=s.jsx("span",{children:"Targeting"}),e[8]=p,e[9]=d):(p=e[8],d=e[9]);let n;e[10]!==a?(n=s.jsx(g,{to:"/configs/$id/targeting",params:a,className:p,children:d}),e[10]=a,e[11]=n):n=e[11];let r;e[12]!==t?(r={id:t},e[12]=t,e[13]=r):r=e[13];let x,h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=_(),x=s.jsx("span",{children:"Settings"}),e[14]=x,e[15]=h):(x=e[14],h=e[15]);let o;e[16]!==r?(o=s.jsx(g,{to:"/configs/$id/settings",params:r,className:h,children:x}),e[16]=r,e[17]=o):o=e[17];let c;e[18]!==o||e[19]!==i||e[20]!==n?(c=s.jsxs("div",{className:N,children:[i,n,o]}),e[18]=o,e[19]=i,e[20]=n,e[21]=c):c=e[21];let j;e[22]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(y,{}),e[22]=j):j=e[22];let u;return e[23]!==c?(u=s.jsxs("div",{children:[c,j]}),e[23]=c,e[24]=u):u=e[24],u}export{E as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j,
|
|
1
|
+
import{a as j,v as d,j as s,L as u,O as v}from"./index-nHWjhrFW.js";import{t as h,a as _}from"./tabs.css-BvfbDFW8.js";/* empty css *//* empty css */function N(){const e=j.c(18),{environment:t}=d.useParams();if(!t)return null;let n;e[0]!==t?(n={environment:t},e[0]=t,e[1]=n):n=e[1];let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=h(),m=s.jsx("span",{children:"Secrets"}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let l;e[4]!==n?(l=s.jsx(u,{to:"/environments/$environment/secrets",params:n,className:a,children:m}),e[4]=n,e[5]=l):l=e[5];let i;e[6]!==t?(i={environment:t},e[6]=t,e[7]=i):i=e[7];let c,f;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=h(),f=s.jsx("span",{children:"Settings"}),e[8]=c,e[9]=f):(c=e[8],f=e[9]);let r;e[10]!==i?(r=s.jsx(u,{to:"/environments/$environment/settings",params:i,className:c,children:f}),e[10]=i,e[11]=r):r=e[11];let o;e[12]!==l||e[13]!==r?(o=s.jsxs("div",{className:_,children:[l,r]}),e[12]=l,e[13]=r,e[14]=o):o=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(v,{}),e[15]=p):p=e[15];let x;return e[16]!==o?(x=s.jsxs("div",{children:[o,p]}),e[16]=o,e[17]=x):x=e[17],x}export{N as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{al as op,r as w,a0 as St,am as xs,an as uu,ao as zi,ab as Cn,a7 as st,ad as du,ap as fu,aq as ip,j as k,V as et,a8 as Ws,ar as Ui,a9 as gu,ae as pu,as as ap,at as hu,au as mu,av as Gt,aw as yu,ax as vr,a1 as _u,a2 as vu,a3 as ve,a4 as xu,a6 as bu,ai as Vs,ay as Su,a5 as Cu,az as Ki,aA as Wi,aB as En,aC as lp,P as Eu,Q as Tu,aD as bs,U as Pe,aE as Ha,aF as Ss,aG as an,aH as or,aI as cp,aJ as wu,W as ku,X as Nu,Y as Au,aK as Hs,Z as $r,aL as Pu,aM as Iu,aN as Jo,aO as up,aP as Ru,aQ as dp,aR as fp,aS as tn,aT as gp,af as Ou,$ as Er,aU as pp,aV as Vi,aW as Hi,aX as hp,aY as Fu,aZ as Mu,a_ as $u,a$ as Lu,b0 as Go,b1 as Cs,b2 as Du,b3 as mp,ah as ju,b4 as yp,b5 as qi,ag as _p,b6 as vp,b7 as xp,b8 as bp,b9 as Bu,ak as Sp,aj as zu,ba as Uu,bb as Cp,bc as Ep,bd as xo,be as Tp,bf as qa,bg as Ja,k as Ku,a as De,d as Wu,I as Vu,bh as Ga,w as wp,h as Ji,f as Hu,bi as kp,b as Np,bj as Ap}from"./index-8q56yhPq.js";import{u as qs,C as qu,a as Pp,b as Ip,g as Rp,c as Ju,d as Op,e as Fp,f as Mp,h as $p,S as Lp,i as Gi,v as Ya,j as Dp,k as jp,m as Bp,l as zp,n as Up,o as Kp,p as Wp,q as Vp,r as Hp,s as qp,t as Jp}from"./useSetTargeting-x-2mNQAV.js";import{e as Gu,i as Qt,u as Gp}from"./index.esm-Du3lv78y.js";import{F as Yu,I as Zu,i as Xu,u as Qu,a as ed,b as Yi,e as Yp,c as Zp}from"./useValueChanged-DLCw33hO.js";import{C as Zi,u as td,H as nd,E as rd,A as sd,a as od,b as id,c as ad}from"./useRole-BBEFofTs.js";import{u as Xi,a as ld}from"./useButton-CAZmhHhe.js";import{C as Xp}from"./chevron-right-C4hlJkjh.js";import{C as cd}from"./check-DqI6mrEe.js";import{u as ud}from"./useMutation-B5RT6zjK.js";import{g as Qp,u as eh}from"./useConfigVariants-DoAiT4HN.js";import{u as th}from"./useTargetingRules-DWyIfOXq.js";import{B as bo}from"./button-DO9sNXVT.js";import{u as nh}from"./useEnvironments-B9zdgoPZ.js";/* empty css *//* empty css */function rh(n,e){if(n===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in n)return n;if(typeof n=="function")return{shouldBlockFn:async()=>await n(),enableBeforeUnload:!0,withResolver:!1};const t=!!(n.condition??!0),r=n.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function sh(n,e){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:o=!1}=rh(n),i=op(),{history:a}=i,[l,u]=w.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return w.useEffect(()=>{const c=async f=>{function d(p){const _=i.parseLocation(p),C=i.getMatchedRoutes(_.pathname);return C.foundRoute===void 0?{routeId:"__notFound__",fullPath:_.pathname,pathname:_.pathname,params:C.routeParams,search:i.options.parseSearch(p.search)}:{routeId:C.foundRoute.id,fullPath:C.foundRoute.fullPath,pathname:_.pathname,params:C.routeParams,search:i.options.parseSearch(p.search)}}const h=d(f.currentLocation),g=d(f.nextLocation);if(h.routeId==="__notFound__"&&g.routeId!=="__notFound__")return!1;const m=await t({action:f.action,current:h,next:g});if(!o)return m;if(!m)return!1;const x=await new Promise(p=>{u({status:"blocked",current:h,next:g,action:f.action,proceed:()=>p(!1),reset:()=>p(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),x};return s?void 0:a.block({blockerFn:c,enableBeforeUnload:r})},[t,r,s,o,a,i]),l}function dd(n,e,t=(r,s)=>r===s){return n.length===e.length&&n.every((r,s)=>t(r,e[s]))}const oh=w.createContext(void 0);function Js(n=!0){const e=w.useContext(oh);if(e===void 0&&!n)throw new Error(St(25));return e}const fd=w.createContext(void 0);function Qi(n){const e=w.useContext(fd);if(e===void 0&&!n)throw new Error(St(33));return e}const gd=w.createContext(void 0);function Zt(n){const e=w.useContext(gd);if(e===void 0&&!n)throw new Error(St(36));return e}const ih={type:"regular-item"};function pd(n){const{closeOnClick:e,disabled:t=!1,highlighted:r,id:s,store:o,nativeButton:i,itemMetadata:a,nodeId:l}=n,u=w.useRef(null),c=Js(!0),f=c!==void 0,{events:d}=o.useState("floatingTreeRoot"),{getButtonProps:h,buttonRef:g}=Xi({disabled:t,focusableWhenDisabled:!0,native:i}),m=w.useCallback(x=>xs({id:s,role:"menuitem",tabIndex:r?0:-1,onMouseMove(p){l&&d.emit("itemhover",{nodeId:l,target:p.currentTarget})},onMouseEnter(){a.type==="submenu-trigger"&&a.setActive()},onKeyUp(p){p.key===" "&&o.context.typingRef.current&&p.preventBaseUIHandler()},onClick(p){e&&d.emit("close",{domEvent:p,reason:uu})},onMouseUp(p){if(c){const _=c.initialCursorPointRef.current;if(c.initialCursorPointRef.current=null,f&&_&&Math.abs(p.clientX-_.x)<=1&&Math.abs(p.clientY-_.y)<=1)return}u.current&&o.context.allowMouseUpTriggerRef.current&&(!f||p.button===2)&&a.type==="regular-item"&&u.current.click()}},x,h),[s,r,h,e,d,o,f,c,a,l]),y=zi(u,g);return w.useMemo(()=>({getItemProps:m,itemRef:y}),[m,y])}const ah=w.forwardRef(function(e,t){const{render:r,className:s,id:o,label:i,nativeButton:a=!1,disabled:l=!1,closeOnClick:u=!0,...c}=e,f=qs({label:i}),d=Qi(!0),h=Cn(o),{store:g}=Zt(),m=g.useState("isActive",f.index),y=g.useState("itemProps"),{getItemProps:x,itemRef:p}=pd({closeOnClick:u,disabled:l,highlighted:m,id:h,store:g,nativeButton:a,nodeId:d?.nodeId,itemMetadata:ih}),_=w.useMemo(()=>({disabled:l,highlighted:m}),[l,m]);return st("div",e,{state:_,props:[y,c,x],ref:[p,t,f.ref]})}),lh=w.createContext(void 0);function hd(n){return w.useContext(lh)}const ch={...Ws,...gu},Za=w.forwardRef(function(e,t){const{render:r,className:s,finalFocus:o,...i}=e,{store:a}=Zt(),{side:l,align:u}=Qi(),c=hd()!=null,f=a.useState("open"),d=a.useState("transitionStatus"),h=a.useState("popupProps"),g=a.useState("mounted"),m=a.useState("instantType"),y=a.useState("activeTriggerElement"),x=a.useState("parent"),p=a.useState("lastOpenChangeReason"),_=a.useState("rootId"),C=a.useState("floatingRootContext"),v=a.useState("floatingTreeRoot"),b=a.useState("closeDelay"),S=a.useState("activeTriggerElement");du({open:f,ref:a.context.popupRef,onComplete(){f&&a.context.onOpenChangeComplete?.(!0)}}),w.useEffect(()=>{function R(I){a.setOpen(!1,et(I.reason,I.domEvent))}return v.events.on("close",R),()=>{v.events.off("close",R)}},[v.events,a]);const T=a.useState("hoverEnabled"),E=a.useState("disabled");fu(C,{enabled:T&&!E&&x.type!=="context-menu"&&x.type!=="menubar",closeDelay:b});const N=w.useMemo(()=>({transitionStatus:d,side:l,align:u,open:f,nested:x.type==="menu",instant:m}),[d,l,u,f,x.type,m]),P=st("div",e,{state:N,ref:[t,a.context.popupRef],stateAttributesMapping:ch,props:[h,{onKeyDown(R){c&&Zi.has(R.key)&&R.stopPropagation()}},Ui(d),i,{"data-rootownerid":_}]});let M=x.type===void 0||x.type==="context-menu";return(y||x.type==="menubar"&&p!==ip)&&(M=!0),k.jsx(Yu,{context:C,modal:!1,disabled:!g,returnFocus:o===void 0?M:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?v:void 0,previousFocusableElement:S,nextFocusableElement:x.type===void 0?a.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?a.context.beforeContentFocusGuardRef:void 0,children:P})}),md=w.createContext(void 0);function uh(){const n=w.useContext(md);if(n===void 0)throw new Error(St(32));return n}const Xa=w.forwardRef(function(e,t){const{keepMounted:r=!1,...s}=e,{store:o}=Zt();return o.useState("mounted")||r?k.jsx(md.Provider,{value:r,children:k.jsx(pu,{ref:t,...s})}):null}),Qa=w.forwardRef(function(e,t){const{anchor:r,positionMethod:s="absolute",className:o,render:i,side:a,align:l,sideOffset:u=0,alignOffset:c=0,collisionBoundary:f="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=ap,...x}=e,{store:p}=Zt(),_=uh(),C=Js(!0),v=p.useState("parent"),b=p.useState("floatingRootContext"),S=p.useState("floatingTreeRoot"),T=p.useState("mounted"),E=p.useState("open"),N=p.useState("modal"),P=p.useState("activeTriggerElement"),M=p.useState("lastOpenChangeReason"),R=p.useState("floatingNodeId"),I=p.useState("floatingParentNodeId");let D=r,L=u,F=c,j=l,B=y;v.type==="context-menu"&&(D=r??v.context?.anchor,j=j??"start",!a&&j!=="center"&&(F=e.alignOffset??2,L=e.sideOffset??-5));let G=a,Y=j;v.type==="menu"?(G=G??"inline-end",Y=Y??"start",B=e.collisionAvoidance??hu):v.type==="menubar"&&(G=G??"bottom",Y=Y??"start");const K=v.type==="context-menu",W=mu({anchor:D,floatingRootContext:b,positionMethod:C?"fixed":s,mounted:T,side:G,sideOffset:L,align:Y,alignOffset:F,arrowPadding:K?0:h,collisionBoundary:f,collisionPadding:d,sticky:g,nodeId:R,keepMounted:_,disableAnchorTracking:m,collisionAvoidance:B,shiftCrossAxis:K,externalTree:S}),V=w.useMemo(()=>{const ie={};return E||(ie.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...W.positionerStyles,...ie}}},[E,T,W.positionerStyles]);w.useEffect(()=>{function ie(J){J.open?(J.parentNodeId===R&&p.set("hoverEnabled",!1),J.nodeId!==R&&J.parentNodeId===p.select("floatingParentNodeId")&&p.setOpen(!1,et(vr))):J.parentNodeId===R&&J.reason!==vr&&p.set("hoverEnabled",!0)}return S.events.on("menuopenchange",ie),()=>{S.events.off("menuopenchange",ie)}},[p,S.events,R]),w.useEffect(()=>{if(p.select("floatingParentNodeId")==null)return;function ie(J){if(J.open||J.nodeId!==p.select("floatingParentNodeId"))return;const ue=J.reason??vr;p.setOpen(!1,et(ue))}return S.events.on("menuopenchange",ie),()=>{S.events.off("menuopenchange",ie)}},[S.events,p]),w.useEffect(()=>{function ie(J){!E||J.nodeId!==p.select("floatingParentNodeId")||J.target&&P&&P!==J.target&&p.setOpen(!1,et(vr))}return S.events.on("itemhover",ie),()=>{S.events.off("itemhover",ie)}},[S.events,E,P,p]),w.useEffect(()=>{const ie={open:E,nodeId:R,parentNodeId:I,reason:p.select("lastOpenChangeReason")};S.events.emit("menuopenchange",ie)},[S.events,E,p,R,I]);const oe=w.useMemo(()=>({open:E,side:W.side,align:W.align,anchorHidden:W.anchorHidden,nested:v.type==="menu"}),[E,W.side,W.align,W.anchorHidden,v.type]),re=w.useMemo(()=>({side:W.side,align:W.align,arrowRef:W.arrowRef,arrowUncentered:W.arrowUncentered,arrowStyles:W.arrowStyles,nodeId:W.context.nodeId}),[W.side,W.align,W.arrowRef,W.arrowUncentered,W.arrowStyles,W.context.nodeId]),le=st("div",e,{state:oe,stateAttributesMapping:Ws,ref:[t,p.useStateSetter("positionerElement")],props:[V,x]}),ee=T&&v.type!=="menu"&&(v.type!=="menubar"&&N&&M!==Gt||v.type==="menubar"&&v.context.modal);let ne=null;return v.type==="menubar"?ne=v.context.contentElement:v.type===void 0&&(ne=P),k.jsxs(fd.Provider,{value:re,children:[ee&&k.jsx(Zu,{ref:v.type==="context-menu"||v.type==="nested-context-menu"?v.context.internalBackdropRef:null,inert:Xu(!E),cutout:ne}),k.jsx(yu,{id:R,children:k.jsx(qu,{elementsRef:p.context.itemDomElements,labelsRef:p.context.itemLabels,children:le})})]})}),dh=w.createContext(null);function yd(n){return w.useContext(dh)}const fh={...xu,disabled:ve(n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled),modal:ve(n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0)),allowMouseEnter:ve(n=>n.parent.type==="menu"?n.parent.store.select("allowMouseEnter"):n.allowMouseEnter),stickIfOpen:ve(n=>n.stickIfOpen),parent:ve(n=>n.parent),rootId:ve(n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId),activeIndex:ve(n=>n.activeIndex),isActive:ve((n,e)=>n.activeIndex===e),hoverEnabled:ve(n=>n.hoverEnabled),instantType:ve(n=>n.instantType),lastOpenChangeReason:ve(n=>n.openChangeReason),floatingTreeRoot:ve(n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot),floatingNodeId:ve(n=>n.floatingNodeId),floatingParentNodeId:ve(n=>n.floatingParentNodeId),itemProps:ve(n=>n.itemProps),closeDelay:ve(n=>n.closeDelay),keyboardEventRelay:ve(n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")})};class ea extends _u{constructor(e){super({...gh(),...e},{positionerRef:w.createRef(),popupRef:w.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:w.createRef(),beforeContentFocusGuardRef:w.createRef(),onOpenChangeComplete:void 0,triggerElements:new vu},fh),this.observe(ve(t=>t.allowMouseEnter),(t,r)=>{this.state.parent.type==="menu"&&t!==r&&this.state.parent.store.set("allowMouseEnter",t)}),this.unsubscribeParentListener=this.observe("parent",t=>{if(this.unsubscribeParentListener?.(),t.type==="menu"){this.unsubscribeParentListener=t.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=t.store.context.allowMouseUpTriggerRef;return}t.type!==void 0&&(this.context.allowMouseUpTriggerRef=t.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){return bu(()=>e??new ea(t)).current}unsubscribeParentListener=null}function gh(){return{...Cu(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Su,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Vs,keyboardEventRelay:void 0,closeDelay:0}}const _d=w.createContext(void 0);function vd(){return w.useContext(_d)}function xd(n){const{children:e,open:t,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:o=!1,disabled:i=!1,modal:a,loopFocus:l=!0,orientation:u="vertical",actionsRef:c,closeParentOnEsc:f=!1,handle:d,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:m=!0}=n,y=Js(!0),x=Zt(!0),p=yd(),_=vd(),C=w.useMemo(()=>_&&x?{type:"menu",store:x.store}:p?{type:"menubar",context:p}:y&&!x?{type:"context-menu",context:y}:{type:void 0},[y,x,p,_]),v=ea.useStore(d?.store,{parent:C}),b=v.useState("floatingTreeRoot"),S=Ki(b),T=Wi();En(()=>{y&&!x?v.update({parent:{type:"context-menu",context:y},floatingNodeId:S,floatingParentNodeId:T}):x&&v.update({floatingNodeId:S,floatingParentNodeId:T})},[y,x,S,T,v]),v.useControlledProp("open",t,o),v.useControlledProp("activeTriggerId",h,g),v.useContextCallback("onOpenChangeComplete",s);const E=v.useState("open"),N=v.useState("activeTriggerElement"),P=v.useState("positionerElement"),M=v.useState("hoverEnabled"),R=v.useState("modal"),I=v.useState("disabled"),D=v.useState("lastOpenChangeReason"),L=v.useState("parent"),F=v.useState("activeIndex"),j=v.useState("payload"),B=v.useState("floatingParentNodeId"),G=w.useRef(null),Y=B!=null;let K;v.useSyncedValues({disabled:i,modal:L.type===void 0?a:void 0,rootId:lp()});const{openMethod:W,triggerProps:V,reset:oe}=Qu(E);Eu(v);const{forceUnmount:re}=Tu(E,v,()=>{v.update({allowMouseEnter:!1,stickIfOpen:!0}),oe()}),le=w.useRef(L.type!=="context-menu"),ee=bs();w.useEffect(()=>{if(E||(G.current=null),L.type==="context-menu"){if(!E){ee.clear(),le.current=!1;return}ee.start(500,()=>{le.current=!0})}},[ee,E,L.type]),ed(E&&R&&D!==Gt&&W!=="touch",P),En(()=>{!E&&!M&&v.set("hoverEnabled",!0)},[E,M,v]);const ne=w.useRef(!0),ie=bs(),J=Pe((de,X)=>{const Ce=X.reason;if(E===de&&X.trigger===N||(X.preventUnmountOnClose=()=>{v.set("preventUnmountingOnClose",!0)},!de&&X.trigger==null&&(X.trigger=N??void 0),r?.(de,X),X.isCanceled))return;const ot={open:de,nativeEvent:X.event,reason:X.reason,nested:Y};K?.emit("openchange",ot);const it=X.event;if(de===!1&&it?.type==="click"&&it.pointerType==="touch"&&!ne.current)return;if(!de&&F!==null){const Se=v.context.itemDomElements.current[F];queueMicrotask(()=>{Se?.setAttribute("tabindex","-1")})}de&&Ce===Ha?(ne.current=!1,ie.start(300,()=>{ne.current=!0})):(ne.current=!0,ie.clear());const gn=(Ce===Ss||Ce===uu)&&it.detail===0&&it?.isTrusted,Yr=!de&&(Ce===wu||Ce==null);function Ee(){const Se={open:de,openChangeReason:Ce};G.current=X.event??null;const Re=X.trigger?.id??null;(Re||de)&&(Se.activeTriggerId=Re,Se.activeTriggerElement=X.trigger??null),v.update(Se)}Ce===Gt?an.flushSync(Ee):Ee(),L.type==="menubar"&&(Ce===Ha||Ce===or||Ce===Gt||Ce===cp||Ce===vr)?v.set("instantType","group"):gn||Yr?v.set("instantType",gn?"click":"dismiss"):v.set("instantType",void 0)}),ue=w.useCallback(de=>{const X=et(de);return X.preventUnmountOnClose=()=>{v.set("preventUnmountingOnClose",!0)},X},[v]),pe=w.useCallback(()=>{v.setOpen(!1,ue(ku))},[v,ue]);w.useImperativeHandle(c,()=>({unmount:re,close:pe}),[re,pe]);let Ae;L.type==="context-menu"&&(Ae=L.context),w.useImperativeHandle(Ae?.positionerRef,()=>P,[P]),w.useImperativeHandle(Ae?.actionsRef,()=>({setOpen:J}),[J]);const q=Nu({popupStore:v,onOpenChange:J});K=q.context.events,w.useEffect(()=>{const de=({open:X,eventDetails:Ce})=>J(X,Ce);return K.on("setOpen",de),()=>{K?.off("setOpen",de)}},[K,J]);const ce=Au(q,{enabled:!I,bubbles:f&&L.type==="menu",outsidePress(){return L.type!=="context-menu"||G.current?.type==="contextmenu"?!0:le.current},externalTree:Y?b:void 0}),Z=td(q,{role:"menu"}),ae=Hs(),te=w.useCallback(de=>{v.select("activeIndex")!==de&&v.set("activeIndex",de)},[v]),Ie=Pp(q,{enabled:!I,listRef:v.context.itemDomElements,activeIndex:F,nested:L.type!==void 0,loopFocus:l,orientation:u,parentOrientation:L.type==="menubar"?L.context.orientation:void 0,rtl:ae==="rtl",disabledIndices:Jo,onNavigate:te,openOnArrowKeyDown:L.type!=="context-menu",externalTree:Y?b:void 0,focusItemOnHover:m}),ut=w.useCallback(de=>{v.context.typingRef.current=de},[v]),Ge=Ip(q,{listRef:v.context.itemLabels,activeIndex:F,resetMs:up,onMatch:de=>{E&&de!==F&&v.set("activeIndex",de)},onTypingChange:ut}),{getReferenceProps:dt,getFloatingProps:jt,getItemProps:Tt,getTriggerProps:me}=$r([ce,Z,Ie,Ge]),Bt=w.useMemo(()=>{const de=xs(dt(),{onMouseEnter(){v.set("hoverEnabled",!0)},onMouseMove(){v.set("allowMouseEnter",!0)}},V);return delete de.role,de},[dt,v,V]),Ye=w.useMemo(()=>{const de=me();if(!de)return de;const X=xs(de,V);return delete X.role,delete X["aria-controls"],X},[me,V]),We=Pu(),Ve=w.useMemo(()=>jt({onMouseEnter(){L.type==="menu"&&We.request(()=>v.set("hoverEnabled",!1))},onMouseMove(){v.set("allowMouseEnter",!0)},onClick(){v.select("hoverEnabled")&&v.set("hoverEnabled",!1)},onKeyDown(de){const X=v.select("keyboardEventRelay");X&&!de.isPropagationStopped()&&X(de)}}),[jt,L.type,We,v]),zt=w.useMemo(()=>Tt(),[Tt]);v.useSyncedValues({floatingRootContext:q,activeTriggerProps:Bt,inactiveTriggerProps:Ye,popupProps:Ve,itemProps:zt});const tt=w.useMemo(()=>({store:v,parent:C}),[v,C]),Un=k.jsx(gd.Provider,{value:tt,children:typeof e=="function"?e({payload:j}):e});return L.type===void 0||L.type==="context-menu"?k.jsx(Iu,{externalTree:b,children:Un}):Un}function ph(n){const e=Zt().store,t=w.useMemo(()=>({parentMenu:e}),[e]);return k.jsx(_d.Provider,{value:t,children:k.jsx(xd,{...n})})}function hh(n={}){const{highlightItemOnHover:e,highlightedIndex:t,onHighlightedIndexChange:r}=ld(),{ref:s,index:o}=qs(n),i=t===o,a=w.useRef(null),l=zi(s,a);return{compositeProps:w.useMemo(()=>({tabIndex:i?0:-1,onFocus(){r(o)},onMouseMove(){const c=a.current;if(!e||!c)return;const f=c.hasAttribute("disabled")||c.ariaDisabled==="true";!i&&!f&&c.focus()}}),[i,r,o,e]),compositeRef:l,index:o}}function mh(n){const{render:e,className:t,state:r=Vs,props:s=Jo,refs:o=Jo,metadata:i,stateAttributesMapping:a,tag:l="div",...u}=n,{compositeProps:c,compositeRef:f}=hh({metadata:i});return st(l,n,{state:r,ref:[...o,f],props:[c,...s,u],stateAttributesMapping:a})}function bd(n){if(Ru(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid")??void 0;if(!dp(n))return bd(fp(n))}function yh(n){const{enabled:e=!0,mouseDownAction:t,open:r}=n,s=w.useRef(!1);return w.useMemo(()=>e?{onMouseDown:o=>{(t==="open"&&!r||t==="close"&&r)&&(s.current=!0,tn(o.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:o=>{s.current&&(s.current=!1,o.preventBaseUIHandler())}}:Vs,[e,t,r])}const Qr=2,_h=w.forwardRef(function(e,t){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,id:a,openOnHover:l,delay:u=100,closeDelay:c=0,handle:f,payload:d,...h}=e,g=Zt(!0),m=f?.store??g?.store;if(!m)throw new Error(St(85));const y=Cn(a),x=m.useState("isTriggerActive",y),p=m.useState("floatingRootContext"),_=m.useState("isOpenedByTrigger",y),C=w.useRef(null),v=xh(),b=ld(!0),S=gp(),T=w.useMemo(()=>S??new Su,[S]),E=Ki(T),N=Wi(),{registerTrigger:P,isMountedByThisTrigger:M}=Ou(y,C,m,{payload:d,closeDelay:c,parent:v,floatingTreeRoot:T,floatingNodeId:E,floatingParentNodeId:N,keyboardEventRelay:b?.relayKeyboardEvent}),R=m.useState("disabled"),I=o||R||v.type==="menubar"&&v.context.disabled,{getButtonProps:D,buttonRef:L}=Xi({disabled:I,native:i});w.useEffect(()=>{!_&&v.type===void 0&&(m.context.allowMouseUpTriggerRef.current=!1)},[m,_,v.type]);const F=w.useRef(null),j=bs(),B=Pe(Z=>{if(!F.current)return;j.clear(),m.context.allowMouseUpTriggerRef.current=!1;const ae=Z.target;if(Er(F.current,ae)||Er(m.select("positionerElement"),ae)||ae===F.current||ae!=null&&bd(ae)===m.select("rootId"))return;const te=Rp(F.current);Z.clientX>=te.left-Qr&&Z.clientX<=te.right+Qr&&Z.clientY>=te.top-Qr&&Z.clientY<=te.bottom+Qr||T.events.emit("close",{domEvent:Z,reason:pp})});w.useEffect(()=>{_&&m.select("lastOpenChangeReason")===Gt&&tn(F.current).addEventListener("mouseup",B,{once:!0})},[_,B,m]);const G=v.type==="menubar"&&v.context.hasSubmenuOpen,K=Vi(p,{enabled:(l??G??!1)&&!I&&v.type!=="context-menu"&&(v.type!=="menubar"||G&&!M),handleClose:Hi({blockPointerEvents:v.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:v.type===void 0?u:void 0,delay:{close:c},triggerElementRef:C,externalTree:T,isActiveTrigger:x}),W=vh(_,m.select("lastOpenChangeReason")),V=Yi(p,{enabled:!I&&v.type!=="context-menu",event:_&&v.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:v.type===void 0?W:!1}),oe=hp(p,{enabled:!I&&(v.type!=="menubar"&&_||G)}),re=yh({open:_,enabled:v.type==="menubar",mouseDownAction:"open"}),le=$r([V,oe]),ee=v.type==="menubar",ne=w.useMemo(()=>({disabled:I,open:_}),[I,_]),ie=m.useState("triggerProps",M),J=[F,t,L,P,C],ue=[le.getReferenceProps(),K??Vs,ie,{"aria-haspopup":"menu",id:y,onMouseDown:Z=>{if(m.select("open"))return;j.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0}),tn(Z.currentTarget).addEventListener("mouseup",B,{once:!0})}},ee?{role:"menuitem"}:{},re,h,D],pe=w.useRef(null),Ae=Pe(Z=>{an.flushSync(()=>{m.setOpen(!1,et(or,Z.nativeEvent,Z.currentTarget))}),Fu(pe.current)?.focus()}),q=Pe(Z=>{const ae=m.select("positionerElement");if(ae&&Mu(Z,ae))m.context.beforeContentFocusGuardRef.current?.focus();else{an.flushSync(()=>{m.setOpen(!1,et(or,Z.nativeEvent,Z.currentTarget))});let te=$u(C.current);for(;te!==null&&Er(ae,te)||te?.hasAttribute("aria-hidden");){const Ie=te;if(te=Lu(te),te===Ie)break}te?.focus()}}),ce=st("button",e,{enabled:!ee,stateAttributesMapping:Go,state:ne,ref:J,props:ue});return ee?k.jsx(mh,{tag:"button",render:r,className:s,state:ne,refs:J,props:ue,stateAttributesMapping:Go}):_?k.jsxs(w.Fragment,{children:[k.jsx(Cs,{ref:pe,onFocus:Ae},`${y}-pre-focus-guard`),k.jsx(w.Fragment,{children:ce},y),k.jsx(Cs,{ref:m.context.triggerFocusTargetRef,onFocus:q},`${y}-post-focus-guard`)]}):k.jsx(w.Fragment,{children:ce},y)});function vh(n,e){const t=bs(),[r,s]=w.useState(!1);return En(()=>{n&&e==="trigger-hover"?(s(!0),t.start(Du,()=>{s(!1)})):n||(t.clear(),s(!1))},[n,e,t]),r}function xh(){const n=Js(!0),e=Zt(!0),t=yd();return w.useMemo(()=>t?{type:"menubar",context:t}:n&&!e?{type:"context-menu",context:n}:{type:void 0},[n,e,t])}const bh=w.forwardRef(function(e,t){const{render:r,className:s,label:o,id:i,nativeButton:a=!1,openOnHover:l=!0,delay:u=100,closeDelay:c=0,disabled:f=!1,...d}=e,h=qs(),g=Qi(),{store:m}=Zt(),y=Cn(i),x=m.useState("open"),p=m.useState("floatingRootContext"),_=m.useState("floatingTreeRoot"),C=mp(y,m),v=w.useCallback(oe=>{const re=C(oe);return oe!==null&&m.select("open")&&m.select("activeTriggerId")==null&&m.update({activeTriggerId:y,activeTriggerElement:oe,closeDelay:c}),re},[C,c,m,y]),b=w.useRef(null),S=w.useCallback(oe=>{b.current=oe,m.set("activeTriggerElement",oe)},[m]),T=vd();if(!T?.parentMenu)throw new Error(St(37));m.useSyncedValue("closeDelay",c);const E=T.parentMenu,N=E.useState("itemProps"),P=E.useState("isActive",h.index),M=w.useMemo(()=>({type:"submenu-trigger",setActive:()=>E.set("activeIndex",h.index)}),[E,h.index]),R=m.useState("disabled"),I=f||R,{getItemProps:D,itemRef:L}=pd({closeOnClick:!1,disabled:I,highlighted:P,id:y,store:m,nativeButton:a,itemMetadata:M,nodeId:g?.nodeId}),F=m.useState("hoverEnabled"),j=m.useState("allowMouseEnter"),B=Vi(p,{enabled:F&&l&&!I&&j,handleClose:Hi({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:c},triggerElementRef:b,externalTree:_}),G=Yi(p,{enabled:!I,event:"mousedown",toggle:!l,ignoreMouse:l,stickIfOpen:!1}),Y=$r([G]),K=m.useState("triggerProps",!0);delete K.id;const W=w.useMemo(()=>({disabled:I,highlighted:P,open:x}),[I,P,x]);return st("div",e,{state:W,stateAttributesMapping:ju,props:[Y.getReferenceProps(),B,K,N,{tabIndex:x||P?0:-1,onBlur(){P&&E.set("activeIndex",null)}},d,D],ref:[t,h.ref,L,v,S]})}),el=new Map;function Sh(n,e){const t=JSON.stringify({locale:n,options:e}),r=el.get(t);if(r)return r;const s=new Intl.NumberFormat(n,e);return el.set(t,s),s}function fs(n,e,t){return n==null?"":Sh(e,t).format(n)}function Yo(n,e,t){return(n-e)*100/(t-e)}function _t(n,e=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(n,t))}const Sd=w.createContext(void 0);function Lr(n){const e=w.useContext(Sd);if(e===void 0&&!n)throw new Error(St(47));return e}function Ch(){return{...Cu(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const Eh={...xu,disabled:ve(n=>n.disabled),instantType:ve(n=>n.instantType),openMethod:ve(n=>n.openMethod),openChangeReason:ve(n=>n.openChangeReason),modal:ve(n=>n.modal),stickIfOpen:ve(n=>n.stickIfOpen),titleElementId:ve(n=>n.titleElementId),descriptionElementId:ve(n=>n.descriptionElementId),openOnHover:ve(n=>n.openOnHover),closeDelay:ve(n=>n.closeDelay)};class ta extends _u{constructor(e){const t={...Ch(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:w.createRef(),backdropRef:w.createRef(),internalBackdropRef:w.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:w.createRef(),beforeContentFocusGuardRef:w.createRef(),stickIfOpenTimeout:new yp,triggerElements:new vu},Eh)}setOpen=(e,t)=>{const r=t.reason===Gt,s=t.reason===Ss&&t.event.detail===0,o=!e&&(t.reason===wu||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit("openchange",i);const l=()=>{const u={open:e,openChangeReason:t.reason},c=t.trigger?.id??null;(c||e)&&(u.activeTriggerId=c,u.activeTriggerElement=t.trigger??null),this.update(u)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Du,()=>{this.set("stickIfOpen",!1)}),an.flushSync(l)):l(),s||o?this.set("instantType",s?"click":"dismiss"):t.reason===or?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const r=bu(()=>e??new ta(t)).current;return qi(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function tl({props:n}){const{children:e,open:t,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:o,modal:i=!1,handle:a,triggerId:l,defaultTriggerId:u=null}=n,c=ta.useStore(a?.store,{open:t??r,modal:i,activeTriggerId:l!==void 0?l:u});c.useControlledProp("open",t,r),c.useControlledProp("activeTriggerId",l,u);const f=c.useState("open"),d=c.useState("positionerElement"),h=c.useState("payload"),g=c.useState("openChangeReason");c.useContextCallback("onOpenChange",s),c.useContextCallback("onOpenChangeComplete",o);const{openMethod:m,triggerProps:y,reset:x}=Qu(f);Eu(c);const{forceUnmount:p}=Tu(f,c,()=>{c.update({stickIfOpen:!0,openChangeReason:null}),x()});ed(f&&i===!0&&g!==Gt&&m!=="touch",d),w.useEffect(()=>{f||c.context.stickIfOpenTimeout.clear()},[c,f]);const _=w.useCallback(D=>{const L=et(D);return L.preventUnmountOnClose=()=>{c.set("preventUnmountingOnClose",!0)},L},[c]),C=w.useCallback(()=>{c.setOpen(!1,_(ku))},[c,_]);w.useImperativeHandle(n.actionsRef,()=>({unmount:p,close:C}),[p,C]);const v=Nu({popupStore:c,onOpenChange:c.setOpen}),b=Au(v,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),S=td(v),{getReferenceProps:T,getFloatingProps:E,getTriggerProps:N}=$r([b,S]),P=w.useMemo(()=>T(y),[T,y]),M=w.useMemo(()=>N(y),[N,y]),R=w.useMemo(()=>E(),[E]);c.useSyncedValues({modal:i,openMethod:m,activeTriggerProps:P,inactiveTriggerProps:M,popupProps:R,floatingRootContext:v,nested:Wi()!=null});const I=w.useMemo(()=>({store:c}),[c]);return k.jsx(Sd.Provider,{value:I,children:typeof e=="function"?e({payload:h}):e})}function Th(n){return Lr(!0)?k.jsx(tl,{props:n}):k.jsx(Iu,{children:k.jsx(tl,{props:n})})}const wh=300,nl=w.forwardRef(function(e,t){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,handle:a,payload:l,openOnHover:u=!1,delay:c=wh,closeDelay:f=0,id:d,...h}=e,g=Lr(!0),m=a?.store??g?.store;if(!m)throw new Error(St(74));const y=Cn(d),x=m.useState("isTriggerActive",y),p=m.useState("floatingRootContext"),_=m.useState("isOpenedByTrigger",y),C=w.useRef(null),{registerTrigger:v,isMountedByThisTrigger:b}=Ou(y,C,m,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),S=m.useState("openChangeReason"),T=m.useState("stickIfOpen"),E=m.useState("openMethod"),N=Vi(p,{enabled:p!=null&&u&&(E!=="touch"||S!==Ss),mouseOnly:!0,move:!1,handleClose:Hi(),restMs:c,delay:{close:f},triggerElementRef:C,isActiveTrigger:x}),P=Yi(p,{enabled:p!=null,stickIfOpen:T}),M=$r([P]),R=m.useState("triggerProps",b),I=w.useMemo(()=>({disabled:o,open:_}),[o,_]),{getButtonProps:D,buttonRef:L}=Xi({disabled:o,native:i}),F=w.useMemo(()=>({open(K){return K&&S===Ss?Go.open(K):ju.open(K)}}),[S]),j=st("button",e,{state:I,ref:[L,t,v,C],props:[M.getReferenceProps(),N,R,{[_p]:"",id:y},h,D],stateAttributesMapping:F}),B=w.useRef(null),G=Pe(K=>{an.flushSync(()=>{m.setOpen(!1,et(or,K.nativeEvent,K.currentTarget))}),Fu(B.current)?.focus()}),Y=Pe(K=>{const W=m.select("positionerElement");if(W&&Mu(K,W))m.context.beforeContentFocusGuardRef.current?.focus();else{an.flushSync(()=>{m.setOpen(!1,et(or,K.nativeEvent,K.currentTarget))});let V=$u(C.current);for(;V!==null&&Er(W,V)||V?.hasAttribute("aria-hidden");){const oe=V;if(V=Lu(V),V===oe)break}V?.focus()}});return x?k.jsxs(w.Fragment,{children:[k.jsx(Cs,{ref:B,onFocus:G}),k.jsx(w.Fragment,{children:j},y),k.jsx(Cs,{ref:m.context.triggerFocusTargetRef,onFocus:Y})]}):k.jsx(w.Fragment,{children:j},y)}),Cd=w.createContext(void 0);function kh(){const n=w.useContext(Cd);if(n===void 0)throw new Error(St(45));return n}const Nh=w.forwardRef(function(e,t){const{keepMounted:r=!1,...s}=e,{store:o}=Lr();return o.useState("mounted")||r?k.jsx(Cd.Provider,{value:r,children:k.jsx(pu,{ref:t,...s,renderGuards:!1})}):null}),Ed=w.createContext(void 0);function Ah(){const n=w.useContext(Ed);if(!n)throw new Error(St(46));return n}const Ph=w.forwardRef(function(e,t){const{render:r,className:s,anchor:o,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:f="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=hu,...x}=e,{store:p}=Lr(),_=kh(),C=Ki(),v=p.useState("floatingRootContext"),b=p.useState("mounted"),S=p.useState("open"),T=p.useState("openChangeReason"),E=p.useState("activeTriggerElement"),N=p.useState("modal"),P=p.useState("positionerElement"),M=p.useState("instantType"),R=p.useState("transitionStatus"),I=w.useRef(null),D=vp(P,!1,!1),L=mu({anchor:o,floatingRootContext:v,positionMethod:i,mounted:b,side:a,sideOffset:u,align:l,alignOffset:c,arrowPadding:h,collisionBoundary:f,collisionPadding:d,sticky:g,disableAnchorTracking:m,keepMounted:_,nodeId:C,collisionAvoidance:y,adaptiveOrigin:xp}),F=w.useMemo(()=>{const W={};return S||(W.pointerEvents="none"),{role:"presentation",hidden:!b,style:{...L.positionerStyles,...W}}},[S,b,L.positionerStyles]),j=w.useMemo(()=>({props:F,...L}),[F,L]),B=v?.select("domReferenceElement");En(()=>{const W=B,V=I.current;if(W&&(I.current=W),V&&W&&W!==V){p.set("instantType",void 0);const oe=new AbortController;return D(()=>{p.set("instantType","trigger-change")},oe.signal),()=>{oe.abort()}}},[B,D,p]);const G=w.useMemo(()=>({open:S,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:M}),[S,j.side,j.align,j.anchorHidden,M]),Y=w.useCallback(W=>{p.set("positionerElement",W)},[p]),K=st("div",e,{state:G,props:[j.props,Ui(R),x],ref:[t,Y],stateAttributesMapping:Ws});return k.jsxs(Ed.Provider,{value:j,children:[b&&N===!0&&T!==Gt&&k.jsx(Zu,{ref:p.context.internalBackdropRef,inert:Xu(!S),cutout:E}),k.jsx(yu,{id:C,children:K})]})}),Ih={...Ws,...gu},Rh=w.forwardRef(function(e,t){const{className:r,render:s,initialFocus:o,finalFocus:i,...a}=e,{store:l}=Lr(),u=Ah(),c=hd()!=null,f=Hs(),d=l.useState("open"),h=l.useState("openMethod"),g=l.useState("instantType"),m=l.useState("transitionStatus"),y=l.useState("popupProps"),x=l.useState("titleElementId"),p=l.useState("descriptionElementId"),_=l.useState("modal"),C=l.useState("mounted"),v=l.useState("openChangeReason"),b=l.useState("popupElement"),S=l.useState("payload"),T=l.useState("positionerElement"),E=l.useState("activeTriggerElement"),N=l.useState("floatingRootContext");du({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}});const P=l.useState("disabled"),M=l.useState("openOnHover"),R=l.useState("closeDelay");fu(N,{enabled:M&&!P,closeDelay:R});function I(K){return K==="touch"?l.context.popupRef.current:!0}const D=o===void 0?I:o,L=w.useMemo(()=>({open:d,side:u.side,align:u.align,instant:g,transitionStatus:m}),[d,u.side,u.align,g,m]),F=w.useCallback(K=>{l.set("popupElement",K)},[l]);function j(){N.context.events.emit("measure-layout")}function B(K,W){N.context.events.emit("measure-layout-complete",{previousDimensions:K,nextDimensions:W})}const G=w.useCallback(()=>l.context.triggerElements.size>1,[l]);bp({popupElement:b,positionerElement:T,mounted:C,content:S,enabled:G,onMeasureLayout:j,onMeasureLayoutComplete:B,side:u.side,direction:f});const Y=st("div",e,{state:L,ref:[t,l.context.popupRef,F],props:[y,{"aria-labelledby":x,"aria-describedby":p,onKeyDown(K){c&&Zi.has(K.key)&&K.stopPropagation()}},Ui(m),a],stateAttributesMapping:Ih});return k.jsx(Yu,{context:N,openInteractionType:h,modal:_==="trap-focus",disabled:!C||v===Gt,initialFocus:D,returnFocus:i,restoreFocus:"popup",previousFocusableElement:Ru(E)?E:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:Y})});function Td(n,e){return n-e}function Oh(n,e,t){const r=n.slice();return r[e]=t,r.sort(Td)}function wd(n,e,t,r,s,o){let i=n;return i=_t(i,t,r),s&&(i=Oh(o,e,_t(i,o[e-1]||-1/0,o[e+1]||1/0))),i}function kd(n,e,t){if(!Array.isArray(n))return!0;const r=n.reduce((s,o,i,a)=>(i===a.length-1||s.push(Math.abs(o-a[i+1])),s),[]);return Math.min(...r)>=e*t}const Dr={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},Nd=w.createContext(void 0);function Gs(){const n=w.useContext(Nd);if(n===void 0)throw new Error(St(62));return n}function Fh(n){return"key"in n?Cp:Ep}function Mh(n,e){return typeof n=="number"&&typeof e=="number"?n===e:Array.isArray(n)&&Array.isArray(e)?dd(n,e):!1}const $h=w.forwardRef(function(e,t){const{"aria-labelledby":r,className:s,defaultValue:o,disabled:i=!1,id:a,format:l,largeStep:u=10,locale:c,render:f,max:d=100,min:h=0,minStepsBetweenValues:g=0,name:m,onValueChange:y,onValueCommitted:x,orientation:p="horizontal",step:_=1,thumbCollisionBehavior:C="push",thumbAlignment:v="center",value:b,...S}=e,T=Cn(a),E=Pe(y),N=Pe(x),{clearErrors:P}=Yp(),{state:M,disabled:R,name:I,setTouched:D,setDirty:L,validityData:F,shouldValidateOnChange:j,validation:B}=Ju(),{labelId:G}=Op(),Y=r??G,K=R||i,W=I??m,[V,oe]=Fp({controlled:b,default:o??h,name:"Slider"}),re=w.useRef(null),le=w.useRef(null),ee=w.useRef([]),ne=w.useRef(null),ie=w.useRef(null),J=w.useRef(-1),ue=w.useRef(null),pe=w.useRef(null),Ae=w.useRef("none"),q=Bu(l),[ce,Z]=w.useState(-1),[ae,te]=w.useState(-1),[Ie,ut]=w.useState(!1),[Ge,dt]=w.useState(()=>new Map),[jt,Tt]=w.useState([void 0,void 0]),me=Pe(X=>{Z(X),X!==-1&&te(X)});Mp({id:T,commit:B.commit,value:V,controlRef:le,name:W,getValue:()=>V}),Zp(V,()=>{P(W),j()?B.commit(V):B.commit(V,!0);const X=F.initialValue;let Ce;Array.isArray(V)&&Array.isArray(X)?Ce=!dd(V,X):Ce=V!==X,L(Ce)});const Bt=Pe(X=>{X&&(le.current=X)}),Ye=Array.isArray(V),We=w.useMemo(()=>Ye?V.slice().sort(Td):[_t(V,h,d)],[d,h,Ye,V]),Ve=Pe((X,Ce)=>{if(Number.isNaN(X)||Mh(X,V))return;const ot=Ce??et(Sp,void 0,void 0,{activeThumbIndex:-1});Ae.current=ot.reason;const it=new event.constructor(event.type,event);Object.defineProperty(it,"target",{writable:!0,value:{value:X,name:W}}),ot.event=it,pe.current=X,E(X,ot),!ot.isCanceled&&oe(X)}),zt=Pe((X,Ce,ot)=>{const it=wd(X,Ce,h,d,Ye,We);if(kd(it,_,g)){const gn=Fh(ot);Ve(it,et(gn,ot.nativeEvent,void 0,{activeThumbIndex:Ce})),D(!0);const Yr=pe.current??it;N(Yr,zu(gn,ot.nativeEvent))}});En(()=>{const X=Uu(tn(re.current));K&&X&&re.current?.contains(X)&&X.blur()},[K]),K&&ce!==-1&&me(-1);const tt=w.useMemo(()=>({...M,activeThumbIndex:ce,disabled:K,dragging:Ie,orientation:p,max:d,min:h,minStepsBetweenValues:g,step:_,values:We}),[M,ce,K,Ie,d,h,g,p,_,We]),Un=w.useMemo(()=>({active:ce,controlRef:le,disabled:K,dragging:Ie,validation:B,formatOptionsRef:q,handleInputChange:zt,indicatorPosition:jt,inset:v!=="center",labelId:Y,largeStep:u,lastUsedThumbIndex:ae,lastChangedValueRef:pe,lastChangeReasonRef:Ae,locale:c,max:d,min:h,minStepsBetweenValues:g,name:W,onValueCommitted:N,orientation:p,pressedInputRef:ne,pressedThumbCenterOffsetRef:ie,pressedThumbIndexRef:J,pressedValuesRef:ue,registerFieldControlRef:Bt,renderBeforeHydration:v==="edge",setActive:me,setDragging:ut,setIndicatorPosition:Tt,setValue:Ve,state:tt,step:_,thumbCollisionBehavior:C,thumbMap:Ge,thumbRefs:ee,values:We}),[ce,le,Y,K,Ie,B,q,zt,jt,u,ae,pe,Ae,c,d,h,g,W,N,p,ne,ie,J,ue,Bt,me,ut,Tt,Ve,tt,_,C,v,Ge,ee,We]),de=st("div",e,{state:tt,ref:[t,re],props:[{"aria-labelledby":Y,id:T,role:"group"},B.getValidationProps,S],stateAttributesMapping:Dr});return k.jsx(Nd.Provider,{value:Un,children:k.jsx(qu,{elementsRef:ee,onMapChange:dt,children:de})})});function Ad(n){const e=n.getBoundingClientRect();return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function Lh(n){if(Math.abs(n)<1){const t=n.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}const e=n.toString().split(".")[1];return e?e.length:0}function Pd(n,e,t){const r=Math.round((n-t)/e)*e+t;return Number(r.toFixed(Lh(e)))}function rl({values:n,index:e,nextValue:t,min:r,max:s,step:o,minStepsBetweenValues:i,initialValues:a}){if(n.length===0)return[];const l=n.slice(),u=o*i,c=l.length-1,f=a??n,d=r+e*u,h=s-(c-e)*u;l[e]=_t(t,d,h);for(let g=e+1;g<=c;g+=1){const m=l[g-1]+u,y=s-(c-g)*u,x=f[g]??l[g];let p=Math.max(l[g],m);x<p&&(p=Math.max(x,m)),l[g]=_t(p,m,y)}for(let g=e-1;g>=0;g-=1){const m=l[g+1]-u,y=r+g*u,x=f[g]??l[g];let p=Math.min(l[g],m);x>p&&(p=Math.min(x,m)),l[g]=_t(p,y,m)}for(let g=0;g<=c;g+=1)l[g]=Number(l[g].toFixed(12));return l}function Dh({behavior:n,values:e,currentValues:t,initialValues:r,pressedIndex:s,nextValue:o,min:i,max:a,step:l,minStepsBetweenValues:u}){const c=t??e,f=r??e;if(!(c.length>1))return{value:o,thumbIndex:0,didSwap:!1};const h=l*u;switch(n){case"swap":{const g=c[s],m=1e-7,y=c.slice(),x=y[s-1],p=y[s+1],_=x!=null?x+h:i,C=p!=null?p-h:a,v=_t(o,_,C),b=Number(v.toFixed(12));y[s]=b;const S=o>g,T=o<g,E=S&&p!=null&&o>=p-m,N=T&&x!=null&&o<=x+m;if(!E&&!N)return{value:y,thumbIndex:s,didSwap:!1};const P=E?s+1:s-1,M=y.map((L,F)=>{if(F===s)return b;const j=f[F];return j??c[F]});let R=o;E?R=Math.max(o,y[P]):R=Math.min(o,y[P]);const I=rl({values:y,index:P,nextValue:R,min:i,max:a,step:l,minStepsBetweenValues:u,initialValues:M}),D=E?P-1:P+1;if(D>=0&&D<I.length){const L=I[D-1],F=I[D+1];let j=L!=null?L+h:i;j=Math.max(j,i+D*h);let B=F!=null?F-h:a;B=Math.min(B,a-(I.length-1-D)*h);const G=_t(b,j,B);I[D]=Number(G.toFixed(12))}return{value:I,thumbIndex:P,didSwap:!0}}case"push":return{value:rl({values:c,index:s,nextValue:o,min:i,max:a,step:l,minStepsBetweenValues:u}),thumbIndex:s,didSwap:!1};case"none":default:{const g=c.slice(),m=g[s-1],y=g[s+1],x=m!=null?m+h:i,p=y!=null?y-h:a,_=_t(o,x,p);return g[s]=Number(_.toFixed(12)),{value:g,thumbIndex:s,didSwap:!1}}}}const jh=2;function Bh(n,e){if(!n)return{start:0,end:0};function t(o){const i=o!=null?parseFloat(o):0;return Number.isNaN(i)?0:i}const r=e?"Top":"InlineStart",s=e?"Bottom":"InlineEnd";return{start:t(n[`border${r}Width`])+t(n[`padding${r}`]),end:t(n[`border${s}Width`])+t(n[`padding${s}`])}}function es(n,e){if(e.current!=null&&n.changedTouches){const t=n;for(let r=0;r<t.changedTouches.length;r+=1){const s=t.changedTouches[r];if(s.identifier===e.current)return{x:s.clientX,y:s.clientY}}return null}return{x:n.clientX,y:n.clientY}}const zh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{disabled:i,dragging:a,validation:l,inset:u,lastChangedValueRef:c,lastChangeReasonRef:f,max:d,min:h,minStepsBetweenValues:g,onValueCommitted:m,orientation:y,pressedInputRef:x,pressedThumbCenterOffsetRef:p,pressedThumbIndexRef:_,pressedValuesRef:C,registerFieldControlRef:v,renderBeforeHydration:b,setActive:S,setDragging:T,setValue:E,state:N,step:P,thumbCollisionBehavior:M,thumbRefs:R,values:I}=Gs(),D=Hs(),L=I.length>1,F=y==="vertical",j=w.useRef(null),B=w.useRef(null),G=Pe(q=>{q&&B.current==null&&B.current==null&&(B.current=getComputedStyle(q))}),Y=w.useRef(null),K=w.useRef(0),W=w.useRef(0),V=Bu(I),oe=Pe(q=>{_.current!==q&&(_.current=q);const ce=R.current[q];if(!ce){p.current=null,x.current=null;return}x.current=ce.querySelector('input[type="range"]')}),re=Pe(q=>{const ce=j.current;if(!ce)return null;const{width:Z,height:ae,bottom:te,left:Ie,right:ut}=ce.getBoundingClientRect(),Ge=Bh(B.current,F),dt=W.current,jt=(F?ae:Z)-Ge.start-Ge.end-dt*2,Tt=p.current??0,me=q.x-Tt,Bt=q.y-Tt,Ye=F?te-Bt-Ge.end:(D==="rtl"?ut-me:me-Ie)-Ge.start,We=_t((Ye-dt)/jt,0,1);let Ve=(d-h)*We+h;if(Ve=Pd(Ve,P,h),Ve=_t(Ve,h,d),!L)return{value:Ve,thumbIndex:0,didSwap:!1};const zt=_.current;if(zt<0)return null;const tt=Dh({behavior:M,values:I,currentValues:V.current??I,initialValues:C.current,pressedIndex:zt,nextValue:Ve,min:h,max:d,step:P,minStepsBetweenValues:g});return M==="swap"&&tt.didSwap?oe(tt.thumbIndex):_.current=tt.thumbIndex,tt}),le=Pe(q=>{C.current=L?I.slice():null,V.current=I;const ce=_.current;let Z=ce;if(ce>-1&&ce<I.length){if(I[ce]===d){let ae=ce;for(;ae>0&&I[ae-1]===d;)ae-=1;Z=ae}}else{const ae=F?"y":"x";let te;Z=-1;for(let Ie=0;Ie<R.current.length;Ie+=1){const ut=R.current[Ie];if(xo(ut)){const Ge=Ad(ut),dt=Math.abs(q[ae]-Ge[ae]);(te===void 0||dt<=te)&&(Z=Ie,te=dt)}}}if(Z>-1&&Z!==ce&&oe(Z),u){const ae=R.current[Z];if(xo(ae)){const te=ae.getBoundingClientRect(),Ie=F?"height":"width";W.current=te[Ie]/2}}}),ee=Pe(q=>{R.current?.[q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),ne=Pe(q=>{const ce=es(q,Y);if(ce==null)return;if(K.current+=1,q.type==="pointermove"&&q.buttons===0){ie(q);return}const Z=re(ce);Z!=null&&kd(Z.value,P,g)&&(!a&&K.current>jh&&T(!0),E(Z.value,et(Tp,q,void 0,{activeThumbIndex:Z.thumbIndex})),V.current=Array.isArray(Z.value)?Z.value:[Z.value],Z.didSwap&&ee(Z.thumbIndex))});function ie(q){S(-1),T(!1),x.current=null,p.current=null,_.current=-1;const ce=es(q,Y),Z=ce!=null?re(ce):null;if(Z!=null){const ae=f.current;l.commit(c.current??Z.value),m(c.current??Z.value,zu(ae,q))}"pointerType"in q&&j.current?.hasPointerCapture(q.pointerId)&&j.current?.releasePointerCapture(q.pointerId),Y.current=null,C.current=null,ue()}const J=Pe(q=>{if(i)return;const ce=q.changedTouches[0];ce!=null&&(Y.current=ce.identifier);const Z=es(q,Y);if(Z!=null){le(Z);const te=re(Z);if(te==null)return;ee(te.thumbIndex),E(te.value,et(qa,q,void 0,{activeThumbIndex:te.thumbIndex})),V.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&ee(te.thumbIndex)}K.current=0;const ae=tn(j.current);ae.addEventListener("touchmove",ne,{passive:!0}),ae.addEventListener("touchend",ie,{passive:!0})}),ue=Pe(()=>{const q=tn(j.current);q.removeEventListener("pointermove",ne),q.removeEventListener("pointerup",ie),q.removeEventListener("touchmove",ne),q.removeEventListener("touchend",ie),C.current=null}),pe=Pu();return w.useEffect(()=>{const q=j.current;return q?(q.addEventListener("touchstart",J,{passive:!0}),()=>{q.removeEventListener("touchstart",J),pe.cancel(),ue()}):()=>ue()},[ue,J,j,pe]),w.useEffect(()=>{i&&ue()},[i,ue]),st("div",e,{state:N,ref:[t,v,j,G],props:[{"data-base-ui-slider-control":b?"":void 0,onPointerDown(q){const ce=j.current;if(!ce||i||q.defaultPrevented||!xo(q.target)||q.button!==0)return;const Z=es(q,Y);if(Z!=null){le(Z);const te=re(Z);if(te==null)return;Er(R.current[te.thumbIndex],Uu(tn(ce)))?q.preventDefault():pe.request(()=>{ee(te.thumbIndex)}),T(!0),p.current!=null||(E(te.value,et(qa,q.nativeEvent,void 0,{activeThumbIndex:te.thumbIndex})),V.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&ee(te.thumbIndex))}q.nativeEvent.pointerId&&ce.setPointerCapture(q.nativeEvent.pointerId),K.current=0;const ae=tn(j.current);ae.addEventListener("pointermove",ne,{passive:!0}),ae.addEventListener("pointerup",ie,{once:!0})},tabIndex:-1},o],stateAttributesMapping:Dr})}),Uh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{state:i}=Gs();return st("div",e,{state:i,ref:t,props:[{style:{position:"relative"}},o],stateAttributesMapping:Dr})});let Kh=(function(n){return n.index="data-index",n.dragging="data-dragging",n.orientation="data-orientation",n.disabled="data-disabled",n.readonly="data-readonly",n.required="data-required",n.valid="data-valid",n.invalid="data-invalid",n.touched="data-touched",n.dirty="data-dirty",n.focused="data-focused",n})({});const Wh='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Id="PageUp",Rd="PageDown",Vh=new Set([ad,od,sd,id,nd,rd,Id,Rd]);function Hh(n,e,t,r){if(!(e<0))return n.length===2?e===0?`${fs(n[e],r,t)} start range`:`${fs(n[e],r,t)} end range`:t?fs(n[e],r,t):void 0}function Kn(n,e,t,r,s){return t===1?Math.min(n+e,s):Math.max(n-e,r)}const qh=w.forwardRef(function(e,t){const{render:r,children:s,className:o,"aria-describedby":i,"aria-label":a,"aria-labelledby":l,disabled:u=!1,getAriaLabel:c,getAriaValueText:f,id:d,index:h,inputRef:g,onBlur:m,onFocus:y,onKeyDown:x,tabIndex:p,..._}=e,C=Cn(d),{active:v,lastUsedThumbIndex:b,controlRef:S,disabled:T,validation:E,formatOptionsRef:N,handleInputChange:P,inset:M,labelId:R,largeStep:I,locale:D,max:L,min:F,minStepsBetweenValues:j,name:B,orientation:G,pressedInputRef:Y,pressedThumbCenterOffsetRef:K,pressedThumbIndexRef:W,renderBeforeHydration:V,setActive:oe,setIndicatorPosition:re,state:le,step:ee,values:ne}=Gs(),ie=Hs(),J=u||T,ue=ne.length>1,pe=G==="vertical",Ae=ie==="rtl",{setTouched:q,setFocused:ce,validationMode:Z}=Ju(),ae=w.useRef(null),te=w.useRef(null),Ie=Cn(),ut=$p(),Ge=ue?Ie:ut,dt=w.useMemo(()=>({inputId:Ge}),[Ge]),{ref:jt,index:Tt}=qs({metadata:dt}),me=ue?h??Tt:0,Bt=me===ne.length-1,Ye=ne[me],We=Yo(Ye,F,L),[Ve,zt]=w.useState(!1),[tt,Un]=w.useState();qi(()=>zt(!0));const de=b>=0&&b<ne.length?b:-1,X=Pe(()=>{const Ee=S.current,Se=ae.current;if(!Ee||!Se)return;const Re=Se.getBoundingClientRect(),Zr=Ee.getBoundingClientRect(),Xr=pe?"height":"width",sp=Zr[Xr]-Re[Xr],_o=(Re[Xr]/2+sp*We/100)/Zr[Xr]*100;Un(_o),me===0?re(vo=>[_o,vo[1]]):Bt&&re(vo=>[vo[0],_o])});En(()=>{M&&queueMicrotask(X)},[X,M]),En(()=>{M&&X()},[X,M,We]);const Ce=w.useCallback(()=>{const Ee=pe?"bottom":"insetInlineStart",Se=pe?"left":"top";let Re;return ue?v===me?Re=2:de===me&&(Re=1):v===me&&(Re=1),M?{"--position":`${tt}%`,visibility:V&&!Ve||tt===void 0?"hidden":void 0,position:"absolute",[Ee]:"var(--position)",[Se]:"50%",translate:`${(pe||!Ae?-1:1)*50}% ${(pe?1:-1)*50}%`,zIndex:Re}:Number.isFinite(We)?{position:"absolute",[Ee]:`${We}%`,[Se]:"50%",translate:`${(pe||!Ae?-1:1)*50}% ${(pe?1:-1)*50}%`,zIndex:Re}:Ja},[v,me,M,Ve,tt,ue,V,Ae,de,We,pe]);let ot;G==="vertical"&&(ot=Ae?"vertical-rl":"vertical-lr");const it=xs({"aria-label":typeof c=="function"?c(me):a,"aria-labelledby":l??R,"aria-describedby":i,"aria-orientation":G,"aria-valuenow":Ye,"aria-valuetext":typeof f=="function"?f(fs(Ye,D,N.current??void 0),Ye,me):Hh(ne,me,N.current??void 0,D),disabled:J,id:Ge,max:L,min:F,name:B,onChange(Ee){P(Ee.target.valueAsNumber,me,Ee)},onFocus(){oe(me),ce(!0)},onBlur(){ae.current&&(oe(-1),q(!0),ce(!1),Z==="onBlur"&&E.commit(wd(Ye,me,F,L,ue,ne)))},onKeyDown(Ee){if(!Vh.has(Ee.key))return;Zi.has(Ee.key)&&Ee.stopPropagation();let Se=null;const Re=Pd(Ye,ee,F);switch(Ee.key){case ad:Se=Kn(Re,Ee.shiftKey?I:ee,1,F,L);break;case id:Se=Kn(Re,Ee.shiftKey?I:ee,Ae?-1:1,F,L);break;case od:Se=Kn(Re,Ee.shiftKey?I:ee,-1,F,L);break;case sd:Se=Kn(Re,Ee.shiftKey?I:ee,Ae?1:-1,F,L);break;case Id:Se=Kn(Re,I,1,F,L);break;case Rd:Se=Kn(Re,I,-1,F,L);break;case rd:Se=L,ue&&(Se=Number.isFinite(ne[me+1])?ne[me+1]-ee*j:L);break;case nd:Se=F,ue&&(Se=Number.isFinite(ne[me-1])?ne[me-1]+ee*j:F);break}Se!==null&&(P(Se,me,Ee),Ee.preventDefault())},step:ee,style:{...Ja,width:"100%",height:"100%",writingMode:ot},tabIndex:p??void 0,type:"range",value:Ye??""},E.getInputValidationProps),gn=zi(te,E.inputRef,g);return st("div",e,{state:le,ref:[t,jt,ae],props:[{[Kh.index]:me,children:k.jsxs(w.Fragment,{children:[s,k.jsx("input",{ref:gn,...it}),M&&!Ve&&V&&Bt&&k.jsx("script",{dangerouslySetInnerHTML:{__html:Wh},suppressHydrationWarning:!0})]}),id:C,onBlur:m,onFocus:y,onPointerDown(Ee){if(W.current=me,ae.current!=null){const Se=G==="horizontal"?"x":"y",Re=Ad(ae.current),Zr=(G==="horizontal"?Ee.clientX:Ee.clientY)-Re[Se];K.current=Zr}te.current!=null&&Y.current!==te.current&&(Y.current=te.current)},style:Ce(),suppressHydrationWarning:V||void 0,tabIndex:-1},_],stateAttributesMapping:Dr})});function Jh(n,e,t,r,s,o){const i=t===void 0||e&&r===void 0?"hidden":void 0,a=n?"bottom":"insetInlineStart",l=n?"height":"width",c={visibility:s&&!o?"hidden":i,position:n?"absolute":"relative",[n?"width":"height"]:"inherit"};return c["--start-position"]=`${t??0}%`,e?(c["--relative-size"]=`${(r??0)-(t??0)}%`,c[a]="var(--start-position)",c[l]="var(--relative-size)",c):(c[a]=0,c[l]="var(--start-position)",c)}function Gh(n,e,t,r){const s=n?"bottom":"insetInlineStart",o=n?"height":"width",a={position:n?"absolute":"relative",[n?"width":"height"]:"inherit"};if(!e)return a[s]=0,a[o]=`${t}%`,a;const l=r-t;return a[s]=`${t}%`,a[o]=`${l}%`,a}const Yh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{indicatorPosition:i,inset:a,max:l,min:u,orientation:c,renderBeforeHydration:f,state:d,values:h}=Gs(),[g,m]=w.useState(!1);qi(()=>m(!0));const y=c==="vertical",x=h.length>1,p=a?Jh(y,x,i[0],i[1],f,g):Gh(y,x,Yo(h[0],u,l),Yo(h[h.length-1],u,l));return st("div",e,{state:d,ref:t,props:[{"data-base-ui-slider-indicator":f?"":void 0,style:p,suppressHydrationWarning:f||void 0},o],stateAttributesMapping:Dr})});const Zh=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],Xh=Ku("brain-circuit",Zh);const Qh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Od=Ku("chevron-down",Qh);var em="_1ffqjcq4",tm="_1ffqjcq5";function Fd(n){const e=De.c(9),{children:t,open:r,defaultOpen:s,onOpenChange:o,modal:i,preventCloseOnNestedPortals:a}=n,l=i===void 0?!1:i,u=a===void 0?!0:a;let c;e[0]!==o||e[1]!==u?(c=(h,g)=>{if(!h&&u&&g.reason==="outside-press"&&g.event){const m=g.event.target;if(m?.closest("[data-open]")||m?.closest('[role="listbox"]')||m?.closest('[role="option"]')){g.cancel?.();return}}o?.(h)},e[0]=o,e[1]=u,e[2]=c):c=e[2];const f=c;let d;return e[3]!==t||e[4]!==s||e[5]!==f||e[6]!==l||e[7]!==r?(d=k.jsx(Th,{open:r,defaultOpen:s,onOpenChange:f,modal:l,children:t}),e[3]=t,e[4]=s,e[5]=f,e[6]=l,e[7]=r,e[8]=d):d=e[8],d}function Md(n){const e=De.c(6),{children:t,className:r,asChild:s}=n;if(s&&w.isValidElement(t)){let i;return e[0]!==t||e[1]!==r?(i=k.jsx(nl,{render:t,className:r,children:t}),e[0]=t,e[1]=r,e[2]=i):i=e[2],i}let o;return e[3]!==t||e[4]!==r?(o=k.jsx(nl,{className:r,children:t}),e[3]=t,e[4]=r,e[5]=o):o=e[5],o}function $d(n){const e=De.c(11),{children:t,className:r,sideOffset:s,align:o,side:i,positionMethod:a}=n,l=s===void 0?8:s,u=o===void 0?"center":o,c=i===void 0?"bottom":i,f=a===void 0?"absolute":a;let d;e[0]!==r?(d=Wu(tm,r),e[0]=r,e[1]=d):d=e[1];let h;e[2]!==t||e[3]!==d?(h=k.jsx(Rh,{className:d,children:t}),e[2]=t,e[3]=d,e[4]=h):h=e[4];let g;return e[5]!==u||e[6]!==f||e[7]!==c||e[8]!==l||e[9]!==h?(g=k.jsx(Nh,{children:k.jsx(Ph,{className:em,sideOffset:l,align:u,side:c,positionMethod:f,children:h})}),e[5]=u,e[6]=f,e[7]=c,e[8]=l,e[9]=h,e[10]=g):g=e[10],g}var nm="vpj4en0",rm="vpj4en1",sm="vpj4en2",om="vpj4en3",im="vpj4en4",am="vpj4en5",lm="vpj4en6";function ts(n){const e=De.c(25),{label:t,value:r,defaultValue:s,min:o,max:i,step:a,onValueChange:l,onValueCommitted:u,disabled:c,className:f,showValue:d,formatValue:h}=n,g=o===void 0?0:o,m=i===void 0?100:i,y=a===void 0?1:a,x=c===void 0?!1:c,p=d===void 0?!0:d;let _;e[0]!==l?(_=I=>{typeof I=="number"?l?.(I):Array.isArray(I)&&l?.(I[0])},e[0]=l,e[1]=_):_=e[1];const C=_;let v;e[2]!==u?(v=I=>{typeof I=="number"?u?.(I):Array.isArray(I)&&u?.(I[0])},e[2]=u,e[3]=v):v=e[3];const b=v,S=r??s??g;let T;e[4]!==S||e[5]!==h?(T=h?h(S):String(S),e[4]=S,e[5]=h,e[6]=T):T=e[6];const E=T;let N;e[7]!==f?(N=Wu(nm,f),e[7]=f,e[8]=N):N=e[8];let P;e[9]!==E||e[10]!==t||e[11]!==p?(P=(t||p)&&k.jsxs("div",{className:rm,children:[t&&k.jsx("span",{children:t}),p&&k.jsx("span",{className:sm,children:E})]}),e[9]=E,e[10]=t,e[11]=p,e[12]=P):P=e[12];let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=k.jsx(zh,{className:om,children:k.jsxs(Uh,{className:im,children:[k.jsx(Yh,{className:am}),k.jsx(qh,{className:lm})]})}),e[13]=M):M=e[13];let R;return e[14]!==s||e[15]!==x||e[16]!==C||e[17]!==b||e[18]!==m||e[19]!==g||e[20]!==y||e[21]!==P||e[22]!==N||e[23]!==r?(R=k.jsxs($h,{value:r,defaultValue:s,min:g,max:m,step:y,onValueChange:C,onValueCommitted:b,disabled:x,className:N,children:[P,M]}),e[14]=s,e[15]=x,e[16]=C,e[17]=b,e[18]=m,e[19]=g,e[20]=y,e[21]=P,e[22]=N,e[23]=r,e[24]=R):R=e[24],R}var cm="_7ucatj0",um="_7ucatj1",dm="_7ucatj2",sl="_7ucatj3",ol="_7ucatj4",il="_7ucatj5",al="_7ucatj6",ll="_7ucatj7",cl="_7ucatj8",ul="_7ucatj9",dl="_7ucatja",fm="_7ucatjb",gm="_7ucatjc",pm="_7ucatjd",hm="_7ucatje",mm="_7ucatjf",ym="_7ucatjg",_m="_7ucatjh",vm="_7ucatji";function xm(n){const e=De.c(69),{isNewVariant:t,onSave:r,isSaving:s}=n,o=s===void 0?!1:s,[i,a]=w.useState(!1),[l,u]=w.useState(t?"new_variant":"new_version"),[c,f]=w.useState(!1),[d,h]=w.useState(null),{data:g}=nh();let m;e[0]!==g?(m=g===void 0?[]:g,e[0]=g,e[1]=m):m=e[1];const y=m;let x;e[2]!==c||e[3]!==l||e[4]!==r||e[5]!==d?.id?(x=()=>{r({mode:l,deployToEnvironment:c,environmentId:c?d?.id??null:null}),a(!1)},e[2]=c,e[3]=l,e[4]=r,e[5]=d?.id,e[6]=x):x=e[6];const p=x;let _;e[7]!==t?(_=q=>{a(q),q&&(u(t?"new_variant":"new_version"),f(!1),h(null))},e[7]=t,e[8]=_):_=e[8];const C=_;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=k.jsx(Vu,{icon:Lp,size:"xs"}),e[9]=v):v=e[9];const b=o?"Saving...":"Save";let S;e[10]!==o||e[11]!==b?(S=k.jsx(Md,{asChild:!0,children:k.jsxs(bo,{variant:"primary",size:"default",type:"button",disabled:o,children:[v,b]})}),e[10]=o,e[11]=b,e[12]=S):S=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=k.jsx("div",{className:um,children:"Save Options"}),e[13]=T):T=e[13];const E=`${sl} ${l==="new_variant"?ol:""}`;let N,P;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=()=>u("new_variant"),P=q=>q.key==="Enter"&&u("new_variant"),e[14]=N,e[15]=P):(N=e[14],P=e[15]);const M=l==="new_variant",R=`${il} ${l==="new_variant"?al:""}`;let I;e[16]!==l?(I=l==="new_variant"&&k.jsx("div",{className:ll}),e[16]=l,e[17]=I):I=e[17];let D;e[18]!==R||e[19]!==I?(D=k.jsx("div",{className:R,children:I}),e[18]=R,e[19]=I,e[20]=D):D=e[20];let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=k.jsxs("div",{className:cl,children:[k.jsx("span",{className:ul,children:"Save as new variant"}),k.jsx("span",{className:dl,children:"Creates a new variant with version 1"})]}),e[21]=L):L=e[21];let F;e[22]!==E||e[23]!==M||e[24]!==D?(F=k.jsxs("div",{className:E,onClick:N,onKeyDown:P,role:"radio","aria-checked":M,tabIndex:0,children:[D,L]}),e[22]=E,e[23]=M,e[24]=D,e[25]=F):F=e[25];let j;e[26]!==t||e[27]!==l?(j=!t&&k.jsxs("div",{className:`${sl} ${l==="new_version"?ol:""}`,onClick:()=>u("new_version"),onKeyDown:q=>q.key==="Enter"&&u("new_version"),role:"radio","aria-checked":l==="new_version",tabIndex:0,children:[k.jsx("div",{className:`${il} ${l==="new_version"?al:""}`,children:l==="new_version"&&k.jsx("div",{className:ll})}),k.jsxs("div",{className:cl,children:[k.jsx("span",{className:ul,children:"Update as new version"}),k.jsx("span",{className:dl,children:"Creates a new version of this variant"})]})]}),e[26]=t,e[27]=l,e[28]=j):j=e[28];let B;e[29]!==F||e[30]!==j?(B=k.jsxs("div",{className:dm,children:[F,j]}),e[29]=F,e[30]=j,e[31]=B):B=e[31];const G=`${pm} ${c?hm:""}`;let Y,K;e[32]!==c?(Y=()=>f(!c),K=q=>q.key==="Enter"&&f(!c),e[32]=c,e[33]=Y,e[34]=K):(Y=e[33],K=e[34]);let W;e[35]!==c?(W=c&&k.jsx(cd,{className:mm}),e[35]=c,e[36]=W):W=e[36];let V;e[37]!==c||e[38]!==G||e[39]!==Y||e[40]!==K||e[41]!==W?(V=k.jsx("div",{className:G,onClick:Y,onKeyDown:K,role:"checkbox","aria-checked":c,tabIndex:0,children:W}),e[37]=c,e[38]=G,e[39]=Y,e[40]=K,e[41]=W,e[42]=V):V=e[42];let oe;e[43]!==c?(oe=k.jsx("span",{className:ym,onClick:()=>f(!c),children:"Deploy to environment"}),e[43]=c,e[44]=oe):oe=e[44];let re;e[45]!==V||e[46]!==oe?(re=k.jsxs("div",{className:gm,children:[V,oe]}),e[45]=V,e[46]=oe,e[47]=re):re=e[47];let le;e[48]!==c||e[49]!==y||e[50]!==d?(le=c&&k.jsx("div",{className:_m,children:k.jsx(Gi,{items:y,value:d,onValueChange:h,itemToString:bm,placeholder:"Select environment"})}),e[48]=c,e[49]=y,e[50]=d,e[51]=le):le=e[51];let ee;e[52]!==re||e[53]!==le?(ee=k.jsxs("div",{className:fm,children:[re,le]}),e[52]=re,e[53]=le,e[54]=ee):ee=e[54];let ne;e[55]===Symbol.for("react.memo_cache_sentinel")?(ne=k.jsx(bo,{variant:"ghost",scheme:"gray",size:"sm",type:"button",onClick:()=>a(!1),children:"Cancel"}),e[55]=ne):ne=e[55];const ie=o||c&&!d,J=o?"Saving...":"Confirm";let ue;e[56]!==p||e[57]!==ie||e[58]!==J?(ue=k.jsxs("div",{className:vm,children:[ne,k.jsx(bo,{variant:"primary",size:"sm",type:"button",onClick:p,disabled:ie,children:J})]}),e[56]=p,e[57]=ie,e[58]=J,e[59]=ue):ue=e[59];let pe;e[60]!==B||e[61]!==ee||e[62]!==ue?(pe=k.jsx($d,{side:"bottom",align:"end",sideOffset:4,children:k.jsxs("div",{className:cm,children:[T,B,ee,ue]})}),e[60]=B,e[61]=ee,e[62]=ue,e[63]=pe):pe=e[63];let Ae;return e[64]!==C||e[65]!==i||e[66]!==pe||e[67]!==S?(Ae=k.jsxs(Fd,{open:i,onOpenChange:C,children:[S,pe]}),e[64]=C,e[65]=i,e[66]=pe,e[67]=S,e[68]=Ae):Ae=e[68],Ae}function bm(n){return n?.name||""}const Ld=w.createContext(null);function Sm(n,e){return{getTheme:function(){return e??null}}}function Je(){const n=w.useContext(Ld);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",e);for(const o of t)s.append("v",o);throw r.search=s.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const s of e)r.append("v",s);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Dd(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const s of e)r.append("v",s);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ct=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Cm=Ct&&"documentMode"in document?document.documentMode:null,yt=Ct&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Tn=Ct&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Es=!(!Ct||!("InputEvent"in window)||Cm)&&"getTargetRanges"in new window.InputEvent("input"),jr=Ct&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),cr=Ct&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Em=Ct&&/Android/.test(navigator.userAgent),jd=Ct&&/^(?=.*Chrome).*/i.test(navigator.userAgent),fl=Ct&&Em&&jd,Br=Ct&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&yt&&!jd;function Bd(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const Tm=0,wm=1,km=2,zd=128,Nm=1,Am=2,Pm=3,Im=4,Rm=5,Om=6,Ys=jr||cr||Br?" ":"",ln=`
|
|
1
|
+
import{ao as op,r as w,a3 as St,ap as xs,aq as uu,ar as zi,ae as Cn,aa as st,ag as du,as as fu,at as ip,j as k,Y as et,ab as Ws,au as Ui,ac as gu,ah as pu,av as ap,aw as hu,ax as mu,ay as Gt,az as yu,aA as vr,a4 as _u,a5 as vu,a6 as ve,a7 as xu,a9 as bu,al as Vs,aB as Su,a8 as Cu,aC as Ki,aD as Wi,aE as En,aF as lp,V as Eu,W as Tu,aG as bs,X as Pe,aH as Ha,aI as Ss,aJ as an,aK as or,aL as cp,aM as wu,Z as ku,_ as Nu,$ as Au,aN as Hs,a0 as $r,aO as Pu,aP as Iu,aQ as Jo,aR as up,aS as Ru,aT as dp,aU as fp,aV as tn,aW as gp,ai as Ou,a2 as Er,aX as pp,aY as Vi,aZ as Hi,a_ as hp,a$ as Fu,b0 as Mu,b1 as $u,b2 as Lu,b3 as Go,b4 as Cs,b5 as Du,b6 as mp,ak as ju,b7 as yp,b8 as qi,aj as _p,b9 as vp,ba as xp,bb as bp,bc as Bu,an as Sp,am as zu,bd as Uu,be as Cp,bf as Ep,bg as xo,bh as Tp,bi as qa,bj as Ja,l as Ku,a as De,e as Wu,I as Vu,bk as Ga,t as wp,i as Ji,g as Hu,bl as kp,d as Np,bm as Ap}from"./index-nHWjhrFW.js";import{u as qs,C as qu,a as Pp,b as Ip,g as Rp,c as Ju,d as Op,e as Fp,f as Mp,h as $p,S as Lp,i as Gi,v as Ya,j as Dp,k as jp,m as Bp,l as zp,n as Up,o as Kp,p as Wp,q as Vp,r as Hp,s as qp,t as Jp}from"./useSetTargeting-C3RG0vdV.js";import{e as Gu,i as Qt,u as Gp}from"./index.esm-DJMnkOur.js";import{F as Yu,I as Zu,i as Xu,u as Qu,a as ed,b as Yi,e as Yp,c as Zp}from"./useValueChanged-2Bqw2vWT.js";import{C as Zi,u as td,H as nd,E as rd,A as sd,a as od,b as id,c as ad}from"./useRole-D2HhbdS4.js";import{u as Xi,a as ld}from"./useButton-DfUAk02P.js";import{C as Xp}from"./chevron-right-CS1Toe_9.js";import{C as cd}from"./check-Cp187nGx.js";import{u as ud}from"./useMutation-ppBqjQps.js";import{g as Qp,u as eh}from"./useConfigVariants-CIAilMey.js";import{u as th}from"./useTargetingRules-Bi-hIPWR.js";import{B as bo}from"./button-D46pme1q.js";import{u as nh}from"./useEnvironments-D798jdLi.js";/* empty css *//* empty css */function rh(n,e){if(n===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in n)return n;if(typeof n=="function")return{shouldBlockFn:async()=>await n(),enableBeforeUnload:!0,withResolver:!1};const t=!!(n.condition??!0),r=n.blockerFn;return{shouldBlockFn:async()=>t&&r!==void 0?await r():t,enableBeforeUnload:t,withResolver:r===void 0}}function sh(n,e){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:o=!1}=rh(n),i=op(),{history:a}=i,[l,u]=w.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return w.useEffect(()=>{const c=async f=>{function d(p){const _=i.parseLocation(p),C=i.getMatchedRoutes(_.pathname);return C.foundRoute===void 0?{routeId:"__notFound__",fullPath:_.pathname,pathname:_.pathname,params:C.routeParams,search:i.options.parseSearch(p.search)}:{routeId:C.foundRoute.id,fullPath:C.foundRoute.fullPath,pathname:_.pathname,params:C.routeParams,search:i.options.parseSearch(p.search)}}const h=d(f.currentLocation),g=d(f.nextLocation);if(h.routeId==="__notFound__"&&g.routeId!=="__notFound__")return!1;const m=await t({action:f.action,current:h,next:g});if(!o)return m;if(!m)return!1;const x=await new Promise(p=>{u({status:"blocked",current:h,next:g,action:f.action,proceed:()=>p(!1),reset:()=>p(!0)})});return u({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),x};return s?void 0:a.block({blockerFn:c,enableBeforeUnload:r})},[t,r,s,o,a,i]),l}function dd(n,e,t=(r,s)=>r===s){return n.length===e.length&&n.every((r,s)=>t(r,e[s]))}const oh=w.createContext(void 0);function Js(n=!0){const e=w.useContext(oh);if(e===void 0&&!n)throw new Error(St(25));return e}const fd=w.createContext(void 0);function Qi(n){const e=w.useContext(fd);if(e===void 0&&!n)throw new Error(St(33));return e}const gd=w.createContext(void 0);function Zt(n){const e=w.useContext(gd);if(e===void 0&&!n)throw new Error(St(36));return e}const ih={type:"regular-item"};function pd(n){const{closeOnClick:e,disabled:t=!1,highlighted:r,id:s,store:o,nativeButton:i,itemMetadata:a,nodeId:l}=n,u=w.useRef(null),c=Js(!0),f=c!==void 0,{events:d}=o.useState("floatingTreeRoot"),{getButtonProps:h,buttonRef:g}=Xi({disabled:t,focusableWhenDisabled:!0,native:i}),m=w.useCallback(x=>xs({id:s,role:"menuitem",tabIndex:r?0:-1,onMouseMove(p){l&&d.emit("itemhover",{nodeId:l,target:p.currentTarget})},onMouseEnter(){a.type==="submenu-trigger"&&a.setActive()},onKeyUp(p){p.key===" "&&o.context.typingRef.current&&p.preventBaseUIHandler()},onClick(p){e&&d.emit("close",{domEvent:p,reason:uu})},onMouseUp(p){if(c){const _=c.initialCursorPointRef.current;if(c.initialCursorPointRef.current=null,f&&_&&Math.abs(p.clientX-_.x)<=1&&Math.abs(p.clientY-_.y)<=1)return}u.current&&o.context.allowMouseUpTriggerRef.current&&(!f||p.button===2)&&a.type==="regular-item"&&u.current.click()}},x,h),[s,r,h,e,d,o,f,c,a,l]),y=zi(u,g);return w.useMemo(()=>({getItemProps:m,itemRef:y}),[m,y])}const ah=w.forwardRef(function(e,t){const{render:r,className:s,id:o,label:i,nativeButton:a=!1,disabled:l=!1,closeOnClick:u=!0,...c}=e,f=qs({label:i}),d=Qi(!0),h=Cn(o),{store:g}=Zt(),m=g.useState("isActive",f.index),y=g.useState("itemProps"),{getItemProps:x,itemRef:p}=pd({closeOnClick:u,disabled:l,highlighted:m,id:h,store:g,nativeButton:a,nodeId:d?.nodeId,itemMetadata:ih}),_=w.useMemo(()=>({disabled:l,highlighted:m}),[l,m]);return st("div",e,{state:_,props:[y,c,x],ref:[p,t,f.ref]})}),lh=w.createContext(void 0);function hd(n){return w.useContext(lh)}const ch={...Ws,...gu},Za=w.forwardRef(function(e,t){const{render:r,className:s,finalFocus:o,...i}=e,{store:a}=Zt(),{side:l,align:u}=Qi(),c=hd()!=null,f=a.useState("open"),d=a.useState("transitionStatus"),h=a.useState("popupProps"),g=a.useState("mounted"),m=a.useState("instantType"),y=a.useState("activeTriggerElement"),x=a.useState("parent"),p=a.useState("lastOpenChangeReason"),_=a.useState("rootId"),C=a.useState("floatingRootContext"),v=a.useState("floatingTreeRoot"),b=a.useState("closeDelay"),S=a.useState("activeTriggerElement");du({open:f,ref:a.context.popupRef,onComplete(){f&&a.context.onOpenChangeComplete?.(!0)}}),w.useEffect(()=>{function R(I){a.setOpen(!1,et(I.reason,I.domEvent))}return v.events.on("close",R),()=>{v.events.off("close",R)}},[v.events,a]);const T=a.useState("hoverEnabled"),E=a.useState("disabled");fu(C,{enabled:T&&!E&&x.type!=="context-menu"&&x.type!=="menubar",closeDelay:b});const N=w.useMemo(()=>({transitionStatus:d,side:l,align:u,open:f,nested:x.type==="menu",instant:m}),[d,l,u,f,x.type,m]),P=st("div",e,{state:N,ref:[t,a.context.popupRef],stateAttributesMapping:ch,props:[h,{onKeyDown(R){c&&Zi.has(R.key)&&R.stopPropagation()}},Ui(d),i,{"data-rootownerid":_}]});let M=x.type===void 0||x.type==="context-menu";return(y||x.type==="menubar"&&p!==ip)&&(M=!0),k.jsx(Yu,{context:C,modal:!1,disabled:!g,returnFocus:o===void 0?M:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?v:void 0,previousFocusableElement:S,nextFocusableElement:x.type===void 0?a.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?a.context.beforeContentFocusGuardRef:void 0,children:P})}),md=w.createContext(void 0);function uh(){const n=w.useContext(md);if(n===void 0)throw new Error(St(32));return n}const Xa=w.forwardRef(function(e,t){const{keepMounted:r=!1,...s}=e,{store:o}=Zt();return o.useState("mounted")||r?k.jsx(md.Provider,{value:r,children:k.jsx(pu,{ref:t,...s})}):null}),Qa=w.forwardRef(function(e,t){const{anchor:r,positionMethod:s="absolute",className:o,render:i,side:a,align:l,sideOffset:u=0,alignOffset:c=0,collisionBoundary:f="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=ap,...x}=e,{store:p}=Zt(),_=uh(),C=Js(!0),v=p.useState("parent"),b=p.useState("floatingRootContext"),S=p.useState("floatingTreeRoot"),T=p.useState("mounted"),E=p.useState("open"),N=p.useState("modal"),P=p.useState("activeTriggerElement"),M=p.useState("lastOpenChangeReason"),R=p.useState("floatingNodeId"),I=p.useState("floatingParentNodeId");let D=r,L=u,F=c,j=l,B=y;v.type==="context-menu"&&(D=r??v.context?.anchor,j=j??"start",!a&&j!=="center"&&(F=e.alignOffset??2,L=e.sideOffset??-5));let G=a,Y=j;v.type==="menu"?(G=G??"inline-end",Y=Y??"start",B=e.collisionAvoidance??hu):v.type==="menubar"&&(G=G??"bottom",Y=Y??"start");const K=v.type==="context-menu",W=mu({anchor:D,floatingRootContext:b,positionMethod:C?"fixed":s,mounted:T,side:G,sideOffset:L,align:Y,alignOffset:F,arrowPadding:K?0:h,collisionBoundary:f,collisionPadding:d,sticky:g,nodeId:R,keepMounted:_,disableAnchorTracking:m,collisionAvoidance:B,shiftCrossAxis:K,externalTree:S}),V=w.useMemo(()=>{const ie={};return E||(ie.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...W.positionerStyles,...ie}}},[E,T,W.positionerStyles]);w.useEffect(()=>{function ie(J){J.open?(J.parentNodeId===R&&p.set("hoverEnabled",!1),J.nodeId!==R&&J.parentNodeId===p.select("floatingParentNodeId")&&p.setOpen(!1,et(vr))):J.parentNodeId===R&&J.reason!==vr&&p.set("hoverEnabled",!0)}return S.events.on("menuopenchange",ie),()=>{S.events.off("menuopenchange",ie)}},[p,S.events,R]),w.useEffect(()=>{if(p.select("floatingParentNodeId")==null)return;function ie(J){if(J.open||J.nodeId!==p.select("floatingParentNodeId"))return;const ue=J.reason??vr;p.setOpen(!1,et(ue))}return S.events.on("menuopenchange",ie),()=>{S.events.off("menuopenchange",ie)}},[S.events,p]),w.useEffect(()=>{function ie(J){!E||J.nodeId!==p.select("floatingParentNodeId")||J.target&&P&&P!==J.target&&p.setOpen(!1,et(vr))}return S.events.on("itemhover",ie),()=>{S.events.off("itemhover",ie)}},[S.events,E,P,p]),w.useEffect(()=>{const ie={open:E,nodeId:R,parentNodeId:I,reason:p.select("lastOpenChangeReason")};S.events.emit("menuopenchange",ie)},[S.events,E,p,R,I]);const oe=w.useMemo(()=>({open:E,side:W.side,align:W.align,anchorHidden:W.anchorHidden,nested:v.type==="menu"}),[E,W.side,W.align,W.anchorHidden,v.type]),re=w.useMemo(()=>({side:W.side,align:W.align,arrowRef:W.arrowRef,arrowUncentered:W.arrowUncentered,arrowStyles:W.arrowStyles,nodeId:W.context.nodeId}),[W.side,W.align,W.arrowRef,W.arrowUncentered,W.arrowStyles,W.context.nodeId]),le=st("div",e,{state:oe,stateAttributesMapping:Ws,ref:[t,p.useStateSetter("positionerElement")],props:[V,x]}),ee=T&&v.type!=="menu"&&(v.type!=="menubar"&&N&&M!==Gt||v.type==="menubar"&&v.context.modal);let ne=null;return v.type==="menubar"?ne=v.context.contentElement:v.type===void 0&&(ne=P),k.jsxs(fd.Provider,{value:re,children:[ee&&k.jsx(Zu,{ref:v.type==="context-menu"||v.type==="nested-context-menu"?v.context.internalBackdropRef:null,inert:Xu(!E),cutout:ne}),k.jsx(yu,{id:R,children:k.jsx(qu,{elementsRef:p.context.itemDomElements,labelsRef:p.context.itemLabels,children:le})})]})}),dh=w.createContext(null);function yd(n){return w.useContext(dh)}const fh={...xu,disabled:ve(n=>n.parent.type==="menubar"&&n.parent.context.disabled||n.disabled),modal:ve(n=>(n.parent.type===void 0||n.parent.type==="context-menu")&&(n.modal??!0)),allowMouseEnter:ve(n=>n.parent.type==="menu"?n.parent.store.select("allowMouseEnter"):n.allowMouseEnter),stickIfOpen:ve(n=>n.stickIfOpen),parent:ve(n=>n.parent),rootId:ve(n=>n.parent.type==="menu"?n.parent.store.select("rootId"):n.parent.type!==void 0?n.parent.context.rootId:n.rootId),activeIndex:ve(n=>n.activeIndex),isActive:ve((n,e)=>n.activeIndex===e),hoverEnabled:ve(n=>n.hoverEnabled),instantType:ve(n=>n.instantType),lastOpenChangeReason:ve(n=>n.openChangeReason),floatingTreeRoot:ve(n=>n.parent.type==="menu"?n.parent.store.select("floatingTreeRoot"):n.floatingTreeRoot),floatingNodeId:ve(n=>n.floatingNodeId),floatingParentNodeId:ve(n=>n.floatingParentNodeId),itemProps:ve(n=>n.itemProps),closeDelay:ve(n=>n.closeDelay),keyboardEventRelay:ve(n=>{if(n.keyboardEventRelay)return n.keyboardEventRelay;if(n.parent.type==="menu")return n.parent.store.select("keyboardEventRelay")})};class ea extends _u{constructor(e){super({...gh(),...e},{positionerRef:w.createRef(),popupRef:w.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:w.createRef(),beforeContentFocusGuardRef:w.createRef(),onOpenChangeComplete:void 0,triggerElements:new vu},fh),this.observe(ve(t=>t.allowMouseEnter),(t,r)=>{this.state.parent.type==="menu"&&t!==r&&this.state.parent.store.set("allowMouseEnter",t)}),this.unsubscribeParentListener=this.observe("parent",t=>{if(this.unsubscribeParentListener?.(),t.type==="menu"){this.unsubscribeParentListener=t.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=t.store.context.allowMouseUpTriggerRef;return}t.type!==void 0&&(this.context.allowMouseUpTriggerRef=t.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){return bu(()=>e??new ea(t)).current}unsubscribeParentListener=null}function gh(){return{...Cu(),disabled:!1,modal:!0,allowMouseEnter:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Su,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Vs,keyboardEventRelay:void 0,closeDelay:0}}const _d=w.createContext(void 0);function vd(){return w.useContext(_d)}function xd(n){const{children:e,open:t,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:o=!1,disabled:i=!1,modal:a,loopFocus:l=!0,orientation:u="vertical",actionsRef:c,closeParentOnEsc:f=!1,handle:d,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:m=!0}=n,y=Js(!0),x=Zt(!0),p=yd(),_=vd(),C=w.useMemo(()=>_&&x?{type:"menu",store:x.store}:p?{type:"menubar",context:p}:y&&!x?{type:"context-menu",context:y}:{type:void 0},[y,x,p,_]),v=ea.useStore(d?.store,{parent:C}),b=v.useState("floatingTreeRoot"),S=Ki(b),T=Wi();En(()=>{y&&!x?v.update({parent:{type:"context-menu",context:y},floatingNodeId:S,floatingParentNodeId:T}):x&&v.update({floatingNodeId:S,floatingParentNodeId:T})},[y,x,S,T,v]),v.useControlledProp("open",t,o),v.useControlledProp("activeTriggerId",h,g),v.useContextCallback("onOpenChangeComplete",s);const E=v.useState("open"),N=v.useState("activeTriggerElement"),P=v.useState("positionerElement"),M=v.useState("hoverEnabled"),R=v.useState("modal"),I=v.useState("disabled"),D=v.useState("lastOpenChangeReason"),L=v.useState("parent"),F=v.useState("activeIndex"),j=v.useState("payload"),B=v.useState("floatingParentNodeId"),G=w.useRef(null),Y=B!=null;let K;v.useSyncedValues({disabled:i,modal:L.type===void 0?a:void 0,rootId:lp()});const{openMethod:W,triggerProps:V,reset:oe}=Qu(E);Eu(v);const{forceUnmount:re}=Tu(E,v,()=>{v.update({allowMouseEnter:!1,stickIfOpen:!0}),oe()}),le=w.useRef(L.type!=="context-menu"),ee=bs();w.useEffect(()=>{if(E||(G.current=null),L.type==="context-menu"){if(!E){ee.clear(),le.current=!1;return}ee.start(500,()=>{le.current=!0})}},[ee,E,L.type]),ed(E&&R&&D!==Gt&&W!=="touch",P),En(()=>{!E&&!M&&v.set("hoverEnabled",!0)},[E,M,v]);const ne=w.useRef(!0),ie=bs(),J=Pe((de,X)=>{const Ce=X.reason;if(E===de&&X.trigger===N||(X.preventUnmountOnClose=()=>{v.set("preventUnmountingOnClose",!0)},!de&&X.trigger==null&&(X.trigger=N??void 0),r?.(de,X),X.isCanceled))return;const ot={open:de,nativeEvent:X.event,reason:X.reason,nested:Y};K?.emit("openchange",ot);const it=X.event;if(de===!1&&it?.type==="click"&&it.pointerType==="touch"&&!ne.current)return;if(!de&&F!==null){const Se=v.context.itemDomElements.current[F];queueMicrotask(()=>{Se?.setAttribute("tabindex","-1")})}de&&Ce===Ha?(ne.current=!1,ie.start(300,()=>{ne.current=!0})):(ne.current=!0,ie.clear());const gn=(Ce===Ss||Ce===uu)&&it.detail===0&&it?.isTrusted,Yr=!de&&(Ce===wu||Ce==null);function Ee(){const Se={open:de,openChangeReason:Ce};G.current=X.event??null;const Re=X.trigger?.id??null;(Re||de)&&(Se.activeTriggerId=Re,Se.activeTriggerElement=X.trigger??null),v.update(Se)}Ce===Gt?an.flushSync(Ee):Ee(),L.type==="menubar"&&(Ce===Ha||Ce===or||Ce===Gt||Ce===cp||Ce===vr)?v.set("instantType","group"):gn||Yr?v.set("instantType",gn?"click":"dismiss"):v.set("instantType",void 0)}),ue=w.useCallback(de=>{const X=et(de);return X.preventUnmountOnClose=()=>{v.set("preventUnmountingOnClose",!0)},X},[v]),pe=w.useCallback(()=>{v.setOpen(!1,ue(ku))},[v,ue]);w.useImperativeHandle(c,()=>({unmount:re,close:pe}),[re,pe]);let Ae;L.type==="context-menu"&&(Ae=L.context),w.useImperativeHandle(Ae?.positionerRef,()=>P,[P]),w.useImperativeHandle(Ae?.actionsRef,()=>({setOpen:J}),[J]);const q=Nu({popupStore:v,onOpenChange:J});K=q.context.events,w.useEffect(()=>{const de=({open:X,eventDetails:Ce})=>J(X,Ce);return K.on("setOpen",de),()=>{K?.off("setOpen",de)}},[K,J]);const ce=Au(q,{enabled:!I,bubbles:f&&L.type==="menu",outsidePress(){return L.type!=="context-menu"||G.current?.type==="contextmenu"?!0:le.current},externalTree:Y?b:void 0}),Z=td(q,{role:"menu"}),ae=Hs(),te=w.useCallback(de=>{v.select("activeIndex")!==de&&v.set("activeIndex",de)},[v]),Ie=Pp(q,{enabled:!I,listRef:v.context.itemDomElements,activeIndex:F,nested:L.type!==void 0,loopFocus:l,orientation:u,parentOrientation:L.type==="menubar"?L.context.orientation:void 0,rtl:ae==="rtl",disabledIndices:Jo,onNavigate:te,openOnArrowKeyDown:L.type!=="context-menu",externalTree:Y?b:void 0,focusItemOnHover:m}),ut=w.useCallback(de=>{v.context.typingRef.current=de},[v]),Ge=Ip(q,{listRef:v.context.itemLabels,activeIndex:F,resetMs:up,onMatch:de=>{E&&de!==F&&v.set("activeIndex",de)},onTypingChange:ut}),{getReferenceProps:dt,getFloatingProps:jt,getItemProps:Tt,getTriggerProps:me}=$r([ce,Z,Ie,Ge]),Bt=w.useMemo(()=>{const de=xs(dt(),{onMouseEnter(){v.set("hoverEnabled",!0)},onMouseMove(){v.set("allowMouseEnter",!0)}},V);return delete de.role,de},[dt,v,V]),Ye=w.useMemo(()=>{const de=me();if(!de)return de;const X=xs(de,V);return delete X.role,delete X["aria-controls"],X},[me,V]),We=Pu(),Ve=w.useMemo(()=>jt({onMouseEnter(){L.type==="menu"&&We.request(()=>v.set("hoverEnabled",!1))},onMouseMove(){v.set("allowMouseEnter",!0)},onClick(){v.select("hoverEnabled")&&v.set("hoverEnabled",!1)},onKeyDown(de){const X=v.select("keyboardEventRelay");X&&!de.isPropagationStopped()&&X(de)}}),[jt,L.type,We,v]),zt=w.useMemo(()=>Tt(),[Tt]);v.useSyncedValues({floatingRootContext:q,activeTriggerProps:Bt,inactiveTriggerProps:Ye,popupProps:Ve,itemProps:zt});const tt=w.useMemo(()=>({store:v,parent:C}),[v,C]),Un=k.jsx(gd.Provider,{value:tt,children:typeof e=="function"?e({payload:j}):e});return L.type===void 0||L.type==="context-menu"?k.jsx(Iu,{externalTree:b,children:Un}):Un}function ph(n){const e=Zt().store,t=w.useMemo(()=>({parentMenu:e}),[e]);return k.jsx(_d.Provider,{value:t,children:k.jsx(xd,{...n})})}function hh(n={}){const{highlightItemOnHover:e,highlightedIndex:t,onHighlightedIndexChange:r}=ld(),{ref:s,index:o}=qs(n),i=t===o,a=w.useRef(null),l=zi(s,a);return{compositeProps:w.useMemo(()=>({tabIndex:i?0:-1,onFocus(){r(o)},onMouseMove(){const c=a.current;if(!e||!c)return;const f=c.hasAttribute("disabled")||c.ariaDisabled==="true";!i&&!f&&c.focus()}}),[i,r,o,e]),compositeRef:l,index:o}}function mh(n){const{render:e,className:t,state:r=Vs,props:s=Jo,refs:o=Jo,metadata:i,stateAttributesMapping:a,tag:l="div",...u}=n,{compositeProps:c,compositeRef:f}=hh({metadata:i});return st(l,n,{state:r,ref:[...o,f],props:[c,...s,u],stateAttributesMapping:a})}function bd(n){if(Ru(n)&&n.hasAttribute("data-rootownerid"))return n.getAttribute("data-rootownerid")??void 0;if(!dp(n))return bd(fp(n))}function yh(n){const{enabled:e=!0,mouseDownAction:t,open:r}=n,s=w.useRef(!1);return w.useMemo(()=>e?{onMouseDown:o=>{(t==="open"&&!r||t==="close"&&r)&&(s.current=!0,tn(o.currentTarget).addEventListener("click",()=>{s.current=!1},{once:!0}))},onClick:o=>{s.current&&(s.current=!1,o.preventBaseUIHandler())}}:Vs,[e,t,r])}const Qr=2,_h=w.forwardRef(function(e,t){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,id:a,openOnHover:l,delay:u=100,closeDelay:c=0,handle:f,payload:d,...h}=e,g=Zt(!0),m=f?.store??g?.store;if(!m)throw new Error(St(85));const y=Cn(a),x=m.useState("isTriggerActive",y),p=m.useState("floatingRootContext"),_=m.useState("isOpenedByTrigger",y),C=w.useRef(null),v=xh(),b=ld(!0),S=gp(),T=w.useMemo(()=>S??new Su,[S]),E=Ki(T),N=Wi(),{registerTrigger:P,isMountedByThisTrigger:M}=Ou(y,C,m,{payload:d,closeDelay:c,parent:v,floatingTreeRoot:T,floatingNodeId:E,floatingParentNodeId:N,keyboardEventRelay:b?.relayKeyboardEvent}),R=m.useState("disabled"),I=o||R||v.type==="menubar"&&v.context.disabled,{getButtonProps:D,buttonRef:L}=Xi({disabled:I,native:i});w.useEffect(()=>{!_&&v.type===void 0&&(m.context.allowMouseUpTriggerRef.current=!1)},[m,_,v.type]);const F=w.useRef(null),j=bs(),B=Pe(Z=>{if(!F.current)return;j.clear(),m.context.allowMouseUpTriggerRef.current=!1;const ae=Z.target;if(Er(F.current,ae)||Er(m.select("positionerElement"),ae)||ae===F.current||ae!=null&&bd(ae)===m.select("rootId"))return;const te=Rp(F.current);Z.clientX>=te.left-Qr&&Z.clientX<=te.right+Qr&&Z.clientY>=te.top-Qr&&Z.clientY<=te.bottom+Qr||T.events.emit("close",{domEvent:Z,reason:pp})});w.useEffect(()=>{_&&m.select("lastOpenChangeReason")===Gt&&tn(F.current).addEventListener("mouseup",B,{once:!0})},[_,B,m]);const G=v.type==="menubar"&&v.context.hasSubmenuOpen,K=Vi(p,{enabled:(l??G??!1)&&!I&&v.type!=="context-menu"&&(v.type!=="menubar"||G&&!M),handleClose:Hi({blockPointerEvents:v.type!=="menubar"}),mouseOnly:!0,move:!1,restMs:v.type===void 0?u:void 0,delay:{close:c},triggerElementRef:C,externalTree:T,isActiveTrigger:x}),W=vh(_,m.select("lastOpenChangeReason")),V=Yi(p,{enabled:!I&&v.type!=="context-menu",event:_&&v.type==="menubar"?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:v.type===void 0?W:!1}),oe=hp(p,{enabled:!I&&(v.type!=="menubar"&&_||G)}),re=yh({open:_,enabled:v.type==="menubar",mouseDownAction:"open"}),le=$r([V,oe]),ee=v.type==="menubar",ne=w.useMemo(()=>({disabled:I,open:_}),[I,_]),ie=m.useState("triggerProps",M),J=[F,t,L,P,C],ue=[le.getReferenceProps(),K??Vs,ie,{"aria-haspopup":"menu",id:y,onMouseDown:Z=>{if(m.select("open"))return;j.start(200,()=>{m.context.allowMouseUpTriggerRef.current=!0}),tn(Z.currentTarget).addEventListener("mouseup",B,{once:!0})}},ee?{role:"menuitem"}:{},re,h,D],pe=w.useRef(null),Ae=Pe(Z=>{an.flushSync(()=>{m.setOpen(!1,et(or,Z.nativeEvent,Z.currentTarget))}),Fu(pe.current)?.focus()}),q=Pe(Z=>{const ae=m.select("positionerElement");if(ae&&Mu(Z,ae))m.context.beforeContentFocusGuardRef.current?.focus();else{an.flushSync(()=>{m.setOpen(!1,et(or,Z.nativeEvent,Z.currentTarget))});let te=$u(C.current);for(;te!==null&&Er(ae,te)||te?.hasAttribute("aria-hidden");){const Ie=te;if(te=Lu(te),te===Ie)break}te?.focus()}}),ce=st("button",e,{enabled:!ee,stateAttributesMapping:Go,state:ne,ref:J,props:ue});return ee?k.jsx(mh,{tag:"button",render:r,className:s,state:ne,refs:J,props:ue,stateAttributesMapping:Go}):_?k.jsxs(w.Fragment,{children:[k.jsx(Cs,{ref:pe,onFocus:Ae},`${y}-pre-focus-guard`),k.jsx(w.Fragment,{children:ce},y),k.jsx(Cs,{ref:m.context.triggerFocusTargetRef,onFocus:q},`${y}-post-focus-guard`)]}):k.jsx(w.Fragment,{children:ce},y)});function vh(n,e){const t=bs(),[r,s]=w.useState(!1);return En(()=>{n&&e==="trigger-hover"?(s(!0),t.start(Du,()=>{s(!1)})):n||(t.clear(),s(!1))},[n,e,t]),r}function xh(){const n=Js(!0),e=Zt(!0),t=yd();return w.useMemo(()=>t?{type:"menubar",context:t}:n&&!e?{type:"context-menu",context:n}:{type:void 0},[n,e,t])}const bh=w.forwardRef(function(e,t){const{render:r,className:s,label:o,id:i,nativeButton:a=!1,openOnHover:l=!0,delay:u=100,closeDelay:c=0,disabled:f=!1,...d}=e,h=qs(),g=Qi(),{store:m}=Zt(),y=Cn(i),x=m.useState("open"),p=m.useState("floatingRootContext"),_=m.useState("floatingTreeRoot"),C=mp(y,m),v=w.useCallback(oe=>{const re=C(oe);return oe!==null&&m.select("open")&&m.select("activeTriggerId")==null&&m.update({activeTriggerId:y,activeTriggerElement:oe,closeDelay:c}),re},[C,c,m,y]),b=w.useRef(null),S=w.useCallback(oe=>{b.current=oe,m.set("activeTriggerElement",oe)},[m]),T=vd();if(!T?.parentMenu)throw new Error(St(37));m.useSyncedValue("closeDelay",c);const E=T.parentMenu,N=E.useState("itemProps"),P=E.useState("isActive",h.index),M=w.useMemo(()=>({type:"submenu-trigger",setActive:()=>E.set("activeIndex",h.index)}),[E,h.index]),R=m.useState("disabled"),I=f||R,{getItemProps:D,itemRef:L}=pd({closeOnClick:!1,disabled:I,highlighted:P,id:y,store:m,nativeButton:a,itemMetadata:M,nodeId:g?.nodeId}),F=m.useState("hoverEnabled"),j=m.useState("allowMouseEnter"),B=Vi(p,{enabled:F&&l&&!I&&j,handleClose:Hi({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:u,delay:{open:u,close:c},triggerElementRef:b,externalTree:_}),G=Yi(p,{enabled:!I,event:"mousedown",toggle:!l,ignoreMouse:l,stickIfOpen:!1}),Y=$r([G]),K=m.useState("triggerProps",!0);delete K.id;const W=w.useMemo(()=>({disabled:I,highlighted:P,open:x}),[I,P,x]);return st("div",e,{state:W,stateAttributesMapping:ju,props:[Y.getReferenceProps(),B,K,N,{tabIndex:x||P?0:-1,onBlur(){P&&E.set("activeIndex",null)}},d,D],ref:[t,h.ref,L,v,S]})}),el=new Map;function Sh(n,e){const t=JSON.stringify({locale:n,options:e}),r=el.get(t);if(r)return r;const s=new Intl.NumberFormat(n,e);return el.set(t,s),s}function fs(n,e,t){return n==null?"":Sh(e,t).format(n)}function Yo(n,e,t){return(n-e)*100/(t-e)}function _t(n,e=Number.MIN_SAFE_INTEGER,t=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(n,t))}const Sd=w.createContext(void 0);function Lr(n){const e=w.useContext(Sd);if(e===void 0&&!n)throw new Error(St(47));return e}function Ch(){return{...Cu(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0}}const Eh={...xu,disabled:ve(n=>n.disabled),instantType:ve(n=>n.instantType),openMethod:ve(n=>n.openMethod),openChangeReason:ve(n=>n.openChangeReason),modal:ve(n=>n.modal),stickIfOpen:ve(n=>n.stickIfOpen),titleElementId:ve(n=>n.titleElementId),descriptionElementId:ve(n=>n.descriptionElementId),openOnHover:ve(n=>n.openOnHover),closeDelay:ve(n=>n.closeDelay)};class ta extends _u{constructor(e){const t={...Ch(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:w.createRef(),backdropRef:w.createRef(),internalBackdropRef:w.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:w.createRef(),beforeContentFocusGuardRef:w.createRef(),stickIfOpenTimeout:new yp,triggerElements:new vu},Eh)}setOpen=(e,t)=>{const r=t.reason===Gt,s=t.reason===Ss&&t.event.detail===0,o=!e&&(t.reason===wu||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger};this.state.floatingRootContext.context.events?.emit("openchange",i);const l=()=>{const u={open:e,openChangeReason:t.reason},c=t.trigger?.id??null;(c||e)&&(u.activeTriggerId=c,u.activeTriggerElement=t.trigger??null),this.update(u)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Du,()=>{this.set("stickIfOpen",!1)}),an.flushSync(l)):l(),s||o?this.set("instantType",s?"click":"dismiss"):t.reason===or?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){const r=bu(()=>e??new ta(t)).current;return qi(r.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}function tl({props:n}){const{children:e,open:t,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:o,modal:i=!1,handle:a,triggerId:l,defaultTriggerId:u=null}=n,c=ta.useStore(a?.store,{open:t??r,modal:i,activeTriggerId:l!==void 0?l:u});c.useControlledProp("open",t,r),c.useControlledProp("activeTriggerId",l,u);const f=c.useState("open"),d=c.useState("positionerElement"),h=c.useState("payload"),g=c.useState("openChangeReason");c.useContextCallback("onOpenChange",s),c.useContextCallback("onOpenChangeComplete",o);const{openMethod:m,triggerProps:y,reset:x}=Qu(f);Eu(c);const{forceUnmount:p}=Tu(f,c,()=>{c.update({stickIfOpen:!0,openChangeReason:null}),x()});ed(f&&i===!0&&g!==Gt&&m!=="touch",d),w.useEffect(()=>{f||c.context.stickIfOpenTimeout.clear()},[c,f]);const _=w.useCallback(D=>{const L=et(D);return L.preventUnmountOnClose=()=>{c.set("preventUnmountingOnClose",!0)},L},[c]),C=w.useCallback(()=>{c.setOpen(!1,_(ku))},[c,_]);w.useImperativeHandle(n.actionsRef,()=>({unmount:p,close:C}),[p,C]);const v=Nu({popupStore:c,onOpenChange:c.setOpen}),b=Au(v,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),S=td(v),{getReferenceProps:T,getFloatingProps:E,getTriggerProps:N}=$r([b,S]),P=w.useMemo(()=>T(y),[T,y]),M=w.useMemo(()=>N(y),[N,y]),R=w.useMemo(()=>E(),[E]);c.useSyncedValues({modal:i,openMethod:m,activeTriggerProps:P,inactiveTriggerProps:M,popupProps:R,floatingRootContext:v,nested:Wi()!=null});const I=w.useMemo(()=>({store:c}),[c]);return k.jsx(Sd.Provider,{value:I,children:typeof e=="function"?e({payload:h}):e})}function Th(n){return Lr(!0)?k.jsx(tl,{props:n}):k.jsx(Iu,{children:k.jsx(tl,{props:n})})}const wh=300,nl=w.forwardRef(function(e,t){const{render:r,className:s,disabled:o=!1,nativeButton:i=!0,handle:a,payload:l,openOnHover:u=!1,delay:c=wh,closeDelay:f=0,id:d,...h}=e,g=Lr(!0),m=a?.store??g?.store;if(!m)throw new Error(St(74));const y=Cn(d),x=m.useState("isTriggerActive",y),p=m.useState("floatingRootContext"),_=m.useState("isOpenedByTrigger",y),C=w.useRef(null),{registerTrigger:v,isMountedByThisTrigger:b}=Ou(y,C,m,{payload:l,disabled:o,openOnHover:u,closeDelay:f}),S=m.useState("openChangeReason"),T=m.useState("stickIfOpen"),E=m.useState("openMethod"),N=Vi(p,{enabled:p!=null&&u&&(E!=="touch"||S!==Ss),mouseOnly:!0,move:!1,handleClose:Hi(),restMs:c,delay:{close:f},triggerElementRef:C,isActiveTrigger:x}),P=Yi(p,{enabled:p!=null,stickIfOpen:T}),M=$r([P]),R=m.useState("triggerProps",b),I=w.useMemo(()=>({disabled:o,open:_}),[o,_]),{getButtonProps:D,buttonRef:L}=Xi({disabled:o,native:i}),F=w.useMemo(()=>({open(K){return K&&S===Ss?Go.open(K):ju.open(K)}}),[S]),j=st("button",e,{state:I,ref:[L,t,v,C],props:[M.getReferenceProps(),N,R,{[_p]:"",id:y},h,D],stateAttributesMapping:F}),B=w.useRef(null),G=Pe(K=>{an.flushSync(()=>{m.setOpen(!1,et(or,K.nativeEvent,K.currentTarget))}),Fu(B.current)?.focus()}),Y=Pe(K=>{const W=m.select("positionerElement");if(W&&Mu(K,W))m.context.beforeContentFocusGuardRef.current?.focus();else{an.flushSync(()=>{m.setOpen(!1,et(or,K.nativeEvent,K.currentTarget))});let V=$u(C.current);for(;V!==null&&Er(W,V)||V?.hasAttribute("aria-hidden");){const oe=V;if(V=Lu(V),V===oe)break}V?.focus()}});return x?k.jsxs(w.Fragment,{children:[k.jsx(Cs,{ref:B,onFocus:G}),k.jsx(w.Fragment,{children:j},y),k.jsx(Cs,{ref:m.context.triggerFocusTargetRef,onFocus:Y})]}):k.jsx(w.Fragment,{children:j},y)}),Cd=w.createContext(void 0);function kh(){const n=w.useContext(Cd);if(n===void 0)throw new Error(St(45));return n}const Nh=w.forwardRef(function(e,t){const{keepMounted:r=!1,...s}=e,{store:o}=Lr();return o.useState("mounted")||r?k.jsx(Cd.Provider,{value:r,children:k.jsx(pu,{ref:t,...s,renderGuards:!1})}):null}),Ed=w.createContext(void 0);function Ah(){const n=w.useContext(Ed);if(!n)throw new Error(St(46));return n}const Ph=w.forwardRef(function(e,t){const{render:r,className:s,anchor:o,positionMethod:i="absolute",side:a="bottom",align:l="center",sideOffset:u=0,alignOffset:c=0,collisionBoundary:f="clipping-ancestors",collisionPadding:d=5,arrowPadding:h=5,sticky:g=!1,disableAnchorTracking:m=!1,collisionAvoidance:y=hu,...x}=e,{store:p}=Lr(),_=kh(),C=Ki(),v=p.useState("floatingRootContext"),b=p.useState("mounted"),S=p.useState("open"),T=p.useState("openChangeReason"),E=p.useState("activeTriggerElement"),N=p.useState("modal"),P=p.useState("positionerElement"),M=p.useState("instantType"),R=p.useState("transitionStatus"),I=w.useRef(null),D=vp(P,!1,!1),L=mu({anchor:o,floatingRootContext:v,positionMethod:i,mounted:b,side:a,sideOffset:u,align:l,alignOffset:c,arrowPadding:h,collisionBoundary:f,collisionPadding:d,sticky:g,disableAnchorTracking:m,keepMounted:_,nodeId:C,collisionAvoidance:y,adaptiveOrigin:xp}),F=w.useMemo(()=>{const W={};return S||(W.pointerEvents="none"),{role:"presentation",hidden:!b,style:{...L.positionerStyles,...W}}},[S,b,L.positionerStyles]),j=w.useMemo(()=>({props:F,...L}),[F,L]),B=v?.select("domReferenceElement");En(()=>{const W=B,V=I.current;if(W&&(I.current=W),V&&W&&W!==V){p.set("instantType",void 0);const oe=new AbortController;return D(()=>{p.set("instantType","trigger-change")},oe.signal),()=>{oe.abort()}}},[B,D,p]);const G=w.useMemo(()=>({open:S,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:M}),[S,j.side,j.align,j.anchorHidden,M]),Y=w.useCallback(W=>{p.set("positionerElement",W)},[p]),K=st("div",e,{state:G,props:[j.props,Ui(R),x],ref:[t,Y],stateAttributesMapping:Ws});return k.jsxs(Ed.Provider,{value:j,children:[b&&N===!0&&T!==Gt&&k.jsx(Zu,{ref:p.context.internalBackdropRef,inert:Xu(!S),cutout:E}),k.jsx(yu,{id:C,children:K})]})}),Ih={...Ws,...gu},Rh=w.forwardRef(function(e,t){const{className:r,render:s,initialFocus:o,finalFocus:i,...a}=e,{store:l}=Lr(),u=Ah(),c=hd()!=null,f=Hs(),d=l.useState("open"),h=l.useState("openMethod"),g=l.useState("instantType"),m=l.useState("transitionStatus"),y=l.useState("popupProps"),x=l.useState("titleElementId"),p=l.useState("descriptionElementId"),_=l.useState("modal"),C=l.useState("mounted"),v=l.useState("openChangeReason"),b=l.useState("popupElement"),S=l.useState("payload"),T=l.useState("positionerElement"),E=l.useState("activeTriggerElement"),N=l.useState("floatingRootContext");du({open:d,ref:l.context.popupRef,onComplete(){d&&l.context.onOpenChangeComplete?.(!0)}});const P=l.useState("disabled"),M=l.useState("openOnHover"),R=l.useState("closeDelay");fu(N,{enabled:M&&!P,closeDelay:R});function I(K){return K==="touch"?l.context.popupRef.current:!0}const D=o===void 0?I:o,L=w.useMemo(()=>({open:d,side:u.side,align:u.align,instant:g,transitionStatus:m}),[d,u.side,u.align,g,m]),F=w.useCallback(K=>{l.set("popupElement",K)},[l]);function j(){N.context.events.emit("measure-layout")}function B(K,W){N.context.events.emit("measure-layout-complete",{previousDimensions:K,nextDimensions:W})}const G=w.useCallback(()=>l.context.triggerElements.size>1,[l]);bp({popupElement:b,positionerElement:T,mounted:C,content:S,enabled:G,onMeasureLayout:j,onMeasureLayoutComplete:B,side:u.side,direction:f});const Y=st("div",e,{state:L,ref:[t,l.context.popupRef,F],props:[y,{"aria-labelledby":x,"aria-describedby":p,onKeyDown(K){c&&Zi.has(K.key)&&K.stopPropagation()}},Ui(m),a],stateAttributesMapping:Ih});return k.jsx(Yu,{context:N,openInteractionType:h,modal:_==="trap-focus",disabled:!C||v===Gt,initialFocus:D,returnFocus:i,restoreFocus:"popup",previousFocusableElement:Ru(E)?E:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:Y})});function Td(n,e){return n-e}function Oh(n,e,t){const r=n.slice();return r[e]=t,r.sort(Td)}function wd(n,e,t,r,s,o){let i=n;return i=_t(i,t,r),s&&(i=Oh(o,e,_t(i,o[e-1]||-1/0,o[e+1]||1/0))),i}function kd(n,e,t){if(!Array.isArray(n))return!0;const r=n.reduce((s,o,i,a)=>(i===a.length-1||s.push(Math.abs(o-a[i+1])),s),[]);return Math.min(...r)>=e*t}const Dr={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},Nd=w.createContext(void 0);function Gs(){const n=w.useContext(Nd);if(n===void 0)throw new Error(St(62));return n}function Fh(n){return"key"in n?Cp:Ep}function Mh(n,e){return typeof n=="number"&&typeof e=="number"?n===e:Array.isArray(n)&&Array.isArray(e)?dd(n,e):!1}const $h=w.forwardRef(function(e,t){const{"aria-labelledby":r,className:s,defaultValue:o,disabled:i=!1,id:a,format:l,largeStep:u=10,locale:c,render:f,max:d=100,min:h=0,minStepsBetweenValues:g=0,name:m,onValueChange:y,onValueCommitted:x,orientation:p="horizontal",step:_=1,thumbCollisionBehavior:C="push",thumbAlignment:v="center",value:b,...S}=e,T=Cn(a),E=Pe(y),N=Pe(x),{clearErrors:P}=Yp(),{state:M,disabled:R,name:I,setTouched:D,setDirty:L,validityData:F,shouldValidateOnChange:j,validation:B}=Ju(),{labelId:G}=Op(),Y=r??G,K=R||i,W=I??m,[V,oe]=Fp({controlled:b,default:o??h,name:"Slider"}),re=w.useRef(null),le=w.useRef(null),ee=w.useRef([]),ne=w.useRef(null),ie=w.useRef(null),J=w.useRef(-1),ue=w.useRef(null),pe=w.useRef(null),Ae=w.useRef("none"),q=Bu(l),[ce,Z]=w.useState(-1),[ae,te]=w.useState(-1),[Ie,ut]=w.useState(!1),[Ge,dt]=w.useState(()=>new Map),[jt,Tt]=w.useState([void 0,void 0]),me=Pe(X=>{Z(X),X!==-1&&te(X)});Mp({id:T,commit:B.commit,value:V,controlRef:le,name:W,getValue:()=>V}),Zp(V,()=>{P(W),j()?B.commit(V):B.commit(V,!0);const X=F.initialValue;let Ce;Array.isArray(V)&&Array.isArray(X)?Ce=!dd(V,X):Ce=V!==X,L(Ce)});const Bt=Pe(X=>{X&&(le.current=X)}),Ye=Array.isArray(V),We=w.useMemo(()=>Ye?V.slice().sort(Td):[_t(V,h,d)],[d,h,Ye,V]),Ve=Pe((X,Ce)=>{if(Number.isNaN(X)||Mh(X,V))return;const ot=Ce??et(Sp,void 0,void 0,{activeThumbIndex:-1});Ae.current=ot.reason;const it=new event.constructor(event.type,event);Object.defineProperty(it,"target",{writable:!0,value:{value:X,name:W}}),ot.event=it,pe.current=X,E(X,ot),!ot.isCanceled&&oe(X)}),zt=Pe((X,Ce,ot)=>{const it=wd(X,Ce,h,d,Ye,We);if(kd(it,_,g)){const gn=Fh(ot);Ve(it,et(gn,ot.nativeEvent,void 0,{activeThumbIndex:Ce})),D(!0);const Yr=pe.current??it;N(Yr,zu(gn,ot.nativeEvent))}});En(()=>{const X=Uu(tn(re.current));K&&X&&re.current?.contains(X)&&X.blur()},[K]),K&&ce!==-1&&me(-1);const tt=w.useMemo(()=>({...M,activeThumbIndex:ce,disabled:K,dragging:Ie,orientation:p,max:d,min:h,minStepsBetweenValues:g,step:_,values:We}),[M,ce,K,Ie,d,h,g,p,_,We]),Un=w.useMemo(()=>({active:ce,controlRef:le,disabled:K,dragging:Ie,validation:B,formatOptionsRef:q,handleInputChange:zt,indicatorPosition:jt,inset:v!=="center",labelId:Y,largeStep:u,lastUsedThumbIndex:ae,lastChangedValueRef:pe,lastChangeReasonRef:Ae,locale:c,max:d,min:h,minStepsBetweenValues:g,name:W,onValueCommitted:N,orientation:p,pressedInputRef:ne,pressedThumbCenterOffsetRef:ie,pressedThumbIndexRef:J,pressedValuesRef:ue,registerFieldControlRef:Bt,renderBeforeHydration:v==="edge",setActive:me,setDragging:ut,setIndicatorPosition:Tt,setValue:Ve,state:tt,step:_,thumbCollisionBehavior:C,thumbMap:Ge,thumbRefs:ee,values:We}),[ce,le,Y,K,Ie,B,q,zt,jt,u,ae,pe,Ae,c,d,h,g,W,N,p,ne,ie,J,ue,Bt,me,ut,Tt,Ve,tt,_,C,v,Ge,ee,We]),de=st("div",e,{state:tt,ref:[t,re],props:[{"aria-labelledby":Y,id:T,role:"group"},B.getValidationProps,S],stateAttributesMapping:Dr});return k.jsx(Nd.Provider,{value:Un,children:k.jsx(qu,{elementsRef:ee,onMapChange:dt,children:de})})});function Ad(n){const e=n.getBoundingClientRect();return{x:(e.left+e.right)/2,y:(e.top+e.bottom)/2}}function Lh(n){if(Math.abs(n)<1){const t=n.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}const e=n.toString().split(".")[1];return e?e.length:0}function Pd(n,e,t){const r=Math.round((n-t)/e)*e+t;return Number(r.toFixed(Lh(e)))}function rl({values:n,index:e,nextValue:t,min:r,max:s,step:o,minStepsBetweenValues:i,initialValues:a}){if(n.length===0)return[];const l=n.slice(),u=o*i,c=l.length-1,f=a??n,d=r+e*u,h=s-(c-e)*u;l[e]=_t(t,d,h);for(let g=e+1;g<=c;g+=1){const m=l[g-1]+u,y=s-(c-g)*u,x=f[g]??l[g];let p=Math.max(l[g],m);x<p&&(p=Math.max(x,m)),l[g]=_t(p,m,y)}for(let g=e-1;g>=0;g-=1){const m=l[g+1]-u,y=r+g*u,x=f[g]??l[g];let p=Math.min(l[g],m);x>p&&(p=Math.min(x,m)),l[g]=_t(p,y,m)}for(let g=0;g<=c;g+=1)l[g]=Number(l[g].toFixed(12));return l}function Dh({behavior:n,values:e,currentValues:t,initialValues:r,pressedIndex:s,nextValue:o,min:i,max:a,step:l,minStepsBetweenValues:u}){const c=t??e,f=r??e;if(!(c.length>1))return{value:o,thumbIndex:0,didSwap:!1};const h=l*u;switch(n){case"swap":{const g=c[s],m=1e-7,y=c.slice(),x=y[s-1],p=y[s+1],_=x!=null?x+h:i,C=p!=null?p-h:a,v=_t(o,_,C),b=Number(v.toFixed(12));y[s]=b;const S=o>g,T=o<g,E=S&&p!=null&&o>=p-m,N=T&&x!=null&&o<=x+m;if(!E&&!N)return{value:y,thumbIndex:s,didSwap:!1};const P=E?s+1:s-1,M=y.map((L,F)=>{if(F===s)return b;const j=f[F];return j??c[F]});let R=o;E?R=Math.max(o,y[P]):R=Math.min(o,y[P]);const I=rl({values:y,index:P,nextValue:R,min:i,max:a,step:l,minStepsBetweenValues:u,initialValues:M}),D=E?P-1:P+1;if(D>=0&&D<I.length){const L=I[D-1],F=I[D+1];let j=L!=null?L+h:i;j=Math.max(j,i+D*h);let B=F!=null?F-h:a;B=Math.min(B,a-(I.length-1-D)*h);const G=_t(b,j,B);I[D]=Number(G.toFixed(12))}return{value:I,thumbIndex:P,didSwap:!0}}case"push":return{value:rl({values:c,index:s,nextValue:o,min:i,max:a,step:l,minStepsBetweenValues:u}),thumbIndex:s,didSwap:!1};case"none":default:{const g=c.slice(),m=g[s-1],y=g[s+1],x=m!=null?m+h:i,p=y!=null?y-h:a,_=_t(o,x,p);return g[s]=Number(_.toFixed(12)),{value:g,thumbIndex:s,didSwap:!1}}}}const jh=2;function Bh(n,e){if(!n)return{start:0,end:0};function t(o){const i=o!=null?parseFloat(o):0;return Number.isNaN(i)?0:i}const r=e?"Top":"InlineStart",s=e?"Bottom":"InlineEnd";return{start:t(n[`border${r}Width`])+t(n[`padding${r}`]),end:t(n[`border${s}Width`])+t(n[`padding${s}`])}}function es(n,e){if(e.current!=null&&n.changedTouches){const t=n;for(let r=0;r<t.changedTouches.length;r+=1){const s=t.changedTouches[r];if(s.identifier===e.current)return{x:s.clientX,y:s.clientY}}return null}return{x:n.clientX,y:n.clientY}}const zh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{disabled:i,dragging:a,validation:l,inset:u,lastChangedValueRef:c,lastChangeReasonRef:f,max:d,min:h,minStepsBetweenValues:g,onValueCommitted:m,orientation:y,pressedInputRef:x,pressedThumbCenterOffsetRef:p,pressedThumbIndexRef:_,pressedValuesRef:C,registerFieldControlRef:v,renderBeforeHydration:b,setActive:S,setDragging:T,setValue:E,state:N,step:P,thumbCollisionBehavior:M,thumbRefs:R,values:I}=Gs(),D=Hs(),L=I.length>1,F=y==="vertical",j=w.useRef(null),B=w.useRef(null),G=Pe(q=>{q&&B.current==null&&B.current==null&&(B.current=getComputedStyle(q))}),Y=w.useRef(null),K=w.useRef(0),W=w.useRef(0),V=Bu(I),oe=Pe(q=>{_.current!==q&&(_.current=q);const ce=R.current[q];if(!ce){p.current=null,x.current=null;return}x.current=ce.querySelector('input[type="range"]')}),re=Pe(q=>{const ce=j.current;if(!ce)return null;const{width:Z,height:ae,bottom:te,left:Ie,right:ut}=ce.getBoundingClientRect(),Ge=Bh(B.current,F),dt=W.current,jt=(F?ae:Z)-Ge.start-Ge.end-dt*2,Tt=p.current??0,me=q.x-Tt,Bt=q.y-Tt,Ye=F?te-Bt-Ge.end:(D==="rtl"?ut-me:me-Ie)-Ge.start,We=_t((Ye-dt)/jt,0,1);let Ve=(d-h)*We+h;if(Ve=Pd(Ve,P,h),Ve=_t(Ve,h,d),!L)return{value:Ve,thumbIndex:0,didSwap:!1};const zt=_.current;if(zt<0)return null;const tt=Dh({behavior:M,values:I,currentValues:V.current??I,initialValues:C.current,pressedIndex:zt,nextValue:Ve,min:h,max:d,step:P,minStepsBetweenValues:g});return M==="swap"&&tt.didSwap?oe(tt.thumbIndex):_.current=tt.thumbIndex,tt}),le=Pe(q=>{C.current=L?I.slice():null,V.current=I;const ce=_.current;let Z=ce;if(ce>-1&&ce<I.length){if(I[ce]===d){let ae=ce;for(;ae>0&&I[ae-1]===d;)ae-=1;Z=ae}}else{const ae=F?"y":"x";let te;Z=-1;for(let Ie=0;Ie<R.current.length;Ie+=1){const ut=R.current[Ie];if(xo(ut)){const Ge=Ad(ut),dt=Math.abs(q[ae]-Ge[ae]);(te===void 0||dt<=te)&&(Z=Ie,te=dt)}}}if(Z>-1&&Z!==ce&&oe(Z),u){const ae=R.current[Z];if(xo(ae)){const te=ae.getBoundingClientRect(),Ie=F?"height":"width";W.current=te[Ie]/2}}}),ee=Pe(q=>{R.current?.[q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),ne=Pe(q=>{const ce=es(q,Y);if(ce==null)return;if(K.current+=1,q.type==="pointermove"&&q.buttons===0){ie(q);return}const Z=re(ce);Z!=null&&kd(Z.value,P,g)&&(!a&&K.current>jh&&T(!0),E(Z.value,et(Tp,q,void 0,{activeThumbIndex:Z.thumbIndex})),V.current=Array.isArray(Z.value)?Z.value:[Z.value],Z.didSwap&&ee(Z.thumbIndex))});function ie(q){S(-1),T(!1),x.current=null,p.current=null,_.current=-1;const ce=es(q,Y),Z=ce!=null?re(ce):null;if(Z!=null){const ae=f.current;l.commit(c.current??Z.value),m(c.current??Z.value,zu(ae,q))}"pointerType"in q&&j.current?.hasPointerCapture(q.pointerId)&&j.current?.releasePointerCapture(q.pointerId),Y.current=null,C.current=null,ue()}const J=Pe(q=>{if(i)return;const ce=q.changedTouches[0];ce!=null&&(Y.current=ce.identifier);const Z=es(q,Y);if(Z!=null){le(Z);const te=re(Z);if(te==null)return;ee(te.thumbIndex),E(te.value,et(qa,q,void 0,{activeThumbIndex:te.thumbIndex})),V.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&ee(te.thumbIndex)}K.current=0;const ae=tn(j.current);ae.addEventListener("touchmove",ne,{passive:!0}),ae.addEventListener("touchend",ie,{passive:!0})}),ue=Pe(()=>{const q=tn(j.current);q.removeEventListener("pointermove",ne),q.removeEventListener("pointerup",ie),q.removeEventListener("touchmove",ne),q.removeEventListener("touchend",ie),C.current=null}),pe=Pu();return w.useEffect(()=>{const q=j.current;return q?(q.addEventListener("touchstart",J,{passive:!0}),()=>{q.removeEventListener("touchstart",J),pe.cancel(),ue()}):()=>ue()},[ue,J,j,pe]),w.useEffect(()=>{i&&ue()},[i,ue]),st("div",e,{state:N,ref:[t,v,j,G],props:[{"data-base-ui-slider-control":b?"":void 0,onPointerDown(q){const ce=j.current;if(!ce||i||q.defaultPrevented||!xo(q.target)||q.button!==0)return;const Z=es(q,Y);if(Z!=null){le(Z);const te=re(Z);if(te==null)return;Er(R.current[te.thumbIndex],Uu(tn(ce)))?q.preventDefault():pe.request(()=>{ee(te.thumbIndex)}),T(!0),p.current!=null||(E(te.value,et(qa,q.nativeEvent,void 0,{activeThumbIndex:te.thumbIndex})),V.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&ee(te.thumbIndex))}q.nativeEvent.pointerId&&ce.setPointerCapture(q.nativeEvent.pointerId),K.current=0;const ae=tn(j.current);ae.addEventListener("pointermove",ne,{passive:!0}),ae.addEventListener("pointerup",ie,{once:!0})},tabIndex:-1},o],stateAttributesMapping:Dr})}),Uh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{state:i}=Gs();return st("div",e,{state:i,ref:t,props:[{style:{position:"relative"}},o],stateAttributesMapping:Dr})});let Kh=(function(n){return n.index="data-index",n.dragging="data-dragging",n.orientation="data-orientation",n.disabled="data-disabled",n.readonly="data-readonly",n.required="data-required",n.valid="data-valid",n.invalid="data-invalid",n.touched="data-touched",n.dirty="data-dirty",n.focused="data-focused",n})({});const Wh='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Id="PageUp",Rd="PageDown",Vh=new Set([ad,od,sd,id,nd,rd,Id,Rd]);function Hh(n,e,t,r){if(!(e<0))return n.length===2?e===0?`${fs(n[e],r,t)} start range`:`${fs(n[e],r,t)} end range`:t?fs(n[e],r,t):void 0}function Kn(n,e,t,r,s){return t===1?Math.min(n+e,s):Math.max(n-e,r)}const qh=w.forwardRef(function(e,t){const{render:r,children:s,className:o,"aria-describedby":i,"aria-label":a,"aria-labelledby":l,disabled:u=!1,getAriaLabel:c,getAriaValueText:f,id:d,index:h,inputRef:g,onBlur:m,onFocus:y,onKeyDown:x,tabIndex:p,..._}=e,C=Cn(d),{active:v,lastUsedThumbIndex:b,controlRef:S,disabled:T,validation:E,formatOptionsRef:N,handleInputChange:P,inset:M,labelId:R,largeStep:I,locale:D,max:L,min:F,minStepsBetweenValues:j,name:B,orientation:G,pressedInputRef:Y,pressedThumbCenterOffsetRef:K,pressedThumbIndexRef:W,renderBeforeHydration:V,setActive:oe,setIndicatorPosition:re,state:le,step:ee,values:ne}=Gs(),ie=Hs(),J=u||T,ue=ne.length>1,pe=G==="vertical",Ae=ie==="rtl",{setTouched:q,setFocused:ce,validationMode:Z}=Ju(),ae=w.useRef(null),te=w.useRef(null),Ie=Cn(),ut=$p(),Ge=ue?Ie:ut,dt=w.useMemo(()=>({inputId:Ge}),[Ge]),{ref:jt,index:Tt}=qs({metadata:dt}),me=ue?h??Tt:0,Bt=me===ne.length-1,Ye=ne[me],We=Yo(Ye,F,L),[Ve,zt]=w.useState(!1),[tt,Un]=w.useState();qi(()=>zt(!0));const de=b>=0&&b<ne.length?b:-1,X=Pe(()=>{const Ee=S.current,Se=ae.current;if(!Ee||!Se)return;const Re=Se.getBoundingClientRect(),Zr=Ee.getBoundingClientRect(),Xr=pe?"height":"width",sp=Zr[Xr]-Re[Xr],_o=(Re[Xr]/2+sp*We/100)/Zr[Xr]*100;Un(_o),me===0?re(vo=>[_o,vo[1]]):Bt&&re(vo=>[vo[0],_o])});En(()=>{M&&queueMicrotask(X)},[X,M]),En(()=>{M&&X()},[X,M,We]);const Ce=w.useCallback(()=>{const Ee=pe?"bottom":"insetInlineStart",Se=pe?"left":"top";let Re;return ue?v===me?Re=2:de===me&&(Re=1):v===me&&(Re=1),M?{"--position":`${tt}%`,visibility:V&&!Ve||tt===void 0?"hidden":void 0,position:"absolute",[Ee]:"var(--position)",[Se]:"50%",translate:`${(pe||!Ae?-1:1)*50}% ${(pe?1:-1)*50}%`,zIndex:Re}:Number.isFinite(We)?{position:"absolute",[Ee]:`${We}%`,[Se]:"50%",translate:`${(pe||!Ae?-1:1)*50}% ${(pe?1:-1)*50}%`,zIndex:Re}:Ja},[v,me,M,Ve,tt,ue,V,Ae,de,We,pe]);let ot;G==="vertical"&&(ot=Ae?"vertical-rl":"vertical-lr");const it=xs({"aria-label":typeof c=="function"?c(me):a,"aria-labelledby":l??R,"aria-describedby":i,"aria-orientation":G,"aria-valuenow":Ye,"aria-valuetext":typeof f=="function"?f(fs(Ye,D,N.current??void 0),Ye,me):Hh(ne,me,N.current??void 0,D),disabled:J,id:Ge,max:L,min:F,name:B,onChange(Ee){P(Ee.target.valueAsNumber,me,Ee)},onFocus(){oe(me),ce(!0)},onBlur(){ae.current&&(oe(-1),q(!0),ce(!1),Z==="onBlur"&&E.commit(wd(Ye,me,F,L,ue,ne)))},onKeyDown(Ee){if(!Vh.has(Ee.key))return;Zi.has(Ee.key)&&Ee.stopPropagation();let Se=null;const Re=Pd(Ye,ee,F);switch(Ee.key){case ad:Se=Kn(Re,Ee.shiftKey?I:ee,1,F,L);break;case id:Se=Kn(Re,Ee.shiftKey?I:ee,Ae?-1:1,F,L);break;case od:Se=Kn(Re,Ee.shiftKey?I:ee,-1,F,L);break;case sd:Se=Kn(Re,Ee.shiftKey?I:ee,Ae?1:-1,F,L);break;case Id:Se=Kn(Re,I,1,F,L);break;case Rd:Se=Kn(Re,I,-1,F,L);break;case rd:Se=L,ue&&(Se=Number.isFinite(ne[me+1])?ne[me+1]-ee*j:L);break;case nd:Se=F,ue&&(Se=Number.isFinite(ne[me-1])?ne[me-1]+ee*j:F);break}Se!==null&&(P(Se,me,Ee),Ee.preventDefault())},step:ee,style:{...Ja,width:"100%",height:"100%",writingMode:ot},tabIndex:p??void 0,type:"range",value:Ye??""},E.getInputValidationProps),gn=zi(te,E.inputRef,g);return st("div",e,{state:le,ref:[t,jt,ae],props:[{[Kh.index]:me,children:k.jsxs(w.Fragment,{children:[s,k.jsx("input",{ref:gn,...it}),M&&!Ve&&V&&Bt&&k.jsx("script",{dangerouslySetInnerHTML:{__html:Wh},suppressHydrationWarning:!0})]}),id:C,onBlur:m,onFocus:y,onPointerDown(Ee){if(W.current=me,ae.current!=null){const Se=G==="horizontal"?"x":"y",Re=Ad(ae.current),Zr=(G==="horizontal"?Ee.clientX:Ee.clientY)-Re[Se];K.current=Zr}te.current!=null&&Y.current!==te.current&&(Y.current=te.current)},style:Ce(),suppressHydrationWarning:V||void 0,tabIndex:-1},_],stateAttributesMapping:Dr})});function Jh(n,e,t,r,s,o){const i=t===void 0||e&&r===void 0?"hidden":void 0,a=n?"bottom":"insetInlineStart",l=n?"height":"width",c={visibility:s&&!o?"hidden":i,position:n?"absolute":"relative",[n?"width":"height"]:"inherit"};return c["--start-position"]=`${t??0}%`,e?(c["--relative-size"]=`${(r??0)-(t??0)}%`,c[a]="var(--start-position)",c[l]="var(--relative-size)",c):(c[a]=0,c[l]="var(--start-position)",c)}function Gh(n,e,t,r){const s=n?"bottom":"insetInlineStart",o=n?"height":"width",a={position:n?"absolute":"relative",[n?"width":"height"]:"inherit"};if(!e)return a[s]=0,a[o]=`${t}%`,a;const l=r-t;return a[s]=`${t}%`,a[o]=`${l}%`,a}const Yh=w.forwardRef(function(e,t){const{render:r,className:s,...o}=e,{indicatorPosition:i,inset:a,max:l,min:u,orientation:c,renderBeforeHydration:f,state:d,values:h}=Gs(),[g,m]=w.useState(!1);qi(()=>m(!0));const y=c==="vertical",x=h.length>1,p=a?Jh(y,x,i[0],i[1],f,g):Gh(y,x,Yo(h[0],u,l),Yo(h[h.length-1],u,l));return st("div",e,{state:d,ref:t,props:[{"data-base-ui-slider-indicator":f?"":void 0,style:p,suppressHydrationWarning:f||void 0},o],stateAttributesMapping:Dr})});const Zh=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],Xh=Ku("brain-circuit",Zh);const Qh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Od=Ku("chevron-down",Qh);var em="_1ffqjcq4",tm="_1ffqjcq5";function Fd(n){const e=De.c(9),{children:t,open:r,defaultOpen:s,onOpenChange:o,modal:i,preventCloseOnNestedPortals:a}=n,l=i===void 0?!1:i,u=a===void 0?!0:a;let c;e[0]!==o||e[1]!==u?(c=(h,g)=>{if(!h&&u&&g.reason==="outside-press"&&g.event){const m=g.event.target;if(m?.closest("[data-open]")||m?.closest('[role="listbox"]')||m?.closest('[role="option"]')){g.cancel?.();return}}o?.(h)},e[0]=o,e[1]=u,e[2]=c):c=e[2];const f=c;let d;return e[3]!==t||e[4]!==s||e[5]!==f||e[6]!==l||e[7]!==r?(d=k.jsx(Th,{open:r,defaultOpen:s,onOpenChange:f,modal:l,children:t}),e[3]=t,e[4]=s,e[5]=f,e[6]=l,e[7]=r,e[8]=d):d=e[8],d}function Md(n){const e=De.c(6),{children:t,className:r,asChild:s}=n;if(s&&w.isValidElement(t)){let i;return e[0]!==t||e[1]!==r?(i=k.jsx(nl,{render:t,className:r,children:t}),e[0]=t,e[1]=r,e[2]=i):i=e[2],i}let o;return e[3]!==t||e[4]!==r?(o=k.jsx(nl,{className:r,children:t}),e[3]=t,e[4]=r,e[5]=o):o=e[5],o}function $d(n){const e=De.c(11),{children:t,className:r,sideOffset:s,align:o,side:i,positionMethod:a}=n,l=s===void 0?8:s,u=o===void 0?"center":o,c=i===void 0?"bottom":i,f=a===void 0?"absolute":a;let d;e[0]!==r?(d=Wu(tm,r),e[0]=r,e[1]=d):d=e[1];let h;e[2]!==t||e[3]!==d?(h=k.jsx(Rh,{className:d,children:t}),e[2]=t,e[3]=d,e[4]=h):h=e[4];let g;return e[5]!==u||e[6]!==f||e[7]!==c||e[8]!==l||e[9]!==h?(g=k.jsx(Nh,{children:k.jsx(Ph,{className:em,sideOffset:l,align:u,side:c,positionMethod:f,children:h})}),e[5]=u,e[6]=f,e[7]=c,e[8]=l,e[9]=h,e[10]=g):g=e[10],g}var nm="vpj4en0",rm="vpj4en1",sm="vpj4en2",om="vpj4en3",im="vpj4en4",am="vpj4en5",lm="vpj4en6";function ts(n){const e=De.c(25),{label:t,value:r,defaultValue:s,min:o,max:i,step:a,onValueChange:l,onValueCommitted:u,disabled:c,className:f,showValue:d,formatValue:h}=n,g=o===void 0?0:o,m=i===void 0?100:i,y=a===void 0?1:a,x=c===void 0?!1:c,p=d===void 0?!0:d;let _;e[0]!==l?(_=I=>{typeof I=="number"?l?.(I):Array.isArray(I)&&l?.(I[0])},e[0]=l,e[1]=_):_=e[1];const C=_;let v;e[2]!==u?(v=I=>{typeof I=="number"?u?.(I):Array.isArray(I)&&u?.(I[0])},e[2]=u,e[3]=v):v=e[3];const b=v,S=r??s??g;let T;e[4]!==S||e[5]!==h?(T=h?h(S):String(S),e[4]=S,e[5]=h,e[6]=T):T=e[6];const E=T;let N;e[7]!==f?(N=Wu(nm,f),e[7]=f,e[8]=N):N=e[8];let P;e[9]!==E||e[10]!==t||e[11]!==p?(P=(t||p)&&k.jsxs("div",{className:rm,children:[t&&k.jsx("span",{children:t}),p&&k.jsx("span",{className:sm,children:E})]}),e[9]=E,e[10]=t,e[11]=p,e[12]=P):P=e[12];let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=k.jsx(zh,{className:om,children:k.jsxs(Uh,{className:im,children:[k.jsx(Yh,{className:am}),k.jsx(qh,{className:lm})]})}),e[13]=M):M=e[13];let R;return e[14]!==s||e[15]!==x||e[16]!==C||e[17]!==b||e[18]!==m||e[19]!==g||e[20]!==y||e[21]!==P||e[22]!==N||e[23]!==r?(R=k.jsxs($h,{value:r,defaultValue:s,min:g,max:m,step:y,onValueChange:C,onValueCommitted:b,disabled:x,className:N,children:[P,M]}),e[14]=s,e[15]=x,e[16]=C,e[17]=b,e[18]=m,e[19]=g,e[20]=y,e[21]=P,e[22]=N,e[23]=r,e[24]=R):R=e[24],R}var cm="_7ucatj0",um="_7ucatj1",dm="_7ucatj2",sl="_7ucatj3",ol="_7ucatj4",il="_7ucatj5",al="_7ucatj6",ll="_7ucatj7",cl="_7ucatj8",ul="_7ucatj9",dl="_7ucatja",fm="_7ucatjb",gm="_7ucatjc",pm="_7ucatjd",hm="_7ucatje",mm="_7ucatjf",ym="_7ucatjg",_m="_7ucatjh",vm="_7ucatji";function xm(n){const e=De.c(69),{isNewVariant:t,onSave:r,isSaving:s}=n,o=s===void 0?!1:s,[i,a]=w.useState(!1),[l,u]=w.useState(t?"new_variant":"new_version"),[c,f]=w.useState(!1),[d,h]=w.useState(null),{data:g}=nh();let m;e[0]!==g?(m=g===void 0?[]:g,e[0]=g,e[1]=m):m=e[1];const y=m;let x;e[2]!==c||e[3]!==l||e[4]!==r||e[5]!==d?.id?(x=()=>{r({mode:l,deployToEnvironment:c,environmentId:c?d?.id??null:null}),a(!1)},e[2]=c,e[3]=l,e[4]=r,e[5]=d?.id,e[6]=x):x=e[6];const p=x;let _;e[7]!==t?(_=q=>{a(q),q&&(u(t?"new_variant":"new_version"),f(!1),h(null))},e[7]=t,e[8]=_):_=e[8];const C=_;let v;e[9]===Symbol.for("react.memo_cache_sentinel")?(v=k.jsx(Vu,{icon:Lp,size:"xs"}),e[9]=v):v=e[9];const b=o?"Saving...":"Save";let S;e[10]!==o||e[11]!==b?(S=k.jsx(Md,{asChild:!0,children:k.jsxs(bo,{variant:"primary",size:"default",type:"button",disabled:o,children:[v,b]})}),e[10]=o,e[11]=b,e[12]=S):S=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=k.jsx("div",{className:um,children:"Save Options"}),e[13]=T):T=e[13];const E=`${sl} ${l==="new_variant"?ol:""}`;let N,P;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=()=>u("new_variant"),P=q=>q.key==="Enter"&&u("new_variant"),e[14]=N,e[15]=P):(N=e[14],P=e[15]);const M=l==="new_variant",R=`${il} ${l==="new_variant"?al:""}`;let I;e[16]!==l?(I=l==="new_variant"&&k.jsx("div",{className:ll}),e[16]=l,e[17]=I):I=e[17];let D;e[18]!==R||e[19]!==I?(D=k.jsx("div",{className:R,children:I}),e[18]=R,e[19]=I,e[20]=D):D=e[20];let L;e[21]===Symbol.for("react.memo_cache_sentinel")?(L=k.jsxs("div",{className:cl,children:[k.jsx("span",{className:ul,children:"Save as new variant"}),k.jsx("span",{className:dl,children:"Creates a new variant with version 1"})]}),e[21]=L):L=e[21];let F;e[22]!==E||e[23]!==M||e[24]!==D?(F=k.jsxs("div",{className:E,onClick:N,onKeyDown:P,role:"radio","aria-checked":M,tabIndex:0,children:[D,L]}),e[22]=E,e[23]=M,e[24]=D,e[25]=F):F=e[25];let j;e[26]!==t||e[27]!==l?(j=!t&&k.jsxs("div",{className:`${sl} ${l==="new_version"?ol:""}`,onClick:()=>u("new_version"),onKeyDown:q=>q.key==="Enter"&&u("new_version"),role:"radio","aria-checked":l==="new_version",tabIndex:0,children:[k.jsx("div",{className:`${il} ${l==="new_version"?al:""}`,children:l==="new_version"&&k.jsx("div",{className:ll})}),k.jsxs("div",{className:cl,children:[k.jsx("span",{className:ul,children:"Update as new version"}),k.jsx("span",{className:dl,children:"Creates a new version of this variant"})]})]}),e[26]=t,e[27]=l,e[28]=j):j=e[28];let B;e[29]!==F||e[30]!==j?(B=k.jsxs("div",{className:dm,children:[F,j]}),e[29]=F,e[30]=j,e[31]=B):B=e[31];const G=`${pm} ${c?hm:""}`;let Y,K;e[32]!==c?(Y=()=>f(!c),K=q=>q.key==="Enter"&&f(!c),e[32]=c,e[33]=Y,e[34]=K):(Y=e[33],K=e[34]);let W;e[35]!==c?(W=c&&k.jsx(cd,{className:mm}),e[35]=c,e[36]=W):W=e[36];let V;e[37]!==c||e[38]!==G||e[39]!==Y||e[40]!==K||e[41]!==W?(V=k.jsx("div",{className:G,onClick:Y,onKeyDown:K,role:"checkbox","aria-checked":c,tabIndex:0,children:W}),e[37]=c,e[38]=G,e[39]=Y,e[40]=K,e[41]=W,e[42]=V):V=e[42];let oe;e[43]!==c?(oe=k.jsx("span",{className:ym,onClick:()=>f(!c),children:"Deploy to environment"}),e[43]=c,e[44]=oe):oe=e[44];let re;e[45]!==V||e[46]!==oe?(re=k.jsxs("div",{className:gm,children:[V,oe]}),e[45]=V,e[46]=oe,e[47]=re):re=e[47];let le;e[48]!==c||e[49]!==y||e[50]!==d?(le=c&&k.jsx("div",{className:_m,children:k.jsx(Gi,{items:y,value:d,onValueChange:h,itemToString:bm,placeholder:"Select environment"})}),e[48]=c,e[49]=y,e[50]=d,e[51]=le):le=e[51];let ee;e[52]!==re||e[53]!==le?(ee=k.jsxs("div",{className:fm,children:[re,le]}),e[52]=re,e[53]=le,e[54]=ee):ee=e[54];let ne;e[55]===Symbol.for("react.memo_cache_sentinel")?(ne=k.jsx(bo,{variant:"ghost",scheme:"gray",size:"sm",type:"button",onClick:()=>a(!1),children:"Cancel"}),e[55]=ne):ne=e[55];const ie=o||c&&!d,J=o?"Saving...":"Confirm";let ue;e[56]!==p||e[57]!==ie||e[58]!==J?(ue=k.jsxs("div",{className:vm,children:[ne,k.jsx(bo,{variant:"primary",size:"sm",type:"button",onClick:p,disabled:ie,children:J})]}),e[56]=p,e[57]=ie,e[58]=J,e[59]=ue):ue=e[59];let pe;e[60]!==B||e[61]!==ee||e[62]!==ue?(pe=k.jsx($d,{side:"bottom",align:"end",sideOffset:4,children:k.jsxs("div",{className:cm,children:[T,B,ee,ue]})}),e[60]=B,e[61]=ee,e[62]=ue,e[63]=pe):pe=e[63];let Ae;return e[64]!==C||e[65]!==i||e[66]!==pe||e[67]!==S?(Ae=k.jsxs(Fd,{open:i,onOpenChange:C,children:[S,pe]}),e[64]=C,e[65]=i,e[66]=pe,e[67]=S,e[68]=Ae):Ae=e[68],Ae}function bm(n){return n?.name||""}const Ld=w.createContext(null);function Sm(n,e){return{getTheme:function(){return e??null}}}function Je(){const n=w.useContext(Ld);return n==null&&(function(e,...t){const r=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",e);for(const o of t)s.append("v",o);throw r.search=s.toString(),Error(`Minified Lexical error #${e}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(8),n}function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const s of e)r.append("v",s);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Dd(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const s of e)r.append("v",s);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Ct=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Cm=Ct&&"documentMode"in document?document.documentMode:null,yt=Ct&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Tn=Ct&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Es=!(!Ct||!("InputEvent"in window)||Cm)&&"getTargetRanges"in new window.InputEvent("input"),jr=Ct&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),cr=Ct&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Em=Ct&&/Android/.test(navigator.userAgent),jd=Ct&&/^(?=.*Chrome).*/i.test(navigator.userAgent),fl=Ct&&Em&&jd,Br=Ct&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&yt&&!jd;function Bd(...n){const e=[];for(const t of n)if(t&&typeof t=="string")for(const[r]of t.matchAll(/\S+/g))e.push(r);return e}const Tm=0,wm=1,km=2,zd=128,Nm=1,Am=2,Pm=3,Im=4,Rm=5,Om=6,Ys=jr||cr||Br?" ":"",ln=`
|
|
2
2
|
|
|
3
3
|
`,Fm=Tn?" ":Ys,wn={bold:1,capitalize:1024,code:16,highlight:zd,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Mm={directionless:1,unmergeable:2},gl={center:2,end:6,justify:4,left:1,right:3,start:5},$m={[Am]:"center",[Om]:"end",[Im]:"justify",[Nm]:"left",[Pm]:"right",[Rm]:"start"},Lm={normal:0,segmented:2,token:1},Dm={[Tm]:"normal",[km]:"segmented",[wm]:"token"},pl="$config";function Ud(n,e,t,r,s,o){let i=n.getFirstChild();for(;i!==null;){const a=i.__key;i.__parent===e&&(A(i)&&Ud(i,a,t,r,s,o),t.has(a)||o.delete(a),s.push(a)),i=i.getNextSibling()}}let Zo=!1,na=0;function jm(n){na=n.timeStamp}function So(n,e,t){const r=n.nodeName==="BR",s=e.__lexicalLineBreak;return s&&(n===s||r&&n.previousSibling===s)||r&&io(n,t)!==void 0}function Bm(n,e,t){const r=Et(ht(t));let s=null,o=null;r!==null&&r.anchorNode===n&&(s=r.anchorOffset,o=r.focusOffset);const i=n.nodeValue;i!==null&&Ea(e,i,s,o,!1)}function zm(n,e,t){if(O(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return Xt(e)&&t.isAttached()}function Um(n,e,t,r){for(let s=n;s&&!Wy(s);s=Vr(s)){const o=io(s,e);if(o!==void 0){const i=Oe(o,t);if(i)return he(i)||!Ne(s)?void 0:[s,i]}else if(s===r)return[r,qf(t)]}}function Kd(n,e,t){Zo=!0;const r=performance.now()-na>100;try{Rt(n,()=>{const s=U()||(function(d){return d.getEditorState().read(()=>{const h=U();return h!==null?h.clone():null})})(n),o=new Map,i=n.getRootElement(),a=n._editorState,l=n._blockCursorElement;let u=!1,c="";for(let d=0;d<e.length;d++){const h=e[d],g=h.type,m=h.target,y=Um(m,n,a,i);if(!y)continue;const[x,p]=y;if(g==="characterData")r&&z(p)&&Xt(m)&&zm(s,m,p)&&Bm(m,p,n);else if(g==="childList"){u=!0;const _=h.addedNodes;for(let b=0;b<_.length;b++){const S=_[b],T=Vf(S),E=S.parentNode;if(E!=null&&S!==l&&T===null&&!So(S,E,n)){if(Tn){const N=(Ne(S)?S.innerText:null)||S.nodeValue;N&&(c+=N)}E.removeChild(S)}}const C=h.removedNodes,v=C.length;if(v>0){let b=0;for(let S=0;S<v;S++){const T=C[S];(So(T,m,n)||l===T)&&(m.appendChild(T),b++)}v!==b&&o.set(x,p)}}}if(o.size>0)for(const[d,h]of o)h.reconcileObservedMutation(d,n);const f=t.takeRecords();if(f.length>0){for(let d=0;d<f.length;d++){const h=f[d],g=h.addedNodes,m=h.target;for(let y=0;y<g.length;y++){const x=g[y],p=x.parentNode;p==null||x.nodeName!=="BR"||So(x,m,n)||p.removeChild(x)}}t.takeRecords()}s!==null&&(u&&Ke(s),Tn&&Zf(n)&&s.insertRawText(c))})}finally{Zo=!1}}function Wd(n){const e=n._observer;e!==null&&Kd(n,e.takeRecords(),e)}function Vd(n){(function(e){na===0&&ht(e).addEventListener("textInput",jm,!0)})(n),n._observer=new MutationObserver((e,t)=>{Kd(n,e,t)})}let Km=class{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||qm).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}};function Wm(n,e){return new Km(n,e)}function Hd(n,e,t="latest"){const r=(t==="latest"?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Co(n,e,t){let r;if(je(),typeof t=="function"){const o=n.getLatest(),i=Hd(o,e);if(r=t(i),e.isEqual(i,r))return o}else r=t;const s=n.getWritable();return Jd(s).updateFromKnown(e,r),s}function Vm(n){const e=new Map,t=new Set;for(let r=typeof n=="function"?n:n.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:s}=co(r);if(s&&s.stateConfigs)for(const o of s.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&t.add(i.key)):i=o,e.set(i.key,i)}}return{flatKeys:t,sharedConfigMap:e}}let Hm=class qd{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,s=new Map,o=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=s;const{sharedConfigMap:i}=this.sharedNodeState,a=o!==void 0?o:(function(l,u,c){let f=c.size;if(u)for(const d in u){const h=l.get(d);h&&c.has(h)||f++}return f})(i,r,s);this.size=a}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const s=this.unknownState[e.key];s!==void 0&&(r=e.parse(s)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,s]of this.knownState)r.isEqual(s,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(s);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return hl(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,s=new Map(this.knownState);return new qd(e,t,(function(o,i,a){let l;if(a)for(const[u,c]of Object.entries(a)){const f=o.get(u);f?i.has(f)||i.set(f,f.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,s,r),s,this.size)}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:s,unknownState:o}=this;s.has(e)||o&&r in o||(o&&(delete o[r],this.unknownState=hl(o)),this.size++),s.set(e,t)}updateFromUnknown(e,t){const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,s]of Object.entries(e))this.updateFromUnknown(r,s)}};function Jd(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Hm(e,Gd(e));return e.__state=t,t}function Gd(n){return n.__state?n.__state.sharedNodeState:Bf(lo(),n.getType()).sharedNodeState}function hl(n){if(n)for(const e in n)return n}function qm(n){return n}function ml(n,e,t){for(const[r,s]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const o=t?t.getValue(r):r.defaultValue;if(o!==s&&!r.isEqual(o,s))return!0}return!1}function yl(n,e,t){const{unknownState:r}=e,s=t?t.unknownState:void 0;if(r){for(const[o,i]of Object.entries(r))if(!n.has(o)&&(n.add(o),i!==(s?s[o]:void 0)))return!0}return!1}function _l(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function vl(n,e){const t=n.__mode,r=n.__format,s=n.__style,o=e.__mode,i=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===o)&&(r===null||r===i)&&(s===null||s===a)&&(n.__state===null||l===u||(function(c,f){if(c===f)return!0;if(c&&f&&c.size!==f.size)return!1;const d=new Set;return!(c&&ml(d,c,f)||f&&ml(d,f,c)||c&&yl(d,c,f)||f&&yl(d,f,c))})(l,u))}function xl(n,e){const t=n.mergeWithSibling(e),r=xe()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function bl(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&z(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(vl(e,r)){r=xl(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&z(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(vl(r,t)){r=xl(r,t);break}break}t.remove()}}else r.remove()}function kn(n){return Sl(n.anchor),Sl(n.focus),n}function Sl(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,s;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),s=!0):(r=e.getChildAtIndex(t),s=!1),z(r)){n.set(r.__key,s?r.getTextContentSize():0,"text",!0);break}if(!A(r))break;n.set(r.__key,s?r.getChildrenSize():0,"element",!0)}}let Nn,He,Ar,Zs,Xo,Qo,An,vt,ei,Pr,$e="",wt=null,hn=null,Ht="",Jn=!1,Ts=!1;function ws(n,e){const t=An.get(n);if(e!==null){const r=si(n);r.parentNode===e&&e.removeChild(r)}if(vt.has(n)||He._keyToDOMMap.delete(n),A(t)){const r=Ns(t,An);ti(r,0,r.length-1,null)}t!==void 0&&Ta(Pr,Ar,Zs,t,"destroyed")}function ti(n,e,t,r){let s=e;for(;s<=t;++s){const o=n[s];o!==void 0&&ws(o,r)}}function pn(n,e){n.setProperty("text-align",e)}const Jm="40px";function Yd(n,e){const t=Nn.theme.indent;if(typeof t=="string"){const s=n.classList.contains(t);e>0&&!s?n.classList.add(t):e<1&&s&&n.classList.remove(t)}const r=getComputedStyle(n).getPropertyValue("--lexical-indent-base-value")||Jm;n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * ${r})`)}function Zd(n,e){const t=n.style;e===0?pn(t,""):e===1?pn(t,"left"):e===2?pn(t,"center"):e===3?pn(t,"right"):e===4?pn(t,"justify"):e===5?pn(t,"start"):e===6&&pn(t,"end")}function ni(n,e){const t=(function(r){const s=r.__dir;if(s!==null)return s;if(Le(r))return null;const o=r.getParentOrThrow();return Le(o)&&o.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function ks(n,e){const t=vt.get(n);t===void 0&&$(60);const r=t.createDOM(Nn,He);if((function(s,o,i){const a=i._keyToDOMMap;(function(l,u,c){const f=`__lexicalKey_${u._key}`;l[f]=c})(o,i,s),a.set(s,o)})(n,r,He),z(t)?r.setAttribute("data-lexical-text","true"):he(t)&&r.setAttribute("data-lexical-decorator","true"),A(t)){const s=t.__indent,o=t.__size;if(ni(r,t),s!==0&&Yd(r,s),o!==0){const a=o-1;ri(Ns(t,vt),t,0,a,t.getDOMSlot(r))}const i=t.__format;i!==0&&Zd(r,i),t.isInline()||Xd(null,t,r),ao(t)&&($e+=ln,Ht+=ln)}else{const s=t.getTextContent();if(he(t)){const o=t.decorate(He,Nn);o!==null&&Qd(n,o),r.contentEditable="false"}$e+=s,Ht+=s}return e!==null&&e.insertChild(r),Ta(Pr,Ar,Zs,t,"created"),r}function ri(n,e,t,r,s){const o=$e;$e="";let i=t;for(;i<=r;++i){ks(n[i],s);const a=vt.get(n[i]);a!==null&&z(a)&&wt===null&&(wt=a.getFormat(),hn=a.getStyle())}ao(e)&&($e+=ln),s.element.__lexicalTextContent=$e,$e=o+$e}function Cl(n,e){if(n){const t=n.__last;if(t){const r=e.get(t);if(r)return It(r)?"line-break":he(r)&&r.isInline()?"decorator":null}return"empty"}return null}function Xd(n,e,t){const r=Cl(n,An),s=Cl(e,vt);r!==s&&e.getDOMSlot(t).setManagedLineBreak(s)}function Gm(n,e,t){var r;wt=null,hn=null,(function(s,o,i){const a=$e,l=s.__size,u=o.__size;$e="";const c=i.element;if(l===1&&u===1){const f=s.__first,d=o.__first;if(f===d)xr(f,c);else{const g=si(f),m=ks(d,null);try{c.replaceChild(m,g)}catch(y){if(typeof y=="object"&&y!=null){const x=`${y.toString()} Parent: ${c.tagName}, new child: {tag: ${m.tagName} key: ${d}}, old child: {tag: ${g.tagName}, key: ${f}}.`;throw new Error(x)}throw y}ws(f,null)}const h=vt.get(d);z(h)&&wt===null&&(wt=h.getFormat(),hn=h.getStyle())}else{const f=Ns(s,An),d=Ns(o,vt);if(f.length!==l&&$(227),d.length!==u&&$(228),l===0)u!==0&&ri(d,o,0,u-1,i);else if(u===0){if(l!==0){const h=i.after==null&&i.before==null&&i.element.__lexicalLineBreak==null;ti(f,0,l-1,h?null:c),h&&(c.textContent="")}}else(function(h,g,m,y,x,p){const _=y-1,C=x-1;let v,b,S=p.getFirstChild(),T=0,E=0;for(;T<=_&&E<=C;){const M=g[T],R=m[E];if(M===R)S=Eo(xr(R,p.element)),T++,E++;else{v===void 0&&(v=new Set(g)),b===void 0&&(b=new Set(m));const D=b.has(M),L=v.has(R);if(D)if(L){const F=Pn(He,R);F===S?S=Eo(xr(R,p.element)):(p.withBefore(S).insertChild(F),xr(R,p.element)),T++,E++}else ks(R,p.withBefore(S)),E++;else S=Eo(si(M)),ws(M,p.element),T++}const I=vt.get(R);I!==null&&z(I)&&wt===null&&(wt=I.getFormat(),hn=I.getStyle())}const N=T>_,P=E>C;if(N&&!P){const M=m[C+1],R=M===void 0?null:He.getElementByKey(M);ri(m,h,E,C,p.withBefore(R))}else P&&!N&&ti(g,T,_,p.element)})(o,f,d,l,u,i)}ao(o)&&($e+=ln),c.__lexicalTextContent=$e,$e=a+$e})(n,e,e.getDOMSlot(t)),r=e,wt==null||wt===r.__textFormat||Ts||r.setTextFormat(wt),(function(s){hn==null||hn===s.__textStyle||Ts||s.setTextStyle(hn)})(e)}function Ns(n,e){const t=[];let r=n.__first;for(;r!==null;){const s=e.get(r);s===void 0&&$(101),t.push(r),r=s.__next}return t}function xr(n,e){const t=An.get(n);let r=vt.get(n);t!==void 0&&r!==void 0||$(61);const s=Jn||Qo.has(n)||Xo.has(n),o=Pn(He,n);if(t===r&&!s){if(A(t)){const i=o.__lexicalTextContent;i!==void 0&&($e+=i,Ht+=i)}else{const i=t.getTextContent();Ht+=i,$e+=i}return o}if(t!==r&&s&&Ta(Pr,Ar,Zs,r,"updated"),r.updateDOM(t,o,Nn)){const i=ks(n,null);return e===null&&$(62),e.replaceChild(i,o),ws(n,null),i}if(A(t)&&A(r)){const i=r.__indent;(Jn||i!==t.__indent)&&Yd(o,i);const a=r.__format;if((Jn||a!==t.__format)&&Zd(o,a),s&&(Gm(t,r,o),Le(r)||r.isInline()||Xd(t,r,o)),ao(r)&&($e+=ln,Ht+=ln),(Jn||r.__dir!==t.__dir)&&(ni(o,r),Le(r)&&!Jn))for(const l of r.getChildren())A(l)&&ni(Pn(He,l.getKey()),l)}else{const i=r.getTextContent();if(he(r)){const a=r.decorate(He,Nn);a!==null&&Qd(n,a)}$e+=i,Ht+=i}if(!Ts&&Le(r)&&r.__cachedText!==Ht){const i=r.getWritable();i.__cachedText=Ht,r=i}return o}function Qd(n,e){let t=He._pendingDecorators;const r=He._decorators;if(t===null){if(r[n]===e)return;t=Hf(He)}t[n]=e}function Eo(n){let e=n.nextSibling;return e!==null&&e===He._blockCursorElement&&(e=e.nextSibling),e}function Ym(n,e,t,r,s,o){$e="",Ht="",Jn=r===2,He=t,Nn=t._config,Ar=t._nodes,Zs=He._listeners.mutation,Xo=s,Qo=o,An=n._nodeMap,vt=e._nodeMap,Ts=e._readOnly,ei=new Map(t._keyToDOMMap);const i=new Map;return Pr=i,xr("root",null),He=void 0,Ar=void 0,Xo=void 0,Qo=void 0,An=void 0,vt=void 0,Nn=void 0,ei=void 0,Pr=void 0,i}function si(n){const e=ei.get(n);return e===void 0&&$(75,n),e}function Q(n){return{type:n}}const ef=Q("SELECTION_CHANGE_COMMAND"),Zm=Q("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),ra=Q("CLICK_COMMAND"),tf=Q("BEFORE_INPUT_COMMAND"),nf=Q("INPUT_COMMAND"),rf=Q("COMPOSITION_START_COMMAND"),sf=Q("COMPOSITION_END_COMMAND"),vn=Q("DELETE_CHARACTER_COMMAND"),Qn=Q("INSERT_LINE_BREAK_COMMAND"),Ir=Q("INSERT_PARAGRAPH_COMMAND"),er=Q("CONTROLLED_TEXT_INSERTION_COMMAND"),Xs=Q("PASTE_COMMAND"),oi=Q("REMOVE_TEXT_COMMAND"),Rr=Q("DELETE_WORD_COMMAND"),Or=Q("DELETE_LINE_COMMAND"),nn=Q("FORMAT_TEXT_COMMAND"),of=Q("UNDO_COMMAND"),af=Q("REDO_COMMAND"),lf=Q("KEYDOWN_COMMAND"),cf=Q("KEY_ARROW_RIGHT_COMMAND"),Xm=Q("MOVE_TO_END"),sa=Q("KEY_ARROW_LEFT_COMMAND"),Qm=Q("MOVE_TO_START"),oa=Q("KEY_ARROW_UP_COMMAND"),ia=Q("KEY_ARROW_DOWN_COMMAND"),As=Q("KEY_ENTER_COMMAND"),aa=Q("KEY_SPACE_COMMAND"),uf=Q("KEY_BACKSPACE_COMMAND"),la=Q("KEY_ESCAPE_COMMAND"),df=Q("KEY_DELETE_COMMAND"),ca=Q("KEY_TAB_COMMAND"),ff=Q("INSERT_TAB_COMMAND"),ii=Q("INDENT_CONTENT_COMMAND"),ai=Q("OUTDENT_CONTENT_COMMAND"),gf=Q("DROP_COMMAND"),ey=Q("FORMAT_ELEMENT_COMMAND"),pf=Q("DRAGSTART_COMMAND"),hf=Q("DRAGOVER_COMMAND"),ty=Q("DRAGEND_COMMAND"),Qs=Q("COPY_COMMAND"),ua=Q("CUT_COMMAND"),li=Q("SELECT_ALL_COMMAND"),ny=Q("FOCUS_COMMAND"),ry=Q("BLUR_COMMAND"),sy=Q("KEY_MODIFIER_COMMAND"),Ut=Object.freeze({}),ci=[["keydown",function(n,e){Fr=n.timeStamp,mf=n.key,!e.isComposing()&&H(e,lf,n)}],["pointerdown",function(n,e){const t=n.target,r=n.pointerType;Dn(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&Rt(e,()=>{zf(t)||(fi=!0)})}],["compositionstart",function(n,e){H(e,rf,n)}],["compositionend",function(n,e){Tn?br=!0:cr||!jr&&!Br?H(e,sf,n):(gi=!0,pi=n.data)}],["input",function(n,e){n.stopPropagation(),Rt(e,()=>{e.dispatchCommand(nf,n)},{event:n}),Gn=null}],["click",function(n,e){Rt(e,()=>{const t=U(),r=Et(ht(e)),s=Ln();if(r){if(O(t)){const o=t.anchor,i=o.getNode();if(o.type==="element"&&o.offset===0&&t.isCollapsed()&&!Le(i)&&ke().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&s!==null&&t.is(s))r.removeAllRanges(),t.dirty=!0;else if(n.detail===3&&!t.isCollapsed()&&i!==t.focus.getNode()){const a=Qe(i,l=>A(l)&&!l.isInline());A(a)&&a.select(0)}}else if(n.pointerType==="touch"||n.pointerType==="pen"){const o=r.anchorNode;(Ne(o)||Xt(o))&&Ke(ga(s,r,e,n))}}H(e,ra,n)})}],["cut",Ut],["copy",Ut],["dragstart",Ut],["dragover",Ut],["dragend",Ut],["paste",Ut],["focus",Ut],["blur",Ut],["drop",Ut]];Es&&ci.push(["beforeinput",(n,e)=>(function(t,r){const s=t.inputType;s==="deleteCompositionText"||Tn&&Zf(r)||s!=="insertCompositionText"&&H(r,tf,t)})(n,e)]);let Fr=0,mf=null,yf=0,Gn=null;const ui=new WeakMap,Ps=new WeakMap;let di=!1,fi=!1,Tr=!1,br=!1,gi=!1,pi="",_n=null,_f=[0,"",0,"root",0];function vf(n,e,t,r,s){const o=n.anchor,i=n.focus,a=o.getNode(),l=xe(),u=Et(ht(l)),c=u!==null?u.anchorNode:null,f=o.key,d=l.getElementByKey(f),h=t.length;return f!==i.key||!z(a)||(!s&&(!Es||yf<r+50)||a.isDirty()&&h<2||Jf(t))&&o.offset!==i.offset&&!a.isComposing()||Vt(a)||a.isDirty()&&h>1||(s||!Es)&&d!==null&&!a.isComposing()&&c!==ar(d)||u!==null&&e!==null&&(!e.collapsed||e.startContainer!==u.anchorNode||e.startOffset!==u.anchorOffset)||a.getFormat()!==n.format||a.getStyle()!==n.style||(function(g,m){if(m.isSegmented())return!0;if(!g.isCollapsed())return!1;const y=g.anchor.offset,x=m.getParentOrThrow(),p=xn(m);return y===0?!m.canInsertTextBefore()||!x.canInsertTextBefore()&&!m.isComposing()||p||(function(_){const C=_.getPreviousSibling();return(z(C)||A(C)&&C.isInline())&&!C.canInsertTextAfter()})(m):y===m.getTextContentSize()&&(!m.canInsertTextAfter()||!x.canInsertTextAfter()&&!m.isComposing()||p)})(n,a)}function El(n,e){return Xt(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Tl(n,e,t){const{anchorNode:r,anchorOffset:s,focusNode:o,focusOffset:i}=n;di&&(di=!1,El(r,s)&&El(o,i)&&!_n)||Rt(e,()=>{if(!t)return void Ke(null);if(!Wr(e,r,o))return;let a=U();if(_n&&O(a)&&a.isCollapsed()){const l=a.anchor,u=_n.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(a=_n.clone(),Ke(a))}if(_n=null,O(a)){const l=a.anchor,u=l.getNode();if(a.isCollapsed()){n.type==="Range"&&n.anchorNode===n.focusNode&&(a.dirty=!0);const c=ht(e).event,f=c?c.timeStamp:performance.now(),[d,h,g,m,y]=_f,x=ke(),p=e.isComposing()===!1&&x.getTextContent()==="";if(f<y+200&&l.offset===g&&l.key===m)gs(a,d,h);else if(l.type==="text")z(u)||$(141),xf(a,u);else if(l.type==="element"&&!p){A(u)||$(259);const _=l.getNode();_.isEmpty()?(function(C,v){const b=v.getTextFormat(),S=v.getTextStyle();gs(C,b,S)})(a,_):gs(a,0,"")}}else{const c=l.key,f=a.focus.key,d=a.getNodes(),h=d.length,g=a.isBackward(),m=g?i:s,y=g?s:i,x=g?f:c,p=g?c:f;let _=2047,C=!1;for(let v=0;v<h;v++){const b=d[v],S=b.getTextContentSize();if(z(b)&&S!==0&&!(v===0&&b.__key===x&&m===S||v===h-1&&b.__key===p&&y===0)&&(C=!0,_&=b.getFormat(),_===0))break}a.format=C?_:0}}H(e,ef,void 0)})}function gs(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function xf(n,e){gs(n,e.getFormat(),e.getStyle())}function bf(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function oy(n){const e=n.inputType,t=bf(n),r=xe(),s=U();if(e==="deleteContentBackward"){if(s===null){const f=Ln();if(!O(f))return!0;Ke(f.clone())}if(O(s)){const f=s.anchor.key===s.focus.key;if(o=n.timeStamp,mf==="MediaLast"&&o<Fr+30&&r.isComposing()&&f){if(Ue(null),Fr=0,setTimeout(()=>{Rt(r,()=>{Ue(null)})},30),O(s)){const d=s.anchor.getNode();d.markDirty(),z(d)||$(142),xf(s,d)}}else{Ue(null),n.preventDefault();const d=s.anchor.getNode(),h=d.getTextContent(),g=d.canInsertTextAfter(),m=s.anchor.offset===0&&s.focus.offset===h.length;let y=fl&&f&&!m&&g;if(y&&s.isCollapsed()&&(y=!he(_i(s.anchor,!0))),!y){H(r,vn,!0);const x=U();fl&&O(x)&&x.isCollapsed()&&(_n=x,setTimeout(()=>_n=null))}}return!0}}var o;if(!O(s))return!0;const i=n.data;Gn!==null&&Ca(!1,r,Gn),s.dirty&&Gn===null||!s.isCollapsed()||Le(s.anchor.getNode())||t===null||s.applyDOMRange(t),Gn=null;const a=s.anchor,l=s.focus,u=a.getNode(),c=l.getNode();if(e==="insertText"||e==="insertTranspose"){if(i===`
|
|
4
4
|
`)n.preventDefault(),H(r,Qn,!1);else if(i===ln)n.preventDefault(),H(r,Ir,void 0);else if(i==null&&n.dataTransfer){const f=n.dataTransfer.getData("text/plain");n.preventDefault(),s.insertRawText(f)}else i!=null&&vf(s,t,i,n.timeStamp,!0)?(n.preventDefault(),H(r,er,i)):Gn=i;return yf=n.timeStamp,!0}switch(n.preventDefault(),e){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":H(r,er,n);break;case"insertFromComposition":Ue(null),H(r,er,n);break;case"insertLineBreak":Ue(null),H(r,Qn,!1);break;case"insertParagraph":Ue(null),Tr&&!cr?(Tr=!1,H(r,Qn,!1)):H(r,Ir,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":H(r,Xs,n);break;case"deleteByComposition":(function(f,d){return f!==d||A(f)||A(d)||!xn(f)||!xn(d)})(u,c)&&H(r,oi,n);break;case"deleteByDrag":case"deleteByCut":H(r,oi,n);break;case"deleteContent":H(r,vn,!1);break;case"deleteWordBackward":H(r,Rr,!0);break;case"deleteWordForward":H(r,Rr,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":H(r,Or,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":H(r,Or,!1);break;case"formatStrikeThrough":H(r,nn,"strikethrough");break;case"formatBold":H(r,nn,"bold");break;case"formatItalic":H(r,nn,"italic");break;case"formatUnderline":H(r,nn,"underline");break;case"historyUndo":H(r,of,void 0);break;case"historyRedo":H(r,af,void 0)}return!0}function iy(n){if(Ne(n.target)&&zf(n.target))return!0;const e=xe(),t=U(),r=n.data,s=bf(n);if(r!=null&&O(t)&&vf(t,s,r,n.timeStamp,!1)){br&&(Is(e,r),br=!1);const o=t.anchor.getNode(),i=Et(ht(e));if(i===null)return!0;const a=t.isBackward(),l=a?t.anchor.offset:t.focus.offset,u=a?t.focus.offset:t.anchor.offset;Es&&!t.isCollapsed()&&z(o)&&i.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===Yf(i.anchorNode)||H(e,er,r);const c=r.length;Tn&&c>1&&n.inputType==="insertCompositionText"&&!e.isComposing()&&(t.anchor.offset-=c),jr||cr||Br||!e.isComposing()||(Fr=0,Ue(null))}else Ca(!1,e,r!==null?r:void 0),br&&(Is(e,r||void 0),br=!1);return(function(){je();const o=xe();Wd(o)})(),!0}function ay(n){const e=xe(),t=U();if(O(t)&&!e.isComposing()){const r=t.anchor,s=t.anchor.getNode();Ue(r.key),(n.timeStamp<Fr+30||r.type==="element"||!t.isCollapsed()||s.getFormat()!==t.format||z(s)&&s.getStyle()!==t.style)&&H(e,er,Fm)}return!0}function ly(n){return Is(xe(),n.data),!0}function Is(n,e){const t=n._compositionKey;if(Ue(null),t!==null&&e!=null){if(e===""){const r=Oe(t),s=ar(n.getElementByKey(t));return void(s!==null&&s.nodeValue!==null&&z(r)&&Ea(r,s.nodeValue,null,null,!0))}if(e[e.length-1]===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o,j as n,O as m}from"./index-
|
|
1
|
+
import{a as o,j as n,O as m}from"./index-nHWjhrFW.js";/* empty css */function c(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(m,{}),e[0]=t):t=e[0],t}export{c as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,e as v,j as i,l as _}from"./index-nHWjhrFW.js";var x="na2u4m1 na2u4m0 _1lg22bkw0",g="na2u4m2",h="na2u4m3",f="na2u4m4";const y=r=>{const a=u.c(17);let s,e,l,n;a[0]!==r?({items:e,separator:n,className:s,...l}=r,a[0]=r,a[1]=s,a[2]=e,a[3]=l,a[4]=n):(s=a[1],e=a[2],l=a[3],n=a[4]);const m=n===void 0?"/":n;let t;a[5]!==s?(t=v(x,s),a[5]=s,a[6]=t):t=a[6];let c;if(a[7]!==e||a[8]!==m){let b;a[10]!==e.length||a[11]!==m?(b=(o,k)=>i.jsxs("div",{className:g,children:[o.prefix,i.jsx("div",{className:h,children:o.label}),k<e.length-1&&i.jsx("span",{className:f,"aria-hidden":"true",children:m})]},o.key),a[10]=e.length,a[11]=m,a[12]=b):b=a[12],c=e.map(b),a[7]=e,a[8]=m,a[9]=c}else c=a[9];let d;return a[13]!==l||a[14]!==t||a[15]!==c?(d=i.jsx("nav",{...l,className:t,"aria-label":"Breadcrumb",children:c}),a[13]=l,a[14]=t,a[15]=c,a[16]=d):d=a[16],d};var j="f7jxdn0";const q=r=>{const a=u.c(5);let s;a[0]!==r.className?(s=v(j,r.className),a[0]=r.className,a[1]=s):s=a[1];let e;return a[2]!==r||a[3]!==s?(e=i.jsx("header",{...r,className:s}),a[2]=r,a[3]=s,a[4]=e):e=a[4],e};const p=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],w=_("columns-2",p);var B="_6smcqd0",C="_6smcqd1",E="_6smcqd3",L="_6smcqd4",S="_1aj0kmd0",$="_1aj0kmd2 _1aj0kmd1 _1lg22bkdo _1lg22bkuf _1lg22bk107 _1lg22bk10a _1lg22bkpr _1lg22bk10k";export{y as B,w as C,q as H,B as a,L as b,E as c,S as g,C as h,$ as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,
|
|
1
|
+
import{r as i,aa as d,a as b,e as B,c5 as x,j as R}from"./index-nHWjhrFW.js";import{u as E}from"./useButton-DfUAk02P.js";const h=i.forwardRef(function(e,t){const{render:l,className:u,disabled:s=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...n}=e,r=!!s,{getButtonProps:f,buttonRef:m}=E({disabled:r,focusableWhenDisabled:o,native:a}),p=i.useMemo(()=>({disabled:r}),[r]);return d("button",e,{state:p,ref:[t,m],props:[n,f]})}),N=c=>{const e=b.c(16);let t,l,u,s,o,a;e[0]!==c?({variant:a,scheme:s,size:o,className:l,children:t,...u}=c,e[0]=c,e[1]=t,e[2]=l,e[3]=u,e[4]=s,e[5]=o,e[6]=a):(t=e[1],l=e[2],u=e[3],s=e[4],o=e[5],a=e[6]);let n;e[7]!==l||e[8]!==s||e[9]!==o||e[10]!==a?(n=B(x({variant:a,size:o,scheme:s}),l),e[7]=l,e[8]=s,e[9]=o,e[10]=a,e[11]=n):n=e[11];let r;return e[12]!==t||e[13]!==u||e[14]!==n?(r=R.jsx(h,{...u,className:n,children:t}),e[12]=t,e[13]=u,e[14]=n,e[15]=r):r=e[15],r};export{N as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as c}from"./index-nHWjhrFW.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as o}from"./index-nHWjhrFW.js";const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],c=o("chevron-right",t);export{c as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as J,a as D,j as s,r as w,d as B,f as L,g as z,m as Y,i as G,n as Z,I as H,b as ee,u as te,e as P,L as se,O as ae}from"./index-nHWjhrFW.js";import{c as ie,u as ne,g as oe,a as le,b as ce,d as re,f as q,U as de,X as me,e as fe,l as ue,r as ge,t as pe}from"./update-or-create-name-Cd1zyalO.js";import{w as A,b as he,C as Ce,c as O,B as xe,h as Q,H as je,a as ye,g as be}from"./area.css-d_0zeUpe.js";import{T as ve,a as Se,b as U,c as we,d as Ne,e as Te}from"./table-SKwX9qUc.js";import{u as Re,q as W}from"./useConfigList-CN-eUdau.js";import{f as _e}from"./formatDistance-CEmiEHX5.js";import{B as E}from"./button-D46pme1q.js";import{c as De,a as $e,b as ke,d as Me,h as K}from"./index.esm-DJMnkOur.js";import{u as X}from"./useMutation-ppBqjQps.js";import{C as Fe}from"./check-Cp187nGx.js";import{C as He}from"./copy-BQ-62Ur4.js";import{C as Be}from"./chevron-right-CS1Toe_9.js";import{P as Ie}from"./plus-5oc_diIr.js";/* empty css */import"./useButton-DfUAk02P.js";/* empty css */const Ee=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Le=J("arrow-left",Ee);var ze="_1xwfgwi0",Pe="_1xwfgwi1",qe="_1xwfgwi2";const Ae=()=>{const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("div",{className:ze,children:s.jsx("div",{className:Pe,children:s.jsx("h2",{className:qe,children:"No configs yet. Create your first config to get started."})})}),e[0]=t):t=e[0],t},V=ie();function Oe(){const[e,t]=w.useState([]),[a,n]=w.useState([]),[i,r]=w.useState(""),u=B(),{id:c}=L({strict:!1}),{data:p}=Re(),h=z(),C=w.useCallback(o=>{h.prefetchQuery(Y(o))},[h]),b=w.useMemo(()=>[V.accessor("name",{header:"Name",cell:o=>o.getValue()}),V.accessor("createdAt",{header:"Creation Date",cell:o=>_e(new Date(o.getValue()),new Date,{addSuffix:!0})})],[]),g=ne({data:p||[],columns:b,state:{sorting:e,columnFilters:a,globalFilter:i},onSortingChange:t,onColumnFiltersChange:n,onGlobalFilterChange:r,getCoreRowModel:re(),getFilteredRowModel:ce(),getSortedRowModel:le(),getPaginationRowModel:oe(),initialState:{pagination:{pageSize:100}}});return!p||p.length===0?s.jsx(Ae,{}):s.jsx("div",{children:s.jsxs(ve,{children:[s.jsx(Se,{children:g.getHeaderGroups().map(o=>s.jsx(U,{children:o.headers.map(l=>{const d=l.column.getIsSorted();return s.jsx(we,{sortable:l.column.getCanSort(),onClick:l.column.getToggleSortingHandler(),sortDirection:d==="asc"?"asc":d==="desc"?"desc":null,children:l.isPlaceholder?null:q(l.column.columnDef.header,l.getContext())},l.id)})},o.id))}),s.jsx(Ne,{children:g.getRowModel().rows.map(o=>s.jsx(U,{interactive:!0,selected:o.original.id===c,onMouseEnter:()=>C(o.original.id),onClick:()=>u({to:"/configs/$id",params:{id:o.original.id}}),children:o.getVisibleCells().map(l=>s.jsx(Te,{children:q(l.column.columnDef.cell,l.getContext())},l.id))},o.id))})]})})}const Qe=()=>{const e=D.c(3),t=B(),a=z();let n;return e[0]!==t||e[1]!==a?(n={mutationFn:Ue,onSuccess:async i=>{await a.invalidateQueries({queryKey:W}),i?.id&&t({to:"/configs/$id",params:{id:i?.id}})}},e[0]=t,e[1]=a,e[2]=n):n=e[2],X(n)};async function Ue(e){const a=await(await G.v1.configs.$post({json:{name:e.name}})).json();return"data"in a?a.data:void 0}const Ve=()=>{const e=D.c(2),t=z();let a;return e[0]!==t?(a={mutationFn:Ge,onSuccess:()=>{t.invalidateQueries({queryKey:W})}},e[0]=t,e[1]=a):a=e[1],X(a)};async function Ge(e){const a=await(await G.v1.configs[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in a?a.data:void 0}const We=e=>{const t=D.c(6),{id:a,config:n,disabled:i}=e,{mutateAsync:r}=Qe(),{mutateAsync:u}=Ve();let c;return t[0]!==n||t[1]!==r||t[2]!==i||t[3]!==a||t[4]!==u?(c=s.jsx(de,{id:a,entity:n,placeholder:"Config Name",onCreate:r,onUpdate:u,disabled:i}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=u,t[5]=c):c=t[5],c},Ke=e=>{const t=D.c(25),{id:a}=e,n=B(),{data:i}=Z(a),[r,u]=w.useState(!1);let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const p=L(c),h="variant"in p,C="environment"in p,b=h||C;let g;t[1]!==a||t[2]!==C||t[3]!==h||t[4]!==n?(g=()=>{n(h?{to:"/configs/$id/variants",params:{id:a}}:C?{to:"/configs/$id/targeting",params:{id:a}}:{to:"/configs"})},t[1]=a,t[2]=C,t[3]=h,t[4]=n,t[5]=g):g=t[5];const o=g;let l;t[6]!==i?(l=async()=>{i?.slug&&(await navigator.clipboard.writeText(i.slug),u(!0),setTimeout(()=>u(!1),2e3))},t[6]=i,t[7]=l):l=t[7];const d=l,S=b?Le:me;let m;t[8]!==S?(m=s.jsx(H,{icon:S}),t[8]=S,t[9]=m):m=t[9];let x;t[10]!==o||t[11]!==m?(x=s.jsx(E,{onClick:o,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[10]=o,t[11]=m,t[12]=x):x=t[12];const v=i??void 0;let f;t[13]!==a||t[14]!==b||t[15]!==v?(f=s.jsx(We,{id:a,config:v,disabled:b},a),t[13]=a,t[14]=b,t[15]=v,t[16]=f):f=t[16];let j;t[17]!==r||t[18]!==i||t[19]!==d?(j=i?.slug&&s.jsxs("div",{className:De,children:[s.jsx("span",{className:$e,children:"Config Id"}),s.jsx("span",{className:ke,children:i.slug}),s.jsx("button",{type:"button",className:Me,onClick:d,"aria-label":"Copy config ID",children:r?s.jsx(Fe,{size:14}):s.jsx(He,{size:14})})]}),t[17]=r,t[18]=i,t[19]=d,t[20]=j):j=t[20];let y;return t[21]!==x||t[22]!==f||t[23]!==j?(y=s.jsxs("div",{className:K,children:[x,f,j]}),t[21]=x,t[22]=f,t[23]=j,t[24]=y):y=t[24],y};function gt(){const e=D.c(40),{containerRef:t,setTileWidth:a}=fe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const i=L(n),r=B(),u=ee(),{toggleSidebar:c}=te();let p;e[1]!==u?(p=u.filter(Je).map(Xe),e[1]=u,e[2]=p):p=e[2];const h=p;let C;e[3]!==r?(C=()=>{r({to:"/configs/$id",params:{id:"new"}})},e[3]=r,e[4]=C):C=e[4];const b=C;let g;e[5]!==i.id||e[6]!==a?(g=()=>{i?.id?a("25%"):a("100%")},e[5]=i.id,e[6]=a,e[7]=g):g=e[7];const o=i?.id;let l;e[8]!==o?(l=[o],e[8]=o,e[9]=l):l=e[9],w.useEffect(g,l);let d;e[10]!==c?(d=()=>{c()},e[10]=c,e[11]=d):d=e[11];let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(H,{icon:Ce}),e[12]=S):S=e[12];let m;e[13]!==d?(m=s.jsx(E,{onClick:d,size:"icon",variant:"ghost",scheme:"gray",children:S}),e[13]=d,e[14]=m):m=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(H,{icon:Be,className:O}),e[15]=x):x=e[15];let v;e[16]!==h?(v=s.jsx(xe,{items:h}),e[16]=h,e[17]=v):v=e[17];let f;e[18]!==v||e[19]!==m?(f=s.jsxs("div",{className:Q,children:[m,x,v]}),e[18]=v,e[19]=m,e[20]=f):f=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(H,{icon:Ie,className:O}),e[21]=j):j=e[21];let y;e[22]!==b?(y=s.jsx("div",{className:Q,children:s.jsxs(E,{variant:"outline",scheme:"gray",onClick:b,children:[j,"New Config"]})}),e[22]=b,e[23]=y):y=e[23];let N;e[24]!==f||e[25]!==y?(N=s.jsxs(je,{className:ye,children:[f,y]}),e[24]=f,e[25]=y,e[26]=N):N=e[26];let $,k;e[27]===Symbol.for("react.memo_cache_sentinel")?($=s.jsxs("div",{className:P(A,ue),children:[s.jsx("div",{className:K}),s.jsx(Oe,{})]}),k=P(A,ge),e[27]=$,e[28]=k):($=e[27],k=e[28]);const I=i.id;let T;e[29]!==I?(T=s.jsx(Ke,{id:I}),e[29]=I,e[30]=T):T=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(ae,{}),e[31]=M):M=e[31];let R;e[32]!==T?(R=s.jsx("div",{className:k,children:s.jsxs("div",{children:[T,M]})}),e[32]=T,e[33]=R):R=e[33];let _;e[34]!==t||e[35]!==R?(_=s.jsx("div",{className:be,children:s.jsxs("div",{ref:t,className:pe,children:[$,R]})}),e[34]=t,e[35]=R,e[36]=_):_=e[36];let F;return e[37]!==N||e[38]!==_?(F=s.jsxs(s.Fragment,{children:[N,_]}),e[37]=N,e[38]=_,e[39]=F):F=e[39],F}function Xe(e){const t=e.loaderData?.title,a=e.staticData.customData?.title,n=t??a;return{key:e.id,label:s.jsx(se,{to:e.pathname,className:he,children:n}),prefix:e.staticData.customData?.icon}}function Je(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{gt as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{l as c}from"./index-nHWjhrFW.js";const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t=c("copy",e);export{t as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as w,d as F,f as z,g as I,h as Y,j as n,a as R,i as L,k as X,I as k,u as J,b as Z,e as Q,L as ee,O as te}from"./index-nHWjhrFW.js";import{w as q,b as ne,C as se,c as A,B as ae,h as O,H as oe,a as ie,g as re}from"./area.css-d_0zeUpe.js";import{B}from"./button-D46pme1q.js";import{c as le,u as ce,f as U,g as me,a as de,b as ue,d as fe,U as ve,X as ge,e as pe,l as he,r as xe,t as je}from"./update-or-create-name-Cd1zyalO.js";import{T as Ce,a as be,b as V,c as ye,d as Se,e as we}from"./table-SKwX9qUc.js";import{u as Ne,g as G}from"./useEnvironments-D798jdLi.js";import{f as Re}from"./formatDistance-CEmiEHX5.js";import{h as K}from"./index.esm-DJMnkOur.js";import{u as W}from"./useMutation-ppBqjQps.js";import{C as De}from"./chevron-right-CS1Toe_9.js";import{P as Ee}from"./plus-5oc_diIr.js";/* empty css */import"./useButton-DfUAk02P.js";/* empty css */const H=le();function Te(){const[e,t]=w.useState([{id:"createdAt",desc:!1}]),[s,a]=w.useState([]),[l,i]=w.useState(""),{data:d}=Ne(),m=F(),{environment:r}=z({strict:!1}),u=I(),f=w.useCallback(o=>{u.prefetchQuery(Y(o))},[u]),N=w.useMemo(()=>[H.accessor("name",{header:"Name",cell:o=>o.row.original.isProd?`${o.getValue()} (this environment)`:o.getValue()}),H.accessor("isProd",{header:"Production",cell:o=>o.getValue()?"Yes":"No"}),H.accessor("createdAt",{header:"Creation Date",cell:o=>Re(new Date(o.getValue()),new Date,{addSuffix:!0})})],[]),g=ce({data:d||[],columns:N,state:{sorting:e,columnFilters:s,globalFilter:l},onSortingChange:t,onColumnFiltersChange:a,onGlobalFilterChange:i,getCoreRowModel:fe(),getFilteredRowModel:ue(),getSortedRowModel:de(),getPaginationRowModel:me(),initialState:{pagination:{pageSize:100}}});return n.jsx("div",{children:n.jsxs(Ce,{children:[n.jsx(be,{children:g.getHeaderGroups().map(o=>n.jsx(V,{children:o.headers.map(c=>{const v=c.column.getIsSorted();return n.jsx(ye,{sortable:c.column.getCanSort(),onClick:c.column.getToggleSortingHandler(),sortDirection:v==="asc"?"asc":v==="desc"?"desc":null,children:c.isPlaceholder?null:U(c.column.columnDef.header,c.getContext())},c.id)})},o.id))}),n.jsx(Se,{children:g.getRowModel().rows.map(o=>n.jsx(V,{interactive:!0,selected:o.original.id===r,onMouseEnter:()=>f(o.original.id),onClick:()=>m({to:"/environments/$environment",params:{environment:o.original.id}}),children:o.getVisibleCells().map(c=>n.jsx(we,{children:U(c.column.columnDef.cell,c.getContext())},c.id))},o.id))})]})})}const Pe=()=>{const e=R.c(3),t=F(),s=I();let a;return e[0]!==t||e[1]!==s?(a={mutationFn:$e,onSuccess:async l=>{await s.invalidateQueries({queryKey:G()}),l?.id&&t({to:"/environments/$environment",params:{environment:l?.id}})}},e[0]=t,e[1]=s,e[2]=a):a=e[2],W(a)};async function $e(e){const t=e.name.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,""),a=await(await L.v1.environments.$post({json:{name:e.name,slug:t,isProd:e.isProd}})).json();return"data"in a?a.data:void 0}const Me=()=>{const e=R.c(2),t=I();let s;return e[0]!==t?(s={mutationFn:_e,onSuccess:()=>{t.invalidateQueries({queryKey:G()})}},e[0]=t,e[1]=s):s=e[1],W(s)};async function _e(e){const s=await(await L.v1.environments[":id"].$patch({param:{id:e.id},json:{name:e.name}})).json();return"data"in s?s.data:void 0}const ke=e=>{const t=R.c(7),{id:s,environment:a}=e,{mutateAsync:l}=Pe(),{mutateAsync:i}=Me(),d=a?.isProd,m=a?.isProd?"You can't rename Production environment.":void 0;let r;return t[0]!==l||t[1]!==a||t[2]!==s||t[3]!==d||t[4]!==m||t[5]!==i?(r=n.jsx(ve,{id:s,disabled:d,tooltip:m,entity:a,placeholder:"Environment Name",onCreate:l,onUpdate:i}),t[0]=l,t[1]=a,t[2]=s,t[3]=d,t[4]=m,t[5]=i,t[6]=r):r=t[6],r},Fe=e=>{const t=R.c(11),{id:s}=e,a=F(),{data:l}=X(s);let i;t[0]!==a?(i=()=>{a({to:"/environments"})},t[0]=a,t[1]=i):i=t[1];const d=i;let m;t[2]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(k,{icon:ge}),t[2]=m):m=t[2];let r;t[3]!==d?(r=n.jsx(B,{onClick:d,size:"icon",scheme:"gray",variant:"ghost",children:m}),t[3]=d,t[4]=r):r=t[4];let u;t[5]!==l||t[6]!==s?(u=s?n.jsx(ke,{id:s,environment:l??void 0},s):null,t[5]=l,t[6]=s,t[7]=u):u=t[7];let f;return t[8]!==r||t[9]!==u?(f=n.jsxs("div",{className:K,children:[r,u]}),t[8]=r,t[9]=u,t[10]=f):f=t[10],f};function Je(){const e=R.c(40),{toggleSidebar:t}=J(),{containerRef:s,setTileWidth:a}=pe();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const i=z(l),d=Z(),m=F();let r;e[1]!==d?(r=d.filter(Be).map(He),e[1]=d,e[2]=r):r=e[2];const u=r;let f;e[3]!==m?(f=()=>{m({to:"/environments/$environment",params:{environment:"new"}})},e[3]=m,e[4]=f):f=e[4];const N=f;let g;e[5]!==i.environment||e[6]!==a?(g=()=>{i?.environment?a("25%"):a("100%")},e[5]=i.environment,e[6]=a,e[7]=g):g=e[7];const o=i?.environment;let c;e[8]!==o?(c=[o],e[8]=o,e[9]=c):c=e[9],w.useEffect(g,c);let v;e[10]!==t?(v=()=>{t()},e[10]=t,e[11]=v):v=e[11];let D;e[12]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(k,{icon:se}),e[12]=D):D=e[12];let p;e[13]!==v?(p=n.jsx(B,{onClick:v,size:"icon",variant:"ghost",scheme:"gray",children:D}),e[13]=v,e[14]=p):p=e[14];let E;e[15]===Symbol.for("react.memo_cache_sentinel")?(E=n.jsx(k,{icon:De,className:A}),e[15]=E):E=e[15];let h;e[16]!==u?(h=n.jsx(ae,{items:u}),e[16]=u,e[17]=h):h=e[17];let x;e[18]!==h||e[19]!==p?(x=n.jsxs("div",{className:O,children:[p,E,h]}),e[18]=h,e[19]=p,e[20]=x):x=e[20];let T;e[21]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(k,{icon:Ee,className:A}),e[21]=T):T=e[21];let j;e[22]!==N?(j=n.jsx("div",{className:O,children:n.jsxs(B,{variant:"outline",scheme:"gray",onClick:N,children:[T,"New Environment"]})}),e[22]=N,e[23]=j):j=e[23];let C;e[24]!==x||e[25]!==j?(C=n.jsxs(oe,{className:ie,children:[x,j]}),e[24]=x,e[25]=j,e[26]=C):C=e[26];let P,$;e[27]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsxs("div",{className:Q(q,he),children:[n.jsx("div",{className:K}),n.jsx(Te,{})]}),$=Q(q,xe),e[27]=P,e[28]=$):(P=e[27],$=e[28]);let b;e[29]!==i.environment?(b=n.jsx(Fe,{id:i.environment}),e[29]=i.environment,e[30]=b):b=e[30];let M;e[31]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(te,{}),e[31]=M):M=e[31];let y;e[32]!==b?(y=n.jsx("div",{className:$,children:n.jsxs("div",{children:[b,M]})}),e[32]=b,e[33]=y):y=e[33];let S;e[34]!==s||e[35]!==y?(S=n.jsx("div",{className:re,children:n.jsxs("div",{ref:s,className:je,children:[P,y]})}),e[34]=s,e[35]=y,e[36]=S):S=e[36];let _;return e[37]!==C||e[38]!==S?(_=n.jsxs(n.Fragment,{children:[C,S]}),e[37]=C,e[38]=S,e[39]=_):_=e[39],_}function He(e){const t=e.loaderData?.title,s=e.staticData.customData?.title,a=t??s;return{key:e.id,label:n.jsx(ee,{to:e.pathname,className:ne,children:a}),prefix:e.staticData.customData?.icon}}function Be(e){return!!e.staticData.customData?.title||!!e.loaderData?.title}export{Je as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const v=Symbol.for("constructDateFrom");function W(t,n){return typeof t=="function"?t(n):t&&typeof t=="object"&&v in t?t[v](n):t instanceof Date?new t.constructor(n):new Date(n)}function h(t,n){return W(t,t)}let S={};function k(){return S}function P(t){const n=h(t),e=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return e.setUTCFullYear(n.getFullYear()),+t-+e}function p(t,...n){const e=W.bind(null,t||n.find(o=>typeof o=="object"));return n.map(e)}function M(t,n){const e=+h(t)-+h(n);return e<0?-1:e>0?1:e}function F(t,n,e){const[o,a]=p(e?.in,t,n),s=o.getFullYear()-a.getFullYear(),i=o.getMonth()-a.getMonth();return s*12+i}function x(t){return n=>{const o=(t?Math[t]:Math.trunc)(n);return o===0?0:o}}function T(t,n){return+h(t)-+h(n)}function C(t,n){const e=h(t);return e.setHours(23,59,59,999),e}function X(t,n){const e=h(t),o=e.getMonth();return e.setFullYear(e.getFullYear(),o+1,0),e.setHours(23,59,59,999),e}function A(t,n){const e=h(t);return+C(e)==+X(e)}function I(t,n,e){const[o,a,s]=p(e?.in,t,t,n),i=M(a,s),r=Math.abs(F(a,s));if(r<1)return 0;a.getMonth()===1&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-i*r);let d=M(a,s)===-i;A(o)&&r===1&&M(o,s)===1&&(d=!1);const c=i*(r-+d);return c===0?0:c}function O(t,n,e){const o=T(t,n)/1e3;return x(e?.roundingMethod)(o)}const j={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Y=(t,n,e)=>{let o;const a=j[t];return typeof a=="string"?o=a:n===1?o=a.one:o=a.other.replace("{{count}}",n.toString()),e?.addSuffix?e.comparison&&e.comparison>0?"in "+o:o+" ago":o};function D(t){return(n={})=>{const e=n.width?String(n.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}const _={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},N={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},V={date:D({formats:_,defaultWidth:"full"}),time:D({formats:z,defaultWidth:"full"}),dateTime:D({formats:N,defaultWidth:"full"})},q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},J=(t,n,e,o)=>q[t];function g(t){return(n,e)=>{const o=e?.context?String(e.context):"standalone";let a;if(o==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,r=e?.width?String(e.width):i;a=t.formattingValues[r]||t.formattingValues[i]}else{const i=t.defaultWidth,r=e?.width?String(e.width):t.defaultWidth;a=t.values[r]||t.values[i]}const s=t.argumentCallback?t.argumentCallback(n):n;return a[s]}}const L={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},R={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},E={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},H={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Q={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},U={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},B=(t,n)=>{const e=Number(t),o=e%100;if(o>20||o<10)switch(o%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},K={ordinalNumber:B,era:g({values:L,defaultWidth:"wide"}),quarter:g({values:R,defaultWidth:"wide",argumentCallback:t=>t-1}),month:g({values:E,defaultWidth:"wide"}),day:g({values:H,defaultWidth:"wide"}),dayPeriod:g({values:Q,defaultWidth:"wide",formattingValues:U,defaultFormattingWidth:"wide"})};function b(t){return(n,e={})=>{const o=e.width,a=o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth],s=n.match(a);if(!s)return null;const i=s[0],r=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(r)?G(r,y=>y.test(i)):$(r,y=>y.test(i));let c;c=t.valueCallback?t.valueCallback(d):d,c=e.valueCallback?e.valueCallback(c):c;const l=n.slice(i.length);return{value:c,rest:l}}}function $(t,n){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&n(t[e]))return e}function G(t,n){for(let e=0;e<t.length;e++)if(n(t[e]))return e}function Z(t){return(n,e={})=>{const o=n.match(t.matchPattern);if(!o)return null;const a=o[0],s=n.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const r=n.slice(a.length);return{value:i,rest:r}}}const tt=/^(\d+)(th|st|nd|rd)?/i,et=/\d+/i,nt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},at={any:[/^b/i,/^(a|c)/i]},ot={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rt={any:[/1/i,/2/i,/3/i,/4/i]},it={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},st={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ut={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ct={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mt={ordinalNumber:Z({matchPattern:tt,parsePattern:et,valueCallback:t=>parseInt(t,10)}),era:b({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:at,defaultParseWidth:"any"}),quarter:b({matchPatterns:ot,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:b({matchPatterns:it,defaultMatchWidth:"wide",parsePatterns:st,defaultParseWidth:"any"}),day:b({matchPatterns:ut,defaultMatchWidth:"wide",parsePatterns:ct,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:dt,defaultMatchWidth:"any",parsePatterns:lt,defaultParseWidth:"any"})},ht={code:"en-US",formatDistance:Y,formatLong:V,formatRelative:J,localize:K,match:mt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ft(t,n,e){const o=k(),a=e?.locale??o.locale??ht,s=2520,i=M(t,n);if(isNaN(i))throw new RangeError("Invalid time value");const r=Object.assign({},e,{addSuffix:e?.addSuffix,comparison:i}),[d,c]=p(e?.in,...i>0?[n,t]:[t,n]),l=O(c,d),y=(P(c)-P(d))/1e3,u=Math.round((l-y)/60);let f;if(u<2)return e?.includeSeconds?l<5?a.formatDistance("lessThanXSeconds",5,r):l<10?a.formatDistance("lessThanXSeconds",10,r):l<20?a.formatDistance("lessThanXSeconds",20,r):l<40?a.formatDistance("halfAMinute",0,r):l<60?a.formatDistance("lessThanXMinutes",1,r):a.formatDistance("xMinutes",1,r):u===0?a.formatDistance("lessThanXMinutes",1,r):a.formatDistance("xMinutes",u,r);if(u<45)return a.formatDistance("xMinutes",u,r);if(u<90)return a.formatDistance("aboutXHours",1,r);if(u<1440){const m=Math.round(u/60);return a.formatDistance("aboutXHours",m,r)}else{if(u<s)return a.formatDistance("xDays",1,r);if(u<43200){const m=Math.round(u/1440);return a.formatDistance("xDays",m,r)}else if(u<43200*2)return f=Math.round(u/43200),a.formatDistance("aboutXMonths",f,r)}if(f=I(c,d),f<12){const m=Math.round(u/43200);return a.formatDistance("xMonths",m,r)}else{const m=f%12,w=Math.trunc(f/12);return m<3?a.formatDistance("aboutXYears",w,r):m<9?a.formatDistance("overXYears",w,r):a.formatDistance("almostXYears",w+1,r)}}export{ft as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,j as s,N as n}from"./index-nHWjhrFW.js";/* empty css */function m(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(n,{to:"/settings/user-profile"}),e[0]=t):t=e[0],t}export{m as component};
|