1import{c as k}from"./Be1fzYNM.js";import{aj as x,b9 as f,ao as m,aw as h,c as y,b as d,e as s,G as r,ay as g,k as b,f as v,I as C}from"./DrikBq3t.js";import{s as w}from"./49ajo80O.js";import{s as P}from"./CBCultT-.js";import{s as S}from"./8H5Ur2AG.js";import"./CcQrEp38.js";import"./A1gTIwt8.js";import"./CJ2fX7p2.js";var z=` 2 .p-checkbox { 3 position: relative; 4 display: inline-flex; 5 user-select: none; 6 vertical-align: bottom; 7 width: dt('checkbox.width'); 8 height: dt('checkbox.height'); 9 } 10 11 .p-checkbox-input { 12 cursor: pointer; 13 appearance: none; 14 position: absolute; 15 inset-block-start: 0; 16 inset-inline-start: 0; 17 width: 100%; 18 height: 100%; 19 padding: 0; 20 margin: 0; 21 opacity: 0; 22 z-index: 1; 23 outline: 0 none; 24 border: 1px solid transparent; 25 border-radius: dt('checkbox.border.radius'); 26 } 27 28 .p-checkbox-box { 29 display: flex; 30 justify-content: center; 31 align-items: center; 32 border-radius: dt('checkbox.border.radius'); 33 border: 1px solid dt('checkbox.border.color'); 34 background: dt('checkbox.background'); 35 width: dt('checkbox.width'); 36 height: dt('checkbox.height'); 37 transition: 38 background dt('checkbox.transition.duration'), 39 color dt('checkbox.transition.duration'), 40 border-color dt('checkbox.transition.duration'), 41 box-shadow dt('checkbox.transition.duration'), 42 outline-color dt('checkbox.transition.duration'); 43 outline-color: transparent; 44 box-shadow: dt('checkbox.shadow'); 45 } 46 47 .p-checkbox-icon { 48 transition-duration: dt('checkbox.transition.duration'); 49 color: dt('checkbox.icon.color'); 50 font-size: dt('checkbox.icon.size'); 51 width: dt('checkbox.icon.size'); 52 height: dt('checkbox.icon.size'); 53 } 54 55 .p-checkbox:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { 56 border-color: dt('checkbox.hover.border.color'); 57 } 58 59 .p-checkbox-checked .p-checkbox-box { 60 border-color: dt('checkbox.checked.border.color'); 61 background: dt('checkbox.checked.background'); 62 } 63 64 .p-checkbox-checked .p-checkbox-icon { 65 color: dt('checkbox.icon.checked.color'); 66 } 67 68 .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { 69 background: dt('checkbox.checked.hover.background'); 70 border-color: dt('checkbox.checked.hover.border.color'); 71 } 72 73 .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-icon { 74 color: dt('checkbox.icon.checked.hover.color'); 75 } 76 77 .p-checkbox:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box { 78 border-color: dt('checkbox.focus.border.color'); 79 box-shadow: dt('checkbox.focus.ring.shadow'); 80 outline: dt('checkbox.focus.ring.width') dt('checkbox.focus.ring.style') dt('checkbox.focus.ring.color'); 81 outline-offset: dt('checkbox.focus.ring.offset'); 82 } 83 84 .p-checkbox-checked:not(.p-disabled):has(.p-checkbox-input:focus-visible) .p-checkbox-box { 85 border-color: dt('checkbox.checked.focus.border.color'); 86 } 87 88 .p-checkbox.p-invalid > .p-checkbox-box { 89 border-color: dt('checkbox.invalid.border.color'); 90 } 91 92 .p-checkbox.p-variant-filled .p-checkbox-box { 93 background: dt('checkbox.filled.background'); 94 } 95 96 .p-checkbox-checked.p-variant-filled .p-checkbox-box { 97 background: dt('checkbox.checked.background'); 98 } 99 100 .p-checkbox-checked.p-variant-filled:not(.p-disabled):has(.p-checkbox-input:hover) .p-checkbox-box { 101 background: dt('checkbox.checked.hover.background'); 102 } 103 104 .p-checkbox.p-disabled { 105 opacity: 1; 106 } 107 108 .p-checkbox.p-disabled .p-checkbox-box { 109 background: dt('checkbox.disabled.background'); 110 border-color: dt('checkbox.checked.disabled.border.color'); 111 } 112 113 .p-checkbox.p-disabled .p-checkbox-box .p-checkbox-icon { 114 color: dt('checkbox.icon.disabled.color'); 115 } 116 117 .p-checkbox-sm, 118 .p-checkbox-sm .p-checkbox-box { 119 width: dt('checkbox.sm.width'); 120 height: dt('checkbox.sm.height'); 121 } 122 123 .p-checkbox-sm .p-checkbox-icon { 124 font-size: dt('checkbox.icon.sm.size'); 125 width: dt('checkbox.icon.sm.size'); 126 height: dt('checkbox.icon.sm.size'); 127 } 128 129 .p-checkbox-lg, 130 .p-checkbox-lg .p-checkbox-box { 131 width: dt('checkbox.lg.width'); 132 height: dt('checkbox.lg.height'); 133 } 134 135 .p-checkbox-lg .p-checkbox-icon { 136 font-size: dt('checkbox.icon.lg.size'); 137 width: dt('checkbox.icon.lg.size'); 138 height: dt('checkbox.icon.lg.size'); 139 } 140`,B={root:function(n){var o=n.instance,c=n.props;return["p-checkbox p-component",{"p-checkbox-checked":o.checked,"p-disabled":c.disabled,"p-invalid":o.$pcCheckboxGroup?o.$pcCheckboxGroup.$invalid:o.$invalid,"p-variant-filled":o.$variant==="filled","p-checkbox-sm p-inputfield-sm":c.size==="small","p-checkbox-lg p-inputfield-lg":c.size==="large"}]},box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon"},_=x.extend({name:"checkbox",style:z,classes:B}),I={name:"BaseCheckbox",extends:S,props:{value:null,binary:Boolean,indeterminate:{type:Boolean,default:!1},trueValue:{type:null,default:!0},falseValue:{type:null,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},tabindex:{type:Number,default:null},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null}},style:_,provide:function(){return{$pcCheckbox:this,$parentInstance:this}}};function a(e){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},a(e)}function A(e,n,o){return(n=G(n))in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}function G(e){var n=T(e,"string");return a(n)=="symbol"?n:n+""}function T(e,n){if(a(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var c=o.call(e,n);if(a(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function O(e){return $(e)||F(e)||N(e)||j()}function j(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 141In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(e,n){if(e){if(typeof e=="string")return l(e,n);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?l(e,n):void 0}}function F(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $(e){if(Array.isArray(e))return l(e)}function l(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,c=Array(n);o<n;o++)c[o]=e[o];return c}var V={name:"Checkbox",extends:I,inheritAttrs:!1,emits:["change","focus","blur","update:indeterminate"],inject:{$pcCheckboxGroup:{default:void 0}},data:function(){return{d_indeterminate:this.indeterminate}},watch:{indeterminate:function(n){this.d_indeterminate=n}},methods:{getPTOptions:function(n){var o=n==="root"?this.ptmi:this.ptm;return o(n,{context:{checked:this.checked,indeterminate:this.d_indeterminate,disabled:this.disabled}})},onChange:function(n){var o=this;if(!this.disabled&&!this.readonly){var c=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value,i;this.binary?i=this.d_indeterminate?this.trueValue:this.checked?this.falseValue:this.trueValue:this.checked||this.d_indeterminate?i=c.filter(function(t){return!m(t,o.value)}):i=c?[].concat(O(c),[this.value]):[this.value],this.d_indeterminate&&(this.d_indeterminate=!1,this.$emit("update:indeterminate",this.d_indeterminate)),this.$pcCheckboxGroup?this.$pcCheckboxGroup.writeValue(i,n):this.writeValue(i,n),this.$emit("change",n)}},onFocus:function(n){this.$emit("focus",n)},onBlur:function(n){var o,c;this.$emit("blur",n),(o=(c=this.formField).onBlur)===null||o===void 0||o.call(c,n)}},computed:{groupName:function(){return this.$pcCheckboxGroup?this.$pcCheckboxGroup.groupName:this.$formName},checked:function(){var n=this.$pcCheckboxGroup?this.$pcCheckboxGroup.d_value:this.d_value;return this.d_indeterminate?!1:this.binary?n===this.trueValue:f(this.value,
141n)},dataP:function(){return k(A({invalid:this.$invalid,checked:this.checked,disabled:this.disabled,filled:this.$variant==="filled"},this.size,this.size))}},components:{CheckIcon:w,MinusIcon:P}},q=["data-p-checked","data-p-indeterminate","data-p-disabled","data-p"],L=["id","value","name","checked","tabindex","disabled","readonly","required","aria-labelledby","aria-label","aria-invalid","aria-checked"],E=["data-p"];function H(e,n,o,c,i,t){var u=h("CheckIcon"),p=h("MinusIcon");return d(),y("div",r({class:e.cx("root")},t.getPTOptions("root"),{"data-p-checked":t.checked,"data-p-indeterminate":i.d_indeterminate||void 0,"data-p-disabled":e.disabled,"data-p":t.dataP}),[s("input",r({id:e.inputId,type:"checkbox",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:e.value,name:t.groupName,checked:t.checked,tabindex:e.tabindex,disabled:e.disabled,readonly:e.readonly,required:e.required,"aria-labelledby":e.ariaLabelledby,"aria-label":e.ariaLabel,"aria-invalid":e.invalid||void 0,"aria-checked":i.d_indeterminate?"mixed":void 0,onFocus:n[0]||(n[0]=function(){return t.onFocus&&t.onFocus.apply(t,arguments)}),onBlur:n[1]||(n[1]=function(){return t.onBlur&&t.onBlur.apply(t,arguments)}),onChange:n[2]||(n[2]=function(){return t.onChange&&t.onChange.apply(t,arguments)})},t.getPTOptions("input")),null,16,L),s("div",r({class:e.cx("box")},t.getPTOptions("box"),{"data-p":t.dataP}),[g(e.$slots,"icon",{checked:t.checked,indeterminate:i.d_indeterminate,class:C(e.cx("icon")),dataP:t.dataP},function(){return[t.checked?(d(),b(u,r({key:0,class:e.cx("icon")},t.getPTOptions("icon"),{"data-p":t.dataP}),null,16,["class","data-p"])):i.d_indeterminate?(d(),b(p,r({key:1,class:e.cx("icon")},t.getPTOptions("icon"),{"data-p":t.dataP}),null,16,["class","data-p"])):v("",!0)]})],16,E)],16,q)}V.render=H;export{V as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.