@overmap-ai/blocks 0.0.9-alpha.2 → 0.0.9-alpha.3

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.
@@ -1,6 +1,6 @@
1
- (function(s,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("@radix-ui/themes/styles.css"),require("@radix-ui/colors"),require("@radix-ui/react-icons"),require("@radix-ui/themes"),require("react/jsx-runtime"),require("react"),require("react-responsive"),require("@radix-ui/react-dialog"),require("re-resizable"),require("react-transition-group"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toolbar"),require("@radix-ui/react-toast")):typeof define=="function"&&define.amd?define(["exports","@radix-ui/themes/styles.css","@radix-ui/colors","@radix-ui/react-icons","@radix-ui/themes","react/jsx-runtime","react","react-responsive","@radix-ui/react-dialog","re-resizable","react-transition-group","@radix-ui/react-toggle-group","@radix-ui/react-toolbar","@radix-ui/react-toast"],U):(s=typeof globalThis<"u"?globalThis:s||self,U(s.blocks={},null,s.colors,s.reactIcons,s.themes,s.jsxRuntime,s.React,s.reactResponsive,s.RadixDialogPrimitive,s.reResizable,s.reactTransitionGroup,s.reactToggleGroup,s.reactToolbar,s.RadixToast))})(this,function(s,U,pe,M,t,e,n,L,W,X,ne,ge,$e,te){"use strict";function he(o){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const i in o)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(o,i);Object.defineProperty(a,i,r.get?r:{enumerable:!0,get:()=>o[i]})}}return a.default=o,Object.freeze(a)}const Q=he(W),F=he(te);function Ie(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ce={exports:{}};/*!
1
+ (function(a,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("@radix-ui/themes/styles.css"),require("@radix-ui/colors"),require("@radix-ui/react-icons"),require("@radix-ui/themes"),require("react/jsx-runtime"),require("react"),require("react-responsive"),require("@radix-ui/react-dialog"),require("re-resizable"),require("@radix-ui/react-dismissable-layer"),require("react-transition-group"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toolbar"),require("@radix-ui/react-toast")):typeof define=="function"&&define.amd?define(["exports","@radix-ui/themes/styles.css","@radix-ui/colors","@radix-ui/react-icons","@radix-ui/themes","react/jsx-runtime","react","react-responsive","@radix-ui/react-dialog","re-resizable","@radix-ui/react-dismissable-layer","react-transition-group","@radix-ui/react-toggle-group","@radix-ui/react-toolbar","@radix-ui/react-toast"],G):(a=typeof globalThis<"u"?globalThis:a||self,G(a.blocks={},null,a.colors,a.reactIcons,a.themes,a.jsxRuntime,a.React,a.reactResponsive,a.RadixDialogPrimitive,a.reResizable,a.reactDismissableLayer,a.reactTransitionGroup,a.reactToggleGroup,a.reactToolbar,a.RadixToast))})(this,function(a,G,de,M,n,e,t,W,ze,V,ke,ee,ue,Ae,te){"use strict";function fe(i){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const l in i)if(l!=="default"){const r=Object.getOwnPropertyDescriptor(i,l);Object.defineProperty(s,l,r.get?r:{enumerable:!0,get:()=>i[l]})}}return s.default=i,Object.freeze(s)}const q=fe(ze),F=fe(te);function Me(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var pe={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(o){(function(){var a={}.hasOwnProperty;function i(){for(var r=[],c=0;c<arguments.length;c++){var l=arguments[c];if(l){var u=typeof l;if(u==="string"||u==="number")r.push(l);else if(Array.isArray(l)){if(l.length){var d=i.apply(null,l);d&&r.push(d)}}else if(u==="object"){if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]")){r.push(l.toString());continue}for(var p in l)a.call(l,p)&&l[p]&&r.push(p)}}}return r.join(" ")}o.exports?(i.default=i,o.exports=i):window.classNames=i})()})(Ce);var Ee=Ce.exports;const m=Ie(Ee);function $(o,a){return n.useMemo(()=>{if(o!==void 0)if(typeof o=="object"){if(!("initial"in o))throw new Error("Expected initial property to be set in Responsive object");return Object.fromEntries(Object.entries(o).map(([i,r])=>[i,a[r]]))}else return a[o]},[a,o])}const Ae={success:"green",danger:"red",info:"gray"},T=o=>{const a=t.useThemeContext();if(o)return o==="primary"?a.accentColor:Ae[o]},Ne=()=>{const o=L.useMediaQuery({minWidth:"520px"}),a=L.useMediaQuery({minWidth:"768px"}),i=L.useMediaQuery({minWidth:"1024px"}),r=L.useMediaQuery({minWidth:"1280px"}),c=L.useMediaQuery({minWidth:"1640px"});return{size:n.useMemo(()=>c?"xl":r?"lg":i?"md":a?"sm":o?"xs":"initial",[r,i,a,c,o]),xs:o,sm:a,md:i,lg:r,xl:c}},Be=n.forwardRef(function({className:a,severity:i="primary",color:r,children:c,...l},u){const d=T(i);return e.jsx(t.Badge,{className:m("overmap-badge",a),ref:u,color:r||d,...l,children:c})}),Le=n.memo(Be),H={fluid:"_fluid_r73gr_1",hoverSpin90Clockwise:"_hoverSpin90Clockwise_r73gr_15",hoverSpin180Clockwise:"_hoverSpin180Clockwise_r73gr_25",hoverSpin360Clockwise:"_hoverSpin360Clockwise_r73gr_35"},be={spin90Clockwise:H.hoverSpin90Clockwise,spin180Clockwise:H.hoverSpin180Clockwise,spin360Clockwise:H.hoverSpin360Clockwise},We={role:"button",tabIndex:0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&o.currentTarget.click()}},E={small:"1",medium:"2",large:"3"},ye=n.createContext({}),re=()=>n.useContext(ye),Fe=n.forwardRef(function(a,i){const r=re(),{className:c,type:l="button",fluid:u=r.fluid??!1,size:d=r.size??"medium",severity:p=r.severity??"primary",hoverEffects:f=r.hoverEffects??[],variant:g=r.variant,...C}=a,b=T(p),y=f.map(h=>be[h]);return e.jsx(t.Button,{ref:i,type:l,className:m(c,y,{[H.fluid]:u}),color:b,size:$(d,E),variant:g,...C})}),K=n.memo(Fe),He=n.forwardRef(function(a,i){const r=re(),{className:c,children:l,type:u="button",fluid:d=r.fluid??!1,size:p=r.size??"medium",severity:f=r.severity??"primary",hoverEffects:g=r.hoverEffects??[],variant:C=r.variant,...b}=a,y=T(f),h=(g==null?void 0:g.map(_=>be[_]))||[];return e.jsx(t.IconButton,{className:m(c,h,{[H.fluid]:d}),ref:i,color:y,size:$(p,E),variant:C,type:u,...b,children:l})}),oe=n.memo(He),Ge={merged:"_merged_wdgxo_1"},Ve={row:{small:"4",medium:"4",large:"5"},column:{small:"2",medium:"3",large:"4"}},qe=n.forwardRef(function({className:a,merged:i=!1,children:r,gap:c,direction:l="row",severity:u,size:d="medium",variant:p,hoverEffects:f,fluid:g,...C},b){const y=$(d,Ve[l]),h=p==="ghost"?y:"0";return e.jsx(t.Flex,{className:m("overmap-button-group",a,{[Ge.merged]:i}),ref:b,gap:i?c??h:c??"2",direction:l,"data-direction":l,...C,children:e.jsx(ye.Provider,{value:{size:d,severity:u,variant:p,hoverEffects:f,fluid:g},children:r})})}),ie=n.memo(qe),Ue={separators:"_separators_1f7v1_1"},Xe=n.memo(n.forwardRef((o,a)=>{const{children:i,border:r,before:c,after:l,size:u}=o,d=r?"surface":"ghost",p=$(u,E),f=c&&l?e.jsx(t.Inset,{side:"x",pt:"current",pb:"current",children:i}):c?e.jsx(t.Inset,{side:"bottom",pt:"current",children:i}):l?e.jsx(t.Inset,{side:"top",pb:"current",children:i}):e.jsx(t.Inset,{children:i}),g=e.jsxs(t.Card,{ref:a,size:p,variant:d,children:[c,f,l]});return d==="ghost"?e.jsx(t.Box,{p:"3",children:g}):g})),Qe=n.memo(n.forwardRef((o,a)=>{const{children:i,variant:r="outline",size:c,className:l,...u}=o,d=r==="outline"||r==="surface",p=r==="outline"?"ghost":r==="surface"?"soft":r;return e.jsx(Xe,{...u,border:d,size:c,children:e.jsx(ie,{size:c,severity:"info",variant:p,className:m(l,Ue.separators),merged:!0,gap:"0",direction:"column",ref:a,children:i})})})),Ke=n.memo(n.forwardRef((o,a)=>{const{variant:i}=re(),r=e.jsx(K,{ref:a,...o,radius:"large",variant:i});return i==="ghost"?e.jsx(t.Box,{asChild:!0,my:"1",mx:"2",children:r}):r})),Ye={Root:Qe,Item:Ke},Je=n.memo(function(a){const{title:i,description:r,content:c,closeDialog:l}=a;return e.jsxs(t.Flex,{direction:"column",gap:"2",children:[e.jsxs(t.Flex,{direction:"column",gap:"1",children:[e.jsxs(t.Flex,{justify:"between",children:[e.jsx(t.Dialog.Title,{mb:"0",children:i}),e.jsx(t.Dialog.Close,{children:e.jsx(t.IconButton,{color:"gray",variant:"ghost","aria-label":"Close",children:e.jsx(M.Cross1Icon,{})})})]}),r&&e.jsx(t.Dialog.Description,{children:r})]}),c(l)]})}),Ze=n.memo(n.forwardRef((o,a)=>{const{children:i,content:r,title:c,description:l,onOpen:u,defaultOpen:d,onCloseInterrupt:p,...f}=o,[g,C]=n.useState(d??!1),b=n.useCallback(h=>{if(h&&u)u();else if(!h&&p)return p(()=>C(!1));C(h)},[u,p]),y=n.useCallback(h=>{if(h!=null&&h.force)return C(!1);b(!1)},[b]);return e.jsxs(t.Dialog.Root,{open:g,onOpenChange:b,children:[e.jsx(t.Dialog.Trigger,{children:i}),e.jsx(t.Dialog.Content,{ref:a,...f,children:e.jsx(Je,{closeDialog:y,content:r,title:c,description:l})})]})})),_e=o=>e.jsx(t.AlertDialog.Title,{mb:"0",...o}),Re=o=>{const{title:a,description:i,actionText:r="Confirm",cancelText:c="Cancel",onAction:l,onCancel:u,severity:d}=o;return e.jsxs(t.Flex,{direction:"column",gap:"2",children:[e.jsxs(t.Flex,{direction:"column",gap:"1",children:[e.jsx(_e,{children:a}),e.jsx(t.AlertDialog.Description,{children:i})]}),e.jsxs(t.Flex,{gap:"3",mt:"4",justify:"end",children:[e.jsx(t.AlertDialog.Cancel,{children:e.jsx(K,{variant:"soft",severity:"info",onClick:u,children:c})}),e.jsx(t.AlertDialog.Action,{children:e.jsx(K,{variant:"solid",severity:d,onClick:l,children:r})})]})]})},ve=n.memo(function(a){const{open:i,setOpen:r,children:c,...l}=a,u=n.useMemo(()=>({close:()=>r(!1),Title:_e,Description:t.AlertDialog.Description}),[r]);return e.jsxs(t.AlertDialog.Root,{open:i,onOpenChange:r,children:[e.jsx(t.AlertDialog.Content,{children:"content"in l?l.content(u):e.jsx(Re,{...l})}),c]})}),le=n.createContext(()=>{throw new Error("No AlertDialogProvider found")}),en={content:()=>null},nn=n.memo(function({children:a}){const[i,r]=n.useState(!1),[c,l]=n.useState(en),u=n.useCallback(d=>{if(i)throw new Error("AlertDialog is already open");l(d),r(!0)},[i]);return e.jsx(ve,{open:i,setOpen:r,...c,children:e.jsx(le.Provider,{value:u,children:a})})}),we=()=>n.useContext(le),tn=()=>{const o=we();return n.useCallback(a=>o({title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",actionText:"Discard",severity:"danger",onAction:a.onDiscard,onCancel:a.onCancel}),[o])},ae={zeroMinWidth:"_zeroMinWidth_curjh_1",zeroMinHeight:"_zeroMinHeight_curjh_5",radius:"_radius_curjh_9"},Y=n.memo(n.forwardRef(({className:o,radius:a=!1,children:i,zeroMinWidth:r=!1,zeroMinHeight:c=!1,...l},u)=>e.jsx(t.Flex,{className:m(o,{[ae.radius]:a,[ae.zeroMinWidth]:r,[ae.zeroMinHeight]:c}),ref:u,...l,children:i}))),rn=n.memo(function({severity:a,itemContent:i,closeOnSelect:r=!0,onSelect:c,...l}){const u=T(a),d=n.useCallback(p=>{r||p.preventDefault(),c&&c(p)},[r,c]);return e.jsx(t.DropdownMenu.Item,{onSelect:d,color:u,...l,children:i})}),on=n.memo(function({defaultOpen:a,open:i,onOpenChange:r,modal:c,trigger:l,label:u,severity:d="info",children:p,...f}){const g=T(d);return e.jsxs(t.DropdownMenu.Root,{defaultOpen:a,open:i,onOpenChange:r,modal:c,children:[e.jsx(t.DropdownMenu.Trigger,{children:l}),e.jsxs(t.DropdownMenu.Content,{color:g,...f,children:[u&&e.jsx(t.DropdownMenu.Label,{children:u}),p]})]})}),ln=n.memo(function({separatorBelow:a=!1,separatorAbove:i=!1,children:r,...c}){return e.jsxs(e.Fragment,{children:[i&&e.jsx(t.DropdownMenu.Separator,{}),e.jsx(t.DropdownMenu.Group,{...c,children:r}),a&&e.jsx(t.DropdownMenu.Separator,{})]})}),an=n.memo(function({defaultOpen:a,open:i,onOpenChange:r,trigger:c,children:l,...u}){return e.jsxs(t.DropdownMenu.Sub,{defaultOpen:a,open:i,onOpenChange:r,children:[e.jsx(t.DropdownMenu.SubTrigger,{children:c}),e.jsx(t.DropdownMenu.SubContent,{...u,children:l})]})}),sn={Root:on,ItemGroup:ln,Item:rn,SubMenu:an},cn=n.memo(function({children:a}){const[i,r]=n.useState(!1),c=n.useCallback(()=>{r(!0)},[]),l=n.useCallback(()=>{r(!1)},[]);return a({isHovered:i,onPointerEnter:c,onPointerLeave:l})}),me={fluid:"_fluid_7n1wr_1"},dn=n.forwardRef(function({className:a,fluid:i,size:r="medium",variant:c="surface",severity:l="primary",itemSeverity:u="info",placeholder:d="Select",side:p,items:f=[],value:g,id:C,...b},y){const h=$(r,E),_=T(l),v=T(u);return n.createElement(t.Select.Root,{size:h,...b,key:g===void 0?1:0,value:g},e.jsx(t.Select.Trigger,{className:m(a,{[me.fluid]:i}),id:C,ref:y,variant:c,placeholder:d,color:_}),e.jsx(t.Select.Content,{side:p,className:me.contentDefault,position:"popper",variant:c!=="surface"?"soft":"solid",color:v,children:f.map(({itemContent:S,value:w,...P})=>e.jsx(t.Select.Item,{className:"overmap-select-item",value:w,...P,children:S},w))}))}),un=n.memo(dn),Se=n.memo(n.forwardRef((o,a)=>{const{checked:i,label:r,value:c,size:l="2"}=o;return e.jsx(t.Box,{asChild:!0,px:l,children:e.jsx(t.Select.Item,{value:c,ref:a,children:e.jsxs(t.Flex,{gap:l,align:"center",children:[e.jsx(t.Checkbox,{checked:i}),r]})})})})),J="__select_all__",fn=n.memo(n.forwardRef((o,a)=>{const[i,r]=n.useState(!1),{placeholder:c,value:l,onValueChange:u,options:d,disabled:p,name:f,...g}=o,C=$(o.size,E),b=T(o.severity),y=n.useMemo(()=>new Map(d.map(w=>[w.value,w.label])),[d]),h=l.length>4?`${l.length} options selected`:e.jsx("span",{children:l.flatMap(w=>[y.get(w),", "]).slice(0,-1)}),_=n.useCallback(()=>r(!1),[]),v=n.useCallback(w=>{w&&r(!0)},[]),S=n.useCallback(w=>{let P;w===J?P=l.length===d.length?[]:d.map(B=>B.value):P=l.includes(w)?l.filter(k=>k!==w):[...l,w],u(P)},[u,d,l]);return n.useEffect(()=>{if(d.some(({value:w})=>w===J))throw new Error(`Cannot have an option with the value "${J}"`)},[d]),e.jsxs(t.Select.Root,{open:i,value:"",onOpenChange:v,onValueChange:S,disabled:p,size:C,name:f,autoComplete:"off",children:[e.jsx(t.Select.Trigger,{ref:a,color:b,placeholder:l.length>0?h:c,"data-placeholder":l.length>0?void 0:!0,...g}),e.jsxs(t.Select.Content,{color:"gray",variant:"soft",position:"popper",onEscapeKeyDown:_,onPointerDownOutside:_,children:[e.jsx(Se,{value:J,label:"Select all",checked:l.length===d.length,size:C}),d.map(w=>e.jsx(Se,{...w,checked:l.includes(w.value),size:C},w.value))]})]})})),pn={default:"_default_u936h_1"},gn=n.forwardRef(function({className:a,severity:i="primary",icon:r,defaultChecked:c=!1,onCheckedChange:l,...u},d){const p=n.useRef(null),[f,g]=n.useState(u.checked?u.checked:c),[C,b]=n.useState(),y=T(i);n.useLayoutEffect(()=>{var S;const v=d||p;"current"in v&&v.current&&b((S=v.current)==null?void 0:S.querySelector("span.rt-SwitchThumb"))},[d]);const h=n.useCallback(v=>{g(v),l&&l(v)},[l]),_=u.checked?u.checked:f;return e.jsxs(e.Fragment,{children:[e.jsx(t.Switch,{className:m("overmap-switch",a,pn.default),ref:d||p,color:y,radius:"full",defaultChecked:c,onCheckedChange:h,...u}),e.jsx(t.Portal,{container:C,asChild:!0,children:r&&"checked"in r?_?r.checked:r.unchecked:r})]})}),hn=n.memo(gn),A={sidebarContent:"_sidebarContent_1onyo_1",right:"_right_1onyo_7",resizeHandle:"_resizeHandle_1onyo_10",left:"_left_1onyo_13",overlay:"_overlay_1onyo_33"},Cn={width:"auto",height:"100%"},bn=n.forwardRef(function({side:a="left",modal:i=!0,children:r,open:c,containerSelector:l,overlay:u=!0,resizable:d=!0,minWidth:p="300px",maxWidth:f="500px",...g},C){const b=a==="right",y=a==="left",[h,_]=n.useState();return n.useEffect(()=>{const v=l??'[data-is-root-theme="true"]',S=document.querySelector(v);if(S===void 0)throw new Error(`Could not find a container element using the following selector ${v}`);_(S)},[l]),e.jsx(Q.Root,{open:c,modal:i,children:e.jsxs(Q.Portal,{container:h,children:[u&&e.jsx(Q.Overlay,{className:m(A.overlay)}),e.jsx(Q.Content,{className:m("overmap-sidebar","rt-DialogContent",A.sidebarContent,{[A.left]:y,[A.right]:b}),ref:C,asChild:!0,...g,children:e.jsx(t.Box,{width:"auto",children:e.jsx(X.Resizable,{minWidth:p,maxWidth:f,defaultSize:Cn,enable:{right:d&&y,left:d&&b},handleClasses:{left:A.resizeHandle,right:A.resizeHandle},handleComponent:{right:e.jsx(M.DragHandleDots2Icon,{}),left:e.jsx(M.DragHandleDots2Icon,{})},children:r})})})]})})}),yn=n.memo(bn),G={content:"_content_jyaca_1",left:"_left_jyaca_10",right:"_right_jyaca_13",resizable:"_resizable_jyaca_17",slideOutOverlay:"_slideOutOverlay_jyaca_21"},Oe=200,_n={enter:0,exit:Oe},vn=n.memo(function({open:a,side:i="left",container:r,children:c,minWidth:l,maxWidth:u,resizable:d=!0,overlay:p=!1,modal:f=!1,resizeHandle:g,...C}){const b=n.useRef(null),[y,h]=n.useState(l),[_,v]=n.useState(),S=i==="left",w=i==="right";n.useEffect(()=>{v(document.querySelector('[data-is-root-theme="true"]'))},[]);const P=n.useCallback((V,ke,ue,q)=>{h(ue.clientWidth)},[]),k=n.useCallback(()=>{b.current&&(b.current.style.transform=`translateX(${w?100:-100}%)`)},[w]),B=n.useCallback(()=>{b.current&&(b.current.style.transition=`transform ${Oe}ms linear`)},[]),de=n.useCallback(()=>{b.current&&(b.current.style.transform="translateX(0)")},[]);return e.jsx(W.Root,{open:!0,modal:f,children:e.jsx(ne.Transition,{in:a,timeout:_n,nodeRef:b,onEnter:k,onEntering:B,onEntered:de,onExiting:B,onExit:k,unmountOnExit:!0,mountOnEnter:!0,children:()=>e.jsxs(W.Portal,{container:r||_,children:[p&&e.jsx(W.Overlay,{className:G.slideOutOverlay}),e.jsx(W.Content,{className:m("overmap-slide-out",G.content,{[G.left]:S,[G.right]:w}),asChild:!0,...C,children:e.jsx(t.Box,{width:"auto",ref:b,children:e.jsx(X.Resizable,{className:G.resizable,defaultSize:{width:y,height:"100%"},onResize:P,enable:{right:d&&S,left:d&&w},handleComponent:{left:g,right:g},minWidth:l,maxWidth:u,children:c})})})]})})})}),N={accommodateCharCount:"_accommodateCharCount_sr18k_1",wrapper:"_wrapper_sr18k_5",default:"_default_sr18k_9",noLeftIcon:"_noLeftIcon_sr18k_13",noRightIcon:"_noRightIcon_sr18k_17",charCount:"_charCount_sr18k_21"},wn=n.forwardRef(function({className:a,leftSlot:i,rightSlot:r,size:c="medium",showInputLength:l,value:u,variant:d,severity:p="primary",...f},g){const C=$(c,E),b=T(p),y=l||l===void 0&&f.maxLength!==void 0,h=u!==void 0?u.toString():void 0;return e.jsxs(t.TextField.Root,{className:m(N.wrapper,{[N.accommodateCharCount]:y}),size:C,variant:d,color:b,children:[i&&e.jsx(t.TextField.Slot,{children:i}),e.jsx(t.TextField.Input,{className:m(N.default,a,{[N.noLeftIcon]:!i,[N.noRightIcon]:!r}),ref:g,size:C,variant:d,color:b,...f}),r&&e.jsx(t.TextField.Slot,{children:r}),y&&e.jsx(t.Text,{as:"p",className:N.charCount,size:"1",color:"gray",children:f.maxLength!==void 0?`${h==null?void 0:h.length}/${f.maxLength}`:`${h==null?void 0:h.length}`})]})}),mn=n.memo(wn),Sn={wrapper:"_wrapper_tmtz0_1"},On=n.forwardRef(function({className:a,defaultOpen:i=!1,modal:r=!1,content:c,children:l,...u},d){return e.jsxs(t.Popover.Root,{defaultOpen:i,modal:r,children:[e.jsx(t.Popover.Trigger,{children:l}),e.jsx(t.Popover.Content,{ref:d,className:m("overmap-popover",a,Sn.wrapper),...u,children:c(t.Popover.Close)})]})}),Tn=n.memo(On),D={wrapper:"_wrapper_1ssf2_1",panelContent:"_panelContent_1ssf2_6",left:"_left_1ssf2_14",right:"_right_1ssf2_18",resizable:"_resizable_1ssf2_23",resizeHandle:"_resizeHandle_1ssf2_28",panelMainContent:"_panelMainContent_1ssf2_48"},Te=200,I=150,Pn=n.memo(function({children:a,showLeft:i,leftPanel:r,leftMinWidth:c=Te,showRight:l,rightPanel:u,rightMinWidth:d=Te,resizeable:p}){const f=n.useRef(null),g=n.useRef(null),[C,b]=n.useState(0),[y,h]=n.useState(),_=n.useRef(null),[v,S]=n.useState(0),[w,P]=n.useState(),k=n.useCallback((O,x,z)=>(j,je,Me,fe)=>{if(!f.current)return;const Z=O+fe.width;z(f.current.clientWidth-Z),x(()=>Z)},[]),B=n.useCallback((O,x,z,j)=>k(C,b,P)(O,x,z,j),[k,C]),de=n.useCallback((O,x,z,j)=>k(v,S,h)(O,x,z,j),[k,v]),V=n.useCallback((O,x,z,j,je,Me,fe,Z)=>{if(!f.current)return;let R=O;if(R===0&&(R=x,z(R)),Me){const ee=f.current.clientWidth-R;Z(ee),je>ee&&(fe(ee),j(f.current.clientWidth-ee))}},[]),ke=n.useCallback(()=>V(v,d,S,P,C,i,b,h),[V,C,d,v,i]),ue=n.useCallback(()=>V(C,c,b,h,v,l,S,P),[V,c,C,v,l]),q=n.useCallback((O,x)=>{f.current&&O&&x(f.current.clientWidth)},[]),Xn=n.useCallback(()=>q(i,h),[q,i]),Qn=n.useCallback(()=>q(l,P),[q,l]),ze=n.useCallback(()=>{var O,x,z,j;f.current&&(h(f.current.clientWidth-(((O=_.current)==null?void 0:O.clientWidth)||0)),P(f.current.clientWidth-(((x=g.current)==null?void 0:x.clientWidth)||0)),b(((z=g.current)==null?void 0:z.clientWidth)||0),S(((j=_.current)==null?void 0:j.clientWidth)||0))},[]);n.useEffect(()=>{if(!f.current)return;const O=new ResizeObserver(ze);return O.observe(f.current),()=>{O.disconnect()}},[ze]);const Kn=n.useMemo(()=>({entering:{transform:`translateX(-${C}px)`,marginRight:`-${C}px`,transitionProperty:"transform, margin-right",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginRight:0,transitionProperty:"transform, margin-right",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(-${C}px)`,marginRight:`-${C}px`,transitionProperty:"transform, margin-right",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[C]),Yn=n.useMemo(()=>({entering:{transform:`translateX(${v}px)`,marginLeft:`${-v}px`,transitionProperty:"transform, margin-left",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginLeft:0,transitionProperty:"transform, margin-left",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(${v}px)`,marginLeft:`${-v}px`,transitionProperty:"transform, margin-left",transitionDuration:`${I}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[v]);return e.jsxs(t.Flex,{className:D.wrapper,style:{minWidth:`${c+d}px`},ref:f,width:"100%",height:"100%",justify:"center",m:"0",p:"0",children:[e.jsx(ne.Transition,{nodeRef:g,timeout:i?0:I,in:i,unmountOnExit:!0,onEntering:ue,onExited:Qn,children:O=>e.jsx(t.Box,{ref:g,className:m(D.panelContent,D.left),style:Kn[O],width:"auto",height:"100%",m:"0",p:"0",children:e.jsx(X.Resizable,{className:D.resizable,size:{width:C,height:"100%"},onResizeStop:B,enable:{right:(p==null?void 0:p.left)!==void 0?p.left:!0},minWidth:c,maxWidth:y,handleClasses:{right:m(D.resizeHandle,D.left)},handleComponent:{right:e.jsx(M.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:r})})}),e.jsx("div",{className:D.panelMainContent,children:a}),e.jsx(ne.Transition,{nodeRef:_,timeout:l?0:I,in:l,unmountOnExit:!0,onEntering:ke,onExited:Xn,children:O=>e.jsx(t.Box,{ref:_,className:m(D.panelContent,D.right),style:Yn[O],width:"auto",height:"100%",m:"0",p:"0",children:e.jsx(X.Resizable,{className:D.resizable,size:{width:v,height:"100%"},onResizeStop:de,enable:{left:(p==null?void 0:p.right)!==void 0?p.right:!0},minWidth:d,maxWidth:w,handleClasses:{left:m(D.resizeHandle,D.right)},handleComponent:{left:e.jsx(M.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:u})})})]})}),Dn={charCount:"_charCount_17uut_1"},xn=n.forwardRef(function({className:a,showInputLength:i,inputLengthTemplate:r,value:c,severity:l="primary",resize:u,...d},p){const f=T(l),g=T("info"),C=i||i===void 0&&(d.maxLength!==void 0||d.minLength!==void 0),b=c!==void 0?c.toString():"",y=n.useMemo(()=>{if(r){let h=r.replace("{current}",b.length.toString());return d.minLength!==void 0&&(h=h.replace("{min}",d.minLength.toString())),d.maxLength!==void 0&&(h=h.replace("{max}",d.maxLength.toString())),h}return b.length},[r,d.maxLength,d.minLength,b.length]);return e.jsxs(e.Fragment,{children:[e.jsx(t.TextArea,{className:m("overmap-textarea",a),style:{resize:u},ref:p,value:c,color:f,...d}),C&&e.jsx(t.Text,{as:"p",className:Dn.charCount,color:g,align:"right",children:y})]})}),kn=n.memo(xn),zn=n.forwardRef(function({loop:a,type:i,rovingFocus:r,value:c,onValueChange:l,defaultValue:u,disabled:d,items:p,className:f,direction:g="row",...C},b){return e.jsx(ge.Root,{type:i,className:m("overmap-toggle-group",f),ref:b,value:c,onValueChange:l,disabled:d,orientation:g==="column"?"vertical":"horizontal",loop:a,rovingFocus:r,defaultValue:u,asChild:!0,children:e.jsx(ie,{direction:g,...C,children:p.map(({children:y,...h})=>n.createElement(ge.Item,{asChild:!0,...h,key:h.value},e.jsx(oe,{className:m("overmap-toggle-group-button"),"aria-label":h.value,variant:h.value===c?"solid":"soft",children:y})))})})}),jn=n.memo(zn),Mn={default:"_default_xqvoc_1"},Pe=n.memo(n.forwardRef(({className:o,minContentGap:a="2",children:i,...r},c)=>e.jsx($e.Root,{className:m(o,"overmap-toolbar",Mn.default),ref:c,asChild:!0,...r,children:e.jsx(Y,{grow:"1",width:"100%",height:"max-content",align:"center",gap:a,wrap:"nowrap",children:i})}))),$n=n.memo(n.forwardRef(({children:o,gap:a="2"},i)=>e.jsx(Y,{ref:i,grow:"1",width:"max-content",height:"100%",align:"center",gap:a,children:o}))),In=n.memo(n.forwardRef(({children:o,gap:a},i)=>e.jsx(Y,{ref:i,grow:"1",width:"max-content",direction:"row-reverse",height:"100%",align:"center",gap:a||"2",children:o}))),En={Root:Pe,LeftContent:$n,RightContent:In},se={ToastViewport:"_ToastViewport_1i6bp_1",actionButton:"_actionButton_1i6bp_20",ToastRoot:"_ToastRoot_1i6bp_24",slideIn:"_slideIn_1i6bp_1",swipeOut:"_swipeOut_1i6bp_1"},An=n.forwardRef(function({title:a,description:i,icon:r,severity:c="primary",size:l,onClose:u,sensitivity:d,action:p,...f},g){const[C,b]=n.useState(!0),y=T(c),h=n.useCallback(_=>{!_&&u&&u(),b(_)},[u]);return e.jsx(F.Root,{asChild:!0,ref:g,...f,open:C,type:d,onOpenChange:h,children:e.jsx(t.Callout.Root,{className:se.ToastRoot,variant:"surface",color:y,size:l,children:e.jsxs(t.Flex,{width:"100%",align:"center",gap:"4",justify:"between",children:[e.jsxs(t.Flex,{align:"center",gap:"3",children:[e.jsx(t.Callout.Icon,{children:r}),e.jsxs(t.Flex,{direction:"column",gap:"2",children:[e.jsxs(t.Flex,{direction:"column",gap:"0",children:[e.jsx(F.Title,{asChild:!0,children:e.jsx(t.Callout.Text,{size:"3",weight:"medium",children:a})}),e.jsx(F.Description,{asChild:!0,children:e.jsx(t.Callout.Text,{children:i})})]}),p&&e.jsx(F.Action,{className:se.actionButton,altText:p.altText,asChild:!0,children:p.content})]})]}),e.jsx(F.Close,{asChild:!0,children:e.jsx(oe,{"aria-label":"Close",variant:"ghost",severity:c,children:e.jsx(M.Cross2Icon,{})})})]})})})}),De=n.memo(An),ce=n.createContext({}),Nn=()=>{const o=n.useContext(ce);if(!o)throw new Error("useToast must be used within a ToastProvider");return o},Bn=240/60,xe=5e3,Ln=o=>{if(o.duration&&o.duration>=xe)return o.duration;const a=o.severity==="danger"?1.5:1,i=o.description.split(" ").length+o.title.split(" ").length;return(xe+i/Bn)*a};s.unsafeShowToast=void 0;const Wn=n.memo(function({children:a,className:i,hotkey:r,...c}){const[l,u]=n.useState([]),d=n.useCallback((f,g,C)=>{u(b=>{const y=b.find(h=>h.id===f);return y&&g===0&&clearTimeout(y.timeout),b.filter(h=>h.id!==f)}),C&&C()},[]),p=n.useMemo(()=>{let f=0;const g=_=>{const v=Ln(_),S=f.toString();f+=1;const w=setTimeout(()=>d(S,1,_.onClose),v);u(P=>[...P,{..._,timeout:w,duration:v,id:S}])},C=_=>g({..._,severity:"primary"}),b=_=>g({..._,severity:"success"}),y=_=>g({..._,severity:"danger"}),h=_=>g({..._,severity:"info"});return s.unsafeShowToast=g,{showToast:g,showPrimary:C,showSuccess:b,showError:y,showInfo:h}},[d]);return n.useEffect(()=>()=>{for(const{timeout:f}of l)clearTimeout(f)},[]),e.jsx(ce.Provider,{value:p,children:e.jsxs(te.ToastProvider,{...c,children:[a,e.jsx(te.ToastViewport,{className:m(i,se.ToastViewport),hotkey:r}),l.map(({id:f,onClose:g,...C})=>e.jsx(De,{...C,onClose:()=>d(f,0,g)},f))]})})}),Fn={noWrap:"_noWrap_1wpa5_1"},Hn=n.memo(n.forwardRef(({className:o,noWrap:a,severity:i,as:r,...c},l)=>{const u=T(i);return e.jsx(t.Text,{ref:l,as:r,className:m(o,{[Fn.noWrap]:a}),color:u,...c})})),Bt="",Gn=n.memo(n.forwardRef((o,a)=>{const{panelBackground:i="solid",radius:r="full",...c}=o;return e.jsx(t.Theme,{panelBackground:i,radius:r,ref:a,...c})})),Vn={1:"max-content",2:"max-content",3:"max-content",4:"100%"},qn=n.forwardRef(function({severity:a="info",weight:i="light",gap:r="1",text:c,orientation:l="horizontal",size:u,...d},p){const f=$(u,Vn),g=T(a);return e.jsxs(t.Flex,{ref:p,width:l==="horizontal"?f:"max-content",height:l==="vertical"?f:"max-content",direction:l==="vertical"?"column":"row",align:"center",gap:r,children:[e.jsx(t.Separator,{size:u,orientation:l,color:g,...d}),c&&e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{as:"span",size:"1",weight:i,color:g,children:c}),e.jsx(t.Separator,{size:u,orientation:l,color:g,...d})]})]})}),Un=n.memo(qn);Object.defineProperty(s,"AccessibleIcon",{enumerable:!0,get:()=>t.AccessibleIcon}),Object.defineProperty(s,"AspectRatio",{enumerable:!0,get:()=>t.AspectRatio}),Object.defineProperty(s,"Avatar",{enumerable:!0,get:()=>t.Avatar}),Object.defineProperty(s,"Blockquote",{enumerable:!0,get:()=>t.Blockquote}),Object.defineProperty(s,"Box",{enumerable:!0,get:()=>t.Box}),Object.defineProperty(s,"Callout",{enumerable:!0,get:()=>t.Callout}),Object.defineProperty(s,"Card",{enumerable:!0,get:()=>t.Card}),Object.defineProperty(s,"Checkbox",{enumerable:!0,get:()=>t.Checkbox}),Object.defineProperty(s,"Code",{enumerable:!0,get:()=>t.Code}),Object.defineProperty(s,"Container",{enumerable:!0,get:()=>t.Container}),Object.defineProperty(s,"ContextMenu",{enumerable:!0,get:()=>t.ContextMenu}),Object.defineProperty(s,"Em",{enumerable:!0,get:()=>t.Em}),Object.defineProperty(s,"Grid",{enumerable:!0,get:()=>t.Grid}),Object.defineProperty(s,"Heading",{enumerable:!0,get:()=>t.Heading}),Object.defineProperty(s,"HoverCard",{enumerable:!0,get:()=>t.HoverCard}),Object.defineProperty(s,"Inset",{enumerable:!0,get:()=>t.Inset}),Object.defineProperty(s,"Kbd",{enumerable:!0,get:()=>t.Kbd}),Object.defineProperty(s,"Link",{enumerable:!0,get:()=>t.Link}),Object.defineProperty(s,"Portal",{enumerable:!0,get:()=>t.Portal}),Object.defineProperty(s,"Quote",{enumerable:!0,get:()=>t.Quote}),Object.defineProperty(s,"RadioGroup",{enumerable:!0,get:()=>t.RadioGroup}),Object.defineProperty(s,"ScrollArea",{enumerable:!0,get:()=>t.ScrollArea}),Object.defineProperty(s,"Section",{enumerable:!0,get:()=>t.Section}),Object.defineProperty(s,"Slider",{enumerable:!0,get:()=>t.Slider}),Object.defineProperty(s,"Slot",{enumerable:!0,get:()=>t.Slot}),Object.defineProperty(s,"Strong",{enumerable:!0,get:()=>t.Strong}),Object.defineProperty(s,"Table",{enumerable:!0,get:()=>t.Table}),Object.defineProperty(s,"Tabs",{enumerable:!0,get:()=>t.Tabs}),Object.defineProperty(s,"TextField",{enumerable:!0,get:()=>t.TextField}),Object.defineProperty(s,"Theme",{enumerable:!0,get:()=>t.Theme}),Object.defineProperty(s,"Tooltip",{enumerable:!0,get:()=>t.Tooltip}),Object.defineProperty(s,"VisuallyHidden",{enumerable:!0,get:()=>t.VisuallyHidden}),Object.defineProperty(s,"updateThemeAppearanceClass",{enumerable:!0,get:()=>t.updateThemeAppearanceClass}),Object.defineProperty(s,"useThemeContext",{enumerable:!0,get:()=>t.useThemeContext}),s.AlertDialog=ve,s.AlertDialogContent=le,s.AlertDialogProvider=nn,s.Badge=Le,s.Button=K,s.ButtonGroup=ie,s.ButtonList=Ye,s.DefaultTheme=Gn,s.Dialog=Ze,s.DropdownMenu=sn,s.Flex=Y,s.HoverUtility=cn,s.IconButton=oe,s.Input=mn,s.LeftAndRightPanels=Pn,s.MultiSelect=fn,s.Popover=Tn,s.Root=Pe,s.Select=un,s.Separator=Un,s.Sidebar=yn,s.SlideOut=vn,s.Switch=hn,s.Text=Hn,s.TextArea=kn,s.Toast=De,s.ToastContext=ce,s.ToastProvider=Wn,s.ToggleGroup=jn,s.Toolbar=En,s.divButtonProps=We,s.useAlertDialog=we,s.useDiscardAlertDialog=tn,s.useSeverityColor=T,s.useToast=Nn,s.useViewportSize=Ne,Object.keys(pe).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:()=>pe[o]})}),Object.keys(M).forEach(o=>{o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&Object.defineProperty(s,o,{enumerable:!0,get:()=>M[o]})}),Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
5
+ */(function(i){(function(){var s={}.hasOwnProperty;function l(){for(var r=[],c=0;c<arguments.length;c++){var o=arguments[c];if(o){var u=typeof o;if(u==="string"||u==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var d=l.apply(null,o);d&&r.push(d)}}else if(u==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var p in o)s.call(o,p)&&o[p]&&r.push(p)}}}return r.join(" ")}i.exports?(l.default=l,i.exports=l):window.classNames=l})()})(pe);var $e=pe.exports;const m=Me($e);function $(i,s){return t.useMemo(()=>{if(i!==void 0)if(typeof i=="object"){if(!("initial"in i))throw new Error("Expected initial property to be set in Responsive object");return Object.fromEntries(Object.entries(i).map(([l,r])=>[l,s[r]]))}else return s[i]},[s,i])}const je={success:"green",danger:"red",info:"gray"},P=i=>{const s=n.useThemeContext();if(i)return i==="primary"?s.accentColor:je[i]},Ie=()=>{const[i,s]=t.useState("initial"),[l,r]=t.useState("initial"),c=W.useMediaQuery({minWidth:"520px"}),o=W.useMediaQuery({minWidth:"768px"}),u=W.useMediaQuery({minWidth:"1024px"}),d=W.useMediaQuery({minWidth:"1280px"}),p=W.useMediaQuery({minWidth:"1640px"});return t.useLayoutEffect(()=>{r(f=>(s(f),p?"xl":d?"lg":u?"md":o?"sm":c?"xs":"initial"))},[d,u,o,p,c]),{size:l,prevSize:i,xs:c,sm:o,md:u,lg:d,xl:p}},Ne=t.forwardRef(function({className:s,severity:l="primary",color:r,children:c,...o},u){const d=P(l);return e.jsx(n.Badge,{className:m("overmap-badge",s),ref:u,color:r||d,...o,children:c})}),Ee=t.memo(Ne),H={fluid:"_fluid_r73gr_1",hoverSpin90Clockwise:"_hoverSpin90Clockwise_r73gr_15",hoverSpin180Clockwise:"_hoverSpin180Clockwise_r73gr_25",hoverSpin360Clockwise:"_hoverSpin360Clockwise_r73gr_35"},ge={spin90Clockwise:H.hoverSpin90Clockwise,spin180Clockwise:H.hoverSpin180Clockwise,spin360Clockwise:H.hoverSpin360Clockwise},Be={role:"button",tabIndex:0,onKeyDown:i=>{(i.key==="Enter"||i.key===" ")&&i.currentTarget.click()}},N={small:"1",medium:"2",large:"3"},he=t.createContext({}),ne=()=>t.useContext(he),Le=t.forwardRef(function(s,l){const r=ne(),{className:c,type:o="button",fluid:u=r.fluid??!1,size:d=r.size??"medium",severity:p=r.severity??"primary",hoverEffects:f=r.hoverEffects??[],variant:h=r.variant,...C}=s,b=P(p),v=f.map(g=>ge[g]);return e.jsx(n.Button,{ref:l,type:o,className:m(c,v,{[H.fluid]:u}),color:b,size:$(d,N),variant:h,...C})}),Q=t.memo(Le),We=t.forwardRef(function(s,l){const r=ne(),{className:c,children:o,type:u="button",fluid:d=r.fluid??!1,size:p=r.size??"medium",severity:f=r.severity??"primary",hoverEffects:h=r.hoverEffects??[],variant:C=r.variant,...b}=s,v=P(f),g=(h==null?void 0:h.map(_=>ge[_]))||[];return e.jsx(n.IconButton,{className:m(c,g,{[H.fluid]:d}),ref:l,color:v,size:$(p,N),variant:C,type:u,...b,children:o})}),re=t.memo(We),Fe={merged:"_merged_wdgxo_1"},He={row:{small:"4",medium:"4",large:"5"},column:{small:"2",medium:"3",large:"4"}},Ge=t.forwardRef(function({className:s,merged:l=!1,children:r,gap:c,direction:o="row",severity:u,size:d="medium",variant:p,hoverEffects:f,fluid:h,...C},b){const v=$(d,He[o]),g=p==="ghost"?v:"0";return e.jsx(n.Flex,{className:m("overmap-button-group",s,{[Fe.merged]:l}),ref:b,gap:l?c??g:c??"2",direction:o,"data-direction":o,...C,children:e.jsx(he.Provider,{value:{size:d,severity:u,variant:p,hoverEffects:f,fluid:h},children:r})})}),oe=t.memo(Ge),Ve={separators:"_separators_1f7v1_1"},qe=t.memo(t.forwardRef((i,s)=>{const{children:l,border:r,before:c,after:o,size:u}=i,d=r?"surface":"ghost",p=$(u,N),f=c&&o?e.jsx(n.Inset,{side:"x",pt:"current",pb:"current",children:l}):c?e.jsx(n.Inset,{side:"bottom",pt:"current",children:l}):o?e.jsx(n.Inset,{side:"top",pb:"current",children:l}):e.jsx(n.Inset,{children:l}),h=e.jsxs(n.Card,{ref:s,size:p,variant:d,children:[c,f,o]});return d==="ghost"?e.jsx(n.Box,{p:"3",children:h}):h})),Qe=t.memo(t.forwardRef((i,s)=>{const{children:l,variant:r="outline",size:c,className:o,...u}=i,d=r==="outline"||r==="surface",p=r==="outline"?"ghost":r==="surface"?"soft":r;return e.jsx(qe,{...u,border:d,size:c,children:e.jsx(oe,{size:c,severity:"info",variant:p,className:m(o,Ve.separators),merged:!0,gap:"0",direction:"column",ref:s,children:l})})})),Ue=t.memo(t.forwardRef((i,s)=>{const{variant:l}=ne(),r=e.jsx(Q,{ref:s,...i,radius:"large",variant:l});return l==="ghost"?e.jsx(n.Box,{asChild:!0,my:"1",mx:"2",children:r}):r})),Xe={Root:Qe,Item:Ue},Ke=t.memo(function(s){const{title:l,description:r,content:c,closeDialog:o}=s;return e.jsxs(n.Flex,{direction:"column",gap:"2",children:[e.jsxs(n.Flex,{direction:"column",gap:"1",children:[e.jsxs(n.Flex,{justify:"between",children:[e.jsx(n.Dialog.Title,{mb:"0",children:l}),e.jsx(n.Dialog.Close,{children:e.jsx(n.IconButton,{color:"gray",variant:"ghost","aria-label":"Close",children:e.jsx(M.Cross1Icon,{})})})]}),r&&e.jsx(n.Dialog.Description,{children:r})]}),c(o)]})}),Ye=t.memo(t.forwardRef((i,s)=>{const{children:l,content:r,title:c,description:o,onOpen:u,defaultOpen:d,onCloseInterrupt:p,...f}=i,[h,C]=t.useState(d??!1),b=t.useCallback(g=>{if(g&&u)u();else if(!g&&p)return p(()=>C(!1));C(g)},[u,p]),v=t.useCallback(g=>{if(g!=null&&g.force)return C(!1);b(!1)},[b]);return e.jsxs(n.Dialog.Root,{open:h,onOpenChange:b,children:[e.jsx(n.Dialog.Trigger,{children:l}),e.jsx(n.Dialog.Content,{ref:s,...f,children:e.jsx(Ke,{closeDialog:v,content:r,title:c,description:o})})]})})),Ce=i=>e.jsx(n.AlertDialog.Title,{mb:"0",...i}),Je=i=>{const{title:s,description:l,actionText:r="Confirm",cancelText:c="Cancel",onAction:o,onCancel:u,severity:d}=i;return e.jsxs(n.Flex,{direction:"column",gap:"2",children:[e.jsxs(n.Flex,{direction:"column",gap:"1",children:[e.jsx(Ce,{children:s}),e.jsx(n.AlertDialog.Description,{children:l})]}),e.jsxs(n.Flex,{gap:"3",mt:"4",justify:"end",children:[e.jsx(n.AlertDialog.Cancel,{children:e.jsx(Q,{variant:"soft",severity:"info",onClick:u,children:c})}),e.jsx(n.AlertDialog.Action,{children:e.jsx(Q,{variant:"solid",severity:d,onClick:o,children:r})})]})]})},be=t.memo(function(s){const{open:l,setOpen:r,children:c,...o}=s,u=t.useMemo(()=>({close:()=>r(!1),Title:Ce,Description:n.AlertDialog.Description}),[r]);return e.jsxs(n.AlertDialog.Root,{open:l,onOpenChange:r,children:[e.jsx(n.AlertDialog.Content,{children:"content"in o?o.content(u):e.jsx(Je,{...o})}),c]})}),ie=t.createContext(()=>{throw new Error("No AlertDialogProvider found")}),Ze={content:()=>null},Re=t.memo(function({children:s}){const[l,r]=t.useState(!1),[c,o]=t.useState(Ze),u=t.useCallback(d=>{if(l)throw new Error("AlertDialog is already open");o(d),r(!0)},[l]);return e.jsx(be,{open:l,setOpen:r,...c,children:e.jsx(ie.Provider,{value:u,children:s})})}),ve=()=>t.useContext(ie),et=()=>{const i=ve();return t.useCallback(s=>i({title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",actionText:"Discard",severity:"danger",onAction:s.onDiscard,onCancel:s.onCancel}),[i])},le={zeroMinWidth:"_zeroMinWidth_curjh_1",zeroMinHeight:"_zeroMinHeight_curjh_5",radius:"_radius_curjh_9"},U=t.memo(t.forwardRef(({className:i,radius:s=!1,children:l,zeroMinWidth:r=!1,zeroMinHeight:c=!1,...o},u)=>e.jsx(n.Flex,{className:m(i,{[le.radius]:s,[le.zeroMinWidth]:r,[le.zeroMinHeight]:c}),ref:u,...o,children:l}))),tt=t.memo(function({severity:s,itemContent:l,closeOnSelect:r=!0,onSelect:c,...o}){const u=P(s),d=t.useCallback(p=>{r||p.preventDefault(),c&&c(p)},[r,c]);return e.jsx(n.DropdownMenu.Item,{onSelect:d,color:u,...o,children:l})}),nt=t.memo(function({defaultOpen:s,open:l,onOpenChange:r,modal:c,trigger:o,label:u,severity:d="info",children:p,...f}){const h=P(d);return e.jsxs(n.DropdownMenu.Root,{defaultOpen:s,open:l,onOpenChange:r,modal:c,children:[e.jsx(n.DropdownMenu.Trigger,{children:o}),e.jsxs(n.DropdownMenu.Content,{color:h,...f,children:[u&&e.jsx(n.DropdownMenu.Label,{children:u}),p]})]})}),rt=t.memo(function({separatorBelow:s=!1,separatorAbove:l=!1,children:r,...c}){return e.jsxs(e.Fragment,{children:[l&&e.jsx(n.DropdownMenu.Separator,{}),e.jsx(n.DropdownMenu.Group,{...c,children:r}),s&&e.jsx(n.DropdownMenu.Separator,{})]})}),ot=t.memo(function({defaultOpen:s,open:l,onOpenChange:r,trigger:c,children:o,...u}){return e.jsxs(n.DropdownMenu.Sub,{defaultOpen:s,open:l,onOpenChange:r,children:[e.jsx(n.DropdownMenu.SubTrigger,{children:c}),e.jsx(n.DropdownMenu.SubContent,{...u,children:o})]})}),it={Root:nt,ItemGroup:rt,Item:tt,SubMenu:ot},lt=t.memo(function({children:s}){const[l,r]=t.useState(!1),c=t.useCallback(()=>{r(!0)},[]),o=t.useCallback(()=>{r(!1)},[]);return s({isHovered:l,onPointerEnter:c,onPointerLeave:o})}),_e={fluid:"_fluid_7n1wr_1"},at=t.forwardRef(function({className:s,fluid:l,size:r="medium",variant:c="surface",severity:o="primary",itemSeverity:u="info",placeholder:d="Select",side:p,items:f=[],value:h,id:C,...b},v){const g=$(r,N),_=P(o),y=P(u);return t.createElement(n.Select.Root,{size:g,...b,key:h===void 0?1:0,value:h},e.jsx(n.Select.Trigger,{className:m(s,{[_e.fluid]:l}),id:C,ref:v,variant:c,placeholder:d,color:_}),e.jsx(n.Select.Content,{side:p,className:_e.contentDefault,position:"popper",variant:c!=="surface"?"soft":"solid",color:y,children:f.map(({itemContent:S,value:w,...T})=>e.jsx(n.Select.Item,{className:"overmap-select-item",value:w,...T,children:S},w))}))}),st=t.memo(at),ye=t.memo(t.forwardRef((i,s)=>{const{checked:l,label:r,value:c,size:o="2"}=i;return e.jsx(n.Box,{asChild:!0,px:o,children:e.jsx(n.Select.Item,{value:c,ref:s,children:e.jsxs(n.Flex,{gap:o,align:"center",children:[e.jsx(n.Checkbox,{checked:l}),r]})})})})),X="__select_all__",ct=t.memo(t.forwardRef((i,s)=>{const[l,r]=t.useState(!1),{placeholder:c,value:o,onValueChange:u,options:d,disabled:p,name:f,...h}=i,C=$(i.size,N),b=P(i.severity),v=t.useMemo(()=>new Map(d.map(w=>[w.value,w.label])),[d]),g=o.length>4?`${o.length} options selected`:e.jsx("span",{children:o.flatMap(w=>[v.get(w),", "]).slice(0,-1)}),_=t.useCallback(()=>r(!1),[]),y=t.useCallback(w=>{w&&r(!0)},[]),S=t.useCallback(w=>{let T;w===X?T=o.length===d.length?[]:d.map(L=>L.value):T=o.includes(w)?o.filter(I=>I!==w):[...o,w],u(T)},[u,d,o]);return t.useEffect(()=>{if(d.some(({value:w})=>w===X))throw new Error(`Cannot have an option with the value "${X}"`)},[d]),e.jsxs(n.Select.Root,{open:l,value:"",onOpenChange:y,onValueChange:S,disabled:p,size:C,name:f,autoComplete:"off",children:[e.jsx(n.Select.Trigger,{ref:s,color:b,placeholder:o.length>0?g:c,"data-placeholder":o.length>0?void 0:!0,...h}),e.jsxs(n.Select.Content,{color:"gray",variant:"soft",position:"popper",onEscapeKeyDown:_,onPointerDownOutside:_,children:[e.jsx(ye,{value:X,label:"Select all",checked:o.length===d.length,size:C}),d.map(w=>e.jsx(ye,{...w,checked:o.includes(w.value),size:C},w.value))]})]})})),dt={default:"_default_u936h_1"},ut=t.forwardRef(function({className:s,severity:l="primary",icon:r,defaultChecked:c=!1,onCheckedChange:o,...u},d){const p=t.useRef(null),[f,h]=t.useState(u.checked?u.checked:c),[C,b]=t.useState(),v=P(l);t.useLayoutEffect(()=>{var S;const y=d||p;"current"in y&&y.current&&b((S=y.current)==null?void 0:S.querySelector("span.rt-SwitchThumb"))},[d]);const g=t.useCallback(y=>{h(y),o&&o(y)},[o]),_=u.checked?u.checked:f;return e.jsxs(e.Fragment,{children:[e.jsx(n.Switch,{className:m("overmap-switch",s,dt.default),ref:d||p,color:v,radius:"full",defaultChecked:c,onCheckedChange:g,...u}),e.jsx(n.Portal,{container:C,asChild:!0,children:r&&"checked"in r?_?r.checked:r.unchecked:r})]})}),ft=t.memo(ut),E={sidebarContent:"_sidebarContent_1onyo_1",right:"_right_1onyo_7",resizeHandle:"_resizeHandle_1onyo_10",left:"_left_1onyo_13",overlay:"_overlay_1onyo_33"},pt={width:"auto",height:"100%"},gt=t.forwardRef(function({side:s="left",modal:l=!0,children:r,open:c,containerSelector:o,overlay:u=!0,resizable:d=!0,minWidth:p="300px",maxWidth:f="500px",...h},C){const b=s==="right",v=s==="left",[g,_]=t.useState();return t.useEffect(()=>{const y=o??'[data-is-root-theme="true"]',S=document.querySelector(y);if(S===void 0)throw new Error(`Could not find a container element using the following selector ${y}`);_(S)},[o]),e.jsx(q.Root,{open:c,modal:l,children:e.jsxs(q.Portal,{container:g,children:[u&&e.jsx(q.Overlay,{className:m(E.overlay)}),e.jsx(q.Content,{className:m("overmap-sidebar","rt-DialogContent",E.sidebarContent,{[E.left]:v,[E.right]:b}),ref:C,asChild:!0,...h,children:e.jsx(n.Box,{width:"auto",children:e.jsx(V.Resizable,{minWidth:p,maxWidth:f,defaultSize:pt,enable:{right:d&&v,left:d&&b},handleClasses:{left:E.resizeHandle,right:E.resizeHandle},handleComponent:{right:e.jsx(M.DragHandleDots2Icon,{}),left:e.jsx(M.DragHandleDots2Icon,{})},children:r})})})]})})}),ht=t.memo(gt),k={outerContent:"_outerContent_1vw5z_1",enter:"_enter_1vw5z_4",right:"_right_1vw5z_4",left:"_left_1vw5z_8",enterActive:"_enterActive_1vw5z_12",exitActive:"_exitActive_1vw5z_22",exitDone:"_exitDone_1vw5z_32",resizable:"_resizable_1vw5z_41",slideOutOverlay:"_slideOutOverlay_1vw5z_45"},Ct=200,bt=t.memo(function({className:s,open:l,side:r="left",children:c,minWidth:o,maxWidth:u,resizable:d=!0,overlay:p=!1,modal:f=!1,resizeHandle:h,position:C="absolute",...b}){const v=t.useRef(null),[g,_]=t.useState(o),y=r==="left",S=r==="right",w=t.useCallback((T,I,L,Pe)=>{_(L.clientWidth),v.current&&(v.current.style.width=`${L.clientWidth}px`)},[]);return e.jsx(ee.CSSTransition,{in:l,classNames:{enter:k.enter,enterActive:k.enterActive,exitActive:k.exitActive,exitDone:k.exitDone},timeout:Ct,nodeRef:v,unmountOnExit:!0,mountOnEnter:!0,children:e.jsxs(e.Fragment,{children:[p&&e.jsx("div",{className:k.slideOutOverlay}),e.jsx(ke.DismissableLayer,{disableOutsidePointerEvents:f,asChild:!0,...b,children:e.jsx(n.Flex,{className:m("overmap-slide-out",s,k.outerContent,{[k.left]:y,[k.right]:S}),style:{"--slide-out-width":`${g}px`},height:"100%",width:"auto",position:C,top:"0",bottom:"0",left:y?"0":void 0,right:S?"0":void 0,ref:v,children:e.jsx(V.Resizable,{className:k.resizable,defaultSize:{width:g,height:"100%"},onResize:w,enable:{right:d&&y,left:d&&S},handleComponent:{left:h,right:h},minWidth:o,maxWidth:u,children:c})})})]})})}),B={accommodateCharCount:"_accommodateCharCount_sr18k_1",wrapper:"_wrapper_sr18k_5",default:"_default_sr18k_9",noLeftIcon:"_noLeftIcon_sr18k_13",noRightIcon:"_noRightIcon_sr18k_17",charCount:"_charCount_sr18k_21"},vt=t.forwardRef(function({className:s,leftSlot:l,rightSlot:r,size:c="medium",showInputLength:o,value:u,variant:d,severity:p="primary",...f},h){const C=$(c,N),b=P(p),v=o||o===void 0&&f.maxLength!==void 0,g=u!==void 0?u.toString():void 0;return e.jsxs(n.TextField.Root,{className:m(B.wrapper,{[B.accommodateCharCount]:v}),size:C,variant:d,color:b,children:[l&&e.jsx(n.TextField.Slot,{children:l}),e.jsx(n.TextField.Input,{className:m(B.default,s,{[B.noLeftIcon]:!l,[B.noRightIcon]:!r}),ref:h,size:C,variant:d,color:b,...f}),r&&e.jsx(n.TextField.Slot,{children:r}),v&&e.jsx(n.Text,{as:"p",className:B.charCount,size:"1",color:"gray",children:f.maxLength!==void 0?`${g==null?void 0:g.length}/${f.maxLength}`:`${g==null?void 0:g.length}`})]})}),_t=t.memo(vt),yt={wrapper:"_wrapper_tmtz0_1"},wt=t.forwardRef(function({className:s,defaultOpen:l=!1,modal:r=!1,content:c,children:o,...u},d){return e.jsxs(n.Popover.Root,{defaultOpen:l,modal:r,children:[e.jsx(n.Popover.Trigger,{children:o}),e.jsx(n.Popover.Content,{ref:d,className:m("overmap-popover",s,yt.wrapper),...u,children:c(n.Popover.Close)})]})}),mt=t.memo(wt),D={wrapper:"_wrapper_1ssf2_1",panelContent:"_panelContent_1ssf2_6",left:"_left_1ssf2_14",right:"_right_1ssf2_18",resizable:"_resizable_1ssf2_23",resizeHandle:"_resizeHandle_1ssf2_28",panelMainContent:"_panelMainContent_1ssf2_48"},we=200,j=150,St=t.memo(function({children:s,showLeft:l,leftPanel:r,leftMinWidth:c=we,showRight:o,rightPanel:u,rightMinWidth:d=we,resizeable:p}){const f=t.useRef(null),h=t.useRef(null),[C,b]=t.useState(0),[v,g]=t.useState(),_=t.useRef(null),[y,S]=t.useState(0),[w,T]=t.useState(),I=t.useCallback((O,x,z)=>(A,De,xe,ce)=>{if(!f.current)return;const J=O+ce.width;z(f.current.clientWidth-J),x(()=>J)},[]),L=t.useCallback((O,x,z,A)=>I(C,b,T)(O,x,z,A),[I,C]),Pe=t.useCallback((O,x,z,A)=>I(y,S,g)(O,x,z,A),[I,y]),K=t.useCallback((O,x,z,A,De,xe,ce,J)=>{if(!f.current)return;let Z=O;if(Z===0&&(Z=x,z(Z)),xe){const R=f.current.clientWidth-Z;J(R),De>R&&(ce(R),A(f.current.clientWidth-R))}},[]),Vt=t.useCallback(()=>K(y,d,S,T,C,l,b,g),[K,C,d,y,l]),qt=t.useCallback(()=>K(C,c,b,g,y,o,S,T),[K,c,C,y,o]),Y=t.useCallback((O,x)=>{f.current&&O&&x(f.current.clientWidth)},[]),Qt=t.useCallback(()=>Y(l,g),[Y,l]),Ut=t.useCallback(()=>Y(o,T),[Y,o]),Te=t.useCallback(()=>{var O,x,z,A;f.current&&(g(f.current.clientWidth-(((O=_.current)==null?void 0:O.clientWidth)||0)),T(f.current.clientWidth-(((x=h.current)==null?void 0:x.clientWidth)||0)),b(((z=h.current)==null?void 0:z.clientWidth)||0),S(((A=_.current)==null?void 0:A.clientWidth)||0))},[]);t.useEffect(()=>{if(!f.current)return;const O=new ResizeObserver(Te);return O.observe(f.current),()=>{O.disconnect()}},[Te]);const Xt=t.useMemo(()=>({entering:{transform:`translateX(-${C}px)`,marginRight:`-${C}px`,transitionProperty:"transform, margin-right",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginRight:0,transitionProperty:"transform, margin-right",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(-${C}px)`,marginRight:`-${C}px`,transitionProperty:"transform, margin-right",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[C]),Kt=t.useMemo(()=>({entering:{transform:`translateX(${y}px)`,marginLeft:`${-y}px`,transitionProperty:"transform, margin-left",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},entered:{transform:"translateX(0)",marginLeft:0,transitionProperty:"transform, margin-left",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},exiting:{transform:`translateX(${y}px)`,marginLeft:`${-y}px`,transitionProperty:"transform, margin-left",transitionDuration:`${j}ms`,transitionTimingFunction:"linear"},exited:{},unmounted:{}}),[y]);return e.jsxs(n.Flex,{className:D.wrapper,style:{minWidth:`${c+d}px`},ref:f,width:"100%",height:"100%",justify:"center",m:"0",p:"0",children:[e.jsx(ee.Transition,{nodeRef:h,timeout:l?0:j,in:l,unmountOnExit:!0,onEntering:qt,onExited:Ut,children:O=>e.jsx(n.Box,{ref:h,className:m(D.panelContent,D.left),style:Xt[O],width:"auto",height:"100%",m:"0",p:"0",children:e.jsx(V.Resizable,{className:D.resizable,size:{width:C,height:"100%"},onResizeStop:L,enable:{right:(p==null?void 0:p.left)!==void 0?p.left:!0},minWidth:c,maxWidth:v,handleClasses:{right:m(D.resizeHandle,D.left)},handleComponent:{right:e.jsx(M.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:r})})}),e.jsx("div",{className:D.panelMainContent,children:s}),e.jsx(ee.Transition,{nodeRef:_,timeout:o?0:j,in:o,unmountOnExit:!0,onEntering:Vt,onExited:Qt,children:O=>e.jsx(n.Box,{ref:_,className:m(D.panelContent,D.right),style:Kt[O],width:"auto",height:"100%",m:"0",p:"0",children:e.jsx(V.Resizable,{className:D.resizable,size:{width:y,height:"100%"},onResizeStop:Pe,enable:{left:(p==null?void 0:p.right)!==void 0?p.right:!0},minWidth:d,maxWidth:w,handleClasses:{left:m(D.resizeHandle,D.right)},handleComponent:{left:e.jsx(M.DragHandleDots2Icon,{height:"14px",width:"14px"})},children:u})})})]})}),Ot={charCount:"_charCount_17uut_1"},Pt=t.forwardRef(function({className:s,showInputLength:l,inputLengthTemplate:r,value:c,severity:o="primary",resize:u,...d},p){const f=P(o),h=P("info"),C=l||l===void 0&&(d.maxLength!==void 0||d.minLength!==void 0),b=c!==void 0?c.toString():"",v=t.useMemo(()=>{if(r){let g=r.replace("{current}",b.length.toString());return d.minLength!==void 0&&(g=g.replace("{min}",d.minLength.toString())),d.maxLength!==void 0&&(g=g.replace("{max}",d.maxLength.toString())),g}return b.length},[r,d.maxLength,d.minLength,b.length]);return e.jsxs(e.Fragment,{children:[e.jsx(n.TextArea,{className:m("overmap-textarea",s),style:{resize:u},ref:p,value:c,color:f,...d}),C&&e.jsx(n.Text,{as:"p",className:Ot.charCount,color:h,align:"right",children:v})]})}),Tt=t.memo(Pt),Dt=t.forwardRef(function({loop:s,type:l,rovingFocus:r,value:c,onValueChange:o,defaultValue:u,disabled:d,items:p,className:f,direction:h="row",...C},b){return e.jsx(ue.Root,{type:l,className:m("overmap-toggle-group",f),ref:b,value:c,onValueChange:o,disabled:d,orientation:h==="column"?"vertical":"horizontal",loop:s,rovingFocus:r,defaultValue:u,asChild:!0,children:e.jsx(oe,{direction:h,...C,children:p.map(({children:v,...g})=>t.createElement(ue.Item,{asChild:!0,...g,key:g.value},e.jsx(re,{className:m("overmap-toggle-group-button"),"aria-label":g.value,variant:g.value===c?"solid":"soft",children:v})))})})}),xt=t.memo(Dt),zt={default:"_default_xqvoc_1"},me=t.memo(t.forwardRef(({className:i,minContentGap:s="2",children:l,...r},c)=>e.jsx(Ae.Root,{className:m(i,"overmap-toolbar",zt.default),ref:c,asChild:!0,...r,children:e.jsx(U,{grow:"1",width:"100%",height:"max-content",align:"center",gap:s,wrap:"nowrap",children:l})}))),kt=t.memo(t.forwardRef(({children:i,gap:s="2"},l)=>e.jsx(U,{ref:l,grow:"1",width:"max-content",height:"100%",align:"center",gap:s,children:i}))),At=t.memo(t.forwardRef(({children:i,gap:s},l)=>e.jsx(U,{ref:l,grow:"1",width:"max-content",direction:"row-reverse",height:"100%",align:"center",gap:s||"2",children:i}))),Mt={Root:me,LeftContent:kt,RightContent:At},ae={ToastViewport:"_ToastViewport_1i6bp_1",actionButton:"_actionButton_1i6bp_20",ToastRoot:"_ToastRoot_1i6bp_24",slideIn:"_slideIn_1i6bp_1",swipeOut:"_swipeOut_1i6bp_1"},$t=t.forwardRef(function({title:s,description:l,icon:r,severity:c="primary",size:o,onClose:u,sensitivity:d,action:p,...f},h){const[C,b]=t.useState(!0),v=P(c),g=t.useCallback(_=>{!_&&u&&u(),b(_)},[u]);return e.jsx(F.Root,{asChild:!0,ref:h,...f,open:C,type:d,onOpenChange:g,children:e.jsx(n.Callout.Root,{className:ae.ToastRoot,variant:"surface",color:v,size:o,children:e.jsxs(n.Flex,{width:"100%",align:"center",gap:"4",justify:"between",children:[e.jsxs(n.Flex,{align:"center",gap:"3",children:[e.jsx(n.Callout.Icon,{children:r}),e.jsxs(n.Flex,{direction:"column",gap:"2",children:[e.jsxs(n.Flex,{direction:"column",gap:"0",children:[e.jsx(F.Title,{asChild:!0,children:e.jsx(n.Callout.Text,{size:"3",weight:"medium",children:s})}),e.jsx(F.Description,{asChild:!0,children:e.jsx(n.Callout.Text,{children:l})})]}),p&&e.jsx(F.Action,{className:ae.actionButton,altText:p.altText,asChild:!0,children:p.content})]})]}),e.jsx(F.Close,{asChild:!0,children:e.jsx(re,{"aria-label":"Close",variant:"ghost",severity:c,children:e.jsx(M.Cross2Icon,{})})})]})})})}),Se=t.memo($t),se=t.createContext({}),jt=()=>{const i=t.useContext(se);if(!i)throw new Error("useToast must be used within a ToastProvider");return i},It=240/60,Oe=5e3,Nt=i=>{if(i.duration&&i.duration>=Oe)return i.duration;const s=i.severity==="danger"?1.5:1,l=i.description.split(" ").length+i.title.split(" ").length;return(Oe+l/It)*s};a.unsafeShowToast=void 0;const Et=t.memo(function({children:s,className:l,hotkey:r,...c}){const[o,u]=t.useState([]),d=t.useCallback((f,h,C)=>{u(b=>{const v=b.find(g=>g.id===f);return v&&h===0&&clearTimeout(v.timeout),b.filter(g=>g.id!==f)}),C&&C()},[]),p=t.useMemo(()=>{let f=0;const h=_=>{const y=Nt(_),S=f.toString();f+=1;const w=setTimeout(()=>d(S,1,_.onClose),y);u(T=>[...T,{..._,timeout:w,duration:y,id:S}])},C=_=>h({..._,severity:"primary"}),b=_=>h({..._,severity:"success"}),v=_=>h({..._,severity:"danger"}),g=_=>h({..._,severity:"info"});return a.unsafeShowToast=h,{showToast:h,showPrimary:C,showSuccess:b,showError:v,showInfo:g}},[d]);return t.useEffect(()=>()=>{for(const{timeout:f}of o)clearTimeout(f)},[]),e.jsx(se.Provider,{value:p,children:e.jsxs(te.ToastProvider,{...c,children:[s,e.jsx(te.ToastViewport,{className:m(l,ae.ToastViewport),hotkey:r}),o.map(({id:f,onClose:h,...C})=>e.jsx(Se,{...C,onClose:()=>d(f,0,h)},f))]})})}),Bt={noWrap:"_noWrap_1wpa5_1"},Lt=t.memo(t.forwardRef(({className:i,noWrap:s,severity:l,as:r,...c},o)=>{const u=P(l);return e.jsx(n.Text,{ref:o,as:r,className:m(i,{[Bt.noWrap]:s}),color:u,...c})})),Hn="",Wt=t.memo(t.forwardRef((i,s)=>{const{panelBackground:l="solid",radius:r="full",...c}=i;return e.jsx(n.Theme,{panelBackground:l,radius:r,ref:s,...c})})),Ft={1:"max-content",2:"max-content",3:"max-content",4:"100%"},Ht=t.forwardRef(function({severity:s="info",weight:l="light",gap:r="1",text:c,orientation:o="horizontal",size:u,...d},p){const f=$(u,Ft),h=P(s);return e.jsxs(n.Flex,{ref:p,width:o==="horizontal"?f:"max-content",height:o==="vertical"?f:"max-content",direction:o==="vertical"?"column":"row",align:"center",gap:r,children:[e.jsx(n.Separator,{size:u,orientation:o,color:h,...d}),c&&e.jsxs(e.Fragment,{children:[e.jsx(n.Text,{as:"span",size:"1",weight:l,color:h,children:c}),e.jsx(n.Separator,{size:u,orientation:o,color:h,...d})]})]})}),Gt=t.memo(Ht);Object.defineProperty(a,"AccessibleIcon",{enumerable:!0,get:()=>n.AccessibleIcon}),Object.defineProperty(a,"AspectRatio",{enumerable:!0,get:()=>n.AspectRatio}),Object.defineProperty(a,"Avatar",{enumerable:!0,get:()=>n.Avatar}),Object.defineProperty(a,"Blockquote",{enumerable:!0,get:()=>n.Blockquote}),Object.defineProperty(a,"Box",{enumerable:!0,get:()=>n.Box}),Object.defineProperty(a,"Callout",{enumerable:!0,get:()=>n.Callout}),Object.defineProperty(a,"Card",{enumerable:!0,get:()=>n.Card}),Object.defineProperty(a,"Checkbox",{enumerable:!0,get:()=>n.Checkbox}),Object.defineProperty(a,"Code",{enumerable:!0,get:()=>n.Code}),Object.defineProperty(a,"Container",{enumerable:!0,get:()=>n.Container}),Object.defineProperty(a,"ContextMenu",{enumerable:!0,get:()=>n.ContextMenu}),Object.defineProperty(a,"Em",{enumerable:!0,get:()=>n.Em}),Object.defineProperty(a,"Grid",{enumerable:!0,get:()=>n.Grid}),Object.defineProperty(a,"Heading",{enumerable:!0,get:()=>n.Heading}),Object.defineProperty(a,"HoverCard",{enumerable:!0,get:()=>n.HoverCard}),Object.defineProperty(a,"Inset",{enumerable:!0,get:()=>n.Inset}),Object.defineProperty(a,"Kbd",{enumerable:!0,get:()=>n.Kbd}),Object.defineProperty(a,"Link",{enumerable:!0,get:()=>n.Link}),Object.defineProperty(a,"Portal",{enumerable:!0,get:()=>n.Portal}),Object.defineProperty(a,"Quote",{enumerable:!0,get:()=>n.Quote}),Object.defineProperty(a,"RadioGroup",{enumerable:!0,get:()=>n.RadioGroup}),Object.defineProperty(a,"ScrollArea",{enumerable:!0,get:()=>n.ScrollArea}),Object.defineProperty(a,"Section",{enumerable:!0,get:()=>n.Section}),Object.defineProperty(a,"Slider",{enumerable:!0,get:()=>n.Slider}),Object.defineProperty(a,"Slot",{enumerable:!0,get:()=>n.Slot}),Object.defineProperty(a,"Strong",{enumerable:!0,get:()=>n.Strong}),Object.defineProperty(a,"Table",{enumerable:!0,get:()=>n.Table}),Object.defineProperty(a,"Tabs",{enumerable:!0,get:()=>n.Tabs}),Object.defineProperty(a,"TextField",{enumerable:!0,get:()=>n.TextField}),Object.defineProperty(a,"Theme",{enumerable:!0,get:()=>n.Theme}),Object.defineProperty(a,"Tooltip",{enumerable:!0,get:()=>n.Tooltip}),Object.defineProperty(a,"VisuallyHidden",{enumerable:!0,get:()=>n.VisuallyHidden}),Object.defineProperty(a,"updateThemeAppearanceClass",{enumerable:!0,get:()=>n.updateThemeAppearanceClass}),Object.defineProperty(a,"useThemeContext",{enumerable:!0,get:()=>n.useThemeContext}),a.AlertDialog=be,a.AlertDialogContent=ie,a.AlertDialogProvider=Re,a.Badge=Ee,a.Button=Q,a.ButtonGroup=oe,a.ButtonList=Xe,a.DefaultTheme=Wt,a.Dialog=Ye,a.DropdownMenu=it,a.Flex=U,a.HoverUtility=lt,a.IconButton=re,a.Input=_t,a.LeftAndRightPanels=St,a.MultiSelect=ct,a.Popover=mt,a.Root=me,a.Select=st,a.Separator=Gt,a.Sidebar=ht,a.SlideOut=bt,a.Switch=ft,a.Text=Lt,a.TextArea=Tt,a.Toast=Se,a.ToastContext=se,a.ToastProvider=Et,a.ToggleGroup=xt,a.Toolbar=Mt,a.divButtonProps=Be,a.useAlertDialog=ve,a.useDiscardAlertDialog=et,a.useSeverityColor=P,a.useToast=jt,a.useViewportSize=Ie,Object.keys(de).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&Object.defineProperty(a,i,{enumerable:!0,get:()=>de[i]})}),Object.keys(M).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&Object.defineProperty(a,i,{enumerable:!0,get:()=>M[i]})}),Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
6
6
  //# sourceMappingURL=blocks.umd.cjs.map