twcpt 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/twcpt.cjs.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),b=require("element-plus"),be=require("./resolver.cjs"),T={LARGE:"large",NORMAL:"normal",SMALL:"small"},_={BUTTON:"button",TEXT:"text"},yt=t.defineComponent({name:"JTWBtn",components:{ElButton:b.ElButton,ElTooltip:b.ElTooltip},inheritAttrs:!1,props:{size:{type:String,default:T.NORMAL,validator:e=>Object.values(T).includes(e)},type:{type:String,default:_.BUTTON,validator:e=>Object.values(_).includes(e)},color:{type:String,default:"primary"},outline:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0}},emits:{click:e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.computed(()=>e.tips!=null?String(e.tips):""),i=t.computed(()=>({"j-tw-btn":!0,"j-tw-btn--large":e.size===T.LARGE,"j-tw-btn--normal":e.size===T.NORMAL,"j-tw-btn--small":e.size===T.SMALL,"j-tw-btn--button":e.type===_.BUTTON&&!e.outline&&!e.flat,"j-tw-btn--outline":e.outline&&!e.flat,"j-tw-btn--flat":e.flat,"j-tw-btn--text":e.type===_.TEXT&&!e.flat})),a=t.computed(()=>{const f=e.color||"primary";return{"--j-btn-color":`var(--j-color-${f})`,"--j-btn-color-1":`var(--j-color-${f}-1)`,"--j-btn-color-2":`var(--j-color-${f}-2)`,"--j-btn-color-3":`var(--j-color-${f}-3)`,"--j-btn-color-4":`var(--j-color-${f}-4)`,"--j-btn-color-5":`var(--j-color-${f}-5)`,"--j-btn-color-6":`var(--j-color-${f}-6)`}}),s={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},c=t.computed(()=>({...s,...e.tooltipConfig})),u=f=>{n("click",f)};return o({get $el(){var f;return(f=l.value)==null?void 0:f.$el},click:()=>{var f,h;(h=(f=l.value)==null?void 0:f.$el)==null||h.click()}}),{elBtnRef:l,tooltipContent:r,computedClass:i,computedStyle:a,mergedTooltipConfig:c,handleClick:u}}}),L=(e,n)=>{const o=e.__vccOpts||e;for(const[l,r]of n)o[l]=r;return o};function Mt(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip");return t.openBlock(),t.createBlock(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"elBtnRef",class:e.computedClass,style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleClick}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[0]||(n[0]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",viewBox:"0 0 16 16",class:"j-tw-btn__loading-icon"},[t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"master_svg0_37_06013"},[t.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})])]),t.createElementVNode("g",{"clip-path":"url(#master_svg0_37_06013)"},[t.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0",fill:"transparent",style:{"mix-blend-mode":"passthrough"}}),t.createElementVNode("path",{d:"M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z","fill-rule":"evenodd",fill:"currentColor"})])],-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"])}const ee=L(yt,[["render",Mt]]),vt=t.defineComponent({name:"JTWDropdownBtn",components:{ElButton:b.ElButton,ElTooltip:b.ElTooltip},inheritAttrs:!1,props:{size:{type:String,default:T.NORMAL,validator:e=>Object.values(T).includes(e)},type:{type:String,default:_.BUTTON,validator:e=>Object.values(_).includes(e)},outline:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0},options:{type:Array,default:()=>[]},modelValue:{type:[String,Number],default:void 0}},emits:{click:e=>!0,"update:modelValue":e=>!0,select:e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),u=t.computed(()=>e.tips!=null?String(e.tips):""),p=t.computed(()=>{if(e.modelValue!=null){const M=e.options.find(Q=>Q.value===e.modelValue);if(M)return M.label}return e.label}),f=t.computed(()=>({"j-tw-dropdown-btn":!0,"j-tw-dropdown-btn--large":e.size===T.LARGE,"j-tw-dropdown-btn--normal":e.size===T.NORMAL,"j-tw-dropdown-btn--small":e.size===T.SMALL})),h=t.computed(()=>({"j-tw-btn":!0,"j-tw-dropdown-btn__main":!0,"j-tw-btn--large":e.size===T.LARGE,"j-tw-btn--normal":e.size===T.NORMAL,"j-tw-btn--small":e.size===T.SMALL,"j-tw-btn--button":e.type===_.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===_.TEXT})),S=t.computed(()=>({"j-tw-btn":!0,"j-tw-dropdown-btn__trigger":!0,"j-tw-btn--large":e.size===T.LARGE,"j-tw-btn--normal":e.size===T.NORMAL,"j-tw-btn--small":e.size===T.SMALL,"j-tw-btn--button":e.type===_.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===_.TEXT})),z=t.computed(()=>({"--j-btn-color":"var(--j-color-primary)","--j-btn-color-1":"var(--j-color-primary-1)","--j-btn-color-2":"var(--j-color-primary-2)","--j-btn-color-3":"var(--j-color-primary-3)","--j-btn-color-4":"var(--j-color-primary-4)","--j-btn-color-5":"var(--j-color-primary-5)","--j-btn-color-6":"var(--j-color-primary-6)","--j-dropdown-btn-color":"var(--j-color-primary)"})),E={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},$=t.computed(()=>({...E,...e.tooltipConfig})),C=()=>{if(!l.value||!a.value)return;const M=l.value.getBoundingClientRect(),Q=a.value.getBoundingClientRect(),B=window.innerHeight-M.bottom,O=M.top;let F=M.bottom+4;Q.height>50&&B<Q.height+20&&O>Q.height+20&&(F=M.top-Q.height-4),c.value={top:`${F}px`,left:`${M.left}px`}},A=()=>{s.value=!0,t.nextTick(()=>{t.nextTick(()=>{C()})})},y=()=>{s.value=!1},N=()=>{s.value?y():A()},k=M=>{n("click",M),N()},Z=M=>{M.disabled||(n("update:modelValue",M.value),n("select",M),y())},m=M=>{if(!l.value||!a.value)return;const Q=M.target;!l.value.contains(Q)&&!a.value.contains(Q)&&y()};return t.watch(s,M=>{M?(document.addEventListener("click",m),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0)):(document.removeEventListener("click",m),window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0))}),t.onMounted(()=>{}),t.onBeforeUnmount(()=>{document.removeEventListener("click",m),window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}),o({get $el(){return l.value},click:()=>{var M,Q;(Q=(M=r.value)==null?void 0:M.$el)==null||Q.click()},openDropdown:A,closeDropdown:y}),{dropdownRef:l,mainBtnRef:r,dropdownBtnRef:i,dropdownMenuRef:a,dropdownVisible:s,dropdownMenuStyle:c,tooltipContent:u,displayLabel:p,dropdownClass:f,mainBtnClass:h,dropdownBtnClass:S,computedStyle:z,mergedTooltipConfig:$,handleMainClick:k,toggleDropdown:N,handleOptionClick:Z}}}),Dt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20viewBox='0%200%2016%2016'%20class='j-tw-btn__loading-icon'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_06013'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_06013)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='transparent'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z'%20fill-rule='evenodd'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",Ct="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='j-tw-dropdown-btn__arrow'%20%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096406'%3e%3crect%20x='0'%20y='16'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='matrix(1,0,0,-1,0,32)'%20clip-path='url(%23master_svg0_1313_096406)'%3e%3cpath%20d='M4.5500030514375,21.78070152C4.4700031284375,21.95112768,4.4900026324375,22.15162873,4.6000032424375,22.30200529L7.6000232734375,26.3120298C7.7900228734375006,26.5626564,8.2100229734375,26.5626564,8.4000234734375,26.3120298L11.4000234734375,22.30200529C11.5100230734375,22.15162873,11.530022573437499,21.95112768,11.4500226734375,21.78070152C11.3600234734375,21.61027536,11.1900233734375,21.5,11.0000228734375,21.5L5.0000028634375,21.5C4.8100032834375,21.5,4.6400032034375,21.61027536,4.5500030514375,21.78070152Z'%20fill='currentColor'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Nt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096497'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096497)'%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.409602997126058,4.475219065789133)'%3e%3cpath%20d='M1.947415595,8.767578125Q1.947415595,8.693724342,1.961823825,8.621289645Q1.976231935,8.548854945,2.004494545,8.480622945Q2.032757165,8.412390945,2.073788165,8.350983795Q2.114819105,8.289576615,2.167041595,8.237354095Q2.219264115,8.185131605,2.280671295,8.144100665Q2.342078445,8.103069665,2.410310445,8.074807045Q2.478542445,8.046544435,2.550977145,8.032136325Q2.623411842,8.017728095,2.697265625,8.017728095Q2.771119408,8.017728095,2.843554105,8.032136325Q2.915988805,8.046544435,2.984220805,8.074807045Q3.052452805,8.103069665,3.113859955,8.144100665Q3.175267135,8.185131605,3.227489655,8.237354095Q3.279712145,8.289576615,3.320743085,8.350983795Q3.361774085,8.412390945,3.390036705,8.480622945Q3.418299315,8.548854945,3.4327074250000003,8.621289645Q3.447115655,8.693724342,3.447115655,8.767578125L3.447265625,8.767578125L3.447265625,13.017578125L12.697265625,13.017578125L12.697265625,13.017727825Q12.771118625,13.017727825,12.843553625,13.032135925Q12.915987625,13.046544125,12.984220625,13.074806725Q13.052451625,13.103069325,13.113859625,13.144100224999999Q13.175266625,13.185131025,13.227489625,13.237353825Q13.279710625,13.289576525000001,13.320741625,13.350983625Q13.361772625,13.412390725,13.390035625,13.480622324999999Q13.418298625,13.548854825,13.432706625,13.621289225Q13.447114625,13.693724625,13.447115625,13.767578125Q13.447114625,13.841431625,13.432706625,13.913866025Q13.418298625,13.986300425,13.390035625,14.054533025Q13.361772625,14.122764625,13.320741625,14.184171724999999Q13.279710625,14.245578725,13.227489625,14.297801925Q13.175266625,14.350024225,13.113859625,14.391055125000001Q13.052451625,14.432086025,12.984220625,14.460349125Q12.915987625,14.488611725,12.843553625,14.503020325Q12.771118625,14.517428425,12.697265625,14.517428425L12.697265625,14.517578125L2.697265625,14.517578125Q2.623397082,14.517578125,2.550947905,14.503167125000001Q2.478498745,14.488756225,2.410253105,14.460487825000001Q2.342007455,14.432219525,2.280588005,14.391180025Q2.219168545,14.350140525,2.166935565,14.297907825Q2.114702645,14.245674625,2.073663475,14.184255125Q2.032624305,14.122835625,2.004356025,14.054590225Q1.976087745,13.986344325000001,1.9616767149999998,13.913895625Q1.947265625,13.841446925,1.947265625,13.767578125L1.947265625,8.767578125L1.947415595,8.767578125Z'%20fill-rule='evenodd'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",kt={class:"j-tw-dropdown-btn__label"},Qt=["onClick"],It={class:"j-tw-dropdown-btn__option-label"},At={key:0,src:Nt,class:"j-tw-dropdown-btn__selected-icon",alt:"Selected"};function jt(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip");return t.openBlock(),t.createElementBlock("div",{ref:"dropdownRef",class:t.normalizeClass(e.dropdownClass),style:t.normalizeStyle(e.computedStyle)},[t.createVNode(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"mainBtnRef",class:[e.mainBtnClass,{"j-tw-dropdown-btn__main--open":e.dropdownVisible}],style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleMainClick}),t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",kt,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.displayLabel),1)])]),t.createElementVNode("img",{src:Ct,class:t.normalizeClass(["j-tw-dropdown-btn__arrow",{"j-tw-dropdown-btn__arrow--open":e.dropdownVisible}]),alt:"Dropdown arrow"},null,2)]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[1]||(n[1]=t.createElementVNode("img",{src:Dt,class:"j-tw-btn__loading-icon",alt:"Loading"},null,-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-dropdown-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-dropdown-btn__menu",style:t.normalizeStyle({...e.dropdownMenuStyle,...e.computedStyle}),onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,c=>(t.openBlock(),t.createElementBlock("div",{key:c.value,class:t.normalizeClass(["j-tw-dropdown-btn__option",{"j-tw-dropdown-btn__option--selected":c.value===e.modelValue,"j-tw-dropdown-btn__option--disabled":c.disabled}]),onClick:u=>e.handleOptionClick(c)},[t.createElementVNode("span",It,t.toDisplayString(c.label),1),c.value===e.modelValue?(t.openBlock(),t.createElementBlock("img",At)):t.createCommentVNode("",!0)],10,Qt))),128))],4)):t.createCommentVNode("",!0)]),_:1})]))],6)}const Tt=L(vt,[["render",jt]]),bt=t.defineComponent({name:"TreeNode",props:{node:{type:Object,required:!0},level:{type:Number,default:0},isLast:{type:Boolean,default:!1},expandedKeys:{type:Set,required:!0},tempSelectedValue:{type:[String,Number],default:void 0},tempSelectedValues:{type:Set,required:!0},multiple:{type:Boolean,default:!1},isNodeChecked:{type:Function,required:!0},isNodeIndeterminate:{type:Function,required:!0},isNodeSelected:{type:Function,required:!0},toggleExpand:{type:Function,required:!0},handleNodeClick:{type:Function,required:!0}}}),Lt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096239'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096239)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",St="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096226'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096226)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0,1,-1,0,16.0009765625,-4.0009765625)'%3e%3cpath%20d='M10.0009765625,6.75L18.0009765625,6.75L18.0009765625,6.74985003Q18.0748300625,6.74985003,18.1472644625,6.7354418Q18.2196998625,6.72103369,18.287931462499998,6.69277108Q18.356163062500002,6.66450846,18.4175701625,6.62347746Q18.4789771625,6.5824465199999995,18.5312003625,6.53022403Q18.5834216625,6.47800151,18.6244535625,6.41659433Q18.6654834625,6.35518718,18.6937465625,6.28695518Q18.7220096625,6.21872318,18.7364177625,6.14628848Q18.7508258625,6.073853783,18.7508268625,6Q18.7508258625,5.926146217,18.7364177625,5.85371152Q18.7220096625,5.78127682,18.6937465625,5.71304482Q18.6654834625,5.64481282,18.6244535625,5.58340567Q18.5834216625,5.52199849,18.5312003625,5.46977597Q18.4789771625,5.4175534800000005,18.4175701625,5.37652254Q18.356163062500002,5.33549154,18.287931462499998,5.30722892Q18.2196998625,5.27896631,18.1472644625,5.2645582Q18.0748300625,5.25014997,18.0009765625,5.25014997L18.0009765625,5.25L10.0009765625,5.25L10.0009765625,5.25014997Q9.9271227795,5.25014997,9.8546880825,5.2645582Q9.7822533825,5.27896631,9.7140213825,5.30722892Q9.6457893825,5.33549154,9.5843822325,5.37652254Q9.5229750525,5.4175534800000005,9.4707525325,5.46977597Q9.4185300425,5.52199849,9.3774991025,5.58340567Q9.3364681025,5.64481282,9.3082054825,5.71304482Q9.2799428725,5.78127682,9.2655347625,5.85371152Q9.2511265325,5.926146217,9.2511265325,6Q9.2511265325,6.073853783,9.2655347625,6.14628848Q9.2799428725,6.21872318,9.3082054825,6.28695518Q9.3364681025,6.35518718,9.3774991025,6.41659433Q9.4185300425,6.47800151,9.4707525325,6.53022403Q9.5229750525,6.5824465199999995,9.5843822325,6.62347746Q9.6457893825,6.66450846,9.7140213825,6.69277108Q9.7822533825,6.72103369,9.8546880825,6.7354418Q9.9271227795,6.74985003,10.0009765625,6.74985003L10.0009765625,6.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",zt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28192'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28192)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cpath%20d='M14.000001,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75L14.000001,10.75L14.000001,10.74985003Q14.0738544,10.74985003,14.1462889,10.7354418Q14.2187233,10.72103369,14.2869558,10.69277108Q14.3551874,10.66450846,14.4165945,10.62347746Q14.4780016,10.58244652,14.5302248,10.53022403Q14.5824471,10.47800151,14.6234779,10.41659433Q14.6645088,10.35518718,14.6927719,10.28695518Q14.721035,10.21872318,14.7354431,10.14628848Q14.7498512,10.073853783,14.7498512,10Q14.7498512,9.926146217,14.7354431,9.85371152Q14.721035,9.78127682,14.6927719,9.71304482Q14.6645088,9.64481282,14.6234779,9.58340567Q14.5824471,9.52199849,14.5302248,9.46977597Q14.4780016,9.41755348,14.4165945,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462889,9.2645582Q14.0738544,9.25014997,14.000001,9.25014997L14.000001,9.25Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",Et="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28187'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28187)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.6776717531065515,7.121317610617552)'%3e%3cpath%20d='M5.007504706328125,10.414215087890625Q5.007504706328125,10.340361304890624,5.021912936328125,10.267926607890624Q5.036321046328125,10.195491907890625,5.064583656328125,10.127259907890625Q5.092846276328125,10.059027907890625,5.133877276328125,9.997620757890624Q5.1749082163281255,9.936213577890625,5.227130706328125,9.883991057890626Q5.279353226328125,9.831768567890625,5.340760406328125,9.790737627890625Q5.402167556328125,9.749706627890625,5.470399556328125,9.721444007890625Q5.538631556328125,9.693181397890624,5.611066256328125,9.678773287890625Q5.683500953328125,9.664365057890626,5.757354736328125,9.664365057890626Q5.831208519328125,9.664365057890626,5.903643216328125,9.678773287890625Q5.976077916328125,9.693181397890624,6.044309916328125,9.721444007890625Q6.112541916328125,9.749706627890625,6.173949066328125,9.790737627890625Q6.235356246328125,9.831768567890625,6.287578766328125,9.883991057890626Q6.3398012563281245,9.936213577890625,6.380832196328125,9.997620757890624Q6.421863196328125,10.059027907890625,6.450125816328125,10.127259907890625Q6.478388426328125,10.195491907890625,6.492796536328125,10.267926607890624Q6.507204766328125,10.340361304890624,6.507204766328125,10.414215087890625L6.507354676328125,10.414215087890625L6.507354676328125,13.664215587890626L13.757355736328124,13.664215587890626L13.757355736328124,13.664365487890624Q13.831209136328125,13.664365487890624,13.903643636328125,13.678773687890626Q13.976078036328126,13.693181487890625,14.044310536328124,13.721444087890625Q14.112542136328125,13.749706787890625,14.173949236328125,13.790737587890625Q14.235356336328126,13.831768487890624,14.287579536328124,13.883991287890625Q14.339801836328125,13.936213487890626,14.380832636328124,13.997620787890625Q14.421863536328125,14.059027687890625,14.450126636328125,14.127259687890625Q14.478389736328126,14.195491787890624,14.492797836328124,14.267926687890625Q14.507205936328125,14.340361587890625,14.507205936328125,14.414215587890624Q14.507205936328125,14.488069487890625,14.492797836328124,14.560503987890625Q14.478389736328126,14.632938387890626,14.450126636328125,14.701170487890625Q14.421863536328125,14.769402487890625,14.380832636328124,14.830809587890625Q14.339801836328125,14.892216687890624,14.287579536328124,14.944438887890625Q14.235356336328126,14.996661187890625,14.173949236328125,15.037692087890626Q14.112541236328125,15.078722987890625,14.044309636328125,15.106986087890625Q13.976078036328126,15.135248687890625,13.903643636328125,15.149657287890625Q13.831209136328125,15.164065387890625,13.757355736328124,15.164065387890625L13.757355736328124,15.164215587890624L5.757354736328125,15.164215587890624Q5.683486201328125,15.164215087890625,5.611037026328125,15.149804087890626Q5.538587866328125,15.135393187890624,5.470342216328125,15.107124787890626Q5.402096626328125,15.078856487890626,5.340677146328125,15.037817487890624Q5.279257716328125,14.996778487890625,5.227024736328125,14.944545787890625Q5.174791816328125,14.892312487890624,5.133752586328125,14.830892587890624Q5.092713476328125,14.769473087890624,5.0644451963281245,14.701227687890626Q5.036176916328125,14.632982287890625,5.021765886328125,14.560533087890626Q5.007354856328125,14.488083887890625,5.007354796328125,14.414215587890624L5.007354796328125,10.414215087890625L5.007504706328125,10.414215087890625Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28023'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28023)'%3e%3crect%20x='2.75'%20y='2.75'%20width='14.5'%20height='14.5'%20rx='1.25'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'/%3e%3c/g%3e%3c/svg%3e",Bt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16385'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16385)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='5.833332061767578'%20ry='5.833332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23165DFF'%20fill='none'%20stroke-width='5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Ot="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16369'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16369)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='7.583332061767578'%20ry='7.583332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Ft={key:0,src:Lt,alt:"collapse",class:"j-tw-tree-select-btn__expand-icon"},_t={key:1,src:St,alt:"expand",class:"j-tw-tree-select-btn__expand-icon"},$t={key:2,class:"j-tw-tree-select-btn__expand-placeholder"},Pt={class:"j-tw-tree-select-btn__radio"},Vt={key:0,src:zt,alt:"indeterminate",class:"j-tw-tree-select-btn__radio-icon"},Rt={key:1,src:Et,alt:"checked",class:"j-tw-tree-select-btn__radio-icon"},Yt={key:2,src:xt,alt:"unchecked",class:"j-tw-tree-select-btn__radio-icon"},Ut={key:0,src:Bt,alt:"selected",class:"j-tw-tree-select-btn__radio-icon"},Wt={key:1,src:Ot,alt:"unselected",class:"j-tw-tree-select-btn__radio-icon"},Zt={class:"j-tw-tree-select-btn__node-label"};function Gt(e,n,o,l,r,i){const a=t.resolveComponent("TreeNode",!0);return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select-btn__node",{"j-tw-tree-select-btn__node--disabled":e.node.disabled},{"j-tw-tree-select-btn__node--selected":e.isNodeSelected(e.node.value)},{"j-tw-tree-select-btn__node--last":e.isLast}]),style:t.normalizeStyle({paddingLeft:`${16+e.level*28}px`,position:"relative"}),onClick:n[1]||(n[1]=s=>e.handleNodeClick(e.node))},[e.level>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-tree-select-btn__node-line",style:t.normalizeStyle({left:`${16+(e.level-1)*28+10}px`})},null,4)):t.createCommentVNode("",!0),e.node.children&&e.node.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"j-tw-tree-select-btn__expand-btn",onClick:n[0]||(n[0]=t.withModifiers(s=>e.toggleExpand(e.node.value),["stop"]))},[e.expandedKeys.has(e.node.value)?(t.openBlock(),t.createElementBlock("img",Ft)):(t.openBlock(),t.createElementBlock("img",_t))])):(t.openBlock(),t.createElementBlock("div",$t)),t.createElementVNode("div",Pt,[e.multiple?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isNodeIndeterminate(e.node)?(t.openBlock(),t.createElementBlock("img",Vt)):e.isNodeChecked(e.node.value)?(t.openBlock(),t.createElementBlock("img",Rt)):(t.openBlock(),t.createElementBlock("img",Yt))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.tempSelectedValue===e.node.value?(t.openBlock(),t.createElementBlock("img",Ut)):(t.openBlock(),t.createElementBlock("img",Wt))],64))]),t.createElementVNode("span",Zt,[t.renderSlot(e.$slots,"default",{node:e.node},()=>[t.createTextVNode(t.toDisplayString(e.node.label),1)])])],6),e.node.children&&e.node.children.length>0&&e.expandedKeys.has(e.node.value)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.node.children,(s,c)=>(t.openBlock(),t.createBlock(a,{key:s.value,node:s,level:e.level+1,"is-last":c===e.node.children.length-1,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:u})=>[t.renderSlot(e.$slots,"default",{node:u},()=>[t.createTextVNode(t.toDisplayString(u.label),1)])]),_:3},8,["node","level","is-last","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128)):t.createCommentVNode("",!0)],64)}const Le=L(bt,[["render",Gt]]),Jt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI3MiIgaGVpZ2h0PSI3MiIgdmlld0JveD0iMCAwIDcyIDcyIj48ZGVmcz48Y2xpcFBhdGggaWQ9Im1hc3Rlcl9zdmcwXzM3XzA4Mjg2Ij48cmVjdCB4PSIwIiB5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Number],default:void 0}},setup(e){const n={default:Jt,empty:Ht},o=t.computed(()=>n[e.name]||n.default),l=t.computed(()=>{const r={};return e.width!==void 0&&(r.width=typeof e.width=="number"?`${e.width}px`:e.width),e.height!==void 0&&(r.height=typeof e.height=="number"?`${e.height}px`:e.height),r});return{imageSrc:o,imageStyle:l}}}),Kt={class:"j-tw-status-img"},qt=["src","alt"];function en(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("div",Kt,[t.createElementVNode("img",{src:e.imageSrc,alt:e.name,style:t.normalizeStyle(e.imageStyle),class:"j-tw-status-img__image"},null,12,qt)])}const ie=L(Xt,[["render",en]]),tn=t.defineComponent({name:"JTWTreeSelectBtn",components:{ElButton:b.ElButton,ElTooltip:b.ElTooltip,JTWBtn:ee,TreeNode:Le,JTWStatusImg:ie},inheritAttrs:!1,props:{size:{type:String,default:T.NORMAL,validator:e=>Object.values(T).includes(e)},type:{type:String,default:_.BUTTON,validator:e=>Object.values(_).includes(e)},outline:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0},data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入部门名称"},dropdownWidth:{type:Number,default:320},dropdownMaxHeight:{type:Number,default:500},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},defaultExpandFirst:{type:Boolean,default:!1}},emits:{click:e=>!0,"update:modelValue":e=>!0,select:e=>!0,confirm:e=>!0,cancel:()=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),u=t.ref(""),p=t.ref(new Set),f=t.ref(void 0),h=t.ref(new Set);e.defaultExpandFirst&&e.data.length>0&&p.value.add(e.data[0].value),t.watch(()=>e.data,d=>{e.defaultExpandFirst&&d.length>0&&p.value.size===0&&p.value.add(d[0].value)},{immediate:!0});const S=t.computed(()=>e.tips!=null?String(e.tips):""),z=(d,w)=>{for(const v of d){if(v.value===w)return v;if(v.children){const j=z(v.children,w);if(j)return j}}return null},E=d=>{if(!d.children||d.children.length===0)return[];const w=[];for(const v of d.children)w.push(v.value),w.push(...E(v));return w},$=(d,w)=>{for(const v of d)if(v.children){if(v.children.some(P=>P.value===w))return v;const j=$(v.children,w);if(j)return j}return null},C=d=>{const w=$(e.data,d);return w&&w.children?w.children.map(v=>v.value).filter(v=>v!==d):e.data.map(v=>v.value).filter(v=>v!==d)},A=d=>{const w=$(e.data,d);w&&w.children&&(w.children.every(j=>h.value.has(j.value))?h.value.add(w.value):h.value.delete(w.value))},y=d=>e.multiple?h.value.has(d):f.value===d,N=d=>{if(!d.children||d.children.length===0)return[];const w=[];for(const v of d.children)w.push(v.value),w.push(...N(v));return w},k=d=>{if(!e.multiple||!d.children||d.children.length===0)return!1;const w=N(d),v=w.filter(j=>h.value.has(j)).length;return v>0&&v<w.length},Z=d=>e.multiple?h.value.has(d):f.value===d,m=t.computed(()=>{if(e.modelValue!=null){if(e.multiple&&Array.isArray(e.modelValue)){const d=e.modelValue.length;return d>0?`已选择 ${d} 项`:e.label}else if(!Array.isArray(e.modelValue)){const d=z(e.data,e.modelValue);if(d)return d.label}}return e.label}),I=(d,w)=>{if(!w)return d;const v=[];for(const j of d){const P=j.label.toLowerCase().includes(w.toLowerCase()),J=j.children?I(j.children,w):[];(P||J.length>0)&&(v.push({...j,children:J.length>0?J:j.children}),J.length>0&&p.value.add(j.value))}return v},M=t.computed(()=>I(e.data,u.value)),Q=t.computed(()=>({"j-tw-tree-select-btn":!0,"j-tw-tree-select-btn--large":e.size===T.LARGE,"j-tw-tree-select-btn--normal":e.size===T.NORMAL,"j-tw-tree-select-btn--small":e.size===T.SMALL})),x=t.computed(()=>({"j-tw-btn":!0,"j-tw-tree-select-btn__main":!0,"j-tw-btn--large":e.size===T.LARGE,"j-tw-btn--normal":e.size===T.NORMAL,"j-tw-btn--small":e.size===T.SMALL,"j-tw-btn--button":e.type===_.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===_.TEXT})),B=t.computed(()=>({"--j-btn-color":"var(--j-color-primary)","--j-btn-color-1":"var(--j-color-primary-1)","--j-btn-color-2":"var(--j-color-primary-2)","--j-btn-color-3":"var(--j-color-primary-3)","--j-btn-color-4":"var(--j-color-primary-4)","--j-btn-color-5":"var(--j-color-primary-5)","--j-btn-color-6":"var(--j-color-primary-6)","--j-tree-select-btn-color":"var(--j-color-primary)"})),O={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},F=t.computed(()=>({...O,...e.tooltipConfig})),Y=()=>{if(!l.value||!i.value)return;const d=l.value.getBoundingClientRect(),w=i.value.getBoundingClientRect(),j=window.innerHeight-d.bottom,P=d.top;let J=d.bottom+4;w.height>50&&j<w.height+20&&P>w.height+20&&(J=d.top-w.height-4),c.value={top:`${J}px`,left:`${d.left}px`,width:`${e.dropdownWidth}px`,maxHeight:`${e.dropdownMaxHeight}px`}},te=()=>{s.value=!0,e.multiple&&Array.isArray(e.modelValue)?h.value=new Set(e.modelValue):Array.isArray(e.modelValue)||(f.value=e.modelValue),u.value="",t.nextTick(()=>{t.nextTick(()=>{Y()})})},G=()=>{s.value=!1,u.value=""},ne=()=>{s.value?G():te()},se=d=>{n("click",d),ne()},ce=d=>{p.value.has(d)?p.value.delete(d):(e.accordion&&C(d).forEach(v=>{p.value.delete(v)}),p.value.add(d))},de=d=>{if(!d.disabled)if(e.multiple){const w=h.value.has(d.value),v=E(d);w?(h.value.delete(d.value),v.forEach(P=>h.value.delete(P))):(h.value.add(d.value),v.forEach(P=>h.value.add(P))),A(d.value);const j=e.data.filter(P=>h.value.has(P.value));n("select",j)}else f.value===d.value?f.value=void 0:f.value=d.value,n("select",d)},X=()=>{if(e.multiple){const d=Array.from(h.value),w=d.map(v=>z(e.data,v)).filter(v=>v!==null);n("update:modelValue",d),n("confirm",w.length>0?w:null)}else if(f.value!=null){const d=z(e.data,f.value);n("update:modelValue",f.value),n("confirm",d)}else n("update:modelValue",void 0),n("confirm",null);G()},Qe=()=>{n("cancel"),G()},g=d=>{if(!l.value||!i.value)return;const w=d.target;!l.value.contains(w)&&!i.value.contains(w)&&G()};return t.watch(s,d=>{d?(document.addEventListener("click",g),window.addEventListener("resize",Y),window.addEventListener("scroll",Y,!0)):(document.removeEventListener("click",g),window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y,!0))}),t.onMounted(()=>{}),t.onBeforeUnmount(()=>{document.removeEventListener("click",g),window.removeEventListener("resize",Y),window.removeEventListener("scroll",Y,!0)}),o({get $el(){return l.value},click:()=>{var d,w;(w=(d=r.value)==null?void 0:d.$el)==null||w.click()},openDropdown:te,closeDropdown:G}),{treeSelectRef:l,mainBtnRef:r,dropdownMenuRef:i,treeContainerRef:a,dropdownVisible:s,dropdownMenuStyle:c,searchText:u,expandedKeys:p,tempSelectedValue:f,tempSelectedValues:h,tooltipContent:S,displayLabel:m,filteredData:M,treeSelectClass:Q,mainBtnClass:x,computedStyle:B,mergedTooltipConfig:F,handleMainClick:se,toggleDropdown:ne,toggleExpand:ce,handleNodeClick:de,handleConfirm:X,handleCancel:Qe,isNodeChecked:y,isNodeIndeterminate:k,isNodeSelected:Z}}}),nn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20viewBox='0%200%2016%2016'%20class='j-tw-btn__loading-icon'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_06013'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_06013)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='transparent'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z'%20fill-rule='evenodd'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",on="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='j-tw-tree-select-btn__arrow'%20%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096406'%3e%3crect%20x='0'%20y='16'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='matrix(1,0,0,-1,0,32)'%20clip-path='url(%23master_svg0_1313_096406)'%3e%3cpath%20d='M4.5500030514375,21.78070152C4.4700031284375,21.95112768,4.4900026324375,22.15162873,4.6000032424375,22.30200529L7.6000232734375,26.3120298C7.7900228734375006,26.5626564,8.2100229734375,26.5626564,8.4000234734375,26.3120298L11.4000234734375,22.30200529C11.5100230734375,22.15162873,11.530022573437499,21.95112768,11.4500226734375,21.78070152C11.3600234734375,21.61027536,11.1900233734375,21.5,11.0000228734375,21.5L5.0000028634375,21.5C4.8100032834375,21.5,4.6400032034375,21.61027536,4.5500030514375,21.78070152Z'%20fill='currentColor'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",ln="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",rn={class:"j-tw-tree-select-btn__label"},an={class:"j-tw-tree-select-btn__search"},sn=["placeholder"],cn={class:"j-tw-tree-select-btn__tree",ref:"treeContainerRef"},dn={key:0,class:"j-tw-tree-select-btn__empty"},un={class:"j-tw-tree-select-btn__footer"};function fn(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip"),c=t.resolveComponent("JTWStatusImg"),u=t.resolveComponent("TreeNode"),p=t.resolveComponent("JTWBtn");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectRef",class:t.normalizeClass(e.treeSelectClass),style:t.normalizeStyle(e.computedStyle)},[t.createVNode(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"mainBtnRef",class:[e.mainBtnClass,{"j-tw-tree-select-btn__main--open":e.dropdownVisible}],style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleMainClick}),t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",rn,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.displayLabel),1)])]),t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select-btn__arrow",{"j-tw-tree-select-btn__arrow--open":e.dropdownVisible}])},[...n[3]||(n[3]=[t.createElementVNode("img",{src:on,alt:"Dropdown arrow"},null,-1)])],2)]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[2]||(n[2]=t.createElementVNode("img",{src:nn,class:"j-tw-btn__loading-icon",alt:"Loading"},null,-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-tree-select-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-tree-select-btn__menu",style:t.normalizeStyle(e.dropdownMenuStyle),onClick:n[1]||(n[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",an,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=f=>e.searchText=f),type:"text",class:"j-tw-tree-select-btn__search-input",placeholder:e.searchPlaceholder},null,8,sn),[[t.vModelText,e.searchText]]),n[4]||(n[4]=t.createElementVNode("img",{src:ln,alt:"search",class:"j-tw-tree-select-btn__search-icon"},null,-1))]),t.createElementVNode("div",cn,[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",dn,[t.createVNode(c,{width:32,height:32}),n[5]||(n[5]=t.createElementVNode("p",{class:"j-tw-tree-select-btn__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,f=>(t.openBlock(),t.createBlock(u,{key:f.value,node:f,level:0,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:h})=>[t.renderSlot(e.$slots,"default",{node:h},()=>[t.createTextVNode(t.toDisplayString(h.label),1)])]),_:3},8,["node","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128))],512),t.createElementVNode("div",un,[t.createVNode(p,{label:"取消",flat:"",onClick:e.handleCancel},null,8,["onClick"]),t.createVNode(p,{label:"确定",onClick:e.handleConfirm},null,8,["onClick"])])],4)):t.createCommentVNode("",!0)]),_:3})]))],6)}const gn=L(tn,[["render",fn]]),pn=t.defineComponent({name:"JTWTreeSelectInput",components:{ElSelect:b.ElSelect,ElOption:b.ElOption,JTWBtn:ee,TreeNode:Le,JTWStatusImg:ie},props:{data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入部门名称"},dropdownWidth:{type:Number,default:320},dropdownMaxHeight:{type:Number,default:500},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},defaultExpandFirst:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},size:{type:String,default:"default"},autoFill:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},allowRadioDeselect:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},bgGrey:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,select:e=>!0,confirm:e=>!0,cancel:()=>!0,change:e=>!0,clear:()=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),u=t.ref(""),p=t.ref(new Set),f=t.ref(void 0),h=t.ref(new Set);t.watch(()=>e.data,g=>{e.defaultExpandFirst&&g.length>0&&p.value.size===0&&p.value.add(g[0].value)},{immediate:!0});const S=(g,D)=>{for(const d of g){if(d.value===D)return d;if(d.children){const w=S(d.children,D);if(w)return w}}return null},z=g=>{if(!g.children||g.children.length===0)return[];const D=[];for(const d of g.children)D.push(d.value),D.push(...z(d));return D},E=(g,D)=>{for(const d of g)if(d.children){if(d.children.some(v=>v.value===D))return d;const w=E(d.children,D);if(w)return w}return null},$=g=>{const D=E(e.data,g);return D&&D.children?D.children.map(d=>d.value).filter(d=>d!==g):e.data.map(d=>d.value).filter(d=>d!==g)},C=g=>{const D=E(e.data,g);D&&D.children&&(D.children.every(w=>h.value.has(w.value))?h.value.add(D.value):h.value.delete(D.value))},A=g=>e.multiple?h.value.has(g):f.value===g,y=g=>{if(!g.children||g.children.length===0)return[];const D=[];for(const d of g.children)D.push(d.value),D.push(...y(d));return D},N=g=>{if(!e.multiple||!g.children||g.children.length===0)return!1;const D=y(g),d=D.filter(w=>h.value.has(w)).length;return d>0&&d<D.length},k=g=>e.multiple?h.value.has(g):f.value===g,Z=t.computed(()=>{if(e.modelValue!=null){if(e.multiple&&Array.isArray(e.modelValue))return e.modelValue.map(g=>{const D=S(e.data,g);return D?{value:D.value,label:D.label}:null}).filter(g=>g!==null);if(!Array.isArray(e.modelValue)){const g=S(e.data,e.modelValue);return g?[{value:g.value,label:g.label}]:[]}}return[]}),m=t.computed(()=>{if(e.multiple&&Array.isArray(e.modelValue))return e.modelValue;if(!Array.isArray(e.modelValue))return e.modelValue}),I=(g,D)=>{if(!D)return g;const d=[];for(const w of g){const v=w.label.toLowerCase().includes(D.toLowerCase()),j=w.children?I(w.children,D):[];(v||j.length>0)&&(d.push({...w,children:j.length>0?j:w.children}),j.length>0&&p.value.add(w.value))}return d},M=t.computed(()=>I(e.data,u.value)),Q=t.computed(()=>e.autoFill?e.multiple&&Array.isArray(e.modelValue)?e.modelValue.length>0:e.modelValue!=null:e.clearable),x=()=>{if(!l.value||!i.value)return;const g=l.value.getBoundingClientRect(),D=i.value.getBoundingClientRect(),w=window.innerHeight-g.bottom,v=g.top;let j=g.bottom+4;D.height>50&&w<D.height+20&&v>D.height+20&&(j=g.top-D.height-4),c.value={top:`${j}px`,left:`${g.left}px`,width:`${e.dropdownWidth}px`,maxHeight:`${e.dropdownMaxHeight}px`}},B=()=>{e.disabled||(s.value=!0,e.multiple&&Array.isArray(e.modelValue)?h.value=new Set(e.modelValue):Array.isArray(e.modelValue)||(f.value=e.modelValue),u.value="",t.nextTick(()=>{t.nextTick(()=>{x()})}))},O=()=>{s.value=!1,u.value=""},F=g=>{g.target.closest(".el-select__clear")||g.preventDefault()},Y=g=>{g.stopPropagation(),s.value||B()},te=g=>{g&&t.nextTick(()=>{var D;(D=r.value)==null||D.blur()})},G=()=>{e.multiple?h.value.clear():f.value=void 0,n("update:modelValue",e.multiple?[]:void 0),n("clear"),n("change",e.multiple?[]:void 0),O()},ne=g=>{p.value.has(g)?p.value.delete(g):(e.accordion&&$(g).forEach(d=>{p.value.delete(d)}),p.value.add(g))},se=g=>{if(!g.disabled)if(e.multiple){const D=h.value.has(g.value),d=z(g);D?(h.value.delete(g.value),d.forEach(v=>h.value.delete(v))):(h.value.add(g.value),d.forEach(v=>h.value.add(v))),C(g.value);const w=e.data.filter(v=>h.value.has(v.value));if(n("select",w),e.autoFill){const v=Array.from(h.value);n("update:modelValue",v),n("change",v)}e.autoClose&&O()}else f.value===g.value?e.allowRadioDeselect&&(f.value=void 0):f.value=g.value,n("select",g),e.autoFill&&(f.value!=null?(n("update:modelValue",f.value),n("change",f.value)):(n("update:modelValue",void 0),n("change",void 0))),e.autoClose&&f.value!=null&&O()},ce=()=>{if(e.multiple){const g=Array.from(h.value),D=g.map(d=>S(e.data,d)).filter(d=>d!==null);n("update:modelValue",g),n("confirm",D.length>0?D:null),n("change",g)}else if(f.value!=null){const g=S(e.data,f.value);n("update:modelValue",f.value),n("confirm",g),n("change",f.value)}else n("update:modelValue",void 0),n("confirm",null),n("change",void 0);O()},de=()=>{n("cancel"),O()},X=g=>{if(!l.value||!i.value)return;const D=g.target;!l.value.contains(D)&&!i.value.contains(D)&&O()};return t.watch(s,g=>{g?(setTimeout(()=>{document.addEventListener("mousedown",X)},100),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0)):(document.removeEventListener("mousedown",X),window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0))}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",X),window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}),o({get $el(){return l.value},focus:()=>{var g;(g=r.value)==null||g.focus()},blur:()=>{var g;(g=r.value)==null||g.blur()},openDropdown:B,closeDropdown:O}),{treeSelectInputRef:l,selectRef:r,dropdownMenuRef:i,treeContainerRef:a,dropdownVisible:s,dropdownMenuStyle:c,searchText:u,expandedKeys:p,tempSelectedValue:f,tempSelectedValues:h,displayOptions:Z,selectDisplayValue:m,filteredData:M,computedClearable:Q,handleMouseDown:F,handleSelectClick:Y,handleVisibleChange:te,handleClear:G,toggleExpand:ne,handleNodeClick:se,handleConfirm:ce,handleCancel:de,isNodeChecked:A,isNodeIndeterminate:N,isNodeSelected:k}}}),mn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",wn={class:"j-tw-tree-select-input__search"},hn=["placeholder"],yn={class:"j-tw-tree-select-input__tree",ref:"treeContainerRef"},Mn={key:0,class:"j-tw-tree-select-input__empty"},vn={key:0,class:"j-tw-tree-select-input__footer"};function Dn(e,n,o,l,r,i){const a=t.resolveComponent("el-option"),s=t.resolveComponent("el-select"),c=t.resolveComponent("JTWStatusImg"),u=t.resolveComponent("TreeNode"),p=t.resolveComponent("JTWBtn");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectInputRef",class:t.normalizeClass(["j-tw-tree-select-input",{"j-tw-tree-select-input--open":e.dropdownVisible,"j-tw-tree-select-input--bg-grey":e.bgGrey}]),onMousedown:n[2]||(n[2]=(...f)=>e.handleMouseDown&&e.handleMouseDown(...f))},[t.createVNode(s,{ref:"selectRef","model-value":e.selectDisplayValue,placeholder:e.placeholder,disabled:e.disabled,clearable:e.computedClearable,size:e.size,"popper-class":"j-tw-tree-select-input__hidden-popper",onClick:t.withModifiers(e.handleSelectClick,["stop"]),onClear:e.handleClear,onVisibleChange:e.handleVisibleChange},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.displayOptions,f=>(t.openBlock(),t.createBlock(a,{key:f.value,label:f.label,value:f.value,style:{display:"none"}},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","disabled","clearable","size","onClick","onClear","onVisibleChange"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-tree-select-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-tree-select-input__menu",style:t.normalizeStyle(e.dropdownMenuStyle),onClick:n[1]||(n[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",wn,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=f=>e.searchText=f),type:"text",class:"j-tw-tree-select-input__search-input",placeholder:e.searchPlaceholder},null,8,hn),[[t.vModelText,e.searchText]]),n[3]||(n[3]=t.createElementVNode("img",{src:mn,alt:"search",class:"j-tw-tree-select-input__search-icon"},null,-1))]),t.createElementVNode("div",yn,[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",Mn,[t.createVNode(c,{width:32,height:32}),n[4]||(n[4]=t.createElementVNode("p",{class:"j-tw-tree-select-input__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,f=>(t.openBlock(),t.createBlock(u,{key:f.value,node:f,level:0,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:h})=>[t.renderSlot(e.$slots,"default",{node:h},()=>[t.createTextVNode(t.toDisplayString(h.label),1)])]),_:3},8,["node","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128))],512),e.hideFooter?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",vn,[t.createVNode(p,{label:"取消",flat:"",onClick:e.handleCancel},null,8,["onClick"]),t.createVNode(p,{label:"确定",onClick:e.handleConfirm},null,8,["onClick"])]))],4)):t.createCommentVNode("",!0)]),_:3})]))],34)}const Cn=L(pn,[["render",Dn]]),Nn=t.defineComponent({name:"JTWDatePicker",components:{ElDatePicker:b.ElDatePicker},props:{modelValue:{type:Array,default:void 0},format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:String,default:"选择日期范围"},startPlaceholder:{type:String,default:"开始日期"},endPlaceholder:{type:String,default:"结束日期"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},disabledDate:{type:Function,default:void 0},minDate:{type:[Date,String,Number],default:void 0},maxDate:{type:[Date,String,Number],default:void 0},defaultValue:{type:[Date,Array],default:void 0},rangeSeparator:{type:String,default:"—"},showClearButton:{type:Boolean,default:!0},placement:{type:String,default:"bottom-start"},customClass:{type:String,default:""},popperClass:{type:String,default:""},shortcuts:{type:Array,default:void 0},validateEvent:{type:Boolean,default:!0},popperOptions:{type:Object,default:void 0},bgGrey:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},showShortcuts:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,change:e=>!0,blur:e=>!0,focus:e=>!0,clear:()=>!0,"visible-change":e=>!0},setup(e,{emit:n,expose:o}){const l=t.inject("elFormItem",null),r=t.ref(null),i=t.ref(null),a=t.computed({get(){return e.modelValue},set(C){n("update:modelValue",C)}}),s=C=>{var A;n("change",C),e.validateEvent&&l&&((A=l.validate)==null||A.call(l,"change"))},c=C=>{var A;n("blur",C),e.validateEvent&&l&&((A=l.validate)==null||A.call(l,"blur"))},u=C=>{n("focus",C)},p=()=>{n("clear")},f=C=>{n("visible-change",C)},h=t.computed(()=>{var C;return{...e.popperOptions,modifiers:[...((C=e.popperOptions)==null?void 0:C.modifiers)||[],{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!1}}]}}),S=t.computed(()=>{if(e.showShortcuts)return e.shortcuts?e.shortcuts:[{text:"本周",value:()=>{const C=new Date,A=C.getDay(),y=A===0?6:A-1,N=new Date(C);N.setDate(C.getDate()-y),N.setHours(0,0,0,0);const k=new Date(N);return k.setDate(N.getDate()+6),k.setHours(23,59,59,999),[N,k]}},{text:"本月",value:()=>{const C=new Date,A=new Date(C.getFullYear(),C.getMonth(),1),y=new Date(C.getFullYear(),C.getMonth()+1,0,23,59,59,999);return[A,y]}},{text:"本年度",value:()=>{const C=new Date,A=new Date(C.getFullYear(),0,1),y=new Date(C.getFullYear(),11,31,23,59,59,999);return[A,y]}}]});return o({get $el(){return r.value},focus:()=>{var A;const C=(A=r.value)==null?void 0:A.querySelector("input");C==null||C.focus()},blur:()=>{var A;const C=(A=r.value)==null?void 0:A.querySelector("input");C==null||C.blur()}}),{datePickerRef:r,elDatePickerRef:i,internalValue:a,computedPopperOptions:h,computedShortcuts:S,handleChange:s,handleBlur:c,handleFocus:u,handleClear:p,handleVisibleChange:f}}}),kn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096141'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096141)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M0.916748046875,6.33331298828125L0.916748046875,13.33331298828125Q0.916747986875,13.92012448828125,1.331683366875,14.33505438828125Q1.746613651875,14.74997998828125,2.333414736875,14.74997998828125L13.666748046875,14.74997998828125Q14.253557046875,14.74997998828125,14.668486046875,14.33505148828125Q15.083415046875,13.920122588281249,15.083415046875,13.33331298828125L15.083415046875,6.33331298828125Q15.083414046875,6.25944444528125,15.069003046875,6.18699526828125Q15.054592046875,6.11454610828125,15.026324046875,6.04630046828125Q14.998054046875,5.97805481828125,14.957016046875,5.91663536828125Q14.915977046875,5.85521590828125,14.863745046875,5.80298292828125Q14.811512046875,5.75075000828125,14.750092046875,5.70971083828125Q14.688672046875,5.66867166828125,14.620426046875,5.64040338828125Q14.552181046875,5.61213510828125,14.479732046875,5.59772407828125Q14.407283046875,5.58331298828125,14.333415046875,5.58331298828125L1.666748046875,5.58331298828125Q1.592879503875,5.58331298828125,1.520430326875,5.59772407828125Q1.447981166875,5.61213510828125,1.379735526875,5.64040338828125Q1.311489876875,5.66867166828125,1.250070426875,5.70971083828125Q1.188650966875,5.75075000828125,1.136417986875,5.80298292828125Q1.084185066875,5.85521590828125,1.043145896875,5.91663536828125Q1.0021067268750001,5.97805481828125,0.973838446875,6.04630046828125Q0.945570166875,6.11454610828125,0.931159136875,6.18699526828125Q0.916748046875,6.25944444528125,0.916748046875,6.33331298828125ZM2.416747986875,13.24997948828125L13.583415046875,13.24997948828125L13.583415046875,7.08331298828125L2.416748046875,7.08331298828125L2.416747986875,13.24997948828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M0.916748046875,2.99997967828125L0.916748046875,6.33331298828125Q0.916748046875,6.40718178828125,0.931159136875,6.47963048828125Q0.945570166875,6.55207968828125,0.973838446875,6.62032508828125Q1.0021067268750001,6.68857098828125,1.043145896875,6.74998998828125Q1.084185066875,6.81140998828125,1.136417986875,6.86364268828125Q1.188650966875,6.91587538828125,1.250070426875,6.95691488828125Q1.311489876875,6.99795388828125,1.379735526875,7.02622218828125Q1.447981166875,7.05449058828125,1.520430326875,7.06890198828125Q1.592879503875,7.08331298828125,1.666748046875,7.08331298828125L14.333415046875,7.08331298828125Q14.407283046875,7.08331298828125,14.479732046875,7.06890198828125Q14.552181046875,7.05449058828125,14.620426046875,7.02622218828125Q14.688671046875,6.99795388828125,14.750092046875,6.95691488828125Q14.811510046875,6.91587538828125,14.863744046875,6.86364268828125Q14.915976046875,6.81140998828125,14.957015046875,6.74998998828125Q14.998054046875,6.68857098828125,15.026323046875,6.62032508828125Q15.054592046875,6.55207968828125,15.069002046875,6.47963048828125Q15.083414046875,6.40718178828125,15.083415046875,6.33331298828125L15.083415046875,2.99997967828125Q15.083415046875,2.41317737128125,14.668489046875,1.9982476482812501Q14.253559046875,1.58331298828125,13.666748046875,1.58331298828125L2.333414736875,1.58331304828125Q1.746612101875,1.58331304828125,1.331680086875,1.9982450582812499Q0.916748046875,2.41317707328125,0.916748046875,2.99997967828125ZM2.416748046875,5.58331298828125L13.583415046875,5.58331298828125L13.583415046875,3.08331298828125L2.416748046875,3.08331304828125L2.416748046875,5.58331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.583401923125,1.33331298828125Q4.583401923125,1.2594592052812499,4.597810153125,1.18702450828125Q4.612218263125,1.11458980828125,4.640480873125,1.04635780828125Q4.668743493125,0.9781258082812501,4.709774493125,0.91671865828125Q4.7508054331250005,0.85531147828125,4.803027923125,0.80308895828125Q4.855250443125,0.75086646828125,4.916657623125,0.70983552828125Q4.978064773125,0.66880452828125,5.046296773125,0.64054190828125Q5.114528773125,0.61227929828125,5.186963473125,0.59787118828125Q5.259398170125,0.58346295828125,5.333251953125,0.58346295828125Q5.407105736125,0.58346295828125,5.479540433125,0.59787118828125Q5.551975133125,0.61227929828125,5.620207133125,0.64054190828125Q5.688439133125,0.66880452828125,5.749846283125,0.70983552828125Q5.811253463125,0.75086646828125,5.863475983125,0.80308895828125Q5.9156984731249995,0.85531147828125,5.956729413125,0.91671865828125Q5.997760413125,0.9781258082812501,6.026023033125,1.04635780828125Q6.054285643125,1.11458980828125,6.068693753125,1.18702450828125Q6.083101983125,1.2594592052812499,6.083101983125,1.33331298828125L6.083251953125,1.33331298828125L6.083251953125,3.99997968828125L6.083101983125,3.99997968828125Q6.083101983125,4.073833488281251,6.068693753125,4.146267888281249Q6.054285643125,4.2187027882812504,6.026023033125,4.28693458828125Q5.997760413125,4.3551663882812495,5.956729413125,4.41657378828125Q5.9156984731249995,4.47798088828125,5.863475983125,4.53020358828125Q5.811253463125,4.582426088281251,5.749846283125,4.62345698828125Q5.688439133125,4.664487888281251,5.620207133125,4.69275048828125Q5.551975133125,4.72101308828125,5.479540433125,4.73542118828125Q5.407105736125,4.74982948828125,5.333251953125,4.74982978828125Q5.259398170125,4.74982948828125,5.186963473125,4.73542118828125Q5.114528773125,4.72101278828125,5.046296773125,4.69275018828125Q4.978064773125,4.664487588281251,4.916657623125,4.62345668828125Q4.855250443125,4.582426088281251,4.803027923125,4.53020358828125Q4.7508054331250005,4.47798088828125,4.709774493125,4.41657348828125Q4.668743493125,4.3551663882812495,4.640480873125,4.286934388281249Q4.612218263125,4.21870258828125,4.597810153125,4.146267888281249Q4.583401923125,4.073833488281251,4.583401923125,3.99997968828125L4.583251953125,3.99997968828125L4.583251953125,1.33331298828125L4.583401923125,1.33331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M9.916898016875,1.33331298828125Q9.916898016875,1.2594592052812499,9.931306246875,1.18702450828125Q9.945714356875,1.11458980828125,9.973976966875,1.04635780828125Q10.002239586875,0.9781258082812501,10.043270586875,0.91671865828125Q10.084301526875,0.85531147828125,10.136524016875,0.80308895828125Q10.188746536875,0.75086646828125,10.250153716875,0.70983552828125Q10.311560866875,0.66880452828125,10.379792866875,0.64054190828125Q10.448024866875,0.61227929828125,10.520459566875,0.59787118828125Q10.592894263875,0.58346295828125,10.666748046875,0.58346295828125Q10.740601829875,0.58346295828125,10.813036526875,0.59787118828125Q10.885471226875,0.61227929828125,10.953703226875,0.64054190828125Q11.021935226875,0.66880452828125,11.083342376875,0.70983552828125Q11.144749556875,0.75086646828125,11.196972076875,0.80308895828125Q11.249194566875,0.85531147828125,11.290225506875,0.91671865828125Q11.331256506875,0.9781258082812501,11.359519126875,1.04635780828125Q11.387781736875,1.11458980828125,11.402189846875,1.18702450828125Q11.416598076875,1.2594592052812499,11.416598076875,1.33331298828125L11.416748046875,1.33331298828125L11.416748046875,3.99997968828125L11.416598076875,3.99997968828125Q11.416598076875,4.073833488281251,11.402189846875,4.146267888281249Q11.387781736875,4.2187027882812504,11.359519126875,4.28693458828125Q11.331256506875,4.3551663882812495,11.290225506875,4.41657378828125Q11.249194566875,4.47798088828125,11.196972076875,4.53020358828125Q11.144749556875,4.582426088281251,11.083342376875,4.62345698828125Q11.021935226875,4.664487888281251,10.953703226875,4.69275048828125Q10.885471226875,4.72101308828125,10.813036526875,4.73542118828125Q10.740601829875,4.74982948828125,10.666748046875,4.74982978828125Q10.592894263875,4.74982948828125,10.520459566875,4.73542118828125Q10.448024866875,4.72101278828125,10.379792866875,4.69275018828125Q10.311560866875,4.664487588281251,10.250153716875,4.62345668828125Q10.188746536875,4.582426088281251,10.136524016875,4.53020358828125Q10.084301526875,4.47798088828125,10.043270586875,4.41657348828125Q10.002239586875,4.3551663882812495,9.973976966875,4.286934388281249Q9.945714356875,4.21870258828125,9.931306246875,4.146267888281249Q9.916898016875,4.073833488281251,9.916898016875,3.99997968828125L9.916748046875,3.99997968828125L9.916748046875,1.33331298828125L9.916898016875,1.33331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Qn={class:"j-tw-date-picker__separator"};function In(e,n,o,l,r,i){const a=t.resolveComponent("el-date-picker");return t.openBlock(),t.createElementBlock("div",{ref:"datePickerRef",class:t.normalizeClass(["j-tw-date-picker",{"j-tw-date-picker--bg-grey":e.bgGrey,"j-tw-date-picker--dense":e.dense}])},[t.createVNode(a,{ref:"elDatePickerRef",modelValue:e.internalValue,"onUpdate:modelValue":n[0]||(n[0]=s=>e.internalValue=s),type:"daterange",format:e.format,"value-format":e.valueFormat,placeholder:e.placeholder,"start-placeholder":e.startPlaceholder,"end-placeholder":e.endPlaceholder,disabled:e.disable,readonly:e.readonly,clearable:e.clearable,"disabled-date":e.disabledDate,"default-value":e.defaultValue,"range-separator":e.rangeSeparator,"popper-class":`j-tw-date-picker__popper ${e.popperClass||""}`,"popper-options":e.computedPopperOptions,placement:e.placement,shortcuts:e.computedShortcuts,class:"j-tw-date-picker__input",onChange:e.handleChange,onBlur:e.handleBlur,onFocus:e.handleFocus,onClear:e.handleClear,onVisibleChange:e.handleVisibleChange},{"prefix-icon":t.withCtx(()=>[...n[1]||(n[1]=[t.createElementVNode("img",{src:kn,alt:"calendar",class:"j-tw-date-picker__calendar-icon"},null,-1)])]),"range-separator":t.withCtx(()=>[t.createElementVNode("span",Qn,t.toDisplayString(e.rangeSeparator),1)]),_:1},8,["modelValue","format","value-format","placeholder","start-placeholder","end-placeholder","disabled","readonly","clearable","disabled-date","default-value","range-separator","popper-class","popper-options","placement","shortcuts","onChange","onBlur","onFocus","onClear","onVisibleChange"])],2)}const An=L(Nn,[["render",In]]),jn=t.defineComponent({name:"JTWTable",components:{ElCheckbox:b.ElCheckbox,ElPagination:b.ElPagination},props:{rows:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},rowKey:{type:[String,Function],default:"id"},loading:{type:Boolean,default:!1},height:{type:[String,Number],default:void 0},pagination:{type:[Object,Boolean],default:!1},showIndex:{type:Boolean,default:!1},selection:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无数据"},bordered:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1}},emits:{selectionChange:e=>!0,sortChange:e=>!0,sizeChange:e=>!0,currentChange:e=>!0,"update:pagination":e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref([]),i=(y,N)=>typeof e.rowKey=="function"?e.rowKey(y):y[e.rowKey]??N,a=y=>{const N={};return y.width&&(N.width=typeof y.width=="number"?`${y.width}px`:y.width),y.minWidth&&(N.minWidth=typeof y.minWidth=="number"?`${y.minWidth}px`:y.minWidth),y.width||(N.flex="1"),N},s=y=>r.value.some(N=>i(N,-1)===i(y,-1)),c=t.computed(()=>e.rows.length>0&&e.rows.every(y=>s(y))),u=t.computed(()=>{const y=e.rows.filter(N=>s(N)).length;return y>0&&y<e.rows.length}),p=y=>{r.value=y?[...e.rows]:[],n("selectionChange",r.value)},f=(y,N)=>{N?s(y)||r.value.push(y):r.value=r.value.filter(k=>i(k,-1)!==i(y,-1)),n("selectionChange",r.value)},h=y=>{n("sortChange",y)},S=()=>{const y=e.pagination;return y||null},z=y=>{n("sizeChange",y);const N=S();N&&n("update:pagination",{...N,pageSize:y,page:1})},E=y=>{n("currentChange",y);const N=S();N&&n("update:pagination",{...N,page:y})};return o({get $el(){return l.value},tableRef:l,clearSelection:()=>{r.value=[],n("selectionChange",[])},toggleRowSelection:(y,N)=>{const k=N??!s(y);f(y,k)}}),{tableRef:l,selectedRows:r,isAllSelected:c,isIndeterminate:u,isRowSelected:s,getRowKey:i,getColStyle:a,emptyText:e.emptyText,handleSelectAll:p,handleRowSelect:f,handleSortChange:h,handleSizeChange:z,handleCurrentChange:E}}}),Tn="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI3MiIgaGVpZ2h0PSI3MiIgdmlld0JveD0iMCAwIDcyIDcyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjAuNSIgeTE9IjAiIHg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2Niw0OSw1Mi4zODY2NjUsNTAuNDAwOTczOFE1MC45NjE3LDUzLDQ4LDUzTDI0LDUzWiIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsPSJ1cmwoI21hc3Rlcl9zdmcyXzI3MF81MzgxNykiIGZpbGwtb3BhY2l0eT0iMSIvPjwvc3ZnPg==",bn={class:"j-tw-table__header"},Ln={key:0,class:"j-tw-table__header-cell j-tw-table__header-cell--selection"},Sn={key:1,class:"j-tw-table__header-cell",style:{width:"60px","flex-shrink":"0"}},zn={key:2,class:"j-tw-table__header-cell j-tw-table__header-cell--action"},En={class:"j-tw-table__body-wrapper"},xn={key:0,class:"j-tw-table__body"},Bn={key:0,class:"j-tw-table__cell j-tw-table__cell--selection"},On={key:1,class:"j-tw-table__cell",style:{width:"60px","flex-shrink":"0"}},Fn={key:1},_n={key:2,class:"j-tw-table__cell j-tw-table__cell--action"},$n={key:1,class:"j-tw-table__empty"},Pn={class:"j-tw-table__empty-text"},Vn={key:0,class:"j-tw-table__pagination"};function Rn(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-pagination"),c=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["j-tw-table",{"j-tw-table--dense":e.dense,"j-tw-table--fixed":e.height}]),style:t.normalizeStyle(e.height?{height:typeof e.height=="number"?`${e.height}px`:e.height}:{})},[t.renderSlot(e.$slots,"header"),t.createElementVNode("div",bn,[e.selection?(t.openBlock(),t.createElementBlock("div",Ln,[t.createVNode(a,{"model-value":e.isAllSelected,indeterminate:e.isIndeterminate,onChange:n[0]||(n[0]=u=>e.handleSelectAll(!!u))},null,8,["model-value","indeterminate"])])):t.createCommentVNode("",!0),e.showIndex?(t.openBlock(),t.createElementBlock("div",Sn," 序号 ")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,u=>(t.openBlock(),t.createElementBlock("div",{key:u.prop,class:"j-tw-table__header-cell",style:t.normalizeStyle(e.getColStyle(u))},t.toDisplayString(u.label),5))),128)),e.$slots.action?(t.openBlock(),t.createElementBlock("div",zn," 操作 ")):t.createCommentVNode("",!0)]),t.createElementVNode("div",En,[e.rows&&e.rows.length>0?(t.openBlock(),t.createElementBlock("div",xn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.rows,(u,p)=>(t.openBlock(),t.createElementBlock("div",{key:e.getRowKey(u,p),class:t.normalizeClass(["j-tw-table__row",{"j-tw-table__row--selected":e.isRowSelected(u)}])},[e.selection?(t.openBlock(),t.createElementBlock("div",Bn,[t.createVNode(a,{"model-value":e.isRowSelected(u),onChange:f=>e.handleRowSelect(u,!!f)},null,8,["model-value","onChange"])])):t.createCommentVNode("",!0),e.showIndex?(t.openBlock(),t.createElementBlock("div",On,t.toDisplayString(p+1),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,f=>(t.openBlock(),t.createElementBlock("div",{key:f.prop,class:t.normalizeClass(["j-tw-table__cell",`j-tw-table__cell--align-${f.align||"left"}`]),style:t.normalizeStyle(e.getColStyle(f))},[f.type==="slot"?t.renderSlot(e.$slots,`col-${f.prop}`,{key:0,row:u,$index:p,column:f}):(t.openBlock(),t.createElementBlock("span",Fn,t.toDisplayString(u[f.prop]??"-"),1))],6))),128)),e.$slots.action?(t.openBlock(),t.createElementBlock("div",_n,[t.renderSlot(e.$slots,"action",{row:u,$index:p})])):t.createCommentVNode("",!0)],2))),128))])):(t.openBlock(),t.createElementBlock("div",$n,[t.renderSlot(e.$slots,"empty",{},()=>[n[1]||(n[1]=t.createElementVNode("img",{class:"j-tw-table__empty-img",src:Tn,alt:"no data"},null,-1)),t.createElementVNode("span",Pn,t.toDisplayString(e.emptyText),1)])]))]),e.pagination!==!1&&e.pagination?(t.openBlock(),t.createElementBlock("div",Vn,[t.createVNode(s,{"pager-count":5,"page-sizes":e.pagination.pageSizes||[10,20,50,100],"current-page":e.pagination.page,"page-size":e.pagination.pageSize,total:e.pagination.total,layout:e.pagination.layout||"total, sizes, prev, pager, next, jumper",background:"",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange},null,8,["page-sizes","current-page","page-size","total","layout","onSizeChange","onCurrentChange"])])):t.createCommentVNode("",!0)],6)),[[c,e.loading]])}const Yn=L(jn,[["render",Rn]]),Un=t.defineComponent({name:"JTWMessageItem",props:{id:{type:String,required:!0},type:{type:String,default:"info"},content:{type:String,required:!0},duration:{type:Number,default:3e3},showClose:{type:Boolean,default:!0},offset:{type:Number,default:20},onClose:{type:Function,default:void 0}},emits:{destroy:e=>!0},setup(e,{emit:n}){const o=t.ref(!1);let l;const r=t.computed(()=>({"j-tw-message":!0,[`j-tw-message--${e.type}`]:!0})),i=t.computed(()=>({top:`${e.offset}px`})),a=()=>{e.duration>0&&(l=window.setTimeout(()=>{c()},e.duration))},s=()=>{l&&(clearTimeout(l),l=void 0)},c=()=>{var h;o.value=!1,(h=e.onClose)==null||h.call(e)},u=()=>{n("destroy",e.id)},p=()=>{s()},f=()=>{a()};return t.onMounted(()=>{o.value=!0,a()}),{visible:o,computedClass:r,computedStyle:i,handleClose:c,handleAfterLeave:u,handleMouseEnter:p,handleMouseLeave:f}}}),Wn={class:"j-tw-message__icon"},Zn={key:0,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Gn={key:1,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Jn={key:2,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Hn={key:3,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Xn={class:"j-tw-message__content"};function Kn(e,n,o,l,r,i){return t.openBlock(),t.createBlock(t.Transition,{name:"j-tw-message-fade",onAfterLeave:e.handleAfterLeave},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.computedClass),style:t.normalizeStyle(e.computedStyle),onMouseenter:n[1]||(n[1]=(...a)=>e.handleMouseEnter&&e.handleMouseEnter(...a)),onMouseleave:n[2]||(n[2]=(...a)=>e.handleMouseLeave&&e.handleMouseLeave(...a))},[t.createElementVNode("div",Wn,[e.type==="success"?(t.openBlock(),t.createElementBlock("svg",Zn,[...n[3]||(n[3]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null,-1)])])):e.type==="warning"?(t.openBlock(),t.createElementBlock("svg",Gn,[...n[4]||(n[4]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1)])])):e.type==="error"?(t.openBlock(),t.createElementBlock("svg",Jn,[...n[5]||(n[5]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",Hn,[...n[6]||(n[6]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1)])]))]),t.createElementVNode("div",Xn,t.toDisplayString(e.content),1),e.showClose?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-message__close",onClick:n[0]||(n[0]=(...a)=>e.handleClose&&e.handleClose(...a))},[...n[7]||(n[7]=[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1)])])):t.createCommentVNode("",!0)],38),[[t.vShow,e.visible]])]),_:1},8,["onAfterLeave"])}const qn=L(Un,[["render",Kn]]),U=t.ref([]),eo=t.defineComponent({name:"JTWMessages",components:{MessageItem:qn},setup(){return{messages:U,handleDestroy:n=>{const o=U.value.findIndex(l=>l.id===n);o!==-1&&U.value.splice(o,1)}}}}),to={class:"j-tw-message-container"};function no(e,n,o,l,r,i){const a=t.resolveComponent("MessageItem");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createElementVNode("div",to,[t.createVNode(t.TransitionGroup,{name:"j-tw-message-list"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.messages,s=>(t.openBlock(),t.createBlock(a,{key:s.id,id:s.id,type:s.type,content:s.content,duration:s.duration,"show-close":s.showClose,offset:s.offset,"on-close":s.onClose,onDestroy:e.handleDestroy},null,8,["id","type","content","duration","show-close","offset","on-close","onDestroy"]))),128))]),_:1})])])}const Se=L(eo,[["render",no]]),fe={WARN:"warn",INFO:"info",SUCCESS:"success",ERROR:"error"},oo=t.defineComponent({name:"JTWConfirmDialog",components:{JTWBtn:ee},props:{visible:{type:Boolean,default:!1},message:{type:String,required:!0},icon:{type:String,default:fe.WARN},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"}},emits:{confirm:()=>!0,cancel:()=>!0},setup(e,{emit:n}){const o=()=>{n("confirm")},l=()=>{n("cancel")},r=()=>{n("cancel")},i={warn:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><ellipse cx="10.001" cy="10" rx="8.333" ry="8.333" fill="#FF7D00"/><path d="M9.25,6 L9.25,11 Q9.25,11.75,10,11.75 Q10.75,11.75,10.75,11 L10.75,6 Q10.75,5.25,10,5.25 Q9.25,5.25,9.25,6 Z" fill="#FFFFFF"/><circle cx="10" cy="14" r="1" fill="#FFFFFF"/></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><ellipse cx="10" cy="10" rx="8" ry="8" fill="#165DFF"/><path d="M9.25,9 L9.25,14 Q9.25,14.75,10,14.75 Q10.75,14.75,10.75,14 L10.75,9 Q10.75,8.25,10,8.25 Q9.25,8.25,9.25,9 Z" fill="#FFFFFF"/><circle cx="10" cy="6.5" r="1" fill="#FFFFFF"/></svg>',success:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="#00B42A"/><path d="M6 10 L9 13 L14 7" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="#F53F3F"/><path d="M7 7 L13 13 M13 7 L7 13" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round"/></svg>'};return{iconSvg:t.computed(()=>i[e.icon??fe.WARN]),handleConfirm:o,handleCancel:l,handleMaskClick:r}}}),lo={class:"j-tw-confirm-dialog__header"},ro=["innerHTML"],io={class:"j-tw-confirm-dialog__message"},ao={class:"j-tw-confirm-dialog__footer"};function so(e,n,o,l,r,i){const a=t.resolveComponent("JTWBtn");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-confirm-dialog-fade"},{default:t.withCtx(()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-confirm-dialog__mask",onClick:n[1]||(n[1]=(...s)=>e.handleMaskClick&&e.handleMaskClick(...s))},[t.createElementVNode("div",{class:"j-tw-confirm-dialog__wrapper",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",lo,[t.createElementVNode("span",{class:"j-tw-confirm-dialog__icon",innerHTML:e.iconSvg},null,8,ro),t.createElementVNode("span",io,t.toDisplayString(e.message),1)]),t.createElementVNode("div",ao,[t.createVNode(a,{label:e.cancelText||"取消",flat:"",onClick:e.handleCancel},null,8,["label","onClick"]),t.createVNode(a,{label:e.confirmText||"确定",onClick:e.handleConfirm},null,8,["label","onClick"])])])])):t.createCommentVNode("",!0)]),_:1})])}const ze=L(oo,[["render",so]]),Ee={CENTER:"center",RIGHT:"right"},xe={SM:"sm",MD:"md",LG:"lg"},Be={BOTH:"both",CANCEL_ONLY:"cancel-only",CONFIRM_ONLY:"confirm-only"};var co={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const K=new Map;let V={};const he={configure(e){V=e},async register(e){try{console.log("[jwDialog] 开始注册 dialog, props:",e);const n=e.dialogId||Math.random().toString(36).slice(2),o={...e,dialogId:n},l=t.ref(null),r=V.locale||co;console.log("[jwDialog] 创建 WrapperComponent...");const i={setup(){return{dialogRef:l}},render(){return t.h(b.ElConfigProvider,{locale:r},{default:()=>t.h(Oe,{...o,ref:u=>{console.log("[jwDialog] ref 回调被调用, el:",u),l.value=u}})})}};console.log("[jwDialog] 创建 Vue app...");const a=t.createApp(i);V.router&&a.use(V.router),V.store&&a.use(V.store),V.i18n&&a.use(V.i18n),V.plugins&&V.plugins.forEach(u=>a.use(u)),console.log("[jwDialog] 挂载 app...");const s=document.createElement("div");a.mount(s),console.log("[jwDialog] app 已挂载, mountEl:",s),await t.nextTick(),console.log("[jwDialog] nextTick 后, dialogRef.value:",l.value);const c=l.value;if(!c)throw new Error("dialogRef.value 为 null,组件可能没有正确挂载");return K.set(n,{app:a,appInstance:c}),t.nextTick(()=>{c&&(console.log("[jwDialog] 调用 appInstance.open()"),c.open())}),console.log("[jwDialog] 注册成功, 返回 appInstance"),c}catch(n){throw console.error("[jwDialog] 注册失败:",n),console.error("[jwDialog] 错误堆栈:",n instanceof Error?n.stack:"无堆栈信息"),n}},destroy(e){const n=K.get(e);if(n){try{const o=n.app._container;n.app.unmount(),o&&o.parentNode&&o.parentNode.removeChild(o)}catch{}K.delete(e)}},destroyAll(){K.forEach((e,n)=>{try{const o=e.app._container;e.app.unmount(),o&&o.parentNode&&o.parentNode.removeChild(o)}catch{}}),K.clear()}};async function uo(e){return he.register(e)}const fo=t.defineComponent({name:"JTWDialog",components:{JTWBtn:ee},props:{dialogId:{type:String},title:{type:String,default:""},position:{type:String,default:Ee.CENTER},size:{type:String,default:xe.MD},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},footerMode:{type:String,default:Be.BOTH},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},component:{default:null},componentBind:{type:Object,default:()=>({})},componentOn:{type:Object,default:()=>({})},closeOnMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},setup(e,{expose:n}){const o=t.ref(!1),l=t.ref(null),r=t.ref(null),i=t.ref(!1),a=t.ref(e.cancelText),s=t.ref(e.confirmText),c=t.computed(()=>e.position==="right"?"j-tw-dialog-slide-right":"j-tw-dialog-fade"),u=t.computed(()=>`j-tw-dialog__wrapper--${e.size}`),p=t.computed(()=>{var k;return{...e.componentBind,dialogInstance:{...((k=e.componentBind)==null?void 0:k.dialogInstance)||{},open:f,close:h,setLoading:S,changeCancelText:z,changeConfirmText:E}}}),f=()=>{o.value=!0,t.nextTick(()=>{var k;(k=l.value)==null||k.focus()})},h=()=>{o.value=!1},S=k=>{i.value=k},z=k=>{a.value=k},E=k=>{s.value=k},$=()=>{e.closeOnMask&&h()},C=()=>{e.closeOnEsc&&h()},A=()=>{const k=r.value;k!=null&&k.handleClickCancel?k.handleClickCancel():h()},y=()=>{const k=r.value;k!=null&&k.handleClickConfirm&&k.handleClickConfirm()},N=()=>{e.dialogId&&he.destroy(e.dialogId)};return t.onErrorCaptured((k,Z,m)=>(console.error("[JTWDialog] Component error captured:",k,m),!1)),n({open:f,close:h,setLoading:S,changeCancelText:z,changeConfirmText:E,loading:i}),{visible:o,maskRef:l,dynamicCompRef:r,loading:i,cancelText:a,confirmText:s,transitionName:c,sizeClass:u,computedComponentBind:p,open:f,close:h,setLoading:S,changeCancelText:z,changeConfirmText:E,handleMaskClick:$,handleEscKey:C,handleClickCancel:A,handleClickConfirm:y,handleAfterLeave:N}}}),go={key:0,class:"j-tw-dialog__header"},po={class:"j-tw-dialog__title"},mo={class:"j-tw-dialog__body"},wo={class:"j-tw-dialog__error"},ho={style:{"font-size":"12px",color:"#999","margin-top":"8px"}},yo={key:2,class:"j-tw-dialog__loading"},Mo={key:1,class:"j-tw-dialog__footer"};function vo(e,n,o,l,r,i){const a=t.resolveComponent("JTWBtn");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:e.transitionName,onAfterLeave:e.handleAfterLeave},{default:t.withCtx(()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["j-tw-dialog__mask",{"j-tw-dialog__mask--right":e.position==="right"}]),onClick:n[2]||(n[2]=(...s)=>e.handleMaskClick&&e.handleMaskClick(...s)),onKeydown:n[3]||(n[3]=t.withKeys((...s)=>e.handleEscKey&&e.handleEscKey(...s),["esc"])),tabindex:"-1",ref:"maskRef"},[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-dialog__wrapper",`j-tw-dialog__wrapper--${e.position}`,e.sizeClass]),onClick:n[1]||(n[1]=t.withModifiers(()=>{},["stop"]))},[e.showHeader?(t.openBlock(),t.createElementBlock("div",go,[t.createElementVNode("span",po,[t.renderSlot(e.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])]),t.createElementVNode("button",{class:"j-tw-dialog__close",onClick:n[0]||(n[0]=(...s)=>e.close&&e.close(...s)),type:"button"},[...n[4]||(n[4]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])])])):t.createCommentVNode("",!0),t.createElementVNode("div",mo,[e.component?(t.openBlock(),t.createBlock(t.Suspense,{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.component),t.mergeProps(e.computedComponentBind,t.toHandlers(e.componentOn||{}),{ref:"dynamicCompRef"}),null,16))]),fallback:t.withCtx(()=>[...n[5]||(n[5]=[t.createElementVNode("div",{class:"j-tw-dialog__loading"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",class:"j-tw-dialog__spinner"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-dasharray":"31.416","stroke-dashoffset":"10"})])],-1)])]),error:t.withCtx(({error:s})=>[t.createElementVNode("div",wo,[n[6]||(n[6]=t.createElementVNode("p",null,"组件加载失败",-1)),t.createElementVNode("p",ho,t.toDisplayString((s==null?void 0:s.message)||"请刷新页面重试"),1)])]),_:1})):t.renderSlot(e.$slots,"default",{key:1}),e.loading?(t.openBlock(),t.createElementBlock("div",yo,[...n[7]||(n[7]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",class:"j-tw-dialog__spinner"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-dasharray":"31.416","stroke-dashoffset":"10"})],-1)])])):t.createCommentVNode("",!0)]),e.showFooter?(t.openBlock(),t.createElementBlock("div",Mo,[e.footerMode==="both"||e.footerMode==="cancel-only"?(t.openBlock(),t.createBlock(a,{key:0,label:e.cancelText||"取消",flat:"",onClick:e.handleClickCancel},null,8,["label","onClick"])):t.createCommentVNode("",!0),e.footerMode==="both"||e.footerMode==="confirm-only"?(t.openBlock(),t.createBlock(a,{key:1,label:e.confirmText||"确定",onClick:e.handleClickConfirm},null,8,["label","onClick"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2)],34)):t.createCommentVNode("",!0)]),_:3},8,["name","onAfterLeave"])])}const Oe=L(fo,[["render",vo]]),Do=t.defineComponent({name:"TreeNode",props:{node:{type:Object,required:!0},level:{type:Number,default:0},isLast:{type:Boolean,default:!1},expandedKeys:{type:Set,required:!0},innerValue:{type:[String,Number,Array],default:void 0},innerValues:{type:Set,required:!0},multiple:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},isNodeChecked:{type:Function,required:!0},isNodeIndeterminate:{type:Function,required:!0},isNodeSelected:{type:Function,required:!0},shouldShowCheckbox:{type:Function,required:!0},toggleExpand:{type:Function,required:!0},handleNodeClick:{type:Function,required:!0}}}),Co="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096239'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096239)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",No="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096226'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096226)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0,1,-1,0,16.0009765625,-4.0009765625)'%3e%3cpath%20d='M10.0009765625,6.75L18.0009765625,6.75L18.0009765625,6.74985003Q18.0748300625,6.74985003,18.1472644625,6.7354418Q18.2196998625,6.72103369,18.287931462499998,6.69277108Q18.356163062500002,6.66450846,18.4175701625,6.62347746Q18.4789771625,6.5824465199999995,18.5312003625,6.53022403Q18.5834216625,6.47800151,18.6244535625,6.41659433Q18.6654834625,6.35518718,18.6937465625,6.28695518Q18.7220096625,6.21872318,18.7364177625,6.14628848Q18.7508258625,6.073853783,18.7508268625,6Q18.7508258625,5.926146217,18.7364177625,5.85371152Q18.7220096625,5.78127682,18.6937465625,5.71304482Q18.6654834625,5.64481282,18.6244535625,5.58340567Q18.5834216625,5.52199849,18.5312003625,5.46977597Q18.4789771625,5.4175534800000005,18.4175701625,5.37652254Q18.356163062500002,5.33549154,18.287931462499998,5.30722892Q18.2196998625,5.27896631,18.1472644625,5.2645582Q18.0748300625,5.25014997,18.0009765625,5.25014997L18.0009765625,5.25L10.0009765625,5.25L10.0009765625,5.25014997Q9.9271227795,5.25014997,9.8546880825,5.2645582Q9.7822533825,5.27896631,9.7140213825,5.30722892Q9.6457893825,5.33549154,9.5843822325,5.37652254Q9.5229750525,5.4175534800000005,9.4707525325,5.46977597Q9.4185300425,5.52199849,9.3774991025,5.58340567Q9.3364681025,5.64481282,9.3082054825,5.71304482Q9.2799428725,5.78127682,9.2655347625,5.85371152Q9.2511265325,5.926146217,9.2511265325,6Q9.2511265325,6.073853783,9.2655347625,6.14628848Q9.2799428725,6.21872318,9.3082054825,6.28695518Q9.3364681025,6.35518718,9.3774991025,6.41659433Q9.4185300425,6.47800151,9.4707525325,6.53022403Q9.5229750525,6.5824465199999995,9.5843822325,6.62347746Q9.6457893825,6.66450846,9.7140213825,6.69277108Q9.7822533825,6.72103369,9.8546880825,6.7354418Q9.9271227795,6.74985003,10.0009765625,6.74985003L10.0009765625,6.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",ko="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28192'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28192)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cpath%20d='M14.000001,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75L14.000001,10.75L14.000001,10.74985003Q14.0738544,10.74985003,14.1462889,10.7354418Q14.2187233,10.72103369,14.2869558,10.69277108Q14.3551874,10.66450846,14.4165945,10.62347746Q14.4780016,10.58244652,14.5302248,10.53022403Q14.5824471,10.47800151,14.6234779,10.41659433Q14.6645088,10.35518718,14.6927719,10.28695518Q14.721035,10.21872318,14.7354431,10.14628848Q14.7498512,10.073853783,14.7498512,10Q14.7498512,9.926146217,14.7354431,9.85371152Q14.721035,9.78127682,14.6927719,9.71304482Q14.6645088,9.64481282,14.6234779,9.58340567Q14.5824471,9.52199849,14.5302248,9.46977597Q14.4780016,9.41755348,14.4165945,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462889,9.2645582Q14.0738544,9.25014997,14.000001,9.25014997L14.000001,9.25Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",Qo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28187'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28187)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.6776717531065515,7.121317610617552)'%3e%3cpath%20d='M5.007504706328125,10.414215087890625Q5.007504706328125,10.340361304890624,5.021912936328125,10.267926607890624Q5.036321046328125,10.195491907890625,5.064583656328125,10.127259907890625Q5.092846276328125,10.059027907890625,5.133877276328125,9.997620757890624Q5.1749082163281255,9.936213577890625,5.227130706328125,9.883991057890626Q5.279353226328125,9.831768567890625,5.340760406328125,9.790737627890625Q5.402167556328125,9.749706627890625,5.470399556328125,9.721444007890625Q5.538631556328125,9.693181397890624,5.611066256328125,9.678773287890625Q5.683500953328125,9.664365057890626,5.757354736328125,9.664365057890626Q5.831208519328125,9.664365057890626,5.903643216328125,9.678773287890625Q5.976077916328125,9.693181397890624,6.044309916328125,9.721444007890625Q6.112541916328125,9.749706627890625,6.173949066328125,9.790737627890625Q6.235356246328125,9.831768567890625,6.287578766328125,9.883991057890626Q6.3398012563281245,9.936213577890625,6.380832196328125,9.997620757890624Q6.421863196328125,10.059027907890625,6.450125816328125,10.127259907890625Q6.478388426328125,10.195491907890625,6.492796536328125,10.267926607890624Q6.507204766328125,10.340361304890624,6.507204766328125,10.414215087890625L6.507354676328125,10.414215087890625L6.507354676328125,13.664215587890626L13.757355736328124,13.664215587890626L13.757355736328124,13.664365487890624Q13.831209136328125,13.664365487890624,13.903643636328125,13.678773687890626Q13.976078036328126,13.693181487890625,14.044310536328124,13.721444087890625Q14.112542136328125,13.749706787890625,14.173949236328125,13.790737587890625Q14.235356336328126,13.831768487890624,14.287579536328124,13.883991287890625Q14.339801836328125,13.936213487890626,14.380832636328124,13.997620787890625Q14.421863536328125,14.059027687890625,14.450126636328125,14.127259687890625Q14.478389736328126,14.195491787890624,14.492797836328124,14.267926687890625Q14.507205936328125,14.340361587890625,14.507205936328125,14.414215587890624Q14.507205936328125,14.488069487890625,14.492797836328124,14.560503987890625Q14.478389736328126,14.632938387890626,14.450126636328125,14.701170487890625Q14.421863536328125,14.769402487890625,14.380832636328124,14.830809587890625Q14.339801836328125,14.892216687890624,14.287579536328124,14.944438887890625Q14.235356336328126,14.996661187890625,14.173949236328125,15.037692087890626Q14.112541236328125,15.078722987890625,14.044309636328125,15.106986087890625Q13.976078036328126,15.135248687890625,13.903643636328125,15.149657287890625Q13.831209136328125,15.164065387890625,13.757355736328124,15.164065387890625L13.757355736328124,15.164215587890624L5.757354736328125,15.164215587890624Q5.683486201328125,15.164215087890625,5.611037026328125,15.149804087890626Q5.538587866328125,15.135393187890624,5.470342216328125,15.107124787890626Q5.402096626328125,15.078856487890626,5.340677146328125,15.037817487890624Q5.279257716328125,14.996778487890625,5.227024736328125,14.944545787890625Q5.174791816328125,14.892312487890624,5.133752586328125,14.830892587890624Q5.092713476328125,14.769473087890624,5.0644451963281245,14.701227687890626Q5.036176916328125,14.632982287890625,5.021765886328125,14.560533087890626Q5.007354856328125,14.488083887890625,5.007354796328125,14.414215587890624L5.007354796328125,10.414215087890625L5.007504706328125,10.414215087890625Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Io="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28023'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28023)'%3e%3crect%20x='2.75'%20y='2.75'%20width='14.5'%20height='14.5'%20rx='1.25'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'/%3e%3c/g%3e%3c/svg%3e",Ao="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16385'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16385)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='5.833332061767578'%20ry='5.833332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23165DFF'%20fill='none'%20stroke-width='5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",jo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16369'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16369)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='7.583332061767578'%20ry='7.583332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",To={key:0,src:Co,alt:"collapse",class:"j-tw-tree-select__expand-icon"},bo={key:1,src:No,alt:"expand",class:"j-tw-tree-select__expand-icon"},Lo={key:2,class:"j-tw-tree-select__expand-placeholder"},So={key:3,class:"j-tw-tree-select__checkbox"},zo={key:0,src:ko,alt:"indeterminate",class:"j-tw-tree-select__checkbox-icon"},Eo={key:1,src:Qo,alt:"checked",class:"j-tw-tree-select__checkbox-icon"},xo={key:2,src:Io,alt:"unchecked",class:"j-tw-tree-select__checkbox-icon"},Bo={key:0,src:Ao,alt:"selected",class:"j-tw-tree-select__checkbox-icon"},Oo={key:1,src:jo,alt:"unselected",class:"j-tw-tree-select__checkbox-icon"},Fo={class:"j-tw-tree-select__node-label"},_o={key:4,class:"j-tw-tree-select__node-count"};function $o(e,n,o,l,r,i){const a=t.resolveComponent("TreeNode",!0);return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select__node",{"j-tw-tree-select__node--disabled":e.node.disabled},{"j-tw-tree-select__node--selected":e.isNodeSelected(e.node.value)},{"j-tw-tree-select__node--last":e.isLast}]),style:t.normalizeStyle({paddingLeft:`${16+e.level*28}px`,position:"relative"}),onClick:n[1]||(n[1]=s=>e.handleNodeClick(e.node))},[e.level>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-tree-select__node-line",style:t.normalizeStyle({left:`${16+(e.level-1)*28+10}px`})},null,4)):t.createCommentVNode("",!0),e.node.children&&e.node.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"j-tw-tree-select__expand-btn",onClick:n[0]||(n[0]=t.withModifiers(s=>e.toggleExpand(e.node.value),["stop"]))},[e.expandedKeys.has(e.node.value)?(t.openBlock(),t.createElementBlock("img",To)):(t.openBlock(),t.createElementBlock("img",bo))])):(t.openBlock(),t.createElementBlock("div",Lo)),e.shouldShowCheckbox(e.node)?(t.openBlock(),t.createElementBlock("div",So,[e.multiple?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isNodeIndeterminate(e.node)?(t.openBlock(),t.createElementBlock("img",zo)):e.isNodeChecked(e.node.value)?(t.openBlock(),t.createElementBlock("img",Eo)):(t.openBlock(),t.createElementBlock("img",xo))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.innerValue===e.node.value?(t.openBlock(),t.createElementBlock("img",Bo)):(t.openBlock(),t.createElementBlock("img",Oo))],64))])):t.createCommentVNode("",!0),t.createElementVNode("span",Fo,[t.renderSlot(e.$slots,"default",{node:e.node},()=>[t.createTextVNode(t.toDisplayString(e.node.label),1)])]),e.node.count?(t.openBlock(),t.createElementBlock("span",_o,t.toDisplayString(e.node.count),1)):t.createCommentVNode("",!0)],6),e.node.children&&e.node.children.length>0&&e.expandedKeys.has(e.node.value)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.node.children,(s,c)=>(t.openBlock(),t.createBlock(a,{key:s.value,node:s,level:e.level+1,"is-last":c===e.node.children.length-1,"expanded-keys":e.expandedKeys,"inner-value":e.innerValue,"inner-values":e.innerValues,multiple:e.multiple,"check-strictly":e.checkStrictly,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"should-show-checkbox":e.shouldShowCheckbox,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:u})=>[t.renderSlot(e.$slots,"default",{node:u},()=>[t.createTextVNode(t.toDisplayString(u.label),1)])]),_:3},8,["node","level","is-last","expanded-keys","inner-value","inner-values","multiple","check-strictly","is-node-checked","is-node-indeterminate","is-node-selected","should-show-checkbox","toggle-expand","handle-node-click"]))),128)):t.createCommentVNode("",!0)],64)}const Po=L(Do,[["render",$o]]),Vo=t.defineComponent({name:"JTWTreeSelect",components:{TreeNode:Po,JTWStatusImg:ie},props:{data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入关键词搜索"},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},maxHeight:{type:Number,default:void 0},externalSearchText:{type:String,default:""},bordered:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},validateEvent:{type:Boolean,default:!0},defaultExpandFirst:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,change:(e,n)=>!0,blur:e=>!0},setup(e,{emit:n,expose:o}){const l=t.inject("elFormItem",null),r=t.ref(null),i=t.ref(""),a=t.ref(new Set),s=t.ref(e.modelValue),c=t.ref(new Set);e.defaultExpandFirst&&e.data.length>0&&a.value.add(e.data[0].value),t.watch(()=>e.data,m=>{e.defaultExpandFirst&&m.length>0&&a.value.size===0&&a.value.add(m[0].value)},{immediate:!0}),t.watch(()=>e.modelValue,m=>{s.value=m,e.multiple&&Array.isArray(m)&&(c.value=new Set(m))},{immediate:!0});const u=(m,I)=>{for(const M of m){if(M.value===I)return M;if(M.children){const Q=u(M.children,I);if(Q)return Q}}return null},p=m=>{if(!m.children||m.children.length===0)return[];const I=[];for(const M of m.children)I.push(M.value),I.push(...p(M));return I},f=(m,I)=>{for(const M of m)if(M.children){if(M.children.some(x=>x.value===I))return M;const Q=f(M.children,I);if(Q)return Q}return null},h=m=>{const I=f(e.data,m);return I&&I.children?I.children.map(M=>M.value).filter(M=>M!==m):e.data.map(M=>M.value).filter(M=>M!==m)},S=m=>{if(!e.checkStrictly)return;const I=f(e.data,m);I&&I.children&&(I.children.every(Q=>c.value.has(Q.value))?c.value.add(I.value):c.value.delete(I.value),S(I.value))},z=m=>e.multiple?c.value.has(m):s.value===m,E=m=>{if(!e.multiple||!m.children||m.children.length===0||!e.checkStrictly)return!1;const I=m.children.map(Q=>Q.value),M=I.filter(Q=>c.value.has(Q)).length;return M>0&&M<I.length},$=m=>e.multiple?c.value.has(m):s.value===m,C=m=>e.checkStrictly?!0:!m.children||m.children.length===0,A=(m,I)=>{if(!I)return m;const M=[];for(const Q of m){const x=Q.label.toLowerCase().includes(I.toLowerCase()),B=Q.children?A(Q.children,I):[];(x||B.length>0)&&(M.push({...Q,children:B.length>0?B:Q.children}),B.length>0&&a.value.add(Q.value))}return M},y=t.computed(()=>{const m=e.externalSearchText||i.value;return A(e.data,m)});t.watch(()=>e.externalSearchText,m=>{m!=null&&(i.value="")});const N=m=>{a.value.has(m)?a.value.delete(m):(e.accordion&&h(m).forEach(M=>{a.value.delete(M)}),a.value.add(m))},k=m=>{var I,M;if(!m.disabled){if(!e.checkStrictly&&m.children&&m.children.length>0){N(m.value);return}if(e.multiple){const Q=c.value.has(m.value),x=p(m);Q?(c.value.delete(m.value),e.checkStrictly&&x.forEach(F=>c.value.delete(F))):(c.value.add(m.value),e.checkStrictly&&x.forEach(F=>c.value.add(F))),e.checkStrictly&&S(m.value);const B=Array.from(c.value),O=B.map(F=>u(e.data,F)).filter(F=>F!==null);n("update:modelValue",B),n("change",B,O.length>0?O:null),e.validateEvent&&l&&((I=l.validate)==null||I.call(l,"change"))}else{s.value=m.value;const Q=u(e.data,m.value);n("update:modelValue",m.value),n("change",m.value,Q),e.validateEvent&&l&&((M=l.validate)==null||M.call(l,"change"))}}};return o({get $el(){return r.value}}),{treeSelectRef:r,searchText:i,expandedKeys:a,innerValue:s,innerValues:c,filteredData:y,toggleExpand:N,handleNodeClick:k,isNodeChecked:z,isNodeIndeterminate:E,isNodeSelected:$,shouldShowCheckbox:C}}}),Ro="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Yo={key:0,class:"j-tw-tree-select__search"},Uo=["placeholder"],Wo={key:0,class:"j-tw-tree-select__empty"};function Zo(e,n,o,l,r,i){const a=t.resolveComponent("JTWStatusImg"),s=t.resolveComponent("TreeNode");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectRef",class:t.normalizeClass(["j-tw-tree-select",{"j-tw-tree-select--borderless":!e.bordered,"j-tw-tree-select--no-search":!e.showSearch}])},[e.showSearch?(t.openBlock(),t.createElementBlock("div",Yo,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>e.searchText=c),type:"text",class:"j-tw-tree-select__search-input",placeholder:e.searchPlaceholder},null,8,Uo),[[t.vModelText,e.searchText]]),n[1]||(n[1]=t.createElementVNode("img",{src:Ro,alt:"search",class:"j-tw-tree-select__search-icon"},null,-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"j-tw-tree-select__tree",style:t.normalizeStyle({maxHeight:e.maxHeight?`${e.maxHeight}px`:"none"})},[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",Wo,[t.createVNode(a,{width:32,height:32}),n[2]||(n[2]=t.createElementVNode("p",{class:"j-tw-tree-select__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,c=>(t.openBlock(),t.createBlock(s,{key:c.value,node:c,level:0,"expanded-keys":e.expandedKeys,"inner-value":e.innerValue,"inner-values":e.innerValues,multiple:e.multiple,"check-strictly":e.checkStrictly,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"should-show-checkbox":e.shouldShowCheckbox,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:u})=>[t.renderSlot(e.$slots,"default",{node:u},()=>[t.createTextVNode(t.toDisplayString(u.label),1)])]),_:3},8,["node","expanded-keys","inner-value","inner-values","multiple","check-strictly","is-node-checked","is-node-indeterminate","is-node-selected","should-show-checkbox","toggle-expand","handle-node-click"]))),128))],4)],2)}const Go=L(Vo,[["render",Zo]]),Jo=t.defineComponent({name:"JTWFormLabel",props:{label:{type:String},labelClass:{type:[String,Object,Array]},valueClass:{type:[String,Object,Array]},vertical:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},slots:Object,setup(e,{slots:n}){const o=t.computed(()=>{const r=!!e.label||!!n.label;return e.horizontal?!0:r});return{directionClass:t.computed(()=>e.vertical?"form-label--vertical":e.horizontal?"form-label--horizontal":"form-label--vertical"),showLabel:o,slots:n}}}),Ho={class:"label-content"},Xo={class:"form-content"},Ko={class:"form-value__inner"},qo={class:"form-item-detail-wrapper"};function el(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["j-tw-form-label",[e.directionClass,{required:e.required}]])},[e.showLabel?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-label",[e.labelClass,{required:e.required}]])},[t.createElementVNode("div",Ho,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),t.renderSlot(e.$slots,"label-hint")])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",Xo,[t.createElementVNode("div",{class:t.normalizeClass(["form-value",e.valueClass])},[t.createElementVNode("div",Ko,[t.renderSlot(e.$slots,"default")])],2),t.createElementVNode("div",qo,[t.renderSlot(e.$slots,"form-item-detail")])])],2)}const tl=L(Jo,[["render",el]]),nl=t.defineComponent({name:"JTWForm",components:{ElForm:b.ElForm},inheritAttrs:!1,setup(e,{expose:n}){const o=t.ref(null);return n({validate:(...r)=>o.value.validate(...r),validateField:(...r)=>o.value.validateField(...r),resetFields:(...r)=>o.value.resetFields(...r),scrollToField:(...r)=>o.value.scrollToField(...r),clearValidate:(...r)=>o.value.clearValidate(...r)}),{elFormRef:o}}});function ol(e,n,o,l,r,i){const a=t.resolveComponent("el-form");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elFormRef"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const ll=L(nl,[["render",ol]]),rl=t.defineComponent({name:"JTWFormItem",components:{ElFormItem:b.ElFormItem},inheritAttrs:!1,setup(e,{expose:n}){const o=t.ref(null);return n({get size(){var r;return((r=o.value)==null?void 0:r.size)||""},get validateMessage(){var r;return((r=o.value)==null?void 0:r.validateMessage)||""},get validateState(){var r;return((r=o.value)==null?void 0:r.validateState)||""},validate:(...r)=>o.value.validate(...r),clearValidate:()=>o.value.clearValidate(),resetField:()=>o.value.resetField()}),{elFormItemRef:o}}});function il(e,n,o,l,r,i){const a=t.resolveComponent("el-form-item");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elFormItemRef"},e.$attrs),t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"label")]),key:"0"}:void 0,e.$slots.error?{name:"error",fn:t.withCtx(({error:s})=>[t.renderSlot(e.$slots,"error",{error:s})]),key:"1"}:void 0]),1040)}const al=L(rl,[["render",il]]),sl=t.defineComponent({name:"JTWInput",components:{ElInput:b.ElInput},inheritAttrs:!1,props:{bgGrey:{type:Boolean,default:!0}},setup(e,{expose:n}){const o=t.ref(null);return n({get input(){var r;return(r=o.value)==null?void 0:r.input},get textareaStyle(){var r;return(r=o.value)==null?void 0:r.textareaStyle},focus:()=>{var r;return(r=o.value)==null?void 0:r.focus()},blur:()=>{var r;return(r=o.value)==null?void 0:r.blur()},select:()=>{var r;return(r=o.value)==null?void 0:r.select()},clear:()=>{var r;return(r=o.value)==null?void 0:r.clear()},resizeTextarea:()=>{var r;return(r=o.value)==null?void 0:r.resizeTextarea()}}),{elInputRef:o}}});function cl(e,n,o,l,r,i){const a=t.resolveComponent("el-input");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elInputRef",class:["tw-input",{"tw-input--bg-grey":e.bgGrey}]},e.$attrs),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["class"])}const dl=L(sl,[["render",cl]]),ul=t.defineComponent({name:"JTWSelect",components:{ElSelect:b.ElSelect,ElOption:b.ElOption},inheritAttrs:!1,props:{bgGrey:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})}},setup(e,{expose:n,attrs:o}){const l=t.ref(null),r=t.ref(!1),i=t.computed(()=>{var p;return((p=e.props)==null?void 0:p.label)||"label"}),a=t.computed(()=>{var p;return((p=e.props)==null?void 0:p.value)||"value"}),s=t.computed(()=>o.multiple!==void 0&&o.multiple!==!1),c=p=>{r.value=p};return n({focus:()=>{var p;return(p=l.value)==null?void 0:p.focus()},blur:()=>{var p;return(p=l.value)==null?void 0:p.blur()}}),{elSelectRef:l,dropdownVisible:r,labelKey:i,valueKey:a,isMultiple:s,handleVisibleChange:c}}});function fl(e,n,o,l,r,i){const a=t.resolveComponent("el-option"),s=t.resolveComponent("el-select");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elSelectRef",class:["tw-select",{"tw-select--bg-grey":e.bgGrey,"tw-select--open":e.dropdownVisible,"tw-select--multiple":e.isMultiple}],"popper-class":"tw-select-popper"},e.$attrs,{onVisibleChange:e.handleVisibleChange}),t.createSlots({default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:c[e.valueKey],label:c[e.labelKey],value:c[e.valueKey],disabled:c.disabled},null,8,["label","value","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.empty?{name:"empty",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty")]),key:"1"}:void 0,e.$slots.header?{name:"header",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"header")]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"footer")]),key:"3"}:void 0]),1040,["class","onVisibleChange"])}const gl=L(ul,[["render",fl]]),pl=t.defineComponent({name:"JTWCheckbox",components:{ElCheckbox:b.ElCheckbox},inheritAttrs:!1,setup(){return{}}});function ml(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elCheckboxRef",class:"j-tw-checkbox"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const wl=L(pl,[["render",ml]]),hl=t.defineComponent({name:"JTWCheckboxGroup",components:{ElCheckboxGroup:b.ElCheckboxGroup,ElCheckbox:b.ElCheckbox},inheritAttrs:!1,props:{options:{type:Array,default:void 0}},setup(){return{}}});function yl(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-checkbox-group");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elCheckboxGroupRef",class:"j-tw-checkbox-group"},e.$attrs),{default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:String(c.value),label:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["label","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:3},16)}const Ml=L(hl,[["render",yl]]),vl=t.defineComponent({name:"JTWRadio",components:{ElRadio:b.ElRadio},inheritAttrs:!1,setup(){return{}}});function Dl(e,n,o,l,r,i){const a=t.resolveComponent("el-radio");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elRadioRef",class:"j-tw-radio"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const Cl=L(vl,[["render",Dl]]),Nl=t.defineComponent({name:"JTWRadioGroup",components:{ElRadioGroup:b.ElRadioGroup,ElRadio:b.ElRadio},inheritAttrs:!1,props:{options:{type:Array,default:void 0}},setup(){return{}}});function kl(e,n,o,l,r,i){const a=t.resolveComponent("el-radio"),s=t.resolveComponent("el-radio-group");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elRadioGroupRef",class:"j-tw-radio-group"},e.$attrs),{default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:String(c.value),label:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["label","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:3},16)}const Ql=L(Nl,[["render",kl]]);let Ie=!1,Il=0;function Al(){return`j-tw-message-${Date.now()}-${++Il}`}function jl(){if(Ie)return;Ie=!0;const e=document.createElement("div");document.body.appendChild(e),t.createApp(Se).mount(e)}function q(e){jl();const n=Al(),r=(e.offset??20)+U.value.length*56,i={id:n,type:e.type??"info",content:e.content,duration:e.duration??3e3,showClose:e.showClose??!0,offset:r,onClose:e.onClose,visible:!0};return U.value.push(i),{id:n,close:()=>{const a=U.value.findIndex(s=>s.id===n);a!==-1&&(U.value[a].visible=!1)}}}const Fe={show(e){return q(e)},success(e,n){return q({type:"success",content:e,duration:n})},warning(e,n){return q({type:"warning",content:e,duration:n})},info(e,n){return q({type:"info",content:e,duration:n})},error(e,n){return q({type:"error",content:e,duration:n})},closeAll(){U.value.forEach(e=>{e.visible=!1})}};function _e(e){return new Promise(n=>{const o=t.ref(!1),l=document.createElement("div");document.body.appendChild(l);const r=()=>{u.unmount(),document.body.contains(l)&&document.body.removeChild(l)},i=p=>{o.value=!1,setTimeout(r,250),n(p)},a=()=>i(!0),s=()=>i(!1),c=t.defineComponent({setup(){return()=>t.h(ze,{visible:o.value,message:e.message,icon:e.icon,confirmText:e.confirmText,cancelText:e.cancelText,onConfirm:a,onCancel:s})}}),u=t.createApp(c);u.mount(l),t.nextTick(()=>{o.value=!0})})}const Tl="#165DFF",bl="#000000",Ll="#FFFFFF",Sl="#00B42A",zl="#FF7D00",El="#F53F3F",xl="#14C9C9",Bl="#D97706",Ol="#F7BA1E",Fl="#3491FA",_l="#722ED1",$l="#9FDB1D",Pl="#F5319D",Vl="#F77EBE",Ae={primary:Tl,"primary-1":"#0E42D2","primary-2":"#165DFF","primary-3":"#4080FF","primary-4":"#6AA1FF","primary-5":"#94BFFF","primary-6":"#BEDAFF","grey-1":"#1D2129","grey-2":"#4E5969","grey-3":"#86909C","grey-3-50":"#A8ABB2","grey-4":"#C9CDD4","grey-5":"#E5E6EB","grey-6":"#F2F3F5",black:bl,white:Ll,green:Sl,"green-1":"#00875A","green-2":"#00B42A","green-3":"#23C343","green-4":"#4CD263","green-5":"#7BE188","green-6":"#AFF0B5",orange:zl,"orange-1":"#D25F00","orange-2":"#FF7D00","orange-3":"#FF9A2E","orange-4":"#FFB65D","orange-5":"#FFCF8B","orange-6":"#FFE4BA",red:El,"red-1":"#CB2634","red-2":"#F53F3F","red-3":"#F76560","red-4":"#F98981","red-5":"#FDACA7","red-6":"#FFCCC7",cyan:xl,"cyan-1":"#0DA5AA","cyan-2":"#14C9C9","cyan-3":"#37D4CF","cyan-4":"#5ADFD7","cyan-5":"#87E8DD","cyan-6":"#B2F1E8",brown:Bl,"brown-1":"#B35C00","brown-2":"#D97706","brown-3":"#E89A3C","brown-4":"#F3B765","brown-5":"#F9D28F","brown-6":"#FDEAB8",yellow:Ol,"yellow-1":"#D48806","yellow-2":"#F7BA1E","yellow-3":"#FADC19","yellow-4":"#FCEE21","yellow-5":"#FEF65B","yellow-6":"#FFFB8F",blue:Fl,"blue-1":"#146AFF","blue-2":"#3491FA","blue-3":"#57A3F7","blue-4":"#79BBF8","blue-5":"#A8D3FB","blue-6":"#C7E2FD",purple:_l,"purple-1":"#551DB1","purple-2":"#722ED1","purple-3":"#8E51DA","purple-4":"#A871E3","purple-5":"#C396ED","purple-6":"#DDBEF6",lime:$l,"lime-1":"#7BC616","lime-2":"#9FDB1D","lime-3":"#B4E04B","lime-4":"#C8E672","lime-5":"#DCEC9A","lime-6":"#EFF4C6",magenta:Pl,"magenta-1":"#CB247A","magenta-2":"#F5319D","magenta-3":"#F754B0","magenta-4":"#F975C2","magenta-5":"#FB9DD1","magenta-6":"#FDC5E3",pink:Vl,"pink-1":"#D6549D","pink-2":"#F77EBE","pink-3":"#F99AC8","pink-4":"#FAB4D4","pink-5":"#FCCEE0","pink-6":"#FEE7EF"},Rl=async e=>(await{"zh-CN":()=>Promise.resolve().then(()=>require("./index-C5mRo5Yi.cjs")),"en-US":()=>Promise.resolve().then(()=>require("./index-BrYPwI7i.cjs"))}[e]()).default,ue={},Yl=async e=>(ue[e]||(ue[e]=await Rl(e)),ue[e]),ye=t.ref("zh-CN"),ge=t.ref(null);function Ul(e,n){const o=n.split(".");let l=e;for(const r of o)if(l&&typeof l=="object"&&r in l)l=l[r];else return n;return typeof l=="string"?l:n}function Wl(e,n){return n?e.replace(/\{(\w+)\}/g,(o,l)=>n[l]!==void 0?String(n[l]):o):e}function $e(e,n){if(!ge.value)return console.warn("[twcpt] i18n messages not loaded yet, please call setLocale first"),e;const o=Ul(ge.value,e);return Wl(o,n)}async function le(e){ye.value=e;try{ge.value=await Yl(e)}catch(n){console.error(`[twcpt] Failed to load locale messages for ${e}:`,n)}}function Pe(){return ye.value}function Zl(){return{t:$e,locale:ye,setLocale:le,getLocale:Pe}}const Ve=Symbol("pagePermissionIds"),Re=Symbol("pageActionPermissionIds");let ae={};function Gl(e){const{app:n,pagePermissionIds:o,pageActionPermissionIds:l,projectPermissionId:r,defaultLanguage:i,colors:a,disableBFCache:s}=e;ae={colors:a,projectPermissionId:r},s&&window.addEventListener("pageshow",p=>{p.persisted&&window.location.reload()}),i?le(i).catch(p=>{console.error("[twcpt] Failed to set default language:",p)}):le("zh-CN").catch(p=>{console.error("[twcpt] Failed to load default locale:",p)});const c=o?t.isRef(o)?o:t.ref(o):void 0,u=l?t.isRef(l)?l:t.ref(l):void 0;c&&(console.log("[twcpt] Permission IDs provided:",c.value),n.provide(Ve,c)),u&&(console.log("[twcpt] Action Permission IDs provided:",u.value),n.provide(Re,u)),a&&Jl(a),r&&console.log("[twcpt] Project Permission ID:",r),console.log("[twcpt] Initialization completed successfully.")}function Jl(e){const n=e&&Object.keys(e).length>0,o=n?{...Ae,...e}:Ae;let l=document.getElementById("twcpt-color-vars");l||(l=document.createElement("style"),l.id="twcpt-color-vars",document.head.appendChild(l));const r=Object.entries(o).map(([i,a])=>` --j-color-${i}: ${a};`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),L=require("element-plus"),ze=require("./resolver.cjs"),b={LARGE:"large",NORMAL:"normal",SMALL:"small"},P={BUTTON:"button",TEXT:"text"},Dt=t.defineComponent({name:"JTWBtn",components:{ElButton:L.ElButton,ElTooltip:L.ElTooltip},inheritAttrs:!1,props:{size:{type:String,default:b.NORMAL,validator:e=>Object.values(b).includes(e)},type:{type:String,default:P.BUTTON,validator:e=>Object.values(P).includes(e)},color:{type:String,default:"primary"},outline:{type:Boolean,default:!1},flat:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0}},emits:{click:e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.computed(()=>e.tips!=null?String(e.tips):""),i=t.computed(()=>({"j-tw-btn":!0,"j-tw-btn--large":e.size===b.LARGE,"j-tw-btn--normal":e.size===b.NORMAL,"j-tw-btn--small":e.size===b.SMALL,"j-tw-btn--button":e.type===P.BUTTON&&!e.outline&&!e.flat,"j-tw-btn--outline":e.outline&&!e.flat,"j-tw-btn--flat":e.flat,"j-tw-btn--text":e.type===P.TEXT&&!e.flat})),a=t.computed(()=>{const u=e.color||"primary";return{"--j-btn-color":`var(--j-color-${u})`,"--j-btn-color-1":`var(--j-color-${u}-1)`,"--j-btn-color-2":`var(--j-color-${u}-2)`,"--j-btn-color-3":`var(--j-color-${u}-3)`,"--j-btn-color-4":`var(--j-color-${u}-4)`,"--j-btn-color-5":`var(--j-color-${u}-5)`,"--j-btn-color-6":`var(--j-color-${u}-6)`}}),s={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},c=t.computed(()=>({...s,...e.tooltipConfig})),d=u=>{n("click",u)};return o({get $el(){var u;return(u=l.value)==null?void 0:u.$el},click:()=>{var u,w;(w=(u=l.value)==null?void 0:u.$el)==null||w.click()}}),{elBtnRef:l,tooltipContent:r,computedClass:i,computedStyle:a,mergedTooltipConfig:c,handleClick:d}}}),S=(e,n)=>{const o=e.__vccOpts||e;for(const[l,r]of n)o[l]=r;return o};function Ct(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip");return t.openBlock(),t.createBlock(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"elBtnRef",class:e.computedClass,style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleClick}),t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.label),1)])]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[0]||(n[0]=t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",fill:"none",version:"1.1",viewBox:"0 0 16 16",class:"j-tw-btn__loading-icon"},[t.createElementVNode("defs",null,[t.createElementVNode("clipPath",{id:"master_svg0_37_06013"},[t.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0"})])]),t.createElementVNode("g",{"clip-path":"url(#master_svg0_37_06013)"},[t.createElementVNode("rect",{x:"0",y:"0",width:"16",height:"16",rx:"0",fill:"transparent",style:{"mix-blend-mode":"passthrough"}}),t.createElementVNode("path",{d:"M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z","fill-rule":"evenodd",fill:"currentColor"})])],-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"])}const oe=S(Dt,[["render",Ct]]),Nt=t.defineComponent({name:"JTWDropdownBtn",components:{ElButton:L.ElButton,ElTooltip:L.ElTooltip},inheritAttrs:!1,props:{size:{type:String,default:b.NORMAL,validator:e=>Object.values(b).includes(e)},type:{type:String,default:P.BUTTON,validator:e=>Object.values(P).includes(e)},outline:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0},options:{type:Array,default:()=>[]},modelValue:{type:[String,Number],default:void 0}},emits:{click:e=>!0,"update:modelValue":e=>!0,select:e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),d=t.computed(()=>e.tips!=null?String(e.tips):""),g=t.computed(()=>{if(e.modelValue!=null){const y=e.options.find(Q=>Q.value===e.modelValue);if(y)return y.label}return e.label}),u=t.computed(()=>({"j-tw-dropdown-btn":!0,"j-tw-dropdown-btn--large":e.size===b.LARGE,"j-tw-dropdown-btn--normal":e.size===b.NORMAL,"j-tw-dropdown-btn--small":e.size===b.SMALL})),w=t.computed(()=>({"j-tw-btn":!0,"j-tw-dropdown-btn__main":!0,"j-tw-btn--large":e.size===b.LARGE,"j-tw-btn--normal":e.size===b.NORMAL,"j-tw-btn--small":e.size===b.SMALL,"j-tw-btn--button":e.type===P.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===P.TEXT})),z=t.computed(()=>({"j-tw-btn":!0,"j-tw-dropdown-btn__trigger":!0,"j-tw-btn--large":e.size===b.LARGE,"j-tw-btn--normal":e.size===b.NORMAL,"j-tw-btn--small":e.size===b.SMALL,"j-tw-btn--button":e.type===P.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===P.TEXT})),O=t.computed(()=>({"--j-btn-color":"var(--j-color-primary)","--j-btn-color-1":"var(--j-color-primary-1)","--j-btn-color-2":"var(--j-color-primary-2)","--j-btn-color-3":"var(--j-color-primary-3)","--j-btn-color-4":"var(--j-color-primary-4)","--j-btn-color-5":"var(--j-color-primary-5)","--j-btn-color-6":"var(--j-color-primary-6)","--j-dropdown-btn-color":"var(--j-color-primary)"})),B={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},R=t.computed(()=>({...B,...e.tooltipConfig})),v=()=>{if(!l.value||!a.value)return;const y=l.value.getBoundingClientRect(),Q=a.value.getBoundingClientRect(),F=window.innerHeight-y.bottom,$=y.top;let V=y.bottom+4;Q.height>50&&F<Q.height+20&&$>Q.height+20&&(V=y.top-Q.height-4),c.value={top:`${V}px`,left:`${y.left}px`}},j=()=>{s.value=!0,t.nextTick(()=>{t.nextTick(()=>{v()})})},h=()=>{s.value=!1},I=()=>{s.value?h():j()},N=y=>{n("click",y),I()},H=y=>{y.disabled||(n("update:modelValue",y.value),n("select",y),h())},m=y=>{if(!l.value||!a.value)return;const Q=y.target;!l.value.contains(Q)&&!a.value.contains(Q)&&h()};return t.watch(s,y=>{y?(document.addEventListener("click",m),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0)):(document.removeEventListener("click",m),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0))}),t.onMounted(()=>{}),t.onBeforeUnmount(()=>{document.removeEventListener("click",m),window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}),o({get $el(){return l.value},click:()=>{var y,Q;(Q=(y=r.value)==null?void 0:y.$el)==null||Q.click()},openDropdown:j,closeDropdown:h}),{dropdownRef:l,mainBtnRef:r,dropdownBtnRef:i,dropdownMenuRef:a,dropdownVisible:s,dropdownMenuStyle:c,tooltipContent:d,displayLabel:g,dropdownClass:u,mainBtnClass:w,dropdownBtnClass:z,computedStyle:O,mergedTooltipConfig:R,handleMainClick:N,toggleDropdown:I,handleOptionClick:H}}}),kt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20viewBox='0%200%2016%2016'%20class='j-tw-btn__loading-icon'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_06013'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_06013)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='transparent'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z'%20fill-rule='evenodd'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",Qt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='j-tw-dropdown-btn__arrow'%20%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096406'%3e%3crect%20x='0'%20y='16'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='matrix(1,0,0,-1,0,32)'%20clip-path='url(%23master_svg0_1313_096406)'%3e%3cpath%20d='M4.5500030514375,21.78070152C4.4700031284375,21.95112768,4.4900026324375,22.15162873,4.6000032424375,22.30200529L7.6000232734375,26.3120298C7.7900228734375006,26.5626564,8.2100229734375,26.5626564,8.4000234734375,26.3120298L11.4000234734375,22.30200529C11.5100230734375,22.15162873,11.530022573437499,21.95112768,11.4500226734375,21.78070152C11.3600234734375,21.61027536,11.1900233734375,21.5,11.0000228734375,21.5L5.0000028634375,21.5C4.8100032834375,21.5,4.6400032034375,21.61027536,4.5500030514375,21.78070152Z'%20fill='currentColor'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",It="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096497'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096497)'%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.409602997126058,4.475219065789133)'%3e%3cpath%20d='M1.947415595,8.767578125Q1.947415595,8.693724342,1.961823825,8.621289645Q1.976231935,8.548854945,2.004494545,8.480622945Q2.032757165,8.412390945,2.073788165,8.350983795Q2.114819105,8.289576615,2.167041595,8.237354095Q2.219264115,8.185131605,2.280671295,8.144100665Q2.342078445,8.103069665,2.410310445,8.074807045Q2.478542445,8.046544435,2.550977145,8.032136325Q2.623411842,8.017728095,2.697265625,8.017728095Q2.771119408,8.017728095,2.843554105,8.032136325Q2.915988805,8.046544435,2.984220805,8.074807045Q3.052452805,8.103069665,3.113859955,8.144100665Q3.175267135,8.185131605,3.227489655,8.237354095Q3.279712145,8.289576615,3.320743085,8.350983795Q3.361774085,8.412390945,3.390036705,8.480622945Q3.418299315,8.548854945,3.4327074250000003,8.621289645Q3.447115655,8.693724342,3.447115655,8.767578125L3.447265625,8.767578125L3.447265625,13.017578125L12.697265625,13.017578125L12.697265625,13.017727825Q12.771118625,13.017727825,12.843553625,13.032135925Q12.915987625,13.046544125,12.984220625,13.074806725Q13.052451625,13.103069325,13.113859625,13.144100224999999Q13.175266625,13.185131025,13.227489625,13.237353825Q13.279710625,13.289576525000001,13.320741625,13.350983625Q13.361772625,13.412390725,13.390035625,13.480622324999999Q13.418298625,13.548854825,13.432706625,13.621289225Q13.447114625,13.693724625,13.447115625,13.767578125Q13.447114625,13.841431625,13.432706625,13.913866025Q13.418298625,13.986300425,13.390035625,14.054533025Q13.361772625,14.122764625,13.320741625,14.184171724999999Q13.279710625,14.245578725,13.227489625,14.297801925Q13.175266625,14.350024225,13.113859625,14.391055125000001Q13.052451625,14.432086025,12.984220625,14.460349125Q12.915987625,14.488611725,12.843553625,14.503020325Q12.771118625,14.517428425,12.697265625,14.517428425L12.697265625,14.517578125L2.697265625,14.517578125Q2.623397082,14.517578125,2.550947905,14.503167125000001Q2.478498745,14.488756225,2.410253105,14.460487825000001Q2.342007455,14.432219525,2.280588005,14.391180025Q2.219168545,14.350140525,2.166935565,14.297907825Q2.114702645,14.245674625,2.073663475,14.184255125Q2.032624305,14.122835625,2.004356025,14.054590225Q1.976087745,13.986344325000001,1.9616767149999998,13.913895625Q1.947265625,13.841446925,1.947265625,13.767578125L1.947265625,8.767578125L1.947415595,8.767578125Z'%20fill-rule='evenodd'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",At={class:"j-tw-dropdown-btn__label"},jt=["onClick"],Tt={class:"j-tw-dropdown-btn__option-label"},bt={key:0,src:It,class:"j-tw-dropdown-btn__selected-icon",alt:"Selected"};function Lt(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip");return t.openBlock(),t.createElementBlock("div",{ref:"dropdownRef",class:t.normalizeClass(e.dropdownClass),style:t.normalizeStyle(e.computedStyle)},[t.createVNode(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"mainBtnRef",class:[e.mainBtnClass,{"j-tw-dropdown-btn__main--open":e.dropdownVisible}],style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleMainClick}),t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",At,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.displayLabel),1)])]),t.createElementVNode("img",{src:Qt,class:t.normalizeClass(["j-tw-dropdown-btn__arrow",{"j-tw-dropdown-btn__arrow--open":e.dropdownVisible}]),alt:"Dropdown arrow"},null,2)]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[1]||(n[1]=t.createElementVNode("img",{src:kt,class:"j-tw-btn__loading-icon",alt:"Loading"},null,-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-dropdown-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-dropdown-btn__menu",style:t.normalizeStyle({...e.dropdownMenuStyle,...e.computedStyle}),onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options,c=>(t.openBlock(),t.createElementBlock("div",{key:c.value,class:t.normalizeClass(["j-tw-dropdown-btn__option",{"j-tw-dropdown-btn__option--selected":c.value===e.modelValue,"j-tw-dropdown-btn__option--disabled":c.disabled}]),onClick:d=>e.handleOptionClick(c)},[t.createElementVNode("span",Tt,t.toDisplayString(c.label),1),c.value===e.modelValue?(t.openBlock(),t.createElementBlock("img",bt)):t.createCommentVNode("",!0)],10,jt))),128))],4)):t.createCommentVNode("",!0)]),_:1})]))],6)}const St=S(Nt,[["render",Lt]]),zt=t.defineComponent({name:"TreeNode",props:{node:{type:Object,required:!0},level:{type:Number,default:0},isLast:{type:Boolean,default:!1},expandedKeys:{type:Set,required:!0},tempSelectedValue:{type:[String,Number],default:void 0},tempSelectedValues:{type:Set,required:!0},multiple:{type:Boolean,default:!1},isNodeChecked:{type:Function,required:!0},isNodeIndeterminate:{type:Function,required:!0},isNodeSelected:{type:Function,required:!0},toggleExpand:{type:Function,required:!0},handleNodeClick:{type:Function,required:!0}}}),Et="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096239'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096239)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",Bt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096226'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096226)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0,1,-1,0,16.0009765625,-4.0009765625)'%3e%3cpath%20d='M10.0009765625,6.75L18.0009765625,6.75L18.0009765625,6.74985003Q18.0748300625,6.74985003,18.1472644625,6.7354418Q18.2196998625,6.72103369,18.287931462499998,6.69277108Q18.356163062500002,6.66450846,18.4175701625,6.62347746Q18.4789771625,6.5824465199999995,18.5312003625,6.53022403Q18.5834216625,6.47800151,18.6244535625,6.41659433Q18.6654834625,6.35518718,18.6937465625,6.28695518Q18.7220096625,6.21872318,18.7364177625,6.14628848Q18.7508258625,6.073853783,18.7508268625,6Q18.7508258625,5.926146217,18.7364177625,5.85371152Q18.7220096625,5.78127682,18.6937465625,5.71304482Q18.6654834625,5.64481282,18.6244535625,5.58340567Q18.5834216625,5.52199849,18.5312003625,5.46977597Q18.4789771625,5.4175534800000005,18.4175701625,5.37652254Q18.356163062500002,5.33549154,18.287931462499998,5.30722892Q18.2196998625,5.27896631,18.1472644625,5.2645582Q18.0748300625,5.25014997,18.0009765625,5.25014997L18.0009765625,5.25L10.0009765625,5.25L10.0009765625,5.25014997Q9.9271227795,5.25014997,9.8546880825,5.2645582Q9.7822533825,5.27896631,9.7140213825,5.30722892Q9.6457893825,5.33549154,9.5843822325,5.37652254Q9.5229750525,5.4175534800000005,9.4707525325,5.46977597Q9.4185300425,5.52199849,9.3774991025,5.58340567Q9.3364681025,5.64481282,9.3082054825,5.71304482Q9.2799428725,5.78127682,9.2655347625,5.85371152Q9.2511265325,5.926146217,9.2511265325,6Q9.2511265325,6.073853783,9.2655347625,6.14628848Q9.2799428725,6.21872318,9.3082054825,6.28695518Q9.3364681025,6.35518718,9.3774991025,6.41659433Q9.4185300425,6.47800151,9.4707525325,6.53022403Q9.5229750525,6.5824465199999995,9.5843822325,6.62347746Q9.6457893825,6.66450846,9.7140213825,6.69277108Q9.7822533825,6.72103369,9.8546880825,6.7354418Q9.9271227795,6.74985003,10.0009765625,6.74985003L10.0009765625,6.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",xt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28192'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28192)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cpath%20d='M14.000001,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75L14.000001,10.75L14.000001,10.74985003Q14.0738544,10.74985003,14.1462889,10.7354418Q14.2187233,10.72103369,14.2869558,10.69277108Q14.3551874,10.66450846,14.4165945,10.62347746Q14.4780016,10.58244652,14.5302248,10.53022403Q14.5824471,10.47800151,14.6234779,10.41659433Q14.6645088,10.35518718,14.6927719,10.28695518Q14.721035,10.21872318,14.7354431,10.14628848Q14.7498512,10.073853783,14.7498512,10Q14.7498512,9.926146217,14.7354431,9.85371152Q14.721035,9.78127682,14.6927719,9.71304482Q14.6645088,9.64481282,14.6234779,9.58340567Q14.5824471,9.52199849,14.5302248,9.46977597Q14.4780016,9.41755348,14.4165945,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462889,9.2645582Q14.0738544,9.25014997,14.000001,9.25014997L14.000001,9.25Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",Ot="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28187'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28187)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.6776717531065515,7.121317610617552)'%3e%3cpath%20d='M5.007504706328125,10.414215087890625Q5.007504706328125,10.340361304890624,5.021912936328125,10.267926607890624Q5.036321046328125,10.195491907890625,5.064583656328125,10.127259907890625Q5.092846276328125,10.059027907890625,5.133877276328125,9.997620757890624Q5.1749082163281255,9.936213577890625,5.227130706328125,9.883991057890626Q5.279353226328125,9.831768567890625,5.340760406328125,9.790737627890625Q5.402167556328125,9.749706627890625,5.470399556328125,9.721444007890625Q5.538631556328125,9.693181397890624,5.611066256328125,9.678773287890625Q5.683500953328125,9.664365057890626,5.757354736328125,9.664365057890626Q5.831208519328125,9.664365057890626,5.903643216328125,9.678773287890625Q5.976077916328125,9.693181397890624,6.044309916328125,9.721444007890625Q6.112541916328125,9.749706627890625,6.173949066328125,9.790737627890625Q6.235356246328125,9.831768567890625,6.287578766328125,9.883991057890626Q6.3398012563281245,9.936213577890625,6.380832196328125,9.997620757890624Q6.421863196328125,10.059027907890625,6.450125816328125,10.127259907890625Q6.478388426328125,10.195491907890625,6.492796536328125,10.267926607890624Q6.507204766328125,10.340361304890624,6.507204766328125,10.414215087890625L6.507354676328125,10.414215087890625L6.507354676328125,13.664215587890626L13.757355736328124,13.664215587890626L13.757355736328124,13.664365487890624Q13.831209136328125,13.664365487890624,13.903643636328125,13.678773687890626Q13.976078036328126,13.693181487890625,14.044310536328124,13.721444087890625Q14.112542136328125,13.749706787890625,14.173949236328125,13.790737587890625Q14.235356336328126,13.831768487890624,14.287579536328124,13.883991287890625Q14.339801836328125,13.936213487890626,14.380832636328124,13.997620787890625Q14.421863536328125,14.059027687890625,14.450126636328125,14.127259687890625Q14.478389736328126,14.195491787890624,14.492797836328124,14.267926687890625Q14.507205936328125,14.340361587890625,14.507205936328125,14.414215587890624Q14.507205936328125,14.488069487890625,14.492797836328124,14.560503987890625Q14.478389736328126,14.632938387890626,14.450126636328125,14.701170487890625Q14.421863536328125,14.769402487890625,14.380832636328124,14.830809587890625Q14.339801836328125,14.892216687890624,14.287579536328124,14.944438887890625Q14.235356336328126,14.996661187890625,14.173949236328125,15.037692087890626Q14.112541236328125,15.078722987890625,14.044309636328125,15.106986087890625Q13.976078036328126,15.135248687890625,13.903643636328125,15.149657287890625Q13.831209136328125,15.164065387890625,13.757355736328124,15.164065387890625L13.757355736328124,15.164215587890624L5.757354736328125,15.164215587890624Q5.683486201328125,15.164215087890625,5.611037026328125,15.149804087890626Q5.538587866328125,15.135393187890624,5.470342216328125,15.107124787890626Q5.402096626328125,15.078856487890626,5.340677146328125,15.037817487890624Q5.279257716328125,14.996778487890625,5.227024736328125,14.944545787890625Q5.174791816328125,14.892312487890624,5.133752586328125,14.830892587890624Q5.092713476328125,14.769473087890624,5.0644451963281245,14.701227687890626Q5.036176916328125,14.632982287890625,5.021765886328125,14.560533087890626Q5.007354856328125,14.488083887890625,5.007354796328125,14.414215587890624L5.007354796328125,10.414215087890625L5.007504706328125,10.414215087890625Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ft="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28023'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28023)'%3e%3crect%20x='2.75'%20y='2.75'%20width='14.5'%20height='14.5'%20rx='1.25'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'/%3e%3c/g%3e%3c/svg%3e",_t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16385'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16385)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='5.833332061767578'%20ry='5.833332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23165DFF'%20fill='none'%20stroke-width='5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",$t="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16369'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16369)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='7.583332061767578'%20ry='7.583332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Vt={key:0,src:Et,alt:"collapse",class:"j-tw-tree-select-btn__expand-icon"},Pt={key:1,src:Bt,alt:"expand",class:"j-tw-tree-select-btn__expand-icon"},Rt={key:2,class:"j-tw-tree-select-btn__expand-placeholder"},Yt={class:"j-tw-tree-select-btn__radio"},Ut={key:0,src:xt,alt:"indeterminate",class:"j-tw-tree-select-btn__radio-icon"},Wt={key:1,src:Ot,alt:"checked",class:"j-tw-tree-select-btn__radio-icon"},Zt={key:2,src:Ft,alt:"unchecked",class:"j-tw-tree-select-btn__radio-icon"},Gt={key:0,src:_t,alt:"selected",class:"j-tw-tree-select-btn__radio-icon"},Jt={key:1,src:$t,alt:"unselected",class:"j-tw-tree-select-btn__radio-icon"},Ht={class:"j-tw-tree-select-btn__node-label"};function Xt(e,n,o,l,r,i){const a=t.resolveComponent("TreeNode",!0);return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select-btn__node",{"j-tw-tree-select-btn__node--disabled":e.node.disabled},{"j-tw-tree-select-btn__node--selected":e.isNodeSelected(e.node.value)},{"j-tw-tree-select-btn__node--last":e.isLast}]),style:t.normalizeStyle({paddingLeft:`${16+e.level*28}px`,position:"relative"}),onClick:n[1]||(n[1]=s=>e.handleNodeClick(e.node))},[e.level>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-tree-select-btn__node-line",style:t.normalizeStyle({left:`${16+(e.level-1)*28+10}px`})},null,4)):t.createCommentVNode("",!0),e.node.children&&e.node.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"j-tw-tree-select-btn__expand-btn",onClick:n[0]||(n[0]=t.withModifiers(s=>e.toggleExpand(e.node.value),["stop"]))},[e.expandedKeys.has(e.node.value)?(t.openBlock(),t.createElementBlock("img",Vt)):(t.openBlock(),t.createElementBlock("img",Pt))])):(t.openBlock(),t.createElementBlock("div",Rt)),t.createElementVNode("div",Yt,[e.multiple?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isNodeIndeterminate(e.node)?(t.openBlock(),t.createElementBlock("img",Ut)):e.isNodeChecked(e.node.value)?(t.openBlock(),t.createElementBlock("img",Wt)):(t.openBlock(),t.createElementBlock("img",Zt))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.tempSelectedValue===e.node.value?(t.openBlock(),t.createElementBlock("img",Gt)):(t.openBlock(),t.createElementBlock("img",Jt))],64))]),t.createElementVNode("span",Ht,[t.renderSlot(e.$slots,"default",{node:e.node},()=>[t.createTextVNode(t.toDisplayString(e.node.label),1)])])],6),e.node.children&&e.node.children.length>0&&e.expandedKeys.has(e.node.value)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.node.children,(s,c)=>(t.openBlock(),t.createBlock(a,{key:s.value,node:s,level:e.level+1,"is-last":c===e.node.children.length-1,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:d})=>[t.renderSlot(e.$slots,"default",{node:d},()=>[t.createTextVNode(t.toDisplayString(d.label),1)])]),_:3},8,["node","level","is-last","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128)):t.createCommentVNode("",!0)],64)}const Ee=S(zt,[["render",Xt]]),Kt="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI3MiIgaGVpZ2h0PSI3MiIgdmlld0JveD0iMCAwIDcyIDcyIj48ZGVmcz48Y2xpcFBhdGggaWQ9Im1hc3Rlcl9zdmcwXzM3XzA4Mjg2Ij48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNzIiIGhlaWdodD0iNzIiIHJ4PSIwIi8+PC9jbGlwUGF0aD48bGluZWFyR3JhZGllbnQgeDE9IjAuNSIgeTE9IjAiIHgyPSIwLjUiIHkyPSIxIiBpZD0ibWFzdGVyX3N2ZzFfMTFfNDQzOTkiP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NTAuMDAwMDAwNUM3Miw0OC44OTU0MzA1Niw3MS4xMDQ1NjgsNDgsNzAsNDhMNTQsNDhDNTIuODk1NDMyLDQ4LDUyLjA0MDgyOSw0OC45NTE2NzQyMiw1MS41MDk4MDgsNDkuOTIwMjI0MUM1MC44MzAyNTQsNTEuMTU5NjgzMiw0OS41MTMyNiw1Miw0OCw1MkwyNCw1MlpNMjQsNTNRMjEuMDM4Mjk2LDUzLDE5LjYxMzMzNSw1MC40MDA5NzU5UTE4Ljg0NTIzLDQ4Ljk5OTk5OTg4LDE4LDQ4Ljk5OTk5OTg4TDIuMDAwMDAwNSw0OVEwLjk5OTk5OTg4LDQ5LDAuOTk5OTk5ODgsNTAuMDAwMDAwNUwxLDY4UTEsNjkuMjQyNjQwOTk5OTk5OTksMS44Nzg2Nzk2LDcwLjEyMTMyMVEyLjc1NzM2LDcxLDQuMDAwMDAxLDcxTDY4LDcxUTY5LjI0MjYzOCw3MSw3MC4xMjEzMjMsNzAuMTIxMzIxUTcxLDY5LjI0MjYzOCw3MSw2OEw3MSw1MC4wMDAwMDA1UTcxLDQ4Ljk5OTk5OTg4LDcwLDQ4Ljk5OTk5OTg4TDU0LDQ5UTUzLjE1NDc2Niw0OSw1Mi4zODY2NjUsNTAuNDAwOTczOFE1MC45NjE3LDUzLDQ4LDUzTDI0LDUzWiIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsPSJ1cmwoI21hc3Rlcl9zdmczXzExXzQzODA1KSIgZmlsbC1vcGFjaXR5PSIxIi8+PC9nPjwvc3ZnPg==",en=t.defineComponent({name:"JTWStatusImg",props:{name:{type:String,default:"default"},width:{type:[String,Number],default:void 0},height:{type:[String,Number],default:void 0}},setup(e){const n={default:Kt,empty:qt},o=t.computed(()=>n[e.name]||n.default),l=t.computed(()=>{const r={};return e.width!==void 0&&(r.width=typeof e.width=="number"?`${e.width}px`:e.width),e.height!==void 0&&(r.height=typeof e.height=="number"?`${e.height}px`:e.height),r});return{imageSrc:o,imageStyle:l}}}),tn={class:"j-tw-status-img"},nn=["src","alt"];function on(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("div",tn,[t.createElementVNode("img",{src:e.imageSrc,alt:e.name,style:t.normalizeStyle(e.imageStyle),class:"j-tw-status-img__image"},null,12,nn)])}const ce=S(en,[["render",on]]),ln=t.defineComponent({name:"JTWTreeSelectBtn",components:{ElButton:L.ElButton,ElTooltip:L.ElTooltip,JTWBtn:oe,TreeNode:Ee,JTWStatusImg:ce},inheritAttrs:!1,props:{size:{type:String,default:b.NORMAL,validator:e=>Object.values(b).includes(e)},type:{type:String,default:P.BUTTON,validator:e=>Object.values(P).includes(e)},outline:{type:Boolean,default:!1},label:{type:String,default:""},loading:{type:Boolean,default:!1},tips:{type:[String,Number],default:""},tooltipConfig:{type:Object,default:void 0},data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入部门名称"},dropdownWidth:{type:Number,default:320},dropdownMaxHeight:{type:Number,default:500},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},defaultExpandFirst:{type:Boolean,default:!1}},emits:{click:e=>!0,"update:modelValue":e=>!0,select:e=>!0,confirm:e=>!0,cancel:()=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),d=t.ref(""),g=t.ref(new Set),u=t.ref(void 0),w=t.ref(new Set),z=t.ref(!1);e.defaultExpandFirst&&e.data.length>0&&g.value.add(e.data[0].value),t.watch(()=>e.data,p=>{e.defaultExpandFirst&&p.length>0&&g.value.size===0&&g.value.add(p[0].value)},{immediate:!0});const O=t.computed(()=>e.tips!=null?String(e.tips):""),B=(p,D)=>{for(const k of p){if(k.value===D)return k;if(k.children){const E=B(k.children,D);if(E)return E}}return null},R=p=>{if(!p.children||p.children.length===0)return[];const D=[];for(const k of p.children)D.push(k.value),D.push(...R(k));return D},v=(p,D)=>{for(const k of p)if(k.children){if(k.children.some(Y=>Y.value===D))return k;const E=v(k.children,D);if(E)return E}return null},j=p=>{const D=v(e.data,p);return D&&D.children?D.children.map(k=>k.value).filter(k=>k!==p):e.data.map(k=>k.value).filter(k=>k!==p)},h=p=>{const D=v(e.data,p);D&&D.children&&(D.children.every(E=>w.value.has(E.value))?w.value.add(D.value):w.value.delete(D.value))},I=p=>e.multiple?w.value.has(p):u.value===p,N=p=>{if(!p.children||p.children.length===0)return[];const D=[];for(const k of p.children)D.push(k.value),D.push(...N(k));return D},H=p=>{if(!e.multiple||!p.children||p.children.length===0)return!1;const D=N(p),k=D.filter(E=>w.value.has(E)).length;return k>0&&k<D.length},m=p=>e.multiple?w.value.has(p):u.value===p,A=t.computed(()=>{if(e.modelValue!=null){if(e.multiple&&Array.isArray(e.modelValue)){const p=e.modelValue.length;return p>0?`已选择 ${p} 项`:e.label}else if(!Array.isArray(e.modelValue)){const p=B(e.data,e.modelValue);if(p)return p.label}}return e.label}),y=(p,D)=>{if(!D)return p;const k=[];for(const E of p){const Y=E.label.toLowerCase().includes(D.toLowerCase()),K=E.children?y(E.children,D):[];(Y||K.length>0)&&(k.push({...E,children:K.length>0?K:E.children}),K.length>0&&g.value.add(E.value))}return k},Q=t.computed(()=>y(e.data,d.value)),x=t.computed(()=>({"j-tw-tree-select-btn":!0,"j-tw-tree-select-btn--large":e.size===b.LARGE,"j-tw-tree-select-btn--normal":e.size===b.NORMAL,"j-tw-tree-select-btn--small":e.size===b.SMALL})),F=t.computed(()=>({"j-tw-btn":!0,"j-tw-tree-select-btn__main":!0,"j-tw-btn--large":e.size===b.LARGE,"j-tw-btn--normal":e.size===b.NORMAL,"j-tw-btn--small":e.size===b.SMALL,"j-tw-btn--button":e.type===P.BUTTON&&!e.outline,"j-tw-btn--outline":e.outline,"j-tw-btn--text":e.type===P.TEXT})),$=t.computed(()=>({"--j-btn-color":"var(--j-color-primary)","--j-btn-color-1":"var(--j-color-primary-1)","--j-btn-color-2":"var(--j-color-primary-2)","--j-btn-color-3":"var(--j-color-primary-3)","--j-btn-color-4":"var(--j-color-primary-4)","--j-btn-color-5":"var(--j-color-primary-5)","--j-btn-color-6":"var(--j-color-primary-6)","--j-tree-select-btn-color":"var(--j-color-primary)"})),V={placement:"top",effect:"dark",trigger:"hover",showArrow:!0,openDelay:0,closeDelay:200,offset:5},ue=t.computed(()=>({...V,...e.tooltipConfig})),Z=()=>{if(!l.value||!i.value)return;const p=l.value.getBoundingClientRect(),D=i.value.getBoundingClientRect(),E=window.innerHeight-p.bottom,Y=p.top;let K=p.bottom+4;D.height>50&&E<D.height+20&&Y>D.height+20&&(K=p.top-D.height-4),c.value={top:`${K}px`,left:`${p.left}px`,width:`${e.dropdownWidth}px`,maxHeight:`${e.dropdownMaxHeight}px`}},le=()=>{s.value=!0,e.multiple&&Array.isArray(e.modelValue)?w.value=new Set(e.modelValue):Array.isArray(e.modelValue)||(u.value=e.modelValue),d.value="",t.nextTick(()=>{t.nextTick(()=>{Z()})})},X=()=>{s.value=!1,d.value=""},re=()=>{s.value?X():le()},fe=p=>{n("click",p),re()},ge=p=>{g.value.has(p)?g.value.delete(p):(e.accordion&&j(p).forEach(k=>{g.value.delete(k)}),g.value.add(p))},ee=p=>{if(!p.disabled)if(e.multiple){const D=w.value.has(p.value),k=R(p);D?(w.value.delete(p.value),k.forEach(Y=>w.value.delete(Y))):(w.value.add(p.value),k.forEach(Y=>w.value.add(Y))),h(p.value);const E=e.data.filter(Y=>w.value.has(Y.value));n("select",E)}else u.value=p.value,n("select",p)},je=()=>{if(e.multiple){const p=Array.from(w.value),D=p.map(k=>B(e.data,k)).filter(k=>k!==null);n("update:modelValue",p),n("confirm",D.length>0?D:null)}else if(u.value!=null){const p=B(e.data,u.value);n("update:modelValue",u.value),n("confirm",p)}else n("update:modelValue",void 0),n("confirm",null);X()},f=()=>{n("cancel"),X()},M=()=>{e.multiple?(w.value.clear(),n("update:modelValue",[]),n("confirm",null)):(u.value=void 0,n("update:modelValue",void 0),n("confirm",null))},C=t.computed(()=>e.multiple&&Array.isArray(e.modelValue)?e.modelValue.length>0:e.modelValue!=null),T=p=>{if(!l.value||!i.value)return;const D=p.target;!l.value.contains(D)&&!i.value.contains(D)&&X()};return t.watch(s,p=>{p?(document.addEventListener("click",T),window.addEventListener("resize",Z),window.addEventListener("scroll",Z,!0)):(document.removeEventListener("click",T),window.removeEventListener("resize",Z),window.removeEventListener("scroll",Z,!0))}),t.onMounted(()=>{}),t.onBeforeUnmount(()=>{document.removeEventListener("click",T),window.removeEventListener("resize",Z),window.removeEventListener("scroll",Z,!0)}),o({get $el(){return l.value},click:()=>{var p,D;(D=(p=r.value)==null?void 0:p.$el)==null||D.click()},openDropdown:le,closeDropdown:X}),{treeSelectRef:l,mainBtnRef:r,dropdownMenuRef:i,treeContainerRef:a,dropdownVisible:s,dropdownMenuStyle:c,searchText:d,expandedKeys:g,tempSelectedValue:u,tempSelectedValues:w,tooltipContent:O,displayLabel:A,filteredData:Q,treeSelectClass:x,mainBtnClass:F,computedStyle:$,mergedTooltipConfig:ue,handleMainClick:fe,toggleDropdown:re,toggleExpand:ge,handleNodeClick:ee,handleConfirm:je,handleCancel:f,handleClear:M,showClearIcon:C,isHovering:z,isNodeChecked:I,isNodeIndeterminate:H,isNodeSelected:m}}}),rn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20viewBox='0%200%2016%2016'%20class='j-tw-btn__loading-icon'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_06013'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_06013)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='transparent'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.9947965,4.9947963Q6.2395926,3.75,8,3.75L8,3.74985003Q8.0738535,3.74985003,8.1462879,3.7354418000000003Q8.2187223,3.72103369,8.2869549,3.69277108Q8.3551865,3.66450846,8.416593599999999,3.62347746Q8.4780006,3.58244652,8.5302238,3.53022403Q8.5824461,3.47800151,8.623477000000001,3.41659433Q8.6645079,3.35518718,8.692771,3.28695518Q8.7210336,3.21872318,8.7354422,3.14628848Q8.7498503,3.073853783,8.7498503,3Q8.7498503,2.926146217,8.735441699999999,2.85371152Q8.7210331,2.78127682,8.6927705,2.71304482Q8.6645079,2.64481282,8.623477000000001,2.58340567Q8.5824461,2.52199849,8.5302238,2.46977597Q8.4780006,2.41755348,8.416593599999999,2.37652254Q8.3551865,2.33549154,8.2869549,2.30722892Q8.2187223,2.27896631,8.1462879,2.2645581999999997Q8.0738535,2.25014997,8,2.25014997L8,2.25Q5.6182723,2.25,3.93413639,3.93413603Q2.25000012,5.6182723,2.25000024,8Q2.25,10.381727699999999,3.93413603,12.0658646Q5.6182728,13.75,8,13.75Q10.381727699999999,13.75,12.0658646,12.0658636Q13.75,10.3817263,13.75,7.9999976L13.74985,7.9999976Q13.749849,7.9261436,13.735441,7.8537092Q13.721033,7.7812748,13.69277,7.7130427Q13.664507,7.6448107,13.623476,7.5834041Q13.582445,7.521997,13.530224,7.4697747Q13.478001,7.4175525,13.416594,7.3765216Q13.355186,7.3354907,13.286955,7.3072281Q13.218722,7.278966,13.146288,7.2645578Q13.073853,7.2501497,13,7.2501497Q12.9261465,7.2501497,12.8537121,7.2645578Q12.7812767,7.278966,12.7130442,7.3072286Q12.6448116,7.3354912,12.5834045,7.3765221Q12.5219975,7.4175529,12.4697752,7.4697757Q12.4175529,7.5219984,12.3765221,7.5834055Q12.3354912,7.6448126,12.3072281,7.7130442Q12.278965,7.7812767,12.2645578,7.8537111Q12.2501488,7.9261465,12.2501497,8L12.25,7.9999976Q12.25,9.760407,11.0052042,11.0052032Q9.7604084,12.25,8,12.25Q6.2395923,12.25,4.9947963,11.0052042Q3.75,9.7604074,3.75000036,8Q3.75000024,6.2395926,4.9947965,4.9947963Z'%20fill-rule='evenodd'%20fill='currentColor'/%3e%3c/g%3e%3c/svg%3e",an="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20class='j-tw-tree-select-btn__arrow'%20%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096406'%3e%3crect%20x='0'%20y='16'%20width='16'%20height='16'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20transform='matrix(1,0,0,-1,0,32)'%20clip-path='url(%23master_svg0_1313_096406)'%3e%3cpath%20d='M4.5500030514375,21.78070152C4.4700031284375,21.95112768,4.4900026324375,22.15162873,4.6000032424375,22.30200529L7.6000232734375,26.3120298C7.7900228734375006,26.5626564,8.2100229734375,26.5626564,8.4000234734375,26.3120298L11.4000234734375,22.30200529C11.5100230734375,22.15162873,11.530022573437499,21.95112768,11.4500226734375,21.78070152C11.3600234734375,21.61027536,11.1900233734375,21.5,11.0000228734375,21.5L5.0000028634375,21.5C4.8100032834375,21.5,4.6400032034375,21.61027536,4.5500030514375,21.78070152Z'%20fill='currentColor'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",sn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",cn={class:"j-tw-tree-select-btn__label"},dn={class:"j-tw-tree-select-btn__search"},un=["placeholder"],fn={class:"j-tw-tree-select-btn__tree",ref:"treeContainerRef"},gn={key:0,class:"j-tw-tree-select-btn__empty"},pn={class:"j-tw-tree-select-btn__footer"};function mn(e,n,o,l,r,i){const a=t.resolveComponent("el-button"),s=t.resolveComponent("el-tooltip"),c=t.resolveComponent("JTWStatusImg"),d=t.resolveComponent("TreeNode"),g=t.resolveComponent("JTWBtn");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectRef",class:t.normalizeClass(e.treeSelectClass),style:t.normalizeStyle(e.computedStyle)},[t.createVNode(s,{disabled:!e.tips,content:e.tooltipContent,placement:e.mergedTooltipConfig.placement,effect:e.mergedTooltipConfig.effect,trigger:e.mergedTooltipConfig.trigger,"show-arrow":e.mergedTooltipConfig.showArrow,"show-after":e.mergedTooltipConfig.openDelay,"hide-after":e.mergedTooltipConfig.closeDelay,offset:e.mergedTooltipConfig.offset},{default:t.withCtx(()=>[t.createVNode(a,t.mergeProps({ref:"mainBtnRef",class:[e.mainBtnClass,{"j-tw-tree-select-btn__main--open":e.dropdownVisible}],style:e.computedStyle,loading:e.loading},e.$attrs,{onClick:e.handleMainClick,onMouseenter:n[1]||(n[1]=u=>e.isHovering=!0),onMouseleave:n[2]||(n[2]=u=>e.isHovering=!1)}),t.createSlots({default:t.withCtx(()=>[t.createElementVNode("span",cn,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.displayLabel),1)])]),e.showClearIcon?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["j-tw-tree-select-btn__clear",{"j-tw-tree-select-btn__clear--hover":e.isHovering}]),onClick:n[0]||(n[0]=t.withModifiers((...u)=>e.handleClear&&e.handleClear(...u),["stop"]))},[...n[6]||(n[6]=[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"j-tw-tree-select-btn__clear-icon"},[t.createElementVNode("path",{fill:"currentColor",d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}),t.createElementVNode("path",{fill:"currentColor",d:"M624 338.4L512 450.3 400 338.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L466.7 496 354.8 607.9c-12.5 12.5-12.5 32.8 0 45.3 6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4L512 541.4l111.9 111.9c6.2 6.2 14.4 9.4 22.6 9.4s16.4-3.1 22.6-9.4c12.5-12.5 12.5-32.8 0-45.3L557.3 496l111.9-111.9c12.5-12.5 12.5-32.8 0-45.3-12.5-12.4-32.8-12.4-45.2-.4z"})],-1)])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select-btn__arrow",{"j-tw-tree-select-btn__arrow--open":e.dropdownVisible}])},[...n[7]||(n[7]=[t.createElementVNode("img",{src:an,alt:"Dropdown arrow"},null,-1)])],2)]),_:2},[e.$slots.icon?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"icon")]),key:"0"}:void 0,e.loading?{name:"loading",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"loading-icon",{},()=>[n[5]||(n[5]=t.createElementVNode("img",{src:rn,class:"j-tw-btn__loading-icon",alt:"Loading"},null,-1))])]),key:"1"}:void 0]),1040,["class","style","loading","onClick"])]),_:3},8,["disabled","content","placement","effect","trigger","show-arrow","show-after","hide-after","offset"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-tree-select-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-tree-select-btn__menu",style:t.normalizeStyle(e.dropdownMenuStyle),onClick:n[4]||(n[4]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",dn,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[3]||(n[3]=u=>e.searchText=u),type:"text",class:"j-tw-tree-select-btn__search-input",placeholder:e.searchPlaceholder},null,8,un),[[t.vModelText,e.searchText]]),n[8]||(n[8]=t.createElementVNode("img",{src:sn,alt:"search",class:"j-tw-tree-select-btn__search-icon"},null,-1))]),t.createElementVNode("div",fn,[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",gn,[t.createVNode(c,{width:32,height:32}),n[9]||(n[9]=t.createElementVNode("p",{class:"j-tw-tree-select-btn__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,u=>(t.openBlock(),t.createBlock(d,{key:u.value,node:u,level:0,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:w})=>[t.renderSlot(e.$slots,"default",{node:w},()=>[t.createTextVNode(t.toDisplayString(w.label),1)])]),_:3},8,["node","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128))],512),t.createElementVNode("div",pn,[t.createVNode(g,{label:"取消",flat:"",onClick:e.handleCancel},null,8,["onClick"]),t.createVNode(g,{label:"确定",onClick:e.handleConfirm},null,8,["onClick"])])],4)):t.createCommentVNode("",!0)]),_:3})]))],6)}const wn=S(ln,[["render",mn]]),hn=t.defineComponent({name:"JTWTreeSelectInput",components:{ElSelect:L.ElSelect,ElOption:L.ElOption,JTWBtn:oe,TreeNode:Ee,JTWStatusImg:ce},props:{data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入部门名称"},dropdownWidth:{type:Number,default:320},dropdownMaxHeight:{type:Number,default:500},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},defaultExpandFirst:{type:Boolean,default:!1},placeholder:{type:String,default:"请选择"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},size:{type:String,default:"default"},autoFill:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},allowRadioDeselect:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},bgGrey:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,select:e=>!0,confirm:e=>!0,cancel:()=>!0,change:e=>!0,clear:()=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref(null),i=t.ref(null),a=t.ref(null),s=t.ref(!1),c=t.ref({}),d=t.ref(""),g=t.ref(new Set),u=t.ref(void 0),w=t.ref(new Set);t.watch(()=>e.data,f=>{e.defaultExpandFirst&&f.length>0&&g.value.size===0&&g.value.add(f[0].value)},{immediate:!0});const z=(f,M)=>{for(const C of f){if(C.value===M)return C;if(C.children){const T=z(C.children,M);if(T)return T}}return null},O=f=>{if(!f.children||f.children.length===0)return[];const M=[];for(const C of f.children)M.push(C.value),M.push(...O(C));return M},B=(f,M)=>{for(const C of f)if(C.children){if(C.children.some(_=>_.value===M))return C;const T=B(C.children,M);if(T)return T}return null},R=f=>{const M=B(e.data,f);return M&&M.children?M.children.map(C=>C.value).filter(C=>C!==f):e.data.map(C=>C.value).filter(C=>C!==f)},v=f=>{const M=B(e.data,f);M&&M.children&&(M.children.every(T=>w.value.has(T.value))?w.value.add(M.value):w.value.delete(M.value))},j=f=>e.multiple?w.value.has(f):u.value===f,h=f=>{if(!f.children||f.children.length===0)return[];const M=[];for(const C of f.children)M.push(C.value),M.push(...h(C));return M},I=f=>{if(!e.multiple||!f.children||f.children.length===0)return!1;const M=h(f),C=M.filter(T=>w.value.has(T)).length;return C>0&&C<M.length},N=f=>e.multiple?w.value.has(f):u.value===f,H=t.computed(()=>{if(e.modelValue!=null){if(e.multiple&&Array.isArray(e.modelValue))return e.modelValue.map(f=>{const M=z(e.data,f);return M?{value:M.value,label:M.label}:null}).filter(f=>f!==null);if(!Array.isArray(e.modelValue)){const f=z(e.data,e.modelValue);return f?[{value:f.value,label:f.label}]:[]}}return[]}),m=t.computed(()=>{if(e.multiple&&Array.isArray(e.modelValue))return e.modelValue;if(!Array.isArray(e.modelValue))return e.modelValue}),A=(f,M)=>{if(!M)return f;const C=[];for(const T of f){const _=T.label.toLowerCase().includes(M.toLowerCase()),p=T.children?A(T.children,M):[];(_||p.length>0)&&(C.push({...T,children:p.length>0?p:T.children}),p.length>0&&g.value.add(T.value))}return C},y=t.computed(()=>A(e.data,d.value)),Q=t.computed(()=>e.autoFill?e.multiple&&Array.isArray(e.modelValue)?e.modelValue.length>0:e.modelValue!=null:e.clearable),x=()=>{if(!l.value||!i.value)return;const f=l.value.getBoundingClientRect(),M=i.value.getBoundingClientRect(),T=window.innerHeight-f.bottom,_=f.top;let p=f.bottom+4;M.height>50&&T<M.height+20&&_>M.height+20&&(p=f.top-M.height-4),c.value={top:`${p}px`,left:`${f.left}px`,width:`${e.dropdownWidth}px`,maxHeight:`${e.dropdownMaxHeight}px`}},F=()=>{e.disabled||(s.value=!0,e.multiple&&Array.isArray(e.modelValue)?w.value=new Set(e.modelValue):Array.isArray(e.modelValue)||(u.value=e.modelValue),d.value="",t.nextTick(()=>{t.nextTick(()=>{x()})}))},$=()=>{s.value=!1,d.value=""},V=f=>{f.target.closest(".el-select__clear")||f.preventDefault()},ue=f=>{f.stopPropagation(),s.value||F()},Z=f=>{f&&t.nextTick(()=>{var M;(M=r.value)==null||M.blur()})},le=()=>{e.multiple?w.value.clear():u.value=void 0,n("update:modelValue",e.multiple?[]:void 0),n("clear"),n("change",e.multiple?[]:void 0),$()},X=f=>{g.value.has(f)?g.value.delete(f):(e.accordion&&R(f).forEach(C=>{g.value.delete(C)}),g.value.add(f))},re=f=>{if(!f.disabled)if(e.multiple){const M=w.value.has(f.value),C=O(f);M?(w.value.delete(f.value),C.forEach(_=>w.value.delete(_))):(w.value.add(f.value),C.forEach(_=>w.value.add(_))),v(f.value);const T=e.data.filter(_=>w.value.has(_.value));if(n("select",T),e.autoFill){const _=Array.from(w.value);n("update:modelValue",_),n("change",_)}e.autoClose&&$()}else u.value=f.value,n("select",f),e.autoFill&&(u.value!=null?(n("update:modelValue",u.value),n("change",u.value)):(n("update:modelValue",void 0),n("change",void 0))),e.autoClose&&u.value!=null&&$()},fe=()=>{if(e.multiple){const f=Array.from(w.value),M=f.map(C=>z(e.data,C)).filter(C=>C!==null);n("update:modelValue",f),n("confirm",M.length>0?M:null),n("change",f)}else if(u.value!=null){const f=z(e.data,u.value);n("update:modelValue",u.value),n("confirm",f),n("change",u.value)}else n("update:modelValue",void 0),n("confirm",null),n("change",void 0);$()},ge=()=>{n("cancel"),$()},ee=f=>{if(!l.value||!i.value)return;const M=f.target;!l.value.contains(M)&&!i.value.contains(M)&&$()};return t.watch(s,f=>{f?(setTimeout(()=>{document.addEventListener("mousedown",ee)},100),window.addEventListener("resize",x),window.addEventListener("scroll",x,!0)):(document.removeEventListener("mousedown",ee),window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0))}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",ee),window.removeEventListener("resize",x),window.removeEventListener("scroll",x,!0)}),o({get $el(){return l.value},focus:()=>{var f;(f=r.value)==null||f.focus()},blur:()=>{var f;(f=r.value)==null||f.blur()},openDropdown:F,closeDropdown:$}),{treeSelectInputRef:l,selectRef:r,dropdownMenuRef:i,treeContainerRef:a,dropdownVisible:s,dropdownMenuStyle:c,searchText:d,expandedKeys:g,tempSelectedValue:u,tempSelectedValues:w,displayOptions:H,selectDisplayValue:m,filteredData:y,computedClearable:Q,handleMouseDown:V,handleSelectClick:ue,handleVisibleChange:Z,handleClear:le,toggleExpand:X,handleNodeClick:re,handleConfirm:fe,handleCancel:ge,isNodeChecked:j,isNodeIndeterminate:I,isNodeSelected:N}}}),yn="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Mn={class:"j-tw-tree-select-input__search"},vn=["placeholder"],Dn={class:"j-tw-tree-select-input__tree",ref:"treeContainerRef"},Cn={key:0,class:"j-tw-tree-select-input__empty"},Nn={key:0,class:"j-tw-tree-select-input__footer"};function kn(e,n,o,l,r,i){const a=t.resolveComponent("el-option"),s=t.resolveComponent("el-select"),c=t.resolveComponent("JTWStatusImg"),d=t.resolveComponent("TreeNode"),g=t.resolveComponent("JTWBtn");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectInputRef",class:t.normalizeClass(["j-tw-tree-select-input",{"j-tw-tree-select-input--open":e.dropdownVisible,"j-tw-tree-select-input--bg-grey":e.bgGrey}]),onMousedown:n[2]||(n[2]=(...u)=>e.handleMouseDown&&e.handleMouseDown(...u))},[t.createVNode(s,{ref:"selectRef","model-value":e.selectDisplayValue,placeholder:e.placeholder,disabled:e.disabled,clearable:e.computedClearable,size:e.size,"popper-class":"j-tw-tree-select-input__hidden-popper",onClick:t.withModifiers(e.handleSelectClick,["stop"]),onClear:e.handleClear,onVisibleChange:e.handleVisibleChange},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.displayOptions,u=>(t.openBlock(),t.createBlock(a,{key:u.value,label:u.label,value:u.value,style:{display:"none"}},null,8,["label","value"]))),128))]),_:1},8,["model-value","placeholder","disabled","clearable","size","onClick","onClear","onVisibleChange"]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-tree-select-fade"},{default:t.withCtx(()=>[e.dropdownVisible?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"dropdownMenuRef",class:"j-tw-tree-select-input__menu",style:t.normalizeStyle(e.dropdownMenuStyle),onClick:n[1]||(n[1]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",Mn,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>e.searchText=u),type:"text",class:"j-tw-tree-select-input__search-input",placeholder:e.searchPlaceholder},null,8,vn),[[t.vModelText,e.searchText]]),n[3]||(n[3]=t.createElementVNode("img",{src:yn,alt:"search",class:"j-tw-tree-select-input__search-icon"},null,-1))]),t.createElementVNode("div",Dn,[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",Cn,[t.createVNode(c,{width:32,height:32}),n[4]||(n[4]=t.createElementVNode("p",{class:"j-tw-tree-select-input__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,u=>(t.openBlock(),t.createBlock(d,{key:u.value,node:u,level:0,"expanded-keys":e.expandedKeys,"temp-selected-value":e.tempSelectedValue,"temp-selected-values":e.tempSelectedValues,multiple:e.multiple,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:w})=>[t.renderSlot(e.$slots,"default",{node:w},()=>[t.createTextVNode(t.toDisplayString(w.label),1)])]),_:3},8,["node","expanded-keys","temp-selected-value","temp-selected-values","multiple","is-node-checked","is-node-indeterminate","is-node-selected","toggle-expand","handle-node-click"]))),128))],512),e.hideFooter?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Nn,[t.createVNode(g,{label:"取消",flat:"",onClick:e.handleCancel},null,8,["onClick"]),t.createVNode(g,{label:"确定",onClick:e.handleConfirm},null,8,["onClick"])]))],4)):t.createCommentVNode("",!0)]),_:3})]))],34)}const Qn=S(hn,[["render",kn]]),In=t.defineComponent({name:"JTWDatePicker",components:{ElDatePicker:L.ElDatePicker},props:{modelValue:{type:Array,default:void 0},format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:String,default:"选择日期范围"},startPlaceholder:{type:String,default:"开始日期"},endPlaceholder:{type:String,default:"结束日期"},disable:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},disabledDate:{type:Function,default:void 0},minDate:{type:[Date,String,Number],default:void 0},maxDate:{type:[Date,String,Number],default:void 0},defaultValue:{type:[Date,Array],default:void 0},rangeSeparator:{type:String,default:"—"},showClearButton:{type:Boolean,default:!0},placement:{type:String,default:"bottom-start"},customClass:{type:String,default:""},popperClass:{type:String,default:""},shortcuts:{type:Array,default:void 0},validateEvent:{type:Boolean,default:!0},popperOptions:{type:Object,default:void 0},bgGrey:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},showShortcuts:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,change:e=>!0,blur:e=>!0,focus:e=>!0,clear:()=>!0,"visible-change":e=>!0},setup(e,{emit:n,expose:o}){const l=t.inject("elFormItem",null),r=t.ref(null),i=t.ref(null),a=t.computed({get(){return e.modelValue},set(v){n("update:modelValue",v)}}),s=v=>{var j;n("change",v),e.validateEvent&&l&&((j=l.validate)==null||j.call(l,"change"))},c=v=>{var j;n("blur",v),e.validateEvent&&l&&((j=l.validate)==null||j.call(l,"blur"))},d=v=>{n("focus",v)},g=()=>{n("clear")},u=v=>{n("visible-change",v)},w=t.computed(()=>{var v;return{...e.popperOptions,modifiers:[...((v=e.popperOptions)==null?void 0:v.modifiers)||[],{name:"computeStyles",options:{gpuAcceleration:!1,adaptive:!1}}]}}),z=t.computed(()=>{if(e.showShortcuts)return e.shortcuts?e.shortcuts:[{text:"本周",value:()=>{const v=new Date,j=v.getDay(),h=j===0?6:j-1,I=new Date(v);I.setDate(v.getDate()-h),I.setHours(0,0,0,0);const N=new Date(I);return N.setDate(I.getDate()+6),N.setHours(23,59,59,999),[I,N]}},{text:"本月",value:()=>{const v=new Date,j=new Date(v.getFullYear(),v.getMonth(),1),h=new Date(v.getFullYear(),v.getMonth()+1,0,23,59,59,999);return[j,h]}},{text:"本年度",value:()=>{const v=new Date,j=new Date(v.getFullYear(),0,1),h=new Date(v.getFullYear(),11,31,23,59,59,999);return[j,h]}}]});return o({get $el(){return r.value},focus:()=>{var j;const v=(j=r.value)==null?void 0:j.querySelector("input");v==null||v.focus()},blur:()=>{var j;const v=(j=r.value)==null?void 0:j.querySelector("input");v==null||v.blur()}}),{datePickerRef:r,elDatePickerRef:i,internalValue:a,computedPopperOptions:w,computedShortcuts:z,handleChange:s,handleBlur:c,handleFocus:d,handleClear:g,handleVisibleChange:u}}}),An="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096141'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096141)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M0.916748046875,6.33331298828125L0.916748046875,13.33331298828125Q0.916747986875,13.92012448828125,1.331683366875,14.33505438828125Q1.746613651875,14.74997998828125,2.333414736875,14.74997998828125L13.666748046875,14.74997998828125Q14.253557046875,14.74997998828125,14.668486046875,14.33505148828125Q15.083415046875,13.920122588281249,15.083415046875,13.33331298828125L15.083415046875,6.33331298828125Q15.083414046875,6.25944444528125,15.069003046875,6.18699526828125Q15.054592046875,6.11454610828125,15.026324046875,6.04630046828125Q14.998054046875,5.97805481828125,14.957016046875,5.91663536828125Q14.915977046875,5.85521590828125,14.863745046875,5.80298292828125Q14.811512046875,5.75075000828125,14.750092046875,5.70971083828125Q14.688672046875,5.66867166828125,14.620426046875,5.64040338828125Q14.552181046875,5.61213510828125,14.479732046875,5.59772407828125Q14.407283046875,5.58331298828125,14.333415046875,5.58331298828125L1.666748046875,5.58331298828125Q1.592879503875,5.58331298828125,1.520430326875,5.59772407828125Q1.447981166875,5.61213510828125,1.379735526875,5.64040338828125Q1.311489876875,5.66867166828125,1.250070426875,5.70971083828125Q1.188650966875,5.75075000828125,1.136417986875,5.80298292828125Q1.084185066875,5.85521590828125,1.043145896875,5.91663536828125Q1.0021067268750001,5.97805481828125,0.973838446875,6.04630046828125Q0.945570166875,6.11454610828125,0.931159136875,6.18699526828125Q0.916748046875,6.25944444528125,0.916748046875,6.33331298828125ZM2.416747986875,13.24997948828125L13.583415046875,13.24997948828125L13.583415046875,7.08331298828125L2.416748046875,7.08331298828125L2.416747986875,13.24997948828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M0.916748046875,2.99997967828125L0.916748046875,6.33331298828125Q0.916748046875,6.40718178828125,0.931159136875,6.47963048828125Q0.945570166875,6.55207968828125,0.973838446875,6.62032508828125Q1.0021067268750001,6.68857098828125,1.043145896875,6.74998998828125Q1.084185066875,6.81140998828125,1.136417986875,6.86364268828125Q1.188650966875,6.91587538828125,1.250070426875,6.95691488828125Q1.311489876875,6.99795388828125,1.379735526875,7.02622218828125Q1.447981166875,7.05449058828125,1.520430326875,7.06890198828125Q1.592879503875,7.08331298828125,1.666748046875,7.08331298828125L14.333415046875,7.08331298828125Q14.407283046875,7.08331298828125,14.479732046875,7.06890198828125Q14.552181046875,7.05449058828125,14.620426046875,7.02622218828125Q14.688671046875,6.99795388828125,14.750092046875,6.95691488828125Q14.811510046875,6.91587538828125,14.863744046875,6.86364268828125Q14.915976046875,6.81140998828125,14.957015046875,6.74998998828125Q14.998054046875,6.68857098828125,15.026323046875,6.62032508828125Q15.054592046875,6.55207968828125,15.069002046875,6.47963048828125Q15.083414046875,6.40718178828125,15.083415046875,6.33331298828125L15.083415046875,2.99997967828125Q15.083415046875,2.41317737128125,14.668489046875,1.9982476482812501Q14.253559046875,1.58331298828125,13.666748046875,1.58331298828125L2.333414736875,1.58331304828125Q1.746612101875,1.58331304828125,1.331680086875,1.9982450582812499Q0.916748046875,2.41317707328125,0.916748046875,2.99997967828125ZM2.416748046875,5.58331298828125L13.583415046875,5.58331298828125L13.583415046875,3.08331298828125L2.416748046875,3.08331304828125L2.416748046875,5.58331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M4.583401923125,1.33331298828125Q4.583401923125,1.2594592052812499,4.597810153125,1.18702450828125Q4.612218263125,1.11458980828125,4.640480873125,1.04635780828125Q4.668743493125,0.9781258082812501,4.709774493125,0.91671865828125Q4.7508054331250005,0.85531147828125,4.803027923125,0.80308895828125Q4.855250443125,0.75086646828125,4.916657623125,0.70983552828125Q4.978064773125,0.66880452828125,5.046296773125,0.64054190828125Q5.114528773125,0.61227929828125,5.186963473125,0.59787118828125Q5.259398170125,0.58346295828125,5.333251953125,0.58346295828125Q5.407105736125,0.58346295828125,5.479540433125,0.59787118828125Q5.551975133125,0.61227929828125,5.620207133125,0.64054190828125Q5.688439133125,0.66880452828125,5.749846283125,0.70983552828125Q5.811253463125,0.75086646828125,5.863475983125,0.80308895828125Q5.9156984731249995,0.85531147828125,5.956729413125,0.91671865828125Q5.997760413125,0.9781258082812501,6.026023033125,1.04635780828125Q6.054285643125,1.11458980828125,6.068693753125,1.18702450828125Q6.083101983125,1.2594592052812499,6.083101983125,1.33331298828125L6.083251953125,1.33331298828125L6.083251953125,3.99997968828125L6.083101983125,3.99997968828125Q6.083101983125,4.073833488281251,6.068693753125,4.146267888281249Q6.054285643125,4.2187027882812504,6.026023033125,4.28693458828125Q5.997760413125,4.3551663882812495,5.956729413125,4.41657378828125Q5.9156984731249995,4.47798088828125,5.863475983125,4.53020358828125Q5.811253463125,4.582426088281251,5.749846283125,4.62345698828125Q5.688439133125,4.664487888281251,5.620207133125,4.69275048828125Q5.551975133125,4.72101308828125,5.479540433125,4.73542118828125Q5.407105736125,4.74982948828125,5.333251953125,4.74982978828125Q5.259398170125,4.74982948828125,5.186963473125,4.73542118828125Q5.114528773125,4.72101278828125,5.046296773125,4.69275018828125Q4.978064773125,4.664487588281251,4.916657623125,4.62345668828125Q4.855250443125,4.582426088281251,4.803027923125,4.53020358828125Q4.7508054331250005,4.47798088828125,4.709774493125,4.41657348828125Q4.668743493125,4.3551663882812495,4.640480873125,4.286934388281249Q4.612218263125,4.21870258828125,4.597810153125,4.146267888281249Q4.583401923125,4.073833488281251,4.583401923125,3.99997968828125L4.583251953125,3.99997968828125L4.583251953125,1.33331298828125L4.583401923125,1.33331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M9.916898016875,1.33331298828125Q9.916898016875,1.2594592052812499,9.931306246875,1.18702450828125Q9.945714356875,1.11458980828125,9.973976966875,1.04635780828125Q10.002239586875,0.9781258082812501,10.043270586875,0.91671865828125Q10.084301526875,0.85531147828125,10.136524016875,0.80308895828125Q10.188746536875,0.75086646828125,10.250153716875,0.70983552828125Q10.311560866875,0.66880452828125,10.379792866875,0.64054190828125Q10.448024866875,0.61227929828125,10.520459566875,0.59787118828125Q10.592894263875,0.58346295828125,10.666748046875,0.58346295828125Q10.740601829875,0.58346295828125,10.813036526875,0.59787118828125Q10.885471226875,0.61227929828125,10.953703226875,0.64054190828125Q11.021935226875,0.66880452828125,11.083342376875,0.70983552828125Q11.144749556875,0.75086646828125,11.196972076875,0.80308895828125Q11.249194566875,0.85531147828125,11.290225506875,0.91671865828125Q11.331256506875,0.9781258082812501,11.359519126875,1.04635780828125Q11.387781736875,1.11458980828125,11.402189846875,1.18702450828125Q11.416598076875,1.2594592052812499,11.416598076875,1.33331298828125L11.416748046875,1.33331298828125L11.416748046875,3.99997968828125L11.416598076875,3.99997968828125Q11.416598076875,4.073833488281251,11.402189846875,4.146267888281249Q11.387781736875,4.2187027882812504,11.359519126875,4.28693458828125Q11.331256506875,4.3551663882812495,11.290225506875,4.41657378828125Q11.249194566875,4.47798088828125,11.196972076875,4.53020358828125Q11.144749556875,4.582426088281251,11.083342376875,4.62345698828125Q11.021935226875,4.664487888281251,10.953703226875,4.69275048828125Q10.885471226875,4.72101308828125,10.813036526875,4.73542118828125Q10.740601829875,4.74982948828125,10.666748046875,4.74982978828125Q10.592894263875,4.74982948828125,10.520459566875,4.73542118828125Q10.448024866875,4.72101278828125,10.379792866875,4.69275018828125Q10.311560866875,4.664487588281251,10.250153716875,4.62345668828125Q10.188746536875,4.582426088281251,10.136524016875,4.53020358828125Q10.084301526875,4.47798088828125,10.043270586875,4.41657348828125Q10.002239586875,4.3551663882812495,9.973976966875,4.286934388281249Q9.945714356875,4.21870258828125,9.931306246875,4.146267888281249Q9.916898016875,4.073833488281251,9.916898016875,3.99997968828125L9.916748046875,3.99997968828125L9.916748046875,1.33331298828125L9.916898016875,1.33331298828125Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",jn={class:"j-tw-date-picker__separator"};function Tn(e,n,o,l,r,i){const a=t.resolveComponent("el-date-picker");return t.openBlock(),t.createElementBlock("div",{ref:"datePickerRef",class:t.normalizeClass(["j-tw-date-picker",{"j-tw-date-picker--bg-grey":e.bgGrey,"j-tw-date-picker--dense":e.dense}])},[t.createVNode(a,{ref:"elDatePickerRef",modelValue:e.internalValue,"onUpdate:modelValue":n[0]||(n[0]=s=>e.internalValue=s),type:"daterange",format:e.format,"value-format":e.valueFormat,placeholder:e.placeholder,"start-placeholder":e.startPlaceholder,"end-placeholder":e.endPlaceholder,disabled:e.disable,readonly:e.readonly,clearable:e.clearable,"disabled-date":e.disabledDate,"default-value":e.defaultValue,"range-separator":e.rangeSeparator,"popper-class":`j-tw-date-picker__popper ${e.popperClass||""}`,"popper-options":e.computedPopperOptions,placement:e.placement,shortcuts:e.computedShortcuts,class:"j-tw-date-picker__input",onChange:e.handleChange,onBlur:e.handleBlur,onFocus:e.handleFocus,onClear:e.handleClear,onVisibleChange:e.handleVisibleChange},{"prefix-icon":t.withCtx(()=>[...n[1]||(n[1]=[t.createElementVNode("img",{src:An,alt:"calendar",class:"j-tw-date-picker__calendar-icon"},null,-1)])]),"range-separator":t.withCtx(()=>[t.createElementVNode("span",jn,t.toDisplayString(e.rangeSeparator),1)]),_:1},8,["modelValue","format","value-format","placeholder","start-placeholder","end-placeholder","disabled","readonly","clearable","disabled-date","default-value","range-separator","popper-class","popper-options","placement","shortcuts","onChange","onBlur","onFocus","onClear","onVisibleChange"])],2)}const bn=S(In,[["render",Tn]]),Ln=t.defineComponent({name:"JTWTable",components:{ElCheckbox:L.ElCheckbox,ElPagination:L.ElPagination},props:{rows:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},rowKey:{type:[String,Function],default:"id"},loading:{type:Boolean,default:!1},height:{type:[String,Number],default:void 0},pagination:{type:[Object,Boolean],default:!1},showIndex:{type:Boolean,default:!1},selection:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},emptyText:{type:String,default:"暂无数据"},bordered:{type:Boolean,default:!1},stripe:{type:Boolean,default:!1}},emits:{selectionChange:e=>!0,sortChange:e=>!0,sizeChange:e=>!0,currentChange:e=>!0,"update:pagination":e=>!0},setup(e,{emit:n,expose:o}){const l=t.ref(null),r=t.ref([]),i=(h,I)=>typeof e.rowKey=="function"?e.rowKey(h):h[e.rowKey]??I,a=h=>{const I={};return h.width&&(I.width=typeof h.width=="number"?`${h.width}px`:h.width),h.minWidth&&(I.minWidth=typeof h.minWidth=="number"?`${h.minWidth}px`:h.minWidth),h.width||(I.flex="1"),I},s=h=>r.value.some(I=>i(I,-1)===i(h,-1)),c=t.computed(()=>e.rows.length>0&&e.rows.every(h=>s(h))),d=t.computed(()=>{const h=e.rows.filter(I=>s(I)).length;return h>0&&h<e.rows.length}),g=h=>{r.value=h?[...e.rows]:[],n("selectionChange",r.value)},u=(h,I)=>{I?s(h)||r.value.push(h):r.value=r.value.filter(N=>i(N,-1)!==i(h,-1)),n("selectionChange",r.value)},w=h=>{n("sortChange",h)},z=()=>{const h=e.pagination;return h||null},O=h=>{n("sizeChange",h);const I=z();I&&n("update:pagination",{...I,pageSize:h,page:1})},B=h=>{n("currentChange",h);const I=z();I&&n("update:pagination",{...I,page:h})};return o({get $el(){return l.value},tableRef:l,clearSelection:()=>{r.value=[],n("selectionChange",[])},toggleRowSelection:(h,I)=>{const N=I??!s(h);u(h,N)}}),{tableRef:l,selectedRows:r,isAllSelected:c,isIndeterminate:d,isRowSelected:s,getRowKey:i,getColStyle:a,emptyText:e.emptyText,handleSelectAll:g,handleRowSelect:u,handleSortChange:w,handleSizeChange:O,handleCurrentChange:B}}}),Sn="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSI3MiIgaGVpZ2h0PSI3MiIgdmlld0JveD0iMCAwIDcyIDcyIj48ZGVmcz48bGluZWFyR3JhZGllbnQgeDE9IjAuNSIgeTE9IjAiIHgyPSIwLjUiIHkyPSIxIiBpZD0ibWFzdGVyX3N2ZzBfMjcwXzUzODIzIj48c3RvcCBvZmZzZXQ9IjAlIiBzdG9wLWNvbG9yPSIjODBBNkZGIiBzdG9wLW9wYWNpdHk9IjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxNjVERkYiIHN0b3Atb3BhY2l0eT0iMSIvPjwvbGluZWFyR3JhZGllbnQ+PGNsaXBQYXRoIGlkPSJiZ2JsdXJfbWFzdGVyX3N2ZzFfMTMxM18wOTQ3NzFfY2xpcF9wYXRoIj48cGF0aCBkP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zksMS43OTA4NjExLDcyLDQuMDAwMDAxLDcyTDY4LDcyQzcwLjIwOTEzNyw3Miw3Miw3MC4yMDkxMzksNzIsNjhMNzIsNTAuMDAwMDAwNUM3Miw0OC44OTU0MzA1Niw3MS4xMDQ1NjgsNDgsNzAsNDhMNTQsNDhDNTIuODk1NDMyLDQ4LDUyLjA0MDgyOSw0OC45NTE2NzQyMiw1MS41MDk4MDgsNDkuOTIwMjI0MUM1MC44MzAyNTQsNTEuMTU5NjgzMiw0OS41MTMyNiw1Miw0OCw1MkwyNCw1MlpNMjQsNTNRMjEuMDM4Mjk2LDUzLDE5LjYxMzMzNSw1MC40MDA5NzU5UTE4Ljg0NTIzLDQ4Ljk5OTk5OTg4LDE4LDQ4Ljk5OTk5OTg4TDIuMDAwMDAwNSw0OVEwLjk5OTk5OTg4LDQ5LDAuOTk5OTk5ODgsNTAuMDAwMDAwNUwxLDY4UTEsNjkuMjQyNjQwOTk5OTk5OTksMS44Nzg2Nzk2LDcwLjEyMTMyMVEyLjc1NzM2LDcxLDQuMDAwMDAxLDcxTDY4LDcxUTY5LjI0MjYzOCw3MSw3MC4xMjEzMjMsNzAuMTIxMzIxUTcxLDY5LjI0MjYzOCw3MSw2OEw3MSw1MC4wMDAwMDA1UTcxLDQ4Ljk5OTk5OTg4LDcwLDQ4Ljk5OTk5OTg4TDU0LDQ5UTUzLjE1NDc2Niw0OSw1Mi4zODY2NjUsNTAuNDAwOTczOFE1MC45NjE3LDUzLDQ4LDUzTDI0LDUzWiIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsPSJ1cmwoI21hc3Rlcl9zdmcyXzI3MF81MzgxNykiIGZpbGwtb3BhY2l0eT0iMSIvPjwvc3ZnPg==",zn={class:"j-tw-table__header"},En={key:0,class:"j-tw-table__header-cell j-tw-table__header-cell--selection"},Bn={key:1,class:"j-tw-table__header-cell",style:{width:"60px","flex-shrink":"0"}},xn={key:2,class:"j-tw-table__header-cell j-tw-table__header-cell--action"},On={class:"j-tw-table__body-wrapper"},Fn={key:0,class:"j-tw-table__body"},_n={key:0,class:"j-tw-table__cell j-tw-table__cell--selection"},$n={key:1,class:"j-tw-table__cell",style:{width:"60px","flex-shrink":"0"}},Vn={key:1},Pn={key:2,class:"j-tw-table__cell j-tw-table__cell--action"},Rn={key:1,class:"j-tw-table__empty"},Yn={class:"j-tw-table__empty-text"},Un={key:0,class:"j-tw-table__pagination"};function Wn(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-pagination"),c=t.resolveDirective("loading");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["j-tw-table",{"j-tw-table--dense":e.dense,"j-tw-table--fixed":e.height}]),style:t.normalizeStyle(e.height?{height:typeof e.height=="number"?`${e.height}px`:e.height}:{})},[t.renderSlot(e.$slots,"header"),t.createElementVNode("div",zn,[e.selection?(t.openBlock(),t.createElementBlock("div",En,[t.createVNode(a,{"model-value":e.isAllSelected,indeterminate:e.isIndeterminate,onChange:n[0]||(n[0]=d=>e.handleSelectAll(!!d))},null,8,["model-value","indeterminate"])])):t.createCommentVNode("",!0),e.showIndex?(t.openBlock(),t.createElementBlock("div",Bn," 序号 ")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,d=>(t.openBlock(),t.createElementBlock("div",{key:d.prop,class:"j-tw-table__header-cell",style:t.normalizeStyle(e.getColStyle(d))},t.toDisplayString(d.label),5))),128)),e.$slots.action?(t.openBlock(),t.createElementBlock("div",xn," 操作 ")):t.createCommentVNode("",!0)]),t.createElementVNode("div",On,[e.rows&&e.rows.length>0?(t.openBlock(),t.createElementBlock("div",Fn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.rows,(d,g)=>(t.openBlock(),t.createElementBlock("div",{key:e.getRowKey(d,g),class:t.normalizeClass(["j-tw-table__row",{"j-tw-table__row--selected":e.isRowSelected(d)}])},[e.selection?(t.openBlock(),t.createElementBlock("div",_n,[t.createVNode(a,{"model-value":e.isRowSelected(d),onChange:u=>e.handleRowSelect(d,!!u)},null,8,["model-value","onChange"])])):t.createCommentVNode("",!0),e.showIndex?(t.openBlock(),t.createElementBlock("div",$n,t.toDisplayString(g+1),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,u=>(t.openBlock(),t.createElementBlock("div",{key:u.prop,class:t.normalizeClass(["j-tw-table__cell",`j-tw-table__cell--align-${u.align||"left"}`]),style:t.normalizeStyle(e.getColStyle(u))},[u.type==="slot"?t.renderSlot(e.$slots,`col-${u.prop}`,{key:0,row:d,$index:g,column:u}):(t.openBlock(),t.createElementBlock("span",Vn,t.toDisplayString(d[u.prop]??"-"),1))],6))),128)),e.$slots.action?(t.openBlock(),t.createElementBlock("div",Pn,[t.renderSlot(e.$slots,"action",{row:d,$index:g})])):t.createCommentVNode("",!0)],2))),128))])):(t.openBlock(),t.createElementBlock("div",Rn,[t.renderSlot(e.$slots,"empty",{},()=>[n[1]||(n[1]=t.createElementVNode("img",{class:"j-tw-table__empty-img",src:Sn,alt:"no data"},null,-1)),t.createElementVNode("span",Yn,t.toDisplayString(e.emptyText),1)])]))]),e.pagination!==!1&&e.pagination?(t.openBlock(),t.createElementBlock("div",Un,[t.createVNode(s,{"pager-count":5,"page-sizes":e.pagination.pageSizes||[10,20,50,100],"current-page":e.pagination.page,"page-size":e.pagination.pageSize,total:e.pagination.total,layout:e.pagination.layout||"total, sizes, prev, pager, next, jumper",background:"",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange},null,8,["page-sizes","current-page","page-size","total","layout","onSizeChange","onCurrentChange"])])):t.createCommentVNode("",!0)],6)),[[c,e.loading]])}const Zn=S(Ln,[["render",Wn]]),Gn=t.defineComponent({name:"JTWMessageItem",props:{id:{type:String,required:!0},type:{type:String,default:"info"},content:{type:String,required:!0},duration:{type:Number,default:3e3},showClose:{type:Boolean,default:!0},offset:{type:Number,default:20},onClose:{type:Function,default:void 0}},emits:{destroy:e=>!0},setup(e,{emit:n}){const o=t.ref(!1);let l;const r=t.computed(()=>({"j-tw-message":!0,[`j-tw-message--${e.type}`]:!0})),i=t.computed(()=>({top:`${e.offset}px`})),a=()=>{e.duration>0&&(l=window.setTimeout(()=>{c()},e.duration))},s=()=>{l&&(clearTimeout(l),l=void 0)},c=()=>{var w;o.value=!1,(w=e.onClose)==null||w.call(e)},d=()=>{n("destroy",e.id)},g=()=>{s()},u=()=>{a()};return t.onMounted(()=>{o.value=!0,a()}),{visible:o,computedClass:r,computedStyle:i,handleClose:c,handleAfterLeave:d,handleMouseEnter:g,handleMouseLeave:u}}}),Jn={class:"j-tw-message__icon"},Hn={key:0,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Xn={key:1,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},Kn={key:2,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},qn={key:3,viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},eo={class:"j-tw-message__content"};function to(e,n,o,l,r,i){return t.openBlock(),t.createBlock(t.Transition,{name:"j-tw-message-fade",onAfterLeave:e.handleAfterLeave},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(e.computedClass),style:t.normalizeStyle(e.computedStyle),onMouseenter:n[1]||(n[1]=(...a)=>e.handleMouseEnter&&e.handleMouseEnter(...a)),onMouseleave:n[2]||(n[2]=(...a)=>e.handleMouseLeave&&e.handleMouseLeave(...a))},[t.createElementVNode("div",Jn,[e.type==="success"?(t.openBlock(),t.createElementBlock("svg",Hn,[...n[3]||(n[3]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"},null,-1)])])):e.type==="warning"?(t.openBlock(),t.createElementBlock("svg",Xn,[...n[4]||(n[4]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1)])])):e.type==="error"?(t.openBlock(),t.createElementBlock("svg",Kn,[...n[5]||(n[5]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"},null,-1)])])):(t.openBlock(),t.createElementBlock("svg",qn,[...n[6]||(n[6]=[t.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"},null,-1)])]))]),t.createElementVNode("div",eo,t.toDisplayString(e.content),1),e.showClose?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-message__close",onClick:n[0]||(n[0]=(...a)=>e.handleClose&&e.handleClose(...a))},[...n[7]||(n[7]=[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})],-1)])])):t.createCommentVNode("",!0)],38),[[t.vShow,e.visible]])]),_:1},8,["onAfterLeave"])}const no=S(Gn,[["render",to]]),G=t.ref([]),oo=t.defineComponent({name:"JTWMessages",components:{MessageItem:no},setup(){return{messages:G,handleDestroy:n=>{const o=G.value.findIndex(l=>l.id===n);o!==-1&&G.value.splice(o,1)}}}}),lo={class:"j-tw-message-container"};function ro(e,n,o,l,r,i){const a=t.resolveComponent("MessageItem");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createElementVNode("div",lo,[t.createVNode(t.TransitionGroup,{name:"j-tw-message-list"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.messages,s=>(t.openBlock(),t.createBlock(a,{key:s.id,id:s.id,type:s.type,content:s.content,duration:s.duration,"show-close":s.showClose,offset:s.offset,"on-close":s.onClose,onDestroy:e.handleDestroy},null,8,["id","type","content","duration","show-close","offset","on-close","onDestroy"]))),128))]),_:1})])])}const Be=S(oo,[["render",ro]]),me={WARN:"warn",INFO:"info",SUCCESS:"success",ERROR:"error"},io=t.defineComponent({name:"JTWConfirmDialog",components:{JTWBtn:oe},props:{visible:{type:Boolean,default:!1},message:{type:String,required:!0},icon:{type:String,default:me.WARN},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"}},emits:{confirm:()=>!0,cancel:()=>!0},setup(e,{emit:n}){const o=()=>{n("confirm")},l=()=>{n("cancel")},r=()=>{n("cancel")},i={warn:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><ellipse cx="10.001" cy="10" rx="8.333" ry="8.333" fill="#FF7D00"/><path d="M9.25,6 L9.25,11 Q9.25,11.75,10,11.75 Q10.75,11.75,10.75,11 L10.75,6 Q10.75,5.25,10,5.25 Q9.25,5.25,9.25,6 Z" fill="#FFFFFF"/><circle cx="10" cy="14" r="1" fill="#FFFFFF"/></svg>',info:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><ellipse cx="10" cy="10" rx="8" ry="8" fill="#165DFF"/><path d="M9.25,9 L9.25,14 Q9.25,14.75,10,14.75 Q10.75,14.75,10.75,14 L10.75,9 Q10.75,8.25,10,8.25 Q9.25,8.25,9.25,9 Z" fill="#FFFFFF"/><circle cx="10" cy="6.5" r="1" fill="#FFFFFF"/></svg>',success:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="#00B42A"/><path d="M6 10 L9 13 L14 7" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',error:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" version="1.1" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="8" fill="#F53F3F"/><path d="M7 7 L13 13 M13 7 L7 13" stroke="#FFFFFF" stroke-width="1.5" stroke-linecap="round"/></svg>'};return{iconSvg:t.computed(()=>i[e.icon??me.WARN]),handleConfirm:o,handleCancel:l,handleMaskClick:r}}}),ao={class:"j-tw-confirm-dialog__header"},so=["innerHTML"],co={class:"j-tw-confirm-dialog__message"},uo={class:"j-tw-confirm-dialog__footer"};function fo(e,n,o,l,r,i){const a=t.resolveComponent("JTWBtn");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"j-tw-confirm-dialog-fade"},{default:t.withCtx(()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-confirm-dialog__mask",onClick:n[1]||(n[1]=(...s)=>e.handleMaskClick&&e.handleMaskClick(...s))},[t.createElementVNode("div",{class:"j-tw-confirm-dialog__wrapper",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",ao,[t.createElementVNode("span",{class:"j-tw-confirm-dialog__icon",innerHTML:e.iconSvg},null,8,so),t.createElementVNode("span",co,t.toDisplayString(e.message),1)]),t.createElementVNode("div",uo,[t.createVNode(a,{label:e.cancelText||"取消",flat:"",onClick:e.handleCancel},null,8,["label","onClick"]),t.createVNode(a,{label:e.confirmText||"确定",onClick:e.handleConfirm},null,8,["label","onClick"])])])])):t.createCommentVNode("",!0)]),_:1})])}const xe=S(io,[["render",fo]]),Oe={CENTER:"center",RIGHT:"right"},Fe={SM:"sm",MD:"md",LG:"lg"},_e={BOTH:"both",CANCEL_ONLY:"cancel-only",CONFIRM_ONLY:"confirm-only"};var go={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const te=new Map;let U={};const ve={configure(e){U=e},async register(e){try{console.log("[jwDialog] 开始注册 dialog, props:",e);const n=e.dialogId||Math.random().toString(36).slice(2),o={...e,dialogId:n},l=t.ref(null),r=U.locale||go;console.log("[jwDialog] 创建 WrapperComponent...");const i={setup(){return{dialogRef:l}},render(){return t.h(L.ElConfigProvider,{locale:r},{default:()=>t.h($e,{...o,ref:d=>{console.log("[jwDialog] ref 回调被调用, el:",d),l.value=d}})})}};console.log("[jwDialog] 创建 Vue app...");const a=t.createApp(i);U.router&&a.use(U.router),U.store&&a.use(U.store),U.i18n&&a.use(U.i18n),U.plugins&&U.plugins.forEach(d=>a.use(d)),console.log("[jwDialog] 挂载 app...");const s=document.createElement("div");a.mount(s),console.log("[jwDialog] app 已挂载, mountEl:",s),await t.nextTick(),console.log("[jwDialog] nextTick 后, dialogRef.value:",l.value);const c=l.value;if(!c)throw new Error("dialogRef.value 为 null,组件可能没有正确挂载");return te.set(n,{app:a,appInstance:c}),t.nextTick(()=>{c&&(console.log("[jwDialog] 调用 appInstance.open()"),c.open())}),console.log("[jwDialog] 注册成功, 返回 appInstance"),c}catch(n){throw console.error("[jwDialog] 注册失败:",n),console.error("[jwDialog] 错误堆栈:",n instanceof Error?n.stack:"无堆栈信息"),n}},destroy(e){const n=te.get(e);if(n){try{const o=n.app._container;n.app.unmount(),o&&o.parentNode&&o.parentNode.removeChild(o)}catch{}te.delete(e)}},destroyAll(){te.forEach((e,n)=>{try{const o=e.app._container;e.app.unmount(),o&&o.parentNode&&o.parentNode.removeChild(o)}catch{}}),te.clear()}};async function po(e){return ve.register(e)}const mo=t.defineComponent({name:"JTWDialog",components:{JTWBtn:oe},props:{dialogId:{type:String},title:{type:String,default:""},position:{type:String,default:Oe.CENTER},size:{type:String,default:Fe.MD},showHeader:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},footerMode:{type:String,default:_e.BOTH},confirmText:{type:String,default:"确定"},cancelText:{type:String,default:"取消"},component:{default:null},componentBind:{type:Object,default:()=>({})},componentOn:{type:Object,default:()=>({})},closeOnMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0}},setup(e,{expose:n}){const o=t.ref(!1),l=t.ref(null),r=t.ref(null),i=t.ref(!1),a=t.ref(e.cancelText),s=t.ref(e.confirmText),c=t.computed(()=>e.position==="right"?"j-tw-dialog-slide-right":"j-tw-dialog-fade"),d=t.computed(()=>`j-tw-dialog__wrapper--${e.size}`),g=t.computed(()=>{var N;return{...e.componentBind,dialogInstance:{...((N=e.componentBind)==null?void 0:N.dialogInstance)||{},open:u,close:w,setLoading:z,changeCancelText:O,changeConfirmText:B}}}),u=()=>{o.value=!0,t.nextTick(()=>{var N;(N=l.value)==null||N.focus()})},w=()=>{o.value=!1},z=N=>{i.value=N},O=N=>{a.value=N},B=N=>{s.value=N},R=()=>{e.closeOnMask&&w()},v=()=>{e.closeOnEsc&&w()},j=()=>{const N=r.value;N!=null&&N.handleClickCancel?N.handleClickCancel():w()},h=()=>{const N=r.value;N!=null&&N.handleClickConfirm&&N.handleClickConfirm()},I=()=>{e.dialogId&&ve.destroy(e.dialogId)};return t.onErrorCaptured((N,H,m)=>(console.error("[JTWDialog] Component error captured:",N,m),!1)),n({open:u,close:w,setLoading:z,changeCancelText:O,changeConfirmText:B,loading:i}),{visible:o,maskRef:l,dynamicCompRef:r,loading:i,cancelText:a,confirmText:s,transitionName:c,sizeClass:d,computedComponentBind:g,open:u,close:w,setLoading:z,changeCancelText:O,changeConfirmText:B,handleMaskClick:R,handleEscKey:v,handleClickCancel:j,handleClickConfirm:h,handleAfterLeave:I}}}),wo={key:0,class:"j-tw-dialog__header"},ho={class:"j-tw-dialog__title"},yo={class:"j-tw-dialog__body"},Mo={class:"j-tw-dialog__error"},vo={style:{"font-size":"12px",color:"#999","margin-top":"8px"}},Do={key:2,class:"j-tw-dialog__loading"},Co={key:1,class:"j-tw-dialog__footer"};function No(e,n,o,l,r,i){const a=t.resolveComponent("JTWBtn");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:e.transitionName,onAfterLeave:e.handleAfterLeave},{default:t.withCtx(()=>[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["j-tw-dialog__mask",{"j-tw-dialog__mask--right":e.position==="right"}]),onClick:n[2]||(n[2]=(...s)=>e.handleMaskClick&&e.handleMaskClick(...s)),onKeydown:n[3]||(n[3]=t.withKeys((...s)=>e.handleEscKey&&e.handleEscKey(...s),["esc"])),tabindex:"-1",ref:"maskRef"},[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-dialog__wrapper",`j-tw-dialog__wrapper--${e.position}`,e.sizeClass]),onClick:n[1]||(n[1]=t.withModifiers(()=>{},["stop"]))},[e.showHeader?(t.openBlock(),t.createElementBlock("div",wo,[t.createElementVNode("span",ho,[t.renderSlot(e.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)])]),t.createElementVNode("button",{class:"j-tw-dialog__close",onClick:n[0]||(n[0]=(...s)=>e.close&&e.close(...s)),type:"button"},[...n[4]||(n[4]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.createElementVNode("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])])])):t.createCommentVNode("",!0),t.createElementVNode("div",yo,[e.component?(t.openBlock(),t.createBlock(t.Suspense,{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.component),t.mergeProps(e.computedComponentBind,t.toHandlers(e.componentOn||{}),{ref:"dynamicCompRef"}),null,16))]),fallback:t.withCtx(()=>[...n[5]||(n[5]=[t.createElementVNode("div",{class:"j-tw-dialog__loading"},[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",class:"j-tw-dialog__spinner"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-dasharray":"31.416","stroke-dashoffset":"10"})])],-1)])]),error:t.withCtx(({error:s})=>[t.createElementVNode("div",Mo,[n[6]||(n[6]=t.createElementVNode("p",null,"组件加载失败",-1)),t.createElementVNode("p",vo,t.toDisplayString((s==null?void 0:s.message)||"请刷新页面重试"),1)])]),_:1})):t.renderSlot(e.$slots,"default",{key:1}),e.loading?(t.openBlock(),t.createElementBlock("div",Do,[...n[7]||(n[7]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",class:"j-tw-dialog__spinner"},[t.createElementVNode("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-dasharray":"31.416","stroke-dashoffset":"10"})],-1)])])):t.createCommentVNode("",!0)]),e.showFooter?(t.openBlock(),t.createElementBlock("div",Co,[e.footerMode==="both"||e.footerMode==="cancel-only"?(t.openBlock(),t.createBlock(a,{key:0,label:e.cancelText||"取消",flat:"",onClick:e.handleClickCancel},null,8,["label","onClick"])):t.createCommentVNode("",!0),e.footerMode==="both"||e.footerMode==="confirm-only"?(t.openBlock(),t.createBlock(a,{key:1,label:e.confirmText||"确定",onClick:e.handleClickConfirm},null,8,["label","onClick"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2)],34)):t.createCommentVNode("",!0)]),_:3},8,["name","onAfterLeave"])])}const $e=S(mo,[["render",No]]),ko=t.defineComponent({name:"TreeNode",props:{node:{type:Object,required:!0},level:{type:Number,default:0},isLast:{type:Boolean,default:!1},expandedKeys:{type:Set,required:!0},innerValue:{type:[String,Number,Array],default:void 0},innerValues:{type:Set,required:!0},multiple:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},isNodeChecked:{type:Function,required:!0},isNodeIndeterminate:{type:Function,required:!0},isNodeSelected:{type:Function,required:!0},shouldShowCheckbox:{type:Function,required:!0},toggleExpand:{type:Function,required:!0},handleNodeClick:{type:Function,required:!0}}}),Qo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096239'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096239)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",Io="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096226'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096226)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%2386909C'%20fill-opacity='1'/%3e%3cpath%20d='M6,10.75L14,10.75L14,10.74985003Q14.0738535,10.74985003,14.1462879,10.7354418Q14.2187233,10.72103369,14.2869549,10.69277108Q14.3551865,10.66450846,14.4165936,10.62347746Q14.4780006,10.58244652,14.5302238,10.53022403Q14.5824451,10.47800151,14.623477,10.41659433Q14.6645069,10.35518718,14.69277,10.28695518Q14.7210331,10.21872318,14.7354412,10.14628848Q14.7498493,10.073853783,14.7498503,10Q14.7498493,9.926146217,14.7354412,9.85371152Q14.7210331,9.78127682,14.69277,9.71304482Q14.6645069,9.64481282,14.623477,9.58340567Q14.5824451,9.52199849,14.5302238,9.46977597Q14.4780006,9.41755348,14.4165936,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462879,9.2645582Q14.0738535,9.25014997,14,9.25014997L14,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0,1,-1,0,16.0009765625,-4.0009765625)'%3e%3cpath%20d='M10.0009765625,6.75L18.0009765625,6.75L18.0009765625,6.74985003Q18.0748300625,6.74985003,18.1472644625,6.7354418Q18.2196998625,6.72103369,18.287931462499998,6.69277108Q18.356163062500002,6.66450846,18.4175701625,6.62347746Q18.4789771625,6.5824465199999995,18.5312003625,6.53022403Q18.5834216625,6.47800151,18.6244535625,6.41659433Q18.6654834625,6.35518718,18.6937465625,6.28695518Q18.7220096625,6.21872318,18.7364177625,6.14628848Q18.7508258625,6.073853783,18.7508268625,6Q18.7508258625,5.926146217,18.7364177625,5.85371152Q18.7220096625,5.78127682,18.6937465625,5.71304482Q18.6654834625,5.64481282,18.6244535625,5.58340567Q18.5834216625,5.52199849,18.5312003625,5.46977597Q18.4789771625,5.4175534800000005,18.4175701625,5.37652254Q18.356163062500002,5.33549154,18.287931462499998,5.30722892Q18.2196998625,5.27896631,18.1472644625,5.2645582Q18.0748300625,5.25014997,18.0009765625,5.25014997L18.0009765625,5.25L10.0009765625,5.25L10.0009765625,5.25014997Q9.9271227795,5.25014997,9.8546880825,5.2645582Q9.7822533825,5.27896631,9.7140213825,5.30722892Q9.6457893825,5.33549154,9.5843822325,5.37652254Q9.5229750525,5.4175534800000005,9.4707525325,5.46977597Q9.4185300425,5.52199849,9.3774991025,5.58340567Q9.3364681025,5.64481282,9.3082054825,5.71304482Q9.2799428725,5.78127682,9.2655347625,5.85371152Q9.2511265325,5.926146217,9.2511265325,6Q9.2511265325,6.073853783,9.2655347625,6.14628848Q9.2799428725,6.21872318,9.3082054825,6.28695518Q9.3364681025,6.35518718,9.3774991025,6.41659433Q9.4185300425,6.47800151,9.4707525325,6.53022403Q9.5229750525,6.5824465199999995,9.5843822325,6.62347746Q9.6457893825,6.66450846,9.7140213825,6.69277108Q9.7822533825,6.72103369,9.8546880825,6.7354418Q9.9271227795,6.74985003,10.0009765625,6.74985003L10.0009765625,6.75Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Ao="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28192'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28192)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cpath%20d='M14.000001,9.25L6,9.25L6,9.25014997Q5.926146217,9.25014997,5.85371152,9.2645582Q5.78127682,9.27896631,5.71304482,9.30722892Q5.64481282,9.33549154,5.58340567,9.37652254Q5.52199849,9.41755348,5.46977597,9.46977597Q5.4175534800000005,9.52199849,5.37652254,9.58340567Q5.33549154,9.64481282,5.30722892,9.71304482Q5.27896631,9.78127682,5.2645582,9.85371152Q5.25014997,9.926146217,5.25014997,10Q5.25014997,10.073853783,5.2645582,10.14628848Q5.27896631,10.21872318,5.30722892,10.28695518Q5.33549154,10.35518718,5.37652254,10.41659433Q5.4175534800000005,10.47800151,5.46977597,10.53022403Q5.52199849,10.58244652,5.58340567,10.62347746Q5.64481282,10.66450846,5.71304482,10.69277108Q5.78127682,10.72103369,5.85371152,10.7354418Q5.926146217,10.74985003,6,10.74985003L6,10.75L14.000001,10.75L14.000001,10.74985003Q14.0738544,10.74985003,14.1462889,10.7354418Q14.2187233,10.72103369,14.2869558,10.69277108Q14.3551874,10.66450846,14.4165945,10.62347746Q14.4780016,10.58244652,14.5302248,10.53022403Q14.5824471,10.47800151,14.6234779,10.41659433Q14.6645088,10.35518718,14.6927719,10.28695518Q14.721035,10.21872318,14.7354431,10.14628848Q14.7498512,10.073853783,14.7498512,10Q14.7498512,9.926146217,14.7354431,9.85371152Q14.721035,9.78127682,14.6927719,9.71304482Q14.6645088,9.64481282,14.6234779,9.58340567Q14.5824471,9.52199849,14.5302248,9.46977597Q14.4780016,9.41755348,14.4165945,9.37652254Q14.3551865,9.33549154,14.2869549,9.30722892Q14.2187233,9.27896631,14.1462889,9.2645582Q14.0738544,9.25014997,14.000001,9.25014997L14.000001,9.25Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/svg%3e",jo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28187'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='21.5'%20height='21.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28187)'%3e%3crect%20x='2'%20y='2'%20width='16'%20height='16'%20rx='2'%20fill='%23165DFF'%20fill-opacity='1'/%3e%3cg%20transform='matrix(0.7071067690849304,-0.7071067690849304,0.7071067690849304,0.7071067690849304,-5.6776717531065515,7.121317610617552)'%3e%3cpath%20d='M5.007504706328125,10.414215087890625Q5.007504706328125,10.340361304890624,5.021912936328125,10.267926607890624Q5.036321046328125,10.195491907890625,5.064583656328125,10.127259907890625Q5.092846276328125,10.059027907890625,5.133877276328125,9.997620757890624Q5.1749082163281255,9.936213577890625,5.227130706328125,9.883991057890626Q5.279353226328125,9.831768567890625,5.340760406328125,9.790737627890625Q5.402167556328125,9.749706627890625,5.470399556328125,9.721444007890625Q5.538631556328125,9.693181397890624,5.611066256328125,9.678773287890625Q5.683500953328125,9.664365057890626,5.757354736328125,9.664365057890626Q5.831208519328125,9.664365057890626,5.903643216328125,9.678773287890625Q5.976077916328125,9.693181397890624,6.044309916328125,9.721444007890625Q6.112541916328125,9.749706627890625,6.173949066328125,9.790737627890625Q6.235356246328125,9.831768567890625,6.287578766328125,9.883991057890626Q6.3398012563281245,9.936213577890625,6.380832196328125,9.997620757890624Q6.421863196328125,10.059027907890625,6.450125816328125,10.127259907890625Q6.478388426328125,10.195491907890625,6.492796536328125,10.267926607890624Q6.507204766328125,10.340361304890624,6.507204766328125,10.414215087890625L6.507354676328125,10.414215087890625L6.507354676328125,13.664215587890626L13.757355736328124,13.664215587890626L13.757355736328124,13.664365487890624Q13.831209136328125,13.664365487890624,13.903643636328125,13.678773687890626Q13.976078036328126,13.693181487890625,14.044310536328124,13.721444087890625Q14.112542136328125,13.749706787890625,14.173949236328125,13.790737587890625Q14.235356336328126,13.831768487890624,14.287579536328124,13.883991287890625Q14.339801836328125,13.936213487890626,14.380832636328124,13.997620787890625Q14.421863536328125,14.059027687890625,14.450126636328125,14.127259687890625Q14.478389736328126,14.195491787890624,14.492797836328124,14.267926687890625Q14.507205936328125,14.340361587890625,14.507205936328125,14.414215587890624Q14.507205936328125,14.488069487890625,14.492797836328124,14.560503987890625Q14.478389736328126,14.632938387890626,14.450126636328125,14.701170487890625Q14.421863536328125,14.769402487890625,14.380832636328124,14.830809587890625Q14.339801836328125,14.892216687890624,14.287579536328124,14.944438887890625Q14.235356336328126,14.996661187890625,14.173949236328125,15.037692087890626Q14.112541236328125,15.078722987890625,14.044309636328125,15.106986087890625Q13.976078036328126,15.135248687890625,13.903643636328125,15.149657287890625Q13.831209136328125,15.164065387890625,13.757355736328124,15.164065387890625L13.757355736328124,15.164215587890624L5.757354736328125,15.164215587890624Q5.683486201328125,15.164215087890625,5.611037026328125,15.149804087890626Q5.538587866328125,15.135393187890624,5.470342216328125,15.107124787890626Q5.402096626328125,15.078856487890626,5.340677146328125,15.037817487890624Q5.279257716328125,14.996778487890625,5.227024736328125,14.944545787890625Q5.174791816328125,14.892312487890624,5.133752586328125,14.830892587890624Q5.092713476328125,14.769473087890624,5.0644451963281245,14.701227687890626Q5.036176916328125,14.632982287890625,5.021765886328125,14.560533087890626Q5.007354856328125,14.488083887890625,5.007354796328125,14.414215587890624L5.007354796328125,10.414215087890625L5.007504706328125,10.414215087890625Z'%20fill-rule='evenodd'%20fill='%23FFFFFF'%20fill-opacity='1'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",To="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_49_28023'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_49_28023)'%3e%3crect%20x='2.75'%20y='2.75'%20width='14.5'%20height='14.5'%20rx='1.25'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'/%3e%3c/g%3e%3c/svg%3e",bo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16385'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16385)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='5.833332061767578'%20ry='5.833332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23165DFF'%20fill='none'%20stroke-width='5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Lo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_37_16369'%3e%3crect%20x='0'%20y='0'%20width='20'%20height='20'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_37_16369)'%3e%3cellipse%20cx='10.003253936767578'%20cy='10.000812530517578'%20rx='7.583332061767578'%20ry='7.583332061767578'%20fill-opacity='0'%20stroke-opacity='1'%20stroke='%23C9CDD4'%20fill='none'%20stroke-width='1.5'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",So={key:0,src:Qo,alt:"collapse",class:"j-tw-tree-select__expand-icon"},zo={key:1,src:Io,alt:"expand",class:"j-tw-tree-select__expand-icon"},Eo={key:2,class:"j-tw-tree-select__expand-placeholder"},Bo={key:3,class:"j-tw-tree-select__checkbox"},xo={key:0,src:Ao,alt:"indeterminate",class:"j-tw-tree-select__checkbox-icon"},Oo={key:1,src:jo,alt:"checked",class:"j-tw-tree-select__checkbox-icon"},Fo={key:2,src:To,alt:"unchecked",class:"j-tw-tree-select__checkbox-icon"},_o={key:0,src:bo,alt:"selected",class:"j-tw-tree-select__checkbox-icon"},$o={key:1,src:Lo,alt:"unselected",class:"j-tw-tree-select__checkbox-icon"},Vo={class:"j-tw-tree-select__node-label"},Po={key:4,class:"j-tw-tree-select__node-count"};function Ro(e,n,o,l,r,i){const a=t.resolveComponent("TreeNode",!0);return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass(["j-tw-tree-select__node",{"j-tw-tree-select__node--disabled":e.node.disabled},{"j-tw-tree-select__node--selected":e.isNodeSelected(e.node.value)},{"j-tw-tree-select__node--last":e.isLast}]),style:t.normalizeStyle({paddingLeft:`${16+e.level*28}px`,position:"relative"}),onClick:n[1]||(n[1]=s=>e.handleNodeClick(e.node))},[e.level>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"j-tw-tree-select__node-line",style:t.normalizeStyle({left:`${16+(e.level-1)*28+10}px`})},null,4)):t.createCommentVNode("",!0),e.node.children&&e.node.children.length>0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"j-tw-tree-select__expand-btn",onClick:n[0]||(n[0]=t.withModifiers(s=>e.toggleExpand(e.node.value),["stop"]))},[e.expandedKeys.has(e.node.value)?(t.openBlock(),t.createElementBlock("img",So)):(t.openBlock(),t.createElementBlock("img",zo))])):(t.openBlock(),t.createElementBlock("div",Eo)),e.shouldShowCheckbox(e.node)?(t.openBlock(),t.createElementBlock("div",Bo,[e.multiple?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.isNodeIndeterminate(e.node)?(t.openBlock(),t.createElementBlock("img",xo)):e.isNodeChecked(e.node.value)?(t.openBlock(),t.createElementBlock("img",Oo)):(t.openBlock(),t.createElementBlock("img",Fo))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.innerValue===e.node.value?(t.openBlock(),t.createElementBlock("img",_o)):(t.openBlock(),t.createElementBlock("img",$o))],64))])):t.createCommentVNode("",!0),t.createElementVNode("span",Vo,[t.renderSlot(e.$slots,"default",{node:e.node},()=>[t.createTextVNode(t.toDisplayString(e.node.label),1)])]),e.node.count?(t.openBlock(),t.createElementBlock("span",Po,t.toDisplayString(e.node.count),1)):t.createCommentVNode("",!0)],6),e.node.children&&e.node.children.length>0&&e.expandedKeys.has(e.node.value)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.node.children,(s,c)=>(t.openBlock(),t.createBlock(a,{key:s.value,node:s,level:e.level+1,"is-last":c===e.node.children.length-1,"expanded-keys":e.expandedKeys,"inner-value":e.innerValue,"inner-values":e.innerValues,multiple:e.multiple,"check-strictly":e.checkStrictly,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"should-show-checkbox":e.shouldShowCheckbox,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:d})=>[t.renderSlot(e.$slots,"default",{node:d},()=>[t.createTextVNode(t.toDisplayString(d.label),1)])]),_:3},8,["node","level","is-last","expanded-keys","inner-value","inner-values","multiple","check-strictly","is-node-checked","is-node-indeterminate","is-node-selected","should-show-checkbox","toggle-expand","handle-node-click"]))),128)):t.createCommentVNode("",!0)],64)}const Yo=S(ko,[["render",Ro]]),Uo=t.defineComponent({name:"JTWTreeSelect",components:{TreeNode:Yo,JTWStatusImg:ce},props:{data:{type:Array,default:()=>[]},modelValue:{type:[String,Number,Array],default:void 0},searchPlaceholder:{type:String,default:"请输入关键词搜索"},accordion:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},checkStrictly:{type:Boolean,default:!1},maxHeight:{type:Number,default:void 0},externalSearchText:{type:String,default:""},bordered:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},validateEvent:{type:Boolean,default:!0},defaultExpandFirst:{type:Boolean,default:!1}},emits:{"update:modelValue":e=>!0,change:(e,n)=>!0,blur:e=>!0},setup(e,{emit:n,expose:o}){const l=t.inject("elFormItem",null),r=t.ref(null),i=t.ref(""),a=t.ref(new Set),s=t.ref(e.modelValue),c=t.ref(new Set);e.defaultExpandFirst&&e.data.length>0&&a.value.add(e.data[0].value),t.watch(()=>e.data,m=>{e.defaultExpandFirst&&m.length>0&&a.value.size===0&&a.value.add(m[0].value)},{immediate:!0}),t.watch(()=>e.modelValue,m=>{s.value=m,e.multiple&&Array.isArray(m)&&(c.value=new Set(m))},{immediate:!0});const d=(m,A)=>{for(const y of m){if(y.value===A)return y;if(y.children){const Q=d(y.children,A);if(Q)return Q}}return null},g=m=>{if(!m.children||m.children.length===0)return[];const A=[];for(const y of m.children)A.push(y.value),A.push(...g(y));return A},u=(m,A)=>{for(const y of m)if(y.children){if(y.children.some(x=>x.value===A))return y;const Q=u(y.children,A);if(Q)return Q}return null},w=m=>{const A=u(e.data,m);return A&&A.children?A.children.map(y=>y.value).filter(y=>y!==m):e.data.map(y=>y.value).filter(y=>y!==m)},z=m=>{if(!e.checkStrictly)return;const A=u(e.data,m);A&&A.children&&(A.children.every(Q=>c.value.has(Q.value))?c.value.add(A.value):c.value.delete(A.value),z(A.value))},O=m=>e.multiple?c.value.has(m):s.value===m,B=m=>{if(!e.multiple||!m.children||m.children.length===0||!e.checkStrictly)return!1;const A=m.children.map(Q=>Q.value),y=A.filter(Q=>c.value.has(Q)).length;return y>0&&y<A.length},R=m=>e.multiple?c.value.has(m):s.value===m,v=m=>e.checkStrictly?!0:!m.children||m.children.length===0,j=(m,A)=>{if(!A)return m;const y=[];for(const Q of m){const x=Q.label.toLowerCase().includes(A.toLowerCase()),F=Q.children?j(Q.children,A):[];(x||F.length>0)&&(y.push({...Q,children:F.length>0?F:Q.children}),F.length>0&&a.value.add(Q.value))}return y},h=t.computed(()=>{const m=e.externalSearchText||i.value;return j(e.data,m)});t.watch(()=>e.externalSearchText,m=>{m!=null&&(i.value="")});const I=m=>{a.value.has(m)?a.value.delete(m):(e.accordion&&w(m).forEach(y=>{a.value.delete(y)}),a.value.add(m))},N=m=>{var A,y;if(!m.disabled){if(!e.checkStrictly&&m.children&&m.children.length>0){I(m.value);return}if(e.multiple){const Q=c.value.has(m.value),x=g(m);Q?(c.value.delete(m.value),e.checkStrictly&&x.forEach(V=>c.value.delete(V))):(c.value.add(m.value),e.checkStrictly&&x.forEach(V=>c.value.add(V))),e.checkStrictly&&z(m.value);const F=Array.from(c.value),$=F.map(V=>d(e.data,V)).filter(V=>V!==null);n("update:modelValue",F),n("change",F,$.length>0?$:null),e.validateEvent&&l&&((A=l.validate)==null||A.call(l,"change"))}else if(s.value!==m.value){s.value=m.value;const Q=d(e.data,m.value);n("update:modelValue",m.value),n("change",m.value,Q),e.validateEvent&&l&&((y=l.validate)==null||y.call(l,"change"))}}};return o({get $el(){return r.value}}),{treeSelectRef:r,searchText:i,expandedKeys:a,innerValue:s,innerValues:c,filteredData:h,toggleExpand:I,handleNodeClick:N,isNodeChecked:O,isNodeIndeterminate:B,isNodeSelected:R,shouldShowCheckbox:v}}}),Wo="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cclipPath%20id='master_svg0_1313_096320'%3e%3crect%20x='-0.75'%20y='-0.75'%20width='17.5'%20height='17.5'%20rx='0'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23master_svg0_1313_096320)'%3e%3crect%20x='0'%20y='0'%20width='16'%20height='16'%20rx='0'%20fill='%23FFFFFF'%20fill-opacity='0'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M2.4624112125,2.46289949375Q0.5830078725,4.34230259375,0.5830078125,7.00016309375Q0.5830078125,9.65802379375,2.4624112125,11.53742709375Q4.3418138125,13.41682909375,6.9996748125,13.41682909375Q9.6575346125,13.41682909375,11.5369388125,11.53742709375Q13.4163408125,9.65802479375,13.4163408125,7.00016589375Q13.4163408125,4.34230329375,11.5369388125,2.46289959375Q9.6575355125,0.58349603375,6.9996776125,0.58349609375Q4.3418143125,0.58349609375,2.4624112125,2.46289949375ZM3.5230715125,10.47676659375Q2.0830078125,9.03670259375,2.0830078125,7.00016309375Q2.0830077525,4.96362349375,3.5230715125,3.52355979375Q4.9631350125,2.08349609375,6.9996776125,2.08349609375Q9.0362158125,2.08349633375,10.4762783125,3.52355959375Q11.9163418125,4.96362349375,11.9163418125,7.00016589375Q11.9163418125,9.03670409375,10.4762783125,10.47676659375Q9.0362143125,11.91683009375,6.9996748125,11.91683009375Q4.9631345125,11.91683009375,3.5230715125,10.47676659375Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3cpath%20d='M10.5430181575,11.60395449875Q10.4375500675,11.49848639875,10.3804711075,11.36068564875Q10.3233921575,11.22288490875,10.3233921575,11.07373046875Q10.3233921575,10.99987668575,10.3378003875,10.92744198875Q10.3522084975,10.85500728875,10.3804711075,10.78677528875Q10.4087337275,10.71854328875,10.4497647275,10.65713613875Q10.4907956675,10.59572895875,10.5430181575,10.54350643875Q10.5952406775,10.49128394875,10.6566478575,10.45025300875Q10.7180550075,10.40922200875,10.7862870075,10.38095938875Q10.8545190075,10.35269677875,10.9269537075,10.33828866875Q10.9993884045,10.32388043875,11.0732421875,10.32388043875Q11.2223966275,10.32388043875,11.3601973675,10.38095932875Q11.4979981175,10.43803834875,11.6034662175,10.54350643875L11.6035722475,10.54340040875L14.432004687500001,13.37183306875L14.4318987875,13.37193896875Q14.5373668875,13.47740696875,14.5944459875,13.61520766875Q14.6515249875,13.75300856875,14.6515249875,13.90216326875Q14.6515247875,13.97601696875,14.6371163875,14.04845166875Q14.6227082875,14.12088636875,14.5944456875,14.18911816875Q14.5661830875,14.25735016875,14.5251521875,14.31875726875Q14.484121287499999,14.38016466875,14.4318987875,14.43238706875Q14.3796763875,14.484609568749999,14.3182692875,14.52564046875Q14.2568618875,14.56667136875,14.1886298875,14.59493396875Q14.1203980875,14.62319656875,14.0479633875,14.63760466875Q13.9755286875,14.65201306875,13.9016749875,14.65201326875Q13.7525202875,14.65201326875,13.6147193875,14.59493426875Q13.4769186875,14.53785516875,13.3714506875,14.43238706875L13.3713447875,14.432492968750001L10.5429121275,11.60406052875L10.5430181575,11.60395449875Z'%20fill-rule='evenodd'%20fill='%234E5969'%20fill-opacity='1'%20style='mix-blend-mode:passthrough'/%3e%3c/g%3e%3c/svg%3e",Zo={key:0,class:"j-tw-tree-select__search"},Go=["placeholder"],Jo={key:0,class:"j-tw-tree-select__empty"};function Ho(e,n,o,l,r,i){const a=t.resolveComponent("JTWStatusImg"),s=t.resolveComponent("TreeNode");return t.openBlock(),t.createElementBlock("div",{ref:"treeSelectRef",class:t.normalizeClass(["j-tw-tree-select",{"j-tw-tree-select--borderless":!e.bordered,"j-tw-tree-select--no-search":!e.showSearch}])},[e.showSearch?(t.openBlock(),t.createElementBlock("div",Zo,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>e.searchText=c),type:"text",class:"j-tw-tree-select__search-input",placeholder:e.searchPlaceholder},null,8,Go),[[t.vModelText,e.searchText]]),n[1]||(n[1]=t.createElementVNode("img",{src:Wo,alt:"search",class:"j-tw-tree-select__search-icon"},null,-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"j-tw-tree-select__tree",style:t.normalizeStyle({maxHeight:e.maxHeight?`${e.maxHeight}px`:"none"})},[e.filteredData.length===0?(t.openBlock(),t.createElementBlock("div",Jo,[t.createVNode(a,{width:32,height:32}),n[2]||(n[2]=t.createElementVNode("p",{class:"j-tw-tree-select__empty-text"},"暂无数据",-1))])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredData,c=>(t.openBlock(),t.createBlock(s,{key:c.value,node:c,level:0,"expanded-keys":e.expandedKeys,"inner-value":e.innerValue,"inner-values":e.innerValues,multiple:e.multiple,"check-strictly":e.checkStrictly,"is-node-checked":e.isNodeChecked,"is-node-indeterminate":e.isNodeIndeterminate,"is-node-selected":e.isNodeSelected,"should-show-checkbox":e.shouldShowCheckbox,"toggle-expand":e.toggleExpand,"handle-node-click":e.handleNodeClick},{default:t.withCtx(({node:d})=>[t.renderSlot(e.$slots,"default",{node:d},()=>[t.createTextVNode(t.toDisplayString(d.label),1)])]),_:3},8,["node","expanded-keys","inner-value","inner-values","multiple","check-strictly","is-node-checked","is-node-indeterminate","is-node-selected","should-show-checkbox","toggle-expand","handle-node-click"]))),128))],4)],2)}const Xo=S(Uo,[["render",Ho]]),Ko=t.defineComponent({name:"JTWFormLabel",props:{label:{type:String},labelClass:{type:[String,Object,Array]},valueClass:{type:[String,Object,Array]},vertical:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},slots:Object,setup(e,{slots:n}){const o=t.computed(()=>{const r=!!e.label||!!n.label;return e.horizontal?!0:r});return{directionClass:t.computed(()=>e.vertical?"form-label--vertical":e.horizontal?"form-label--horizontal":"form-label--vertical"),showLabel:o,slots:n}}}),qo={class:"label-content"},e2={class:"form-content"},t2={class:"form-value__inner"},n2={class:"form-item-detail-wrapper"};function o2(e,n,o,l,r,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["j-tw-form-label",[e.directionClass,{required:e.required}]])},[e.showLabel?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-label",[e.labelClass,{required:e.required}]])},[t.createElementVNode("div",qo,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),t.renderSlot(e.$slots,"label-hint")])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",e2,[t.createElementVNode("div",{class:t.normalizeClass(["form-value",e.valueClass])},[t.createElementVNode("div",t2,[t.renderSlot(e.$slots,"default")])],2),t.createElementVNode("div",n2,[t.renderSlot(e.$slots,"form-item-detail")])])],2)}const l2=S(Ko,[["render",o2]]),r2=t.defineComponent({name:"JTWForm",components:{ElForm:L.ElForm},inheritAttrs:!1,setup(e,{expose:n}){const o=t.ref(null);return n({validate:(...r)=>o.value.validate(...r),validateField:(...r)=>o.value.validateField(...r),resetFields:(...r)=>o.value.resetFields(...r),scrollToField:(...r)=>o.value.scrollToField(...r),clearValidate:(...r)=>o.value.clearValidate(...r)}),{elFormRef:o}}});function i2(e,n,o,l,r,i){const a=t.resolveComponent("el-form");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elFormRef"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const a2=S(r2,[["render",i2]]),s2=t.defineComponent({name:"JTWFormItem",components:{ElFormItem:L.ElFormItem},inheritAttrs:!1,setup(e,{expose:n}){const o=t.ref(null);return n({get size(){var r;return((r=o.value)==null?void 0:r.size)||""},get validateMessage(){var r;return((r=o.value)==null?void 0:r.validateMessage)||""},get validateState(){var r;return((r=o.value)==null?void 0:r.validateState)||""},validate:(...r)=>o.value.validate(...r),clearValidate:()=>o.value.clearValidate(),resetField:()=>o.value.resetField()}),{elFormItemRef:o}}});function c2(e,n,o,l,r,i){const a=t.resolveComponent("el-form-item");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elFormItemRef"},e.$attrs),t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.label?{name:"label",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"label")]),key:"0"}:void 0,e.$slots.error?{name:"error",fn:t.withCtx(({error:s})=>[t.renderSlot(e.$slots,"error",{error:s})]),key:"1"}:void 0]),1040)}const d2=S(s2,[["render",c2]]),u2=t.defineComponent({name:"JTWInput",components:{ElInput:L.ElInput},inheritAttrs:!1,props:{bgGrey:{type:Boolean,default:!0}},setup(e,{expose:n}){const o=t.ref(null);return n({get input(){var r;return(r=o.value)==null?void 0:r.input},get textareaStyle(){var r;return(r=o.value)==null?void 0:r.textareaStyle},focus:()=>{var r;return(r=o.value)==null?void 0:r.focus()},blur:()=>{var r;return(r=o.value)==null?void 0:r.blur()},select:()=>{var r;return(r=o.value)==null?void 0:r.select()},clear:()=>{var r;return(r=o.value)==null?void 0:r.clear()},resizeTextarea:()=>{var r;return(r=o.value)==null?void 0:r.resizeTextarea()}}),{elInputRef:o}}});function f2(e,n,o,l,r,i){const a=t.resolveComponent("el-input");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elInputRef",class:["tw-input",{"tw-input--bg-grey":e.bgGrey}]},e.$attrs),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["class"])}const g2=S(u2,[["render",f2]]),p2=t.defineComponent({name:"JTWSelect",components:{ElSelect:L.ElSelect,ElOption:L.ElOption},inheritAttrs:!1,props:{bgGrey:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"label",value:"value"})}},setup(e,{expose:n,attrs:o}){const l=t.ref(null),r=t.ref(!1),i=t.computed(()=>{var g;return((g=e.props)==null?void 0:g.label)||"label"}),a=t.computed(()=>{var g;return((g=e.props)==null?void 0:g.value)||"value"}),s=t.computed(()=>o.multiple!==void 0&&o.multiple!==!1),c=g=>{r.value=g};return n({focus:()=>{var g;return(g=l.value)==null?void 0:g.focus()},blur:()=>{var g;return(g=l.value)==null?void 0:g.blur()}}),{elSelectRef:l,dropdownVisible:r,labelKey:i,valueKey:a,isMultiple:s,handleVisibleChange:c}}});function m2(e,n,o,l,r,i){const a=t.resolveComponent("el-option"),s=t.resolveComponent("el-select");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elSelectRef",class:["tw-select",{"tw-select--bg-grey":e.bgGrey,"tw-select--open":e.dropdownVisible,"tw-select--multiple":e.isMultiple}],"popper-class":"tw-select-popper"},e.$attrs,{onVisibleChange:e.handleVisibleChange}),t.createSlots({default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:c[e.valueKey],label:c[e.labelKey],value:c[e.valueKey],disabled:c.disabled},null,8,["label","value","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.empty?{name:"empty",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"empty")]),key:"1"}:void 0,e.$slots.header?{name:"header",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"header")]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"footer")]),key:"3"}:void 0]),1040,["class","onVisibleChange"])}const w2=S(p2,[["render",m2]]),h2=t.defineComponent({name:"JTWCheckbox",components:{ElCheckbox:L.ElCheckbox},inheritAttrs:!1,setup(){return{}}});function y2(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elCheckboxRef",class:"j-tw-checkbox"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const M2=S(h2,[["render",y2]]),v2=t.defineComponent({name:"JTWCheckboxGroup",components:{ElCheckboxGroup:L.ElCheckboxGroup,ElCheckbox:L.ElCheckbox},inheritAttrs:!1,props:{options:{type:Array,default:void 0}},setup(){return{}}});function D2(e,n,o,l,r,i){const a=t.resolveComponent("el-checkbox"),s=t.resolveComponent("el-checkbox-group");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elCheckboxGroupRef",class:"j-tw-checkbox-group"},e.$attrs),{default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:String(c.value),label:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["label","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:3},16)}const C2=S(v2,[["render",D2]]),N2=t.defineComponent({name:"JTWRadio",components:{ElRadio:L.ElRadio},inheritAttrs:!1,setup(){return{}}});function k2(e,n,o,l,r,i){const a=t.resolveComponent("el-radio");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"elRadioRef",class:"j-tw-radio"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const Q2=S(N2,[["render",k2]]),I2=t.defineComponent({name:"JTWRadioGroup",components:{ElRadioGroup:L.ElRadioGroup,ElRadio:L.ElRadio},inheritAttrs:!1,props:{options:{type:Array,default:void 0}},setup(){return{}}});function A2(e,n,o,l,r,i){const a=t.resolveComponent("el-radio"),s=t.resolveComponent("el-radio-group");return t.openBlock(),t.createBlock(s,t.mergeProps({ref:"elRadioGroupRef",class:"j-tw-radio-group"},e.$attrs),{default:t.withCtx(()=>[e.options&&e.options.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.options,c=>(t.openBlock(),t.createBlock(a,{key:String(c.value),label:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["label","disabled"]))),128)):t.renderSlot(e.$slots,"default",{key:1})]),_:3},16)}const j2=S(I2,[["render",A2]]);let Te=!1,T2=0;function b2(){return`j-tw-message-${Date.now()}-${++T2}`}function L2(){if(Te)return;Te=!0;const e=document.createElement("div");document.body.appendChild(e),t.createApp(Be).mount(e)}function ne(e){L2();const n=b2(),r=(e.offset??20)+G.value.length*56,i={id:n,type:e.type??"info",content:e.content,duration:e.duration??3e3,showClose:e.showClose??!0,offset:r,onClose:e.onClose,visible:!0};return G.value.push(i),{id:n,close:()=>{const a=G.value.findIndex(s=>s.id===n);a!==-1&&(G.value[a].visible=!1)}}}const Ve={show(e){return ne(e)},success(e,n){return ne({type:"success",content:e,duration:n})},warning(e,n){return ne({type:"warning",content:e,duration:n})},info(e,n){return ne({type:"info",content:e,duration:n})},error(e,n){return ne({type:"error",content:e,duration:n})},closeAll(){G.value.forEach(e=>{e.visible=!1})}};function Pe(e){return new Promise(n=>{const o=t.ref(!1),l=document.createElement("div");document.body.appendChild(l);const r=()=>{d.unmount(),document.body.contains(l)&&document.body.removeChild(l)},i=g=>{o.value=!1,setTimeout(r,250),n(g)},a=()=>i(!0),s=()=>i(!1),c=t.defineComponent({setup(){return()=>t.h(xe,{visible:o.value,message:e.message,icon:e.icon,confirmText:e.confirmText,cancelText:e.cancelText,onConfirm:a,onCancel:s})}}),d=t.createApp(c);d.mount(l),t.nextTick(()=>{o.value=!0})})}const S2="#165DFF",z2="#000000",E2="#FFFFFF",B2="#00B42A",x2="#FF7D00",O2="#F53F3F",F2="#14C9C9",_2="#D97706",$2="#F7BA1E",V2="#3491FA",P2="#722ED1",R2="#9FDB1D",Y2="#F5319D",U2="#F77EBE",be={primary:S2,"primary-1":"#0E42D2","primary-2":"#165DFF","primary-3":"#4080FF","primary-4":"#6AA1FF","primary-5":"#94BFFF","primary-6":"#BEDAFF","grey-1":"#1D2129","grey-2":"#4E5969","grey-3":"#86909C","grey-3-50":"#A8ABB2","grey-4":"#C9CDD4","grey-5":"#E5E6EB","grey-6":"#F2F3F5",black:z2,white:E2,green:B2,"green-1":"#00875A","green-2":"#00B42A","green-3":"#23C343","green-4":"#4CD263","green-5":"#7BE188","green-6":"#AFF0B5",orange:x2,"orange-1":"#D25F00","orange-2":"#FF7D00","orange-3":"#FF9A2E","orange-4":"#FFB65D","orange-5":"#FFCF8B","orange-6":"#FFE4BA",red:O2,"red-1":"#CB2634","red-2":"#F53F3F","red-3":"#F76560","red-4":"#F98981","red-5":"#FDACA7","red-6":"#FFCCC7",cyan:F2,"cyan-1":"#0DA5AA","cyan-2":"#14C9C9","cyan-3":"#37D4CF","cyan-4":"#5ADFD7","cyan-5":"#87E8DD","cyan-6":"#B2F1E8",brown:_2,"brown-1":"#B35C00","brown-2":"#D97706","brown-3":"#E89A3C","brown-4":"#F3B765","brown-5":"#F9D28F","brown-6":"#FDEAB8",yellow:$2,"yellow-1":"#D48806","yellow-2":"#F7BA1E","yellow-3":"#FADC19","yellow-4":"#FCEE21","yellow-5":"#FEF65B","yellow-6":"#FFFB8F",blue:V2,"blue-1":"#146AFF","blue-2":"#3491FA","blue-3":"#57A3F7","blue-4":"#79BBF8","blue-5":"#A8D3FB","blue-6":"#C7E2FD",purple:P2,"purple-1":"#551DB1","purple-2":"#722ED1","purple-3":"#8E51DA","purple-4":"#A871E3","purple-5":"#C396ED","purple-6":"#DDBEF6",lime:R2,"lime-1":"#7BC616","lime-2":"#9FDB1D","lime-3":"#B4E04B","lime-4":"#C8E672","lime-5":"#DCEC9A","lime-6":"#EFF4C6",magenta:Y2,"magenta-1":"#CB247A","magenta-2":"#F5319D","magenta-3":"#F754B0","magenta-4":"#F975C2","magenta-5":"#FB9DD1","magenta-6":"#FDC5E3",pink:U2,"pink-1":"#D6549D","pink-2":"#F77EBE","pink-3":"#F99AC8","pink-4":"#FAB4D4","pink-5":"#FCCEE0","pink-6":"#FEE7EF"},W2=async e=>(await{"zh-CN":()=>Promise.resolve().then(()=>require("./index-C5mRo5Yi.cjs")),"en-US":()=>Promise.resolve().then(()=>require("./index-BrYPwI7i.cjs"))}[e]()).default,pe={},Z2=async e=>(pe[e]||(pe[e]=await W2(e)),pe[e]),De=t.ref("zh-CN"),we=t.ref(null);function G2(e,n){const o=n.split(".");let l=e;for(const r of o)if(l&&typeof l=="object"&&r in l)l=l[r];else return n;return typeof l=="string"?l:n}function J2(e,n){return n?e.replace(/\{(\w+)\}/g,(o,l)=>n[l]!==void 0?String(n[l]):o):e}function Re(e,n){if(!we.value)return console.warn("[twcpt] i18n messages not loaded yet, please call setLocale first"),e;const o=G2(we.value,e);return J2(o,n)}async function ae(e){De.value=e;try{we.value=await Z2(e)}catch(n){console.error(`[twcpt] Failed to load locale messages for ${e}:`,n)}}function Ye(){return De.value}function H2(){return{t:Re,locale:De,setLocale:ae,getLocale:Ye}}const Ue=Symbol("pagePermissionIds"),We=Symbol("pageActionPermissionIds");let de={};function X2(e){const{app:n,pagePermissionIds:o,pageActionPermissionIds:l,projectPermissionId:r,defaultLanguage:i,colors:a,disableBFCache:s}=e;de={colors:a,projectPermissionId:r},s&&window.addEventListener("pageshow",g=>{g.persisted&&window.location.reload()}),i?ae(i).catch(g=>{console.error("[twcpt] Failed to set default language:",g)}):ae("zh-CN").catch(g=>{console.error("[twcpt] Failed to load default locale:",g)});const c=o?t.isRef(o)?o:t.ref(o):void 0,d=l?t.isRef(l)?l:t.ref(l):void 0;c&&(console.log("[twcpt] Permission IDs provided:",c.value),n.provide(Ue,c)),d&&(console.log("[twcpt] Action Permission IDs provided:",d.value),n.provide(We,d)),a&&K2(a),r&&console.log("[twcpt] Project Permission ID:",r),console.log("[twcpt] Initialization completed successfully.")}function K2(e){const n=e&&Object.keys(e).length>0,o=n?{...be,...e}:be;let l=document.getElementById("twcpt-color-vars");l||(l=document.createElement("style"),l.id="twcpt-color-vars",document.head.appendChild(l));const r=Object.entries(o).map(([i,a])=>` --j-color-${i}: ${a};`).join(`
2
2
  `);l.textContent=`:root {
3
3
  ${r}
4
4
  }
5
5
 
6
6
  .twcpt-container {
7
7
  ${r}
8
- }`,console.log("[twcpt] Custom colors applied:",n?e:"Using default colors")}function Hl(){return ae.colors}function Xl(){return ae.projectPermissionId}function Kl(){return{...ae}}const je={"app:clear":"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxzdmcgd2lkdGg9IjIwcHgiIGhlaWdodD0iMjBweCIgdmlld0JveD0iMCAwIDIwIDIwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyINCiAgICB4bWxuczp4bGluaz0iaHR0cDovL3d3dy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zMywxMi4yNTU4MzMzIEMxMi41ODE2NjY3LDExLjkzIDEyLjU4MTY2NjcsMTEuNDAzMzMzMyAxMi4yNTU4MzMzLDExLjA3NzUgTDExLjE3ODMzMzMsMTAgTDEyLjI1NTgzMzMsOC45MjI1IEMxMi41ODE2NjY3LDguNTk2NjY2NjcgMTIuNTgxNjY2Nyw4LjA3IDEyLjI1NTgzMzMsNy43NDQxNjY2NyINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ9IlBhdGgiIGZpbGw9IiM5OTlEQjQiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPg0KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICA8L2c+DQogICAgPC9nPg0KPC9zdmc+"},ql=e=>{const n="img:",o=[e,e.toLowerCase()];if(e.startsWith("app:")){const r=e.slice(4);o.push(r,r.toLowerCase())}else o.push(`app:${e}`,`app:${e.toLowerCase()}`);const l=o.find(r=>je[r]!==void 0);if(l)return{icon:n+je[l]}};function e2(...e){return n=>{for(const o of e){if(!o)continue;const l=o(n);if(l!==void 0)return l}}}function Ye(e,n,o=r=>JSON.stringify(r),l=r=>JSON.parse(r)){const r=e,i=()=>{try{const c=localStorage.getItem(r),u=c?l(c):n;return console.log(`[storageSync] 初始化 ${r}:`,u),u}catch(c){return console.warn(`[storageSync] Failed to read ${r}:`,c),n}},a=t.ref(i());t.watch(a,(c,u)=>{try{console.log(`[storageSync] ${r} 更新:`,{oldValue:u,newValue:c,timestamp:new Date().toISOString()}),localStorage.setItem(r,o(c)),console.log(`[storageSync] ${r} 已写入 localStorage`)}catch(p){console.error(`[storageSync] Failed to write ${r}:`,p)}},{deep:!0});const s=c=>{if(c.key===r&&c.newValue!==null)try{const u=l(c.newValue);console.log(`[storageSync] 监听到 storage 事件 ${r}:`,{oldValue:c.oldValue,newValue:c.newValue,url:c.url,timestamp:new Date().toISOString()}),JSON.stringify(a.value)!==JSON.stringify(u)?(console.log(`[storageSync] ${r} 从其他标签页同步更新:`,u),a.value=u):console.log(`[storageSync] ${r} 值未改变,跳过更新`)}catch(u){console.warn(`[storageSync] Failed to parse storage event for ${r}:`,u)}else c.key===r&&c.newValue===null&&(console.log(`[storageSync] ${r} 被清空,重置为初始值`),a.value=n)};return window.addEventListener("storage",s),a}const Ue=e=>e.join(","),We=e=>e?e.split(",").filter(Boolean):[];function t2(e){return Ye(e,[],Ue,We)}function n2(e){return Ye(e,[],Ue,We)}function Te(e){if(typeof e=="string")return e;if(e==null)return"请求失败";try{return JSON.stringify(e)}catch{return"请求失败"}}function o2(){const e=Fe,n=l=>typeof l=="object"&&l!==null&&"ok"in l&&"code"in l&&"data"in l;return{run:async l=>{try{const r=await l(),i=n(r)?r:n(r==null?void 0:r.data)?r.data:void 0;if(!i){e.error("响应格式错误");return}if((i==null?void 0:i.ok)===!0&&(i==null?void 0:i.code)===0)return i.data;e.error(Te(i==null?void 0:i.msg));return}catch(r){e.error(Te((r==null?void 0:r.msg)??(r==null?void 0:r.message)));return}}}}function oe(e){return e===!1?!1:e===0||String(e)==="0"||e?e:"-"}function Ze(e){const{size:n,unit:o="B",maxUnit:l,numberFormatOptions:r}=e,{size:i,unit:a}=Me({size:n,unit:o},{maxUnit:l});return`${i.toLocaleString(void 0,r)} ${a}`}function Me(e,n){const o=["B","KB","MB","GB","TB"],{size:l,unit:r="B"}=e,i=o.indexOf(r);if(i===-1||i===o.length-1)return{size:l,unit:r};const a=(n==null?void 0:n.maxUnit)||"TB",s=o.indexOf(a);return i===s?{size:l,unit:r}:l<1024?{size:l,unit:r}:Me({size:l/1024,unit:o[i+1]},n)}function ve(e,n="-"){return(o,l)=>o===0||o==="0"?e?e(o,l):o:o?e?e(o,l):o.toString():n}function Ge(e,n){const o=e.getFullYear(),l=e.getMonth()+1,r=e.getDate(),i=e.getHours(),a=i%12||12,s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),p=i<12?"AM":"PM",f={YYYY:String(o).padStart(4,"0"),YY:String(o%100).padStart(2,"0"),MM:String(l).padStart(2,"0"),M:String(l),DD:String(r).padStart(2,"0"),D:String(r),HH:String(i).padStart(2,"0"),H:String(i),hh:String(a).padStart(2,"0"),h:String(a),mm:String(s).padStart(2,"0"),m:String(s),ss:String(c).padStart(2,"0"),s:String(c),SSS:String(u).padStart(3,"0"),SS:String(u).padStart(3,"0").slice(0,2),S:String(u).padStart(3,"0").charAt(0),A:p,a:p.toLowerCase()};return n.replace(/YYYY|YY|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a/g,h=>f[h]??h)}function Je(e){if(e==null)return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;if(typeof e=="number"){const o=new Date(e);return isNaN(o.getTime())?null:o}let n=new Date(e);return isNaN(n.getTime())?(n=new Date(e.replace(" ","T")),isNaN(n.getTime())?null:n):n}function He(e){if(e==null)return null;if(e instanceof Date)return e;const n=Number(e);if(Number.isFinite(n)){const o=String(Math.floor(n)).length;if(o===10)return n*1e3;if(o===13)return n;if(n===0)return 0}return e}function l2(e,n="YYYY-MM-DD HH:mm:ss"){const o=He(e);if(!o&&o!==0)return oe(e);const l=Je(o);return oe(l?Ge(l,n):e)}function r2(e="YYYY-MM-DD HH:mm:ss",n="-"){return(o,l)=>{if(o===0||o==="0")return String(o);const r=He(o);if(!o||o==="Invalid Date")return n;try{const i=Je(r);if(!i)return n;const a=Ge(i,e);return!a||a==="Invalid Date"?n:a}catch(i){return console.error("Date formatting failed:",i),n}}}function i2(e="-",n){return ve(l=>{const r=typeof l=="string"?Number(l):l;return Number.isFinite(r)?Ze({size:r,unit:(n==null?void 0:n.unit)||"B",numberFormatOptions:{maximumFractionDigits:n==null?void 0:n.digits,minimumFractionDigits:n==null?void 0:n.digits}}):l},e)}function a2(e="-",n){return ve(l=>{const r=["B","KB","MB","GB","TB"];let i=typeof l=="string"?Number(l):l,a=(n==null?void 0:n.unit)||"B";const s=(n==null?void 0:n.digits)??2;if(i===0)return`${i.toFixed(s)} ${a}`;let c=r.indexOf(a);for(c===-1&&(c=0,a="B");c<r.length-1&&i%1024===0;)i=i/1024,c++,a=r[c];return`${i.toFixed(s)} ${a}`},e)}function s2(e,n,o,l){const r=["B","KB","MB","GB","TB"],i=(l==null?void 0:l.digits)??2,a=(l==null?void 0:l.showUnit)??!0,s=typeof e=="string"?Number(e):e;if(!Number.isFinite(s))return e;const c=r.indexOf(n),u=r.indexOf(o);if(c===-1||u===-1)return e;const p=c-u,h=(s*Math.pow(1024,p)).toFixed(i);return a?`${h} ${o}`:Number(h)}const c2=Object.freeze(Object.defineProperty({__proto__:null,convertDataUnit:s2,defaultAutoDataFormat:a2,defaultDataFormat:i2,defaultDateFormat:r2,defaultFill:oe,defaultFormat:ve,formatDate:l2,formatSize:Ze,getUpperSize:Me},Symbol.toStringTag,{value:"Module"}));function d2(e){return Array.isArray(e)?[...new Set(e)]:e}function u2(e,n){if(!Array.isArray(e))return e;const o=new Map;return e.filter(l=>{const r=l[n];return o.has(r)?!1:(o.set(r,!0),!0)})}function f2(e,n){if(!Array.isArray(e))return e;const o=new Set;return e.filter(l=>{const r=n.map(i=>l[i]).join("|");return o.has(r)?!1:(o.add(r),!0)})}function g2(e,n){if(!Array.isArray(e))return e;const{idKey:o="id",parentKey:l="parentId",childrenKey:r="children",rootParentValue:i=null}=n||{},a=new Map,s=[];return e.forEach(c=>{a.set(c[o],{...c,[r]:[]})}),e.forEach(c=>{const u=a.get(c[o]);if(!u)return;const p=c[l];if(p===i||p===void 0)s.push(u);else{const f=a.get(p);f?(f[r]||(f[r]=[]),f[r].push(u)):s.push(u)}}),s}function p2(e,n="children"){if(!Array.isArray(e))return e;const o=[],l=r=>{r.forEach(i=>{const a=i[n],s={...i};delete s[n],o.push(s),Array.isArray(a)&&a.length>0&&l(a)})};return l(e),o}function Xe(e,n,o="children"){if(!Array.isArray(e))return null;for(const l of e){if(n(l))return l;if(Array.isArray(l[o])&&l[o].length>0){const r=Xe(l[o],n,o);if(r)return r}}return null}function m2(e,n,o="children"){if(!Array.isArray(e))return;const l=(r,i,a)=>{r.forEach(s=>{n(s,i,a),Array.isArray(s[o])&&s[o].length>0&&l(s[o],s,a+1)})};l(e,null,0)}function w2(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=String(l[n]);return o[r]||(o[r]=[]),o[r].push(l),o},{}):{}}function h2(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=n(l);return o[r]||(o[r]=[]),o[r].push(l),o},{}):{}}function y2(e,n,o="asc"){return Array.isArray(e)?[...e].sort((l,r)=>{const i=l[n],a=r[n];return i<a?o==="asc"?-1:1:i>a?o==="asc"?1:-1:0}):e}function M2(e,n){return Array.isArray(e)?[...e].sort((o,l)=>{for(const{key:r,order:i="asc"}of n){const a=o[r],s=l[r];if(a<s)return i==="asc"?-1:1;if(a>s)return i==="asc"?1:-1}return 0}):e}function Ke(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=n?l[n]:l;return o+(Number(r)||0)},0):0}function v2(e,n){return!Array.isArray(e)||e.length===0?0:Ke(e,n)/e.length}function D2(e,n){if(!Array.isArray(e)||e.length===0)return 0;const o=e.map(l=>{const r=n?l[n]:l;return Number(r)||0});return Math.max(...o)}function C2(e,n){if(!Array.isArray(e)||e.length===0)return 0;const o=e.map(l=>{const r=n?l[n]:l;return Number(r)||0});return Math.min(...o)}function N2(e,n){if(!Array.isArray(e)||n<=0)return[e];const o=[];for(let l=0;l<e.length;l+=n)o.push(e.slice(l,l+n));return o}function k2(e,n){if(!Array.isArray(e)||!Array.isArray(n))return[];const o=new Set(n);return e.filter(l=>o.has(l))}function Q2(e,n){return Array.isArray(e)?Array.isArray(n)?[...new Set([...e,...n])]:e||[]:n||[]}function I2(e,n){if(!Array.isArray(e))return[];if(!Array.isArray(n))return e;const o=new Set(n);return e.filter(l=>!o.has(l))}function qe(e){if(!Array.isArray(e))return e;const n=[...e];for(let o=n.length-1;o>0;o--){const l=Math.floor(Math.random()*(o+1));[n[o],n[l]]=[n[l],n[o]]}return n}function A2(e,n=1){return!Array.isArray(e)||n<=0?[]:qe(e).slice(0,Math.min(n,e.length))}function et(e,n=1/0){return!Array.isArray(e)||n<=0?e:e.reduce((o,l)=>(Array.isArray(l)?o.push(...et(l,n-1)):o.push(l),o),[])}function j2(e,n,o){if(!Array.isArray(e))return{data:[],page:n,pageSize:o,total:0,totalPages:0};const l=e.length,r=Math.ceil(l/o),i=(n-1)*o,a=i+o;return{data:e.slice(i,a),page:n,pageSize:o,total:l,totalPages:r}}function T2(e,n,o){if(!Array.isArray(e)||n<0||n>=e.length||o<0||o>=e.length)return e;const l=[...e],[r]=l.splice(n,1);return l.splice(o,0,r),l}function b2(e){return Array.isArray(e)?e.reduce((n,o)=>(n[o]=(n[o]||0)+1,n),{}):{}}const L2=Object.freeze(Object.defineProperty({__proto__:null,arrayToTree:g2,average:v2,chunkArray:N2,countBy:b2,difference:I2,findNodeInTree:Xe,flatten:et,forEachTree:m2,groupBy:w2,groupByFn:h2,intersection:k2,max:D2,min:C2,move:T2,paginate:j2,sample:A2,shuffle:qe,sortBy:y2,sortByMultiple:M2,sum:Ke,treeToArray:p2,union:Q2,uniqueArray:d2,uniqueArrayByKey:u2,uniqueArrayByKeys:f2},Symbol.toStringTag,{value:"Module"}));async function S2(e){if(!e)return!1;if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(n){console.error("Clipboard API 失败:",n)}try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length);const o=document.execCommand("copy");return document.body.removeChild(n),o}catch(n){return console.error("复制失败:",n),!1}}async function z2(){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.readText()}catch(e){return console.error("读取剪贴板失败:",e),""}return""}function De(e,n){const o=document.createElement("a");typeof e=="string"?o.href=e:o.href=URL.createObjectURL(e),o.download=n,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),typeof e!="string"&&setTimeout(()=>URL.revokeObjectURL(o.href),100)}function E2(e,n){const o=JSON.stringify(e,null,2),l=new Blob([o],{type:"application/json"});De(l,n)}function x2(e,n){const o=new Blob([e],{type:"text/plain"});De(o,n)}function Ce(e){window.scrollTo(e)}function B2(e,n){const o=typeof e=="string"?document.querySelector(e):e;o&&o.scrollIntoView({behavior:"smooth",block:"start",...n})}function O2(e=!0){Ce({top:0,behavior:e?"smooth":"auto"})}function F2(e=!0){Ce({top:document.documentElement.scrollHeight,behavior:e?"smooth":"auto"})}function tt(){return{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}function _2(e){let n=0;for(;e;)n+=e.offsetTop,e=e.offsetParent;return n}function $2(e,n=0){if(!e)return!1;const o=e.getBoundingClientRect(),l=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return o.top>=0-n&&o.left>=0-n&&o.bottom<=l+n&&o.right<=r+n}function P2(e){if(!e)return!1;const n=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,l=window.innerWidth||document.documentElement.clientWidth,r=n.top<=o&&n.top+n.height>=0,i=n.left<=l&&n.left+n.width>=0;return r&&i}function V2(e=document.documentElement){document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(n=>{console.error("进入全屏失败:",n)})}function R2(e=document.documentElement){document.fullscreenElement||e.requestFullscreen().catch(n=>{console.error("进入全屏失败:",n)})}function Y2(){document.fullscreenElement&&document.exitFullscreen()}function U2(){return!!document.fullscreenElement}function W2(e,n){e&&e.classList.add(n)}function Z2(e,n){e&&e.classList.remove(n)}function G2(e,n){e&&e.classList.toggle(n)}function J2(e,n){return e?e.classList.contains(n):!1}function H2(e){return e?Array.from(e.classList):[]}function X2(e){return e?e.getBoundingClientRect():null}function K2(e){return e?e.offsetWidth:0}function q2(e){return e?e.offsetHeight:0}function e0(e,n=document){return n.querySelector(e)}function t0(e,n=document){return Array.from(n.querySelectorAll(e))}function n0(e,n){return e?e.getAttribute(n):null}function o0(e,n,o){e&&e.setAttribute(n,o)}function l0(e,n){e&&e.removeAttribute(n)}function r0(e,n){return e?e.hasAttribute(n):!1}function i0(e,n){return e&&window.getComputedStyle(e)[n]||""}function a0(e,n){e&&Object.keys(n).forEach(o=>{e.style[o]=n[o]})}function s0(){return{width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function nt(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}function c0(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)}function d0(e=0){const{y:n}=tt(),o=window.innerHeight||document.documentElement.clientHeight,l=nt();return n+o>=l-e}const u0=Object.freeze(Object.defineProperty({__proto__:null,addClass:W2,copyToClipboard:S2,downloadFile:De,downloadJSON:E2,downloadText:x2,enterFullscreen:R2,exitFullscreen:Y2,getAttribute:n0,getClasses:H2,getElementHeight:q2,getElementRect:X2,getElementWidth:K2,getOffsetTop:_2,getPageHeight:nt,getPageWidth:c0,getScrollPosition:tt,getStyle:i0,getWindowSize:s0,hasAttribute:r0,hasClass:J2,isFullscreen:U2,isInViewport:$2,isPartiallyVisible:P2,isScrolledToBottom:d0,querySelector:e0,querySelectorAll:t0,readFromClipboard:z2,removeAttribute:l0,removeClass:Z2,scrollTo:Ce,scrollToBottom:F2,scrollToElement:B2,scrollToTop:O2,setAttribute:o0,setStyle:a0,toggleClass:G2,toggleFullscreen:V2},Symbol.toStringTag,{value:"Module"}));function f0(e,n){return Math.floor(Math.random()*(n-e+1))+e}function g0(e,n,o=2){const l=Math.random()*(n-e)+e;return Number(l.toFixed(o))}function p0(e,n,o=1){const l=[];if(o===0)return l;if(o>0)for(let r=e;r<=n;r+=o)l.push(r);else for(let r=e;r>=n;r+=o)l.push(r);return l}function m0(e,n,o){return Math.min(Math.max(e,n),o)}function w0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,Math.max(o,l));return(e*r+n*r)/r}function h0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,Math.max(o,l));return(e*r-n*r)/r}function y0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,o+l);return e*Math.pow(10,o)*n*Math.pow(10,l)/r}function M0(e,n){if(n===0)return console.warn("Division by zero"),1/0;const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length;return e*Math.pow(10,l)/(n*Math.pow(10,o))*Math.pow(10,o-l)}function Ne(e,n=0){return Math.round(e*Math.pow(10,n))/Math.pow(10,n)}function v0(e,n=0){return Math.ceil(e*Math.pow(10,n))/Math.pow(10,n)}function D0(e,n=0){return Math.floor(e*Math.pow(10,n))/Math.pow(10,n)}function C0(e,n=0){return Ne(e,n).toFixed(n)}function N0(e,n,o=2){return n===0?0:Ne(e/n*100,o)}function k0(e){return e/100}function Q0(e){return e*100}function I0(e,n=2){return String(e).padStart(n,"0")}function A0(e){const n=["零","一","二","三","四","五","六","七","八","九"],o=["","十","百","千","万"];if(e===0)return"零";if(e<0||e>99999)return String(e);const l=String(e);let r="",i=0;for(let a=0;a<l.length;a++){const s=parseInt(l[a]),c=o[l.length-1-a];s===0?i++:(i>0&&(r+="零"),r+=n[s]+c,i=0)}return e>=10&&e<20&&(r=r.replace("一十","十")),r}function j0(e){const n=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],o=["","拾","佰","仟","万","拾","佰","仟","亿"],l=["角","分"];if(e===0)return"零元整";const[r,i=""]=e.toFixed(2).split(".");let a="";for(let s=0;s<r.length;s++){const c=parseInt(r[s]),u=o[r.length-1-s];c!==0?a+=n[c]+u:a&&!a.endsWith("零")&&(a+="零")}if(a=a.replace(/零+$/,"")+"元",i&&i!=="00")for(let s=0;s<Math.min(i.length,2);s++){const c=parseInt(i[s]);c!==0&&(a+=n[c]+l[s])}else a+="整";return a}function T0(e){return e%2===0}function b0(e){return e%2!==0}function L0(e){if(e<2)return!1;if(e===2)return!0;if(e%2===0)return!1;for(let n=3;n<=Math.sqrt(e);n+=2)if(e%n===0)return!1;return!0}function S0(e,n,o){return e>=n&&e<=o}function z0(e){return Math.abs(e)}function E0(e){return Math.sqrt(e)}function x0(e,n){return Math.pow(e,n)}function ot(e){return e<0?NaN:e===0||e===1?1:e*ot(e-1)}function ke(e,n){return n===0?e:ke(n,e%n)}function B0(e,n){return e*n/ke(e,n)}const O0=Object.freeze(Object.defineProperty({__proto__:null,abs:z0,add:w0,ceil:v0,clamp:m0,decimalToPercent:Q0,divide:M0,factorial:ot,floor:D0,gcd:ke,inRange:S0,isEven:T0,isOdd:b0,isPrime:L0,lcm:B0,multiply:y0,padZero:I0,percentToDecimal:k0,percentage:N0,pow:x0,random:f0,randomFloat:g0,range:p0,round:Ne,sqrt:E0,subtract:h0,toChineseMoney:j0,toChineseNumber:A0,toFixed:C0},Symbol.toStringTag,{value:"Module"}));function re(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map(o=>re(o));const n={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=re(e[o]));return n}function F0(e){return e===null||typeof e!="object"?e:Array.isArray(e)?[...e]:{...e}}function lt(...e){if(e.length===0)return{};if(e.length===1)return e[0];const n={};return e.forEach(o=>{!o||typeof o!="object"||Object.keys(o).forEach(l=>{const r=o[l],i=n[l];r&&typeof r=="object"&&!Array.isArray(r)&&i&&typeof i=="object"&&!Array.isArray(i)?n[l]=lt(i,r):n[l]=re(r)})}),n}function _0(...e){return Object.assign({},...e)}function $0(e,n){if(!e||typeof e!="object")return{};const o={};return n.forEach(l=>{l in e&&(o[l]=e[l])}),o}function P0(e,n){if(!e||typeof e!="object")return{};const o={...e};return n.forEach(l=>{delete o[l]}),o}function V0(e,n,o){if(!e||typeof e!="object")return o;const l=n.split(".");let r=e;for(const i of l)if(r&&typeof r=="object"&&i in r)r=r[i];else return o;return r!==void 0?r:o}function rt(e,n,o){if(!e||typeof e!="object")return;const l=n.split("."),r=l.pop();if(!r)return;let i=e;for(const a of l)(!(a in i)||typeof i[a]!="object")&&(i[a]={}),i=i[a];i[r]=o}function R0(e,n){if(!e||typeof e!="object")return!1;const o=n.split(".");let l=e;for(const r of o)if(l&&typeof l=="object"&&r in l)l=l[r];else return!1;return!0}function Y0(e){return e==null?!0:Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function U0(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function pe(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e===null||n===null)return!1;if(e instanceof Date&&n instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp&&n instanceof RegExp)return e.toString()===n.toString();if(Array.isArray(e)&&Array.isArray(n))return e.length!==n.length?!1:e.every((r,i)=>pe(r,n[i]));const o=Object.keys(e),l=Object.keys(n);return o.length!==l.length?!1:o.every(r=>pe(e[r],n[r]))}function me(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>me(o));const n={};return Object.keys(e).forEach(o=>{const l=o.replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),r=e[o];n[l]=typeof r=="object"?me(r):r}),n}function we(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>we(o));const n={};return Object.keys(e).forEach(o=>{const l=o.replace(/([A-Z])/g,"_$1").toLowerCase(),r=e[o];n[l]=typeof r=="object"?we(r):r}),n}function W0(e){return!e||typeof e!="object"?"":Object.keys(e).filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{const o=e[n];return Array.isArray(o)?o.map(l=>`${encodeURIComponent(n)}=${encodeURIComponent(l)}`).join("&"):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&")}function Z0(e){if(!e)return{};const n=e.startsWith("?")?e.slice(1):e,o={};return n.split("&").forEach(l=>{const[r,i]=l.split("=").map(decodeURIComponent);r&&(r in o?Array.isArray(o[r])?o[r].push(i):o[r]=[o[r],i]:o[r]=i)}),o}function it(e,n){if(!e||typeof e!="object")return{};const o={};return Object.keys(e).forEach(l=>{n(e[l],l)&&(o[l]=e[l])}),o}function G0(e,n=!0){return it(e,o=>!(o==null||n&&o===""))}function at(e,n=""){if(!e||typeof e!="object")return{};const o={};return Object.keys(e).forEach(l=>{const r=n?`${n}.${l}`:l,i=e[l];i&&typeof i=="object"&&!Array.isArray(i)?Object.assign(o,at(i,r)):o[r]=i}),o}function J0(e){if(!e||typeof e!="object")return{};const n={};return Object.keys(e).forEach(o=>{rt(n,o,e[o])}),n}function H0(e){if(!e||typeof e!="object")return{};const n={};return Object.keys(e).forEach(o=>{const l=e[o];n[String(l)]=o}),n}function X0(e){return!e||typeof e!="object"?[]:Object.values(e)}function K0(e){return!e||typeof e!="object"?[]:Object.keys(e)}function q0(e){return!e||typeof e!="object"?[]:Object.entries(e)}const e1=Object.freeze(Object.defineProperty({__proto__:null,deepClone:re,deepMerge:lt,entries:q0,filterValues:it,flattenObject:at,fromQueryString:Z0,get:V0,has:R0,invert:H0,isEmpty:Y0,isEqual:pe,isPlainObject:U0,keys:K0,keysToCamelCase:me,keysToUnderlineCase:we,omit:P0,pick:$0,removeEmpty:G0,set:rt,shallowClone:F0,shallowMerge:_0,toQueryString:W0,unflattenObject:J0,values:X0},Symbol.toStringTag,{value:"Module"}));function t1(e,n=300,o=!1){let l=null,r=!1;const i=function(...a){l&&clearTimeout(l),o&&!r?(e.apply(this,a),r=!0):l=setTimeout(()=>{e.apply(this,a),r=!1,l=null},n)};return i.cancel=()=>{l&&(clearTimeout(l),l=null),r=!1},i}function n1(e,n=300,o){const{leading:l=!0,trailing:r=!0}=o||{};let i=null,a=0,s=null;const c=function(...u){const p=Date.now();!a&&!l&&(a=p);const f=n-(p-a);s=u,f<=0||f>n?(i&&(clearTimeout(i),i=null),a=p,e.apply(this,u),s=null):!i&&r&&(i=setTimeout(()=>{a=l?Date.now():0,i=null,s&&(e.apply(this,s),s=null)},f))};return c.cancel=()=>{i&&(clearTimeout(i),i=null),a=0,s=null},c}function o1(e){let n=!1,o;return function(...l){return n||(n=!0,o=e.apply(this,l)),o}}function st(e){return new Promise(n=>setTimeout(n,e))}function ct(e){return st(e)}async function l1(e,n){const{times:o=3,delay:l=1e3,onRetry:r}=n||{};let i;for(let a=0;a<o;a++)try{return await e()}catch(s){i=s,r&&r(s,a+1),a<o-1&&await ct(l)}throw i}function r1(e,n){return Promise.race([e,new Promise((o,l)=>setTimeout(()=>l(new Error("Timeout")),n))])}function i1(e,n){const o=new Map,l=function(...r){const i=n?n(...r):JSON.stringify(r);if(o.has(i))return o.get(i);const a=e.apply(this,r);return o.set(i,a),a};return l.cache=o,l}function a1(e){e.cache&&e.cache.clear()}function s1(e,n=100){let o=[],l=null;return function(r){o.push(r),l&&clearTimeout(l),l=setTimeout(()=>{e(o),o=[],l=null},n)}}async function c1(e,n){const o=[],l=[];for(const r of e){const i=r().then(a=>{o.push(a),l.splice(l.indexOf(i),1)});l.push(i),l.length>=n&&await Promise.race(l)}return await Promise.all(l),o}async function d1(e){const n=[];for(const o of e){const l=await o();n.push(l)}return n}function u1(e,n){return function(...o){const l=performance.now(),r=e.apply(this,o),a=(performance.now()-l).toFixed(2);return console.log(`${n||e.name||"Function"}: ${a}ms`),r}}function f1(e,n){return async function(...o){const l=performance.now(),r=await e.apply(this,o),a=(performance.now()-l).toFixed(2);return console.log(`${n||e.name||"Function"}: ${a}ms`),r}}function g1(e){const n=new Map;return async function(...o){const l=JSON.stringify(o);if(n.has(l))return n.get(l);const r=e.apply(this,o).finally(()=>{n.delete(l)});return n.set(l,r),r}}function p1(e){let n=null;const o=function(...l){n===null&&(n=requestAnimationFrame(()=>{e.apply(this,l),n=null}))};return o.cancel=()=>{n!==null&&(cancelAnimationFrame(n),n=null)},o}const m1=Object.freeze(Object.defineProperty({__proto__:null,batch:s1,clearCache:a1,debounce:t1,dedupe:g1,delay:st,measureTime:u1,measureTimeAsync:f1,memoize:i1,once:o1,promiseLimit:c1,promiseSerial:d1,rafThrottle:p1,retry:l1,sleep:ct,throttle:n1,withTimeout:r1},Symbol.toStringTag,{value:"Module"}));function W(e,n){return o=>{const l=String(o||"").trim();return!l||e(l)?!0:typeof n=="function"?n():n}}function dt(e){return e?/^1[3-9]\d{9}$/.test(e):!1}function ut(e){return e?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e):!1}function ft(e){return e?/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(e):!1}function gt(e){return e?/^\d{16,19}$/.test(e):!1}function pt(e){return e?/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/.test(e):!1}function mt(e){return e?/^(https?:\/\/)([a-zA-Z0-9.-]+)(:[0-9]+)?(\/.*)?$/.test(e):!1}function wt(e){return e?/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e):!1}function w1(e){return e?/^[\u4e00-\u9fa5]+$/.test(e):!1}function h1(e){return e?/[\u4e00-\u9fa5]/.test(e):!1}function y1(e){return e?/^\d+$/.test(e):!1}function M1(e){return e?/^-?\d+\.?\d*$/.test(e):!1}function v1(e){return e?/^[1-9]\d*$/.test(e):!1}function D1(e){return!e&&e!=="0"?!1:/^(0|[1-9]\d*)$/.test(e)}function C1(e){return e?/^[1-9]\d{4,10}$/.test(e):!1}function N1(e){return e?/^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/.test(e):!1}function k1(e){return e?/^[1-9]\d{5}$/.test(e):!1}function Q1(e){return e?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(e):!1}function I1(e){return e?/^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,}$/.test(e):!1}function A1(e){return e?/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(e):!1}function j1(e){if(!e)return!1;const n=Number(e);return/^\d+$/.test(e)&&n>=1&&n<=65535}function T1(e){return e?/^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^::$|^([\da-fA-F]{1,4}:){1,6}:$|^:((:[\da-fA-F]{1,4}){1,6})$/.test(e):!1}function b1(e){return e?/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e):!1}function L1(e="请输入有效的手机号"){return W(dt,e)}function S1(e="请输入有效的邮箱地址"){return W(ut,e)}function z1(e="请输入有效的身份证号"){return W(ft,e)}function E1(e="请输入有效的银行卡号"){return W(gt,e)}function x1(e="请输入有效的车牌号"){return W(pt,e)}function B1(e="请输入有效的 URL 地址"){return W(mt,e)}function O1(e="请输入有效的 IP 地址"){return W(wt,e)}const F1=Object.freeze(Object.defineProperty({__proto__:null,bankCardRule:E1,carNumberRule:x1,createFormRule:W,emailRule:S1,hasChinese:h1,idCardRule:z1,ipRule:O1,isBankCard:gt,isCarNumber:pt,isChinese:w1,isEmail:ut,isHexColor:b1,isIP:wt,isIPv6:T1,isIdCard:ft,isMac:A1,isMediumPassword:I1,isNonNegativeInteger:D1,isNumber:y1,isNumeric:M1,isPhone:dt,isPort:j1,isPositiveInteger:v1,isPostcode:k1,isQQ:C1,isStrongPassword:Q1,isUrl:mt,isWechat:N1,phoneRule:L1,urlRule:B1},Symbol.toStringTag,{value:"Module"}));function _1(e){return!e||e.length!==11?e:e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}function $1(e){if(!e||e.length<8)return e;const n=e.length;return e.substring(0,3)+"*".repeat(n-7)+e.substring(n-4)}function P1(e){return!e||e.length===0||e.length===1?e:e.length===2?e[0]+"*":e.substring(0,e.length-1)+"*"}function V1(e){if(!e||e.length<8)return e;const n=e.length,o=e.substring(0,4),l=e.substring(n-4);return`${o} **** **** ${l}`}function R1(e){if(!e||!e.includes("@"))return e;const[n,o]=e.split("@");return n.length<=1?e:n[0]+"***@"+o}function Y1(e,n=6){return!e||e.length<=n?e:e.substring(0,n)+"***"}function U1(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function W1(e){return e&&e.replace(/\b\w/g,n=>n.toUpperCase())}function Z1(e){return e&&e.replace(/_([a-z])/g,(n,o)=>o.toUpperCase())}function G1(e){return e&&e.replace(/([A-Z])/g,"_$1").toLowerCase()}function J1(e){return e&&e.replace(/([A-Z])/g,"-$1").toLowerCase()}function H1(e){if(e==null||e==="")return"";const o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.join(".")}function X1(e,n){const{currency:o="¥",decimals:l=2,thousandsSeparator:r=",",decimalSeparator:i="."}=n||{},a=typeof e=="string"?parseFloat(e):e;if(isNaN(a))return e.toString();const s=a.toFixed(l),[c,u]=s.split(".");let f=c.replace(/\B(?=(\d{3})+(?!\d))/g,r);return l>0&&u&&(f+=i+u),o+f}function K1(e,n=2){if(e===0)return"0 B";if(!e)return"";const o=1024,l=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,r)).toFixed(n))+" "+l[r]}function q1(e){return e&&e.replace(/\s/g,"").replace(/(\d{4})(?=\d)/g,"$1 ")}function er(e){return e&&e.replace(/\s/g,"").replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3")}function tr(e=8,n="alphanumeric"){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l="0123456789";let i=o+l;n==="alpha"&&(i=o),n==="number"&&(i=l);let a="";for(let s=0;s<e;s++)a+=i.charAt(Math.floor(Math.random()*i.length));return a}function nr(e){const n=Date.now(),o=Math.random().toString(36).substring(2,8);return e?`${e}_${n}_${o}`:`${n}_${o}`}function or(e,n,o="..."){return!e||e.length<=n?e:e.substring(0,n)+o}function lr(e){return e&&e.replace(/<[^>]*>/g,"")}function rr(e){if(!e)return e;const n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};return e.replace(/[&<>"'/]/g,o=>n[o])}function ir(e){if(!e)return e;const n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};return e.replace(/&(amp|lt|gt|quot|#x27|#x2F);/g,o=>n[o])}function ar(e){return e==null||e.trim()===""}function sr(e){return e&&e.split("").reverse().join("")}function cr(e,n){return!e||n<=0?"":e.repeat(n)}function dr(e,n,o=" "){return e||(e=""),e.padStart(n,o)}function ur(e,n,o=" "){return e||(e=""),e.padEnd(n,o)}const fr=Object.freeze(Object.defineProperty({__proto__:null,addressDesensitize:Y1,bankCardDesensitize:V1,capitalize:U1,capitalizeWords:W1,emailDesensitize:R1,escapeHtml:rr,formatBankCard:q1,formatFileSize:K1,formatMoney:X1,formatNumber:H1,formatPhone:er,generateUUID:nr,idCardDesensitize:$1,isEmpty:ar,nameDesensitize:P1,padEnd:ur,padStart:dr,phoneDesensitize:_1,randomString:tr,removeHtmlTags:lr,repeat:cr,reverse:sr,toCamelCase:Z1,toKebabCase:J1,toUnderlineCase:G1,truncate:or,unescapeHtml:ir},Symbol.toStringTag,{value:"Module"}));function R(e){const n=e||(typeof window<"u"?window.location.href:"");if(!n)return{};const o=n.includes("?")?n.split("?")[1].split("#")[0]:"";if(!o)return{};const l={};return o.split("&").forEach(r=>{if(!r)return;const[i,a=""]=r.split("=").map(decodeURIComponent);i&&(i in l?Array.isArray(l[i])?l[i].push(a):l[i]=[l[i],a]:l[i]=a)}),l}function H(e){return!e||typeof e!="object"?"":Object.keys(e).filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{const o=e[n];return Array.isArray(o)?o.map(l=>`${encodeURIComponent(n)}=${encodeURIComponent(l)}`).join("&"):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&")}function gr(e,n){const l=R(n)[e];return l===void 0?null:Array.isArray(l)?l[0]||null:l}function pr(e,n){const l=R(n)[e];return l===void 0?[]:Array.isArray(l)?l:[l]}function mr(e,n="push"){if(typeof window>"u"||!window.history)return;const l={...R(),...e};Object.keys(l).forEach(a=>{(l[a]===null||l[a]===void 0)&&delete l[a]});const r=H(l),i=r?`${window.location.pathname}?${r}`:window.location.pathname;n==="push"?window.history.pushState(null,"",i):window.history.replaceState(null,"",i)}function wr(e,n="push"){if(typeof window>"u"||!window.history)return;const o=R();e.forEach(i=>{delete o[i]});const l=H(o),r=l?`${window.location.pathname}?${l}`:window.location.pathname;n==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r)}function hr(e="push"){if(typeof window>"u"||!window.history)return;const n=window.location.pathname;e==="push"?window.history.pushState(null,"",n):window.history.replaceState(null,"",n)}function yr(...e){return e.length===0?"":e.map((n,o)=>o===0?n.replace(/\/+$/,""):o===e.length-1?n.replace(/^\/+/,""):n.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function Mr(e){if(!e)return{protocol:"",username:"",password:"",hostname:"",port:"",pathname:"",search:"",hash:"",host:"",origin:"",href:"",params:{}};try{const n=new URL(e);return{protocol:n.protocol,username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search,hash:n.hash,host:n.host,origin:n.origin,href:n.href,params:R(e)}}catch{return{protocol:"",username:"",password:"",hostname:"",port:"",pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",host:"",origin:"",href:e,params:R(e)}}}function vr(e){const{protocol:n="https",hostname:o="",port:l="",pathname:r="",params:i={},hash:a=""}=e;if(!o)return r;let s=`${n}://${o}`;l&&(s+=`:${l}`),r&&(s+=r.startsWith("/")?r:`/${r}`);const c=H(i);return c&&(s+=`?${c}`),a&&(s+=a.startsWith("#")?a:`#${a}`),s}function Dr(e){return e?/^(https?:)?\/\//.test(e):!1}function Cr(e){return e?e.startsWith("/"):!1}function Nr(e,n){try{const o=new URL(e),l=new URL(n);return o.origin===l.origin}catch{return!1}}function kr(e){return encodeURIComponent(e)}function Qr(e){try{return decodeURIComponent(e)}catch{return e}}function Ir(e){if(!e)return"";try{return encodeURI(decodeURI(e))}catch{return encodeURI(e)}}function Ar(e){if(!e)return"";try{return decodeURI(e)}catch{return e}}function jr(e,n){if(!e)return"";if(!n||Object.keys(n).length===0)return e;const[o,l]=e.split("#"),[r,i]=o.split("?"),s={...i?R("?"+i):{},...n},c=H(s);let u=r;return c&&(u+=`?${c}`),l&&(u+=`#${l}`),u}function Tr(e,n){if(!e)return"";if(!n||n.length===0)return e;const[o,l]=e.split("#"),[r,i]=o.split("?");if(!i)return e;const a=R("?"+i);n.forEach(u=>{delete a[u]});const s=H(a);let c=r;return s&&(c+=`?${s}`),l&&(c+=`#${l}`),c}function ht(e){try{return new URL(e).hostname}catch{return""}}function br(e){const n=ht(e);if(!n)return"";const o=n.split(".");return o.length<=2?n:o.slice(-2).join(".")}function Lr(){return typeof window>"u"?"":window.location.href}function Sr(){return typeof window>"u"?"":window.location.pathname}function zr(){return typeof window>"u"?{}:R(window.location.search)}function Er(){return typeof window>"u"?"":window.location.hash.replace(/^#/,"")}const xr=Object.freeze(Object.defineProperty({__proto__:null,addQueryParams:jr,buildUrl:vr,clearQueryParams:hr,decodeParam:Qr,encodeParam:kr,getCurrentHash:Er,getCurrentPath:Sr,getCurrentQuery:zr,getCurrentUrl:Lr,getDomain:ht,getQueryParam:gr,getQueryParams:pr,getRootDomain:br,isAbsolutePath:Cr,isExternalLink:Dr,isSameOrigin:Nr,joinUrl:yr,parseQuery:R,parseUrl:Mr,removeQueryParams:wr,removeQueryParamsFromUrl:Tr,safeDecodeUrl:Ar,safeEncodeUrl:Ir,stringifyQuery:H,updateQueryParams:mr},Symbol.toStringTag,{value:"Module"})),Br={...c2,array:L2,dom:u0,number:O0,object:e1,perf:m1,regex:F1,string:fr,url:xr};exports.twcptResolver=be.twcptResolver;exports.twcptResolverWithOptions=be.twcptResolverWithOptions;exports.DialogProvider=he;exports.JTWBtn=ee;exports.JTWCheckbox=wl;exports.JTWCheckboxGroup=Ml;exports.JTWConfirmDialog=ze;exports.JTWConfirmDialogIcon=fe;exports.JTWDatePicker=An;exports.JTWDialog=Oe;exports.JTWDialogFooterMode=Be;exports.JTWDialogPosition=Ee;exports.JTWDialogSize=xe;exports.JTWDropdownBtn=Tt;exports.JTWForm=ll;exports.JTWFormItem=al;exports.JTWFormLabel=tl;exports.JTWInput=dl;exports.JTWMessages=Se;exports.JTWRadio=Cl;exports.JTWRadioGroup=Ql;exports.JTWSelect=gl;exports.JTWStatusImg=ie;exports.JTWTable=Yn;exports.JTWTreeSelect=Go;exports.JTWTreeSelectBtn=gn;exports.JTWTreeSelectInput=Cn;exports.PAGE_ACTION_PERMISSION_KEY=Re;exports.PAGE_PERMISSION_KEY=Ve;exports.composeIconMapFn=e2;exports.dialogConfirm=_e;exports.getLocale=Pe;exports.getProjectPermissionId=Xl;exports.getTwcptColors=Hl;exports.getTwcptConfig=Kl;exports.jwConfirmDialog=_e;exports.jwDialog=uo;exports.jwMessages=Fe;exports.setLocale=le;exports.t=$e;exports.twTool=Br;exports.twcptIconMapFn=ql;exports.twcptInit=Gl;exports.useBizRequest=o2;exports.useI18n=Zl;exports.usePageActionPermissionSync=n2;exports.usePagePermissionSync=t2;
8
+ }`,console.log("[twcpt] Custom colors applied:",n?e:"Using default colors")}function q2(){return de.colors}function el(){return de.projectPermissionId}function tl(){return{...de}}const Le={"app:clear":"data:image/svg+xml;base64,PD94bWwgdmVyc2lv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wxMi40MTgzMzMzIDguOTIyNSwxMi4yNTU4MzMzIEwxMCwxMS4xNzgzMzMzIEwxMS4wNzc1LDEyLjI1NTgzMzMgQzExLjI0LDEyLjQxODMzMzMgMTEuNDUzMzMzMywxMi41IDExLjY2NjY2NjcsMTIuNSBDMTEuODgsMTIuNSAxMi4wOTMzMzMzLDEyLjQxODMzMzMgMTIuMjU1ODMzMywxMi4yNTU4MzMzIEMxMi41ODE2NjY3LDExLjkzIDEyLjU4MTY2NjcsMTEuNDAzMzMzMyAxMi4yNTU4MzMzLDExLjA3NzUgTDExLjE3ODMzMzMsMTAgTDEyLjI1NTgzMzMsOC45MjI1IEMxMi41ODE2NjY3LDguNTk2NjY2NjcgMTIuNTgxNjY2Nyw4LjA3IDEyLjI1NTgzMzMsNy43NDQxNjY2NyINCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ9IlBhdGgiIGZpbGw9IiM5OTlEQjQiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPg0KICAgICAgICAgICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgICAgICAgICA8L2c+DQogICAgICAgICAgICAgICAgPC9nPg0KICAgICAgICAgICAgPC9nPg0KICAgICAgICA8L2c+DQogICAgPC9nPg0KPC9zdmc+"},nl=e=>{const n="img:",o=[e,e.toLowerCase()];if(e.startsWith("app:")){const r=e.slice(4);o.push(r,r.toLowerCase())}else o.push(`app:${e}`,`app:${e.toLowerCase()}`);const l=o.find(r=>Le[r]!==void 0);if(l)return{icon:n+Le[l]}};function ol(...e){return n=>{for(const o of e){if(!o)continue;const l=o(n);if(l!==void 0)return l}}}function Ze(e,n,o=r=>JSON.stringify(r),l=r=>JSON.parse(r)){const r=e,i=()=>{try{const c=localStorage.getItem(r),d=c?l(c):n;return console.log(`[storageSync] 初始化 ${r}:`,d),d}catch(c){return console.warn(`[storageSync] Failed to read ${r}:`,c),n}},a=t.ref(i());t.watch(a,(c,d)=>{try{console.log(`[storageSync] ${r} 更新:`,{oldValue:d,newValue:c,timestamp:new Date().toISOString()}),localStorage.setItem(r,o(c)),console.log(`[storageSync] ${r} 已写入 localStorage`)}catch(g){console.error(`[storageSync] Failed to write ${r}:`,g)}},{deep:!0});const s=c=>{if(c.key===r&&c.newValue!==null)try{const d=l(c.newValue);console.log(`[storageSync] 监听到 storage 事件 ${r}:`,{oldValue:c.oldValue,newValue:c.newValue,url:c.url,timestamp:new Date().toISOString()}),JSON.stringify(a.value)!==JSON.stringify(d)?(console.log(`[storageSync] ${r} 从其他标签页同步更新:`,d),a.value=d):console.log(`[storageSync] ${r} 值未改变,跳过更新`)}catch(d){console.warn(`[storageSync] Failed to parse storage event for ${r}:`,d)}else c.key===r&&c.newValue===null&&(console.log(`[storageSync] ${r} 被清空,重置为初始值`),a.value=n)};return window.addEventListener("storage",s),a}const Ge=e=>e.join(","),Je=e=>e?e.split(",").filter(Boolean):[];function ll(e){return Ze(e,[],Ge,Je)}function rl(e){return Ze(e,[],Ge,Je)}function Se(e){if(typeof e=="string")return e;if(e==null)return"请求失败";try{return JSON.stringify(e)}catch{return"请求失败"}}function il(){const e=Ve,n=l=>typeof l=="object"&&l!==null&&"ok"in l&&"code"in l&&"data"in l;return{run:async l=>{try{const r=await l(),i=n(r)?r:n(r==null?void 0:r.data)?r.data:void 0;if(!i){e.error("响应格式错误");return}if((i==null?void 0:i.ok)===!0&&(i==null?void 0:i.code)===0)return i.data;e.error(Se(i==null?void 0:i.msg));return}catch(r){e.error(Se((r==null?void 0:r.msg)??(r==null?void 0:r.message)));return}}}}function ie(e){return e===!1?!1:e===0||String(e)==="0"||e?e:"-"}function He(e){const{size:n,unit:o="B",maxUnit:l,numberFormatOptions:r}=e,{size:i,unit:a}=Ce({size:n,unit:o},{maxUnit:l});return`${i.toLocaleString(void 0,r)} ${a}`}function Ce(e,n){const o=["B","KB","MB","GB","TB"],{size:l,unit:r="B"}=e,i=o.indexOf(r);if(i===-1||i===o.length-1)return{size:l,unit:r};const a=(n==null?void 0:n.maxUnit)||"TB",s=o.indexOf(a);return i===s?{size:l,unit:r}:l<1024?{size:l,unit:r}:Ce({size:l/1024,unit:o[i+1]},n)}function Ne(e,n="-"){return(o,l)=>o===0||o==="0"?e?e(o,l):o:o?e?e(o,l):o.toString():n}function Xe(e,n){const o=e.getFullYear(),l=e.getMonth()+1,r=e.getDate(),i=e.getHours(),a=i%12||12,s=e.getMinutes(),c=e.getSeconds(),d=e.getMilliseconds(),g=i<12?"AM":"PM",u={YYYY:String(o).padStart(4,"0"),YY:String(o%100).padStart(2,"0"),MM:String(l).padStart(2,"0"),M:String(l),DD:String(r).padStart(2,"0"),D:String(r),HH:String(i).padStart(2,"0"),H:String(i),hh:String(a).padStart(2,"0"),h:String(a),mm:String(s).padStart(2,"0"),m:String(s),ss:String(c).padStart(2,"0"),s:String(c),SSS:String(d).padStart(3,"0"),SS:String(d).padStart(3,"0").slice(0,2),S:String(d).padStart(3,"0").charAt(0),A:g,a:g.toLowerCase()};return n.replace(/YYYY|YY|MM|M|DD|D|HH|H|hh|h|mm|m|ss|s|SSS|SS|S|A|a/g,w=>u[w]??w)}function Ke(e){if(e==null)return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;if(typeof e=="number"){const o=new Date(e);return isNaN(o.getTime())?null:o}let n=new Date(e);return isNaN(n.getTime())?(n=new Date(e.replace(" ","T")),isNaN(n.getTime())?null:n):n}function qe(e){if(e==null)return null;if(e instanceof Date)return e;const n=Number(e);if(Number.isFinite(n)){const o=String(Math.floor(n)).length;if(o===10)return n*1e3;if(o===13)return n;if(n===0)return 0}return e}function al(e,n="YYYY-MM-DD HH:mm:ss"){const o=qe(e);if(!o&&o!==0)return ie(e);const l=Ke(o);return ie(l?Xe(l,n):e)}function sl(e="YYYY-MM-DD HH:mm:ss",n="-"){return(o,l)=>{if(o===0||o==="0")return String(o);const r=qe(o);if(!o||o==="Invalid Date")return n;try{const i=Ke(r);if(!i)return n;const a=Xe(i,e);return!a||a==="Invalid Date"?n:a}catch(i){return console.error("Date formatting failed:",i),n}}}function cl(e="-",n){return Ne(l=>{const r=typeof l=="string"?Number(l):l;return Number.isFinite(r)?He({size:r,unit:(n==null?void 0:n.unit)||"B",numberFormatOptions:{maximumFractionDigits:n==null?void 0:n.digits,minimumFractionDigits:n==null?void 0:n.digits}}):l},e)}function dl(e="-",n){return Ne(l=>{const r=["B","KB","MB","GB","TB"];let i=typeof l=="string"?Number(l):l,a=(n==null?void 0:n.unit)||"B";const s=(n==null?void 0:n.digits)??2;if(i===0)return`${i.toFixed(s)} ${a}`;let c=r.indexOf(a);for(c===-1&&(c=0,a="B");c<r.length-1&&i%1024===0;)i=i/1024,c++,a=r[c];return`${i.toFixed(s)} ${a}`},e)}function ul(e,n,o,l){const r=["B","KB","MB","GB","TB"],i=(l==null?void 0:l.digits)??2,a=(l==null?void 0:l.showUnit)??!0,s=typeof e=="string"?Number(e):e;if(!Number.isFinite(s))return e;const c=r.indexOf(n),d=r.indexOf(o);if(c===-1||d===-1)return e;const g=c-d,w=(s*Math.pow(1024,g)).toFixed(i);return a?`${w} ${o}`:Number(w)}const fl=Object.freeze(Object.defineProperty({__proto__:null,convertDataUnit:ul,defaultAutoDataFormat:dl,defaultDataFormat:cl,defaultDateFormat:sl,defaultFill:ie,defaultFormat:Ne,formatDate:al,formatSize:He,getUpperSize:Ce},Symbol.toStringTag,{value:"Module"}));function gl(e){return Array.isArray(e)?[...new Set(e)]:e}function pl(e,n){if(!Array.isArray(e))return e;const o=new Map;return e.filter(l=>{const r=l[n];return o.has(r)?!1:(o.set(r,!0),!0)})}function ml(e,n){if(!Array.isArray(e))return e;const o=new Set;return e.filter(l=>{const r=n.map(i=>l[i]).join("|");return o.has(r)?!1:(o.add(r),!0)})}function wl(e,n){if(!Array.isArray(e))return e;const{idKey:o="id",parentKey:l="parentId",childrenKey:r="children",rootParentValue:i=null}=n||{},a=new Map,s=[];return e.forEach(c=>{a.set(c[o],{...c,[r]:[]})}),e.forEach(c=>{const d=a.get(c[o]);if(!d)return;const g=c[l];if(g===i||g===void 0)s.push(d);else{const u=a.get(g);u?(u[r]||(u[r]=[]),u[r].push(d)):s.push(d)}}),s}function hl(e,n="children"){if(!Array.isArray(e))return e;const o=[],l=r=>{r.forEach(i=>{const a=i[n],s={...i};delete s[n],o.push(s),Array.isArray(a)&&a.length>0&&l(a)})};return l(e),o}function et(e,n,o="children"){if(!Array.isArray(e))return null;for(const l of e){if(n(l))return l;if(Array.isArray(l[o])&&l[o].length>0){const r=et(l[o],n,o);if(r)return r}}return null}function yl(e,n,o="children"){if(!Array.isArray(e))return;const l=(r,i,a)=>{r.forEach(s=>{n(s,i,a),Array.isArray(s[o])&&s[o].length>0&&l(s[o],s,a+1)})};l(e,null,0)}function Ml(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=String(l[n]);return o[r]||(o[r]=[]),o[r].push(l),o},{}):{}}function vl(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=n(l);return o[r]||(o[r]=[]),o[r].push(l),o},{}):{}}function Dl(e,n,o="asc"){return Array.isArray(e)?[...e].sort((l,r)=>{const i=l[n],a=r[n];return i<a?o==="asc"?-1:1:i>a?o==="asc"?1:-1:0}):e}function Cl(e,n){return Array.isArray(e)?[...e].sort((o,l)=>{for(const{key:r,order:i="asc"}of n){const a=o[r],s=l[r];if(a<s)return i==="asc"?-1:1;if(a>s)return i==="asc"?1:-1}return 0}):e}function tt(e,n){return Array.isArray(e)?e.reduce((o,l)=>{const r=n?l[n]:l;return o+(Number(r)||0)},0):0}function Nl(e,n){return!Array.isArray(e)||e.length===0?0:tt(e,n)/e.length}function kl(e,n){if(!Array.isArray(e)||e.length===0)return 0;const o=e.map(l=>{const r=n?l[n]:l;return Number(r)||0});return Math.max(...o)}function Ql(e,n){if(!Array.isArray(e)||e.length===0)return 0;const o=e.map(l=>{const r=n?l[n]:l;return Number(r)||0});return Math.min(...o)}function Il(e,n){if(!Array.isArray(e)||n<=0)return[e];const o=[];for(let l=0;l<e.length;l+=n)o.push(e.slice(l,l+n));return o}function Al(e,n){if(!Array.isArray(e)||!Array.isArray(n))return[];const o=new Set(n);return e.filter(l=>o.has(l))}function jl(e,n){return Array.isArray(e)?Array.isArray(n)?[...new Set([...e,...n])]:e||[]:n||[]}function Tl(e,n){if(!Array.isArray(e))return[];if(!Array.isArray(n))return e;const o=new Set(n);return e.filter(l=>!o.has(l))}function nt(e){if(!Array.isArray(e))return e;const n=[...e];for(let o=n.length-1;o>0;o--){const l=Math.floor(Math.random()*(o+1));[n[o],n[l]]=[n[l],n[o]]}return n}function bl(e,n=1){return!Array.isArray(e)||n<=0?[]:nt(e).slice(0,Math.min(n,e.length))}function ot(e,n=1/0){return!Array.isArray(e)||n<=0?e:e.reduce((o,l)=>(Array.isArray(l)?o.push(...ot(l,n-1)):o.push(l),o),[])}function Ll(e,n,o){if(!Array.isArray(e))return{data:[],page:n,pageSize:o,total:0,totalPages:0};const l=e.length,r=Math.ceil(l/o),i=(n-1)*o,a=i+o;return{data:e.slice(i,a),page:n,pageSize:o,total:l,totalPages:r}}function Sl(e,n,o){if(!Array.isArray(e)||n<0||n>=e.length||o<0||o>=e.length)return e;const l=[...e],[r]=l.splice(n,1);return l.splice(o,0,r),l}function zl(e){return Array.isArray(e)?e.reduce((n,o)=>(n[o]=(n[o]||0)+1,n),{}):{}}const El=Object.freeze(Object.defineProperty({__proto__:null,arrayToTree:wl,average:Nl,chunkArray:Il,countBy:zl,difference:Tl,findNodeInTree:et,flatten:ot,forEachTree:yl,groupBy:Ml,groupByFn:vl,intersection:Al,max:kl,min:Ql,move:Sl,paginate:Ll,sample:bl,shuffle:nt,sortBy:Dl,sortByMultiple:Cl,sum:tt,treeToArray:hl,union:jl,uniqueArray:gl,uniqueArrayByKey:pl,uniqueArrayByKeys:ml},Symbol.toStringTag,{value:"Module"}));async function Bl(e){if(!e)return!1;if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.writeText(e),!0}catch(n){console.error("Clipboard API 失败:",n)}try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",document.body.appendChild(n),n.select(),n.setSelectionRange(0,e.length);const o=document.execCommand("copy");return document.body.removeChild(n),o}catch(n){return console.error("复制失败:",n),!1}}async function xl(){if(navigator.clipboard&&window.isSecureContext)try{return await navigator.clipboard.readText()}catch(e){return console.error("读取剪贴板失败:",e),""}return""}function ke(e,n){const o=document.createElement("a");typeof e=="string"?o.href=e:o.href=URL.createObjectURL(e),o.download=n,o.style.display="none",document.body.appendChild(o),o.click(),document.body.removeChild(o),typeof e!="string"&&setTimeout(()=>URL.revokeObjectURL(o.href),100)}function Ol(e,n){const o=JSON.stringify(e,null,2),l=new Blob([o],{type:"application/json"});ke(l,n)}function Fl(e,n){const o=new Blob([e],{type:"text/plain"});ke(o,n)}function Qe(e){window.scrollTo(e)}function _l(e,n){const o=typeof e=="string"?document.querySelector(e):e;o&&o.scrollIntoView({behavior:"smooth",block:"start",...n})}function $l(e=!0){Qe({top:0,behavior:e?"smooth":"auto"})}function Vl(e=!0){Qe({top:document.documentElement.scrollHeight,behavior:e?"smooth":"auto"})}function lt(){return{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}function Pl(e){let n=0;for(;e;)n+=e.offsetTop,e=e.offsetParent;return n}function Rl(e,n=0){if(!e)return!1;const o=e.getBoundingClientRect(),l=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;return o.top>=0-n&&o.left>=0-n&&o.bottom<=l+n&&o.right<=r+n}function Yl(e){if(!e)return!1;const n=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,l=window.innerWidth||document.documentElement.clientWidth,r=n.top<=o&&n.top+n.height>=0,i=n.left<=l&&n.left+n.width>=0;return r&&i}function Ul(e=document.documentElement){document.fullscreenElement?document.exitFullscreen():e.requestFullscreen().catch(n=>{console.error("进入全屏失败:",n)})}function Wl(e=document.documentElement){document.fullscreenElement||e.requestFullscreen().catch(n=>{console.error("进入全屏失败:",n)})}function Zl(){document.fullscreenElement&&document.exitFullscreen()}function Gl(){return!!document.fullscreenElement}function Jl(e,n){e&&e.classList.add(n)}function Hl(e,n){e&&e.classList.remove(n)}function Xl(e,n){e&&e.classList.toggle(n)}function Kl(e,n){return e?e.classList.contains(n):!1}function ql(e){return e?Array.from(e.classList):[]}function e0(e){return e?e.getBoundingClientRect():null}function t0(e){return e?e.offsetWidth:0}function n0(e){return e?e.offsetHeight:0}function o0(e,n=document){return n.querySelector(e)}function l0(e,n=document){return Array.from(n.querySelectorAll(e))}function r0(e,n){return e?e.getAttribute(n):null}function i0(e,n,o){e&&e.setAttribute(n,o)}function a0(e,n){e&&e.removeAttribute(n)}function s0(e,n){return e?e.hasAttribute(n):!1}function c0(e,n){return e&&window.getComputedStyle(e)[n]||""}function d0(e,n){e&&Object.keys(n).forEach(o=>{e.style[o]=n[o]})}function u0(){return{width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function rt(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)}function f0(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)}function g0(e=0){const{y:n}=lt(),o=window.innerHeight||document.documentElement.clientHeight,l=rt();return n+o>=l-e}const p0=Object.freeze(Object.defineProperty({__proto__:null,addClass:Jl,copyToClipboard:Bl,downloadFile:ke,downloadJSON:Ol,downloadText:Fl,enterFullscreen:Wl,exitFullscreen:Zl,getAttribute:r0,getClasses:ql,getElementHeight:n0,getElementRect:e0,getElementWidth:t0,getOffsetTop:Pl,getPageHeight:rt,getPageWidth:f0,getScrollPosition:lt,getStyle:c0,getWindowSize:u0,hasAttribute:s0,hasClass:Kl,isFullscreen:Gl,isInViewport:Rl,isPartiallyVisible:Yl,isScrolledToBottom:g0,querySelector:o0,querySelectorAll:l0,readFromClipboard:xl,removeAttribute:a0,removeClass:Hl,scrollTo:Qe,scrollToBottom:Vl,scrollToElement:_l,scrollToTop:$l,setAttribute:i0,setStyle:d0,toggleClass:Xl,toggleFullscreen:Ul},Symbol.toStringTag,{value:"Module"}));function m0(e,n){return Math.floor(Math.random()*(n-e+1))+e}function w0(e,n,o=2){const l=Math.random()*(n-e)+e;return Number(l.toFixed(o))}function h0(e,n,o=1){const l=[];if(o===0)return l;if(o>0)for(let r=e;r<=n;r+=o)l.push(r);else for(let r=e;r>=n;r+=o)l.push(r);return l}function y0(e,n,o){return Math.min(Math.max(e,n),o)}function M0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,Math.max(o,l));return(e*r+n*r)/r}function v0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,Math.max(o,l));return(e*r-n*r)/r}function D0(e,n){const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length,r=Math.pow(10,o+l);return e*Math.pow(10,o)*n*Math.pow(10,l)/r}function C0(e,n){if(n===0)return console.warn("Division by zero"),1/0;const o=(e.toString().split(".")[1]||"").length,l=(n.toString().split(".")[1]||"").length;return e*Math.pow(10,l)/(n*Math.pow(10,o))*Math.pow(10,o-l)}function Ie(e,n=0){return Math.round(e*Math.pow(10,n))/Math.pow(10,n)}function N0(e,n=0){return Math.ceil(e*Math.pow(10,n))/Math.pow(10,n)}function k0(e,n=0){return Math.floor(e*Math.pow(10,n))/Math.pow(10,n)}function Q0(e,n=0){return Ie(e,n).toFixed(n)}function I0(e,n,o=2){return n===0?0:Ie(e/n*100,o)}function A0(e){return e/100}function j0(e){return e*100}function T0(e,n=2){return String(e).padStart(n,"0")}function b0(e){const n=["零","一","二","三","四","五","六","七","八","九"],o=["","十","百","千","万"];if(e===0)return"零";if(e<0||e>99999)return String(e);const l=String(e);let r="",i=0;for(let a=0;a<l.length;a++){const s=parseInt(l[a]),c=o[l.length-1-a];s===0?i++:(i>0&&(r+="零"),r+=n[s]+c,i=0)}return e>=10&&e<20&&(r=r.replace("一十","十")),r}function L0(e){const n=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],o=["","拾","佰","仟","万","拾","佰","仟","亿"],l=["角","分"];if(e===0)return"零元整";const[r,i=""]=e.toFixed(2).split(".");let a="";for(let s=0;s<r.length;s++){const c=parseInt(r[s]),d=o[r.length-1-s];c!==0?a+=n[c]+d:a&&!a.endsWith("零")&&(a+="零")}if(a=a.replace(/零+$/,"")+"元",i&&i!=="00")for(let s=0;s<Math.min(i.length,2);s++){const c=parseInt(i[s]);c!==0&&(a+=n[c]+l[s])}else a+="整";return a}function S0(e){return e%2===0}function z0(e){return e%2!==0}function E0(e){if(e<2)return!1;if(e===2)return!0;if(e%2===0)return!1;for(let n=3;n<=Math.sqrt(e);n+=2)if(e%n===0)return!1;return!0}function B0(e,n,o){return e>=n&&e<=o}function x0(e){return Math.abs(e)}function O0(e){return Math.sqrt(e)}function F0(e,n){return Math.pow(e,n)}function it(e){return e<0?NaN:e===0||e===1?1:e*it(e-1)}function Ae(e,n){return n===0?e:Ae(n,e%n)}function _0(e,n){return e*n/Ae(e,n)}const $0=Object.freeze(Object.defineProperty({__proto__:null,abs:x0,add:M0,ceil:N0,clamp:y0,decimalToPercent:j0,divide:C0,factorial:it,floor:k0,gcd:Ae,inRange:B0,isEven:S0,isOdd:z0,isPrime:E0,lcm:_0,multiply:D0,padZero:T0,percentToDecimal:A0,percentage:I0,pow:F0,random:m0,randomFloat:w0,range:h0,round:Ie,sqrt:O0,subtract:v0,toChineseMoney:L0,toChineseNumber:b0,toFixed:Q0},Symbol.toStringTag,{value:"Module"}));function se(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(Array.isArray(e))return e.map(o=>se(o));const n={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=se(e[o]));return n}function V0(e){return e===null||typeof e!="object"?e:Array.isArray(e)?[...e]:{...e}}function at(...e){if(e.length===0)return{};if(e.length===1)return e[0];const n={};return e.forEach(o=>{!o||typeof o!="object"||Object.keys(o).forEach(l=>{const r=o[l],i=n[l];r&&typeof r=="object"&&!Array.isArray(r)&&i&&typeof i=="object"&&!Array.isArray(i)?n[l]=at(i,r):n[l]=se(r)})}),n}function P0(...e){return Object.assign({},...e)}function R0(e,n){if(!e||typeof e!="object")return{};const o={};return n.forEach(l=>{l in e&&(o[l]=e[l])}),o}function Y0(e,n){if(!e||typeof e!="object")return{};const o={...e};return n.forEach(l=>{delete o[l]}),o}function U0(e,n,o){if(!e||typeof e!="object")return o;const l=n.split(".");let r=e;for(const i of l)if(r&&typeof r=="object"&&i in r)r=r[i];else return o;return r!==void 0?r:o}function st(e,n,o){if(!e||typeof e!="object")return;const l=n.split("."),r=l.pop();if(!r)return;let i=e;for(const a of l)(!(a in i)||typeof i[a]!="object")&&(i[a]={}),i=i[a];i[r]=o}function W0(e,n){if(!e||typeof e!="object")return!1;const o=n.split(".");let l=e;for(const r of o)if(l&&typeof l=="object"&&r in l)l=l[r];else return!1;return!0}function Z0(e){return e==null?!0:Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function G0(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return n===Object.prototype||n===null}function he(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e===null||n===null)return!1;if(e instanceof Date&&n instanceof Date)return e.getTime()===n.getTime();if(e instanceof RegExp&&n instanceof RegExp)return e.toString()===n.toString();if(Array.isArray(e)&&Array.isArray(n))return e.length!==n.length?!1:e.every((r,i)=>he(r,n[i]));const o=Object.keys(e),l=Object.keys(n);return o.length!==l.length?!1:o.every(r=>he(e[r],n[r]))}function ye(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>ye(o));const n={};return Object.keys(e).forEach(o=>{const l=o.replace(/_([a-z])/g,(i,a)=>a.toUpperCase()),r=e[o];n[l]=typeof r=="object"?ye(r):r}),n}function Me(e){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(o=>Me(o));const n={};return Object.keys(e).forEach(o=>{const l=o.replace(/([A-Z])/g,"_$1").toLowerCase(),r=e[o];n[l]=typeof r=="object"?Me(r):r}),n}function J0(e){return!e||typeof e!="object"?"":Object.keys(e).filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{const o=e[n];return Array.isArray(o)?o.map(l=>`${encodeURIComponent(n)}=${encodeURIComponent(l)}`).join("&"):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&")}function H0(e){if(!e)return{};const n=e.startsWith("?")?e.slice(1):e,o={};return n.split("&").forEach(l=>{const[r,i]=l.split("=").map(decodeURIComponent);r&&(r in o?Array.isArray(o[r])?o[r].push(i):o[r]=[o[r],i]:o[r]=i)}),o}function ct(e,n){if(!e||typeof e!="object")return{};const o={};return Object.keys(e).forEach(l=>{n(e[l],l)&&(o[l]=e[l])}),o}function X0(e,n=!0){return ct(e,o=>!(o==null||n&&o===""))}function dt(e,n=""){if(!e||typeof e!="object")return{};const o={};return Object.keys(e).forEach(l=>{const r=n?`${n}.${l}`:l,i=e[l];i&&typeof i=="object"&&!Array.isArray(i)?Object.assign(o,dt(i,r)):o[r]=i}),o}function K0(e){if(!e||typeof e!="object")return{};const n={};return Object.keys(e).forEach(o=>{st(n,o,e[o])}),n}function q0(e){if(!e||typeof e!="object")return{};const n={};return Object.keys(e).forEach(o=>{const l=e[o];n[String(l)]=o}),n}function e1(e){return!e||typeof e!="object"?[]:Object.values(e)}function t1(e){return!e||typeof e!="object"?[]:Object.keys(e)}function n1(e){return!e||typeof e!="object"?[]:Object.entries(e)}const o1=Object.freeze(Object.defineProperty({__proto__:null,deepClone:se,deepMerge:at,entries:n1,filterValues:ct,flattenObject:dt,fromQueryString:H0,get:U0,has:W0,invert:q0,isEmpty:Z0,isEqual:he,isPlainObject:G0,keys:t1,keysToCamelCase:ye,keysToUnderlineCase:Me,omit:Y0,pick:R0,removeEmpty:X0,set:st,shallowClone:V0,shallowMerge:P0,toQueryString:J0,unflattenObject:K0,values:e1},Symbol.toStringTag,{value:"Module"}));function l1(e,n=300,o=!1){let l=null,r=!1;const i=function(...a){l&&clearTimeout(l),o&&!r?(e.apply(this,a),r=!0):l=setTimeout(()=>{e.apply(this,a),r=!1,l=null},n)};return i.cancel=()=>{l&&(clearTimeout(l),l=null),r=!1},i}function r1(e,n=300,o){const{leading:l=!0,trailing:r=!0}=o||{};let i=null,a=0,s=null;const c=function(...d){const g=Date.now();!a&&!l&&(a=g);const u=n-(g-a);s=d,u<=0||u>n?(i&&(clearTimeout(i),i=null),a=g,e.apply(this,d),s=null):!i&&r&&(i=setTimeout(()=>{a=l?Date.now():0,i=null,s&&(e.apply(this,s),s=null)},u))};return c.cancel=()=>{i&&(clearTimeout(i),i=null),a=0,s=null},c}function i1(e){let n=!1,o;return function(...l){return n||(n=!0,o=e.apply(this,l)),o}}function ut(e){return new Promise(n=>setTimeout(n,e))}function ft(e){return ut(e)}async function a1(e,n){const{times:o=3,delay:l=1e3,onRetry:r}=n||{};let i;for(let a=0;a<o;a++)try{return await e()}catch(s){i=s,r&&r(s,a+1),a<o-1&&await ft(l)}throw i}function s1(e,n){return Promise.race([e,new Promise((o,l)=>setTimeout(()=>l(new Error("Timeout")),n))])}function c1(e,n){const o=new Map,l=function(...r){const i=n?n(...r):JSON.stringify(r);if(o.has(i))return o.get(i);const a=e.apply(this,r);return o.set(i,a),a};return l.cache=o,l}function d1(e){e.cache&&e.cache.clear()}function u1(e,n=100){let o=[],l=null;return function(r){o.push(r),l&&clearTimeout(l),l=setTimeout(()=>{e(o),o=[],l=null},n)}}async function f1(e,n){const o=[],l=[];for(const r of e){const i=r().then(a=>{o.push(a),l.splice(l.indexOf(i),1)});l.push(i),l.length>=n&&await Promise.race(l)}return await Promise.all(l),o}async function g1(e){const n=[];for(const o of e){const l=await o();n.push(l)}return n}function p1(e,n){return function(...o){const l=performance.now(),r=e.apply(this,o),a=(performance.now()-l).toFixed(2);return console.log(`${n||e.name||"Function"}: ${a}ms`),r}}function m1(e,n){return async function(...o){const l=performance.now(),r=await e.apply(this,o),a=(performance.now()-l).toFixed(2);return console.log(`${n||e.name||"Function"}: ${a}ms`),r}}function w1(e){const n=new Map;return async function(...o){const l=JSON.stringify(o);if(n.has(l))return n.get(l);const r=e.apply(this,o).finally(()=>{n.delete(l)});return n.set(l,r),r}}function h1(e){let n=null;const o=function(...l){n===null&&(n=requestAnimationFrame(()=>{e.apply(this,l),n=null}))};return o.cancel=()=>{n!==null&&(cancelAnimationFrame(n),n=null)},o}const y1=Object.freeze(Object.defineProperty({__proto__:null,batch:u1,clearCache:d1,debounce:l1,dedupe:w1,delay:ut,measureTime:p1,measureTimeAsync:m1,memoize:c1,once:i1,promiseLimit:f1,promiseSerial:g1,rafThrottle:h1,retry:a1,sleep:ft,throttle:r1,withTimeout:s1},Symbol.toStringTag,{value:"Module"}));function J(e,n){return o=>{const l=String(o||"").trim();return!l||e(l)?!0:typeof n=="function"?n():n}}function gt(e){return e?/^1[3-9]\d{9}$/.test(e):!1}function pt(e){return e?/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e):!1}function mt(e){return e?/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(e):!1}function wt(e){return e?/^\d{16,19}$/.test(e):!1}function ht(e){return e?/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4,5}[A-HJ-NP-Z0-9挂学警港澳]$/.test(e):!1}function yt(e){return e?/^(https?:\/\/)([a-zA-Z0-9.-]+)(:[0-9]+)?(\/.*)?$/.test(e):!1}function Mt(e){return e?/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e):!1}function M1(e){return e?/^[\u4e00-\u9fa5]+$/.test(e):!1}function v1(e){return e?/[\u4e00-\u9fa5]/.test(e):!1}function D1(e){return e?/^\d+$/.test(e):!1}function C1(e){return e?/^-?\d+\.?\d*$/.test(e):!1}function N1(e){return e?/^[1-9]\d*$/.test(e):!1}function k1(e){return!e&&e!=="0"?!1:/^(0|[1-9]\d*)$/.test(e)}function Q1(e){return e?/^[1-9]\d{4,10}$/.test(e):!1}function I1(e){return e?/^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/.test(e):!1}function A1(e){return e?/^[1-9]\d{5}$/.test(e):!1}function j1(e){return e?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(e):!1}function T1(e){return e?/^(?=.*[a-zA-Z])(?=.*\d)[a-zA-Z\d@$!%*?&]{6,}$/.test(e):!1}function b1(e){return e?/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(e):!1}function L1(e){if(!e)return!1;const n=Number(e);return/^\d+$/.test(e)&&n>=1&&n<=65535}function S1(e){return e?/^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^::$|^([\da-fA-F]{1,4}:){1,6}:$|^:((:[\da-fA-F]{1,4}){1,6})$/.test(e):!1}function z1(e){return e?/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e):!1}function E1(e="请输入有效的手机号"){return J(gt,e)}function B1(e="请输入有效的邮箱地址"){return J(pt,e)}function x1(e="请输入有效的身份证号"){return J(mt,e)}function O1(e="请输入有效的银行卡号"){return J(wt,e)}function F1(e="请输入有效的车牌号"){return J(ht,e)}function _1(e="请输入有效的 URL 地址"){return J(yt,e)}function $1(e="请输入有效的 IP 地址"){return J(Mt,e)}const V1=Object.freeze(Object.defineProperty({__proto__:null,bankCardRule:O1,carNumberRule:F1,createFormRule:J,emailRule:B1,hasChinese:v1,idCardRule:x1,ipRule:$1,isBankCard:wt,isCarNumber:ht,isChinese:M1,isEmail:pt,isHexColor:z1,isIP:Mt,isIPv6:S1,isIdCard:mt,isMac:b1,isMediumPassword:T1,isNonNegativeInteger:k1,isNumber:D1,isNumeric:C1,isPhone:gt,isPort:L1,isPositiveInteger:N1,isPostcode:A1,isQQ:Q1,isStrongPassword:j1,isUrl:yt,isWechat:I1,phoneRule:E1,urlRule:_1},Symbol.toStringTag,{value:"Module"}));function P1(e){return!e||e.length!==11?e:e.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")}function R1(e){if(!e||e.length<8)return e;const n=e.length;return e.substring(0,3)+"*".repeat(n-7)+e.substring(n-4)}function Y1(e){return!e||e.length===0||e.length===1?e:e.length===2?e[0]+"*":e.substring(0,e.length-1)+"*"}function U1(e){if(!e||e.length<8)return e;const n=e.length,o=e.substring(0,4),l=e.substring(n-4);return`${o} **** **** ${l}`}function W1(e){if(!e||!e.includes("@"))return e;const[n,o]=e.split("@");return n.length<=1?e:n[0]+"***@"+o}function Z1(e,n=6){return!e||e.length<=n?e:e.substring(0,n)+"***"}function G1(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}function J1(e){return e&&e.replace(/\b\w/g,n=>n.toUpperCase())}function H1(e){return e&&e.replace(/_([a-z])/g,(n,o)=>o.toUpperCase())}function X1(e){return e&&e.replace(/([A-Z])/g,"_$1").toLowerCase()}function K1(e){return e&&e.replace(/([A-Z])/g,"-$1").toLowerCase()}function q1(e){if(e==null||e==="")return"";const o=String(e).split(".");return o[0]=o[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),o.join(".")}function er(e,n){const{currency:o="¥",decimals:l=2,thousandsSeparator:r=",",decimalSeparator:i="."}=n||{},a=typeof e=="string"?parseFloat(e):e;if(isNaN(a))return e.toString();const s=a.toFixed(l),[c,d]=s.split(".");let u=c.replace(/\B(?=(\d{3})+(?!\d))/g,r);return l>0&&d&&(u+=i+d),o+u}function tr(e,n=2){if(e===0)return"0 B";if(!e)return"";const o=1024,l=["B","KB","MB","GB","TB"],r=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,r)).toFixed(n))+" "+l[r]}function nr(e){return e&&e.replace(/\s/g,"").replace(/(\d{4})(?=\d)/g,"$1 ")}function or(e){return e&&e.replace(/\s/g,"").replace(/(\d{3})(\d{4})(\d{4})/,"$1 $2 $3")}function lr(e=8,n="alphanumeric"){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",l="0123456789";let i=o+l;n==="alpha"&&(i=o),n==="number"&&(i=l);let a="";for(let s=0;s<e;s++)a+=i.charAt(Math.floor(Math.random()*i.length));return a}function rr(e){const n=Date.now(),o=Math.random().toString(36).substring(2,8);return e?`${e}_${n}_${o}`:`${n}_${o}`}function ir(e,n,o="..."){return!e||e.length<=n?e:e.substring(0,n)+o}function ar(e){return e&&e.replace(/<[^>]*>/g,"")}function sr(e){if(!e)return e;const n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"};return e.replace(/[&<>"'/]/g,o=>n[o])}function cr(e){if(!e)return e;const n={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/"};return e.replace(/&(amp|lt|gt|quot|#x27|#x2F);/g,o=>n[o])}function dr(e){return e==null||e.trim()===""}function ur(e){return e&&e.split("").reverse().join("")}function fr(e,n){return!e||n<=0?"":e.repeat(n)}function gr(e,n,o=" "){return e||(e=""),e.padStart(n,o)}function pr(e,n,o=" "){return e||(e=""),e.padEnd(n,o)}const mr=Object.freeze(Object.defineProperty({__proto__:null,addressDesensitize:Z1,bankCardDesensitize:U1,capitalize:G1,capitalizeWords:J1,emailDesensitize:W1,escapeHtml:sr,formatBankCard:nr,formatFileSize:tr,formatMoney:er,formatNumber:q1,formatPhone:or,generateUUID:rr,idCardDesensitize:R1,isEmpty:dr,nameDesensitize:Y1,padEnd:pr,padStart:gr,phoneDesensitize:P1,randomString:lr,removeHtmlTags:ar,repeat:fr,reverse:ur,toCamelCase:H1,toKebabCase:K1,toUnderlineCase:X1,truncate:ir,unescapeHtml:cr},Symbol.toStringTag,{value:"Module"}));function W(e){const n=e||(typeof window<"u"?window.location.href:"");if(!n)return{};const o=n.includes("?")?n.split("?")[1].split("#")[0]:"";if(!o)return{};const l={};return o.split("&").forEach(r=>{if(!r)return;const[i,a=""]=r.split("=").map(decodeURIComponent);i&&(i in l?Array.isArray(l[i])?l[i].push(a):l[i]=[l[i],a]:l[i]=a)}),l}function q(e){return!e||typeof e!="object"?"":Object.keys(e).filter(n=>e[n]!==void 0&&e[n]!==null).map(n=>{const o=e[n];return Array.isArray(o)?o.map(l=>`${encodeURIComponent(n)}=${encodeURIComponent(l)}`).join("&"):`${encodeURIComponent(n)}=${encodeURIComponent(o)}`}).join("&")}function wr(e,n){const l=W(n)[e];return l===void 0?null:Array.isArray(l)?l[0]||null:l}function hr(e,n){const l=W(n)[e];return l===void 0?[]:Array.isArray(l)?l:[l]}function yr(e,n="push"){if(typeof window>"u"||!window.history)return;const l={...W(),...e};Object.keys(l).forEach(a=>{(l[a]===null||l[a]===void 0)&&delete l[a]});const r=q(l),i=r?`${window.location.pathname}?${r}`:window.location.pathname;n==="push"?window.history.pushState(null,"",i):window.history.replaceState(null,"",i)}function Mr(e,n="push"){if(typeof window>"u"||!window.history)return;const o=W();e.forEach(i=>{delete o[i]});const l=q(o),r=l?`${window.location.pathname}?${l}`:window.location.pathname;n==="push"?window.history.pushState(null,"",r):window.history.replaceState(null,"",r)}function vr(e="push"){if(typeof window>"u"||!window.history)return;const n=window.location.pathname;e==="push"?window.history.pushState(null,"",n):window.history.replaceState(null,"",n)}function Dr(...e){return e.length===0?"":e.map((n,o)=>o===0?n.replace(/\/+$/,""):o===e.length-1?n.replace(/^\/+/,""):n.replace(/^\/+|\/+$/g,"")).filter(Boolean).join("/")}function Cr(e){if(!e)return{protocol:"",username:"",password:"",hostname:"",port:"",pathname:"",search:"",hash:"",host:"",origin:"",href:"",params:{}};try{const n=new URL(e);return{protocol:n.protocol,username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:n.search,hash:n.hash,host:n.host,origin:n.origin,href:n.href,params:W(e)}}catch{return{protocol:"",username:"",password:"",hostname:"",port:"",pathname:e.split("?")[0].split("#")[0],search:e.includes("?")?"?"+e.split("?")[1].split("#")[0]:"",hash:e.includes("#")?"#"+e.split("#")[1]:"",host:"",origin:"",href:e,params:W(e)}}}function Nr(e){const{protocol:n="https",hostname:o="",port:l="",pathname:r="",params:i={},hash:a=""}=e;if(!o)return r;let s=`${n}://${o}`;l&&(s+=`:${l}`),r&&(s+=r.startsWith("/")?r:`/${r}`);const c=q(i);return c&&(s+=`?${c}`),a&&(s+=a.startsWith("#")?a:`#${a}`),s}function kr(e){return e?/^(https?:)?\/\//.test(e):!1}function Qr(e){return e?e.startsWith("/"):!1}function Ir(e,n){try{const o=new URL(e),l=new URL(n);return o.origin===l.origin}catch{return!1}}function Ar(e){return encodeURIComponent(e)}function jr(e){try{return decodeURIComponent(e)}catch{return e}}function Tr(e){if(!e)return"";try{return encodeURI(decodeURI(e))}catch{return encodeURI(e)}}function br(e){if(!e)return"";try{return decodeURI(e)}catch{return e}}function Lr(e,n){if(!e)return"";if(!n||Object.keys(n).length===0)return e;const[o,l]=e.split("#"),[r,i]=o.split("?"),s={...i?W("?"+i):{},...n},c=q(s);let d=r;return c&&(d+=`?${c}`),l&&(d+=`#${l}`),d}function Sr(e,n){if(!e)return"";if(!n||n.length===0)return e;const[o,l]=e.split("#"),[r,i]=o.split("?");if(!i)return e;const a=W("?"+i);n.forEach(d=>{delete a[d]});const s=q(a);let c=r;return s&&(c+=`?${s}`),l&&(c+=`#${l}`),c}function vt(e){try{return new URL(e).hostname}catch{return""}}function zr(e){const n=vt(e);if(!n)return"";const o=n.split(".");return o.length<=2?n:o.slice(-2).join(".")}function Er(){return typeof window>"u"?"":window.location.href}function Br(){return typeof window>"u"?"":window.location.pathname}function xr(){return typeof window>"u"?{}:W(window.location.search)}function Or(){return typeof window>"u"?"":window.location.hash.replace(/^#/,"")}const Fr=Object.freeze(Object.defineProperty({__proto__:null,addQueryParams:Lr,buildUrl:Nr,clearQueryParams:vr,decodeParam:jr,encodeParam:Ar,getCurrentHash:Or,getCurrentPath:Br,getCurrentQuery:xr,getCurrentUrl:Er,getDomain:vt,getQueryParam:wr,getQueryParams:hr,getRootDomain:zr,isAbsolutePath:Qr,isExternalLink:kr,isSameOrigin:Ir,joinUrl:Dr,parseQuery:W,parseUrl:Cr,removeQueryParams:Mr,removeQueryParamsFromUrl:Sr,safeDecodeUrl:br,safeEncodeUrl:Tr,stringifyQuery:q,updateQueryParams:yr},Symbol.toStringTag,{value:"Module"})),_r={...fl,array:El,dom:p0,number:$0,object:o1,perf:y1,regex:V1,string:mr,url:Fr};exports.twcptResolver=ze.twcptResolver;exports.twcptResolverWithOptions=ze.twcptResolverWithOptions;exports.DialogProvider=ve;exports.JTWBtn=oe;exports.JTWCheckbox=M2;exports.JTWCheckboxGroup=C2;exports.JTWConfirmDialog=xe;exports.JTWConfirmDialogIcon=me;exports.JTWDatePicker=bn;exports.JTWDialog=$e;exports.JTWDialogFooterMode=_e;exports.JTWDialogPosition=Oe;exports.JTWDialogSize=Fe;exports.JTWDropdownBtn=St;exports.JTWForm=a2;exports.JTWFormItem=d2;exports.JTWFormLabel=l2;exports.JTWInput=g2;exports.JTWMessages=Be;exports.JTWRadio=Q2;exports.JTWRadioGroup=j2;exports.JTWSelect=w2;exports.JTWStatusImg=ce;exports.JTWTable=Zn;exports.JTWTreeSelect=Xo;exports.JTWTreeSelectBtn=wn;exports.JTWTreeSelectInput=Qn;exports.PAGE_ACTION_PERMISSION_KEY=We;exports.PAGE_PERMISSION_KEY=Ue;exports.composeIconMapFn=ol;exports.dialogConfirm=Pe;exports.getLocale=Ye;exports.getProjectPermissionId=el;exports.getTwcptColors=q2;exports.getTwcptConfig=tl;exports.jwConfirmDialog=Pe;exports.jwDialog=po;exports.jwMessages=Ve;exports.setLocale=ae;exports.t=Re;exports.twTool=_r;exports.twcptIconMapFn=nl;exports.twcptInit=X2;exports.useBizRequest=il;exports.useI18n=H2;exports.usePageActionPermissionSync=rl;exports.usePagePermissionSync=ll;