11 lines
No EOL
280 KiB
JavaScript
11 lines
No EOL
280 KiB
JavaScript
/*
|
|
* # Fomantic UI - 2.9.0
|
|
* https://github.com/fomantic/Fomantic-UI
|
|
* http://fomantic-ui.com/
|
|
*
|
|
* Copyright 2022 Contributors
|
|
* Released under the MIT license
|
|
* http://opensource.org/licenses/MIT
|
|
*
|
|
*/
|
|
!function(M,F,O,P){"use strict";M.isWindow=M.isWindow||function(e){return null!=e&&e===e.window},F=void 0!==F&&F.Math==Math?F:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.api=M.fn.api=function(w){var C,e=M.isFunction(this)?M(F):M(this),k=e.selector||"",T=(new Date).getTime(),D=[],S=w,A="string"==typeof S,E=[].slice.call(arguments,1);return e.each(function(){var o,i,n,e,r,a,f=M.isPlainObject(w)?M.extend(!0,{},M.fn.api.settings,w):M.extend({},M.fn.api.settings),t=f.namespace,s=f.metadata,l=f.selector,c=f.error,u=f.className,d="."+t,m="module-"+t,p=M(this),g=p.closest(l.form),h=f.stateContext?[F,O].indexOf(f.stateContext)<0?M(O).find(f.stateContext):M(f.stateContext):p,v=this,b=h[0],y=p.data(m),x={initialize:function(){A||(a=f.data,x.bind.events()),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),y=x,p.data(m,y)},destroy:function(){x.verbose("Destroying previous module for",v),p.removeData(m).off(d)},bind:{events:function(){var e=x.get.event();e?(x.verbose("Attaching API events to element",e),p.on(e+d,x.event.trigger)):"now"==f.on&&(x.debug("Querying API endpoint immediately"),x.query())}},decode:{json:function(e){if(e!==P&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(F.Storage!==P)return t=sessionStorage.getItem(e+x.get.normalizedData()),x.debug("Using cached response",e,f.data,t),x.decode.json(t);x.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?x.debug("Response empty, not caching",t):F.Storage===P?x.error(c.noStorage):(M.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+x.get.normalizedData(),t),x.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(x.is.disabled())x.debug("Element is disabled API request aborted");else{if(x.is.loading()){if(!f.interruptRequests)return void x.debug("Cancelling request, previous request is still pending");x.debug("Interrupting previous request"),x.abort()}f.defaultData&&M.extend(!0,f.urlData,x.get.defaultData()),f.serializeForm&&(f.data=x.add.formData(a||f.data)),!1===(i=x.get.settings())?(x.cancelled=!0,x.error(c.beforeSend)):(x.cancelled=!1,(n=x.get.templatedURL())||x.is.mocked()?((n=x.add.urlData(n))||x.is.mocked())&&(i.url=f.base+n,o=M.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+n,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),x.debug("Querying URL",o.url),x.verbose("Using AJAX settings",o),"local"===f.cache&&x.read.cachedResponse(n)?(x.debug("Response returned from local cache"),x.request=x.create.request(),x.request.resolveWith(b,[x.read.cachedResponse(n)])):f.throttle?f.throttleFirstRequest||x.timer?(x.debug("Throttling request",f.throttle),clearTimeout(x.timer),x.timer=setTimeout(function(){x.timer&&delete x.timer,x.debug("Sending throttled request",e,o.method),x.send.request()},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request(),x.timer=setTimeout(function(){},f.throttle)):(x.debug("Sending request",e,o.method),x.send.request())):x.error(c.missingURL))}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!x.is.form()}},is:{disabled:function(){return 0<p.filter(l.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return p.is("form")||h.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return p.is("input")},loading:function(){return!!x.request&&"pending"==x.request.state()},abortedRequest:function(e){return e&&e.readyState!==P&&0===e.readyState?(x.verbose("XHR request determined to be aborted"),!0):(x.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return x.is.expectingJSON()&&M.isFunction(f.successTest)?(x.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(x.debug("Response passed success test",e),!0):(x.debug("Response failed success test",e),!1)):(x.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return x.cancelled||!1},successful:function(){return x.request&&"resolved"==x.request.state()},failure:function(){return x.request&&"rejected"==x.request.state()},complete:function(){return x.request&&("resolved"==x.request.state()||"rejected"==x.request.state())}},add:{urlData:function(a,o){var e,t;return a&&(e=a.match(f.regExp.required),t=a.match(f.regExp.optional),o=o||f.urlData,e&&(x.debug("Looking for required URL variables",e),M.each(e,function(e,t){var n=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),i=M.isPlainObject(o)&&o[n]!==P?o[n]:p.data(n)!==P?p.data(n):h.data(n)!==P?h.data(n):o[n];if(i===P)return x.error(c.requiredParameter,n,a),a=!1;x.verbose("Found required variable",n,i),i=f.encodeParameters?x.get.urlEncodedValue(i):i,a=a.replace(t,i)})),t)&&(x.debug("Looking for optional URL variables",e),M.each(t,function(e,t){var n=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),i=M.isPlainObject(o)&&o[n]!==P?o[n]:p.data(n)!==P?p.data(n):h.data(n)!==P?h.data(n):o[n];a=i!==P?(x.verbose("Optional variable Found",n,i),a.replace(t,i)):(x.verbose("Optional variable not found",n),-1!==a.indexOf("/"+t)?a.replace("/"+t,""):a.replace(t,""))})),a},formData:function(n){var e,i,l,c,u,d={},t="formdata"===f.serializeForm;return n=n||a||f.data,e=M.isPlainObject(n),t?(d=new FormData(g[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(i=g.serializeArray(),l={},c={},u=function(e,t,n){return e[t]=n,e},M.each(M('input[type="file"]',g),function(e,n){M.each(M(n)[0].files,function(e,t){i.push({name:n.name,value:t})})}),M.each(i,function(e,t){if(f.regExp.validate.test(t.name)){var n,i="checkbox"===M('[name="'+t.name+'"]',g).attr("type"),a=parseFloat(t.value),o=i&&"on"===t.value||"true"===t.value||(String(a)===t.value?a:"false"!==t.value&&t.value),r=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[\]$/,"");s in l?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(l[s]=0,c[s]=o),o=c[s];for(;(n=r.pop())!==P;)""!=n||Array.isArray(o)?f.regExp.fixed.test(n)?o=u([],n,o):f.regExp.named.test(n)&&(o=u({},n,o)):o=u([],l[s]++,o);d=M.extend(!0,d,o)}})),n=e?(x.debug("Extending existing data with form data",n,d),t?(M.each(Object.keys(n),function(e,t){d.append(t,n[t])}),d):M.extend(!0,{},n,d)):(x.debug("Adding form data",d),d)}},send:{request:function(){x.set.loading(),x.request=x.create.request(),x.is.mocked()?x.mockedXHR=x.create.mockedXHR():x.xhr=x.create.xhr(),f.onRequest.call(b,x.request,x.xhr)}},event:{trigger:function(e){x.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var i=this,a=(new Date).getTime()-r,a=f.loadingDuration-a,o=!!M.isFunction(f.onResponse)&&(x.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(i,M.extend(!0,{},e)):f.onResponse.call(i,e)),a=0<a?a:0;o&&(x.debug("Modified API response in onResponse callback",f.onResponse,o,e),e=o),0<a&&x.debug("Response completed early delaying state change by",a),setTimeout(function(){x.is.validResponse(e)?x.request.resolveWith(i,[e,n]):x.request.rejectWith(i,[n,"invalid"])},a)},fail:function(e,t,n){var i=this,a=(new Date).getTime()-r,a=f.loadingDuration-a;0<(a=0<a?a:0)&&x.debug("Response completed early delaying state change by",a),setTimeout(function(){x.is.abortedRequest(e)?x.request.rejectWith(i,[e,"aborted",n]):x.request.rejectWith(i,[e,"error",t,n])},a)}},request:{done:function(e,t){x.debug("Successful API Response",e),"local"===f.cache&&n&&(x.write.cachedResponse(n,e),x.debug("Saving server response locally",x.cache)),f.onSuccess.call(b,e,p,t)},complete:function(e,t){var n,i;x.was.successful()?(i=e,n=t):i=x.get.responseFromXHR(n=e),x.remove.loading(),f.onComplete.call(b,i,p,n)},fail:function(e,t,n){var i=x.get.responseFromXHR(e),a=x.get.errorFromRequest(i,t,n);if("aborted"==t)return x.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,n),f.onAbort.call(b,t,p,e),!0;"invalid"==t?x.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&e!==P&&(x.debug("XHR produced a server error",t,n),(e.status<200||300<=e.status)&&n!==P&&""!==n&&x.error(c.statusMessage+n,o.url),f.onError.call(b,a,p,e)),f.errorDuration&&"aborted"!==t&&(x.debug("Adding error state"),x.set.error(),x.should.removeError())&&setTimeout(x.remove.error,f.errorDuration),x.debug("API Request failed",a,e),f.onFailure.call(b,i,p,e)}}},create:{request:function(){return M.Deferred().always(x.event.request.complete).done(x.event.request.done).fail(x.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,n=M.Deferred().always(x.event.xhr.complete).done(x.event.xhr.done).fail(x.event.xhr.fail);return e?(e=M.isFunction(e)?(x.debug("Using specified synchronous callback",e),e.call(b,i)):(x.debug("Using settings specified response",e),e),n.resolveWith(b,[e,!1,{responseText:e}])):M.isFunction(t)&&(e=function(e){x.debug("Async callback returned response",e),e?n.resolveWith(b,[e,!1,{responseText:e}]):n.rejectWith(b,[{responseText:e},!1,!1])},x.debug("Using specified async response callback",t),t.call(b,i,e)),n},xhr:function(){var e=M.ajax(o).always(x.event.xhr.always).done(x.event.xhr.done).fail(x.event.xhr.fail);return x.verbose("Created server request",e,o),e}},set:{error:function(){x.verbose("Adding error state to element",h),h.addClass(u.error)},loading:function(){x.verbose("Adding loading state to element",h),h.addClass(u.loading),r=(new Date).getTime()}},remove:{error:function(){x.verbose("Removing error state from element",h),h.removeClass(u.error)},loading:function(){x.verbose("Removing loading state from element",h),h.removeClass(u.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!M.isPlainObject(e)&&(x.is.expectingJSON()?x.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return M.isPlainObject(e)&&e.error!==P?e.error:f.error[t]!==P?f.error[t]:n},request:function(){return x.request||!1},xhr:function(){return x.xhr||!1},settings:function(){var e=f.beforeSend.call(p,f);return e&&(e.success!==P&&(x.debug("Legacy success callback detected",e),x.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==P&&(x.debug("Legacy failure callback detected",e),x.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==P)&&(x.debug("Legacy complete callback detected",e),x.error(c.legacyParameters,e.complete),e.onComplete=e.complete),e===P&&x.error(c.noReturnedValue),!1===e?e:e!==P?M.extend(!0,{},e):M.extend(!0,{},f)},urlEncodedValue:function(e){var t=F.decodeURIComponent(e),n=F.encodeURIComponent(e);return t!==e?(x.debug("URL value is already encoded, avoiding double encoding",e),e):(x.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return M.isWindow(v)||(x.is.input()?e.value=p.val():x.is.form()||(e.text=p.text())),e},event:function(){return M.isWindow(v)||"now"==f.on?(x.debug("API called without element, no events attached"),!1):"auto"==f.on?p.is("input")?v.oninput!==P?"input":v.onpropertychange!==P?"propertychange":"keyup":p.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||p.data(s.action)||f.action||!1,n=p.data(s.url)||f.url||!1)x.debug("Using specified url",n);else if(e){if(x.debug("Looking up url for action",e,f.api),f.api[e]===P&&!x.is.mocked())return void x.error(c.missingAction,f.action,f.api);n=f.api[e]}else x.is.form()&&(n=p.attr("action")||h.attr("action")||!1,x.debug("No url or action specified, defaulting to form action",n));return n}},abort:function(){var e=x.get.xhr();e&&"resolved"!==e.state()&&(x.debug("Cancelling API request"),e.abort())},reset:function(){x.remove.error(),x.remove.loading()},setting:function(e,t){if(x.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,f,e);else{if(t===P)return f[e];M.isPlainObject(f[e])?M.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,x,e);else{if(t===P)return x[e];x[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,f.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),x.verbose.apply(console,arguments)))},error:function(){f.silent||(x.error=Function.prototype.bind.call(console.error,console,f.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(T||t),T=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){var e=f.name+":",n=0;T=!1,clearTimeout(x.performance.timer),M.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",k&&(e+=" '"+k+"'"),(console.group!==P||console.table!==P)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):M.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var a,o,n,r=y;return e=e||E,t=t||v,"string"==typeof i&&r!==P&&(i=i.split(/[\. ]/),a=i.length-1,M.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(M.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==P)return o=r[n],!1;{if(!M.isPlainObject(r[t])||e==a)return r[t]!==P?o=r[t]:x.error(c.method,i),!1;r=r[t]}}})),M.isFunction(o)?n=o.apply(t,e):o!==P&&(n=o),Array.isArray(C)?C.push(n):C!==P?C=[C,n]:n!==P&&(C=n),o}};A?(y===P&&x.initialize(),x.invoke(S)):(y!==P&&y.invoke("destroy"),x.initialize())}),C!==P?C:this},M.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[a-z0-9]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document),function(ae,D,S,oe){"use strict";ae.isFunction=ae.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},D=void 0!==D&&D.Math==Math?D:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ae.fn.calendar=function(h){var v,e=ae(this),b=e.selector||"",y=(new Date).getTime(),x=[],w=h,C="string"==typeof w,k=[].slice.call(arguments,1),T={5:{row:4,column:3},10:{row:3,column:2},15:{row:2,column:2},20:{row:3,column:1},30:{row:2,column:1}},ie=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var d,e,X=ae.isPlainObject(h)?ae.extend(!0,{},ae.fn.calendar.settings,h):ae.extend({},ae.fn.calendar.settings),G=X.className,t=X.namespace,n=X.selector,J=X.formatter,i=X.parser,_=X.metadata,Z=T[X.minTimeGap],s=X.error,a="."+t,o="module-"+t,r=ae(this),l=r.find(n.input),ee=r.find(n.popup),c=r.find(n.activator),u=this,f=r.data(o),m=!1,te=r.hasClass(G.inverted),p=!1,g=!1,ne={initialize:function(){ne.debug("Initializing calendar for",u,r),d=ne.get.isTouch(),ne.setup.config(),ne.setup.popup(),ne.setup.inline(),ne.setup.input(),ne.setup.date(),ne.create.calendar(),ne.bind.events(),ne.observeChanges(),ne.instantiate()},instantiate:function(){ne.verbose("Storing instance of calendar"),f=ne,r.data(o,f)},destroy:function(){ne.verbose("Destroying previous calendar for",u),r.removeData(o),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(r.data(_.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(r.data(_.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",X.on||"click")},popup:function(){var e,t;X.inline||(c.length||(c=r.children().first()).length)&&(ae.fn.popup===oe?ne.error(s.popup):(ee.length||(e=0!==(t=c.parent()).closest(n.append).length?"appendTo":"prependTo",ee=ae("<div/>").addClass(G.popup)[e](t)),ee.addClass(G.calendar),te&&ee.addClass(G.inverted),e=function(){return ne.refreshTooltips(),X.onVisible.apply(ee,arguments)},l.length||(ee.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),X.onVisible.apply(ee,arguments)}),t=ne.setting("on"),t=ae.extend({},X.popupOptions,{popup:ee,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(X.startMode)),X.onShow.apply(ee,arguments)},onVisible:e,onHide:X.onHide,onHidden:function(){return ne.blur(),X.onHidden.apply(ee,arguments)}}),ne.popup(t)))},inline:function(){c.length&&!X.inline||(X.inline=!0,ee=ae("<div/>").addClass(G.calendar).appendTo(r),l.length)||ee.attr("tabindex","0")},input:function(){X.touchReadonly&&l.length&&d&&l.prop("readonly",!0),ne.check.disabled()},date:function(){var e;X.initialDate?e=i.date(X.initialDate,X):r.data(_.date)!==oe?e=i.date(r.data(_.date),X):l.length&&(e=i.date(l.val(),X)),ne.set.date(e,X.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=l[0];t&&(e=S.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,V,n=ne.get.mode(),i=new Date,q=ne.get.date(),a=ne.get.focusDate(),o=ne.helper.dateInRange(a||q||X.initialDate||i),r=(a||ne.set.focusDate(a=o,!1,!1),"year"===n),s="month"===n,l="day"===n,c="hour"===n,u="minute"===n,j="time"===X.type,N=Math.max(X.multiMonth,1),H=l?ne.get.monthOffset():0,d=o.getMinutes(),f=o.getHours(),m=o.getDate(),z=o.getMonth()+H,p=o.getFullYear(),g=l?X.showWeekNumbers?8:7:c?4:Z.column,U=l||c?6:Z.row,h=l?N:1,v=(b=ee).hasClass("left")?"right center":"left center";for(b.empty(),1<h&&(V=ae("<div/>").addClass(G.grid).appendTo(b)),t=0;t<h;t++){1<h&&(b=ae("<div/>").addClass(G.column).appendTo(V));var b,y=z+t,Y=(new Date(p,y,1).getDay()-X.firstDayOfWeek%7+7)%7,x=(!X.constantHeight&&l&&(x=new Date(p,y+1,0).getDate()+Y,U=Math.ceil(x/7)),r?10:s?1:0),w=l?1:0,C=c||u?1:0,k=c||u?m:1,T=new Date(p-x,y-w,k-C,f),w=new Date(p+x,y+w,k+C,f),k=r?new Date(10*Math.ceil(p/10)-9,0,0):s?new Date(p,0,0):l?new Date(p,y,0):new Date(p,y,m,-1),C=r?new Date(10*Math.ceil(p/10)+1,0,1):s?new Date(p+1,0,1):l?new Date(p,y+1,1):new Date(p,y,m+1),D=n,D=(l&&X.showWeekNumbers&&(D+=" andweek"),ae("<table/>").addClass(G.table).addClass(D).addClass(ie[g]+" column").appendTo(b)),W=(te&&D.addClass(G.inverted),g);if(!j){var B=ae("<thead/>").appendTo(D),S=ae("<tr/>").appendTo(B),A=ae("<th/>").attr("colspan",""+g).appendTo(S),E=r||s?new Date(p,0,1):l?new Date(p,y,1):new Date(p,y,m,f,d),M=ae("<span/>").addClass(G.link).appendTo(A),E=(M.text(ne.helper.dateFormat(J[n+"Header"],E)),s?X.disableYear?"day":"year":l?X.disableMonth?"year":"month":"day");if(M.data(_.mode,E),0===t&&((M=ae("<span/>").addClass(G.prev).appendTo(A)).data(_.focusDate,T),M.toggleClass(G.disabledCell,!ne.helper.isDateInRange(k,n)),ae("<i/>").addClass(G.prevIcon).appendTo(M)),t===h-1&&((E=ae("<span/>").addClass(G.next).appendTo(A)).data(_.focusDate,w),E.toggleClass(G.disabledCell,!ne.helper.isDateInRange(C,n)),ae("<i/>").addClass(G.nextIcon).appendTo(E)),l)for(S=ae("<tr/>").appendTo(B),X.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(X.text.weekNo),A.addClass(G.weekCell),W--),F=0;F<W;F++)(A=ae("<th/>").appendTo(S)).text(J.dayColumnHeader((F+X.firstDayOfWeek)%7,X))}for(var $=ae("<tbody/>").appendTo(D),F=r?10*Math.ceil(p/10)-9:l?1-Y:0,K=0;K<U;K++)for(S=ae("<tr/>").appendTo($),l&&X.showWeekNumbers&&((A=ae("<th/>").appendTo(S)).text(ne.get.weekOfYear(p,y,F+1-X.firstDayOfWeek)),A.addClass(G.weekCell)),e=0;e<W;e++,F++){var O,P=r?new Date(F,y,1,f,d):s?new Date(p,F,1,f,d):l?new Date(p,y,F,f,d):c?new Date(p,y,m,F):new Date(p,y,m,f,F*X.minTimeGap),I=r?F:s?X.text.monthsShort[F]:l?P.getDate():ne.helper.dateFormat(J.cellTime,P),I=((A=ae("<td/>").addClass(G.cell).appendTo(S)).text(I),A.data(_.date,P),l&&P.getMonth()!==(y+12)%12),R=!X.selectAdjacentDays&&I||!ne.helper.isDateInRange(P,n)||X.isDisabled(P,n)||ne.helper.isDisabled(P,n)||!ne.helper.isEnabled(P,n),L=(R?(null!==(L=ne.helper.findDayAsObject(P,n,X.disabledDates))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation])&&A.attr("data-variation",L[_.variation]),"hour"===n&&null!==(L=ne.helper.findHourAsObject(P,n,X.disabledHours))&&L[_.message]&&(A.attr("data-tooltip",L[_.message]),A.attr("data-position",L[_.position]||v),(L[_.inverted]||te&&L[_.inverted]===oe)&&A.attr("data-inverted",""),L[_.variation])&&A.attr("data-variation",L[_.variation])):null!==(O=ne.helper.findDayAsObject(P,n,X.eventDates))&&(A.addClass(O[_.class]||X.eventClass),O[_.message])&&(A.attr("data-tooltip",O[_.message]),A.attr("data-position",O[_.position]||v),(O[_.inverted]||te&&O[_.inverted]===oe)&&A.attr("data-inverted",""),O[_.variation])&&A.attr("data-variation",O[_.variation]),ne.helper.dateEqual(P,q,n)),Q=ne.helper.dateEqual(P,i,n),I=(A.toggleClass(G.adjacentCell,I&&!O),A.toggleClass(G.disabledCell,R),A.toggleClass(G.activeCell,L&&!(I&&R)),c||u||A.toggleClass(G.todayCell,!I&&Q),{mode:n,adjacent:I,disabled:R,active:L,today:Q});J.cell(A,P,I),ne.helper.dateEqual(P,a,n)&&ne.set.focusDate(P,!1,!1)}X.today&&(T=ae("<tr/>").appendTo($),(k=ae("<td/>").attr("colspan",""+g).addClass(G.today).appendTo(T)).text(J.today(X)),k.data(_.date,i)),ne.update.focus(!1,D),X.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||ee;var r=ne.get.mode(),n=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),c=ne.get.endDate(),u=(e?s:null)||n||(d?null:s);t.find("td").each(function(){var e,t,n,i,a=ae(this),o=a.data(_.date);o&&(e=a.hasClass(G.disabledCell),t=a.hasClass(G.activeCell),n=a.hasClass(G.adjacentCell),i=ne.helper.dateEqual(o,s,r),o=!!u&&(!!l&&ne.helper.isDateInRange(o,r,l,u)||!!c&&ne.helper.isDateInRange(o,r,u,c)),a.toggleClass(G.focusCell,i&&(!d||m)&&(!n||X.selectAdjacentDays&&n)&&!e),ne.helper.isTodayButton(a)||a.toggleClass(G.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var i=ae(D).width();ee.find("td[data-position]").each(function(){var e=ae(this),t=D.getComputedStyle(e[0],"::after").width.replace(/[^0-9\.]/g,""),n=e.attr("data-position"),t=i-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===n.indexOf(t)&&e.attr("data-position",n.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),ee.on("mousedown"+a,ne.event.mousedown),ee.on("touchstart"+a,ne.event.mousedown),ee.on("mouseup"+a,ne.event.mouseup),ee.on("touchend"+a,ne.event.mouseup),ee.on("mouseover"+a,ne.event.mouseover),(l.length?(l.on("input"+a,ne.event.inputChange),l.on("focus"+a,ne.event.inputFocus),l.on("blur"+a,ne.event.inputBlur),l):ee).on("keydown"+a,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),ee.off(a),l.length&&l.off(a)}},event:{mouseover:function(e){var t=ae(e.target).data(_.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){l.length&&e.preventDefault(),m=0<=e.type.indexOf("touch");e=ae(e.target).data(_.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),m=!1;var t,n,i,e=ae(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(_.date)||t.data(_.focusDate)||t.data(_.mode)?t:e).data(_.date),n=e.data(_.focusDate),i=e.data(_.mode),t&&!1!==X.onSelect.call(u,t,ne.get.mode())?(e=e.hasClass(G.today),ne.selectDate(t,e)):n?ne.set.focusDate(n):i&&ne.set.mode(i))},keydown:function(e){var t,n,i,a,o,r,s,l=e.which;9===l&&ne.popup("hide"),ne.popup("is visible")&&(t=ne.get.mode(),37===l||38===l||39===l||40===l?(o="day"===t?7:"hour"===t?4:"minute"===t?Z.column:3,o=37===l?-1:38===l?-o:39==l?1:o,o*="minute"===t?X.minTimeGap:1,r=(n=ne.get.focusDate()||ne.get.date()||new Date).getFullYear()+("year"===t?o:0),s=n.getMonth()+("month"===t?o:0),i=n.getDate()+("day"===t?o:0),a=n.getHours()+("hour"===t?o:0),o=n.getMinutes()+("minute"===t?o:0),r=new Date(r,s,i,a,o),"time"===X.type&&(r=ne.helper.mergeDateTime(n,r)),ne.helper.isDateInRange(r,t)&&ne.set.focusDate(r)):13===l?((s=ne.get.focusDate())&&!X.isDisabled(s,t)&&!ne.helper.isDisabled(s,t)&&ne.helper.isEnabled(s,t)&&!1!==X.onSelect.call(u,s,ne.get.mode())&&ne.selectDate(s),e.preventDefault(),e.stopPropagation()):27===l&&(ne.popup("hide"),e.stopPropagation())),38!==l&&40!==l||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=l.val(),e=i.date(e,X);ne.set.date(e,!1)},inputFocus:function(){ee.addClass(G.active)},inputBlur:function(){var e;ee.removeClass(G.active),X.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(J[X.type],e),l.val(e)),g&&(ne.trigger.change(),g=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in D&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){l.length&&e&&e.disconnect()}},observe:{class:function(){l.length&&e&&e.observe(r[0],{attributes:!0})}},is:{disabled:function(){return r.hasClass(G.disabled)}},check:{disabled:function(){l.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,n){return e=Date.UTC(e,t,n+3)/864e5,e=Math.floor(e/7),t=new Date(6048e5*e).getUTCFullYear(),e-Math.floor(Date.UTC(t,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||J[X.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(r.data(_.date))||null},inputDate:function(){return l.val()},focusDate:function(){return r.data(_.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(X.startCalendar);return(e?e.get.date():r.data(_.startDate))||null},endDate:function(){var e=ne.get.calendarModule(X.endCalendar);return(e?e.get.date():r.data(_.endDate))||null},minDate:function(){return r.data(_.minDate)||null},maxDate:function(){return r.data(_.maxDate)||null},monthOffset:function(){return r.data(_.monthOffset)||X.monthOffset||0},mode:function(){var e=r.data(_.mode)||X.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=ae.inArray(e,t)?e:"time"===X.type?"hour":"month"===X.type?"month":"year"===X.type?"year":"day"},type:function(){return r.data(_.type)||X.type},validModes:function(){var e=[];return"time"!==X.type&&(X.disableYear&&"year"!==X.type||e.push("year"),(X.disableMonth||"year"===X.type)&&"month"!==X.type||e.push("month"),0<=X.type.indexOf("date"))&&e.push("day"),0<=X.type.indexOf("time")&&(e.push("hour"),X.disableMinute||e.push("minute")),e},isTouch:function(){try{return S.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof ae?e:ae(S).find(e).first()).data(o):null}},set:{date:function(e,t,n){t=!1!==t,n=!1!==n,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var i,a=ne.get.mode(),o=ne.helper.dateFormat(J[X.type],e);return!(n&&!1===X.onBeforeChange.call(u,e,o,a)||(ne.set.focusDate(e),X.isDisabled(e,a)))&&((i=ne.get.endDate())&&e&&i<e&&ne.set.endDate(oe),ne.set.dataKeyValue(_.date,e),t&&l.length&&l.val(o),void(n&&X.onChange.call(u,e,o,a)))},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(X.startCalendar);n&&n.set.date(e),ne.set.dataKeyValue(_.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var n=ne.get.calendarModule(X.endCalendar);n&&n.set.date(e),ne.set.dataKeyValue(_.endDate,e,t)},focusDate:function(e,t,n,i){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var a="day"===ne.get.mode(),o=ne.get.focusDate(),a=(a&&e&&o&&(a=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-a,ne.set.monthOffset(o,!1)),ne.set.dataKeyValue(_.focusDate,e,!!e&&t));n=!1!==n&&a&&!1===t||p!=i,p=i,n&&ne.update.focus(i)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==X.maxDate&&X.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,X.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(_.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==X.minDate&&X.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,X.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(_.maxDate,e))},monthOffset:function(e,t){var n=Math.max(X.multiMonth,1);e=Math.max(1-n,Math.min(0,e)),ne.set.dataKeyValue(_.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(_.mode,e,t)},dataKeyValue:function(e,t,n){var i=r.data(e),i=i===t||i<=t&&t<=i;return t?r.data(e,t):r.removeData(e),(n=!1!==n&&!i)&&ne.refresh(),!i}},selectDate:function(e,t){ne.verbose("New date selection",e);var n=ne.get.mode();t||"minute"===n||X.disableMinute&&"hour"===n||"date"===X.type&&"day"===n||"month"===X.type&&"month"===n||"year"===X.type&&"year"===n?!1!==ne.set.date(e)&&(g=!0,X.closable)&&(ne.popup("hide"),t=ne.get.calendarModule(X.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()):(t="year"===n?X.disableMonth?"day":"month":"month"===n?"day":"day"===n?"hour":"minute",ne.set.mode(t),"hour"===n||"day"===n&&ne.get.date()?ne.set.date(e,!0,!1):ne.set.focusDate(e))},changeDate:function(e){ne.set.date(e)},clear:function(){ne.set.date(oe)},popup:function(){return c.popup.apply(c,arguments)},focus:function(){(l.length?l:ee).focus()},blur:function(){(l.length?l:ee).blur()},helper:{dateFormat:function(e,t){var n,i,a,o,r,s,l,c,u,d;return t instanceof Date?"function"==typeof e?e.call(ne,t,X):(n=t.getDate(),i=t.getMonth(),a=t.getFullYear(),o=t.getDay(),r=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(a,i,n+1-X.firstDayOfWeek),c=r%12||12,u=(r<12?X.text.am:X.text.pm).toLowerCase(),d={D:n,DD:("0"+n).slice(-2),M:i+1,MM:("0"+(i+1)).slice(-2),MMM:X.text.monthsShort[i],MMMM:X.text.months[i],Y:a,YY:String(a).slice(2),YYYY:a,d:o,dd:X.text.dayNamesShort[o].slice(0,2),ddd:X.text.dayNamesShort[o],dddd:X.text.dayNames[o],h:c,hh:("0"+c).slice(-2),H:r,HH:("0"+r).slice(-2),m:s,mm:("0"+s).slice(-2),s:t,ss:("0"+t).slice(-2),a:u,A:u.toUpperCase(),S:["th","st","nd","rd"][3<n%10?0:(n%100-n%10!=10)*n%10],w:l,ww:("0"+l).slice(-2)},e.replace(X.regExp.token,function(e){return e in d?d[e]:e.slice(1,e.length-1)})):""},isDisabled:function(n,i){return("day"===i||"month"===i||"year"===i||"hour"===i)&&("day"===i&&-1!==X.disabledDaysOfWeek.indexOf(n.getDay())||X.disabledDates.some(function(e){var t;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(n,e,i):null!==e&&"object"==typeof e?e[_.year]?"number"==typeof e[_.year]?n.getFullYear()==e[_.year]:Array.isArray(e[_.year])?-1<e[_.year].indexOf(n.getFullYear()):void 0:e[_.month]?"number"==typeof e[_.month]?n.getMonth()==e[_.month]:Array.isArray(e[_.month])?-1<e[_.month].indexOf(n.getMonth()):e[_.month]instanceof Date?(t=ne.helper.sanitiseDate(e[_.month]),n.getMonth()==t.getMonth()&&n.getFullYear()==t.getFullYear()):void 0:e[_.date]&&"day"===i?e[_.date]instanceof Date?ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[_.date]),i):Array.isArray(e[_.date])?e[_.date].some(function(e){return ne.helper.dateEqual(n,e,i)}):void 0:void 0:void 0})||"hour"===i&&X.disabledHours.some(function(e){if((e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date)return ne.helper.dateEqual(n,e,i);if("number"==typeof e)return n.getHours()===e;if(null!==e&&"object"==typeof e){var t=!0;if(e[_.date])if(e[_.date]instanceof Date)t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[_.date]));else if(Array.isArray(e[_.date]))return e[_.date].some(function(e){t=ne.helper.dateEqual(n,e,i)});if(e[_.days]&&("number"==typeof e[_.days]?t=n.getDay()==e[_.days]:Array.isArray(e[_.days])&&(t=-1<e[_.days].indexOf(n.getDay()))),e[_.hours])return"number"==typeof e[_.hours]?t&&n.getHours()==e[_.hours]:Array.isArray(e[_.hours])?t&&-1<e[_.hours].indexOf(n.getHours()):void 0}}))},isEnabled:function(t,n){return"day"!==n||0===X.enabledDates.length||X.enabledDates.some(function(e){return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?ne.helper.dateEqual(t,e,n):null!==e&&"object"==typeof e&&e[_.date]?ne.helper.dateEqual(t,ne.helper.sanitiseDate(e[_.date]),n):void 0})},findDayAsObject:function(t,n,e){if("day"===n||"month"===n||"year"===n)for(var i,a=0;a<e.length;a++){if((i="string"==typeof(i=e[a])?ne.helper.sanitiseDate(i):i)instanceof Date&&ne.helper.dateEqual(t,i,n))return(o={})[_.date]=i,o;if(null!==i&&"object"==typeof i)if(i[_.year]){if("number"==typeof i[_.year]&&t.getFullYear()==i[_.year])return i;if(Array.isArray(i[_.year])&&-1<i[_.year].indexOf(t.getFullYear()))return i}else if(i[_.month]){if("number"==typeof i[_.month]&&t.getMonth()==i[_.month])return i;if(Array.isArray(i[_.month])){if(-1<i[_.month].indexOf(t.getMonth()))return i}else if(i[_.month]instanceof Date){var o=ne.helper.sanitiseDate(i[_.month]);if(t.getMonth()==o.getMonth()&&t.getFullYear()==o.getFullYear())return i}}else if(i[_.date]&&"day"===n){if(i[_.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[_.date]),n))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}}return null},findHourAsObject:function(t,n,e){if("hour"===n)for(var i,a=function(e,t){return t[_.hours]&&("number"==typeof t[_.hours]&&e.getHours()==t[_.hours]||Array.isArray(t[_.hours])&&-1<t[_.hours].indexOf(e.getHours()))?t:void 0},o=0;o<e.length;o++){if("number"==typeof(i=e[o])&&t.getHours()==i)return null;if(null!==i&&"object"==typeof i)if(i[_.days]&&a(t,i)){if("number"==typeof i[_.days]&&t.getDay()==i[_.days])return i;if(Array.isArray(i[_.days])&&-1<i[_.days].indexOf(t.getDay()))return i}else if(i[_.date]&&a(t,i)){if(i[_.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(i[_.date])))return i;if(Array.isArray(i[_.date])&&i[_.date].some(function(e){return ne.helper.dateEqual(t,e,n)}))return i}else if(a(t,i))return i}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:i.date(""+e,X))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,n){var i="time"===X.type,a="year"===(n=n||"day"),o=a||"month"===n,r="minute"===n,n=r||"hour"===n;return e=new Date(i?2e3:e.getFullYear(),i||a?0:e.getMonth(),i||o?1:e.getDate(),n?e.getHours():0,r?X.minTimeGap*Math.floor(e.getMinutes()/X.minTimeGap):0),(t=new Date(i?2e3:t.getFullYear(),i||a?0:t.getMonth(),i||o?1:t.getDate(),n?t.getHours():0,r?X.minTimeGap*Math.floor(t.getMinutes()/X.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,n){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,n)},isDateInRange:function(e,t,n,i){var a;return n||i||(n=(a=ne.get.startDate())&&X.minDate?new Date(Math.max(a,X.minDate)):a||X.minDate,i=X.maxDate),n=n&&new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),X.minTimeGap*Math.ceil(n.getMinutes()/X.minTimeGap)),!(!e||n&&0<ne.helper.dateDiff(e,n,t)||i&&0<ne.helper.dateDiff(i,e,t))},dateInRange:function(e,t,n){t||n||(t=(i=ne.get.startDate())&&X.minDate?new Date(Math.max(i,X.minDate)):i||X.minDate,n=X.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),X.minTimeGap*Math.ceil(t.getMinutes()/X.minTimeGap));var i="time"===X.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?i?ne.helper.mergeDateTime(e,t):t:n&&0<ne.helper.dateDiff(n,e,"minute")?i?ne.helper.mergeDateTime(e,n):n:e)},mergeDateTime:function(e,t){return e&&t?new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes()):t},isTodayButton:function(e){return e.text()===X.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),ae.isPlainObject(e))ae.extend(!0,X,e);else{if(t===oe)return X[e];ae.isPlainObject(X[e])?ae.extend(!0,X[e],t):X[e]=t}},internal:function(e,t){if(ae.isPlainObject(e))ae.extend(!0,ne,e);else{if(t===oe)return ne[e];ne[e]=t}},debug:function(){!X.silent&&X.debug&&(X.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,X.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!X.silent&&X.verbose&&X.debug&&(X.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,X.name+":"),ne.verbose.apply(console,arguments)))},error:function(){X.silent||(ne.error=Function.prototype.bind.call(console.error,console,X.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,n;X.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:u,"Execution Time":n})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=X.name+":",n=0;y=!1,clearTimeout(ne.performance.timer),ae.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==oe||console.table!==oe)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):ae.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var a,o,n,r=f;return e=e||k,t=t||u,"string"==typeof i&&r!==oe&&(i=i.split(/[\. ]/),a=i.length-1,ae.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(ae.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==oe)return o=r[n],!1;{if(!ae.isPlainObject(r[t])||e==a)return r[t]!==oe?o=r[t]:ne.error(s.method,i),!1;r=r[t]}}})),ae.isFunction(o)?n=o.apply(t,e):o!==oe&&(n=o),Array.isArray(v)?v.push(n):v!==oe?v=[v,n]:n!==oe&&(v=n),o}};C?(f===oe&&ne.initialize(),ne.invoke(w)):(f!==oe&&f.invoke("destroy"),ne.initialize())}),v!==oe?v:this},ae.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,type:"datetime",firstDayOfWeek:0,constantHeight:!0,today:!1,closable:!0,monthFirst:!0,touchReadonly:!0,inline:!1,on:null,initialDate:null,startMode:!1,minDate:null,maxDate:null,disableYear:!1,disableMonth:!1,disableMinute:!1,formatInput:!0,startCalendar:null,endCalendar:null,multiMonth:1,monthOffset:0,minTimeGap:5,showWeekNumbers:!1,disabledHours:[],disabledDates:[],disabledDaysOfWeek:[],enabledDates:[],eventDates:[],centuryBreak:60,currentCentury:2e3,selectAdjacentDays:!1,popupOptions:{position:"bottom left",lastResort:"bottom left",prefer:"opposite",observeChanges:!1,hideOnScroll:!1},text:{days:["S","M","T","W","T","F","S"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",now:"Now",am:"AM",pm:"PM",weekNo:"Week"},formatter:{yearHeader:function(e,t){e=10*Math.ceil(e.getFullYear()/10);return e-9+" - "+(2+e)},monthHeader:"YYYY",dayHeader:"MMMM YYYY",hourHeader:"MMMM D, YYYY",minuteHeader:"MMMM D, YYYY",dayColumnHeader:function(e,t){return t.text.days[e]},datetime:"MMMM D, YYYY h:mm A",date:"MMMM D, YYYY",time:"h:mm A",cellTime:"h:mm A",month:"MMMM YYYY",year:"YYYY",today:function(e){return"date"===e.type?e.text.today:e.text.now},cell:function(e,t,n){}},parser:{date:function(e,t){if(e instanceof Date)return e;if(!e)return null;if(0===(e=String(e).trim().replace(/([.:\/\-])\s+/g,"$1").replace(/\s+([.:\/-])/g,"$1").replace(/\s+/g," ")).length)return null;e.match(/^[0-9]{4}[\/\-\.][0-9]{1,2}[\/\-\.][0-9]{1,2}$/)&&(e=e.replace(/[\/\-\.]/g,"/")+" 00:00:00"),e=t.monthFirst||!e.match(/^[0-9]{1,2}[\/\-\.]/)?e:e.replace(/[\/\-\.]/g,"/").replace(/([0-9]+)\/([0-9]+)/,"$2/$1");var n,i,a,o=new Date(e);if(!(null!==e.match(/^[0-9]+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var r,s,l,c=-1,u=-1,d=-1,f=-1,m=-1,o=oe,p="time"===t.type,g=t.type.indexOf("time")<0,h=e.split(t.regExp.dateWords),v=e.split(t.regExp.dateNumbers);if(!g)for(o=0<=ae.inArray(t.text.am.toLowerCase(),h)||!(0<=ae.inArray(t.text.pm.toLowerCase(),h))&&oe,n=0;n<v.length;n++)if(0<=(s=v[n]).indexOf(":")){if(u<0||c<0)for(l=s.split(":"),a=0;a<Math.min(2,l.length);a++)i=parseInt(l[a]),isNaN(i)&&(i=0),0===a?u=i%24:c=i%60;v.splice(n,1)}if(!p){for(n=0;n<h.length;n++)if(!((r=h[n]).length<=0)){for(i=0;i<t.text.months.length;i++)if(t.text.months[i].substring(0,r.length).toLowerCase()===r){f=i+1;break}if(0<=f)break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&i>=t.centuryBreak&&n===v.length-1){i<=99&&(i+=t.currentCentury-100),m=i,v.splice(n,1);break}if(f<0)for(n=0;n<v.length;n++)if(a=1<n||t.monthFirst?n:1===n?0:1,i=parseInt(v[a]),!isNaN(i)&&1<=i&&i<=12){f=i,v.splice(a,1);break}for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&1<=i&&i<=31){d=i,v.splice(n,1);break}if(m<0)for(n=v.length-1;0<=n;n--)if(i=parseInt(v[n]),!isNaN(i)){i<=99&&(i+=t.currentCentury),m=i,v.splice(n,1);break}}if(!g){if(u<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=23){u=i,v.splice(n,1);break}if(c<0)for(n=0;n<v.length;n++)if(i=parseInt(v[n]),!isNaN(i)&&0<=i&&i<=59){c=i,v.splice(n,1);break}}if(c<0&&u<0&&d<0&&f<0&&m<0)return null;c<0&&(c=0),u<0&&(u=0),d<0&&(d=1),f<0&&(f=1),m<0&&(m=(new Date).getFullYear()),o!==oe&&(o?12===u&&(u=0):u<12&&(u+=12));e=new Date(m,f-1,d,u,c);return e.getMonth()===f-1&&e.getFullYear()===m||(e=new Date(m,f,0,u,c)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,n){return!0},onChange:function(e,t,n){},onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){},onSelect:function(e,t){},isDisabled:function(e,t){return!1},selector:{popup:".ui.popup",input:"input",activator:"input",append:".inline.field,.inline.fields"},regExp:{dateWords:/[^A-Za-z\u00C0-\u024F]+/g,dateNumbers:/[^\d:]+/g,token:/d{1,4}|D{1,2}|M{1,4}|YY(?:YY)?|([Hhmsw])\1?|[SAaY]|"[^"]*"|'[^']*'/g},error:{popup:"UI Popup, a required component is not included in this page",method:"The method you called is not defined."},className:{calendar:"calendar",active:"active",popup:"ui popup",grid:"ui equal width grid",column:"column",table:"ui celled center aligned unstackable table",inverted:"inverted",prev:"prev link",next:"next link",prevIcon:"chevron left icon",nextIcon:"chevron right icon",link:"link",cell:"link",disabledCell:"disabled",weekCell:"disabled",adjacentCell:"adjacent",activeCell:"active",rangeCell:"range",focusCell:"focus",todayCell:"today",today:"today link",disabled:"disabled"},metadata:{date:"date",focusDate:"focusDate",startDate:"startDate",endDate:"endDate",minDate:"minDate",maxDate:"maxDate",mode:"mode",type:"type",monthOffset:"monthOffset",message:"message",class:"class",inverted:"inverted",variation:"variation",position:"position",month:"month",year:"year",hours:"hours",days:"days"},eventClass:"blue"}}(jQuery,window,document),function(D,S,A,E){"use strict";D.isFunction=D.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},S=void 0!==S&&S.Math==Math?S:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),D.fn.checkbox=function(u){var d,e=D(this),f=e.selector||"",x=(new Date).getTime(),w=[],C=u,k="string"==typeof C,T=[].slice.call(arguments,1);return e.each(function(){var e,m=D.extend(!0,{},D.fn.checkbox.settings,u),t=m.className,n=m.namespace,p=m.selector,s=m.error,i="."+n,a="module-"+n,g=D(this),o=D(this).children(p.label),h=D(this).children(p.input),v=h[0],r=!1,b=!1,l=g.data(a),c=this,y={initialize:function(){y.verbose("Initializing checkbox",m),y.create.label(),y.bind.events(),y.set.tabbable(),y.hide.input(),y.observeChanges(),y.instantiate(),y.setup()},instantiate:function(){y.verbose("Storing instance of module",y),l=y,g.data(a,y)},destroy:function(){y.verbose("Destroying module"),y.unbind.events(),y.show.input(),g.removeData(a)},fix:{reference:function(){g.is(p.input)&&(y.debug("Behavior called on <input> adjusting invoked element"),g=g.closest(p.checkbox),y.refresh())}},setup:function(){y.set.initialLoad(),y.is.indeterminate()?(y.debug("Initial value is indeterminate"),y.indeterminate()):y.is.checked()?(y.debug("Initial value is checked"),y.check()):(y.debug("Initial value is unchecked"),y.uncheck()),y.remove.initialLoad()},refresh:function(){o=g.children(p.label),h=g.children(p.input),v=h[0]},hide:{input:function(){y.verbose("Modifying <input> z-index to be unselectable"),h.addClass(t.hidden)}},show:{input:function(){y.verbose("Modifying <input> z-index to be selectable"),h.removeClass(t.hidden)}},observeChanges:function(){"MutationObserver"in S&&((e=new MutationObserver(function(e){y.debug("DOM tree modified, updating selector cache"),y.refresh()})).observe(c,{childList:!0,subtree:!0}),y.debug("Setting up mutation observer",e))},attachEvents:function(e,t){var n=D(e);t=D.isFunction(y[t])?y[t]:y.toggle,0<n.length?(y.debug("Attaching checkbox events to element",e,t),n.on("click"+i,t)):y.error(s.notFound)},preventDefaultOnInputTarget:function(){"undefined"!=typeof event&&null!==event&&D(event.target).is(p.input)&&(y.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){y.should.ignoreCallbacks()||m.onChange.call(v)},click:function(e){var t=D(e.target);t.is(p.input)?y.verbose("Using default check action on initialized checkbox"):t.is(p.link)?y.debug("Clicking link inside checkbox, skipping toggle"):(y.toggle(),h.focus(),e.preventDefault())},keydown:function(e){var t=e.which,n=13,i=32,a=27,o=37,r=38,s=39,l=40,c=y.get.radios(),u=c.index(g),d=c.length,f=!1;if(t==o||t==r?f=(0===u?d:u)-1:t!=s&&t!=l||(f=u===d-1?0:u+1),!y.should.ignoreCallbacks()&&!1!==f){if(!1===m.beforeUnchecked.apply(v))return y.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===m.beforeChecked.apply(D(c[f]).children(p.input)[0]))return y.verbose("Next option should not allow check, cancelling key navigation"),!1}b=!1,t==a?(y.verbose("Escape key pressed blurring field"),h.blur(),b=!0,e.stopPropagation()):!e.ctrlKey&&y.can.change()&&(t==i||t==n&&m.enableEnterKey?(y.verbose("Enter/space key pressed, toggling checkbox"),y.toggle(),b=!0):g.is(".toggle, .slider")&&!y.is.radio()&&(t==o&&y.is.checked()?(y.uncheck(),b=!0):t==s&&y.is.unchecked()&&(y.check(),b=!0)))},keyup:function(e){b&&e.preventDefault()}},check:function(){y.should.allowCheck()&&(y.debug("Checking checkbox",h),y.set.checked(),y.should.ignoreCallbacks()||(m.onChecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},uncheck:function(){y.should.allowUncheck()&&(y.debug("Unchecking checkbox"),y.set.unchecked(),y.should.ignoreCallbacks()||(m.onUnchecked.call(v),y.trigger.change()),y.preventDefaultOnInputTarget())},indeterminate:function(){y.should.allowIndeterminate()?y.debug("Checkbox is already indeterminate"):(y.debug("Making checkbox indeterminate"),y.set.indeterminate(),y.should.ignoreCallbacks()||(m.onIndeterminate.call(v),y.trigger.change()))},determinate:function(){y.should.allowDeterminate()?y.debug("Checkbox is already determinate"):(y.debug("Making checkbox determinate"),y.set.determinate(),y.should.ignoreCallbacks()||(m.onDeterminate.call(v),y.trigger.change()))},enable:function(){y.is.enabled()?y.debug("Checkbox is already enabled"):(y.debug("Enabling checkbox"),y.set.enabled(),y.should.ignoreCallbacks()||(m.onEnable.call(v),m.onEnabled.call(v)))},disable:function(){y.is.disabled()?y.debug("Checkbox is already disabled"):(y.debug("Disabling checkbox"),y.set.disabled(),y.should.ignoreCallbacks()||(m.onDisable.call(v),m.onDisabled.call(v)))},get:{radios:function(){var e=y.get.name();return D('input[name="'+e+'"]').closest(p.checkbox)},otherRadios:function(){return y.get.radios().not(g)},name:function(){return h.attr("name")}},is:{initialLoad:function(){return r},radio:function(){return h.hasClass(t.radio)||"radio"==h.attr("type")},indeterminate:function(){return h.prop("indeterminate")!==E&&h.prop("indeterminate")},checked:function(){return h.prop("checked")!==E&&h.prop("checked")},disabled:function(){return h.prop("disabled")!==E&&h.prop("disabled")},enabled:function(){return!y.is.disabled()},determinate:function(){return!y.is.indeterminate()},unchecked:function(){return!y.is.checked()}},should:{allowCheck:function(){return y.is.determinate()&&y.is.checked()&&!y.is.initialLoad()?(y.debug("Should not allow check, checkbox is already checked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeChecked.apply(v)&&(y.debug("Should not allow check, beforeChecked cancelled"),1))},allowUncheck:function(){return y.is.determinate()&&y.is.unchecked()&&!y.is.initialLoad()?(y.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeUnchecked.apply(v)&&(y.debug("Should not allow uncheck, beforeUnchecked cancelled"),1))},allowIndeterminate:function(){return y.is.indeterminate()&&!y.is.initialLoad()?(y.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeIndeterminate.apply(v)&&(y.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),1))},allowDeterminate:function(){return y.is.determinate()&&!y.is.initialLoad()?(y.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!y.should.ignoreCallbacks()&&!1===m.beforeDeterminate.apply(v)&&(y.debug("Should not allow determinate, beforeDeterminate cancelled"),1))},ignoreCallbacks:function(){return r&&!m.fireOnInit}},can:{change:function(){return!(g.hasClass(t.disabled)||g.hasClass(t.readOnly)||h.prop("disabled")||h.prop("readonly"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!y.is.radio()}},set:{initialLoad:function(){r=!0},checked:function(){y.verbose("Setting class to checked"),g.removeClass(t.indeterminate).addClass(t.checked),y.is.radio()&&y.uncheckOthers(),!y.is.indeterminate()&&y.is.checked()?y.debug("Input is already checked, skipping input property change"):(y.verbose("Setting state to checked",v),h.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){y.verbose("Removing checked class"),g.removeClass(t.indeterminate).removeClass(t.checked),!y.is.indeterminate()&&y.is.unchecked()?y.debug("Input is already unchecked"):(y.debug("Setting state to unchecked"),h.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){y.verbose("Setting class to indeterminate"),g.addClass(t.indeterminate),y.is.indeterminate()?y.debug("Input is already indeterminate, skipping input property change"):(y.debug("Setting state to indeterminate"),h.prop("indeterminate",!0))},determinate:function(){y.verbose("Removing indeterminate class"),g.removeClass(t.indeterminate),y.is.determinate()?y.debug("Input is already determinate, skipping input property change"):(y.debug("Setting state to determinate"),h.prop("indeterminate",!1))},disabled:function(){y.verbose("Setting class to disabled"),g.addClass(t.disabled),y.is.disabled()?y.debug("Input is already disabled, skipping input property change"):(y.debug("Setting state to disabled"),h.prop("disabled","disabled"))},enabled:function(){y.verbose("Removing disabled class"),g.removeClass(t.disabled),y.is.enabled()?y.debug("Input is already enabled, skipping input property change"):(y.debug("Setting state to enabled"),h.prop("disabled",!1))},tabbable:function(){y.verbose("Adding tabindex to checkbox"),h.attr("tabindex")===E&&h.attr("tabindex",0)}},remove:{initialLoad:function(){r=!1}},trigger:{change:function(){var e,t=h[0];t&&(e=A.createEvent("HTMLEvents"),y.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<h.prevAll(p.label).length?(h.prev(p.label).detach().insertAfter(h),y.debug("Moving existing label",o)):y.has.label()||(o=D("<label>").insertAfter(h),y.debug("Creating label",o))}},has:{label:function(){return 0<o.length}},bind:{events:function(){y.verbose("Attaching checkbox events"),g.on("click"+i,y.event.click).on("change"+i,y.event.change).on("keydown"+i,p.input,y.event.keydown).on("keyup"+i,p.input,y.event.keyup)}},unbind:{events:function(){y.debug("Removing events"),g.off(i)}},uncheckOthers:function(){var e=y.get.otherRadios();y.debug("Unchecking other radios",e),e.removeClass(t.checked)},toggle:function(){y.can.change()?y.is.indeterminate()||y.is.unchecked()?(y.debug("Currently unchecked"),y.check()):y.is.checked()&&y.can.uncheck()&&(y.debug("Currently checked"),y.uncheck()):y.is.radio()||y.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(y.debug("Changing setting",e,t),D.isPlainObject(e))D.extend(!0,m,e);else{if(t===E)return m[e];D.isPlainObject(m[e])?D.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(D.isPlainObject(e))D.extend(!0,y,e);else{if(t===E)return y[e];y[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,m.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),y.verbose.apply(console,arguments)))},error:function(){m.silent||(y.error=Function.prototype.bind.call(console.error,console,m.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(x||t),x=t,w.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:c,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){var e=m.name+":",n=0;x=!1,clearTimeout(y.performance.timer),D.each(w,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",f&&(e+=" '"+f+"'"),(console.group!==E||console.table!==E)&&0<w.length&&(console.groupCollapsed(e),console.table?console.table(w):D.each(w,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),w=[]}},invoke:function(i,e,t){var a,o,n,r=l;return e=e||T,t=t||c,"string"==typeof i&&r!==E&&(i=i.split(/[\. ]/),a=i.length-1,D.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(D.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==E)return o=r[n],!1;{if(!D.isPlainObject(r[t])||e==a)return r[t]!==E?o=r[t]:y.error(s.method,i),!1;r=r[t]}}})),D.isFunction(o)?n=o.apply(t,e):o!==E&&(n=o),Array.isArray(d)?d.push(n):d!==E?d=[d,n]:n!==E&&(d=n),o}};k?(l===E&&y.initialize(),y.invoke(C)):(l!==E&&l.invoke("destroy"),y.initialize())}),d!==E?d:this},D.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!1,performance:!0,uncheckable:"auto",fireOnInit:!1,enableEnterKey:!0,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}}}(jQuery,window,document),function(k,e,T,D){"use strict";k.isFunction=k.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},void 0!==e&&e.Math==Math||"undefined"!=typeof self&&self.Math==Math||Function("return this")(),k.fn.dimmer=function(g){var h,v=k(this),b=(new Date).getTime(),y=[],x=g,w="string"==typeof x,C=[].slice.call(arguments,1);return v.each(function(){var a,t,o=k.isPlainObject(g)?k.extend(!0,{},k.fn.dimmer.settings,g):k.extend({},k.fn.dimmer.settings),n=o.selector,e=o.namespace,i=o.className,s=o.error,r="."+e,l="module-"+e,c=v.selector||"",u="ontouchstart"in T.documentElement?"touchstart":"click",d=k(this),f=this,m=d.data(l),p={preinitialize:function(){a=p.is.dimmer()?(t=d.parent(),d):(t=d,p.has.dimmer()?o.dimmerName?t.find(n.dimmer).filter("."+o.dimmerName):t.find(n.dimmer):p.create())},initialize:function(){p.debug("Initializing dimmer",o),p.bind.events(),p.set.dimmable(),p.instantiate()},instantiate:function(){p.verbose("Storing instance of module",p),m=p,d.data(l,m)},destroy:function(){p.verbose("Destroying previous module",a),p.unbind.events(),p.remove.variation(),t.off(r)},bind:{events:function(){"hover"==o.on?t.on("mouseenter"+r,p.show).on("mouseleave"+r,p.hide):"click"==o.on&&t.on(u+r,p.toggle),p.is.page()&&(p.debug("Setting as a page dimmer",t),p.set.pageDimmer()),p.is.closable()&&(p.verbose("Adding dimmer close event",a),t.on(u+r,n.dimmer,p.event.click))}},unbind:{events:function(){d.removeData(l),t.off(r)}},event:{click:function(e){p.verbose("Determining if event occurred on dimmer",e),0!==a.find(e.target).length&&!k(e.target).is(n.content)||(p.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=k(e);p.debug("Add content to dimmer",e),e.parent()[0]!==a[0]&&e.detach().appendTo(a)},create:function(){var e=k(o.template.dimmer(o));return o.dimmerName&&(p.debug("Creating named dimmer",o.dimmerName),e.addClass(o.dimmerName)),e.appendTo(t),e},show:function(e){e=k.isFunction(e)?e:function(){},p.is.dimmed()&&!p.is.animating()||!p.is.enabled()?p.debug("Dimmer is already shown or disabled"):!1===o.onShow.call(f)?p.verbose("Show callback returned false cancelling dimmer show"):(p.debug("Showing dimmer",a,o),p.set.variation(),p.animate.show(e),o.onChange.call(f))},hide:function(e){e=k.isFunction(e)?e:function(){},p.is.dimmed()||p.is.animating()?!1===o.onHide.call(f)?p.verbose("Hide callback returned false cancelling dimmer hide"):(p.debug("Hiding dimmer",a),p.animate.hide(e),o.onChange.call(f)):p.debug("Dimmer is not visible")},toggle:function(){p.verbose("Toggling dimmer visibility",a),p.is.dimmed()?p.is.closable()&&p.hide():p.show()},animate:{show:function(e){e=k.isFunction(e)?e:function(){},o.useCSS&&k.fn.transition!==D&&a.transition("is supported")?((o.useFlex?(p.debug("Using flex dimmer"),p.remove):(p.debug("Using legacy non-flex dimmer"),p.set)).legacy(),"auto"!==o.opacity&&p.set.opacity(),a.transition({debug:o.debug,verbose:o.verbose,silent:o.silent,displayType:o.useFlex?"flex":"block",animation:(o.transition.showMethod||o.transition)+" in",queue:!1,duration:p.get.duration(),useFailSafe:!0,onStart:function(){p.set.dimmed()},onComplete:function(){p.set.active(),o.onVisible.call(a),e()}})):(p.verbose("Showing dimmer animation with javascript"),p.set.dimmed(),"auto"==o.opacity&&(o.opacity=.8),a.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(p.get.duration(),o.opacity,function(){a.removeAttr("style"),p.set.active(),o.onVisible.call(a),e()}))},hide:function(e){e=k.isFunction(e)?e:function(){},o.useCSS&&k.fn.transition!==D&&a.transition("is supported")?(p.verbose("Hiding dimmer with css"),a.transition({debug:o.debug,verbose:o.verbose,silent:o.silent,displayType:o.useFlex?"flex":"block",animation:(o.transition.hideMethod||o.transition)+" out",queue:!1,duration:p.get.duration(),useFailSafe:!0,onComplete:function(){p.remove.dimmed(),p.remove.variation(),p.remove.active(),o.onHidden.call(a),e()}})):(p.verbose("Hiding dimmer with javascript"),a.stop().fadeOut(p.get.duration(),function(){p.remove.dimmed(),p.remove.active(),a.removeAttr("style"),o.onHidden.call(a),e()}))}},get:{dimmer:function(){return a},duration:function(){return p.is.active()?o.transition.hideDuration||o.duration.hide||o.duration:o.transition.showDuration||o.duration.show||o.duration}},has:{dimmer:function(){return o.dimmerName?0<d.find(n.dimmer).filter("."+o.dimmerName).length:0<d.find(n.dimmer).length}},is:{active:function(){return a.hasClass(i.active)},animating:function(){return a.is(":animated")||a.hasClass(i.animating)},closable:function(){return"auto"==o.closable?"hover"!=o.on:o.closable},dimmer:function(){return d.hasClass(i.dimmer)},dimmable:function(){return d.hasClass(i.dimmable)},dimmed:function(){return t.hasClass(i.dimmed)},disabled:function(){return t.hasClass(i.disabled)},enabled:function(){return!p.is.disabled()},page:function(){return t.is("body")},pageDimmer:function(){return a.hasClass(i.pageDimmer)}},can:{show:function(){return!a.hasClass(i.disabled)}},set:{opacity:function(e){var t=a.css("background-color"),n=t.split(","),i=n&&3<=n.length;e=0===o.opacity?0:o.opacity||e,t=i?(n[2]=n[2].replace(")",""),n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",p.debug("Setting opacity to",e),a.css("background-color",t)},legacy:function(){a.addClass(i.legacy)},active:function(){a.addClass(i.active)},dimmable:function(){t.addClass(i.dimmable)},dimmed:function(){t.addClass(i.dimmed)},pageDimmer:function(){a.addClass(i.pageDimmer)},disabled:function(){a.addClass(i.disabled)},variation:function(e){(e=e||o.variation)&&a.addClass(e)}},remove:{active:function(){a.removeClass(i.active)},legacy:function(){a.removeClass(i.legacy)},dimmed:function(){t.removeClass(i.dimmed)},disabled:function(){a.removeClass(i.disabled)},variation:function(e){(e=e||o.variation)&&a.removeClass(e)}},setting:function(e,t){if(p.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,o,e);else{if(t===D)return o[e];k.isPlainObject(o[e])?k.extend(!0,o[e],t):o[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,p,e);else{if(t===D)return p[e];p[e]=t}},debug:function(){!o.silent&&o.debug&&(o.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,o.name+":"),p.debug.apply(console,arguments)))},verbose:function(){!o.silent&&o.verbose&&o.debug&&(o.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),p.verbose.apply(console,arguments)))},error:function(){o.silent||(p.error=Function.prototype.bind.call(console.error,console,o.name+":"),p.error.apply(console,arguments))},performance:{log:function(e){var t,n;o.performance&&(n=(t=(new Date).getTime())-(b||t),b=t,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=o.name+":",n=0;b=!1,clearTimeout(p.performance.timer),k.each(y,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",c&&(e+=" '"+c+"'"),1<v.length&&(e+=" ("+v.length+")"),(console.group!==D||console.table!==D)&&0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):k.each(y,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(i,e,t){var a,o,n,r=m;return e=e||C,t=t||f,"string"==typeof i&&r!==D&&(i=i.split(/[\. ]/),a=i.length-1,k.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(k.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==D)return o=r[n],!1;{if(!k.isPlainObject(r[t])||e==a)return r[t]!==D?o=r[t]:p.error(s.method,i),!1;r=r[t]}}})),k.isFunction(o)?n=o.apply(t,e):o!==D&&(n=o),Array.isArray(h)?h.push(n):h!==D?h=[h,n]:n!==D&&(h=n),o}};p.preinitialize(),w?(m===D&&p.initialize(),p.invoke(x)):(m!==D&&m.invoke("destroy"),p.initialize())}),h!==D?h:this},k.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},displayLoader:!1,loaderText:!1,loaderVariation:"",onChange:function(){},onShow:function(){},onHide:function(){},onVisible:function(){},onHidden:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show",loader:"ui loader"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(e){var t,n=k("<div/>").addClass("ui dimmer");return e.displayLoader&&(t=k("<div/>").addClass(e.className.loader).addClass(e.loaderVariation),e.loaderText&&(t.text(e.loaderText),t.addClass("text")),n.append(t)),n}}}}(jQuery,window,document),function(Z,ee,te,ne){"use strict";Z.isFunction=Z.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},ee=void 0!==ee&&ee.Math==Math?ee:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Z.fn.dropdown=function(Y){var W,B=Z(this),$=Z(te),K=B.selector||"",Q=(new Date).getTime(),X=[],G=Y,J="string"==typeof G,_=[].slice.call(arguments,1);return B.each(function(V){var f,e,t,n,i,a,o,r,s,m=Z.isPlainObject(Y)?Z.extend(!0,{},Z.fn.dropdown.settings,Y):Z.extend({},Z.fn.dropdown.settings),p=m.className,g=m.message,l=m.fields,h=m.keys,v=m.metadata,q=m.namespace,c=m.regExp,b=m.selector,u=m.error,j=m.templates,d="."+q,y="module-"+q,x=Z(this),w=[ee,te].indexOf(m.context)<0?$.find(m.context):Z(m.context),C=x.find(b.text),k=x.find(b.search),T=x.find(b.sizer),D=x.find(b.input),N=x.find(b.icon),H=x.find(b.clearIcon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z(),F=!1,z=!1,U=!1,O=!1,P=this,I=!1,R=x.data(y),L={initialize:function(){L.debug("Initializing dropdown",m),L.is.alreadySetup()?L.setup.reference():(m.ignoreDiacritics&&!String.prototype.normalize&&(m.ignoreDiacritics=!1,L.error(u.noNormalize,P)),L.create.id(),L.setup.layout(),m.values&&(L.set.initialLoad(),L.change.values(m.values),L.remove.initialLoad()),L.refreshData(),L.save.defaults(),L.restore.selected(),L.bind.events(),L.observeChanges(),L.instantiate())},instantiate:function(){L.verbose("Storing instance of dropdown",L),R=L,x.data(y,L)},destroy:function(){L.verbose("Destroying previous dropdown",x),L.remove.tabbable(),L.remove.active(),A.transition("stop all"),A.removeClass(p.visible).addClass(p.hidden),x.off(d).removeData(y),A.off(d),$.off(i),L.disconnect.menuObserver(),L.disconnect.selectObserver(),L.disconnect.classObserver()},observeChanges:function(){"MutationObserver"in ee&&(o=new MutationObserver(L.event.select.mutation),r=new MutationObserver(L.event.menu.mutation),s=new MutationObserver(L.event.class.mutation),L.debug("Setting up mutation observer",o,r,s),L.observe.select(),L.observe.menu(),L.observe.class())},disconnect:{menuObserver:function(){r&&r.disconnect()},selectObserver:function(){o&&o.disconnect()},classObserver:function(){s&&s.disconnect()}},observe:{select:function(){L.has.input()&&o&&o.observe(x[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){L.has.menu()&&r&&r.observe(A[0],{childList:!0,subtree:!0})},class:function(){L.has.search()&&s&&s.observe(x[0],{attributes:!0})}},create:{id:function(){a=(Math.random().toString(16)+"000000000").slice(2,10),i="."+a,L.verbose("Creating unique id for element",a)},userChoice:function(e){var n,i;return!!(e=e||L.get.userValues())&&(e=Array.isArray(e)?e:[e],Z.each(e,function(e,t){!1===L.get.item(t)&&(i=m.templates.addition(L.add.variables(g.addResult,t)),i=Z("<div />").html(i).attr("data-"+v.value,t).attr("data-"+v.text,t).addClass(p.addition).addClass(p.item),m.hideAdditions&&i.addClass(p.hidden),n=n===ne?i:n.add(i),L.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=L.get.userValues();t&&(L.debug("Adding user labels",t),Z.each(t,function(e,t){L.verbose("Adding custom user value"),L.add.label(t,t)}))},menu:function(){A=Z("<div />").addClass(p.menu).appendTo(x)},sizer:function(){T=Z("<span />").addClass(p.sizer).insertAfter(k)}},search:function(e){e=e!==ne?e:L.get.query(),L.verbose("Searching for query",e),!1===m.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping callback on initial load",m.onSearch):L.has.minCharacters(e)&&!1!==m.onSearch.call(P,e)?L.filter(e):L.hide(null,!0)},select:{firstUnfiltered:function(){L.verbose("Selecting first non-filtered element"),L.remove.selectedItem(),E.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(p.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);(0<t.length?(L.verbose("Moving selection to",t),t):(L.verbose("Moving selection to",e),e)).addClass(p.selected)}},setup:{api:function(){var e={debug:m.debug,urlData:{value:L.get.value(),query:L.get.query()},on:!1};L.verbose("First request, initializing API"),x.api(e)},layout:function(){var e;x.is("select")&&(L.setup.select(),L.setup.returnedObject()),L.has.menu()||L.create.menu(),L.is.clearable()&&!L.has.clearItem()&&(L.verbose("Adding clear icon"),H=Z("<i />").addClass("remove icon").insertBefore(C)),L.is.search()&&!L.has.search()&&(L.verbose("Adding search input"),e=x.prev("label"),k=Z("<input />").addClass(p.search).prop("autocomplete",L.is.chrome()?"fomantic-search":"off"),e.length&&(e.attr("id")||e.attr("id","_"+L.get.id()+"_formLabel"),k.attr("aria-labelledby",e.attr("id"))),k.insertBefore(C)),L.is.multiple()&&L.is.searchSelection()&&!L.has.sizer()&&L.create.sizer(),m.allowTab&&L.set.tabbable()},select:function(){var e=L.get.selectValues();L.debug("Dropdown initialized on a select",e),0<(D=x.is("select")?x:D).parent(b.dropdown).length?(L.debug("UI dropdown already exists. Creating dropdown menu only"),x=D.closest(b.dropdown),L.has.menu()||L.create.menu(),A=x.children(b.menu),L.setup.menu(e)):(L.debug("Creating entire dropdown from select"),x=Z("<div />").attr("class",D.attr("class")).addClass(p.selection).addClass(p.dropdown).html(j.dropdown(e,l,m.preserveHTML,m.className)).insertBefore(D),D.hasClass(p.multiple)&&!1===D.prop("multiple")&&(L.error(u.missingMultiple),D.prop("multiple",!0)),D.is("[multiple]")&&L.set.multiple(),D.prop("disabled")&&(L.debug("Disabling dropdown"),x.addClass(p.disabled)),D.is("[required]")&&(m.forceSelection=!0),D.removeAttr("required").removeAttr("class").detach().prependTo(x)),L.refresh()},menu:function(e){A.html(j.menu(e,l,m.preserveHTML,m.className)),E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z()},reference:function(){L.debug("Dropdown behavior was called on select, replacing with closest dropdown"),x=x.parent(b.dropdown),R=x.data(y),P=x[0],L.refresh(),L.setup.returnedObject()},returnedObject:function(){var e=B.slice(0,V),t=B.slice(V+1);B=e.add(x).add(t)}},refresh:function(){L.refreshSelectors(),L.refreshData()},refreshItems:function(){E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z()},refreshSelectors:function(){L.verbose("Refreshing selector cache"),C=x.find(b.text),k=x.find(b.search),D=x.find(b.input),N=x.find(b.icon),S=0<x.prev().find(b.text).length?x.prev().find(b.text):x.prev(),A=x.children(b.menu),E=A.find(b.item),M=m.hideDividers?E.parent().children(b.divider):Z()},refreshData:function(){L.verbose("Refreshing cached metadata"),E.removeData(v.text).removeData(v.value)},clearData:function(){L.verbose("Clearing metadata"),E.removeData(v.text).removeData(v.value),x.removeData(v.defaultText).removeData(v.defaultValue).removeData(v.placeholderText)},clearItems:function(){A.empty(),L.refreshItems()},toggle:function(){L.verbose("Toggling menu visibility"),L.is.active()?L.hide():L.show()},show:function(e,t){if(e=Z.isFunction(e)?e:function(){},(I||O)&&L.is.remote()&&L.is.noApiCache()&&L.clearItems(),!L.can.show()&&L.is.remote()&&(L.debug("No API results retrieved, searching before show"),L.queryRemote(L.get.query(),L.show,[e,t])),L.can.show()&&!L.is.active()){if(L.debug("Showing dropdown"),!L.has.message()||L.has.maxSelections()||L.has.allResultsFiltered()||L.remove.message(),L.is.allFiltered())return!0;!1!==m.onShow.call(P)&&(L.remove.empty(),L.animate.show(function(){L.bind.intent(),L.has.search()&&!t&&L.focusSearch(),L.set.visible(),e.call(P)}))}},hide:function(e,t){var n;e=Z.isFunction(e)?e:function(){},L.is.active()&&!L.is.animatingOutward()?(L.debug("Hiding dropdown"),!1!==m.onHide.call(P)&&(L.animate.hide(function(){L.remove.visible(),L.is.focusedOnSearch()&&!0!==t&&k.blur(),e.call(P)}),0<(n=x.find(b.menu)).length)&&(L.verbose("Hiding sub-menu",n),n.each(function(){L.animate.hide(!1,Z(this))}))):L.unbind.intent(),I=O=!1},hideOthers:function(){L.verbose("Finding other dropdowns to hide"),B.not(x).has(b.menu+"."+p.visible).dropdown("hide")},hideMenu:function(){L.verbose("Hiding menu instantaneously"),L.remove.active(),L.remove.visible(),A.transition("destroy").transition("hide")},hideSubMenus:function(){var e=A.children(b.item).find(b.menu);L.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){L.bind.keyboardEvents(),L.bind.inputEvents(),L.bind.mouseEvents()},keyboardEvents:function(){L.verbose("Binding keyboard events"),x.on("keydown"+d,L.event.keydown),L.has.search()&&x.on(L.get.inputEvent()+d,b.search,L.event.input),L.is.multiple()&&$.on("keydown"+i,L.event.document.keydown)},inputEvents:function(){L.verbose("Binding input change events"),x.on("change"+d,b.input,L.event.change),L.is.multiple()&&L.is.searchSelection()&&x.on("paste"+d,b.search,L.event.paste)},mouseEvents:function(){L.verbose("Binding mouse events"),L.is.multiple()&&x.on("click"+d,b.label,L.event.label.click).on("click"+d,b.remove,L.event.remove.click),L.is.searchSelection()?(x.on("mousedown"+d,L.event.mousedown).on("mouseup"+d,L.event.mouseup).on("mousedown"+d,b.menu,L.event.menu.mousedown).on("mouseup"+d,b.menu,L.event.menu.mouseup).on("click"+d,b.icon,L.event.icon.click).on("click"+d,b.clearIcon,L.event.clearIcon.click).on("focus"+d,b.search,L.event.search.focus).on("click"+d,b.search,L.event.search.focus).on("blur"+d,b.search,L.event.search.blur).on("click"+d,b.text,L.event.text.focus),L.is.multiple()&&x.on("click"+d,L.event.click).on("click"+d,L.event.search.focus)):("click"==m.on?x.on("click"+d,b.icon,L.event.icon.click).on("click"+d,L.event.test.toggle):"hover"==m.on?x.on("mouseenter"+d,L.delay.show).on("mouseleave"+d,L.delay.hide).on("touchstart"+d,L.event.test.toggle).on("touchstart"+d,b.icon,L.event.icon.click):x.on(m.on+d,L.toggle),x.on("mousedown"+d,L.event.mousedown).on("mouseup"+d,L.event.mouseup).on("focus"+d,L.event.focus).on("click"+d,b.clearIcon,L.event.clearIcon.click),L.has.menuSearch()?x.on("blur"+d,b.search,L.event.search.blur):x.on("blur"+d,L.event.blur)),A.on("mouseenter"+d,b.item,L.event.item.mouseenter).on("touchstart"+d,b.item,L.event.item.mouseenter).on("mouseleave"+d,b.item,L.event.item.mouseleave).on("click"+d,b.item,L.event.item.click)},intent:function(){L.verbose("Binding hide intent event to document"),$.on("click"+i,L.event.test.hide)}},unbind:{intent:function(){L.verbose("Removing hide intent event from document"),$.off("click"+i)}},filter:function(e){function t(){L.is.multiple()&&L.filterActive(),(e||!e&&0==L.get.activeItem().length)&&L.select.firstUnfiltered(),L.has.allResultsFiltered()?m.onNoResults.call(P,n)?m.allowAdditions?m.hideAdditions&&(L.verbose("User addition with no menu, setting empty style"),L.set.empty(),L.hideMenu()):(L.verbose("All items filtered, showing message",n),L.add.message(g.noResults)):(L.verbose("All items filtered, hiding dropdown",n),L.set.empty(),L.hideMenu()):(L.remove.empty(),L.remove.message()),m.allowAdditions&&L.add.userSuggestion(L.escape.htmlEntities(e)),L.is.searchSelection()&&L.can.show()&&L.is.focusedOnSearch()&&!L.is.empty()&&L.show()}var n=e!==ne?e:L.get.query();m.useLabels&&L.has.maxSelections()||(m.apiSettings?L.can.useAPI()?L.queryRemote(n,function(){m.filterRemoteData&&L.filterItems(n);var e=D.val();Array.isArray(e)||(e=e&&""!==e?e.split(m.delimiter):[]),L.is.multiple()&&Z.each(e,function(e,t){E.filter('[data-value="'+t+'"]').addClass(p.filtered)}),L.focusSearch(!0),t()}):L.error(u.noAPI):(L.filterItems(n),t()))},queryRemote:function(e,o,r){Array.isArray(r)||(r=[r]);var e={errorDuration:!1,cache:"local",throttle:m.throttle,urlData:{query:e}},t={onError:function(e,t,n){L.add.message(g.serverError),I=O=!1,o.apply(null,r),"function"==typeof m.apiSettings.onError&&m.apiSettings.onError.call(this,e,t,n)},onFailure:function(e,t,n){L.add.message(g.serverError),I=O=!1,o.apply(null,r),"function"==typeof m.apiSettings.onFailure&&m.apiSettings.onFailure.call(this,e,t,n)},onSuccess:function(e,t,n){var i=e[l.remoteValues],a=(Array.isArray(i)||(i=[]),L.remove.message(),{});a[l.values]=i,L.setup.menu(a),0!==i.length||m.allowAdditions?""!==(a=L.is.multiple()?L.get.values():L.get.value())&&(L.verbose("Value(s) present after click icon, select value(s) in items"),L.set.selected(a,null,!0,!0)):L.add.message(g.noResults),I=O=!1,o.apply(null,r),"function"==typeof m.apiSettings.onSuccess&&m.apiSettings.onSuccess.call(this,e,t,n)}};x.api("get request")||L.setup.api(),e=Z.extend(!0,{},e,m.apiSettings,t),x.api("setting",e).api("query")},filterItems:function(e){var n=L.remove.diacritics(e!==ne?e:L.get.query()),i=null,e=L.escape.string(n),t=(m.ignoreSearchCase?"i":"")+"gm",a=new RegExp("^"+e,t);L.has.query()&&(i=[],L.verbose("Searching for matching values",n),E.each(function(){var e,t=Z(this);return!t.hasClass(p.unfilterable)&&("both"!==m.match&&"text"!==m.match||!(-1!==(e=L.remove.diacritics(String(L.get.choiceText(t,!1)))).search(a)||"exact"===m.fullTextSearch&&L.exactSearch(n,e)||!0===m.fullTextSearch&&L.fuzzySearch(n,e)))&&("both"!==m.match&&"value"!==m.match||!(-1!==(t=L.remove.diacritics(String(L.get.choiceValue(t,e)))).search(a)||"exact"===m.fullTextSearch&&L.exactSearch(n,t)||!0===m.fullTextSearch&&L.fuzzySearch(n,t)))?void 0:(i.push(this),!0)})),L.debug("Showing only matched items",n),L.remove.filteredItem(),i&&E.not(i).addClass(p.filtered),L.has.query()?!0===m.hideDividers?M.addClass(p.hidden):"empty"===m.hideDividers&&M.removeClass(p.hidden).filter(function(){var e=Z(this).nextUntil(b.item);return 0===(e.length?e:Z(this)).nextUntil(b.divider).filter(b.item+":not(."+p.filtered+")").length}).addClass(p.hidden):M.removeClass(p.hidden)},fuzzySearch:function(e,t){var n=t.length,i=e.length;if(e=m.ignoreSearchCase?e.toLowerCase():e,t=m.ignoreSearchCase?t.toLowerCase():t,n<i)return!1;if(i===n)return e===t;e:for(var a=0,o=0;a<i;a++){for(var r=e.charCodeAt(a);o<n;)if(t.charCodeAt(o++)===r)continue e;return!1}return!0},exactSearch:function(e,t){return e=m.ignoreSearchCase?e.toLowerCase():e,-1<(t=m.ignoreSearchCase?t.toLowerCase():t).indexOf(e)},filterActive:function(){m.useLabels&&E.filter("."+p.active).addClass(p.filtered)},focusSearch:function(e){L.has.search()&&!L.is.focusedOnSearch()&&(e?(x.off("focus"+d,b.search),k.focus(),x.on("focus"+d,b.search,L.event.search.focus)):k.focus())},blurSearch:function(){L.has.search()&&k.blur()},forceSelection:function(){var e=E.not(p.filtered).filter("."+p.selected).eq(0),t=E.not(p.filtered).filter("."+p.active).eq(0),e=0<e.length?e:t,t=0<e.length;m.allowAdditions||t&&!L.is.multiple()?(L.debug("Forcing partial selection to selected item",e),L.event.item.click.call(e,{},!0)):L.remove.searchTerm()},change:{values:function(e){m.allowAdditions||L.clear(),L.debug("Creating dropdown with specified values",e);var t={};t[l.values]=e,L.setup.menu(t),Z.each(e,function(e,t){if(!0===t.selected&&(L.debug("Setting initial selection to",t[l.value]),L.set.selected(t[l.value]),!L.is.multiple()))return!1}),L.has.selectInput()&&(L.disconnect.selectObserver(),D.html(""),D.append("<option disabled selected value></option>"),Z.each(e,function(e,t){var n=m.templates.deQuote(t[l.value]),i=m.templates.escape(t[l.name]||"",m.preserveHTML);D.append('<option value="'+n+'"'+(!0===t.selected?" selected":"")+">"+i+"</option>")}),L.observe.select())}},event:{paste:function(e){(e.originalEvent.clipboardData||ee.clipboardData).getData("text").split(m.delimiter).forEach(function(e){L.set.selected(L.escape.htmlEntities(e.trim()),null,!0,!0)}),e.preventDefault()},change:function(){U||(L.debug("Input changed, updating selection"),L.set.selected())},focus:function(){m.showOnFocus&&!F&&L.is.hidden()&&!t&&(I=!0,L.show())},blur:function(e){t=te.activeElement===this,F||t||(L.remove.activeLabel(),L.hide())},mousedown:function(){L.is.searchSelection(!0)?n=!0:F=!0},mouseup:function(){L.is.searchSelection(!0)?n=!1:F=!1},click:function(e){Z(e.target).is(x)&&(L.is.focusedOnSearch()?L.show():L.focusSearch())},search:{focus:function(e){F=!0,L.is.multiple()&&L.remove.activeLabel(),I||L.is.active()||!(m.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)||"touchstart"===e.type||(I=!0,L.search())},blur:function(e){t=te.activeElement===this,!L.is.searchSelection(!0)||n||z||t||(m.forceSelection?L.forceSelection():m.allowAdditions||L.remove.searchTerm(),L.hide()),n=!1}},clearIcon:{click:function(e){L.clear(),L.is.searchSelection()&&L.remove.searchTerm(),L.hide(),e.stopPropagation()}},icon:{click:function(e){O=!0,L.has.search()?L.is.active()?L.blurSearch():m.showOnFocus?L.focusSearch():L.toggle():L.toggle(),e.stopPropagation()}},text:{focus:function(e){F=!0,L.focusSearch()}},input:function(e){(L.is.multiple()||L.is.searchSelection())&&L.set.filtered(),clearTimeout(L.timer),L.timer=setTimeout(L.search,m.delay.search)},label:{click:function(e){var t=Z(this),n=x.find(b.label),i=n.filter("."+p.active),a=t.nextAll("."+p.active),o=t.prevAll("."+p.active),a=(0<a.length?t.nextUntil(a):t.prevUntil(o)).add(i).add(t);e.shiftKey?(i.removeClass(p.active),a.addClass(p.active)):e.ctrlKey?t.toggleClass(p.active):(i.removeClass(p.active),t.addClass(p.active)),m.onLabelSelect.apply(this,n.filter("."+p.active)),e.stopPropagation()}},remove:{click:function(e){var t=Z(this).parent();t.hasClass(p.active)?L.remove.activeLabels():L.remove.activeLabels(t),e.stopPropagation()}},test:{toggle:function(e){var t=L.is.multiple()?L.show:L.toggle;L.is.bubbledLabelClick(e)||L.is.bubbledIconClick(e)||(L.is.multiple()&&(!L.is.multiple()||L.is.active())||(I=!0),L.determine.eventOnElement(e,t)&&"touchstart"!==e.type&&e.preventDefault())},hide:function(e){L.determine.eventInModule(e,L.hide)&&P.id&&Z(e.target).attr("for")===P.id&&e.preventDefault()}},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&L.check.disabled()})}},select:{mutation:function(e){L.is.selectMutation(e)&&(L.debug("<select> modified, recreating menu"),L.disconnect.selectObserver(),L.refresh(),L.setup.select(),L.set.selected(),L.observe.select())}},menu:{mutation:function(e){var e=e[0],t=e.addedNodes?Z(e.addedNodes[0]):Z(!1),e=e.removedNodes?Z(e.removedNodes[0]):Z(!1),t=t.add(e),e=t.is(b.addition)||0<t.closest(b.addition).length,t=t.is(b.message)||0<t.closest(b.message).length;e||t?(L.debug("Updating item selector cache"),L.refreshItems()):(L.debug("Menu modified, updating selector cache"),L.refresh())},mousedown:function(){z=!0},mouseup:function(){z=!1}},item:{mouseenter:function(e){var t=Z(e.target),n=Z(this),i=n.children(b.menu),a=n.siblings(b.item).children(b.menu),n=0<i.length;0<i.find(t).length||!n||(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Showing sub-menu",i),Z.each(a,function(){L.animate.hide(!1,Z(this))}),L.animate.show(!1,i)},m.delay.show),e.preventDefault())},mouseleave:function(e){var t=Z(this).find(b.menu);0<t.length&&(clearTimeout(L.itemTimer),L.itemTimer=setTimeout(function(){L.verbose("Hiding sub-menu",t),t.each(function(){L.animate.hide(!1,Z(this))})},m.delay.hide))},click:function(e,t){var n=Z(this),e=Z(e?e.target:""),i=n.find(b.menu),a=L.get.choiceText(n),o=L.get.choiceValue(n,a),r=0<i.length,i=0<i.find(e).length;"input"!==te.activeElement.tagName.toLowerCase()&&Z(te.activeElement).blur(),i||r&&!m.allowCategorySelection||(L.is.searchSelection()&&(m.allowAdditions&&L.remove.userAddition(),L.remove.filteredItem(),L.is.visible()||L.show(),L.remove.searchTerm(),L.is.focusedOnSearch()||!0===t||L.focusSearch(!0)),m.useLabels||(L.remove.filteredItem(),L.set.scrollPosition(n)),L.determine.selectAction.call(this,a,o))}},document:{keydown:function(e){var t,n,i,a,o,r,s,l,c,u,d,f=e.which;L.is.inObject(f,h)&&((n=(t=x.find(b.label)).filter("."+p.active)).data(v.value),r=t.index(n),s=t.length,i=0<n.length,a=1<n.length,o=0===r,r=r+1==s,s=L.is.searchSelection(),l=L.is.focusedOnSearch(),c=L.is.focused(),d=(u=l&&0===L.get.caretPosition(!1))&&0!==L.get.caretPosition(!0),s&&!i&&!l||(f==h.leftArrow?!c&&!u||i?i&&(e.shiftKey?L.verbose("Adding previous label to selection"):(L.verbose("Selecting previous label"),t.removeClass(p.active)),o&&!a?n.addClass(p.active):n.prev(b.siblingLabel).addClass(p.active).end(),e.preventDefault()):(L.verbose("Selecting previous label"),t.last().addClass(p.active)):f==h.rightArrow?(c&&!i&&t.first().addClass(p.active),i&&(e.shiftKey?L.verbose("Adding next label to selection"):(L.verbose("Selecting next label"),t.removeClass(p.active)),r?s?l?t.removeClass(p.active):L.focusSearch():(a?n.next(b.siblingLabel):n).addClass(p.active):n.next(b.siblingLabel).addClass(p.active),e.preventDefault())):f==h.deleteKey||f==h.backspace?i?(L.verbose("Removing active labels"),r&&s&&!l&&L.focusSearch(),n.last().next(b.siblingLabel).addClass(p.active),L.remove.activeLabels(n),L.is.visible()||L.show(),e.preventDefault()):!u||d||i||f!=h.backspace||(L.verbose("Removing last label on input backspace"),n=t.last().addClass(p.active),L.remove.activeLabels(n),L.is.visible())||L.show():n.removeClass(p.active)))}},keydown:function(e){var t=e.which;if(L.is.inObject(t,h)||e.key===m.delimiter){var n,i=E.not(b.unselectable).filter("."+p.selected).eq(0),a=A.children("."+p.active).eq(0),i=0<i.length?i:a,a=0<i.length?i.siblings(":not(."+p.filtered+")").addBack():A.children(":not(."+p.filtered+")"),o=i.children(b.menu),r=i.closest(b.menu),s=r.hasClass(p.visible)||r.hasClass(p.animating)||0<r.parent(b.menu).length,l=0<o.length,c=0<i.length,u=0<i.not(b.unselectable).length,d=e.key===m.delimiter&&L.is.multiple();if(m.allowAdditions&&(t==h.enter||d)&&(u&&m.hideAdditions&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e)),L.is.searchSelection()&&L.remove.searchTerm(),L.is.multiple())&&e.preventDefault(),L.is.visible()){if(t!=h.enter&&!d||(t==h.enter&&c&&l&&!m.allowCategorySelection?(L.verbose("Pressed enter on unselectable category, opening sub menu"),t=h.rightArrow):u&&(L.verbose("Selecting item from keyboard shortcut",i),L.event.item.click.call(i,e),L.is.searchSelection())&&(L.remove.searchTerm(),L.is.multiple())&&k.focus(),e.preventDefault()),c&&(t==h.leftArrow&&r[0]!==A[0]&&(L.verbose("Left key pressed, closing sub-menu"),L.animate.hide(!1,r),i.removeClass(p.selected),r.closest(b.item).addClass(p.selected),e.preventDefault()),t==h.rightArrow)&&l&&(L.verbose("Right key pressed, opening sub-menu"),L.animate.show(!1,o),i.removeClass(p.selected),o.find(b.item).eq(0).addClass(p.selected),e.preventDefault()),t==h.upArrow){if(n=(c&&s?i.prevAll(b.item+":not("+b.unselectable+")"):E).eq(0),a.index(n)<0)return L.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();L.verbose("Up key pressed, changing active item"),i.removeClass(p.selected),n.addClass(p.selected),L.set.scrollPosition(n),m.selectOnKeydown&&L.is.single()&&!n.hasClass(p.actionable)&&L.set.selectedItem(n),e.preventDefault()}if(t==h.downArrow){if(0===(n=(c&&s?i.nextAll(b.item+":not("+b.unselectable+")"):E).eq(0)).length)return L.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();L.verbose("Down key pressed, changing active item"),E.removeClass(p.selected),n.addClass(p.selected),L.set.scrollPosition(n),m.selectOnKeydown&&L.is.single()&&!n.hasClass(p.actionable)&&L.set.selectedItem(n),e.preventDefault()}t==h.pageUp&&(L.scrollPage("up"),e.preventDefault()),t==h.pageDown&&(L.scrollPage("down"),e.preventDefault()),t==h.escape&&(L.verbose("Escape key pressed, closing dropdown"),L.hide(),e.stopPropagation())}else t!=h.enter&&!d||e.preventDefault(),t!=h.downArrow||L.is.visible()||(L.verbose("Down key pressed, showing dropdown"),L.show(),e.preventDefault())}else L.has.search()||L.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e,t=D[0];t&&(e=te.createEvent("HTMLEvents"),L.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){f=!0,L.verbose("Determining action",m.action),Z.isFunction(L.action[m.action])?(L.verbose("Triggering preset action",m.action,e,t),L.action[m.action].call(P,e,t,this)):Z.isFunction(m.action)?(L.verbose("Triggering user action",m.action,e,t),m.action.call(P,e,t,this)):L.error(u.action,m.action),f=!1},eventInModule:function(e,t){var e=Z(e.target),n=0<e.closest(te.documentElement).length,e=0<e.closest(x).length;return t=Z.isFunction(t)?t:function(){},n&&!e?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=Z(e.target),i=n.closest(b.siblingLabel),e=te.body.contains(e.target),i=0===x.find(i).length||!(L.is.multiple()&&m.useLabels),n=0===n.closest(A).length;return t=Z.isFunction(t)?t:function(){},e&&i&&n?(L.verbose("Triggering event",t),t(),!0):(L.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=t!==ne?t:e,L.can.activate(Z(n))&&(L.set.selected(t,Z(n)),L.is.multiple()||!m.collapseOnActionable&&Z(n).hasClass(p.actionable)||L.hideAndClear())},select:function(e,t,n){t=t!==ne?t:e,L.can.activate(Z(n))&&(L.set.value(t,e,Z(n)),L.is.multiple()||!m.collapseOnActionable&&Z(n).hasClass(p.actionable)||L.hideAndClear())},combo:function(e,t,n){L.set.selected(t=t!==ne?t:e,Z(n)),L.hideAndClear()},hide:function(e,t,n){L.set.value(t,e,Z(n)),L.hideAndClear()}},get:{id:function(){return a},defaultText:function(){return x.data(v.defaultText)},defaultValue:function(){return x.data(v.defaultValue)},placeholderText:function(){return"auto"!=m.placeholder&&"string"==typeof m.placeholder?m.placeholder:x.data(v.placeholderText)||""},text:function(){return m.preserveHTML?C.html():C.text()},query:function(){return String(k.val()).trim()},searchWidth:function(e){return e=e!==ne?e:k.val(),T.text(e),Math.ceil(T.width()+(L.is.edge()?3:1))},selectionCount:function(){var e=L.get.values();return L.is.multiple()?Array.isArray(e)?e.length:0:""!==L.get.value()?1:0},transition:function(e){return"auto"===m.transition?L.is.upward(e)?"slide up":"slide down":m.transition},userValues:function(){var e=L.get.values(!0);return!!e&&(e=Array.isArray(e)?e:[e],Z.grep(e,function(e){return!1===L.get.item(e)}))},uniqueArray:function(n){return Z.grep(n,function(e,t){return Z.inArray(e,n)===t})},caretPosition:function(e){var t,n,i=k[0];return e&&"selectionEnd"in i?i.selectionEnd:!e&&"selectionStart"in i?i.selectionStart:te.selection?(i.focus(),n=(t=te.selection.createRange()).text.length,e?n:(t.moveStart("character",-i.value.length),t.text.length-n)):void 0},value:function(){var e=0<D.length?D.val():x.data(v.value),t=Array.isArray(e)&&1===e.length&&""===e[0];return e===ne||t?"":e},values:function(e){var t=L.get.value();return""===t?"":!L.has.selectInput()&&L.is.multiple()?"string"==typeof t?(e?t:L.escape.htmlEntities(t)).split(m.delimiter):"":t},remoteValues:function(){var e=L.get.values(),i=!1;return e&&Z.each(e="string"==typeof e?[e]:e,function(e,t){var n=L.read.remoteData(t);L.verbose("Restoring value from session data",n,t),n&&((i=i||{})[t]=n)}),i},choiceText:function(e,t){if(t=t!==ne?t:m.preserveHTML,e)return 0<e.find(b.menu).length&&(L.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(b.menu).remove(),e.find(b.menuIcon).remove()),e.data(v.text)!==ne?e.data(v.text):t?e.html()&&e.html().trim():e.text()&&e.text().trim()},choiceValue:function(e,t){return t=t||L.get.choiceText(e),!!e&&(e.data(v.value)!==ne?String(e.data(v.value)):"string"==typeof t?String(m.ignoreSearchCase?t.toLowerCase():t).trim():String(t))},inputEvent:function(){var e=k[0];return!!e&&(e.oninput!==ne?"input":e.onpropertychange!==ne?"propertychange":"keyup")},selectValues:function(){var o={},r=[],s=[];return x.find("option").each(function(){var e=Z(this),t=e.html(),n=e.attr("disabled"),i=e.attr("value")!==ne?e.attr("value"):t,a=e.data(v.text)!==ne?e.data(v.text):t,e=e.parent("optgroup");"auto"===m.placeholder&&""===i?o.placeholder=t:(e.length===r.length&&e[0]===r[0]||(s.push({type:"header",divider:m.headerDivider,name:e.attr("label")||""}),r=e),s.push({name:t,value:i,text:a,disabled:n}))}),m.placeholder&&"auto"!==m.placeholder&&(L.debug("Setting placeholder value to",m.placeholder),o.placeholder=m.placeholder),m.sortSelect?(!0===m.sortSelect?s.sort(function(e,t){return e.name.localeCompare(t.name)}):"natural"===m.sortSelect?s.sort(function(e,t){return e.name.toLowerCase().localeCompare(t.name.toLowerCase())}):Z.isFunction(m.sortSelect)&&s.sort(m.sortSelect),o[l.values]=s,L.debug("Retrieved and sorted values from select",o)):(o[l.values]=s,L.debug("Retrieved values from select",o)),o},activeItem:function(){return E.filter("."+p.active)},selectedItem:function(){var e=E.not(b.unselectable).filter("."+p.selected);return 0<e.length?e:E.eq(0)},itemWithAdditions:function(e){var t=L.get.item(e),e=L.create.userChoice(e);return t=e&&0<e.length?0<t.length?t.add(e):e:t},item:function(n,i){var e,a,o=!1;return n=n!==ne?n:L.get.values()!==ne?L.get.values():L.get.text(),e=(a=L.is.multiple()&&Array.isArray(n))?0<n.length:n!==ne&&null!==n,i=""===n||!1===n||!0===n||i||!1,e&&E.each(function(){var e=Z(this),t=L.get.choiceText(e),t=L.get.choiceValue(e,t);if(null!==t&&t!==ne)if(a)-1!==Z.inArray(L.escape.htmlEntities(String(t)),n.map(function(e){return String(e)}))&&(o=o?o.add(e):e);else if(i){if(L.verbose("Ambiguous dropdown value using strict type check",e,n),t===n)return o=e,!0}else if(m.ignoreCase&&(t=t.toLowerCase(),n=n.toLowerCase()),L.escape.htmlEntities(String(t))===L.escape.htmlEntities(String(n)))return L.verbose("Found select item by value",t,n),o=e,!0}),o},displayType:function(){return x.hasClass("column")?"flex":m.displayType}},check:{maxSelections:function(e){return!m.maxSelections||((e=e!==ne?e:L.get.selectionCount())>=m.maxSelections?(L.debug("Maximum selection count reached"),m.useLabels&&(E.addClass(p.filtered),L.add.message(g.maxSelections)),!0):(L.verbose("No longer at maximum selection count"),L.remove.message(),L.remove.filteredItem(),L.is.searchSelection()&&L.filterItems(),!1))},disabled:function(){k.attr("tabindex",L.is.disabled()?-1:0)}},restore:{defaults:function(e){L.clear(e),L.restore.defaultText(),L.restore.defaultValue()},defaultText:function(){var e=L.get.defaultText();e===L.get.placeholderText?(L.debug("Restoring default placeholder text",e),L.set.placeholderText(e)):(L.debug("Restoring default text",e),L.set.text(e))},placeholderText:function(){L.set.placeholderText()},defaultValue:function(){var e=L.get.defaultValue();e!==ne&&(L.debug("Restoring default value",e),""!==e?(L.set.value(e),L.set.selected()):(L.remove.activeItem(),L.remove.selectedItem()))},labels:function(){m.allowAdditions&&(m.useLabels||(L.error(u.labels),m.useLabels=!0),L.debug("Restoring selected values"),L.create.userLabels()),L.check.maxSelections()},selected:function(){L.restore.values(),L.is.multiple()?(L.debug("Restoring previously selected values and labels"),L.restore.labels()):L.debug("Restoring previously selected values")},values:function(){L.set.initialLoad(),m.apiSettings&&m.saveRemoteData&&L.get.remoteValues()?L.restore.remoteValues():L.set.selected();var e=L.get.value();!e||""===e||Array.isArray(e)&&0===e.length?D.addClass(p.noselection):D.removeClass(p.noselection),L.remove.initialLoad()},remoteValues:function(){var e=L.get.remoteValues();L.debug("Recreating selected from session data",e),e&&(L.is.single()?Z.each(e,function(e,t){L.set.text(t)}):Z.each(e,function(e,t){L.add.label(e,t)}))}},read:{remoteData:function(e){if(ee.Storage!==ne)return(e=sessionStorage.getItem(e+i))!==ne&&e;L.error(u.noStorage)}},save:{defaults:function(){L.save.defaultText(),L.save.placeholderText(),L.save.defaultValue()},defaultValue:function(){var e=L.get.value();L.verbose("Saving default value as",e),x.data(v.defaultValue,e)},defaultText:function(){var e=L.get.text();L.verbose("Saving default text as",e),x.data(v.defaultText,e)},placeholderText:function(){var e;!1!==m.placeholder&&C.hasClass(p.placeholder)&&(e=L.get.text(),L.verbose("Saving placeholder text as",e),x.data(v.placeholderText,e))},remoteData:function(e,t){ee.Storage===ne?L.error(u.noStorage):(L.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t+i,e))}},clear:function(e){L.is.multiple()&&m.useLabels?L.remove.labels(x.find(b.label),e):(L.remove.activeItem(),L.remove.selectedItem(),L.remove.filteredItem()),L.set.placeholderText(),L.clearValue(e)},clearValue:function(e){L.set.value("",null,null,e)},scrollPage:function(e,t){var t=t||L.get.selectedItem(),n=t.closest(b.menu),i=n.outerHeight(),a=n.scrollTop(),o=E.eq(0).outerHeight(),i=Math.floor(i/o),a="up"==e?a-o*i:a+o*i,o=E.not(b.unselectable),i="up"==e?o.index(t)-i:o.index(t)+i,i=("up"==e?0<=i:i<o.length)?o.eq(i):"up"==e?o.first():o.last();0<i.length&&(L.debug("Scrolling page",e,i),t.removeClass(p.selected),i.addClass(p.selected),m.selectOnKeydown&&L.is.single()&&!$nextItem.hasClass(p.actionable)&&L.set.selectedItem(i),n.scrollTop(a))},set:{filtered:function(){var e=L.is.multiple(),t=L.is.searchSelection(),n=e&&t,t=t?L.get.query():"",i="string"==typeof t&&0<t.length,a=L.get.searchWidth(),t=""!==t;e&&i&&(L.verbose("Adjusting input width",a,m.glyphWidth),k.css("width",a)),i||n&&t?(L.verbose("Hiding placeholder text"),C.addClass(p.filtered)):e&&(!n||t)||(L.verbose("Showing placeholder text"),C.removeClass(p.filtered))},empty:function(){x.addClass(p.empty)},loading:function(){x.addClass(p.loading)},placeholderText:function(e){e=e||L.get.placeholderText(),L.debug("Setting placeholder text",e),L.set.text(e),C.addClass(p.placeholder)},tabbable:function(){L.is.searchSelection()?(L.debug("Added tabindex to searchable dropdown"),k.val(""),L.check.disabled(),A.attr("tabindex",-1)):(L.debug("Added tabindex to dropdown"),x.attr("tabindex")===ne&&(x.attr("tabindex",0),A.attr("tabindex",-1)))},initialLoad:function(){L.verbose("Setting initial load"),e=!0},activeItem:function(e){m.allowAdditions&&0<e.filter(b.addition).length?e.addClass(p.filtered):e.addClass(p.active)},partialSearch:function(e){var t=L.get.query().length;k.val(e.slice(0,t))},scrollPosition:function(e,t){var n,i,a=(e=e||L.get.selectedItem()).closest(b.menu),o=e&&0<e.length;t=t!==ne&&t,0===L.get.activeItem().length&&(t=!1),e&&0<a.length&&o&&(e.position().top,a.addClass(p.loading),e=(o=a.scrollTop())-a.offset().top+e.offset().top,t||(i=o+a.height()<e+5,n=e-5<o),L.debug("Scrolling to active item",e),(t||n||i)&&a.scrollTop(e),a.removeClass(p.loading))},text:function(e,t){"combo"===m.action?(L.debug("Changing combo button text",e,S),m.preserveHTML?S.html(e):S.text(e)):"activate"===m.action&&(e===L.get.placeholderText()&&!t||C.removeClass(p.placeholder),L.debug("Changing text",e,C),C.removeClass(p.filtered),m.preserveHTML?C.html(e):C.text(e))},selectedItem:function(e){var t=L.get.choiceValue(e),n=L.get.choiceText(e,!1),i=L.get.choiceText(e);L.debug("Setting user selection to item",e),L.remove.activeItem(),L.set.partialSearch(n),L.set.activeItem(e),L.set.selected(t,e),L.set.text(i)},selectedLetter:function(e){var t,n=E.filter("."+p.selected),i=0<n.length&&L.has.firstLetter(n,e),a=!1;(a=i&&(t=n.nextAll(E).eq(0),L.has.firstLetter(t,e))?t:a)||E.each(function(){if(L.has.firstLetter(Z(this),e))return a=Z(this),!1}),a&&(L.verbose("Scrolling to next value with letter",e),L.set.scrollPosition(a),n.removeClass(p.selected),a.addClass(p.selected),m.selectOnKeydown)&&L.is.single()&&!t.hasClass(p.actionable)&&L.set.selectedItem(a)},direction:function(e){"auto"===m.direction?(e?L.is.upward(e)&&L.remove.upward(e):L.remove.upward(),(L.can.openDownward(e)?L.remove:L.set).upward(e),L.is.leftward(e)||L.can.openRightward(e)||L.set.leftward(e)):"upward"===m.direction&&L.set.upward(e)},upward:function(e){(e||x).addClass(p.upward)},leftward:function(e){(e||A).addClass(p.leftward)},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=ne),e===ne||""===e||Array.isArray(e)&&0===e.length?D.addClass(p.noselection):D.removeClass(p.noselection);var a=L.escape.value(e),o=0<D.length,r=L.get.values(),s=e!==ne?String(e):e;if(o){if(!m.allowReselection&&s==r&&(L.verbose("Skipping value update already same value",e,r),!L.is.initialLoad()))return;L.is.single()&&L.has.selectInput()&&L.can.extendSelect()&&(L.debug("Adding user option",e),L.add.optionValue(e)),L.debug("Updating input value",a,r),U=!0,D.val(a),!1===m.fireOnInit&&L.is.initialLoad()?L.debug("Input native change event ignored on initial load"):!0!==i&&L.trigger.change(),U=!1}else L.verbose("Storing value in metadata",a,D),a!==r&&x.data(v.value,s);!1===m.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",m.onChange):!0!==i&&m.onChange.call(P,e,t,n)},active:function(){x.addClass(p.active)},multiple:function(){x.addClass(p.multiple)},visible:function(){x.addClass(p.visible)},exactly:function(e,t,n){"boolean"==typeof t&&(n=t,t=ne),L.debug("Setting selected to exact values"),L.clear(),L.set.selected(e,t,n)},selected:function(e,l,c,u){"boolean"==typeof l&&(u=c,c=l,l=ne);var d=L.is.multiple();(l=m.allowAdditions?l||L.get.itemWithAdditions(e):l||L.get.item(e))&&(L.debug("Setting selected menu item to",l),L.is.multiple()&&L.remove.searchWidth(),L.is.single()?(L.remove.activeItem(),L.remove.selectedItem()):m.useLabels&&L.remove.selectedItem(),l.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t),i=e.hasClass(p.filtered),a=e.hasClass(p.active),o=e.hasClass(p.actionable),r=e.hasClass(p.addition),s=d&&l&&1===l.length;o?(d&&a&&!r||!m.apiSettings||!m.saveRemoteData||L.save.remoteData(t,n),m.onActionable.call(P,n,t,e)):d?!a||r?(m.apiSettings&&m.saveRemoteData&&L.save.remoteData(t,n),m.useLabels?(L.add.value(n,t,e,c),L.add.label(n,t,s),L.set.activeItem(e),L.filterActive(),L.select.nextAvailable(l)):(L.add.value(n,t,e,c),L.set.text(L.add.variables(g.count)),L.set.activeItem(e))):i||!m.useLabels&&!f||(L.debug("Selected active value, removing label"),L.remove.selected(n)):(m.apiSettings&&m.saveRemoteData&&L.save.remoteData(t,n),u||e.hasClass(p.actionable)||L.set.text(t,!0),L.set.value(n,t,e,c),e.addClass(p.active).addClass(p.selected))}),u||L.remove.searchTerm(),L.is.allFiltered())&&(L.set.empty(),L.hideMenu())}},add:{label:function(e,t,n){var i,a=L.is.searchSelection()?k:C,o=L.escape.value(e);m.ignoreCase&&(o=o.toLowerCase()),i=Z("<a />").addClass(p.label).attr("data-"+v.value,o).html(j.label(o,t,m.preserveHTML,m.className)),i=m.onLabelCreate.call(i,o,t),L.has.label(e)?L.debug("User selection already exists, skipping",o):(m.label.variation&&i.addClass(m.label.variation),!0===n?(L.debug("Animating in label",i),i.addClass(p.hidden).insertBefore(a).transition({animation:m.label.transition,debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.label.duration})):(L.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=A.children(b.message),e=m.templates.message(L.add.variables(e));0<t.length?t.html(e):Z("<div/>").html(e).addClass(p.message).appendTo(A)},optionValue:function(e){var t=L.escape.value(e);0<D.find('option[value="'+L.escape.string(t)+'"]').length||(L.disconnect.selectObserver(),L.is.single()&&(L.verbose("Removing previous user addition"),D.find("option."+p.addition).remove()),Z("<option/>").prop("value",t).addClass(p.addition).text(e).appendTo(D),L.verbose("Adding user addition as an <option>",e),L.observe.select())},userSuggestion:function(e){var t=A.children(b.addition),n=L.get.item(e),n=n&&n.not(b.addition).length,i=0<t.length;m.useLabels&&L.has.maxSelections()||(""===e||n?t.remove():(i?(t.data(v.value,e).data(v.text,e).attr("data-"+v.value,e).attr("data-"+v.text,e).removeClass(p.filtered),m.hideAdditions||(n=m.templates.addition(L.add.variables(g.addResult,e)),t.html(n)),L.verbose("Replacing user suggestion with new value",t)):((t=L.create.userChoice(e)).prependTo(A),L.verbose("Adding item choice to menu corresponding with user choice addition",t)),m.hideAdditions&&!L.is.allFiltered()||t.addClass(p.selected).siblings().removeClass(p.selected),L.refreshItems()))},variables:function(e,t){var n=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),a=-1!==e.search("{term}");return L.verbose("Adding templated variables to message",e),n&&(e=e.replace("{count}",L.get.selectionCount())),i&&(e=e.replace("{maxCount}",m.maxSelections)),a&&(n=t||L.get.query(),e=e.replace("{term}",n)),e},value:function(e,t,n,i){"boolean"==typeof t&&(i=t,t=n=ne);var a,o=L.get.values(!0);L.has.value(e)?L.debug("Value already selected"):""===e?L.debug("Cannot select blank values from multiselect"):(a=Array.isArray(o)?(a=n&&n.hasClass(p.actionable)?o:o.concat([e]),L.get.uniqueArray(a)):[e],L.has.selectInput()?L.can.extendSelect()&&(L.debug("Adding value to select",e,a,D),L.add.optionValue(e)):(a=a.join(m.delimiter),L.debug("Setting hidden input to delimited value",a,D)),!1===m.fireOnInit&&L.is.initialLoad()?L.verbose("Skipping onadd callback on initial load",m.onAdd):m.onAdd.call(P,e,t,n),L.set.value(a,t,n,i),L.check.maxSelections())}},remove:{active:function(){x.removeClass(p.active)},activeLabel:function(){x.find(b.label).removeClass(p.active)},empty:function(){x.removeClass(p.empty)},loading:function(){x.removeClass(p.loading)},initialLoad:function(){e=!1},upward:function(e){(e||x).removeClass(p.upward)},leftward:function(e){(e||A).removeClass(p.leftward)},visible:function(){x.removeClass(p.visible)},activeItem:function(){E.removeClass(p.active)},filteredItem:function(){m.useLabels&&L.has.maxSelections()||((m.useLabels&&L.is.multiple()?E.not("."+p.active):E).removeClass(p.filtered),m.hideDividers&&M.removeClass(p.hidden),L.remove.empty())},optionValue:function(e){var e=L.escape.value(e),t=D.find('option[value="'+L.escape.string(e)+'"]');0<t.length&&t.hasClass(p.addition)&&(L.disconnect.selectObserver(),t.remove(),L.verbose("Removing user addition as an <option>",e),L.observe.select())},message:function(){A.children(b.message).remove()},searchWidth:function(){k.css("width","")},searchTerm:function(){L.verbose("Cleared search term"),k.val(""),L.set.filtered()},userAddition:function(){E.filter(b.addition).remove()},selected:function(e,t,i){if(!(t=m.allowAdditions?t||L.get.itemWithAdditions(e):t||L.get.item(e)))return!1;t.each(function(){var e=Z(this),t=L.get.choiceText(e),n=L.get.choiceValue(e,t);L.is.multiple()?m.useLabels?(L.remove.value(n,t,e,i),L.remove.label(n)):(L.remove.value(n,t,e,i),0===L.get.selectionCount()?L.set.placeholderText():L.set.text(L.add.variables(g.count))):L.remove.value(n,t,e,i),e.removeClass(p.filtered).removeClass(p.active),m.useLabels&&e.removeClass(p.selected)})},selectedItem:function(){E.removeClass(p.selected)},value:function(e,t,n,i){var a,o=L.get.values(!0);L.has.selectInput()?(L.verbose("Input is <select> removing selected option",e),a=L.remove.arrayValue(e,o),L.remove.optionValue(e)):(L.verbose("Removing from delimited values",e),a=(a=L.remove.arrayValue(e,o)).join(m.delimiter)),!1===m.fireOnInit&&L.is.initialLoad()?L.verbose("No callback on initial load",m.onRemove):m.onRemove.call(P,e,t,n),L.set.value(a,t,n,i),L.check.maxSelections()},arrayValue:function(t,e){return Array.isArray(e)||(e=[e]),e=Z.grep(e,function(e){return t!=e}),L.verbose("Removed value from delimited string",t,e),e},label:function(e,t){e=L.escape.value(e),e=x.find(b.label).filter("[data-"+v.value+'="'+L.escape.string(m.ignoreCase?e.toLowerCase():e)+'"]');L.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||x.find(b.label).filter("."+p.active),L.verbose("Removing active label selections",e),L.remove.labels(e)},labels:function(e,a){e=e||x.find(b.label),L.verbose("Removing labels",e),e.each(function(){var e=Z(this),t=e.data(v.value),n=t!==ne?String(t):t,i=L.is.userValue(n);!1===m.onLabelRemove.call(e,t)?L.debug("Label remove callback cancelled removal"):(L.remove.message(),i?(L.remove.value(n,n,L.get.item(n),a),L.remove.label(n)):L.remove.selected(n,!1,a))})},tabbable:function(){(L.is.searchSelection()?(L.debug("Searchable dropdown initialized"),k):(L.debug("Simple selection dropdown initialized"),x)).removeAttr("tabindex"),A.removeAttr("tabindex")},diacritics:function(e){return m.ignoreDiacritics?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}},has:{menuSearch:function(){return L.has.search()&&0<k.closest(A).length},clearItem:function(){return 0<H.length},search:function(){return 0<k.length},sizer:function(){return 0<T.length},selectInput:function(){return D.is("select")},minCharacters:function(e){return m.minCharacters&&!O?(e=e!==ne?String(e):String(L.get.query())).length>=m.minCharacters:!(O=!1)},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=L.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<D.length},items:function(){return 0<E.length},menu:function(){return 0<A.length},subMenu:function(e){return 0<(e||A).find(b.menu).length},message:function(){return 0!==A.children(b.message).length},label:function(e){var e=L.escape.value(e),t=x.find(b.label);return m.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+v.value+'="'+L.escape.string(e)+'"]').length},maxSelections:function(){return m.maxSelections&&L.get.selectionCount()>=m.maxSelections},allResultsFiltered:function(){var e=E.not(b.addition);return e.filter(b.unselectable).length===e.length},userSuggestion:function(){return 0<A.children(b.addition).length},query:function(){return""!==L.get.query()},value:function(e){return m.ignoreCase?L.has.valueIgnoringCase(e):L.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=L.get.values(!0);return!!(Array.isArray(t)?t&&-1!==Z.inArray(e,t):t==e)},valueIgnoringCase:function(n){var e=L.get.values(!0),i=!1;return Array.isArray(e)||(e=[e]),Z.each(e,function(e,t){if(String(n).toLowerCase()==String(t).toLowerCase())return!(i=!0)}),i}},is:{active:function(){return x.hasClass(p.active)},animatingInward:function(){return A.transition("is inward")},animatingOutward:function(){return A.transition("is outward")},bubbledLabelClick:function(e){return Z(e.target).is("select, input")&&0<x.closest("label").length},bubbledIconClick:function(e){return 0<Z(e.target).closest(N).length},edge:function(){return!!ee.chrome&&!!ee.StyleMedia},empty:function(){return x.hasClass(p.empty)},chrome:function(){return!!ee.chrome&&!ee.StyleMedia},alreadySetup:function(){return x.is("select")&&x.parent(b.dropdown).data(y)!==ne&&0===x.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):A.transition&&A.transition("is animating")},leftward:function(e){return(e||A).hasClass(p.leftward)},clearable:function(){return x.hasClass(p.clearable)||m.clearable},disabled:function(){return x.hasClass(p.disabled)},focused:function(){return te.activeElement===x[0]},focusedOnSearch:function(){return te.activeElement===k[0]},allFiltered:function(){return(L.is.multiple()||L.has.search())&&!(!m.hideAdditions&&L.has.userSuggestion())&&!L.has.message()&&L.has.allResultsFiltered()},hidden:function(e){return!L.is.visible(e)},initialLoad:function(){return e},inObject:function(n,e){var i=!1;return Z.each(e,function(e,t){if(t==n)return i=!0}),i},multiple:function(){return x.hasClass(p.multiple)},remote:function(){return m.apiSettings&&L.can.useAPI()},noApiCache:function(){return m.apiSettings&&!m.apiSettings.cache},single:function(){return!L.is.multiple()},selectMutation:function(e){var n=!1;return Z.each(e,function(e,t){if(Z(t.target).is("select, option, optgroup")||Z(t.addedNodes).is("select"))return!(n=!0)}),n},search:function(){return x.hasClass(p.search)},searchSelection:function(e){return L.has.search()&&1===(e?k.parents(b.dropdown):k.parent(b.dropdown)).length},selection:function(){return x.hasClass(p.selection)},userValue:function(e){return-1!==Z.inArray(e,L.get.userValues())},upward:function(e){return(e||x).hasClass(p.upward)},visible:function(e){return(e||A).hasClass(p.visible)},verticallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=w[0]!==ee&&w.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return m.useLabels||!L.has.maxSelections()||L.has.maxSelections()&&e.hasClass(p.active)},openDownward:function(e){var t,e=e||A;return e.addClass(p.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollTop:w.scrollTop(),height:w.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},L.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),L.has.subMenu(e)&&(t.menu.height+=e.find(b.menu).first().outerHeight()),t=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(L.verbose("Dropdown can fit in context downward",t),!0):t.above?(L.verbose("Dropdown cannot fit below, opening upward",t),!1):(L.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(p.loading),t},openRightward:function(e){var t,e=e||A,n=!0;return e.addClass(p.loading),t={context:{offset:w[0]===ee?{top:0,left:0}:w.offset(),scrollLeft:w.scrollLeft(),width:w.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},L.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(L.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(p.loading),n},extendSelect:function(){return m.allowAdditions||m.apiSettings},show:function(){return!L.is.disabled()&&(L.has.items()||L.has.message())},useAPI:function(){return Z.fn.api!==ne}},animate:{show:function(e,t){var n=t||A,i=t?function(){}:function(){L.hideSubMenus(),L.hideOthers(),L.set.active()};e=Z.isFunction(e)?e:function(){},L.verbose("Doing menu show animation",n),L.set.direction(t),t=m.transition.showMethod||L.get.transition(t),L.is.selection()&&L.set.scrollPosition(L.get.selectedItem(),!0),(L.is.hidden(n)||L.is.animating(n))&&("none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("show"),e.call(P)):Z.fn.transition!==ne&&x.transition("is supported")?n.transition({animation:t+" in",debug:m.debug,verbose:m.verbose,silent:m.silent,duration:m.transition.showDuration||m.duration,queue:!0,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.noTransition,t))},hide:function(e,t){var n=t||A,i=t?function(){}:function(){L.unbind.intent(),L.remove.active()},t=m.transition.hideMethod||L.get.transition(t);e=Z.isFunction(e)?e:function(){},(L.is.visible(n)||L.is.animating(n))&&(L.verbose("Doing menu hide animation",n),"none"===t?(i(),n.transition({displayType:L.get.displayType()}).transition("hide"),e.call(P)):Z.fn.transition!==ne&&x.transition("is supported")?n.transition({animation:t+" out",duration:m.transition.hideDuration||m.duration,debug:m.debug,verbose:m.verbose,silent:m.silent,queue:!1,onStart:i,displayType:L.get.displayType(),onComplete:function(){e.call(P)}}):L.error(u.transition))}},hideAndClear:function(){L.remove.searchTerm(),L.has.maxSelections()||(L.has.search()?L.hide(function(){L.remove.filteredItem()}):L.hide())},delay:{show:function(){L.verbose("Delaying show event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.show,m.delay.show)},hide:function(){L.verbose("Delaying hide event to ensure user intent"),clearTimeout(L.timer),L.timer=setTimeout(L.hide,m.delay.hide)}},escape:{value:function(e){var t=Array.isArray(e),n="string"==typeof e,i=!n&&!t,n=n&&-1!==e.search(c.quote),a=[];return i||!n?e:(L.debug("Encoding quote values for use in select",e),t?(Z.each(e,function(e,t){a.push(t.replace(c.quote,"""))}),a):e.replace(c.quote,"""))},string:function(e){return(e=String(e)).replace(c.escape,"\\$&")},htmlEntities:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e}},setting:function(e,t){if(L.debug("Changing setting",e,t),Z.isPlainObject(e))Z.extend(!0,m,e);else{if(t===ne)return m[e];Z.isPlainObject(m[e])?Z.extend(!0,m[e],t):m[e]=t}},internal:function(e,t){if(Z.isPlainObject(e))Z.extend(!0,L,e);else{if(t===ne)return L[e];L[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?L.performance.log(arguments):(L.debug=Function.prototype.bind.call(console.info,console,m.name+":"),L.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?L.performance.log(arguments):(L.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),L.verbose.apply(console,arguments)))},error:function(){m.silent||(L.error=Function.prototype.bind.call(console.error,console,m.name+":"),L.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(Q||t),Q=t,X.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:P,"Execution Time":n})),clearTimeout(L.performance.timer),L.performance.timer=setTimeout(L.performance.display,500)},display:function(){var e=m.name+":",n=0;Q=!1,clearTimeout(L.performance.timer),Z.each(X,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",K&&(e+=" '"+K+"'"),(console.group!==ne||console.table!==ne)&&0<X.length&&(console.groupCollapsed(e),console.table?console.table(X):Z.each(X,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),X=[]}},invoke:function(i,e,t){var a,o,n,r=R;return e=e||_,t=t||P,"string"==typeof i&&r!==ne&&(i=i.split(/[\. ]/),a=i.length-1,Z.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(Z.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==ne)return o=r[n],!1;{if(!Z.isPlainObject(r[t])||e==a)return r[t]!==ne?o=r[t]:L.error(u.method,i),!1;r=r[t]}}})),Z.isFunction(o)?n=o.apply(t,e):o!==ne&&(n=o),Array.isArray(W)?W.push(n):W!==ne?W=[W,n]:n!==ne&&(W=n),o}};J?(R===ne&&L.initialize(),L.invoke(G)):(R!==ne&&R.invoke("destroy"),L.initialize())}),W!==ne?W:B},Z.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:ee,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:"exact",ignoreDiacritics:!1,hideDividers:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!1,allowAdditions:!1,ignoreCase:!1,ignoreSearchCase:!0,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!1,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,displayType:!1,glyphWidth:1.037,headerDivider:!0,collapseOnActionable:!0,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onActionable:function(e,t,n){},onSearch:function(e){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return Z(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",noNormalize:'"ignoreDiacritics" setting will be ignored. Browser does not support String().normalize(). You may consider including <https://cdn.jsdelivr.net/npm/unorm@1.4.1/lib/unorm.min.js> as a polyfill.'},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",description:"description",descriptionVertical:"descriptionVertical",value:"value",text:"text",type:"type",image:"image",imageClass:"imageClass",icon:"icon",iconClass:"iconClass",class:"class",divider:"divider",actionable:"actionable"},keys:{backspace:8,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",divider:".divider, .header",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> span.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered",clearIcon:"> .remove.icon"},className:{active:"active",addition:"addition",animating:"animating",description:"description",descriptionVertical:"vertical",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",icon:"icon",image:"image",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",text:"text",upward:"upward",leftward:"left",visible:"visible",clearable:"clearable",noselection:"noselection",delete:"delete",header:"header",divider:"divider",groupIcon:"",unfilterable:"unfilterable",actionable:"actionable"}},Z.fn.dropdown.settings.templates={deQuote:function(e,t){return String(e).replace(/"/g,t?""":"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e},dropdown:function(e,t,n,i){var a=e.placeholder||!1,o="",r=Z.fn.dropdown.settings.templates.escape,s=Z.fn.dropdown.settings.templates.deQuote;return o=(o=(o=(o+='<i class="dropdown icon"></i>')+(a?'<div class="default text">'+r(a,n)+"</div>":'<div class="text"></div>'))+('<div class="'+s(i.menu)+'">'))+Z.fn.dropdown.settings.templates.menu(e,t,n,i)+"</div>"},menu:function(e,c,u,d){var e=e[c.values]||[],f="",m=Z.fn.dropdown.settings.templates.escape,p=Z.fn.dropdown.settings.templates.deQuote;return Z.each(e,function(e,t){var n,i,a,o,r,s=t[c.type]||"item",l=-1!==s.indexOf("menu");"item"===s||l?(n=t[c.text]?' data-text="'+p(t[c.text],!0)+'"':"",o=t[c.actionable]?d.actionable+" ":"",r=t[c.disabled]?d.disabled+" ":"",i=t[c.descriptionVertical]?d.descriptionVertical+" ":"",a=""!=m(t[c.description]||"",u),f+='<div class="'+p(o+r+i+(t[c.class]||d.item))+'" data-value="'+p(t[c.value],!0)+'"'+n+">",l&&(f+='<i class="'+(-1!==s.indexOf("left")?"left":"")+' dropdown icon"></i>'),t[c.image]&&(f+='<img class="'+p(t[c.imageClass]||d.image)+'" src="'+p(t[c.image])+'">'),t[c.icon]&&(f+='<i class="'+p(t[c.icon]+" "+(t[c.iconClass]||d.icon))+'"></i>'),a&&(f=(f+='<span class="'+p(d.description)+'">'+m(t[c.description]||"",u)+"</span>")+(l?"":'<span class="'+p(d.text)+'">')),l&&(f+='<span class="'+p(d.text)+'">'),f+=m(t[c.name]||"",u),l?f=(f=(f+="</span>")+'<div class="'+p(s)+'">')+Z.fn.dropdown.settings.templates.menu(t,c,u,d)+"</div>":a&&(f+="</span>"),f+="</div>"):"header"===s&&(o=m(t[c.name]||"",u),r=p(t[c.icon]||d.groupIcon),""===o&&""===r||(f+='<div class="'+p(t[c.class]||d.header)+'">',""!==r&&(f+='<i class="'+p(r+" "+(t[c.iconClass]||d.icon))+'"></i>'),f=f+o+"</div>"),t[c.divider])&&(f+='<div class="'+p(d.divider)+'"></div>')}),f},label:function(e,t,n,i){var a=Z.fn.dropdown.settings.templates.escape,o=Z.fn.dropdown.settings.templates.deQuote;return a(t,n)+'<i class="'+o(i.delete)+' icon"></i>'},message:function(e){return e},addition:function(e){return e}}}(jQuery,window,document),function(I,R,L,V){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.form=function(k){var T,D=I(this),S=D.selector||"",A=(new Date).getTime(),E=[],M=k,F=arguments[1],O="string"==typeof M,P=[].slice.call(arguments,1);return D.each(function(){var n,d,t,e,f,l,m,p,g,i,c,a,o,s,u,h=I(this),v=this,b=[],y=!1,r=!1,x=!1,w=["clean","clean"],C={initialize:function(){C.get.settings(),O?(u===V&&C.instantiate(),C.invoke(M)):(u!==V&&(u.invoke("destroy"),C.refresh()),C.verbose("Initializing form validation",h,f),C.bindEvents(),C.set.defaults(),f.autoCheckRequired&&C.set.autoCheck(),C.instantiate())},instantiate:function(){C.verbose("Storing instance of module",C),u=C,h.data(o,C)},destroy:function(){C.verbose("Destroying previous module",u),C.removeEvents(),h.removeData(o)},refresh:function(){C.verbose("Refreshing selector cache"),n=h.find(p.field),d=h.find(p.group),t=h.find(p.message),h.find(p.prompt),e=h.find(p.submit),h.find(p.clear),h.find(p.reset)},refreshEvents:function(){C.removeEvents(),C.bindEvents()},submit:function(){C.verbose("Submitting form",h),r=!0,h.submit()},attachEvents:function(e,t){t=t||"submit",I(e).on("click"+s,function(e){C[t](),e.preventDefault()})},bindEvents:function(){C.verbose("Attaching form events"),h.on("submit"+s,C.validate.form).on("blur"+s,p.field,C.event.field.blur).on("click"+s,p.submit,C.submit).on("click"+s,p.reset,C.reset).on("click"+s,p.clear,C.clear),f.keyboardShortcuts&&h.on("keydown"+s,p.field,C.event.field.keydown),n.each(function(e,t){var t=I(t),n=t.prop("type"),n=C.get.changeEvent(n,t);t.on(n+s,C.event.field.change)}),f.preventLeaving&&I(R).on("beforeunload"+s,C.event.beforeUnload),n.on("change click keyup keydown blur",function(e){C.determine.isDirty()}),h.on("dirty"+s,function(e){f.onDirty.call()}),h.on("clean"+s,function(e){f.onClean.call()})},clear:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(d),a=i.find(p.prompt),o=t.closest(p.uiCalendar),r=t.data(m.defaultValue)||"",s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<o.length&&C.can.useElement("calendar");i.hasClass(g.error)&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),a.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("clear",!0)):s?t.prop("checked",!1):c?o.calendar("clear"):(C.verbose("Resetting field value",t,r),t.val(""))}),C.remove.states()},reset:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=t.closest(d),a=t.closest(p.uiCalendar),o=i.find(p.prompt),r=t.data(m.defaultValue),s=n.is(p.uiCheckbox),l=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),c=0<a.length&&C.can.useElement("calendar"),u=i.hasClass(g.error);r!==V&&(u&&(C.verbose("Resetting error on field",i),i.removeClass(g.error),o.remove()),l?(C.verbose("Resetting dropdown value",n,r),n.dropdown("restore defaults",!0)):s?(C.verbose("Resetting checkbox value",n,r),t.prop("checked",r)):c?a.calendar("set date",r):(C.verbose("Resetting field value",t,r),t.val(r)))}),C.remove.states()},determine:{isValid:function(){var n=!0;return I.each(l,function(e,t){C.validate.field(t,e,!0)||(n=!1)}),n},isDirty:function(e){var i=!1;n.each(function(e,t){var t=I(t),n=0<t.filter(p.checkbox).length?C.is.checkboxDirty(t):C.is.fieldDirty(t);t.data(f.metadata.isDirty,n),i|=n}),i?C.set.dirty():C.set.clean()}},is:{bracketedRule:function(e){return e.type&&e.type.match(f.regExp.bracket)},shorthandRules:function(e){return"string"==typeof e||Array.isArray(e)},empty:function(e){return!e||0===e.length||(e.is(p.checkbox)?!e.is(":checked"):C.is.blank(e))},blank:function(e){return""===String(e.val()).trim()},valid:function(e,n){var i=!0;return e?(C.verbose("Checking if field is valid",e),C.validate.field(l[e],e,!!n)):(C.verbose("Checking if form is valid"),I.each(l,function(e,t){C.is.valid(e,n)||(i=!1)}),i)},dirty:function(){return x},clean:function(){return!x},fieldDirty:function(e){var t=e.data(m.defaultValue),e=(null==t?t="":Array.isArray(t)&&(t=t.toString()),e.val()),n=(null==e?e="":Array.isArray(e)&&(e=e.toString()),/^(true|false)$/i);return n.test(t)&&n.test(e)?!new RegExp("^"+t+"$","i").test(e):e!==t},checkboxDirty:function(e){return e.data(m.defaultValue)!==e.is(":checked")},justDirty:function(){return"dirty"===w[0]},justClean:function(){return"clean"===w[0]}},removeEvents:function(){h.off(s),n.off(s),e.off(s)},event:{field:{keydown:function(e){var t=I(this),n=e.which,i=t.is(p.input),a=t.is(p.checkbox),o=0<t.closest(p.uiDropdown).length,r=13;n==27&&(C.verbose("Escape key pressed blurring field"),t[0].blur()),e.ctrlKey||n!=r||!i||o||a||(y||(t.one("keyup"+s,C.event.field.keyup),C.submit(),C.debug("Enter pressed on input submitting form"),e.preventDefault()),y=!0)},keyup:function(){y=!1},blur:function(e){var t=I(this),n=t.closest(d),i=C.get.validation(t);i&&("blur"==f.on||n.hasClass(g.error)&&f.revalidate)&&(C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0))},change:function(e){var t=I(this),n=t.closest(d),i=C.get.validation(t);i&&("change"==f.on||n.hasClass(g.error)&&f.revalidate)&&(clearTimeout(C.timer),C.timer=setTimeout(function(){C.debug("Revalidating field",t,i),C.validate.field(i),f.inline||C.validate.form(!1,!0)},f.delay))}},beforeUnload:function(e){if(C.is.dirty()&&!r)return(e=e||R.event)&&(e.returnValue=f.text.leavingMessage),f.text.leavingMessage}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!C.is.bracketedRule(e))&&(e.value!==V?e.value:e.type.match(f.regExp.bracket)[1]+"")},ruleName:function(e){return C.is.bracketedRule(e)?e.type.replace(e.type.match(f.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":C.get.inputEvent()},inputEvent:function(){return L.createElement("input").oninput!==V?"input":L.createElement("input").onpropertychange!==V?"propertychange":"keyup"},fieldsFromShorthand:function(e){var i={};return I.each(e,function(n,e){Array.isArray(e)||"object"!=typeof e?("string"==typeof e&&(e=[e]),i[n]={rules:[]},I.each(e,function(e,t){i[n].rules.push({type:t})})):i[n]=e}),i},prompt:function(e,t){var n,i=C.get.ruleName(e),a=C.get.ancillaryValue(e),o=C.get.field(t.identifier),r=o.val(),r=I.isFunction(e.prompt)?e.prompt(r):e.prompt||f.prompt[i]||f.text.unspecifiedRule,s=-1!==r.search("{value}"),l=-1!==r.search("{name}");return a&&0<=["integer","decimal","number"].indexOf(i)&&0<=a.indexOf("..")&&(n=a.split("..",2),e.prompt||(r+=(""===n[0]?f.prompt.maxValue.replace(/\{ruleValue\}/g,"{max}"):""===n[1]?f.prompt.minValue.replace(/\{ruleValue\}/g,"{min}"):f.prompt.range).replace(/\{name\}/g," "+f.text.and)),r=(r=r.replace(/\{min\}/g,n[0])).replace(/\{max\}/g,n[1])),s&&(r=r.replace(/\{value\}/g,o.val())),l&&(s=1==(n=o.closest(p.group).find("label").eq(0)).length?n.text():o.prop("placeholder")||f.text.unspecifiedField,r=r.replace(/\{name\}/g,s)),r=(r=r.replace(/\{identifier\}/g,t.identifier)).replace(/\{ruleValue\}/g,a),e.prompt||C.verbose("Using default validation prompt for type",r,i),r},settings:function(){var e;I.isPlainObject(k)?0<(e=Object.keys(k)).length&&k[e[0]].identifier!==V&&k[e[0]].rules!==V?(f=I.extend(!0,{},I.fn.form.settings,F),l=I.extend(!0,{},I.fn.form.settings.defaults,k),C.error(f.error.oldSyntax,v),C.verbose("Extending settings from legacy parameters",l,f)):(k.fields&&(k.fields=C.get.fieldsFromShorthand(k.fields)),f=I.extend(!0,{},I.fn.form.settings,k),l=I.extend(!0,{},I.fn.form.settings.defaults,f.fields),C.verbose("Extending settings",l,f)):(f=I.extend(!0,{},I.fn.form.settings),l=I.extend(!0,{},I.fn.form.settings.defaults),C.verbose("Using default form validation",l,f)),a=f.namespace,m=f.metadata,p=f.selector,g=f.className,i=f.regExp,c=f.error,o="module-"+a,s="."+a,((u=h.data(o))||C).refresh()},field:function(e){var t;return C.verbose("Finding field with identifier",e),e=C.escape.string(e),0<(t=n.filter("#"+e)).length||0<(t=n.filter('[name="'+e+'"]')).length||0<(t=n.filter('[name="'+e+'[]"]')).length||0<(t=n.filter("[data-"+m.validate+'="'+e+'"]')).length?t:(C.error(c.noField.replace("{identifier}",e)),I("<input/>"))},fields:function(e){var n=I();return I.each(e,function(e,t){n=n.add(C.get.field(t))}),n},validation:function(i){var a,o;return l&&(I.each(l,function(e,n){o=n.identifier||e,I.each(C.get.field(o),function(e,t){if(t==i[0])return n.identifier=o,a=n,!1})}),a)||!1},value:function(e){var t=[];return t.push(e),C.get.values.call(v,t)[e]},values:function(e){var e=Array.isArray(e)?C.get.fields(e):n,d={};return e.each(function(e,t){var t=I(t),n=t.closest(p.uiCalendar),i=t.prop("name"),a=t.val(),o=t.is(p.checkbox),r=t.is(p.radio),s=-1!==i.indexOf("[]"),l=0<n.length&&C.can.useElement("calendar"),t=!!o&&t.is(":checked");if(i)if(s)i=i.replace("[]",""),d[i]||(d[i]=[]),o?t?d[i].push(a||!0):d[i].push(!1):d[i].push(a);else if(r)d[i]!==V&&!1!==d[i]||(d[i]=!!t&&(a||!0));else if(o)d[i]=!!t&&(a||!0);else if(l){var c=n.calendar("get date");if(null!==c){if("date"==f.dateHandling)d[i]=c;else if("input"==f.dateHandling)d[i]=n.calendar("get input date");else if("formatter"==f.dateHandling){var u=n.calendar("setting","type");switch(u){case"date":d[i]=f.formatter.date(c);break;case"datetime":d[i]=f.formatter.datetime(c);break;case"time":d[i]=f.formatter.time(c);break;case"month":d[i]=f.formatter.month(c);break;case"year":d[i]=f.formatter.year(c);break;default:C.debug("Wrong calendar mode",n,u),d[i]=""}}}else d[i]=""}else d[i]=a}),d},dirtyFields:function(){return n.filter(function(e,t){return I(t).data(m.isDirty)})}},has:{field:function(e){return C.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=C.escape.string(e))&&C.error(c.identifier,e),0<n.filter("#"+e).length||0<n.filter('[name="'+e+'"]').length||0<n.filter("[data-"+m.validate+'="'+e+'"]').length}},can:{useElement:function(e){return I.fn[e]!==V||(C.error(c.noElement.replace("{element}",e)),!1)}},escape:{string:function(e){return(e=String(e)).replace(i.escape,"\\$&")}},add:{rule:function(e,t){C.add.field(e,t)},field:function(n,e){l[n]!==V&&l[n].rules!==V||(l[n]={rules:[]});var i={rules:[]};C.is.shorthandRules(e)?(e=Array.isArray(e)?e:[e],I.each(e,function(e,t){i.rules.push({type:t})})):i.rules=e.rules,I.each(i.rules,function(e,t){0==I.grep(l[n].rules,function(e){return e.type==t.type}).length&&l[n].rules.push(t)}),C.debug("Adding rules",i.rules,l),C.refreshEvents()},fields:function(e){l=I.extend(!0,{},l,C.get.fieldsFromShorthand(e)),C.refreshEvents()},prompt:function(e,t,n){var i=C.get.field(e).closest(d),a=i.children(p.prompt),o=0!==a.length;t="string"==typeof t?[t]:t,C.verbose("Adding field error state",e),n||i.addClass(g.error),f.inline&&(o||(a=I("<div/>").addClass(g.label)).appendTo(i),a.html(f.templates.prompt(t)),o?C.verbose("Inline errors are disabled, no inline error added",e):f.transition&&C.can.useElement("transition")&&h.transition("is supported")?(C.verbose("Displaying error with css transition",f.transition),a.transition(f.transition+" in",f.duration)):(C.verbose("Displaying error with fallback javascript animation"),a.fadeIn(f.duration)))},errors:function(e){C.debug("Adding form error messages",e),C.set.error(),t.html(f.templates.error(e))}},remove:{errors:function(){C.debug("Removing form error messages"),t.empty()},states:function(){h.removeClass(g.error).removeClass(g.success),f.inline||C.remove.errors(),C.determine.isDirty()},rule:function(n,e){var i=Array.isArray(e)?e:[e];l[n]!==V&&Array.isArray(l[n].rules)&&(e===V?(C.debug("Removed all rules"),l[n].rules=[]):I.each(l[n].rules,function(e,t){t&&-1!==i.indexOf(t.type)&&(C.debug("Removed rule",t.type),l[n].rules.splice(e,1))}))},field:function(e){e=Array.isArray(e)?e:[e];I.each(e,function(e,t){C.remove.rule(t)}),C.refreshEvents()},rules:function(e,n){Array.isArray(e)?I.each(e,function(e,t){C.remove.rule(t,n)}):C.remove.rule(e,n)},fields:function(e){C.remove.field(e)},prompt:function(e){var t=C.get.field(e).closest(d),n=t.children(p.prompt);t.removeClass(g.error),f.inline&&n.is(":visible")&&(C.verbose("Removing prompt for field",e),f.transition&&C.can.useElement("transition")&&h.transition("is supported")?n.transition(f.transition+" out",f.duration,function(){n.remove()}):n.fadeOut(f.duration,function(){n.remove()}))}},set:{success:function(){h.removeClass(g.error).addClass(g.success)},defaults:function(){n.each(function(e,t){var t=I(t),n=t.parent(),i=0<t.filter(p.checkbox).length,a=n.is(p.uiDropdown)&&C.can.useElement("dropdown"),o=t.closest(p.uiCalendar),r=0<o.length&&C.can.useElement("calendar"),i=i?t.is(":checked"):t.val();a?n.dropdown("save defaults"):r&&o.calendar("refresh"),t.data(m.defaultValue,i),t.data(m.isDirty,!1)})},error:function(){h.removeClass(g.success).addClass(g.error)},value:function(e,t){var n={};return n[e]=t,C.set.values.call(v,n)},values:function(e){I.isEmptyObject(e)||I.each(e,function(e,t){var n,i=C.get.field(e),a=i.parent(),e=i.closest(p.uiCalendar),o=Array.isArray(t),r=a.is(p.uiCheckbox)&&C.can.useElement("checkbox"),s=a.is(p.uiDropdown)&&C.can.useElement("dropdown"),l=i.is(p.radio)&&r,c=0<e.length&&C.can.useElement("calendar");0<i.length&&(o&&r?(C.verbose("Selecting multiple",t,i),a.checkbox("uncheck"),I.each(t,function(e,t){n=i.filter('[value="'+t+'"]'),a=n.parent(),0<n.length&&a.checkbox("check")})):l?(C.verbose("Selecting radio value",t,i),i.filter('[value="'+t+'"]').parent(p.uiCheckbox).checkbox("check")):r?(C.verbose("Setting checkbox value",t,a),!0===t||1===t||"on"===t?a.checkbox("check"):a.checkbox("uncheck"),"string"==typeof t&&i.val(t)):s?(C.verbose("Setting dropdown value",t,a),a.dropdown("set selected",t)):c?e.calendar("set date",t):(C.verbose("Setting field value",t,i),i.val(t)))})},dirty:function(){C.verbose("Setting state dirty"),x=!0,w[0]=w[1],w[1]="dirty",C.is.justClean()&&h.trigger("dirty")},clean:function(){C.verbose("Setting state clean"),x=!1,w[0]=w[1],w[1]="clean",C.is.justDirty()&&h.trigger("clean")},asClean:function(){C.set.defaults(),C.set.clean()},asDirty:function(){C.set.defaults(),C.set.dirty()},autoCheck:function(){C.debug("Enabling auto check on required fields"),n.each(function(e,t){var n=I(t),t=I(t).closest(d),i=0<n.filter(p.checkbox).length,a=n.prop("required")||t.hasClass(g.required)||t.parent().hasClass(g.required),t=n.is(":disabled")||t.hasClass(g.disabled)||t.parent().hasClass(g.disabled),o=C.get.validation(n),r=!!o&&0!==I.grep(o.rules,function(e){return"empty"==e.type}),o=o.identifier||n.attr("id")||n.attr("name")||n.data(m.validate);!a||t||r||o===V||(i?(C.verbose("Adding 'checked' rule on field",o),C.add.rule(o,"checked")):(C.verbose("Adding 'empty' rule on field",o),C.add.rule(o,"empty")))})},optional:function(n,i){i=!1!==i,I.each(l,function(e,t){n!=e&&n!=t.identifier||(t.optional=i)})}},validate:{form:function(e,t){var n,i=C.get.values();if(y)return!1;if(b=[],C.determine.isValid()){if(C.debug("Form has no validation errors, submitting"),C.set.success(),f.inline||C.remove.errors(),!0!==t)return f.onSuccess.call(v,e,i)}else if(C.debug("Form has errors"),r=!1,C.set.error(),f.inline||C.add.errors(b),e&&h.data("moduleApi")!==V&&e.stopImmediatePropagation(),f.errorFocus&&!0!==t&&(e=!0,"string"==typeof f.errorFocus?(e=(n=I(L).find(f.errorFocus)).is("[tabindex]"))||n.attr("tabindex",-1):n=d.filter("."+g.error).first().find(p.field),n.focus(),e||n.removeAttr("tabindex")),!0!==t)return f.onFailure.call(v,b,i)},field:function(i,e,a){a=a===V||a,"string"==typeof i&&(C.verbose("Validating field",i),i=l[e=i]);var o=i.identifier||e,e=C.get.field(o),t=!!i.depends&&C.get.field(i.depends),r=!0,s=[];return i.identifier||(C.debug("Using field name as identifier",o),i.identifier=o),!e.filter(":not(:disabled)").length?C.debug("Field is disabled. Skipping",o):i.optional&&C.is.blank(e)?C.debug("Field is optional and blank. Skipping",o):i.depends&&C.is.empty(t)?C.debug("Field depends on another value that is not present or empty. Skipping",t):i.rules!==V&&(a&&e.closest(d).removeClass(g.error),I.each(i.rules,function(e,t){var n;C.has.field(o)&&0<(n=C.validate.rule(i,t,!0)||[]).length&&(C.debug("Field is invalid",o,t.type),s.push(C.get.prompt(t,i)),r=!1,a)&&I(n).closest(d).addClass(g.error)})),r?(a&&(C.remove.prompt(o,s),f.onValid.call(e)),!0):(a&&(b=b.concat(s),C.add.prompt(o,s,!0),f.onInvalid.call(e,s)),!1)},rule:function(e,n,t){function i(e){var t=(t=(l?I(e).filter(":checked"):I(e)).val())===V||""===t||null===t?"":f.shouldTrim&&!1!==n.shouldTrim||n.shouldTrim?String(t+"").trim():String(t+"");return r.call(e,t,a,h)}var e=C.get.field(e.identifier),a=C.get.ancillaryValue(n),o=C.get.ruleName(n),r=f.rules[o],s=[],l=e.is(p.checkbox);if(I.isFunction(r))return l?i(e)||(s=e):I.each(e,function(e,t){i(t)||s.push(t)}),t?s:!(0<s.length);C.error(c.noRule,o)}},setting:function(e,t){if(I.isPlainObject(e))I.extend(!0,f,e);else{if(t===V)return f[e];f[e]=t}},internal:function(e,t){if(I.isPlainObject(e))I.extend(!0,C,e);else{if(t===V)return C[e];C[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,f.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),C.verbose.apply(console,arguments)))},error:function(){f.silent||(C.error=Function.prototype.bind.call(console.error,console,f.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(A||t),A=t,E.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:v,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){var e=f.name+":",n=0;A=!1,clearTimeout(C.performance.timer),I.each(E,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",S&&(e+=" '"+S+"'"),1<D.length&&(e+=" ("+D.length+")"),(console.group!==V||console.table!==V)&&0<E.length&&(console.groupCollapsed(e),console.table?console.table(E):I.each(E,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),E=[]}},invoke:function(i,e,t){var a,o,n,r=u;return e=e||P,t=t||v,"string"==typeof i&&r!==V&&(i=i.split(/[\. ]/),a=i.length-1,I.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(I.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==V)return o=r[n],!1;{if(!I.isPlainObject(r[t])||e==a)return r[t]!==V&&(o=r[t]),!1;r=r[t]}}})),I.isFunction(o)?n=o.apply(t,e):o!==V&&(n=o),Array.isArray(T)?T.push(n):T!==V?T=[T,n]:n!==V&&(T=n),o}};C.initialize()}),T!==V?T:this},I.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,shouldTrim:!0,transition:"scale",duration:200,autoCheckRequired:!1,preventLeaving:!1,errorFocus:!0,dateHandling:"date",onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},onDirty:function(){},onClean:function(){},metadata:{defaultValue:"default",validate:"validate",isDirty:"isDirty"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|:,=@]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{and:"and",unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field",leavingMessage:"There are unsaved changes on this page which will be discarded if you continue."},prompt:{range:"{name} must be in a range from {min} to {max}",maxValue:"{name} must have a maximum value of {ruleValue}",minValue:"{name} must have a minimum value of {ruleValue}",empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:'input:not(.search):not([type="file"]):not([type="reset"]):not([type="button"]):not([type="submit"]), textarea, select',group:".field",input:'input:not([type="file"])',message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown",uiCalendar:".ui.calendar"},className:{error:"error",label:"ui basic red pointing prompt label",pressed:"down",success:"success",required:"required",disabled:"disabled"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically.",noField:"Field identifier {identifier} not found",noElement:"This module requires ui {element}"},templates:{error:function(e){var n='<ul class="list">';return I.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>"},prompt:function(e){var n;return 1===e.length?e[0]:(n='<ul class="ui list">',I.each(e,function(e,t){n+="<li>"+t+"</li>"}),n+="</ul>")}},formatter:{date:function(e){return Intl.DateTimeFormat("en-GB").format(e)},datetime:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},time:function(e){return Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(e)},month:function(e){return Intl.DateTimeFormat("en-GB",{month:"2-digit",year:"numeric"}).format(e)},year:function(e){return Intl.DateTimeFormat("en-GB",{year:"numeric"}).format(e)}},rules:{empty:function(e){return!(e===V||""===e||Array.isArray(e)&&0===e.length)},checked:function(){return 0<I(this).filter(":checked").length},email:function(e){return I.fn.form.settings.regExp.email.test(e)},url:function(e){return I.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){var n,i;return t instanceof RegExp?e.match(t):((n=t.match(I.fn.form.settings.regExp.flags))&&(t=2<=n.length?n[1]:t,i=3<=n.length?n[2]:""),e.match(new RegExp(t,i)))},minValue:function(e,t){return I.fn.form.settings.rules.range(e,t+"..","number")},maxValue:function(e,t){return I.fn.form.settings.rules.range(e,".."+t,"number")},integer:function(e,t){return I.fn.form.settings.rules.range(e,t,"integer")},range:function(e,t,n){var i,a;return(n="string"==typeof n?I.fn.form.settings.regExp[n]:n)instanceof RegExp||(n=I.fn.form.settings.regExp.integer),t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?n.test(t)&&(i=a=+t):(t=t.split("..",2),n.test(t[0])&&(i=+t[0]),n.test(t[1])&&(a=+t[1]))),n.test(e)&&(i===V||i<=e)&&(a===V||e<=a)},decimal:function(e,t){return I.fn.form.settings.rules.range(e,t,"decimal")},number:function(e,t){return I.fn.form.settings.rules.range(e,t,"number")},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=(t="string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(I.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return e!==V&&e.length>=t},exactLength:function(e,t){return e!==V&&e.length==t},maxLength:function(e,t){return e!==V&&e.length<=t},match:function(e,t,n){var i,a;return 0<(a=n.find('[data-validate="'+t+'"]')).length||0<(a=n.find("#"+t)).length||0<(a=n.find('[name="'+t+'"]')).length?i=a.val():0<(a=n.find('[name="'+t+'[]"]')).length&&(i=a),i!==V&&e.toString()==i.toString()},different:function(e,t,n){var i,a;return 0<(a=n.find('[data-validate="'+t+'"]')).length||0<(a=n.find("#"+t)).length||0<(a=n.find('[name="'+t+'"]')).length?i=a.val():0<(a=n.find('[name="'+t+'[]"]')).length&&(i=a),i!==V&&e.toString()!==i.toString()},creditCard:function(n,e){var i,a={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},o=!1,e="string"==typeof e&&e.split(",");if("string"==typeof n&&0!==n.length){if(n=n.replace(/[\s\-]/g,""),e&&(I.each(e,function(e,t){(i=a[t])&&(i={length:-1!==I.inArray(n.length,i.length),pattern:-1!==n.search(i.pattern)}).length&&i.pattern&&(o=!0)}),!o))return!1;if((e={number:-1!==I.inArray(n.length,a.unionPay.length),pattern:-1!==n.search(a.unionPay.pattern)}).number&&e.pattern)return!0;for(var t=n.length,r=0,s=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],l=0;t--;)l+=s[r][parseInt(n.charAt(t),10)],r^=1;return l%10==0&&0<l}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}}}(jQuery,window,document),function(W,B,$,K){"use strict";W.isFunction=W.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},B=void 0!==B&&B.Math==Math?B:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),W.modal=W.fn.modal=function(P){var I,e=W(this),R=W(B),L=W($),V=W("body"),q=e.selector||"",j=(new Date).getTime(),N=[],H=P,z="string"==typeof H,U=[].slice.call(arguments,1),Y=B.requestAnimationFrame||B.mozRequestAnimationFrame||B.webkitRequestAnimationFrame||B.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var t,a,o,e,i,n,r,s,l,c,u,d=W.isPlainObject(P)?W.extend(!0,{},W.fn.modal.settings,P):W.extend({},W.fn.modal.settings),f=d.selector,m=d.className,p=d.namespace,g=d.fields,h=d.error,v="."+p,b="module-"+p,y=W(this),x=[B,$].indexOf(d.context)<0?L.find(d.context):V,w=x[0]===V[0],C=y.find(f.closeIcon),k=y.hasClass("modal"),T=this,D=k?y.data(b):K,S=!1,A="",E="",M=!1,F=!1,O={initialize:function(){var o;O.create.id(),k||(O.create.modal(),W.isFunction(d.onHidden))||(d.onHidden=function(){O.destroy(),y.remove()}),y.addClass(d.class),""!==d.title&&y.find(f.title).html(O.helpers.escape(d.title,d.preserveHTML)).addClass(d.classTitle),""!==d.content&&y.find(f.content).html(O.helpers.escape(d.content,d.preserveHTML)).addClass(d.classContent),O.has.configActions()&&(0===(o=y.find(f.actions).addClass(d.classActions)).length?o=W("<div/>",{class:m.actions+" "+(d.classActions||"")}).appendTo(y):o.empty(),d.actions.forEach(function(e){var t=e[g.icon]?"<i "+(e[g.text]?'aria-hidden="true"':"")+' class="'+O.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=O.helpers.escape(e[g.text]||"",d.preserveHTML),i=O.helpers.deQuote(e[g.class]||""),a=e[g.click]&&W.isFunction(e[g.click])?e[g.click]:function(){};o.append(W("<button/>",{html:t+n,"aria-label":(e[g.text]||e[g.icon]||"").replace(/<[^>]+(>|$)/g,""),class:m.button+" "+i,click:function(){var e=W(this);e.is(f.approve)||e.is(f.deny)||!1===a.call(T,y)||O.hide()}}))})),O.cache={},O.verbose("Initializing dimmer",x),O.create.dimmer(),d.allowMultiple&&O.create.innerDimmer(),d.centered||y.addClass("top aligned"),O.refreshModals(),O.bind.events(),O.observeChanges(),O.instantiate(),d.autoShow&&O.show()},instantiate:function(){O.verbose("Storing instance of modal"),D=O,y.data(b,D)},create:{modal:function(){var e;y=W("<div/>",{class:m.modal,role:"dialog","aria-modal":!0}),d.closeIcon&&(C=W("<i/>",{class:m.close,role:"button",tabindex:0,"aria-label":d.text.close}),y.append(C)),""!==d.title&&(e="_"+O.get.id()+"title",y.attr("aria-labelledby",e),W("<div/>",{class:m.title,id:e}).appendTo(y)),""!==d.content&&(e="_"+O.get.id()+"desc",y.attr("aria-describedby",e),W("<div/>",{class:m.content,id:e}).appendTo(y)),O.has.configActions()&&W("<div/>",{class:m.actions}).appendTo(y),x.append(y),T=y[0]},dimmer:function(){var e={debug:d.debug,dimmerName:"modals"},e=W.extend(!0,e,d.dimmerSettings);W.fn.dimmer===K?O.error(h.dimmer):(O.debug("Creating dimmer"),i=x.dimmer(e),M=O.is.scrolling(),d.detachable?(O.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):O.set.undetached(),n=i.dimmer("get dimmer"))},id:function(){c=(Math.random().toString(16)+"000000000").slice(2,10),l="."+c,O.verbose("Creating unique id for element",c)},innerDimmer:function(){0===y.find(f.dimmer).length&&W("<div/>",{class:m.innerDimmer}).prependTo(y)}},destroy:function(){u&&u.disconnect(),O.verbose("Destroying previous modal"),y.removeData(b).off(v),R.off(l),n.off(l),C.off(l),t&&t.off(l),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in B&&((u=new MutationObserver(function(e){d.observeChanges&&(O.debug("DOM tree modified, refreshing"),O.refresh()),O.refreshInputs()})).observe(T,{childList:!0,subtree:!0}),O.debug("Setting up mutation observer",u))},refresh:function(){O.remove.scrolling(),O.cacheSizes(),O.can.useFlex()||O.set.modalOffset(),O.set.screenHeight(),O.set.type()},refreshModals:function(){o=y.siblings(f.modal),a=o.add(y)},refreshInputs:function(){t&&t.off("keydown"+l),(t=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===W(this).closest(".disabled").length})).first().on("keydown"+l,O.event.inputKeyDown.first),t.last().on("keydown"+l,O.event.inputKeyDown.last)},attachEvents:function(e,t){var n=W(e);t=W.isFunction(O[t])?O[t]:O.toggle,0<n.length?(O.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):O.error(h.notFound,e)},bind:{events:function(){O.verbose("Attaching events"),y.on("click"+v,f.close,O.event.close).on("click"+v,f.approve,O.event.approve).on("click"+v,f.deny,O.event.deny),C.on("keyup"+l,O.event.closeKeyUp),R.on("resize"+l,O.event.resize)},scrollLock:function(){i[0].addEventListener("touchmove",O.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i[0].removeEventListener("touchmove",O.event.preventScroll,{passive:!1})}},get:{id:function(){return c},element:function(){return y},settings:function(){return d}},event:{approve:function(){S||!1===d.onApprove.call(T,W(this))?O.verbose("Approve callback returned false cancelling hide"):(S=!0,O.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===d.onDeny.call(T,W(this))?O.verbose("Deny callback returned false cancelling hide"):(S=!0,O.hide(function(){S=!1}))},close:function(){O.hide()},closeKeyUp:function(e){e=e.which;e!==d.keys.enter&&e!==d.keys.space||!y.hasClass(m.front)||O.hide()},inputKeyDown:{first:function(e){e.which===d.keys.tab&&e.shiftKey&&(t.last().focus(),e.preventDefault())},last:function(e){e.which!==d.keys.tab||e.shiftKey||(t.first().focus(),e.preventDefault())}},mousedown:function(e){var t=W(e.target),n=O.is.rtl();(r=0<t.closest(f.modal).length)&&O.verbose("Mouse down event registered inside the modal"),(s=O.is.scrolling()&&(!n&&R.outerWidth()-d.scrollbarWidth<=e.clientX||n&&d.scrollbarWidth>=e.clientX))&&O.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(d.closable)if(r)O.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)O.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<W(e.target).closest(f.modal).length,e=W.contains($.documentElement,e.target);if(!t&&e&&O.is.active()&&y.hasClass(m.front)){if(O.debug("Dimmer clicked, hiding all modals"),d.allowMultiple){if(!O.hideAll())return}else if(!O.hide())return;O.remove.clickaway()}}else O.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(O.timer),O.timer=setTimeout(e,t)},keyboard:function(e){e.which===d.keys.escape&&(d.closable?(O.debug("Escape key pressed hiding modal"),y.hasClass(m.front)&&O.hide()):O.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(O.is.animating()||O.is.active())&&Y(O.refresh)}},toggle:function(){O.is.active()||O.is.animating()?O.hide():O.show()},show:function(e){e=W.isFunction(e)?e:function(){},O.refreshModals(),O.set.dimmerSettings(),O.set.dimmerStyles(),O.showModal(e)},hide:function(e){return e=W.isFunction(e)?e:function(){},O.refreshModals(),O.hideModal(e)},showModal:function(e){e=W.isFunction(e)?e:function(){},O.is.animating()||!O.is.active()?!1===d.onShow.call(T)?O.verbose("Show callback returned false cancelling show"):(F=O.has.scrollbar(),O.showDimmer(),O.cacheSizes(),F&&O.set.bodyMargin(),O.can.useFlex()?O.remove.legacy():(O.set.legacy(),O.set.modalOffset(),O.debug("Using non-flex legacy modal positioning.")),O.set.screenHeight(),O.set.type(),O.set.clickaway(),!d.allowMultiple&&O.others.active()?O.hideOthers(O.showModal):(S=!1,d.allowMultiple&&(O.others.active()&&o.filter("."+m.active).find(f.dimmer).addClass("active"),d.detachable)&&y.detach().appendTo(n),d.transition&&W.fn.transition!==K&&y.transition("is supported")?(O.debug("Showing modal with css animations"),y.transition({debug:d.debug,verbose:d.verbose,silent:d.silent,animation:(d.transition.showMethod||d.transition)+" in",queue:d.queue,duration:d.transition.showDuration||d.duration,useFailSafe:!0,onComplete:function(){d.onVisible.apply(T),d.keyboardShortcuts&&O.add.keyboardShortcuts(),O.save.focus(),O.set.active(),O.refreshInputs(),d.autofocus&&O.set.autofocus(),e()}})):O.error(h.noTransition))):O.debug("Modal is already visible")},hideModal:function(e,t,n){var i=o.filter("."+m.active).last();if(e=W.isFunction(e)?e:function(){},!1===d.onHide.call(T,W(this)))return O.verbose("Hide callback returned false cancelling hide"),S=!1;(O.is.animating()||O.is.active())&&(O.debug("Hiding modal"),d.transition&&W.fn.transition!==K&&y.transition("is supported")?(O.remove.active(),y.transition({debug:d.debug,verbose:d.verbose,silent:d.silent,animation:(d.transition.hideMethod||d.transition)+" out",queue:d.queue,duration:d.transition.hideDuration||d.duration,useFailSafe:!0,onStart:function(){O.others.active()||O.others.animating()||t||O.hideDimmer(),d.keyboardShortcuts&&!O.others.active()&&O.remove.keyboardShortcuts()},onComplete:function(){O.unbind.scrollLock(),d.allowMultiple&&(i.addClass(m.front),y.removeClass(m.front),(n?a:i).find(f.dimmer).removeClass("active")),W.isFunction(d.onHidden)&&d.onHidden.call(T),O.remove.dimmerStyles(),O.restore.focus(),e()}})):O.error(h.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(F&&(w||n.css("top",i.scrollTop()),O.save.bodyMargin()),O.debug("Showing dimmer"),i.dimmer("show")):O.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(O.unbind.scrollLock(),i.dimmer("hide",function(){F&&O.restore.bodyMargin(),O.remove.clickaway(),O.remove.screenHeight()})):O.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var i,e=a.filter("."+m.active+", ."+m.animating);if(n=W.isFunction(n)?n:function(){},0<e.length)return O.debug("Hiding all visible modals"),i=!0,W(e.get().reverse()).each(function(e,t){i=i&&W(t).modal("hide modal",n,!1,!0)}),i&&O.hideDimmer(),i},hideOthers:function(e){var t=o.filter("."+m.active+", ."+m.animating);e=W.isFunction(e)?e:function(){},0<t.length&&(O.debug("Hiding other modals",o),t.modal("hide modal",e,!0))},others:{active:function(){return 0<o.filter("."+m.active).length},animating:function(){return 0<o.filter("."+m.animating).length}},add:{keyboardShortcuts:function(){O.verbose("Adding keyboard shortcuts"),L.on("keydown"+v,O.event.keyboard)}},save:{focus:function(){0<W($.activeElement).closest(y).length||(e=W($.activeElement).blur())},bodyMargin:function(){A=x.css((w?"margin-":"padding-")+(O.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(A.replace(/[^\d.]/g,"")),t=w?B.innerWidth-$.documentElement.clientWidth:x[0].offsetWidth-x[0].clientWidth;E=e+t}},restore:{focus:function(){e&&0<e.length&&d.restoreFocus&&e.focus()},bodyMargin:function(){var n=O.can.leftBodyScrollbar()?"left":"right";x.css((w?"margin-":"padding-")+n,A),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(m.active)},legacy:function(){y.removeClass(m.legacy)},clickaway:function(){d.detachable||y.off("mousedown"+l),n.off("mousedown"+l),n.off("mouseup"+l)},dimmerStyles:function(){n.removeClass(m.inverted),i.removeClass(m.blurring)},bodyStyle:function(){""===x.attr("style")&&(O.verbose("Removing style attribute"),x.removeAttr("style"))},screenHeight:function(){O.debug("Removing page height"),x.css("height",""),O.remove.bodyStyle()},keyboardShortcuts:function(){O.verbose("Removing keyboard shortcuts"),L.off("keydown"+v)},scrolling:function(){M||i.removeClass(m.scrolling),y.removeClass(m.scrolling)}},cacheSizes:function(){y.addClass(m.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();O.cache.pageHeight!==K&&0===n||(W.extend(O.cache,{pageHeight:L.outerHeight(),width:t,height:n+d.offset,scrollHeight:e+d.offset,contextHeight:(w?R:i).height()}),O.cache.topOffset=-O.cache.height/2),y.removeClass(m.loading),O.debug("Caching modal and container sizes",O.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return O.cache.leftBodyScrollbar===K&&(O.cache.leftBodyScrollbar=O.is.rtl()&&(O.is.iframe&&!O.is.firefox()||O.is.safari()||O.is.edge()||O.is.ie())),O.cache.leftBodyScrollbar},useFlex:function(){return"auto"===d.useFlex?d.detachable&&!O.is.ie():(d.useFlex&&O.is.ie()?O.debug("useFlex true is not supported in IE"):d.useFlex&&!d.detachable&&O.debug("useFlex true in combination with detachable false is not supported"),d.useFlex)},fit:function(){var e=O.cache.contextHeight,t=O.cache.contextHeight/2,n=O.cache.topOffset,i=O.cache.scrollHeight,a=O.cache.height,o=d.padding;return a<i?t+n+i+o<e:a+2*o<e}},has:{configActions:function(){return Array.isArray(d.actions)&&0<d.actions.length},scrollbar:function(){return w||"hidden"!==x.css("overflow-y")}},is:{active:function(){return y.hasClass(m.active)},ie:function(){var e,t;return O.cache.isIE===K&&(e=!B.ActiveXObject&&"ActiveXObject"in B,t="ActiveXObject"in B,O.cache.isIE=e||t),O.cache.isIE},animating:function(){return y.transition("is supported")?y.transition("is animating"):y.is(":visible")},scrolling:function(){return i.hasClass(m.scrolling)},modernBrowser:function(){return!(B.ActiveXObject||"ActiveXObject"in B)},rtl:function(){return O.cache.isRTL===K&&(O.cache.isRTL="rtl"===y.attr("dir")||"rtl"===y.css("direction")||"rtl"===V.attr("dir")||"rtl"===V.css("direction")||"rtl"===x.attr("dir")||"rtl"===x.css("direction")),O.cache.isRTL},safari:function(){return O.cache.isSafari===K&&(O.cache.isSafari=/constructor/i.test(B.HTMLElement)||!!B.ApplePaySession),O.cache.isSafari},edge:function(){return O.cache.isEdge===K&&(O.cache.isEdge=!!B.setImmediate&&!O.is.ie()),O.cache.isEdge},firefox:function(){return O.cache.isFirefox===K&&(O.cache.isFirefox=!!B.InstallTrigger),O.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=t.filter("[autofocus]"),e=(0<e.length?e:1<t.length?t.filter(":not(i.close)"):t).first();0<e.length&&e.focus()},bodyMargin:function(){var n=O.can.leftBodyScrollbar()?"left":"right";(d.detachable||O.can.fit())&&x.css((w?"margin-":"padding-")+n,E+"px"),x.find(f.bodyFixed.replace("right",n)).each(function(){var e=W(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+E+"px)")})},clickaway:function(){d.detachable||y.on("mousedown"+l,O.event.mousedown),n.on("mousedown"+l,O.event.mousedown),n.on("mouseup"+l,O.event.mouseup)},dimmerSettings:function(){var e;W.fn.dimmer===K?O.error(h.dimmer):(e={debug:d.debug,dimmerName:"modals",closable:"auto",useFlex:O.can.useFlex(),duration:{show:d.transition.showDuration||d.duration,hide:d.transition.hideDuration||d.duration}},e=W.extend(!0,e,d.dimmerSettings),d.inverted&&(e.variation=e.variation!==K?e.variation+" inverted":"inverted"),x.dimmer("setting",e))},dimmerStyles:function(){d.inverted?n.addClass(m.inverted):n.removeClass(m.inverted),d.blurring?i.addClass(m.blurring):i.removeClass(m.blurring)},modalOffset:function(){var e;d.detachable?y.css({marginTop:!y.hasClass("aligned")&&O.can.fit()?-O.cache.height/2:d.padding/2,marginLeft:-O.cache.width/2}):(e=O.can.fit(),y.css({top:!y.hasClass("aligned")&&e?L.scrollTop()+(O.cache.contextHeight-O.cache.height)/2:!e||y.hasClass("top")?L.scrollTop()+d.padding:L.scrollTop()+(O.cache.contextHeight-O.cache.height-d.padding),marginLeft:-O.cache.width/2})),O.verbose("Setting modal offset for legacy mode")},screenHeight:function(){O.can.fit()?x.css("height",""):y.hasClass("bottom")||(O.debug("Modal is taller than page content, resizing page height"),x.css("height",O.cache.height+2*d.padding))},active:function(){y.addClass(m.active+" "+m.front),o.filter("."+m.active).removeClass(m.front)},scrolling:function(){i.addClass(m.scrolling),y.addClass(m.scrolling),O.unbind.scrollLock()},legacy:function(){y.addClass(m.legacy)},type:function(){O.can.fit()?(O.verbose("Modal fits on screen"),O.others.active()||O.others.animating()||(O.remove.scrolling(),O.bind.scrollLock())):y.hasClass("bottom")?O.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(O.verbose("Modal cannot fit on screen setting to scrolling"),O.set.scrolling())},undetached:function(){i.addClass(m.undetached)}},setting:function(e,t){if(O.debug("Changing setting",e,t),W.isPlainObject(e))W.extend(!0,d,e);else{if(t===K)return d[e];W.isPlainObject(d[e])?W.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,O,e);else{if(t===K)return O[e];O[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?O.performance.log(arguments):(O.debug=Function.prototype.bind.call(console.info,console,d.name+":"),O.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?O.performance.log(arguments):(O.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),O.verbose.apply(console,arguments)))},error:function(){d.silent||(O.error=Function.prototype.bind.call(console.error,console,d.name+":"),O.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(j||t),j=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(O.performance.timer),O.performance.timer=setTimeout(O.performance.display,500)},display:function(){var e=d.name+":",n=0;j=!1,clearTimeout(O.performance.timer),W.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",q&&(e+=" '"+q+"'"),(console.group!==K||console.table!==K)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):W.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var a,o,n,r=D;return e=e||U,t=t||T,"string"==typeof i&&r!==K&&(i=i.split(/[\. ]/),a=i.length-1,W.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(W.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==K)return o=r[n],!1;{if(!W.isPlainObject(r[t])||e==a)return r[t]!==K&&(o=r[t]),!1;r=r[t]}}})),W.isFunction(o)?n=o.apply(t,e):o!==K&&(n=o),Array.isArray(I)?I.push(n):I!==K?I=[I,n]:n!==K&&(I=n),o}};z?(D===K&&(W.isFunction(d.templates[H])&&(d.autoShow=!0,d.className.modal=d.className.template,d=W.extend(!0,{},d,d.templates[H].apply(O,U)),m=d.className,d.namespace,g=d.fields,h=d.error),O.initialize()),W.isFunction(d.templates[H])||O.invoke(H)):(D!==K&&D.invoke("destroy"),O.initialize(),I=y)}),I!==K?I:this},W.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},keys:{space:32,enter:13,escape:27,tab:9},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",closeIcon:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input",innerDimmer:"ui inverted dimmer"},text:{ok:"Ok",cancel:"Cancel",close:"Close"}},W.fn.modal.settings.templates={getArguments:function(e){e=[].slice.call(e);return W.isPlainObject(e[0])?W.extend({handler:function(){},content:"",title:""},e[0]):(W.isFunction(e[e.length-1])||e.push(function(){}),{handler:e.pop(),content:e.pop()||"",title:e.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments),n=t.handler;return{title:t.title,content:t.content,onApprove:n,actions:[{text:e.text.ok,class:e.className.ok,click:n}]}},confirm:function(){function e(){i.handler(!0)}function t(){i.handler(!1)}var n=this.get.settings(),i=n.templates.getArguments(arguments);return{title:i.title,content:i.content,onApprove:e,onDeny:t,actions:[{text:n.text.ok,class:n.className.ok,click:e},{text:n.text.cancel,class:n.className.cancel,click:t}]}},prompt:function(){function e(){var e=n.get.settings(),e=n.get.element().find(e.selector.prompt)[0];a.handler(W(e).val())}function t(){a.handler(null)}var n=this,i=this.get.settings(),a=i.templates.getArguments(arguments);return 0===W(W.parseHTML(a.content)).filter(".ui.input").length&&(a.content+='<p><div class="'+this.helpers.deQuote(i.className.prompt)+'"><input placeholder="'+this.helpers.deQuote(a.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(a.defaultValue||"")+'"></div></p>'),{title:a.title,content:a.content,onApprove:e,onDeny:t,actions:[{text:i.text.ok,class:i.className.ok,click:e},{text:i.text.cancel,class:i.className.cancel,click:t}]}}}}(jQuery,window,document),function(V,q,j,N){"use strict";V.isFunction=V.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},q=void 0!==q&&q.Math==Math?q:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),V.fn.popup=function(T){var D,e=V(this),S=V(j),A=V(q),E=V("body"),M=e.selector||"",F="ontouchstart"in j.documentElement?"touchstart":"click",O=(new Date).getTime(),P=[],I=T,R="string"==typeof I,L=[].slice.call(arguments,1);return e.each(function(){var c,s,e,t,n,u=V.isPlainObject(T)?V.extend(!0,{},V.fn.popup.settings,T):V.extend({},V.fn.popup.settings),i=u.selector,d=u.className,f=u.error,m=u.metadata,a=u.namespace,o="."+u.namespace,r="module-"+a,p=V(this),l=[q,j].indexOf(u.context)<0?S.find(u.context):V(u.context),g=[q,j].indexOf(u.scrollContext)<0?S.find(u.scrollContext):V(u.scrollContext),h=[q,j].indexOf(u.boundary)<0?S.find(u.boundary):V(u.boundary),v=u.target?[q,j].indexOf(u.target)<0?S.find(u.target):V(u.target):p,b=0,y=!1,x=!1,w=this,C=p.data(r),k={initialize:function(){k.debug("Initializing",p),k.createID(),k.bind.events(),!k.exists()&&u.preserve&&k.create(),u.observeChanges&&k.observeChanges(),k.instantiate()},instantiate:function(){k.verbose("Storing instance",k),C=k,p.data(r,C)},observeChanges:function(){"MutationObserver"in q&&((e=new MutationObserver(k.event.documentChanged)).observe(j,{childList:!0,subtree:!0}),k.debug("Setting up mutation observer",e))},refresh:function(){u.popup?c=S.find(u.popup).eq(0):u.inline&&(c=v.nextAll(i.popup).eq(0),u.popup=c),u.popup?(c.addClass(d.loading),s=k.get.offsetParent(),c.removeClass(d.loading),u.movePopup&&k.has.popup()&&k.get.offsetParent(c)[0]!==s[0]&&(k.debug("Moving popup to the same offset parent as target"),c.detach().appendTo(s))):s=u.inline?k.get.offsetParent(v):k.has.popup()?k.get.offsetParent(c):E,s.is("html")&&s[0]!==E[0]&&(k.debug("Setting page as offset parent"),s=E),k.get.variation()&&k.set.variation()},reposition:function(){k.refresh(),k.set.position()},destroy:function(){k.debug("Destroying previous module"),e&&e.disconnect(),c&&!u.preserve&&k.removePopup(),clearTimeout(k.hideTimer),clearTimeout(k.showTimer),k.unbind.close(),k.unbind.events(),p.removeData(r)},event:{start:function(e){var t=V.isPlainObject(u.delay)?u.delay.show:u.delay;clearTimeout(k.hideTimer),x&&!u.addTouchEvents||(k.showTimer=setTimeout(k.show,t))},end:function(){var e=V.isPlainObject(u.delay)?u.delay.hide:u.delay;clearTimeout(k.showTimer),k.hideTimer=setTimeout(k.hide,e)},touchstart:function(e){x=!0,u.addTouchEvents&&k.show()},resize:function(){k.is.visible()&&k.set.position()},documentChanged:function(e){[].forEach.call(e,function(e){e.removedNodes&&[].forEach.call(e.removedNodes,function(e){(e==w||0<V(e).find(w).length)&&(k.debug("Element removed from DOM, tearing down events"),k.destroy())})})},hideGracefully:function(e){var t=V(e.target),n=V.contains(j.documentElement,e.target),t=0<t.closest(i.popup).length;e&&!t&&n?(k.debug("Click occurred outside popup hiding popup"),k.hide()):k.debug("Click was inside popup, keeping popup open")}},create:function(){var e=k.get.html(),t=k.get.title(),n=k.get.content();e||n||t?(k.debug("Creating pop-up html"),e=e||u.templates.popup({title:t,content:n}),c=V("<div/>").addClass(d.popup).data(m.activator,p).html(e),u.inline?(k.verbose("Inserting popup element inline",c),c.insertAfter(p)):(k.verbose("Appending popup element to body",c),c.appendTo(l)),k.refresh(),k.set.variation(),u.hoverable&&k.bind.popup(),u.onCreate.call(c,w)):u.popup?(S.find(u.popup).data(m.activator,p),k.verbose("Used popup specified in settings"),k.refresh(),u.hoverable&&k.bind.popup()):0!==v.next(i.popup).length?(k.verbose("Pre-existing popup found"),u.inline=!0,u.popup=v.next(i.popup).data(m.activator,p),k.refresh(),u.hoverable&&k.bind.popup()):k.debug("No content specified skipping display",w)},createID:function(){n=(Math.random().toString(16)+"000000000").slice(2,10),t="."+n,k.verbose("Creating unique id for element",n)},toggle:function(){k.debug("Toggling pop-up"),k.is.hidden()?(k.debug("Popup is hidden, showing pop-up"),k.unbind.close(),k.show()):(k.debug("Popup is visible, hiding pop-up"),k.hide())},show:function(e){e=e||function(){},k.debug("Showing pop-up",u.transition),!k.is.hidden()||k.is.active()&&k.is.dropdown()||(k.exists()||k.create(),!1===u.onShow.call(c,w)?k.debug("onShow callback returned false, cancelling popup animation"):(u.preserve||u.popup||k.refresh(),c&&k.set.position()&&(k.save.conditions(),u.exclusive&&k.hideAll(),k.animate.show(e))))},hide:function(e){e=e||function(){},(k.is.visible()||k.is.animating())&&(!1===u.onHide.call(c,w)?k.debug("onHide callback returned false, cancelling popup animation"):(k.remove.visible(),k.unbind.close(),k.restore.conditions(),k.animate.hide(e)))},hideAll:function(){S.find(i.popup).filter("."+d.popupVisible).each(function(){V(this).data(m.activator).popup("hide")})},exists:function(){return!!c&&(u.inline||u.popup?k.has.popup():1<=c.closest(l).length)},removePopup:function(){k.has.popup()&&!u.popup&&(k.debug("Removing popup",c),c.remove(),c=N,u.onRemove.call(c,w))},save:{conditions:function(){k.cache={title:p.attr("title")},k.cache.title&&p.removeAttr("title"),k.verbose("Saving original attributes",k.cache.title)}},restore:{conditions:function(){return k.cache&&k.cache.title&&(p.attr("title",k.cache.title),k.verbose("Restoring original attributes",k.cache.title)),!0}},supports:{svg:function(){return"undefined"!=typeof SVGGraphicsElement}},animate:{show:function(e){e=V.isFunction(e)?e:function(){},u.transition&&V.fn.transition!==N&&p.transition("is supported")?(k.set.visible(),c.transition({animation:(u.transition.showMethod||u.transition)+" in",queue:!1,debug:u.debug,verbose:u.verbose,silent:u.silent,duration:u.transition.showDuration||u.duration,onComplete:function(){k.bind.close(),e.call(c,w),u.onVisible.call(c,w)}})):k.error(f.noTransition)},hide:function(e){e=V.isFunction(e)?e:function(){},k.debug("Hiding pop-up"),u.transition&&V.fn.transition!==N&&p.transition("is supported")?c.transition({animation:(u.transition.hideMethod||u.transition)+" out",queue:!1,duration:u.transition.hideDuration||u.duration,debug:u.debug,verbose:u.verbose,silent:u.silent,onComplete:function(){k.reset(),e.call(c,w),u.onHidden.call(c,w)}}):k.error(f.noTransition)}},change:{content:function(e){c.html(e)}},get:{html:function(){return p.removeData(m.html),p.data(m.html)||u.html},title:function(){return p.removeData(m.title),p.data(m.title)||u.title},content:function(){return p.removeData(m.content),p.data(m.content)||u.content||p.attr("title")},variation:function(){return p.removeData(m.variation),p.data(m.variation)||u.variation},popup:function(){return c},popupOffset:function(){return c.offset()},calculations:function(){var e=k.get.offsetParent(c),t=v[0],n=h[0]==q,i=v.offset(),a=u.inline||u.popup&&u.movePopup?v.offsetParent().offset():{top:0,left:0},o=n?{top:0,left:0}:h.offset(),r={},n=n?{top:A.scrollTop(),left:A.scrollLeft()}:{top:0,left:0},r={target:{element:v[0],width:v.outerWidth(),height:v.outerHeight(),top:i.top-a.top,left:i.left-a.left,margin:{}},popup:{width:c.outerWidth(),height:c.outerHeight()},parent:{width:s.outerWidth(),height:s.outerHeight()},screen:{top:o.top,left:o.left,scroll:{top:n.top,left:n.left},width:h.width(),height:h.height()}};return e[0]!==s[0]&&(i=e.offset(),r.target.top-=i.top,r.target.left-=i.left,r.parent.width=e.outerWidth(),r.parent.height=e.outerHeight()),u.setFluidWidth&&k.is.fluid()&&(r.container={width:c.parent().outerWidth()},r.popup.width=r.container.width),r.target.margin.top=u.inline?parseInt(q.getComputedStyle(t).getPropertyValue("margin-top"),10):0,r.target.margin.left=u.inline?k.is.rtl()?parseInt(q.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(q.getComputedStyle(t).getPropertyValue("margin-left"),10):0,r.boundary={top:(a=r.screen).top+a.scroll.top,bottom:a.top+a.scroll.top+a.height,left:a.left+a.scroll.left,right:a.left+a.scroll.left+a.width},r},id:function(){return n},startEvent:function(){return"hover"==u.on?"mouseenter":"focus"==u.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==u.on?"mouseleave":"focus"==u.on&&"blur"},distanceFromBoundary:function(e,t){var n={},i=(t=t||k.get.calculations()).popup,t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+i.width),bottom:t.bottom-(e.top+i.height)},k.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(e!==N?e:v)[0].parentNode,n=V(t);if(t)for(var i="none"===n.css("transform"),a="static"===n.css("position"),o=n.is("body");t&&!o&&a&&i;)t=t.parentNode,i="none"===(n=V(t)).css("transform"),a="static"===n.css("position"),o=n.is("body");return n&&0<n.length?n:V()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=e.split(" "),n=t[0],t=t[1],i="top"==n||"bottom"==n,a=!1,o=!1,r=!1;return y||(k.verbose("All available positions available"),y=k.get.positions()),k.debug("Recording last position tried",e),y[e]=!0,"opposite"===u.prefer&&(r=(r=[{top:"bottom",bottom:"top",left:"right",right:"left"}[n],t]).join(" "),a=!0===y[r],k.debug("Trying opposite strategy",r)),"adjacent"===u.prefer&&i&&(r=(r=[n,{left:"center",center:"right",right:"left"}[t]]).join(" "),o=!0===y[r],k.debug("Trying adjacent strategy",r)),(o||a)&&(k.debug("Using backup position",r),r={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),r}},set:{position:function(e,t){if(0!==v.length&&0!==c.length){var n,i,a,o,r,s,l;if(t=t||k.get.calculations(),e=e||p.data(m.position)||u.position,n=p.data(m.offset)||u.offset,i=u.distanceAway,a=t.target,o=t.popup,r=t.parent,k.should.centerArrow(t)&&(k.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(n=(n+=a.width/2)-u.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(n=(n-=a.width/2)+u.arrowPixelsFromEdge)),0===a.width&&0===a.height&&!k.is.svg(a.element))return k.debug("Popup target is hidden, no action taken"),!1;switch(u.inline&&(k.debug("Adding margin to calculation",a.margin),"left center"==e||"right center"==e?(n+=a.margin.top,i+=-a.margin.left):"top left"==e||"top center"==e||"top right"==e?(n+=a.margin.left,i-=a.margin.top):(n+=a.margin.left,i+=a.margin.top)),k.debug("Determining popup position from calculations",e,t),k.is.rtl()&&(e=e.replace(/left|right/g,function(e){return"left"==e?"right":"left"}),k.debug("RTL: Popup position updated",e)),e=b==u.maxSearchDepth&&"string"==typeof u.lastResort?u.lastResort:e){case"top left":s={top:"auto",bottom:r.height-a.top+i,left:a.left+n,right:"auto"};break;case"top center":s={bottom:r.height-a.top+i,left:a.left+a.width/2-o.width/2+n,top:"auto",right:"auto"};break;case"top right":s={bottom:r.height-a.top+i,right:r.width-a.left-a.width-n,top:"auto",left:"auto"};break;case"left center":s={top:a.top+a.height/2-o.height/2+n,right:r.width-a.left+i,left:"auto",bottom:"auto"};break;case"right center":s={top:a.top+a.height/2-o.height/2+n,left:a.left+a.width+i,bottom:"auto",right:"auto"};break;case"bottom left":s={top:a.top+a.height+i,left:a.left+n,bottom:"auto",right:"auto"};break;case"bottom center":s={top:a.top+a.height+i,left:a.left+a.width/2-o.width/2+n,bottom:"auto",right:"auto"};break;case"bottom right":s={top:a.top+a.height+i,right:r.width-a.left-a.width-n,left:"auto",bottom:"auto"}}if(s===N&&k.error(f.invalidPosition,e),k.debug("Calculated popup positioning values",s),c.css(s).removeClass(d.position).addClass(e).addClass(d.loading),l=k.get.popupOffset(),l=k.get.distanceFromBoundary(l,t),!u.forcePosition&&k.is.offstage(l,e)){if(k.debug("Position is outside viewport",e),b<u.maxSearchDepth)return b++,e=k.get.nextPosition(e),k.debug("Trying new position",e),!!c&&k.set.position(e,t);if(!u.lastResort)return k.debug("Popup could not find a position to display",c),k.error(f.cannotPlace,w),k.remove.attempts(),k.remove.loading(),k.reset(),u.onUnplaceable.call(c,w),!1;k.debug("No position found, showing with last position")}return k.debug("Position is on stage",e),k.remove.attempts(),k.remove.loading(),u.setFluidWidth&&k.is.fluid()&&k.set.fluidWidth(t),!0}k.error(f.notFound)},fluidWidth:function(e){e=e||k.get.calculations(),k.debug("Automatically setting element width to parent width",e.parent.width),c.css("width",e.container.width)},variation:function(e){(e=e||k.get.variation())&&k.has.popup()&&(k.verbose("Adding variation to popup",e),c.addClass(e))},visible:function(){p.addClass(d.visible)}},remove:{loading:function(){c.removeClass(d.loading)},variation:function(e){(e=e||k.get.variation())&&(k.verbose("Removing variation",e),c.removeClass(e))},visible:function(){p.removeClass(d.visible)},attempts:function(){k.verbose("Resetting all searched positions"),b=0,y=!1}},bind:{events:function(){k.debug("Binding popup events to module"),"click"==u.on&&p.on(F+o,k.toggle),"hover"==u.on&&p.on("touchstart"+o,k.event.touchstart),k.get.startEvent()&&p.on(k.get.startEvent()+o,k.event.start).on(k.get.endEvent()+o,k.event.end),u.target&&k.debug("Target set to element",v),A.on("resize"+t,k.event.resize)},popup:function(){k.verbose("Allowing hover events on popup to prevent closing"),c&&k.has.popup()&&c.on("mouseenter"+o,k.event.start).on("mouseleave"+o,k.event.end)},close:function(){(!0===u.hideOnScroll||"auto"==u.hideOnScroll&&"click"!=u.on)&&k.bind.closeOnScroll(),k.is.closable()?k.bind.clickaway():"hover"==u.on&&x&&k.bind.touchClose()},closeOnScroll:function(){k.verbose("Binding scroll close event to document"),g.one(k.get.scrollEvent()+t,k.event.hideGracefully)},touchClose:function(){k.verbose("Binding popup touchclose event to document"),S.on("touchstart"+t,function(e){k.verbose("Touched away from popup"),k.event.hideGracefully.call(w,e)})},clickaway:function(){k.verbose("Binding popup close event to document"),S.on(F+t,function(e){k.verbose("Clicked away from popup"),k.event.hideGracefully.call(w,e)})}},unbind:{events:function(){A.off(t),p.off(o)},close:function(){S.off(t),g.off(t)}},has:{popup:function(){return c&&0<c.length}},should:{centerArrow:function(e){return!k.is.basic()&&e.target.width<=2*u.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==u.closable?"hover"!=u.on:u.closable},offstage:function(e,n){var i=[];return V.each(e,function(e,t){t<-u.jitter&&(k.debug("Position exceeds allowable distance from edge",e,t,n),i.push(e))}),0<i.length},svg:function(e){return k.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return p.hasClass(d.basic)},active:function(){return p.hasClass(d.active)},animating:function(){return c!==N&&c.hasClass(d.animating)},fluid:function(){return c!==N&&c.hasClass(d.fluid)},visible:function(){return c!==N&&c.hasClass(d.popupVisible)},dropdown:function(){return p.hasClass(d.dropdown)},hidden:function(){return!k.is.visible()},rtl:function(){return"rtl"===p.attr("dir")||"rtl"===p.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===l.attr("dir")||"rtl"===l.css("direction")}},reset:function(){k.remove.visible(),u.preserve?V.fn.transition!==N&&c.transition("remove transition"):k.removePopup()},setting:function(e,t){if(V.isPlainObject(e))V.extend(!0,u,e);else{if(t===N)return u[e];u[e]=t}},internal:function(e,t){if(V.isPlainObject(e))V.extend(!0,k,e);else{if(t===N)return k[e];k[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,u.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),k.verbose.apply(console,arguments)))},error:function(){u.silent||(k.error=Function.prototype.bind.call(console.error,console,u.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(O||t),O=t,P.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=u.name+":",n=0;O=!1,clearTimeout(k.performance.timer),V.each(P,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",M&&(e+=" '"+M+"'"),(console.group!==N||console.table!==N)&&0<P.length&&(console.groupCollapsed(e),console.table?console.table(P):V.each(P,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),P=[]}},invoke:function(i,e,t){var a,o,n,r=C;return e=e||L,t=t||w,"string"==typeof i&&r!==N&&(i=i.split(/[\. ]/),a=i.length-1,V.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(V.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==N)return o=r[n],!1;{if(!V.isPlainObject(r[t])||e==a)return r[t]!==N&&(o=r[t]),!1;r=r[t]}}})),V.isFunction(o)?n=o.apply(t,e):o!==N&&(n=o),Array.isArray(D)?D.push(n):D!==N?D=[D,n]:n!==N&&(D=n),o}};R?(C===N&&k.initialize(),k.invoke(I)):(C!==N&&C.invoke("destroy"),k.initialize())}),D!==N?D:this},V.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:q,addTouchEvents:!0,position:"top left",forcePosition:!1,variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:q,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return t[e]}):e},popup:function(e){var t="",n=V.fn.popup.settings.templates.escape;return typeof e!==N&&(typeof e.title!==N&&e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),typeof e.content!==N)&&e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>"),t}}}}(jQuery,window,document),function(T,e,D,S){"use strict";T.isFunction=T.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},void 0!==e&&e.Math==Math||"undefined"!=typeof self&&self.Math==Math||Function("return this")(),T.fn.progress=function(h){var v,e=T(this),b=e.selector||"",y=(new Date).getTime(),x=[],w=h,C="string"==typeof w,k=[].slice.call(arguments,1);return e.each(function(){var r=T.isPlainObject(h)?T.extend(!0,{},T.fn.progress.settings,h):T.extend({},T.fn.progress.settings),n=r.className,t=r.metadata,e=r.namespace,i=r.selector,s=r.error,a="."+e,o="module-"+e,c=T(this),u=T(this).find(i.bar),l=T(this).find(i.progress),d=T(this).find(i.label),f=this,m=c.data(o),p=!1,g={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var n=0,i=1,a=e/t;n<10&&!(1<(a*=i));)i=Math.pow(10,n++);return i},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){g.set.duration(),g.set.transitionEvent(),g.debug(f),g.read.metadata(),g.read.settings(),g.instantiate()},instantiate:function(){g.verbose("Storing instance of progress",g),m=g,c.data(o,g)},destroy:function(){g.verbose("Destroying previous progress for",c),clearInterval(m.interval),g.remove.state(),c.removeData(o),m=S},reset:function(){g.remove.nextValue(),g.update.progress(0)},complete:function(e){(g.percent===S||g.percent<100)&&(g.remove.progressPoll(),!0!==e)&&g.set.percent(100)},read:{metadata:function(){var e={percent:g.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:g.helper.forceArray(c.data(t.value))};e.total!==S&&(g.debug("Total value set from metadata",e.total),g.set.total(e.total)),0<e.value.length&&(g.debug("Current value set from metadata",e.value),g.set.value(e.value),g.set.progress(e.value)),0<e.percent.length&&(g.debug("Current percent value set from metadata",e.percent),g.set.percent(e.percent))},settings:function(){!1!==r.total&&(g.debug("Current total set in settings",r.total),g.set.total(r.total)),!1!==r.value&&(g.debug("Current value set in settings",r.value),g.set.value(r.value),g.set.progress(g.value)),!1!==r.percent&&(g.debug("Current percent set in settings",r.percent),g.set.percent(r.percent))}},bind:{transitionEnd:function(t){var e=g.get.transitionEnd();u.one(e+a,function(e){clearTimeout(g.failSafeTimer),t.call(this,e)}),g.failSafeTimer=setTimeout(function(){u.triggerHandler(e)},r.duration+r.failSafeDelay),g.verbose("Adding fail safe timer",g.timer)}},increment:function(e){var t;e=g.has.total()?(t=g.get.value(),e||1):(t=g.get.percent(),e||g.get.randomValue()),g.debug("Incrementing percentage by",t,t=t+e,e),t=g.get.normalizedValue(t),g.set.progress(t)},decrement:function(e){var t,n;g.get.total()?(n=(t=g.get.value())-(e=e||1),g.debug("Decrementing value by",e,t)):(n=(t=g.get.percent())-(e=e||g.get.randomValue()),g.debug("Decrementing percentage by",e,t)),n=g.get.normalizedValue(n),g.set.progress(n)},has:{progressPoll:function(){return g.progressPoll},total:function(){return!1!==g.get.total()}},get:{text:function(e,t){var t=t||0,n=g.get.value(t),i=g.get.total(),a=p?g.get.displayPercent(t):g.get.percent(t),o=!1!==i?Math.max(0,i-n):100-a;return e=(e=e||"").replace("{value}",n).replace("{total}",i||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",r.text.bars[t]||""),g.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return g.debug("Value cannot decrement below 0"),0;if(g.has.total()){if(e>g.total)return g.debug("Value cannot increment above total",g.total),g.total}else if(100<e)return g.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==r.updateInterval?r.duration:r.updateInterval},randomValue:function(){return g.debug("Generating random increment percentage"),Math.floor(Math.random()*r.random.max+r.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=D.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==S)return n[e]},displayPercent:function(e){var e=T(u[e]),t=e.width(),n=c.width(),e=parseInt(e.css("min-width"),10)<t?t/n*100:g.percent;return 0<r.precision?Math.round(e*(10*r.precision))/(10*r.precision):Math.round(e)},percent:function(e){return g.percent&&g.percent[e||0]||0},value:function(e){return g.nextValue||g.value&&g.value[e||0]||0},total:function(){return g.total!==S&&g.total}},create:{progressPoll:function(){g.progressPoll=setTimeout(function(){g.update.toNextValue(),g.remove.progressPoll()},g.get.updateInterval())}},is:{complete:function(){return g.is.success()||g.is.warning()||g.is.error()},success:function(){return c.hasClass(n.success)},warning:function(){return c.hasClass(n.warning)},error:function(){return c.hasClass(n.error)},active:function(){return c.hasClass(n.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){g.verbose("Removing progress poll timer"),g.progressPoll&&(clearTimeout(g.progressPoll),delete g.progressPoll)},nextValue:function(){g.verbose("Removing progress value stored for next update"),delete g.nextValue},state:function(){g.verbose("Removing stored state"),delete g.total,delete g.percent,delete g.value},active:function(){g.verbose("Removing active state"),c.removeClass(n.active)},success:function(){g.verbose("Removing success state"),c.removeClass(n.success)},warning:function(){g.verbose("Removing warning state"),c.removeClass(n.warning)},error:function(){g.verbose("Removing error state"),c.removeClass(n.error)}},set:{barWidth:function(e){g.debug("set bar width with ",e),e=g.helper.forceArray(e);var a=-1,o=-1,r=g.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var n=t===s-1&&0===r,i=T(u[t]);return 0===e&&l&&!n?i.css("display","none"):(l&&n&&i.css("background","transparent"),-1==a&&(a=t),o=t,i.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){T(u[t]).css({borderTopLeftRadius:t==a?"":0,borderBottomLeftRadius:t==a?"":0,borderTopRightRadius:t==o?"":0,borderBottomRightRadius:t==o?"":0})}),c.attr("data-percent",t)},duration:function(e){e=e||r.duration,g.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=g.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,r.limitValues?Math.max(0,Math.min(100,e)):e});var t,n=g.has.total(),i=g.helper.sum(e),a=1<e.length&&n,o=g.helper.sum(g.helper.forceArray(g.value));a&&o>g.total?g.error(s.sumExceedsTotal,o,g.total):!a&&100<i?g.error(s.tooHigh,i):i<0?g.error(s.tooLow,i):(t=0<r.precision?r.precision:a?g.helper.derivePrecision(Math.min.apply(null,g.value),g.total):0,o=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),g.percent=o,n&&(g.value=e.map(function(e){return 0<t?Math.round(e/100*g.total*(10*t))/(10*t):Math.round(e/100*g.total*10)/10})),g.set.barWidth(e),g.set.labelInterval()),r.onChange.call(f,e,g.value,g.total)},labelInterval:function(){clearInterval(g.interval),g.bind.transitionEnd(function(){g.verbose("Bar finished animating, removing continuous label updates"),clearInterval(g.interval),p=!1,g.set.labels()}),p=!0,g.interval=setInterval(function(){T.contains(D.documentElement,f)||(clearInterval(g.interval),p=!1),g.set.labels()},r.framerate)},labels:function(){g.verbose("Setting both bar progress and outer label text"),g.set.barLabel(),g.set.state()},label:function(e){(e=e||"")&&(e=g.get.text(e),g.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=e!==S?e:g.helper.sum(g.percent))?r.autoSuccess&&1===u.length&&!(g.is.warning()||g.is.error()||g.is.success())?(g.set.success(),g.debug("Automatically triggering success at 100%")):(g.verbose("Reached 100% removing active state"),g.remove.active(),g.remove.progressPoll()):0<e?(g.verbose("Adjusting active progress bar label",e),g.set.active()):(g.remove.active(),g.remove.warning(),g.remove.error(),g.remove.success(),g.set.label(r.text.active))},barLabel:function(n){l.map(function(e,t){t=T(t);n!==S?t.text(g.get.text(n,e)):"ratio"==r.label&&g.has.total()?(g.verbose("Adding ratio to bar label"),t.text(g.get.text(r.text.ratio,e))):"percent"==r.label&&(g.verbose("Adding percentage to bar label"),t.text(g.get.text(r.text.percent,e)))})},active:function(e){e=e||r.text.active,g.debug("Setting active state"),r.showActivity&&!g.is.active()&&c.addClass(n.active),g.remove.warning(),g.remove.error(),g.remove.success(),(e=r.onLabelUpdate("active",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onActive.call(f,g.value,g.total)})},success:function(e,t){e=e||r.text.success||r.text.active,g.debug("Setting success state"),c.addClass(n.success),g.remove.active(),g.remove.warning(),g.remove.error(),g.complete(t),e=r.text.success?r.onLabelUpdate("success",e,g.value,g.total):r.onLabelUpdate("active",e,g.value,g.total),g.set.label(e),g.bind.transitionEnd(function(){r.onSuccess.call(f,g.total)})},warning:function(e,t){e=e||r.text.warning,g.debug("Setting warning state"),c.addClass(n.warning),g.remove.active(),g.remove.success(),g.remove.error(),g.complete(t),(e=r.onLabelUpdate("warning",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onWarning.call(f,g.value,g.total)})},error:function(e,t){e=e||r.text.error,g.debug("Setting error state"),c.addClass(n.error),g.remove.active(),g.remove.success(),g.remove.warning(),g.complete(t),(e=r.onLabelUpdate("error",e,g.value,g.total))&&g.set.label(e),g.bind.transitionEnd(function(){r.onError.call(f,g.value,g.total)})},transitionEvent:function(){g.get.transitionEnd()},total:function(e){g.total=e},value:function(e){g.value=g.helper.forceArray(e)},progress:function(e){g.has.progressPoll()?(g.debug("Updated within interval, setting next update to use new value",e),g.set.nextValue(e)):(g.debug("First update in progress update interval, immediately updating",e),g.update.progress(e),g.create.progressPoll())},nextValue:function(e){g.nextValue=e}},update:{toNextValue:function(){var e=g.nextValue;e&&(g.debug("Update interval complete using last updated value",e),g.update.progress(e),g.remove.nextValue())},progress:function(e){var n=g.has.total(),e=(n&&g.set.value(e),g.helper.forceArray(e).map(function(e){var t;return!1===(e=g.get.numericValue(e))&&g.error(s.nonNumeric,e),e=g.get.normalizedValue(e),n?(t=0<g.total?e/g.total*100:100,g.debug("Calculating percent complete from total",t)):(t=e,g.debug("Setting value to exact percentage value",t)),t}));g.set.percent(e)}},setting:function(e,t){if(g.debug("Changing setting",e,t),T.isPlainObject(e))T.extend(!0,r,e);else{if(t===S)return r[e];T.isPlainObject(r[e])?T.extend(!0,r[e],t):r[e]=t}},internal:function(e,t){if(T.isPlainObject(e))T.extend(!0,g,e);else{if(t===S)return g[e];g[e]=t}},debug:function(){!r.silent&&r.debug&&(r.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,r.name+":"),g.debug.apply(console,arguments)))},verbose:function(){!r.silent&&r.verbose&&r.debug&&(r.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),g.verbose.apply(console,arguments)))},error:function(){r.silent||(g.error=Function.prototype.bind.call(console.error,console,r.name+":"),g.error.apply(console,arguments))},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(y||t),y=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:f,"Execution Time":n})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var e=r.name+":",n=0;y=!1,clearTimeout(g.performance.timer),T.each(x,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",b&&(e+=" '"+b+"'"),(console.group!==S||console.table!==S)&&0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):T.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(i,e,t){var a,o,n,r=m;return e=e||k,t=t||f,"string"==typeof i&&r!==S&&(i=i.split(/[\. ]/),a=i.length-1,T.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(T.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==S)return o=r[n],!1;{if(!T.isPlainObject(r[t])||e==a)return r[t]!==S?o=r[t]:g.error(s.method,i),!1;r=r[t]}}})),T.isFunction(o)?n=o.apply(t,e):o!==S&&(n=o),Array.isArray(v)?v.push(n):v!==S?v=[v,n]:n!==S&&(v=n),o}};C?(m===S&&g.initialize(),g.invoke(w)):(m!==S&&m.invoke("destroy"),g.initialize())}),v!==S?v:this},T.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,i){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/\{\$*[a-z0-9]+\}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document),function(j,N,H,z){"use strict";j.isFunction=j.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},N=void 0!==N&&N.Math==Math?N:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),j.fn.sidebar=function(T){var D,e=j(this),S=j(N),A=j(H),E=j("body"),M=j("html"),F=j("head"),O=e.selector||"",P=(new Date).getTime(),I=[],R=T,L="string"==typeof R,V=[].slice.call(arguments,1),q=N.requestAnimationFrame||N.mozRequestAnimationFrame||N.webkitRequestAnimationFrame||N.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var a,o,e,r,s,l=j.isPlainObject(T)?j.extend(!0,{},j.fn.sidebar.settings,T):j.extend({},j.fn.sidebar.settings),t=l.selector,c=l.className,n=l.namespace,i=l.regExp,u=l.error,d="."+n,f="module-"+n,m=j(this),p=[N,H].indexOf(l.context)<0?A.find(l.context):E,g=p[0]===E[0],h=m.children(t.sidebar),v=(p.children(t.fixed),p.children(t.pusher)),b=this,y=m.data(f),x="",w="",C=!1,k={initialize:function(){k.debug("Initializing sidebar",T),k.create.id(),s=k.get.transitionEvent(),l.delaySetup?q(k.setup.layout):k.setup.layout(),q(function(){k.setup.cache()}),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),y=k,m.data(f,k)},create:{id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),o="."+e,k.verbose("Creating unique id for element",e)}},destroy:function(){k.verbose("Destroying previous module for",m),m.off(d).removeData(f),k.is.ios()&&k.remove.ios(),p.off(o),S.off(o),A.off(o)},event:{clickaway:function(e){var t;l.closable&&(t=0<v.find(e.target).length||v.is(e.target),e=p.is(e.target),t&&(k.verbose("User clicked on dimmed page"),k.hide()),e)&&(k.verbose("User clicked on dimmable context (scaled out page)"),k.hide())},touch:function(e){},containScroll:function(e){b.scrollTop<=0&&(b.scrollTop=1),b.scrollTop+b.offsetHeight>=b.scrollHeight&&(b.scrollTop=b.scrollHeight-b.offsetHeight-1)},scroll:function(e){0===j(e.target).closest(t.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){k.verbose("Adding clickaway events to context",p),p.on("click"+o,k.event.clickaway).on("touchend"+o,k.event.clickaway)},scrollLock:function(){l.scrollLock&&(k.debug("Disabling page scroll"),(C=k.has.scrollbar())&&(k.save.bodyMargin(),k.set.bodyMargin()),p.addClass(c.locked)),k.verbose("Adding events to contain sidebar scroll"),A.on("touchmove"+o,k.event.touch),m.on("scroll"+d,k.event.containScroll)}},unbind:{clickaway:function(){k.verbose("Removing clickaway events from context",p),p.off(o)},scrollLock:function(){k.verbose("Removing scroll lock from page"),C&&k.restore.bodyMargin(),p.removeClass(c.locked),A.off(o),m.off("scroll"+d)}},add:{inlineCSS:function(){var e=k.cache.width||m.outerWidth(),t=k.cache.height||m.outerHeight(),n=k.is.rtl(),i=k.get.direction(),t={left:e,right:-e,top:t,bottom:-t};n&&(k.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),n="<style>","left"===i||"right"===i?(k.debug("Adding CSS rules for animation distance",e),n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),k.is.ie()&&("left"===i||"right"===i?(k.debug("Adding CSS rules for animation distance",e),n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { -webkit-transform: translate3d("+t[i]+"px, 0, 0); transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(n+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher::after { -webkit-transform: translate3d(0, "+t[i]+"px, 0); transform: translate3d(0, "+t[i]+"px, 0); }"),n+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher::after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher::after { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); }"),a=j(n+="</style>").appendTo(F),k.debug("Adding sizing css to head",a)}},refresh:function(){k.verbose("Refreshing selector cache"),p=[N,H].indexOf(l.context)<0?A.find(l.context):E,k.refreshSidebars(),v=p.children(t.pusher),p.children(t.fixed),k.clear.cache()},refreshSidebars:function(){k.verbose("Refreshing other sidebars"),h=p.children(t.sidebar)},repaint:function(){k.verbose("Forcing repaint event"),b.style.display="none";b.offsetHeight;b.scrollTop=b.scrollTop,b.style.display=""},setup:{cache:function(){k.cache={width:m.outerWidth(),height:m.outerHeight()}},layout:function(){0===p.children(t.pusher).length&&(k.debug("Adding wrapper element for sidebar"),k.error(u.pusher),v=j('<div class="pusher" />'),p.children().not(t.omitted).not(h).wrapAll(v),k.refresh()),0!==m.nextAll(t.pusher).length&&m.nextAll(t.pusher)[0]===v[0]||(k.debug("Moved sidebar to correct parent element"),k.error(u.movedSidebar,b),m.detach().prependTo(p),k.refresh()),k.clear.cache(),k.set.pushable(),k.set.direction()}},attachEvents:function(e,t){var n=j(e);t=j.isFunction(k[t])?k[t]:k.toggle,0<n.length?(k.debug("Attaching sidebar events to element",e,t),n.on("click"+d,t)):k.error(u.notFound,e)},can:{leftBodyScrollbar:function(){return k.cache.leftBodyScrollbar===z&&(k.cache.leftBodyScrollbar=k.is.rtl()&&(k.is.iframe&&!k.is.firefox()||k.is.safari()||k.is.edge()||k.is.ie())),k.cache.leftBodyScrollbar}},save:{bodyMargin:function(){x=p.css((g?"margin-":"padding-")+(k.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(x.replace(/[^\d.]/g,"")),t=g?N.innerWidth-H.documentElement.clientWidth:p[0].offsetWidth-p[0].clientWidth;w=e+t}},show:function(e){if(e=j.isFunction(e)?e:function(){},k.is.hidden())if(!1===l.onShow.call(b))k.verbose("Show callback returned false cancelling show");else{if(l.overlay&&(k.error(u.overlay),l.transition="overlay"),k.refresh(),k.othersActive())if(k.debug("Other sidebars currently visible"),l.exclusive){if("overlay"!=l.transition)return void k.hideOthers(k.show);k.hideOthers()}else l.transition="overlay";k.set.dimmerStyles(),k.pushPage(function(){e.call(b),l.onVisible.call(b)}),l.onChange.call(b)}else k.debug("Sidebar is already visible")},hide:function(e){e=j.isFunction(e)?e:function(){},(k.is.visible()||k.is.animating())&&!1!==l.onHide.call(b)&&(k.debug("Hiding sidebar",e),k.refreshSidebars(),k.pullPage(function(){e.call(b),l.onHidden.call(b)}),l.onChange.call(b))},othersAnimating:function(){return 0<h.not(m).filter("."+c.animating).length},othersVisible:function(){return 0<h.not(m).filter("."+c.visible).length},othersActive:function(){return k.othersVisible()||k.othersAnimating()},hideOthers:function(e){var t=h.not(m).filter("."+c.visible),n=t.length,i=0;e=e||function(){},t.sidebar("hide",function(){++i==n&&e()})},toggle:function(){k.verbose("Determining toggled direction"),k.is.hidden()?k.show():k.hide()},pushPage:function(t){var e,n,i=k.get.transition(),a="overlay"===i||k.othersActive()?m:v;t=j.isFunction(t)?t:function(){},l.returnScroll&&(r=(g?S:p).scrollTop()),"scale down"===l.transition&&k.scrollToTop(),k.bind.scrollLock(),k.set.transition(i),k.repaint(),i=function(){k.bind.clickaway(),k.add.inlineCSS(),k.set.animating(),k.set.visible()},e=function(){k.set.dimmed()},n=function(e){e.target==a[0]&&(a.off(s+o,n),k.remove.animating(),t.call(b))},a.off(s+o),a.on(s+o,n),q(i),l.dimPage&&!k.othersVisible()&&q(e)},pullPage:function(t){var e,n,i=k.get.transition(),a="overlay"==i||k.othersActive()?m:v;t=j.isFunction(t)?t:function(){},k.verbose("Removing context push state",k.get.direction()),k.unbind.clickaway(),k.unbind.scrollLock(),e=function(){k.set.transition(i),k.set.animating(),l.dimPage&&!k.othersVisible()&&k.set.closing(),k.remove.visible()},n=function(e){e.target==a[0]&&(a.off(s+o,n),k.remove.animating(),k.remove.closing(),k.remove.transition(),k.remove.inlineCSS(),"scale down"!==i&&!l.returnScroll||k.scrollBack(),l.dimPage&&!k.othersVisible()&&v.removeClass(c.dimmed),t.call(b))},a.off(s+o),a.on(s+o,n),q(e)},scrollToTop:function(){k.verbose("Scrolling to top of page to avoid animation issues"),m.scrollTop(0),(g?S:p)[0].scrollTo(0,0)},scrollBack:function(){k.verbose("Scrolling back to original page position"),(g?S:p)[0].scrollTo(0,r)},clear:{cache:function(){k.verbose("Clearing cached dimensions"),k.cache={}}},set:{bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";p.css((g?"margin-":"padding-")+n,w+"px"),p.find(t.bodyFixed.replace("right",n)).each(function(){var e=j(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+w+"px)")})},dimmerStyles:function(){l.blurring?v.addClass(c.blurring):v.removeClass(c.blurring)},ios:function(){M.addClass(c.ios)},pushed:function(){p.addClass(c.pushed)},pushable:function(){p.addClass(c.pushable)},dimmed:function(){v.addClass(c.dimmed)},active:function(){m.addClass(c.active)},animating:function(){m.addClass(c.animating)},closing:function(){v.addClass(c.closing)},transition:function(e){e=e||k.get.transition(),m.addClass(e)},direction:function(e){e=e||k.get.direction(),m.addClass(c[e])},visible:function(){m.addClass(c.visible)},overlay:function(){m.addClass(c.overlay)}},remove:{inlineCSS:function(){k.debug("Removing inline css styles",a),a&&0<a.length&&a.remove()},ios:function(){M.removeClass(c.ios)},pushed:function(){p.removeClass(c.pushed)},pushable:function(){p.removeClass(c.pushable)},active:function(){m.removeClass(c.active)},animating:function(){m.removeClass(c.animating)},closing:function(){v.removeClass(c.closing)},transition:function(e){e=e||k.get.transition(),m.removeClass(e)},direction:function(e){e=e||k.get.direction(),m.removeClass(c[e])},visible:function(){m.removeClass(c.visible)},overlay:function(){m.removeClass(c.overlay)}},restore:{bodyMargin:function(){var n=k.can.leftBodyScrollbar()?"left":"right";p.css((g?"margin-":"padding-")+n,x),p.find(t.bodyFixed.replace("right",n)).each(function(){var e=j(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},get:{direction:function(){return m.hasClass(c.top)?c.top:m.hasClass(c.right)?c.right:m.hasClass(c.bottom)?c.bottom:c.left},transition:function(){var e=k.get.direction(),e=k.is.mobile()?"auto"==l.mobileTransition?l.defaultTransition.mobile[e]:l.mobileTransition:"auto"==l.transition?l.defaultTransition.computer[e]:l.transition;return k.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=H.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(t.style[e]!==z)return n[e]}},has:{scrollbar:function(){return g||"hidden"!==p.css("overflow-y")}},is:{safari:function(){return k.cache.isSafari===z&&(k.cache.isSafari=/constructor/i.test(N.HTMLElement)||!!N.ApplePaySession),k.cache.isSafari},edge:function(){return k.cache.isEdge===z&&(k.cache.isEdge=!!N.setImmediate&&!k.is.ie()),k.cache.isEdge},firefox:function(){return k.cache.isFirefox===z&&(k.cache.isFirefox=!!N.InstallTrigger),k.cache.isFirefox},iframe:function(){return!(self===top)},ie:function(){var e,t;return k.cache.isIE===z&&(e=!N.ActiveXObject&&"ActiveXObject"in N,t="ActiveXObject"in N,k.cache.isIE=e||t),k.cache.isIE},ios:function(){var e=navigator.userAgent,t=e.match(i.ios),n=e.match(i.mobileChrome);return!(!t||n||(k.verbose("Browser was found to be iOS",e),0))},mobile:function(){var e=navigator.userAgent;return e.match(i.mobile)?(k.verbose("Browser was found to be mobile",e),!0):(k.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!k.is.visible()},visible:function(){return m.hasClass(c.visible)},open:function(){return k.is.visible()},closed:function(){return k.is.hidden()},vertical:function(){return m.hasClass(c.top)},animating:function(){return p.hasClass(c.animating)},rtl:function(){return k.cache.isRTL===z&&(k.cache.isRTL="rtl"===m.attr("dir")||"rtl"===m.css("direction")||"rtl"===E.attr("dir")||"rtl"===E.css("direction")||"rtl"===p.attr("dir")||"rtl"===p.css("direction")),k.cache.isRTL}},setting:function(e,t){if(k.debug("Changing setting",e,t),j.isPlainObject(e))j.extend(!0,l,e);else{if(t===z)return l[e];j.isPlainObject(l[e])?j.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(j.isPlainObject(e))j.extend(!0,k,e);else{if(t===z)return k[e];k[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,l.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),k.verbose.apply(console,arguments)))},error:function(){l.silent||(k.error=Function.prototype.bind.call(console.error,console,l.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(P||t),P=t,I.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){var e=l.name+":",n=0;P=!1,clearTimeout(k.performance.timer),j.each(I,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",O&&(e+=" '"+O+"'"),(console.group!==z||console.table!==z)&&0<I.length&&(console.groupCollapsed(e),console.table?console.table(I):j.each(I,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),I=[]}},invoke:function(i,e,t){var a,o,n,r=y;return e=e||V,t=t||b,"string"==typeof i&&r!==z&&(i=i.split(/[\. ]/),a=i.length-1,j.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(j.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==z)return o=r[n],!1;{if(!j.isPlainObject(r[t])||e==a)return r[t]!==z?o=r[t]:k.error(u.method,i),!1;r=r[t]}}})),j.isFunction(o)?n=o.apply(t,e):o!==z&&(n=o),Array.isArray(D)?D.push(n):D!==z?D=[D,n]:n!==z&&(D=n),o}};L?(y===z&&k.initialize(),k.invoke(R)):(y!==z&&k.invoke("destroy"),k.initialize())}),D!==z?D:this},j.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",blurring:"blurring",closing:"closing",dimmed:"dimmed",ios:"ios",locked:"locked",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}}}(jQuery,window,document),function(g,h,v,b){g.isFunction=g.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},g.site=g.fn.site=function(e){var s,i=(new Date).getTime(),a=[],t=e,n="string"==typeof t,l=[].slice.call(arguments,1),r=g.isPlainObject(e)?g.extend(!0,{},g.site.settings,e):g.extend({},g.site.settings),o=r.namespace,c=r.error,u="module-"+o,d=g(v),f=this,m=d.data(u),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),m=p,d.data(u,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),console!==b&&console.log!==b||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),h.console.group=function(){},h.console.groupEnd=function(){},h.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),h.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),h.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),h.requestAnimationFrame===b&&(p.debug("RequestAnimationFrame not available, normalizing event"),h.requestAnimationFrame=h.requestAnimationFrame||h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return g.fn[e]!==b&&g.fn[e].settings!==b},enabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)&&n.push(t)}),n}},disabled:{modules:function(e){var n=[];return e=e||r.modules,g.each(e,function(e,t){p.moduleExists(t)||n.push(t)}),n}},change:{setting:function(i,a,e,o){e="string"==typeof e?"all"===e?r.modules:[e]:e||r.modules,o=o===b||o,g.each(e,function(e,t){var n=!p.moduleExists(t)||g.fn[t].settings.namespace||!1;p.moduleExists(t)&&(p.verbose("Changing default setting",i,a,t),g.fn[t].settings[i]=a,o)&&n&&0<(n=g(":data(module-"+n+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i,a))})},settings:function(i,e,a){e="string"==typeof e?[e]:e||r.modules,a=a===b||a,g.each(e,function(e,t){var n;p.moduleExists(t)&&(p.verbose("Changing default setting",i,t),g.extend(!0,g.fn[t].settings,i),a)&&o&&0<(n=g(":data(module-"+o+")")).length&&(p.verbose("Modifying existing settings",n),n[t]("setting",i))})}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||r.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||r.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||r.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?m.cache.console===b?p.error(c.console):(p.debug("Restoring console function"),h.console=m.cache.console):(p.debug("Disabling console function"),m.cache.console=h.console,h.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",d),d.removeData(u)},cache:{},setting:function(e,t){if(g.isPlainObject(e))g.extend(!0,r,e);else{if(t===b)return r[e];r[e]=t}},internal:function(e,t){if(g.isPlainObject(e))g.extend(!0,p,e);else{if(t===b)return p[e];p[e]=t}},debug:function(){r.debug&&(r.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,r.name+":"),p.debug.apply(console,arguments)))},verbose:function(){r.verbose&&r.debug&&(r.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,r.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,r.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,n;r.performance&&(n=(t=(new Date).getTime())-(i||t),i=t,a.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){var e=r.name+":",n=0;i=!1,clearTimeout(p.performance.timer),g.each(a,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",(console.group!==b||console.table!==b)&&0<a.length&&(console.groupCollapsed(e),console.table?console.table(a):g.each(a,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),a=[]}},invoke:function(i,e,t){var a,o,n,r=m;return e=e||l,t=t||f,"string"==typeof i&&r!==b&&(i=i.split(/[\. ]/),a=i.length-1,g.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(g.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==b)return o=r[n],!1;{if(!g.isPlainObject(r[t])||e==a)return r[t]!==b?o=r[t]:p.error(c.method,i),!1;r=r[t]}}})),g.isFunction(o)?n=o.apply(t,e):o!==b&&(n=o),Array.isArray(s)?s.push(n):s!==b?s=[s,n]:n!==b&&(s=n),o}};return n?(m===b&&p.initialize(),p.invoke(t)):(m!==b&&p.destroy(),p.initialize()),s!==b?s:this},g.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","calendar","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","slider","rating","shape","sidebar","state","sticky","tab","toast","transition","visibility","visit"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},g.extend(g.expr[":"],{data:g.expr.createPseudo?g.expr.createPseudo(function(t){return function(e){return!!g.data(e,t)}}):function(e,t,n){return!!g.data(e,n[3])}})}(jQuery,window,document),function(U,t,Y,W){"use strict";t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),U.fn.slider=function(O){var P,e=U(this),I=U(t),R=e.selector||"",L=(new Date).getTime(),V=[],q=O,j="string"==typeof q,N=[].slice.call(arguments,1),H=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],z=0;return e.each(function(){var c,r,s,l,e,u,d,t,f,m,p,g,a,h,o,v,b=U.isPlainObject(O)?U.extend(!0,{},U.fn.slider.settings,O):U.extend({},U.fn.slider.settings),n=b.className,i=b.metadata,y=b.namespace,x=b.error,w=b.keys,C=b.interpretLabel,k=!1,T="."+y,D="module-"+y,S=U(this),A=this,E=S.data(D),M=1,F={initialize:function(){F.debug("Initializing slider",b),v=!0,t=z+=1,F.setup.layout(),F.setup.labels(),F.is.disabled()||F.bind.events(),F.read.metadata(),F.read.settings(),v=!1,F.instantiate()},instantiate:function(){F.verbose("Storing instance of slider",F),E=F,S.data(D,F)},destroy:function(){F.verbose("Destroying previous slider for",S),clearInterval(E.interval),F.unbind.events(),F.unbind.slidingEvents(),S.removeData(D),E=W},setup:{layout:function(){S.attr("tabindex")===W&&S.attr("tabindex",0),0==S.find(".inner").length&&S.append("<div class='inner'><div class='track'></div><div class='track-fill'></div><div class='thumb'></div></div>"),a=F.get.precision(),s=S.find(".thumb:not(.second)"),c=s,F.is.range()&&(0==S.find(".thumb.second").length&&S.find(".inner").append("<div class='thumb second'></div>"),l=S.find(".thumb.second")),e=S.find(".track"),u=S.find(".track-fill"),g=s.width()/2},labels:function(){F.is.labeled()&&(0!=(d=S.find(".labels:not(.auto)")).length?F.setup.customLabel():F.setup.autoLabel(),b.showLabelTicks)&&S.addClass(n.ticked)},customLabel:function(){var n,e=d.find(".label"),i=e.length,a=F.get.min(),o=F.get.max();e.each(function(e){var t=U(this).attr("data-value");n=t?((o<t?o:t<a?a:t)-a)/(o-a):(e+1)/(i+1),F.update.labelPosition(n,U(this))})},autoLabel:function(){0!=(d=S.find(".labels")).length?d.empty():d=S.append('<ul class="auto labels"></ul>').find(".labels");for(var e=0,t=F.get.numLabels();e<=t;e++){var n=F.get.label(e),n=""!==n?e%F.get.gapRatio()?U('<li class="halftick label"></li>'):U('<li class="label">'+n+"</li>"):null;n&&(F.update.labelPosition(e/t,n),d.append(n))}}},bind:{events:function(){F.bind.globalKeyboardEvents(),F.bind.keyboardEvents(),F.bind.mouseEvents(),b.autoAdjustLabels&&F.bind.windowEvents()},keyboardEvents:function(){F.verbose("Binding keyboard events"),S.on("keydown"+T,F.event.keydown)},globalKeyboardEvents:function(){U(Y).on("keydown"+T+t,F.event.activateFocus)},mouseEvents:function(){F.verbose("Binding mouse and touch events"),S.find(".track, .thumb, .inner").on("mousedown"+T,function(e){e.stopImmediatePropagation(),e.preventDefault(),F.event.down(e)}),S.on("mousedown"+T,F.event.down),S.on("mouseenter"+T,function(e){k=!0}),S.on("mouseleave"+T,function(e){k=!1}),S.find(".thumb").on("touchstart"+T,F.event.touchDown).on("touchmove"+T,F.event.move).on("touchend"+T,F.event.up).on("touchcancel"+T,F.event.touchCancel)},slidingEvents:function(){F.verbose("Binding page wide events while handle is being draged"),U(Y).on("mousemove"+T,F.event.move),U(Y).on("mouseup"+T,F.event.up)},windowEvents:function(){I.on("resize"+T,F.event.resize)}},unbind:{events:function(){S.find(".track, .thumb, .inner").off("mousedown"+T),S.off("mousedown"+T),S.off("mouseenter"+T),S.off("mouseleave"+T),S.find(".thumb").off("touchstart"+T).off("touchmove"+T).off("touchend"+T).off("touchcancel"+T),S.off("keydown"+T),S.off("focusout"+T),U(Y).off("keydown"+T+t,F.event.activateFocus),I.off("resize"+T)},slidingEvents:function(){U(Y).off("mousemove"+T),U(Y).off("mouseup"+T)}},event:{down:function(e){e.preventDefault(),F.is.range()?(e=F.determine.eventPos(e),e=F.determine.pos(e),c=b.preventCrossover&&F.is.range()&&F.thumbVal===F.secondThumbVal?(o=e,W):F.determine.closestThumb(e),h===W&&(h=F.get.currentThumbValue())):h===W&&(h=F.get.value()),F.is.disabled()||F.bind.slidingEvents()},touchDown:function(e){e.preventDefault(),e.stopImmediatePropagation(),r===W&&(c=U(e.target),e=e.touches?e:e.originalEvent,r=e.targetTouches[0].identifier,h===W)&&(h=F.get.currentThumbValue())},move:function(e){var t,n,i;"mousemove"==e.type&&e.preventDefault(),F.is.disabled()||(t=F.determine.valueFromEvent(e),"mousemove"==e.type&&c===W&&(n=F.determine.eventPos(e),n=F.determine.pos(n),c=n<o?s:l),0==F.get.step()||F.is.smooth()?(n=F.thumbVal,i=F.secondThumbVal,e=F.determine.smoothValueFromEvent(e),c.hasClass("second")?(b.preventCrossover&&F.is.range()&&(t=Math.max(n,t),e=Math.max(n,e)),i=t):(b.preventCrossover&&F.is.range()&&(t=Math.min(i,t),e=Math.min(i,e)),n=t),t=Math.abs(n-(i||0)),F.update.position(e),b.onMove.call(A,t,n,i)):F.update.value(t,function(e,t,n){b.onMove.call(A,e,t,n)}))},up:function(e){e.preventDefault(),F.is.disabled()||(e=F.determine.valueFromEvent(e),F.set.value(e),F.unbind.slidingEvents(),h!==(r=W)&&(h=W))},touchCancel:function(e){e.preventDefault(),h!==(r=W)&&(F.update.value(h),h=W)},keydown:function(e,t){if(b.preventCrossover&&F.is.range()&&F.thumbVal===F.secondThumbVal&&(c=W),F.is.focused()&&U(Y).trigger(e),t||F.is.focused()){t=F.determine.keyMovement(e);if(0!=t)switch(e.preventDefault(),t){case 1:F.takeStep();break;case 2:F.takeStep(F.get.multiplier());break;case-1:F.backStep();break;case-2:F.backStep(F.get.multiplier())}}},activateFocus:function(e){!F.is.focused()&&F.is.hover()&&0!=F.determine.keyMovement(e)&&(e.preventDefault(),F.event.keydown(e,!0),S.focus())},resize:function(e){M!=F.get.gapRatio()&&(F.setup.labels(),M=F.get.gapRatio())}},resync:function(){F.verbose("Resyncing thumb position based on value"),F.is.range()&&F.update.position(F.secondThumbVal,l),F.update.position(F.thumbVal,s),F.setup.labels()},takeStep:function(e){e=e!=W?e:1;var t=F.get.step(),n=F.get.currentThumbValue();F.verbose("Taking a step"),0<t?F.set.value(n+t*e):0==t&&(t=F.get.precision(),F.set.value(Math.round((n+e/t)*t)/t))},backStep:function(e){e=e!=W?e:1;var t=F.get.step(),n=F.get.currentThumbValue();F.verbose("Going back a step"),0<t?F.set.value(n-t*e):0==t&&(t=F.get.precision(),F.set.value(Math.round((n-e/t)*t)/t))},is:{range:function(){return S.hasClass(b.className.range)},hover:function(){return k},focused:function(){return S.is(":focus")},disabled:function(){return S.hasClass(b.className.disabled)},labeled:function(){return S.hasClass(b.className.labeled)},reversed:function(){return S.hasClass(b.className.reversed)},vertical:function(){return S.hasClass(b.className.vertical)},smooth:function(){return b.smooth||S.hasClass(b.className.smooth)}},get:{trackOffset:function(){return F.is.vertical()?e.offset().top:e.offset().left},trackLength:function(){return F.is.vertical()?e.height():e.width()},trackLeft:function(){return F.is.vertical()?e.position().top:e.position().left},trackStartPos:function(){return F.is.reversed()?F.get.trackLeft()+F.get.trackLength():F.get.trackLeft()},trackEndPos:function(){return F.is.reversed()?F.get.trackLeft():F.get.trackLeft()+F.get.trackLength()},trackStartMargin:function(){var e=F.is.vertical()?F.is.reversed()?S.css("padding-bottom"):S.css("padding-top"):F.is.reversed()?S.css("padding-right"):S.css("padding-left");return e||"0px"},trackEndMargin:function(){var e=F.is.vertical()?F.is.reversed()?S.css("padding-top"):S.css("padding-bottom"):F.is.reversed()?S.css("padding-left"):S.css("padding-right");return e||"0px"},precision:function(){var e=F.get.step(),e=(e=0!=e?2==(e=String(e).split(".")).length?e[1].length:0:b.decimalPlaces,Math.pow(10,e));return F.debug("Precision determined",e),e},min:function(){return b.min},max:function(){var e=F.get.step(),t=F.get.min(),n=0===e?0:Math.floor((b.max-t)/e);return 0==(0===e?0:(b.max-t)%e)?b.max:t+n*e},step:function(){return b.step},numLabels:function(){var e=Math.round((F.get.max()-F.get.min())/(0===F.get.step()?1:F.get.step()));return F.debug("Determined that there should be "+e+" labels"),e},labelType:function(){return b.labelType},label:function(e){if(C)return C(e);switch(b.labelType){case b.labelTypes.number:return Math.round((e*(0===F.get.step()?1:F.get.step())+F.get.min())*a)/a;case b.labelTypes.letter:return H[e%26];default:return e}},value:function(){return f},currentThumbValue:function(){return c!==W&&c.hasClass("second")?F.secondThumbVal:F.thumbVal},thumbValue:function(e){return"second"!==e?F.thumbVal:F.is.range()?F.secondThumbVal:void F.error(x.notrange)},multiplier:function(){return b.pageMultiplier},thumbPosition:function(e){return"second"!==e?m:F.is.range()?p:void F.error(x.notrange)},gapRatio:function(){var e=1;if(b.autoAdjustLabels){var t=F.get.numLabels(),n=F.get.trackLength(),i=1;if(0<n)for(;n/t*i<b.labelDistance;)t%i||(e=i),i+=1}return e}},determine:{pos:function(e){return F.is.reversed()?F.get.trackStartPos()-e+F.get.trackOffset():e-F.get.trackOffset()-F.get.trackStartPos()},closestThumb:function(e){var t=parseFloat(F.determine.thumbPos(s)),t=Math.abs(e-t),n=parseFloat(F.determine.thumbPos(l)),e=Math.abs(e-n);return(t!==e||F.get.thumbValue()!==F.get.min())&&t<=e?s:l},closestThumbPos:function(e){var t=parseFloat(F.determine.thumbPos(s)),n=Math.abs(e-t),i=parseFloat(F.determine.thumbPos(l));return n<=Math.abs(e-i)?t:i},thumbPos:function(e){return F.is.vertical()?F.is.reversed()?e.css("bottom"):e.css("top"):F.is.reversed()?e.css("right"):e.css("left")},positionFromValue:function(e){var t=F.get.min(),n=F.get.max(),e=n<e?n:e<t?t:e,i=F.get.trackLength(),n=Math.round((e-t)/(n-t)*i);return F.verbose("Determined position: "+n+" from value: "+e),n},positionFromRatio:function(e){var t=F.get.trackLength(),n=F.get.step(),e=Math.round(e*t);return 0==n?e:Math.round(e/n)*n},valueFromEvent:function(e){var e=F.determine.eventPos(e),t=F.determine.pos(e),e=e<F.get.trackOffset()?F.is.reversed()?F.get.max():F.get.min():e>F.get.trackOffset()+F.get.trackLength()?F.is.reversed()?F.get.min():F.get.max():F.determine.value(t);return e},smoothValueFromEvent:function(e){var t=F.get.min(),n=F.get.max(),i=F.get.trackLength(),e=F.determine.eventPos(e)-F.get.trackOffset(),e=(e<0?0:i<e?i:e)/i;return(e=F.is.reversed()?1-e:e)*(n-t)+t},eventPos:function(e){if("touchmove"===e.type||"touchend"===e.type){for(var t=e.touches?e:e.originalEvent,n=t.changedTouches[0],i=0;i<t.touches.length;i++)if(t.touches[i].identifier===r){n=t.touches[i];break}var a=n.pageY,o=n.pageX;return F.is.vertical()?a:o}a=e.pageY||e.originalEvent.pageY,o=e.pageX||e.originalEvent.pageX;return F.is.vertical()?a:o},value:function(e){var t=F.is.reversed()?F.get.trackEndPos():F.get.trackStartPos(),t=(e-t)/((F.is.reversed()?F.get.trackStartPos():F.get.trackEndPos())-t),n=F.get.max()-F.get.min(),i=F.get.step(),t=t*n,n=0==i?t:Math.round(t/i)*i;return F.verbose("Determined value based upon position: "+e+" as: "+t),t!=n&&F.verbose("Rounding value to closest step: "+n),F.verbose("Cutting off additional decimal places"),Math.round((n+F.get.min())*a)/a},keyMovement:function(e){var e=e.which,t=!F.is.vertical()||F.is.reversed()?w.downArrow:w.upArrow,n=!F.is.vertical()||F.is.reversed()?w.upArrow:w.downArrow,i=!F.is.vertical()&&F.is.reversed()?w.rightArrow:w.leftArrow,a=!F.is.vertical()&&F.is.reversed()?w.leftArrow:w.rightArrow;return e==t||e==i?-1:e==n||e==a?1:e==w.pageDown?-2:e==w.pageUp?2:0}},handleNewValuePosition:function(e){var t=F.get.min(),n=F.get.max();return e<=t?e=t:n<=e&&(e=n),F.determine.positionFromValue(e)},set:{value:function(i,a){a=!1!==a;var o=h===W;h=h===W?F.get.value():h,F.update.value(i,function(e,t,n){v&&!b.fireOnInit||!a||(i!==h&&b.onChange.call(A,e,t,n),b.onMove.call(A,e,t,n)),o&&(h=W)})},rangeValue:function(e,t,n){var i,a,o;n=!1!==n,F.is.range()?(i=F.get.min(),a=F.get.max(),h=(o=h===W)?F.get.value():h,e<=i?e=i:a<=e&&(e=a),t<=i?t=i:a<=t&&(t=a),F.thumbVal=e,F.secondThumbVal=t,f=Math.abs(F.thumbVal-F.secondThumbVal),F.update.position(F.thumbVal,s),F.update.position(F.secondThumbVal,l),v&&!b.fireOnInit||!n||(f!==h&&b.onChange.call(A,f,F.thumbVal,F.secondThumbVal),b.onMove.call(A,f,F.thumbVal,F.secondThumbVal)),o&&(h=W)):F.error(x.notrange)},position:function(e,t){e=F.determine.value(e);"second"===t?(F.secondThumbVal=e,F.update.position(e,l)):(F.thumbVal=e,F.update.position(e,s)),f=Math.abs(F.thumbVal-(F.secondThumbVal||0)),F.set.value(f)}},update:{value:function(e,t){var n=F.get.min(),i=F.get.max();e<=n?e=n:i<=e&&(e=i),F.is.range()?((c=c===W?e<=F.get.currentThumbValue()?s:l:c).hasClass("second")?(b.preventCrossover&&F.is.range()&&(e=Math.max(F.thumbVal,e)),F.secondThumbVal=e):(b.preventCrossover&&F.is.range()&&(e=Math.min(F.secondThumbVal,e)),F.thumbVal=e),f=Math.abs(F.thumbVal-F.secondThumbVal)):(f=e,F.thumbVal=f),F.update.position(e),F.debug("Setting slider value to "+f),"function"==typeof t&&t(f,F.thumbVal,F.secondThumbVal)},position:function(e,t){var n=F.handleNewValuePosition(e),t=t!=W?t:c,i=F.thumbVal||F.get.min(),a=F.secondThumbVal||F.get.min();F.is.range()&&t.hasClass("second")?(p=n,a=e):(m=n,i=e);var o,r=F.get.min(),s=F.get.max(),e=100*(e-r)/(s-r),l=100*(Math.min(i,a)-r)/(s-r),i=100*(1-(Math.max(i,a)-r)/(s-r)),a=F.is.vertical()?F.is.reversed()?(o={bottom:"calc("+e+"% - "+g+"px)",top:"auto"},{bottom:l+"%",top:i+"%"}):(o={top:"calc("+e+"% - "+g+"px)",bottom:"auto"},{top:l+"%",bottom:i+"%"}):F.is.reversed()?(o={right:"calc("+e+"% - "+g+"px)",left:"auto"},{right:l+"%",left:i+"%"}):(o={left:"calc("+e+"% - "+g+"px)",right:"auto"},{left:l+"%",right:i+"%"});t.css(o),u.css(a),F.debug("Setting slider position to "+n)},labelPosition:function(e,t){var n=F.get.trackStartMargin(),i=F.get.trackEndMargin(),a=F.is.vertical()?F.is.reversed()?"bottom":"top":F.is.reversed()?"right":"left",o=F.is.reversed()&&!F.is.vertical()?" - ":" + ";t.css(a,"calc("+("(100% - "+n+" - "+i+") * "+e)+o+n+")")}},goto:{max:function(){F.set.value(F.get.max())},min:function(){F.set.value(F.get.min())}},read:{metadata:function(){var e={thumbVal:S.data(i.thumbVal),secondThumbVal:S.data(i.secondThumbVal)};e.thumbVal&&(F.is.range()&&e.secondThumbVal?(F.debug("Current value set from metadata",e.thumbVal,e.secondThumbVal),F.set.rangeValue(e.thumbVal,e.secondThumbVal)):(F.debug("Current value set from metadata",e.thumbVal),F.set.value(e.thumbVal)))},settings:function(){!1!==b.start&&(F.is.range()?(F.debug("Start position set from settings",b.start,b.end),F.set.rangeValue(b.start,b.end)):(F.debug("Start position set from settings",b.start),F.set.value(b.start)))}},setting:function(e,t){if(F.debug("Changing setting",e,t),U.isPlainObject(e))U.extend(!0,b,e);else{if(t===W)return b[e];U.isPlainObject(b[e])?U.extend(!0,b[e],t):b[e]=t}},internal:function(e,t){if(U.isPlainObject(e))U.extend(!0,F,e);else{if(t===W)return F[e];F[e]=t}},debug:function(){!b.silent&&b.debug&&(b.performance?F.performance.log(arguments):(F.debug=Function.prototype.bind.call(console.info,console,b.name+":"),F.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?F.performance.log(arguments):(F.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),F.verbose.apply(console,arguments)))},error:function(){b.silent||(F.error=Function.prototype.bind.call(console.error,console,b.name+":"),F.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(L||t),L=t,V.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:A,"Execution Time":n})),clearTimeout(F.performance.timer),F.performance.timer=setTimeout(F.performance.display,500)},display:function(){var e=b.name+":",n=0;L=!1,clearTimeout(F.performance.timer),U.each(V,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",R&&(e+=" '"+R+"'"),(console.group!==W||console.table!==W)&&0<V.length&&(console.groupCollapsed(e),console.table?console.table(V):U.each(V,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),V=[]}},invoke:function(i,e,t){var a,o,n,r=E;return e=e||N,t=t||A,"string"==typeof i&&r!==W&&(i=i.split(/[\. ]/),a=i.length-1,U.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(U.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==W)return o=r[n],!1;{if(!U.isPlainObject(r[t])||e==a)return r[t]!==W?o=r[t]:F.error(x.method,i),!1;r=r[t]}}})),U.isFunction(o)?n=o.apply(t,e):o!==W&&(n=o),U.isArray(P)?P.push(n):P!==W?P=[P,n]:n!==W&&(P=n),o}};j?(E===W&&F.initialize(),F.invoke(q)):(E!==W&&E.invoke("destroy"),F.initialize())}),P!==W?P:this},U.fn.slider.settings={silent:!1,debug:!1,verbose:!1,performance:!0,name:"Slider",namespace:"slider",error:{method:"The method you called is not defined.",notrange:"This slider is not a range slider"},metadata:{thumbVal:"thumbVal",secondThumbVal:"secondThumbVal"},min:0,max:20,step:1,start:0,end:20,labelType:"number",showLabelTicks:!1,smooth:!1,autoAdjustLabels:!0,labelDistance:100,preventCrossover:!0,fireOnInit:!1,interpretLabel:!1,decimalPlaces:2,pageMultiplier:2,selector:{},className:{reversed:"reversed",disabled:"disabled",labeled:"labeled",ticked:"ticked",vertical:"vertical",range:"range",smooth:"smooth"},keys:{pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},labelTypes:{number:"number",letter:"letter"},onChange:function(e,t,n){},onMove:function(e,t,n){}}}(jQuery,window,document),function(F,O,P,I){"use strict";F.isWindow=F.isWindow||function(e){return null!=e&&e===e.window},F.isFunction=F.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.tab=function(l){var c,u=F.isFunction(this)?F(O):F(this),d=u.selector||"",f=(new Date).getTime(),D=[],S=l,A="string"==typeof S,E=[].slice.call(arguments,1),M=!1;return u.each(function(){var m,a,p,g,h,v=F.isPlainObject(l)?F.extend(!0,{},F.fn.tab.settings,l):F.extend({},F.fn.tab.settings),b=v.className,y=v.metadata,t=v.selector,x=v.error,n=v.regExp,e="."+v.namespace,i="module-"+v.namespace,w=F(this),o={},C=!0,r=0,k=this,s=w.data(i),T={initialize:function(){T.debug("Initializing tab menu item",w),T.fix.callbacks(),T.determineTabs(),T.debug("Determining tabs",v.context,a),v.auto&&T.set.auto(),T.bind.events(),v.history&&!M&&(T.initializeHistory(),M=!0);var e,t=T.determine.activeTab();v.autoTabActivation&&s===I&&null==t&&(t=!0===v.autoTabActivation?T.get.initialPath():v.autoTabActivation,T.debug("No active tab detected, setting tab active",t),T.changeTab(t)),null!=t&&v.history&&(e=F.address.autoUpdate(),F.address.autoUpdate(!1),F.address.value(t),F.address.autoUpdate(e)),T.instantiate()},instantiate:function(){T.verbose("Storing instance of module",T),s=T,w.data(i,T)},destroy:function(){T.debug("Destroying tabs",w),w.removeData(i).off(e)},bind:{events:function(){F.isWindow(k)||(T.debug("Attaching tab activation events to element",w),w.on("click"+e,T.event.click))}},determineTabs:function(){var e;"parent"===v.context?(0<w.closest(t.ui).length?(e=w.closest(t.ui),T.verbose("Using closest UI element as parent",e)):e=w,m=e.parent(),T.verbose("Determined parent element for creating context",m)):v.context?(m=[O,P].indexOf(v.context)<0?F(P).find(v.context):F(v.context),T.verbose("Using selector for tab context",v.context,m)):m=F("body"),v.childrenOnly?(a=m.children(t.tabs),T.debug("Searching tab context children for tabs",m,a)):(a=m.find(t.tabs),T.debug("Searching tab context for tabs",m,a))},fix:{callbacks:function(){F.isPlainObject(l)&&(l.onTabLoad||l.onTabInit)&&(l.onTabLoad&&(l.onLoad=l.onTabLoad,delete l.onTabLoad,T.error(x.legacyLoad,l.onLoad)),l.onTabInit&&(l.onFirstLoad=l.onTabInit,delete l.onTabInit,T.error(x.legacyInit,l.onFirstLoad)),v=F.extend(!0,{},F.fn.tab.settings,l))}},initializeHistory:function(){if(T.debug("Initializing page state"),F.address===I)return T.error(x.state),!1;if("state"==v.historyType){if(T.debug("Using HTML5 to manage state"),!1===v.path)return T.error(x.path),!1;F.address.history(!0).state(v.path),F(O).trigger("popstate")}F.address.bind("change",T.event.history.change)},event:{click:function(e){var t=F(this).data(y.tab);t!==I?(v.history?(T.verbose("Updating page state",e),F.address.value(t)):(T.verbose("Changing tab",e),T.changeTab(t)),e.preventDefault()):T.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||T.get.initialPath(),n=v.templates.determineTitle(t)||!1;T.performance.display(),T.debug("History change event",t,e),h=e,t!==I&&T.changeTab(t),n&&F.address.title(n)}}},refresh:function(){p&&(T.debug("Refreshing tab",p),T.changeTab(p))},cache:{read:function(e){return e!==I&&o[e]},add:function(e,t){e=e||p,T.debug("Adding cached content for",e),o[e]=t},remove:function(e){e=e||p,T.debug("Removing cached content for",e),delete o[e]}},escape:{string:function(e){return(e=String(e)).replace(n.escape,"\\$&")}},set:{auto:function(){var e="string"==typeof v.path?v.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";T.verbose("Setting up automatic tab retrieval from server",e),F.isPlainObject(v.apiSettings)?v.apiSettings.url=e:v.apiSettings={url:e}},loading:function(e){var t=T.get.tabElement(e);t.hasClass(b.loading)||(T.verbose("Setting loading state for",t),t.addClass(b.loading).siblings(a).removeClass(b.active+" "+b.loading),0<t.length&&v.onRequest.call(t[0],e))},state:function(e){F.address.value(e)}},changeTab:function(c){var u=O.history&&O.history.pushState&&v.ignoreFirstLoad&&C,d=v.auto||F.isPlainObject(v.apiSettings),f=d&&!u?T.utilities.pathToArray(c):T.get.defaultPathArray(c);c=T.utilities.arrayToPath(f),F.each(f,function(e,t){var n,i,a=f.slice(0,e+1),o=T.utilities.arrayToPath(a),r=T.is.tab(o),s=e+1==f.length,l=T.get.tabElement(o);return T.verbose("Looking for tab",t),r?(T.verbose("Tab was found",t),p=o,g=T.utilities.filterArray(f,a),s?i=!0:(r=f.slice(0,e+2),t=T.utilities.arrayToPath(r),(i=!T.is.tab(t))&&T.verbose("Tab parameters found",r)),!1===v.onBeforeChange.call(k,o)?(T.debug("onBeforeChange returned false, cancelling tab change",l),!1):i&&d?(u?(T.debug("Ignoring remote content on first tab load",o),C=!1,T.cache.add(c,l.html()),T.activate.all(o),v.onFirstLoad.call(l[0],o,g,h),v.onLoad.call(l[0],o,g,h)):(T.activate.navigation(o),T.fetch.content(o,c)),!1):(T.debug("Opened local tab",o),T.activate.all(o),T.cache.read(o)||(T.cache.add(o,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],o,g,h)),void v.onLoad.call(l[0],o,g,h))):-1!=c.search("/")||""===c?(T.error(x.missingTab,w,m,o),!1):(c=T.escape.string(c),o=(n=F("#"+c+', a[name="'+c+'"]')).closest("[data-tab]").data(y.tab),l=T.get.tabElement(o),n&&0<n.length&&o?(T.debug("Anchor link used, opening parent tab",l,n),!1===v.onBeforeChange.call(k,o)?T.debug("onBeforeChange returned false, cancelling tab change",l):(l.hasClass(b.active)||setTimeout(function(){T.scrollTo(n)},0),T.activate.all(o),T.cache.read(o)||(T.cache.add(o,!0),T.debug("First time tab loaded calling tab init"),v.onFirstLoad.call(l[0],o,g,h)),v.onLoad.call(l[0],o,g,h)),!1):void 0)})},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(T.debug("Forcing scroll to an in-page link in a hidden tab",t,e),F(P).scrollTop(t))},update:{content:function(e,t,n){var i=T.get.tabElement(e),a=i[0];n=n!==I?n:v.evaluateScripts,"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&"string"!=typeof t?i.empty().append(F(t).clone(!0)):n?(T.debug("Updating HTML and evaluating inline scripts",e,t),i.html(t)):(T.debug("Updating HTML",e,t),a.innerHTML=t)}},fetch:{content:function(t,n){var e,i=T.get.tabElement(t),a={dataType:"html",encodeParameters:!1,on:"now",cache:v.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(e){"response"==v.cacheType&&T.cache.add(n,e),T.update.content(t,e),t==p?(T.debug("Content loaded",t),T.activate.tab(t)):T.debug("Content loaded in background",t),v.onFirstLoad.call(i[0],t,g,h),v.onLoad.call(i[0],t,g,h),v.loadOnce?T.cache.add(n,!0):"string"==typeof v.cacheType&&"dom"==v.cacheType.toLowerCase()&&0<i.children().length?setTimeout(function(){var e=(e=i.children().clone(!0)).not("script");T.cache.add(n,e)},0):T.cache.add(n,i.html())},urlData:{tab:n}},o=i.api("get request")||!1,o=o&&"pending"===o.state();n=n||t,e=T.cache.read(n),v.cache&&e?(T.activate.tab(t),T.debug("Adding cached content",n),v.loadOnce||("once"==v.evaluateScripts?T.update.content(t,e,!1):T.update.content(t,e)),v.onLoad.call(i[0],t,g,h)):o?(T.set.loading(t),T.debug("Content is already loading",n)):F.api!==I?(e=F.extend(!0,{},v.apiSettings,a),T.debug("Retrieving remote content",n,e),T.set.loading(t),i.api(e)):T.error(x.api)}},activate:{all:function(e){T.activate.tab(e),T.activate.navigation(e)},tab:function(e){var t=T.get.tabElement(e),n="siblings"==v.deactivate?t.siblings(a):a.not(t),i=t.hasClass(b.active);T.verbose("Showing tab content for",t),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading),0<t.length&&v.onVisible.call(t[0],e))},navigation:function(e){var t=T.get.navElement(e),n="siblings"==v.deactivate?t.siblings(u):u.not(t),i=t.hasClass(b.active);T.verbose("Activating tab navigation for",t,e),i||(t.addClass(b.active),n.removeClass(b.active+" "+b.loading))}},deactivate:{all:function(){T.deactivate.navigation(),T.deactivate.tabs()},navigation:function(){u.removeClass(b.active)},tabs:function(){a.removeClass(b.active+" "+b.loading)}},is:{tab:function(e){return e!==I&&0<T.get.tabElement(e).length}},get:{initialPath:function(){return u.eq(0).data(y.tab)||a.eq(0).data(y.tab)},path:function(){return F.address.value()},defaultPathArray:function(e){return T.utilities.pathToArray(T.get.defaultPath(e))},defaultPath:function(e){var t=u.filter("[data-"+y.tab+'^="'+T.escape.string(e)+'/"]').eq(0).data(y.tab)||!1;if(t){if(T.debug("Found default tab",t),r<v.maxDepth)return r++,T.get.defaultPath(t);T.error(x.recursion)}else T.debug("No default tabs found for",e,a);return r=0,e},navElement:function(e){return e=e||p,u.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]')},tabElement:function(e){var t;return e=e||p,t=T.utilities.pathToArray(e),t=T.utilities.last(t),e=a.filter("[data-"+y.tab+'="'+T.escape.string(e)+'"]'),t=a.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]'),0<e.length?e:t},tab:function(){return p}},determine:{activeTab:function(){var n=null;return a.each(function(e,t){F(t).hasClass(b.active)&&(t=F(this).data(y.tab),u.filter("[data-"+y.tab+'="'+T.escape.string(t)+'"]').hasClass(b.active))&&(n=t)}),n}},utilities:{filterArray:function(e,t){return F.grep(e,function(e){return-1==F.inArray(e,t)})},last:function(e){return!!Array.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=e===I?p:e)?e.split("/"):[e]},arrayToPath:function(e){return!!Array.isArray(e)&&e.join("/")}},setting:function(e,t){if(T.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,v,e);else{if(t===I)return v[e];F.isPlainObject(v[e])?F.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,T,e);else{if(t===I)return T[e];T[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,v.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),T.verbose.apply(console,arguments)))},error:function(){v.silent||(T.error=Function.prototype.bind.call(console.error,console,v.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(f||t),f=t,D.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){var e=v.name+":",n=0;f=!1,clearTimeout(T.performance.timer),F.each(D,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",d&&(e+=" '"+d+"'"),(console.group!==I||console.table!==I)&&0<D.length&&(console.groupCollapsed(e),console.table?console.table(D):F.each(D,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),D=[]}},invoke:function(i,e,t){var a,o,n,r=s;return e=e||E,t=t||k,"string"==typeof i&&r!==I&&(i=i.split(/[\. ]/),a=i.length-1,F.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==I)return o=r[n],!1;{if(!F.isPlainObject(r[t])||e==a)return r[t]!==I?o=r[t]:T.error(x.method,i),!1;r=r[t]}}})),F.isFunction(o)?n=o.apply(t,e):o!==I&&(n=o),Array.isArray(c)?c.push(n):c!==I?c=[c,n]:n!==I&&(c=n),o}};A?(s===I&&T.initialize(),T.invoke(S)):(s!==I&&s.invoke("destroy"),T.initialize())}),c!==I?c:this},F.tab=function(){F(O).tab.apply(this,arguments)},F.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",autoTabActivation:!0,onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},onBeforeChange:function(e){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s:=@]/g},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}}}(jQuery,window,document),function(F,O,P,I){"use strict";F.isFunction=F.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},O=void 0!==O&&O.Math==Math?O:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.toast=F.fn.toast=function(C){var k,e=F(this),T=e.selector||"",D=(new Date).getTime(),S=[],A=C,E="string"==typeof A,M=[].slice.call(arguments,1);return e.each(function(){var n,i,o,a,r,s,l,e,c=F.isPlainObject(C)?F.extend(!0,{},F.fn.toast.settings,C):F.extend({},F.fn.toast.settings),u=c.className,d=c.selector,f=c.error,t=c.namespace,m=c.fields,p="."+t,g=t+"-module",h=F(this),v=c.context?[O,P].indexOf(c.context)<0?F(P).find(c.context):F(c.context):F("body"),b=h.hasClass("toast")||h.hasClass("message")||h.hasClass("card"),y=this,x=b?h.data(g):I,w={initialize:function(){w.verbose("Initializing element"),w.create.id(),w.has.container()||w.create.container(),(b||""!==c.message||""!==c.title||""!==w.get.iconClass()||c.showImage||w.has.configActions())&&("string"==typeof c.showProgress&&-1!==[u.top,u.bottom].indexOf(c.showProgress)||(c.showProgress=!1),w.create.toast(),c.closeOnClick&&(c.closeIcon||0<F(i).find(d.input).length||w.has.configActions())&&(c.closeOnClick=!1),c.closeOnClick||n.addClass(u.unclickable),w.bind.events()),w.instantiate(),n&&w.show()},instantiate:function(){w.verbose("Storing instance of toast"),x=w,h.data(g,x)},destroy:function(){n&&(w.debug("Removing toast",n),w.unbind.events(),n.remove(),s=i=n=I,c.onRemove.call(n,y),l=r=a=I),h.removeData(g)},show:function(e){!1===c.onShow.call(n,y)?w.debug("onShow callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Showing toast"),w.animate.show(e))},close:function(e){!1===c.onHide.call(n,y)?w.debug("onHide callback returned false, cancelling toast animation"):(e=e||function(){},w.debug("Closing toast"),w.remove.visible(),w.unbind.events(),w.animate.close(e))},create:{container:function(){w.verbose("Creating container"),v.append(F("<div/>",{class:c.position+" "+u.container+" "+(c.horizontal?u.horizontal:"")+" "+(c.context&&"body"!==c.context?u.absolute:"")}))},id:function(){e=(Math.random().toString(16)+"000000000").slice(2,10),w.verbose("Creating unique id for element",e)},toast:function(){n=F("<div/>",{class:u.box});var e,t=w.get.iconClass();b?(i=c.cloneModule?h.clone().removeAttr("id"):h,l=i.find("> i"+w.helpers.toClass(u.close)),c.closeIcon=0<l.length,""!==t&&i.find(d.icon).attr("class",t+" "+u.icon),c.showImage&&i.find(d.image).attr("src",c.showImage),""!==c.title&&i.find(d.title).html(w.helpers.escape(c.title,c.preserveHTML)),""!==c.message&&i.find(d.message).html(w.helpers.escape(c.message,c.preserveHTML))):(w.verbose("Creating toast"),i=F("<div/>",{role:"alert"}),e=F("<div/>",{class:u.content}),""!==t&&i.append(F("<i/>",{class:t+" "+u.icon})),c.showImage&&i.append(F("<img>",{class:u.image+" "+c.classImage,src:c.showImage})),""!==c.title&&(t="_"+w.get.id()+"title",i.attr("aria-labelledby",t),e.append(F("<div/>",{class:u.title,id:t,html:w.helpers.escape(c.title,c.preserveHTML)}))),t="_"+w.get.id()+"desc",i.attr("aria-describedby",t),e.append(F("<div/>",{class:u.message,id:t,html:w.helpers.escape(c.message,c.preserveHTML)})),i.addClass(c.class+" "+u.toast).append(e),i.css("opacity",c.opacity),c.closeIcon&&((l=F("<i/>",{class:u.close+" "+("string"==typeof c.closeIcon?c.closeIcon:""),role:"button",tabindex:0,"aria-label":c.text.close})).hasClass(u.left)?i.prepend(l):i.append(l))),i.hasClass(u.compact)&&(c.compact=!0),i.hasClass("card")&&(c.compact=!1),o=i.find(".actions"),w.has.configActions()&&(0===o.length&&(o=F("<div/>",{class:u.actions+" "+(c.classActions||"")}).appendTo(i)),i.hasClass("card")&&!o.hasClass(u.attached)&&(o.addClass(u.extraContent),o.hasClass(u.vertical))&&(o.removeClass(u.vertical),w.error(f.verticalCard)),c.actions.forEach(function(e){var t=e[m.icon]?"<i "+(e[m.text]?'aria-hidden="true"':"")+' class="'+w.helpers.deQuote(e[m.icon])+' icon"></i>':"",n=w.helpers.escape(e[m.text]||"",c.preserveHTML),i=w.helpers.deQuote(e[m.class]||""),a=e[m.click]&&F.isFunction(e[m.click])?e[m.click]:function(){};o.append(F("<button/>",{html:t+n,"aria-label":(e[m.text]||e[m.icon]||"").replace(/<[^>]+(>|$)/g,""),class:u.button+" "+i,click:function(){var e=F(this);e.is(d.approve)||e.is(d.deny)||!1===a.call(y,h)||w.close()}}))})),o&&o.hasClass(u.vertical)&&i.addClass(u.vertical),0<o.length&&!o.hasClass(u.attached)&&(!o||o.hasClass(u.basic)&&!o.hasClass(u.left)||i.addClass(u.actions)),"auto"===c.displayTime&&(c.displayTime=Math.max(c.minDisplayTime,i.text().split(" ").length/c.wordsPerMinute*6e4)),n.append(i),0<o.length&&o.hasClass(u.attached)&&(o.addClass(u.buttons),o.detach(),i.addClass(u.attached),o.hasClass(u.vertical)?(i.wrap(F("<div/>",{class:u.vertical+" "+u.attached+" "+(c.compact?u.compact:"")})),o.hasClass(u.left)?i.addClass(u.left).parent().addClass(u.left).prepend(o):i.parent().append(o)):o.hasClass(u.top)?(n.prepend(o),i.addClass(u.bottom)):(n.append(o),i.addClass(u.top))),h!==i&&(y=(h=i)[0]),0<c.displayTime&&(t=u.progressing+" "+(c.pauseOnHover?u.pausable:""),c.showProgress&&(a=F("<div/>",{class:u.progress+" "+(c.classProgress||c.class),"data-percent":""}),c.classProgress||(i.hasClass("toast")&&!i.hasClass(u.inverted)?a.addClass(u.inverted):a.removeClass(u.inverted)),r=F("<div/>",{class:"bar "+(c.progressUp?"up ":"down ")+t}),a.addClass(c.showProgress).append(r),a.hasClass(u.top)?n.prepend(a):n.append(a),r.css("animation-duration",c.displayTime/1e3+"s")),(s=F("<span/>",{class:"wait "+t})).css("animation-duration",c.displayTime/1e3+"s"),s.appendTo(i)),c.compact&&(n.addClass(u.compact),i.addClass(u.compact),a)&&a.addClass(u.compact),c.newestOnTop?n.prependTo(w.get.container()):n.appendTo(w.get.container())}},bind:{events:function(){w.debug("Binding events to toast"),c.closeIcon&&l.on("click"+p,w.event.close),i.on("click"+p,w.event.click),s&&s.on("animationend"+p,w.event.close),n.on("click"+p,d.approve,w.event.approve).on("click"+p,d.deny,w.event.deny)}},unbind:{events:function(){w.debug("Unbinding events to toast"),c.closeIcon&&l.off("click"+p),i.off("click"+p),s&&s.off("animationend"+p),n.off("click"+p)}},animate:{show:function(e){e=F.isFunction(e)?e:function(){},c.transition&&w.can.useElement("transition")&&h.transition("is supported")&&(w.set.visible(),n.transition({animation:c.transition.showMethod+" in",queue:!1,debug:c.debug,verbose:c.verbose,silent:c.silent,duration:c.transition.showDuration,onComplete:function(){e.call(n,y),c.onVisible.call(n,y)}}))},close:function(e){e=F.isFunction(e)?e:function(){},c.transition&&F.fn.transition!==I&&h.transition("is supported")?n.transition({animation:c.transition.hideMethod+" out",queue:!1,duration:c.transition.hideDuration,debug:c.debug,verbose:c.verbose,silent:c.silent,interval:50,onBeforeHide:function(e){e=F.isFunction(e)?e:function(){},""!==c.transition.closeEasing?n&&(n.css("opacity",0),n.wrap("<div/>").parent().hide(c.transition.closeDuration,c.transition.closeEasing,function(){n&&(n.parent().remove(),e.call(n))})):e.call(n)},onComplete:function(){e.call(n,y),c.onHidden.call(n,y),w.destroy()}}):w.error(f.noTransition)},pause:function(){s.css("animationPlayState","paused"),r&&r.css("animationPlayState","paused")},continue:function(){s.css("animationPlayState","running"),r&&r.css("animationPlayState","running")}},has:{container:function(){return w.verbose("Determining if there is already a container"),0<w.get.containers().length},toast:function(){return!!w.get.toast()},toasts:function(){return 0<w.get.toasts().length},configActions:function(){return Array.isArray(c.actions)&&0<c.actions.length}},get:{id:function(){return e},containers:function(){return v.children(w.helpers.toClass(c.position)+d.container+(c.horizontal?w.helpers.toClass(u.horizontal):":not("+w.helpers.toClass(u.horizontal)+")")+(c.context&&"body"!==c.context?w.helpers.toClass(u.absolute):":not("+w.helpers.toClass(u.absolute)+")"))},container:function(){return w.get.containers()[0]},toastBox:function(){return n||null},toast:function(){return i||null},toasts:function(){return F(w.get.container()).find(d.box)},iconClass:function(){return"string"==typeof c.showIcon?c.showIcon:c.showIcon&&c.icons[c.class]?c.icons[c.class]:""},remainingTime:function(){return s?s.css("opacity")*c.displayTime:0}},set:{visible:function(){i.addClass(u.visible)}},remove:{visible:function(){i.removeClass(u.visible)}},event:{close:function(){w.close()},click:function(e){0===F(e.target).closest(d.clickable).length&&(!1!==c.onClick.call(n,y)&&c.closeOnClick?w.close():w.verbose("Click callback returned false or close denied by setting cancelling close"))},approve:function(){!1===c.onApprove.call(y,h)?w.verbose("Approve callback returned false cancelling close"):w.close()},deny:function(){!1===c.onDeny.call(y,h)?w.verbose("Deny callback returned false cancelling close"):w.close()}},helpers:{toClass:function(e){var e=e.trim().split(/\s+/),t="";return e.forEach(function(e){t+="."+e}),t},deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){var n;return!t&&(n={"<":"<",">":">",'"':""","'":"'","`":"`"},/[&<>"'`]/.test(e))?(e=e.replace(/&(?![a-z0-9#]{1,12};)/gi,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{useElement:function(e){return F.fn[e]!==I||(w.error(f.noElement.replace("{element}",e)),!1)}},setting:function(e,t){if(w.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,c,e);else{if(t===I)return c[e];F.isPlainObject(c[e])?F.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,w,e);else{if(t===I)return w[e];w[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(D||t),D=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var e=c.name+":",n=0;D=!1,clearTimeout(w.performance.timer),F.each(S,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",T&&(e+=" '"+T+"'"),(console.group!==I||console.table!==I)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):F.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(i,e,t){var a,o,n,r=x;return e=e||M,t=t||y,"string"==typeof i&&r!==I&&(i=i.split(/[\. ]/),a=i.length-1,F.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(F.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==I)return o=r[n],!1;{if(!F.isPlainObject(r[t])||e==a)return r[t]!==I?o=r[t]:w.error(f.method,i),!1;r=r[t]}}})),F.isFunction(o)?n=o.apply(t,e):o!==I&&(n=o),Array.isArray(k)?k.push(n):k!==I?k=[k,n]:n!==I&&(k=n),o}};E?(x===I&&w.initialize(),w.invoke(A)):(x!==I&&x.invoke("destroy"),w.initialize(),k=h)}),k!==I?k:this},F.fn.toast.settings={name:"Toast",namespace:"toast",silent:!1,debug:!1,verbose:!1,performance:!0,context:"body",position:"top right",horizontal:!1,class:"neutral",classProgress:!1,classActions:!1,classImage:"mini",title:"",message:"",displayTime:3e3,minDisplayTime:1e3,wordsPerMinute:120,showIcon:!1,newestOnTop:!1,showProgress:!1,pauseOnHover:!0,progressUp:!1,opacity:1,compact:!0,closeIcon:!1,closeOnClick:!0,cloneModule:!0,actions:!1,preserveHTML:!0,showImage:!1,transition:{showMethod:"scale",showDuration:500,hideMethod:"scale",hideDuration:500,closeEasing:"easeOutCubic",closeDuration:500},error:{method:"The method you called is not defined.",noElement:"This module requires ui {element}",verticalCard:"Vertical but not attached actions are not supported for card layout"},className:{container:"ui toast-container",absolute:"absolute",box:"floating toast-box",progress:"ui attached active progress",toast:"ui toast",icon:"centered icon",visible:"visible",content:"content",title:"ui header",message:"message",actions:"actions",extraContent:"extra content",button:"ui button",buttons:"ui buttons",close:"close icon",image:"ui image",vertical:"vertical",horizontal:"horizontal",attached:"attached",inverted:"inverted",compact:"compact",pausable:"pausable",progressing:"progressing",top:"top",bottom:"bottom",left:"left",basic:"basic",unclickable:"unclickable"},text:{close:"Close"},icons:{info:"info",success:"checkmark",warning:"warning",error:"times"},selector:{container:".ui.toast-container",box:".toast-box",toast:".ui.toast",title:".header",message:".message:not(.ui)",image:"> img.image, > .image > img",icon:"> i.icon",input:'input:not([type="hidden"]), textarea, select, button, .ui.button, ui.dropdown',clickable:"a, details, .ui.accordion",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel"},fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onClick:function(){},onHide:function(){},onHidden:function(){},onRemove:function(){},onApprove:function(){},onDeny:function(){}},F.extend(F.easing,{easeOutBounce:function(e,t,n,i,a){return(t/=a)<1/2.75?i*(7.5625*t*t)+n:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+n:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+n:i*(7.5625*(t-=2.625/2.75)*t+.984375)+n},easeOutCubic:function(e){return--e*e*e+1}})}(jQuery,window,document),function(w,e,C,k){"use strict";w.isFunction=w.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},void 0!==e&&e.Math==Math||"undefined"!=typeof self&&self.Math==Math||Function("return this")(),w.fn.transition=function(){var m,r=w(this),p=r.selector||"",g=(new Date).getTime(),h=[],v=arguments,b=v[0],y=[].slice.call(arguments,1),x="string"==typeof b;return r.each(function(n){var l,s,t,c,i,a,e,o,u=w(this),d=this,f={initialize:function(){l=f.get.settings.apply(d,v),c=l.className,t=l.error,i=l.metadata,o="."+l.namespace,e="module-"+l.namespace,s=u.data(e)||f,a=f.get.animationEndEvent(),!1===(x=x&&f.invoke(b))&&(f.verbose("Converted arguments into settings object",l),l.interval?f.delay(l.interval):f.animate(),f.instantiate())},instantiate:function(){f.verbose("Storing instance of module",f),s=f,u.data(e,s)},destroy:function(){f.verbose("Destroying previous module for",d),u.removeData(e)},refresh:function(){f.verbose("Refreshing display type on next animation"),delete f.displayType},forceRepaint:function(){f.verbose("Forcing element repaint");var e=u.parent(),t=u.next();0===t.length?u.detach().appendTo(e):u.detach().insertBefore(t)},repaint:function(){f.verbose("Repainting element");d.offsetWidth},delay:function(e){var t=(t=f.get.animationDirection())||(f.can.transition()?f.get.direction():"static");e=e!==k?e:l.interval,t="auto"==l.reverse&&t==c.outward||!0===l.reverse?(r.length-n)*e:n*e,f.debug("Delaying animation by",t),setTimeout(f.animate,t)},animate:function(e){if(l=e||l,!f.is.supported())return f.error(t.support),!1;if(f.debug("Preparing animation",l.animation),f.is.animating()){if(l.queue)return!l.allowRepeats&&f.has.direction()&&f.is.occurring()&&!0!==f.queuing?f.debug("Animation is currently occurring, preventing queueing same animation",l.animation):f.queue(l.animation),!1;if(!l.allowRepeats&&f.is.occurring())return f.debug("Animation is already occurring, will not execute repeated animation",l.animation),!1;f.debug("New animation started, completing previous early",l.animation),s.complete()}f.can.animate()?f.set.animating(l.animation):f.error(t.noAnimation,l.animation,d)},reset:function(){f.debug("Resetting animation to beginning conditions"),f.remove.animationCallbacks(),f.restore.conditions(),f.remove.animating()},queue:function(e){f.debug("Queueing animation of",e),f.queuing=!0,u.one(a+".queue"+o,function(){f.queuing=!1,f.repaint(),f.animate.apply(this,l)})},complete:function(e){e&&e.target===d&&e.stopPropagation(),f.debug("Animation complete",l.animation),f.remove.completeCallback(),f.remove.failSafe(),f.is.looping()||(f.is.outward()?(f.verbose("Animation is outward, hiding element"),f.restore.conditions(),f.hide()):f.is.inward()?(f.verbose("Animation is outward, showing element"),f.restore.conditions(),f.show()):(f.verbose("Static animation completed"),f.restore.conditions(),l.onComplete.call(d)))},force:{visible:function(){var e=u.attr("style"),e=f.get.userStyle(e),t=f.get.displayType(),e=e+"display: "+t+" !important;",n=u[0].style.display;return!t||"none"===n&&l.skipInlineHidden||u[0].tagName.match(/(script|link|style)/i)?(f.remove.transition(),!1):(f.verbose("Overriding default display to show element",t),u.attr("style",e),!0)},hidden:function(){var e=u.attr("style"),t=u.css("display"),e=e===k||""===e;"none"===t||f.is.hidden()?e&&u.removeAttr("style"):(f.verbose("Overriding default display to hide element"),u.css("display","none"))}},has:{direction:function(e){var n=!1;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),w.each(e,function(e,t){t!==c.inward&&t!==c.outward||(n=!0)})),n},inlineDisplay:function(){var e=u.attr("style")||"";return Array.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){f.remove.completeCallback(),e=e||l.animation;e=f.get.animationClass(e);f.save.animation(e),f.force.visible()&&(f.remove.hidden(),f.remove.direction(),f.start.animation(e))},duration:function(e,t){!(t="number"==typeof(t=t||l.duration)?t+"ms":t)&&0!==t||(f.verbose("Setting animation duration",t),u.css({"animation-duration":t}))},direction:function(e){(e=e||f.get.direction())==c.inward?f.set.inward():f.set.outward()},looping:function(){f.debug("Transition set to loop"),u.addClass(c.looping)},hidden:function(){u.addClass(c.transition).addClass(c.hidden)},inward:function(){f.debug("Setting direction to inward"),u.removeClass(c.outward).addClass(c.inward)},outward:function(){f.debug("Setting direction to outward"),u.removeClass(c.inward).addClass(c.outward)},visible:function(){u.addClass(c.transition).addClass(c.visible)}},start:{animation:function(e){e=e||f.get.animationClass(),f.debug("Starting tween",e),u.addClass(e).one(a+".complete"+o,f.complete),l.useFailSafe&&f.add.failSafe(),f.set.duration(l.duration),l.onStart.call(d)}},save:{animation:function(e){f.cache||(f.cache={}),f.cache.animation=e},displayType:function(e){"none"!==e&&u.data(i.displayType,e)},transitionExists:function(e,t){w.fn.transition.exists[e]=t,f.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=f.get.currentAnimation();e&&(u.removeClass(e),f.verbose("Removing animation class",f.cache)),f.remove.duration()}},add:{failSafe:function(){var e=f.get.duration();f.timer=setTimeout(function(){u.triggerHandler(a)},e+l.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},remove:{animating:function(){u.removeClass(c.animating)},animationCallbacks:function(){f.remove.queueCallback(),f.remove.completeCallback()},queueCallback:function(){u.off(".queue"+o)},completeCallback:function(){u.off(".complete"+o)},display:function(){u.css("display","")},direction:function(){u.removeClass(c.inward).removeClass(c.outward)},duration:function(){u.css("animation-duration","")},failSafe:function(){f.verbose("Removing fail safe timer",f.timer),f.timer&&clearTimeout(f.timer)},hidden:function(){u.removeClass(c.hidden)},visible:function(){u.removeClass(c.visible)},looping:function(){f.debug("Transitions are no longer looping"),f.is.looping()&&(f.reset(),u.removeClass(c.looping))},transition:function(){u.removeClass(c.transition).removeClass(c.visible).removeClass(c.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?w.extend(!0,{},w.fn.transition.settings,e):"function"==typeof n?w.extend({},w.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?w.extend({},w.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?w.extend({},w.fn.transition.settings,t,{animation:e}):"function"==typeof t?w.extend({},w.fn.transition.settings,{animation:e,onComplete:t}):w.extend({},w.fn.transition.settings,{animation:e})},animationClass:function(e){var e=e||l.animation,t=f.can.transition()&&!f.has.direction()?f.get.direction()+" ":"";return c.animating+" "+c.transition+" "+t+e},currentAnimation:function(){return!(!f.cache||f.cache.animation===k)&&f.cache.animation},currentDirection:function(){return f.is.inward()?c.inward:c.outward},direction:function(){return f.is.hidden()||!f.is.visible()?c.inward:c.outward},animationDirection:function(e){var n;return"string"==typeof(e=e||l.animation)&&(e=e.split(" "),w.each(e,function(e,t){t===c.inward?n=c.inward:t===c.outward&&(n=c.outward)})),n||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||l.duration)?u.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return l.displayType||((e=e===k||e)&&u.data(i.displayType)===k&&(""===(e=u.css("display"))||"none"===e?f.can.transition(!0):f.save.displayType(e)),u.data(i.displayType))},userStyle:function(e){return(e=e||u.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return w.fn.transition.exists[e]},animationStartEvent:function(){var e,t=C.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(t.style[e]!==k)return n[e];return!1},animationEndEvent:function(){var e,t=C.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(t.style[e]!==k)return n[e];return!1}},can:{transition:function(e){var t,n,i,a,o=l.animation,r=f.get.transitionExists(o),s=f.get.displayType(!1);if(r===k||e){if(f.verbose("Determining whether animation exists"),e=u.attr("class"),t=u.prop("tagName"),n=(t=w("<"+t+" />").addClass(e).insertAfter(u)).addClass(o).removeClass(c.inward).removeClass(c.outward).addClass(c.animating).addClass(c.transition).css("animationName"),t.detach().insertAfter(u),i=t.addClass(c.inward).css("animationName"),s||(t.detach().insertAfter(u),s=t.attr("class",e).removeAttr("style").removeClass(c.hidden).removeClass(c.visible).show().css("display"),f.verbose("Determining final display state",s),f.save.displayType(s)),t.remove(),n!=i)f.debug("Direction exists for animation",o),a=!0;else{if("none"==n||!n)return void f.debug("No animation defined in css",o);f.debug("Static animation found",o,s),a=!1}f.save.transitionExists(o,a)}return r!==k?r:a},animate:function(){return f.can.transition()!==k}},is:{animating:function(){return u.hasClass(c.animating)},inward:function(){return u.hasClass(c.inward)},outward:function(){return u.hasClass(c.outward)},looping:function(){return u.hasClass(c.looping)},occurring:function(e){return e="."+(e=e||l.animation).replace(" ","."),0<u.filter(e).length},visible:function(){return u.is(":visible")},hidden:function(){return"hidden"===u.css("visibility")},supported:function(){return!1!==a}},hide:function(){if(!1===l.onHide.call(d))return f.verbose("Hide callback returned false cancelling hide"),!1;f.verbose("Hiding element"),f.is.animating()&&f.reset(),d.blur(),f.remove.display(),f.remove.visible(),l.onBeforeHide.call(d,f.hideNow)},hideNow:function(){f.set.hidden(),f.force.hidden(),l.onHidden.call(d),l.onComplete.call(d)},show:function(e){f.force.visible()&&!1!==l.onShow.call(d)&&(f.verbose("Showing element",e),f.remove.hidden(),l.onBeforeShow.call(d,f.showNow))},showNow:function(){f.set.visible(),l.onVisible.call(d),l.onComplete.call(d)},toggle:function(){f.is.visible()?f.hide():f.show()},stop:function(){f.debug("Stopping current animation"),u.triggerHandler(a)},stopAll:function(){f.debug("Stopping all animation"),f.remove.queueCallback(),u.triggerHandler(a)},clear:{queue:function(){f.debug("Clearing animation queue"),f.remove.queueCallback()}},enable:function(){f.verbose("Starting animation"),u.removeClass(c.disabled)},disable:function(){f.debug("Stopping animation"),u.addClass(c.disabled)},setting:function(e,t){if(f.debug("Changing setting",e,t),w.isPlainObject(e))w.extend(!0,l,e);else{if(t===k)return l[e];w.isPlainObject(l[e])?w.extend(!0,l[e],t):l[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,f,e);else{if(t===k)return f[e];f[e]=t}},debug:function(){!l.silent&&l.debug&&(l.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,l.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!l.silent&&l.verbose&&l.debug&&(l.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,l.name+":"),f.verbose.apply(console,arguments)))},error:function(){l.silent||(f.error=Function.prototype.bind.call(console.error,console,l.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,n;l.performance&&(n=(t=(new Date).getTime())-(g||t),g=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":n})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var e=l.name+":",n=0;g=!1,clearTimeout(f.performance.timer),w.each(h,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",p&&(e+=" '"+p+"'"),1<r.length&&(e+=" ("+r.length+")"),(console.group!==k||console.table!==k)&&0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):w.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(i,e,t){var a,o,n,r=s;return e=e||y,t=t||d,"string"==typeof i&&r!==k&&(i=i.split(/[\. ]/),a=i.length-1,w.each(i,function(e,t){var n=e!=a?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(w.isPlainObject(r[n])&&e!=a)r=r[n];else{if(r[n]!==k)return o=r[n],!1;{if(!w.isPlainObject(r[t])||e==a)return r[t]!==k&&(o=r[t]),!1;r=r[t]}}})),w.isFunction(o)?n=o.apply(t,e):o!==k&&(n=o),Array.isArray(m)?m.push(n):m!==k?m=[m,n]:n!==k&&(m=n),o!==k&&o}};f.initialize()}),m!==k?m:this},w.fn.transition.exists={},w.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onBeforeShow:function(e){e.call(this)},onVisible:function(){},onHide:function(){},onHidden:function(){},onBeforeHide:function(e){e.call(this)},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,skipInlineHidden:!1,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate. Use silent setting to suppress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}}}(jQuery,window,document); |