import{bf as N,ay as v,az as S,a6 as R,ax as j,B as Q,D as Y,ca as Z,V as w,bn as ee,$ as ne,d as z,a0 as G,r as oe,dv as ae,J as te,N as U,H as le,O as T,f,R as k,dw as re,ag as se,dg as ie,c6 as de,aq as W,aS as ce,ad as pe,F as ue,aw as fe,bC as be,b6 as ve,b5 as ge,b7 as $e}from"./outputWidgets.fe662b4f.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="91f44ebb-07a2-465e-939a-7bf3ad75f0fe",n._sentryDebugIdIdentifier="sentry-dbid-91f44ebb-07a2-465e-939a-7bf3ad75f0fe")}catch{}})();const me=()=>({prefixCls:String,activeKey:N([Array,Number,String]),defaultActiveKey:N([Array,Number,String]),accordion:v(),destroyInactivePanel:v(),bordered:v(),expandIcon:S(),openAnimation:R.object,expandIconPosition:j(),collapsible:j(),ghost:v(),onChange:S(),"onUpdate:activeKey":S()}),X=()=>({openAnimation:R.object,prefixCls:String,header:R.any,headerClass:String,showArrow:v(),isActive:v(),destroyInactivePanel:v(),disabled:v(),accordion:v(),forceRender:v(),expandIcon:S(),extra:R.any,panelKey:N(),collapsible:j(),role:String,onItemClick:S()}),ye=n=>{const{componentCls:e,collapseContentBg:a,padding:p,collapseContentPaddingHorizontal:i,collapseHeaderBg:d,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:b,lineType:$,colorBorder:x,colorText:C,colorTextHeading:g,colorTextDisabled:m,fontSize:h,lineHeight:y,marginSM:A,paddingSM:o,motionDurationSlow:t,fontSizeIcon:r}=n,s=`${b}px ${$} ${x}`;return{[e]:w(w({},ne(n)),{backgroundColor:d,border:s,borderBottom:0,borderRadius:`${u}px`,["&-rtl"]:{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:s,["&:last-child"]:{[`
            &,
            & > ${e}-header`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:l,color:g,lineHeight:y,cursor:"pointer",transition:`all ${t}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:h*y,display:"flex",alignItems:"center",paddingInlineEnd:A},[`${e}-arrow`]:w(w({},ee()),{fontSize:r,svg:{transition:`transform ${t}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-header-collapsible-only`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-icon-collapsible-only`]:{cursor:"default",[`${e}-expand-icon`]:{cursor:"pointer"}},[`&${e}-no-arrow`]:{[`> ${e}-header`]:{paddingInlineStart:o}}},[`${e}-content`]:{color:C,backgroundColor:a,borderTop:s,[`& > ${e}-content-box`]:{padding:`${p}px ${i}px`},["&-hidden"]:{display:"none"}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`& ${e}-item-disabled > ${e}-header`]:{[`
          &,
          & > .arrow
        `]:{color:m,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:A}}}}})}},xe=n=>{const{componentCls:e}=n,a=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[a]:{transform:"rotate(180deg)"}}}},Ce=n=>{const{componentCls:e,collapseHeaderBg:a,paddingXXS:p,colorBorder:i}=n;return{[`${e}-borderless`]:{backgroundColor:a,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${i}`},[`
        > ${e}-item:last-child,
        > ${e}-item:last-child ${e}-header
      `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:p}}}},he=n=>{const{componentCls:e,paddingSM:a}=n;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:a}}}}}},Ae=Q("Collapse",n=>{const e=Y(n,{collapseContentBg:n.colorBgContainer,collapseHeaderBg:n.colorFillAlter,collapseHeaderPadding:`${n.paddingSM}px ${n.padding}px`,collapsePanelBorderRadius:n.borderRadiusLG,collapseContentPaddingHorizontal:16});return[ye(e),Ce(e),he(e),xe(e),Z(e)]});function F(n){let e=n;if(!Array.isArray(e)){const a=typeof e;e=a==="number"||a==="string"?[e]:[]}return e.map(a=>String(a))}const Se=z({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:G(me(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(n,e){let{attrs:a,slots:p,emit:i}=e;const d=oe(F(ae([n.activeKey,n.defaultActiveKey])));te(()=>n.activeKey,()=>{d.value=F(n.activeKey)},{deep:!0});const{prefixCls:l,direction:u,rootPrefixCls:b}=U("collapse",n),[$,x]=Ae(l),C=le(()=>{const{expandIconPosition:o}=n;return o!==void 0?o:u.value==="rtl"?"end":"start"}),g=o=>{const{expandIcon:t=p.expandIcon}=n,r=t?t(o):f(ce,{rotate:o.isActive?90:void 0},null);return f("div",{class:[`${l.value}-expand-icon`,x.value],onClick:()=>["header","icon"].includes(n.collapsible)&&h(o.panelKey)},[pe(Array.isArray(t)?r[0]:r)?W(r,{class:`${l.value}-arrow`},!1):r])},m=o=>{n.activeKey===void 0&&(d.value=o);const t=n.accordion?o[0]:o;i("update:activeKey",t),i("change",t)},h=o=>{let t=d.value;if(n.accordion)t=t[0]===o?[]:[o];else{t=[...t];const r=t.indexOf(o);r>-1?t.splice(r,1):t.push(o)}m(t)},y=(o,t)=>{var r,s,I;if(ie(o))return;const c=d.value,{accordion:P,destroyInactivePanel:E,collapsible:K,openAnimation:D}=n,_=D||de(`${b.value}-motion-collapse`),B=String((r=o.key)!==null&&r!==void 0?r:t),{header:q=(I=(s=o.children)===null||s===void 0?void 0:s.header)===null||I===void 0?void 0:I.call(s),headerClass:J,collapsible:H,disabled:V}=o.props||{};let M=!1;P?M=c[0]===B:M=c.indexOf(B)>-1;let O=H!=null?H:K;(V||V==="")&&(O="disabled");const L={key:B,panelKey:B,header:q,headerClass:J,isActive:M,prefixCls:l.value,destroyInactivePanel:E,openAnimation:_,accordion:P,onItemClick:O==="disabled"?null:h,expandIcon:g,collapsible:O};return W(o,L)},A=()=>{var o;return se((o=p.default)===null||o===void 0?void 0:o.call(p)).map(y)};return()=>{const{accordion:o,bordered:t,ghost:r}=n,s=T(l.value,{[`${l.value}-borderless`]:!t,[`${l.value}-icon-position-${C.value}`]:!0,[`${l.value}-rtl`]:u.value==="rtl",[`${l.value}-ghost`]:!!r,[a.class]:!!a.class},x.value);return $(f("div",k(k({class:s},re(a)),{},{style:a.style,role:o?"tablist":null}),[A()]))}}}),Ie=z({compatConfig:{MODE:3},name:"PanelContent",props:X(),setup(n,e){let{slots:a}=e;const p=ue(!1);return fe(()=>{(n.isActive||n.forceRender)&&(p.value=!0)}),()=>{var i;if(!p.value)return null;const{prefixCls:d,isActive:l,role:u}=n;return f("div",{class:T(`${d}-content`,{[`${d}-content-active`]:l,[`${d}-content-inactive`]:!l}),role:u},[f("div",{class:`${d}-content-box`},[(i=a.default)===null||i===void 0?void 0:i.call(a)])])}}}),Pe=z({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:G(X(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(n,e){let{slots:a,emit:p,attrs:i}=e;be(n.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:d}=U("collapse",n),l=()=>{p("itemClick",n.panelKey)},u=b=>{(b.key==="Enter"||b.keyCode===13||b.which===13)&&l()};return()=>{var b,$;const{header:x=(b=a.header)===null||b===void 0?void 0:b.call(a),headerClass:C,isActive:g,showArrow:m,destroyInactivePanel:h,accordion:y,forceRender:A,openAnimation:o,expandIcon:t=a.expandIcon,extra:r=($=a.extra)===null||$===void 0?void 0:$.call(a),collapsible:s}=n,I=s==="disabled",c=d.value,P=T(`${c}-header`,{[C]:C,[`${c}-header-collapsible-only`]:s==="header",[`${c}-icon-collapsible-only`]:s==="icon"}),E=T({[`${c}-item`]:!0,[`${c}-item-active`]:g,[`${c}-item-disabled`]:I,[`${c}-no-arrow`]:!m,[`${i.class}`]:!!i.class});let K=f("i",{class:"arrow"},null);m&&typeof t=="function"&&(K=t(n));const D=ve(f(Ie,{prefixCls:c,isActive:g,forceRender:A,role:y?"tabpanel":null},{default:a.default}),[[$e,g]]),_=w({appear:!1,css:!1},o);return f("div",k(k({},i),{},{class:E}),[f("div",{class:P,onClick:()=>!["header","icon"].includes(s)&&l(),role:y?"tab":"button",tabindex:I?-1:0,"aria-expanded":g,onKeypress:u},[m&&K,f("span",{onClick:()=>s==="header"&&l(),class:`${c}-header-text`},[x]),r&&f("div",{class:`${c}-extra`},[r])]),f(ge,_,{default:()=>[!h||g?D:null]})])}}});export{Pe as A,Se as C};
//# sourceMappingURL=CollapsePanel.b706068f.js.map
