zui.lite.min.js
42.1 KB
/*!
* ZUI: Lite edition - v1.6.0 - 2017-03-16
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2017 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
!function(t,e){"use strict";if("undefined"==typeof t)throw new Error("ZUI requires jQuery");t.zui||(t.zui=function(e){t.isPlainObject(e)&&t.extend(t.zui,e)});var i=0;t.zui({uuid:function(){return 1e3*(new Date).getTime()+i++%1e3},callEvent:function(e,i,o){if(t.isFunction(e)){void 0!==o&&(e=t.proxy(e,o));var n=e(i);return i&&(i.result=n),!(void 0!==n&&!n)}return 1},clientLang:function(){var i,o=e.config;if("undefined"!=typeof o&&o.clientLang&&(i=o.clientLang),!i){var n=t("html").attr("lang");i=n?n:navigator.userLanguage||navigator.userLanguage||"zh_cn"}return i.replace("-","_").toLowerCase()},strCode:function(t){var e=0;if(t&&t.length)for(var i=0;i<t.length;++i)e+=i*t.charCodeAt(i);return e}}),t.fn.callEvent=function(e,i,o){var n=t(this),s=e.indexOf(".zui."),a=0>s?e:e.substring(0,s),r=t.Event(a,i);if(void 0===o&&s>0&&(o=n.data(e.substring(s+1))),o&&o.options){var l=o.options[a];t.isFunction(l)&&t.zui.callEvent(l,r,o)}return n.trigger(r),r}}(jQuery,window),function(t){"use strict";t.fn.fixOlPd=function(e){return e=e||10,this.each(function(){var i=t(this);i.css("paddingLeft",Math.ceil(Math.log10(i.children().length))*e+10)})},t(function(){t(".ol-pd-fix,.article ol").fixOlPd()})}(jQuery),+function(t){"use strict";var e='[data-dismiss="alert"]',i="zui.alert",o=function(i){t(i).on("click",e,this.close)};o.prototype.close=function(e){function o(){a.trigger("closed."+i).remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.hasClass("alert")?n:n.parent()),a.trigger(e=t.Event("close."+i)),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one(t.support.transition.end,o).emulateTransitionEnd(150):o())};var n=t.fn.alert;t.fn.alert=function(e){return this.each(function(){var n=t(this),s=n.data(i);s||n.data(i,s=new o(this)),"string"==typeof e&&s[e].call(n)})},t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click."+i+".data-api",e,o.prototype.close)}(window.jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(t){"use strict";var e="zui.collapse",i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var i=t.Event("show."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.$parent&&this.$parent.find(".in");if(o&&o.length){var n=o.data(e);if(n&&n.transitioning)return;o.collapse("hide"),n||o.data(e,null)}var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("in")[s]("auto"),this.transitioning=0,this.$element.trigger("shown."+e)};if(!t.support.transition)return a.call(this);var r=t.camelCase(["scroll",s].join("-"));this.$element.one(t.support.transition.end,t.proxy(a,this)).emulateTransitionEnd(350)[s](this.$element[0][r])}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var i=t.Event("hide."+e);if(this.$element.trigger(i),!i.isDefaultPrevented()){var o=this.dimension();this.$element[o](this.$element[o]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.trigger("hidden."+e).removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[o](0).one(t.support.transition.end,t.proxy(n,this)).emulateTransitionEnd(350):n.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var o=t.fn.collapse;t.fn.collapse=function(o){return this.each(function(){var n=t(this),s=n.data(e),a=t.extend({},i.DEFAULTS,n.data(),"object"==typeof o&&o);s||n.data(e,s=new i(this,a)),"string"==typeof o&&s[o]()})},t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click."+e+".data-api","[data-toggle=collapse]",function(i){var o,n=t(this),s=n.attr("data-target")||i.preventDefault()||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""),a=t(s),r=a.data(e),l=r?"toggle":n.data(),h=n.attr("data-parent"),d=h&&t(h);r&&r.transitioning||(d&&d.find('[data-toggle=collapse][data-parent="'+h+'"]').not(n).addClass("collapsed"),n[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),a.collapse(l)})}(window.jQuery),function(t,e){"use strict";var i=1200,o=992,n=768,s={desktop:"screen-desktop",desktopLg:"screen-desktop-wide",tablet:"screen-tablet",phone:"screen-phone",isMobile:"device-mobile",isDesktop:"device-desktop",touch:"is-touchable"},a=e(t),r=function(){var t=a.width();e("html").toggleClass(s.desktop,t>=o&&i>t).toggleClass(s.desktopLg,t>=i).toggleClass(s.tablet,t>=n&&o>t).toggleClass(s.phone,n>t).toggleClass(s.isMobile,o>t).toggleClass(s.touch,"ontouchstart"in document.documentElement).toggleClass(s.isDesktop,t>=o)};a.resize(r),r()}(window,jQuery),function(t){"use strict";var e={zh_cn:'您的浏览器版本过低,无法体验所有功能,建议升级或者更换浏览器。 <a href="http://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',zh_tw:'您的瀏覽器版本過低,無法體驗所有功能,建議升級或者更换瀏覽器。<a href="http://browsehappy.com/" target="_blank" class="alert-link">了解更多...</a>',en:'Your browser is too old, it has been unable to experience the colorful internet. We strongly recommend that you upgrade a better one. <a href="http://browsehappy.com/" target="_blank" class="alert-link">Learn more...</a>'},i=function(){var t=this.isIE()||this.isIE10()||!1;if(t)for(var e=10;e>5;e--)if(this.isIE(e)){t=e;break}this.ie=t,this.cssHelper()};i.prototype.cssHelper=function(){var e=this.ie,i=t("html");i.toggleClass("ie",e).removeClass("ie-6 ie-7 ie-8 ie-9 ie-10"),e&&i.addClass("ie-"+e).toggleClass("gt-ie-7 gte-ie-8 support-ie",e>=8).toggleClass("lte-ie-7 lt-ie-8 outdated-ie",8>e).toggleClass("gt-ie-8 gte-ie-9",e>=9).toggleClass("lte-ie-8 lt-ie-9",9>e).toggleClass("gt-ie-9 gte-ie-10",e>=10).toggleClass("lte-ie-9 lt-ie-10",10>e)},i.prototype.tip=function(i){var o=t("#browseHappyTip");o.length||(o=t('<div id="browseHappyTip" class="alert alert-dismissable alert-danger-inverse alert-block" style="position: relative; z-index: 99999"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><div class="container"><div class="content text-center"></div></div></div>'),o.prependTo("body")),o.find(".content").html(i||this.browseHappyTip||e[t.zui.clientLang()||"zh_cn"])},i.prototype.isIE=function(t){if(10===t)return this.isIE10();var e=document.createElement("b");return e.innerHTML="<!--[if IE "+(t||"")+"]><i></i><![endif]-->",1===e.getElementsByTagName("i").length},i.prototype.isIE10=function(){return!1},t.zui({browser:new i}),t(function(){t("body").hasClass("disabled-browser-tip")||t.zui.browser.ie&&t.zui.browser.ie<8&&t.zui.browser.tip()})}(jQuery),function(){"use strict";Date.ONEDAY_TICKS=864e5,Date.prototype.format||(Date.prototype.format=function(t){var e={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),"S+":this.getMilliseconds()};/(y+)/i.test(t)&&(t=t.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var i in e)new RegExp("("+i+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[i]:("00"+e[i]).substr((""+e[i]).length)));return t}),Date.prototype.addMilliseconds||(Date.prototype.addMilliseconds=function(t){return this.setTime(this.getTime()+t),this}),Date.prototype.addDays||(Date.prototype.addDays=function(t){return this.addMilliseconds(t*Date.ONEDAY_TICKS),this}),Date.prototype.clone||(Date.prototype.clone=function(){var t=new Date;return t.setTime(this.getTime()),t}),Date.isLeapYear||(Date.isLeapYear=function(t){return t%4===0&&t%100!==0||t%400===0}),Date.getDaysInMonth||(Date.getDaysInMonth=function(t,e){return[31,Date.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]}),Date.prototype.isLeapYear||(Date.prototype.isLeapYear=function(){return Date.isLeapYear(this.getFullYear())}),Date.prototype.clearTime||(Date.prototype.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this}),Date.prototype.getDaysInMonth||(Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth())}),Date.prototype.addMonths||(Date.prototype.addMonths=function(t){var e=this.getDate();return this.setDate(1),this.setMonth(this.getMonth()+t),this.setDate(Math.min(e,this.getDaysInMonth())),this}),Date.prototype.getLastWeekday||(Date.prototype.getLastWeekday=function(t){t=t||1;for(var e=this.clone();e.getDay()!=t;)e.addDays(-1);return e.clearTime(),e}),Date.prototype.isSameDay||(Date.prototype.isSameDay=function(t){return t.toDateString()===this.toDateString()}),Date.prototype.isSameWeek||(Date.prototype.isSameWeek=function(t){var e=this.getLastWeekday(),i=e.clone().addDays(7);return t>=e&&i>t}),Date.prototype.isSameYear||(Date.prototype.isSameYear=function(t){return this.getFullYear()===t.getFullYear()})}(),function(){"use strict";String.prototype.format||(String.prototype.format=function(t){var e=this;if(arguments.length>0){var i;if(arguments.length<=2&&"object"==typeof t)for(var o in t)void 0!==t[o]&&(i=new RegExp("("+(arguments[1]?arguments[1].replace("0",o):"{"+o+"}")+")","g"),e=e.replace(i,t[o]));else for(var n=0;n<arguments.length;n++)void 0!==arguments[n]&&(i=new RegExp("({["+n+"]})","g"),e=e.replace(i,arguments[n]))}return e}),String.prototype.isNum||(String.prototype.isNum=function(t){if(null!==t){var e,i;return i=/\d*/i,e=t.match(i),e==t?!0:!1}return!1})}(),/*!
* jQuery resize event - v1.1
* http://benalman.com/projects/jquery-resize-plugin/
* Copyright (c) 2010 "Cowboy" Ben Alman
* MIT & GPL http://benalman.com/about/license/
*/
function(t,e,i){"$:nomunge";function o(){n=e[r](function(){s.each(function(){var e=t(this),i=e.width(),o=e.height(),n=t.data(this,h);(i!==n.w||o!==n.h)&&e.trigger(l,[n.w=i,n.h=o])}),o()},a[d])}var n,s=t([]),a=t.resize=t.extend(t.resize,{}),r="setTimeout",l="resize",h=l+"-special-event",d="delay",p="throttleWindow";a[d]=250,a[p]=!0,t.event.special[l]={setup:function(){if(!a[p]&&this[r])return!1;var e=t(this);s=s.add(e),t.data(this,h,{w:e.width(),h:e.height()}),1===s.length&&o()},teardown:function(){if(!a[p]&&this[r])return!1;var e=t(this);s=s.not(e),e.removeData(h),s.length||clearTimeout(n)},add:function(e){function o(e,o,s){var a=t(this),r=t.data(this,h)||{};r.w=o!==i?o:a.width(),r.h=s!==i?s:a.height(),n.apply(this,arguments)}if(!a[p]&&this[r])return!1;var n;return t.isFunction(e)?(n=e,o):(n=e.handler,void(e.handler=o))}}}(jQuery,this),function(t,e){"use strict";var i,o,n="localStorage",s="page_"+t.location.pathname+t.location.search,a=function(){this.slience=!0;try{n in t&&t[n]&&t[n].setItem&&(this.enable=!0,i=t[n])}catch(a){}this.enable||(o={},i={getLength:function(){var t=0;return e.each(o,function(){t++}),t},key:function(t){var i,n=0;return e.each(o,function(e){return n===t?(i=e,!1):void n++}),i},removeItem:function(t){delete o[t]},getItem:function(t){return o[t]},setItem:function(t,e){o[t]=e},clear:function(){o={}}}),this.storage=i,this.page=this.get(s,{})};a.prototype.pageSave=function(){if(e.isEmptyObject(this.page))this.remove(s);else{var t,i=[];for(t in this.page){var o=this.page[t];null===o&&i.push(t)}for(t=i.length-1;t>=0;t--)delete this.page[i[t]];this.set(s,this.page)}},a.prototype.pageRemove=function(t){"undefined"!=typeof this.page[t]&&(this.page[t]=null,this.pageSave())},a.prototype.pageClear=function(){this.page={},this.pageSave()},a.prototype.pageGet=function(t,e){var i=this.page[t];return void 0===e||null!==i&&void 0!==i?i:e},a.prototype.pageSet=function(t,i){e.isPlainObject(t)?e.extend(!0,this.page,t):this.page[this.serialize(t)]=i,this.pageSave()},a.prototype.check=function(){if(!this.enable&&!this.slience)throw new Error("Browser not support localStorage or enable status been set true.");return this.enable},a.prototype.length=function(){return this.check()?i.getLength?i.getLength():i.length:0},a.prototype.removeItem=function(t){return i.removeItem(t),this},a.prototype.remove=function(t){return this.removeItem(t)},a.prototype.getItem=function(t){return i.getItem(t)},a.prototype.get=function(t,e){var i=this.deserialize(this.getItem(t));return"undefined"!=typeof i&&null!==i||"undefined"==typeof e?i:e},a.prototype.key=function(t){return i.key(t)},a.prototype.setItem=function(t,e){return i.setItem(t,e),this},a.prototype.set=function(t,e){return void 0===e?this.remove(t):(this.setItem(t,this.serialize(e)),this)},a.prototype.clear=function(){return i.clear(),this},a.prototype.forEach=function(t){for(var e=this.length(),o=e-1;o>=0;o--){var n=i.key(o);t(n,this.get(n))}return this},a.prototype.getAll=function(){var t={};return this.forEach(function(e,i){t[e]=i}),t},a.prototype.serialize=function(t){return"string"==typeof t?t:JSON.stringify(t)},a.prototype.deserialize=function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return t||void 0}},e.zui({store:new a})}(window,jQuery),+function(t){"use strict";var e="zui.tab",i=function(e){this.element=t(e)};i.prototype.show=function(){var i=this.element,o=i.closest("ul:not(.dropdown-menu)"),n=i.attr("data-target")||i.attr("data-tab");if(n||(n=i.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),!i.parent("li").hasClass("active")){var s=o.find(".active:last a")[0],a=t.Event("show."+e,{relatedTarget:s});if(i.trigger(a),!a.isDefaultPrevented()){var r=t(n);this.activate(i.parent("li"),o),this.activate(r,r.parent(),function(){i.trigger({type:"shown."+e,relatedTarget:s})})}}},i.prototype.activate=function(e,i,o){function n(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),o&&o()}var s=i.find("> .active"),a=o&&t.support.transition&&s.hasClass("fade");a?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),s.removeClass("in")};var o=t.fn.tab;t.fn.tab=function(o){return this.each(function(){var n=t(this),s=n.data(e);s||n.data(e,s=new i(this)),"string"==typeof o&&s[o]()})},t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this},t(document).on("click.zui.tab.data-api",'[data-toggle="tab"], [data-tab]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";function e(e,n,s){return this.each(function(){var a=t(this),r=a.data(i),l=t.extend({},o.DEFAULTS,a.data(),"object"==typeof e&&e);r||a.data(i,r=new o(this,l)),"string"==typeof e?r[e](n,s):l.show&&r.show(n,s)})}var i="zui.modal",o=function(e,o){this.options=o,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,"undefined"==typeof this.options.moveable&&(this.options.moveable=this.$element.hasClass("modal-moveable")),this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded."+i)},this))};o.VERSION="3.2.0",o.TRANSITION_DURATION=300,o.BACKDROP_TRANSITION_DURATION=150,o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0,position:"fit"},o.prototype.toggle=function(t,e){return this.isShown?this.hide():this.show(t,e)},o.prototype.ajustPosition=function(e){if("undefined"==typeof e&&(e=this.options.position),"undefined"!=typeof e){var o=this.$element.find(".modal-dialog"),n=Math.max(0,(t(window).height()-o.outerHeight())/2),s="fit"==e?2*n/3:"center"==e?n:e;if(o.hasClass("modal-moveable")){var a=null;this.options.rememberPos&&(this.options.rememberPos===!0?a=this.$element.data("modal-pos"):t.zui.store&&(a=t.zui.store.pageGet(i+".rememberPos"))),a||(a={left:Math.max(0,(t(window).width()-o.outerWidth())/2),top:s}),o.css(a)}else o.css("margin-top",s)}},o.prototype.setMoveale=function(){t.fn.draggable||console.error("Moveable modal requires draggable.js.");var e=this,o=e.options,n=e.$element.find(".modal-dialog").removeClass("modal-dragged");n.toggleClass("modal-moveable",o.moveable),e.$element.data("modal-moveable-setup")||n.draggable({container:e.$element,handle:".modal-header",before:function(){n.css("margin-top","").addClass("modal-dragged")},finish:function(n){o.rememberPos&&(e.$element.data("modal-pos",n.pos),t.zui.store&&o.rememberPos!==!0&&t.zui.store.pageSet(i+".rememberPos",n.pos))}})},o.prototype.show=function(e,n){var s=this,a=t.Event("show."+i,{relatedTarget:e});s.$element.trigger(a),s.isShown||a.isDefaultPrevented()||(s.isShown=!0,s.options.moveable&&s.setMoveale(),s.checkScrollbar(),s.$body.addClass("modal-open"),s.setScrollbar(),s.escape(),s.$element.on("click.dismiss."+i,'[data-dismiss="modal"]',t.proxy(s.hide,s)),s.backdrop(function(){var a=t.support.transition&&s.$element.hasClass("fade");s.$element.parent().length||s.$element.appendTo(s.$body),s.$element.show().scrollTop(0),a&&s.$element[0].offsetWidth,s.$element.addClass("in").attr("aria-hidden",!1),s.ajustPosition(n),s.enforceFocus();var r=t.Event("shown."+i,{relatedTarget:e});a?s.$element.find(".modal-dialog").one("bsTransitionEnd",function(){s.$element.trigger("focus").trigger(r)}).emulateTransitionEnd(o.TRANSITION_DURATION):s.$element.trigger("focus").trigger(r)}))},o.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide."+i),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin."+i),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss."+i),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(o.TRANSITION_DURATION):this.hideModal())},o.prototype.enforceFocus=function(){t(document).off("focusin."+i).on("focusin."+i,t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?t(document).on("keydown.dismiss."+i,t.proxy(function(e){if(27==e.which){var o=t.Event("escaping."+i),n=this.$element.triggerHandler(o,"esc");if(void 0!=n&&!n)return;this.hide()}},this)):this.isShown||t(document).off("keydown.dismiss."+i)},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$element.trigger("hidden."+i)})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(e){var n=this,s=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=t.support.transition&&s;if(this.$backdrop=t('<div class="modal-backdrop '+s+'" />').appendTo(this.$body),this.$element.on("mousedown.dismiss."+i,t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;a?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(o.BACKDROP_TRANSITION_DURATION):r()}else e&&e()},o.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},o.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},o.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},o.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var n=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=o,t.fn.modal.noConflict=function(){return t.fn.modal=n,this},t(document).on("click."+i+".data-api",'[data-toggle="modal"]',function(o){var n=t(this),s=n.attr("href"),a=null;try{a=t(n.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,""))}catch(r){return}if(a.length){var l=a.data(i)?"toggle":t.extend({remote:!/#/.test(s)&&s},a.data(),n.data());n.is("a")&&o.preventDefault(),a.one("show."+i,function(t){t.isDefaultPrevented()||a.one("hidden."+i,function(){n.is(":visible")&&n.trigger("focus")})}),e.call(a,l,this,n.data("position"))}})}(jQuery),function(t,e){"use strict";if(!t.fn.modal)throw new Error("Modal trigger requires modal.js");var i="zui.modaltrigger",o="ajax",n=".zui.modal",s="string",a=function(e,i){e=t.extend({},a.DEFAULTS,t.ModalTriggerDefaults,i?i.data():null,e),this.isShown,this.$trigger=i,this.options=e,this.id=t.zui.uuid()};a.DEFAULTS={type:"custom",height:"auto",name:"triggerModal",fade:!0,position:"fit",showHeader:!0,delay:0,backdrop:!0,keyboard:!0,waittime:0,loadingIcon:"icon-spinner-indicator"},a.prototype.init=function(a){var r=this;if(a.url&&(!a.type||a.type!=o&&"iframe"!=a.type)&&(a.type=o),a.remote)a.type=o,typeof a.remote===s&&(a.url=a.remote);else if(a.iframe)a.type="iframe",typeof a.iframe===s&&(a.url=a.iframe);else if(a.custom&&(a.type="custom",typeof a.custom===s)){var l;try{l=t(a.custom)}catch(h){}l&&l.length?a.custom=l:t.isFunction(e[a.custom])&&(a.custom=e[a.custom])}var d=t("#"+a.name);d.length&&(r.isShown||d.off(n),d.remove()),d=t('<div id="'+a.name+'" class="modal modal-trigger">'+("string"==typeof a.loadingIcon&&0===a.loadingIcon.indexOf("icon-")?'<div class="icon icon-spin loader '+a.loadingIcon+'"></div>':a.loadingIcon)+'<div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button class="close" data-dismiss="modal">×</button><h4 class="modal-title"><i class="modal-icon"></i> <span class="modal-title-name"></span></h4></div><div class="modal-body"></div></div></div></div>').appendTo("body").data(i,r);var p=function(e,i){var o=a[e];t.isFunction(o)&&d.on(i+n,o)};p("onShow","show"),p("shown","shown"),p("onHide","hide"),p("hidden","hidden"),p("loaded","loaded"),d.on("shown"+n,function(){r.isShown=!0}).on("hidden"+n,function(){r.isShown=!1}),this.$modal=d,this.$dialog=d.find(".modal-dialog"),a.mergeOptions&&(this.options=a)},a.prototype.show=function(a){var r=t.extend({},this.options,{url:this.$trigger?this.$trigger.attr("href")||this.$trigger.attr("data-url")||this.$trigger.data("url"):this.options.url},a);this.init(r);var l=this,h=this.$modal,d=this.$dialog,p=r.custom,c=d.find(".modal-body").css("padding",""),u=d.find(".modal-header"),f=d.find(".modal-content");h.toggleClass("fade",r.fade).addClass(r.cssClass).toggleClass("modal-loading",!this.isShown),d.toggleClass("modal-md","md"===r.size).toggleClass("modal-sm","sm"===r.size).toggleClass("modal-lg","lg"===r.size).toggleClass("modal-fullscreen","fullscreen"===r.size),u.toggle(r.showHeader),u.find(".modal-icon").attr("class","modal-icon icon-"+r.icon),u.find(".modal-title-name").html(r.title||""),r.size&&"fullscreen"===r.size&&(r.width="",r.height="");var g=function(){clearTimeout(this.resizeTask),this.resizeTask=setTimeout(function(){l.ajustPosition()},100)},m=function(t,e){return"undefined"==typeof t&&(t=r.delay),setTimeout(function(){d=h.find(".modal-dialog"),r.width&&"auto"!=r.width&&d.css("width",r.width),r.height&&"auto"!=r.height&&(d.css("height",r.height),"iframe"===r.type&&c.css("height",d.height()-u.outerHeight())),l.ajustPosition(r.position),h.removeClass("modal-loading"),"iframe"!=r.type&&d.off("resize."+i).on("resize."+i,g),e&&e()},t)};if("custom"===r.type&&p)if(t.isFunction(p)){var v=p({modal:h,options:r,modalTrigger:l,ready:m});typeof v===s&&(c.html(v),m())}else p instanceof t?(c.html(t("<div>").append(p.clone()).html()),m()):(c.html(p),m());else if(r.url){var y=function(){var t=h.callEvent("broken"+n,l,l);t&&c.html(t)};if(h.attr("ref",r.url),"iframe"===r.type){h.addClass("modal-iframe"),this.firstLoad=!0;var w="iframe-"+r.name;u.detach(),c.detach(),f.empty().append(u).append(c),c.css("padding",0).html('<iframe id="'+w+'" name="'+w+'" src="'+r.url+'" frameborder="no" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true" scrolling="auto" style="width: 100%; height: 100%; left: 0px;"></iframe>'),r.waittime>0&&(l.waitTimeout=m(r.waittime,y));var b=document.getElementById(w);b.onload=b.onreadystatechange=function(){if(l.firstLoad&&h.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){l.firstLoad=!1,r.waittime>0&&clearTimeout(l.waitTimeout);try{h.attr("ref",b.contentWindow.location.href);var t=e.frames[w].$;if(t&&"auto"===r.height&&"fullscreen"!=r.size){var o=t("body").addClass("body-modal");r.iframeBodyClass&&o.addClass(r.iframeBodyClass);var s=function(t){h.removeClass("fade");var e=o.outerHeight();t===!0&&r.onlyIncreaseHeight&&(e=Math.max(e,c.data("minModalHeight")||0),c.data("minModalHeight",e)),c.css("height",e),r.fade&&h.addClass("fade"),m()};h.callEvent("loaded"+n,{modalType:"iframe",jQuery:t},null),setTimeout(s,100),o.off("resize."+i).on("resize."+i,g)}else m();t.extend({closeModal:e.closeModal})}catch(a){m()}}}}else t.get(r.url,function(e){try{var i=t(e);i.hasClass("modal-dialog")?d.replaceWith(i):i.hasClass("modal-content")?d.find(".modal-content").replaceWith(i):c.wrapInner(i)}catch(s){h.html(e)}h.callEvent("loaded"+n,{modalType:o},l),m()}).error(y)}h.modal({show:"show",backdrop:r.backdrop,moveable:r.moveable,keyboard:r.keyboard})},a.prototype.close=function(i,o){(i||o)&&this.$modal.on("hidden"+n,function(){t.isFunction(i)&&i(),typeof o===s&&("this"===o?e.location.reload():e.location=o)}),this.$modal.modal("hide")},a.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},a.prototype.ajustPosition=function(t){this.$modal.modal("ajustPosition",t||this.options.position)},t.zui({ModalTrigger:a,modalTrigger:new a}),t.fn.modalTrigger=function(e,o){return t(this).each(function(){var n=t(this),r=n.data(i),l=t.extend({title:n.attr("title")||n.text(),url:n.attr("href"),type:n.hasClass("iframe")?"iframe":""},n.data(),t.isPlainObject(e)&&e);r||n.data(i,r=new a(l,n)),typeof e==s?r[e](o):l.show&&r.show(o),n.on((l.trigger||"click")+".toggle."+i,function(t){r.toggle(l),n.is("a")&&t.preventDefault()})})};var r=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var o=t(this);o.hasClass("modal")?r.call(o,e,i):o.modalTrigger(e,i)})};var l=function(e){var i=typeof e;return"undefined"===i?e=t(".modal.modal-trigger"):i===s&&(e=t(e)),e&&e instanceof t?e:null},h=function(e,o,n){if(t.isFunction(e)){var s=n;n=o,o=e,e=s}e=l(e),e&&e.length&&e.each(function(){t(this).data(i).close(o,n)})},d=function(t,e){e=l(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:h,ajustModalPosition:d}),t(document).on("click."+i+".data-api",'[data-toggle="modal"]',function(e){var o=t(this),n=o.attr("href"),s=null;try{s=t(o.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""))}catch(a){}s&&s.length||(o.data(i)?o.trigger(".toggle."+i):o.modalTrigger({show:!0})),o.is("a")&&e.preventDefault()})}(window.jQuery,window),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o);for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if((e||this.hasContent())&&this.enabled){var o=this;if(o.$element.trigger(i),i.isDefaultPrevented())return;var n=o.tip();o.setContent(e),o.options.animation&&n.addClass("fade");var s="function"==typeof o.options.placement?o.options.placement.call(o,n[0],o.$element[0]):o.options.placement,a=/\s?auto?\s?/i,r=a.test(s);r&&(s=s.replace(a,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass(s),o.options.container?n.appendTo(o.options.container):n.insertAfter(o.$element);var l=o.getPosition(),h=n[0].offsetWidth,d=n[0].offsetHeight;if(r){var p=o.$element.parent(),c=s,u=document.documentElement.scrollTop||document.body.scrollTop,f="body"==o.options.container?window.innerWidth:p.outerWidth(),g="body"==o.options.container?window.innerHeight:p.outerHeight(),m="body"==o.options.container?0:p.offset().left;s="bottom"==s&&l.top+l.height+d-u>g?"top":"top"==s&&l.top-u-d<0?"bottom":"right"==s&&l.right+h>f?"left":"left"==s&&l.left-h<m?"right":s,n.removeClass(c).addClass(s)}var v=o.getCalculatedOffset(s,l,h,d);o.applyPlacement(v,s);var y=function(){var t=o.hoverState;o.$element.trigger("shown.bs."+o.type),o.hoverState=null,"out"==t&&o.leave(o)};t.support.transition&&o.$tip.hasClass("fade")?n.one("bsTransitionEnd",y).emulateTransitionEnd(150):y()}},e.prototype.applyPlacement=function(t,e){var i,o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,a=parseInt(o.css("margin-top"),10),r=parseInt(o.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(r)&&(r=0),t.top=t.top+a,t.left=t.left+r,o.offset(t).addClass("in");var l=o[0].offsetWidth,h=o[0].offsetHeight;if("top"==e&&h!=s&&(i=!0,t.top=t.top+s-h),/bottom|top/.test(e)){var d=0;t.left<0&&(d=-2*t.left,t.left=0,o.offset(t),l=o[0].offsetWidth,h=o[0].offsetHeight),this.replaceArrow(d-n+l,l,"left")}else this.replaceArrow(h-s,h,"top");i&&o.offset(t)},e.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},e.prototype.setContent=function(t){var e=this.tip(),i=t||this.getTitle();this.options.tipId&&e.attr("id",this.options.tipId),this.options.tipClass&&e.addClass(this.options.tipClass),e.find(".tooltip-inner")[this.options.html?"html":"text"](i),e.removeClass("fade in top bottom left right")},e.prototype.hide=function(){function e(){"in"!=i.hoverState&&o.detach()}var i=this,o=this.tip(),n=t.Event("hide.zui."+this.type);return this.$element.trigger(n),n.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?o.one(t.support.transition.end,e).emulateTransitionEnd(150):e(),this.$element.trigger("hidden.zui."+this.type),this)},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(){var e=this.$element[0];return t.extend({},"function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight},this.$element.offset())},e.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},e.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},e.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.prototype.toggle=function(e){var i=e?t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type):this;i.tip().hasClass("in")?i.leave(i):i.enter(i)},e.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("zui."+this.type)};var i=t.fn.tooltip;t.fn.tooltip=function(i,o){return this.each(function(){var n=t(this),s=n.data("zui.tooltip"),a="object"==typeof i&&i;s||n.data("zui.tooltip",s=new e(this,a)),"string"==typeof i&&s[i](o)})},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(window.jQuery),+function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),o=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](o),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,o=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return o?"$next"==o?e.next(".popover"):t(o):!1},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var o=t(this),n=o.data("zui.popover"),s="object"==typeof i&&i;n||o.data("zui.popover",n=new e(this,s)),"string"==typeof i&&n[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(){t(n).remove(),t(s).each(function(e){var n=i(t(this));n.hasClass("open")&&(n.trigger(e=t.Event("hide."+o)),e.isDefaultPrevented()||n.removeClass("open").trigger("hidden."+o))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o;try{o=i&&t(i)}catch(n){}return o&&o.length?o:e.parent()}var o="zui.dropdown",n=".dropdown-backdrop",s="[data-toggle=dropdown]",a=function(e){t(e).on("click."+o,this.toggle)};a.prototype.toggle=function(n){var s=t(this);if(!s.is(".disabled, :disabled")){var a=i(s),r=a.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",e),a.trigger(n=t.Event("show."+o)),n.isDefaultPrevented())return;a.toggleClass("open").trigger("shown."+o),s.focus()}return!1}},a.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var n=i(o),a=n.hasClass("open");if(!a||a&&27==e.keyCode)return 27==e.which&&n.find(s).focus(),o.click();var r=t("[role=menu] li:not(.divider):visible a",n);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l<r.length-1&&l++,~l||(l=0),r.eq(l).focus()}}}};var r=t.fn.dropdown;t.fn.dropdown=function(e){return this.each(function(){var i=t(this),o=i.data("dropdown");o||i.data("dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})},t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this};var l=o+".data-api";t(document).on("click."+l,e).on("click."+l,".dropdown form",function(t){t.stopPropagation()}).on("click."+l,s,a.prototype.toggle).on("keydown."+l,s+", [role=menu]",a.prototype.keydown)}(window.jQuery),+function(t){"use strict";var e=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",t.proxy(this.pause,this)).on("mouseleave",t.proxy(this.cycle,this))};e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,touchable:!0},e.prototype.touchable=function(){function e(e){var e=e||window.event;e.originalEvent&&(e=e.originalEvent);var s=t(this);switch(e.type){case"touchstart":o=e.touches[0].pageX,n=e.touches[0].pageY;break;case"touchend":var a=e.changedTouches[0].pageX-o,r=e.changedTouches[0].pageY-n;if(Math.abs(a)>Math.abs(r))i(s,a),Math.abs(a)>10&&e.preventDefault();else{var l=t(window);t("body,html").animate({scrollTop:l.scrollTop()-r},400)}}}function i(t,e){e>10?s.prev():-10>e&&s.next()}if(this.options.touchable){this.$element.on("touchstart touchmove touchend",e);var o,n,s=this}},e.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},e.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},e.prototype.to=function(e){var i=this,o=this.getActiveIndex();return e>this.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid",function(){i.to(e)}):o==e?this.pause().cycle():this.slide(e>o?"next":"prev",t(this.$items[e]))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){return this.sliding?void 0:this.slide("next")},e.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},e.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),n=i||o[e](),s=this.interval,a="next"==e?"left":"right",r="next"==e?"first":"last",l=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[r]()}this.sliding=!0,s&&this.pause();var h=t.Event("slide.zui.carousel",{relatedTarget:n[0],direction:a});if(!n.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(h),h.isDefaultPrevented())return;n.addClass(e),n[0].offsetWidth,o.addClass(a),n.addClass(a),o.one(t.support.transition.end,function(){n.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(h),h.isDefaultPrevented())return;o.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var o=t(this),n=o.data("zui.carousel"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof i&&i),a="string"==typeof i?i:s.slide;n||o.data("zui.carousel",n=new e(this,s)),"number"==typeof i?n.to(i):a?n[a]():s.interval&&n.pause().cycle(),s.touchable&&n.touchable()})},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.zui.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,o=t(this),n=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),s=t.extend({},n.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),n.carousel(s),(a=o.attr("data-slide-to"))&&n.data("zui.carousel").to(a),e.preventDefault()}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var e=t(this);e.carousel(e.data())})})}(window.jQuery);