PluginProbe
Gutenberg / trunk
Gutenberg vtrunk
24.1.0 24.0.0 23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 All 404 releases
← All changes | build/scripts/block-directory/index.min.js +4 -1 23.5.0 → trunk View file →
@@ -1,5 +1,6 @@
1 -var wp;(wp||={}).blockDirectory=(()=>{var Ef=Object.create;var br=Object.defineProperty;var Sf=Object.getOwnPropertyDescriptor;var Tf=Object.getOwnPropertyNames;var Cf=Object.getPrototypeOf,Pf=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Yt=(e,t)=>{for(var o in t)br(e,o,{get:t[o],enumerable:!0})},ai=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Tf(t))!Pf.call(e,n)&&n!==o&&br(e,n,{get:()=>t[n],enumerable:!(r=Sf(t,n))||r.enumerable});return e};var g=(e,t,o)=>(o=e!=null?Ef(Cf(e)):{},ai(t||!e||!e.__esModule?br(o,"default",{value:e,enumerable:!0}):o,e)),Of=e=>ai(br({},"__esModule",{value:!0}),e);var ci=se((wg,li)=>{li.exports=window.wp.plugins});var fi=se((Rg,ui)=>{ui.exports=window.wp.hooks});var _t=se((vg,di)=>{di.exports=window.wp.blocks});var Xe=se((Eg,pi)=>{pi.exports=window.wp.data});var Ue=se((Sg,mi)=>{mi.exports=window.wp.element});var In=se((Tg,gi)=>{gi.exports=window.wp.editor});var ao=se((Pg,xi)=>{xi.exports=window.wp.blockEditor});var $e=se((Og,bi)=>{bi.exports=window.wp.i18n});var wr=se((_g,wi)=>{wi.exports=window.wp.apiFetch});var vi=se((kg,Ri)=>{Ri.exports=window.wp.notices});var Si=se((Ig,Ei)=>{Ei.exports=window.wp.url});var ji=se((Qg,Fi)=>{Fi.exports=window.wp.compose});var zt=se((eh,Vi)=>{Vi.exports=window.wp.components});var Fn=se((th,Hi)=>{Hi.exports=window.wp.coreData});var $i=se((rh,Ui)=>{Ui.exports=window.wp.htmlEntities});var V=se((nh,Yi)=>{Yi.exports=window.React});var J=se((fh,Gi)=>{Gi.exports=window.ReactJSXRuntime});var Lt=se((Ey,Da)=>{Da.exports=window.ReactDOM});var Ol=se(Pl=>{"use strict";var So=V();function Kp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qp=typeof Object.is=="function"?Object.is:Kp,Gp=So.useState,Xp=So.useEffect,Jp=So.useLayoutEffect,Zp=So.useDebugValue;function Qp(e,t){var o=t(),r=Gp({inst:{value:o,getSnapshot:t}}),n=r[0].inst,s=r[1];return Jp(function(){n.value=o,n.getSnapshot=t,gs(n)&&s({inst:n})},[e,o,t]),Xp(function(){return gs(n)&&s({inst:n}),e(function(){gs(n)&&s({inst:n})})},[e]),Zp(o),o}function gs(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!qp(e,o)}catch{return!0}}function em(e,t){return t()}var tm=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?em:Qp;Pl.useSyncExternalStore=So.useSyncExternalStore!==void 0?So.useSyncExternalStore:tm});var hs=se((Kx,_l)=>{"use strict";_l.exports=Ol()});var Il=se(kl=>{"use strict";var zr=V(),om=hs();function rm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nm=typeof Object.is=="function"?Object.is:rm,sm=om.useSyncExternalStore,im=zr.useRef,am=zr.useEffect,lm=zr.useMemo,cm=zr.useDebugValue;kl.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var s=im(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=lm(function(){function c(m){if(!u){if(u=!0,l=m,m=r(m),n!==void 0&&i.hasValue){var f=i.value;if(n(f,m))return d=f}return d=m}if(f=d,nm(l,m))return f;var h=r(m);return n!==void 0&&n(f,h)?(l=m,f):(l=m,d=h)}var u=!1,l,d,p=o===void 0?null:o;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,o,r,n]);var a=sm(e,s[0],s[1]);return am(function(){i.hasValue=!0,i.value=a},[a]),cm(a),a}});var Nl=se((Gx,Al)=>{"use strict";Al.exports=Il()});var qc=se((tS,Kc)=>{Kc.exports=window.wp.a11y});var dn=se((oS,Gc)=>{Gc.exports=window.wp.primitives});var Zc=se((gS,Jc)=>{Jc.exports=window.wp.theme});var eu=se((hS,Qc)=>{Qc.exports=window.wp.privateApis});var xg={};Yt(xg,{store:()=>fe});var gf=g(ci(),1),hf=g(fi(),1);var Di=g(_t(),1),Ho=g(Xe(),1),Mi=g(Ue(),1),Li=g(In(),1);var Sr=g(Xe(),1);var hi=g(Xe(),1),_f=(e={},t)=>{switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},kf=(e={installedBlockTypes:[],isInstalling:{}},t)=>{switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter(o=>o.name!==t.item.name)};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},If=(e={},t)=>{switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":let{[t.blockId]:o,...r}=e;return r}return e},yi=(0,hi.combineReducers)({downloadableBlocks:_f,blockManagement:kf,errorNotices:If});var An={};Yt(An,{getDownloadableBlocks:()=>Nf,getErrorNoticeForBlock:()=>Ff,getErrorNotices:()=>Bf,getInstalledBlockTypes:()=>Vo,getNewBlockTypes:()=>Df,getUnusedBlockTypes:()=>Mf,isInstalling:()=>Lf,isRequestingDownloadableBlocks:()=>Af});var lo=g(Xe(),1),Fo=g(ao(),1),jo=[];function Af(e,t){return e.downloadableBlocks[t]?.isRequesting??!1}function Nf(e,t){return e.downloadableBlocks[t]?.results??jo}function Vo(e){return e.blockManagement.installedBlockTypes}var Df=(0,lo.createRegistrySelector)(e=>(0,lo.createSelector)(t=>{let o=Vo(t);if(!o.length)return jo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(Fo.store),s=o.map(c=>c.name),i=n().flatMap(c=>{let u=r(c);return s.includes(u)?u:[]}),a=o.filter(c=>i.includes(c.name));return a.length>0?a:jo},t=>[Vo(t),e(Fo.store).getClientIdsWithDescendants()])),Mf=(0,lo.createRegistrySelector)(e=>(0,lo.createSelector)(t=>{let o=Vo(t);if(!o.length)return jo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(Fo.store),s=o.map(c=>c.name),i=n().flatMap(c=>{let u=r(c);return s.includes(u)?u:[]}),a=o.filter(c=>!i.includes(c.name));return a.length>0?a:jo},t=>[Vo(t),e(Fo.store).getClientIdsWithDescendants()]));function Lf(e,t){return e.blockManagement.isInstalling[t]||!1}function Bf(e){return e.errorNotices}function Ff(e,t){return e.errorNotices[t]}var Mn={};Yt(Mn,{addInstalledBlockType:()=>Wf,clearErrorNotice:()=>zf,fetchDownloadableBlocks:()=>Dn,installBlockType:()=>Vf,receiveDownloadableBlocks:()=>Er,removeInstalledBlockType:()=>Uf,setErrorNotice:()=>Yf,setIsInstalling:()=>$f,uninstallBlockType:()=>Hf});var vr=g(_t(),1),bt=g($e(),1),co=g(wr(),1),Rr=g(vi(),1),Pi=g(Si(),1);var Ti=g(wr(),1),jf=e=>new Promise((t,o)=>{let r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach(n=>{e[n]&&(r[n]=e[n])}),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=()=>t(!0),r.onerror=()=>o(new Error("Error loading asset.")),document.body.appendChild(r),(r.nodeName.toLowerCase()==="link"||r.nodeName.toLowerCase()==="script"&&!r.src)&&t()});async function Ci(){let t=await(await(0,Ti.default)({url:document.location.href,parse:!1})).text(),o=new window.DOMParser().parseFromString(t,"text/html"),r=Array.from(o.querySelectorAll('link[rel="stylesheet"],script')).filter(n=>n.id&&!document.getElementById(n.id));for(let n of r)await jf(n)}function Nn(e){if(!e)return!1;let t=e.links["wp:plugin"]||e.links.self;return t&&t.length?t[0].href:!1}function Dn(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function Er(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}var Vf=e=>async({registry:t,dispatch:o})=>{let{id:r,name:n}=e,s=!1;o.clearErrorNotice(r);try{o.setIsInstalling(r,!0);let i=Nn(e),a={};i?await(0,co.default)({method:"PUT",url:i,data:{status:"active"}}):a=(await(0,co.default)({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links,o.addInstalledBlockType({...e,links:{...e.links,...a}});let c=["api_version","title","category","parent","ancestor","icon","description","keywords","attributes","provides_context","uses_context","selectors","supports","styles","example","variations","allowed_blocks","block_hooks"];if(await(0,co.default)({path:(0,Pi.addQueryArgs)(`/wp/v2/block-types/${n}`,{_fields:c})}).catch(()=>{}).then(l=>{l&&(0,vr.unstable__bootstrapServerSideBlockDefinitions)({[n]:Object.fromEntries(Object.entries(l).filter(([d])=>c.includes(d)))})}),await Ci(),!t.select(vr.store).getBlockTypes().some(l=>l.name===n))throw new Error((0,bt.__)("Error registering block. Try reloading the page."));t.dispatch(Rr.store).createInfoNotice((0,bt.sprintf)((0,bt.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),s=!0}catch(i){let a=i.message||(0,bt.__)("An error occurred."),c=i instanceof Error,u={folder_exists:(0,bt.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,bt.__)("Error installing block. You can reload the page and try again.")};u[i.code]&&(c=!0,a=u[i.code]),o.setErrorNotice(r,a,c),t.dispatch(Rr.store).createErrorNotice(a,{speak:!0,isDismissible:!0})}return o.setIsInstalling(r,!1),s},Hf=e=>async({registry:t,dispatch:o})=>{try{let r=Nn(e);await(0,co.default)({method:"PUT",url:r,data:{status:"inactive"}}),await(0,co.default)({method:"DELETE",url:r}),o.removeInstalledBlockType(e)}catch(r){t.dispatch(Rr.store).createErrorNotice(r.message||(0,bt.__)("An error occurred."))}};function Wf(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function Uf(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function $f(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function Yf(e,t,o=!1){return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:o}}function zf(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var Bn={};Yt(Bn,{getDownloadableBlocks:()=>Xf});var uo=function(){return uo=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s])}return t},uo.apply(this,arguments)};function Oi(e){return e.toLowerCase()}var Kf=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],qf=/[^A-Z0-9]+/gi;function ki(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?Kf:o,n=t.stripRegexp,s=n===void 0?qf:n,i=t.transform,a=i===void 0?Oi:i,c=t.delimiter,u=c===void 0?" ":c,l=_i(_i(e,r,"$1\0$2"),s,"\0"),d=0,p=l.length;l.charAt(d)==="\0";)d++;for(;l.charAt(p-1)==="\0";)p--;return l.slice(d,p).split("\0").map(a).join(u)}function _i(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}function Ln(e,t){var o=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&o>="0"&&o<="9"?"_"+o+r:""+o.toUpperCase()+r}function Ii(e,t){return t===void 0&&(t={}),ki(e,uo({delimiter:"",transform:Ln},t))}function Gf(e,t){return t===0?e.toLowerCase():Ln(e,t)}function Ai(e,t){return t===void 0&&(t={}),Ii(e,uo({transform:Gf},t))}var Ni=g(wr(),1);var Xf=e=>async({dispatch:t})=>{if(e)try{t(Dn(e));let r=(await(0,Ni.default)({path:`wp/v2/block-directory/search?term=${e}`})).map(n=>Object.fromEntries(Object.entries(n).map(([s,i])=>[Ai(s),i])));t(Er(r,e))}catch{t(Er([],e))}};var Jf="core/block-directory",Zf={reducer:yi,selectors:An,actions:Mn,resolvers:Bn},fe=(0,Sr.createReduxStore)(Jf,Zf);(0,Sr.register)(fe);function Bi(){let{uninstallBlockType:e}=(0,Ho.useDispatch)(fe),t=(0,Ho.useSelect)(r=>{let{isAutosavingPost:n,isSavingPost:s}=r(Li.store);return s()&&!n()},[]),o=(0,Ho.useSelect)(r=>r(fe).getUnusedBlockTypes(),[]);return(0,Mi.useEffect)(()=>{t&&o.length&&o.forEach(r=>{e(r),(0,Di.unregisterBlockType)(r.name)})},[t]),null}var Ju=g(ao(),1),Zu=g(ji(),1),Qu=g(Ue(),1);var Yu=g($e(),1),zu=g(zt(),1),Ku=g(Fn(),1),qu=g(Xe(),1),Gu=g(_t(),1);var Lu=g($e(),1),Bu=g(zt(),1),Fu=g(_t(),1),ju=g(Xe(),1);function Wi(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=Wi(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Qf(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Wi(e))&&(r&&(r+=" "),r+=t);return r}var fo=Qf;var He=g($e(),1),vn=g(zt(),1),Au=g(Ue(),1),Vt=g($i(),1),Nu=g(_t(),1),Du=g(Xe(),1);var ed=g(V(),1),Wo={...ed};var Ki=g(V(),1),zi={};function be(e,t){let o=Ki.useRef(zi);return o.current===zi&&(o.current=e(t)),o}var jn=Wo.useInsertionEffect,td=jn&&jn!==Wo.useLayoutEffect?jn:e=>e();function $(e){let t=be(od).current;return t.next=e,td(t.effect),t.trampoline}function od(){let e={next:void 0,callback:rd,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function rd(){}var qi=g(V(),1),nd=()=>{},W=typeof document<"u"?qi.useLayoutEffect:nd;var Tr=g(V(),1),sd=Tr.createContext(void 0);function po(){return Tr.useContext(sd)?.direction??"ltr"}function id(e,t){return function(r,...n){let s=new URL(e);return s.searchParams.set("code",r.toString()),n.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}var ad=id("https://base-ui.com/production-error","Base UI"),Ne=ad;var Kt=g(V(),1);function Vn(e,t,o,r){let n=be(Ji).current;return ld(n,e,t,o,r)&&Zi(n,[e,t,o,r]),n.callback}function Xi(e){let t=be(Ji).current;return cd(t,e)&&Zi(t,e),t.callback}function Ji(){return{callback:null,cleanup:null,refs:[]}}function ld(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function cd(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function Zi(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=s(o);typeof i=="function"&&(r[n]=i);break}case"object":{s.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=r[n];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}default:}}}}}}var ea=g(V(),1);var Qi=g(V(),1),ud=parseInt(Qi.version,10);function mo(e){return ud>=e}function Hn(e){if(!ea.isValidElement(e))return null;let t=e,o=t.props;return(mo(19)?o?.ref:t.ref)??null}function Uo(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function wt(){}var wh=Object.freeze([]),ue=Object.freeze({});function ta(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let s=t[r](n);s!=null&&Object.assign(o,s);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function oa(e,t){return typeof e=="function"?e(t):e}function ra(e,t){return typeof e=="function"?e(t):e}var Wn={};function Rt(e,t,o,r,n){if(!o&&!r&&!n&&!e)return Cr(t);let s=Cr(e);return t&&(s=$o(s,t)),o&&(s=$o(s,o)),r&&(s=$o(s,r)),n&&(s=$o(s,n)),s}function na(e){if(e.length===0)return Wn;if(e.length===1)return Cr(e[0]);let t=Cr(e[0]);for(let o=1;o<e.length;o+=1)t=$o(t,e[o]);return t}function Cr(e){return Un(e)?{...ia(e,Wn)}:fd(e)}function $o(e,t){return Un(t)?ia(t,e):dd(e,t)}function fd(e){let t={...e};for(let o in t){let r=t[o];sa(o,r)&&(t[o]=aa(r))}return t}function dd(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=Uo(e.style,r);break}case"className":{e[o]=$n(e.className,r);break}default:sa(o,r)?e[o]=pd(e[o],r):e[o]=r}}return e}function sa(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function Un(e){return typeof e=="function"}function ia(e,t){return Un(e)?e(t):e??Wn}function pd(e,t){return t?e?(...o)=>{let r=o[0];if(ca(r)){let s=r;la(s);let i=t(...o);return s.baseUIHandlerPrevented||e?.(...o),i}let n=t(...o);return e?.(...o),n}:aa(t):e}function aa(e){return e&&((...t)=>{let o=t[0];return ca(o)&&la(o),e(...t)})}function la(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $n(e,t){return t?e?t+" "+e:t:e}function ca(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var Yn=g(V(),1);function De(e,t,o={}){let r=t.render,n=md(t,o);if(o.enabled===!1)return null;let s=o.state??ue;return yd(e,r,n,s)}function md(e,t={}){let{className:o,style:r,render:n}=e,{state:s=ue,ref:i,props:a,stateAttributesMapping:c,enabled:u=!0}=t,l=u?oa(o,s):void 0,d=u?ra(r,s):void 0,p=u?ta(s,c):ue,m=u&&a?gd(a):void 0,f=u?Uo(p,m)??{}:ue;return typeof document<"u"&&(u?Array.isArray(i)?f.ref=Xi([f.ref,Hn(n),...i]):f.ref=Vn(f.ref,Hn(n),i):Vn(null,null)),u?(l!==void 0&&(f.className=$n(f.className,l)),d!==void 0&&(f.style=Uo(f.style,d)),f):ue}function gd(e){return Array.isArray(e)?na(e):Rt(void 0,e)}var hd=Symbol.for("react.lazy");function yd(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=Rt(o,t.props);n.ref=o.ref;let s=t;return s?.$$typeof===hd&&(s=Kt.Children.toArray(t)[0]),Kt.cloneElement(s,n)}if(e&&typeof e=="string")return xd(e,o);throw new Error(Ne(8))}function xd(e,t){return e==="button"?(0,Yn.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,Yn.createElement)("img",{alt:"",...t,key:t.key}):Kt.createElement(e,t)}var z={};Yt(z,{cancelOpen:()=>zd,chipRemovePress:()=>Od,clearPress:()=>Pd,closePress:()=>Td,closeWatcher:()=>jd,decrementPress:()=>Id,disabled:()=>qd,drag:()=>Ud,escapeKey:()=>Fd,focusOut:()=>Bd,imperativeAction:()=>Jd,incrementPress:()=>kd,initial:()=>Xd,inputBlur:()=>Dd,inputChange:()=>Ad,inputClear:()=>Nd,inputPaste:()=>Md,inputPress:()=>Ld,itemPress:()=>Sd,keyboard:()=>Hd,linkPress:()=>Cd,listNavigation:()=>Vd,missing:()=>Gd,none:()=>bd,outsidePress:()=>Ed,pointer:()=>Wd,scrub:()=>Yd,siblingOpen:()=>Kd,swipe:()=>Zd,trackPress:()=>_d,triggerFocus:()=>vd,triggerHover:()=>Rd,triggerPress:()=>wd,wheel:()=>$d,windowResize:()=>Qd});var bd="none",wd="trigger-press",Rd="trigger-hover",vd="trigger-focus",Ed="outside-press",Sd="item-press",Td="close-press",Cd="link-press",Pd="clear-press",Od="chip-remove-press",_d="track-press",kd="increment-press",Id="decrement-press",Ad="input-change",Nd="input-clear",Dd="input-blur",Md="input-paste",Ld="input-press",Bd="focus-out",Fd="escape-key",jd="close-watcher",Vd="list-navigation",Hd="keyboard",Wd="pointer",Ud="drag",$d="wheel",Yd="scrub",zd="cancel-open",Kd="sibling-open",qd="disabled",Gd="missing",Xd="initial",Jd="imperative-action",Zd="swipe",Qd="window-resize";function Z(e,t,o,r){let n=!1,s=!1,i=r??ue;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){s=!0},get isCanceled(){return n},get isPropagationAllowed(){return s},trigger:o,...i}}var Pr=g(V(),1);var ua=0;function ep(e,t="mui"){let[o,r]=Pr.useState(e),n=e||o;return Pr.useEffect(()=>{o==null&&(ua+=1,r(`${t}-${ua}`))},[o,t]),n}var fa=Wo.useId;function kt(e,t){if(fa!==void 0){let o=fa();return e??(t?`${t}-${o}`:o)}return ep(e,t)}function da(e){return kt(e,"base-ui")}var Kn=g(V(),1);var pa=g(V(),1),tp=[];function go(e){pa.useEffect(e,tp)}var Or=null,Kh=globalThis.requestAnimationFrame,zn=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||(this.callbacks[o]=null,this.callbacksCount-=1)}},_r=new zn,ft=class e{static create(){return new e}static request(t){return _r.request(t)}static cancel(t){return _r.cancel(t)}currentId=Or;request(t){this.cancel(),this.currentId=_r.request(()=>{this.currentId=Or,t()})}cancel=()=>{this.currentId!==Or&&(_r.cancel(this.currentId),this.currentId=Or)};disposeEffect=()=>this.cancel};function ho(){let e=be(ft.create).current;return go(e.disposeEffect),e}function ma(e,t=!1,o=!1){let[r,n]=Kn.useState(e&&t?"idle":void 0),[s,i]=Kn.useState(e);return e&&!s&&(i(!0),n("starting")),!e&&s&&r!=="ending"&&!o&&n("ending"),!e&&!s&&r==="ending"&&n(void 0),W(()=>{if(!e&&s&&r!=="ending"&&o){let a=ft.request(()=>{n("ending")});return()=>{ft.cancel(a)}}},[e,s,r,o]),W(()=>{if(!e||t)return;let a=ft.request(()=>{n(void 0)});return()=>{ft.cancel(a)}},[t,e]),W(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&n("starting");let a=ft.request(()=>{n("idle")});return()=>{ft.cancel(a)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}var qt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),op={[qt.startingStyle]:""},rp={[qt.endingStyle]:""},ga={transitionStatus(e){return e==="starting"?op:e==="ending"?rp:null}};function kr(){return typeof window<"u"}function Xt(e){return Ir(e)?(e.nodeName||"").toLowerCase():"#document"}function ae(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function et(e){var t;return(t=(Ir(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ir(e){return kr()?e instanceof Node||e instanceof ae(e).Node:!1}function H(e){return kr()?e instanceof Element||e instanceof ae(e).Element:!1}function he(e){return kr()?e instanceof HTMLElement||e instanceof ae(e).HTMLElement:!1}function yo(e){return!kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ae(e).ShadowRoot}function xo(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=Ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function ha(e){return/^(table|td|th)$/.test(Xt(e))}function Yo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var np=/transform|translate|scale|rotate|perspective|filter/,sp=/paint|layout|strict|content/,Gt=e=>!!e&&e!=="none",qn;function Ar(e){let t=H(e)?Ee(e):e;return Gt(t.transform)||Gt(t.translate)||Gt(t.scale)||Gt(t.rotate)||Gt(t.perspective)||!bo()&&(Gt(t.backdropFilter)||Gt(t.filter))||np.test(t.willChange||"")||sp.test(t.contain||"")}function ya(e){let t=Qe(e);for(;he(t)&&!tt(t);){if(Ar(t))return t;if(Yo(t))return null;t=Qe(t)}return null}function bo(){return qn==null&&(qn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qn}function tt(e){return/^(html|body|#document)$/.test(Xt(e))}function Ee(e){return ae(e).getComputedStyle(e)}function zo(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qe(e){if(Xt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||yo(e)&&e.host||et(e);return yo(t)?t.host:t}function xa(e){let t=Qe(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:he(t)&&xo(t)?t:xa(t)}function It(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=xa(e),s=n===((r=e.ownerDocument)==null?void 0:r.body),i=ae(n);if(s){let a=Nr(i);return t.concat(i,i.visualViewport||[],xo(n)?n:[],a&&o?It(a):[])}else return t.concat(n,It(n,[],o))}function Nr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var At=typeof navigator<"u",Gn=ip(),ba=lp(),Dr=ap(),ey=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),ty=Gn.platform==="MacIntel"&&Gn.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Gn.platform),oy=At&&/firefox/i.test(Dr),wa=At&&/apple/i.test(navigator.vendor),ry=At&&/Edg/i.test(Dr),ny=At&&/android/i.test(ba)||/android/i.test(Dr),Ra=At&&ba.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,va=Dr.includes("jsdom/");function ip(){if(!At)return{platform:"",maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function ap(){if(!At)return"";let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:o})=>`${t}/${o}`).join(" "):navigator.userAgent}function lp(){if(!At)return"";let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}var Xn="data-base-ui-focusable";var Jn="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Mr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function te(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&yo(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _e(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Nt(e,t){if(!H(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute("data-trigger-disabled");for(let[,r]of t.entries())if(te(r,o))return!r.hasAttribute("data-trigger-disabled");return!1}function Lr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function Ea(e){return e.matches("html,body")}function Sa(e){return he(e)&&e.matches(Jn)}function Zn(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Jn}`)!=null}function Ta(e){if(!e||va)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function vt(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...vt(e,n.id,o)])}function Ca(e){return"nativeEvent"in e}function Et(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function Pa(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var ka=["top","right","bottom","left"];var Dt=Math.min,ke=Math.max,Mt=Math.round,qo=Math.floor,ot=e=>({x:e,y:e}),cp={left:"right",right:"left",bottom:"top",top:"bottom"};function Go(e,t,o){return ke(e,Dt(t,o))}function rt(e,t){return typeof e=="function"?e(t):e}function we(e){return e.split("-")[0]}function nt(e){return e.split("-")[1]}function Fr(e){return e==="x"?"y":"x"}function Xo(e){return e==="y"?"height":"width"}function Me(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Jo(e){return Fr(Me(e))}function Ia(e,t,o){o===void 0&&(o=!1);let r=nt(e),n=Jo(e),s=Xo(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ko(i)),[i,Ko(i)]}function Aa(e){let t=Ko(e);return[Br(e),t,Br(t)]}function Br(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Oa=["left","right"],_a=["right","left"],up=["top","bottom"],fp=["bottom","top"];function dp(e,t,o){switch(e){case"top":case"bottom":return o?t?_a:Oa:t?Oa:_a;case"left":case"right":return t?up:fp;default:return[]}}function Na(e,t,o,r){let n=nt(e),s=dp(we(e),o==="start",r);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(Br)))),s}function Ko(e){let t=we(e);return cp[t]+e.slice(t.length)}function pp(e){return{top:0,right:0,bottom:0,left:0,...e}}function jr(e){return typeof e!="number"?pp(e):{top:e,right:e,bottom:e,left:e}}function Jt(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function ye(e){return e?.ownerDocument||document}function Q(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}function Le(e){let t=be(mp,e).current;return t.next=e,W(t.effect),t}function mp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Ba=g(V(),1);var La=g(Lt(),1);function Ma(e){return e==null?e:"current"in e?e.current:e}function wo(e,t=!1,o=!0){let r=ho();return $((n,s=null)=>{r.cancel();let i=Ma(e);if(i==null)return;let a=i,c=()=>{La.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function u(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{s?.aborted||c()}).catch(()=>{if(o){s?.aborted||c();return}let l=a.getAnimations();!s?.aborted&&l.length>0&&l.some(d=>d.pending||d.playState!=="finished")&&u()})}if(t){let l=qt.startingStyle;if(!a.hasAttribute(l)){r.request(u);return}let d=new MutationObserver(()=>{a.hasAttribute(l)||(d.disconnect(),u())});d.observe(a,{attributes:!0,attributeFilter:[l]}),s?.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(u)})}function Vr(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,s=$(n),i=wo(r,o,!1);Ba.useEffect(()=>{if(!t)return;let a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,o,s,i])}var Fa=g(V(),1);function ja(e){let t=Fa.useRef(!0);t.current&&(t.current=!1,e())}var Zo=0,Ye=class e{static create(){return new e}currentId=Zo;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zo,o()},t)}isStarted(){return this.currentId!==Zo}clear=()=>{this.currentId!==Zo&&(clearTimeout(this.currentId),this.currentId=Zo)};disposeEffect=()=>this.clear};function st(){let e=be(Ye.create).current;return go(e.disposeEffect),e}var Be=g(V(),1);function gp(e,t){return t!=null&&!Et(t)?0:typeof e=="function"?e():e}function Zt(e,t,o){let r=gp(e,o);return typeof r=="number"?r:r?.[t]}function Qn(e){return typeof e=="function"?e():e}function Hr(e,t){return t||e==="click"||e==="mousedown"}function Va(e){return e?.includes("mouse")&&e!=="mousedown"}var Ha=g(J(),1),Wa=Be.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ye,currentIdRef:{current:null},currentContextRef:{current:null}});function es(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=Be.useRef(o),s=Be.useRef(o),i=Be.useRef(null),a=Be.useRef(null),c=st();return(0,Ha.jsx)(Wa.Provider,{value:Be.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:c}),[r,c]),children:t})}function ts(e,t={open:!1}){let{open:o}=t,r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),s=Be.useContext(Wa),{currentIdRef:i,delayRef:a,timeoutMs:c,initialDelayRef:u,currentContextRef:l,hasProvider:d,timeout:p}=s,[m,f]=Be.useState(!1);return W(()=>{function h(){f(!1),l.current?.setIsInstantPhase(!1),i.current=null,l.current=null,a.current=u.current}if(i.current&&!o&&i.current===n){if(f(!1),c){let y=n;return p.start(c,()=>{r.select("open")||i.current&&i.current!==y||h()}),()=>{p.clear()}}h()}},[o,n,i,a,c,u,l,p,r]),W(()=>{if(!o)return;let h=l.current,y=i.current;p.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:f},i.current=n,a.current={open:0,close:Zt(u.current,"close")},y!==null&&y!==n?(f(!0),h?.setIsInstantPhase(!0),h?.onOpenChange(!1,Z(z.none))):(f(!1),h?.setIsInstantPhase(!1))},[o,n,r,i,a,u,l,p]),W(()=>()=>{l.current=null},[l]),Be.useMemo(()=>({hasProvider:d,delayRef:a,isInstantPhase:m}),[d,a,m])}function it(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}function Ro(e){return`data-base-ui-${e}`}var ze=g(V(),1),Ya=g(Lt(),1);var Ua={style:{transition:"none"}};var hp="data-base-ui-swipe-ignore",yp="data-swipe-ignore",qy=`[${hp}]`,Gy=`[${yp}]`;var $a={fallbackAxisSide:"end"};var za=g(J(),1),xp=ze.createContext(null),bp=()=>ze.useContext(xp),wp=Ro("portal");function os(e={}){let{ref:t,container:o,componentProps:r=ue,elementProps:n}=e,s=kt(),a=bp()?.portalNode,[c,u]=ze.useState(null),[l,d]=ze.useState(null),p=$(y=>{y!==null&&d(y)}),m=ze.useRef(null);W(()=>{if(o===null){m.current&&(m.current=null,d(null),u(null));return}if(s==null)return;let y=(o&&(Ir(o)?o:o.current))??a??document.body;if(y==null){m.current&&(m.current=null,d(null),u(null));return}m.current!==y&&(m.current=y,d(null),u(y))},[o,a,s]);let f=De("div",r,{ref:[t,p],props:[{id:s,[wp]:""},n]});return{portalNode:l,portalSubtree:c&&f?Ya.createPortal(f,c):null}}var Qt=g(V(),1);function Ka(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(r=>r(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var Rp=g(J(),1),vp=Qt.createContext(null),Ep=Qt.createContext(null),vo=()=>Qt.useContext(vp)?.id||null,Bt=e=>{let t=Qt.useContext(Ep);return e??t};var Fe=g(V(),1);function Sp(e,t){let o=null,r=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",u=s.width,l=s.height,d=s.x,p=s.y;return o==null&&t.x&&i&&(o=s.x-t.x),r==null&&t.y&&a&&(r=s.y-t.y),d-=o||0,p-=r||0,u=0,l=0,!n||c?(u=t.axis==="y"?s.width:0,l=t.axis==="x"?s.height:0,d=i&&t.x!=null?t.x:d,p=a&&t.y!=null?t.y:p):n&&!c&&(l=t.axis==="x"?s.height:l,u=t.axis==="y"?s.width:u),n=!0,{width:u,height:l,x:d,y:p,top:p,right:d+u,bottom:p+l,left:d}}}}function qa(e){return e!=null&&e.clientX!=null}function rs(e,t={}){let{enabled:o=!0,axis:r="both"}=t,n="rootStore"in e?e.rootStore:e,s=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),c=n.context.dataRef,u=Fe.useRef(!1),l=Fe.useRef(null),[d,p]=Fe.useState(),[m,f]=Fe.useState([]),h=$(w=>{n.set("positionReference",w)}),y=$((w,S,E)=>{u.current||c.current.openEvent&&!qa(c.current.openEvent)||n.set("positionReference",Sp(E??a,{x:w,y:S,axis:r,dataRef:c,pointerType:d}))}),R=$(w=>{s?l.current||(y(w.clientX,w.clientY,w.currentTarget),f([])):y(w.clientX,w.clientY,w.currentTarget)}),x=Et(d)?i:s;Fe.useEffect(()=>{if(!o){h(a);return}if(!x)return;function w(){l.current?.(),l.current=null}let S=ae(i);function E(C){let O=_e(C);te(i,O)?w():y(C.clientX,C.clientY)}return!c.current.openEvent||qa(c.current.openEvent)?l.current=Q(S,"mousemove",E):h(a),w},[x,o,i,c,a,n,y,h,m]),Fe.useEffect(()=>()=>{n.set("positionReference",null)},[n]),Fe.useEffect(()=>{o&&!i&&(u.current=!1)},[o,i]),Fe.useEffect(()=>{!o&&s&&(u.current=!0)},[o,s]);let b=Fe.useMemo(()=>{function w(S){p(S.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:R,onMouseEnter:R}},[R]);return Fe.useMemo(()=>o?{reference:b,trigger:b}:{},[o,b])}var je=g(V(),1);var Tp={intentional:"onClick",sloppy:"onPointerDown"};function Cp(){return!1}function Pp(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ns(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:s="sloppy",referencePress:i=Cp,referencePressEvent:a="sloppy",bubbles:c,externalTree:u}=t,l="rootStore"in e?e.rootStore:e,d=l.useState("open"),p=l.useState("floatingElement"),{dataRef:m}=l.context,f=Bt(u),h=$(typeof n=="function"?n:()=>!1),y=typeof n=="function"?h:n,R=y!==!1,x=$(()=>s),{escapeKey:b,outsidePress:w}=Pp(c),S=je.useRef(!1),E=je.useRef(!1),C=je.useRef(!1),O=je.useRef(!1),I=je.useRef(""),P=je.useRef(null),F=st(),M=st(),_=$(()=>{M.clear(),m.current.insideReactTree=!1}),B=$(U=>{let q=m.current.floatingContext?.nodeId;return(f?vt(f.nodesRef.current,q):[]).some(Y=>Y.context?.open&&!Y.context.dataRef.current[U])}),v=$(U=>Lr(U,l.select("floatingElement"))||Lr(U,l.select("domReferenceElement"))),A=$(U=>{i()&&l.setOpen(!1,Z(z.triggerPress,U.nativeEvent))}),j=$(U=>{if(!d||!o||!r||U.key!=="Escape"||O.current||!b&&B("__escapeKeyBubbles"))return;let q=Ca(U)?U.nativeEvent:U,ee=Z(z.escapeKey,q);l.setOpen(!1,ee),ee.isCanceled||U.preventDefault(),!b&&!ee.isPropagationAllowed&&U.stopPropagation()}),T=$(()=>{m.current.insideReactTree=!0,M.start(0,_)}),k=$(U=>{if(!d||!o||U.button!==0)return;let q=_e(U.nativeEvent);te(l.select("floatingElement"),q)&&(S.current||(S.current=!0,E.current=!1))}),N=$(U=>{!d||!o||(U.defaultPrevented||U.nativeEvent.defaultPrevented)&&S.current&&(E.current=!0)});je.useEffect(()=>{if(!d||!o)return;m.current.__escapeKeyBubbles=b,m.current.__outsidePressBubbles=w;let U=new Ye,q=new Ye;function ee(){U.clear(),O.current=!0}function Y(){U.start(bo()?5:0,()=>{O.current=!1})}function ie(){C.current=!0,q.start(0,()=>{C.current=!1})}function ge(){S.current=!1,E.current=!1}function ne(){let D=I.current,L=D==="pen"||!D?"mouse":D,Re=x(),ve=typeof Re=="function"?Re():Re;return typeof ve=="string"?ve:ve[L]}function Ae(D){let L=ne();return L==="intentional"&&D.type!=="click"||L==="sloppy"&&D.type==="click"}function Ce(D){let L=m.current.floatingContext?.nodeId,Re=f&&vt(f.nodesRef.current,L).some(ve=>Lr(D,ve.context?.elements.floating));return v(D)||Re}function K(D){if(Ae(D)){D.type!=="click"&&!v(D)&&(q.clear(),C.current=!1),_();return}if(m.current.insideReactTree){_();return}let L=_e(D),Re=`[${Ro("inert")}]`,ve=H(L)?L.getRootNode():null,Pt=Array.from((yo(ve)?ve:ye(l.select("floatingElement"))).querySelectorAll(Re)),so=l.context.triggerElements;if(L&&(so.hasElement(L)||so.hasMatchingElement(Pe=>te(Pe,L))))return;let Ot=H(L)?L:null;for(;Ot&&!tt(Ot);){let Pe=Qe(Ot);if(tt(Pe)||!H(Pe))break;Ot=Pe}if(!(Pt.length&&H(L)&&!Ea(L)&&!te(L,l.select("floatingElement"))&&Pt.every(Pe=>!te(Ot,Pe)))){if(he(L)&&!("touches"in D)){let Pe=tt(L),yt=Ee(L),Lo=/auto|scroll/,mr=Pe||Lo.test(yt.overflowX),gr=Pe||Lo.test(yt.overflowY),hr=mr&&L.clientWidth>0&&L.scrollWidth>L.clientWidth,yr=gr&&L.clientHeight>0&&L.scrollHeight>L.clientHeight,oe=yt.direction==="rtl",Oe=yr&&(oe?D.offsetX<=L.offsetWidth-L.clientWidth:D.offsetX>L.clientWidth),qe=hr&&D.offsetY>L.clientHeight;if(Oe||qe)return}if(!Ce(D)){if(ne()==="intentional"&&C.current){q.clear(),C.current=!1;return}typeof y=="function"&&!y(D)||B("__outsidePressBubbles")||(l.setOpen(!1,Z(z.outsidePress,D)),_())}}}function ce(D){ne()!=="sloppy"||D.pointerType==="touch"||!l.select("open")||!o||v(D)||K(D)}function me(D){if(ne()!=="sloppy"||!l.select("open")||!o||v(D))return;let L=D.touches[0];L&&(P.current={startTime:Date.now(),startX:L.clientX,startY:L.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},F.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}function ct(D,L){let Re=_e(D);if(!Re)return;let ve=Q(Re,D.type,()=>{L(D),ve()})}function gt(D){I.current="touch",ct(D,me)}function ht(D){F.clear(),D.type==="pointerdown"&&(I.current=D.pointerType),!(D.type==="mousedown"&&P.current&&!P.current.dismissOnMouseDown)&&ct(D,L=>{L.type==="pointerdown"?ce(L):K(L)})}function We(D){if(!S.current)return;let L=E.current;if(ge(),ne()==="intentional"){if(D.type==="pointercancel"){L&&ie();return}if(!Ce(D)){if(L){ie();return}typeof y=="function"&&!y(D)||(q.clear(),C.current=!0,_())}}}function ut(D){if(ne()!=="sloppy"||!P.current||v(D))return;let L=D.touches[0];if(!L)return;let Re=Math.abs(L.clientX-P.current.startX),ve=Math.abs(L.clientY-P.current.startY),Pt=Math.sqrt(Re*Re+ve*ve);Pt>5&&(P.current.dismissOnTouchEnd=!0),Pt>10&&(K(D),F.clear(),P.current=null)}function fr(D){ct(D,ut)}function dr(D){ne()!=="sloppy"||!P.current||v(D)||(P.current.dismissOnTouchEnd&&K(D),F.clear(),P.current=null)}function Ct(D){ct(D,dr)}let xe=ye(p),pr=it(r&&it(Q(xe,"keydown",j),Q(xe,"compositionstart",ee),Q(xe,"compositionend",Y)),R&&it(Q(xe,"click",ht,!0),Q(xe,"pointerdown",ht,!0),Q(xe,"pointerup",We,!0),Q(xe,"pointercancel",We,!0),Q(xe,"mousedown",ht,!0),Q(xe,"mouseup",We,!0),Q(xe,"touchstart",gt,!0),Q(xe,"touchmove",fr,!0),Q(xe,"touchend",Ct,!0)));return()=>{pr(),U.clear(),q.clear(),ge(),C.current=!1}},[m,p,r,R,y,d,o,b,w,j,_,x,B,v,f,l,F]),je.useEffect(_,[y,_]);let X=je.useMemo(()=>({onKeyDown:j,[Tp[a]]:A,...a!=="intentional"&&{onClick:A}}),[j,A,a]),le=je.useMemo(()=>({onKeyDown:j,onPointerDown:N,onMouseDown:N,onClickCapture:T,onMouseDownCapture(U){T(),k(U)},onPointerDownCapture(U){T(),k(U)},onMouseUpCapture:T,onTouchEndCapture:T,onTouchMoveCapture:T}),[j,T,k,N]);return je.useMemo(()=>o?{reference:X,floating:le,trigger:X}:{},[o,X,le])}var Se=g(V(),1);function Ga(e,t,o){let{reference:r,floating:n}=e,s=Me(t),i=Jo(t),a=Xo(i),c=we(t),u=s==="y",l=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,p=r[a]/2-n[a]/2,m;switch(c){case"top":m={x:l,y:r.y-n.height};break;case"bottom":m={x:l,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-n.width,y:d};break;default:m={x:r.x,y:r.y}}switch(nt(t)){case"start":m[i]-=p*(o&&u?-1:1);break;case"end":m[i]+=p*(o&&u?-1:1);break}return m}async function Za(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=rt(t,e),f=jr(m),y=a[p?d==="floating"?"reference":"floating":d],R=Jt(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(y)))==null||o?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:l,strategy:c})),x=d==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:c}):x);return{top:(R.top-S.top+f.top)/w.y,bottom:(S.bottom-R.bottom+f.bottom)/w.y,left:(R.left-S.left+f.left)/w.x,right:(S.right-R.right+f.right)/w.x}}var Op=50,Qa=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:i}=o,a=i.detectOverflow?i:{...i,detectOverflow:Za},c=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:l,y:d}=Ga(u,r,c),p=r,m=0,f={};for(let h=0;h<s.length;h++){let y=s[h];if(!y)continue;let{name:R,fn:x}=y,{x:b,y:w,data:S,reset:E}=await x({x:l,y:d,initialPlacement:r,placement:p,strategy:n,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});l=b??l,d=w??d,f[R]={...f[R],...S},E&&m<Op&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):E.rects),{x:l,y:d}=Ga(u,p,c)),h=-1)}return{x:l,y:d,placement:p,strategy:n,middlewareData:f}};var el=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:h=!0,...y}=rt(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};let R=we(n),x=Me(a),b=we(a)===a,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=p||(b||!h?[Ko(a)]:Aa(a)),E=f!=="none";!p&&E&&S.push(...Na(a,h,f,w));let C=[a,...S],O=await c.detectOverflow(t,y),I=[],P=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&I.push(O[R]),d){let B=Ia(n,i,w);I.push(O[B[0]],O[B[1]])}if(P=[...P,{placement:n,overflows:I}],!I.every(B=>B<=0)){var F,M;let B=(((F=s.flip)==null?void 0:F.index)||0)+1,v=C[B];if(v&&(!(d==="alignment"?x!==Me(v):!1)||P.every(T=>Me(T.placement)===x?T.overflows[0]>0:!0)))return{data:{index:B,overflows:P},reset:{placement:v}};let A=(M=P.filter(j=>j.overflows[0]<=0).sort((j,T)=>j.overflows[1]-T.overflows[1])[0])==null?void 0:M.placement;if(!A)switch(m){case"bestFit":{var _;let j=(_=P.filter(T=>{if(E){let k=Me(T.placement);return k===x||k==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(k=>k>0).reduce((k,N)=>k+N,0)]).sort((T,k)=>T[1]-k[1])[0])==null?void 0:_[0];j&&(A=j);break}case"initialPlacement":A=a;break}if(n!==A)return{reset:{placement:A}}}return{}}}};function Xa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ja(e){return ka.some(t=>e[t]>=0)}var tl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:r}=t,{strategy:n="referenceHidden",...s}=rt(e,t);switch(n){case"referenceHidden":{let i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=Xa(i,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Ja(a)}}}case"escaped":{let i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=Xa(i,o.floating);return{data:{escapedOffsets:a,escaped:Ja(a)}}}default:return{}}}}};var ol=new Set(["left","top"]);async function _p(e,t){let{placement:o,platform:r,elements:n}=e,s=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=we(o),a=nt(o),c=Me(o)==="y",u=ol.has(i)?-1:1,l=s&&c?-1:1,d=rt(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof f=="number"&&(m=a==="end"?f*-1:f),c?{x:m*l,y:p*u}:{x:p*u,y:m*l}}var rl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:s,placement:i,middlewareData:a}=t,c=await _p(t,e);return i===((o=a.offset)==null?void 0:o.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:n+c.x,y:s+c.y,data:{...c,placement:i}}}}},nl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:R=>{let{x,y:b}=R;return{x,y:b}}},...u}=rt(e,t),l={x:o,y:r},d=await s.detectOverflow(t,u),p=Me(we(n)),m=Fr(p),f=l[m],h=l[p];if(i){let R=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=f+d[R],w=f-d[x];f=Go(b,f,w)}if(a){let R=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=h+d[R],w=h-d[x];h=Go(b,h,w)}let y=c.fn({...t,[m]:f,[p]:h});return{...y,data:{x:y.x-o,y:y.y-r,enabled:{[m]:i,[p]:a}}}}}},sl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:n,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:u=!0}=rt(e,t),l={x:o,y:r},d=Me(n),p=Fr(d),m=l[p],f=l[d],h=rt(a,t),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let b=p==="y"?"height":"width",w=s.reference[p]-s.floating[b]+y.mainAxis,S=s.reference[p]+s.reference[b]-y.mainAxis;m<w?m=w:m>S&&(m=S)}if(u){var R,x;let b=p==="y"?"width":"height",w=ol.has(we(n)),S=s.reference[d]-s.floating[b]+(w&&((R=i.offset)==null?void 0:R[d])||0)+(w?0:y.crossAxis),E=s.reference[d]+s.reference[b]+(w?0:((x=i.offset)==null?void 0:x[d])||0)-(w?y.crossAxis:0);f<S?f=S:f>E&&(f=E)}return{[p]:m,[d]:f}}}},il=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:n,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...u}=rt(e,t),l=await i.detectOverflow(t,u),d=we(n),p=nt(n),m=Me(n)==="y",{width:f,height:h}=s.floating,y,R;d==="top"||d==="bottom"?(y=d,R=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(R=d,y=p==="end"?"top":"bottom");let x=h-l.top-l.bottom,b=f-l.left-l.right,w=Dt(h-l[y],x),S=Dt(f-l[R],b),E=!t.middlewareData.shift,C=w,O=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(O=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=x),E&&!p){let P=ke(l.left,0),F=ke(l.right,0),M=ke(l.top,0),_=ke(l.bottom,0);m?O=f-2*(P!==0||F!==0?P+F:ke(l.left,l.right)):C=h-2*(M!==0||_!==0?M+_:ke(l.top,l.bottom))}await c({...t,availableWidth:O,availableHeight:C});let I=await i.getDimensions(a.floating);return f!==I.width||h!==I.height?{reset:{rects:!0}}:{}}}};function ul(e){let t=Ee(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=he(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r,a=Mt(o)!==s||Mt(r)!==i;return a&&(o=s,r=i),{width:o,height:r,$:a}}function is(e){return H(e)?e:e.contextElement}function Eo(e){let t=is(e);if(!he(t))return ot(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:s}=ul(t),i=(s?Mt(o.width):o.width)/r,a=(s?Mt(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var kp=ot(0);function fl(e){let t=ae(e);return!bo()||!t.visualViewport?kp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ip(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==ae(e)?!1:t}function eo(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),s=is(e),i=ot(1);t&&(r?H(r)&&(i=Eo(r)):i=Eo(e));let a=Ip(s,o,r)?fl(s):ot(0),c=(n.left+a.x)/i.x,u=(n.top+a.y)/i.y,l=n.width/i.x,d=n.height/i.y;if(s){let p=ae(s),m=r&&H(r)?ae(r):r,f=p,h=Nr(f);for(;h&&r&&m!==f;){let y=Eo(h),R=h.getBoundingClientRect(),x=Ee(h),b=R.left+(h.clientLeft+parseFloat(x.paddingLeft))*y.x,w=R.top+(h.clientTop+parseFloat(x.paddingTop))*y.y;c*=y.x,u*=y.y,l*=y.x,d*=y.y,c+=b,u+=w,f=ae(h),h=Nr(f)}}return Jt({width:l,height:d,x:c,y:u})}function Wr(e,t){let o=zo(e).scrollLeft;return t?t.left+o:eo(et(e)).left+o}function dl(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Wr(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Ap(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,s=n==="fixed",i=et(r),a=t?Yo(t.floating):!1;if(r===i||a&&s)return o;let c={scrollLeft:0,scrollTop:0},u=ot(1),l=ot(0),d=he(r);if((d||!d&&!s)&&((Xt(r)!=="body"||xo(i))&&(c=zo(r)),d)){let m=eo(r);u=Eo(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}let p=i&&!d&&!s?dl(i,c):ot(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-c.scrollLeft*u.x+l.x+p.x,y:o.y*u.y-c.scrollTop*u.y+l.y+p.y}}function Np(e){return Array.from(e.getClientRects())}function Dp(e){let t=et(e),o=zo(e),r=e.ownerDocument.body,n=ke(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ke(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-o.scrollLeft+Wr(e),a=-o.scrollTop;return Ee(r).direction==="rtl"&&(i+=ke(t.clientWidth,r.clientWidth)-n),{width:n,height:s,x:i,y:a}}var al=25;function Mp(e,t){let o=ae(e),r=et(e),n=o.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(n){s=n.width,i=n.height;let l=bo();(!l||l&&t==="fixed")&&(a=n.offsetLeft,c=n.offsetTop)}let u=Wr(r);if(u<=0){let l=r.ownerDocument,d=l.body,p=getComputedStyle(d),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,f=Math.abs(r.clientWidth-d.clientWidth-m);f<=al&&(s-=f)}else u<=al&&(s+=u);return{width:s,height:i,x:a,y:c}}function Lp(e,t){let o=eo(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,s=he(e)?Eo(e):ot(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=n*s.x,u=r*s.y;return{width:i,height:a,x:c,y:u}}function ll(e,t,o){let r;if(t==="viewport")r=Mp(e,o);else if(t==="document")r=Dp(et(e));else if(H(t))r=Lp(t,o);else{let n=fl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jt(r)}function pl(e,t){let o=Qe(e);return o===t||!H(o)||tt(o)?!1:Ee(o).position==="fixed"||pl(o,t)}function Bp(e,t){let o=t.get(e);if(o)return o;let r=It(e,[],!1).filter(a=>H(a)&&Xt(a)!=="body"),n=null,s=Ee(e).position==="fixed",i=s?Qe(e):e;for(;H(i)&&!tt(i);){let a=Ee(i),c=Ar(i);!c&&a.position==="fixed"&&(n=null),(s?!c&&!n:!c&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||xo(i)&&!c&&pl(e,i))?r=r.filter(l=>l!==i):n=a,i=Qe(i)}return t.set(e,r),r}function Fp(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?Yo(t)?[]:Bp(t,this._c):[].concat(o),r],a=ll(t,i[0],n),c=a.top,u=a.right,l=a.bottom,d=a.left;for(let p=1;p<i.length;p++){let m=ll(t,i[p],n);c=ke(m.top,c),u=Dt(m.right,u),l=Dt(m.bottom,l),d=ke(m.left,d)}return{width:u-d,height:l-c,x:d,y:c}}function jp(e){let{width:t,height:o}=ul(e);return{width:t,height:o}}function Vp(e,t,o){let r=he(t),n=et(t),s=o==="fixed",i=eo(e,!0,s,t),a={scrollLeft:0,scrollTop:0},c=ot(0);function u(){c.x=Wr(n)}if(r||!r&&!s)if((Xt(t)!=="body"||xo(n))&&(a=zo(t)),r){let m=eo(t,!0,s,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else n&&u();s&&!r&&n&&u();let l=n&&!r&&!s?dl(n,a):ot(0),d=i.left+a.scrollLeft-c.x-l.x,p=i.top+a.scrollTop-c.y-l.y;return{x:d,y:p,width:i.width,height:i.height}}function ss(e){return Ee(e).position==="static"}function cl(e,t){if(!he(e)||Ee(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return et(e)===o&&(o=o.ownerDocument.body),o}function ml(e,t){let o=ae(e);if(Yo(e))return o;if(!he(e)){let n=Qe(e);for(;n&&!tt(n);){if(H(n)&&!ss(n))return n;n=Qe(n)}return o}let r=cl(e,t);for(;r&&ha(r)&&ss(r);)r=cl(r,t);return r&&tt(r)&&ss(r)&&!Ar(r)?o:r||ya(e)||o}var Hp=async function(e){let t=this.getOffsetParent||ml,o=this.getDimensions,r=await o(e.floating);return{reference:Vp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Wp(e){return Ee(e).direction==="rtl"}var as={convertOffsetParentRelativeRectToViewportRelativeRect:Ap,getDocumentElement:et,getClippingRect:Fp,getOffsetParent:ml,getElementRects:Hp,getClientRects:Np,getDimensions:jp,getScale:Eo,isElement:H,isRTL:Wp};function gl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Up(e,t){let o=null,r,n=et(e);function s(){var a;clearTimeout(r),(a=o)==null||a.disconnect(),o=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();let u=e.getBoundingClientRect(),{left:l,top:d,width:p,height:m}=u;if(a||t(),!p||!m)return;let f=qo(d),h=qo(n.clientWidth-(l+p)),y=qo(n.clientHeight-(d+m)),R=qo(l),b={rootMargin:-f+"px "+-h+"px "+-y+"px "+-R+"px",threshold:ke(0,Dt(1,c))||1},w=!0;function S(E){let C=E[0].intersectionRatio;if(C!==c){if(!w)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!gl(u,e.getBoundingClientRect())&&i(),w=!1}try{o=new IntersectionObserver(S,{...b,root:n.ownerDocument})}catch{o=new IntersectionObserver(S,b)}o.observe(e)}return i(!0),s}function Qo(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=is(e),l=n||s?[...u?It(u):[],...t?It(t):[]]:[];l.forEach(R=>{n&&R.addEventListener("scroll",o,{passive:!0}),s&&R.addEventListener("resize",o)});let d=u&&a?Up(u,o):null,p=-1,m=null;i&&(m=new ResizeObserver(R=>{let[x]=R;x&&x.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),o()}),u&&!c&&m.observe(u),t&&m.observe(t));let f,h=c?eo(e):null;c&&y();function y(){let R=eo(e);h&&!gl(h,R)&&o(),h=R,f=requestAnimationFrame(y)}return o(),()=>{var R;l.forEach(x=>{n&&x.removeEventListener("scroll",o),s&&x.removeEventListener("resize",o)}),d?.(),(R=m)==null||R.disconnect(),m=null,c&&cancelAnimationFrame(f)}}var hl=rl;var yl=nl,xl=el,bl=il,wl=tl;var Rl=sl,Ur=(e,t,o)=>{let r=new Map,n={platform:as,...o},s={...n.platform,_c:r};return Qa(e,t,{...n,platform:s})};var de=g(V(),1),El=g(V(),1),Sl=g(Lt(),1),Yp=typeof document<"u",zp=function(){},$r=Yp?El.useLayoutEffect:zp;function Yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!Yr(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let s=n[r];if(!(s==="_owner"&&e.$$typeof)&&!Yr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vl(e,t){let o=Tl(e);return Math.round(t*o)/o}function ls(e){let t=de.useRef(e);return $r(()=>{t.current=e}),t}function Cl(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:u}=e,[l,d]=de.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=de.useState(r);Yr(p,r)||m(r);let[f,h]=de.useState(null),[y,R]=de.useState(null),x=de.useCallback(T=>{T!==E.current&&(E.current=T,h(T))},[]),b=de.useCallback(T=>{T!==C.current&&(C.current=T,R(T))},[]),w=s||f,S=i||y,E=de.useRef(null),C=de.useRef(null),O=de.useRef(l),I=c!=null,P=ls(c),F=ls(n),M=ls(u),_=de.useCallback(()=>{if(!E.current||!C.current)return;let T={placement:t,strategy:o,middleware:p};F.current&&(T.platform=F.current),Ur(E.current,C.current,T).then(k=>{let N={...k,isPositioned:M.current!==!1};B.current&&!Yr(O.current,N)&&(O.current=N,Sl.flushSync(()=>{d(N)}))})},[p,t,o,F,M]);$r(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(T=>({...T,isPositioned:!1})))},[u]);let B=de.useRef(!1);$r(()=>(B.current=!0,()=>{B.current=!1}),[]),$r(()=>{if(w&&(E.current=w),S&&(C.current=S),w&&S){if(P.current)return P.current(w,S,_);_()}},[w,S,_,P,I]);let v=de.useMemo(()=>({reference:E,floating:C,setReference:x,setFloating:b}),[x,b]),A=de.useMemo(()=>({reference:w,floating:S}),[w,S]),j=de.useMemo(()=>{let T={position:o,left:0,top:0};if(!A.floating)return T;let k=vl(A.floating,l.x),N=vl(A.floating,l.y);return a?{...T,transform:"translate("+k+"px, "+N+"px)",...Tl(A.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:k,top:N}},[o,a,A.floating,l.x,l.y]);return de.useMemo(()=>({...l,update:_,refs:v,elements:A,floatingStyles:j}),[l,_,v,A,j])}var cs=(e,t)=>{let o=hl(e);return{name:o.name,fn:o.fn,options:[e,t]}},us=(e,t)=>{let o=yl(e);return{name:o.name,fn:o.fn,options:[e,t]}},fs=(e,t)=>({fn:Rl(e).fn,options:[e,t]}),ds=(e,t)=>{let o=xl(e);return{name:o.name,fn:o.fn,options:[e,t]}},ps=(e,t)=>{let o=bl(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ms=(e,t)=>{let o=wl(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Co=g(V(),1);var Vl=g(V(),1);var G=(e,t,o,r,n,s,...i)=>{if(i.length>0)throw new Error(Ne(1));let a;if(e&&t&&o&&r&&n&&s)a=(c,u,l,d)=>{let p=e(c,u,l,d),m=t(c,u,l,d),f=o(c,u,l,d),h=r(c,u,l,d),y=n(c,u,l,d);return s(p,m,f,h,y,u,l,d)};else if(e&&t&&o&&r&&n)a=(c,u,l,d)=>{let p=e(c,u,l,d),m=t(c,u,l,d),f=o(c,u,l,d),h=r(c,u,l,d);return n(p,m,f,h,u,l,d)};else if(e&&t&&o&&r)a=(c,u,l,d)=>{let p=e(c,u,l,d),m=t(c,u,l,d),f=o(c,u,l,d);return r(p,m,f,u,l,d)};else if(e&&t&&o)a=(c,u,l,d)=>{let p=e(c,u,l,d),m=t(c,u,l,d);return o(p,m,u,l,d)};else if(e&&t)a=(c,u,l,d)=>{let p=e(c,u,l,d);return t(p,u,l,d)};else if(e)a=e;else throw new Error("Missing arguments");return a};var Fl=g(V(),1),ws=g(hs(),1),jl=g(Nl(),1);var Dl=g(V(),1);var ys=[],xs;function Ml(){return xs}function Ll(e){ys.push(e)}function bs(e){let t=(o,r)=>{let n=be(um).current,s;try{xs=n;for(let i of ys)i.before(n);s=e(o,r);for(let i of ys)i.after(n);n.didInitialize=!0}finally{xs=void 0}return s};return t.displayName=e.displayName||e.name,t}function Bl(e){return Dl.forwardRef(bs(e))}function um(){return{didInitialize:!1}}var fm=mo(19),dm=fm?mm:gm;function Kr(e,t,o,r,n){return dm(e,t,o,r,n)}function pm(e,t,o,r,n){let s=Fl.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,ws.useSyncExternalStore)(e.subscribe,s,s)}Ll({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o<e.syncHooks.length;o+=1){let r=e.syncHooks[o],n=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,n))&&(t=!0,r.value=n,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let n of e.syncHooks)o.add(n.store);let r=[];for(let n of o)r.push(n.subscribe(t));return()=>{for(let n of r)n()}}),(0,ws.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function mm(e,t,o,r,n){let s=Ml();if(!s)return pm(e,t,o,r,n);let i=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[i],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,r)||!Object.is(a.a3,n))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=r,a.a3=n,a.didChange=!0)):(a={store:e,selector:t,a1:o,a2:r,a3:n,value:t(e.getSnapshot(),o,r,n),didChange:!1},s.syncHooks.push(a)),a.value}function gm(e,t,o,r,n){return(0,jl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,o,r,n))}var qr=class{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let r of this.listeners){if(o!==this.updateTick)return;r(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,r,n){return Kr(this,t,o,r,n)}};var to=g(V(),1);var To=class extends qr{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){to.useDebugValue(t);let r=this;W(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;W(()=>(r.state[t]!==o&&r.set(t,o),()=>{r.set(t,void 0)}),[r,t,o])}useSyncedValues(t){let o=this,r=Object.values(t);W(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){to.useDebugValue(t);let r=this,n=o!==void 0;W(()=>{n&&!Object.is(r.state[t],o)&&r.setState({...r.state,[t]:o})},[r,t,o,n])}select(t,o,r,n){let s=this.selectors[t];return s(this.state,o,r,n)}useState(t,o,r,n){return to.useDebugValue(t),Kr(this,this.selectors[t],o,r,n)}useContextCallback(t,o){to.useDebugValue(t);let r=$(o??wt);this.context[t]=r}useStateSetter(t){let o=to.useRef(void 0);return o.current===void 0&&(o.current=r=>{this.set(t,r)}),o.current}observe(t,o){let r;typeof t=="function"?r=t:r=this.selectors[t];let n=r(this.state);return o(n,n,this),this.subscribe(s=>{let i=r(s);if(!Object.is(n,i)){let a=n;n=i,o(i,a,this)}})}};var hm={open:G(e=>e.open),transitionStatus:G(e=>e.transitionStatus),domReferenceElement:G(e=>e.domReferenceElement),referenceElement:G(e=>e.positionReference??e.referenceElement),floatingElement:G(e=>e.floatingElement),floatingId:G(e=>e.floatingId)},dt=class extends To{constructor(t){let{syncOnly:o,nested:r,onOpenChange:n,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:Ka(),nested:r,triggerElements:s},hm),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&Pa(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let r={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",r)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function Hl(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:s,onOpenChange:i}=e,a=t.useState("open"),c=t.useState("activeTriggerElement"),u=t.useState(o?"popupElement":"positionerElement"),l=t.context.triggerElements,d=i,p=Vl.useRef(null);r===void 0&&p.current===null&&(p.current=new dt({open:a,transitionStatus:void 0,referenceElement:c,floatingElement:u,triggerElements:l,onOpenChange:d,floatingId:n,syncOnly:!0,nested:s}));let m=r??p.current;return t.useSyncedValue("floatingId",n),W(()=>{let f={open:a,floatingId:n,referenceElement:c,floatingElement:u};H(c)&&(f.domReferenceElement=c),m.state.positionReference===m.state.referenceElement&&(f.positionReference=c),m.update(f)},[a,n,c,u,m]),m.context.onOpenChange=d,m.context.nested=s,m}var Wl={tabIndex:-1,[Xn]:""};function Ul(e,t,o=!1){let r=kt(),n=vo()!=null,s=Co.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,n));let i=e??s.current;return Hl({popupStore:i,treatPopupAsFloatingElement:o,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:n,onOpenChange:i.setOpen}),{store:i,internalStore:s.current}}function ym(e,t){let o=Co.useRef(null),r=Co.useRef(null);return Co.useCallback(n=>{if(e===void 0)return;let s=!1;if(o.current!==null){let i=o.current,a=r.current,c=t.context.triggerElements.getById(i);a&&c===a&&(t.context.triggerElements.delete(i),s=!0),o.current=null,r.current=null}if(n!==null&&(o.current=e,r.current=n,t.context.triggerElements.add(e,n),s=!0),s){let i=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==i&&t.set("triggerCount",i)}},[t,e])}function $l(e,t,o){let r=o?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=o??null)}function Yl(e,t,o,r){let n=o.useState("isMountedByTrigger",e),s=ym(e,o),i=$(a=>{if(s(a),!a)return;let c=o.select("open"),u=o.select("activeTriggerId");if(u===e){o.update({activeTriggerElement:a,...c?r:null});return}u==null&&c&&o.update({activeTriggerId:e,activeTriggerElement:a,...r})});return W(()=>{n&&o.update({activeTriggerElement:t.current,...r})},[n,o,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:n}}function zl(e){let t=e.useState("open"),o=e.useState("triggerCount");W(()=>{if(!t){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let r=e.context.triggerElements.size,n={};if(e.state.triggerCount!==r&&(n.triggerCount=r),!e.select("activeTriggerId")&&r===1){let s=e.context.triggerElements.entries().next();if(!s.done){let[i,a]=s.value;n.activeTriggerId=i,n.activeTriggerElement=a}}(n.triggerCount!==void 0||n.activeTriggerId!==void 0)&&e.update(n)},[t,e,o])}function Kl(e,t,o){let{mounted:r,setMounted:n,transitionStatus:s}=ma(e);t.useSyncedValues({mounted:r,transitionStatus:s});let i=$(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)}),a=t.useState("preventUnmountingOnClose");return Vr({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}function ql(e,t){e.useSyncedValues(t),W(()=>()=>{e.update({activeTriggerProps:ue,inactiveTriggerProps:ue,popupProps:ue})},[e])}var Ft=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,o){let r=this.idMap.get(t);r!==o&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(o),this.idMap.set(t,o))}delete(t){let o=this.idMap.get(t);o&&(this.elementsSet.delete(o),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(let o of this.elementsSet)if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Gl(){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Ft,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Jl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Gl(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ue,inactiveTriggerProps:ue,popupProps:ue}}function Zl(e,t,o=!1){return new dt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var er=G(e=>e.triggerIdProp??e.activeTriggerId),Rs=G(e=>e.openProp??e.open),Xl=G(e=>(e.popupElement?.id??e.floatingId)||void 0);function Ql(e,t){return t!==void 0&&Rs(e)&&er(e)===t}function xm(e,t){return Ql(e,t)?!0:t!==void 0&&Rs(e)&&er(e)==null&&e.triggerCount===1}var ec={open:Rs,mounted:G(e=>e.mounted),transitionStatus:G(e=>e.transitionStatus),floatingRootContext:G(e=>e.floatingRootContext),triggerCount:G(e=>e.triggerCount),preventUnmountingOnClose:G(e=>e.preventUnmountingOnClose),payload:G(e=>e.payload),activeTriggerId:er,activeTriggerElement:G(e=>e.mounted?e.activeTriggerElement:null),popupId:Xl,isTriggerActive:G((e,t)=>t!==void 0&&er(e)===t),isOpenedByTrigger:G((e,t)=>Ql(e,t)),isMountedByTrigger:G((e,t)=>t!==void 0&&er(e)===t&&e.mounted),triggerProps:G((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:G((e,t)=>xm(e,t)?Xl(e):void 0),popupProps:G(e=>e.popupProps),popupElement:G(e=>e.popupElement),positionerElement:G(e=>e.positionerElement)};function tc(e){let{open:t=!1,onOpenChange:o,elements:r={}}=e,n=kt(),s=vo()!=null,i=be(()=>new dt({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ft,floatingId:n,syncOnly:!1,nested:s})).current;return W(()=>{let a={open:t,floatingId:n};r.reference!==void 0&&(a.referenceElement=r.reference,a.domReferenceElement=H(r.reference)?r.reference:null),r.floating!==void 0&&(a.floatingElement=r.floating),i.update(a)},[t,n,r.reference,r.floating,i]),i.context.onOpenChange=o,i.context.nested=s,i}function vs(e={}){let{nodeId:t,externalTree:o}=e,r=tc(e),n=e.rootContext||r,s=n.useState("referenceElement"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),c=n.useState("open"),u=n.useState("floatingId"),[l,d]=Se.useState(null),[p,m]=Se.useState(void 0),[f,h]=Se.useState(void 0),y=Se.useRef(null),R=Bt(o),x=Se.useMemo(()=>({reference:s,floating:i,domReference:a}),[s,i,a]),b=Cl({...e,elements:{...x,...l&&{reference:l}}}),w=H(p)?p:null,S=f===void 0?n.state.floatingElement:f;n.useSyncedValue("referenceElement",p??null),n.useSyncedValue("domReferenceElement",p===void 0?a:w),n.useSyncedValue("floatingElement",S);let E=Se.useCallback(M=>{let _=H(M)?{getBoundingClientRect:()=>M.getBoundingClientRect(),getClientRects:()=>M.getClientRects(),contextElement:M}:M;d(_),b.refs.setReference(_)},[b.refs]),C=Se.useCallback(M=>{(H(M)||M===null)&&(y.current=M,m(M)),(H(b.refs.reference.current)||b.refs.reference.current===null||M!==null&&!H(M))&&b.refs.setReference(M)},[b.refs,m]),O=Se.useCallback(M=>{h(M),b.refs.setFloating(M)},[b.refs]),I=Se.useMemo(()=>({...b.refs,setReference:C,setFloating:O,setPositionReference:E,domReference:y}),[b.refs,C,O,E]),P=Se.useMemo(()=>({...b.elements,domReference:a}),[b.elements,a]),F=Se.useMemo(()=>({...b,dataRef:n.context.dataRef,open:c,onOpenChange:n.setOpen,events:n.context.events,floatingId:u,refs:I,elements:P,nodeId:t,rootStore:n}),[b,I,P,t,n,c,u]);return W(()=>{a&&(y.current=a)},[a]),W(()=>{n.context.dataRef.current.floatingContext=F;let M=R?.nodesRef.current.find(_=>_.id===t);M&&(M.context=F)}),Se.useMemo(()=>({...b,context:F,refs:I,elements:P,rootStore:n}),[b,I,P,F,n])}var pt=g(V(),1);var Es=Ra&&wa;function Ss(e,t={}){let{enabled:o=!0,delay:r}=t,n="rootStore"in e?e.rootStore:e,{events:s,dataRef:i}=n.context,a=pt.useRef(!1),c=pt.useRef(null),u=pt.useRef(!0),l=st();pt.useEffect(()=>{let p=n.select("domReferenceElement");if(!o)return;let m=ae(p);function f(){let R=n.select("domReferenceElement");!n.select("open")&&he(R)&&R===Mr(ye(R))&&(a.current=!0)}function h(){u.current=!0}function y(){u.current=!1}return it(Q(m,"blur",f),Es&&Q(m,"keydown",h,!0),Es&&Q(m,"pointerdown",y,!0))},[n,o]),pt.useEffect(()=>{if(!o)return;function p(m){if(m.reason===z.triggerPress||m.reason===z.escapeKey){let f=n.select("domReferenceElement");H(f)&&(c.current=f,a.current=!0)}}return s.on("openchange",p),()=>{s.off("openchange",p)}},[s,o,n]);let d=pt.useMemo(()=>{function p(){a.current=!1,c.current=null}return{onMouseLeave(){p()},onFocus(m){let f=m.currentTarget;if(a.current){if(c.current===f)return;p()}let h=_e(m.nativeEvent);if(H(h)){if(Es&&!m.relatedTarget){if(!u.current&&!Sa(h))return}else if(!Ta(h))return}let y=Nt(m.relatedTarget,n.context.triggerElements),{nativeEvent:R,currentTarget:x}=m,b=typeof r=="function"?r():r;if(n.select("open")&&y||b===0||b===void 0){n.setOpen(!0,Z(z.triggerFocus,R,x));return}l.start(b,()=>{a.current||n.setOpen(!0,Z(z.triggerFocus,R,x))})},onBlur(m){p();let f=m.relatedTarget,h=m.nativeEvent,y=H(f)&&f.hasAttribute(Ro("focus-guard"))&&f.getAttribute("data-type")==="outside";l.start(0,()=>{let R=n.select("domReferenceElement"),x=Mr(ye(R));!f&&x===R||te(i.current.floatingContext?.refs.floating.current,x)||te(R,x)||y||Nt(f??x,n.context.triggerElements)||n.setOpen(!1,Z(z.triggerFocus,h))})}}},[i,r,n,l]);return pt.useMemo(()=>o?{reference:d,trigger:d}:{},[o,d])}var Cs=g(V(),1);var Ts=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ye,this.restTimeout=new Ye,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Gr=new WeakMap;function Po(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Gr.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Gr.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Xr(e,t){let{scopeElement:o,referenceElement:r,floatingElement:n}=t,s=Gr.get(o);s&&s!==e&&Po(s),Po(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=n,Gr.set(o,e),o.style.pointerEvents="none",r.style.pointerEvents="auto",n.style.pointerEvents="auto"}function Oo(e){let t=e.context.dataRef.current,o=be(()=>t.hoverInteractionState??Ts.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),go(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ps(e,t={}){let{enabled:o=!0,closeDelay:r=0,nodeId:n}=t,s="rootStore"in e?e.rootStore:e,i=s.useState("open"),a=s.useState("floatingElement"),c=s.useState("domReferenceElement"),{dataRef:u}=s.context,l=Bt(),d=vo(),p=Oo(s),m=st(),f=$(()=>Hr(u.current.openEvent?.type,p.interactedInside)),h=$(()=>Va(u.current.openEvent?.type)),y=$(()=>{Po(p)});W(()=>{i||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,y())},[i,p,y]),Cs.useEffect(()=>y,[y]),W(()=>{if(o&&i&&p.handleCloseOptions?.blockPointerEvents&&h()&&H(c)&&a){let R=c,x=a,b=ye(a),w=l?.nodesRef.current.find(O=>O.id===d)?.context?.elements.floating;w&&(w.style.pointerEvents="");let S=p.pointerEventsScopeElement!==x?p.pointerEventsScopeElement:null,E=w!==x?w:null,C=p.handleCloseOptions?.getScope?.()??S??E??R.closest("[data-rootownerid]")??b.body;return Xr(p,{scopeElement:C,referenceElement:R,floatingElement:x}),()=>{y()}}},[o,i,c,a,p,h,l,d,y]),Cs.useEffect(()=>{if(!o)return;function R(){return!!(l&&d&&vt(l.nodesRef.current,d).length>0)}function x(O){let I=Zt(r,"close",p.pointerType),P=()=>{s.setOpen(!1,Z(z.triggerHover,O)),l?.events.emit("floating.closed",O)};I?p.openChangeTimeout.start(I,P):(p.openChangeTimeout.clear(),P())}function b(O){let I=_e(O);if(!Zn(I)){p.interactedInside=!1;return}p.interactedInside=I?.closest("[aria-haspopup]")!=null}function w(){p.openChangeTimeout.clear(),m.clear(),l?.events.off("floating.closed",E),y()}function S(O){if(R()&&l){l.events.on("floating.closed",E);return}if(Nt(O.relatedTarget,s.context.triggerElements))return;let I=u.current.floatingContext?.nodeId??n,P=O.relatedTarget;if(!(l&&I&&H(P)&&vt(l.nodesRef.current,I,!1).some(M=>te(M.context?.elements.floating,P)))){if(p.handler){p.handler(O);return}y(),f()||x(O)}}function E(O){!l||!d||R()||m.start(0,()=>{l.events.off("floating.closed",E),s.setOpen(!1,Z(z.triggerHover,O)),l.events.emit("floating.closed",O)})}let C=a;return it(C&&Q(C,"mouseenter",w),C&&Q(C,"mouseleave",S),C&&Q(C,"pointerdown",b,!0),()=>{l?.events.off("floating.closed",E)})},[o,a,s,u,r,n,f,y,p,l,d,m])}var jt=g(V(),1),oc=g(Lt(),1);var bm={current:null};function Os(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:c=bm,externalTree:u,isActiveTrigger:l=!0,getHandleCloseContext:d,isClosing:p,shouldOpen:m}=t,f="rootStore"in e?e.rootStore:e,{dataRef:h,events:y}=f.context,R=Bt(u),x=Oo(f),b=jt.useRef(!1),w=Le(n),S=Le(r),E=Le(i),C=Le(o),O=Le(m),I=Le(p),P=$(()=>Hr(h.current.openEvent?.type,x.interactedInside)),F=$(()=>O.current?.()!==!1),M=$((v,A,j)=>{let T=f.context.triggerElements;if(T.hasElement(A))return!v||!te(v,A);if(!H(j))return!1;let k=j;return T.hasMatchingElement(N=>te(N,k))&&(!v||!te(v,k))}),_=$(()=>{if(!x.handler)return;ye(f.select("domReferenceElement")).removeEventListener("mousemove",x.handler),x.handler=void 0}),B=$(()=>{Po(x)});return l&&(x.handleCloseOptions=w.current?.__options),jt.useEffect(()=>_,[_]),jt.useEffect(()=>{if(!o)return;function v(A){A.open?b.current=!1:(b.current=A.reason===z.triggerHover,_(),x.openChangeTimeout.clear(),x.restTimeout.clear(),x.blockMouseMove=!0,x.restTimeoutPending=!1)}return y.on("openchange",v),()=>{y.off("openchange",v)}},[o,y,x,_]),jt.useEffect(()=>{if(!o)return;function v(k,N=!0){let X=Zt(S.current,"close",x.pointerType);X?x.openChangeTimeout.start(X,()=>{f.setOpen(!1,Z(z.triggerHover,k)),R?.events.emit("floating.closed",k)}):N&&(x.openChangeTimeout.clear(),f.setOpen(!1,Z(z.triggerHover,k)),R?.events.emit("floating.closed",k))}let A=c.current??(l?f.select("domReferenceElement"):null);if(!H(A))return;function j(k){if(x.openChangeTimeout.clear(),x.blockMouseMove=!1,s&&!Et(x.pointerType))return;let N=Qn(E.current),X=Zt(S.current,"open",x.pointerType),le=_e(k),U=k.currentTarget??null,q=f.select("domReferenceElement"),ee=U;if(H(le)&&!f.context.triggerElements.hasElement(le)){for(let me of f.context.triggerElements.elements())if(te(me,le)){ee=me;break}}H(U)&&H(q)&&!f.context.triggerElements.hasElement(U)&&te(U,q)&&(ee=q);let Y=ee==null?!1:M(q,ee,le),ie=f.select("open"),ge=I.current?.()??f.select("transitionStatus")==="ending",ne=!ie&&ge&&b.current,Ae=!Y&&H(ee)&&H(q)&&te(q,ee)&&ne,Ce=N>0&&!X,K=Y&&(ie||ne)||Ae,ce=!ie||Y;if(K){F()&&f.setOpen(!0,Z(z.triggerHover,k,ee));return}Ce||(X?x.openChangeTimeout.start(X,()=>{ce&&F()&&f.setOpen(!0,Z(z.triggerHover,k,ee))}):ce&&F()&&f.setOpen(!0,Z(z.triggerHover,k,ee)))}function T(k){if(P()){B();return}_();let N=f.select("domReferenceElement"),X=ye(N);x.restTimeout.clear(),x.restTimeoutPending=!1;let le=h.current.floatingContext??d?.();if(Nt(k.relatedTarget,f.context.triggerElements))return;if(w.current&&le){f.select("open")||x.openChangeTimeout.clear();let q=c.current;x.handler=w.current({...le,tree:R,x:k.clientX,y:k.clientY,onClose(){B(),_(),C.current&&!P()&&q===f.select("domReferenceElement")&&v(k,!0)}}),X.addEventListener("mousemove",x.handler),x.handler(k);return}(x.pointerType!=="touch"||!te(f.select("floatingElement"),k.relatedTarget))&&v(k)}return a?it(Q(A,"mousemove",j,{once:!0}),Q(A,"mouseenter",j),Q(A,"mouseleave",T)):it(Q(A,"mouseenter",j),Q(A,"mouseleave",T))},[_,B,h,S,f,o,w,x,l,M,P,s,a,E,c,R,C,d,I,F]),jt.useMemo(()=>{if(!o)return;function v(A){x.pointerType=A.pointerType}return{onPointerDown:v,onPointerEnter:v,onMouseMove(A){let{nativeEvent:j}=A,T=A.currentTarget,k=f.select("domReferenceElement"),N=f.select("open"),X=M(k,T,A.target);if(s&&!Et(x.pointerType))return;if(N&&X&&x.handleCloseOptions?.blockPointerEvents){let q=f.select("floatingElement");if(q){let ee=x.handleCloseOptions?.getScope?.()??T.ownerDocument.body;Xr(x,{scopeElement:ee,referenceElement:T,floatingElement:q})}}let le=Qn(E.current);if(N&&!X||le===0||!X&&x.restTimeoutPending&&A.movementX**2+A.movementY**2<2)return;x.restTimeout.clear();function U(){if(x.restTimeoutPending=!1,P())return;let q=f.select("open");!x.blockMouseMove&&(!q||X)&&F()&&f.setOpen(!0,Z(z.triggerHover,j,T))}x.pointerType==="touch"?oc.flushSync(()=>{U()}):X&&N?U():(x.restTimeoutPending=!0,x.restTimeout.start(le,U))}}},[o,x,P,M,s,f,E,F])}var rc=.1,wm=rc*rc,re=.5;function Jr(e,t,o,r,n,s){return r>=t!=s>=t&&e<=(n-o)*(t-r)/(s-r)+o}function Zr(e,t,o,r,n,s,i,a,c,u){let l=!1;return Jr(e,t,o,r,n,s)&&(l=!l),Jr(e,t,n,s,i,a)&&(l=!l),Jr(e,t,i,a,c,u)&&(l=!l),Jr(e,t,c,u,o,r)&&(l=!l),l}function Rm(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function Qr(e,t,o,r,n,s){let i=Math.min(o,n),a=Math.max(o,n),c=Math.min(r,s),u=Math.max(r,s);return e>=i&&e<=a&&t>=c&&t<=u}function _s(e={}){let{blockPointerEvents:t=!1}=e,o=new Ye,r=({x:n,y:s,placement:i,elements:a,onClose:c,nodeId:u,tree:l})=>{let d=i?.split("-")[0],p=!1,m=null,f=null,h=typeof performance<"u"?performance.now():0;function y(x,b){let w=performance.now(),S=w-h;if(m===null||f===null||S===0)return m=x,f=b,h=w,!1;let E=x-m,C=b-f,O=E*E+C*C,I=S*S*wm;return m=x,f=b,h=w,O<I}function R(){o.clear(),c()}return function(b){o.clear();let w=a.domReference,S=a.floating;if(!w||!S||d==null||n==null||s==null)return;let{clientX:E,clientY:C}=b,O=_e(b),I=b.type==="mouseleave",P=te(S,O),F=te(w,O);if(P&&(p=!0,!I))return;if(F&&(p=!1,!I)){p=!0;return}if(I&&H(b.relatedTarget)&&te(S,b.relatedTarget))return;function M(){return!!(l&&vt(l.nodesRef.current,u).length>0)}function _(){M()||R()}if(M())return;let B=w.getBoundingClientRect(),v=S.getBoundingClientRect(),A=n>v.right-v.width/2,j=s>v.bottom-v.height/2,T=v.width>B.width,k=v.height>B.height,N=(T?B:v).left,X=(T?B:v).right,le=(k?B:v).top,U=(k?B:v).bottom;if(d==="top"&&s>=B.bottom-1||d==="bottom"&&s<=B.top+1||d==="left"&&n>=B.right-1||d==="right"&&n<=B.left+1){_();return}let q=!1;switch(d){case"top":q=Qr(E,C,N,B.top+1,X,v.bottom-1);break;case"bottom":q=Qr(E,C,N,v.top+1,X,B.bottom-1);break;case"left":q=Qr(E,C,v.right-1,U,B.left+1,le);break;case"right":q=Qr(E,C,B.right-1,U,v.left+1,le);break;default:}if(q)return;if(p&&!Rm(E,C,B)){_();return}if(!I&&y(E,C)){_();return}let ee=!1;switch(d){case"top":{let Y=T?re/2:re*4,ie=T||A?n+Y:n-Y,ge=T?n-Y:A?n+Y:n-Y,ne=s+re+1,Ae=A||T?v.bottom-re:v.top,Ce=A?T?v.bottom-re:v.top:v.bottom-re;ee=Zr(E,C,ie,ne,ge,ne,v.left,Ae,v.right,Ce);break}case"bottom":{let Y=T?re/2:re*4,ie=T||A?n+Y:n-Y,ge=T?n-Y:A?n+Y:n-Y,ne=s-re,Ae=A||T?v.top+re:v.bottom,Ce=A?T?v.top+re:v.bottom:v.top+re;ee=Zr(E,C,ie,ne,ge,ne,v.left,Ae,v.right,Ce);break}case"left":{let Y=k?re/2:re*4,ie=k||j?s+Y:s-Y,ge=k?s-Y:j?s+Y:s-Y,ne=n+re+1,Ae=j||k?v.right-re:v.left,Ce=j?k?v.right-re:v.left:v.right-re;ee=Zr(E,C,Ae,v.top,Ce,v.bottom,ne,ie,ne,ge);break}case"right":{let Y=k?re/2:re*4,ie=k||j?s+Y:s-Y,ge=k?s-Y:j?s+Y:s-Y,ne=n-re,Ae=j||k?v.left+re:v.right,Ce=j?k?v.left+re:v.right:v.left+re;ee=Zr(E,C,ne,ie,ne,ge,Ae,v.top,Ce,v.bottom);break}default:}ee?p||o.start(40,_):_()}};return r.__options={...e,blockPointerEvents:t},r}var ks=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=qt.startingStyle]="startingStyle",e[e.endingStyle=qt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),tr=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),vm={[tr.popupOpen]:""},lR={[tr.popupOpen]:"",[tr.pressed]:""},Em={[ks.open]:""},Sm={[ks.closed]:""},Tm={[ks.anchorHidden]:""},nc={open(e){return e?vm:null}};var _o={open(e){return e?Em:Sm},anchorHidden(e){return e?Tm:null}};function sc(e){return mo(19)?e:e?"true":void 0}var Ke=g(V(),1);var Cm=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:u,padding:l=0,offsetParent:d="real"}=rt(e,t)||{};if(u==null)return{};let p=jr(l),m={x:o,y:r},f=Jo(n),h=Xo(f),y=await i.getDimensions(u),R=f==="y",x=R?"top":"left",b=R?"bottom":"right",w=R?"clientHeight":"clientWidth",S=s.reference[h]+s.reference[f]-m[f]-s.floating[h],E=m[f]-s.reference[f],C=d==="real"?await i.getOffsetParent?.(u):a.floating,O=a.floating[w]||s.floating[h];(!O||!await i.isElement?.(C))&&(O=a.floating[w]||s.floating[h]);let I=S/2-E/2,P=O/2-y[h]/2-1,F=Math.min(p[x],P),M=Math.min(p[b],P),_=F,B=O-y[h]-M,v=O/2-y[h]/2+I,A=Go(_,v,B),j=!c.arrow&&nt(n)!=null&&v!==A&&s.reference[h]/2-(v<_?F:M)-y[h]/2<0,T=j?v<_?v-_:v-B:0;return{[f]:m[f]+T,data:{[f]:A,centerOffset:v-A-T,...j&&{alignmentOffset:T}},reset:j}}}),ic=(e,t)=>({...Cm(e),options:[e,t]});var ac={name:"hide",async fn(e){let{width:t,height:o,x:r,y:n}=e.rects.reference,s=t===0&&o===0&&r===0&&n===0;return{data:{referenceHidden:(await ms().fn(e)).data?.referenceHidden||s}}}};var or={sideX:"left",sideY:"top"},lc={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:s,strategy:i,placement:a}=e,c=ae(n),u=c.getComputedStyle(n);if(!(u.transitionDuration!=="0s"&&u.transitionDuration!==""))return{x:t,y:o,data:or};let d=await s.getOffsetParent?.(n),p={width:0,height:0};if(i==="fixed"&&c?.visualViewport)p={width:c.visualViewport.width,height:c.visualViewport.height};else if(d===c){let x=ye(n);p={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await s.isElement?.(d)&&(p=await s.getDimensions(d));let m=we(a),f=t,h=o;m==="left"&&(f=p.width-(t+r.width)),m==="top"&&(h=p.height-(o+r.height));let y=m==="left"?"right":or.sideX,R=m==="top"?"bottom":or.sideY;return{x:f,y:h,data:{sideX:y,sideY:R}}}};function fc(e,t,o){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?o?"inline-start":"inline-end":"right",bottom:"bottom",left:r?o?"inline-end":"inline-start":"left"}[t]}function cc(e,t,o){let{rects:r,placement:n}=e;return{side:fc(t,we(n),o),align:nt(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function dc(e){let{anchor:t,positionMethod:o="absolute",side:r="bottom",sideOffset:n=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:c=5,sticky:u=!1,arrowPadding:l=5,disableAnchorTracking:d=!1,inline:p,keepMounted:m=!1,floatingRootContext:f,mounted:h,collisionAvoidance:y,shiftCrossAxis:R=!1,nodeId:x,adaptiveOrigin:b,lazyFlip:w=!1,externalTree:S}=e,[E,C]=Ke.useState(null);!h&&E!==null&&C(null);let O=y.side||"flip",I=y.align||"flip",P=y.fallbackAxisSide||"end",F=typeof t=="function"?t:void 0,M=$(F),_=F?M:t,B=Le(t),v=Le(h),j=po()==="rtl",T=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":j?"left":"right","inline-start":j?"right":"left"}[r],k=s==="center"?T:`${T}-${s}`,N=c,X=1,le=r==="bottom"?X:0,U=r==="top"?X:0,q=r==="right"?X:0,ee=r==="left"?X:0;typeof N=="number"?N={top:N+le,right:N+ee,bottom:N+U,left:N+q}:N&&(N={top:(N.top||0)+le,right:(N.right||0)+ee,bottom:(N.bottom||0)+U,left:(N.left||0)+q});let Y={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:N},ie=Ke.useRef(null),ge=Le(n),ne=Le(i),Ae=typeof n!="function"?n:0,Ce=typeof i!="function"?i:0,K=[];p&&K.push(p),K.push(cs(oe=>{let Oe=cc(oe,r,j),qe=typeof ge.current=="function"?ge.current(Oe):ge.current,Ge=typeof ne.current=="function"?ne.current(Oe):ne.current;return{mainAxis:qe,crossAxis:Ge,alignmentAxis:Ge}},[Ae,Ce,j,r]));let ce=I==="none"&&O!=="shift",me=!ce&&(u||R||O==="shift"),ct=O==="none"?null:ds({...Y,padding:{top:N.top+X,right:N.right+X,bottom:N.bottom+X,left:N.left+X},mainAxis:!R&&O==="flip",crossAxis:I==="flip"?"alignment":!1,fallbackAxisSideDirection:P}),gt=ce?null:us(oe=>{let Oe=ye(oe.elements.floating).documentElement;return{...Y,rootBoundary:R?{x:0,y:0,width:Oe.clientWidth,height:Oe.clientHeight}:void 0,mainAxis:I!=="none",crossAxis:me,limiter:u||R?void 0:fs(qe=>{if(!ie.current)return{};let{width:Ge,height:xt}=ie.current.getBoundingClientRect(),Ze=Me(we(qe.placement)),$t=Ze==="y"?Ge:xt,io=Ze==="y"?N.left+N.right:N.top+N.bottom;return{offset:$t/2+io/2}})}},[Y,u,R,N,I]);O==="shift"||I==="shift"||s==="center"?K.push(gt,ct):K.push(ct,gt),K.push(ps({...Y,apply({elements:{floating:oe},availableWidth:Oe,availableHeight:qe,rects:Ge}){if(!v.current)return;let xt=oe.style;xt.setProperty("--available-width",`${Oe}px`),xt.setProperty("--available-height",`${qe}px`);let Ze=ae(oe).devicePixelRatio||1,{x:$t,y:io,width:xr,height:Pn}=Ge.reference,On=(Math.round(($t+xr)*Ze)-Math.round($t*Ze))/Ze,_n=(Math.round((io+Pn)*Ze)-Math.round(io*Ze))/Ze;xt.setProperty("--anchor-width",`${On}px`),xt.setProperty("--anchor-height",`${_n}px`)}}),ic(oe=>({element:ie.current||ye(oe.elements.floating).createElement("div"),padding:l,offsetParent:"floating"}),[l]),{name:"transformOrigin",fn(oe){let{elements:Oe,middlewareData:qe,placement:Ge,rects:xt,y:Ze}=oe,$t=we(Ge),io=Me($t),xr=ie.current,Pn=qe.arrow?.x||0,On=qe.arrow?.y||0,_n=xr?.clientWidth||0,yf=xr?.clientHeight||0,kn=Pn+_n/2,ii=On+yf/2,xf=Math.abs(qe.shift?.y||0),bf=xt.reference.height/2,Bo=typeof n=="function"?n(cc(oe,r,j)):n,wf=xf>Bo,Rf={top:`${kn}px calc(100% + ${Bo}px)`,bottom:`${kn}px ${-Bo}px`,left:`calc(100% + ${Bo}px) ${ii}px`,right:`${-Bo}px ${ii}px`}[$t],vf=`${kn}px ${xt.reference.y+bf-Ze}px`;return Oe.floating.style.setProperty("--transform-origin",me&&io==="y"&&wf?vf:Rf),{}}},ac,b),W(()=>{!h&&f&&f.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,f]);let ht=Ke.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<"u",layoutShift:!d&&typeof IntersectionObserver<"u"}),[d]),{refs:We,elements:ut,x:fr,y:dr,middlewareData:Ct,update:xe,placement:pr,context:D,isPositioned:L,floatingStyles:Re}=vs({rootContext:f,open:m?h:void 0,placement:k,middleware:K,strategy:o,whileElementsMounted:m?void 0:(...oe)=>Qo(...oe,ht),nodeId:x,externalTree:S}),{sideX:ve,sideY:Pt}=Ct.adaptiveOrigin||or,so=L?o:"fixed",Ot=Ke.useMemo(()=>{let oe=b?{position:so,[ve]:fr,[Pt]:dr}:{position:so,...Re};return L||(oe.opacity=0),oe},[b,so,ve,fr,Pt,dr,Re,L]),Pe=Ke.useRef(null);W(()=>{if(!h)return;let oe=B.current,Oe=typeof oe=="function"?oe():oe,Ge=(uc(Oe)?Oe.current:Oe)||null||null;Ge!==Pe.current&&(We.setPositionReference(Ge),Pe.current=Ge)},[h,We,_,B]),Ke.useEffect(()=>{if(!h)return;let oe=B.current;typeof oe!="function"&&uc(oe)&&oe.current!==Pe.current&&(We.setPositionReference(oe.current),Pe.current=oe.current)},[h,We,_,B]),Ke.useEffect(()=>{if(m&&h&&ut.domReference&&ut.floating)return Qo(ut.domReference,ut.floating,xe,ht)},[m,h,ut,xe,ht]);let yt=we(pr),Lo=fc(r,yt,j),mr=nt(pr)||"center",gr=!!Ct.hide?.referenceHidden;W(()=>{w&&h&&L&&C(yt)},[w,h,L,yt]);let hr=Ke.useMemo(()=>({position:"absolute",top:Ct.arrow?.y,left:Ct.arrow?.x}),[Ct.arrow]),yr=Ct.arrow?.centerOffset!==0;return Ke.useMemo(()=>({positionerStyles:Ot,arrowStyles:hr,arrowRef:ie,arrowUncentered:yr,side:Lo,align:mr,physicalSide:yt,anchorHidden:gr,refs:We,context:D,isPositioned:L,update:xe}),[Ot,hr,ie,yr,Lo,mr,yt,gr,We,D,L,xe])}function uc(e){return e!=null&&"current"in e}function en(e){return e==="starting"?Ua:ue}function pc(e,t,{styles:o,transitionStatus:r,props:n,refs:s,hidden:i,inert:a=!1}){let c={...o};return a&&(c.pointerEvents="none"),De("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:c},en(r),n],stateAttributesMapping:_o})}var Te=g(V(),1),bc=g(Lt(),1);var mc=g(V(),1);function gc(e){let[t,o]=mc.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var oo=g(V(),1);function Is(e){let t=Ee(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=he(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r;return(Mt(o)!==s||Mt(r)!==i)&&(o=s,r=i),{width:o,height:r}}var Pm=()=>!0;function yc(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,enabled:s=Pm,onMeasureLayout:i,onMeasureLayoutComplete:a,side:c,direction:u}=e,l=wo(t,!0,!1),d=ho(),p=oo.useRef(null),m=oo.useRef(null),f=oo.useRef(!0),h=oo.useRef(wt),y=$(i),R=$(a),x=oo.useMemo(()=>{let b=c==="top",w=c==="left";return u==="rtl"?(b=b||c==="inline-end",w=w||c==="inline-end"):(b=b||c==="inline-start",w=w||c==="inline-start"),b?{position:"absolute",[c==="top"?"bottom":"top"]:"0",[w?"right":"left"]:"0"}:ue},[c,u]);W(()=>{if(!n||!s()||typeof ResizeObserver!="function"){h.current=wt,f.current=!0,p.current=null,m.current=null;return}if(!t||!o)return;h.current=hc(t,x);let b=new ResizeObserver(_=>{let B=_[0];B&&(m.current={width:Math.ceil(B.borderBoxSize[0].inlineSize),height:Math.ceil(B.borderBoxSize[0].blockSize)})});b.observe(t),tn(t,"auto");let w=on(t,"position","static"),S=on(t,"transform","none"),E=on(t,"scale","1"),C=hc(o,{"--available-width":"max-content","--available-height":"max-content"});function O(){w(),S(),C()}function I(){O(),E()}if(y?.(),f.current||p.current===null){rr(o,"max-content");let _=Is(t);return p.current=_,rr(o,_),I(),R?.(null,_),f.current=!1,()=>{b.disconnect(),h.current(),h.current=wt}}tn(t,"auto"),rr(o,"max-content");let P=p.current??m.current,F=Is(t);if(p.current=F,!P)return rr(o,F),I(),R?.(null,F),()=>{b.disconnect(),d.cancel(),h.current(),h.current=wt};tn(t,P),I(),R?.(P,F),rr(o,F);let M=new AbortController;return d.request(()=>{tn(t,F),l(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},M.signal)}),()=>{b.disconnect(),M.abort(),d.cancel(),h.current(),h.current=wt}},[r,t,o,l,d,s,n,y,R,x])}function on(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function hc(e,t){let o=[];for(let[r,n]of Object.entries(t))o.push(on(e,r,n));return o.length?()=>{o.forEach(r=>r())}:wt}function tn(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty("--popup-width",o),e.style.setProperty("--popup-height",r)}function rr(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty("--positioner-width",o),e.style.setProperty("--positioner-height",r)}var ko=g(J(),1);function wc(e){let{store:t,side:o,cssVars:r,children:n}=e,s=po(),i=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),c=t.useState("open"),u=t.useState("payload"),l=t.useState("mounted"),d=t.useState("popupElement"),p=t.useState("positionerElement"),m=gc(c?i:null),f=km(a,u),h=Te.useRef(null),[y,R]=Te.useState(null),[x,b]=Te.useState(null),w=Te.useRef(null),S=Te.useRef(null),E=wo(w,!0,!1),C=ho(),[O,I]=Te.useState(null),[P,F]=Te.useState(!1);W(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let M=$(()=>{w.current?.style.setProperty("animation","none"),w.current?.style.setProperty("transition","none"),S.current?.style.setProperty("display","none")}),_=$(T=>{w.current?.style.removeProperty("animation"),w.current?.style.removeProperty("transition"),S.current?.style.removeProperty("display"),T&&I(T)}),B=Te.useRef(null);W(()=>{if(i&&m&&i!==m&&B.current!==i&&h.current){R(h.current),F(!0);let T=_m(m,i);b(T),C.request(()=>{bc.flushSync(()=>{F(!1)}),E(()=>{R(null),I(null),h.current=null})}),B.current=i}},[i,m,y,E,C]),W(()=>{let T=w.current;if(!T)return;let k=ye(T).createElement("div");for(let N of Array.from(T.childNodes))k.appendChild(N.cloneNode(!0));h.current=k});let v=y!=null,A;v?A=(0,ko.jsxs)(Te.Fragment,{children:[(0,ko.jsx)("div",{"data-previous":!0,inert:sc(!0),ref:S,style:{...O?{[r.popupWidth]:`${O.width}px`,[r.popupHeight]:`${O.height}px`}:null,position:"absolute"},"data-ending-style":P?void 0:""},"previous"),(0,ko.jsx)("div",{"data-current":!0,ref:w,"data-starting-style":P?"":void 0,children:n},f)]}):A=(0,ko.jsx)("div",{"data-current":!0,ref:w,children:n},f),W(()=>{let T=S.current;!T||!y||T.replaceChildren(...Array.from(y.childNodes))},[y]),yc({popupElement:d,positionerElement:p,mounted:l,content:u,onMeasureLayout:M,onMeasureLayoutComplete:_,side:o,direction:s});let j={activationDirection:Om(x),transitioning:v};return{children:A,state:j}}function Om(e){if(e)return`${xc(e.horizontal,5,"right","left")} ${xc(e.vertical,5,"down","up")}`}function xc(e,t,o,r){return e>t?o:e<-t?r:""}function _m(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n={x:o.left+o.width/2,y:o.top+o.height/2},s={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:s.x-n.x,vertical:s.y-n.y}}function km(e,t){let[o,r]=Te.useState(0),n=Te.useRef(e),s=Te.useRef(t),i=Te.useRef(!1);return W(()=>{let a=n.current,c=s.current,u=e!==a,l=t!==c;u?(r(d=>d+1),i.current=!l):i.current&&l&&(r(d=>d+1),i.current=!1),n.current=e,s.current=t},[e,t]),`${e??"current"}-${o}`}var rn=g(V(),1),Rc=g(Lt(),1);var vc=g(J(),1),Ec=rn.forwardRef(function(t,o){let{children:r,container:n,className:s,render:i,style:a,...c}=t,{portalNode:u,portalSubtree:l}=os({container:n,ref:o,componentProps:t,elementProps:c});return!l&&!u?null:(0,vc.jsxs)(rn.Fragment,{children:[l,u&&Rc.createPortal(r,u)]})});var Ve={};Yt(Ve,{Arrow:()=>Vc,Handle:()=>nr,Popup:()=>Fc,Portal:()=>Dc,Positioner:()=>Lc,Provider:()=>Hc,Root:()=>Cc,Trigger:()=>Ic,Viewport:()=>$c,createHandle:()=>Yc});var mt=g(V(),1);var nn=g(V(),1),As=nn.createContext(void 0);function Je(e){let t=nn.useContext(As);if(t===void 0&&!e)throw new Error(Ne(72));return t}var Sc=g(V(),1),Tc=g(Lt(),1);var Im={...ec,disabled:G(e=>e.disabled),instantType:G(e=>e.instantType),isInstantPhase:G(e=>e.isInstantPhase),trackCursorAxis:G(e=>e.trackCursorAxis),disableHoverablePopup:G(e=>e.disableHoverablePopup),lastOpenChangeReason:G(e=>e.openChangeReason),closeOnClick:G(e=>e.closeOnClick),closeDelay:G(e=>e.closeDelay),hasViewport:G(e=>e.hasViewport)},Io=class e extends To{constructor(t,o,r=!1){let n=new Ft,s={...Am(),...t};s.floatingRootContext=Zl(n,o,r),super(s,{popupRef:Sc.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},Im)}setOpen=(t,o)=>{let r=o.reason,n=r===z.triggerHover,s=t&&r===z.triggerFocus,i=!t&&(r===z.triggerPress||r===z.escapeKey);if(o.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(t,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(t,o);let a=()=>{let c={open:t,openChangeReason:r};s?c.instantType="focus":i?c.instantType="dismiss":r===z.triggerHover&&(c.instantType=void 0),$l(c,t,o.trigger),this.update(c)};n?Tc.flushSync(a):a()};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Z(z.triggerPress,t))}static useStore(t,o){return Ul(t,(n,s)=>new e(o,n,s)).store}};function Am(){return{...Jl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var sn=g(J(),1),Cc=bs(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:c,onOpenChangeComplete:u,handle:l,triggerId:d,defaultTriggerId:p=null,children:m}=t,f=Io.useStore(l?.store,{open:r,openProp:n,activeTriggerId:p,triggerIdProp:d});ja(()=>{n===void 0&&f.state.open===!1&&r===!0&&f.update({open:!0,activeTriggerId:p})}),f.useControlledProp("openProp",n),f.useControlledProp("triggerIdProp",d),f.useContextCallback("onOpenChange",c),f.useContextCallback("onOpenChangeComplete",u);let h=f.useState("open"),y=!o&&h,R=f.useState("activeTriggerId"),x=f.useState("mounted"),b=f.useState("payload");f.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s}),f.useSyncedValue("disabled",o),zl(f);let{forceUnmount:w,transitionStatus:S}=Kl(y,f),E=f.useState("isInstantPhase"),C=f.useState("instantType"),O=f.useState("lastOpenChangeReason"),I=mt.useRef(null);W(()=>{h&&o&&f.setOpen(!1,Z(z.disabled))},[h,o,f]),W(()=>{S==="ending"&&O===z.none||S!=="ending"&&E?(C!=="delay"&&(I.current=C),f.set("instantType","delay")):I.current!==null&&(f.set("instantType",I.current),I.current=null)},[S,E,O,C,f]),W(()=>{y&&R==null&&f.set("payload",void 0)},[f,R,y]);let P=mt.useCallback(()=>{f.setOpen(!1,Z(z.imperativeAction))},[f]);mt.useImperativeHandle(a,()=>({unmount:w,close:P}),[w,P]);let F=y||x||!o&&i!=="none";return(0,sn.jsxs)(As.Provider,{value:f,children:[F&&(0,sn.jsx)(Nm,{store:f,disabled:o,trackCursorAxis:i}),typeof m=="function"?m({payload:b}):m]})});function Nm({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=ns(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=rs(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),i=mt.useMemo(()=>Rt(s.reference,n.reference),[s.reference,n.reference]),a=mt.useMemo(()=>Rt(s.trigger,n.trigger),[s.trigger,n.trigger]),c=mt.useMemo(()=>Rt(Wl,s.floating,n.floating),[s.floating,n.floating]);return ql(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:c}),null}var ln=g(V(),1);var an=g(V(),1),Ns=an.createContext(void 0);function Pc(){return an.useContext(Ns)}var Oc=(function(e){return e[e.popupOpen=tr.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var kc="data-base-ui-tooltip-trigger";function _c(e){if("composedPath"in e){let o=e.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(H(n))return n}}let t=e.target;return H(t)?t:null}function Dm(e){let t=e;for(;t;){if(t.hasAttribute(kc))return t;let o=t.parentElement;if(o){t=o;continue}let r=t.getRootNode();t="host"in r&&H(r.host)?r.host:null}return null}var Ic=Bl(function(t,o){let{render:r,className:n,style:s,handle:i,payload:a,disabled:c,delay:u,closeOnClick:l=!0,closeDelay:d,id:p,...m}=t,f=Je(!0),h=i?.store??f;if(!h)throw new Error(Ne(82));let y=da(p),R=h.useState("isTriggerActive",y),x=h.useState("isOpenedByTrigger",y),b=h.useState("floatingRootContext"),w=ln.useRef(null),S=u??600,E=d??0,{registerTrigger:C,isMountedByThisTrigger:O}=Yl(y,w,h,{payload:a,closeOnClick:l,closeDelay:E}),I=Pc(),{delayRef:P,isInstantPhase:F,hasProvider:M}=ts(b,{open:x}),_=Oo(b);h.useSyncedValue("isInstantPhase",F);let B=h.useState("disabled"),v=c??B,A=Le(v),j=h.useState("trackCursorAxis"),T=h.useState("disableHoverablePopup"),k=ln.useRef(!1),N=st(),X=ln.useRef(void 0);function le(){let K=I?.delay,ce=typeof P.current=="object"?P.current.open:void 0,me=S;return M&&(ce!==0?me=u??K??S:me=0),me}function U(K){let ce=w.current;if(!ce||!K)return!1;let me=Dm(K);return me!==null&&me!==ce&&te(ce,me)}function q(K){let ce=U(K);return k.current=ce,ce&&(_.openChangeTimeout.clear(),_.restTimeout.clear(),_.restTimeoutPending=!1,N.clear()),ce}let ee=Os(b,{enabled:!v,mouseOnly:!0,move:!1,handleClose:!T&&j!=="both"?_s():null,restMs:le,delay(){let K=typeof P.current=="object"?P.current.close:void 0,ce=E;return d==null&&M&&(ce=K),{close:ce}},triggerElementRef:w,isActiveTrigger:R,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!k.current}}),Y=Ss(b,{enabled:!v}).reference,ie=K=>{let ce=k.current,me=_c(K),ct=q(me),gt=w.current,ht=gt&&me&&te(gt,me);if(ct&&h.select("open")&&h.select("lastOpenChangeReason")===z.triggerHover){h.setOpen(!1,Z(z.triggerHover,K));return}if(ce&&!ct&&ht&&!A.current&&!h.select("open")&&gt&&Et(X.current)){let We=()=>{!k.current&&!A.current&&!h.select("open")&&h.setOpen(!0,Z(z.triggerHover,K,gt))},ut=le();ut===0?(N.clear(),We()):N.start(ut,We)}},ge=h.useState("triggerProps",O);return De("button",t,{state:{open:x},ref:[o,C,w],props:[ee,Y,O||j!=="none"?ge:void 0,{onMouseOver(K){ie(K.nativeEvent)},onFocus(K){U(_c(K.nativeEvent))&&K.preventBaseUIHandler()},onMouseLeave(){k.current=!1,N.clear(),X.current=void 0},onPointerEnter(K){X.current=K.pointerType},onPointerDown(K){X.current=K.pointerType,h.set("closeOnClick",l),l&&!h.select("open")&&h.cancelPendingOpen(K.nativeEvent)},onClick(K){l&&!h.select("open")&&h.cancelPendingOpen(K.nativeEvent)},id:y,[Oc.triggerDisabled]:v?"":void 0,[kc]:v?void 0:""},m],stateAttributesMapping:nc})});var Nc=g(V(),1);var cn=g(V(),1),Ds=cn.createContext(void 0);function Ac(){let e=cn.useContext(Ds);if(e===void 0)throw new Error(Ne(70));return e}var Ms=g(J(),1),Dc=Nc.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Je().useState("mounted")||r?(0,Ms.jsx)(Ds.Provider,{value:r,children:(0,Ms.jsx)(Ec,{ref:o,...n})}):null});var fn=g(V(),1);var un=g(V(),1),Ls=un.createContext(void 0);function Ao(){let e=un.useContext(Ls);if(e===void 0)throw new Error(Ne(71));return e}var Mc=g(J(),1),Lc=fn.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i="absolute",side:a="top",align:c="center",sideOffset:u=0,alignOffset:l=0,collisionBoundary:d="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:f=!1,disableAnchorTracking:h=!1,collisionAvoidance:y=$a,style:R,...x}=t,b=Je(),w=Ac(),S=b.useState("open"),E=b.useState("mounted"),C=b.useState("trackCursorAxis"),O=b.useState("disableHoverablePopup"),I=b.useState("floatingRootContext"),P=b.useState("instantType"),F=b.useState("transitionStatus"),M=b.useState("hasViewport"),_=dc({anchor:s,positionMethod:i,floatingRootContext:I,mounted:E,side:a,sideOffset:u,align:c,alignOffset:l,collisionBoundary:d,collisionPadding:p,sticky:f,arrowPadding:m,disableAnchorTracking:h,keepMounted:w,collisionAvoidance:y,adaptiveOrigin:M?lc:void 0}),B=fn.useMemo(()=>({open:S,side:_.side,align:_.align,anchorHidden:_.anchorHidden,instant:C!=="none"?"tracking-cursor":P}),[S,_.side,_.align,_.anchorHidden,C,P]),v=pc(t,B,{styles:_.positionerStyles,transitionStatus:F,props:x,refs:[o,b.useStateSetter("positionerElement")],hidden:!E,inert:!S||C==="both"||O});return(0,Mc.jsx)(Ls.Provider,{value:_,children:v})});var Bc=g(V(),1);var Mm={..._o,...ga},Fc=Bc.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Je(),{side:c,align:u}=Ao(),l=a.useState("open"),d=a.useState("instantType"),p=a.useState("transitionStatus"),m=a.useState("popupProps"),f=a.useState("floatingRootContext"),h=a.useState("disabled"),y=a.useState("closeDelay");Vr({open:l,ref:a.context.popupRef,onComplete(){l&&a.context.onOpenChangeComplete?.(!0)}}),Ps(f,{enabled:!h,closeDelay:y});let R=a.useStateSetter("popupElement");return De("div",t,{state:{open:l,side:c,align:u,instant:d,transitionStatus:p},ref:[o,a.context.popupRef,R],props:[m,en(p),i],stateAttributesMapping:Mm})});var jc=g(V(),1);var Vc=jc.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Je(),{arrowRef:c,side:u,align:l,arrowUncentered:d,arrowStyles:p}=Ao(),m=a.useState("open"),f=a.useState("instantType");return De("div",t,{state:{open:m,side:u,align:l,uncentered:d,instant:f},ref:[o,c],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:_o})});var Bs=g(V(),1);var Fs=g(J(),1),Hc=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,s=Bs.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),i=Bs.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Fs.jsx)(Ns.Provider,{value:s,children:(0,Fs.jsx)(es,{delay:i,timeoutMs:n,children:t.children})})};var Uc=g(V(),1);var Wc=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var Lm={activationDirection:e=>e?{"data-activation-direction":e}:null},$c=Uc.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...a}=t,c=Je(),u=Ao(),l=c.useState("instantType"),{children:d,state:p}=wc({store:c,side:u.side,cssVars:Wc,children:i}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return De("div",t,{state:m,ref:o,props:[a,{children:d}],stateAttributesMapping:Lm})});var nr=class{constructor(){this.store=new Io}open(t){let o=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!o)throw new Error(Ne(81,t));this.store.setOpen(!0,Z(z.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,Z(z.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Yc(){return new nr}function zc(e){return De(e.defaultTagName??"div",e,e)}var pn=g(Ue(),1),sr=(0,pn.forwardRef)(({icon:e,size:t=24,...o},r)=>(0,pn.cloneElement)(e,{width:t,height:t,...o,ref:r}));var mn=g(dn(),1),js=g(J(),1),Vs=(0,js.jsx)(mn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,js.jsx)(mn.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z"})});var gn=g(dn(),1),Hs=g(J(),1),Ws=(0,Hs.jsx)(gn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Hs.jsx)(gn.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"})});var hn=g(dn(),1),Us=g(J(),1),$s=(0,Us.jsx)(hn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Us.jsx)(hn.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})});var Xc=g(Ue(),1);function Ys(e,t,o){return(0,Xc.cloneElement)(e??t,{children:o})}var Bm=g(Zc(),1);var tu=g(eu(),1),{lock:yS,unlock:ou}=(0,tu.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/ui");function Fm(){let e=Bm;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return ou(e.privateApis).ThemeProvider}var ru=Fm();var No={};Yt(No,{Popup:()=>hu,Portal:()=>yn,Positioner:()=>xn,Provider:()=>Eu,Root:()=>Ru,Trigger:()=>bu});var mu=g(Ue(),1);var lu=g(Ue(),1);var zs="data-wp-hash";function Ks(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Vm(document)),e.__wpStyleRuntime}function jm(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${zs}]`))if(o.getAttribute(zs)===t)return!0;return!1}function su(e,t,o){if(!e.head)return;let r=Ks(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(jm(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(zs,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function Vm(e){let t=Ks();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)su(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Hm(e,t){let o=Ks();o.styles.set(e,t);for(let r of o.documents.keys())su(r,e,t)}typeof process>"u",Hm("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var nu={slot:"_11fc52b637ff8a7e__slot"},iu="data-wp-compat-overlay-slot";function Wm(){return typeof document>"u"?null:document}function Um(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var St=null;function $m(e){let t=e.createElement("div");return t.setAttribute(iu,""),nu.slot&&t.classList.add(nu.slot),e.body.appendChild(t),t}function au(){if(typeof window>"u"||!Um()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=Wm();if(!e||!e.body)return;if(St&&St.ownerDocument===e&&St.isConnected)return St;let t=e.querySelector(`[${iu}]`);return t instanceof HTMLDivElement?(St=t,t):(St?.isConnected&&St.remove(),St=$m(e),St)}var cu=g(J(),1),yn=(0,lu.forwardRef)(function({container:t,...o},r){return(0,cu.jsx)(Ve.Portal,{container:t??au(),...o,ref:r})});var uu=g(Ue(),1),pu=g(J(),1),qs="data-wp-hash";function Gs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&zm(document)),e.__wpStyleRuntime}function Ym(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${qs}]`))if(o.getAttribute(qs)===t)return!0;return!1}function fu(e,t,o){if(!e.head)return;let r=Gs(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Ym(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(qs,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function zm(e){let t=Gs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)fu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function du(e,t){let o=Gs();o.styles.set(e,t);for(let r of o.documents.keys())fu(r,e,t)}typeof process>"u",du("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Km={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",du("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var qm={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},xn=(0,uu.forwardRef)(function({align:t="center",className:o,side:r="top",sideOffset:n=4,...s},i){return(0,pu.jsx)(Ve.Positioner,{ref:i,align:t,side:r,sideOffset:n,...s,className:fo(Km["box-sizing"],qm.positioner,o)})});var ir=g(J(),1),Xs="data-wp-hash";function Js(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Xm(document)),e.__wpStyleRuntime}function Gm(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Xs}]`))if(o.getAttribute(Xs)===t)return!0;return!1}function gu(e,t,o){if(!e.head)return;let r=Js(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Gm(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(Xs,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function Xm(e){let t=Js();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)gu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Jm(e,t){let o=Js();o.styles.set(e,t);for(let r of o.documents.keys())gu(r,e,t)}typeof process>"u",Jm("789467362f",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-sm,0 1px 2px 0 #0000000d,0 2px 3px 0 #0000000a,0 6px 6px 0 #00000008,0 8px 8px 0 #00000005);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var Zm={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},Qm={background:"#1e1e1e"},hu=(0,mu.forwardRef)(function({portal:t,positioner:o,children:r,className:n,...s},i){let a=(0,ir.jsx)(ru,{color:Qm,children:(0,ir.jsx)(Ve.Popup,{ref:i,className:fo(Zm.popup,n),...s,children:r})}),c=Ys(o,(0,ir.jsx)(xn,{}),a);return Ys(t,(0,ir.jsx)(yn,{}),c)});var yu=g(Ue(),1),xu=g(J(),1),bu=(0,yu.forwardRef)(function(t,o){return(0,xu.jsx)(Ve.Trigger,{ref:o,...t})});var wu=g(J(),1);function Ru(e){return(0,wu.jsx)(Ve.Root,{...e})}var vu=g(J(),1);function Eu({...e}){return(0,vu.jsx)(Ve.Provider,{...e})}var Su=g(Ue(),1),Zs="data-wp-hash";function Qs(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&tg(document)),e.__wpStyleRuntime}function eg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${Zs}]`))if(o.getAttribute(Zs)===t)return!0;return!1}function Tu(e,t,o){if(!e.head)return;let r=Qs(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(eg(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(Zs,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function tg(e){let t=Qs();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Tu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function og(e,t){let o=Qs();o.styles.set(e,t);for(let r of o.documents.keys())Tu(r,e,t)}typeof process>"u",og("fa606a57ae","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}}");var rg={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},ei=(0,Su.forwardRef)(function({render:t,...o},r){return zc({render:t,ref:r,props:Rt({className:rg["visually-hidden"]},o,{"data-visually-hidden":""})})});var bn=g($e(),1);var Do=g(J(),1);function ng({rating:e}){let t=Math.round(e/.5)*.5,o=Math.floor(e),r=Math.ceil(e-o),n=5-(o+r);return(0,Do.jsxs)("span",{"aria-label":(0,bn.sprintf)((0,bn.__)("%s out of 5 stars"),t),children:[Array.from({length:o}).map((s,i)=>(0,Do.jsx)(sr,{className:"block-directory-block-ratings__star-full",icon:Ws,size:16},`full_stars_${i}`)),Array.from({length:r}).map((s,i)=>(0,Do.jsx)(sr,{className:"block-directory-block-ratings__star-half-full",icon:$s,size:16},`half_stars_${i}`)),Array.from({length:n}).map((s,i)=>(0,Do.jsx)(sr,{className:"block-directory-block-ratings__star-empty",icon:Vs,size:16},`empty_stars_${i}`))]})}var Cu=ng;var ti=g(J(),1),sg=({rating:e})=>(0,ti.jsx)("span",{className:"block-directory-block-ratings",children:(0,ti.jsx)(Cu,{rating:e})}),Pu=sg;var Ou=g(ao(),1),oi=g(J(),1);function ig({icon:e}){let t="block-directory-downloadable-block-icon";return e.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)!==null?(0,oi.jsx)("img",{className:t,src:e,alt:""}):(0,oi.jsx)(Ou.BlockIcon,{className:t,icon:e,showColors:!0})}var wn=ig;var _u=g($e(),1),ku=g(Xe(),1);var Rn=g(J(),1),ag=({block:e})=>{let t=(0,ku.useSelect)(o=>o(fe).getErrorNoticeForBlock(e.id),[e]);return t?(0,Rn.jsx)("div",{className:"block-directory-downloadable-block-notice",children:(0,Rn.jsxs)("div",{className:"block-directory-downloadable-block-notice__content",children:[t.message,t.isFatal?" "+(0,_u.__)("Try reloading the page."):null]})}):null},Iu=ag;var pe=g(J(),1);function lg({title:e,rating:t,ratingCount:o},{hasNotice:r,isInstalled:n,isInstalling:s}){let i=Math.round(t/.5)*.5;return!n&&r?(0,He.sprintf)("Retry installing %s.",(0,Vt.decodeEntities)(e)):n?(0,He.sprintf)("Add %s.",(0,Vt.decodeEntities)(e)):s?(0,He.sprintf)("Installing %s.",(0,Vt.decodeEntities)(e)):o<1?(0,He.sprintf)("Install %s.",(0,Vt.decodeEntities)(e)):(0,He.sprintf)((0,He._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",o),(0,Vt.decodeEntities)(e),i,o)}function cg({item:e,onClick:t}){let{author:o,description:r,icon:n,rating:s,title:i}=e,a=!!(0,Nu.getBlockType)(e.name),{hasNotice:c,isInstalling:u,isInstallable:l}=(0,Du.useSelect)(m=>{let{getErrorNoticeForBlock:f,isInstalling:h}=m(fe),y=f(e.id),R=y&&y.isFatal;return{hasNotice:!!y,isInstalling:h(e.id),isInstallable:!R}},[e]),d="";a?d=(0,He.__)("Installed!"):u&&(d=(0,He.__)("Installing\u2026"));let p=lg(e,{hasNotice:c,isInstalled:a,isInstalling:u});return(0,pe.jsxs)(No.Root,{children:[(0,pe.jsx)(No.Trigger,{render:(0,pe.jsxs)(vn.Composite.Item,{className:fo("block-directory-downloadable-block-list-item",u&&"is-installing"),accessibleWhenDisabled:!0,disabled:u||!l,onClick:m=>{m.preventDefault(),t()},"aria-label":p,type:"button",role:"option",children:[(0,pe.jsxs)("div",{className:"block-directory-downloadable-block-list-item__icon",children:[(0,pe.jsx)(wn,{icon:n,title:i}),u?(0,pe.jsx)("span",{className:"block-directory-downloadable-block-list-item__spinner",children:(0,pe.jsx)(vn.Spinner,{})}):(0,pe.jsx)(Pu,{rating:s})]}),(0,pe.jsxs)("span",{className:"block-directory-downloadable-block-list-item__details",children:[(0,pe.jsx)("span",{className:"block-directory-downloadable-block-list-item__title",children:(0,Au.createInterpolateElement)((0,He.sprintf)((0,He.__)("%1$s <span>by %2$s</span>"),(0,Vt.decodeEntities)(i),o),{span:(0,pe.jsx)("span",{className:"block-directory-downloadable-block-list-item__author"})})}),c?(0,pe.jsx)(Iu,{block:e}):(0,pe.jsxs)(pe.Fragment,{children:[(0,pe.jsx)("span",{className:"block-directory-downloadable-block-list-item__desc",children:d||(0,Vt.decodeEntities)(r)}),l&&!(a||u)&&(0,pe.jsx)(ei,{children:(0,He.__)("Install block")})]})]})]})}),(0,pe.jsx)(No.Popup,{children:p})]})}var Mu=cg;var ri=g(J(),1),ug=()=>{};function fg({items:e,onHover:t=ug,onSelect:o}){let{installBlockType:r}=(0,ju.useDispatch)(fe);return e.length?(0,ri.jsx)(Bu.Composite,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,Lu.__)("Blocks available for install"),children:e.map(n=>(0,ri.jsx)(Mu,{onClick:()=>{(0,Fu.getBlockType)(n.name)?o(n):r(n).then(s=>{s&&o(n)}),t(null)},onHover:t,item:n},n.id))}):null}var Vu=fg;var Ht=g($e(),1),Hu=g(Ue(),1),Wu=g(qc(),1),at=g(J(),1);function dg({children:e,downloadableItems:t,hasLocalBlocks:o}){let r=t.length;return(0,Hu.useEffect)(()=>{(0,Wu.speak)((0,Ht.sprintf)((0,Ht._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))},[r]),(0,at.jsxs)(at.Fragment,{children:[!o&&(0,at.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,Ht.__)("No results available from your installed blocks.")}),(0,at.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,at.jsxs)("div",{className:"block-directory-downloadable-blocks-panel",children:[(0,at.jsxs)("div",{className:"block-directory-downloadable-blocks-panel__header",children:[(0,at.jsx)("h2",{className:"block-directory-downloadable-blocks-panel__title",children:(0,Ht.__)("Available to install")}),(0,at.jsx)("p",{className:"block-directory-downloadable-blocks-panel__description",children:(0,Ht.__)("Select a block to install and add it to your post.")})]}),e]})]})}var Uu=dg;var En=g($e(),1),Sn=g(zt(),1),lt=g(J(),1);function pg(){return(0,lt.jsxs)(lt.Fragment,{children:[(0,lt.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,lt.jsx)("p",{children:(0,En.__)("No results found.")})}),(0,lt.jsx)("div",{className:"block-editor-inserter__tips",children:(0,lt.jsxs)(Sn.Tip,{children:[(0,En.__)("Interested in creating your own block?"),(0,lt.jsx)("br",{}),(0,lt.jsxs)(Sn.ExternalLink,{href:"https://developer.wordpress.org/block-editor/",children:[(0,En.__)("Get started here"),"."]})]})})]})}var ni=pg;var Ie=g(J(),1),$u=[],mg=e=>(0,qu.useSelect)(t=>{let{getDownloadableBlocks:o,isRequestingDownloadableBlocks:r,getInstalledBlockTypes:n}=t(fe),s=t(Ku.store).canUser("read","block-directory/search"),i=$u;if(s){i=o(e);let a=n(),c=i.filter(({name:u})=>{let l=a.some(p=>p.name===u),d=(0,Gu.getBlockType)(u);return l||!d});c.length!==i.length&&(i=c),i.length===0&&(i=$u)}return{hasPermission:s,downloadableBlocks:i,isLoading:r(e)}},[e]);function Xu({onSelect:e,onHover:t,hasLocalBlocks:o,isTyping:r,filterValue:n}){let{hasPermission:s,downloadableBlocks:i,isLoading:a}=mg(n);return s===void 0||a||r?(0,Ie.jsxs)(Ie.Fragment,{children:[s&&!o&&(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,Yu.__)("No results available from your installed blocks.")}),(0,Ie.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"})]}),(0,Ie.jsx)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading",children:(0,Ie.jsx)(zu.Spinner,{})})]}):s===!1?o?null:(0,Ie.jsx)(ni,{}):i.length===0?o?null:(0,Ie.jsx)(ni,{}):(0,Ie.jsx)(Uu,{downloadableItems:i,hasLocalBlocks:o,children:(0,Ie.jsx)(Vu,{items:i,onSelect:e,onHover:t})})}var si=g(J(),1);function gg(){let[e,t]=(0,Qu.useState)(""),o=(0,Zu.debounce)(t,400);return(0,si.jsx)(Ju.__unstableInserterMenuExtension,{children:({onSelect:r,onHover:n,filterValue:s,hasItems:i})=>(e!==s&&o(s),e?(0,si.jsx)(Xu,{onSelect:r,onHover:n,filterValue:e,hasLocalBlocks:i,isTyping:s!==e}):null)})}var ef=gg;var ar=g($e(),1),of=g(Xe(),1),rf=g(In(),1);var Tn=g($e(),1);var Wt=g(J(),1);function tf({items:e}){return e.length?(0,Wt.jsx)("ul",{className:"block-directory-compact-list",children:e.map(({icon:t,id:o,title:r,author:n})=>(0,Wt.jsxs)("li",{className:"block-directory-compact-list__item",children:[(0,Wt.jsx)(wn,{icon:t,title:r}),(0,Wt.jsxs)("div",{className:"block-directory-compact-list__item-details",children:[(0,Wt.jsx)("div",{className:"block-directory-compact-list__item-title",children:r}),(0,Wt.jsx)("div",{className:"block-directory-compact-list__item-author",children:(0,Tn.sprintf)((0,Tn.__)("By %s"),n)})]})]},o))}):null}var lr=g(J(),1);function nf(){let e=(0,of.useSelect)(t=>t(fe).getNewBlockTypes(),[]);return e.length?(0,lr.jsxs)(rf.PluginPrePublishPanel,{title:(0,ar.sprintf)((0,ar._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0,children:[(0,lr.jsx)("p",{className:"installed-blocks-pre-publish-panel__copy",children:(0,ar._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)}),(0,lr.jsx)(tf,{items:e})]}):null}var ro=g($e(),1),uf=g(zt(),1),ff=g(_t(),1),df=g(Ue(),1),ur=g(Xe(),1),pf=g(Fn(),1),no=g(ao(),1);var Cn=g($e(),1),sf=g(zt(),1),Mo=g(_t(),1),cr=g(Xe(),1),af=g(ao(),1);var lf=g(J(),1);function cf({attributes:e,block:t,clientId:o}){let r=(0,cr.useSelect)(i=>i(fe).isInstalling(t.id),[t.id]),{installBlockType:n}=(0,cr.useDispatch)(fe),{replaceBlock:s}=(0,cr.useDispatch)(af.store);return(0,lf.jsx)(sf.Button,{__next40pxDefaultSize:!0,onClick:()=>n(t).then(i=>{if(i){let a=(0,Mo.getBlockType)(t.name),[c]=(0,Mo.parse)(e.originalContent);c&&a&&s(o,(0,Mo.createBlock)(a.name,c.attributes,c.innerBlocks))}}),accessibleWhenDisabled:!0,disabled:r,isBusy:r,variant:"primary",children:(0,Cn.sprintf)((0,Cn.__)("Install %s"),t.title)})}var Tt=g(J(),1),hg=e=>t=>{let{originalName:o}=t.attributes,{block:r,hasPermission:n}=(0,ur.useSelect)(s=>{let{getDownloadableBlocks:i}=s(fe),a=i("block:"+o).filter(({name:c})=>o===c);return{hasPermission:s(pf.store).canUser("read","block-directory/search"),block:a.length&&a[0]}},[o]);return!n||!r?(0,Tt.jsx)(e,{...t}):(0,Tt.jsx)(yg,{...t,originalBlock:r})},yg=({originalBlock:e,...t})=>{let{originalName:o,originalUndelimitedContent:r,clientId:n}=t.attributes,{replaceBlock:s}=(0,ur.useDispatch)(no.store),i=()=>{s(t.clientId,(0,ff.createBlock)("core/html",{content:r}))},a=!!r,c=(0,ur.useSelect)(d=>{let{canInsertBlockType:p,getBlockRootClientId:m}=d(no.store);return p("core/html",m(n))},[n]),u=(0,ro.sprintf)((0,ro.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block or remove it entirely."),e.title||o),l=[(0,Tt.jsx)(cf,{block:e,attributes:t.attributes,clientId:t.clientId},"install")];return a&&c&&(u=(0,ro.sprintf)((0,ro.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),e.title||o),l.push((0,Tt.jsx)(uf.Button,{__next40pxDefaultSize:!0,onClick:i,variant:"tertiary",children:(0,ro.__)("Keep as HTML")},"convert"))),(0,Tt.jsxs)("div",{...(0,no.useBlockProps)(),children:[(0,Tt.jsx)(no.Warning,{actions:l,children:u}),(0,Tt.jsx)(df.RawHTML,{children:r})]})},mf=hg;var Ut=g(J(),1);(0,gf.registerPlugin)("block-directory",{icon:void 0,render(){return(0,Ut.jsxs)(Ut.Fragment,{children:[(0,Ut.jsx)(Bi,{}),(0,Ut.jsx)(ef,{}),(0,Ut.jsx)(nf,{})]})}});(0,hf.addFilter)("blocks.registerBlockType","block-directory/fallback",(e,t)=>(t!=="core/missing"||(e.edit=mf(e.edit)),e));return Of(xg);})();
1 +(function() {
2 +var wp;(wp||={}).blockDirectory=(()=>{var sd=Object.create;var Tr=Object.defineProperty;var id=Object.getOwnPropertyDescriptor;var ad=Object.getOwnPropertyNames;var ld=Object.getPrototypeOf,cd=Object.prototype.hasOwnProperty;var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Le=(e,t)=>{for(var o in t)Tr(e,o,{get:t[o],enumerable:!0})},Pi=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ad(t))!cd.call(e,n)&&n!==o&&Tr(e,n,{get:()=>t[n],enumerable:!(r=id(t,n))||r.enumerable});return e};var g=(e,t,o)=>(o=e!=null?sd(ld(e)):{},Pi(t||!e||!e.__esModule?Tr(o,"default",{value:e,enumerable:!0}):o,e)),ud=e=>Pi(Tr({},"__esModule",{value:!0}),e);var _i=ne((dh,Oi)=>{Oi.exports=window.wp.plugins});var Ai=ne((ph,ki)=>{ki.exports=window.wp.hooks});var _t=ne((mh,Ii)=>{Ii.exports=window.wp.blocks});var qe=ne((gh,Di)=>{Di.exports=window.wp.data});var Ue=ne((hh,Ni)=>{Ni.exports=window.wp.element});var $n=ne((yh,Li)=>{Li.exports=window.wp.editor});var io=ne((bh,Fi)=>{Fi.exports=window.wp.blockEditor});var Me=ne((vh,Vi)=>{Vi.exports=window.wp.i18n});var Sr=ne((wh,ji)=>{ji.exports=window.wp.apiFetch});var Wi=ne((Rh,Hi)=>{Hi.exports=window.wp.notices});var $i=ne((Eh,Ui)=>{Ui.exports=window.wp.url});var sa=ne((Yh,na)=>{na.exports=window.wp.compose});var Yt=ne((zh,ia)=>{ia.exports=window.wp.components});var Jn=ne((Kh,aa)=>{aa.exports=window.wp.coreData});var ua=ne((Gh,ca)=>{ca.exports=window.wp.htmlEntities});var F=ne((Xh,fa)=>{fa.exports=window.React});var X=ne((ny,ha)=>{ha.exports=window.ReactJSXRuntime});var It=ne((Jy,Wa)=>{Wa.exports=window.ReactDOM});var Gl=ne(ql=>{"use strict";var vo=F();function Wm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Um=typeof Object.is=="function"?Object.is:Wm,$m=vo.useState,Ym=vo.useEffect,zm=vo.useLayoutEffect,Km=vo.useDebugValue;function qm(e,t){var o=t(),r=$m({inst:{value:o,getSnapshot:t}}),n=r[0].inst,s=r[1];return zm(function(){n.value=o,n.getSnapshot=t,Ls(n)&&s({inst:n})},[e,o,t]),Ym(function(){return Ls(n)&&s({inst:n}),e(function(){Ls(n)&&s({inst:n})})},[e]),Km(o),o}function Ls(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!Um(e,o)}catch{return!0}}function Gm(e,t){return t()}var Xm=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Gm:qm;ql.useSyncExternalStore=vo.useSyncExternalStore!==void 0?vo.useSyncExternalStore:Xm});var rn=ne((qb,Xl)=>{"use strict";Xl.exports=Gl()});var Zl=ne(Jl=>{"use strict";var nn=F(),Jm=rn();function Zm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qm=typeof Object.is=="function"?Object.is:Zm,eg=Jm.useSyncExternalStore,tg=nn.useRef,og=nn.useEffect,rg=nn.useMemo,ng=nn.useDebugValue;Jl.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var s=tg(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=rg(function(){function l(m){if(!c){if(c=!0,u=m,m=r(m),n!==void 0&&i.hasValue){var p=i.value;if(n(p,m))return d=p}return d=m}if(p=d,Qm(u,m))return p;var y=r(m);return n!==void 0&&n(p,y)?(u=m,p):(u=m,d=y)}var c=!1,u,d,f=o===void 0?null:o;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,o,r,n]);var a=eg(e,s[0],s[1]);return og(function(){i.hasValue=!0,i.value=a},[a]),ng(a),a}});var ec=ne((Xb,Ql)=>{"use strict";Ql.exports=Zl()});var Uu=ne((QT,Wu)=>{Wu.exports=window.wp.theme});var Yu=ne((eS,$u)=>{$u.exports=window.wp.privateApis});var In=ne((OS,lf)=>{lf.exports=window.wp.primitives});var df=ne((US,ff)=>{ff.exports=window.wp.a11y});var uh={};Le(uh,{store:()=>pe});var td=g(_i(),1),od=g(Ai(),1);var ea=g(_t(),1),Vo=g(qe(),1),ta=g(Ue(),1),oa=g($n(),1);var _r=g(qe(),1);var Mi=g(qe(),1),fd=(e={},t)=>{switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},dd=(e={installedBlockTypes:[],isInstalling:{}},t)=>{switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter(o=>o.name!==t.item.name)};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},pd=(e={},t)=>{switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":let{[t.blockId]:o,...r}=e;return r}return e},Bi=(0,Mi.combineReducers)({downloadableBlocks:fd,blockManagement:dd,errorNotices:pd});var Yn={};Le(Yn,{getDownloadableBlocks:()=>gd,getErrorNoticeForBlock:()=>vd,getErrorNotices:()=>bd,getInstalledBlockTypes:()=>Fo,getNewBlockTypes:()=>hd,getUnusedBlockTypes:()=>yd,isInstalling:()=>xd,isRequestingDownloadableBlocks:()=>md});var ao=g(qe(),1),Mo=g(io(),1),Bo=[];function md(e,t){return e.downloadableBlocks[t]?.isRequesting??!1}function gd(e,t){return e.downloadableBlocks[t]?.results??Bo}function Fo(e){return e.blockManagement.installedBlockTypes}var hd=(0,ao.createRegistrySelector)(e=>(0,ao.createSelector)(t=>{let o=Fo(t);if(!o.length)return Bo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(Mo.store),s=o.map(l=>l.name),i=n().flatMap(l=>{let c=r(l);return s.includes(c)?c:[]}),a=o.filter(l=>i.includes(l.name));return a.length>0?a:Bo},t=>[Fo(t),e(Mo.store).getClientIdsWithDescendants()])),yd=(0,ao.createRegistrySelector)(e=>(0,ao.createSelector)(t=>{let o=Fo(t);if(!o.length)return Bo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(Mo.store),s=o.map(l=>l.name),i=n().flatMap(l=>{let c=r(l);return s.includes(c)?c:[]}),a=o.filter(l=>!i.includes(l.name));return a.length>0?a:Bo},t=>[Fo(t),e(Mo.store).getClientIdsWithDescendants()]));function xd(e,t){return e.blockManagement.isInstalling[t]||!1}function bd(e){return e.errorNotices}function vd(e,t){return e.errorNotices[t]}var qn={};Le(qn,{addInstalledBlockType:()=>Td,clearErrorNotice:()=>Od,fetchDownloadableBlocks:()=>Kn,installBlockType:()=>Rd,receiveDownloadableBlocks:()=>Or,removeInstalledBlockType:()=>Sd,setErrorNotice:()=>Pd,setIsInstalling:()=>Cd,uninstallBlockType:()=>Ed});var Pr=g(_t(),1),xt=g(Me(),1),lo=g(Sr(),1),Cr=g(Wi(),1),Ki=g($i(),1);var Yi=g(Sr(),1),wd=e=>new Promise((t,o)=>{let r=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach(n=>{e[n]&&(r[n]=e[n])}),e.innerHTML&&r.appendChild(document.createTextNode(e.innerHTML)),r.onload=()=>t(!0),r.onerror=()=>o(new Error("Error loading asset.")),document.body.appendChild(r),(r.nodeName.toLowerCase()==="link"||r.nodeName.toLowerCase()==="script"&&!r.src)&&t()});async function zi(){let t=await(await(0,Yi.default)({url:document.location.href,parse:!1})).text(),o=new window.DOMParser().parseFromString(t,"text/html"),r=Array.from(o.querySelectorAll('link[rel="stylesheet"],script')).filter(n=>n.id&&!document.getElementById(n.id));for(let n of r)await wd(n)}function zn(e){if(!e)return!1;let t=e.links["wp:plugin"]||e.links.self;return t&&t.length?t[0].href:!1}function Kn(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function Or(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}var Rd=e=>async({registry:t,dispatch:o})=>{let{id:r,name:n}=e,s=!1;o.clearErrorNotice(r);try{o.setIsInstalling(r,!0);let i=zn(e),a={};i?await(0,lo.default)({method:"PUT",url:i,data:{status:"active"}}):a=(await(0,lo.default)({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links,o.addInstalledBlockType({...e,links:{...e.links,...a}});let l=["api_version","title","category","parent","ancestor","icon","description","keywords","attributes","provides_context","uses_context","selectors","supports","styles","example","variations","allowed_blocks","block_hooks"];if(await(0,lo.default)({path:(0,Ki.addQueryArgs)(`/wp/v2/block-types/${n}`,{_fields:l})}).catch(()=>{}).then(u=>{u&&(0,Pr.unstable__bootstrapServerSideBlockDefinitions)({[n]:Object.fromEntries(Object.entries(u).filter(([d])=>l.includes(d)))})}),await zi(),!t.select(Pr.store).getBlockTypes().some(u=>u.name===n))throw new Error((0,xt.__)("Error registering block. Try reloading the page."));t.dispatch(Cr.store).createInfoNotice((0,xt.sprintf)((0,xt.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),s=!0}catch(i){let a=i.message||(0,xt.__)("An error occurred."),l=i instanceof Error,c={folder_exists:(0,xt.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:(0,xt.__)("Error installing block. You can reload the page and try again.")};c[i.code]&&(l=!0,a=c[i.code]),o.setErrorNotice(r,a,l),t.dispatch(Cr.store).createErrorNotice(a,{speak:!0,isDismissible:!0})}return o.setIsInstalling(r,!1),s},Ed=e=>async({registry:t,dispatch:o})=>{try{let r=zn(e);await(0,lo.default)({method:"PUT",url:r,data:{status:"inactive"}}),await(0,lo.default)({method:"DELETE",url:r}),o.removeInstalledBlockType(e)}catch(r){t.dispatch(Cr.store).createErrorNotice(r.message||(0,xt.__)("An error occurred."))}};function Td(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function Sd(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function Cd(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function Pd(e,t,o=!1){return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:o}}function Od(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var Xn={};Le(Xn,{getDownloadableBlocks:()=>Id});var co=function(){return co=Object.assign||function(t){for(var o,r=1,n=arguments.length;r<n;r++){o=arguments[r];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(t[s]=o[s])}return t},co.apply(this,arguments)};function qi(e){return e.toLowerCase()}var _d=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],kd=/[^A-Z0-9]+/gi;function Xi(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?_d:o,n=t.stripRegexp,s=n===void 0?kd:n,i=t.transform,a=i===void 0?qi:i,l=t.delimiter,c=l===void 0?" ":l,u=Gi(Gi(e,r,"$1\0$2"),s,"\0"),d=0,f=u.length;u.charAt(d)==="\0";)d++;for(;u.charAt(f-1)==="\0";)f--;return u.slice(d,f).split("\0").map(a).join(c)}function Gi(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(r,n){return r.replace(n,o)},e)}function Gn(e,t){var o=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&o>="0"&&o<="9"?"_"+o+r:""+o.toUpperCase()+r}function Ji(e,t){return t===void 0&&(t={}),Xi(e,co({delimiter:"",transform:Gn},t))}function Ad(e,t){return t===0?e.toLowerCase():Gn(e,t)}function Zi(e,t){return t===void 0&&(t={}),Ji(e,co({transform:Ad},t))}var Qi=g(Sr(),1);var Id=e=>async({dispatch:t})=>{if(e)try{t(Kn(e));let r=(await(0,Qi.default)({path:`wp/v2/block-directory/search?term=${e}`})).map(n=>Object.fromEntries(Object.entries(n).map(([s,i])=>[Zi(s),i])));t(Or(r,e))}catch{t(Or([],e))}};var Dd="core/block-directory",Nd={reducer:Bi,selectors:Yn,actions:qn,resolvers:Xn},pe=(0,_r.createReduxStore)(Dd,Nd);(0,_r.register)(pe);function ra(){let{uninstallBlockType:e}=(0,Vo.useDispatch)(pe),t=(0,Vo.useSelect)(r=>{let{isAutosavingPost:n,isSavingPost:s}=r(oa.store);return s()&&!n()},[]),o=(0,Vo.useSelect)(r=>r(pe).getUnusedBlockTypes(),[]);return(0,ta.useEffect)(()=>{t&&o.length&&o.forEach(r=>{e(r),(0,ea.unregisterBlockType)(r.name)})},[t]),null}var Ff=g(io(),1),Vf=g(sa(),1),jf=g(Ue(),1);var If=g(Me(),1),Df=g(Yt(),1),Nf=g(Jn(),1),Lf=g(qe(),1),Mf=g(_t(),1);var Ef=g(Me(),1),Tf=g(Yt(),1),Sf=g(_t(),1),Cf=g(qe(),1);function la(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(o=la(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ld(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=la(e))&&(r&&(r+=" "),r+=t);return r}var uo=Ld;var xe=g(Me(),1),Fn=g(Yt(),1),bf=g(Ue(),1),Vt=g(ua(),1),vf=g(_t(),1),wf=g(qe(),1);var Md=g(F(),1),jo={...Md};var pa=g(F(),1),da={};function be(e,t){let o=pa.useRef(da);return o.current===da&&(o.current=e(t)),o}var Zn=jo.useInsertionEffect,Bd=Zn&&Zn!==jo.useLayoutEffect?Zn:e=>e();function H(e){let t=be(Fd).current;return t.next=e,Bd(t.effect),t.trampoline}function Fd(){let e={next:void 0,callback:Vd,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Vd(){}function $e(){}var ma=Object.freeze([]),ae=Object.freeze({});var ga=g(F(),1),jd=()=>{},V=typeof document<"u"?ga.useLayoutEffect:jd;function Hd(e,t){return function(r,...n){let s=new URL(e);return s.searchParams.set("code",r.toString()),n.forEach(i=>s.searchParams.append("args[]",i)),`${t} error #${r}; visit ${s} for the full message.`}}var Wd=Hd("https://base-ui.com/production-error","Base UI"),Ge=Wd;var kt=g(F(),1);function Qn(e,t,o,r){let n=be(xa).current;return Ud(n,e,t,o,r)&&ba(n,[e,t,o,r]),n.callback}function ya(e){let t=be(xa).current;return $d(t,e)&&ba(t,e),t.callback}function xa(){return{callback:null,cleanup:null,refs:[]}}function Ud(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function $d(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function ba(e,t){if(e.refs=t,t.every(o=>o==null)){e.callback=null;return}e.callback=o=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),o!=null){let r=Array(t.length).fill(null);for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=s(o);typeof i=="function"&&(r[n]=i);break}case"object":{s.current=o;break}default:}}e.cleanup=()=>{for(let n=0;n<t.length;n+=1){let s=t[n];if(s!=null)switch(typeof s){case"function":{let i=r[n];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}default:}}}}}}var wa=g(F(),1);var va=g(F(),1),Yd=parseInt(va.version,10);function fo(e){return Yd>=e}function es(e){if(!wa.isValidElement(e))return null;let t=e,o=t.props;return(fo(19)?o?.ref:t.ref)??null}function Ho(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Ra(e,t){let o={};for(let r in e){let n=e[r];if(t?.hasOwnProperty(r)){let s=t[r](n);s!=null&&Object.assign(o,s);continue}n===!0?o[`data-${r.toLowerCase()}`]="":n&&(o[`data-${r.toLowerCase()}`]=n.toString())}return o}function Ea(e,t){return typeof e=="function"?e(t):e}function Ta(e,t){return typeof e=="function"?e(t):e}var ts={};function zt(e,t,o,r,n){if(!o&&!r&&!n&&!e)return kr(t);let s=kr(e);return t&&(s=Wo(s,t)),o&&(s=Wo(s,o)),r&&(s=Wo(s,r)),n&&(s=Wo(s,n)),s}function Sa(e){if(e.length===0)return ts;if(e.length===1)return kr(e[0]);let t=kr(e[0]);for(let o=1;o<e.length;o+=1)t=Wo(t,e[o]);return t}function kr(e){return os(e)?{...Pa(e,ts)}:zd(e)}function Wo(e,t){return os(t)?Pa(t,e):Kd(e,t)}function zd(e){let t={...e};for(let o in t){let r=t[o];Ca(o,r)&&(t[o]=Oa(r))}return t}function Kd(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=Ho(e.style,r);break}case"className":{e[o]=rs(e.className,r);break}default:Ca(o,r)?e[o]=qd(e[o],r):e[o]=r}}return e}function Ca(e,t){let o=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2);return o===111&&r===110&&n>=65&&n<=90&&(typeof t=="function"||typeof t>"u")}function os(e){return typeof e=="function"}function Pa(e,t){return os(e)?e(t):e??ts}function qd(e,t){return t?e?(...o)=>{let r=o[0];if(ka(r)){let s=r;_a(s);let i=t(...o);return s.baseUIHandlerPrevented||e?.(...o),i}let n=t(...o);return e?.(...o),n}:Oa(t):e}function Oa(e){return e&&((...t)=>{let o=t[0];return ka(o)&&_a(o),e(...t)})}function _a(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function rs(e,t){return t?e?t+" "+e:t:e}function ka(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}var ns=g(F(),1);function Be(e,t,o={}){let r=t.render;o.enabled!==!1&&(r=Zd(r));let n=Gd(t,o,r);if(o.enabled===!1)return null;let s=o.state??ae;return Qd(e,r,n,s)}function Gd(e,t,o){let{className:r,style:n}=e,{state:s=ae,ref:i,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?Ea(r,s):void 0,d=c?Ta(n,s):void 0,f=c?Ra(s,l):ae,m=c&&a?Xd(a):void 0,p=c?Ho(f,m)??{}:ae;return typeof document<"u"&&(c?Array.isArray(i)?p.ref=ya([p.ref,es(o),...i]):p.ref=Qn(p.ref,es(o),i):Qn(null,null)),c?(u!==void 0&&(p.className=rs(p.className,u)),d!==void 0&&(p.style=Ho(p.style,d)),p):ae}function Xd(e){return Array.isArray(e)?Sa(e):zt(void 0,e)}var Jd=Symbol.for("react.lazy");function Zd(e){if(e?.$$typeof!==Jd)return e;let t=kt.Children.toArray(e)[0];return kt.isValidElement(t)?t:e}function Qd(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=zt(o,t.props);return n.ref=o.ref,kt.cloneElement(t,n)}if(e&&typeof e=="string")return ep(e,o);throw new Error(Ge(8))}function ep(e,t){return e==="button"?(0,ns.createElement)("button",{type:"button",...t,key:t.key}):e==="img"?(0,ns.createElement)("img",{alt:"",...t,key:t.key}):kt.createElement(e,t)}var Ar=g(F(),1);var Aa=0;function tp(e,t="mui"){let[o,r]=Ar.useState(e),n=e||o;return Ar.useEffect(()=>{o==null&&(Aa+=1,r(`${t}-${Aa}`))},[o,t]),n}var Ia=jo.useId;function po(e,t){if(Ia!==void 0){let o=Ia();return e??(t?`${t}-${o}`:o)}return tp(e,t)}function Da(e){return po(e,"base-ui")}var Y={};Le(Y,{cancelOpen:()=>_p,chipRemovePress:()=>fp,clearPress:()=>up,closePress:()=>lp,closeWatcher:()=>Rp,decrementPress:()=>mp,disabled:()=>Ap,drag:()=>Cp,escapeKey:()=>wp,focusOut:()=>vp,imperativeAction:()=>Np,incrementPress:()=>pp,initial:()=>Dp,inputBlur:()=>yp,inputChange:()=>gp,inputClear:()=>hp,inputPaste:()=>xp,inputPress:()=>bp,itemPress:()=>ap,keyboard:()=>Tp,linkPress:()=>cp,listNavigation:()=>Ep,missing:()=>Ip,none:()=>op,outsidePress:()=>ip,pointer:()=>Sp,scrub:()=>Op,siblingOpen:()=>kp,swipe:()=>Lp,trackPress:()=>dp,triggerFocus:()=>sp,triggerHover:()=>np,triggerPress:()=>rp,wheel:()=>Pp,windowResize:()=>Mp});var op="none",rp="trigger-press",np="trigger-hover",sp="trigger-focus",ip="outside-press",ap="item-press",lp="close-press",cp="link-press",up="clear-press",fp="chip-remove-press",dp="track-press",pp="increment-press",mp="decrement-press",gp="input-change",hp="input-clear",yp="input-blur",xp="input-paste",bp="input-press",vp="focus-out",wp="escape-key",Rp="close-watcher",Ep="list-navigation",Tp="keyboard",Sp="pointer",Cp="drag",Pp="wheel",Op="scrub",_p="cancel-open",kp="sibling-open",Ap="disabled",Ip="missing",Dp="initial",Np="imperative-action",Lp="swipe",Mp="window-resize";function Z(e,t,o,r){let n=!1,s=!1,i=r??ae;return{reason:e,event:t??new Event("base-ui"),cancel(){n=!0},allowPropagation(){s=!0},get isCanceled(){return n},get isPropagationAllowed(){return s},trigger:o,...i}}var is=g(F(),1);var Na=g(F(),1);function mo(e){Na.useEffect(e,ma)}var Ir=null,Fy=globalThis.requestAnimationFrame,ss=class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;let o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let n=0;n<o.length;n+=1)o[n]?.(t)};request(t){let o=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),o}cancel(t){let o=t-this.startId;o<0||o>=this.callbacks.length||this.callbacks[o]!==null&&(this.callbacks[o]=null,this.callbacksCount-=1)}},Dr=new ss;var lt=class e{static create(){return new e}static request(t){return Dr.request(t)}static cancel(t){return Dr.cancel(t)}currentId=Ir;request(t){this.cancel(),this.currentId=Dr.request(()=>{this.currentId=Ir,t()})}cancel=()=>{this.currentId!==Ir&&(Dr.cancel(this.currentId),this.currentId=Ir)};disposeEffect=()=>this.cancel};function go(){let e=be(lt.create).current;return mo(e.disposeEffect),e}function La(e,t=!1,o=!1,r=!1){let[n,s]=is.useState(e&&t?"idle":void 0),[i,a]=is.useState(e&&!r);return e&&!i&&(a(!0),s("starting")),!e&&i&&n!=="ending"&&!o&&s("ending"),!e&&!i&&n==="ending"&&s(void 0),V(()=>{if(!e&&i&&n!=="ending"&&o){let l=lt.request(()=>{s("ending")});return()=>{lt.cancel(l)}}},[e,i,n,o]),V(()=>{if(!e||t)return;let l=lt.request(()=>{s(void 0)});return()=>{lt.cancel(l)}},[t,e]),V(()=>{if(!e||!t)return;e&&i&&n!=="idle"&&s("starting");let l=lt.request(()=>{s("idle")});return()=>{lt.cancel(l)}},[t,e,i,n]),{mounted:i,setMounted:a,transitionStatus:n}}var Nr="data-starting-style",Ma="data-ending-style";var Bp={[Nr]:""},Fp={[Ma]:""},Fa={transitionStatus(e){return e==="starting"?Bp:e==="ending"?Fp:null}};function Lr(){return typeof window<"u"}function qt(e){return Mr(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){var t;return(t=(Mr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mr(e){return Lr()?e instanceof Node||e instanceof le(e).Node:!1}function W(e){return Lr()?e instanceof Element||e instanceof le(e).Element:!1}function ve(e){return Lr()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function ho(e){return!Lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function Uo(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=Oe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Va(e){return/^(table|td|th)$/.test(qt(e))}function $o(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Vp=/transform|translate|scale|rotate|perspective|filter/,jp=/paint|layout|strict|content/,Kt=e=>!!e&&e!=="none",as;function Br(e){let t=W(e)?Oe(e):e;return Kt(t.transform)||Kt(t.translate)||Kt(t.scale)||Kt(t.rotate)||Kt(t.perspective)||!Fr()&&(Kt(t.backdropFilter)||Kt(t.filter))||Vp.test(t.willChange||"")||jp.test(t.contain||"")}function ja(e){let t=ct(e);for(;ve(t)&&!ft(t);){if(Br(t))return t;if($o(t))return null;t=ct(t)}return null}function Fr(){return as==null&&(as=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),as}function ft(e){return/^(html|body|#document)$/.test(qt(e))}function Oe(e){return le(e).getComputedStyle(e)}function Yo(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(qt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||ho(e)&&e.host||ut(e);return ho(t)?t.host:t}function Ha(e){let t=ct(e);return ft(t)?(e.ownerDocument||e).body:ve(t)&&Uo(t)?t:Ha(t)}function At(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=Ha(e),s=n===((r=e.ownerDocument)==null?void 0:r.body),i=le(n);if(s){let a=Vr(i);return t.concat(i,i.visualViewport||[],Uo(n)?n:[],a&&o?At(a):[])}else return t.concat(n,At(n,[],o))}function Vr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function we(e){return e?.ownerDocument||document}function Q(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}function Fe(e){let t=be(Hp,e).current;return t.next=e,V(t.effect),t}function Hp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var $a=g(F(),1);var ls=g(It(),1);function Ua(e){return e==null?e:"current"in e?e.current:e}var jr=null;function Wp(e){if(!jr){let t=[];jr=t,queueMicrotask(()=>{jr=null,ls.flushSync(()=>{for(let o of t)o()})})}jr.push(e)}function yo(e,t=!1,o=!1){let r=go();return H((n,s=null)=>{r.cancel();let i=Ua(e);if(i==null)return;let a=i,l=()=>{if(!o){ls.flushSync(n);return}Wp(()=>{s?.aborted||n()})};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function c(){Promise.all(a.getAnimations().map(u=>u.finished)).then(()=>{s?.aborted||l()},()=>{if(s?.aborted)return;if(a.getAnimations().some(d=>d.pending||d.playState!=="finished")){c();return}l()})}if(t){let u=Nr;if(!a.hasAttribute(u)){r.request(c);return}let d=new MutationObserver(()=>{a.hasAttribute(u)||(d.disconnect(),c())});d.observe(a,{attributes:!0,attributeFilter:[u]}),s?.addEventListener("abort",()=>d.disconnect(),{once:!0});return}r.request(c)})}function Hr(e){let{enabled:t=!0,open:o,ref:r,batch:n=!1,onComplete:s}=e,i=H(s),a=yo(r,o,n);$a.useEffect(()=>{if(!t)return;let l=new AbortController;return a(i,l.signal),()=>{l.abort()}},[t,o,i,a])}var Qe={};Le(Qe,{engine:()=>ps,env:()=>gs,mediaQuery:()=>hs,os:()=>fs,screenReader:()=>ms});var fs={};Le(fs,{android:()=>Ka,apple:()=>us,ios:()=>cs,linux:()=>Kp,mac:()=>qa,windows:()=>zp});function Up(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:$p,platform:Yp,maxTouchPoints:Ya}=Up(),Gt=$p.toLowerCase(),Xt=Yp.toLowerCase();var cs=/^i(os$|p)/.test(Xt)||Xt==="macintel"&&Ya>1,za="android",Ka=Xt===za||Gt.includes(za),qa=!cs&&Xt.startsWith("mac"),zp=Xt.startsWith("win"),Kp=!Ka&&/^(linux|chrome os)/.test(Xt),us=qa||cs;var ps={};Le(ps,{blink:()=>Gp,gecko:()=>qp,webkit:()=>ds});var ds=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),qp=!ds&&Gt.includes("firefox"),Gp=!ds&&Gt.includes("chrom");var ms={};Le(ms,{voiceOver:()=>Xp});var Xp=us;var gs={};Le(gs,{jsdom:()=>Jp});var Jp=/jsdom|happydom/.test(Gt);var hs={};Le(hs,{iOS:()=>Zp});var Zp="@supports (-webkit-touch-callout: none)";var zo=0,Ye=class e{static create(){return new e}currentId=zo;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=zo,o()},t)}isStarted(){return this.currentId!==zo}clear=()=>{this.currentId!==zo&&(clearTimeout(this.currentId),this.currentId=zo)};disposeEffect=()=>this.clear};function et(){let e=be(Ye.create).current;return mo(e.disposeEffect),e}var ke=g(F(),1);function Ga(e){return"nativeEvent"in e}function Xa(e){return e.pointerType===""&&e.isTrusted?!0:Qe.os.android&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function bt(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function Ja(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function Wr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ee(e,t){if(!e||!t)return!1;let o=t.getRootNode?.();if(e.contains(t))return!0;if(o&&ho(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function _e(e){return"composedPath"in e?e.composedPath()[0]??e.target:e.target}var ys="data-base-ui-focusable";var xs="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";var Za="data-open",Qa="data-closed";var el="data-anchor-hidden";var $r={};Le($r,{popupOpen:()=>Ur,pressed:()=>bs});var Ur="data-popup-open",bs="data-pressed";var em={[Ur]:""},wx={[Ur]:"",[bs]:""},tm={[Za]:""},om={[Qa]:""},rm={[el]:""},tl={open(e){return e?em:null}};var Ko={open(e){return e?tm:om},anchorHidden(e){return e?rm:null}},ol={...Ko,...Fa};var Tx=$r.popupOpen,qo="data-trigger-disabled";function Dt(e,t){if(!W(e))return!1;let o=e;if(t.hasElement(o))return!o.hasAttribute(qo);for(let[,r]of t.entries())if(ee(r,o))return!r.hasAttribute(qo);return!1}function Yr(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let o=e;return o.target!=null&&t.contains(o.target)}function nl(e){return e.matches("html,body")}function sl(e){return ve(e)&&e.matches(xs)}function vs(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${xs}`)!=null}function il(e){if(!e||Qe.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function nm(e,t){return t!=null&&!bt(t)?0:typeof e=="function"?e():e}function tt(e,t,o){let r=nm(e,o);return typeof r=="number"?r:r?.[t]}function ws(e){return typeof e=="function"?e():e}function zr(e,t){return t||e==="click"||e==="mousedown"}function al(e){return e?.includes("mouse")&&e!=="mousedown"}var ll=g(X(),1),cl=ke.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ye,currentIdRef:{current:null},currentContextRef:{current:null}});function sm(e,t){e.current=t.current}function Rs(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=ke.useRef(o),s=ke.useRef(o),i=ke.useRef(null),a=ke.useRef(null),l=et();return V(()=>{if(s.current=o,!i.current){n.current=o;return}n.current={open:tt(n.current,"open"),close:tt(o,"close")}},[o,i,n,s]),(0,ll.jsx)(cl.Provider,{value:ke.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function Es(e,t={open:!1}){let{open:o}=t,r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),s=ke.useContext(cl),{currentIdRef:i,delayRef:a,timeoutMs:l,initialDelayRef:c,currentContextRef:u,hasProvider:d,timeout:f}=s,[m,p]=ke.useState(!1),y=ke.useRef(o);return V(()=>{y.current=o},[o]),V(()=>{function h(){u.current?.setIsInstantPhase(!1),i.current=null,u.current=null,a.current=c.current,f.clear()}if(i.current&&!o&&i.current===n){if(p(!1),l){let b=n;return f.start(l,()=>{r.select("open")||i.current&&i.current!==b||h()}),()=>{(y.current||i.current!==b)&&f.clear()}}h()}},[o,n,i,a,l,c,u,f,r]),V(()=>{if(!o)return;let h=u.current,b=i.current;f.clear(),u.current={onOpenChange:r.setOpen,setIsInstantPhase:p},i.current=n,a.current={open:0,close:tt(c.current,"close")},b!==null&&b!==n?(p(!0),h?.setIsInstantPhase(!0),h?.onOpenChange(!1,Z(Y.none))):(p(!1),h?.setIsInstantPhase(!1))},[o,n,r,i,a,c,u,f]),V(()=>()=>{if(i.current===n){if(u.current=null,!y.current)return;i.current=null,sm(a,c),f.clear()}},[u,i,a,n,c,f]),ke.useMemo(()=>({activeIdRef:i,hasProvider:d,delayRef:a,isInstantPhase:m}),[i,d,a,m])}function ot(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}var Nt=Math.min,rt=Math.max,Lt=Math.round,Xo=Math.floor,dt=e=>({x:e,y:e}),im={left:"right",right:"left",bottom:"top",top:"bottom"};function qr(e,t,o){return rt(e,Nt(t,o))}function pt(e,t){return typeof e=="function"?e(t):e}function Te(e){return e.split("-")[0]}function Xe(e){return e.split("-")[1]}function Gr(e){return e==="x"?"y":"x"}function Jo(e){return e==="y"?"height":"width"}function Ve(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Zo(e){return Gr(Ve(e))}function dl(e,t,o){o===void 0&&(o=!1);let r=Xe(e),n=Zo(e),s=Jo(n),i=n==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Go(i)),[i,Go(i)]}function pl(e){let t=Go(e);return[Kr(e),t,Kr(t)]}function Kr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var ul=["left","right"],fl=["right","left"],am=["top","bottom"],lm=["bottom","top"];function cm(e,t,o){switch(e){case"top":case"bottom":return o?t?fl:ul:t?ul:fl;case"left":case"right":return t?am:lm;default:return[]}}function ml(e,t,o,r){let n=Xe(e),s=cm(Te(e),o==="start",r);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(Kr)))),s}function Go(e){let t=Te(e);return im[t]+e.slice(t.length)}function um(e){var t,o,r,n;return{top:(t=e.top)!=null?t:0,right:(o=e.right)!=null?o:0,bottom:(r=e.bottom)!=null?r:0,left:(n=e.left)!=null?n:0}}function Xr(e){return typeof e!="number"?um(e):{top:e,right:e,bottom:e,left:e}}function Jt(e){let{x:t,y:o,width:r,height:n}=e;return{width:r,height:n,top:o,left:t,right:t+r,bottom:o+n,x:t,y:o}}function vt(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...vt(e,n.id,o)])}function xo(e){return`data-base-ui-${e}`}var Ae=g(F(),1),yl=g(It(),1);var gl={style:{transition:"none"}};var fm="data-base-ui-swipe-ignore",dm="data-swipe-ignore",Ux=`[${fm}]`,$x=`[${dm}]`;var hl={fallbackAxisSide:"end"};var xl=g(X(),1),pm=Ae.createContext(null),mm=()=>Ae.useContext(pm),gm=xo("portal");function bl(e={}){let{ref:t,container:o,componentProps:r=ae,elementProps:n}=e,s=po(),a=mm()?.portalNode,[l,c]=Ae.useState(null),[u,d]=Ae.useState(null),f=H(h=>{h!==null&&d(h)}),m=Ae.useRef(null);V(()=>{if(o===null){m.current&&(m.current=null,d(null),c(null));return}let h=(o&&(Mr(o)?o:o.current))??a??document.body;if(h==null){m.current&&(m.current=null,d(null),c(null));return}m.current!==h&&(m.current=h,d(null),c(h))},[o,a]);let p=Be("div",r,{ref:[t,f],props:[{id:s,[gm]:""},n]}),y=l&&p?yl.createPortal(p,l):null;return{node:u,nodeId:Ae.isValidElement(p)?p.props.id:void 0,subtree:y}}var Zt=g(F(),1);function vl(){let e=new Map;return{emit(t,o){e.get(t)?.forEach(r=>r(o))},on(t,o){e.has(t)||e.set(t,new Set),e.get(t).add(o)},off(t,o){e.get(t)?.delete(o)}}}var hm=g(X(),1),ym=Zt.createContext(null),xm=Zt.createContext(null),Jr=()=>Zt.useContext(ym)?.id||null,Mt=e=>{let t=Zt.useContext(xm);return e??t};var je=g(F(),1);function bm(e,t){let o=null,r=null,n=!1;return{contextElement:e||void 0,getBoundingClientRect(){let s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i=t.axis==="x"||t.axis==="both",a=t.axis==="y"||t.axis==="both",l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",c=s.width,u=s.height,d=s.x,f=s.y;return o==null&&t.x&&i&&(o=s.x-t.x),r==null&&t.y&&a&&(r=s.y-t.y),d-=o||0,f-=r||0,c=0,u=0,!n||l?(c=t.axis==="y"?s.width:0,u=t.axis==="x"?s.height:0,d=i&&t.x!=null?t.x:d,f=a&&t.y!=null?t.y:f):n&&!l&&(u=t.axis==="x"?s.height:u,c=t.axis==="y"?s.width:c),n=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}function wl(e){return e!=null&&e.clientX!=null}function Ts(e,t={}){let{enabled:o=!0,axis:r="both"}=t,n="rootStore"in e?e.rootStore:e,s=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),l=n.context.dataRef,c=je.useRef(!1),u=je.useRef(null),[d,f]=je.useState(),[m,p]=je.useState([]),y=H(w=>{n.set("positionReference",w)}),h=H((w,T,R)=>{c.current||l.current.openEvent&&!wl(l.current.openEvent)||n.set("positionReference",bm(R??a,{x:w,y:T,axis:r,dataRef:l,pointerType:d}))}),b=H(w=>{s?u.current||(h(w.clientX,w.clientY,w.currentTarget),p([])):h(w.clientX,w.clientY,w.currentTarget)}),v=bt(d)?i:s;je.useEffect(()=>{if(!o){y(a);return}if(!v)return;function w(){u.current?.(),u.current=null}let T=le(i);function R(E){let S=_e(E);ee(i,S)?w():h(E.clientX,E.clientY)}return!l.current.openEvent||wl(l.current.openEvent)?u.current=Q(T,"mousemove",R):y(a),w},[v,o,i,l,a,n,h,y,m]),je.useEffect(()=>()=>{n.set("positionReference",null)},[n]),je.useEffect(()=>{o&&!i&&(c.current=!1)},[o,i]),je.useEffect(()=>{!o&&s&&(c.current=!0)},[o,s]);let x=je.useMemo(()=>{function w(T){f(T.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:b,onMouseEnter:b}},[b]);return je.useMemo(()=>o?{reference:x,trigger:x}:{},[o,x])}var Ie=g(F(),1);function vm(){return!1}function wm(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function Ss(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:s="sloppy",referencePress:i=vm,bubbles:a,externalTree:l}=t,c="rootStore"in e?e.rootStore:e,u=c.useState("open"),d=c.useState("floatingElement"),{dataRef:f,events:m}=c.context,p=Mt(l),y=H(typeof n=="function"?n:()=>!1),h=typeof n=="function"?y:n,b=h!==!1,v=H(()=>s),{escapeKey:x,outsidePress:w}=wm(a),T=Ie.useRef(!1),R=Ie.useRef(!1),E=Ie.useRef(!1),S=Ie.useRef(!1),N=Ie.useRef(!1),M=Ie.useRef(""),O=Ie.useRef(null),U=et(),$=et(),L=H(()=>{$.clear(),f.current.insideReactTree=!1}),C=H(D=>{let G=f.current.floatingContext?.nodeId;return(p?vt(p.nodesRef.current,G):[]).some(se=>se.context?.open&&!se.context.dataRef.current[D])}),I=H(D=>Yr(D,c.select("floatingElement"))||Yr(D,c.select("domReferenceElement"))),A=H(D=>{i()&&c.setOpen(!1,Z(Y.triggerPress,D.nativeEvent))}),P=H(D=>{if(!u||!o||!r||D.key!=="Escape"||N.current||!x&&C("__escapeKeyBubbles"))return;let G=Ga(D)?D.nativeEvent:D,B=Z(Y.escapeKey,G);c.setOpen(!1,B),B.isCanceled||D.preventDefault(),!x&&!B.isPropagationAllowed&&D.stopPropagation()}),_=H(()=>{f.current.insideReactTree=!0,$.start(0,L)}),q=H(D=>{if(!u||!o||D.button!==0)return;let G=_e(D.nativeEvent);ee(c.select("floatingElement"),G)&&(T.current||(T.current=!0,R.current=!1))}),oe=H(D=>{!u||!o||(D.defaultPrevented||D.nativeEvent.defaultPrevented)&&T.current&&(R.current=!0)});Ie.useEffect(()=>{function D(G){G.open||(S.current=!1)}return m.on("openchange",D),()=>{m.off("openchange",D)}},[m]),Ie.useEffect(()=>{if(!u||!o)return u||(S.current=!1),L;f.current.__escapeKeyBubbles=x,f.current.__outsidePressBubbles=w;let D=new Ye,G=new Ye,B=we(d);function se(){D.clear(),N.current=!0}function ce(){D.start(Qe.engine.webkit?5:0,()=>{N.current=!1})}function ie(){E.current=!0,G.start(0,()=>{E.current=!1})}function ue(){T.current=!1,R.current=!1}function fe(){let k=M.current,j=k==="pen"||!k?"mouse":k,Ee=v(),de=typeof Ee=="function"?Ee():Ee;return typeof de=="string"?de:de[j]}function ht(k){let j=fe();return j==="intentional"&&k.type!=="click"||j==="sloppy"&&k.type==="click"}function re(k){let j=f.current.floatingContext?.nodeId,Ee=p&&vt(p.nodesRef.current,j).some(de=>Yr(k,de.context?.elements.floating));return I(k)||Ee}function he(k){if(ht(k)){k.type!=="click"&&!I(k)&&(G.clear(),E.current=!1),L();return}if(f.current.insideReactTree){L();return}let j=_e(k),Ee=`[${xo("inert")}]`,de=W(j)?j.getRootNode():null,Tt=Array.from((ho(de)?de:we(c.select("floatingElement"))).querySelectorAll(Ee)),Do=c.context.triggerElements;if(j&&(Do.hasElement(j)||Do.hasMatchingElement(Pe=>ee(Pe,j))))return;let St=W(j)?j:null;for(;St&&!ft(St);){let Pe=ct(St);if(ft(Pe)||!W(Pe))break;St=Pe}if(!(Tt.length&&W(j)&&!nl(j)&&!ee(j,c.select("floatingElement"))&&Tt.every(Pe=>!ee(St,Pe)))){if(ve(j)&&!("touches"in k)){let Pe=ft(j),no=Oe(j),$t=/auto|scroll/,Ct=Pe||$t.test(no.overflowX),hr=Pe||$t.test(no.overflowY),yr=Ct&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,xr=hr&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,br=no.direction==="rtl",vr=xr&&(br?k.offsetX<=j.offsetWidth-j.clientWidth:k.offsetX>j.clientWidth),J=yr&&k.offsetY>j.clientHeight;if(vr||J)return}if(!re(k)){if(fe()==="intentional"){if(k.detail!==0&&!Xa(k)&&!S.current)return;if(E.current){G.clear(),E.current=!1;return}}typeof h=="function"&&!h(k)||C("__outsidePressBubbles")||(c.setOpen(!1,Z(Y.outsidePress,k)),L())}}}function ye(k){fe()!=="sloppy"||k.pointerType==="touch"||!c.select("open")||!o||I(k)||he(k)}function it(k){if(fe()!=="sloppy"||!c.select("open")||!o||I(k))return;let j=k.touches[0];j&&(O.current={startTime:Date.now(),startX:j.clientX,startY:j.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},U.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function Ce(k,j){let Ee=_e(k);if(!Ee)return;let de=Q(Ee,k.type,()=>{j(k),de()})}function ro(k){M.current="touch",Ce(k,it)}function yt(k){U.clear(),k.type==="pointerdown"&&(k.button===0&&(S.current=!0),M.current=k.pointerType),!(k.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)&&Ce(k,j=>{j.type==="pointerdown"?ye(j):he(j)})}function at(k){if(k.type==="pointercancel"&&(S.current=!1),!T.current)return;let j=R.current;if(ue(),fe()==="intentional"){if(k.type==="pointercancel"){j&&ie();return}if(!re(k)){if(j){ie();return}typeof h=="function"&&!h(k)||(G.clear(),E.current=!0,L())}}}function Rt(k){if(fe()!=="sloppy"||!O.current||I(k))return;let j=k.touches[0];if(!j)return;let Ee=Math.abs(j.clientX-O.current.startX),de=Math.abs(j.clientY-O.current.startY),Tt=Math.sqrt(Ee*Ee+de*de);Tt>5&&(O.current.dismissOnTouchEnd=!0),Tt>10&&(he(k),U.clear(),O.current=null)}function Ut(k){Ce(k,Rt)}function mr(k){fe()!=="sloppy"||!O.current||I(k)||(O.current.dismissOnTouchEnd&&he(k),U.clear(),O.current=null)}function gr(k){Ce(k,mr)}let Et=ot(r&&ot(Q(B,"keydown",P),Q(B,"compositionstart",se),Q(B,"compositionend",ce)),b&&ot(Q(B,"click",yt,!0),Q(B,"pointerdown",yt,!0),Q(B,"pointerup",at,!0),Q(B,"pointercancel",at,!0),Q(B,"mousedown",yt,!0),Q(B,"mouseup",at,!0),Q(B,"touchstart",ro,{capture:!0,passive:!0}),Q(B,"touchmove",Ut,{capture:!0,passive:!0}),Q(B,"touchend",gr,{capture:!0,passive:!0})));return()=>{Et(),D.clear(),G.clear(),ue(),E.current=!1,L()}},[f,d,r,b,h,u,o,x,w,P,L,v,C,I,p,c,U]);let z=Ie.useMemo(()=>({onKeyDown:P,onPointerDown:A,onClick:A}),[P,A]),K=Ie.useMemo(()=>({onKeyDown:P,onPointerDown:oe,onMouseDown:oe,onClickCapture:_,onMouseDownCapture(D){_(),q(D)},onPointerDownCapture(D){_(),q(D)},onMouseUpCapture:_,onTouchEndCapture:_,onTouchMoveCapture:_}),[P,_,q,oe]);return Ie.useMemo(()=>o?{reference:z,floating:K,trigger:z}:{},[o,z,K])}var Se=g(F(),1);function Rl(e,t,o){let{reference:r,floating:n}=e,s=Ve(t),i=Zo(t),a=Jo(i),l=Te(t),c=s==="y",u=r.x+r.width/2-n.width/2,d=r.y+r.height/2-n.height/2,f=r[a]/2-n[a]/2,m;switch(l){case"top":m={x:u,y:r.y-n.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-n.width,y:d};break;default:m={x:r.x,y:r.y}}let p=Xe(t);return p&&(m[i]+=f*(p==="end"?1:-1)*(o&&c?-1:1)),m}async function El(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=pt(t,e),p=Xr(m),h=a[f?d==="floating"?"reference":"floating":d],b=Jt(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(h)))==null||o?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(x))&&await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1},T=Jt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(b.top-T.top+p.top)/w.y,bottom:(T.bottom-b.bottom+p.bottom)/w.y,left:(b.left-T.left+p.left)/w.x,right:(T.right-b.right+p.right)/w.x}}var Rm=50,Tl=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:i}=o,a=i.detectOverflow?i:{...i,detectOverflow:El},l=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:d}=Rl(c,r,l),f=r,m=0,p={};for(let y=0;y<s.length;y++){let h=s[y];if(!h)continue;let{name:b,fn:v}=h,{x,y:w,data:T,reset:R}=await v({x:u,y:d,initialPlacement:r,placement:f,strategy:n,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=w??d,p[b]={...p[b],...T},R&&m<Rm&&(m++,typeof R=="object"&&(R.placement&&(f=R.placement),R.rects&&(c=R.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):R.rects),{x:u,y:d}=Rl(c,f,l)),y=-1)}return{x:u,y:d,placement:f,strategy:n,middlewareData:p}};var Sl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:n,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...h}=pt(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};let b=Te(n),v=Ve(a),x=Te(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(x||!y?[Go(a)]:pl(a)),R=p!=="none";!f&&R&&T.push(...ml(a,y,p,w));let E=[a,...T],S=await l.detectOverflow(t,h),N=[],M=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&N.push(S[b]),d){let L=dl(n,i,w);N.push(S[L[0]],S[L[1]])}if(M=[...M,{placement:n,overflows:N}],!N.every(L=>L<=0)){var O,U;let L=(((O=s.flip)==null?void 0:O.index)||0)+1,C=E[L];if(C&&(!(d==="alignment"?v!==Ve(C):!1)||M.every(P=>Ve(P.placement)===v?P.overflows[0]>0:!0)))return{data:{index:L,overflows:M},reset:{placement:C}};let I=(U=M.filter(A=>A.overflows[0]<=0).sort((A,P)=>A.overflows[1]-P.overflows[1])[0])==null?void 0:U.placement;if(!I)switch(m){case"bestFit":{var $;let A=($=M.filter(P=>{if(R){let _=Ve(P.placement);return _===v||_==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(_=>_>0).reduce((_,q)=>_+q,0)]).sort((P,_)=>P[1]-_[1])[0])==null?void 0:$[0];A&&(I=A);break}case"initialPlacement":I=a;break}if(n!==I)return{reset:{placement:I}}}return{}}}};var Cl=new Set(["left","top"]);async function Em(e,t){let{placement:o,platform:r,elements:n}=e,s=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=Te(o),a=Xe(o),l=Ve(o)==="y",c=Cl.has(i)?-1:1,u=s&&l?-1:1,d=pt(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(m=a==="end"?p*-1:p),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}var Pl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:n,y:s,placement:i,middlewareData:a}=t,l=await Em(t,e);return i===((o=a.offset)==null?void 0:o.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ol=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:n,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:w}=v;return{x,y:w}}},...c}=pt(e,t),u={x:o,y:r},d=await s.detectOverflow(t,c),f=Ve(n),m=Gr(f),p=u[m],y=u[f],h=(v,x)=>qr(x+d[v==="y"?"top":"left"],x,x-d[v==="y"?"bottom":"right"]);i&&(p=h(m,p)),a&&(y=h(f,y));let b=l.fn({...t,[m]:p,[f]:y});return{...b,data:{x:b.x-o,y:b.y-r,enabled:{[m]:i,[f]:a}}}}}},_l=function(e){return e===void 0&&(e={}),{options:e,fn(t){var o,r;let{x:n,y:s,placement:i,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:d=!0}=pt(e,t),f={x:n,y:s},m=Ve(i),p=Gr(m),y=f[p],h=f[m],b=pt(c,t),v=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:(o=b.mainAxis)!=null?o:0,crossAxis:(r=b.crossAxis)!=null?r:0};if(u){let T=p==="y"?"height":"width",R=a.reference[p]-a.floating[T]+v.mainAxis,E=a.reference[p]+a.reference[T]-v.mainAxis;y<R?y=R:y>E&&(y=E)}if(d){var x,w;let T=p==="y"?"width":"height",R=Cl.has(Te(i)),E=a.reference[m]-a.floating[T]+(R&&((x=l.offset)==null?void 0:x[m])||0)+(R?0:v.crossAxis),S=a.reference[m]+a.reference[T]+(R?0:((w=l.offset)==null?void 0:w[m])||0)-(R?v.crossAxis:0);h<E?h=E:h>S&&(h=S)}return{[p]:y,[m]:h}}}},kl=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:o,rects:r,platform:n,elements:s}=t,{apply:i=()=>{},...a}=pt(e,t),l=await n.detectOverflow(t,a),c=Te(o),u=Xe(o),d=Ve(o)==="y",{width:f,height:m}=r.floating,p,y;c==="top"||c==="bottom"?(p=c,y=u===(await(n.isRTL==null?void 0:n.isRTL(s.floating))?"start":"end")?"left":"right"):(y=c,p=u==="end"?"top":"bottom");let h=m-l.top-l.bottom,b=f-l.left-l.right,v=Nt(m-l[p],h),x=Nt(f-l[y],b),w=t.middlewareData.shift,T=!w,R=v,E=x;w!=null&&w.enabled.x&&(E=b),w!=null&&w.enabled.y&&(R=h),T&&!u&&(d?E=f-2*rt(l.left,l.right):R=m-2*rt(l.top,l.bottom)),await i({...t,availableWidth:E,availableHeight:R});let S=await n.getDimensions(s.floating);return f!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}};function Dl(e){let t=Oe(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=ve(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r,a=Lt(o)!==s||Lt(r)!==i;return a&&(o=s,r=i),{width:o,height:r,$:a}}function Ps(e){return W(e)?e:e.contextElement}function bo(e){let t=Ps(e);if(!ve(t))return dt(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:s}=Dl(t),i=(s?Lt(o.width):o.width)/r,a=(s?Lt(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var Tm=dt(0);function Nl(e){let t=le(e);return!Fr()||!t.visualViewport?Tm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sm(e,t,o){return t===void 0&&(t=!1),!!o&&t&&o===le(e)}function Qt(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),s=Ps(e),i=dt(1);t&&(r?W(r)&&(i=bo(r)):i=bo(e));let a=Sm(s,o,r)?Nl(s):dt(0),l=(n.left+a.x)/i.x,c=(n.top+a.y)/i.y,u=n.width/i.x,d=n.height/i.y;if(s&&r){let f=le(s),m=W(r)?le(r):r,p=f,y=Vr(p);for(;y&&m!==p;){let h=bo(y),b=y.getBoundingClientRect(),v=Oe(y),x=b.left+(y.clientLeft+parseFloat(v.paddingLeft))*h.x,w=b.top+(y.clientTop+parseFloat(v.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=x,c+=w,p=le(y),y=Vr(p)}}return Jt({width:u,height:d,x:l,y:c})}function Zr(e,t){let o=Yo(e).scrollLeft;return t?t.left+o:Qt(ut(e)).left+o}function Ll(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Zr(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function Cm(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,s=n==="fixed",i=ut(r),a=t?$o(t.floating):!1;if(r===i||a&&s)return o;let l={scrollLeft:0,scrollTop:0},c=dt(1),u=dt(0),d=ve(r);if((d||!s)&&((qt(r)!=="body"||Uo(i))&&(l=Yo(r)),d)){let m=Qt(r);c=bo(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}let f=i&&!d&&!s?Ll(i,l):dt(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:o.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Pm(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Om(e){let t=Yo(e),o=e.ownerDocument.body,r=rt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),n=rt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-t.scrollLeft+Zr(e),i=-t.scrollTop;return Oe(o).direction==="rtl"&&(s+=rt(e.clientWidth,o.clientWidth)-r),{width:r,height:n,x:s,y:i}}var _m=25;function km(e,t,o){o===void 0&&(o="viewport");let r=o==="layoutViewport",n=le(e),s=ut(e),i=n.visualViewport,a=s.clientWidth,l=s.clientHeight,c=0,u=0;if(i){let f=!Fr()||t==="fixed";r?f||(c=-i.offsetLeft,u=-i.offsetTop):(a=i.width,l=i.height,f&&(c=i.offsetLeft,u=i.offsetTop))}if(Zr(s)<=0){let f=s.ownerDocument,m=f.body,p=getComputedStyle(m),y=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,h=Math.abs(s.clientWidth-m.clientWidth-y),b=getComputedStyle(s).scrollbarGutter==="stable both-edges"?h/2:h;b<=_m&&(a-=b)}return{width:a,height:l,x:c,y:u}}function Am(e,t){let o=Qt(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,s=bo(e),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=n*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Al(e,t,o){let r;if(t==="viewport"||t==="layoutViewport")r=km(e,o,t);else if(t==="document")r=Om(ut(e));else if(W(t))r=Am(t,o);else{let n=Nl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Jt(r)}function Im(e,t){let o=t.get(e);if(o)return o;let r=At(e,[],!1).filter(a=>W(a)&&qt(a)!=="body"),n=null,s=Oe(e).position==="fixed",i=s?ct(e):e;for(;W(i)&&!ft(i);){let a=Oe(i),l=Br(i),c=n?n.position:s?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&a.position==="static")?r=r.filter(d=>d!==i):n=a,i=ct(i)}return t.set(e,r),r}function Dm(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?$o(t)?[]:Im(t,this._c):[].concat(o),r],a=Al(t,i[0],n),l=a.top,c=a.right,u=a.bottom,d=a.left;for(let f=1;f<i.length;f++){let m=Al(t,i[f],n);l=rt(m.top,l),c=Nt(m.right,c),u=Nt(m.bottom,u),d=rt(m.left,d)}return{width:c-d,height:u-l,x:d,y:l}}function Nm(e){let{width:t,height:o}=Dl(e);return{width:t,height:o}}function Lm(e,t,o){let r=ve(t),n=ut(t),s=o==="fixed",i=Qt(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=dt(0);if((r||!s)&&((qt(t)!=="body"||Uo(n))&&(a=Yo(t)),r)){let f=Qt(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!r&&n&&(l.x=Zr(n));let c=n&&!r&&!s?Ll(n,a):dt(0),u=i.left+a.scrollLeft-l.x-c.x,d=i.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function Cs(e){return Oe(e).position==="static"}function Il(e,t){if(!ve(e)||Oe(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return ut(e)===o&&(o=o.ownerDocument.body),o}function Ml(e,t){let o=le(e);if($o(e))return o;if(!ve(e)){let n=ct(e);for(;n&&!ft(n);){if(W(n)&&!Cs(n))return n;n=ct(n)}return o}let r=Il(e,t);for(;r&&Va(r)&&Cs(r);)r=Il(r,t);return r&&ft(r)&&Cs(r)&&!Br(r)?o:r||ja(e)||o}var Mm=async function(e){let t=this.getOffsetParent||Ml,o=this.getDimensions,r=await o(e.floating);return{reference:Lm(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Bm(e){return Oe(e).direction==="rtl"}var Os={convertOffsetParentRelativeRectToViewportRelativeRect:Cm,getDocumentElement:ut,getClippingRect:Dm,getOffsetParent:Ml,getElementRects:Mm,getClientRects:Pm,getDimensions:Nm,getScale:bo,isElement:W,isRTL:Bm};function Bl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fm(e,t,o){let r=null,n,s=ut(e);function i(){var u;clearTimeout(n),(u=r)==null||u.disconnect(),r=null}function a(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();let f=e.getBoundingClientRect(),{left:m,top:p,width:y,height:h}=f;if(u||t(),!y||!h)return;let b=Xo(p),v=Xo(s.clientWidth-(m+y)),x=Xo(s.clientHeight-(p+h)),w=Xo(m),R={rootMargin:-b+"px "+-v+"px "+-x+"px "+-w+"px",threshold:rt(0,Nt(1,d))||1},E=!0;function S(N){let M=N[0].intersectionRatio;if(!Bl(f,e.getBoundingClientRect()))return a();if(M!==d){if(!E)return a();M?a(!1,M):n=setTimeout(()=>{a(!1,1e-7)},1e3)}E=!1}try{r=new IntersectionObserver(S,{...R,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,R)}r.observe(e)}let l=le(e),c=()=>a(o);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),i()}}function Qo(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Ps(e),u=n||s?[...c?At(c):[],...t?At(t):[]]:[];u.forEach(b=>{n&&b.addEventListener("scroll",o),s&&b.addEventListener("resize",o)});let d=c&&a?Fm(c,o,s):null,f=-1,m=null;i&&(m=new ResizeObserver(b=>{let[v]=b;v&&v.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),o()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,y=l?Qt(e):null;l&&h();function h(){let b=Qt(e);y&&!Bl(y,b)&&o(),y=b,p=requestAnimationFrame(h)}return o(),()=>{var b;u.forEach(v=>{n&&v.removeEventListener("scroll",o),s&&v.removeEventListener("resize",o)}),d?.(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var Fl=Pl;var Vl=Ol,jl=Sl,Hl=kl;var Wl=_l,Qr=(e,t,o)=>{let r=new Map,n=o??{},s={...Os,...n.platform,_c:r};return Tl(e,t,{...n,platform:s})};var me=g(F(),1),$l=g(F(),1),Yl=g(It(),1),jm=typeof document<"u",Hm=function(){},en=jm?$l.useLayoutEffect:Hm;function tn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,r,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!tn(e[r],t[r]))return!1;return!0}if(n=Object.keys(e),o=n.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,n[r]))return!1;for(r=o;r--!==0;){let s=n[r];if(!(s==="_owner"&&e.$$typeof)&&!tn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function zl(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ul(e,t){let o=zl(e);return Math.round(t*o)/o}function _s(e){let t=me.useRef(e);return en(()=>{t.current=e}),t}function Kl(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:n,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=me.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=me.useState(r);tn(f,r)||m(r);let[p,y]=me.useState(null),[h,b]=me.useState(null),v=me.useCallback(P=>{P!==R.current&&(R.current=P,y(P))},[]),x=me.useCallback(P=>{P!==E.current&&(E.current=P,b(P))},[]),w=s||p,T=i||h,R=me.useRef(null),E=me.useRef(null),S=me.useRef(u),N=l!=null,M=_s(l),O=_s(n),U=_s(c),$=me.useCallback(()=>{if(!R.current||!E.current)return;let P={placement:t,strategy:o,middleware:f};O.current&&(P.platform=O.current),Qr(R.current,E.current,P).then(_=>{let q={..._,isPositioned:U.current!==!1};L.current&&!tn(S.current,q)&&(S.current=q,Yl.flushSync(()=>{d(q)}))})},[f,t,o,O,U]);en(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);let L=me.useRef(!1);en(()=>(L.current=!0,()=>{L.current=!1}),[]),en(()=>{if(w&&(R.current=w),T&&(E.current=T),w&&T){if(M.current)return M.current(w,T,$);$()}},[w,T,$,M,N]);let C=me.useMemo(()=>({reference:R,floating:E,setReference:v,setFloating:x}),[v,x]),I=me.useMemo(()=>({reference:w,floating:T}),[w,T]),A=me.useMemo(()=>{let P={position:o,left:0,top:0};if(!I.floating)return P;let _=Ul(I.floating,u.x),q=Ul(I.floating,u.y);return a?{...P,transform:"translate("+_+"px, "+q+"px)",...zl(I.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:q}},[o,a,I.floating,u.x,u.y]);return me.useMemo(()=>({...u,update:$,refs:C,elements:I,floatingStyles:A}),[u,$,C,I,A])}var ks=(e,t)=>{let o=Fl(e);return{name:o.name,fn:o.fn,options:[e,t]}},As=(e,t)=>{let o=Vl(e);return{name:o.name,fn:o.fn,options:[e,t]}},Is=(e,t)=>({fn:Wl(e).fn,options:[e,t]}),Ds=(e,t)=>{let o=jl(e);return{name:o.name,fn:o.fn,options:[e,t]}},Ns=(e,t)=>{let o=Hl(e);return{name:o.name,fn:o.fn,options:[e,t]}};var on=class{attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,r=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let n=this.attachedStores.length-1;n>=0&&!r;n-=1)r=this.attachedStores[n].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(Ge(99,this.componentName,t,this.componentName));o.setOpen(!0,Z(Y.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,Z(Y.imperativeAction))}};var js=g(F(),1),uc=g(It(),1);var ac=g(F(),1);var sc=g(F(),1),Vs=g(rn(),1),ic=g(ec(),1);var tc=g(F(),1);var Ms=[],Bs;function oc(){return Bs}function rc(e){Ms.push(e)}function Fs(e){let t=(o,r)=>{let n=be(sg).current,s;try{Bs=n;for(let i of Ms)i.before(n);s=e(o,r);for(let i of Ms)i.after(n);n.didInitialize=!0}finally{Bs=void 0}return s};return t.displayName=e.displayName||e.name,t}function nc(e){return tc.forwardRef(Fs(e))}function sg(){return{didInitialize:!1}}var ig=fo(19),ag=ig?cg:ug;function sn(e,t,o,r,n){return ag(e,t,o,r,n)}function lg(e,t,o,r,n){let s=sc.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,Vs.useSyncExternalStore)(e.subscribe,s,s)}rc({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let o=0;o<e.syncHooks.length;o+=1){let r=e.syncHooks[o],n=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,n)||(t=!0,r.value=n)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let o=new Set;for(let n of e.syncHooks)o.add(n.store);let r=[];for(let n of o)r.push(n.subscribe(t));return()=>{for(let n of r)n()}}),(0,Vs.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function cg(e,t,o,r,n){let s=oc();if(!s)return lg(e,t,o,r,n);let i=s.syncIndex;s.syncIndex+=1;let a;return s.didInitialize?(a=s.syncHooks[i],(a.store!==e||a.selector!==t||!Object.is(a.a1,o)||!Object.is(a.a2,r)||!Object.is(a.a3,n))&&(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=o,a.a2=r,a.a3=n,a.value=t(e.getSnapshot(),o,r,n))):(a={store:e,selector:t,a1:o,a2:r,a3:n,value:t(e.getSnapshot(),o,r,n)},s.syncHooks.push(a)),a.value}function ug(e,t,o,r,n){return(0,ic.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,o,r,n))}var an=class{static create(t){return new this(t)}constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;let o=this.updateTick;for(let r of this.listeners){if(o!==this.updateTick)return;r(t)}}update(t){for(let o in t)if(!Object.is(this.state[o],t[o])){this.setState({...this.state,...t});return}}set(t,o){Object.is(this.state[t],o)||this.setState({...this.state,[t]:o})}notifyAll(){let t={...this.state};this.setState(t)}use(t,o,r,n){return sn(this,t,o,r,n)}};var eo=g(F(),1);var Bt=class extends an{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){eo.useDebugValue(t);let r=this;V(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;V(()=>(r.state[t]!==o&&r.set(t,o),()=>{r.set(t,void 0)}),[r,t,o])}useSyncedValues(t){let o=this,r=Object.values(t);V(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){eo.useDebugValue(t);let r=this,n=o!==void 0;V(()=>{n&&!Object.is(r.state[t],o)&&r.setState({...r.state,[t]:o})},[r,t,o,n])}select(t,o,r,n){let s=this.selectors[t];return s(this.state,o,r,n)}useState(t,o,r,n){return eo.useDebugValue(t),sn(this,this.selectors[t],o,r,n)}useContextCallback(t,o){eo.useDebugValue(t);let r=H(o??$e);this.context[t]=r}useStateSetter(t){let o=eo.useRef(void 0);return o.current===void 0&&(o.current=r=>{this.set(t,r)}),o.current}observe(t,o){let r;typeof t=="function"?r=t:r=this.selectors[t];let n=r(this.state);return o(n,n,this),this.subscribe(s=>{let i=r(s);if(!Object.is(n,i)){let a=n;n=i,o(i,a,this)}})}};var fg={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},wo=class extends Bt{constructor(t){let{syncOnly:o,nested:r,onOpenChange:n,triggerElements:s,...i}=t;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:n,dataRef:{current:{}},events:vl(),nested:r,triggerElements:s},fg),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&Ja(o))&&(this.context.dataRef.current.openEvent=t?o:void 0)};dispatchOpenChange=(t,o)=>{this.syncOpenEvent(t,o.event);let r={open:t,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",r)};setOpen=(t,o)=>{if(this.syncOnly){this.context.onOpenChange?.(t,o);return}this.dispatchOpenChange(t,o),this.context.onOpenChange?.(t,o)}};function lc(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:s,onOpenChange:i}=e,a=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),u=t.context.triggerElements,d=i,f=ac.useRef(null);r===void 0&&f.current===null&&(f.current=new wo({open:a,transitionStatus:void 0,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:d,floatingId:n,syncOnly:!0,nested:s}));let m=r??f.current;return t.useSyncedValue("floatingId",n),V(()=>{let p={open:a,floatingId:n,referenceElement:l,floatingElement:c};W(l)&&(p.domReferenceElement=l),m.state.positionReference===m.state.referenceElement&&(p.positionReference=l),m.update(p)},[a,n,l,c,m]),m.context.onOpenChange=d,m.context.nested=s,m}var fc={tabIndex:-1,[ys]:""};function dc(e,t=!1){let o=po(),r=Jr()!=null,n=be(()=>e(o,r)).current;return lc({popupStore:n,treatPopupAsFloatingElement:t,floatingRootContext:n.state.floatingRootContext,floatingId:o,nested:r,onOpenChange:n.setOpen}),n}function pc({handle:e,store:t}){return V(()=>e.attachStore(t),[e,t]),null}function cc(e){let t=e.context.triggerElements.size;e.select("open")&&e.state.triggerCount!==t&&e.set("triggerCount",t)}function dg(e,t){let o=js.useRef(null);return H(r=>{let n=o.current;if(n!==null){if(n.element===r&&n.store===t&&n.id===e)return;o.current=null;let s=n.store;s.context.triggerElements.getById(n.id)===n.element&&(s.context.triggerElements.delete(n.id),cc(s))}r!==null&&e!==void 0&&(o.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),cc(t))})}function pg(e,t,o,r=!1){let n=e.preventUnmountingOnClose;t?n=!1:r&&(n=!0);let s=o?.id??null,i=e.activeTriggerId,a=e.activeTriggerElement;return(s||t)&&(i=s,a=o??null),{open:t,preventUnmountingOnClose:n,activeTriggerId:i,activeTriggerElement:a}}function mg(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function mc(e,t,o,r={}){let n=o.reason,s=n===Y.triggerHover,i=t&&n===Y.triggerFocus,a=!t&&(n===Y.triggerPress||n===Y.escapeKey),l=mg(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let u=pg(e.state,t,o.trigger,l()),d={...r.extraState,...u};i?d.instantType="focus":a?d.instantType="dismiss":s&&(d.instantType=void 0),e.update(d)};s?uc.flushSync(c):c()}function gc(e,t,o,r){let n=o.useState("isMountedByTrigger",e),s=dg(e,o),i=H(l=>{let c=o.select("open"),u=o.select("activeTriggerId");if(u===e){let d={activeTriggerElement:l,...c?r:null};o.update(d);return}if(u==null&&c){let d={activeTriggerId:e??null,activeTriggerElement:l,...r};o.update(d)}}),a=H(l=>{s(l),l&&i(l)});return V(()=>(a(t.current),()=>a(null)),[a,t,o,e]),V(()=>{if(n){let l={activeTriggerElement:t.current,...r};o.update(l)}},[n,o,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:n}}function hc(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,r=js.useRef(null),n=e.useState("open"),s=e.useState("triggerCount"),i=e.useState("activeTriggerId"),a=e.useState("activeTriggerElement");V(()=>{if(!n){r.current=null,e.state.triggerCount!==0&&e.set("triggerCount",0);return}let l=e.context.triggerElements.size,c={};e.state.triggerCount!==l&&(c.triggerCount=l);let u=e.select("activeTriggerId"),d=null;if(u){let f=e.context.triggerElements.getById(u);if(f)r.current=u,f!==e.state.activeTriggerElement&&(c.activeTriggerElement=f);else{for(let[m,p]of e.context.triggerElements.entries())if(p===e.state.activeTriggerElement){c.activeTriggerId=m,c.activeTriggerElement=p,r.current=m;break}c.activeTriggerId===void 0&&(r.current===u?d=u:r.current=null)}}else r.current=null;if(!d&&!u&&l===1){let f=e.context.triggerElements.entries().next();if(!f.done){let[m,p]=f.value;c.activeTriggerId=m,c.activeTriggerElement=p,r.current=m}}(c.triggerCount!==void 0||c.activeTriggerId!==void 0||c.activeTriggerElement!==void 0)&&e.update(c),d&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===d&&!e.context.triggerElements.getById(d)){let f=Z(Y.none);e.setOpen(!1,f),f.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[n,e,s,i,a,o])}function yc(e,t,o,r){let{mounted:n,setMounted:s,transitionStatus:i}=La(e,!1,!1,r),a=t.useState("preventUnmountingOnClose"),l=e?!1:a;t.useSyncedValues({mounted:n,transitionStatus:i,preventUnmountingOnClose:l});let c=H(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)});return Hr({enabled:n&&!e&&!l,open:e,ref:t.context.popupRef,onComplete(){e||c()}}),{forceUnmount:c,transitionStatus:i}}function xc(e,t){e.useSyncedValues(t),V(()=>()=>{e.update({activeTriggerProps:ae,inactiveTriggerProps:ae,popupProps:ae})},[e])}var er=class{constructor(){this.idMap=new Map}add(t,o){this.idMap.set(t,o)}delete(t){this.idMap.delete(t)}hasElement(t){for(let o of this.idMap.values())if(o===t)return!0;return!1}hasMatchingElement(t){for(let o of this.idMap.values())if(t(o))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}};function vc(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new wo({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ae,inactiveTriggerProps:ae,popupProps:ae}}var tr=e=>e.triggerIdProp??e.activeTriggerId,Hs=e=>e.openProp??e.open,bc=e=>(e.popupElement?.id??e.floatingId)||void 0;function wc(e,t){return t!==void 0&&Hs(e)&&tr(e)===t}function gg(e,t){return wc(e,t)?!0:t!==void 0&&Hs(e)&&tr(e)==null&&e.triggerCount===1}var Rc={open:Hs,mounted:e=>e.mounted,transitionStatus:e=>e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:tr,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:bc,isTriggerActive:(e,t)=>t!==void 0&&tr(e)===t,isOpenedByTrigger:(e,t)=>wc(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&tr(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>gg(e,t)?bc(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};var Ws=g(F(),1),Ec=g(rn(),1);function Tc(e){let t=Ws.useCallback(r=>e===void 0?$e:e.subscribeStore(r),[e]),o=Ws.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Ec.useSyncExternalStore)(t,o,()=>e?.serverStore)}function Sc(e){return hg(e,e.rootContext)}function hg(e,t){let{nodeId:o,externalTree:r}=e,n=t.useState("referenceElement"),s=t.useState("floatingElement"),i=t.useState("domReferenceElement"),a=t.useState("open"),l=t.useState("floatingId"),[c,u]=Se.useState(null),[d,f]=Se.useState(void 0),[m,p]=Se.useState(void 0),y=Se.useRef(null),h=Mt(r),b=Se.useMemo(()=>({reference:n,floating:s,domReference:i}),[n,s,i]),v=Kl({...e,elements:{...b,...c&&{reference:c}}}),x=W(d)?d:null,w=m===void 0?t.state.floatingElement:m;t.useSyncedValue("referenceElement",d??null),t.useSyncedValue("domReferenceElement",d===void 0?i:x),t.useSyncedValue("floatingElement",w);let T=Se.useCallback(O=>{let U=W(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u(U),v.refs.setReference(U)},[v.refs]),R=Se.useCallback(O=>{(W(O)||O===null)&&(y.current=O,f(O)),(W(v.refs.reference.current)||v.refs.reference.current===null||O!==null&&!W(O))&&v.refs.setReference(O)},[v.refs,f]),E=Se.useCallback(O=>{p(O),v.refs.setFloating(O)},[v.refs]),S=Se.useMemo(()=>({...v.refs,setReference:R,setFloating:E,setPositionReference:T,domReference:y}),[v.refs,R,E,T]),N=Se.useMemo(()=>({...v.elements,domReference:i}),[v.elements,i]),M=Se.useMemo(()=>({...v,dataRef:t.context.dataRef,open:a,onOpenChange:t.setOpen,events:t.context.events,floatingId:l,refs:S,elements:N,nodeId:o,rootStore:t}),[v,S,N,o,t,a,l]);return V(()=>{i&&(y.current=i)},[i]),V(()=>{t.context.dataRef.current.floatingContext=M;let O=h?.nodesRef.current.find(U=>U.id===o);O&&(O.context=M)}),Se.useMemo(()=>({...v,context:M,refs:S,elements:N,rootStore:t}),[v,S,N,M,t])}var mt=g(F(),1);var Us=Qe.os.mac&&Qe.engine.webkit;function $s(e,t={}){let{enabled:o=!0,delay:r}=t,n="rootStore"in e?e.rootStore:e,{events:s,dataRef:i}=n.context,a=mt.useRef(!1),l=mt.useRef(null),c=mt.useRef(!0),u=et();mt.useEffect(()=>{let f=n.select("domReferenceElement");if(!o)return;let m=le(f);function p(){let b=n.select("domReferenceElement");!n.select("open")&&ve(b)&&b===Wr(we(b))&&(a.current=!0,l.current=b)}function y(){c.current=!0}function h(){c.current=!1}return ot(Q(m,"blur",p),Us&&Q(m,"keydown",y,!0),Us&&Q(m,"pointerdown",h,!0))},[n,o]),mt.useEffect(()=>{if(!o)return;function f(m){if(m.reason===Y.triggerPress||m.reason===Y.escapeKey){let p=n.select("domReferenceElement");W(p)&&(l.current=p,a.current=!0)}}return s.on("openchange",f),()=>{s.off("openchange",f)}},[s,o,n]);let d=mt.useMemo(()=>{function f(){a.current=!1,l.current=null}return{onMouseLeave(){f()},onFocus(m){let p=m.currentTarget;if(a.current){if(l.current===p)return;f()}let y=_e(m.nativeEvent);if(W(y)){if(Us&&!m.relatedTarget){if(!c.current&&!sl(y))return}else if(!il(y))return}let h=Dt(m.relatedTarget,n.context.triggerElements),{nativeEvent:b,currentTarget:v}=m,x=typeof r=="function"?r():r;if(n.select("open")&&h||x===0||x===void 0){n.setOpen(!0,Z(Y.triggerFocus,b,v));return}u.start(x,()=>{a.current||n.setOpen(!0,Z(Y.triggerFocus,b,v))})},onBlur(m){f();let p=m.relatedTarget,y=m.nativeEvent,h=W(p)&&p.hasAttribute(xo("focus-guard"))&&p.getAttribute("data-type")==="outside";u.start(0,()=>{let b=n.select("domReferenceElement"),v=Wr(we(b));!p&&v===b||ee(i.current.floatingContext?.refs.floating.current,v)||ee(b,v)||h||Dt(p??v,n.context.triggerElements)||n.setOpen(!1,Z(Y.triggerFocus,y))})}}},[i,r,n,u]);return mt.useMemo(()=>o?{reference:d,trigger:d}:{},[o,d])}var zs=g(F(),1);var Ys=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ye,this.restTimeout=new Ye,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},ln=new WeakMap;function Ro(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ln.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),ln.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function cn(e,t){let{scopeElement:o,referenceElement:r,floatingElement:n}=t,s=ln.get(o);s&&s!==e&&Ro(s),Ro(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=o,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=n,ln.set(o,e),o.style.pointerEvents="none",r.style.pointerEvents="auto",n.style.pointerEvents="auto"}function Eo(e){let t=e.context.dataRef.current,o=be(()=>t.hoverInteractionState??Ys.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),mo(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ks(e,t={}){let{enabled:o=!0,closeDelay:r=0,nodeId:n}=t,s="rootStore"in e?e.rootStore:e,i=s.useState("open"),a=s.useState("floatingElement"),l=s.useState("domReferenceElement"),{dataRef:c}=s.context,u=Mt(),d=Jr(),f=Eo(s),m=et(),p=H(()=>zr(c.current.openEvent?.type,f.interactedInside)),y=H(()=>al(c.current.openEvent?.type)),h=H(()=>{Ro(f)});V(()=>{i||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,h())},[i,f,h]),zs.useEffect(()=>h,[h]),V(()=>{if(o&&i&&f.handleCloseOptions?.blockPointerEvents&&y()&&W(l)&&a){let b=l,v=a,x=we(a),w=u?.nodesRef.current.find(S=>S.id===d)?.context?.elements.floating;w&&(w.style.pointerEvents="");let T=f.pointerEventsScopeElement!==v?f.pointerEventsScopeElement:null,R=w!==v?w:null,E=f.handleCloseOptions?.getScope?.()??T??R??b.closest("[data-rootownerid]")??x.body;return cn(f,{scopeElement:E,referenceElement:b,floatingElement:v}),()=>{h()}}},[o,i,l,a,f,y,u,d,h]),zs.useEffect(()=>{if(!o)return;function b(){return!!(u&&d&&vt(u.nodesRef.current,d).length>0)}function v(S){let N=tt(r,"close",f.pointerType),M=()=>{s.setOpen(!1,Z(Y.triggerHover,S)),u?.events.emit("floating.closed",S)};N?f.openChangeTimeout.start(N,M):(f.openChangeTimeout.clear(),M())}function x(S){let N=_e(S);if(!vs(N)){f.interactedInside=!1;return}f.interactedInside=N?.closest("[aria-haspopup]")!=null}function w(){f.openChangeTimeout.clear(),m.clear(),u?.events.off("floating.closed",R),h()}function T(S){if(b()&&u){u.events.on("floating.closed",R);return}if(Dt(S.relatedTarget,s.context.triggerElements))return;let N=c.current.floatingContext?.nodeId??n,M=S.relatedTarget;if(!(u&&N&&W(M)&&vt(u.nodesRef.current,N,!1).some(U=>ee(U.context?.elements.floating,M)))){if(f.handler){f.handler(S);return}h(),y()&&!p()&&v(S)}}function R(S){!u||!d||b()||m.start(0,()=>{u.events.off("floating.closed",R),s.setOpen(!1,Z(Y.triggerHover,S)),u.events.emit("floating.closed",S)})}let E=a;return ot(E&&Q(E,"mouseenter",w),E&&Q(E,"mouseleave",T),E&&Q(E,"pointerdown",x,!0),()=>{u?.events.off("floating.closed",R)})},[o,a,s,c,r,n,y,p,h,f,u,d,m])}var Ft=g(F(),1),Cc=g(It(),1);var yg={current:null};function qs(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:l=yg,externalTree:c,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:m,guardStaleOpen:p=!1}=t,y="rootStore"in e?e.rootStore:e,{dataRef:h,events:b}=y.context,v=Mt(c),x=Eo(y),w=Ft.useRef(!1),T=Fe(n),R=Fe(r),E=Fe(i),S=Fe(o),N=Fe(m),M=Fe(f),O=H(()=>zr(h.current.openEvent?.type,x.interactedInside)),U=H(()=>N.current?.()!==!1),$=H((I,A,P)=>{let _=y.context.triggerElements;if(_.hasElement(A))return!I||!ee(I,A);if(!W(P))return!1;let q=P;return _.hasMatchingElement(oe=>ee(oe,q))&&(!I||!ee(I,q))}),L=H(()=>{if(!x.handler)return;we(y.select("domReferenceElement")).removeEventListener("mousemove",x.handler),x.handler=void 0}),C=H(()=>{Ro(x)});return u&&(x.handleCloseOptions=n?.__options),Ft.useEffect(()=>L,[L]),Ft.useEffect(()=>{if(!o)return;function I(A){A.open?w.current=!1:(w.current=A.reason===Y.triggerHover,L(),x.openChangeTimeout.clear(),x.restTimeout.clear(),x.blockMouseMove=!0,x.restTimeoutPending=!1)}return b.on("openchange",I),()=>{b.off("openchange",I)}},[o,b,x,L]),Ft.useEffect(()=>{if(!o)return;function I(z,K=!0){let D=tt(R.current,"close",x.pointerType);D?x.openChangeTimeout.start(D,()=>{y.setOpen(!1,Z(Y.triggerHover,z)),v?.events.emit("floating.closed",z)}):K&&(x.openChangeTimeout.clear(),y.setOpen(!1,Z(Y.triggerHover,z)),v?.events.emit("floating.closed",z))}let A=l.current??(u?y.select("domReferenceElement"):null);if(!W(A))return;function P(z){if(x.openChangeTimeout.clear(),x.blockMouseMove=!1,s&&!bt(x.pointerType))return;let K=ws(E.current),D=tt(R.current,"open",x.pointerType),G=_e(z),B=z.currentTarget??null,se=y.select("domReferenceElement"),ce=B;if(W(G)&&!y.context.triggerElements.hasElement(G)){for(let Ce of y.context.triggerElements.elements())if(ee(Ce,G)){ce=Ce;break}}W(B)&&W(se)&&!y.context.triggerElements.hasElement(B)&&ee(B,se)&&(ce=se);let ie=ce==null?!1:$(se,ce,G),ue=y.select("open"),fe=M.current?.()??y.select("transitionStatus")==="ending",ht=!ue&&fe&&w.current,re=!ie&&W(ce)&&W(se)&&ee(se,ce)&&ht,he=K>0&&!D,ye=ie&&(ue||ht)||re,it=!ue||ie;if(ye){U()&&y.setOpen(!0,Z(Y.triggerHover,z,ce));return}he||(D?x.openChangeTimeout.start(D,()=>{it&&U()&&y.setOpen(!0,Z(Y.triggerHover,z,ce))}):it&&U()&&y.setOpen(!0,Z(Y.triggerHover,z,ce)))}function _(z){if(O()){C();return}L();let K=y.select("domReferenceElement"),D=we(K);x.restTimeout.clear(),x.restTimeoutPending=!1;let G=h.current.floatingContext??d?.();if(Dt(z.relatedTarget,y.context.triggerElements))return;if(T.current&&G){y.select("open")||x.openChangeTimeout.clear();let se=l.current;x.handler=T.current({...G,tree:v,x:z.clientX,y:z.clientY,onClose(){C(),L(),S.current&&!O()&&se===y.select("domReferenceElement")&&I(z,!0)}}),D.addEventListener("mousemove",x.handler),x.handler(z);return}(x.pointerType!=="touch"||!ee(y.select("floatingElement"),z.relatedTarget))&&I(z)}function q(z){ee(A,z.relatedTarget)||(x.openChangeTimeout.clear(),x.restTimeout.clear(),x.restTimeoutPending=!1)}let oe=p?Q(A,"mouseout",q):void 0;return a?ot(Q(A,"mousemove",P,{once:!0}),Q(A,"mouseenter",P),Q(A,"mouseleave",_),oe):ot(Q(A,"mouseenter",P),Q(A,"mouseleave",_),oe)},[L,C,h,R,y,o,T,x,u,$,O,s,a,E,l,v,S,d,M,U,p]),Ft.useMemo(()=>{if(!o)return;function I(A){x.pointerType=A.pointerType}return{onPointerDown:I,onPointerEnter:I,onMouseMove(A){let{nativeEvent:P}=A,_=A.currentTarget,q=y.select("domReferenceElement"),oe=y.select("open"),z=$(q,_,A.target);if(s&&!bt(x.pointerType))return;if(oe&&z&&x.handleCloseOptions?.blockPointerEvents){let G=y.select("floatingElement");if(G){let B=x.handleCloseOptions?.getScope?.()??_.ownerDocument.body;cn(x,{scopeElement:B,referenceElement:_,floatingElement:G})}}let K=ws(E.current);if(oe&&!z||K===0||!z&&x.restTimeoutPending&&A.movementX**2+A.movementY**2<2)return;x.restTimeout.clear();function D(){if(x.restTimeoutPending=!1,O())return;let G=y.select("open");!x.blockMouseMove&&(!G||z)&&U()&&y.setOpen(!0,Z(Y.triggerHover,P,_))}x.pointerType==="touch"?Cc.flushSync(()=>{D()}):z&&oe?D():(x.restTimeoutPending=!0,x.restTimeout.start(K,D))}}},[o,x,O,$,s,y,E,U])}var Pc=.1,xg=Pc*Pc,te=.5;function un(e,t,o,r,n,s){return r>=t!=s>=t&&e<=(n-o)*(t-r)/(s-r)+o}function fn(e,t,o,r,n,s,i,a,l,c){let u=!1;return un(e,t,o,r,n,s)&&(u=!u),un(e,t,n,s,i,a)&&(u=!u),un(e,t,i,a,l,c)&&(u=!u),un(e,t,l,c,o,r)&&(u=!u),u}function bg(e,t,o){return e>=o.x&&e<=o.x+o.width&&t>=o.y&&t<=o.y+o.height}function dn(e,t,o,r,n,s){let i=Math.min(o,n),a=Math.max(o,n),l=Math.min(r,s),c=Math.max(r,s);return e>=i&&e<=a&&t>=l&&t<=c}function Gs(e={}){let{blockPointerEvents:t=!1}=e,o=new Ye,r=({x:n,y:s,placement:i,elements:a,onClose:l,nodeId:c,tree:u})=>{let d=i?.split("-")[0],f=!1,m=null,p=null,y=typeof performance<"u"?performance.now():0;function h(v,x){let w=performance.now(),T=w-y;if(m===null||p===null||T===0)return m=v,p=x,y=w,!1;let R=v-m,E=x-p,S=R*R+E*E,N=T*T*xg;return m=v,p=x,y=w,S<N}function b(){o.clear(),l()}return function(x){o.clear();let w=a.domReference,T=a.floating;if(!w||!T||d==null||n==null||s==null)return;let{clientX:R,clientY:E}=x,S=_e(x),N=x.type==="mouseleave",M=ee(T,S),O=ee(w,S);if(M&&(f=!0,!N))return;if(O&&(f=!1,!N)){f=!0;return}if(N&&W(x.relatedTarget)&&ee(T,x.relatedTarget))return;function U(){return!!(u&&vt(u.nodesRef.current,c).length>0)}function $(){U()||b()}if(U())return;let L=w.getBoundingClientRect(),C=T.getBoundingClientRect(),I=n>C.right-C.width/2,A=s>C.bottom-C.height/2,P=C.width>L.width,_=C.height>L.height,q=(P?L:C).left,oe=(P?L:C).right,z=(_?L:C).top,K=(_?L:C).bottom;if(d==="top"&&s>=L.bottom-1||d==="bottom"&&s<=L.top+1||d==="left"&&n>=L.right-1||d==="right"&&n<=L.left+1){$();return}let D=!1;switch(d){case"top":D=dn(R,E,q,L.top+1,oe,C.bottom-1);break;case"bottom":D=dn(R,E,q,C.top+1,oe,L.bottom-1);break;case"left":D=dn(R,E,C.right-1,K,L.left+1,z);break;case"right":D=dn(R,E,L.right-1,K,C.left+1,z);break;default:}if(D)return;if(f&&!bg(R,E,L)){$();return}if(!N&&h(R,E)){$();return}let G=!1;switch(d){case"top":{let B=P?te/2:te*4,se=P||I?n+B:n-B,ce=P?n-B:I?n+B:n-B,ie=s+te+1,ue=I||P?C.bottom-te:C.top,fe=I?P?C.bottom-te:C.top:C.bottom-te;G=fn(R,E,se,ie,ce,ie,C.left,ue,C.right,fe);break}case"bottom":{let B=P?te/2:te*4,se=P||I?n+B:n-B,ce=P?n-B:I?n+B:n-B,ie=s-te,ue=I||P?C.top+te:C.bottom,fe=I?P?C.top+te:C.bottom:C.top+te;G=fn(R,E,se,ie,ce,ie,C.left,ue,C.right,fe);break}case"left":{let B=_?te/2:te*4,se=_||A?s+B:s-B,ce=_?s-B:A?s+B:s-B,ie=n+te+1,ue=A||_?C.right-te:C.left,fe=A?_?C.right-te:C.left:C.right-te;G=fn(R,E,ue,C.top,fe,C.bottom,ie,se,ie,ce);break}case"right":{let B=_?te/2:te*4,se=_||A?s+B:s-B,ce=_?s-B:A?s+B:s-B,ie=n-te,ue=A||_?C.left+te:C.right,fe=A?_?C.left+te:C.right:C.left+te;G=fn(R,E,ie,se,ie,ce,ue,C.top,fe,C.bottom);break}default:}G?f||o.start(40,$):$()}};return r.__options={...e,blockPointerEvents:t},r}var pn=class extends Bt{setState(t){}update(t){}set(t,o){}notifyAll(){}};function Oc(e){return fo(19)?e:e?"true":void 0}var mn=g(F(),1),Xs=mn.createContext(void 0);function To(){return mn.useContext(Xs)?.direction??"ltr"}var ze=g(F(),1);var vg=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=pt(e,t)||{};if(c==null)return{};let f=Xr(u),m={x:o,y:r},p=Zo(n),y=Jo(p),h=await i.getDimensions(c),b=p==="y",v=b?"top":"left",x=b?"bottom":"right",w=b?"clientHeight":"clientWidth",T=s.reference[y]+s.reference[p]-m[p]-s.floating[y],R=m[p]-s.reference[p],E=d==="real"?await i.getOffsetParent?.(c):a.floating,S=a.floating[w]||s.floating[y];(!S||!await i.isElement?.(E))&&(S=a.floating[w]||s.floating[y]);let N=T/2-R/2,M=S/2-h[y]/2-1,O=Math.min(f[v],M),U=Math.min(f[x],M),$=O,L=S-h[y]-U,C=S/2-h[y]/2+N,I=qr($,C,L),A=!l.arrow&&Xe(n)!=null&&C!==I&&s.reference[y]/2-(C<$?O:U)-h[y]/2<0,P=A?C<$?C-$:C-L:0;return{[p]:m[p]+P,data:{[p]:I,centerOffset:C-I-P,...A&&{alignmentOffset:P}},reset:A}}}),_c=(e,t)=>{let{name:o,fn:r}=vg(e);return{name:o,fn:r,options:[e,t]}};var kc={name:"hide",async fn(e){let{width:t,height:o,x:r,y:n}=e.rects.reference,s=t===0&&o===0&&r===0&&n===0,i=await e.platform.detectOverflow(e,{elementContext:"reference"});return{data:{referenceHidden:i.top-o>=0||i.right-t>=0||i.bottom-o>=0||i.left-t>=0||s}}}};var So={sideX:"left",sideY:"top"};var gn="--available-width",hn="--available-height",Ac="--anchor-width",Ic="--anchor-height",Dc="--transform-origin",Nc="--positioner-width",Lc="--positioner-height";var Bc=gn,Fc=hn;function Hc(e,t,o){let r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?o?"inline-start":"inline-end":"right",bottom:"bottom",left:r?o?"inline-end":"inline-start":"left"}[t]}function Vc(e,t,o){let{rects:r,placement:n}=e;return{side:Hc(t,Te(n),o),align:Xe(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Wc(e){return wg(e,Sc)}function wg(e,t){let{anchor:o,positionMethod:r="absolute",side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:m,keepMounted:p=!1,floatingRootContext:y,mounted:h,collisionAvoidance:b,shift:v,nodeId:x,adaptiveOrigin:w,lazyFlip:T=!1,externalTree:R}=e,[E,S]=ze.useState(null);!h&&E!==null&&S(null);let N=b.side||"flip",M=b.align||"flip",O=b.fallbackAxisSide||"end",U=v?.crossAxis??!1,$=v?.rootBoundary,L=typeof o=="function"?o:void 0,C=H(L),I=L?C:o,A=Fe(o),P=Fe(h),q=To()==="rtl",oe=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":q?"left":"right","inline-start":q?"right":"left"}[n],z=i==="center"?oe:`${oe}-${i}`,K=c;typeof K=="number"?K={top:K,right:K,bottom:K,left:K}:K&&(K={top:K.top||0,right:K.right||0,bottom:K.bottom||0,left:K.left||0});let D=1,G=n==="bottom"?D:0,B=n==="top"?D:0,se=n==="right"?D:0,ce=n==="left"?D:0,ie={boundary:l==="clipping-ancestors"?"clippingAncestors":l,padding:K},ue=ze.useRef(null),fe=Fe(s),ht=Fe(a),re=typeof s!="function"?s:0,he=typeof a!="function"?a:0,ye=[];m&&ye.push(m),ye.push(ks(J=>{let We=Vc(J,n,q),Ke=typeof fe.current=="function"?fe.current(We):fe.current,Ne=typeof ht.current=="function"?ht.current(We):ht.current;return{mainAxis:Ke,crossAxis:Ne,alignmentAxis:Ne}},[re,he,q,n]));let it=M==="none"&&N!=="shift",Ce=!it&&(u||U||N==="shift"),ro=N==="none"?null:Ds({...ie,padding:{top:K.top+D+G,right:K.right+D+ce,bottom:K.bottom+D+B,left:K.left+D+se},mainAxis:!U&&N==="flip",crossAxis:M==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),yt=it?null:As({...ie,rootBoundary:$,mainAxis:M!=="none",crossAxis:Ce,limiter:u||U?void 0:Is(J=>{if(!ue.current)return{};let{width:We,height:Ke}=ue.current.getBoundingClientRect(),Ne=Ve(Te(J.placement)),Pt=Ne==="y"?We:Ke,Ze=Ne==="y"?K.left+K.right:K.top+K.bottom;return{offset:Pt/2+Ze/2}})},[ie,u,U,$,K,M]);N==="shift"||M==="shift"||i==="center"?ye.push(yt,ro):ye.push(ro,yt),ye.push(Ns({...ie,apply({elements:{floating:J},availableWidth:We,availableHeight:Ke,rects:Ne}){if(!P.current)return;let Pt=J.style;Pt.setProperty(Bc,`${We}px`),Pt.setProperty(Fc,`${Ke}px`);let Ze=le(J).devicePixelRatio||1,{x:wr,y:so,width:Rr,height:Ot}=Ne.reference,No=(Math.round((wr+Rr)*Ze)-Math.round(wr*Ze))/Ze,Lo=(Math.round((so+Ot)*Ze)-Math.round(so*Ze))/Ze;Pt.setProperty(Ac,`${No}px`),Pt.setProperty(Ic,`${Lo}px`)}}),_c(J=>({element:ue.current||we(J.elements.floating).createElement("div"),padding:ue.current?d:0,offsetParent:"floating"}),[d]),{name:"transformOrigin",fn(J){let{elements:{floating:We},middlewareData:Ke,placement:Ne,platform:Pt,rects:Ze,y:wr}=J,so=Te(Ne),Rr=Xe(Ne),Ot=Ve(so)==="y",No=ue.current,Lo=typeof s=="function"?s(Vc(J,n,q)):s,Er;if(!No&&Rr&&Math.abs(Ot?Ke.shift?.x||0:Ke.shift?.y||0)<=1)Er=Rr==="start"===(Ot&&Pt.isRTL?.(We)===!0)?"100%":"0%";else{let rd=Ot?Ke.arrow?.x||0:Ke.arrow?.y||0,nd=Ot?No?.clientWidth||0:No?.clientHeight||0;Er=`${rd+nd/2}px`}let Un=so==="top"||so==="left"?`calc(100% + ${Lo}px)`:`${-Lo}px`;return Ce&&Ot&&Math.abs(Ke.shift?.y||0)>Lo&&(Un=`${Ze.reference.y+Ze.reference.height/2-wr}px`),We.style.setProperty(Dc,Ot?`${Er} ${Un}`:`${Un} ${Er}`),{}}},kc,w),V(()=>{!h&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,y]);let at=ze.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Rt,elements:Ut,x:mr,y:gr,middlewareData:Et,update:k,placement:j,context:Ee,isPositioned:de,floatingStyles:Tt}=t({rootContext:y,open:p?h:void 0,placement:z,middleware:ye,strategy:r,whileElementsMounted:p?void 0:(...J)=>Qo(...J,at),nodeId:x,externalTree:R}),{sideX:Do,sideY:St}=Et.adaptiveOrigin||So,Pe=de?r:"fixed",no=ze.useMemo(()=>{let J;return de?w?J={position:Pe,[Do]:mr,[St]:gr}:J={...Tt,position:Pe}:J={position:Pe,top:0,left:0},J[Bc]="100vw",J[Fc]="100vh",de||(J.opacity=0),J},[w,Pe,Do,mr,St,gr,Tt,de]),$t=ze.useRef(null);V(()=>{if(!h)return;let J=A.current,We=typeof J=="function"?J():J,Ne=(jc(We)?We.current:We)||null||null;Ne!==$t.current&&(Rt.setPositionReference(Ne),$t.current=Ne)},[h,Rt,I,A]),ze.useEffect(()=>{if(!h)return;let J=A.current;typeof J!="function"&&jc(J)&&J.current!==$t.current&&(Rt.setPositionReference(J.current),$t.current=J.current)},[h,Rt,I,A]),ze.useEffect(()=>{if(p&&h&&Ut.reference&&Ut.floating)return Qo(Ut.reference,Ut.floating,k,at)},[p,h,Ut,k,at]);let Ct=Te(j),hr=Hc(n,Ct,q),yr=Xe(j)||"center",xr=!!Et.hide?.referenceHidden;V(()=>{T&&h&&de&&Ct!==oe&&S(Ct)},[T,h,de,Ct,oe]);let br=ze.useMemo(()=>({position:"absolute",top:Et.arrow?.y,left:Et.arrow?.x}),[Et.arrow]),vr=Et.arrow?.centerOffset!==0;return ze.useMemo(()=>({positionerStyles:no,arrowStyles:br,arrowRef:ue,arrowUncentered:vr,side:hr,align:yr,physicalSide:Ct,anchorHidden:xr,refs:Rt,context:Ee,isPositioned:de,update:k}),[no,br,ue,vr,hr,yr,Ct,xr,Rt,Ee,de,k])}function jc(e){return e!=null&&"current"in e}function yn(e){return e==="starting"?gl:ae}function Uc(e,t,{styles:o,transitionStatus:r,props:n,refs:s,hidden:i,inert:a=!1}){let l={...o};return a&&(l.pointerEvents="none"),Be("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},yn(r),n],stateAttributesMapping:Ko})}var Re=g(F(),1),eu=g(It(),1);var $c=g(F(),1);function Yc(e){let[t,o]=$c.useState({current:e,previous:null});return Object.is(e,t.current)||o({current:e,previous:t.current}),t.previous}var Co=g(F(),1);function Js(e){let t=Oe(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=ve(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r;return(Lt(o)!==s||Lt(r)!==i)&&(o=s,r=i),{width:o,height:r}}var or="--popup-width",rr="--popup-height";function qc(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,onMeasureLayout:s,onMeasureLayoutComplete:i,side:a,direction:l}=e,c=yo(t,!0),u=go(),d=Co.useRef(null),f=Co.useRef(!0),m=Co.useRef($e),p=H(s),y=H(i),h=Co.useMemo(()=>Rg(a,l),[a,l]);V(()=>{if(!n){m.current=$e,f.current=!0,d.current=null;return}if(!t||!o)return;m.current=Kc(t,h),Zs(t,"auto");let b=bn(t,"position","static"),v=bn(t,"transform","none"),x=bn(t,"scale","1"),w=Kc(o,{[gn]:"max-content",[hn]:"max-content"});function T(){b(),v(),w()}function R(){T(),x()}if(p?.(),f.current||d.current===null){xn(o,"max-content");let M=Js(t);return d.current=M,xn(o,M),R(),y?.(null,M),f.current=!1,()=>{m.current(),m.current=$e}}xn(o,"max-content");let E=d.current,S=Js(t);d.current=S,Zs(t,E),R(),y?.(E,S),xn(o,S);let N=new AbortController;return u.request(()=>{Zs(t,S),c(()=>{t.style.setProperty(or,"auto"),t.style.setProperty(rr,"auto")},N.signal)}),()=>{N.abort(),u.cancel(),m.current(),m.current=$e}},[r,t,o,c,u,n,p,y,h])}function Rg(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?ae:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}function bn(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function Kc(e,t){let o=[];for(let[r,n]of Object.entries(t))o.push(bn(e,r,n));return o.length?()=>{o.forEach(r=>r())}:$e}function Zs(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(or,o),e.style.setProperty(rr,r)}function xn(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(Nc,o),e.style.setProperty(Lc,r)}var Gc=g(F(),1);var Xc=g(X(),1),vn=function(t){let{direction:o="ltr"}=t,r=Gc.useMemo(()=>({direction:o}),[o]);return(0,Xc.jsx)(Xs.Provider,{value:r,children:t.children})};var Jc={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:s,strategy:i,placement:a}=e,l=le(n),c=l.getComputedStyle(n);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:So};let d=await s.getOffsetParent?.(n),f={width:0,height:0};if(i==="fixed"&&l?.visualViewport)f={width:l.visualViewport.width,height:l.visualViewport.height};else if(d===l){let v=we(n);f={width:v.documentElement.clientWidth,height:v.documentElement.clientHeight}}else await s.isElement?.(d)&&(f=await s.getDimensions(d));let m=Te(a),p=t,y=o;m==="left"&&(p=f.width-(t+r.width)),m==="top"&&(y=f.height-(o+r.height));let h=m==="left"?"right":So.sideX,b=m==="top"?"bottom":So.sideY;return{x:p,y,data:{sideX:h,sideY:b}}}};var Zc="data-activation-direction";var Po=g(X(),1),tu={activationDirection:e=>e?{[Zc]:e}:null};function ou(e){let{store:t,side:o,children:r}=e,n=To(),s=t.useState("activeTriggerElement"),i=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),c=t.useState("mounted"),u=t.useState("popupElement"),d=t.useState("positionerElement"),f=Yc(a?s:null),m=Cg(i,l),p=Re.useRef(null),[y,h]=Re.useState(null),[b,v]=Re.useState(null),x=Re.useRef(null),w=Re.useRef(null),T=yo(x,!0),R=go(),E=Re.useRef(null),[S,N]=Re.useState(null),[M,O]=Re.useState(!1);V(()=>(t.set("adaptiveOrigin",Jc),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let U=H(()=>{x.current?.style.setProperty("animation","none"),x.current?.style.setProperty("transition","none"),w.current?.style.setProperty("display","none")}),$=H(_=>{x.current?.style.removeProperty("animation"),x.current?.style.removeProperty("transition"),w.current?.style.removeProperty("display"),_&&N(_)}),L=H(()=>{E.current?.abort();let _=new AbortController;E.current=_,T(()=>{h(null),N(null),p.current=null},_.signal)}),C=Re.useRef(null);V(()=>{(!a||!c)&&(C.current=null)},[a,c]),V(()=>{if(s&&f&&s!==f&&C.current!==s&&p.current){h(p.current),O(!0);let _=Sg(f,s);v(_),C.current=s}},[s,f]),V(()=>{y!=null&&(E.current?.abort(),O(!0),R.request(()=>{eu.flushSync(()=>{O(!1)}),L()}))},[m,y,L,R]),V(()=>{let _=x.current;if(!_)return;let q=we(_).createElement("div");for(let oe of Array.from(_.childNodes))q.appendChild(oe.cloneNode(!0));p.current=q});let I=y!=null,A;I?A=(0,Po.jsxs)(Re.Fragment,{children:[(0,Po.jsx)("div",{"data-previous":!0,inert:Oc(!0),ref:w,style:{...S?{[or]:`${S.width}px`,[rr]:`${S.height}px`}:null,position:"absolute"},"data-ending-style":M?void 0:""},"previous"),(0,Po.jsx)("div",{"data-current":!0,ref:x,"data-starting-style":M?"":void 0,children:r},m)]}):A=(0,Po.jsx)("div",{"data-current":!0,ref:x,children:r},m),V(()=>{let _=w.current;!_||!y||_.replaceChildren(...Array.from(y.childNodes))},[y]),qc({popupElement:u,positionerElement:d,mounted:c,content:l,onMeasureLayout:U,onMeasureLayoutComplete:$,side:o,direction:n});let P={activationDirection:Tg(b),transitioning:I};return{children:A,state:P}}function Tg(e){if(e)return`${Qc(e.horizontal,5,"right","left")} ${Qc(e.vertical,5,"down","up")}`}function Qc(e,t,o,r){return e>t?o:e<-t?r:""}function Sg(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),n={x:o.left+o.width/2,y:o.top+o.height/2},s={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:s.x-n.x,vertical:s.y-n.y}}function Cg(e,t){let[o,r]=Re.useState(0),n=Re.useRef(e),s=Re.useRef(t),i=Re.useRef(!1);return V(()=>{let a=n.current,l=s.current,c=e!==a,u=t!==l;c?(r(d=>d+1),i.current=!u):i.current&&u&&(r(d=>d+1),i.current=!1),n.current=e,s.current=t},[e,t]),`${e??"current"}-${o}`}var wn=g(F(),1),ru=g(It(),1);var nu=g(X(),1),su=wn.forwardRef(function(t,o){let{children:r,container:n,className:s,render:i,style:a,...l}=t,{node:c,subtree:u}=bl({container:n,ref:o,componentProps:t,elementProps:l});return!u&&!c?null:(0,nu.jsxs)(wn.Fragment,{children:[u,c&&ru.createPortal(r,c)]})});var He={};Le(He,{Arrow:()=>Tu,Handle:()=>sr,Popup:()=>Ru,Portal:()=>xu,Positioner:()=>vu,Provider:()=>Cu,Root:()=>fu,Trigger:()=>gu,Viewport:()=>Ou,createHandle:()=>_u});var Oo=g(F(),1);var Rn=g(F(),1),Qs=Rn.createContext(void 0);function Je(e){let t=Rn.useContext(Qs);if(t===void 0&&!e)throw new Error(Ge(72));return t}var iu=g(F(),1);var au={...Rc,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},En=class extends Bt{constructor(t,o,r){let n=new er;super(cu(t,n,o,r),uu(n),au)}setOpen=(t,o)=>{mc(this,t,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Z(Y.triggerPress,t))}};function lu(){let e=new er,t=new pn(Object.freeze(cu(void 0,e)),Object.freeze(uu(e)),au);return Object.assign(t,{setOpen:$e,cancelPendingOpen:$e})}function cu(e,t,o,r=!1){return{...vc(t,o,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function uu(e){return{popupRef:iu.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var nr=g(X(),1),fu=Fs(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:f=null,children:m}=t,p=dc((O,U)=>new En({open:r,openProp:n,activeTriggerId:f,triggerIdProp:d},O,U));p.useControlledProp("openProp",n),p.useControlledProp("triggerIdProp",d),p.useContextCallback("onOpenChange",l),p.useContextCallback("onOpenChangeComplete",c);let y=p.useState("open"),h=!o&&y,b=p.useState("activeTriggerId"),v=p.useState("mounted"),x=p.useState("payload");p.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s,disabled:o}),hc(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:w,transitionStatus:T}=yc(h,p),R=p.useState("isInstantPhase"),E=p.useState("instantType"),S=p.useState("lastOpenChangeReason"),N=Oo.useRef(null);V(()=>{y&&o&&p.setOpen(!1,Z(Y.disabled))},[y,o,p]),V(()=>{T==="ending"&&S===Y.none||T!=="ending"&&R?(E!=="delay"&&(N.current=E),p.set("instantType","delay")):N.current!==null&&(p.set("instantType",N.current),N.current=null)},[T,R,S,E,p]),V(()=>{h&&b==null&&p.set("payload",void 0)},[p,b,h]),Oo.useImperativeHandle(a,()=>({unmount:w,close:()=>p.setOpen(!1,Z(Y.imperativeAction))}),[w,p]);let M=h||v||!o&&i!=="none";return(0,nr.jsxs)(Qs.Provider,{value:p,children:[u&&(0,nr.jsx)(pc,{handle:u,store:p}),M&&(0,nr.jsx)(Pg,{store:p,disabled:o,trackCursorAxis:i}),typeof m=="function"?m({payload:x}):m]})});function Pg({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=Ss(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=Ts(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),i=Oo.useMemo(()=>zt(s.reference,n.reference),[s.reference,n.reference]);return xc(e,{activeTriggerProps:i,inactiveTriggerProps:i,popupProps:n.floating??ae}),null}var Sn=g(F(),1);var Tn=g(F(),1),ei=Tn.createContext(void 0);function du(){return Tn.useContext(ei)}var mu="data-base-ui-tooltip-trigger";function pu(e){if("composedPath"in e){let o=e.composedPath();for(let r=0;r<o.length;r+=1){let n=o[r];if(W(n))return n}}let t=e.target;return W(t)?t:null}function Og(e){let t=e;for(;t;){let o=t.closest(`[${mu}]`);if(o)return o;let r=t.getRootNode();t="host"in r&&W(r.host)?r.host:null}return null}var gu=nc(function(t,o){let{render:r,className:n,style:s,handle:i,payload:a,disabled:l,delay:c,closeOnClick:u=!0,closeDelay:d,id:f,...m}=t,p=Je(!0),h=Tc(i)??p;if(!h)throw new Error(Ge(82));let b=Da(f),v=h.useState("isTriggerActive",b),x=h.useState("isOpenedByTrigger",b),w=h.useState("floatingRootContext"),T=Sn.useRef(null),R=d??0,{registerTrigger:E,isMountedByThisTrigger:S}=gc(b,T,h,{payload:a,closeOnClick:u,closeDelay:R}),N=du(),{activeIdRef:M,delayRef:O,isInstantPhase:U,hasProvider:$}=Es(w,{open:x}),L=Eo(w);h.useSyncedValue("isInstantPhase",U);let C=h.useState("disabled"),I=l??C,A=Fe(I),P=h.useState("trackCursorAxis"),_=h.useState("disableHoverablePopup"),q=Sn.useRef(!1),oe=et(),z=Sn.useRef(void 0);function K(){return $&&M.current!=null?0:c??N??600}function D(re){let he=T.current;if(!he||!re)return!1;let ye=Og(re);return ye!==null&&ye!==he&&ee(he,ye)}function G(re){let he=D(re);return q.current=he,he&&(L.openChangeTimeout.clear(),L.restTimeout.clear(),L.restTimeoutPending=!1,oe.clear()),he}let B=qs(w,{enabled:!I,mouseOnly:!0,move:!1,handleClose:!_&&P!=="both"?Gs():null,restMs:K,delay(){return d==null&&$?{close:tt(O.current,"close")}:{close:R}},triggerElementRef:T,isActiveTrigger:v,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!q.current}}),se=$s(w,{enabled:!I}).reference,ce=re=>{let he=q.current,ye=pu(re),it=G(ye),Ce=T.current,ro=Ce&&ye&&ee(Ce,ye);if(it&&h.select("open")&&h.select("lastOpenChangeReason")===Y.triggerHover){h.setOpen(!1,Z(Y.triggerHover,re));return}if(he&&!it&&ro&&!A.current&&!h.select("open")&&Ce&&bt(z.current)){let yt=()=>{!q.current&&!A.current&&!h.select("open")&&h.setOpen(!0,Z(Y.triggerHover,re,Ce))},at=K();at===0?(oe.clear(),yt()):oe.start(at,yt)}},ie=h.useState("triggerProps",S);return Be("button",t,{state:{open:x},ref:[o,E,T],props:[B,se,S||P!=="none"?ie:void 0,{onMouseOver(re){ce(re.nativeEvent)},onFocus(re){D(pu(re.nativeEvent))&&re.preventBaseUIHandler()},onMouseLeave(){q.current=!1,oe.clear(),z.current=void 0},onPointerEnter(re){z.current=re.pointerType},onPointerDown(re){z.current=re.pointerType,h.set("closeOnClick",u),u&&!h.select("open")&&h.cancelPendingOpen(re.nativeEvent)},onClick(re){u&&!h.select("open")&&h.cancelPendingOpen(re.nativeEvent)},id:b,[qo]:I?"":void 0,[mu]:I?void 0:""},m],stateAttributesMapping:tl})});var yu=g(F(),1);var Cn=g(F(),1),ti=Cn.createContext(void 0);function hu(){let e=Cn.useContext(ti);if(e===void 0)throw new Error(Ge(70));return e}var oi=g(X(),1),xu=yu.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Je().useState("mounted")||r?(0,oi.jsx)(ti.Provider,{value:r,children:(0,oi.jsx)(su,{ref:o,...n})}):null});var On=g(F(),1);var Pn=g(F(),1),ri=Pn.createContext(void 0);function _o(){let e=Pn.useContext(ri);if(e===void 0)throw new Error(Ge(71));return e}var bu=g(X(),1),vu=On.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:m=5,sticky:p=!1,disableAnchorTracking:y=!1,collisionAvoidance:h=hl,style:b,...v}=t,x=Je(),w=hu(),T=x.useState("open"),R=x.useState("mounted"),E=x.useState("trackCursorAxis"),S=x.useState("disableHoverablePopup"),N=x.useState("floatingRootContext"),M=x.useState("instantType"),O=x.useState("transitionStatus"),U=x.useState("adaptiveOrigin"),$=Wc({anchor:s,positionMethod:i,floatingRootContext:N,mounted:R,side:a,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:p,arrowPadding:m,disableAnchorTracking:y,keepMounted:w,collisionAvoidance:h,adaptiveOrigin:U}),L=On.useMemo(()=>({open:T,side:$.side,align:$.align,anchorHidden:$.anchorHidden,instant:E!=="none"?"tracking-cursor":M}),[T,$.side,$.align,$.anchorHidden,E,M]),C=Uc(t,L,{styles:$.positionerStyles,transitionStatus:O,props:v,refs:[o,x.useStateSetter("positionerElement")],hidden:!R,inert:!T||E==="both"||S});return(0,bu.jsx)(ri.Provider,{value:$,children:C})});var wu=g(F(),1);var Ru=wu.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Je(),{side:l,align:c}=_o(),u=a.useState("open"),d=a.useState("instantType"),f=a.useState("transitionStatus"),m=a.useState("popupProps"),p=a.useState("floatingRootContext"),y=a.useState("disabled"),h=a.useState("closeDelay");Hr({open:u,ref:a.context.popupRef,onComplete(){u&&a.context.onOpenChangeComplete?.(!0)}}),Ks(p,{enabled:!y,closeDelay:h});let b=a.useStateSetter("popupElement");return Be("div",t,{state:{open:u,side:l,align:c,instant:d,transitionStatus:f},ref:[o,a.context.popupRef,b],props:[fc,m,yn(f),i],stateAttributesMapping:ol})});var Eu=g(F(),1);var Tu=Eu.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Je(),{arrowRef:l,side:c,align:u,arrowUncentered:d,arrowStyles:f}=_o(),m=a.useState("open"),p=a.useState("instantType");return Be("div",t,{state:{open:m,side:c,align:u,uncentered:d,instant:p},ref:[o,l],props:[{style:f,"aria-hidden":!0},i],stateAttributesMapping:Ko})});var Su=g(F(),1);var ni=g(X(),1),Cu=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,s=Su.useMemo(()=>({open:o,close:r}),[o,r]);return(0,ni.jsx)(ei.Provider,{value:o,children:(0,ni.jsx)(Rs,{delay:s,timeoutMs:n,children:t.children})})};var Pu=g(F(),1);var Ou=Pu.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...a}=t,l=Je(),c=_o(),u=l.useState("instantType"),{children:d,state:f}=ou({store:l,side:c.side,children:i}),m={activationDirection:f.activationDirection,transitioning:f.transitioning,instant:u};return Be("div",t,{state:m,ref:o,props:[a,{children:d}],stateAttributesMapping:tu})});var sr=class extends on{constructor(){super(lu(),"Tooltip")}open(t){this.openByTrigger(t)}close(){this.closePopup()}get isOpen(){return this.attachedStore?.select("open")??!1}};function _u(){return new sr}function ku(e){return Be(e.defaultTagName??"div",e,e)}var ko={};Le(ko,{Popup:()=>Ju,Portal:()=>_n,Positioner:()=>kn,Provider:()=>af,Root:()=>nf,Trigger:()=>ef});var Gu=g(Ue(),1);var Lu=g(Ue(),1);var ii="data-wp-hash";function ai(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&kg(document)),e.__wpStyleRuntime}function _g(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ii}]`))if(o.getAttribute(ii)===t)return!0;return!1}function Iu(e,t,o){if(!e.head)return;let r=ai(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(_g(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(ii,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function kg(e){let t=ai();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Iu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Ag(e,t){let o=ai();o.styles.set(e,t);for(let r of o.documents.keys())Iu(r,e,t)}typeof process>"u",Ag("be37f31c1e","._11fc52b637ff8a7e__slot{inset:0;isolation:isolate;pointer-events:none;position:fixed;z-index:1000000003}@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._11fc52b637ff8a7e__slot>*{pointer-events:auto}}}");var Au={slot:"_11fc52b637ff8a7e__slot"},Du="data-wp-compat-overlay-slot";function Ig(){return typeof document>"u"?null:document}function Dg(){let e;try{e=window.top?.wp}catch{}let t=e??window.wp;return typeof t?.components=="object"&&t.components!==null}var gt=null;function si(e){return e.setAttribute("aria-hidden","false"),e}function Ng(e){let t=e.createElement("div");return t.setAttribute(Du,""),Au.slot&&t.classList.add(Au.slot),e.body.appendChild(t),t}function Nu(){if(typeof window>"u"||!Dg()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=Ig();if(!e||!e.body)return;if(gt&&gt.ownerDocument===e&&gt.isConnected)return si(gt);let t=e.querySelector(`[${Du}]`);return t instanceof HTMLDivElement?(gt=si(t),gt):(gt?.isConnected&&gt.remove(),gt=si(Ng(e)),gt)}var Mu=g(X(),1),_n=(0,Lu.forwardRef)(function({container:t,...o},r){return(0,Mu.jsx)(He.Portal,{container:t??Nu(),...o,ref:r})});var Bu=g(Ue(),1),ju=g(X(),1),li="data-wp-hash";function ci(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Mg(document)),e.__wpStyleRuntime}function Lg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${li}]`))if(o.getAttribute(li)===t)return!0;return!1}function Fu(e,t,o){if(!e.head)return;let r=ci(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Lg(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(li,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function Mg(e){let t=ci();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Fu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Vu(e,t){let o=ci();o.styles.set(e,t);for(let r of o.documents.keys())Fu(r,e,t)}typeof process>"u",Vu("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var Bg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",Vu("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var Fg={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},kn=(0,Bu.forwardRef)(function({align:t="center",className:o,side:r="top",sideOffset:n=4,...s},i){return(0,ju.jsx)(He.Positioner,{ref:i,align:t,side:r,sideOffset:n,...s,className:uo(Bg["box-sizing"],Fg.positioner,o)})});var Hu=g(Ue(),1);function ui(e,t,o){return(0,Hu.cloneElement)(e??t,{children:o})}var Vg=g(Uu(),1);var zu=g(Yu(),1),{lock:tS,unlock:Ku}=(0,zu.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/ui");function jg(){let e=Vg;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return Ku(e.privateApis).ThemeProvider}var qu=jg();var ir=g(X(),1),fi="data-wp-hash";function di(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Wg(document)),e.__wpStyleRuntime}function Hg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${fi}]`))if(o.getAttribute(fi)===t)return!0;return!1}function Xu(e,t,o){if(!e.head)return;let r=di(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(Hg(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(fi,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function Wg(e){let t=di();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Xu(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function Ug(e,t){let o=di();o.styles.set(e,t);for(let r of o.documents.keys())Xu(r,e,t)}typeof process>"u",Ug("19fcc06039",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._480b748dd3510e64__positioner{z-index:var(--wp-ui-tooltip-z-index,initial)}._50096b232db7709d__popup{--_wp-ui-elevation-sm:0 1px 2px rgba(0,0,0,.05),0 2px 3px rgba(0,0,0,.04),0 6px 6px rgba(0,0,0,.03),0 8px 8px rgba(0,0,0,.02);background-color:var(--wpds-color-background-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--_wp-ui-elevation-sm);color:var(--wpds-color-foreground-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-sm,12px);line-height:1.4;padding:var(--wpds-dimension-padding-xs,4px) var(--wpds-dimension-padding-sm,8px);@media (forced-colors:active){border-bottom-color:CanvasText;border-bottom-style:solid;border-bottom-width:1px;border-left-color:CanvasText;border-left-style:solid;border-left-width:1px;border-right-color:CanvasText;border-right-style:solid;border-right-width:1px;border-top-color:CanvasText;border-top-style:solid;border-top-width:1px}}}}');var $g={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},Yg={background:"#1e1e1e"},Ju=(0,Gu.forwardRef)(function({portal:t,positioner:o,children:r,className:n,...s},i){let a=(0,ir.jsx)(qu,{color:Yg,children:(0,ir.jsx)(He.Popup,{ref:i,className:uo($g.popup,n),...s,children:r})}),l=ui(o,(0,ir.jsx)(kn,{}),a);return ui(t,(0,ir.jsx)(_n,{}),l)});var Zu=g(Ue(),1),Qu=g(X(),1),ef=(0,Zu.forwardRef)(function(t,o){return(0,Qu.jsx)(He.Trigger,{ref:o,...t})});var tf=g(Me(),1),of=g(X(),1);function rf({children:e}){return(0,of.jsx)(vn,{direction:(0,tf.isRTL)()?"rtl":"ltr",children:e})}var pi=g(X(),1);function nf(e){return(0,pi.jsx)(rf,{children:(0,pi.jsx)(He.Root,{...e})})}var sf=g(X(),1);function af({...e}){return(0,sf.jsx)(He.Provider,{...e})}var An=g(Ue(),1),ar=(0,An.forwardRef)(({icon:e,size:t=24,style:o,...r},n)=>{let s=e.props.style,i=s||o?{...s,...o}:void 0;return(0,An.cloneElement)(e,{width:t,height:t,...r,...i?{style:i}:{},ref:n})});var Dn=g(In(),1),mi=g(X(),1),gi=(0,mi.jsx)(Dn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,mi.jsx)(Dn.Path,{d:"M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z",vectorEffect:"non-scaling-stroke"})});var Nn=g(In(),1),hi=g(X(),1),yi=(0,hi.jsx)(Nn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,hi.jsx)(Nn.Path,{d:"M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z",fill:"currentColor",vectorEffect:"non-scaling-stroke"})});var lr=g(In(),1),cr=g(X(),1),xi=(0,cr.jsxs)(lr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:[(0,cr.jsx)(lr.Path,{d:"M12 5.71576L13.6106 8.97924C13.7563 9.27438 14.0379 9.47895 14.3636 9.52628L17.965 10.0496L15.359 12.5899C15.1233 12.8196 15.0157 13.1506 15.0714 13.475L15.6866 17.0619L12.4653 15.3684C12.174 15.2152 11.826 15.2152 11.5347 15.3684L8.31341 17.0619L8.92861 13.475C8.98425 13.1506 8.8767 12.8196 8.64102 12.5899L6.03497 10.0496L9.63644 9.52628C9.96215 9.47895 10.2437 9.27438 10.3894 8.97924L12 5.71576Z",vectorEffect:"non-scaling-stroke"}),(0,cr.jsx)(lr.Path,{d:"M11.4653 15.4048C11.7941 15.232 12 14.8912 12 14.5197V5.71576L10.3894 8.97924C10.2437 9.27438 9.96215 9.47895 9.63644 9.52628L6.03497 10.0496L8.64102 12.5899C8.8767 12.8196 8.98425 13.1506 8.92861 13.475L8.31341 17.0619L11.4653 15.4048Z",fill:"currentColor",stroke:"none"})]});var cf=g(Ue(),1),bi="data-wp-hash";function vi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&Kg(document)),e.__wpStyleRuntime}function zg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${bi}]`))if(o.getAttribute(bi)===t)return!0;return!1}function uf(e,t,o){if(!e.head)return;let r=vi(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(zg(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(bi,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function Kg(e){let t=vi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)uf(e,o,r);return()=>{let o=t.documents.get(e);if(o!==void 0){if(o<=1){t.documents.delete(e);return}t.documents.set(e,o-1)}}}function qg(e,t){let o=vi();o.styles.set(e,t);for(let r of o.documents.keys())uf(r,e,t)}typeof process>"u",qg("f4df7461e9","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.f37b9e2e191ebd66__visually-hidden{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal;padding:0;position:absolute;width:1px;word-break:normal}}}");var Gg={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},wi=(0,cf.forwardRef)(function({render:t,...o},r){return ku({render:t,ref:r,props:zt({className:Gg["visually-hidden"]},o,{"data-visually-hidden":""})})});var Ln=g(Me(),1);var Ao=g(X(),1);function Xg({rating:e}){let t=Math.round(e/.5)*.5,o=Math.floor(e),r=Math.ceil(e-o),n=5-(o+r);return(0,Ao.jsxs)("span",{"aria-label":(0,Ln.sprintf)((0,Ln.__)("%s out of 5 stars"),t),children:[Array.from({length:o}).map((s,i)=>(0,Ao.jsx)(ar,{className:"block-directory-block-ratings__star-full",icon:yi,size:16},`full_stars_${i}`)),Array.from({length:r}).map((s,i)=>(0,Ao.jsx)(ar,{className:"block-directory-block-ratings__star-half-full",icon:xi,size:16},`half_stars_${i}`)),Array.from({length:n}).map((s,i)=>(0,Ao.jsx)(ar,{className:"block-directory-block-ratings__star-empty",icon:gi,size:16},`empty_stars_${i}`))]})}var pf=Xg;var Ri=g(X(),1),Jg=({rating:e})=>(0,Ri.jsx)("span",{className:"block-directory-block-ratings",children:(0,Ri.jsx)(pf,{rating:e})}),mf=Jg;var gf=g(io(),1),Ei=g(X(),1);function Zg({icon:e}){let t="block-directory-downloadable-block-icon";return e.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)!==null?(0,Ei.jsx)("img",{className:t,src:e,alt:""}):(0,Ei.jsx)(gf.BlockIcon,{className:t,icon:e,showColors:!0})}var Mn=Zg;var hf=g(Me(),1),yf=g(qe(),1);var Bn=g(X(),1),Qg=({block:e})=>{let t=(0,yf.useSelect)(o=>o(pe).getErrorNoticeForBlock(e.id),[e]);return t?(0,Bn.jsx)("div",{className:"block-directory-downloadable-block-notice",children:(0,Bn.jsxs)("div",{className:"block-directory-downloadable-block-notice__content",children:[t.message,t.isFatal?" "+(0,hf.__)("Try reloading the page."):null]})}):null},xf=Qg;var ge=g(X(),1);function eh({title:e,rating:t,ratingCount:o},{hasNotice:r,isInstalled:n,isInstalling:s}){let i=Math.round(t/.5)*.5;return!n&&r?(0,xe.sprintf)((0,xe.__)("Retry installing %s."),(0,Vt.decodeEntities)(e)):n?(0,xe.sprintf)((0,xe.__)("Add %s."),(0,Vt.decodeEntities)(e)):s?(0,xe.sprintf)((0,xe.__)("Installing %s."),(0,Vt.decodeEntities)(e)):o<1?(0,xe.sprintf)((0,xe.__)("Install %s."),(0,Vt.decodeEntities)(e)):(0,xe.sprintf)((0,xe._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",o),(0,Vt.decodeEntities)(e),i,o)}function th({item:e,onClick:t}){let{author:o,description:r,icon:n,rating:s,title:i}=e,a=!!(0,vf.getBlockType)(e.name),{hasNotice:l,isInstalling:c,isInstallable:u}=(0,wf.useSelect)(m=>{let{getErrorNoticeForBlock:p,isInstalling:y}=m(pe),h=p(e.id),b=h&&h.isFatal;return{hasNotice:!!h,isInstalling:y(e.id),isInstallable:!b}},[e]),d="";a?d=(0,xe.__)("Installed!"):c&&(d=(0,xe.__)("Installing\u2026"));let f=eh(e,{hasNotice:l,isInstalled:a,isInstalling:c});return(0,ge.jsxs)(ko.Root,{children:[(0,ge.jsx)(ko.Trigger,{render:(0,ge.jsxs)(Fn.Composite.Item,{className:uo("block-directory-downloadable-block-list-item",c&&"is-installing"),accessibleWhenDisabled:!0,disabled:c||!u,onClick:m=>{m.preventDefault(),t()},"aria-label":f,type:"button",role:"option",children:[(0,ge.jsxs)("div",{className:"block-directory-downloadable-block-list-item__icon",children:[(0,ge.jsx)(Mn,{icon:n,title:i}),c?(0,ge.jsx)("span",{className:"block-directory-downloadable-block-list-item__spinner",children:(0,ge.jsx)(Fn.Spinner,{})}):(0,ge.jsx)(mf,{rating:s})]}),(0,ge.jsxs)("span",{className:"block-directory-downloadable-block-list-item__details",children:[(0,ge.jsx)("span",{className:"block-directory-downloadable-block-list-item__title",children:(0,bf.createInterpolateElement)((0,xe.sprintf)((0,xe.__)("%1$s <span>by %2$s</span>"),(0,Vt.decodeEntities)(i),o),{span:(0,ge.jsx)("span",{className:"block-directory-downloadable-block-list-item__author"})})}),l?(0,ge.jsx)(xf,{block:e}):(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("span",{className:"block-directory-downloadable-block-list-item__desc",children:d||(0,Vt.decodeEntities)(r)}),u&&!(a||c)&&(0,ge.jsx)(wi,{children:(0,xe.__)("Install block")})]})]})]})}),(0,ge.jsx)(ko.Popup,{children:f})]})}var Rf=th;var Ti=g(X(),1),oh=()=>{};function rh({items:e,onHover:t=oh,onSelect:o}){let{installBlockType:r}=(0,Cf.useDispatch)(pe);return e.length?(0,Ti.jsx)(Tf.Composite,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,Ef.__)("Blocks available for install"),children:e.map(n=>(0,Ti.jsx)(Rf,{onClick:()=>{(0,Sf.getBlockType)(n.name)?o(n):r(n).then(s=>{s&&o(n)}),t(null)},onHover:t,item:n},n.id))}):null}var Pf=rh;var jt=g(Me(),1),Of=g(Ue(),1),_f=g(df(),1),nt=g(X(),1);function nh({children:e,downloadableItems:t,hasLocalBlocks:o}){let r=t.length;return(0,Of.useEffect)(()=>{(0,_f.speak)((0,jt.sprintf)((0,jt._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))},[r]),(0,nt.jsxs)(nt.Fragment,{children:[!o&&(0,nt.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,jt.__)("No results available from your installed blocks.")}),(0,nt.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,nt.jsxs)("div",{className:"block-directory-downloadable-blocks-panel",children:[(0,nt.jsxs)("div",{className:"block-directory-downloadable-blocks-panel__header",children:[(0,nt.jsx)("h2",{className:"block-directory-downloadable-blocks-panel__title",children:(0,jt.__)("Available to install")}),(0,nt.jsx)("p",{className:"block-directory-downloadable-blocks-panel__description",children:(0,jt.__)("Select a block to install and add it to your post.")})]}),e]})]})}var kf=nh;var Vn=g(Me(),1),jn=g(Yt(),1),st=g(X(),1);function sh(){return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,st.jsx)("p",{children:(0,Vn.__)("No results found.")})}),(0,st.jsx)("div",{className:"block-editor-inserter__tips",children:(0,st.jsxs)(jn.Tip,{children:[(0,Vn.__)("Interested in creating your own block?"),(0,st.jsx)("br",{}),(0,st.jsxs)(jn.ExternalLink,{href:"https://developer.wordpress.org/block-editor/",children:[(0,Vn.__)("Get started here"),"."]})]})})]})}var Si=sh;var De=g(X(),1),Af=[],ih=e=>(0,Lf.useSelect)(t=>{let{getDownloadableBlocks:o,isRequestingDownloadableBlocks:r,getInstalledBlockTypes:n}=t(pe),s=t(Nf.store).canUser("read","block-directory/search"),i=Af;if(s){i=o(e);let a=n(),l=i.filter(({name:c})=>{let u=a.some(f=>f.name===c),d=(0,Mf.getBlockType)(c);return u||!d});l.length!==i.length&&(i=l),i.length===0&&(i=Af)}return{hasPermission:s,downloadableBlocks:i,isLoading:r(e)}},[e]);function Bf({onSelect:e,onHover:t,hasLocalBlocks:o,isTyping:r,filterValue:n}){let{hasPermission:s,downloadableBlocks:i,isLoading:a}=ih(n);return s===void 0||a||r?(0,De.jsxs)(De.Fragment,{children:[s&&!o&&(0,De.jsxs)(De.Fragment,{children:[(0,De.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,If.__)("No results available from your installed blocks.")}),(0,De.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"})]}),(0,De.jsx)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading",children:(0,De.jsx)(Df.Spinner,{})})]}):s===!1?o?null:(0,De.jsx)(Si,{}):i.length===0?o?null:(0,De.jsx)(Si,{}):(0,De.jsx)(kf,{downloadableItems:i,hasLocalBlocks:o,children:(0,De.jsx)(Pf,{items:i,onSelect:e,onHover:t})})}var Ci=g(X(),1);function ah(){let[e,t]=(0,jf.useState)(""),o=(0,Vf.debounce)(t,400);return(0,Ci.jsx)(Ff.__unstableInserterMenuExtension,{children:({onSelect:r,onHover:n,filterValue:s,hasItems:i})=>(e!==s&&o(s),e?(0,Ci.jsx)(Bf,{onSelect:r,onHover:n,filterValue:e,hasLocalBlocks:i,isTyping:s!==e}):null)})}var Hf=ah;var ur=g(Me(),1),Uf=g(qe(),1),$f=g($n(),1);var Hn=g(Me(),1);var Ht=g(X(),1);function Wf({items:e}){return e.length?(0,Ht.jsx)("ul",{className:"block-directory-compact-list",children:e.map(({icon:t,id:o,title:r,author:n})=>(0,Ht.jsxs)("li",{className:"block-directory-compact-list__item",children:[(0,Ht.jsx)(Mn,{icon:t,title:r}),(0,Ht.jsxs)("div",{className:"block-directory-compact-list__item-details",children:[(0,Ht.jsx)("div",{className:"block-directory-compact-list__item-title",children:r}),(0,Ht.jsx)("div",{className:"block-directory-compact-list__item-author",children:(0,Hn.sprintf)((0,Hn.__)("By %s"),n)})]})]},o))}):null}var fr=g(X(),1);function Yf(){let e=(0,Uf.useSelect)(t=>t(pe).getNewBlockTypes(),[]);return e.length?(0,fr.jsxs)($f.PluginPrePublishPanel,{title:(0,ur.sprintf)((0,ur._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0,children:[(0,fr.jsx)("p",{className:"installed-blocks-pre-publish-panel__copy",children:(0,ur._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)}),(0,fr.jsx)(Wf,{items:e})]}):null}var to=g(Me(),1),Xf=g(Yt(),1),Jf=g(_t(),1),Zf=g(Ue(),1),pr=g(qe(),1),Qf=g(Jn(),1),oo=g(io(),1);var Wn=g(Me(),1),zf=g(Yt(),1),Io=g(_t(),1),dr=g(qe(),1),Kf=g(io(),1);var qf=g(X(),1);function Gf({attributes:e,block:t,clientId:o}){let r=(0,dr.useSelect)(i=>i(pe).isInstalling(t.id),[t.id]),{installBlockType:n}=(0,dr.useDispatch)(pe),{replaceBlock:s}=(0,dr.useDispatch)(Kf.store);return(0,qf.jsx)(zf.Button,{__next40pxDefaultSize:!0,onClick:()=>n(t).then(i=>{if(i){let a=(0,Io.getBlockType)(t.name),[l]=(0,Io.parse)(e.originalContent);l&&a&&s(o,(0,Io.createBlock)(a.name,l.attributes,l.innerBlocks))}}),accessibleWhenDisabled:!0,disabled:r,isBusy:r,variant:"primary",children:(0,Wn.sprintf)((0,Wn.__)("Install %s"),t.title)})}var wt=g(X(),1),lh=e=>t=>{let{originalName:o}=t.attributes,{block:r,hasPermission:n}=(0,pr.useSelect)(s=>{let{getDownloadableBlocks:i}=s(pe),a=i("block:"+o).filter(({name:l})=>o===l);return{hasPermission:s(Qf.store).canUser("read","block-directory/search"),block:a.length&&a[0]}},[o]);return!n||!r?(0,wt.jsx)(e,{...t}):(0,wt.jsx)(ch,{...t,originalBlock:r})},ch=({originalBlock:e,...t})=>{let{originalName:o,originalUndelimitedContent:r,clientId:n}=t.attributes,{replaceBlock:s}=(0,pr.useDispatch)(oo.store),i=()=>{s(t.clientId,(0,Jf.createBlock)("core/html",{},[],[r]))},a=!!r,l=(0,pr.useSelect)(d=>{let{canInsertBlockType:f,getBlockRootClientId:m}=d(oo.store);return f("core/html",m(n))},[n]),c=(0,to.sprintf)((0,to.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block or remove it entirely."),e.title||o),u=[(0,wt.jsx)(Gf,{block:e,attributes:t.attributes,clientId:t.clientId},"install")];return a&&l&&(c=(0,to.sprintf)((0,to.__)("Your site doesn\u2019t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),e.title||o),u.push((0,wt.jsx)(Xf.Button,{__next40pxDefaultSize:!0,onClick:i,variant:"tertiary",children:(0,to.__)("Keep as HTML")},"convert"))),(0,wt.jsxs)("div",{...(0,oo.useBlockProps)(),children:[(0,wt.jsx)(oo.Warning,{actions:u,children:c}),(0,wt.jsx)(Zf.RawHTML,{children:r})]})},ed=lh;var Wt=g(X(),1);(0,td.registerPlugin)("block-directory",{icon:void 0,render(){return(0,Wt.jsxs)(Wt.Fragment,{children:[(0,Wt.jsx)(ra,{}),(0,Wt.jsx)(Hf,{}),(0,Wt.jsx)(Yf,{})]})}});(0,od.addFilter)("blocks.registerBlockType","block-directory/fallback",(e,t)=>(t!=="core/missing"||(e.edit=ed(e.edit)),e));return ud(uh);})();
2 3 /*! Bundled license information:
3 4
4 5 use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
5 6 (**
@@ -22,5 +23,7 @@
22 23 * This source code is licensed under the MIT license found in the
23 24 * LICENSE file in the root directory of this source tree.
24 25 *)
25 26 */
27 +(window.wp ||= {}).blockDirectory = wp.blockDirectory;
28 +})();
26 29 //# sourceMappingURL=index.min.js.map