PageSourceSearch

https://app.favcrm.io/assets/useOnFirstRender-DHP5ngz_.js

js favcrm.io collected 2026-10-02 06:18:56 UTC 21,469 bytes, 1 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,i as n,n as r,r as i,t as a}from"./with-selector-BJAgozGG.js";import{a as o,c as s,d as c,f as l,g as u,m as d,p as f,t as p,y as m}from"./floating-ui.utils.dom-B_-bZDGP.js";import{a as h,c as g,d as _,i as v,n as y,o as b}from"./dist-B-PHwnQJ.js";import{c as x,s as S}from"./button-C0LZ_qXA.js";import{l as C,n as ee,r as w,w as te,y as ne}from"./useBaseUiId-BoU-Xi7k.js";import{c as T,s as re}from"./useOpenChangeComplete-B5CkobR3.js";import{A as ie,O as E,c as D,g as O,v as k,x as A,y as ae}from"./composite-BMP51hRq.js";import{i as j,n as M,r as oe,t as N}from"./shadowDom-TIqe0h0u.js";import{t as P}from"./visuallyHidden-CrYY0HH5.js";var F=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=T.startingStyle]=`startingStyle`,e[e.endingStyle=T.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),I=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),L={[I.popupOpen]:``},R={[I.popupOpen]:``,[I.pressed]:``},z={[F.open]:``},B={[F.closed]:``},V={[F.anchorHidden]:``},H={open(e){return e?L:null}},U={open(e){return e?R:null}},W={open(e){return e?z:B},anchorHidden(e){return e?V:null}},G=e(t()),K=e(n()),q=r(),J=0,se=class e{static create(){return new e}currentId=J;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=J,t()},e)}isStarted(){return this.currentId!==J}clear=()=>{this.currentId!==J&&(clearTimeout(this.currentId),this.currentId=J)};disposeEffect=()=>this.clear};function ce(){let e=_(se.create).current;return re(e.disposeEffect),e}function Y(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function X(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}var le=G.forwardRef(function(e,t){let[n,r]=G.useState();S(()=>{ie&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:P,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function ue(e,t){if(!c(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(M(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Z(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function de(e){return e.matches(`html,body`)}function fe(e){return l(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function pe(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${k}`)!=null}function me(e){return e?e.getAttribute(`role`)===`combobox`&&fe(e):!1}function he(e){if(!e||E)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ge(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var _e=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function ve(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return u(n)?n.host:null}function ye(e){for(let t of Array.from(e.children))if(o(t)===`summary`)return t;return null}function be(e,t){let n=ye(t);return!!n&&(e===n||M(n,e))}function xe(e){let t=e?o(e):``;return e!=null&&e.matches(_e)&&(t!==`summary`||e.parentElement!=null&&o(e.parentElement)===`details`&&ye(e.parentElement)===e)&&(t!==`details`||ye(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Se(e){if(!xe(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=ve(t)){let n=t!==e,r=o(t)===`slot`;if(t.hasAttribute(`inert`)||n&&o(t)===`details`&&!t.open&&!be(e,t)||t.hasAttribute(`hidden`)||!r&&!Ce(t,n))return!1}return!0}function Ce(e,t){let n=p(e);return t?n.display!==`none`:D(e,n)}function we(e){let t=e.tabIndex;if(t<0){let t=o(e);if(t===`details`||t===`audio`||t===`video`||l(e)&&e.isContentEditable)return 0}return t}function Te(e){if(o(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Ee(e,t){let n=Te(e);
1if(!n)return!0;let r=t.find(e=>{let t=Te(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Te(e);return t?.name===n.name&&t.form===n.form})===n}function De(e){if(l(e)&&o(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return l(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Oe(e,t){De(e).forEach(e=>{xe(e)&&t.push(e),Oe(e,t)})}function ke(e,t,n){De(e).forEach(e=>{l(e)&&e.matches(t)&&n.push(e),ke(e,t,n)})}function Ae(e){return Se(e)&&we(e)>=0}function je(e){let t=[];return Oe(e,t),t.filter(Se)}function Me(e){let t=je(e);return t.filter(e=>we(e)>=0&&Ee(e,t))}function Ne(e,t){let n=Me(e),r=n.length;if(r===0)return;let i=N(j(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Pe(e){return Ne(j(e).body,1)||e}function Fe(e){return Ne(j(e).body,-1)||e}function Ie(e,t){if(!e)return null;let n=Me(j(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Le(e){return Ie(e,1)}function Re(e){return Ie(e,-1)}function ze(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!M(n,r)}function Be(e){Me(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Ve(e){let t=[];ke(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Q(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Q(e,t.id,n)])}function He(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Ue(e){return`data-base-ui-${e}`}var We={style:{transition:`none`}},Ge=`data-base-ui-click-trigger`,Ke={fallbackAxisSide:`none`},qe={fallbackAxisSide:`end`},Je={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Ye=G.createContext(null),Xe=()=>G.useContext(Ye),Ze=Ue(`portal`);function Qe(e={}){let{ref:t,container:n,componentProps:r=v,elementProps:i}=e,a=ee(),o=Xe()?.portalNode,[s,c]=G.useState(null),[l,u]=G.useState(null),f=x(e=>{e!==null&&u(e)}),p=G.useRef(null);S(()=>{if(n===null){p.current&&(p.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(d(n)?n:n.current))??o??document.body;if(e==null){p.current&&(p.current=null,u(null),c(null));return}p.current!==e&&(p.current=e,u(null),c(e))},[n,o,a]);let m=y(`div`,r,{ref:[t,f],props:[{id:a,[Ze]:``},i]});return{portalNode:l,portalSubtree:s&&m?K.createPortal(m,s):null}}var $e=G.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,style:s,...c}=e,{portalNode:l,portalSubtree:u}=Qe({container:r,ref:t,componentProps:e,elementProps:c}),d=G.useRef(null),f=G.useRef(null),p=G.useRef(null),m=G.useRef(null),[h,g]=G.useState(null),_=G.useRef(!1),v=h?.modal,y=h?.open,b=typeof o==`boolean`?o:!!h&&!h.modal&&h.open&&!!l;G.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&ze(e)&&(e.type===`focusin`?_.current&&=(Ve(l),!1):(Be(l),_.current=!0))}return X(Y(l,`focusin`,e,!0),Y(l,`focusout`,e,!0))},[l,v]),G.useEffect(()=>{!l||y!==!1||(Ve(l),_.current=!1)},[y,l]);let x=G.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,q.jsxs)(G.Fragment,{children:[u,(0,q.jsxs)(Ye.Provider,{value:x,children:[b&&l&&(0,q.jsx)(le,{"data-type":`outside`,ref:d,onFocus:e=>{ze(e,l)?p.current?.focus():Fe(h?h.domReference:null)?.focus()}}),b&&l&&(0,q.jsx)(`span`,{"aria-owns":l.id,style:Je}),l&&K.createPortal(n,l),b&&l&&(0,q.jsx)(le,{"data-type":`outside`,ref:f,onFocus:e=>{ze(e,l)?m.current?.focus():(Pe(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,w(`focus-out`,e.nativeEvent)))}})]})]})});function et(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var tt=class{nodesRef={current:[]};events=et();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},nt=G.createContext(null),rt=G.createContext(null),it=()=>G.useContext(nt)?.id||null,at=e=>{let t=G.useContext(rt);return e??t};function ot(e){let t=ee(),n=at(e),r=it();return S(()=>
1{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function st(e){let{children:t,id:n}=e,r=it();return(0,q.jsx)(nt.Provider,{value:G.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function ct(e){let{children:t,externalTree:n}=e,r=_(()=>n??new tt).current;return(0,q.jsx)(rt.Provider,{value:r,children:t})}var lt={intentional:`onClick`,sloppy:`onPointerDown`};function ut(){return!1}function dt(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ft(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:d=!0,outsidePress:h=!0,outsidePressEvent:g=`sloppy`,referencePress:_=ut,referencePressEvent:v=`sloppy`,bubbles:y,externalTree:b}=t,S=at(b),ee=x(typeof h==`function`?h:()=>!1),T=typeof h==`function`?ee:h,re=T!==!1,ie=x(()=>g),E=G.useRef(!1),D=G.useRef(!1),O=G.useRef(!1),{escapeKey:k,outsidePress:ae}=dt(y),N=G.useRef(null),P=ce(),F=ce(),I=x(()=>{F.clear(),a.current.insideReactTree=!1}),L=G.useRef(!1),R=G.useRef(``),z=x(_),B=x(e=>{if(!r||!o||!d||e.key!==`Escape`||L.current)return;let t=a.current.floatingContext?.nodeId,i=S?Q(S.nodesRef.current,t):[];if(!k&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let s=A(e)?e.nativeEvent:e,c=w(C,s);n.setOpen(!1,c),!k&&!c.isPropagationAllowed&&e.stopPropagation()}),V=x(()=>{a.current.insideReactTree=!0,F.start(0,I)});G.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=k,a.current.__outsidePressBubbles=ae;let e=new se,t=new se;function h(){e.clear(),L.current=!0}function g(){e.start(m()?5:0,()=>{L.current=!1})}function _(){O.current=!0,t.start(0,()=>{O.current=!1})}function v(){E.current=!1,D.current=!1}function y(){let e=R.current,t=e===`pen`||!e?`mouse`:e,n=ie(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function b(e){let t=y();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function x(e){let t=a.current.floatingContext?.nodeId,r=S&&Q(S.nodesRef.current,t).some(t=>Z(e,t.context?.elements.floating));return Z(e,n.select(`floatingElement`))||Z(e,n.select(`domReferenceElement`))||r}function C(e){if(b(e)){I();return}if(a.current.insideReactTree){I();return}let r=oe(e),i=`[${Ue(`inert`)}]`,o=c(r)?r.getRootNode():null,d=Array.from((u(o)?o:j(n.select(`floatingElement`))).querySelectorAll(i)),m=n.context.triggerElements;if(r&&(m.hasElement(r)||m.hasMatchingElement(e=>M(e,r))))return;let h=c(r)?r:null;for(;h&&!f(h);){let e=s(h);if(f(e)||!c(e))break;h=e}if(d.length&&c(r)&&!de(r)&&!M(r,n.select(`floatingElement`))&&d.every(e=>!M(h,e)))return;if(l(r)&&!(`touches`in e)){let t=f(r),n=p(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(x(e))return;if(y()===`intentional`&&O.current){t.clear(),O.current=!1;return}if(typeof T==`function`&&!T(e))return;let g=a.current.floatingContext?.nodeId,_=S?Q(S.nodesRef.current,g):[];if(_.length>0){let e=!0;if(_.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,w(ne,e)),I()}function ee(e){y()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||Z(e,n.select(`floatingElement`))||Z(e,n.select(`domReferenceElement`))||C(e)}function te(e){if(y()!==`sloppy`||!n.select(`open`)||!o||Z(e,n.select(`floatingElement`))||Z(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(N.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},P.start(1e3,()=>{N.current&&(N.current.dismissOnTouchEnd=!1,N.current.dismissOnMouseDown=!1)}))}function A(e,t){let n=oe(e);if(!n)return;let r=Y(n,e.type,()=>{t(e),r()})}function F(e){R.current=`touch`,A(e,te)}function z(e){P.clear(),e.type===`pointerdown`&&(R.current=e.pointerType),!(e.type===`mousedown`&&N.current&&!N.current.dismissOnMouseDown)&&A(e,e=>{e.type===`pointerdown`?ee(e):C(e)})}function V(e){if(!E.current)return;let n=D.current;if(v(),y()===`intentional`){if(e.type===`pointercancel`){n&&_();return}if(!x(e)){if(n){_();return}typeof T==`function`&&!T(e)||(t.clear(),O.current=!0,I())}}}function H(e){if(y()!==`sloppy`||!N.current||Z(e,n.select(`floatingElement`))||Z(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-N.current.startX),i=Math.abs(t.clientY-N.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(N.current.dismissOnTouchEnd=!0),a>10&&(C(e),P.clear(),N.current=null)}function U(e){A(e,H)}function W(e){y()!==`sloppy`||!N.current||Z(e,n.select(`floatingElement`))||Z(e,n.select(`domReferenceElement`))||(N.current.dismissOnTouchEnd&&C(e),P.clear(),N.current=null)}function G(e){A(e,W)}
1let K=j(i),q=X(d&&X(Y(K,`keydown`,B),Y(K,`compositionstart`,h),Y(K,`compositionend`,g)),re&&X(Y(K,`click`,z,!0),Y(K,`pointerdown`,z,!0),Y(K,`pointerup`,V,!0),Y(K,`pointercancel`,V,!0),Y(K,`mousedown`,z,!0),Y(K,`mouseup`,V,!0),Y(K,`touchstart`,F,!0),Y(K,`touchmove`,U,!0),Y(K,`touchend`,G,!0)));return()=>{q(),e.clear(),t.clear(),v(),O.current=!1}},[a,i,d,re,T,r,o,k,ae,B,I,ie,S,n,P]),G.useEffect(I,[T,I]);let H=G.useMemo(()=>({onKeyDown:B,[lt[v]]:e=>{z()&&n.setOpen(!1,w(te,e.nativeEvent))},...v!==`intentional`&&{onClick(e){z()&&n.setOpen(!1,w(`trigger-press`,e.nativeEvent))}}}),[B,n,v,z]),U=x(e=>{if(!r||!o||e.button!==0)return;let t=oe(e.nativeEvent);M(n.select(`floatingElement`),t)&&(E.current||(E.current=!0,D.current=!1))}),W=x(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&E.current&&(D.current=!0)}),K=G.useMemo(()=>({onKeyDown:B,onPointerDown:W,onMouseDown:W,onClickCapture:V,onMouseDownCapture(e){V(),U(e)},onPointerDownCapture(e){V(),U(e)},onMouseUpCapture:V,onTouchEndCapture:V,onTouchMoveCapture:V}),[B,V,U,W]);return G.useMemo(()=>o?{reference:H,floating:K,trigger:H}:{},[o,H,K])}var $=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(g(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);
1else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},pt=i(),mt=a(),ht=[],gt=void 0;function _t(){return gt}function vt(e){ht.push(e)}function yt(e){let t=(t,n)=>{let r=_(xt).current,i;try{gt=r;for(let e of ht)e.before(r);i=e(t,n);for(let e of ht)e.after(r);r.didInitialize=!0}finally{gt=void 0}return i};return t.displayName=e.displayName||e.name,t}function bt(e){return G.forwardRef(yt(e))}function xt(){return{didInitialize:!1}}var St=b(19)?Tt:Et;function Ct(e,t,n,r,i){return St(e,t,n,r,i)}function wt(e,t,n,r,i){let a=G.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,pt.useSyncExternalStore)(e.subscribe,a,a)}vt({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,pt.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Tt(e,t,n,r,i){let a=_t();if(!a)return wt(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Et(e,t,n,r,i){return(0,mt.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Dt=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Ct(this,e,t,n,r)}},Ot=class extends Dt{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){G.useDebugValue(e),S(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;S(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this,n=Object.values(e);S(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){G.useDebugValue(e);let n=t!==void 0;S(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return G.useDebugValue(e),Ct(this,this.selectors[e],t,n,r)}useContextCallback(e,t){G.useDebugValue(e);let n=x(t??h);this.context[e]=n}useStateSetter(e){let t=G.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},kt={open:$(e=>e.open),transitionStatus:$(e=>e.transitionStatus),domReferenceElement:$(e=>e.domReferenceElement),referenceElement:$(e=>e.positionReference??e.referenceElement),floatingElement:$(e=>e.floatingElement),floatingId:$(e=>e.floatingId)},At=class extends Ot{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:et(),nested:n,triggerElements:i},kt),this.syncOnly=t}syncOpenEvent=(e,t)=>
1{(!e||!this.state.open||t!=null&&ae(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}},jt=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Mt(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=G.useCallback(t=>Nt(t,e,`reference`),t),o=G.useCallback(t=>Nt(t,e,`floating`),n),s=G.useCallback(t=>Nt(t,e,`item`),r),c=G.useCallback(t=>Nt(t,e,`trigger`),i);return G.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function Nt(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[O]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&Pt(a,s,i,r)}return Pt(a,e,i,r),a}function Pt(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}function Ft(e){let t=G.useRef(!0);t.current&&(t.current=!1,e())}export{Fe as A,fe as B,Ke as C,Q as D,He as E,Me as F,se as G,le as H,ge as I,I as J,ce as K,pe as L,Re as M,ze as N,je as O,Ae as P,ue as R,We as S,Ue as T,X as U,he as V,Y as W,U as X,W as Y,H as Z,tt as _,Ot as a,Xe as b,yt as c,ft as d,st as f,at as g,it as h,At as i,Le as j,Pe as k,bt as l,ot as m,Mt as n,Dt as o,ct as p,F as q,jt as r,Ct as s,Ft as t,$ as u,$e as v,qe as w,Ge as x,Qe as y,me as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.