<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">define(['jquery'],function($){'use strict';$.widget('mage.trimInput',{options:{cache:{}},_create:function(){this.options.cache.input=$(this.element);this._bind();},_bind:function(){if(this.options.cache.input.length){this._on(this.options.cache.input,{'change':this._trimInput,'keyup':this._trimInput,'paste':this._trimInput});}},_trimInput:function(){var caretStart,caretEnd,input;caretStart=this.options.cache.input.get(0).selectionStart;caretEnd=this.options.cache.input.get(0).selectionEnd;input=this._getInputValue().trim();this.options.cache.input.val(input);if(caretStart!==null&amp;&amp;caretEnd!==null){this.options.cache.input.get(0).setSelectionRange(caretStart,caretEnd);}},_getInputValue:function(){return this.options.cache.input.val();}});return $.mage.trimInput;});</pre></body></html>