import{s as e}from"./rolldown-runtime.zcDlVW45.js";import{b as t,y as n}from"./vendor-react.C6bNwj4M.js";import{On as r}from"./vendor-neo4j-ndl.llONqzcp.js";import{f as i,n as a,s as o}from"./js-joda-timezone.esm.IW02GFR6.js";var s=e(n()),c=t(),l=o.getAvailableZoneIds().sort(),u=new Set(l),d=Intl.supportedValuesOf(`timeZone`).filter(e=>u.has(e)).map(e=>{let t=o.of(e).rules().offset(a.now()).toString(),n=t===`Z`?`UTC +0:00`:`UTC ${t.replace(/^([+-])0?(\d{1,2}):00$/,`$1$2:00`)}`;return{value:n,label:`${e.replace(/_/g,` `)} (${n})`}}).filter(({value:e})=>{if(!(e.match(/^UTC ([+-]?\d{1,2}):00$/)||e===`UTC +0:00`))return!1;let t=parseInt(String(e).replace(/^UTC ([+-]?\d+):00$/,`$1`),10);return t>=-12&&t<=12}).sort((e,t)=>{let n=e=>parseInt(String(e).replace(/^UTC ([+-]?\d+):00$/,`$1`),10);return n(e.value)-n(t.value)}),f=i(l.map(e=>o.of(e).rules().offset(a.now())).sort((e,t)=>t.compareTo(e))),p=[`HST`,`EST`,`MST`,`Pacific/Kanton`,`ROC`],m=l.filter(e=>!e.startsWith(`Etc/`)&&!e.startsWith(`GMT`)&&!p.includes(e)).map(e=>({value:e,label:e})),h=f.map(e=>({value:e.toString(),label:e.toString()===`Z`?`GMT+00:00`:`GMT${e.toString()}`})),g=[...m,...h],_=e=>g.find(t=>t.value===e)??{value:e,label:e},v=({timeZone:e,className:t,includeTimeZone:n,useSupportTimeZone:i,disabled:a,selectProps:o,ariaLabel:l,onChange:u,label:f,size:p=`small`})=>{let g=(0,s.useMemo)(()=>{let e=[{label:`Change time offset`,options:h}];return n===!0&&e.push({label:`Change time zone`,options:m}),i===!0&&(e=[{label:`Select time zone`,options:d}]),e},[n,i]);return(0,c.jsx)(r,{className:t,size:p,type:`select`,isFluid:!0,isDisabled:a,label:f,ariaLabel:l,selectProps:{value:(0,s.useMemo)(()=>_(e),[e]),options:g,onChange:e=>{let t=e;t!==null&&u(t.value)},menuPortalTarget:document.querySelector(`body`),styles:{menuPortal:e=>({...e,zIndex:70})}},...o})},y=e=>{let{transform:t}=e;return{...t,y:0}};function b(e,t,n){let r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}var x=e=>{let{containerNodeRect:t,draggingNodeRect:n,transform:r}=e;return!n||!t?r:b(r,n,t)},S=e=>{let{transform:t}=e;return{...t,x:0}};export{v as i,x as n,S as r,y as t};