import{bn as O,aH as v,aI as S,a5 as E,aG as z,z as q,B as J,cf as Y,U as w,bv as ee,Z as ne,d as j,$ as W,r as ae,du as oe,H as te,L as F,G as le,N as R,f,Q as T,dv as re,af as se,au as ie,cc as de,az as U,a$ as ce,ac as pe,E as ue,aF as fe,ar as be,be as ve,bd as $e,bf as ge}from"./outputWidgets.f8f8676d.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]="20d2c908-b90d-4016-9aad-caabb9c2a04b",n._sentryDebugIdIdentifier="sentry-dbid-20d2c908-b90d-4016-9aad-caabb9c2a04b")}catch{}})();const me=()=>({prefixCls:String,activeKey:O([Array,Number,String]),defaultActiveKey:O([Array,Number,String]),accordion:v(),destroyInactivePanel:v(),bordered:v(),expandIcon:S(),openAnimation:E.object,expandIconPosition:z(),collapsible:z(),ghost:v(),onChange:S(),"onUpdate:activeKey":S()}),L=()=>({openAnimation:E.object,prefixCls:String,header:E.any,headerClass:String,showArrow:v(),isActive:v(),destroyInactivePanel:v(),disabled:v(),accordion:v(),forceRender:v(),expandIcon:S(),extra:E.any,panelKey:O(),collapsible:z(),role:String,onItemClick:S()}),ye=n=>{const{componentCls:e,collapseContentBg:o,padding:p,collapseContentPaddingHorizontal:i,collapseHeaderBg:d,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:b,lineType:g,colorBorder:x,colorText:h,colorTextHeading:$,colorTextDisabled:m,fontSize:C,lineHeight:y,marginSM:A,paddingSM:a,motionDurationSlow:t,fontSizeIcon:r}=n,s=`${b}px ${g} ${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:$,lineHeight:y,cursor:"pointer",transition:`all ${t}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:C*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:a}}},[`${e}-content`]:{color:h,backgroundColor:o,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,o=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[o]:{transform:"rotate(180deg)"}}}},he=n=>{const{componentCls:e,collapseHeaderBg:o,paddingXXS:p,colorBorder:i}=n;return{[`${e}-borderless`]:{backgroundColor:o,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}}}},Ce=n=>{const{componentCls:e,paddingSM:o}=n;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:o}}}}}},Ae=q("Collapse",n=>{const e=J(n,{collapseContentBg:n.colorBgContainer,collapseHeaderBg:n.colorFillAlter,collapseHeaderPadding:`${n.paddingSM}px ${n.padding}px`,collapsePanelBorderRadius:n.borderRadiusLG,collapseContentPaddingHorizontal:16});return[ye(e),he(e),Ce(e),xe(e),Y(e)]});function V(n){let e=n;if(!Array.isArray(e)){const o=typeof e;e=o==="number"||o==="string"?[e]:[]}return e.map(o=>String(o))}const Se=j({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:W(me(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(n,e){let{attrs:o,slots:p,emit:i}=e;const d=ae(V(oe([n.activeKey,n.defaultActiveKey])));te(()=>n.activeKey,()=>{d.value=V(n.activeKey)},{deep:!0});const{prefixCls:l,direction:u,rootPrefixCls:b}=F("collapse",n),[g,x]=Ae(l),h=le(()=>{const{expandIconPosition:a}=n;return a!==void 0?a:u.value==="rtl"?"end":"start"}),$=a=>{const{expandIcon:t=p.expandIcon}=n,r=t?t(a):f(ce,{rotate:a.isActive?90:void 0},null);return f("div",{class:[`${l.value}-expand-icon`,x.value],onClick:()=>["header","icon"].includes(n.collapsible)&&C(a.panelKey)},[pe(Array.isArray(t)?r[0]:r)?U(r,{class:`${l.value}-arrow`},!1):r])},m=a=>{n.activeKey===void 0&&(d.value=a);const t=n.accordion?a[0]:a;i("update:activeKey",t),i("change",t)},C=a=>{let t=d.value;if(n.accordion)t=t[0]===a?[]:[a];else{t=[...t];const r=t.indexOf(a);r>-1?t.splice(r,1):t.push(a)}m(t)},y=(a,t)=>{var r,s,I;if(ie(a))return;const c=d.value,{accordion:P,destroyInactivePanel:k,collapsible:K,openAnimation:_}=n,D=_||de(`${b.value}-motion-collapse`),B=String((r=a.key)!==null&&r!==void 0?r:t),{header:X=(I=(s=a.children)===null||s===void 0?void 0:s.header)===null||I===void 0?void 0:I.call(s),headerClass:Q,collapsible:H,disabled:G}=a.props||{};let M=!1;P?M=c[0]===B:M=c.indexOf(B)>-1;let N=H!=null?H:K;(G||G==="")&&(N="disabled");const Z={key:B,panelKey:B,header:X,headerClass:Q,isActive:M,prefixCls:l.value,destroyInactivePanel:k,openAnimation:D,accordion:P,onItemClick:N==="disabled"?null:C,expandIcon:$,collapsible:N};return U(a,Z)},A=()=>{var a;return se((a=p.default)===null||a===void 0?void 0:a.call(p)).map(y)};return()=>{const{accordion:a,bordered:t,ghost:r}=n,s=R(l.value,{[`${l.value}-borderless`]:!t,[`${l.value}-icon-position-${h.value}`]:!0,[`${l.value}-rtl`]:u.value==="rtl",[`${l.value}-ghost`]:!!r,[o.class]:!!o.class},x.value);return g(f("div",T(T({class:s},re(o)),{},{style:o.style,role:a?"tablist":null}),[A()]))}}}),Ie=j({compatConfig:{MODE:3},name:"PanelContent",props:L(),setup(n,e){let{slots:o}=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:R(`${d}-content`,{[`${d}-content-active`]:l,[`${d}-content-inactive`]:!l}),role:u},[f("div",{class:`${d}-content-box`},[(i=o.default)===null||i===void 0?void 0:i.call(o)])])}}}),Pe=j({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:W(L(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(n,e){let{slots:o,emit:p,attrs:i}=e;be(n.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:d}=F("collapse",n),l=()=>{p("itemClick",n.panelKey)},u=b=>{(b.key==="Enter"||b.keyCode===13||b.which===13)&&l()};return()=>{var b,g;const{header:x=(b=o.header)===null||b===void 0?void 0:b.call(o),headerClass:h,isActive:$,showArrow:m,destroyInactivePanel:C,accordion:y,forceRender:A,openAnimation:a,expandIcon:t=o.expandIcon,extra:r=(g=o.extra)===null||g===void 0?void 0:g.call(o),collapsible:s}=n,I=s==="disabled",c=d.value,P=R(`${c}-header`,{[h]:h,[`${c}-header-collapsible-only`]:s==="header",[`${c}-icon-collapsible-only`]:s==="icon"}),k=R({[`${c}-item`]:!0,[`${c}-item-active`]:$,[`${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 _=ve(f(Ie,{prefixCls:c,isActive:$,forceRender:A,role:y?"tabpanel":null},{default:o.default}),[[ge,$]]),D=w({appear:!1,css:!1},a);return f("div",T(T({},i),{},{class:k}),[f("div",{class:P,onClick:()=>!["header","icon"].includes(s)&&l(),role:y?"tab":"button",tabindex:I?-1:0,"aria-expanded":$,onKeypress:u},[m&&K,f("span",{onClick:()=>s==="header"&&l(),class:`${c}-header-text`},[x]),r&&f("div",{class:`${c}-extra`},[r])]),f($e,D,{default:()=>[!C||$?_:null]})])}}});export{Pe as A,Se as C};
//# sourceMappingURL=CollapsePanel.cc3e3f63.js.map
