").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=t([])},_setOption:function(e,i){var n=this;this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){n._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur");s.target=s.currentTarget=n.element[0],e.close(s,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=t(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=t([])},open:function(e){var i=this,n=t(e?e.target:this.element).closest(this.options.items);n.length&&!n.data("ui-tooltip-id")&&(n.attr("title")&&n.data("ui-tooltip-title",n.attr("title")),n.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&n.parents().each(function(){var e,n=t(this);n.data("ui-tooltip-open")&&((e=t.Event("blur")).target=e.currentTarget=this,i.close(e,!0)),n.attr("title")&&(n.uniqueId(),i.parents[this.id]={element:this,title:n.attr("title")},n.attr("title",""))}),this._registerCloseHandlers(e,n),this._updateContent(n,e))},_updateContent:function(t,e){var i,n=this.options.content,s=this,o=e?e.type:null;if("string"==typeof n||n.nodeType||n.jquery)return this._open(e,t,n);(i=n.call(t[0],function(i){s._delay(function(){t.data("ui-tooltip-open")&&(e&&(e.type=o),this._open(e,t,i))})}))&&this._open(e,t,i)},_open:function(e,i,n){var s,o,a,r,l=t.extend({},this.options.position);function h(t){l.of=t,o.is(":hidden")||o.position(l)}n&&((s=this._find(i))?s.tooltip.find(".ui-tooltip-content").html(n):(i.is("[title]")&&(e&&"mouseover"===e.type?i.attr("title",""):i.removeAttr("title")),s=this._tooltip(i),o=s.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(r=t("
").html(o.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),r.removeAttr("id").find("[id]").removeAttr("id"),r.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:h}),h(e)):o.position(t.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){o.is(":visible")&&(h(l.of),clearInterval(a))},t.fx.interval)),this._trigger("open",e,{tooltip:o})))},_registerCloseHandlers:function(e,i){var n={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var n=t.Event(e);n.currentTarget=i[0],this.close(n,!0)}}};i[0]!==this.element[0]&&(n.remove=function(){this._removeTooltip(this._find(i).tooltip)}),e&&"mouseover"!==e.type||(n.mouseleave="close"),e&&"focusin"!==e.type||(n.focusout="close"),this._on(!0,i,n)},close:function(e){var i,n=this,s=t(e?e.currentTarget:this.element),o=this._find(s);o?(i=o.tooltip,o.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),o.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){n._removeTooltip(t(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete n.parents[e]}),o.closing=!0,this._trigger("close",e,{tooltip:i}),o.hiding||(o.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(e){var i=t("
").attr("role","tooltip"),n=t("
").appendTo(i),s=i.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(i,"ui-tooltip","ui-widget ui-widget-content"),i.appendTo(this._appendTo(e)),this.tooltips[s]={element:e,tooltip:i}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,n){var s=t.Event("blur"),o=n.element;s.target=s.currentTarget=o[0],e.close(s,!0),t("#"+i).remove(),o.data("ui-tooltip-title")&&(o.attr("title")||o.attr("title",o.data("ui-tooltip-title")),o.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==t.uiBackCompat&&t.widget("ui.tooltip",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}});t.ui.tooltip;var v,b="ui-effects-animated",_=t;t.effects={effect:{}},function(t,e){var i,n=/^([\-+])=\s*(\d+\.?\d*)/,s=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],o=t.Color=function(e,i,n,s){return new t.Color.fn.parse(e,i,n,s)},a={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},r={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},l=o.support={},h=t("
")[0],u=t.each;function c(t,e,i){var n=r[e.type]||{};return null==t?i||!e.def?null:e.def:(t=n.floor?~~t:parseFloat(t),isNaN(t)?e.def:n.mod?(t+n.mod)%n.mod:0>t?0:n.max-1,u(a,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),o.fn=t.extend(o.prototype,{parse:function(e,n,s,r){if(void 0===e)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=t(e).css(n),n=void 0);var l=this,h=t.type(e),f=this._rgba=[];return void 0!==n&&(e=[e,n,s,r],h="array"),"string"===h?this.parse(d(e)||i._default):"array"===h?(u(a.rgba.props,function(t,i){f[i.idx]=c(e[i.idx],i)}),this):"object"===h?(u(a,e instanceof o?function(t,i){e[i.cache]&&(l[i.cache]=e[i.cache].slice())}:function(i,n){var s=n.cache;u(n.props,function(t,i){if(!l[s]&&n.to){if("alpha"===t||null==e[t])return;l[s]=n.to(l._rgba)}l[s][i.idx]=c(e[t],i,!0)}),l[s]&&t.inArray(null,l[s].slice(0,3))<0&&(l[s][3]=1,n.from&&(l._rgba=n.from(l[s])))}),this):void 0},is:function(t){var e=o(t),i=!0,n=this;return u(a,function(t,s){var o,a=e[s.cache];return a&&(o=n[s.cache]||s.to&&s.to(n._rgba)||[],u(s.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return u(a,function(i,n){e[n.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var i=o(t),n=i._space(),s=a[n],l=0===this.alpha()?o("transparent"):this,h=l[s.cache]||s.to(l._rgba),d=h.slice();return i=i[s.cache],u(s.props,function(t,n){var s=n.idx,o=h[s],a=i[s],l=r[n.type]||{};null!==a&&(null===o?d[s]=a:(l.mod&&(a-o>l.mod/2?o+=l.mod:o-a>l.mod/2&&(o-=l.mod)),d[s]=c((a-o)*e+o,n)))}),this[n](d)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),n=i.pop(),s=o(e)._rgba;return o(t.map(i,function(t,e){return(1-n)*s[e]+n*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),n=i.pop();return e&&i.push(~~(255*n)),"#"+t.map(i,function(t){return 1===(t=(t||0).toString(16)).length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),o.fn.parse.prototype=o.fn,a.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,n=t[0]/255,s=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(n,s,o),l=Math.min(n,s,o),h=r-l,u=r+l,c=.5*u;return e=l===r?0:n===r?60*(s-o)/h+360:s===r?60*(o-n)/h+120:60*(n-s)/h+240,i=0===h?0:c<=.5?h/u:h/(2-u),[Math.round(e)%360,i,c,null==a?1:a]},a.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],n=t[2],s=t[3],o=n<=.5?n*(1+i):n+i-n*i,a=2*n-o;return[Math.round(255*f(a,o,e+1/3)),Math.round(255*f(a,o,e)),Math.round(255*f(a,o,e-1/3)),s]},u(a,function(e,i){var s=i.props,a=i.cache,r=i.to,l=i.from;o.fn[e]=function(e){if(r&&!this[a]&&(this[a]=r(this._rgba)),void 0===e)return this[a].slice();var i,n=t.type(e),h="array"===n||"object"===n?e:arguments,d=this[a].slice();return u(s,function(t,e){var i=h["object"===n?t:e.idx];null==i&&(i=d[e.idx]),d[e.idx]=c(i,e)}),l?((i=o(l(d)))[a]=d,i):o(d)},u(s,function(i,s){o.fn[i]||(o.fn[i]=function(o){var a,r=t.type(o),l="alpha"===i?this._hsla?"hsla":"rgba":e,h=this[l](),u=h[s.idx];return"undefined"===r?u:("function"===r&&(o=o.call(this,u),r=t.type(o)),null==o&&s.empty?this:("string"===r&&(a=n.exec(o))&&(o=u+parseFloat(a[2])*("+"===a[1]?1:-1)),h[s.idx]=o,this[l](h)))})})}),o.hook=function(e){var i=e.split(" ");u(i,function(e,i){t.cssHooks[i]={set:function(e,n){var s,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(s=d(n)))){if(n=o(s||n),!l.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(t){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=o(e.elem,i),e.end=o(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},o.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),t.cssHooks.borderColor={expand:function(t){var e={};return u(["Top","Right","Bottom","Left"],function(i,n){e["border"+n+"Color"]=t}),e}},i=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(_),function(){var e,i=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function s(e){var i,n,s=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(s&&s.length&&s[0]&&s[s[0]])for(n=s.length;n--;)"string"==typeof s[i=s[n]]&&(o[t.camelCase(i)]=s[i]);else for(i in s)"string"==typeof s[i]&&(o[i]=s[i]);return o}t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(_.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,o,a,r){var l=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr("class")||"",h=l.children?a.find("*").addBack():a;h=h.map(function(){return{el:t(this),start:s(this)}}),(o=function(){t.each(i,function(t,i){e[i]&&a[i+"Class"](e[i])})})(),h=h.map(function(){return this.end=s(this.el[0]),this.diff=function(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||!t.fx.step[s]&&isNaN(parseFloat(o))||(a[s]=o));return a}(this.start,this.end),this}),a.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),n=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,n),i.promise()}),t.when.apply(t,h.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(a[0])})})},t.fn.extend({addClass:(e=t.fn.addClass,function(i,n,s,o){return n?t.effects.animateClass.call(this,{add:i},n,s,o):e.apply(this,arguments)}),removeClass:function(e){return function(i,n,s,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},n,s,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,n,s,o,a){return"boolean"==typeof n||void 0===n?s?t.effects.animateClass.call(this,n?{add:i}:{remove:i},s,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},n,s,o)}}(t.fn.toggleClass),switchClass:function(e,i,n,s,o){return t.effects.animateClass.call(this,{add:i,remove:e},n,s,o)}})}(),function(){var e;function i(e,i,n,s){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(s=n,n=i,i={}),t.isFunction(n)&&(s=n,n=null),i&&t.extend(e,i),n=n||i.duration,e.duration=t.fx.off?0:"number"==typeof n?n:n in t.fx.speeds?t.fx.speeds[n]:t.fx.speeds._default,e.complete=s||i.complete,e}function n(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}function s(t,e){var i=e.outerWidth(),n=e.outerHeight(),s=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(t)||["",0,i,n,0];return{top:parseFloat(s[1])||0,right:"auto"===s[2]?i:parseFloat(s[2]),bottom:"auto"===s[3]?n:parseFloat(s[3]),left:parseFloat(s[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=(e=t.expr.filters.animated,function(i){return!!t(i).data(b)||e(i)})),!1!==t.uiBackCompat&&t.extend(t.effects,{save:function(t,e){for(var i=0,n=e.length;i
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(n),(e[0]===o||t.contains(e[0],o))&&t(o).trigger("focus"),n=e.parent(),"static"===e.css("position")?(n.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,n){i[n]=e.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(s),n.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger("focus")),e}}),t.extend(t.effects,{version:"1.12.1",define:function(e,i,n){return n||(n=i,i="effect"),t.effects.effect[e]=n,t.effects.effect[e].mode=i,n},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var n="horizontal"!==i?(e||100)/100:1,s="vertical"!==i?(e||100)/100:1;return{height:t.height()*s,width:t.width()*n,outerHeight:t.outerHeight()*s,outerWidth:t.outerWidth()*n}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var n=t.queue();e>1&&n.splice.apply(n,[1,0].concat(n.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data("ui-effects-style",t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data("ui-effects-style")||"",t.removeData("ui-effects-style")},mode:function(t,e){var i=t.is(":hidden");return"toggle"===e&&(e=i?"show":"hide"),(i?"hide"===e:"show"===e)&&(e="none"),e},getBaseline:function(t,e){var i,n;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=t[1]/e.width}return{x:n,y:i}},createPlaceholder:function(e){var i,n=e.css("position"),s=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",i=t("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data("ui-effects-placeholder",i)),e.css({position:n,left:s.left,top:s.top}),i},removePlaceholder:function(t){var e="ui-effects-placeholder",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,n,s){return s=s||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(s[i]=o[0]*n+o[1])}),s}}),t.fn.extend({effect:function(){var e=i.apply(this,arguments),n=t.effects.effect[e.effect],s=n.mode,o=e.queue,a=o||"fx",r=e.complete,l=e.mode,h=[],u=function(e){var i=t(this),n=t.effects.mode(i,l)||s;i.data(b,!0),h.push(n),s&&("show"===n||n===s&&"hide"===n)&&i.show(),s&&"none"===n||t.effects.saveStyle(i),t.isFunction(e)&&e()};if(t.fx.off||!n)return l?this[l](e.duration,r):this.each(function(){r&&r.call(this)});function c(i){var o=t(this);function a(){t.isFunction(r)&&r.call(o[0]),t.isFunction(i)&&i()}e.mode=h.shift(),!1===t.uiBackCompat||s?"none"===e.mode?(o[l](),a()):n.call(o[0],e,function(){o.removeData(b),t.effects.cleanUp(o),"hide"===e.mode&&o.hide(),a()}):(o.is(":hidden")?"hide"===l:"show"===l)?(o[l](),a()):n.call(o[0],e,a)}return!1===o?this.each(u).each(c):this.queue(a,u).queue(a,c)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="show",this.effect.call(this,s)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="hide",this.effect.call(this,s)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var s=i.apply(this,arguments);return s.mode="toggle",this.effect.call(this,s)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),n=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(n=[parseFloat(i),e])}),n},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var n=t(this),s=t(e.to),o="fixed"===s.css("position"),a=t("body"),r=o?a.scrollTop():0,l=o?a.scrollLeft():0,h=s.offset(),u={top:h.top-r,left:h.left-l,height:s.innerHeight(),width:s.innerWidth()},c=n.offset(),d=t("
").appendTo("body").addClass(e.className).css({top:c.top-r,left:c.left-l,height:n.innerHeight(),width:n.innerWidth(),position:o?"fixed":"absolute"}).animate(u,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),v={},t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){v[e]=function(e){return Math.pow(e,t+2)}}),t.extend(v,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(v,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(-2*t+2)/2}});t.effects,t.effects.define("blind","hide",function(e,i){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},s=t(this),o=e.direction||"up",a=s.cssClip(),r={clip:t.extend({},a)},l=t.effects.createPlaceholder(s);r.clip[n[o][0]]=r.clip[n[o][1]],"show"===e.mode&&(s.cssClip(r.clip),l&&l.css(t.effects.clipToBox(r)),r.clip=a),l&&l.animate(t.effects.clipToBox(r),e.duration,e.easing),s.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var n,s,o,a=t(this),r=e.mode,l="hide"===r,h="show"===r,u=e.direction||"up",c=e.distance,d=e.times||5,f=2*d+(h||l?1:0),p=e.duration/f,g=e.easing,m="up"===u||"down"===u?"top":"left",v="up"===u||"left"===u,b=0,_=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),c||(c=a["top"===m?"outerHeight":"outerWidth"]()/3),h&&((s={opacity:1})[m]=o,a.css("opacity",0).css(m,v?2*-c:2*c).animate(s,p,g)),l&&(c/=Math.pow(2,d-1)),(s={})[m]=o;b
").css({position:"absolute",visibility:"visible",left:-s*p,top:-n*g}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:p,height:g,left:o+(d?r*p:0),top:a+(d?l*g:0),opacity:d?0:1}).animate({left:o+(d?0:r*p),top:a+(d?0:l*g),opacity:d?1:0},e.duration||500,e.easing,v)}),t.effects.define("fade","toggle",function(e,i){var n="show"===e.mode;t(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("fold","hide",function(e,i){var n=t(this),s=e.mode,o="show"===s,a="hide"===s,r=e.size||15,l=/([0-9]+)%/.exec(r),h=!!e.horizFirst?["right","bottom"]:["bottom","right"],u=e.duration/2,c=t.effects.createPlaceholder(n),d=n.cssClip(),f={clip:t.extend({},d)},p={clip:t.extend({},d)},g=[d[h[0]],d[h[1]]],m=n.queue().length;l&&(r=parseInt(l[1],10)/100*g[a?0:1]),f.clip[h[0]]=r,p.clip[h[0]]=r,p.clip[h[1]]=0,o&&(n.cssClip(p.clip),c&&c.css(t.effects.clipToBox(p)),p.clip=d),n.queue(function(i){c&&c.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(p),u,e.easing),i()}).animate(f,u,e.easing).animate(p,u,e.easing).queue(i),t.effects.unshift(n,m,4)}),t.effects.define("highlight","show",function(e,i){var n=t(this),s={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(s.opacity=0),t.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(s,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("size",function(e,i){var n,s,o,a=t(this),r=["fontSize"],l=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],u=e.mode,c="effect"!==u,d=e.scale||"both",f=e.origin||["middle","center"],p=a.css("position"),g=a.position(),m=t.effects.scaledDimensions(a),v=e.from||m,b=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),"show"===u&&(o=v,v=b,b=o),s={from:{y:v.height/m.height,x:v.width/m.width},to:{y:b.height/m.height,x:b.width/m.width}},"box"!==d&&"both"!==d||(s.from.y!==s.to.y&&(v=t.effects.setTransition(a,l,s.from.y,v),b=t.effects.setTransition(a,l,s.to.y,b)),s.from.x!==s.to.x&&(v=t.effects.setTransition(a,h,s.from.x,v),b=t.effects.setTransition(a,h,s.to.x,b))),"content"!==d&&"both"!==d||s.from.y!==s.to.y&&(v=t.effects.setTransition(a,r,s.from.y,v),b=t.effects.setTransition(a,r,s.to.y,b)),f&&(n=t.effects.getBaseline(f,m),v.top=(m.outerHeight-v.outerHeight)*n.y+g.top,v.left=(m.outerWidth-v.outerWidth)*n.x+g.left,b.top=(m.outerHeight-b.outerHeight)*n.y+g.top,b.left=(m.outerWidth-b.outerWidth)*n.x+g.left),a.css(v),"content"!==d&&"both"!==d||(l=l.concat(["marginTop","marginBottom"]).concat(r),h=h.concat(["marginLeft","marginRight"]),a.find("*[width]").each(function(){var i=t(this),n=t.effects.scaledDimensions(i),o={height:n.height*s.from.y,width:n.width*s.from.x,outerHeight:n.outerHeight*s.from.y,outerWidth:n.outerWidth*s.from.x},a={height:n.height*s.to.y,width:n.width*s.to.x,outerHeight:n.height*s.to.y,outerWidth:n.width*s.to.x};s.from.y!==s.to.y&&(o=t.effects.setTransition(i,l,s.from.y,o),a=t.effects.setTransition(i,l,s.to.y,a)),s.from.x!==s.to.x&&(o=t.effects.setTransition(i,h,s.from.x,o),a=t.effects.setTransition(i,h,s.to.x,a)),c&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){c&&t.effects.restoreStyle(i)})})),a.animate(b,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===b.opacity&&a.css("opacity",v.opacity),c||(a.css("position","static"===p?"relative":p).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define("scale",function(e,i){var n=t(this),s=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==s?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(n),to:t.effects.scaledDimensions(n,o,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define("puff","hide",function(e,i){var n=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,n,i)}),t.effects.define("pulsate","show",function(e,i){var n=t(this),s=e.mode,o="show"===s,a=o||"hide"===s,r=2*(e.times||5)+(a?1:0),l=e.duration/r,h=0,u=1,c=n.queue().length;for(!o&&n.is(":visible")||(n.css("opacity",0).show(),h=1);u
",f=30,p=!1,g=e(this);if(g.parent().hasClass(n.wrapperClass)){var m=g.scrollTop();if(w=g.siblings("."+n.barClass),x=g.siblings("."+n.railClass),M(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){g.parent().css("height","auto"),g.css("height","auto");var v=g.parent().parent().height();g.parent().css("height",v),g.css("height",v)}else if("height"in i){var b=i.height;g.parent().css("height",b),g.css("height",b)}if("scrollTo"in i)m=parseInt(n.scrollTo);else if("scrollBy"in i)m+=parseInt(n.scrollBy);else if("destroy"in i)return w.remove(),x.remove(),void g.unwrap();D(m,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){n.height="auto"==n.height?g.parent().height():n.height;var _=e(d).addClass(n.wrapperClass).css({position:"relative",overflow:"hidden",width:n.width,height:n.height});g.css({overflow:"hidden",width:n.width,height:n.height});var y,x=e(d).addClass(n.railClass).css({width:n.size,height:"100%",position:"absolute",top:0,display:n.alwaysVisible&&n.railVisible?"block":"none","border-radius":n.railBorderRadius,background:n.railColor,opacity:n.railOpacity,zIndex:90}),w=e(d).addClass(n.barClass).css({background:n.color,width:n.size,position:"absolute",top:0,opacity:n.opacity,display:n.alwaysVisible?"block":"none","border-radius":n.borderRadius,BorderRadius:n.borderRadius,MozBorderRadius:n.borderRadius,WebkitBorderRadius:n.borderRadius,zIndex:99}),k="right"==n.position?{right:n.distance}:{left:n.distance};x.css(k),w.css(k),g.wrap(_),g.parent().append(w),g.parent().append(x),n.railDraggable&&w.bind("mousedown",function(i){var n=e(document);return a=!0,t=parseFloat(w.css("top")),pageY=i.pageY,n.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,w.css("top",currTop),D(0,w.position().top,!1)}),n.bind("mouseup.slimscroll",function(t){a=!1,T(),n.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(t){return t.stopPropagation(),t.preventDefault(),!1}),x.hover(function(){S()},function(){T()}),w.hover(function(){o=!0},function(){o=!1}),g.hover(function(){s=!0,S(),T()},function(){s=!1,T()}),g.bind("touchstart",function(t,e){t.originalEvent.touches.length&&(l=t.originalEvent.touches[0].pageY)}),g.bind("touchmove",function(t){(p||t.originalEvent.preventDefault(),t.originalEvent.touches.length)&&(D((l-t.originalEvent.touches[0].pageY)/n.touchScrollStep,!0),l=t.originalEvent.touches[0].pageY)}),M(),"bottom"===n.start?(w.css({top:g.outerHeight()-w.outerHeight()}),D(0,!0)):"top"!==n.start&&(D(e(n.start).position().top,null,!0),n.alwaysVisible||w.hide()),y=this,window.addEventListener?(y.addEventListener("DOMMouseScroll",C,!1),y.addEventListener("mousewheel",C,!1)):document.attachEvent("onmousewheel",C)}function C(t){if(s){var i=0;(t=t||window.event).wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+n.wrapperClass).is(g.parent())&&D(i,!0),t.preventDefault&&!p&&t.preventDefault(),p||(t.returnValue=!1)}}function D(t,e,i){p=!1;var s=t,o=g.outerHeight()-w.outerHeight();if(e&&(s=parseInt(w.css("top"))+t*parseInt(n.wheelStep)/100*w.outerHeight(),s=Math.min(Math.max(s,0),o),s=t>0?Math.ceil(s):Math.floor(s),w.css({top:s+"px"})),s=(u=parseInt(w.css("top"))/(g.outerHeight()-w.outerHeight()))*(g[0].scrollHeight-g.outerHeight()),i){var a=(s=t)/g[0].scrollHeight*g.outerHeight();a=Math.min(Math.max(a,0),o),w.css({top:a+"px"})}g.scrollTop(s),g.trigger("slimscrolling",~~s),S(),T()}function M(){h=Math.max(g.outerHeight()/g[0].scrollHeight*g.outerHeight(),f),w.css({height:h+"px"});var t=h==g.outerHeight()?"none":"block";w.css({display:t})}function S(){if(M(),clearTimeout(r),u==~~u){if(p=n.allowPageScroll,c!=u){var t=0==~~u?"top":"bottom";g.trigger("slimscroll",t)}}else p=!1;c=u,h>=g.outerHeight()?p=!0:(w.stop(!0,!0).fadeIn("fast"),n.railVisible&&x.stop(!0,!0).fadeIn("fast"))}function T(){n.alwaysVisible||(r=setTimeout(function(){n.disableFadeOut&&s||o||a||(w.fadeOut("slow"),x.fadeOut("slow"))},1e3))}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(t,e){"use strict";t.ajaxPrefilter(function(t,e,i){if(t.iframe)return t.originalURL=t.url,"iframe"}),t.ajaxTransport("iframe",function(e,i,n){var s=null,o=null,a="iframe-"+t.now(),r=t(e.files).filter(":file:enabled"),l=null;function h(){r.each(function(e,i){var n=t(i);n.data("clone").replaceWith(n)}),s.remove(),o.one("load",function(){o.remove()}),o.attr("src","javascript:false;")}if(e.dataTypes.shift(),e.data=i.data,r.length)return s=t("
").hide().attr({action:e.originalURL,target:a}),"string"==typeof e.data&&e.data.length>0&&t.error("data must not be serialized"),t.each(e.data||{},function(e,i){t.isPlainObject(i)&&(e=i.name,i=i.value),t("
").attr({name:e,value:i}).appendTo(s)}),t("
").appendTo(s),l=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+("*"!==e.dataTypes[0]?", */*; q=0.01":""):e.accepts["*"],t("
").attr("value",l).appendTo(s),r.after(function(e){var i=t(this),n=i.clone().prop("disabled",!0);return i.data("clone",n),n}).next(),r.appendTo(s),{send:function(e,i){(o=t("
")).one("load",function(){o.one("load",function(){var t=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,e=t.documentElement?t.documentElement:t.body,n=e.getElementsByTagName("textarea")[0],s=n&&n.getAttribute("data-type")||null,o=n&&n.getAttribute("data-status")||200,a=n&&n.getAttribute("data-statusText")||"OK",r={html:e.innerHTML,text:s?n.value:e?e.textContent||e.innerText:null};h(),i(o,a,r,s?"Content-Type: "+s:null)}),s[0].submit()}),t("body").append(s,o)},abort:function(){null!==o&&(o.unbind("load").attr("src","javascript:false;"),h())}}})}(jQuery),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","jquery-ui/ui/widget"],t):"object"==typeof exports?t(require("jquery"),require("./vendor/jquery.ui.widget")):t(window.jQuery)}(function(t){"use strict";function e(e){var i="dragover"===e;return function(n){n.dataTransfer=n.originalEvent&&n.originalEvent.dataTransfer;var s=n.dataTransfer;s&&-1!==t.inArray("Files",s.types)&&!1!==this._trigger(e,t.Event(e,{delegatedEvent:n}))&&(n.preventDefault(),i&&(s.dropEffect="copy"))}}t.support.fileInput=!(new RegExp("(Android (1\\.[0156]|2\\.[01]))|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)|(w(eb)?OSBrowser)|(webOS)|(Kindle/(1\\.0|2\\.[05]|3\\.0))").test(window.navigator.userAgent)||t('
').prop("disabled")),t.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),t.support.xhrFormDataFileUpload=!!window.FormData,t.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),t.widget("blueimp.fileupload",{options:{dropZone:t(document),pasteZone:void 0,fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,limitMultiFileUploadSize:void 0,limitMultiFileUploadSizeOverhead:512,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,uniqueFilenames:void 0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(e,i){return e=this.messages[e]||e.toString(),i&&t.each(i,function(t,i){e=e.replace("{"+t+"}",i)}),e},formData:function(t){return t.serializeArray()},add:function(e,i){if(e.isDefaultPrevented())return!1;(i.autoUpload||!1!==i.autoUpload&&t(this).fileupload("option","autoUpload"))&&i.process().done(function(){i.submit()})},processData:!1,contentType:!1,cache:!1,timeout:0},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:t.support.blobSlice&&function(){return(this.slice||this.webkitSlice||this.mozSlice).apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(t,e,i){var n=t-this.timestamp;return(!this.bitrate||!i||n>i)&&(this.bitrate=(e-this.loaded)*(1e3/n)*8,this.loaded=e,this.timestamp=t),this.bitrate}},_isXHRUpload:function(e){return!e.forceIframeTransport&&(!e.multipart&&t.support.xhrFileUpload||t.support.xhrFormDataFileUpload)},_getFormData:function(e){var i;return"function"===t.type(e.formData)?e.formData(e.form):t.isArray(e.formData)?e.formData:"object"===t.type(e.formData)?(i=[],t.each(e.formData,function(t,e){i.push({name:t,value:e})}),i):[]},_getTotal:function(e){var i=0;return t.each(e,function(t,e){i+=e.size||1}),i},_initProgressObject:function(e){var i={loaded:0,total:0,bitrate:0};e._progress?t.extend(e._progress,i):e._progress=i},_initResponseObject:function(t){var e;if(t._response)for(e in t._response)t._response.hasOwnProperty(e)&&delete t._response[e];else t._response={}},_onProgress:function(e,i){if(e.lengthComputable){var n,s=Date.now?Date.now():(new Date).getTime();if(i._time&&i.progressInterval&&s-i._time
").prop("href",e.url).prop("host");e.dataType="iframe "+(e.dataType||""),e.formData=this._getFormData(e),e.redirect&&i&&i!==location.host&&e.formData.push({name:e.redirectParamName||"redirect",value:e.redirect})},_initDataSettings:function(t){this._isXHRUpload(t)?(this._chunkedUpload(t,!0)||(t.data||this._initXHRData(t),this._initProgressListener(t)),t.postMessage&&(t.dataType="postmessage "+(t.dataType||""))):this._initIframeSettings(t)},_getParamName:function(e){var i=t(e.fileInput),n=e.paramName;return n?t.isArray(n)||(n=[n]):(n=[],i.each(function(){for(var e=t(this),i=e.prop("name")||"files[]",s=(e.prop("files")||[1]).length;s;)n.push(i),s-=1}),n.length||(n=[i.prop("name")||"files[]"])),n},_initFormSettings:function(e){e.form&&e.form.length||(e.form=t(e.fileInput.prop("form")),e.form.length||(e.form=t(this.options.fileInput.prop("form")))),e.paramName=this._getParamName(e),e.url||(e.url=e.form.prop("action")||location.href),e.type=(e.type||"string"===t.type(e.form.prop("method"))&&e.form.prop("method")||"").toUpperCase(),"POST"!==e.type&&"PUT"!==e.type&&"PATCH"!==e.type&&(e.type="POST"),e.formAcceptCharset||(e.formAcceptCharset=e.form.attr("accept-charset"))},_getAJAXSettings:function(e){var i=t.extend({},this.options,e);return this._initFormSettings(i),this._initDataSettings(i),i},_getDeferredState:function(t){return t.state?t.state():t.isResolved()?"resolved":t.isRejected()?"rejected":"pending"},_enhancePromise:function(t){return t.success=t.done,t.error=t.fail,t.complete=t.always,t},_getXHRPromise:function(e,i,n){var s=t.Deferred(),o=s.promise();return i=i||this.options.context||o,!0===e?s.resolveWith(i,n):!1===e&&s.rejectWith(i,n),o.abort=s.promise,this._enhancePromise(o)},_addConvenienceMethods:function(e,i){var n=this,s=function(e){return t.Deferred().resolveWith(n,e).promise()};i.process=function(e,o){return(e||o)&&(i._processQueue=this._processQueue=(this._processQueue||s([this])).then(function(){return i.errorThrown?t.Deferred().rejectWith(n,[i]).promise():s(arguments)}).then(e,o)),this._processQueue||s([this])},i.submit=function(){return"pending"!==this.state()&&(i.jqXHR=this.jqXHR=!1!==n._trigger("submit",t.Event("submit",{delegatedEvent:e}),this)&&n._onSend(e,this)),this.jqXHR||n._getXHRPromise()},i.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",n._trigger("fail",null,this),n._getXHRPromise(!1))},i.state=function(){return this.jqXHR?n._getDeferredState(this.jqXHR):this._processQueue?n._getDeferredState(this._processQueue):void 0},i.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===n._getDeferredState(this._processQueue)},i.progress=function(){return this._progress},i.response=function(){return this._response}},_getUploadedBytes:function(t){var e=t.getResponseHeader("Range"),i=e&&e.split("-"),n=i&&i.length>1&&parseInt(i[1],10);return n&&n+1},_chunkedUpload:function(e,i){e.uploadedBytes=e.uploadedBytes||0;var n,s,o=this,a=e.files[0],r=a.size,l=e.uploadedBytes,h=e.maxChunkSize||r,u=this._blobSlice,c=t.Deferred(),d=c.promise();return!(!(this._isXHRUpload(e)&&u&&(l||("function"===t.type(h)?h(e):h)=r?(a.error=e.i18n("uploadedBytes"),this._getXHRPromise(!1,e.context,[null,"error",a.error])):(s=function(){var i=t.extend({},e),d=i._progress.loaded;i.blob=u.call(a,l,l+("function"===t.type(h)?h(i):h),a.type),i.chunkSize=i.blob.size,i.contentRange="bytes "+l+"-"+(l+i.chunkSize-1)+"/"+r,o._trigger("chunkbeforesend",null,i),o._initXHRData(i),o._initProgressListener(i),n=(!1!==o._trigger("chunksend",null,i)&&t.ajax(i)||o._getXHRPromise(!1,i.context)).done(function(n,a,h){l=o._getUploadedBytes(h)||l+i.chunkSize,d+i.chunkSize-i._progress.loaded&&o._onProgress(t.Event("progress",{lengthComputable:!0,loaded:l-i.uploadedBytes,total:l-i.uploadedBytes}),i),e.uploadedBytes=i.uploadedBytes=l,i.result=n,i.textStatus=a,i.jqXHR=h,o._trigger("chunkdone",null,i),o._trigger("chunkalways",null,i),lr._sending)for(var n=r._slots.shift();n;){if("pending"===r._getDeferredState(n)){n.resolve();break}n=r._slots.shift()}0===r._active&&r._trigger("stop")})};return this._beforeSend(e,l),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=t.Deferred(),this._slots.push(o),a=o.then(h)):(this._sequence=this._sequence.then(h,h),a=this._sequence),a.abort=function(){return s=[void 0,"abort","abort"],n?n.abort():(o&&o.rejectWith(l.context,s),h())},this._enhancePromise(a)):h()},_onAdd:function(e,i){var n,s,o,a,r=this,l=!0,h=t.extend({},this.options,i),u=i.files,c=u.length,d=h.limitMultiFileUploads,f=h.limitMultiFileUploadSize,p=h.limitMultiFileUploadSizeOverhead,g=0,m=this._getParamName(h),v=0;if(!c)return!1;if(f&&void 0===u[0].size&&(f=void 0),(h.singleFileUploads||d||f)&&this._isXHRUpload(h))if(h.singleFileUploads||f||!d)if(!h.singleFileUploads&&f)for(o=[],n=[],a=0;af||d&&a+1-v>=d)&&(o.push(u.slice(v,a+1)),(s=m.slice(v,a+1)).length||(s=m),n.push(s),v=a+1,g=0);else n=m;else for(o=[],n=[],a=0;a").append(n)[0].reset(),i.after(n).detach(),s&&n.focus(),t.cleanData(i.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(t,e){return e===i[0]?n[0]:e}),i[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(e,i){var n,s=this,o=t.Deferred(),a=[],r=function(t){t&&!t.entry&&(t.entry=e),o.resolve([t])},l=function(){n.readEntries(function(t){t.length?(a=a.concat(t),l()):function(t){s._handleFileTreeEntries(t,i+e.name+"/").done(function(t){o.resolve(t)}).fail(r)}(a)},r)};return i=i||"",e.isFile?e._file?(e._file.relativePath=i,o.resolve(e._file)):e.file(function(t){t.relativePath=i,o.resolve(t)},r):e.isDirectory?(n=e.createReader(),l()):o.resolve([]),o.promise()},_handleFileTreeEntries:function(e,i){var n=this;return t.when.apply(t,t.map(e,function(t){return n._handleFileTreeEntry(t,i)})).then(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(e){var i=(e=e||{}).items;return i&&i.length&&(i[0].webkitGetAsEntry||i[0].getAsEntry)?this._handleFileTreeEntries(t.map(i,function(t){var e;return t.webkitGetAsEntry?((e=t.webkitGetAsEntry())&&(e._file=t.getAsFile()),e):t.getAsEntry()})):t.Deferred().resolve(t.makeArray(e.files)).promise()},_getSingleFileInputFiles:function(e){var i,n,s=(e=t(e)).prop("webkitEntries")||e.prop("entries");if(s&&s.length)return this._handleFileTreeEntries(s);if((i=t.makeArray(e.prop("files"))).length)void 0===i[0].name&&i[0].fileName&&t.each(i,function(t,e){e.name=e.fileName,e.size=e.fileSize});else{if(!(n=e.prop("value")))return t.Deferred().resolve([]).promise();i=[{name:n.replace(/^.*\\/,"")}]}return t.Deferred().resolve(i).promise()},_getFileInputFiles:function(e){return e instanceof t&&1!==e.length?t.when.apply(t,t.map(e,this._getSingleFileInputFiles)).then(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(e)},_onChange:function(e){var i=this,n={fileInput:t(e.target),form:t(e.target.form)};this._getFileInputFiles(n.fileInput).always(function(s){n.files=s,i.options.replaceFileInput&&i._replaceFileInput(n),!1!==i._trigger("change",t.Event("change",{delegatedEvent:e}),n)&&i._onAdd(e,n)})},_onPaste:function(e){var i=e.originalEvent&&e.originalEvent.clipboardData&&e.originalEvent.clipboardData.items,n={files:[]};i&&i.length&&(t.each(i,function(t,e){var i=e.getAsFile&&e.getAsFile();i&&n.files.push(i)}),!1!==this._trigger("paste",t.Event("paste",{delegatedEvent:e}),n)&&this._onAdd(e,n))},_onDrop:function(e){e.dataTransfer=e.originalEvent&&e.originalEvent.dataTransfer;var i=this,n=e.dataTransfer,s={};n&&n.files&&n.files.length&&(e.preventDefault(),this._getDroppedFiles(n).always(function(n){s.files=n,!1!==i._trigger("drop",t.Event("drop",{delegatedEvent:e}),s)&&i._onAdd(e,s)}))},_onDragOver:e("dragover"),_onDragEnter:e("dragenter"),_onDragLeave:e("dragleave"),_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop,dragenter:this._onDragEnter,dragleave:this._onDragLeave}),this._on(this.options.pasteZone,{paste:this._onPaste})),t.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragenter dragleave dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_destroy:function(){this._destroyEventHandlers()},_setOption:function(e,i){var n=-1!==t.inArray(e,this._specialOptions);n&&this._destroyEventHandlers(),this._super(e,i),n&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var e=this.options;void 0===e.fileInput?e.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):e.fileInput instanceof t||(e.fileInput=t(e.fileInput)),e.dropZone instanceof t||(e.dropZone=t(e.dropZone)),e.pasteZone instanceof t||(e.pasteZone=t(e.pasteZone))},_getRegExp:function(t){var e=t.split("/"),i=e.pop();return e.shift(),new RegExp(e.join("/"),i)},_isRegExpOption:function(e,i){return"url"!==e&&"string"===t.type(i)&&/^\/.*\/[igm]{0,3}$/.test(i)},_initDataAttributes:function(){var e=this,i=this.options,n=this.element.data();t.each(this.element[0].attributes,function(t,s){var o,a=s.name.toLowerCase();/^data-/.test(a)&&(a=a.slice(5).replace(/-[a-z]/g,function(t){return t.charAt(1).toUpperCase()}),o=n[a],e._isRegExpOption(a,o)&&(o=e._getRegExp(o)),i[a]=o)})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(e){var i=this;e&&!this.options.disabled&&(e.fileInput&&!e.files?this._getFileInputFiles(e.fileInput).always(function(t){e.files=t,i._onAdd(null,e)}):(e.files=t.makeArray(e.files),this._onAdd(null,e)))},send:function(e){if(e&&!this.options.disabled){if(e.fileInput&&!e.files){var i,n,s=this,o=t.Deferred(),a=o.promise();return a.abort=function(){return n=!0,i?i.abort():(o.reject(null,"abort","abort"),a)},this._getFileInputFiles(e.fileInput).always(function(t){n||(t.length?(e.files=t,(i=s._onSend(null,e)).then(function(t,e,i){o.resolve(t,e,i)},function(t,e,i){o.reject(t,e,i)})):o.reject())}),this._enhancePromise(a)}if(e.files=t.makeArray(e.files),e.files.length)return this._onSend(null,e)}return this._getXHRPromise(!1,e&&e.context)}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&e(jQuery)}(0,function(t){"use strict";var e=function(i,n,s,o,a){this.fallbackValue=s?"string"==typeof s?this.parse(s):s:null,this.fallbackFormat=o||"rgba",this.hexNumberSignPrefix=!0===a,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=n||{},this.colors=t.extend({},e.webColors,this.predefinedColors),i&&(void 0!==i.h?this.value=i:this.setColor(String(i))),this.value||(this.value={h:0,s:0,b:0,a:1})};e.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){var s,o,a,r,l;return 0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t=(t*=360)%360/60,s=o=a=i-(l=i*e),s+=[l,r=l*(1-Math.abs(t%2-1)),0,0,r,l][t=~~t],o+=[r,l,l,r,0,0][t],a+=[0,0,r,l,l,r][t],{r:Math.round(255*s),g:Math.round(255*o),b:Math.round(255*a),a:n}},toHex:function(t,e,i,n,s){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,s=this.value.a);var o="#",a=this.toRGB(e,i,n,s);return this.rgbaIsTransparent(a)?"transparent":(t||(o=this.hexNumberSignPrefix?"#":""),o+((1<<24)+(parseInt(a.r)<<16)+(parseInt(a.g)<<8)+parseInt(a.b)).toString(16).slice(1))},toHSL:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a);var s=t,o=(2-e)*i,a=e*i;return a/=o>0&&o<=1?o:2-o,o/=2,a>1&&(a=1),{h:isNaN(s)?0:s,s:isNaN(a)?0:a,l:isNaN(o)?0:o,a:isNaN(n)?0:n}},toAlias:function(t,e,i,n){var s,o=0===arguments.length?this.toHex(!0):this.toHex(!0,t,e,i,n),a="alias"===this.origFormat?o:this.toString(!1,this.origFormat);for(var r in this.colors)if((s=this.colors[r].toLowerCase().trim())===o||s===a)return r;return!1},RGBtoHSB:function(t,e,i,n){var s,o,a,r;return t/=255,e/=255,i/=255,s=((s=0===(r=(a=Math.max(t,e,i))-Math.min(t,e,i))?null:a===t?(e-i)/r:a===e?(i-t)/r+2:(t-e)/r+4)+360)%6*60/360,o=0===r?0:r/a,{h:this._sanitizeNumber(s),s:o,b:a,a:this._sanitizeNumber(n)}},HueToRGB:function(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t},HSLtoRGB:function(t,e,i,n){var s;e<0&&(e=0);var o=2*i-(s=i<=.5?i*(1+e):i+e-i*e),a=t+1/3,r=t,l=t-1/3;return[Math.round(255*this.HueToRGB(o,s,a)),Math.round(255*this.HueToRGB(o,s,r)),Math.round(255*this.HueToRGB(o,s,l)),this._sanitizeNumber(n)]},parse:function(e){if("string"!=typeof e)return this.fallbackValue;if(0===arguments.length)return!1;var i,n,s=this,o=!1,a=void 0!==this.colors[e];return a&&(e=this.colors[e].toLowerCase().trim()),t.each(this.stringParsers,function(t,r){var l=r.re.exec(e);return!(i=l&&r.parse.apply(s,[l]))||(o={},n=a?"alias":r.format?r.format:s.getValidFallbackFormat(),(o=n.match(/hsla?/)?s.RGBtoHSB.apply(s,s.HSLtoRGB.apply(s,i)):s.RGBtoHSB.apply(s,i))instanceof Object&&(o.format=n),!1)}),o},getValidFallbackFormat:function(){var t=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&-1!==t.indexOf(this.origFormat)?this.origFormat:this.fallbackFormat&&-1!==t.indexOf(this.fallbackFormat)?this.fallbackFormat:"rgba"},toString:function(t,i,n){n=n||!1;var s=!1;switch(i=i||this.origFormat||this.fallbackFormat){case"rgb":return s=this.toRGB(),this.rgbaIsTransparent(s)?"transparent":"rgb("+s.r+","+s.g+","+s.b+")";case"rgba":return"rgba("+(s=this.toRGB()).r+","+s.g+","+s.b+","+s.a+")";case"hsl":return s=this.toHSL(),"hsl("+Math.round(360*s.h)+","+Math.round(100*s.s)+"%,"+Math.round(100*s.l)+"%)";case"hsla":return s=this.toHSL(),"hsla("+Math.round(360*s.h)+","+Math.round(100*s.s)+"%,"+Math.round(100*s.l)+"%,"+s.a+")";case"hex":return this.toHex(t);case"alias":return!1===(s=this.toAlias())?this.toString(t,this.getValidFallbackFormat()):n&&!(s in e.webColors)&&s in this.predefinedColors?this.predefinedColors[s]:s;default:return s}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(t){return[t[1],t[2],t[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(t){return[t[1]/360,t[2]/100,t[3]/100,t[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),1]}}],colorNameToHex:function(t){return void 0!==this.colors[t.toLowerCase()]&&this.colors[t.toLowerCase()]}};var i={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'',align:"right",customClass:null,colorSelectors:null},n=function(e,n){this.element=t(e).addClass("colorpicker-element"),this.options=t.extend(!0,{},i,this.element.data(),n),this.component=this.options.component,this.component=!1!==this.component&&this.element.find(this.component),this.component&&0===this.component.length&&(this.component=!1),this.container=!0===this.options.container?this.element:this.options.container,this.container=!1!==this.container&&t(this.container),this.input=this.element.is("input")?this.element:!!this.options.input&&this.element.find(this.options.input),this.input&&0===this.input.length&&(this.input=!1),this.color=this.createColor(!1!==this.options.color?this.options.color:this.getValue()),this.format=!1!==this.options.format?this.options.format:this.color.origFormat,!1!==this.options.color&&(this.updateInput(this.color),this.updateData(this.color)),this.disabled=!1;var s=this.picker=t(this.options.template);if(this.options.customClass&&s.addClass(this.options.customClass),this.options.inline?s.addClass("colorpicker-inline colorpicker-visible"):s.addClass("colorpicker-hidden"),this.options.horizontal&&s.addClass("colorpicker-horizontal"),-1===["rgba","hsla","alias"].indexOf(this.format)&&!1!==this.options.format&&"transparent"!==this.getValue()||s.addClass("colorpicker-with-alpha"),"right"===this.options.align&&s.addClass("colorpicker-right"),!0===this.options.inline&&s.addClass("colorpicker-no-arrow"),this.options.colorSelectors){var o=this,a=o.picker.find(".colorpicker-selectors");a.length>0&&(t.each(this.options.colorSelectors,function(e,i){var n=t(" ").addClass("colorpicker-selectors-color").css("background-color",i).data("class",e).data("alias",e);n.on("mousedown.colorpicker touchstart.colorpicker",function(e){e.preventDefault(),o.setValue("alias"===o.format?t(this).data("alias"):t(this).css("background-color"))}),a.append(n)}),a.show().addClass("colorpicker-visible"))}s.on("mousedown.colorpicker touchstart.colorpicker",t.proxy(function(t){t.target===t.currentTarget&&t.preventDefault()},this)),s.find(".colorpicker-saturation, .colorpicker-hue, .colorpicker-alpha").on("mousedown.colorpicker touchstart.colorpicker",t.proxy(this.mousedown,this)),s.appendTo(this.container?this.container:t("body")),!1!==this.input&&(this.input.on({"keyup.colorpicker":t.proxy(this.keyup,this)}),this.input.on({"input.colorpicker":t.proxy(this.change,this)}),!1===this.component&&this.element.on({"focus.colorpicker":t.proxy(this.show,this)}),!1===this.options.inline&&this.element.on({"focusout.colorpicker":t.proxy(this.hide,this)})),!1!==this.component&&this.component.on({"click.colorpicker":t.proxy(this.show,this)}),!1===this.input&&!1===this.component&&this.element.on({"click.colorpicker":t.proxy(this.show,this)}),!1!==this.input&&!1!==this.component&&"color"===this.input.attr("type")&&this.input.on({"click.colorpicker":t.proxy(this.show,this),"focus.colorpicker":t.proxy(this.show,this)}),this.update(),t(t.proxy(function(){this.element.trigger("create")},this))};n.Color=e,n.prototype={constructor:n,destroy:function(){this.picker.remove(),this.element.removeData("colorpicker","color").off(".colorpicker"),!1!==this.input&&this.input.off(".colorpicker"),!1!==this.component&&this.component.off(".colorpicker"),this.element.removeClass("colorpicker-element"),this.element.trigger({type:"destroy"})},reposition:function(){if(!1!==this.options.inline||this.options.container)return!1;var t=this.container&&this.container[0]!==window.document.body?"position":"offset",e=this.component||this.element,i=e[t]();"right"===this.options.align&&(i.left-=this.picker.outerWidth()-e.outerWidth()),this.picker.css({top:i.top+e.outerHeight(),left:i.left})},show:function(e){this.isDisabled()||(this.picker.addClass("colorpicker-visible").removeClass("colorpicker-hidden"),this.reposition(),t(window).on("resize.colorpicker",t.proxy(this.reposition,this)),!e||this.hasInput()&&"color"!==this.input.attr("type")||e.stopPropagation&&e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!this.component&&this.input||!1!==this.options.inline||t(window.document).on({"mousedown.colorpicker":t.proxy(this.hide,this)}),this.element.trigger({type:"showPicker",color:this.color}))},hide:function(e){if(void 0!==e&&e.target&&(t(e.currentTarget).parents(".colorpicker").length>0||t(e.target).parents(".colorpicker").length>0))return!1;this.picker.addClass("colorpicker-hidden").removeClass("colorpicker-visible"),t(window).off("resize.colorpicker",this.reposition),t(window.document).off({"mousedown.colorpicker":this.hide}),this.update(),this.element.trigger({type:"hidePicker",color:this.color})},updateData:function(t){return t=t||this.color.toString(!1,this.format),this.element.data("color",t),t},updateInput:function(t){return t=t||this.color.toString(!1,this.format),!1!==this.input&&(this.input.prop("value",t),this.input.trigger("change")),t},updatePicker:function(t){void 0!==t&&(this.color=this.createColor(t));var e=!1===this.options.horizontal?this.options.sliders:this.options.slidersHorz,i=this.picker.find("i");if(0!==i.length)return!1===this.options.horizontal?(e=this.options.sliders,i.eq(1).css("top",e.hue.maxTop*(1-this.color.value.h)).end().eq(2).css("top",e.alpha.maxTop*(1-this.color.value.a))):(e=this.options.slidersHorz,i.eq(1).css("left",e.hue.maxLeft*(1-this.color.value.h)).end().eq(2).css("left",e.alpha.maxLeft*(1-this.color.value.a))),i.eq(0).css({top:e.saturation.maxTop-this.color.value.b*e.saturation.maxTop,left:this.color.value.s*e.saturation.maxLeft}),this.picker.find(".colorpicker-saturation").css("backgroundColor",this.color.toHex(!0,this.color.value.h,1,1,1)),this.picker.find(".colorpicker-alpha").css("backgroundColor",this.color.toHex(!0)),this.picker.find(".colorpicker-color, .colorpicker-color div").css("backgroundColor",this.color.toString(!0,this.format)),t},updateComponent:function(t){var e;if(e=void 0!==t?this.createColor(t):this.color,!1!==this.component){var i=this.component.find("i").eq(0);i.length>0?i.css({backgroundColor:e.toString(!0,this.format)}):this.component.css({backgroundColor:e.toString(!0,this.format)})}return e.toString(!1,this.format)},update:function(t){var e;return!1===this.getValue(!1)&&!0!==t||(e=this.updateComponent(),this.updateInput(e),this.updateData(e),this.updatePicker()),e},setValue:function(t){this.color=this.createColor(t),this.update(!0),this.element.trigger({type:"changeColor",color:this.color,value:t})},createColor:function(t){return new e(t||null,this.options.colorSelectors,this.options.fallbackColor?this.options.fallbackColor:this.color,this.options.fallbackFormat,this.options.hexNumberSignPrefix)},getValue:function(t){var e;return t=void 0===t?this.options.fallbackColor:t,void 0!==(e=this.hasInput()?this.input.val():this.element.data("color"))&&""!==e&&null!==e||(e=t),e},hasInput:function(){return!1!==this.input},isDisabled:function(){return this.disabled},disable:function(){return this.hasInput()&&this.input.prop("disabled",!0),this.disabled=!0,this.element.trigger({type:"disable",color:this.color,value:this.getValue()}),!0},enable:function(){return this.hasInput()&&this.input.prop("disabled",!1),this.disabled=!1,this.element.trigger({type:"enable",color:this.color,value:this.getValue()}),!0},currentSlider:null,mousePointer:{left:0,top:0},mousedown:function(e){!e.pageX&&!e.pageY&&e.originalEvent&&e.originalEvent.touches&&(e.pageX=e.originalEvent.touches[0].pageX,e.pageY=e.originalEvent.touches[0].pageY),e.stopPropagation(),e.preventDefault();var i=t(e.target).closest("div"),n=this.options.horizontal?this.options.slidersHorz:this.options.sliders;if(!i.is(".colorpicker")){if(i.is(".colorpicker-saturation"))this.currentSlider=t.extend({},n.saturation);else if(i.is(".colorpicker-hue"))this.currentSlider=t.extend({},n.hue);else{if(!i.is(".colorpicker-alpha"))return!1;this.currentSlider=t.extend({},n.alpha)}var s=i.offset();this.currentSlider.guide=i.find("i")[0].style,this.currentSlider.left=e.pageX-s.left,this.currentSlider.top=e.pageY-s.top,this.mousePointer={left:e.pageX,top:e.pageY},t(window.document).on({"mousemove.colorpicker":t.proxy(this.mousemove,this),"touchmove.colorpicker":t.proxy(this.mousemove,this),"mouseup.colorpicker":t.proxy(this.mouseup,this),"touchend.colorpicker":t.proxy(this.mouseup,this)}).trigger("mousemove")}return!1},mousemove:function(t){!t.pageX&&!t.pageY&&t.originalEvent&&t.originalEvent.touches&&(t.pageX=t.originalEvent.touches[0].pageX,t.pageY=t.originalEvent.touches[0].pageY),t.stopPropagation(),t.preventDefault();var e=Math.max(0,Math.min(this.currentSlider.maxLeft,this.currentSlider.left+((t.pageX||this.mousePointer.left)-this.mousePointer.left))),i=Math.max(0,Math.min(this.currentSlider.maxTop,this.currentSlider.top+((t.pageY||this.mousePointer.top)-this.mousePointer.top)));return this.currentSlider.guide.left=e+"px",this.currentSlider.guide.top=i+"px",this.currentSlider.callLeft&&this.color[this.currentSlider.callLeft].call(this.color,e/this.currentSlider.maxLeft),this.currentSlider.callTop&&this.color[this.currentSlider.callTop].call(this.color,i/this.currentSlider.maxTop),!1!==this.options.format||"setAlpha"!==this.currentSlider.callTop&&"setAlpha"!==this.currentSlider.callLeft||(1!==this.color.value.a?(this.format="rgba",this.color.origFormat="rgba"):(this.format="hex",this.color.origFormat="hex")),this.update(!0),this.element.trigger({type:"changeColor",color:this.color}),!1},mouseup:function(e){return e.stopPropagation(),e.preventDefault(),t(window.document).off({"mousemove.colorpicker":this.mousemove,"touchmove.colorpicker":this.mousemove,"mouseup.colorpicker":this.mouseup,"touchend.colorpicker":this.mouseup}),!1},change:function(t){this.color=this.createColor(this.input.val()),this.color.origFormat&&!1===this.options.format&&(this.format=this.color.origFormat),!1!==this.getValue(!1)&&(this.updateData(),this.updateComponent(),this.updatePicker()),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})},keyup:function(t){38===t.keyCode?(this.color.value.a<1&&(this.color.value.a=Math.round(100*(this.color.value.a+.01))/100),this.update(!0)):40===t.keyCode&&(this.color.value.a>0&&(this.color.value.a=Math.round(100*(this.color.value.a-.01))/100),this.update(!0)),this.element.trigger({type:"changeColor",color:this.color,value:this.input.val()})}},t.colorpicker=n,t.fn.colorpicker=function(e){var i=Array.prototype.slice.call(arguments,1),s=1===this.length,o=null,a=this.each(function(){var s=t(this),a=s.data("colorpicker");a||(a=new n(this,"object"==typeof e?e:{}),s.data("colorpicker",a)),"string"==typeof e?t.isFunction(a[e])?o=a[e].apply(a,i):(i.length&&(a[e]=i[0]),o=a[e]):o=s});return s?o:a},t.fn.colorpicker.constructor=n}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t,e){function i(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var t=new Date;return i(t.getFullYear(),t.getMonth(),t.getDate())}function s(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function o(i,n){return function(){return n!==e&&t.fn.datepicker.deprecated(n),this[i].apply(this,arguments)}}var a,r=(a={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),i=0,n=this.length;i]/g)||[]).length<=0||t(i).length>0)}catch(t){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var s=this.o=t.extend({},this._o),o=s.language;p[o]||(o=o.split("-")[0],p[o]||(o=d.language)),s.language=o,s.startView=this._resolveViewName(s.startView),s.minViewMode=this._resolveViewName(s.minViewMode),s.maxViewMode=this._resolveViewName(s.maxViewMode),s.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,s.startView)),!0!==s.multidate&&(s.multidate=Number(s.multidate)||!1,!1!==s.multidate&&(s.multidate=Math.max(0,s.multidate))),s.multidateSeparator=String(s.multidateSeparator),s.weekStart%=7,s.weekEnd=(s.weekStart+6)%7;var a=g.parseFormat(s.format);s.startDate!==-1/0&&(s.startDate?s.startDate instanceof Date?s.startDate=this._local_to_utc(this._zero_time(s.startDate)):s.startDate=g.parseDate(s.startDate,a,s.language,s.assumeNearbyYear):s.startDate=-1/0),s.endDate!==1/0&&(s.endDate?s.endDate instanceof Date?s.endDate=this._local_to_utc(this._zero_time(s.endDate)):s.endDate=g.parseDate(s.endDate,a,s.language,s.assumeNearbyYear):s.endDate=1/0),s.daysOfWeekDisabled=this._resolveDaysOfWeek(s.daysOfWeekDisabled||[]),s.daysOfWeekHighlighted=this._resolveDaysOfWeek(s.daysOfWeekHighlighted||[]),s.datesDisabled=s.datesDisabled||[],t.isArray(s.datesDisabled)||(s.datesDisabled=s.datesDisabled.split(",")),s.datesDisabled=t.map(s.datesDisabled,function(t){return g.parseDate(t,a,s.language,s.assumeNearbyYear)});var r=String(s.orientation).toLowerCase().split(/\s+/g),l=s.orientation.toLowerCase();if(r=t.grep(r,function(t){return/^auto|left|right|top|bottom$/.test(t)}),s.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===r.length)switch(r[0]){case"top":case"bottom":s.orientation.y=r[0];break;case"left":case"right":s.orientation.x=r[0]}else l=t.grep(r,function(t){return/^left|right$/.test(t)}),s.orientation.x=l[0]||"auto",l=t.grep(r,function(t){return/^top|bottom$/.test(t)}),s.orientation.y=l[0]||"auto";else;if(s.defaultViewDate instanceof Date||"string"==typeof s.defaultViewDate)s.defaultViewDate=g.parseDate(s.defaultViewDate,a,s.language,s.assumeNearbyYear);else if(s.defaultViewDate){var h=s.defaultViewDate.year||(new Date).getFullYear(),u=s.defaultViewDate.month||0,c=s.defaultViewDate.day||1;s.defaultViewDate=i(h,u,c)}else s.defaultViewDate=n()},_applyEvents:function(t){for(var i,n,s,o=0;os?(this.picker.addClass("datepicker-orient-right"),d+=c-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-o+f-i<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=i+parseInt(this.picker.css("padding-top")):f+=u,this.o.rtl){var g=s-(d+c);this.picker.css({top:f,right:g,zIndex:l})}else this.picker.css({top:f,left:d,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return g.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="";for(this.o.calendarWeeks&&(i+=' ');e'+p[this.o.language].daysMin[e++%7]+"";i+=" ",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",i=0;i<12;i++)e+=''+p[this.o.language].monthsShort[i]+" ";this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],o=this.viewDate.getUTCFullYear(),a=this.viewDate.getUTCMonth(),r=n();return e.getUTCFullYear()o||e.getUTCFullYear()===o&&e.getUTCMonth()>a)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&s(e,r)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&er)&&h.push("disabled"),_===v&&h.push("focused"),l!==t.noop&&((c=l(new Date(_,0,1)))===e?c={}:"boolean"==typeof c?c={enabled:c}:"string"==typeof c&&(c={classes:c}),!1===c.enabled&&h.push("disabled"),c.classes&&(h=h.concat(c.classes.split(/\s+/))),c.tooltip&&(u=c.tooltip)),d+='"+_+" ";p.find(".datepicker-switch").text(g+"-"+m),p.find("td").html(d)},fill:function(){var s,o,a=new Date(this.viewDate),r=a.getUTCFullYear(),l=a.getUTCMonth(),h=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,u=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,f=p[this.o.language].today||p.en.today||"",m=p[this.o.language].clear||p.en.clear||"",v=p[this.o.language].titleFormat||p.en.titleFormat,b=n(),_=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&b>=this.o.startDate&&b<=this.o.endDate&&!this.weekOfDateIsDisabled(b);if(!isNaN(r)&&!isNaN(l)){this.picker.find(".datepicker-days .datepicker-switch").text(g.formatDate(a,v,this.o.language)),this.picker.find("tfoot .today").text(f).css("display",_?"table-cell":"none"),this.picker.find("tfoot .clear").text(m).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var y=i(r,l,0),x=y.getUTCDate();y.setUTCDate(x-(y.getUTCDay()-this.o.weekStart+7)%7);var w=new Date(y);y.getUTCFullYear()<100&&w.setUTCFullYear(y.getUTCFullYear()),w.setUTCDate(w.getUTCDate()+42),w=w.valueOf();for(var k,C,D=[];y.valueOf()"),this.o.calendarWeeks)){var M=new Date(+y+(this.o.weekStart-k-7)%7*864e5),S=new Date(Number(M)+(11-M.getUTCDay())%7*864e5),T=new Date(Number(T=i(S.getUTCFullYear(),0,1))+(11-T.getUTCDay())%7*864e5),I=(S-T)/864e5/7+1;D.push(''+I+" ")}(C=this.getClassNames(y)).push("day");var P=y.getUTCDate();this.o.beforeShowDay!==t.noop&&((o=this.o.beforeShowDay(this._utc_to_local(y)))===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&C.push("disabled"),o.classes&&(C=C.concat(o.classes.split(/\s+/))),o.tooltip&&(s=o.tooltip),o.content&&(P=o.content)),C=t.isFunction(t.uniqueSort)?t.uniqueSort(C):t.unique(C),D.push(''+P+" "),s=null,k===this.o.weekEnd&&D.push("