1 |
- System.register(["./index-legacy-a314c7dd.js","./Checker-legacy-855ee8e8.js"],(function(e,l){"use strict";var a,o,n,c,d,t,u,r,s,i,p,m,h,g,b,V,k,v;return{setters:[e=>{a=e.c,o=e.d,n=e.aa,c=e.w,d=e.Z,t=e.a4,u=e.a,r=e.n,s=e.ab,i=e.ac,p=e.t,m=e.ad,h=e.e,g=e.ae,b=e.h,V=e.k},e=>{k=e.c,v=e.s}],execute:function(){const[l,f]=a("checkbox-group"),x={max:r,disabled:Boolean,iconSize:r,direction:String,modelValue:s(),checkedColor:String},G=Symbol(l);var y=o({name:l,props:x,emits:["change","update:modelValue"],setup(e,{emit:l,slots:a}){const{children:o,linkChildren:r}=n(G),s=e=>l("update:modelValue",e);return c((()=>e.modelValue),(e=>l("change",e))),d({toggleAll:(e={})=>{"boolean"==typeof e&&(e={checked:e});const{checked:l,skipDisabled:a}=e,n=o.filter((e=>!!e.props.bindGroup&&(e.props.disabled&&a?e.checked.value:null!=l?l:!e.checked.value))).map((e=>e.name));s(n)}}),t((()=>e.modelValue)),r({props:e,updateValue:s}),()=>{var l;return u("div",{class:f([e.direction])},[null==(l=a.default)?void 0:l.call(a)])}}});const[S,C]=a("checkbox"),j=i({},k,{bindGroup:p});var O=o({name:S,props:j,emits:["change","update:modelValue"],setup(e,{emit:l,slots:a}){const{parent:o}=m(G),n=h((()=>o&&e.bindGroup?-1!==o.props.modelValue.indexOf(e.name):!!e.modelValue)),r=(a=!n.value)=>{o&&e.bindGroup?(l=>{const{name:a}=e,{max:n,modelValue:c}=o.props,d=c.slice();if(l)n&&d.length>=+n||d.includes(a)||(d.push(a),e.bindGroup&&o.updateValue(d));else{const l=d.indexOf(a);-1!==l&&(d.splice(l,1),e.bindGroup&&o.updateValue(d))}})(a):l("update:modelValue",a)};return c((()=>e.modelValue),(e=>l("change",e))),d({toggle:r,props:e,checked:n}),t((()=>e.modelValue)),()=>u(v,b({bem:C,role:"checkbox",parent:o,checked:n.value,onToggle:r},e),g(a,["default","icon"]))}});e("a",V(O)),e("C",V(y))}}}));
|