define("ui/mode-button",["jquery"],function(t){"use strict";function e(t,e){return this.currModeIndex=0,this._init(t,e)}var o=function(t){return t&&t.__esModule?t:{default:t}}(t).default;e.prototype.DATA_KEY="mode-button",e.prototype.defaults={switchModesOnClick:!0},e.prototype._init=function(t,e){if(e=e||{},this.$element=o(t),this.options=o.extend(!0,{},this.defaults,e),!e.modes)throw new Error('ModeButton requires a "modes" array');var n=this;return this.$element.click(function(t){n.callModeFn(),n.options.switchModesOnClick&&n._incModeIndex(),o(this).html(n.options.modes[n.currModeIndex].html)}),this.reset()},e.prototype._incModeIndex=function(){return this.currModeIndex+=1,this.currModeIndex>=this.options.modes.length&&(this.currModeIndex=0),this},e.prototype._getModeIndex=function(t){for(var e=0;e