/* ======================================================================== * bootstrap-switch - v3.0.0 * http://www.bootstrap-switch.org * ======================================================================== * Copyright 2012-2013 Mattia Larentis * * ======================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ (function(){var t=[].slice;!function(s,o){"use strict";var e;return e=function(){function t(t,o){null==o&&(o={}),this.$element=s(t),this.options=s.extend({},s.fn.bootstrapSwitch.defaults,o,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text")}),this.$wrapper=s("
",{"class":function(t){return function(){var o;return o=[""+t.options.baseClass],o.push(function(){var o,e,i,n,a,r;if(!s.isArray(t.options.wrapperClass))return""+t.options.baseClass+"-"+t.options.wrapperClass;for(e=[],a=t.options.wrapperClass,r=[],i=0,n=a.length;n>i;i++)o=a[i],r.push(e.push(""+t.options.baseClass+"-"+o));return r}()),o.push(t.options.state?""+t.options.baseClass+"-"+t.options.onModifierClass:""+t.options.baseClass+"-"+t.options.offModifierClass),null!=t.options.size&&o.push(""+t.options.baseClass+"-"+t.options.size),t.options.animate&&o.push(""+t.options.baseClass+"-"+t.options.animateModifierClass),t.options.disabled&&o.push(""+t.options.baseClass+"-"+t.options.disabledModifierClass),t.options.readonly&&o.push(""+t.options.baseClass+"-"+t.options.readonlyModifierClass),t.$element.attr("id")&&o.push(""+t.options.baseClass+"-id-"+t.$element.attr("id")),o.join(" ")}}(this)()}),this.$container=s("
",{"class":""+this.options.baseClass+"-container"}),this.$on=s("",{html:this.options.onText,"class":""+this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=s("",{html:this.options.offText,"class":""+this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=s("