HEX
Server: nginx
System: Linux pool195-106-36.bur.atomicsites.net 6.12.57+deb12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.57-1~bpo12+1 (2025-11-17) x86_64
User: (0)
PHP: 8.3.32
Disabled: pcntl_fork
Upload Files
File: //srv/wordpress/core/beta/wp-includes/js/dist/block-directory.min.js
/*! This file is auto-generated */
var wp;(wp||={}).blockDirectory=(()=>{var If=Object.create;var br=Object.defineProperty;var Af=Object.getOwnPropertyDescriptor;var Nf=Object.getOwnPropertyNames;var Df=Object.getPrototypeOf,Mf=Object.prototype.hasOwnProperty;var se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ke=(e,t)=>{for(var o in t)br(e,o,{get:t[o],enumerable:!0})},mi=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Nf(t))!Mf.call(e,n)&&n!==o&&br(e,n,{get:()=>t[n],enumerable:!(r=Af(t,n))||r.enumerable});return e};var g=(e,t,o)=>(o=e!=null?If(Df(e)):{},mi(t||!e||!e.__esModule?br(o,"default",{value:e,enumerable:!0}):o,e)),Lf=e=>mi(br({},"__esModule",{value:!0}),e);var hi=se((Lg,gi)=>{gi.exports=window.wp.plugins});var xi=se((Bg,yi)=>{yi.exports=window.wp.hooks});var kt=se((Fg,bi)=>{bi.exports=window.wp.blocks});var Ge=se((jg,wi)=>{wi.exports=window.wp.data});var Ue=se((Vg,vi)=>{vi.exports=window.wp.element});var In=se((Hg,Ri)=>{Ri.exports=window.wp.editor});var lo=se((Wg,Si)=>{Si.exports=window.wp.blockEditor});var We=se(($g,Ci)=>{Ci.exports=window.wp.i18n});var wr=se((Yg,Pi)=>{Pi.exports=window.wp.apiFetch});var _i=se((zg,Oi)=>{Oi.exports=window.wp.notices});var Ii=se((qg,ki)=>{ki.exports=window.wp.url});var zi=se((gh,Yi)=>{Yi.exports=window.wp.compose});var qt=se((hh,qi)=>{qi.exports=window.wp.components});var Fn=se((yh,Ki)=>{Ki.exports=window.wp.coreData});var Ji=se((bh,Xi)=>{Xi.exports=window.wp.htmlEntities});var V=se((wh,Zi)=>{Zi.exports=window.React});var X=se((Ph,oa)=>{oa.exports=window.ReactJSXRuntime});var Dt=se((Ry,Ca)=>{Ca.exports=window.ReactDOM});var Ml=se(Dl=>{"use strict";var To=V();function am(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var lm=typeof Object.is=="function"?Object.is:am,cm=To.useState,um=To.useEffect,fm=To.useLayoutEffect,dm=To.useDebugValue;function pm(e,t){var o=t(),r=cm({inst:{value:o,getSnapshot:t}}),n=r[0].inst,s=r[1];return fm(function(){n.value=o,n.getSnapshot=t,vs(n)&&s({inst:n})},[e,o,t]),um(function(){return vs(n)&&s({inst:n}),e(function(){vs(n)&&s({inst:n})})},[e]),dm(o),o}function vs(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!lm(e,o)}catch{return!0}}function mm(e,t){return t()}var gm=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?mm:pm;Dl.useSyncExternalStore=To.useSyncExternalStore!==void 0?To.useSyncExternalStore:gm});var Rs=se((ub,Ll)=>{"use strict";Ll.exports=Ml()});var Fl=se(Bl=>{"use strict";var zr=V(),hm=Rs();function ym(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xm=typeof Object.is=="function"?Object.is:ym,bm=hm.useSyncExternalStore,wm=zr.useRef,vm=zr.useEffect,Rm=zr.useMemo,Em=zr.useDebugValue;Bl.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var s=wm(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=Rm(function(){function u(m){if(!c){if(c=!0,l=m,m=r(m),n!==void 0&&i.hasValue){var d=i.value;if(n(d,m))return f=d}return f=m}if(d=f,xm(l,m))return d;var h=r(m);return n!==void 0&&n(d,h)?(l=m,d):(l=m,f=h)}var c=!1,l,f,p=o===void 0?null:o;return[function(){return u(t())},p===null?void 0:function(){return u(p())}]},[t,o,r,n]);var a=bm(e,s[0],s[1]);return vm(function(){i.hasValue=!0,i.value=a},[a]),Em(a),a}});var Vl=se((db,jl)=>{"use strict";jl.exports=Fl()});var ou=se((wT,tu)=>{tu.exports=window.wp.a11y});var dn=se((vT,ru)=>{ru.exports=window.wp.primitives});var iu=se((DT,su)=>{su.exports=window.wp.theme});var lu=se((MT,au)=>{au.exports=window.wp.privateApis});var Dg={};Ke(Dg,{store:()=>me});var Ef=g(hi(),1),Tf=g(xi(),1);var Hi=g(kt(),1),Uo=g(Ge(),1),Ui=g(Ue(),1),Wi=g(In(),1);var Tr=g(Ge(),1);var Ei=g(Ge(),1),Bf=(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},Ff=(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},jf=(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},Ti=(0,Ei.combineReducers)({downloadableBlocks:Bf,blockManagement:Ff,errorNotices:jf});var An={};Ke(An,{getDownloadableBlocks:()=>Hf,getErrorNoticeForBlock:()=>zf,getErrorNotices:()=>Yf,getInstalledBlockTypes:()=>Ho,getNewBlockTypes:()=>Uf,getUnusedBlockTypes:()=>Wf,isInstalling:()=>$f,isRequestingDownloadableBlocks:()=>Vf});var co=g(Ge(),1),jo=g(lo(),1),Vo=[];function Vf(e,t){return e.downloadableBlocks[t]?.isRequesting??!1}function Hf(e,t){return e.downloadableBlocks[t]?.results??Vo}function Ho(e){return e.blockManagement.installedBlockTypes}var Uf=(0,co.createRegistrySelector)(e=>(0,co.createSelector)(t=>{let o=Ho(t);if(!o.length)return Vo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(jo.store),s=o.map(u=>u.name),i=n().flatMap(u=>{let c=r(u);return s.includes(c)?c:[]}),a=o.filter(u=>i.includes(u.name));return a.length>0?a:Vo},t=>[Ho(t),e(jo.store).getClientIdsWithDescendants()])),Wf=(0,co.createRegistrySelector)(e=>(0,co.createSelector)(t=>{let o=Ho(t);if(!o.length)return Vo;let{getBlockName:r,getClientIdsWithDescendants:n}=e(jo.store),s=o.map(u=>u.name),i=n().flatMap(u=>{let c=r(u);return s.includes(c)?c:[]}),a=o.filter(u=>!i.includes(u.name));return a.length>0?a:Vo},t=>[Ho(t),e(jo.store).getClientIdsWithDescendants()]));function $f(e,t){return e.blockManagement.isInstalling[t]||!1}function Yf(e){return e.errorNotices}function zf(e,t){return e.errorNotices[t]}var Mn={};Ke(Mn,{addInstalledBlockType:()=>Xf,clearErrorNotice:()=>ed,fetchDownloadableBlocks:()=>Dn,installBlockType:()=>Kf,receiveDownloadableBlocks:()=>Er,removeInstalledBlockType:()=>Jf,setErrorNotice:()=>Qf,setIsInstalling:()=>Zf,uninstallBlockType:()=>Gf});var Rr=g(kt(),1),bt=g(We(),1),uo=g(wr(),1),vr=g(_i(),1),Di=g(Ii(),1);var Ai=g(wr(),1),qf=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 Ni(){let t=await(await(0,Ai.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 qf(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 Kf=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,uo.default)({method:"PUT",url:i,data:{status:"active"}}):a=(await(0,uo.default)({method:"POST",path:"wp/v2/plugins",data:{slug:r,status:"active"}}))._links,o.addInstalledBlockType({...e,links:{...e.links,...a}});let u=["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,uo.default)({path:(0,Di.addQueryArgs)(`/wp/v2/block-types/${n}`,{_fields:u})}).catch(()=>{}).then(l=>{l&&(0,Rr.unstable__bootstrapServerSideBlockDefinitions)({[n]:Object.fromEntries(Object.entries(l).filter(([f])=>u.includes(f)))})}),await Ni(),!t.select(Rr.store).getBlockTypes().some(l=>l.name===n))throw new Error((0,bt.__)("Error registering block. Try reloading the page."));t.dispatch(vr.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."),u=i instanceof Error,c={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.")};c[i.code]&&(u=!0,a=c[i.code]),o.setErrorNotice(r,a,u),t.dispatch(vr.store).createErrorNotice(a,{speak:!0,isDismissible:!0})}return o.setIsInstalling(r,!1),s},Gf=e=>async({registry:t,dispatch:o})=>{try{let r=Nn(e);await(0,uo.default)({method:"PUT",url:r,data:{status:"inactive"}}),await(0,uo.default)({method:"DELETE",url:r}),o.removeInstalledBlockType(e)}catch(r){t.dispatch(vr.store).createErrorNotice(r.message||(0,bt.__)("An error occurred."))}};function Xf(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function Jf(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function Zf(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function Qf(e,t,o=!1){return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:o}}function ed(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var Bn={};Ke(Bn,{getDownloadableBlocks:()=>nd});var fo=function(){return fo=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},fo.apply(this,arguments)};function Mi(e){return e.toLowerCase()}var td=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],od=/[^A-Z0-9]+/gi;function Bi(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,r=o===void 0?td:o,n=t.stripRegexp,s=n===void 0?od:n,i=t.transform,a=i===void 0?Mi:i,u=t.delimiter,c=u===void 0?" ":u,l=Li(Li(e,r,"$1\0$2"),s,"\0"),f=0,p=l.length;l.charAt(f)==="\0";)f++;for(;l.charAt(p-1)==="\0";)p--;return l.slice(f,p).split("\0").map(a).join(c)}function Li(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 Fi(e,t){return t===void 0&&(t={}),Bi(e,fo({delimiter:"",transform:Ln},t))}function rd(e,t){return t===0?e.toLowerCase():Ln(e,t)}function ji(e,t){return t===void 0&&(t={}),Fi(e,fo({transform:rd},t))}var Vi=g(wr(),1);var nd=e=>async({dispatch:t})=>{if(e)try{t(Dn(e));let r=(await(0,Vi.default)({path:`wp/v2/block-directory/search?term=${e}`})).map(n=>Object.fromEntries(Object.entries(n).map(([s,i])=>[ji(s),i])));t(Er(r,e))}catch{t(Er([],e))}};var sd="core/block-directory",id={reducer:Ti,selectors:An,actions:Mn,resolvers:Bn},me=(0,Tr.createReduxStore)(sd,id);(0,Tr.register)(me);function $i(){let{uninstallBlockType:e}=(0,Uo.useDispatch)(me),t=(0,Uo.useSelect)(r=>{let{isAutosavingPost:n,isSavingPost:s}=r(Wi.store);return s()&&!n()},[]),o=(0,Uo.useSelect)(r=>r(me).getUnusedBlockTypes(),[]);return(0,Ui.useEffect)(()=>{t&&o.length&&o.forEach(r=>{e(r),(0,Hi.unregisterBlockType)(r.name)})},[t]),null}var sf=g(lo(),1),af=g(zi(),1),lf=g(Ue(),1);var Qu=g(We(),1),ef=g(qt(),1),tf=g(Fn(),1),of=g(Ge(),1),rf=g(kt(),1);var $u=g(We(),1),Yu=g(qt(),1),zu=g(kt(),1),qu=g(Ge(),1);function Gi(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=Gi(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function ad(){for(var e,t,o=0,r="",n=arguments.length;o<n;o++)(e=arguments[o])&&(t=Gi(e))&&(r&&(r+=" "),r+=t);return r}var po=ad;var Ve=g(We(),1),Rn=g(qt(),1),Vu=g(Ue(),1),Ht=g(Ji(),1),Hu=g(kt(),1),Uu=g(Ge(),1);var ld=g(V(),1),Wo={...ld};var ea=g(V(),1),Qi={};function ve(e,t){let o=ea.useRef(Qi);return o.current===Qi&&(o.current=e(t)),o}var jn=Wo.useInsertionEffect,cd=jn&&jn!==Wo.useLayoutEffect?jn:e=>e();function W(e){let t=ve(ud).current;return t.next=e,cd(t.effect),t.trampoline}function ud(){let e={next:void 0,callback:fd,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function fd(){}var ta=g(V(),1),dd=()=>{},F=typeof document<"u"?ta.useLayoutEffect:dd;var Sr=g(V(),1),pd=Sr.createContext(void 0);function mo(){return Sr.useContext(pd)?.direction??"ltr"}function md(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 gd=md("https://base-ui.com/production-error","Base UI"),Ne=gd;var Kt=g(V(),1);function Vn(e,t,o,r){let n=ve(na).current;return hd(n,e,t,o,r)&&sa(n,[e,t,o,r]),n.callback}function ra(e){let t=ve(na).current;return yd(t,e)&&sa(t,e),t.callback}function na(){return{callback:null,cleanup:null,refs:[]}}function hd(e,t,o,r,n){return e.refs[0]!==t||e.refs[1]!==o||e.refs[2]!==r||e.refs[3]!==n}function yd(e,t){return e.refs.length!==t.length||e.refs.some((o,r)=>o!==t[r])}function sa(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 aa=g(V(),1);var ia=g(V(),1),xd=parseInt(ia.version,10);function go(e){return xd>=e}function Hn(e){if(!aa.isValidElement(e))return null;let t=e,o=t.props;return(go(19)?o?.ref:t.ref)??null}function $o(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function It(){}var Lh=Object.freeze([]),fe=Object.freeze({});function la(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 ca(e,t){return typeof e=="function"?e(t):e}function ua(e,t){return typeof e=="function"?e(t):e}var Un={};function wt(e,t,o,r,n){if(!o&&!r&&!n&&!e)return Cr(t);let s=Cr(e);return t&&(s=Yo(s,t)),o&&(s=Yo(s,o)),r&&(s=Yo(s,r)),n&&(s=Yo(s,n)),s}function fa(e){if(e.length===0)return Un;if(e.length===1)return Cr(e[0]);let t=Cr(e[0]);for(let o=1;o<e.length;o+=1)t=Yo(t,e[o]);return t}function Cr(e){return Wn(e)?{...pa(e,Un)}:bd(e)}function Yo(e,t){return Wn(t)?pa(t,e):wd(e,t)}function bd(e){let t={...e};for(let o in t){let r=t[o];da(o,r)&&(t[o]=ma(r))}return t}function wd(e,t){if(!t)return e;for(let o in t){let r=t[o];switch(o){case"style":{e[o]=$o(e.style,r);break}case"className":{e[o]=$n(e.className,r);break}default:da(o,r)?e[o]=vd(e[o],r):e[o]=r}}return e}function da(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 Wn(e){return typeof e=="function"}function pa(e,t){return Wn(e)?e(t):e??Un}function vd(e,t){return t?e?(...o)=>{let r=o[0];if(ha(r)){let s=r;ga(s);let i=t(...o);return s.baseUIHandlerPrevented||e?.(...o),i}let n=t(...o);return e?.(...o),n}:ma(t):e}function ma(e){return e&&((...t)=>{let o=t[0];return ha(o)&&ga(o),e(...t)})}function ga(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function $n(e,t){return t?e?t+" "+e:t:e}function ha(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=Rd(t,o);if(o.enabled===!1)return null;let s=o.state??fe;return Sd(e,r,n,s)}function Rd(e,t={}){let{className:o,style:r,render:n}=e,{state:s=fe,ref:i,props:a,stateAttributesMapping:u,enabled:c=!0}=t,l=c?ca(o,s):void 0,f=c?ua(r,s):void 0,p=c?la(s,u):fe,m=c&&a?Ed(a):void 0,d=c?$o(p,m)??{}:fe;return typeof document<"u"&&(c?Array.isArray(i)?d.ref=ra([d.ref,Hn(n),...i]):d.ref=Vn(d.ref,Hn(n),i):Vn(null,null)),c?(l!==void 0&&(d.className=$n(d.className,l)),f!==void 0&&(d.style=$o(d.style,f)),d):fe}function Ed(e){return Array.isArray(e)?fa(e):wt(void 0,e)}var Td=Symbol.for("react.lazy");function Sd(e,t,o,r){if(t){if(typeof t=="function")return t(o,r);let n=wt(o,t.props);n.ref=o.ref;let s=t;return s?.$$typeof===Td&&(s=Kt.Children.toArray(t)[0]),Kt.cloneElement(s,n)}if(e&&typeof e=="string")return Cd(e,o);throw new Error(Ne(8))}function Cd(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 Pr=g(V(),1);var ya=0;function Pd(e,t="mui"){let[o,r]=Pr.useState(e),n=e||o;return Pr.useEffect(()=>{o==null&&(ya+=1,r(`${t}-${ya}`))},[o,t]),n}var xa=Wo.useId;function At(e,t){if(xa!==void 0){let o=xa();return e??(t?`${t}-${o}`:o)}return Pd(e,t)}function ba(e){return At(e,"base-ui")}var $={};Ke($,{cancelOpen:()=>tp,chipRemovePress:()=>Bd,clearPress:()=>Ld,closePress:()=>Dd,closeWatcher:()=>Kd,decrementPress:()=>Vd,disabled:()=>rp,drag:()=>Zd,escapeKey:()=>qd,focusOut:()=>zd,imperativeAction:()=>ip,incrementPress:()=>jd,initial:()=>sp,inputBlur:()=>Wd,inputChange:()=>Hd,inputClear:()=>Ud,inputPaste:()=>$d,inputPress:()=>Yd,itemPress:()=>Nd,keyboard:()=>Xd,linkPress:()=>Md,listNavigation:()=>Gd,missing:()=>np,none:()=>Od,outsidePress:()=>Ad,pointer:()=>Jd,scrub:()=>ep,siblingOpen:()=>op,swipe:()=>ap,trackPress:()=>Fd,triggerFocus:()=>Id,triggerHover:()=>kd,triggerPress:()=>_d,wheel:()=>Qd,windowResize:()=>lp});var Od="none",_d="trigger-press",kd="trigger-hover",Id="trigger-focus",Ad="outside-press",Nd="item-press",Dd="close-press",Md="link-press",Ld="clear-press",Bd="chip-remove-press",Fd="track-press",jd="increment-press",Vd="decrement-press",Hd="input-change",Ud="input-clear",Wd="input-blur",$d="input-paste",Yd="input-press",zd="focus-out",qd="escape-key",Kd="close-watcher",Gd="list-navigation",Xd="keyboard",Jd="pointer",Zd="drag",Qd="wheel",ep="scrub",tp="cancel-open",op="sibling-open",rp="disabled",np="missing",sp="initial",ip="imperative-action",ap="swipe",lp="window-resize";function J(e,t,o,r){let n=!1,s=!1,i=r??fe;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 qn=g(V(),1);var wa=g(V(),1),cp=[];function ho(e){wa.useEffect(e,cp)}var Or=null,cy=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,dt=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 yo(){let e=ve(dt.create).current;return ho(e.disposeEffect),e}function va(e,t=!1,o=!1){let[r,n]=qn.useState(e&&t?"idle":void 0),[s,i]=qn.useState(e);return e&&!s&&(i(!0),n("starting")),!e&&s&&r!=="ending"&&!o&&n("ending"),!e&&!s&&r==="ending"&&n(void 0),F(()=>{if(!e&&s&&r!=="ending"&&o){let a=dt.request(()=>{n("ending")});return()=>{dt.cancel(a)}}},[e,s,r,o]),F(()=>{if(!e||t)return;let a=dt.request(()=>{n(void 0)});return()=>{dt.cancel(a)}},[t,e]),F(()=>{if(!e||!t)return;e&&s&&r!=="idle"&&n("starting");let a=dt.request(()=>{n("idle")});return()=>{dt.cancel(a)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}var Gt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({}),up={[Gt.startingStyle]:""},fp={[Gt.endingStyle]:""},Ra={transitionStatus(e){return e==="starting"?up:e==="ending"?fp:null}};function kr(){return typeof window<"u"}function Jt(e){return Ir(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tt(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 le(e).Node:!1}function H(e){return kr()?e instanceof Element||e instanceof le(e).Element:!1}function xe(e){return kr()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function xo(e){return!kr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}function bo(e){let{overflow:t,overflowX:o,overflowY:r,display:n}=Te(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&n!=="inline"&&n!=="contents"}function Ea(e){return/^(table|td|th)$/.test(Jt(e))}function zo(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var dp=/transform|translate|scale|rotate|perspective|filter/,pp=/paint|layout|strict|content/,Xt=e=>!!e&&e!=="none",Kn;function Ar(e){let t=H(e)?Te(e):e;return Xt(t.transform)||Xt(t.translate)||Xt(t.scale)||Xt(t.rotate)||Xt(t.perspective)||!Nr()&&(Xt(t.backdropFilter)||Xt(t.filter))||dp.test(t.willChange||"")||pp.test(t.contain||"")}function Ta(e){let t=et(e);for(;xe(t)&&!ot(t);){if(Ar(t))return t;if(zo(t))return null;t=et(t)}return null}function Nr(){return Kn==null&&(Kn=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Kn}function ot(e){return/^(html|body|#document)$/.test(Jt(e))}function Te(e){return le(e).getComputedStyle(e)}function qo(e){return H(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if(Jt(e)==="html")return e;let t=e.assignedSlot||e.parentNode||xo(e)&&e.host||tt(e);return xo(t)?t.host:t}function Sa(e){let t=et(e);return ot(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&bo(t)?t:Sa(t)}function Nt(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let n=Sa(e),s=n===((r=e.ownerDocument)==null?void 0:r.body),i=le(n);if(s){let a=Dr(i);return t.concat(i,i.visualViewport||[],bo(n)?n:[],a&&o?Nt(a):[])}else return t.concat(n,Nt(n,[],o))}function Dr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ee(e,t,o,r){return e.addEventListener(t,o,r),()=>{e.removeEventListener(t,o,r)}}function Me(e){let t=ve(mp,e).current;return t.next=e,F(t.effect),t}function mp(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function be(e){return e?.ownerDocument||document}var _a=g(V(),1);var Oa=g(Dt(),1);function Pa(e){return e==null?e:"current"in e?e.current:e}function wo(e,t=!1,o=!0){let r=yo();return W((n,s=null)=>{r.cancel();let i=Pa(e);if(i==null)return;let a=i,u=()=>{Oa.flushSync(n)};if(typeof a.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){n();return}function c(){Promise.all(a.getAnimations().map(l=>l.finished)).then(()=>{s?.aborted||u()}).catch(()=>{if(o){s?.aborted||u();return}let l=a.getAnimations();!s?.aborted&&l.length>0&&l.some(f=>f.pending||f.playState!=="finished")&&c()})}if(t){let l=Gt.startingStyle;if(!a.hasAttribute(l)){r.request(c);return}let f=new MutationObserver(()=>{a.hasAttribute(l)||(f.disconnect(),c())});f.observe(a,{attributes:!0,attributeFilter:[l]}),s?.addEventListener("abort",()=>f.disconnect(),{once:!0});return}r.request(c)})}function Mr(e){let{enabled:t=!0,open:o,ref:r,onComplete:n}=e,s=W(n),i=wo(r,o,!1);_a.useEffect(()=>{if(!t)return;let a=new AbortController;return i(s,a.signal),()=>{a.abort()}},[t,o,s,i])}var ka=g(V(),1);function Ia(e){let t=ka.useRef(!0);t.current&&(t.current=!1,e())}var vt={};Ke(vt,{engine:()=>Qn,env:()=>ts,os:()=>Jn,screenReader:()=>es});var Jn={};Ke(Jn,{android:()=>Da,apple:()=>Xn,ios:()=>Gn,linux:()=>bp,mac:()=>Ma,windows:()=>xp});function gp(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:hp,platform:yp,maxTouchPoints:Aa}=gp(),Zt=hp.toLowerCase(),Qt=yp.toLowerCase();var Gn=/^i(os$|p)/.test(Qt)||Qt==="macintel"&&Aa>1,Na="android",Da=Qt===Na||Zt.includes(Na),Ma=!Gn&&Qt.startsWith("mac"),xp=Qt.startsWith("win"),bp=!Da&&/^(linux|chrome os)/.test(Qt),Xn=Ma||Gn;var Qn={};Ke(Qn,{blink:()=>vp,gecko:()=>wp,webkit:()=>Zn});var Zn=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none"),wp=!Zn&&Zt.includes("firefox"),vp=!Zn&&Zt.includes("chrom");var es={};Ke(es,{voiceOver:()=>Rp});var Rp=Xn;var ts={};Ke(ts,{jsdom:()=>Ep});var Ep=/jsdom|happydom/.test(Zt);var Ko=0,$e=class e{static create(){return new e}currentId=Ko;start(t,o){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ko,o()},t)}isStarted(){return this.currentId!==Ko}clear=()=>{this.currentId!==Ko&&(clearTimeout(this.currentId),this.currentId=Ko)};disposeEffect=()=>this.clear};function rt(){let e=ve($e.create).current;return ho(e.disposeEffect),e}var Se=g(V(),1);function La(e){return"nativeEvent"in e}function Rt(e,t){let o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function Ba(e){let t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}var os="data-base-ui-focusable";var rs="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Lr(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&&xo(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ke(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mt(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 Br(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 Fa(e){return e.matches("html,body")}function ja(e){return xe(e)&&e.matches(rs)}function ns(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${rs}`)!=null}function Va(e){if(!e||vt.env.jsdom)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Tp(e,t){return t!=null&&!Rt(t)?0:typeof e=="function"?e():e}function Et(e,t,o){let r=Tp(e,o);return typeof r=="number"?r:r?.[t]}function ss(e){return typeof e=="function"?e():e}function Fr(e,t){return t||e==="click"||e==="mousedown"}function Ha(e){return e?.includes("mouse")&&e!=="mousedown"}var Ua=g(X(),1),Wa=Se.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new $e,currentIdRef:{current:null},currentContextRef:{current:null}});function Sp(e,t){e.current=t.current}function is(e){let{children:t,delay:o,timeoutMs:r=0}=e,n=Se.useRef(o),s=Se.useRef(o),i=Se.useRef(null),a=Se.useRef(null),u=rt();return F(()=>{if(s.current=o,!i.current){n.current=o;return}n.current={open:Et(n.current,"open"),close:Et(o,"close")}},[o,i,n,s]),(0,Ua.jsx)(Wa.Provider,{value:Se.useMemo(()=>({hasProvider:!0,delayRef:n,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:u}),[r,u]),children:t})}function as(e,t={open:!1}){let{open:o}=t,r="rootStore"in e?e.rootStore:e,n=r.useState("floatingId"),s=Se.useContext(Wa),{currentIdRef:i,delayRef:a,timeoutMs:u,initialDelayRef:c,currentContextRef:l,hasProvider:f,timeout:p}=s,[m,d]=Se.useState(!1),h=Se.useRef(o),x=Se.useRef(!1);return F(()=>{h.current=o},[o]),F(()=>()=>{x.current=!0},[]),F(()=>{function b(){x.current||d(!1),l.current?.setIsInstantPhase(!1),i.current=null,l.current=null,a.current=c.current,p.clear()}if(i.current&&!o&&i.current===n){if(d(!1),u){let y=n;return p.start(u,()=>{r.select("open")||i.current&&i.current!==y||b()}),()=>{(h.current||i.current!==y)&&p.clear()}}b()}},[o,n,i,a,u,c,l,p,r]),F(()=>{if(!o)return;let b=l.current,y=i.current;p.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:d},i.current=n,a.current={open:0,close:Et(c.current,"close")},y!==null&&y!==n?(d(!0),b?.setIsInstantPhase(!0),b?.onOpenChange(!1,J($.none))):(d(!1),b?.setIsInstantPhase(!1))},[o,n,r,i,a,c,l,p]),F(()=>()=>{if(i.current===n){if(l.current=null,!h.current)return;i.current=null,Sp(a,c),p.clear()}},[l,i,a,n,c,p]),Se.useMemo(()=>({hasProvider:f,delayRef:a,isInstantPhase:m}),[f,a,m])}function nt(...e){return()=>{for(let t=0;t<e.length;t+=1){let o=e[t];o&&o()}}}var za=["top","right","bottom","left"];var Lt=Math.min,Ie=Math.max,Bt=Math.round,Xo=Math.floor,st=e=>({x:e,y:e}),Cp={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(e,t,o){return Ie(e,Lt(t,o))}function it(e,t){return typeof e=="function"?e(t):e}function Re(e){return e.split("-")[0]}function at(e){return e.split("-")[1]}function Vr(e){return e==="x"?"y":"x"}function Zo(e){return e==="y"?"height":"width"}function Le(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function Qo(e){return Vr(Le(e))}function qa(e,t,o){o===void 0&&(o=!1);let r=at(e),n=Qo(e),s=Zo(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 Ka(e){let t=Go(e);return[jr(e),t,jr(t)]}function jr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var $a=["left","right"],Ya=["right","left"],Pp=["top","bottom"],Op=["bottom","top"];function _p(e,t,o){switch(e){case"top":case"bottom":return o?t?Ya:$a:t?$a:Ya;case"left":case"right":return t?Pp:Op;default:return[]}}function Ga(e,t,o,r){let n=at(e),s=_p(Re(e),o==="start",r);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(jr)))),s}function Go(e){let t=Re(e);return Cp[t]+e.slice(t.length)}function kp(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hr(e){return typeof e!="number"?kp(e):{top:e,right:e,bottom:e,left:e}}function eo(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 Tt(e,t,o=!0){return e.filter(n=>n.parentId===t).flatMap(n=>[...!o||n.context?.open?[n]:[],...Tt(e,n.id,o)])}function vo(e){return`data-base-ui-${e}`}var Ye=g(V(),1),Za=g(Dt(),1);var Xa={style:{transition:"none"}};var Ip="data-base-ui-swipe-ignore",Ap="data-swipe-ignore",ux=`[${Ip}]`,fx=`[${Ap}]`;var Ja={fallbackAxisSide:"end"};var Qa=g(X(),1),Np=Ye.createContext(null),Dp=()=>Ye.useContext(Np),Mp=vo("portal");function ls(e={}){let{ref:t,container:o,componentProps:r=fe,elementProps:n}=e,s=At(),a=Dp()?.portalNode,[u,c]=Ye.useState(null),[l,f]=Ye.useState(null),p=W(x=>{x!==null&&f(x)}),m=Ye.useRef(null);F(()=>{if(o===null){m.current&&(m.current=null,f(null),c(null));return}if(s==null)return;let x=(o&&(Ir(o)?o:o.current))??a??document.body;if(x==null){m.current&&(m.current=null,f(null),c(null));return}m.current!==x&&(m.current=x,f(null),c(x))},[o,a,s]);let d=De("div",r,{ref:[t,p],props:[{id:s,[Mp]:""},n]});return{portalNode:l,portalSubtree:u&&d?Za.createPortal(d,u):null}}var to=g(V(),1);function el(){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 Lp=g(X(),1),Bp=to.createContext(null),Fp=to.createContext(null),Ro=()=>to.useContext(Bp)?.id||null,Ft=e=>{let t=to.useContext(Fp);return e??t};var Be=g(V(),1);function jp(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",u=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch",c=s.width,l=s.height,f=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),f-=o||0,p-=r||0,c=0,l=0,!n||u?(c=t.axis==="y"?s.width:0,l=t.axis==="x"?s.height:0,f=i&&t.x!=null?t.x:f,p=a&&t.y!=null?t.y:p):n&&!u&&(l=t.axis==="x"?s.height:l,c=t.axis==="y"?s.width:c),n=!0,{width:c,height:l,x:f,y:p,top:p,right:f+c,bottom:p+l,left:f}}}}function tl(e){return e!=null&&e.clientX!=null}function cs(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"),u=n.context.dataRef,c=Be.useRef(!1),l=Be.useRef(null),[f,p]=Be.useState(),[m,d]=Be.useState([]),h=W(w=>{n.set("positionReference",w)}),x=W((w,T,E)=>{c.current||u.current.openEvent&&!tl(u.current.openEvent)||n.set("positionReference",jp(E??a,{x:w,y:T,axis:r,dataRef:u,pointerType:f}))}),b=W(w=>{s?l.current||(x(w.clientX,w.clientY,w.currentTarget),d([])):x(w.clientX,w.clientY,w.currentTarget)}),y=Rt(f)?i:s;Be.useEffect(()=>{if(!o){h(a);return}if(!y)return;function w(){l.current?.(),l.current=null}let T=le(i);function E(C){let P=ke(C);te(i,P)?w():x(C.clientX,C.clientY)}return!u.current.openEvent||tl(u.current.openEvent)?l.current=ee(T,"mousemove",E):h(a),w},[y,o,i,u,a,n,x,h,m]),Be.useEffect(()=>()=>{n.set("positionReference",null)},[n]),Be.useEffect(()=>{o&&!i&&(c.current=!1)},[o,i]),Be.useEffect(()=>{!o&&s&&(c.current=!0)},[o,s]);let v=Be.useMemo(()=>{function w(T){p(T.pointerType)}return{onPointerDown:w,onPointerEnter:w,onMouseMove:b,onMouseEnter:b}},[b]);return Be.useMemo(()=>o?{reference:v,trigger:v}:{},[o,v])}var Fe=g(V(),1);function Vp(){return!1}function Hp(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function us(e,t={}){let{enabled:o=!0,escapeKey:r=!0,outsidePress:n=!0,outsidePressEvent:s="sloppy",referencePress:i=Vp,bubbles:a,externalTree:u}=t,c="rootStore"in e?e.rootStore:e,l=c.useState("open"),f=c.useState("floatingElement"),{dataRef:p}=c.context,m=Ft(u),d=W(typeof n=="function"?n:()=>!1),h=typeof n=="function"?d:n,x=h!==!1,b=W(()=>s),{escapeKey:y,outsidePress:v}=Hp(a),w=Fe.useRef(!1),T=Fe.useRef(!1),E=Fe.useRef(!1),C=Fe.useRef(!1),P=Fe.useRef(""),O=Fe.useRef(null),I=rt(),Y=rt(),A=W(()=>{Y.clear(),p.current.insideReactTree=!1}),N=W(U=>{let Q=p.current.floatingContext?.nodeId;return(m?Tt(m.nodesRef.current,Q):[]).some(ne=>ne.context?.open&&!ne.context.dataRef.current[U])}),L=W(U=>Br(U,c.select("floatingElement"))||Br(U,c.select("domReferenceElement"))),R=W(U=>{i()&&c.setOpen(!1,J($.triggerPress,U.nativeEvent))}),k=W(U=>{if(!l||!o||!r||U.key!=="Escape"||C.current||!y&&N("__escapeKeyBubbles"))return;let Q=La(U)?U.nativeEvent:U,Z=J($.escapeKey,Q);c.setOpen(!1,Z),Z.isCanceled||U.preventDefault(),!y&&!Z.isPropagationAllowed&&U.stopPropagation()}),B=W(()=>{p.current.insideReactTree=!0,Y.start(0,A)}),S=W(U=>{if(!l||!o||U.button!==0)return;let Q=ke(U.nativeEvent);te(c.select("floatingElement"),Q)&&(w.current||(w.current=!0,T.current=!1))}),_=W(U=>{!l||!o||(U.defaultPrevented||U.nativeEvent.defaultPrevented)&&w.current&&(T.current=!0)});Fe.useEffect(()=>{if(!l||!o)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=v;let U=new $e,Q=new $e;function Z(){U.clear(),C.current=!0}function ne(){U.start(vt.engine.webkit?5:0,()=>{C.current=!1})}function z(){E.current=!0,Q.start(0,()=>{E.current=!1})}function ie(){w.current=!1,T.current=!1}function ae(){let M=P.current,j=M==="pen"||!M?"mouse":M,pe=b(),Ee=typeof pe=="function"?pe():pe;return typeof Ee=="string"?Ee:Ee[j]}function de(M){let j=ae();return j==="intentional"&&M.type!=="click"||j==="sloppy"&&M.type==="click"}function Oe(M){let j=p.current.floatingContext?.nodeId,pe=m&&Tt(m.nodesRef.current,j).some(Ee=>Br(M,Ee.context?.elements.floating));return L(M)||pe}function we(M){if(de(M)){M.type!=="click"&&!L(M)&&(Q.clear(),E.current=!1),A();return}if(p.current.insideReactTree){A();return}let j=ke(M),pe=`[${vo("inert")}]`,Ee=H(j)?j.getRootNode():null,Pt=Array.from((xo(Ee)?Ee:be(c.select("floatingElement"))).querySelectorAll(pe)),Bo=c.context.triggerElements;if(j&&(Bo.hasElement(j)||Bo.hasMatchingElement(He=>te(He,j))))return;let yt=H(j)?j:null;for(;yt&&!ot(yt);){let He=et(yt);if(ot(He)||!H(He))break;yt=He}if(!(Pt.length&&H(j)&&!Fa(j)&&!te(j,c.select("floatingElement"))&&Pt.every(He=>!te(yt,He)))){if(xe(j)&&!("touches"in M)){let He=ot(j),Ot=Te(j),_t=/auto|scroll/,pr=He||_t.test(Ot.overflowX),mr=He||_t.test(Ot.overflowY),gr=pr&&j.clientWidth>0&&j.scrollWidth>j.clientWidth,hr=mr&&j.clientHeight>0&&j.scrollHeight>j.clientHeight,yr=Ot.direction==="rtl",oe=hr&&(yr?M.offsetX<=j.offsetWidth-j.clientWidth:M.offsetX>j.clientWidth),_e=gr&&M.offsetY>j.clientHeight;if(oe||_e)return}if(!Oe(M)){if(ae()==="intentional"&&E.current){Q.clear(),E.current=!1;return}typeof h=="function"&&!h(M)||N("__outsidePressBubbles")||(c.setOpen(!1,J($.outsidePress,M)),A())}}}function K(M){ae()!=="sloppy"||M.pointerType==="touch"||!c.select("open")||!o||L(M)||we(M)}function ce(M){if(ae()!=="sloppy"||!c.select("open")||!o||L(M))return;let j=M.touches[0];j&&(O.current={startTime:Date.now(),startX:j.clientX,startY:j.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},I.start(1e3,()=>{O.current&&(O.current.dismissOnTouchEnd=!1,O.current.dismissOnMouseDown=!1)}))}function ue(M,j){let pe=ke(M);if(!pe)return;let Ee=ee(pe,M.type,()=>{j(M),Ee()})}function Yt(M){P.current="touch",ue(M,ce)}function Je(M){I.clear(),M.type==="pointerdown"&&(P.current=M.pointerType),!(M.type==="mousedown"&&O.current&&!O.current.dismissOnMouseDown)&&ue(M,j=>{j.type==="pointerdown"?K(j):we(j)})}function ht(M){if(!w.current)return;let j=T.current;if(ie(),ae()==="intentional"){if(M.type==="pointercancel"){j&&z();return}if(!Oe(M)){if(j){z();return}typeof h=="function"&&!h(M)||(Q.clear(),E.current=!0,A())}}}function Ze(M){if(ae()!=="sloppy"||!O.current||L(M))return;let j=M.touches[0];if(!j)return;let pe=Math.abs(j.clientX-O.current.startX),Ee=Math.abs(j.clientY-O.current.startY),Pt=Math.sqrt(pe*pe+Ee*Ee);Pt>5&&(O.current.dismissOnTouchEnd=!0),Pt>10&&(we(M),I.clear(),O.current=null)}function ut(M){ue(M,Ze)}function fr(M){ae()!=="sloppy"||!O.current||L(M)||(O.current.dismissOnTouchEnd&&we(M),I.clear(),O.current=null)}function dr(M){ue(M,fr)}let ye=be(f),io=nt(r&&nt(ee(ye,"keydown",k),ee(ye,"compositionstart",Z),ee(ye,"compositionend",ne)),x&&nt(ee(ye,"click",Je,!0),ee(ye,"pointerdown",Je,!0),ee(ye,"pointerup",ht,!0),ee(ye,"pointercancel",ht,!0),ee(ye,"mousedown",Je,!0),ee(ye,"mouseup",ht,!0),ee(ye,"touchstart",Yt,!0),ee(ye,"touchmove",ut,!0),ee(ye,"touchend",dr,!0)));return()=>{io(),U.clear(),Q.clear(),ie(),E.current=!1}},[p,f,r,x,h,l,o,y,v,k,A,b,N,L,m,c,I]),Fe.useEffect(A,[h,A]);let D=Fe.useMemo(()=>({onKeyDown:k,onPointerDown:R,onClick:R}),[k,R]),G=Fe.useMemo(()=>({onKeyDown:k,onPointerDown:_,onMouseDown:_,onClickCapture:B,onMouseDownCapture(U){B(),S(U)},onPointerDownCapture(U){B(),S(U)},onMouseUpCapture:B,onTouchEndCapture:B,onTouchMoveCapture:B}),[k,B,S,_]);return Fe.useMemo(()=>o?{reference:D,floating:G,trigger:D}:{},[o,D,G])}var Ce=g(V(),1);function ol(e,t,o){let{reference:r,floating:n}=e,s=Le(t),i=Qo(t),a=Zo(i),u=Re(t),c=s==="y",l=r.x+r.width/2-n.width/2,f=r.y+r.height/2-n.height/2,p=r[a]/2-n[a]/2,m;switch(u){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:f};break;case"left":m={x:r.x-n.width,y:f};break;default:m={x:r.x,y:r.y}}switch(at(t)){case"start":m[i]-=p*(o&&c?-1:1);break;case"end":m[i]+=p*(o&&c?-1:1);break}return m}async function sl(e,t){var o;t===void 0&&(t={});let{x:r,y:n,platform:s,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:l="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=it(t,e),d=Hr(m),x=a[p?f==="floating"?"reference":"floating":f],b=eo(await s.getClippingRect({element:(o=await(s.isElement==null?void 0:s.isElement(x)))==null||o?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:l,strategy:u})),y=f==="floating"?{x:r,y:n,width:i.floating.width,height:i.floating.height}:i.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),w=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},T=eo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:u}):y);return{top:(b.top-T.top+d.top)/w.y,bottom:(T.bottom-b.bottom+d.bottom)/w.y,left:(b.left-T.left+d.left)/w.x,right:(T.right-b.right+d.right)/w.x}}var Up=50,il=async(e,t,o)=>{let{placement:r="bottom",strategy:n="absolute",middleware:s=[],platform:i}=o,a=i.detectOverflow?i:{...i,detectOverflow:sl},u=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:l,y:f}=ol(c,r,u),p=r,m=0,d={};for(let h=0;h<s.length;h++){let x=s[h];if(!x)continue;let{name:b,fn:y}=x,{x:v,y:w,data:T,reset:E}=await y({x:l,y:f,initialPlacement:r,placement:p,strategy:n,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});l=v??l,f=w??f,d[b]={...d[b],...T},E&&m<Up&&(m++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):E.rects),{x:l,y:f}=ol(c,p,u)),h=-1)}return{x:l,y:f,placement:p,strategy:n,middlewareData:d}};var al=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:u,elements:c}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:h=!0,...x}=it(e,t);if((o=s.arrow)!=null&&o.alignmentOffset)return{};let b=Re(n),y=Le(a),v=Re(a)===a,w=await(u.isRTL==null?void 0:u.isRTL(c.floating)),T=p||(v||!h?[Go(a)]:Ka(a)),E=d!=="none";!p&&E&&T.push(...Ga(a,h,d,w));let C=[a,...T],P=await u.detectOverflow(t,x),O=[],I=((r=s.flip)==null?void 0:r.overflows)||[];if(l&&O.push(P[b]),f){let L=qa(n,i,w);O.push(P[L[0]],P[L[1]])}if(I=[...I,{placement:n,overflows:O}],!O.every(L=>L<=0)){var Y,A;let L=(((Y=s.flip)==null?void 0:Y.index)||0)+1,R=C[L];if(R&&(!(f==="alignment"?y!==Le(R):!1)||I.every(S=>Le(S.placement)===y?S.overflows[0]>0:!0)))return{data:{index:L,overflows:I},reset:{placement:R}};let k=(A=I.filter(B=>B.overflows[0]<=0).sort((B,S)=>B.overflows[1]-S.overflows[1])[0])==null?void 0:A.placement;if(!k)switch(m){case"bestFit":{var N;let B=(N=I.filter(S=>{if(E){let _=Le(S.placement);return _===y||_==="y"}return!0}).map(S=>[S.placement,S.overflows.filter(_=>_>0).reduce((_,D)=>_+D,0)]).sort((S,_)=>S[1]-_[1])[0])==null?void 0:N[0];B&&(k=B);break}case"initialPlacement":k=a;break}if(n!==k)return{reset:{placement:k}}}return{}}}};function rl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nl(e){return za.some(t=>e[t]>=0)}var ll=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o,platform:r}=t,{strategy:n="referenceHidden",...s}=it(e,t);switch(n){case"referenceHidden":{let i=await r.detectOverflow(t,{...s,elementContext:"reference"}),a=rl(i,o.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:nl(a)}}}case"escaped":{let i=await r.detectOverflow(t,{...s,altBoundary:!0}),a=rl(i,o.floating);return{data:{escapedOffsets:a,escaped:nl(a)}}}default:return{}}}}};var cl=new Set(["left","top"]);async function Wp(e,t){let{placement:o,platform:r,elements:n}=e,s=await(r.isRTL==null?void 0:r.isRTL(n.floating)),i=Re(o),a=at(o),u=Le(o)==="y",c=cl.has(i)?-1:1,l=s&&u?-1:1,f=it(t,e),{mainAxis:p,crossAxis:m,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof d=="number"&&(m=a==="end"?d*-1:d),u?{x:m*l,y:p*c}:{x:p*c,y:m*l}}var ul=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,u=await Wp(t,e);return i===((o=a.offset)==null?void 0:o.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:n+u.x,y:s+u.y,data:{...u,placement:i}}}}},fl=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:u={fn:b=>{let{x:y,y:v}=b;return{x:y,y:v}}},...c}=it(e,t),l={x:o,y:r},f=await s.detectOverflow(t,c),p=Le(Re(n)),m=Vr(p),d=l[m],h=l[p];if(i){let b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",v=d+f[b],w=d-f[y];d=Jo(v,d,w)}if(a){let b=p==="y"?"top":"left",y=p==="y"?"bottom":"right",v=h+f[b],w=h-f[y];h=Jo(v,h,w)}let x=u.fn({...t,[m]:d,[p]:h});return{...x,data:{x:x.x-o,y:x.y-r,enabled:{[m]:i,[p]:a}}}}}},dl=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:u=!0,crossAxis:c=!0}=it(e,t),l={x:o,y:r},f=Le(n),p=Vr(f),m=l[p],d=l[f],h=it(a,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){let v=p==="y"?"height":"width",w=s.reference[p]-s.floating[v]+x.mainAxis,T=s.reference[p]+s.reference[v]-x.mainAxis;m<w?m=w:m>T&&(m=T)}if(c){var b,y;let v=p==="y"?"width":"height",w=cl.has(Re(n)),T=s.reference[f]-s.floating[v]+(w&&((b=i.offset)==null?void 0:b[f])||0)+(w?0:x.crossAxis),E=s.reference[f]+s.reference[v]+(w?0:((y=i.offset)==null?void 0:y[f])||0)-(w?x.crossAxis:0);d<T?d=T:d>E&&(d=E)}return{[p]:m,[f]:d}}}},pl=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:u=()=>{},...c}=it(e,t),l=await i.detectOverflow(t,c),f=Re(n),p=at(n),m=Le(n)==="y",{width:d,height:h}=s.floating,x,b;f==="top"||f==="bottom"?(x=f,b=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,x=p==="end"?"top":"bottom");let y=h-l.top-l.bottom,v=d-l.left-l.right,w=Lt(h-l[x],y),T=Lt(d-l[b],v),E=!t.middlewareData.shift,C=w,P=T;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(P=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=y),E&&!p){let I=Ie(l.left,0),Y=Ie(l.right,0),A=Ie(l.top,0),N=Ie(l.bottom,0);m?P=d-2*(I!==0||Y!==0?I+Y:Ie(l.left,l.right)):C=h-2*(A!==0||N!==0?A+N:Ie(l.top,l.bottom))}await u({...t,availableWidth:P,availableHeight:C});let O=await i.getDimensions(a.floating);return d!==O.width||h!==O.height?{reset:{rects:!0}}:{}}}};function yl(e){let t=Te(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=xe(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r,a=Bt(o)!==s||Bt(r)!==i;return a&&(o=s,r=i),{width:o,height:r,$:a}}function ds(e){return H(e)?e:e.contextElement}function Eo(e){let t=ds(e);if(!xe(t))return st(1);let o=t.getBoundingClientRect(),{width:r,height:n,$:s}=yl(t),i=(s?Bt(o.width):o.width)/r,a=(s?Bt(o.height):o.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}var $p=st(0);function xl(e){let t=le(e);return!Nr()||!t.visualViewport?$p:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Yp(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==le(e)?!1:t}function oo(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let n=e.getBoundingClientRect(),s=ds(e),i=st(1);t&&(r?H(r)&&(i=Eo(r)):i=Eo(e));let a=Yp(s,o,r)?xl(s):st(0),u=(n.left+a.x)/i.x,c=(n.top+a.y)/i.y,l=n.width/i.x,f=n.height/i.y;if(s){let p=le(s),m=r&&H(r)?le(r):r,d=p,h=Dr(d);for(;h&&r&&m!==d;){let x=Eo(h),b=h.getBoundingClientRect(),y=Te(h),v=b.left+(h.clientLeft+parseFloat(y.paddingLeft))*x.x,w=b.top+(h.clientTop+parseFloat(y.paddingTop))*x.y;u*=x.x,c*=x.y,l*=x.x,f*=x.y,u+=v,c+=w,d=le(h),h=Dr(d)}}return eo({width:l,height:f,x:u,y:c})}function Ur(e,t){let o=qo(e).scrollLeft;return t?t.left+o:oo(tt(e)).left+o}function bl(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Ur(e,o),n=o.top+t.scrollTop;return{x:r,y:n}}function zp(e){let{elements:t,rect:o,offsetParent:r,strategy:n}=e,s=n==="fixed",i=tt(r),a=t?zo(t.floating):!1;if(r===i||a&&s)return o;let u={scrollLeft:0,scrollTop:0},c=st(1),l=st(0),f=xe(r);if((f||!f&&!s)&&((Jt(r)!=="body"||bo(i))&&(u=qo(r)),f)){let m=oo(r);c=Eo(r),l.x=m.x+r.clientLeft,l.y=m.y+r.clientTop}let p=i&&!f&&!s?bl(i,u):st(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-u.scrollLeft*c.x+l.x+p.x,y:o.y*c.y-u.scrollTop*c.y+l.y+p.y}}function qp(e){return Array.from(e.getClientRects())}function Kp(e){let t=tt(e),o=qo(e),r=e.ownerDocument.body,n=Ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-o.scrollLeft+Ur(e),a=-o.scrollTop;return Te(r).direction==="rtl"&&(i+=Ie(t.clientWidth,r.clientWidth)-n),{width:n,height:s,x:i,y:a}}var ml=25;function Gp(e,t){let o=le(e),r=tt(e),n=o.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,u=0;if(n){s=n.width,i=n.height;let l=Nr();(!l||l&&t==="fixed")&&(a=n.offsetLeft,u=n.offsetTop)}let c=Ur(r);if(c<=0){let l=r.ownerDocument,f=l.body,p=getComputedStyle(f),m=l.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,d=Math.abs(r.clientWidth-f.clientWidth-m);d<=ml&&(s-=d)}else c<=ml&&(s+=c);return{width:s,height:i,x:a,y:u}}function Xp(e,t){let o=oo(e,!0,t==="fixed"),r=o.top+e.clientTop,n=o.left+e.clientLeft,s=xe(e)?Eo(e):st(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,u=n*s.x,c=r*s.y;return{width:i,height:a,x:u,y:c}}function gl(e,t,o){let r;if(t==="viewport")r=Gp(e,o);else if(t==="document")r=Kp(tt(e));else if(H(t))r=Xp(t,o);else{let n=xl(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return eo(r)}function wl(e,t){let o=et(e);return o===t||!H(o)||ot(o)?!1:Te(o).position==="fixed"||wl(o,t)}function Jp(e,t){let o=t.get(e);if(o)return o;let r=Nt(e,[],!1).filter(a=>H(a)&&Jt(a)!=="body"),n=null,s=Te(e).position==="fixed",i=s?et(e):e;for(;H(i)&&!ot(i);){let a=Te(i),u=Ar(i);!u&&a.position==="fixed"&&(n=null),(s?!u&&!n:!u&&a.position==="static"&&!!n&&(n.position==="absolute"||n.position==="fixed")||bo(i)&&!u&&wl(e,i))?r=r.filter(l=>l!==i):n=a,i=et(i)}return t.set(e,r),r}function Zp(e){let{element:t,boundary:o,rootBoundary:r,strategy:n}=e,i=[...o==="clippingAncestors"?zo(t)?[]:Jp(t,this._c):[].concat(o),r],a=gl(t,i[0],n),u=a.top,c=a.right,l=a.bottom,f=a.left;for(let p=1;p<i.length;p++){let m=gl(t,i[p],n);u=Ie(m.top,u),c=Lt(m.right,c),l=Lt(m.bottom,l),f=Ie(m.left,f)}return{width:c-f,height:l-u,x:f,y:u}}function Qp(e){let{width:t,height:o}=yl(e);return{width:t,height:o}}function em(e,t,o){let r=xe(t),n=tt(t),s=o==="fixed",i=oo(e,!0,s,t),a={scrollLeft:0,scrollTop:0},u=st(0);function c(){u.x=Ur(n)}if(r||!r&&!s)if((Jt(t)!=="body"||bo(n))&&(a=qo(t)),r){let m=oo(t,!0,s,t);u.x=m.x+t.clientLeft,u.y=m.y+t.clientTop}else n&&c();s&&!r&&n&&c();let l=n&&!r&&!s?bl(n,a):st(0),f=i.left+a.scrollLeft-u.x-l.x,p=i.top+a.scrollTop-u.y-l.y;return{x:f,y:p,width:i.width,height:i.height}}function fs(e){return Te(e).position==="static"}function hl(e,t){if(!xe(e)||Te(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return tt(e)===o&&(o=o.ownerDocument.body),o}function vl(e,t){let o=le(e);if(zo(e))return o;if(!xe(e)){let n=et(e);for(;n&&!ot(n);){if(H(n)&&!fs(n))return n;n=et(n)}return o}let r=hl(e,t);for(;r&&Ea(r)&&fs(r);)r=hl(r,t);return r&&ot(r)&&fs(r)&&!Ar(r)?o:r||Ta(e)||o}var tm=async function(e){let t=this.getOffsetParent||vl,o=this.getDimensions,r=await o(e.floating);return{reference:em(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function om(e){return Te(e).direction==="rtl"}var ps={convertOffsetParentRelativeRectToViewportRelativeRect:zp,getDocumentElement:tt,getClippingRect:Zp,getOffsetParent:vl,getElementRects:tm,getClientRects:qp,getDimensions:Qp,getScale:Eo,isElement:H,isRTL:om};function Rl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function rm(e,t){let o=null,r,n=tt(e);function s(){var a;clearTimeout(r),(a=o)==null||a.disconnect(),o=null}function i(a,u){a===void 0&&(a=!1),u===void 0&&(u=1),s();let c=e.getBoundingClientRect(),{left:l,top:f,width:p,height:m}=c;if(a||t(),!p||!m)return;let d=Xo(f),h=Xo(n.clientWidth-(l+p)),x=Xo(n.clientHeight-(f+m)),b=Xo(l),v={rootMargin:-d+"px "+-h+"px "+-x+"px "+-b+"px",threshold:Ie(0,Lt(1,u))||1},w=!0;function T(E){let C=E[0].intersectionRatio;if(C!==u){if(!w)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Rl(c,e.getBoundingClientRect())&&i(),w=!1}try{o=new IntersectionObserver(T,{...v,root:n.ownerDocument})}catch{o=new IntersectionObserver(T,v)}o.observe(e)}return i(!0),s}function er(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:u=!1}=r,c=ds(e),l=n||s?[...c?Nt(c):[],...t?Nt(t):[]]:[];l.forEach(b=>{n&&b.addEventListener("scroll",o,{passive:!0}),s&&b.addEventListener("resize",o)});let f=c&&a?rm(c,o):null,p=-1,m=null;i&&(m=new ResizeObserver(b=>{let[y]=b;y&&y.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var v;(v=m)==null||v.observe(t)})),o()}),c&&!u&&m.observe(c),t&&m.observe(t));let d,h=u?oo(e):null;u&&x();function x(){let b=oo(e);h&&!Rl(h,b)&&o(),h=b,d=requestAnimationFrame(x)}return o(),()=>{var b;l.forEach(y=>{n&&y.removeEventListener("scroll",o),s&&y.removeEventListener("resize",o)}),f?.(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(d)}}var El=ul;var Tl=fl,Sl=al,Cl=pl,Pl=ll;var Ol=dl,Wr=(e,t,o)=>{let r=new Map,n={platform:ps,...o},s={...n.platform,_c:r};return il(e,t,{...n,platform:s})};var ge=g(V(),1),kl=g(V(),1),Il=g(Dt(),1),sm=typeof document<"u",im=function(){},$r=sm?kl.useLayoutEffect:im;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 Al(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _l(e,t){let o=Al(e);return Math.round(t*o)/o}function ms(e){let t=ge.useRef(e);return $r(()=>{t.current=e}),t}function Nl(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:u,open:c}=e,[l,f]=ge.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ge.useState(r);Yr(p,r)||m(r);let[d,h]=ge.useState(null),[x,b]=ge.useState(null),y=ge.useCallback(S=>{S!==E.current&&(E.current=S,h(S))},[]),v=ge.useCallback(S=>{S!==C.current&&(C.current=S,b(S))},[]),w=s||d,T=i||x,E=ge.useRef(null),C=ge.useRef(null),P=ge.useRef(l),O=u!=null,I=ms(u),Y=ms(n),A=ms(c),N=ge.useCallback(()=>{if(!E.current||!C.current)return;let S={placement:t,strategy:o,middleware:p};Y.current&&(S.platform=Y.current),Wr(E.current,C.current,S).then(_=>{let D={..._,isPositioned:A.current!==!1};L.current&&!Yr(P.current,D)&&(P.current=D,Il.flushSync(()=>{f(D)}))})},[p,t,o,Y,A]);$r(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(S=>({...S,isPositioned:!1})))},[c]);let L=ge.useRef(!1);$r(()=>(L.current=!0,()=>{L.current=!1}),[]),$r(()=>{if(w&&(E.current=w),T&&(C.current=T),w&&T){if(I.current)return I.current(w,T,N);N()}},[w,T,N,I,O]);let R=ge.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:v}),[y,v]),k=ge.useMemo(()=>({reference:w,floating:T}),[w,T]),B=ge.useMemo(()=>{let S={position:o,left:0,top:0};if(!k.floating)return S;let _=_l(k.floating,l.x),D=_l(k.floating,l.y);return a?{...S,transform:"translate("+_+"px, "+D+"px)",...Al(k.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:_,top:D}},[o,a,k.floating,l.x,l.y]);return ge.useMemo(()=>({...l,update:N,refs:R,elements:k,floatingStyles:B}),[l,N,R,k,B])}var gs=(e,t)=>{let o=El(e);return{name:o.name,fn:o.fn,options:[e,t]}},hs=(e,t)=>{let o=Tl(e);return{name:o.name,fn:o.fn,options:[e,t]}},ys=(e,t)=>({fn:Ol(e).fn,options:[e,t]}),xs=(e,t)=>{let o=Sl(e);return{name:o.name,fn:o.fn,options:[e,t]}},bs=(e,t)=>{let o=Cl(e);return{name:o.name,fn:o.fn,options:[e,t]}};var ws=(e,t)=>{let o=Pl(e);return{name:o.name,fn:o.fn,options:[e,t]}};var Co=g(V(),1),Gl=g(Dt(),1);var ql=g(V(),1);var q=(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=(u,c,l,f)=>{let p=e(u,c,l,f),m=t(u,c,l,f),d=o(u,c,l,f),h=r(u,c,l,f),x=n(u,c,l,f);return s(p,m,d,h,x,c,l,f)};else if(e&&t&&o&&r&&n)a=(u,c,l,f)=>{let p=e(u,c,l,f),m=t(u,c,l,f),d=o(u,c,l,f),h=r(u,c,l,f);return n(p,m,d,h,c,l,f)};else if(e&&t&&o&&r)a=(u,c,l,f)=>{let p=e(u,c,l,f),m=t(u,c,l,f),d=o(u,c,l,f);return r(p,m,d,c,l,f)};else if(e&&t&&o)a=(u,c,l,f)=>{let p=e(u,c,l,f),m=t(u,c,l,f);return o(p,m,c,l,f)};else if(e&&t)a=(u,c,l,f)=>{let p=e(u,c,l,f);return t(p,c,l,f)};else if(e)a=e;else throw new Error("Missing arguments");return a};var Yl=g(V(),1),Cs=g(Rs(),1),zl=g(Vl(),1);var Hl=g(V(),1);var Es=[],Ts;function Ul(){return Ts}function Wl(e){Es.push(e)}function Ss(e){let t=(o,r)=>{let n=ve(Tm).current,s;try{Ts=n;for(let i of Es)i.before(n);s=e(o,r);for(let i of Es)i.after(n);n.didInitialize=!0}finally{Ts=void 0}return s};return t.displayName=e.displayName||e.name,t}function $l(e){return Hl.forwardRef(Ss(e))}function Tm(){return{didInitialize:!1}}var Sm=go(19),Cm=Sm?Om:_m;function qr(e,t,o,r,n){return Cm(e,t,o,r,n)}function Pm(e,t,o,r,n){let s=Yl.useCallback(()=>t(e.getSnapshot(),o,r,n),[e,t,o,r,n]);return(0,Cs.useSyncExternalStore)(e.subscribe,s,s)}Wl({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,Cs.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Om(e,t,o,r,n){let s=Ul();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.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 _m(e,t,o,r,n){return(0,zl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,s=>t(s,o,r,n))}var Kr=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 qr(this,t,o,r,n)}};var ro=g(V(),1);var So=class extends Kr{constructor(t,o={},r){super(t),this.context=o,this.selectors=r}useSyncedValue(t,o){ro.useDebugValue(t);let r=this;F(()=>{r.state[t]!==o&&r.set(t,o)},[r,t,o])}useSyncedValueWithCleanup(t,o){let r=this;F(()=>(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);F(()=>{o.update(t)},[o,...r])}useControlledProp(t,o){ro.useDebugValue(t);let r=this,n=o!==void 0;F(()=>{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 ro.useDebugValue(t),qr(this,this.selectors[t],o,r,n)}useContextCallback(t,o){ro.useDebugValue(t);let r=W(o??It);this.context[t]=r}useStateSetter(t){let o=ro.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 km={open:q(e=>e.open),transitionStatus:q(e=>e.transitionStatus),domReferenceElement:q(e=>e.domReferenceElement),referenceElement:q(e=>e.positionReference??e.referenceElement),floatingElement:q(e=>e.floatingElement),floatingId:q(e=>e.floatingId)},pt=class extends So{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:el(),nested:r,triggerElements:s},km),this.syncOnly=o}syncOpenEvent=(t,o)=>{(!t||!this.state.open||o!=null&&Ba(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 Kl(e){let{popupStore:t,treatPopupAsFloatingElement:o=!1,floatingRootContext:r,floatingId:n,nested:s,onOpenChange:i}=e,a=t.useState("open"),u=t.useState("activeTriggerElement"),c=t.useState(o?"popupElement":"positionerElement"),l=t.context.triggerElements,f=i,p=ql.useRef(null);r===void 0&&p.current===null&&(p.current=new pt({open:a,transitionStatus:void 0,referenceElement:u,floatingElement:c,triggerElements:l,onOpenChange:f,floatingId:n,syncOnly:!0,nested:s}));let m=r??p.current;return t.useSyncedValue("floatingId",n),F(()=>{let d={open:a,floatingId:n,referenceElement:u,floatingElement:c};H(u)&&(d.domReferenceElement=u),m.state.positionReference===m.state.referenceElement&&(d.positionReference=u),m.update(d)},[a,n,u,c,m]),m.context.onOpenChange=f,m.context.nested=s,m}var Xl={tabIndex:-1,[os]:""};function Jl(e,t,o=!1){let r=At(),n=Ro()!=null,s=Co.useRef(null);e===void 0&&s.current===null&&(s.current=t(r,n));let i=e??s.current;return Kl({popupStore:i,treatPopupAsFloatingElement:o,floatingRootContext:i.state.floatingRootContext,floatingId:r,nested:n,onOpenChange:i.setOpen}),{store:i,internalStore:s.current}}function Im(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,u=t.context.triggerElements.getById(i);a&&u===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 Am(e,t,o,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);let n=o?.id??null;(n||t)&&(e.activeTriggerId=n,e.activeTriggerElement=o??null)}function Nm(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function Zl(e,t,o,r={}){let n=o.reason,s=n===$.triggerHover,i=t&&n===$.triggerFocus,a=!t&&(n===$.triggerPress||n===$.escapeKey),u=Nm(o);if(e.context.onOpenChange?.(t,o),o.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,o);let c=()=>{let l={...r.extraState,open:t};i?l.instantType="focus":a?l.instantType="dismiss":s&&(l.instantType=void 0),Am(l,t,o.trigger,u()),e.update(l)};s?Gl.flushSync(c):c()}function Ql(e,t,o,r){Ia(()=>{t===void 0&&e.state.open===!1&&o&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function ec(e,t,o,r){let n=o.useState("isMountedByTrigger",e),s=Im(e,o),i=W(a=>{if(s(a),!a)return;let u=o.select("open"),c=o.select("activeTriggerId");if(c===e){o.update({activeTriggerElement:a,...u?r:null});return}c==null&&u&&o.update({activeTriggerId:e,activeTriggerElement:a,...r})});return F(()=>{n&&o.update({activeTriggerElement:t.current,...r})},[n,o,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:n}}function tc(e,t={}){let{closeOnActiveTriggerUnmount:o=!1}=t,r=e.useState("open"),n=e.useState("triggerCount");F(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}let s=e.context.triggerElements.size,i={};e.state.triggerCount!==s&&(i.triggerCount=s);let a=e.select("activeTriggerId"),u=null;if(a){let c=e.context.triggerElements.getById(a);c?c!==e.state.activeTriggerElement&&(i.activeTriggerElement=c):u=a}if(!u&&!a&&s===1){let c=e.context.triggerElements.entries().next();if(!c.done){let[l,f]=c.value;i.activeTriggerId=l,i.activeTriggerElement=f}}(i.triggerCount!==void 0||i.activeTriggerId!==void 0||i.activeTriggerElement!==void 0)&&e.update(i),u&&o&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===u&&!e.context.triggerElements.getById(u)){let c=J($.none);e.setOpen(!1,c),c.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,n,o])}function oc(e,t,o){let{mounted:r,setMounted:n,transitionStatus:s}=va(e),i=t.useState("preventUnmountingOnClose"),a=e?!1:i;t.useSyncedValues({mounted:r,transitionStatus:s,preventUnmountingOnClose:a});let u=W(()=>{n(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),o?.(),t.context.onOpenChangeComplete?.(!1)});return Mr({enabled:r&&!e&&!a,open:e,ref:t.context.popupRef,onComplete(){e||u()}}),{forceUnmount:u,transitionStatus:s}}function rc(e,t){e.useSyncedValues(t),F(()=>()=>{e.update({activeTriggerProps:fe,inactiveTriggerProps:fe,popupProps:fe})},[e])}var jt=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 nc(){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new jt,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function ic(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:nc(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:fe,inactiveTriggerProps:fe,popupProps:fe}}function ac(e,t,o=!1){return new pt({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0})}var tr=q(e=>e.triggerIdProp??e.activeTriggerId),Ps=q(e=>e.openProp??e.open),sc=q(e=>(e.popupElement?.id??e.floatingId)||void 0);function lc(e,t){return t!==void 0&&Ps(e)&&tr(e)===t}function Dm(e,t){return lc(e,t)?!0:t!==void 0&&Ps(e)&&tr(e)==null&&e.triggerCount===1}var cc={open:Ps,mounted:q(e=>e.mounted),transitionStatus:q(e=>e.transitionStatus),floatingRootContext:q(e=>e.floatingRootContext),triggerCount:q(e=>e.triggerCount),preventUnmountingOnClose:q(e=>e.preventUnmountingOnClose),payload:q(e=>e.payload),activeTriggerId:tr,activeTriggerElement:q(e=>e.mounted?e.activeTriggerElement:null),popupId:sc,isTriggerActive:q((e,t)=>t!==void 0&&tr(e)===t),isOpenedByTrigger:q((e,t)=>lc(e,t)),isMountedByTrigger:q((e,t)=>t!==void 0&&tr(e)===t&&e.mounted),triggerProps:q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:q((e,t)=>Dm(e,t)?sc(e):void 0),popupProps:q(e=>e.popupProps),popupElement:q(e=>e.popupElement),positionerElement:q(e=>e.positionerElement)};function uc(e){let{open:t=!1,onOpenChange:o,elements:r={}}=e,n=At(),s=Ro()!=null,i=ve(()=>new pt({open:t,transitionStatus:void 0,onOpenChange:o,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new jt,floatingId:n,syncOnly:!1,nested:s})).current;return F(()=>{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 Os(e={}){let{nodeId:t,externalTree:o}=e,r=uc(e),n=e.rootContext||r,s=n.useState("referenceElement"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),u=n.useState("open"),c=n.useState("floatingId"),[l,f]=Ce.useState(null),[p,m]=Ce.useState(void 0),[d,h]=Ce.useState(void 0),x=Ce.useRef(null),b=Ft(o),y=Ce.useMemo(()=>({reference:s,floating:i,domReference:a}),[s,i,a]),v=Nl({...e,elements:{...y,...l&&{reference:l}}}),w=H(p)?p:null,T=d===void 0?n.state.floatingElement:d;n.useSyncedValue("referenceElement",p??null),n.useSyncedValue("domReferenceElement",p===void 0?a:w),n.useSyncedValue("floatingElement",T);let E=Ce.useCallback(A=>{let N=H(A)?{getBoundingClientRect:()=>A.getBoundingClientRect(),getClientRects:()=>A.getClientRects(),contextElement:A}:A;f(N),v.refs.setReference(N)},[v.refs]),C=Ce.useCallback(A=>{(H(A)||A===null)&&(x.current=A,m(A)),(H(v.refs.reference.current)||v.refs.reference.current===null||A!==null&&!H(A))&&v.refs.setReference(A)},[v.refs,m]),P=Ce.useCallback(A=>{h(A),v.refs.setFloating(A)},[v.refs]),O=Ce.useMemo(()=>({...v.refs,setReference:C,setFloating:P,setPositionReference:E,domReference:x}),[v.refs,C,P,E]),I=Ce.useMemo(()=>({...v.elements,domReference:a}),[v.elements,a]),Y=Ce.useMemo(()=>({...v,dataRef:n.context.dataRef,open:u,onOpenChange:n.setOpen,events:n.context.events,floatingId:c,refs:O,elements:I,nodeId:t,rootStore:n}),[v,O,I,t,n,u,c]);return F(()=>{a&&(x.current=a)},[a]),F(()=>{n.context.dataRef.current.floatingContext=Y;let A=b?.nodesRef.current.find(N=>N.id===t);A&&(A.context=Y)}),Ce.useMemo(()=>({...v,context:Y,refs:O,elements:I,rootStore:n}),[v,O,I,Y,n])}var mt=g(V(),1);var _s=vt.os.mac&&vt.engine.webkit;function ks(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),u=mt.useRef(null),c=mt.useRef(!0),l=rt();mt.useEffect(()=>{let p=n.select("domReferenceElement");if(!o)return;let m=le(p);function d(){let b=n.select("domReferenceElement");!n.select("open")&&xe(b)&&b===Lr(be(b))&&(a.current=!0)}function h(){c.current=!0}function x(){c.current=!1}return nt(ee(m,"blur",d),_s&&ee(m,"keydown",h,!0),_s&&ee(m,"pointerdown",x,!0))},[n,o]),mt.useEffect(()=>{if(!o)return;function p(m){if(m.reason===$.triggerPress||m.reason===$.escapeKey){let d=n.select("domReferenceElement");H(d)&&(u.current=d,a.current=!0)}}return s.on("openchange",p),()=>{s.off("openchange",p)}},[s,o,n]);let f=mt.useMemo(()=>{function p(){a.current=!1,u.current=null}return{onMouseLeave(){p()},onFocus(m){let d=m.currentTarget;if(a.current){if(u.current===d)return;p()}let h=ke(m.nativeEvent);if(H(h)){if(_s&&!m.relatedTarget){if(!c.current&&!ja(h))return}else if(!Va(h))return}let x=Mt(m.relatedTarget,n.context.triggerElements),{nativeEvent:b,currentTarget:y}=m,v=typeof r=="function"?r():r;if(n.select("open")&&x||v===0||v===void 0){n.setOpen(!0,J($.triggerFocus,b,y));return}l.start(v,()=>{a.current||n.setOpen(!0,J($.triggerFocus,b,y))})},onBlur(m){p();let d=m.relatedTarget,h=m.nativeEvent,x=H(d)&&d.hasAttribute(vo("focus-guard"))&&d.getAttribute("data-type")==="outside";l.start(0,()=>{let b=n.select("domReferenceElement"),y=Lr(be(b));!d&&y===b||te(i.current.floatingContext?.refs.floating.current,y)||te(b,y)||x||Mt(d??y,n.context.triggerElements)||n.setOpen(!1,J($.triggerFocus,h))})}}},[i,r,n,l]);return mt.useMemo(()=>o?{reference:f,trigger:f}:{},[o,f])}var As=g(V(),1);var Is=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 $e,this.restTimeout=new $e,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=ve(()=>t.hoverInteractionState??Is.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=o),ho(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Ns(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"),u=s.useState("domReferenceElement"),{dataRef:c}=s.context,l=Ft(),f=Ro(),p=Oo(s),m=rt(),d=W(()=>Fr(c.current.openEvent?.type,p.interactedInside)),h=W(()=>Ha(c.current.openEvent?.type)),x=W(()=>{Po(p)});F(()=>{i||(p.pointerType=void 0,p.restTimeoutPending=!1,p.interactedInside=!1,x())},[i,p,x]),As.useEffect(()=>x,[x]),F(()=>{if(o&&i&&p.handleCloseOptions?.blockPointerEvents&&h()&&H(u)&&a){let b=u,y=a,v=be(a),w=l?.nodesRef.current.find(P=>P.id===f)?.context?.elements.floating;w&&(w.style.pointerEvents="");let T=p.pointerEventsScopeElement!==y?p.pointerEventsScopeElement:null,E=w!==y?w:null,C=p.handleCloseOptions?.getScope?.()??T??E??b.closest("[data-rootownerid]")??v.body;return Xr(p,{scopeElement:C,referenceElement:b,floatingElement:y}),()=>{x()}}},[o,i,u,a,p,h,l,f,x]),As.useEffect(()=>{if(!o)return;function b(){return!!(l&&f&&Tt(l.nodesRef.current,f).length>0)}function y(P){let O=Et(r,"close",p.pointerType),I=()=>{s.setOpen(!1,J($.triggerHover,P)),l?.events.emit("floating.closed",P)};O?p.openChangeTimeout.start(O,I):(p.openChangeTimeout.clear(),I())}function v(P){let O=ke(P);if(!ns(O)){p.interactedInside=!1;return}p.interactedInside=O?.closest("[aria-haspopup]")!=null}function w(){p.openChangeTimeout.clear(),m.clear(),l?.events.off("floating.closed",E),x()}function T(P){if(b()&&l){l.events.on("floating.closed",E);return}if(Mt(P.relatedTarget,s.context.triggerElements))return;let O=c.current.floatingContext?.nodeId??n,I=P.relatedTarget;if(!(l&&O&&H(I)&&Tt(l.nodesRef.current,O,!1).some(A=>te(A.context?.elements.floating,I)))){if(p.handler){p.handler(P);return}x(),h()&&!d()&&y(P)}}function E(P){!l||!f||b()||m.start(0,()=>{l.events.off("floating.closed",E),s.setOpen(!1,J($.triggerHover,P)),l.events.emit("floating.closed",P)})}let C=a;return nt(C&&ee(C,"mouseenter",w),C&&ee(C,"mouseleave",T),C&&ee(C,"pointerdown",v,!0),()=>{l?.events.off("floating.closed",E)})},[o,a,s,c,r,n,h,d,x,p,l,f,m])}var Vt=g(V(),1),fc=g(Dt(),1);var Mm={current:null};function Ds(e,t={}){let{enabled:o=!0,delay:r=0,handleClose:n=null,mouseOnly:s=!1,restMs:i=0,move:a=!0,triggerElementRef:u=Mm,externalTree:c,isActiveTrigger:l=!0,getHandleCloseContext:f,isClosing:p,shouldOpen:m}=t,d="rootStore"in e?e.rootStore:e,{dataRef:h,events:x}=d.context,b=Ft(c),y=Oo(d),v=Vt.useRef(!1),w=Me(n),T=Me(r),E=Me(i),C=Me(o),P=Me(m),O=Me(p),I=W(()=>Fr(h.current.openEvent?.type,y.interactedInside)),Y=W(()=>P.current?.()!==!1),A=W((R,k,B)=>{let S=d.context.triggerElements;if(S.hasElement(k))return!R||!te(R,k);if(!H(B))return!1;let _=B;return S.hasMatchingElement(D=>te(D,_))&&(!R||!te(R,_))}),N=W(()=>{if(!y.handler)return;be(d.select("domReferenceElement")).removeEventListener("mousemove",y.handler),y.handler=void 0}),L=W(()=>{Po(y)});return l&&(y.handleCloseOptions=w.current?.__options),Vt.useEffect(()=>N,[N]),Vt.useEffect(()=>{if(!o)return;function R(k){k.open?v.current=!1:(v.current=k.reason===$.triggerHover,N(),y.openChangeTimeout.clear(),y.restTimeout.clear(),y.blockMouseMove=!0,y.restTimeoutPending=!1)}return x.on("openchange",R),()=>{x.off("openchange",R)}},[o,x,y,N]),Vt.useEffect(()=>{if(!o)return;function R(_,D=!0){let G=Et(T.current,"close",y.pointerType);G?y.openChangeTimeout.start(G,()=>{d.setOpen(!1,J($.triggerHover,_)),b?.events.emit("floating.closed",_)}):D&&(y.openChangeTimeout.clear(),d.setOpen(!1,J($.triggerHover,_)),b?.events.emit("floating.closed",_))}let k=u.current??(l?d.select("domReferenceElement"):null);if(!H(k))return;function B(_){if(y.openChangeTimeout.clear(),y.blockMouseMove=!1,s&&!Rt(y.pointerType))return;let D=ss(E.current),G=Et(T.current,"open",y.pointerType),U=ke(_),Q=_.currentTarget??null,Z=d.select("domReferenceElement"),ne=Q;if(H(U)&&!d.context.triggerElements.hasElement(U)){for(let ue of d.context.triggerElements.elements())if(te(ue,U)){ne=ue;break}}H(Q)&&H(Z)&&!d.context.triggerElements.hasElement(Q)&&te(Q,Z)&&(ne=Z);let z=ne==null?!1:A(Z,ne,U),ie=d.select("open"),ae=O.current?.()??d.select("transitionStatus")==="ending",de=!ie&&ae&&v.current,Oe=!z&&H(ne)&&H(Z)&&te(Z,ne)&&de,we=D>0&&!G,K=z&&(ie||de)||Oe,ce=!ie||z;if(K){Y()&&d.setOpen(!0,J($.triggerHover,_,ne));return}we||(G?y.openChangeTimeout.start(G,()=>{ce&&Y()&&d.setOpen(!0,J($.triggerHover,_,ne))}):ce&&Y()&&d.setOpen(!0,J($.triggerHover,_,ne)))}function S(_){if(I()){L();return}N();let D=d.select("domReferenceElement"),G=be(D);y.restTimeout.clear(),y.restTimeoutPending=!1;let U=h.current.floatingContext??f?.();if(Mt(_.relatedTarget,d.context.triggerElements))return;if(w.current&&U){d.select("open")||y.openChangeTimeout.clear();let Z=u.current;y.handler=w.current({...U,tree:b,x:_.clientX,y:_.clientY,onClose(){L(),N(),C.current&&!I()&&Z===d.select("domReferenceElement")&&R(_,!0)}}),G.addEventListener("mousemove",y.handler),y.handler(_);return}(y.pointerType!=="touch"||!te(d.select("floatingElement"),_.relatedTarget))&&R(_)}return a?nt(ee(k,"mousemove",B,{once:!0}),ee(k,"mouseenter",B),ee(k,"mouseleave",S)):nt(ee(k,"mouseenter",B),ee(k,"mouseleave",S))},[N,L,h,T,d,o,w,y,l,A,I,s,a,E,u,b,C,f,O,Y]),Vt.useMemo(()=>{if(!o)return;function R(k){y.pointerType=k.pointerType}return{onPointerDown:R,onPointerEnter:R,onMouseMove(k){let{nativeEvent:B}=k,S=k.currentTarget,_=d.select("domReferenceElement"),D=d.select("open"),G=A(_,S,k.target);if(s&&!Rt(y.pointerType))return;if(D&&G&&y.handleCloseOptions?.blockPointerEvents){let Z=d.select("floatingElement");if(Z){let ne=y.handleCloseOptions?.getScope?.()??S.ownerDocument.body;Xr(y,{scopeElement:ne,referenceElement:S,floatingElement:Z})}}let U=ss(E.current);if(D&&!G||U===0||!G&&y.restTimeoutPending&&k.movementX**2+k.movementY**2<2)return;y.restTimeout.clear();function Q(){if(y.restTimeoutPending=!1,I())return;let Z=d.select("open");!y.blockMouseMove&&(!Z||G)&&Y()&&d.setOpen(!0,J($.triggerHover,B,S))}y.pointerType==="touch"?fc.flushSync(()=>{Q()}):G&&D?Q():(y.restTimeoutPending=!0,y.restTimeout.start(U,Q))}}},[o,y,I,A,s,d,E,Y])}var dc=.1,Lm=dc*dc,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,u,c){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,u,c)&&(l=!l),Jr(e,t,u,c,o,r)&&(l=!l),l}function Bm(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),u=Math.min(r,s),c=Math.max(r,s);return e>=i&&e<=a&&t>=u&&t<=c}function Ms(e={}){let{blockPointerEvents:t=!1}=e,o=new $e,r=({x:n,y:s,placement:i,elements:a,onClose:u,nodeId:c,tree:l})=>{let f=i?.split("-")[0],p=!1,m=null,d=null,h=typeof performance<"u"?performance.now():0;function x(y,v){let w=performance.now(),T=w-h;if(m===null||d===null||T===0)return m=y,d=v,h=w,!1;let E=y-m,C=v-d,P=E*E+C*C,O=T*T*Lm;return m=y,d=v,h=w,P<O}function b(){o.clear(),u()}return function(v){o.clear();let w=a.domReference,T=a.floating;if(!w||!T||f==null||n==null||s==null)return;let{clientX:E,clientY:C}=v,P=ke(v),O=v.type==="mouseleave",I=te(T,P),Y=te(w,P);if(I&&(p=!0,!O))return;if(Y&&(p=!1,!O)){p=!0;return}if(O&&H(v.relatedTarget)&&te(T,v.relatedTarget))return;function A(){return!!(l&&Tt(l.nodesRef.current,c).length>0)}function N(){A()||b()}if(A())return;let L=w.getBoundingClientRect(),R=T.getBoundingClientRect(),k=n>R.right-R.width/2,B=s>R.bottom-R.height/2,S=R.width>L.width,_=R.height>L.height,D=(S?L:R).left,G=(S?L:R).right,U=(_?L:R).top,Q=(_?L:R).bottom;if(f==="top"&&s>=L.bottom-1||f==="bottom"&&s<=L.top+1||f==="left"&&n>=L.right-1||f==="right"&&n<=L.left+1){N();return}let Z=!1;switch(f){case"top":Z=Qr(E,C,D,L.top+1,G,R.bottom-1);break;case"bottom":Z=Qr(E,C,D,R.top+1,G,L.bottom-1);break;case"left":Z=Qr(E,C,R.right-1,Q,L.left+1,U);break;case"right":Z=Qr(E,C,L.right-1,Q,R.left+1,U);break;default:}if(Z)return;if(p&&!Bm(E,C,L)){N();return}if(!O&&x(E,C)){N();return}let ne=!1;switch(f){case"top":{let z=S?re/2:re*4,ie=S||k?n+z:n-z,ae=S?n-z:k?n+z:n-z,de=s+re+1,Oe=k||S?R.bottom-re:R.top,we=k?S?R.bottom-re:R.top:R.bottom-re;ne=Zr(E,C,ie,de,ae,de,R.left,Oe,R.right,we);break}case"bottom":{let z=S?re/2:re*4,ie=S||k?n+z:n-z,ae=S?n-z:k?n+z:n-z,de=s-re,Oe=k||S?R.top+re:R.bottom,we=k?S?R.top+re:R.bottom:R.top+re;ne=Zr(E,C,ie,de,ae,de,R.left,Oe,R.right,we);break}case"left":{let z=_?re/2:re*4,ie=_||B?s+z:s-z,ae=_?s-z:B?s+z:s-z,de=n+re+1,Oe=B||_?R.right-re:R.left,we=B?_?R.right-re:R.left:R.right-re;ne=Zr(E,C,Oe,R.top,we,R.bottom,de,ie,de,ae);break}case"right":{let z=_?re/2:re*4,ie=_||B?s+z:s-z,ae=_?s-z:B?s+z:s-z,de=n-re,Oe=B||_?R.left+re:R.right,we=B?_?R.left+re:R.right:R.left+re;ne=Zr(E,C,de,ie,de,ae,Oe,R.top,we,R.bottom);break}default:}ne?p||o.start(40,N):N()}};return r.__options={...e,blockPointerEvents:t},r}var Ls=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Gt.startingStyle]="startingStyle",e[e.endingStyle=Gt.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),or=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({}),Fm={[or.popupOpen]:""},Ov={[or.popupOpen]:"",[or.pressed]:""},jm={[Ls.open]:""},Vm={[Ls.closed]:""},Hm={[Ls.anchorHidden]:""},pc={open(e){return e?Fm:null}};var _o={open(e){return e?jm:Vm},anchorHidden(e){return e?Hm:null}};function mc(e){return go(19)?e:e?"true":void 0}var ze=g(V(),1);var Um=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:n,rects:s,platform:i,elements:a,middlewareData:u}=t,{element:c,padding:l=0,offsetParent:f="real"}=it(e,t)||{};if(c==null)return{};let p=Hr(l),m={x:o,y:r},d=Qo(n),h=Zo(d),x=await i.getDimensions(c),b=d==="y",y=b?"top":"left",v=b?"bottom":"right",w=b?"clientHeight":"clientWidth",T=s.reference[h]+s.reference[d]-m[d]-s.floating[h],E=m[d]-s.reference[d],C=f==="real"?await i.getOffsetParent?.(c):a.floating,P=a.floating[w]||s.floating[h];(!P||!await i.isElement?.(C))&&(P=a.floating[w]||s.floating[h]);let O=T/2-E/2,I=P/2-x[h]/2-1,Y=Math.min(p[y],I),A=Math.min(p[v],I),N=Y,L=P-x[h]-A,R=P/2-x[h]/2+O,k=Jo(N,R,L),B=!u.arrow&&at(n)!=null&&R!==k&&s.reference[h]/2-(R<N?Y:A)-x[h]/2<0,S=B?R<N?R-N:R-L:0;return{[d]:m[d]+S,data:{[d]:k,centerOffset:R-k-S,...B&&{alignmentOffset:S}},reset:B}}}),gc=(e,t)=>({...Um(e),options:[e,t]});var Wm=ws().fn,hc={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 Wm(e)).data?.referenceHidden||s}}}};var rr={sideX:"left",sideY:"top"},yc={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:n},platform:s,strategy:i,placement:a}=e,u=le(n),c=u.getComputedStyle(n);if(!(c.transitionDuration!=="0s"&&c.transitionDuration!==""))return{x:t,y:o,data:rr};let f=await s.getOffsetParent?.(n),p={width:0,height:0};if(i==="fixed"&&u?.visualViewport)p={width:u.visualViewport.width,height:u.visualViewport.height};else if(f===u){let y=be(n);p={width:y.documentElement.clientWidth,height:y.documentElement.clientHeight}}else await s.isElement?.(f)&&(p=await s.getDimensions(f));let m=Re(a),d=t,h=o;m==="left"&&(d=p.width-(t+r.width)),m==="top"&&(h=p.height-(o+r.height));let x=m==="left"?"right":rr.sideX,b=m==="top"?"bottom":rr.sideY;return{x:d,y:h,data:{sideX:x,sideY:b}}}};function wc(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 xc(e,t,o){let{rects:r,placement:n}=e;return{side:wc(t,Re(n),o),align:at(n)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function vc(e){let{anchor:t,positionMethod:o="absolute",side:r="bottom",sideOffset:n=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:u=5,sticky:c=!1,arrowPadding:l=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:d,mounted:h,collisionAvoidance:x,shiftCrossAxis:b=!1,nodeId:y,adaptiveOrigin:v,lazyFlip:w=!1,externalTree:T}=e,[E,C]=ze.useState(null);!h&&E!==null&&C(null);let P=x.side||"flip",O=x.align||"flip",I=x.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,A=W(Y),N=Y?A:t,L=Me(t),R=Me(h),B=mo()==="rtl",S=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":B?"left":"right","inline-start":B?"right":"left"}[r],_=s==="center"?S:`${S}-${s}`,D=u,G=1,U=r==="bottom"?G:0,Q=r==="top"?G:0,Z=r==="right"?G:0,ne=r==="left"?G:0;typeof D=="number"?D={top:D+U,right:D+ne,bottom:D+Q,left:D+Z}:D&&(D={top:(D.top||0)+U,right:(D.right||0)+ne,bottom:(D.bottom||0)+Q,left:(D.left||0)+Z});let z={boundary:a==="clipping-ancestors"?"clippingAncestors":a,padding:D},ie=ze.useRef(null),ae=Me(n),de=Me(i),Oe=typeof n!="function"?n:0,we=typeof i!="function"?i:0,K=[];p&&K.push(p),K.push(gs(oe=>{let _e=xc(oe,r,B),ft=typeof ae.current=="function"?ae.current(_e):ae.current,qe=typeof de.current=="function"?de.current(_e):de.current;return{mainAxis:ft,crossAxis:qe,alignmentAxis:qe}},[Oe,we,B,r]));let ce=O==="none"&&P!=="shift",ue=!ce&&(c||b||P==="shift"),Yt=P==="none"?null:xs({...z,padding:{top:D.top+G,right:D.right+G,bottom:D.bottom+G,left:D.left+G},mainAxis:!b&&P==="flip",crossAxis:O==="flip"?"alignment":!1,fallbackAxisSideDirection:I}),Je=ce?null:hs(oe=>{let _e=be(oe.elements.floating).documentElement;return{...z,rootBoundary:b?{x:0,y:0,width:_e.clientWidth,height:_e.clientHeight}:void 0,mainAxis:O!=="none",crossAxis:ue,limiter:c||b?void 0:ys(ft=>{if(!ie.current)return{};let{width:qe,height:xt}=ie.current.getBoundingClientRect(),Qe=Le(Re(ft.placement)),zt=Qe==="y"?qe:xt,ao=Qe==="y"?D.left+D.right:D.top+D.bottom;return{offset:zt/2+ao/2}})}},[z,c,b,D,O]);P==="shift"||O==="shift"||s==="center"?K.push(Je,Yt):K.push(Yt,Je),K.push(bs({...z,apply({elements:{floating:oe},availableWidth:_e,availableHeight:ft,rects:qe}){if(!R.current)return;let xt=oe.style;xt.setProperty("--available-width",`${_e}px`),xt.setProperty("--available-height",`${ft}px`);let Qe=le(oe).devicePixelRatio||1,{x:zt,y:ao,width:xr,height:Pn}=qe.reference,On=(Math.round((zt+xr)*Qe)-Math.round(zt*Qe))/Qe,_n=(Math.round((ao+Pn)*Qe)-Math.round(ao*Qe))/Qe;xt.setProperty("--anchor-width",`${On}px`),xt.setProperty("--anchor-height",`${_n}px`)}}),gc(oe=>({element:ie.current||be(oe.elements.floating).createElement("div"),padding:l,offsetParent:"floating"}),[l]),{name:"transformOrigin",fn(oe){let{elements:_e,middlewareData:ft,placement:qe,rects:xt,y:Qe}=oe,zt=Re(qe),ao=Le(zt),xr=ie.current,Pn=ft.arrow?.x||0,On=ft.arrow?.y||0,_n=xr?.clientWidth||0,Sf=xr?.clientHeight||0,kn=Pn+_n/2,pi=On+Sf/2,Cf=Math.abs(ft.shift?.y||0),Pf=xt.reference.height/2,Fo=typeof n=="function"?n(xc(oe,r,B)):n,Of=Cf>Fo,_f={top:`${kn}px calc(100% + ${Fo}px)`,bottom:`${kn}px ${-Fo}px`,left:`calc(100% + ${Fo}px) ${pi}px`,right:`${-Fo}px ${pi}px`}[zt],kf=`${kn}px ${xt.reference.y+Pf-Qe}px`;return _e.floating.style.setProperty("--transform-origin",ue&&ao==="y"&&Of?kf:_f),{}}},hc,v),F(()=>{!h&&d&&d.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,d]);let ht=ze.useMemo(()=>({elementResize:!f&&typeof ResizeObserver<"u",layoutShift:!f&&typeof IntersectionObserver<"u"}),[f]),{refs:Ze,elements:ut,x:fr,y:dr,middlewareData:ye,update:io,placement:M,context:j,isPositioned:pe,floatingStyles:Ee}=Os({rootContext:d,open:m?h:void 0,placement:_,middleware:K,strategy:o,whileElementsMounted:m?void 0:(...oe)=>er(...oe,ht),nodeId:y,externalTree:T}),{sideX:Pt,sideY:Bo}=ye.adaptiveOrigin||rr,yt=pe?o:"fixed",He=ze.useMemo(()=>{let oe=v?{position:yt,[Pt]:fr,[Bo]:dr}:{position:yt,...Ee};return pe||(oe.opacity=0),oe},[v,yt,Pt,fr,Bo,dr,Ee,pe]),Ot=ze.useRef(null);F(()=>{if(!h)return;let oe=L.current,_e=typeof oe=="function"?oe():oe,qe=(bc(_e)?_e.current:_e)||null||null;qe!==Ot.current&&(Ze.setPositionReference(qe),Ot.current=qe)},[h,Ze,N,L]),ze.useEffect(()=>{if(!h)return;let oe=L.current;typeof oe!="function"&&bc(oe)&&oe.current!==Ot.current&&(Ze.setPositionReference(oe.current),Ot.current=oe.current)},[h,Ze,N,L]),ze.useEffect(()=>{if(m&&h&&ut.reference&&ut.floating)return er(ut.reference,ut.floating,io,ht)},[m,h,ut,io,ht]);let _t=Re(M),pr=wc(r,_t,B),mr=at(M)||"center",gr=!!ye.hide?.referenceHidden;F(()=>{w&&h&&pe&&C(_t)},[w,h,pe,_t]);let hr=ze.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),yr=ye.arrow?.centerOffset!==0;return ze.useMemo(()=>({positionerStyles:He,arrowStyles:hr,arrowRef:ie,arrowUncentered:yr,side:pr,align:mr,physicalSide:_t,anchorHidden:gr,refs:Ze,context:j,isPositioned:pe,update:io}),[He,hr,ie,yr,pr,mr,_t,gr,Ze,j,pe,io])}function bc(e){return e!=null&&"current"in e}function en(e){return e==="starting"?Xa:fe}function Rc(e,t,{styles:o,transitionStatus:r,props:n,refs:s,hidden:i,inert:a=!1}){let u={...o};return a&&(u.pointerEvents="none"),De("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:u},en(r),n],stateAttributesMapping:_o})}var Pe=g(V(),1),Oc=g(Dt(),1);var Ec=g(V(),1);function Tc(e){let[t,o]=Ec.useState({current:e,previous:null});return e!==t.current&&o({current:e,previous:t.current}),t.previous}var ko=g(V(),1);function Bs(e){let t=Te(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,n=xe(e),s=n?e.offsetWidth:o,i=n?e.offsetHeight:r;return(Bt(o)!==s||Bt(r)!==i)&&(o=s,r=i),{width:o,height:r}}function Cc(e){let{popupElement:t,positionerElement:o,content:r,mounted:n,onMeasureLayout:s,onMeasureLayoutComplete:i,side:a,direction:u}=e,c=wo(t,!0,!1),l=yo(),f=ko.useRef(null),p=ko.useRef(!0),m=ko.useRef(It),d=W(s),h=W(i),x=ko.useMemo(()=>{let b=a==="top",y=a==="left";return u==="rtl"?(b=b||a==="inline-end",y=y||a==="inline-end"):(b=b||a==="inline-start",y=y||a==="inline-start"),b?{position:"absolute",[a==="top"?"bottom":"top"]:"0",[y?"right":"left"]:"0"}:fe},[a,u]);F(()=>{if(!n){m.current=It,p.current=!0,f.current=null;return}if(!t||!o)return;m.current=Sc(t,x),Fs(t,"auto");let b=on(t,"position","static"),y=on(t,"transform","none"),v=on(t,"scale","1"),w=Sc(o,{"--available-width":"max-content","--available-height":"max-content"});function T(){b(),y(),w()}function E(){T(),v()}if(d?.(),p.current||f.current===null){tn(o,"max-content");let I=Bs(t);return f.current=I,tn(o,I),E(),h?.(null,I),p.current=!1,()=>{m.current(),m.current=It}}tn(o,"max-content");let C=f.current,P=Bs(t);f.current=P,Fs(t,C),E(),h?.(C,P),tn(o,P);let O=new AbortController;return l.request(()=>{Fs(t,P),c(()=>{t.style.setProperty("--popup-width","auto"),t.style.setProperty("--popup-height","auto")},O.signal)}),()=>{O.abort(),l.cancel(),m.current(),m.current=It}},[r,t,o,c,l,n,d,h,x])}function on(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}function Sc(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())}:It}function Fs(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 tn(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 Io=g(X(),1);function _c(e){let{store:t,side:o,cssVars:r,children:n}=e,s=mo(),i=t.useState("activeTriggerElement"),a=t.useState("activeTriggerId"),u=t.useState("open"),c=t.useState("payload"),l=t.useState("mounted"),f=t.useState("popupElement"),p=t.useState("positionerElement"),m=Tc(u?i:null),d=zm(a,c),h=Pe.useRef(null),[x,b]=Pe.useState(null),[y,v]=Pe.useState(null),w=Pe.useRef(null),T=Pe.useRef(null),E=wo(w,!0,!1),C=yo(),[P,O]=Pe.useState(null),[I,Y]=Pe.useState(!1);F(()=>(t.set("hasViewport",!0),()=>{t.set("hasViewport",!1)}),[t]);let A=W(()=>{w.current?.style.setProperty("animation","none"),w.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),N=W(S=>{w.current?.style.removeProperty("animation"),w.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),S&&O(S)}),L=Pe.useRef(null);F(()=>{(!u||!l)&&(L.current=null)},[u,l]),F(()=>{if(i&&m&&i!==m&&L.current!==i&&h.current){b(h.current),Y(!0);let S=Ym(m,i);v(S),C.request(()=>{Oc.flushSync(()=>{Y(!1)}),E(()=>{b(null),O(null),h.current=null})}),L.current=i}},[i,m,x,E,C]),F(()=>{let S=w.current;if(!S)return;let _=be(S).createElement("div");for(let D of Array.from(S.childNodes))_.appendChild(D.cloneNode(!0));h.current=_});let R=x!=null,k;R?k=(0,Io.jsxs)(Pe.Fragment,{children:[(0,Io.jsx)("div",{"data-previous":!0,inert:mc(!0),ref:T,style:{...P?{[r.popupWidth]:`${P.width}px`,[r.popupHeight]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":I?void 0:""},"previous"),(0,Io.jsx)("div",{"data-current":!0,ref:w,"data-starting-style":I?"":void 0,children:n},d)]}):k=(0,Io.jsx)("div",{"data-current":!0,ref:w,children:n},d),F(()=>{let S=T.current;!S||!x||S.replaceChildren(...Array.from(x.childNodes))},[x]),Cc({popupElement:f,positionerElement:p,mounted:l,content:c,onMeasureLayout:A,onMeasureLayoutComplete:N,side:o,direction:s});let B={activationDirection:$m(y),transitioning:R};return{children:k,state:B}}function $m(e){if(e)return`${Pc(e.horizontal,5,"right","left")} ${Pc(e.vertical,5,"down","up")}`}function Pc(e,t,o,r){return e>t?o:e<-t?r:""}function Ym(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 zm(e,t){let[o,r]=Pe.useState(0),n=Pe.useRef(e),s=Pe.useRef(t),i=Pe.useRef(!1);return F(()=>{let a=n.current,u=s.current,c=e!==a,l=t!==u;c?(r(f=>f+1),i.current=!l):i.current&&l&&(r(f=>f+1),i.current=!1),n.current=e,s.current=t},[e,t]),`${e??"current"}-${o}`}var rn=g(V(),1),kc=g(Dt(),1);var Ic=g(X(),1),Ac=rn.forwardRef(function(t,o){let{children:r,container:n,className:s,render:i,style:a,...u}=t,{portalNode:c,portalSubtree:l}=ls({container:n,ref:o,componentProps:t,elementProps:u});return!l&&!c?null:(0,Ic.jsxs)(rn.Fragment,{children:[l,c&&kc.createPortal(r,c)]})});var je={};Ke(je,{Arrow:()=>Kc,Handle:()=>nr,Popup:()=>zc,Portal:()=>Uc,Positioner:()=>$c,Provider:()=>Gc,Root:()=>Dc,Trigger:()=>jc,Viewport:()=>Zc,createHandle:()=>Qc});var gt=g(V(),1);var nn=g(V(),1),js=nn.createContext(void 0);function Xe(e){let t=nn.useContext(js);if(t===void 0&&!e)throw new Error(Ne(72));return t}var Nc=g(V(),1);var qm={...cc,disabled:q(e=>e.disabled),instantType:q(e=>e.instantType),isInstantPhase:q(e=>e.isInstantPhase),trackCursorAxis:q(e=>e.trackCursorAxis),disableHoverablePopup:q(e=>e.disableHoverablePopup),lastOpenChangeReason:q(e=>e.openChangeReason),closeOnClick:q(e=>e.closeOnClick),closeDelay:q(e=>e.closeDelay),hasViewport:q(e=>e.hasViewport)},Ao=class e extends So{constructor(t,o,r=!1){let n=new jt,s={...Km(),...t};s.floatingRootContext=ac(n,o,r),super(s,{popupRef:Nc.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:n},qm)}setOpen=(t,o)=>{Zl(this,t,o,{extraState:{openChangeReason:o.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,J($.triggerPress,t))}static useStore(t,o){return Jl(t,(n,s)=>new e(o,n,s)).store}};function Km(){return{...ic(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var sn=g(X(),1),Dc=Ss(function(t){let{disabled:o=!1,defaultOpen:r=!1,open:n,disableHoverablePopup:s=!1,trackCursorAxis:i="none",actionsRef:a,onOpenChange:u,onOpenChangeComplete:c,handle:l,triggerId:f,defaultTriggerId:p=null,children:m}=t,d=Ao.useStore(l?.store,{open:r,openProp:n,activeTriggerId:p,triggerIdProp:f});Ql(d,n,r,p),d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",f),d.useContextCallback("onOpenChange",u),d.useContextCallback("onOpenChangeComplete",c);let h=d.useState("open"),x=!o&&h,b=d.useState("activeTriggerId"),y=d.useState("mounted"),v=d.useState("payload");d.useSyncedValues({trackCursorAxis:i,disableHoverablePopup:s}),d.useSyncedValue("disabled",o),tc(d,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:w,transitionStatus:T}=oc(x,d),E=d.useState("isInstantPhase"),C=d.useState("instantType"),P=d.useState("lastOpenChangeReason"),O=gt.useRef(null);F(()=>{h&&o&&d.setOpen(!1,J($.disabled))},[h,o,d]),F(()=>{T==="ending"&&P===$.none||T!=="ending"&&E?(C!=="delay"&&(O.current=C),d.set("instantType","delay")):O.current!==null&&(d.set("instantType",O.current),O.current=null)},[T,E,P,C,d]),F(()=>{x&&b==null&&d.set("payload",void 0)},[d,b,x]);let I=gt.useCallback(()=>{d.setOpen(!1,J($.imperativeAction))},[d]);gt.useImperativeHandle(a,()=>({unmount:w,close:I}),[w,I]);let Y=x||y||!o&&i!=="none";return(0,sn.jsxs)(js.Provider,{value:d,children:[Y&&(0,sn.jsx)(Gm,{store:d,disabled:o,trackCursorAxis:i}),typeof m=="function"?m({payload:v}):m]})});function Gm({store:e,disabled:t,trackCursorAxis:o}){let r=e.useState("floatingRootContext"),n=us(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),s=cs(r,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),i=gt.useMemo(()=>wt(s.reference,n.reference),[s.reference,n.reference]),a=gt.useMemo(()=>wt(s.trigger,n.trigger),[s.trigger,n.trigger]),u=gt.useMemo(()=>wt(Xl,s.floating,n.floating),[s.floating,n.floating]);return rc(e,{activeTriggerProps:i,inactiveTriggerProps:a,popupProps:u}),null}var ln=g(V(),1);var an=g(V(),1),Vs=an.createContext(void 0);function Mc(){return an.useContext(Vs)}var Lc=(function(e){return e[e.popupOpen=or.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});var Fc="data-base-ui-tooltip-trigger";function Bc(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 Xm(e){let t=e;for(;t;){if(t.hasAttribute(Fc))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 jc=$l(function(t,o){let{render:r,className:n,style:s,handle:i,payload:a,disabled:u,delay:c,closeOnClick:l=!0,closeDelay:f,id:p,...m}=t,d=Xe(!0),h=i?.store??d;if(!h)throw new Error(Ne(82));let x=ba(p),b=h.useState("isTriggerActive",x),y=h.useState("isOpenedByTrigger",x),v=h.useState("floatingRootContext"),w=ln.useRef(null),T=c??600,E=f??0,{registerTrigger:C,isMountedByThisTrigger:P}=ec(x,w,h,{payload:a,closeOnClick:l,closeDelay:E}),O=Mc(),{delayRef:I,isInstantPhase:Y,hasProvider:A}=as(v,{open:y}),N=Oo(v);h.useSyncedValue("isInstantPhase",Y);let L=h.useState("disabled"),R=u??L,k=Me(R),B=h.useState("trackCursorAxis"),S=h.useState("disableHoverablePopup"),_=ln.useRef(!1),D=rt(),G=ln.useRef(void 0);function U(){let K=O?.delay,ce=typeof I.current=="object"?I.current.open:void 0,ue=T;return A&&(ce!==0?ue=c??K??T:ue=0),ue}function Q(K){let ce=w.current;if(!ce||!K)return!1;let ue=Xm(K);return ue!==null&&ue!==ce&&te(ce,ue)}function Z(K){let ce=Q(K);return _.current=ce,ce&&(N.openChangeTimeout.clear(),N.restTimeout.clear(),N.restTimeoutPending=!1,D.clear()),ce}let ne=Ds(v,{enabled:!R,mouseOnly:!0,move:!1,handleClose:!S&&B!=="both"?Ms():null,restMs:U,delay(){let K=typeof I.current=="object"?I.current.close:void 0,ce=E;return f==null&&A&&(ce=K),{close:ce}},triggerElementRef:w,isActiveTrigger:b,isClosing:()=>h.select("transitionStatus")==="ending",shouldOpen(){return!_.current}}),z=ks(v,{enabled:!R}).reference,ie=K=>{let ce=_.current,ue=Bc(K),Yt=Z(ue),Je=w.current,ht=Je&&ue&&te(Je,ue);if(Yt&&h.select("open")&&h.select("lastOpenChangeReason")===$.triggerHover){h.setOpen(!1,J($.triggerHover,K));return}if(ce&&!Yt&&ht&&!k.current&&!h.select("open")&&Je&&Rt(G.current)){let Ze=()=>{!_.current&&!k.current&&!h.select("open")&&h.setOpen(!0,J($.triggerHover,K,Je))},ut=U();ut===0?(D.clear(),Ze()):D.start(ut,Ze)}},ae=h.useState("triggerProps",P);return De("button",t,{state:{open:y},ref:[o,C,w],props:[ne,z,P||B!=="none"?ae:void 0,{onMouseOver(K){ie(K.nativeEvent)},onFocus(K){Q(Bc(K.nativeEvent))&&K.preventBaseUIHandler()},onMouseLeave(){_.current=!1,D.clear(),G.current=void 0},onPointerEnter(K){G.current=K.pointerType},onPointerDown(K){G.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:x,[Lc.triggerDisabled]:R?"":void 0,[Fc]:R?void 0:""},m],stateAttributesMapping:pc})});var Hc=g(V(),1);var cn=g(V(),1),Hs=cn.createContext(void 0);function Vc(){let e=cn.useContext(Hs);if(e===void 0)throw new Error(Ne(70));return e}var Us=g(X(),1),Uc=Hc.forwardRef(function(t,o){let{keepMounted:r=!1,...n}=t;return Xe().useState("mounted")||r?(0,Us.jsx)(Hs.Provider,{value:r,children:(0,Us.jsx)(Ac,{ref:o,...n})}):null});var fn=g(V(),1);var un=g(V(),1),Ws=un.createContext(void 0);function No(){let e=un.useContext(Ws);if(e===void 0)throw new Error(Ne(71));return e}var Wc=g(X(),1),$c=fn.forwardRef(function(t,o){let{render:r,className:n,anchor:s,positionMethod:i="absolute",side:a="top",align:u="center",sideOffset:c=0,alignOffset:l=0,collisionBoundary:f="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:d=!1,disableAnchorTracking:h=!1,collisionAvoidance:x=Ja,style:b,...y}=t,v=Xe(),w=Vc(),T=v.useState("open"),E=v.useState("mounted"),C=v.useState("trackCursorAxis"),P=v.useState("disableHoverablePopup"),O=v.useState("floatingRootContext"),I=v.useState("instantType"),Y=v.useState("transitionStatus"),A=v.useState("hasViewport"),N=vc({anchor:s,positionMethod:i,floatingRootContext:O,mounted:E,side:a,sideOffset:c,align:u,alignOffset:l,collisionBoundary:f,collisionPadding:p,sticky:d,arrowPadding:m,disableAnchorTracking:h,keepMounted:w,collisionAvoidance:x,adaptiveOrigin:A?yc:void 0}),L=fn.useMemo(()=>({open:T,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:C!=="none"?"tracking-cursor":I}),[T,N.side,N.align,N.anchorHidden,C,I]),R=Rc(t,L,{styles:N.positionerStyles,transitionStatus:Y,props:y,refs:[o,v.useStateSetter("positionerElement")],hidden:!E,inert:!T||C==="both"||P});return(0,Wc.jsx)(Ws.Provider,{value:N,children:R})});var Yc=g(V(),1);var Jm={..._o,...Ra},zc=Yc.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Xe(),{side:u,align:c}=No(),l=a.useState("open"),f=a.useState("instantType"),p=a.useState("transitionStatus"),m=a.useState("popupProps"),d=a.useState("floatingRootContext"),h=a.useState("disabled"),x=a.useState("closeDelay");Mr({open:l,ref:a.context.popupRef,onComplete(){l&&a.context.onOpenChangeComplete?.(!0)}}),Ns(d,{enabled:!h,closeDelay:x});let b=a.useStateSetter("popupElement");return De("div",t,{state:{open:l,side:u,align:c,instant:f,transitionStatus:p},ref:[o,a.context.popupRef,b],props:[m,en(p),i],stateAttributesMapping:Jm})});var qc=g(V(),1);var Kc=qc.forwardRef(function(t,o){let{render:r,className:n,style:s,...i}=t,a=Xe(),{arrowRef:u,side:c,align:l,arrowUncentered:f,arrowStyles:p}=No(),m=a.useState("open"),d=a.useState("instantType");return De("div",t,{state:{open:m,side:c,align:l,uncentered:f,instant:d},ref:[o,u],props:[{style:p,"aria-hidden":!0},i],stateAttributesMapping:_o})});var $s=g(V(),1);var Ys=g(X(),1),Gc=function(t){let{delay:o,closeDelay:r,timeout:n=400}=t,s=$s.useMemo(()=>({delay:o,closeDelay:r}),[o,r]),i=$s.useMemo(()=>({open:o,close:r}),[o,r]);return(0,Ys.jsx)(Vs.Provider,{value:s,children:(0,Ys.jsx)(is,{delay:i,timeoutMs:n,children:t.children})})};var Jc=g(V(),1);var Xc=(function(e){return e.popupWidth="--popup-width",e.popupHeight="--popup-height",e})({});var Zm={activationDirection:e=>e?{"data-activation-direction":e}:null},Zc=Jc.forwardRef(function(t,o){let{render:r,className:n,style:s,children:i,...a}=t,u=Xe(),c=No(),l=u.useState("instantType"),{children:f,state:p}=_c({store:u,side:c.side,cssVars:Xc,children:i}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:l};return De("div",t,{state:m,ref:o,props:[a,{children:f}],stateAttributesMapping:Zm})});var nr=class{constructor(){this.store=new Ao}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,J($.imperativeAction,void 0,o))}close(){this.store.setOpen(!1,J($.imperativeAction,void 0,void 0))}get isOpen(){return this.store.select("open")}};function Qc(){return new nr}function eu(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),zs=g(X(),1),qs=(0,zs.jsx)(mn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,zs.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),Ks=g(X(),1),Gs=(0,Ks.jsx)(gn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Ks.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),Xs=g(X(),1),Js=(0,Xs.jsx)(hn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Xs.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 nu=g(Ue(),1);function Zs(e,t,o){return(0,nu.cloneElement)(e??t,{children:o})}var Qm=g(iu(),1);var cu=g(lu(),1),{lock:LT,unlock:uu}=(0,cu.__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 eg(){let e=Qm;if(e.ThemeProvider)return e.ThemeProvider;if(!e.privateApis)throw new Error("@wordpress/ui: @wordpress/theme must expose `ThemeProvider` or `privateApis.ThemeProvider`.");return uu(e.privateApis).ThemeProvider}var fu=eg();var Do={};Ke(Do,{Popup:()=>Tu,Portal:()=>yn,Positioner:()=>xn,Provider:()=>Iu,Root:()=>_u,Trigger:()=>Pu});var Ru=g(Ue(),1);var hu=g(Ue(),1);var Qs="data-wp-hash";function ei(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&og(document)),e.__wpStyleRuntime}function tg(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 pu(e,t,o){if(!e.head)return;let r=ei(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(tg(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 og(e){let t=ei();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)pu(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 rg(e,t){let o=ei();o.styles.set(e,t);for(let r of o.documents.keys())pu(r,e,t)}typeof process>"u",rg("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 du={slot:"_11fc52b637ff8a7e__slot"},mu="data-wp-compat-overlay-slot";function ng(){return typeof document>"u"?null:document}function sg(){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 ig(e){let t=e.createElement("div");return t.setAttribute(mu,""),du.slot&&t.classList.add(du.slot),e.body.appendChild(t),t}function gu(){if(typeof window>"u"||!sg()&&window.__wpUiCompatOverlaySlotEnabled!==!0)return;let e=ng();if(!e||!e.body)return;if(St&&St.ownerDocument===e&&St.isConnected)return St;let t=e.querySelector(`[${mu}]`);return t instanceof HTMLDivElement?(St=t,t):(St?.isConnected&&St.remove(),St=ig(e),St)}var yu=g(X(),1),yn=(0,hu.forwardRef)(function({container:t,...o},r){return(0,yu.jsx)(je.Portal,{container:t??gu(),...o,ref:r})});var xu=g(Ue(),1),vu=g(X(),1),ti="data-wp-hash";function oi(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&lg(document)),e.__wpStyleRuntime}function ag(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ti}]`))if(o.getAttribute(ti)===t)return!0;return!1}function bu(e,t,o){if(!e.head)return;let r=oi(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(ag(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(ti,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function lg(e){let t=oi();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)bu(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 wu(e,t){let o=oi();o.styles.set(e,t);for(let r of o.documents.keys())bu(r,e,t)}typeof process>"u",wu("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var cg={"box-sizing":"_336cd3e4e743482f__box-sizing"};typeof process>"u",wu("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 ug={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},xn=(0,xu.forwardRef)(function({align:t="center",className:o,side:r="top",sideOffset:n=4,...s},i){return(0,vu.jsx)(je.Positioner,{ref:i,align:t,side:r,sideOffset:n,...s,className:po(cg["box-sizing"],ug.positioner,o)})});var ir=g(X(),1),ri="data-wp-hash";function ni(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&dg(document)),e.__wpStyleRuntime}function fg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${ri}]`))if(o.getAttribute(ri)===t)return!0;return!1}function Eu(e,t,o){if(!e.head)return;let r=ni(),n=r.injectedStyles.get(e);if(n||(n=new Set,r.injectedStyles.set(e,n)),n.has(t))return;if(fg(e,t)){n.add(t);return}let s=e.createElement("style");s.setAttribute(ri,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function dg(e){let t=ni();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Eu(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 pg(e,t){let o=ni();o.styles.set(e,t);for(let r of o.documents.keys())Eu(r,e,t)}typeof process>"u",pg("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 mg={positioner:"_480b748dd3510e64__positioner",popup:"_50096b232db7709d__popup"},gg={background:"#1e1e1e"},Tu=(0,Ru.forwardRef)(function({portal:t,positioner:o,children:r,className:n,...s},i){let a=(0,ir.jsx)(fu,{color:gg,children:(0,ir.jsx)(je.Popup,{ref:i,className:po(mg.popup,n),...s,children:r})}),u=Zs(o,(0,ir.jsx)(xn,{}),a);return Zs(t,(0,ir.jsx)(yn,{}),u)});var Su=g(Ue(),1),Cu=g(X(),1),Pu=(0,Su.forwardRef)(function(t,o){return(0,Cu.jsx)(je.Trigger,{ref:o,...t})});var Ou=g(X(),1);function _u(e){return(0,Ou.jsx)(je.Root,{...e})}var ku=g(X(),1);function Iu({...e}){return(0,ku.jsx)(je.Provider,{...e})}var Au=g(Ue(),1),si="data-wp-hash";function ii(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&yg(document)),e.__wpStyleRuntime}function hg(e,t){if(!e.head)return!1;for(let o of e.head.querySelectorAll(`style[${si}]`))if(o.getAttribute(si)===t)return!0;return!1}function Nu(e,t,o){if(!e.head)return;let r=ii(),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(si,t),s.appendChild(e.createTextNode(o)),e.head.appendChild(s),n.add(t)}function yg(e){let t=ii();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[o,r]of t.styles)Nu(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 xg(e,t){let o=ii();o.styles.set(e,t);for(let r of o.documents.keys())Nu(r,e,t)}typeof process>"u",xg("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 bg={"visually-hidden":"f37b9e2e191ebd66__visually-hidden"},ai=(0,Au.forwardRef)(function({render:t,...o},r){return eu({render:t,ref:r,props:wt({className:bg["visually-hidden"]},o,{"data-visually-hidden":""})})});var bn=g(We(),1);var Mo=g(X(),1);function wg({rating:e}){let t=Math.round(e/.5)*.5,o=Math.floor(e),r=Math.ceil(e-o),n=5-(o+r);return(0,Mo.jsxs)("span",{"aria-label":(0,bn.sprintf)((0,bn.__)("%s out of 5 stars"),t),children:[Array.from({length:o}).map((s,i)=>(0,Mo.jsx)(sr,{className:"block-directory-block-ratings__star-full",icon:Gs,size:16},`full_stars_${i}`)),Array.from({length:r}).map((s,i)=>(0,Mo.jsx)(sr,{className:"block-directory-block-ratings__star-half-full",icon:Js,size:16},`half_stars_${i}`)),Array.from({length:n}).map((s,i)=>(0,Mo.jsx)(sr,{className:"block-directory-block-ratings__star-empty",icon:qs,size:16},`empty_stars_${i}`))]})}var Du=wg;var li=g(X(),1),vg=({rating:e})=>(0,li.jsx)("span",{className:"block-directory-block-ratings",children:(0,li.jsx)(Du,{rating:e})}),Mu=vg;var Lu=g(lo(),1),ci=g(X(),1);function Rg({icon:e}){let t="block-directory-downloadable-block-icon";return e.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)!==null?(0,ci.jsx)("img",{className:t,src:e,alt:""}):(0,ci.jsx)(Lu.BlockIcon,{className:t,icon:e,showColors:!0})}var wn=Rg;var Bu=g(We(),1),Fu=g(Ge(),1);var vn=g(X(),1),Eg=({block:e})=>{let t=(0,Fu.useSelect)(o=>o(me).getErrorNoticeForBlock(e.id),[e]);return t?(0,vn.jsx)("div",{className:"block-directory-downloadable-block-notice",children:(0,vn.jsxs)("div",{className:"block-directory-downloadable-block-notice__content",children:[t.message,t.isFatal?" "+(0,Bu.__)("Try reloading the page."):null]})}):null},ju=Eg;var he=g(X(),1);function Tg({title:e,rating:t,ratingCount:o},{hasNotice:r,isInstalled:n,isInstalling:s}){let i=Math.round(t/.5)*.5;return!n&&r?(0,Ve.sprintf)("Retry installing %s.",(0,Ht.decodeEntities)(e)):n?(0,Ve.sprintf)("Add %s.",(0,Ht.decodeEntities)(e)):s?(0,Ve.sprintf)("Installing %s.",(0,Ht.decodeEntities)(e)):o<1?(0,Ve.sprintf)("Install %s.",(0,Ht.decodeEntities)(e)):(0,Ve.sprintf)((0,Ve._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",o),(0,Ht.decodeEntities)(e),i,o)}function Sg({item:e,onClick:t}){let{author:o,description:r,icon:n,rating:s,title:i}=e,a=!!(0,Hu.getBlockType)(e.name),{hasNotice:u,isInstalling:c,isInstallable:l}=(0,Uu.useSelect)(m=>{let{getErrorNoticeForBlock:d,isInstalling:h}=m(me),x=d(e.id),b=x&&x.isFatal;return{hasNotice:!!x,isInstalling:h(e.id),isInstallable:!b}},[e]),f="";a?f=(0,Ve.__)("Installed!"):c&&(f=(0,Ve.__)("Installing\u2026"));let p=Tg(e,{hasNotice:u,isInstalled:a,isInstalling:c});return(0,he.jsxs)(Do.Root,{children:[(0,he.jsx)(Do.Trigger,{render:(0,he.jsxs)(Rn.Composite.Item,{className:po("block-directory-downloadable-block-list-item",c&&"is-installing"),accessibleWhenDisabled:!0,disabled:c||!l,onClick:m=>{m.preventDefault(),t()},"aria-label":p,type:"button",role:"option",children:[(0,he.jsxs)("div",{className:"block-directory-downloadable-block-list-item__icon",children:[(0,he.jsx)(wn,{icon:n,title:i}),c?(0,he.jsx)("span",{className:"block-directory-downloadable-block-list-item__spinner",children:(0,he.jsx)(Rn.Spinner,{})}):(0,he.jsx)(Mu,{rating:s})]}),(0,he.jsxs)("span",{className:"block-directory-downloadable-block-list-item__details",children:[(0,he.jsx)("span",{className:"block-directory-downloadable-block-list-item__title",children:(0,Vu.createInterpolateElement)((0,Ve.sprintf)((0,Ve.__)("%1$s <span>by %2$s</span>"),(0,Ht.decodeEntities)(i),o),{span:(0,he.jsx)("span",{className:"block-directory-downloadable-block-list-item__author"})})}),u?(0,he.jsx)(ju,{block:e}):(0,he.jsxs)(he.Fragment,{children:[(0,he.jsx)("span",{className:"block-directory-downloadable-block-list-item__desc",children:f||(0,Ht.decodeEntities)(r)}),l&&!(a||c)&&(0,he.jsx)(ai,{children:(0,Ve.__)("Install block")})]})]})]})}),(0,he.jsx)(Do.Popup,{children:p})]})}var Wu=Sg;var ui=g(X(),1),Cg=()=>{};function Pg({items:e,onHover:t=Cg,onSelect:o}){let{installBlockType:r}=(0,qu.useDispatch)(me);return e.length?(0,ui.jsx)(Yu.Composite,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":(0,$u.__)("Blocks available for install"),children:e.map(n=>(0,ui.jsx)(Wu,{onClick:()=>{(0,zu.getBlockType)(n.name)?o(n):r(n).then(s=>{s&&o(n)}),t(null)},onHover:t,item:n},n.id))}):null}var Ku=Pg;var Ut=g(We(),1),Gu=g(Ue(),1),Xu=g(ou(),1),lt=g(X(),1);function Og({children:e,downloadableItems:t,hasLocalBlocks:o}){let r=t.length;return(0,Gu.useEffect)(()=>{(0,Xu.speak)((0,Ut.sprintf)((0,Ut._n)("%d additional block is available to install.","%d additional blocks are available to install.",r),r))},[r]),(0,lt.jsxs)(lt.Fragment,{children:[!o&&(0,lt.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,Ut.__)("No results available from your installed blocks.")}),(0,lt.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"}),(0,lt.jsxs)("div",{className:"block-directory-downloadable-blocks-panel",children:[(0,lt.jsxs)("div",{className:"block-directory-downloadable-blocks-panel__header",children:[(0,lt.jsx)("h2",{className:"block-directory-downloadable-blocks-panel__title",children:(0,Ut.__)("Available to install")}),(0,lt.jsx)("p",{className:"block-directory-downloadable-blocks-panel__description",children:(0,Ut.__)("Select a block to install and add it to your post.")})]}),e]})]})}var Ju=Og;var En=g(We(),1),Tn=g(qt(),1),ct=g(X(),1);function _g(){return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("div",{className:"block-editor-inserter__no-results",children:(0,ct.jsx)("p",{children:(0,En.__)("No results found.")})}),(0,ct.jsx)("div",{className:"block-editor-inserter__tips",children:(0,ct.jsxs)(Tn.Tip,{children:[(0,En.__)("Interested in creating your own block?"),(0,ct.jsx)("br",{}),(0,ct.jsxs)(Tn.ExternalLink,{href:"https://developer.wordpress.org/block-editor/",children:[(0,En.__)("Get started here"),"."]})]})})]})}var fi=_g;var Ae=g(X(),1),Zu=[],kg=e=>(0,of.useSelect)(t=>{let{getDownloadableBlocks:o,isRequestingDownloadableBlocks:r,getInstalledBlockTypes:n}=t(me),s=t(tf.store).canUser("read","block-directory/search"),i=Zu;if(s){i=o(e);let a=n(),u=i.filter(({name:c})=>{let l=a.some(p=>p.name===c),f=(0,rf.getBlockType)(c);return l||!f});u.length!==i.length&&(i=u),i.length===0&&(i=Zu)}return{hasPermission:s,downloadableBlocks:i,isLoading:r(e)}},[e]);function nf({onSelect:e,onHover:t,hasLocalBlocks:o,isTyping:r,filterValue:n}){let{hasPermission:s,downloadableBlocks:i,isLoading:a}=kg(n);return s===void 0||a||r?(0,Ae.jsxs)(Ae.Fragment,{children:[s&&!o&&(0,Ae.jsxs)(Ae.Fragment,{children:[(0,Ae.jsx)("p",{className:"block-directory-downloadable-blocks-panel__no-local",children:(0,Qu.__)("No results available from your installed blocks.")}),(0,Ae.jsx)("div",{className:"block-editor-inserter__quick-inserter-separator"})]}),(0,Ae.jsx)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading",children:(0,Ae.jsx)(ef.Spinner,{})})]}):s===!1?o?null:(0,Ae.jsx)(fi,{}):i.length===0?o?null:(0,Ae.jsx)(fi,{}):(0,Ae.jsx)(Ju,{downloadableItems:i,hasLocalBlocks:o,children:(0,Ae.jsx)(Ku,{items:i,onSelect:e,onHover:t})})}var di=g(X(),1);function Ig(){let[e,t]=(0,lf.useState)(""),o=(0,af.debounce)(t,400);return(0,di.jsx)(sf.__unstableInserterMenuExtension,{children:({onSelect:r,onHover:n,filterValue:s,hasItems:i})=>(e!==s&&o(s),e?(0,di.jsx)(nf,{onSelect:r,onHover:n,filterValue:e,hasLocalBlocks:i,isTyping:s!==e}):null)})}var cf=Ig;var ar=g(We(),1),ff=g(Ge(),1),df=g(In(),1);var Sn=g(We(),1);var Wt=g(X(),1);function uf({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,Sn.sprintf)((0,Sn.__)("By %s"),n)})]})]},o))}):null}var lr=g(X(),1);function pf(){let e=(0,ff.useSelect)(t=>t(me).getNewBlockTypes(),[]);return e.length?(0,lr.jsxs)(df.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)(uf,{items:e})]}):null}var no=g(We(),1),xf=g(qt(),1),bf=g(kt(),1),wf=g(Ue(),1),ur=g(Ge(),1),vf=g(Fn(),1),so=g(lo(),1);var Cn=g(We(),1),mf=g(qt(),1),Lo=g(kt(),1),cr=g(Ge(),1),gf=g(lo(),1);var hf=g(X(),1);function yf({attributes:e,block:t,clientId:o}){let r=(0,cr.useSelect)(i=>i(me).isInstalling(t.id),[t.id]),{installBlockType:n}=(0,cr.useDispatch)(me),{replaceBlock:s}=(0,cr.useDispatch)(gf.store);return(0,hf.jsx)(mf.Button,{__next40pxDefaultSize:!0,onClick:()=>n(t).then(i=>{if(i){let a=(0,Lo.getBlockType)(t.name),[u]=(0,Lo.parse)(e.originalContent);u&&a&&s(o,(0,Lo.createBlock)(a.name,u.attributes,u.innerBlocks))}}),accessibleWhenDisabled:!0,disabled:r,isBusy:r,variant:"primary",children:(0,Cn.sprintf)((0,Cn.__)("Install %s"),t.title)})}var Ct=g(X(),1),Ag=e=>t=>{let{originalName:o}=t.attributes,{block:r,hasPermission:n}=(0,ur.useSelect)(s=>{let{getDownloadableBlocks:i}=s(me),a=i("block:"+o).filter(({name:u})=>o===u);return{hasPermission:s(vf.store).canUser("read","block-directory/search"),block:a.length&&a[0]}},[o]);return!n||!r?(0,Ct.jsx)(e,{...t}):(0,Ct.jsx)(Ng,{...t,originalBlock:r})},Ng=({originalBlock:e,...t})=>{let{originalName:o,originalUndelimitedContent:r,clientId:n}=t.attributes,{replaceBlock:s}=(0,ur.useDispatch)(so.store),i=()=>{s(t.clientId,(0,bf.createBlock)("core/html",{},[],[r]))},a=!!r,u=(0,ur.useSelect)(f=>{let{canInsertBlockType:p,getBlockRootClientId:m}=f(so.store);return p("core/html",m(n))},[n]),c=(0,no.sprintf)((0,no.__)("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,Ct.jsx)(yf,{block:e,attributes:t.attributes,clientId:t.clientId},"install")];return a&&u&&(c=(0,no.sprintf)((0,no.__)("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,Ct.jsx)(xf.Button,{__next40pxDefaultSize:!0,onClick:i,variant:"tertiary",children:(0,no.__)("Keep as HTML")},"convert"))),(0,Ct.jsxs)("div",{...(0,so.useBlockProps)(),children:[(0,Ct.jsx)(so.Warning,{actions:l,children:c}),(0,Ct.jsx)(wf.RawHTML,{children:r})]})},Rf=Ag;var $t=g(X(),1);(0,Ef.registerPlugin)("block-directory",{icon:void 0,render(){return(0,$t.jsxs)($t.Fragment,{children:[(0,$t.jsx)($i,{}),(0,$t.jsx)(cf,{}),(0,$t.jsx)(pf,{})]})}});(0,Tf.addFilter)("blocks.registerBlockType","block-directory/fallback",(e,t)=>(t!=="core/missing"||(e.edit=Rf(e.edit)),e));return Lf(Dg);})();
/*! Bundled license information:

use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
  (**
   * @license React
   * use-sync-external-store-shim.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)

use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
  (**
   * @license React
   * use-sync-external-store-shim/with-selector.production.js
   *
   * Copyright (c) Meta Platforms, Inc. and affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/