/**
* Kendo UI v2019.2.514 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(e,define){define("kendo.switch.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,c=n.ui,a=".kendoSwitch",i=c.Widget,d=n.support,l="change",s={widget:"k-switch k-widget",container:"k-switch-container",handle:"k-switch-handle",checked:"k-switch-on",checkedLabel:"k-switch-label-on",unchecked:"k-switch-off",uncheckedLabel:"k-switch-label-off",disabled:"k-state-disabled",readonly:"k-state-readonly",active:"k-state-active"},r="disabled",o="aria-disabled",h="readonly",k="aria-readonly",p="aria-checked",u="checked",w=d.click+a,f=d.pointers?"pointerup":"touchend",y="keydown"+a,b="_label",g=e.proxy,m=n.template(''),v=n.template("#=checked##=unchecked#"),_=i.extend({init:function(t,c){var a,d=this;i.fn.init.call(d,t,c),c=d.options,t=d.element[0],t.type="checkbox",a=e(m({styles:s})),d.wrapper=d.element.wrap(a).parent(),d.wrapper.append(e(v({styles:s,checked:c.messages.checked,unchecked:c.messages.unchecked}))),d.wrapper.on(w,g(d._click,d)).on(f,g(d._touchEnd,d)).on(y,g(d._keydown,d)),d.options.enabled&&d._tabindex(),d._initSettings(),d._aria(),n.notify(d,n.ui)},setOptions:function(n){var c,a,i=this,d=n.messages;i.options=e.extend(i.options,n),d&&d.checked!==t&&(c=i.wrapper.find("."+s.checkedLabel),c.text(d.checked)),d&&d.unchecked!==t&&(a=i.wrapper.find("."+s.uncheckedLabel),a.text(d.unchecked)),n.width&&i.wrapper.css({width:n.width}),n.enabled!==t&&i.enable(n.enabled),n.readonly!==t&&i.readonly(n.readonly),i.check(n.checked)},_initSettings:function(){var e=this,t=e.element[0],n=e.options;n.width&&e.wrapper.css({width:n.width}),null===n.checked&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(r),e.enable(n.enabled),n.readonly=n.readonly||!!e.element.attr(h),e.readonly(n.readonly)},_aria:function(){var t,c=this,a=c.element,i=c.wrapper,d=a.attr("id"),l=e('label[for="'+d+'"]'),s=a.attr("aria-label"),r=a.attr("aria-labelledby");s?i.attr("aria-label",s):r?i.attr("aria-labelledby",r):l.length&&(t=l.attr("id"),t||(t=(d||n.guid())+b,l.attr("id",t)),i.attr("aria-labelledby",t))},events:[l],options:{name:"Switch",messages:{checked:"On",unchecked:"Off"},width:null,checked:null,enabled:!0,readonly:!1},check:function(e){var n=this,c=n.element[0];return e===t?c.checked:(c.checked!==e&&(n.options.checked=c.checked=e),n.wrapper.attr(p,e).toggleClass(s.checked,e).toggleClass(s.unchecked,!e),e?n.element.attr(u,u):n.element.removeAttr(u),t)},value:function(e){return"string"==typeof e&&(e="true"===e),this.check.apply(this,[e])},destroy:function(){i.fn.destroy.call(this),this.wrapper.off(a)},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var n=this.element,c=this.wrapper;t===e&&(e=!0),this.options.enabled=e,e?(n.removeAttr(r),c.removeAttr(o)):(n.attr(r,r),c.attr(o,!0)),c.toggleClass(s.disabled,!e)},readonly:function(e){var n=this,c=n.element,a=n.wrapper;t===e&&(e=!0),n.options.readonly=e,e?(c.attr(h,!0),a.attr(k,!0)):(c.removeAttr(h),a.removeAttr(k)),a.toggleClass(s.readonly,e)},_check:function(){var e=this,n=e.element[0].checked=!e.element[0].checked;return e.wrapper.focus(),!e.options.enabled||e.options.readonly||e.trigger(l,{checked:n})?(e.element[0].checked=!n,t):(e.check(n),t)},_keydown:function(e){e.keyCode===n.keys.SPACEBAR&&(this._check(),e.preventDefault())},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_click:function(e){this._isTouch(e)||1!==e.which||this._check()},_touchEnd:function(e){this._isTouch(e)&&(this._check(),e.preventDefault())}});c.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.switch.min.js.map