PageSourceSearch

https://aleria.ai/assets/collapsible-DSSDS18-.js

js aleria.ai collected 2026-10-05 11:48:44 UTC 7,327 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d3cea443-d16a-4f90-978e-a575f26dd119`,e._sentryDebugIdIdentifier=`sentry-dbid-d3cea443-d16a-4f90-978e-a575f26dd119`)}catch{}})();import{o as e}from"./chunk-LlpIH-wd.js";import{t}from"./react-DaTeRvSj.js";import{t as n}from"./jsx-runtime-BdmkoitS.js";import{f as r,n as i,t as a}from"./useIsoLayoutEffect-CuV0-yrS.js";import{c as o,n as s,s as c,t as l}from"./useRenderElement-DaQGCvhT.js";import{t as u}from"./useButton-QRWuMRd2.js";import{a as d,c as f,l as p,n as m,r as h,t as g}from"./useOpenChangeComplete-Ci5CSMT6.js";import{Z as _}from"./useOpenInteractionType-Dd8ktJSU.js";import{A as v,T as y,a as b,s as x}from"./owner-Ca1urglc.js";import{t as S}from"./useValueAsRef-BFVfx6fD.js";import{t as C}from"./useControlled-s1f3NAdk.js";var w=e(t());function T(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:a}=e,[o,s]=C({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=h(o,!0,!0),d=b(),[f,p]=w.useState(),m=f??d,g=i(e=>{let t=!o,n=x(v,e.nativeEvent);r(t,n),!n.isCanceled&&s(t)});return w.useMemo(()=>({disabled:a,handleTrigger:g,mounted:c,open:o,panelId:m,setMounted:l,setOpen:s,setPanelIdState:p,transitionStatus:u}),[a,g,c,o,m,l,s,p,u])}var E=w.createContext(void 0);function D(){let e=w.useContext(E);if(e===void 0)throw Error(o(15));return e}var O=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=f.startingStyle]=`startingStyle`,e[e.endingStyle=f.endingStyle]=`endingStyle`,e}({}),k=function(e){return e.panelOpen=`data-panel-open`,e}({}),A={[O.open]:``},j={[O.closed]:``},M={open(e){return e?{[k.panelOpen]:``}:null}},N={open(e){return e?A:j},...p},P=n(),F=w.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:a=!1,disabled:o=!1,onOpenChange:s,open:c,style:u,...d}=e,f=i(s),p=T({open:c,defaultOpen:a,onOpenChange:f,disabled:o}),m=w.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),h=w.useMemo(()=>({...p,onOpenChange:f,state:m}),[p,f,m]),g=l(`div`,e,{state:m,ref:t,props:d,stateAttributesMapping:N});return(0,P.jsx)(E.Provider,{value:h,children:g})}),I={...M,...p},L=w.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=D(),{className:s,disabled:c=o,id:d,render:f,nativeButton:p=!0,style:m,...h}=e,{getButtonProps:g,buttonRef:_}=u({disabled:c,focusableWhenDisabled:!0,native:p});return l(`button`,e,{state:a,ref:[t,_],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},h,g],stateAttributesMapping:I})}),R={height:void 0,width:void 0};function z(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:o,mounted:s,onOpenChange:l,open:u,setMounted:f,setOpen:p,transitionStatus:h}=e,v=w.useRef(null),b=w.useRef(null),[C,T]=w.useState(R),E=w.useRef(R),D=w.useRef(!1),k=w.useRef(u),A=w.useRef(!1),[j,M]=w.useState(!1),N=w.useRef(null),P=c(t,v),F=S({mounted:s,open:u}),I=m(v,!1,!1),L=!u&&!s,z=j?`idle`:h,H=u&&(k.current||A.current),G=!u&&s&&b.current===`css-animation`&&C.height===void 0&&C.width===void 0?E.current:C,K=n&&L&&b.current!==`css-animation`,q=i((e,t=!0)=>{t&&(E.current=e),T(e)}),J=i(()=>{N.current?.(),N.current=null}),Y=i(e=>{J(),N.current=()=>{N.current=null,e()}}),X=i(()=>{u&&s&&b.current===`css-animation`&&(A.current=!0)});a(()=>{!j||h===`starting`||M(!1)},[j,h]),w.useEffect(()=>()=>{X(),J()},[X,J]),a(()=>{let e=v.current;if(!e)return;!u&&N.current&&J();let t=V(e,H);if(b.current=t,u&&h===`idle`&&k.current&&t===`css-animation`){E.current=B(e);return}if(u&&h===`starting`){let n=D.current;if(D.current=!1,t===`none`){q(B(e)),M(!0);return}if(t===`css-transition`){let t=W(e);return q(B(e)),n?(Y(U(e,`transition-duration`,`0s`)),M(!0),t):t}if(t===`css-animation`){if(q(B(e)),!n){U(e,`animation-name`,`none`)();return}let t=U(e,`animation-name`,`none`),r=U(e,`animation-duration`,`0s`);t(),Y(r),M(!0);return}}if(!u&&s&&(h===`idle`||h===`starting`)){if(t===`none`){q(R,!1),f(!1);return}t===`css-animation`&&(k.current=!1,A.current=!1),q(B(e));return}if(h!==`ending`)return;if(t===`none`){f(!1);return}let n=B(e);if(!((n.height??0)>0||(n.width??0)>0)){f(!1);return}q(n),t===`css-animation`&&U(e,`animation-name`,`none`)()},[s,u,J,q,f,Y,H,h]),g({enabled:u&&s&&z===`idle`,open:!0,ref:v,onComplete(){u&&q(R,!1)}}),w.useEffect(()=>{if(u||!s||z!==`ending`||!v.current)return;let e=new AbortController,t=-1;function n(){F.current.open||(f(!1),q(R,!1))}return t=d.request(()=>{e.signal.aborted||I(n,e.signal)}
1),()=>{d.cancel(t),e.abort()}},[F,s,u,z,I,q,f]),a(()=>{let e=v.current;!e||!n||!L||e.setAttribute(`hidden`,`until-found`)},[L,n]),w.useEffect(function(){let e=v.current;if(!e)return;function t(e){D.current=!0,p(!0),l(!0,x(y,e))}return _(e,`beforematch`,t)},[l,p]);let Z=o||n||s||u;return{height:G.height,props:{...K?{[O.startingStyle]:``}:void 0,hidden:L,id:r},ref:P,shouldPreventOpenAnimation:H,shouldRender:Z,transitionStatus:z,width:G.width}}function B(e){return{height:e.scrollHeight,width:e.scrollWidth}}function V(e,t=!1){let n=r(e).getComputedStyle(e),i=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&H(n.animationDuration),a=H(n.transitionDuration);return i&&a||a?`css-transition`:i?`css-animation`:`none`}function H(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function U(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===``){e.style.removeProperty(t);return}e.style.setProperty(t,r,i)}}function W(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{if(n===``){e.style.removeProperty(t);return}e.style.setProperty(t,n)})}let r=d.request(n);return()=>{d.cancel(r),n()}}var G=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),K=w.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:o,id:c,style:u,...d}=e,{mounted:f,onOpenChange:p,open:m,panelId:h,setMounted:g,setPanelIdState:_,setOpen:v,state:y,transitionStatus:b}=D(),x=r??!1,S=i??!1;a(()=>{if(c)return _(c),()=>{_(void 0)}},[c,_]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:O,transitionStatus:k,width:A}=z({externalRef:t,hiddenUntilFound:x,id:h,keepMounted:S,mounted:f,onOpenChange:p,open:m,setMounted:g,setOpen:v,transitionStatus:b}),j={...y,transitionStatus:k},M=s(u,j),P=l(`div`,{...e,style:void 0},{state:j,ref:T,props:[w,{style:{[G.collapsiblePanelHeight]:C===void 0?`auto`:`${C}px`,[G.collapsiblePanelWidth]:A===void 0?`auto`:`${A}px`}},d,M?{style:M}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:N});return O?P:null});function q({...e}){return(0,P.jsx)(F,{"data-slot":`collapsible`,...e})}function J({...e}){return(0,P.jsx)(L,{"data-slot":`collapsible-trigger`,...e})}function Y({...e}){return(0,P.jsx)(K,{"data-slot":`collapsible-content`,...e})}export{Y as n,J as r,q as t};

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.