!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=191)}([function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";e.exports=n(66)},function(e,t,n){var r=n(37),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(7),o=n(87),a=n(88),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},function(e,t,n){var r=n(113),o=n(116);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(2).Symbol;e.exports=r},function(e,t,n){var r=n(39),o=n(95),a=n(11);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t,n){e.exports=n(68)()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(71);Object.defineProperty(t,"captialize",{enumerable:!0,get:function(){return l(r).default}});var o=n(72);Object.defineProperty(t,"clamp",{enumerable:!0,get:function(){return l(o).default}});var a=n(73);Object.defineProperty(t,"distanceTo",{enumerable:!0,get:function(){return l(a).default}});var i=n(74);Object.defineProperty(t,"isDefined",{enumerable:!0,get:function(){return l(i).default}});var u=n(75);Object.defineProperty(t,"isNumber",{enumerable:!0,get:function(){return l(u).default}});var s=n(76);Object.defineProperty(t,"isObject",{enumerable:!0,get:function(){return l(s).default}});var c=n(77);function l(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"length",{enumerable:!0,get:function(){return l(c).default}})},function(e,t,n){var r=n(44),o=n(23);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(103),o=n(104),a=n(105),i=n(106),u=n(107);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(37),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,u=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=u}).call(this,n(22)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(43)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(12),o=n(108),a=n(109),i=n(110),u=n(111),s=n(112);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=u,c.prototype.set=s,e.exports=c},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(5)(n(2),"Map");e.exports=r},function(e,t,n){var r=n(117),o=n(124),a=n(126),i=n(127),u=n(128);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&el))return!1;var p=s.get(e);if(p&&s.get(t))return p==t;var d=-1,h=!0,v=2&n?new r:void 0;for(s.set(e,t),s.set(t,e);++d1?t-1:0),i=1;i=this.props.step||(0,v.length)(e.max,t.max)>=this.props.step}},{key:"isMultiValue",value:function(){return(0,v.isObject)(this.props.value)}},{key:"isWithinRange",value:function(e){return this.isMultiValue()?e.min>=this.props.minValue&&e.max<=this.props.maxValue&&this.props.allowSameValues?e.min<=e.max:e.min=this.props.minValue&&e.max<=this.props.maxValue}},{key:"shouldUpdate",value:function(e){return this.isWithinRange(e)&&this.hasStepDifference(e)}},{key:"updatePosition",value:function(e,t){var n=s.getValueFromProps(this.props,this.isMultiValue()),r=s.getPositionsFromValues(n,this.props.minValue,this.props.maxValue,this.getTrackClientRect());r[e]=t,this.lastKeyMoved=e,this.updatePositions(r)}},{key:"updatePositions",value:function(e){var t={min:s.getValueFromPosition(e.min,this.props.minValue,this.props.maxValue,this.getTrackClientRect()),max:s.getValueFromPosition(e.max,this.props.minValue,this.props.maxValue,this.getTrackClientRect())},n={min:s.getStepValueFromValue(t.min,this.props.step),max:s.getStepValueFromValue(t.max,this.props.step)};this.updateValues(n)}},{key:"updateValue",value:function(e,t){var n=s.getValueFromProps(this.props,this.isMultiValue());n[e]=t,this.updateValues(n)}},{key:"updateValues",value:function(e){this.shouldUpdate(e)&&this.props.onChange(this.isMultiValue()?e:e.max)}},{key:"incrementValue",value:function(e){var t=s.getValueFromProps(this.props,this.isMultiValue())[e]+this.props.step;this.updateValue(e,t)}},{key:"decrementValue",value:function(e){var t=s.getValueFromProps(this.props,this.isMultiValue())[e]-this.props.step;this.updateValue(e,t)}},{key:"addDocumentMouseUpListener",value:function(){this.removeDocumentMouseUpListener(),this.node.ownerDocument.addEventListener("mouseup",this.handleMouseUp)}},{key:"addDocumentTouchEndListener",value:function(){this.removeDocumentTouchEndListener(),this.node.ownerDocument.addEventListener("touchend",this.handleTouchEnd)}},{key:"removeDocumentMouseUpListener",value:function(){this.node.ownerDocument.removeEventListener("mouseup",this.handleMouseUp)}},{key:"removeDocumentTouchEndListener",value:function(){this.node.ownerDocument.removeEventListener("touchend",this.handleTouchEnd)}},{key:"handleSliderDrag",value:function(e,t){var n=this;if(!this.props.disabled){var r=s.getPositionFromEvent(e,this.getTrackClientRect());this.isSliderDragging=!0,requestAnimationFrame((function(){return n.updatePosition(t,r)}))}}},{key:"handleTrackDrag",value:function(e,t){if(!this.props.disabled&&this.props.draggableTrack&&!this.isSliderDragging){var n=this.props,r=n.maxValue,o=n.minValue,a=n.value,i=a.max,u=a.min,c=s.getPositionFromEvent(e,this.getTrackClientRect()),l=s.getValueFromPosition(c,o,r,this.getTrackClientRect()),f=s.getStepValueFromValue(l,this.props.step),p=s.getPositionFromEvent(t,this.getTrackClientRect()),d=s.getValueFromPosition(p,o,r,this.getTrackClientRect()),h=s.getStepValueFromValue(d,this.props.step)-f,v={min:u-h,max:i-h};this.updateValues(v)}}},{key:"handleSliderKeyDown",value:function(e,t){if(!this.props.disabled)switch(e.keyCode){case y.LEFT_ARROW:case y.DOWN_ARROW:e.preventDefault(),this.decrementValue(t);break;case y.RIGHT_ARROW:case y.UP_ARROW:e.preventDefault(),this.incrementValue(t)}}},{key:"handleTrackMouseDown",value:function(e,t){if(!this.props.disabled){var n=this.props,r=n.maxValue,o=n.minValue,a=n.value,i=a.max,u=a.min;e.preventDefault();var c=s.getValueFromPosition(t,o,r,this.getTrackClientRect()),l=s.getStepValueFromValue(c,this.props.step);(!this.props.draggableTrack||l>i||lE.length&&E.push(e)}function C(e,t,n){return null==e?0:function e(t,n,r,o){var u=typeof t;"undefined"!==u&&"boolean"!==u||(t=null);var s=!1;if(null===t)s=!0;else switch(u){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case a:case i:s=!0}}if(s)return r(o,t,""===n?"."+R(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;c=t)return new Error('"minValue" must be smaller than "maxValue"')};var r=n(10);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.maxValue,o=e.minValue,a=e[t];if(!((0,r.isNumber)(a)||(0,r.isObject)(a)&&(0,r.isNumber)(a.min)&&(0,r.isNumber)(a.max)))return new Error('"'+t+'" must be a number or a range object');if((0,r.isNumber)(a)&&(an))return new Error('"'+t+'" must be in between "minValue" and "maxValue"');if((0,r.isObject)(a)&&(a.minn||a.maxn))return new Error('"'+t+'" must be in between "minValue" and "maxValue"')};var r=n(10);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,a.default)(t)?(0,o.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,r.default)(t)&&n.push(t)})),n};t.default=s},function(e,t,n){var r=n(4),o=n(0),a=n(3);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(7),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[u]=n:delete e[u]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(90)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n-1}},function(e,t,n){var r=n(13);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(12);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(12),o=n(30),a=n(31);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(44),o=n(114),a=n(6),i=n(47),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,l=s.toString,f=c.hasOwnProperty,p=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?p:u).test(i(e))}},function(e,t,n){var r,o=n(115),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},function(e,t,n){var r=n(2)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(118),o=n(12),a=n(30);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},function(e,t,n){var r=n(119),o=n(120),a=n(121),i=n(122),u=n(123);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,o.default)(e.default)||{};return t.map((function(t){var o=e[t];return o&&(0,r.default)(o,(function(e,t){n[t]||(n[t]={}),n[t]=a({},n[t],o[t])})),t})),n};t.default=u},function(e,t,n){var r=n(163);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(28),o=n(164),a=n(59),i=n(166),u=n(167),s=n(170),c=n(171),l=n(172),f=n(173),p=n(51),d=n(174),h=n(16),v=n(175),y=n(176),m=n(181),b=n(0),g=n(21),x=n(183),O=n(6),j=n(185),_=n(8),w={};w["[object Arguments]"]=w["[object Array]"]=w["[object ArrayBuffer]"]=w["[object DataView]"]=w["[object Boolean]"]=w["[object Date]"]=w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Map]"]=w["[object Number]"]=w["[object Object]"]=w["[object RegExp]"]=w["[object Set]"]=w["[object String]"]=w["[object Symbol]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w["[object Error]"]=w["[object Function]"]=w["[object WeakMap]"]=!1,e.exports=function e(t,n,S,k,P,M){var D,E=1&n,T=2&n,V=4&n;if(S&&(D=P?S(t,k,P,M):S(t)),void 0!==D)return D;if(!O(t))return t;var C=b(t);if(C){if(D=v(t),!E)return c(t,D)}else{var R=h(t),A="[object Function]"==R||"[object GeneratorFunction]"==R;if(g(t))return s(t,E);if("[object Object]"==R||"[object Arguments]"==R||A&&!P){if(D=T||A?{}:m(t),!E)return T?f(t,u(D,t)):l(t,i(D,t))}else{if(!w[R])return P?t:{};D=y(t,R,E)}}M||(M=new r);var L=M.get(t);if(L)return L;M.set(t,D),j(t)?t.forEach((function(r){D.add(e(r,n,S,r,t,M))})):x(t)&&t.forEach((function(r,o){D.set(o,e(r,n,S,o,t,M))}));var N=V?T?d:p:T?keysIn:_,F=C?void 0:N(t);return o(F||t,(function(r,o){F&&(r=t[o=r]),a(D,o,e(r,n,S,o,t,M))})),D}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,a,c;u(this,r);for(var l=arguments.length,f=Array(l),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,a,c;u(this,r);for(var l=arguments.length,f=Array(l),p=0;p1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n}},function(e,t,n){"use strict";n.r(t);var r=n(63),o=n.n(r),a=n(64),i=n.n(a),u=n(1),s=n.n(u);function c(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),a=o[0],i=o[1]||"";return{beforeDecimal:a,afterDecimal:i,hasNagation:n,addNegation:r}}function O(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function j(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function _(e,t,n){return Math.min(Math.max(e,t),n)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}var S={thousandSeparator:y.oneOfType([y.string,y.oneOf([!0])]),decimalSeparator:y.string,allowedDecimalSeparators:y.arrayOf(y.string),thousandsGroupStyle:y.oneOf(["thousand","lakh","wan"]),decimalScale:y.number,fixedDecimalScale:y.bool,displayType:y.oneOf(["input","text"]),prefix:y.string,suffix:y.string,format:y.oneOfType([y.string,y.func]),removeFormatting:y.func,mask:y.oneOfType([y.string,y.arrayOf(y.string)]),value:y.oneOfType([y.number,y.string]),defaultValue:y.oneOfType([y.number,y.string]),isNumericString:y.bool,customInput:y.elementType,allowNegative:y.bool,allowEmptyFormatting:y.bool,allowLeadingZeros:y.bool,onValueChange:y.func,onKeyDown:y.func,onMouseUp:y.func,onChange:y.func,onFocus:y.func,onBlur:y.func,type:y.oneOf(["text","tel","password"]),isAllowed:y.func,renderText:y.func,getInputRef:y.oneOfType([y.func,y.shape({current:y.any})])},k={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:m,onChange:m,onKeyDown:m,onMouseUp:m,onFocus:m,onBlur:m,isAllowed:function(){return!0}},P=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?d(e):t}(this,f(t).call(this,e));var r=e.defaultValue;n.validateProps();var o=n.formatValueProp(r);return n.state={value:o,numAsString:n.removeFormatting(o)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(d(n)),n.onKeyDown=n.onKeyDown.bind(d(n)),n.onMouseUp=n.onMouseUp.bind(d(n)),n.onFocus=n.onFocus.bind(d(n)),n.onBlur=n.onBlur.bind(d(n)),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,a=n.numAsString,i=void 0===a?"":a;if(e!==t){this.validateProps();var u=this.formatNumString(i),s=void 0===t.value?u:this.formatValueProp(),c=this.removeFormatting(s),l=parseFloat(c),f=parseFloat(i);(isNaN(l)&&isNaN(f)||l===f)&&u===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:c,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var i=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(g(r),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||r?"":"|"+g(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){j(e,t),setTimeout((function(){e.value===n&&j(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,a=r.suffix,i=r.format;if(""===e)return 0;if(t=_(t,0,e.length),!i){var u="-"===e[0];return _(t,o.length+(u?1:0),e.length-a.length)}if("function"==typeof i)return t;if("#"===i[t]&&b(e[t]))return t;if("#"===i[t-1]&&b(e[t-1]))return t;var s=i.indexOf("#");t=_(t,s,i.lastIndexOf("#")+1);for(var c=i.substring(t,i.length).indexOf("#"),l=t,f=t+(-1===c?0:c);l>s&&("#"!==i[l]||!b(e[l]));)l-=1;return!b(e[f])||"left"===n&&t!==s||t-l0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,i=this.props,u=i.value,s=void 0===u?e:u,c=i.isNumericString,l=!s&&0!==s;return l&&a&&(s=""),l&&!a?"":("number"==typeof s&&(s=s.toString(),c=!0),"Infinity"===s&&c&&(s=""),c&&!n&&"number"==typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=x(e),a=o.beforeDecimal,i=o.afterDecimal,u=o.hasNagation,s=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),c=a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),l=O(s[1]||"",Math.min(t,i.length),n),f=r?".":"";return"".concat(u?"-":"").concat(c).concat(f).concat(l)}(s,r,o)),c?this.formatNumString(s):this.formatInput(s))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,a=n.suffix,i=n.decimalScale,u=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-a.length||i&&u&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),m=y.start,b=y.end;if(!o&&m===b&&-1!==l.indexOf(n[h])){var g=0===s?"":f;return n.substr(0,h)+g+n.substr(h+1,n.length)}var O=o?0:i.length,j=t.length-(o?0:u.length);if(n.length>t.length||!n.length||m===b||0===h&&v===t.length||h===O&&v===j)return n;if(this.checkIfFormatGotDeleted(m,b,t)&&(n=t),!o){var _=this.removeFormatting(n),w=x(_,a),S=w.beforeDecimal,k=w.afterDecimal,P=w.addNegation,M=ex;)g--;g=this.correctCaretPosition(u,g,"left")}}else for(;!y.test(u[g])&&gO)&&(e.preventDefault(),this.setPatchedCaretPosition(n,g,u)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,g,u),h(e)}else h(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(n===r){var i=this.correctCaretPosition(a,n);i!==n&&this.setPatchedCaretPosition(t,i,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,a=n.value,i=void 0===a?"":a,u=t.correctCaretPosition(i,r);u===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,u,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,a=r.displayType,i=r.customInput,u=r.renderText,c=r.getInputRef,f=this.state.value,p=(e=this.props,t=S,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),d=l({inputMode:"numeric"},p,{type:o,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return u?u(f)||null:s.a.createElement("span",l({},p,{ref:c}),f);if(i){var h=i;return s.a.createElement(h,l({},d,{ref:c}))}return s.a.createElement("input",l({},d,{ref:c}))}}])&&c(n.prototype,r),o&&c(n,o),t}(s.a.Component);P.propTypes=S,P.defaultProps=k;var M=P,D=function(e){var t=function(t){var n=Math.pow(10,e.choices.step.toString().split(".")[1]?e.choices.step.toString().split(".")[1].length:0);return Math.round(t*n)/n},n=function(n){return Math.min(e.choices.max,Math.max(e.choices.min,t(n)))};e.choices.min=t(e.choices.min),e.choices.max=t(e.choices.max),e.choices.step=t(e.choices.step),e.choices.prefix=e.choices.prefix||"",e.choices.suffix=e.choices.suffix||"";var r=i()({default:{labelsWrapper:{display:"flex",justifyContent:"space-between",color:"#aaaaaa",fontSize:"10px"},valueLabel:{color:"#555d66",fontWeight:"700",fontSize:"13px"}}});return React.createElement("div",null,React.createElement("label",{className:"customize-control-title"},e.label),React.createElement("span",{className:"description customize-control-description",dangerouslySetInnerHTML:{__html:e.description}}),React.createElement("div",{className:"customize-control-notifications-container",ref:e.setNotificationContainer}),React.createElement("div",{className:"range-input-wrapper"},React.createElement("div",{style:r.labelsWrapper,className:"manual-input-field"},React.createElement("span",null,e.choices.prefix,e.choices.min,e.choices.suffix),React.createElement("span",{style:r.valueLabel},React.createElement(M,{value:n(e.value),displayType:"input",prefix:e.choices.prefix,suffix:e.choices.suffix,onValueChange:function(t){t.formattedValue;var r=t.value;wp.customize.control(e.customizerSetting.id).setting.set(n(r))}})),React.createElement("span",null,e.choices.prefix,e.choices.max,e.choices.suffix)),React.createElement(o.a,{maxValue:e.choices.max,minValue:e.choices.min,step:e.choices.step,value:n(e.value),onChange:function(t){wp.customize.control(e.customizerSetting.id).setting.set(n(t))}})))};function E(){return(E=Object.assign||function(e){for(var t=1;t