DxBlazorInternal.define("cjs-spinedit-c6fa6b03.js",(function(e,t,n){e("./cjs-chunk-c5286524.js");var s=e("./cjs-dom-utils-c4472fdd.js"),a=e("./cjs-chunk-fc814f01.js"),o=e("./cjs-chunk-8bdf5a55.js");function c(e,t){e&&(e.dataset.previousValue=t)}function r(e,t){e=s.ensureElement(e);var n=s.getParentByClassName(e,"dxbs-spin-edit");if(e){a.disposeEvents(e);var c,r,i,d=(c=t.decimalSeparator,r=t.needExponentialView,i=e,function(e){var t=i.dataset.selectionStartBeforePaste?i.value.trim():i.value,n=/^-?(\d)*$/;c&&(t=t.replace(/[.|,]/g,c),n=r?/^-?(\d+|[,.]\d+|\d+[,.]\d+|\d+[,.]|[,.])?([eE]?[+-]?(\d)*)?$/:/^-?(\d+|[,.]\d+|\d+[,.]\d+|\d+[,.]|[,.])?$/);var s=i.selectionStart,a=i.selectionEnd;n.test(t)?(t!==i.value&&(i.value=t),i.dataset.previousValue=t):(i.dataset.selectionStartBeforePaste?(s=i.dataset.selectionStartBeforePaste,a=i.dataset.selectionEndBeforePaste):(s--,a+=i.dataset.previousValue.length-t.length),i.value=i.dataset.previousValue),i.dataset.selectionStartBeforePaste&&(i.removeAttribute("data-selection-start-before-paste"),i.removeAttribute("data-selection-end-before-paste")),i.selectionStart=s,i.selectionEnd=a}),l=function(e){return function(t){e.dataset.selectionStartBeforePaste=e.selectionStart,e.dataset.selectionEndBeforePaste=e.selectionEnd}}(e),u=function(e){(function(e){return e.keyCode===o.Key.Up||e.keyCode===o.Key.Down})(e)&&(e.stopPropagation(),e.preventDefault())};return s.attachEventToElement(e,"input",d),s.attachEventToElement(e,"paste",l),s.attachEventToElement(e,"keydown",u),a.registerDisposableEvents(n,(function(){s.detachEventFromElement(e,"input",d),s.detachEventFromElement(e,"keydown",u),s.detachEventFromElement(e,"paste",l)})),Promise.resolve("ok")}}function i(e,t){for(var n=document.activeElement;null!==n&&n!==e;)n=n.parentElement;null===n&&t.invokeMethodAsync("FocusLost")}function d(e){if(e=s.ensureElement(e))return a.disposeEvents(e),Promise.resolve("ok")}var l={init:r,dispose:d,setPreviousValue:c,checkFocusedState:i};n.checkFocusedState=i,n.default=l,n.dispose=d,n.init=r,n.setPreviousValue=c}),["cjs-chunk-c5286524.js","cjs-dom-utils-c4472fdd.js","cjs-chunk-fc814f01.js","cjs-chunk-8bdf5a55.js"]);
