File "FormControlLabel-1.0.13-143a10df.js"

Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/wp-data-access/assets/dist/FormControlLabel-1.0.13-143a10df.js
File size: 8.94 KB
MIME-type: text/plain
Charset: utf-8

import{aa as ee,ab as re,a as N,h as ne,_ as i,i as ae,ac as le,ad as ie,ae as X,af as z,ag as ce,a8 as de,ah as ue,k as pe,c as q,b as W,e as H,ai as Y,g as oe,s as A,S as me,V as fe,z as J,u as te,T as Z}from"./iconBase-1.0.13-98e06aa9.js";import{r as O,j as _}from"./main-1.0.13.js";import{c as se,f as he}from"./TextField-1.0.13-7258d491.js";import{ac as be}from"./main-1.0.13-4cbe632d.js";const ye=["ownerState"],ge=["variants"],Se=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function ve(e){return Object.keys(e).length===0}function Ce(e){return typeof e=="string"&&e.charCodeAt(0)>96}function G(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ke=ee(),Pe=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function I({defaultTheme:e,theme:o,themeId:t}){return ve(o)?e:o[t]||o}function xe(e){return e?(o,t)=>t[e]:null}function M(e,o){let{ownerState:t}=o,l=N(o,ye);const n=typeof e=="function"?e(i({ownerState:t},l)):e;if(Array.isArray(n))return n.flatMap(r=>M(r,i({ownerState:t},l)));if(n&&typeof n=="object"&&Array.isArray(n.variants)){const{variants:r=[]}=n;let m=N(n,ge);return r.forEach(s=>{let a=!0;typeof s.props=="function"?a=s.props(i({ownerState:t},l,t)):Object.keys(s.props).forEach(f=>{(t==null?void 0:t[f])!==s.props[f]&&l[f]!==s.props[f]&&(a=!1)}),a&&(Array.isArray(m)||(m=[m]),m.push(typeof s.style=="function"?s.style(i({ownerState:t},l,t)):s.style))}),m}return n}function Fe(e={}){const{themeId:o,defaultTheme:t=ke,rootShouldForwardProp:l=G,slotShouldForwardProp:n=G}=e,r=d=>ae(i({},d,{theme:I(i({},d,{defaultTheme:t,themeId:o}))}));return r.__mui_systemSx=!0,(d,m={})=>{re(d,c=>c.filter(u=>!(u!=null&&u.__mui_systemSx)));const{name:s,slot:a,skipVariantsResolver:f,skipSx:P,overridesResolver:v=xe(Pe(a))}=m,R=N(m,Se),$=f!==void 0?f:a&&a!=="Root"&&a!=="root"||!1,w=P||!1;let S,b=G;a==="Root"||a==="root"?b=l:a?b=n:Ce(d)&&(b=void 0);const y=ne(d,i({shouldForwardProp:b,label:S},R)),x=c=>typeof c=="function"&&c.__emotion_real!==c||le(c)?u=>M(c,i({},u,{theme:I({theme:u.theme,defaultTheme:t,themeId:o})})):c,B=(c,...u)=>{let C=x(c);const h=u?u.map(x):[];s&&v&&h.push(p=>{const g=I(i({},p,{defaultTheme:t,themeId:o}));if(!g.components||!g.components[s]||!g.components[s].styleOverrides)return null;const L=g.components[s].styleOverrides,T={};return Object.entries(L).forEach(([j,D])=>{T[j]=M(D,i({},p,{theme:g}))}),v(p,T)}),s&&!$&&h.push(p=>{var g;const L=I(i({},p,{defaultTheme:t,themeId:o})),T=L==null||(g=L.components)==null||(g=g[s])==null?void 0:g.variants;return M({variants:T},i({},p,{theme:L}))}),w||h.push(r);const k=h.length-u.length;if(Array.isArray(c)&&k>0){const p=new Array(k).fill("");C=[...c,...p],C.raw=[...c.raw,...p]}const E=y(C,...h);return d.muiName&&(E.muiName=d.muiName),E};return y.withConfig&&(B.withConfig=y.withConfig),B}}const Re=Fe(),we=Re,Be=["component","direction","spacing","divider","children","className","useFlexGap"],$e=ee(),Le=we("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root});function je(e){return ie({props:e,name:"MuiStack",defaultTheme:$e})}function _e(e,o){const t=O.Children.toArray(e).filter(Boolean);return t.reduce((l,n,r)=>(l.push(n),r<t.length-1&&l.push(O.cloneElement(o,{key:`separator-${r}`})),l),[])}const Te=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Ne=({ownerState:e,theme:o})=>{let t=i({display:"flex",flexDirection:"column"},X({theme:o},z({values:e.direction,breakpoints:o.breakpoints.values}),l=>({flexDirection:l})));if(e.spacing){const l=ce(o),n=Object.keys(o.breakpoints.values).reduce((s,a)=>((typeof e.spacing=="object"&&e.spacing[a]!=null||typeof e.direction=="object"&&e.direction[a]!=null)&&(s[a]=!0),s),{}),r=z({values:e.direction,base:n}),d=z({values:e.spacing,base:n});typeof r=="object"&&Object.keys(r).forEach((s,a,f)=>{if(!r[s]){const v=a>0?r[f[a-1]]:"column";r[s]=v}}),t=de(t,X({theme:o},d,(s,a)=>e.useFlexGap?{gap:Y(l,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${Te(a?r[a]:e.direction)}`]:Y(l,s)}}))}return t=ue(o.breakpoints,t),t};function Oe(e={}){const{createStyledComponent:o=Le,useThemeProps:t=je,componentName:l="MuiStack"}=e,n=()=>W({root:["root"]},s=>H(l,s),{}),r=o(Ne);return O.forwardRef(function(s,a){const f=t(s),P=pe(f),{component:v="div",direction:R="column",spacing:$=0,divider:w,children:S,className:b,useFlexGap:y=!1}=P,x=N(P,Be),B={direction:R,spacing:$,useFlexGap:y},c=n();return _.jsx(r,i({as:v,ownerState:B,ref:a,className:q(c.root,b)},x,{children:w?_e(S,w):S}))})}function Ve(e){return H("PrivateSwitchBase",e)}oe("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Ae=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Ee=e=>{const{classes:o,checked:t,disabled:l,edge:n}=e,r={root:["root",t&&"checked",l&&"disabled",n&&`edge${J(n)}`],input:["input"]};return W(r,Ve,o)},Ie=A(me)(({ownerState:e})=>i({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),Me=A("input",{shouldForwardProp:fe})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),qe=O.forwardRef(function(o,t){const{autoFocus:l,checked:n,checkedIcon:r,className:d,defaultChecked:m,disabled:s,disableFocusRipple:a=!1,edge:f=!1,icon:P,id:v,inputProps:R,inputRef:$,name:w,onBlur:S,onChange:b,onFocus:y,readOnly:x,required:B=!1,tabIndex:c,type:u,value:C}=o,h=N(o,Ae),[k,E]=be({controlled:n,default:!!m,name:"SwitchBase",state:"checked"}),p=se(),g=F=>{y&&y(F),p&&p.onFocus&&p.onFocus(F)},L=F=>{S&&S(F),p&&p.onBlur&&p.onBlur(F)},T=F=>{if(F.nativeEvent.defaultPrevented)return;const Q=F.target.checked;E(Q),b&&b(F,Q)};let j=s;p&&typeof j>"u"&&(j=p.disabled);const D=u==="checkbox"||u==="radio",U=i({},o,{checked:k,disabled:j,disableFocusRipple:a,edge:f}),K=Ee(U);return _.jsxs(Ie,i({component:"span",className:q(K.root,d),centerRipple:!0,focusRipple:!a,disabled:j,tabIndex:null,role:void 0,onFocus:g,onBlur:L,ownerState:U,ref:t},h,{children:[_.jsx(Me,i({autoFocus:l,checked:n,defaultChecked:m,className:K.input,disabled:j,id:D?v:void 0,name:w,onChange:T,readOnly:x,ref:$,required:B,ownerState:U,tabIndex:c,type:u},u==="checkbox"&&C===void 0?{}:{value:C},R)),k?r:P]}))}),oo=qe,De=Oe({createStyledComponent:A("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,o)=>o.root}),useThemeProps:e=>te({props:e,name:"MuiStack"})}),Ue=De;function ze(e){return H("MuiFormControlLabel",e)}const Ge=oe("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),V=Ge,We=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],He=e=>{const{classes:o,disabled:t,labelPlacement:l,error:n,required:r}=e,d={root:["root",t&&"disabled",`labelPlacement${J(l)}`,n&&"error",r&&"required"],label:["label",t&&"disabled"],asterisk:["asterisk",n&&"error"]};return W(d,ze,o)},Je=A("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{[`& .${V.label}`]:o.label},o.root,o[`labelPlacement${J(t.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>i({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${V.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${V.label}`]:{[`&.${V.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),Ke=A("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,o)=>o.asterisk})(({theme:e})=>({[`&.${V.error}`]:{color:(e.vars||e).palette.error.main}})),Qe=O.forwardRef(function(o,t){var l,n;const r=te({props:o,name:"MuiFormControlLabel"}),{className:d,componentsProps:m={},control:s,disabled:a,disableTypography:f,label:P,labelPlacement:v="end",required:R,slotProps:$={}}=r,w=N(r,We),S=se(),b=(l=a??s.props.disabled)!=null?l:S==null?void 0:S.disabled,y=R??s.props.required,x={disabled:b,required:y};["checked","name","onChange","value","inputRef"].forEach(k=>{typeof s.props[k]>"u"&&typeof r[k]<"u"&&(x[k]=r[k])});const B=he({props:r,muiFormControl:S,states:["error"]}),c=i({},r,{disabled:b,labelPlacement:v,required:y,error:B.error}),u=He(c),C=(n=$.typography)!=null?n:m.typography;let h=P;return h!=null&&h.type!==Z&&!f&&(h=_.jsx(Z,i({component:"span"},C,{className:q(u.label,C==null?void 0:C.className),children:h}))),_.jsxs(Je,i({className:q(u.root,d),ownerState:c,ref:t},w,{children:[O.cloneElement(s,x),y?_.jsxs(Ue,{display:"block",children:[h,_.jsxs(Ke,{ownerState:c,"aria-hidden":!0,className:u.asterisk,children:[" ","*"]})]}):h]}))}),to=Qe;export{to as F,Ue as S,oo as a,G as s};