!function(){var e={};e=React;var t=t=>{let{control:n,customizerSetting:r,choices:a}=t,i="",o=e=>(e<a.min&&(e=a.min),e>a.max&&(e=a.max),e),l=e=>{let t=(e="string"!=typeof e?e.toString():e).replace(/\d+/g,""),n=e.replace(t,"");return{number:n=o(n=parseFloat(n.trim())),unit:t}},c=e=>{let t=l(e);return t.number+t.unit};n.updateComponentState=e=>{"slider"===i?d.current.value=c(e):"input"===i?p.current.value=l(e).number:"reset"===i&&(d.current.value=e,p.current.value=e)};let s=`kirki-control-input-${r.id}`,u=l(t.value).number,m=c(t.value),p=(0,e.useRef)(null),d=(0,e.useRef)(null);return React.createElement("div",{className:"kirki-control-form",tabIndex:"1"},React.createElement("label",{className:"kirki-control-label",htmlFor:s},React.createElement("span",{className:"customize-control-title"},t.label),React.createElement("span",{className:"customize-control-description description",dangerouslySetInnerHTML:{__html:t.description}})),React.createElement("div",{className:"customize-control-notifications-container",ref:t.setNotificationContainer}),React.createElement("button",{type:"button",className:"kirki-control-reset",onClick:e=>{""!==t.default&&void 0!==t.default?(p.current.value=t.default,d.current.value=t.default):""!==t.value?(p.current.value=t.value,d.current.value=t.value):(p.current.value=a.min,d.current.value=""),i="reset",r.set(p.current.value)}},React.createElement("i",{className:"dashicons dashicons-image-rotate"})),React.createElement("div",{className:"kirki-control-cols"},React.createElement("div",{className:"kirki-control-left-col"},React.createElement("input",{ref:p,type:"range",id:s,defaultValue:u,min:a.min,max:a.max,step:a.step,className:"kirki-control-input-slider kirki-pro-control-input-slider",onChange:e=>{i="slider";let t=parseFloat(e.target.value),n=(t=o(t))+l(d.current.value).unit;r.set(n)}})),React.createElement("div",{className:"kirki-control-right-col"},React.createElement("input",{ref:d,type:"text",defaultValue:m,className:"kirki-control-input",onChange:e=>{i="input",r.set(c(e.target.value))}}))))};function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}let r=wp.customize.Control.extend({initialize:function(e,t){let n=this;n.setNotificationContainer=n.setNotificationContainer.bind(n),wp.customize.Control.prototype.initialize.call(n,e,t),wp.customize.control.bind("removed",function e(t){n===t&&(n.destroy(),n.container[0]&&n.container[0].remove?n.container[0].remove():n.container[0]&&n.container[0].parentNode&&n.container[0].parentNode.removeChild(n.container[0]),wp.customize.control.unbind("removed",e))})},setNotificationContainer:function(e){this.notifications.container=e,this.notifications.render()},renderContent:function(){var e;let r=React.createElement(t,n({},this.params,{control:this,customizerSetting:this.setting,setNotificationContainer:this.setNotificationContainer,value:this.params.value}));e=this.container[0],e&&(wp.element.createRoot?wp.element.createRoot(e).render(r):wp.element.render(r,e)),!1!==this.params.choices.allowCollapse&&this.container[0].classList.add("allowCollapse")},ready:function(){let e=this;e.setting.bind(t=>{e.updateComponentState(t)})},updateComponentState:e=>{},destroy:function(){ReactDOM.unmountComponentAtNode(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}});wp.customize.controlConstructor["kirki-input-slider"]=r}();