PageSourceSearch

https://1x1.systems/_nuxt/Collapsible.ewEKviRC.js

js 1x1.systems collected 2026-10-06 13:50:21 UTC 4,085 bytes, 1 lines download raw bytes

1import{a as h,c as Q,w as O,G as g,H as W,P as V,X as b,T as X,C as Z,L as k,_ as d,u as c,a9 as S,a8 as x,M as D,a0 as q,Q as K,I as U,J as Y,V as ee}from"./swiper-vue.iPC35nDh.js";import{_ as te}from"./sprite.MSAEivaF.js";const ne={__name:"CollapseTransition",props:{name:{type:String,default:"collapse"},duration:{type:Number,default:300},easing:{type:String,default:"ease-in-out"},dimension:{type:String,default:"height",validator:s=>["height","width"].includes(s)}},emits:["before-appear","appear","after-appear","appear-cancelled","before-enter","enter","after-enter","enter-cancelled","leave","before-leave","after-leave","leave-cancelled"],setup(s,{emit:i}){const n=s,o=i,a=h(),u=Q(()=>{const e=[];return Object.keys(a.value).forEach(t=>{e.push(`${I(t)} ${n.duration}ms ${n.easing}`)}),e.join(", ")});O(()=>n.dimension,()=>{y()});const p=e=>{o("before-appear",e)},r=e=>{o("appear",e)},m=e=>{o("after-appear",e)},v=e=>{o("appear-cancelled",e)},N=e=>{o("before-enter",e)},j=(e,t)=>{C(e),A(e),T(e),$(e),_(e),L(e),o("enter",e,t),setTimeout(t,n.duration)},P=e=>{w(e),E(e),B(e),y(),o("after-enter",e)},R=e=>{o("enter-cancelled",e)},H=e=>{o("before-leave",e)},M=(e,t)=>{C(e),L(e),T(e),$(e),_(e),A(e),o("leave",e,t),setTimeout(t,n.duration)},z=e=>{w(e),E(e),B(e),y(),o("after-leave",e)},F=e=>{o("leave-cancelled",e)},C=e=>{if(a.value)return;const t=e.style.visibility,l=e.style.display;e.style.visibility="hidden",e.style.display="",a.value=G(e),e.style.visibility=t,e.style.display=l},y=()=>{a.value=null},G=e=>n.dimension==="height"?{height:e.offsetHeight+"px",paddingTop:e.style.paddingTop||f(e,"padding-top"),paddingBottom:e.style.paddingBottom||f(e,"padding-bottom")}:n.dimension==="width"?{width:e.offsetWidth+"px",paddingLeft:e.style.paddingLeft||f(e,"padding-left"),paddingRight:e.style.paddingRight||f(e,"padding-right")}:{},_=e=>{e.style.transition=u.value},E=e=>{e.style.transition=""},T=e=>{e.style.overflow="hidden"},w=e=>{e.style.overflow=""},A=e=>{Object.keys(a.value||{}).forEach(t=>{e.style[t]="0"})},L=e=>{Object.keys(a.value||{}).forEach(t=>{e.style[t]=a.value[t]})},B=e=>{Object.keys(a.value||{}).forEach(t=>{e.style[t]=""})},$=e=>{getComputedStyle(e)[n.dimension]},f=(e,t)=>getComputedStyle(e,null).getPropertyValue(t),I=e=>{const t=e.match[/([A-Z])/g];if(!t)return e;for(let l=0,J=t.length;l<J;l++)e=e.replace(new RegExp(t[l]),"-"+t[l].toLowerCase());return e.slice(0,1)==="-"&&(e=e.slice(1)),e};return(e,t)=>(g(),W(X,{name:s.name,onBeforeAppear:p,onAppear:r,onAfterAppear:m,onAppearCancelled:v,onBeforeEnter:N,onEnter:j,onAfterEnter:P,onEnterCancelled:R,onBeforeLeave:H,onLeave:M,onAfterLeave:z,onLeaveCancelled:F},{default:V(()=>[b(e.$slots,"default")]),_:3},8,["name"]))}},oe=ne,ae=te+"#icon-plus",se=d("svg",{class:"icon"},[d("use",{"xlink:href":ae})],-1),ie=[se],re={class:"el-collapsible__body"},le={class:"el-collapsible__content"},ce={__name:"Collapsible",props:{isCollapsed:{type:Boolean,default:!0},title:{type:String,default:""},duration:{type:Number,default:600}},setup(s){const i=s,n=h(i.isCollapsed),o=h(!1),a=()=>{o.value=!0},u=()=>{o.value=!1};return Z(()=>{document.documentElement.style.setProperty("--collapse-transition-duration",`${i.duration}ms`)}),O(()=>i.duration,()=>{document.documentElement.style.setProperty("--collapse-transition-duration",`${i.duration}ms`)}),(p,r)=>{const m=oe;return g(),k("div",{class:ee(["el-collapsible",{"is-open":!c(n),"is-transitioning":c(o)}])},[d("button",{type:"button",class:"el-icon-button el-icon-button--small el-icon-button--no-border el-icon-button--primary el-collapsible__button",onClick:r[0]||(r[0]=v=>n.value=!c(n))},ie),d("div",{class:"el-collapsible__header",tabindex:"0",onClick:r[1]||(r[1]=v=>n.value=!c(n))},[s.title?D("",!0):b(p.$slots,"title",{key:0},()=>[S(x(c(n)?"Open":"Close"),1)]),!p.$slots.title&&s.title?(g(),k(q,{key:1},[S(x(s.title),1)],64)):D("",!0)]),K(m,{duration:s.duration,onBeforeEnter:a,onAfterEnter:u,onBeforeLeave:a,onAfterLeave:u},{default:V(()=>[U(d("div",re,[d("div",le,[b(p.$slots,"default")])],512),[[Y,!c(n)]])]),_:3},8,["duration"])],2)}}},ue=ce;export{ue as _};

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.