fomantic-ui 2.9.3-beta.1 → 2.9.3-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.all-contributorsrc +9 -0
- package/CONTRIBUTORS.md +102 -99
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -5
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +14 -8
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +6 -6
- package/dist/components/calendar.js +1 -6
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -5
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -5
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +19 -2
- package/dist/components/dropdown.js +29 -14
- package/dist/components/dropdown.min.css +2 -2
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -6
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +1 -1
- package/dist/components/flyout.js +40 -27
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +52 -5
- package/dist/components/form.js +32 -24
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +21 -2
- package/dist/components/label.min.css +2 -2
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/menu.css +9 -3
- package/dist/components/menu.min.css +2 -2
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +6 -3
- package/dist/components/modal.js +44 -32
- package/dist/components/modal.min.css +2 -2
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +16 -8
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +41 -40
- package/dist/components/popup.js +25 -17
- package/dist/components/popup.min.css +2 -2
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -6
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -5
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +3 -6
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +29 -6
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -5
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +15 -8
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +122 -31
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +23 -20
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +17 -16
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +14 -6
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +6 -1
- package/dist/components/toast.js +17 -9
- package/dist/components/toast.min.css +2 -2
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -5
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +15 -6
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +264 -114
- package/dist/semantic.js +437 -282
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +13 -7
- package/src/definitions/behaviors/form.js +31 -23
- package/src/definitions/behaviors/state.js +22 -19
- package/src/definitions/behaviors/visibility.js +14 -5
- package/src/definitions/collections/breadcrumb.less +2 -1
- package/src/definitions/collections/form.less +26 -5
- package/src/definitions/collections/grid.less +2 -1
- package/src/definitions/collections/menu.less +29 -21
- package/src/definitions/collections/message.less +2 -1
- package/src/definitions/collections/table.less +2 -1
- package/src/definitions/elements/button.less +3 -1
- package/src/definitions/elements/container.less +2 -1
- package/src/definitions/elements/divider.less +2 -1
- package/src/definitions/elements/emoji.less +2 -1
- package/src/definitions/elements/flag.less +2 -1
- package/src/definitions/elements/header.less +2 -1
- package/src/definitions/elements/icon.less +2 -1
- package/src/definitions/elements/image.less +2 -1
- package/src/definitions/elements/input.less +2 -1
- package/src/definitions/elements/label.less +23 -2
- package/src/definitions/elements/list.less +2 -1
- package/src/definitions/elements/loader.less +2 -1
- package/src/definitions/elements/placeholder.less +2 -1
- package/src/definitions/elements/rail.less +2 -1
- package/src/definitions/elements/reveal.less +2 -1
- package/src/definitions/elements/segment.less +37 -11
- package/src/definitions/elements/step.less +2 -1
- package/src/definitions/elements/text.less +2 -1
- package/src/definitions/globals/reset.less +2 -1
- package/src/definitions/globals/site.less +2 -1
- package/src/definitions/modules/accordion.js +0 -4
- package/src/definitions/modules/accordion.less +2 -1
- package/src/definitions/modules/calendar.js +0 -5
- package/src/definitions/modules/calendar.less +3 -2
- package/src/definitions/modules/checkbox.js +0 -4
- package/src/definitions/modules/checkbox.less +2 -1
- package/src/definitions/modules/dimmer.js +0 -4
- package/src/definitions/modules/dimmer.less +2 -1
- package/src/definitions/modules/dropdown.js +28 -13
- package/src/definitions/modules/dropdown.less +22 -2
- package/src/definitions/modules/embed.js +0 -5
- package/src/definitions/modules/embed.less +2 -1
- package/src/definitions/modules/flyout.js +39 -26
- package/src/definitions/modules/flyout.less +2 -1
- package/src/definitions/modules/modal.js +43 -31
- package/src/definitions/modules/modal.less +7 -3
- package/src/definitions/modules/nag.js +15 -7
- package/src/definitions/modules/nag.less +3 -1
- package/src/definitions/modules/popup.js +24 -16
- package/src/definitions/modules/popup.less +42 -39
- package/src/definitions/modules/progress.js +0 -5
- package/src/definitions/modules/progress.less +2 -1
- package/src/definitions/modules/rating.js +0 -4
- package/src/definitions/modules/rating.less +2 -1
- package/src/definitions/modules/search.js +2 -5
- package/src/definitions/modules/search.less +2 -1
- package/src/definitions/modules/shape.js +0 -4
- package/src/definitions/modules/shape.less +2 -1
- package/src/definitions/modules/sidebar.js +14 -7
- package/src/definitions/modules/sidebar.less +2 -1
- package/src/definitions/modules/slider.js +121 -30
- package/src/definitions/modules/slider.less +2 -1
- package/src/definitions/modules/sticky.js +16 -15
- package/src/definitions/modules/sticky.less +2 -1
- package/src/definitions/modules/tab.js +13 -5
- package/src/definitions/modules/tab.less +2 -1
- package/src/definitions/modules/toast.js +16 -8
- package/src/definitions/modules/toast.less +9 -1
- package/src/definitions/modules/transition.js +0 -4
- package/src/definitions/modules/transition.less +2 -1
- package/src/definitions/views/ad.less +2 -1
- package/src/definitions/views/card.less +2 -1
- package/src/definitions/views/comment.less +2 -1
- package/src/definitions/views/feed.less +2 -1
- package/src/definitions/views/item.less +2 -1
- package/src/definitions/views/statistic.less +2 -1
- package/src/overrides.less +7 -0
- package/src/theme.less +7 -6
- package/src/themes/default/elements/label.variables +5 -0
- package/src/themes/default/elements/segment.variables +4 -0
- package/src/themes/default/globals/site.variables +3 -0
- package/src/themes/default/modules/dropdown.variables +3 -0
- package/src/themes/default/modules/modal.variables +1 -0
- package/src/themes/default/modules/popup.variables +3 -1
- package/src/themes/default/modules/toast.variables +1 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.11+980ea5e
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(O,P,j){"use strict";function C(e){return null!==e&&e===e.window}function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.api=function(q){var x,e=E(this)?O(P):O(this),A=e.selector||"",k=Date.now(),S=[],T=q,w="string"==typeof T,D=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=O.isPlainObject(q)?O.extend(!0,{},O.fn.api.settings,q):O.extend({},O.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=O(this),m=g.closest(u.form),v=f.stateContext?[P,j].indexOf(f.stateContext)<0?O(j).find(f.stateContext):O(f.stateContext):g,b=this,h=v[0],y=g.data(p),R={initialize:function(){w||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",b),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"===f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==P.Storage)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){void 0===P.Storage?R.error(c.noStorage):(O.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&O.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=O.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||v.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"===R.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&E(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"===R.request.state()},failure:function(){return R.request&&"rejected"===R.request.state()},complete:function(){return R.request&&("resolved"===R.request.state()||"rejected"===R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),O.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];if(void 0===n)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),O.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];o=void 0!==n?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=O.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},O.each(O('input[type="file"]',m),function(e,r){O.each(O(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),O.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r="checkbox"===O('[name="'+t.name+'"]',m).attr("type"),n=parseFloat(t.value),o=r&&"on"===t.value||"true"===t.value||(String(n)===t.value?n:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[]$/,"");s in u?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(u[s]=0,c[s]=o),-1===s.indexOf("[]")&&(o=c[s]);for(;0<a.length;){var i=a.pop();""!==i||Array.isArray(o)?f.regExp.fixed.test(i)?o=d([],i,o):f.regExp.named.test(i)&&(o=d({},i,o)):o=d([],u[s]++,o)}l=O.extend(!0,l,o)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(O.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):O.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o,a=!!E(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,O.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"===t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"===t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"===t&&void 0!==e&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&void 0!==r&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return O.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=O.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=E(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):E(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=O.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",v),v.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",v),v.addClass(d.loading),s=Date.now()}},remove:{error:function(){R.verbose("Removing error state from element",v),v.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",v),v.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!O.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return O.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==f.error[t]?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(void 0!==e.success&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&R.error(c.noReturnedValue),!1===e?e:void 0!==e?O.extend(!0,{},e):O.extend(!0,{},f)},urlEncodedValue:function(e){var t=P.decodeURIComponent(e),r=P.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return C(b)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return C(b)||"now"===f.on?(R.debug("API called without element, no events attached"),!1):"auto"===f.on?g.is("input")?void 0!==b.oninput?"input":void 0!==b.onpropertychange?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||g.data(i.action)||!1,r=f.url||g.data(i.url)||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),void 0===f.api[e]&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||v.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,f,e);else{if(void 0===t)return f[e];O.isPlainObject(f[e])?O.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,R,e);else{if(void 0===t)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=Date.now())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),O.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):O.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||D,t=t||b,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,O.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(O.isPlainObject(s[r])&&e!==o)s=s[r];else{if(void 0!==s[r])return a=s[r],!1;{if(!O.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),E(a)?r=a.apply(t,e):void 0!==a&&(r=a),Array.isArray(x)?x.push(r):void 0!==x?x=[x,r]:void 0!==r&&(x=r),a}};w?(void 0===y&&R.initialize(),R.invoke(T)):(void 0!==y&&y.invoke("destroy"),R.initialize())}),void 0!==x?x:this},O.api=O.fn.api,O.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:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|
11
|
+
!function(O,P,n){"use strict";function j(e){return null!==e&&e===e.window}function E(e){return"function"==typeof e&&"number"!=typeof e.nodeType}P=void 0!==P&&P.Math===Math?P:globalThis,O.fn.api=function(q){var x,e=E(this)?O(P):O(this),A=Date.now(),k=[],S=q,T="string"==typeof S,w=[].slice.call(arguments,1),D=function(e,t){var r;return 0<=[P,n].indexOf(e)?r=O(e):0===(r=O(t.document).find(e)).length&&(r=t.frameElement?D(e,t.parent):P),r};return e.each(function(){var a,n,r,e,s,o,f=O.isPlainObject(q)?O.extend(!0,{},O.fn.api.settings,q):O.extend({},O.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=O(this),m=g.closest(u.form),v=f.stateContext?D(f.stateContext,P):g,b=this,h=v[0],y=g.data(p),R={initialize:function(){T||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",b),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"===f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==P.Storage)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){void 0===P.Storage?R.error(c.noStorage):(O.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&O.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=O.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||v.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"===R.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&E(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"===R.request.state()},failure:function(){return R.request&&"rejected"===R.request.state()},complete:function(){return R.request&&("resolved"===R.request.state()||"rejected"===R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),O.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];if(void 0===n)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),O.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=O.isPlainObject(a)&&void 0!==a[r]?a[r]:void 0!==g.data(r)?g.data(r):void 0!==v.data(r)?v.data(r):a[r];o=void 0!==n?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=O.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},O.each(O('input[type="file"]',m),function(e,r){O.each(O(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),O.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r="checkbox"===O('[name="'+t.name+'"]',m).attr("type"),n=parseFloat(t.value),o=r&&"on"===t.value||"true"===t.value||(String(n)===t.value?n:"false"!==t.value&&t.value),a=t.name.match(f.regExp.key)||[],s=t.name.replace(/\[]$/,"");s in u?Array.isArray(c[s])?c[s].push(o):c[s]=[c[s],o]:(u[s]=0,c[s]=o),-1===s.indexOf("[]")&&(o=c[s]);for(;0<a.length;){var i=a.pop();""!==i||Array.isArray(o)?f.regExp.fixed.test(i)?o=d([],i,o):f.regExp.named.test(i)&&(o=d({},i,o)):o=d([],u[s]++,o)}l=O.extend(!0,l,o)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(O.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):O.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!==e.type&&"click"!==e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o,a=!!E(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,O.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=Date.now()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"===t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"===t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"===t&&void 0!==e&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&void 0!==r&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return O.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=O.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=E(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):E(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=O.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",v),v.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",v),v.addClass(d.loading),s=Date.now()}},remove:{error:function(){R.verbose("Removing error state from element",v),v.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",v),v.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!O.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return O.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==f.error[t]?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(void 0!==e.success&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&R.error(c.noReturnedValue),!1===e?e:void 0!==e?O.extend(!0,{},e):O.extend(!0,{},f)},urlEncodedValue:function(e){var t=P.decodeURIComponent(e),r=P.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return j(b)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return j(b)||"now"===f.on?(R.debug("API called without element, no events attached"),!1):"auto"===f.on?g.is("input")?void 0!==b.oninput?"input":void 0!==b.onpropertychange?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||f.action||g.data(i.action)||!1,r=f.url||g.data(i.url)||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),void 0===f.api[e]&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||v.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),O.isPlainObject(e))O.extend(!0,f,e);else{if(void 0===t)return f[e];O.isPlainObject(f[e])?O.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,R,e);else{if(void 0===t)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=Date.now())-(A||t),A=t,k.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;A=!1,clearTimeout(R.performance.timer),O.each(k,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",0<k.length&&(console.groupCollapsed(e),console.table?console.table(k):O.each(k,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),k=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||w,t=t||b,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),o=n.length-1,O.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(O.isPlainObject(s[r])&&e!==o)s=s[r];else{if(void 0!==s[r])return a=s[r],!1;{if(!O.isPlainObject(s[t])||e===o)return void 0!==s[t]?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),E(a)?r=a.apply(t,e):void 0!==a&&(r=a),Array.isArray(x)?x.push(r):void 0!==x?x=[x,r]:void 0!==r&&(x=r),a}};T?(void 0===y&&R.initialize(),R.invoke(S)):(void 0!==y&&y.invoke("destroy"),R.initialize())}),void 0!==x?x:this},O.api=O.fn.api,O.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:/{\$*[\da-z]+}/gi,optional:/{\/\$*[\da-z]+}/gi,validate:/^[_a-z][\w-]*(?:\[[\w-]*])*$/i,key:/[\w-]+|(?=\[])/gi,push:/^$/,fixed:/^\d+$/,named:/^[\w-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.11+980ea5e - Calendar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -148,20 +148,20 @@
|
|
148
148
|
color: rgba(255, 255, 255, 0.8);
|
149
149
|
background: rgba(255, 255, 255, 0.02);
|
150
150
|
}
|
151
|
-
.ui.calendar.popup > .ui.ui.grid {
|
151
|
+
.ui.ui.ui.calendar.popup > .ui.ui.grid {
|
152
152
|
margin: -1rem;
|
153
153
|
}
|
154
|
-
.ui.calendar.popup > .ui.ui.grid > .column:not(:first-child) {
|
154
|
+
.ui.ui.ui.calendar.popup > .ui.ui.grid > .column:not(:first-child) {
|
155
155
|
padding-left: 0;
|
156
156
|
}
|
157
|
-
.ui.calendar.popup > .ui.ui.grid > .column:not(:first-child) > .ui.table {
|
157
|
+
.ui.ui.ui.calendar.popup > .ui.ui.grid > .column:not(:first-child) > .ui.table {
|
158
158
|
border-top-left-radius: 0;
|
159
159
|
border-bottom-left-radius: 0;
|
160
160
|
}
|
161
|
-
.ui.calendar.popup > .ui.ui.grid > .column:not(:last-child) {
|
161
|
+
.ui.ui.ui.calendar.popup > .ui.ui.grid > .column:not(:last-child) {
|
162
162
|
padding-right: 0;
|
163
163
|
}
|
164
|
-
.ui.calendar.popup > .ui.ui.grid > .column:not(:last-child) > .ui.table {
|
164
|
+
.ui.ui.ui.calendar.popup > .ui.ui.grid > .column:not(:last-child) > .ui.table {
|
165
165
|
border-top-right-radius: 0;
|
166
166
|
border-bottom-right-radius: 0;
|
167
167
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.11+980ea5e - Calendar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -24,8 +24,6 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
$document = $(document),
|
26
26
|
|
27
|
-
moduleSelector = $allModules.selector || '',
|
28
|
-
|
29
27
|
time = Date.now(),
|
30
28
|
performance = [],
|
31
29
|
|
@@ -1494,9 +1492,6 @@
|
|
1494
1492
|
totalTime += data['Execution Time'];
|
1495
1493
|
});
|
1496
1494
|
title += ' ' + totalTime + 'ms';
|
1497
|
-
if (moduleSelector) {
|
1498
|
-
title += ' \'' + moduleSelector + '\'';
|
1499
|
-
}
|
1500
1495
|
if (performance.length > 0) {
|
1501
1496
|
console.groupCollapsed(title);
|
1502
1497
|
if (console.table) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.11+980ea5e - Calendar
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
6
6
|
* Released under the MIT license
|
7
7
|
* https://opensource.org/licenses/MIT
|
8
8
|
*
|
9
|
-
*/.ui.calendar.popup{max-width:none;padding:0;border:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ui.calendar.popup.inverted::before{background:#2b2b2b}.ui.calendar .calendar:focus,.ui.calendar.popup:focus{outline:0}.ui.calendar.popup .ui.grid{display:block;white-space:nowrap}.ui.calendar.popup .ui.grid>.column{width:auto}.ui.calendar .ui.table.minute,.ui.calendar .ui.table.month,.ui.calendar .ui.table.year{min-width:15em}.ui.calendar .ui.table.day{min-width:18em}.ui.calendar .ui.table.day.andweek{min-width:22em}.ui.calendar .ui.table.hour{min-width:20em}.ui.calendar .ui.table tr td,.ui.calendar .ui.table tr th{padding:.5em;white-space:nowrap}.ui.calendar .ui.table tr th{border-left:none}.ui.calendar .ui.table tr th i.icon{margin:0}.ui.calendar .ui.table tr:first-child th{position:relative;padding-left:0;padding-right:0}.ui.calendar .ui.table.day tr:first-child th{border:none}.ui.calendar .ui.table.day tr:nth-child(2) th{padding-top:.2em;padding-bottom:.3em}.ui.calendar .ui.table tr td{padding-left:.1em;padding-right:.1em}.ui.calendar .ui.table tr .link{cursor:pointer}.ui.calendar .ui.table tr .prev.link{width:14.28571%;position:absolute;left:0}.ui.calendar .ui.table tr .next.link{width:14.28571%;position:absolute;right:0}.ui.ui.calendar .ui.table tr .disabled{pointer-events:auto;cursor:default;color:rgba(40,40,40,.3)}.ui.calendar .ui.table tr .adjacent:not(.disabled):not(.active){color:rgba(0,0,0,.6);background:rgba(0,0,0,.03)}.ui.calendar .ui.table tr td.today{font-weight:700}.ui.calendar .ui.table tr td.range{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95);box-shadow:none}.ui.calendar:not(.disabled).popup.active .ui.table tbody tr td.focus,.ui.calendar:not(.disabled):focus .ui.table tbody tr td.focus{box-shadow:inset 0 0 0 1px #85b7d9}.ui.inverted.calendar .ui.table.inverted tr td.range{background:rgba(255,255,255,.08);color:#fff;box-shadow:none}.ui.inverted.calendar:not(.disabled) .calendar:focus .ui.table.inverted tbody tr td.focus,.ui.inverted.calendar:not(.disabled).popup.active .ui.table.inverted tbody tr td.focus{box-shadow:inset 0 0 0 1px #85b7d9}.ui.inverted.calendar .ui.ui.ui.inverted.table tr .disabled{color:rgba(225,225,225,.3)}.ui.inverted.calendar .ui.inverted.table tr .adjacent:not(.disabled):not(.active){color:rgba(255,255,255,.8);background:rgba(255,255,255,.02)}.ui.calendar.popup>.ui.ui.grid{margin:-1rem}.ui.calendar.popup>.ui.ui.grid>.column:not(:first-child){padding-left:0}.ui.calendar.popup>.ui.ui.grid>.column:not(:first-child)>.ui.table{border-top-left-radius:0;border-bottom-left-radius:0}.ui.calendar.popup>.ui.ui.grid>.column:not(:last-child){padding-right:0}.ui.calendar.popup>.ui.ui.grid>.column:not(:last-child)>.ui.table{border-top-right-radius:0;border-bottom-right-radius:0}.ui.disabled.calendar{opacity:.45}.ui.disabled.calendar .ui.table tr .link,.ui.disabled.calendar>.input{pointer-events:none}
|
9
|
+
*/.ui.calendar.popup{max-width:none;padding:0;border:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ui.calendar.popup.inverted::before{background:#2b2b2b}.ui.calendar .calendar:focus,.ui.calendar.popup:focus{outline:0}.ui.calendar.popup .ui.grid{display:block;white-space:nowrap}.ui.calendar.popup .ui.grid>.column{width:auto}.ui.calendar .ui.table.minute,.ui.calendar .ui.table.month,.ui.calendar .ui.table.year{min-width:15em}.ui.calendar .ui.table.day{min-width:18em}.ui.calendar .ui.table.day.andweek{min-width:22em}.ui.calendar .ui.table.hour{min-width:20em}.ui.calendar .ui.table tr td,.ui.calendar .ui.table tr th{padding:.5em;white-space:nowrap}.ui.calendar .ui.table tr th{border-left:none}.ui.calendar .ui.table tr th i.icon{margin:0}.ui.calendar .ui.table tr:first-child th{position:relative;padding-left:0;padding-right:0}.ui.calendar .ui.table.day tr:first-child th{border:none}.ui.calendar .ui.table.day tr:nth-child(2) th{padding-top:.2em;padding-bottom:.3em}.ui.calendar .ui.table tr td{padding-left:.1em;padding-right:.1em}.ui.calendar .ui.table tr .link{cursor:pointer}.ui.calendar .ui.table tr .prev.link{width:14.28571%;position:absolute;left:0}.ui.calendar .ui.table tr .next.link{width:14.28571%;position:absolute;right:0}.ui.ui.calendar .ui.table tr .disabled{pointer-events:auto;cursor:default;color:rgba(40,40,40,.3)}.ui.calendar .ui.table tr .adjacent:not(.disabled):not(.active){color:rgba(0,0,0,.6);background:rgba(0,0,0,.03)}.ui.calendar .ui.table tr td.today{font-weight:700}.ui.calendar .ui.table tr td.range{background:rgba(0,0,0,.05);color:rgba(0,0,0,.95);box-shadow:none}.ui.calendar:not(.disabled).popup.active .ui.table tbody tr td.focus,.ui.calendar:not(.disabled):focus .ui.table tbody tr td.focus{box-shadow:inset 0 0 0 1px #85b7d9}.ui.inverted.calendar .ui.table.inverted tr td.range{background:rgba(255,255,255,.08);color:#fff;box-shadow:none}.ui.inverted.calendar:not(.disabled) .calendar:focus .ui.table.inverted tbody tr td.focus,.ui.inverted.calendar:not(.disabled).popup.active .ui.table.inverted tbody tr td.focus{box-shadow:inset 0 0 0 1px #85b7d9}.ui.inverted.calendar .ui.ui.ui.inverted.table tr .disabled{color:rgba(225,225,225,.3)}.ui.inverted.calendar .ui.inverted.table tr .adjacent:not(.disabled):not(.active){color:rgba(255,255,255,.8);background:rgba(255,255,255,.02)}.ui.ui.ui.calendar.popup>.ui.ui.grid{margin:-1rem}.ui.ui.ui.calendar.popup>.ui.ui.grid>.column:not(:first-child){padding-left:0}.ui.ui.ui.calendar.popup>.ui.ui.grid>.column:not(:first-child)>.ui.table{border-top-left-radius:0;border-bottom-left-radius:0}.ui.ui.ui.calendar.popup>.ui.ui.grid>.column:not(:last-child){padding-right:0}.ui.ui.ui.calendar.popup>.ui.ui.grid>.column:not(:last-child)>.ui.table{border-top-right-radius:0;border-bottom-right-radius:0}.ui.disabled.calendar{opacity:.45}.ui.disabled.calendar .ui.table tr .link,.ui.disabled.calendar>.input{pointer-events:none}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.11+980ea5e
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(oe,T,Y){"use strict";T=void 0!==T&&T.Math===Math?T:globalThis,oe.fn.calendar=function(m){var g,e=oe(this),y=oe(Y),D=e.selector||"",v=Date.now(),b=[],M=m,C="string"==typeof M,w=[].slice.call(arguments,1),x={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}},re=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var p,e,z=oe.isPlainObject(m)?oe.extend(!0,{},oe.fn.calendar.settings,m):oe.extend({},oe.fn.calendar.settings),_=z.className,a=z.namespace,n=z.selector,Q=z.formatter,Z=z.parser,X=z.metadata,ee=x[z.minTimeGap],l=z.error,t="."+a,r="module-"+a,o=oe(this),i=o.find(n.input),s=o.find(n.activator),d=this,u=o.data(r),te=u&&u.popupId?y.find("#"+u.popupId):o.find(n.popup),c=!1,ae=o.hasClass(_.inverted),f=!1,h=!1,ne={initialize:function(){ne.debug("Initializing calendar for",d,o),p=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"),u=ne,o.data(r,u)},destroy:function(){ne.verbose("Destroying previous calendar for",d),o.removeData(r),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(o.data(X.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(o.data(X.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",z.on||"click")},popup:function(){var e,t;z.inline||0===s.length&&0===(s=o.children().first()).length||(void 0===oe.fn.popup?ne.error(l.popup):((te=0===te.length?z.context?(ne.popupId=a+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),oe("<div/>",{id:ne.popupId}).addClass(_.popup).appendTo(y.find(z.context))):(e=0<(t=s.parent()).closest(n.append).length?"appendTo":"prependTo",oe("<div/>").addClass(_.popup)[e](t)):te).addClass(_.calendar),ae&&te.addClass(_.inverted),e=function(){return ne.refreshTooltips(),z.onVisible.apply(te,arguments)},0===i.length&&(te.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),z.onVisible.apply(te,arguments)}),t=ne.setting("on"),t=oe.extend({},z.popupOptions,{popup:te,movePopup:!z.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(z.startMode)),z.onShow.apply(te,arguments)},onVisible:e,onHide:z.onHide,onHidden:function(){return ne.blur(),z.onHidden.apply(te,arguments)}}),ne.popup(t)))},inline:function(){0<s.length&&!z.inline||(z.inline=!0,te=oe("<div/>").addClass(_.calendar).appendTo(o),0===i.length&&te.attr("tabindex","0"))},input:function(){z.touchReadonly&&0<i.length&&p&&i.prop("readonly",!0),ne.check.disabled()},date:function(){var e;z.initialDate?e=Z.date(z.initialDate,z):void 0!==o.data(X.date)?e=Z.date(o.data(X.date),z):0<i.length&&(e=Z.date(i.val(),z)),ne.set.date(e,z.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=i[0];t&&(e=Y.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,j,a=ne.get.mode(),n=new Date,q=ne.get.date(),r=ne.get.focusDate(),o=ne.helper.dateInRange(r||q||Z.date(z.initialDate,z)||n),i=(r||ne.set.focusDate(r=o,!1,!1),"year"===a),s="month"===a,l="day"===a,d="hour"===a,u="minute"===a,W="time"===z.type,R=Math.max(z.multiMonth,1),V=l?ne.get.monthOffset():0,p=o.getMinutes(),c=o.getHours(),f=o.getDate(),G=o.getMonth()+V,h=o.getFullYear(),m=l?z.showWeekNumbers?8:7:d?4:ee.column,P=l||d?6:ee.row,g=l?R:1,y=(D=te).hasClass("left")?"right center":"left center";for(D.empty(),1<g&&(j=oe("<div/>").addClass(_.grid).appendTo(D)),t=0;t<g;t++){1<g&&(D=oe("<div/>").addClass(_.column).appendTo(j));var D,v=G+t,B=(new Date(h,v,1).getDay()-z.firstDayOfWeek%7+7)%7,b=(!z.constantHeight&&l&&(b=new Date(h,v+1,0).getDate()+B,P=Math.ceil(b/7)),i?10:s?1:0),M=l?1:0,C=d||u?1:0,w=d||u?f:1,x=new Date(h-b,v-M,w-C,c),M=new Date(h+b,v+M,w+C,c),w=i?new Date(10*Math.ceil(h/10)-9,0,0):s?new Date(h,0,0):l?new Date(h,v,0):new Date(h,v,f,-1),C=i?new Date(10*Math.ceil(h/10)+1,0,1):s?new Date(h+1,0,1):l?new Date(h,v+1,1):new Date(h,v,f+1),T=a,T=(l&&z.showWeekNumbers&&(T+=" andweek"),oe("<table/>").addClass(_.table).addClass(T).addClass(re[m]+" column").appendTo(D)),K=(ae&&T.addClass(_.inverted),m);if(!W){var U=oe("<thead/>").appendTo(T),Y=oe("<tr/>").appendTo(U),k=oe("<th/>").attr("colspan",""+m).appendTo(Y),O=i||s?new Date(h,0,1):l?new Date(h,v,1):new Date(h,v,f,c,p),A=oe("<span/>").addClass(_.link).appendTo(k),O=(A.text(ne.helper.dateFormat(Q[a+"Header"],O)),s?z.disableYear?"day":"year":l?z.disableMonth?"year":"month":"day");if(A.data(X.mode,O),0===t&&((A=oe("<span/>").addClass(_.prev).appendTo(k)).data(X.focusDate,x),A.toggleClass(_.disabledCell,!ne.helper.isDateInRange(w,a)),oe("<i/>").addClass(_.prevIcon).appendTo(A)),t===g-1&&((O=oe("<span/>").addClass(_.next).appendTo(k)).data(X.focusDate,M),O.toggleClass(_.disabledCell,!ne.helper.isDateInRange(C,a)),oe("<i/>").addClass(_.nextIcon).appendTo(O)),l)for(Y=oe("<tr/>").appendTo(U),z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(z.text.weekNo),k.addClass(_.weekCell),K--),N=0;N<K;N++)(k=oe("<th/>").appendTo(Y)).text(Q.dayColumnHeader((N+z.firstDayOfWeek)%7,z))}for(var J=oe("<tbody/>").appendTo(T),N=i?10*Math.ceil(h/10)-9:l?1-B:0,L=0;L<P;L++)for(Y=oe("<tr/>").appendTo(J),l&&z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(ne.get.weekOfYear(h,v,N+1-z.firstDayOfWeek)),k.addClass(_.weekCell)),e=0;e<K;e++,N++){var F,H=i?new Date(N,v,1,c,p):s?new Date(h,N,1,c,p):l?new Date(h,v,N,c,p):d?new Date(h,v,f,N):new Date(h,v,f,c,N*z.minTimeGap),E=i?N:s?z.text.monthsShort[N]:l?H.getDate():ne.helper.dateFormat(Q.cellTime,H),E=((k=oe("<td/>").addClass(_.cell).appendTo(Y)).text(E),k.data(X.date,H),l&&H.getMonth()!==(v+12)%12),I=!z.selectAdjacentDays&&E||!ne.helper.isDateInRange(H,a)||z.isDisabled(H,a)||ne.helper.isDisabled(H,a)||!ne.helper.isEnabled(H,a),S=(I?(null!==(S=ne.helper.findDayAsObject(H,a,z.disabledDates))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&void 0===S[X.inverted])&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation])),"hour"===a&&null!==(S=ne.helper.findHourAsObject(H,a,z.disabledHours))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&void 0===S[X.inverted])&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation]))):null!==(F=ne.helper.findDayAsObject(H,a,z.eventDates))&&(k.addClass(F[X.class]||z.eventClass),F[X.message]&&(k.attr("data-tooltip",F[X.message]),k.attr("data-position",F[X.position]||y),(F[X.inverted]||ae&&void 0===F[X.inverted])&&k.attr("data-inverted",""),F[X.variation]&&k.attr("data-variation",F[X.variation]))),ne.helper.dateEqual(H,q,a)),$=ne.helper.dateEqual(H,n,a),E=(k.toggleClass(_.adjacentCell,E&&!F),k.toggleClass(_.disabledCell,I),k.toggleClass(_.activeCell,S&&!(E&&I)),d||u||k.toggleClass(_.todayCell,!E&&$),{mode:a,adjacent:E,disabled:I,active:S,today:$});Q.cell(k,H,E),ne.helper.dateEqual(H,r,a)&&ne.set.focusDate(H,!1,!1)}z.today&&(x=oe("<tr/>").appendTo(J),(w=oe("<td/>").attr("colspan",""+m).addClass(_.today).appendTo(x)).text(Q.today(z)),w.data(X.date,n)),ne.update.focus(!1,T),z.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||te;var i=ne.get.mode(),a=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),d=ne.get.endDate(),u=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e,t,a,n,r=oe(this),o=r.data(X.date);o&&(e=r.hasClass(_.disabledCell),t=r.hasClass(_.activeCell),a=r.hasClass(_.adjacentCell),n=ne.helper.dateEqual(o,s,i),o=!!u&&(!!l&&ne.helper.isDateInRange(o,i,l,u)||!!d&&ne.helper.isDateInRange(o,i,u,d)),r.toggleClass(_.focusCell,n&&(!p||c)&&(!a||z.selectAdjacentDays&&a)&&!e),ne.helper.isTodayButton(r)||r.toggleClass(_.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var n=oe(T).width();te.find("td[data-position]").each(function(){var e=oe(this),t=T.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,""),a=e.attr("data-position"),t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(t)&&e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),te.on("mousedown"+t,ne.event.mousedown),te.on("touchstart"+t,ne.event.mousedown),te.on("mouseup"+t,ne.event.mouseup),te.on("touchend"+t,ne.event.mouseup),te.on("mouseover"+t,ne.event.mouseover),0<i.length?(i.on("input"+t,ne.event.inputChange),i.on("focus"+t,ne.event.inputFocus),i.on("blur"+t,ne.event.inputBlur),i.on("keydown"+t,ne.event.keydown)):te.on("keydown"+t,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),te.off(t),0<i.length&&i.off(t)}},event:{mouseover:function(e){var t=oe(e.target).data(X.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),c=0<=e.type.indexOf("touch");e=oe(e.target).data(X.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),c=!1;var t,a,n,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(X.date)||t.data(X.focusDate)||t.data(X.mode)?t:e).data(X.date),a=e.data(X.focusDate),n=e.data(X.mode),t&&!1!==z.onSelect.call(d,t,ne.get.mode())?(e=e.hasClass(_.today),ne.selectDate(t,e)):a?ne.set.focusDate(a):n&&ne.set.mode(n))},keydown:function(e){var t=e.which;if(9===t&&ne.popup("hide"),ne.popup("is visible")){var a=ne.get.mode();switch(t){case 37:case 38:case 39:case 40:var n="day"===a?7:"hour"===a?4:"minute"===a?ee.column:3,n=37===t?-1:38===t?-n:39===t?1:n,r=(n*="minute"===a?z.minTimeGap:1,ne.get.focusDate()||ne.get.date()||new Date),o=r.getFullYear()+("year"===a?n:0),i=r.getMonth()+("month"===a?n:0),s=r.getDate()+("day"===a?n:0),l=r.getHours()+("hour"===a?n:0),n=r.getMinutes()+("minute"===a?n:0),o=new Date(o,i,s,l,n);"time"===z.type&&(o=ne.helper.mergeDateTime(r,o)),ne.helper.isDateInRange(o,a)&&ne.set.focusDate(o);break;case 13:i=ne.get.focusDate();i&&!z.isDisabled(i,a)&&!ne.helper.isDisabled(i,a)&&ne.helper.isEnabled(i,a)&&!1!==z.onSelect.call(d,i,ne.get.mode())&&ne.selectDate(i),e.preventDefault(),e.stopPropagation();break;case 27:ne.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=i.val(),e=Z.date(e,z);ne.set.date(e,!1)},inputFocus:function(){te.addClass(_.active)},inputBlur:function(){var e;te.removeClass(_.active),z.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(Q[z.type],e),i.val(e)),h&&(ne.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in T&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){0<i.length&&e&&e.disconnect()}},observe:{class:function(){0<i.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(_.disabled)}},check:{disabled:function(){i.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){e=Date.UTC(e,t,a+3)/864e5,t=Math.floor(e/7),a=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(a,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||Q[z.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(o.data(X.date))||null},inputDate:function(){return i.val()},focusDate:function(){return o.data(X.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(z.startCalendar);return(e?e.get.date():o.data(X.startDate))||null},endDate:function(){var e=ne.get.calendarModule(z.endCalendar);return(e?e.get.date():o.data(X.endDate))||null},minDate:function(){return o.data(X.minDate)||null},maxDate:function(){return o.data(X.maxDate)||null},monthOffset:function(){return o.data(X.monthOffset)||z.monthOffset||0},mode:function(){var e=o.data(X.mode)||z.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===z.type?"hour":"month"===z.type?"month":"year"===z.type?"year":"day"},type:function(){return o.data(X.type)||z.type},validModes:function(){var e=[];return"time"!==z.type&&(z.disableYear&&"year"!==z.type||e.push("year"),(z.disableMonth||"year"===z.type)&&"month"!==z.type||e.push("month"),0<=z.type.indexOf("date")&&e.push("day")),0<=z.type.indexOf("time")&&(e.push("hour"),z.disableMinute||e.push("minute")),e},isTouch:function(){try{return Y.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:y.find(e).first()).data(r):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var n=ne.get.mode(),r=ne.helper.dateFormat(Q[z.type],e);if(a&&!1===z.onBeforeChange.call(d,e,r,n))return!1;if(ne.set.focusDate(e),z.isDisabled(e,n))return!1;var o=ne.get.endDate();o&&e&&o<e&&ne.set.endDate(),ne.set.dataKeyValue(X.date,e),t&&0<i.length&&i.val(r),a&&z.onChange.call(d,e,r,n)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.startCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.endCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.endDate,e,t)},focusDate:function(e,t,a,n){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var r="day"===ne.get.mode(),o=ne.get.focusDate(),r=(r&&e&&o&&((r=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-r,ne.set.monthOffset(o,!1))),ne.set.dataKeyValue(X.focusDate,e,!!e&&t));a=!1!==a&&r&&!1===t||f!=n,f=n,a&&ne.update.focus(n)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.maxDate&&z.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,z.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(X.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.minDate&&z.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,z.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(X.maxDate,e))},monthOffset:function(e,t){var a=Math.max(z.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ne.set.dataKeyValue(X.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(X.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),n=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!n)&&ne.refresh(),!n}},selectDate:function(e,t){ne.verbose("New date selection",e);var a=ne.get.mode();t||"minute"===a||z.disableMinute&&"hour"===a||"date"===z.type&&"day"===a||"month"===z.type&&"month"===a||"year"===z.type&&"year"===a?!1!==ne.set.date(e)&&(h=!0,z.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(z.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===a?z.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute",ne.set.mode(t),"hour"===a||"day"===a&&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()},popup:function(){return s.popup.apply(s,arguments)},focus:function(){(0<i.length?i:te).trigger("focus")},blur:function(){(0<i.length?i:te).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(ne,t,z);var a=t.getDate(),n=t.getMonth(),r=t.getFullYear(),o=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(r,n,a+1-z.firstDayOfWeek),d=i%12||12,u=(i<12?z.text.am:z.text.pm).toLowerCase(),p={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:z.text.monthsShort[n],MMMM:z.text.months[n],Y:r,YY:String(r).slice(2),YYYY:r,d:o,dd:z.text.dayNamesShort[o].slice(0,2),ddd:z.text.dayNamesShort[o],dddd:z.text.dayNames[o],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).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<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(z.regExp.token,function(e){return e in p?p[e]:e.slice(1,-1)})},isDisabled:function(n,r){return("day"===r||"month"===r||"year"===r||"hour"===r)&&("day"===r&&-1!==z.disabledDaysOfWeek.indexOf(n.getDay())||z.disabledDates.some(function(e){var t,a=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?a=ne.helper.dateEqual(n,e,r):null!==e&&"object"==typeof e&&(e[X.year]?"number"==typeof e[X.year]?a=n.getFullYear()===e[X.year]:Array.isArray(e[X.year])&&(a=-1<e[X.year].indexOf(n.getFullYear())):e[X.month]?"number"==typeof e[X.month]?a=n.getMonth()===e[X.month]:Array.isArray(e[X.month])?a=-1<e[X.month].indexOf(n.getMonth()):e[X.month]instanceof Date&&(t=ne.helper.sanitiseDate(e[X.month]),a=n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()):e[X.date]&&"day"===r&&(e[X.date]instanceof Date?a=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date]),r):Array.isArray(e[X.date])&&(a=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)})))),a})||"hour"===r&&z.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(n,e,r):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[X.date]&&(e[X.date]instanceof Date?t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date])):Array.isArray(e[X.date])&&(t=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)}))),e[X.days]&&("number"==typeof e[X.days]?t=n.getDay()===e[X.days]:Array.isArray(e[X.days])&&(t=-1<e[X.days].indexOf(n.getDay()))),e[X.hours]&&("number"==typeof e[X.hours]?t=t&&n.getHours()===e[X.hours]:Array.isArray(e[X.hours])&&(t=t&&-1<e[X.hours].indexOf(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===z.enabledDates.length||z.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[X.date]&&(t=ne.helper.dateEqual(a,ne.helper.sanitiseDate(e[X.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if((n="string"==typeof(n=e[r])?ne.helper.sanitiseDate(n):n)instanceof Date&&ne.helper.dateEqual(t,n,a))return(o={})[X.date]=n,o;if(null!==n&&"object"==typeof n)if(n[X.year]){if("number"==typeof n[X.year]&&t.getFullYear()===n[X.year])return n;if(Array.isArray(n[X.year])&&-1<n[X.year].indexOf(t.getFullYear()))return n}else if(n[X.month]){if("number"==typeof n[X.month]&&t.getMonth()===n[X.month])return n;if(Array.isArray(n[X.month])){if(-1<n[X.month].indexOf(t.getMonth()))return n}else if(n[X.month]instanceof Date){var o=ne.helper.sanitiseDate(n[X.month]);if(t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear())return n}}else if(n[X.date]&&"day"===a){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date]),a))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a)for(var n,r=function(e,t){if(t[X.hours])return"number"==typeof t[X.hours]&&e.getHours()===t[X.hours]||Array.isArray(t[X.hours])&&-1<t[X.hours].indexOf(e.getHours())?t:void 0},o=0;o<e.length;o++){if("number"==typeof(n=e[o])&&t.getHours()===n)return null;if(null!==n&&"object"==typeof n)if(n[X.days]&&r(t,n)){if("number"==typeof n[X.days]&&t.getDay()===n[X.days])return n;if(Array.isArray(n[X.days])&&-1<n[X.days].indexOf(t.getDay()))return n}else if(n[X.date]&&r(t,n)){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date])))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:Z.date(""+e,z))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){var n="time"===z.type,r="year"===(a=a||"day"),o=r||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||r?0:e.getMonth(),n||o?1:e.getDate(),a?e.getHours():0,i?z.minTimeGap*Math.floor(e.getMinutes()/z.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||r?0:t.getMonth(),n||o?1:t.getDate(),a?t.getHours():0,i?z.minTimeGap*Math.floor(t.getMinutes()/z.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var r;return a||n||(a=(r=ne.get.startDate())&&z.minDate?new Date(Math.max(r,z.minDate)):r||z.minDate,n=z.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),z.minTimeGap*Math.ceil(a.getMinutes()/z.minTimeGap)),!(!e||a&&0<ne.helper.dateDiff(e,a,t)||n&&0<ne.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=ne.get.startDate())&&z.minDate?new Date(Math.max(n,z.minDate)):n||z.minDate,a=z.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),z.minTimeGap*Math.ceil(t.getMinutes()/z.minTimeGap));var n="time"===z.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?n?ne.helper.mergeDateTime(e,t):t:a&&0<ne.helper.dateDiff(a,e,"minute")?n?ne.helper.mergeDateTime(e,a):a: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()===z.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,z,e);else{if(void 0===t)return z[e];oe.isPlainObject(z[e])?oe.extend(!0,z[e],t):z[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(void 0===t)return ne[e];ne[e]=t}},debug:function(){!z.silent&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,z.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!z.silent&&z.verbose&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,z.name+":"),ne.verbose.apply(console,arguments)))},error:function(){z.silent||(ne.error=Function.prototype.bind.call(console.error,console,z.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,a;z.performance&&(a=(t=Date.now())-(v||t),v=t,b.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":a})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=z.name+":",a=0;v=!1,clearTimeout(ne.performance.timer),oe.each(b,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",D&&(e+=" '"+D+"'"),0<b.length&&(console.groupCollapsed(e),console.table?console.table(b):oe.each(b,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),b=[]}},invoke:function(n,e,t){var r,o,a,i,s=u;return e=e||w,t=t||d,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),r=n.length-1,oe.each(n,function(e,t){var a=e!==r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(oe.isPlainObject(s[a])&&e!==r)s=s[a];else{if(void 0!==s[a])return o=s[a],!1;{if(!oe.isPlainObject(s[t])||e===r)return void 0!==s[t]?o=s[t]:ne.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?a=o.apply(t,e):void 0!==o&&(a=o),Array.isArray(g)?g.push(a):void 0!==g?g=[g,a]:void 0!==a&&(g=a),o}};C?(void 0===u&&ne.initialize(),ne.invoke(M)):(void 0!==u&&u.invoke("destroy"),ne.initialize())}),void 0!==g?g:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!1,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,a){}},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;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var a,n,r,o=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var i,s,l,d,u=-1,p=-1,c=-1,f=-1,h=-1,o="time"===t.type,m=t.type.indexOf("time")<0,g=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!m)for(i=0<=oe.inArray(t.text.am.toLowerCase(),g)||!(0<=oe.inArray(t.text.pm.toLowerCase(),g))&&void 0,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(p<0||u<0)for(d=l.split(":"),r=0;r<Math.min(2,d.length);r++)n=parseInt(d[r],10),isNaN(n)&&(n=0),0===r?p=n%24:u=n%60;y.splice(a,1)}if(!o){for(a=0;a<g.length;a++)if(!((s=g[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].slice(0,s.length).toLowerCase()===s){f=n+1;break}if(0<=f)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),h=n,y.splice(a,1);break}if(f<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r],10),!isNaN(n)&&1<=n&&n<=12){f=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&1<=n&&n<=31){c=n,y.splice(a,1);break}if(h<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a],10),!isNaN(n)){n<=99&&(n+=t.currentCentury),h=n,y.splice(a,1);break}}if(!m){if(p<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=23){p=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&p<0&&c<0&&f<0&&h<0)return null;u<0&&(u=0),p<0&&(p=0),c<0&&(c=1),f<0&&(f=1),h<0&&(h=(new Date).getFullYear()),void 0!==i&&(i?12===p&&(p=0):p<12&&(p+=12));e=new Date(h,f-1,c,p,u);return e.getMonth()===f-1&&e.getFullYear()===h||(e=new Date(h,f,0,p,u)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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?|[ASYa]|"[^"]*"|'[^']*'/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);
|
11
|
+
!function(oe,x,T){"use strict";x=void 0!==x&&x.Math===Math?x:globalThis,oe.fn.calendar=function(m){var g,e=oe(this),y=oe(T),D=Date.now(),v=[],b=m,M="string"==typeof b,C=[].slice.call(arguments,1),w={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}},re=["","one","two","three","four","five","six","seven","eight"];return e.each(function(){var p,e,z=oe.isPlainObject(m)?oe.extend(!0,{},oe.fn.calendar.settings,m):oe.extend({},oe.fn.calendar.settings),_=z.className,a=z.namespace,n=z.selector,Q=z.formatter,Z=z.parser,X=z.metadata,ee=w[z.minTimeGap],l=z.error,t="."+a,r="module-"+a,o=oe(this),i=o.find(n.input),s=o.find(n.activator),d=this,u=o.data(r),te=u&&u.popupId?y.find("#"+u.popupId):o.find(n.popup),c=!1,ae=o.hasClass(_.inverted),f=!1,h=!1,ne={initialize:function(){ne.debug("Initializing calendar for",d,o),p=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"),u=ne,o.data(r,u)},destroy:function(){ne.verbose("Destroying previous calendar for",d),o.removeData(r),ne.unbind.events(),ne.disconnect.classObserver()},setup:{config:function(){null!==ne.get.minDate()&&ne.set.minDate(o.data(X.minDate)),null!==ne.get.maxDate()&&ne.set.maxDate(o.data(X.maxDate)),ne.setting("type",ne.get.type()),ne.setting("on",z.on||"click")},popup:function(){var e,t;z.inline||0===s.length&&0===(s=o.children().first()).length||(void 0===oe.fn.popup?ne.error(l.popup):((te=0===te.length?z.context?(ne.popupId=a+"_popup_"+(Math.random().toString(16)+"000000000").slice(2,10),oe("<div/>",{id:ne.popupId}).addClass(_.popup).appendTo(y.find(z.context))):(e=0<(t=s.parent()).closest(n.append).length?"appendTo":"prependTo",oe("<div/>").addClass(_.popup)[e](t)):te).addClass(_.calendar),ae&&te.addClass(_.inverted),e=function(){return ne.refreshTooltips(),z.onVisible.apply(te,arguments)},0===i.length&&(te.attr("tabindex","0"),e=function(){return ne.refreshTooltips(),ne.focus(),z.onVisible.apply(te,arguments)}),t=ne.setting("on"),t=oe.extend({},z.popupOptions,{popup:te,movePopup:!z.context,on:t,hoverable:"hover"===t,closable:"click"===t,onShow:function(){return ne.set.focusDate(ne.get.date()),ne.set.mode(ne.get.validatedMode(z.startMode)),z.onShow.apply(te,arguments)},onVisible:e,onHide:z.onHide,onHidden:function(){return ne.blur(),z.onHidden.apply(te,arguments)}}),ne.popup(t)))},inline:function(){0<s.length&&!z.inline||(z.inline=!0,te=oe("<div/>").addClass(_.calendar).appendTo(o),0===i.length&&te.attr("tabindex","0"))},input:function(){z.touchReadonly&&0<i.length&&p&&i.prop("readonly",!0),ne.check.disabled()},date:function(){var e;z.initialDate?e=Z.date(z.initialDate,z):void 0!==o.data(X.date)?e=Z.date(o.data(X.date),z):0<i.length&&(e=Z.date(i.val(),z)),ne.set.date(e,z.formatInput,!1),ne.set.mode(ne.get.mode(),!1)}},trigger:{change:function(){var e,t=i[0];t&&(e=T.createEvent("HTMLEvents"),ne.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{calendar:function(){var e,t,j,a=ne.get.mode(),n=new Date,q=ne.get.date(),r=ne.get.focusDate(),o=ne.helper.dateInRange(r||q||Z.date(z.initialDate,z)||n),i=(r||ne.set.focusDate(r=o,!1,!1),"year"===a),s="month"===a,l="day"===a,d="hour"===a,u="minute"===a,W="time"===z.type,R=Math.max(z.multiMonth,1),V=l?ne.get.monthOffset():0,p=o.getMinutes(),c=o.getHours(),f=o.getDate(),G=o.getMonth()+V,h=o.getFullYear(),m=l?z.showWeekNumbers?8:7:d?4:ee.column,P=l||d?6:ee.row,g=l?R:1,y=(D=te).hasClass("left")?"right center":"left center";for(D.empty(),1<g&&(j=oe("<div/>").addClass(_.grid).appendTo(D)),t=0;t<g;t++){1<g&&(D=oe("<div/>").addClass(_.column).appendTo(j));var D,v=G+t,B=(new Date(h,v,1).getDay()-z.firstDayOfWeek%7+7)%7,b=(!z.constantHeight&&l&&(b=new Date(h,v+1,0).getDate()+B,P=Math.ceil(b/7)),i?10:s?1:0),M=l?1:0,C=d||u?1:0,w=d||u?f:1,x=new Date(h-b,v-M,w-C,c),M=new Date(h+b,v+M,w+C,c),w=i?new Date(10*Math.ceil(h/10)-9,0,0):s?new Date(h,0,0):l?new Date(h,v,0):new Date(h,v,f,-1),C=i?new Date(10*Math.ceil(h/10)+1,0,1):s?new Date(h+1,0,1):l?new Date(h,v+1,1):new Date(h,v,f+1),T=a,T=(l&&z.showWeekNumbers&&(T+=" andweek"),oe("<table/>").addClass(_.table).addClass(T).addClass(re[m]+" column").appendTo(D)),K=(ae&&T.addClass(_.inverted),m);if(!W){var U=oe("<thead/>").appendTo(T),Y=oe("<tr/>").appendTo(U),k=oe("<th/>").attr("colspan",""+m).appendTo(Y),O=i||s?new Date(h,0,1):l?new Date(h,v,1):new Date(h,v,f,c,p),A=oe("<span/>").addClass(_.link).appendTo(k),O=(A.text(ne.helper.dateFormat(Q[a+"Header"],O)),s?z.disableYear?"day":"year":l?z.disableMonth?"year":"month":"day");if(A.data(X.mode,O),0===t&&((A=oe("<span/>").addClass(_.prev).appendTo(k)).data(X.focusDate,x),A.toggleClass(_.disabledCell,!ne.helper.isDateInRange(w,a)),oe("<i/>").addClass(_.prevIcon).appendTo(A)),t===g-1&&((O=oe("<span/>").addClass(_.next).appendTo(k)).data(X.focusDate,M),O.toggleClass(_.disabledCell,!ne.helper.isDateInRange(C,a)),oe("<i/>").addClass(_.nextIcon).appendTo(O)),l)for(Y=oe("<tr/>").appendTo(U),z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(z.text.weekNo),k.addClass(_.weekCell),K--),N=0;N<K;N++)(k=oe("<th/>").appendTo(Y)).text(Q.dayColumnHeader((N+z.firstDayOfWeek)%7,z))}for(var J=oe("<tbody/>").appendTo(T),N=i?10*Math.ceil(h/10)-9:l?1-B:0,L=0;L<P;L++)for(Y=oe("<tr/>").appendTo(J),l&&z.showWeekNumbers&&((k=oe("<th/>").appendTo(Y)).text(ne.get.weekOfYear(h,v,N+1-z.firstDayOfWeek)),k.addClass(_.weekCell)),e=0;e<K;e++,N++){var F,H=i?new Date(N,v,1,c,p):s?new Date(h,N,1,c,p):l?new Date(h,v,N,c,p):d?new Date(h,v,f,N):new Date(h,v,f,c,N*z.minTimeGap),E=i?N:s?z.text.monthsShort[N]:l?H.getDate():ne.helper.dateFormat(Q.cellTime,H),E=((k=oe("<td/>").addClass(_.cell).appendTo(Y)).text(E),k.data(X.date,H),l&&H.getMonth()!==(v+12)%12),I=!z.selectAdjacentDays&&E||!ne.helper.isDateInRange(H,a)||z.isDisabled(H,a)||ne.helper.isDisabled(H,a)||!ne.helper.isEnabled(H,a),S=(I?(null!==(S=ne.helper.findDayAsObject(H,a,z.disabledDates))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&void 0===S[X.inverted])&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation])),"hour"===a&&null!==(S=ne.helper.findHourAsObject(H,a,z.disabledHours))&&S[X.message]&&(k.attr("data-tooltip",S[X.message]),k.attr("data-position",S[X.position]||y),(S[X.inverted]||ae&&void 0===S[X.inverted])&&k.attr("data-inverted",""),S[X.variation]&&k.attr("data-variation",S[X.variation]))):null!==(F=ne.helper.findDayAsObject(H,a,z.eventDates))&&(k.addClass(F[X.class]||z.eventClass),F[X.message]&&(k.attr("data-tooltip",F[X.message]),k.attr("data-position",F[X.position]||y),(F[X.inverted]||ae&&void 0===F[X.inverted])&&k.attr("data-inverted",""),F[X.variation]&&k.attr("data-variation",F[X.variation]))),ne.helper.dateEqual(H,q,a)),$=ne.helper.dateEqual(H,n,a),E=(k.toggleClass(_.adjacentCell,E&&!F),k.toggleClass(_.disabledCell,I),k.toggleClass(_.activeCell,S&&!(E&&I)),d||u||k.toggleClass(_.todayCell,!E&&$),{mode:a,adjacent:E,disabled:I,active:S,today:$});Q.cell(k,H,E),ne.helper.dateEqual(H,r,a)&&ne.set.focusDate(H,!1,!1)}z.today&&(x=oe("<tr/>").appendTo(J),(w=oe("<td/>").attr("colspan",""+m).addClass(_.today).appendTo(x)).text(Q.today(z)),w.data(X.date,n)),ne.update.focus(!1,T),z.inline&&ne.refreshTooltips()}}},update:{focus:function(e,t){t=t||te;var i=ne.get.mode(),a=ne.get.date(),s=ne.get.focusDate(),l=ne.get.startDate(),d=ne.get.endDate(),u=(e?s:null)||a||(p?null:s);t.find("td").each(function(){var e,t,a,n,r=oe(this),o=r.data(X.date);o&&(e=r.hasClass(_.disabledCell),t=r.hasClass(_.activeCell),a=r.hasClass(_.adjacentCell),n=ne.helper.dateEqual(o,s,i),o=!!u&&(!!l&&ne.helper.isDateInRange(o,i,l,u)||!!d&&ne.helper.isDateInRange(o,i,u,d)),r.toggleClass(_.focusCell,n&&(!p||c)&&(!a||z.selectAdjacentDays&&a)&&!e),ne.helper.isTodayButton(r)||r.toggleClass(_.rangeCell,o&&!t&&!e))})}},refresh:function(){ne.create.calendar()},refreshTooltips:function(){var n=oe(x).width();te.find("td[data-position]").each(function(){var e=oe(this),t=x.getComputedStyle(e[0],"::after").width.replace(/[^\d.]/g,""),a=e.attr("data-position"),t=n-e.width()-(parseInt(t,10)||250)>e.offset().left?"right":"left";-1===a.indexOf(t)&&e.attr("data-position",a.replace(/(left|right)/,t))})},bind:{events:function(){ne.debug("Binding events"),te.on("mousedown"+t,ne.event.mousedown),te.on("touchstart"+t,ne.event.mousedown),te.on("mouseup"+t,ne.event.mouseup),te.on("touchend"+t,ne.event.mouseup),te.on("mouseover"+t,ne.event.mouseover),0<i.length?(i.on("input"+t,ne.event.inputChange),i.on("focus"+t,ne.event.inputFocus),i.on("blur"+t,ne.event.inputBlur),i.on("keydown"+t,ne.event.keydown)):te.on("keydown"+t,ne.event.keydown)}},unbind:{events:function(){ne.debug("Unbinding events"),te.off(t),0<i.length&&i.off(t)}},event:{mouseover:function(e){var t=oe(e.target).data(X.date),e=1===e.buttons;t&&ne.set.focusDate(t,!1,!0,e)},mousedown:function(e){0<i.length&&e.preventDefault(),c=0<=e.type.indexOf("touch");e=oe(e.target).data(X.date);e&&ne.set.focusDate(e,!1,!0,!0)},mouseup:function(e){ne.focus(),e.preventDefault(),e.stopPropagation(),c=!1;var t,a,n,e=oe(e.target);e.hasClass("disabled")||(t=(e=(t=e.parent()).data(X.date)||t.data(X.focusDate)||t.data(X.mode)?t:e).data(X.date),a=e.data(X.focusDate),n=e.data(X.mode),t&&!1!==z.onSelect.call(d,t,ne.get.mode())?(e=e.hasClass(_.today),ne.selectDate(t,e)):a?ne.set.focusDate(a):n&&ne.set.mode(n))},keydown:function(e){var t=e.which;if(9===t&&ne.popup("hide"),ne.popup("is visible")){var a=ne.get.mode();switch(t){case 37:case 38:case 39:case 40:var n="day"===a?7:"hour"===a?4:"minute"===a?ee.column:3,n=37===t?-1:38===t?-n:39===t?1:n,r=(n*="minute"===a?z.minTimeGap:1,ne.get.focusDate()||ne.get.date()||new Date),o=r.getFullYear()+("year"===a?n:0),i=r.getMonth()+("month"===a?n:0),s=r.getDate()+("day"===a?n:0),l=r.getHours()+("hour"===a?n:0),n=r.getMinutes()+("minute"===a?n:0),o=new Date(o,i,s,l,n);"time"===z.type&&(o=ne.helper.mergeDateTime(r,o)),ne.helper.isDateInRange(o,a)&&ne.set.focusDate(o);break;case 13:i=ne.get.focusDate();i&&!z.isDisabled(i,a)&&!ne.helper.isDisabled(i,a)&&ne.helper.isEnabled(i,a)&&!1!==z.onSelect.call(d,i,ne.get.mode())&&ne.selectDate(i),e.preventDefault(),e.stopPropagation();break;case 27:ne.popup("hide"),e.stopPropagation()}}38!==t&&40!==t||(e.preventDefault(),ne.popup("show"))},inputChange:function(){var e=i.val(),e=Z.date(e,z);ne.set.date(e,!1)},inputFocus:function(){te.addClass(_.active)},inputBlur:function(){var e;te.removeClass(_.active),z.formatInput&&(e=ne.get.date(),e=ne.helper.dateFormat(Q[z.type],e),i.val(e)),h&&(ne.trigger.change(),h=!1)},class:{mutation:function(e){e.forEach(function(e){"class"===e.attributeName&&ne.check.disabled()})}}},observeChanges:function(){"MutationObserver"in x&&(e=new MutationObserver(ne.event.class.mutation),ne.debug("Setting up mutation observer",e),ne.observe.class())},disconnect:{classObserver:function(){0<i.length&&e&&e.disconnect()}},observe:{class:function(){0<i.length&&e&&e.observe(o[0],{attributes:!0})}},is:{disabled:function(){return o.hasClass(_.disabled)}},check:{disabled:function(){i.attr("tabindex",ne.is.disabled()?-1:0)}},get:{weekOfYear:function(e,t,a){e=Date.UTC(e,t,a+3)/864e5,t=Math.floor(e/7),a=new Date(6048e5*t).getUTCFullYear();return t-Math.floor(Date.UTC(a,0,7)/6048e5)+1},formattedDate:function(e,t){return ne.helper.dateFormat(e||Q[z.type],t||ne.get.date())},date:function(){return ne.helper.sanitiseDate(o.data(X.date))||null},inputDate:function(){return i.val()},focusDate:function(){return o.data(X.focusDate)||null},startDate:function(){var e=ne.get.calendarModule(z.startCalendar);return(e?e.get.date():o.data(X.startDate))||null},endDate:function(){var e=ne.get.calendarModule(z.endCalendar);return(e?e.get.date():o.data(X.endDate))||null},minDate:function(){return o.data(X.minDate)||null},maxDate:function(){return o.data(X.maxDate)||null},monthOffset:function(){return o.data(X.monthOffset)||z.monthOffset||0},mode:function(){var e=o.data(X.mode)||z.startMode;return ne.get.validatedMode(e)},validatedMode:function(e){var t=ne.get.validModes();return 0<=oe.inArray(e,t)?e:"time"===z.type?"hour":"month"===z.type?"month":"year"===z.type?"year":"day"},type:function(){return o.data(X.type)||z.type},validModes:function(){var e=[];return"time"!==z.type&&(z.disableYear&&"year"!==z.type||e.push("year"),(z.disableMonth||"year"===z.type)&&"month"!==z.type||e.push("month"),0<=z.type.indexOf("date")&&e.push("day")),0<=z.type.indexOf("time")&&(e.push("hour"),z.disableMinute||e.push("minute")),e},isTouch:function(){try{return T.createEvent("TouchEvent"),!0}catch(e){return!1}},calendarModule:function(e){return e?(e=e instanceof oe?e:y.find(e).first()).data(r):null}},set:{date:function(e,t,a){t=!1!==t,a=!1!==a,e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var n=ne.get.mode(),r=ne.helper.dateFormat(Q[z.type],e);if(a&&!1===z.onBeforeChange.call(d,e,r,n))return!1;if(ne.set.focusDate(e),z.isDisabled(e,n))return!1;var o=ne.get.endDate();o&&e&&o<e&&ne.set.endDate(),ne.set.dataKeyValue(X.date,e),t&&0<i.length&&i.val(r),a&&z.onChange.call(d,e,r,n)},startDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.startCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.startDate,e,t)},endDate:function(e,t){e=ne.helper.sanitiseDate(e);var a=ne.get.calendarModule(z.endCalendar);a&&a.set.date(e),ne.set.dataKeyValue(X.endDate,e,t)},focusDate:function(e,t,a,n){e=ne.helper.sanitiseDate(e),e=ne.helper.dateInRange(e);var r="day"===ne.get.mode(),o=ne.get.focusDate(),r=(r&&e&&o&&((r=12*(e.getFullYear()-o.getFullYear())+e.getMonth()-o.getMonth())&&(o=ne.get.monthOffset()-r,ne.set.monthOffset(o,!1))),ne.set.dataKeyValue(X.focusDate,e,!!e&&t));a=!1!==a&&r&&!1===t||f!=n,f=n,a&&ne.update.focus(n)},minDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.maxDate&&z.maxDate<=e?ne.verbose("Unable to set minDate variable bigger that maxDate variable",e,z.maxDate):(ne.setting("minDate",e),ne.set.dataKeyValue(X.minDate,e))},maxDate:function(e){e=ne.helper.sanitiseDate(e),null!==z.minDate&&z.minDate>=e?ne.verbose("Unable to set maxDate variable lower that minDate variable",e,z.minDate):(ne.setting("maxDate",e),ne.set.dataKeyValue(X.maxDate,e))},monthOffset:function(e,t){var a=Math.max(z.multiMonth,1);e=Math.max(1-a,Math.min(0,e)),ne.set.dataKeyValue(X.monthOffset,e,t)},mode:function(e,t){ne.set.dataKeyValue(X.mode,e,t)},dataKeyValue:function(e,t,a){var n=o.data(e),n=n===t||n<=t&&t<=n;return t?o.data(e,t):o.removeData(e),(a=!1!==a&&!n)&&ne.refresh(),!n}},selectDate:function(e,t){ne.verbose("New date selection",e);var a=ne.get.mode();t||"minute"===a||z.disableMinute&&"hour"===a||"date"===z.type&&"day"===a||"month"===z.type&&"month"===a||"year"===z.type&&"year"===a?!1!==ne.set.date(e)&&(h=!0,z.closable&&(ne.popup("hide"),(t=ne.get.calendarModule(z.endCalendar))&&(t.refresh(),"focus"!==t.setting("on")&&t.popup("show"),t.focus()))):(t="year"===a?z.disableMonth?"day":"month":"month"===a?"day":"day"===a?"hour":"minute",ne.set.mode(t),"hour"===a||"day"===a&&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()},popup:function(){return s.popup.apply(s,arguments)},focus:function(){(0<i.length?i:te).trigger("focus")},blur:function(){(0<i.length?i:te).trigger("blur")},helper:{dateFormat:function(e,t){if(!(t instanceof Date))return"";if("function"==typeof e)return e.call(ne,t,z);var a=t.getDate(),n=t.getMonth(),r=t.getFullYear(),o=t.getDay(),i=t.getHours(),s=t.getMinutes(),t=t.getSeconds(),l=ne.get.weekOfYear(r,n,a+1-z.firstDayOfWeek),d=i%12||12,u=(i<12?z.text.am:z.text.pm).toLowerCase(),p={D:a,DD:("0"+a).slice(-2),M:n+1,MM:("0"+(n+1)).slice(-2),MMM:z.text.monthsShort[n],MMMM:z.text.months[n],Y:r,YY:String(r).slice(2),YYYY:r,d:o,dd:z.text.dayNamesShort[o].slice(0,2),ddd:z.text.dayNamesShort[o],dddd:z.text.dayNames[o],h:d,hh:("0"+d).slice(-2),H:i,HH:("0"+i).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<a%10||a%100-a%10==10?0:a%10],w:l,ww:("0"+l).slice(-2)};return e.replace(z.regExp.token,function(e){return e in p?p[e]:e.slice(1,-1)})},isDisabled:function(n,r){return("day"===r||"month"===r||"year"===r||"hour"===r)&&("day"===r&&-1!==z.disabledDaysOfWeek.indexOf(n.getDay())||z.disabledDates.some(function(e){var t,a=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?a=ne.helper.dateEqual(n,e,r):null!==e&&"object"==typeof e&&(e[X.year]?"number"==typeof e[X.year]?a=n.getFullYear()===e[X.year]:Array.isArray(e[X.year])&&(a=-1<e[X.year].indexOf(n.getFullYear())):e[X.month]?"number"==typeof e[X.month]?a=n.getMonth()===e[X.month]:Array.isArray(e[X.month])?a=-1<e[X.month].indexOf(n.getMonth()):e[X.month]instanceof Date&&(t=ne.helper.sanitiseDate(e[X.month]),a=n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()):e[X.date]&&"day"===r&&(e[X.date]instanceof Date?a=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date]),r):Array.isArray(e[X.date])&&(a=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)})))),a})||"hour"===r&&z.disabledHours.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(n,e,r):"number"==typeof e?t=n.getHours()===e:null!==e&&"object"==typeof e&&(e[X.date]&&(e[X.date]instanceof Date?t=ne.helper.dateEqual(n,ne.helper.sanitiseDate(e[X.date])):Array.isArray(e[X.date])&&(t=e[X.date].some(function(e){return ne.helper.dateEqual(n,e,r)}))),e[X.days]&&("number"==typeof e[X.days]?t=n.getDay()===e[X.days]:Array.isArray(e[X.days])&&(t=-1<e[X.days].indexOf(n.getDay()))),e[X.hours]&&("number"==typeof e[X.hours]?t=t&&n.getHours()===e[X.hours]:Array.isArray(e[X.hours])&&(t=t&&-1<e[X.hours].indexOf(n.getHours())))),t}))},isEnabled:function(a,n){return"day"!==n||(0===z.enabledDates.length||z.enabledDates.some(function(e){var t=!1;return(e="string"==typeof e?ne.helper.sanitiseDate(e):e)instanceof Date?t=ne.helper.dateEqual(a,e,n):null!==e&&"object"==typeof e&&e[X.date]&&(t=ne.helper.dateEqual(a,ne.helper.sanitiseDate(e[X.date]),n)),t}))},findDayAsObject:function(t,a,e){if("day"===a||"month"===a||"year"===a)for(var n,r=0;r<e.length;r++){if((n="string"==typeof(n=e[r])?ne.helper.sanitiseDate(n):n)instanceof Date&&ne.helper.dateEqual(t,n,a))return(o={})[X.date]=n,o;if(null!==n&&"object"==typeof n)if(n[X.year]){if("number"==typeof n[X.year]&&t.getFullYear()===n[X.year])return n;if(Array.isArray(n[X.year])&&-1<n[X.year].indexOf(t.getFullYear()))return n}else if(n[X.month]){if("number"==typeof n[X.month]&&t.getMonth()===n[X.month])return n;if(Array.isArray(n[X.month])){if(-1<n[X.month].indexOf(t.getMonth()))return n}else if(n[X.month]instanceof Date){var o=ne.helper.sanitiseDate(n[X.month]);if(t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear())return n}}else if(n[X.date]&&"day"===a){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date]),a))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}}return null},findHourAsObject:function(t,a,e){if("hour"===a)for(var n,r=function(e,t){if(t[X.hours])return"number"==typeof t[X.hours]&&e.getHours()===t[X.hours]||Array.isArray(t[X.hours])&&-1<t[X.hours].indexOf(e.getHours())?t:void 0},o=0;o<e.length;o++){if("number"==typeof(n=e[o])&&t.getHours()===n)return null;if(null!==n&&"object"==typeof n)if(n[X.days]&&r(t,n)){if("number"==typeof n[X.days]&&t.getDay()===n[X.days])return n;if(Array.isArray(n[X.days])&&-1<n[X.days].indexOf(t.getDay()))return n}else if(n[X.date]&&r(t,n)){if(n[X.date]instanceof Date&&ne.helper.dateEqual(t,ne.helper.sanitiseDate(n[X.date])))return n;if(Array.isArray(n[X.date])&&n[X.date].some(function(e){return ne.helper.dateEqual(t,e,a)}))return n}else if(r(t,n))return n}return null},sanitiseDate:function(e){return!(e=e instanceof Date?e:Z.date(""+e,z))||isNaN(e.getTime())?null:e},dateDiff:function(e,t,a){var n="time"===z.type,r="year"===(a=a||"day"),o=r||"month"===a,i="minute"===a,a=i||"hour"===a;return e=new Date(n?2e3:e.getFullYear(),n||r?0:e.getMonth(),n||o?1:e.getDate(),a?e.getHours():0,i?z.minTimeGap*Math.floor(e.getMinutes()/z.minTimeGap):0),(t=new Date(n?2e3:t.getFullYear(),n||r?0:t.getMonth(),n||o?1:t.getDate(),a?t.getHours():0,i?z.minTimeGap*Math.floor(t.getMinutes()/z.minTimeGap):0)).getTime()-e.getTime()},dateEqual:function(e,t,a){return!!e&&!!t&&0===ne.helper.dateDiff(e,t,a)},isDateInRange:function(e,t,a,n){var r;return a||n||(a=(r=ne.get.startDate())&&z.minDate?new Date(Math.max(r,z.minDate)):r||z.minDate,n=z.maxDate),a=a&&new Date(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),z.minTimeGap*Math.ceil(a.getMinutes()/z.minTimeGap)),!(!e||a&&0<ne.helper.dateDiff(e,a,t)||n&&0<ne.helper.dateDiff(n,e,t))},dateInRange:function(e,t,a){t||a||(t=(n=ne.get.startDate())&&z.minDate?new Date(Math.max(n,z.minDate)):n||z.minDate,a=z.maxDate),t=t&&new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),z.minTimeGap*Math.ceil(t.getMinutes()/z.minTimeGap));var n="time"===z.type;return e&&(t&&0<ne.helper.dateDiff(e,t,"minute")?n?ne.helper.mergeDateTime(e,t):t:a&&0<ne.helper.dateDiff(a,e,"minute")?n?ne.helper.mergeDateTime(e,a):a: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()===z.text.today}},setting:function(e,t){if(ne.debug("Changing setting",e,t),oe.isPlainObject(e))oe.extend(!0,z,e);else{if(void 0===t)return z[e];oe.isPlainObject(z[e])?oe.extend(!0,z[e],t):z[e]=t}},internal:function(e,t){if(oe.isPlainObject(e))oe.extend(!0,ne,e);else{if(void 0===t)return ne[e];ne[e]=t}},debug:function(){!z.silent&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.debug=Function.prototype.bind.call(console.info,console,z.name+":"),ne.debug.apply(console,arguments)))},verbose:function(){!z.silent&&z.verbose&&z.debug&&(z.performance?ne.performance.log(arguments):(ne.verbose=Function.prototype.bind.call(console.info,console,z.name+":"),ne.verbose.apply(console,arguments)))},error:function(){z.silent||(ne.error=Function.prototype.bind.call(console.error,console,z.name+":"),ne.error.apply(console,arguments))},performance:{log:function(e){var t,a;z.performance&&(a=(t=Date.now())-(D||t),D=t,v.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:d,"Execution Time":a})),clearTimeout(ne.performance.timer),ne.performance.timer=setTimeout(ne.performance.display,500)},display:function(){var e=z.name+":",a=0;D=!1,clearTimeout(ne.performance.timer),oe.each(v,function(e,t){a+=t["Execution Time"]}),e+=" "+a+"ms",0<v.length&&(console.groupCollapsed(e),console.table?console.table(v):oe.each(v,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),v=[]}},invoke:function(n,e,t){var r,o,a,i,s=u;return e=e||C,t=t||d,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),r=n.length-1,oe.each(n,function(e,t){var a=e!==r?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(oe.isPlainObject(s[a])&&e!==r)s=s[a];else{if(void 0!==s[a])return o=s[a],!1;{if(!oe.isPlainObject(s[t])||e===r)return void 0!==s[t]?o=s[t]:ne.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?a=o.apply(t,e):void 0!==o&&(a=o),Array.isArray(g)?g.push(a):void 0!==g?g=[g,a]:void 0!==a&&(g=a),o}};M?(void 0===u&&ne.initialize(),ne.invoke(b)):(void 0!==u&&u.invoke("destroy"),ne.initialize())}),void 0!==g?g:this},oe.fn.calendar.settings={name:"Calendar",namespace:"calendar",silent:!1,debug:!1,verbose:!1,performance:!0,context:!1,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,a){}},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;/^\d{4}(?:[./-]\d{1,2}){2}$/.test(e)&&(e=e.replace(/[./-]/g,"/")+" 00:00:00"),e=t.monthFirst||!/^\d{1,2}[./-]/.test(e)?e:e.replace(/[./-]/g,"/").replace(/(\d+)\/(\d+)/,"$2/$1");var a,n,r,o=new Date(e);if(!(null!==e.match(/^\d+$/))&&!isNaN(o.getDate()))return o;e=e.toLowerCase();var i,s,l,d,u=-1,p=-1,c=-1,f=-1,h=-1,o="time"===t.type,m=t.type.indexOf("time")<0,g=e.split(t.regExp.dateWords),y=e.split(t.regExp.dateNumbers);if(!m)for(i=0<=oe.inArray(t.text.am.toLowerCase(),g)||!(0<=oe.inArray(t.text.pm.toLowerCase(),g))&&void 0,a=0;a<y.length;a++)if(0<=(l=y[a]).indexOf(":")){if(p<0||u<0)for(d=l.split(":"),r=0;r<Math.min(2,d.length);r++)n=parseInt(d[r],10),isNaN(n)&&(n=0),0===r?p=n%24:u=n%60;y.splice(a,1)}if(!o){for(a=0;a<g.length;a++)if(!((s=g[a]).length<=0)){for(n=0;n<t.text.months.length;n++)if(t.text.months[n].slice(0,s.length).toLowerCase()===s){f=n+1;break}if(0<=f)break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&n>=t.centuryBreak&&a===y.length-1){n<=99&&(n+=t.currentCentury-100),h=n,y.splice(a,1);break}if(f<0)for(a=0;a<y.length;a++)if(r=1<a||t.monthFirst?a:1===a?0:1,n=parseInt(y[r],10),!isNaN(n)&&1<=n&&n<=12){f=n,y.splice(r,1);break}for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&1<=n&&n<=31){c=n,y.splice(a,1);break}if(h<0)for(a=y.length-1;0<=a;a--)if(n=parseInt(y[a],10),!isNaN(n)){n<=99&&(n+=t.currentCentury),h=n,y.splice(a,1);break}}if(!m){if(p<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=23){p=n,y.splice(a,1);break}if(u<0)for(a=0;a<y.length;a++)if(n=parseInt(y[a],10),!isNaN(n)&&0<=n&&n<=59){u=n,y.splice(a,1);break}}if(u<0&&p<0&&c<0&&f<0&&h<0)return null;u<0&&(u=0),p<0&&(p=0),c<0&&(c=1),f<0&&(f=1),h<0&&(h=(new Date).getFullYear()),void 0!==i&&(i?12===p&&(p=0):p<12&&(p+=12));e=new Date(h,f-1,c,p,u);return e.getMonth()===f-1&&e.getFullYear()===h||(e=new Date(h,f,0,p,u)),isNaN(e.getTime())?null:e}},onBeforeChange:function(e,t,a){return!0},onChange:function(e,t,a){},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?|[ASYa]|"[^"]*"|'[^']*'/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);
|
package/dist/components/card.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.11+980ea5e - Checkbox
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -22,7 +22,6 @@
|
|
22
22
|
$.fn.checkbox = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
moduleSelector = $allModules.selector || '',
|
26
25
|
|
27
26
|
time = Date.now(),
|
28
27
|
performance = [],
|
@@ -737,9 +736,6 @@
|
|
737
736
|
totalTime += data['Execution Time'];
|
738
737
|
});
|
739
738
|
title += ' ' + totalTime + 'ms';
|
740
|
-
if (moduleSelector) {
|
741
|
-
title += ' \'' + moduleSelector + '\'';
|
742
|
-
}
|
743
739
|
if (performance.length > 0) {
|
744
740
|
console.groupCollapsed(title);
|
745
741
|
if (console.table) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* # Fomantic UI - 2.9.3-beta.
|
2
|
+
* # Fomantic UI - 2.9.3-beta.11+980ea5e
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
4
4
|
* https://fomantic-ui.com/
|
5
5
|
*
|
@@ -8,4 +8,4 @@
|
|
8
8
|
* https://opensource.org/licenses/MIT
|
9
9
|
*
|
10
10
|
*/
|
11
|
-
!function(I,E,S){"use strict";function O(e){return"function"==typeof e&&"number"!=typeof e.nodeType}E=void 0!==E&&E.Math===Math?E:globalThis,I.fn.checkbox=function(s){var u,e=I(this),b=e.selector||"",y=Date.now(),C=[],x=s,w="string"==typeof x,D=[].slice.call(arguments,1);return e.each(function(){var e,h=I.extend(!0,{},I.fn.checkbox.settings,s),n=h.className,i=h.namespace,g=h.selector,r=h.error,t="."+i,o="module-"+i,p=I(this),a=I(this).children(g.label),f=I(this).children(g.input),k=f[0],c=!1,m=!1,d=p.data(o),l=this,v={initialize:function(){v.verbose("Initializing checkbox",h),v.create.label(),v.bind.events(),v.set.tabbable(),v.hide.input(),v.observeChanges(),v.instantiate(),v.setup()},instantiate:function(){v.verbose("Storing instance of module",v),d=v,p.data(o,v)},destroy:function(){v.verbose("Destroying module"),v.unbind.events(),v.show.input(),p.removeData(o)},fix:{reference:function(){p.is(g.input)&&(v.debug("Behavior called on <input> adjusting invoked element"),p=p.closest(g.checkbox),v.refresh())}},setup:function(){v.set.initialLoad(),v.is.indeterminate()?(v.debug("Initial value is indeterminate"),v.indeterminate()):v.is.checked()?(v.debug("Initial value is checked"),v.check()):(v.debug("Initial value is unchecked"),v.uncheck()),v.remove.initialLoad()},refresh:function(){a=p.children(g.label),f=p.children(g.input),k=f[0]},hide:{input:function(){v.verbose("Modifying <input> z-index to be unselectable"),f.addClass(n.hidden)}},show:{input:function(){v.verbose("Modifying <input> z-index to be selectable"),f.removeClass(n.hidden)}},observeChanges:function(){"MutationObserver"in E&&((e=new MutationObserver(function(e){v.debug("DOM tree modified, updating selector cache"),v.refresh()})).observe(l,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",e))},attachEvents:function(e,n){var i=I(e);n=O(v[n])?v[n]:v.toggle,0<i.length?(v.debug("Attaching checkbox events to element",e,n),i.on("click"+t,n)):v.error(r.notFound)},preventDefaultOnInputTarget:function(){void 0!==event&&null!==event&&I(event.target).is(g.input)&&(v.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){v.should.ignoreCallbacks()||h.onChange.call(k)},click:function(e){var n=I(e.target);n.is(g.input)?v.verbose("Using default check action on initialized checkbox"):n.is(g.link)?v.debug("Clicking link inside checkbox, skipping toggle"):(v.toggle(),f.trigger("focus"),e.preventDefault())},keydown:function(e){var n=e.which,i=13,t=32,o=27,a=37,c=38,r=39,d=40,l=v.get.radios(),s=l.index(p),u=l.length,b=!1;if(n===a||n===c?b=(0===s?u:s)-1:n!==r&&n!==d||(b=s===u-1?0:s+1),!v.should.ignoreCallbacks()&&!1!==b){if(!1===h.beforeUnchecked.apply(k))return v.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===h.beforeChecked.apply(I(l[b]).children(g.input)[0]))return v.verbose("Next option should not allow check, cancelling key navigation"),!1}m=!1,n===o?(v.verbose("Escape key pressed blurring field"),f.trigger("blur"),m=!0,e.stopPropagation()):!e.ctrlKey&&v.can.change()&&(n===t||n===i&&h.enableEnterKey?(v.verbose("Enter/space key pressed, toggling checkbox"),v.toggle(),m=!0):p.is(".toggle, .slider")&&!v.is.radio()&&(n===a&&v.is.checked()?(v.uncheck(),m=!0):n===r&&v.is.unchecked()&&(v.check(),m=!0)))},keyup:function(e){m&&e.preventDefault()}},check:function(){v.should.allowCheck()&&(v.debug("Checking checkbox",f),v.set.checked(),v.should.ignoreCallbacks()||(h.onChecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},uncheck:function(){v.should.allowUncheck()&&(v.debug("Unchecking checkbox"),v.set.unchecked(),v.should.ignoreCallbacks()||(h.onUnchecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},indeterminate:function(){v.should.allowIndeterminate()?v.debug("Checkbox is already indeterminate"):(v.debug("Making checkbox indeterminate"),v.set.indeterminate(),v.should.ignoreCallbacks()||(h.onIndeterminate.call(k),v.trigger.change()))},determinate:function(){v.should.allowDeterminate()?v.debug("Checkbox is already determinate"):(v.debug("Making checkbox determinate"),v.set.determinate(),v.should.ignoreCallbacks()||(h.onDeterminate.call(k),v.trigger.change()))},enable:function(){v.is.enabled()?v.debug("Checkbox is already enabled"):(v.debug("Enabling checkbox"),v.set.enabled(),v.should.ignoreCallbacks()||(h.onEnable.call(k),h.onEnabled.call(k)))},disable:function(){v.is.disabled()?v.debug("Checkbox is already disabled"):(v.debug("Disabling checkbox"),v.set.disabled(),v.should.ignoreCallbacks()||(h.onDisable.call(k),h.onDisabled.call(k)))},get:{radios:function(){var e=v.get.name();return I('input[name="'+e+'"]').closest(g.checkbox)},otherRadios:function(){return v.get.radios().not(p)},name:function(){return f.attr("name")}},is:{initialLoad:function(){return c},radio:function(){return f.hasClass(n.radio)||"radio"===f.attr("type")},indeterminate:function(){return void 0!==f.prop("indeterminate")&&f.prop("indeterminate")},checked:function(){return void 0!==f.prop("checked")&&f.prop("checked")},disabled:function(){return void 0!==f.prop("disabled")&&f.prop("disabled")},enabled:function(){return!v.is.disabled()},determinate:function(){return!v.is.indeterminate()},unchecked:function(){return!v.is.checked()}},should:{allowCheck:function(){return v.is.determinate()&&v.is.checked()&&!v.is.initialLoad()?(v.debug("Should not allow check, checkbox is already checked"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeChecked.apply(k))||(v.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return v.is.determinate()&&v.is.unchecked()&&!v.is.initialLoad()?(v.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeUnchecked.apply(k))||(v.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return v.is.indeterminate()&&!v.is.initialLoad()?(v.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeIndeterminate.apply(k))||(v.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return v.is.determinate()&&!v.is.initialLoad()?(v.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeDeterminate.apply(k))||(v.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return c&&!h.fireOnInit}},can:{change:function(){return!(p.hasClass(n.disabled)||p.hasClass(n.readOnly)||f.prop("disabled")||f.prop("readonly"))},uncheck:function(){return"boolean"==typeof h.uncheckable?h.uncheckable:!v.is.radio()}},set:{initialLoad:function(){c=!0},checked:function(){v.verbose("Setting class to checked"),p.removeClass(n.indeterminate).addClass(n.checked),v.is.radio()&&v.uncheckOthers(),!v.is.indeterminate()&&v.is.checked()?v.debug("Input is already checked, skipping input property change"):(v.verbose("Setting state to checked",k),f.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){v.verbose("Removing checked class"),p.removeClass(n.indeterminate).removeClass(n.checked),!v.is.indeterminate()&&v.is.unchecked()?v.debug("Input is already unchecked"):(v.debug("Setting state to unchecked"),f.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){v.verbose("Setting class to indeterminate"),p.addClass(n.indeterminate),v.is.indeterminate()?v.debug("Input is already indeterminate, skipping input property change"):(v.debug("Setting state to indeterminate"),f.prop("indeterminate",!0))},determinate:function(){v.verbose("Removing indeterminate class"),p.removeClass(n.indeterminate),v.is.determinate()?v.debug("Input is already determinate, skipping input property change"):(v.debug("Setting state to determinate"),f.prop("indeterminate",!1))},disabled:function(){v.verbose("Setting class to disabled"),p.addClass(n.disabled),v.is.disabled()?v.debug("Input is already disabled, skipping input property change"):(v.debug("Setting state to disabled"),f.prop("disabled","disabled"))},enabled:function(){v.verbose("Removing disabled class"),p.removeClass(n.disabled),v.is.enabled()?v.debug("Input is already enabled, skipping input property change"):(v.debug("Setting state to enabled"),f.prop("disabled",!1))},tabbable:function(){v.verbose("Adding tabindex to checkbox"),void 0===f.attr("tabindex")&&f.attr("tabindex",0)}},remove:{initialLoad:function(){c=!1}},trigger:{change:function(){var e,n=f[0];n&&(e=S.createEvent("HTMLEvents"),v.verbose("Triggering native change event"),e.initEvent("change",!0,!1),n.dispatchEvent(e))}},create:{label:function(){0<f.prevAll(g.label).length?(f.prev(g.label).detach().insertAfter(f),v.debug("Moving existing label",a)):v.has.label()||(a=I("<label>").insertAfter(f),v.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){v.verbose("Attaching checkbox events"),p.on("click"+t,v.event.click).on("change"+t,v.event.change).on("keydown"+t,g.input,v.event.keydown).on("keyup"+t,g.input,v.event.keyup)}},unbind:{events:function(){v.debug("Removing events"),p.off(t)}},uncheckOthers:function(){var e=v.get.otherRadios();v.debug("Unchecking other radios",e),e.removeClass(n.checked)},toggle:function(){v.can.change()?v.is.indeterminate()||v.is.unchecked()?(v.debug("Currently unchecked"),v.check()):v.is.checked()&&v.can.uncheck()&&(v.debug("Currently checked"),v.uncheck()):v.is.radio()||v.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,n){if(v.debug("Changing setting",e,n),I.isPlainObject(e))I.extend(!0,h,e);else{if(void 0===n)return h[e];I.isPlainObject(h[e])?I.extend(!0,h[e],n):h[e]=n}},internal:function(e,n){if(I.isPlainObject(e))I.extend(!0,v,e);else{if(void 0===n)return v[e];v[e]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,h.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),v.verbose.apply(console,arguments)))},error:function(){h.silent||(v.error=Function.prototype.bind.call(console.error,console,h.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var n,i;h.performance&&(i=(n=Date.now())-(y||n),y=n,C.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":i})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var e=h.name+":",i=0;y=!1,clearTimeout(v.performance.timer),I.each(C,function(e,n){i+=n["Execution Time"]}),e+=" "+i+"ms",b&&(e+=" '"+b+"'"),0<C.length&&(console.groupCollapsed(e),console.table?console.table(C):I.each(C,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),C=[]}},invoke:function(t,e,n){var o,a,i,c=d;return e=e||D,n=n||l,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),o=t.length-1,I.each(t,function(e,n){var i=e!==o?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(I.isPlainObject(c[i])&&e!==o)c=c[i];else{if(void 0!==c[i])return a=c[i],!1;{if(!I.isPlainObject(c[n])||e===o)return void 0!==c[n]?a=c[n]:v.error(r.method,t),!1;c=c[n]}}})),O(a)?i=a.apply(n,e):void 0!==a&&(i=a),Array.isArray(u)?u.push(i):void 0!==u?u=[u,i]:void 0!==i&&(u=i),a}};w?(void 0===d&&v.initialize(),v.invoke(x)):(void 0!==d&&d.invoke("destroy"),v.initialize())}),void 0!==u?u:this},I.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);
|
11
|
+
!function(D,I,E){"use strict";function S(e){return"function"==typeof e&&"number"!=typeof e.nodeType}I=void 0!==I&&I.Math===Math?I:globalThis,D.fn.checkbox=function(s){var u,e=D(this),b=Date.now(),y=[],C=s,x="string"==typeof C,w=[].slice.call(arguments,1);return e.each(function(){var e,h=D.extend(!0,{},D.fn.checkbox.settings,s),n=h.className,i=h.namespace,g=h.selector,r=h.error,t="."+i,o="module-"+i,p=D(this),a=D(this).children(g.label),f=D(this).children(g.input),k=f[0],c=!1,m=!1,d=p.data(o),l=this,v={initialize:function(){v.verbose("Initializing checkbox",h),v.create.label(),v.bind.events(),v.set.tabbable(),v.hide.input(),v.observeChanges(),v.instantiate(),v.setup()},instantiate:function(){v.verbose("Storing instance of module",v),d=v,p.data(o,v)},destroy:function(){v.verbose("Destroying module"),v.unbind.events(),v.show.input(),p.removeData(o)},fix:{reference:function(){p.is(g.input)&&(v.debug("Behavior called on <input> adjusting invoked element"),p=p.closest(g.checkbox),v.refresh())}},setup:function(){v.set.initialLoad(),v.is.indeterminate()?(v.debug("Initial value is indeterminate"),v.indeterminate()):v.is.checked()?(v.debug("Initial value is checked"),v.check()):(v.debug("Initial value is unchecked"),v.uncheck()),v.remove.initialLoad()},refresh:function(){a=p.children(g.label),f=p.children(g.input),k=f[0]},hide:{input:function(){v.verbose("Modifying <input> z-index to be unselectable"),f.addClass(n.hidden)}},show:{input:function(){v.verbose("Modifying <input> z-index to be selectable"),f.removeClass(n.hidden)}},observeChanges:function(){"MutationObserver"in I&&((e=new MutationObserver(function(e){v.debug("DOM tree modified, updating selector cache"),v.refresh()})).observe(l,{childList:!0,subtree:!0}),v.debug("Setting up mutation observer",e))},attachEvents:function(e,n){var i=D(e);n=S(v[n])?v[n]:v.toggle,0<i.length?(v.debug("Attaching checkbox events to element",e,n),i.on("click"+t,n)):v.error(r.notFound)},preventDefaultOnInputTarget:function(){void 0!==event&&null!==event&&D(event.target).is(g.input)&&(v.verbose("Preventing default check action after manual check action"),event.preventDefault())},event:{change:function(e){v.should.ignoreCallbacks()||h.onChange.call(k)},click:function(e){var n=D(e.target);n.is(g.input)?v.verbose("Using default check action on initialized checkbox"):n.is(g.link)?v.debug("Clicking link inside checkbox, skipping toggle"):(v.toggle(),f.trigger("focus"),e.preventDefault())},keydown:function(e){var n=e.which,i=13,t=32,o=27,a=37,c=38,r=39,d=40,l=v.get.radios(),s=l.index(p),u=l.length,b=!1;if(n===a||n===c?b=(0===s?u:s)-1:n!==r&&n!==d||(b=s===u-1?0:s+1),!v.should.ignoreCallbacks()&&!1!==b){if(!1===h.beforeUnchecked.apply(k))return v.verbose("Option not allowed to be unchecked, cancelling key navigation"),!1;if(!1===h.beforeChecked.apply(D(l[b]).children(g.input)[0]))return v.verbose("Next option should not allow check, cancelling key navigation"),!1}m=!1,n===o?(v.verbose("Escape key pressed blurring field"),f.trigger("blur"),m=!0,e.stopPropagation()):!e.ctrlKey&&v.can.change()&&(n===t||n===i&&h.enableEnterKey?(v.verbose("Enter/space key pressed, toggling checkbox"),v.toggle(),m=!0):p.is(".toggle, .slider")&&!v.is.radio()&&(n===a&&v.is.checked()?(v.uncheck(),m=!0):n===r&&v.is.unchecked()&&(v.check(),m=!0)))},keyup:function(e){m&&e.preventDefault()}},check:function(){v.should.allowCheck()&&(v.debug("Checking checkbox",f),v.set.checked(),v.should.ignoreCallbacks()||(h.onChecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},uncheck:function(){v.should.allowUncheck()&&(v.debug("Unchecking checkbox"),v.set.unchecked(),v.should.ignoreCallbacks()||(h.onUnchecked.call(k),v.trigger.change()),v.preventDefaultOnInputTarget())},indeterminate:function(){v.should.allowIndeterminate()?v.debug("Checkbox is already indeterminate"):(v.debug("Making checkbox indeterminate"),v.set.indeterminate(),v.should.ignoreCallbacks()||(h.onIndeterminate.call(k),v.trigger.change()))},determinate:function(){v.should.allowDeterminate()?v.debug("Checkbox is already determinate"):(v.debug("Making checkbox determinate"),v.set.determinate(),v.should.ignoreCallbacks()||(h.onDeterminate.call(k),v.trigger.change()))},enable:function(){v.is.enabled()?v.debug("Checkbox is already enabled"):(v.debug("Enabling checkbox"),v.set.enabled(),v.should.ignoreCallbacks()||(h.onEnable.call(k),h.onEnabled.call(k)))},disable:function(){v.is.disabled()?v.debug("Checkbox is already disabled"):(v.debug("Disabling checkbox"),v.set.disabled(),v.should.ignoreCallbacks()||(h.onDisable.call(k),h.onDisabled.call(k)))},get:{radios:function(){var e=v.get.name();return D('input[name="'+e+'"]').closest(g.checkbox)},otherRadios:function(){return v.get.radios().not(p)},name:function(){return f.attr("name")}},is:{initialLoad:function(){return c},radio:function(){return f.hasClass(n.radio)||"radio"===f.attr("type")},indeterminate:function(){return void 0!==f.prop("indeterminate")&&f.prop("indeterminate")},checked:function(){return void 0!==f.prop("checked")&&f.prop("checked")},disabled:function(){return void 0!==f.prop("disabled")&&f.prop("disabled")},enabled:function(){return!v.is.disabled()},determinate:function(){return!v.is.indeterminate()},unchecked:function(){return!v.is.checked()}},should:{allowCheck:function(){return v.is.determinate()&&v.is.checked()&&!v.is.initialLoad()?(v.debug("Should not allow check, checkbox is already checked"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeChecked.apply(k))||(v.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return v.is.determinate()&&v.is.unchecked()&&!v.is.initialLoad()?(v.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeUnchecked.apply(k))||(v.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return v.is.indeterminate()&&!v.is.initialLoad()?(v.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeIndeterminate.apply(k))||(v.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return v.is.determinate()&&!v.is.initialLoad()?(v.debug("Should not allow determinate, checkbox is already determinate"),!1):!(!v.should.ignoreCallbacks()&&!1===h.beforeDeterminate.apply(k))||(v.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},ignoreCallbacks:function(){return c&&!h.fireOnInit}},can:{change:function(){return!(p.hasClass(n.disabled)||p.hasClass(n.readOnly)||f.prop("disabled")||f.prop("readonly"))},uncheck:function(){return"boolean"==typeof h.uncheckable?h.uncheckable:!v.is.radio()}},set:{initialLoad:function(){c=!0},checked:function(){v.verbose("Setting class to checked"),p.removeClass(n.indeterminate).addClass(n.checked),v.is.radio()&&v.uncheckOthers(),!v.is.indeterminate()&&v.is.checked()?v.debug("Input is already checked, skipping input property change"):(v.verbose("Setting state to checked",k),f.prop("indeterminate",!1).prop("checked",!0))},unchecked:function(){v.verbose("Removing checked class"),p.removeClass(n.indeterminate).removeClass(n.checked),!v.is.indeterminate()&&v.is.unchecked()?v.debug("Input is already unchecked"):(v.debug("Setting state to unchecked"),f.prop("indeterminate",!1).prop("checked",!1))},indeterminate:function(){v.verbose("Setting class to indeterminate"),p.addClass(n.indeterminate),v.is.indeterminate()?v.debug("Input is already indeterminate, skipping input property change"):(v.debug("Setting state to indeterminate"),f.prop("indeterminate",!0))},determinate:function(){v.verbose("Removing indeterminate class"),p.removeClass(n.indeterminate),v.is.determinate()?v.debug("Input is already determinate, skipping input property change"):(v.debug("Setting state to determinate"),f.prop("indeterminate",!1))},disabled:function(){v.verbose("Setting class to disabled"),p.addClass(n.disabled),v.is.disabled()?v.debug("Input is already disabled, skipping input property change"):(v.debug("Setting state to disabled"),f.prop("disabled","disabled"))},enabled:function(){v.verbose("Removing disabled class"),p.removeClass(n.disabled),v.is.enabled()?v.debug("Input is already enabled, skipping input property change"):(v.debug("Setting state to enabled"),f.prop("disabled",!1))},tabbable:function(){v.verbose("Adding tabindex to checkbox"),void 0===f.attr("tabindex")&&f.attr("tabindex",0)}},remove:{initialLoad:function(){c=!1}},trigger:{change:function(){var e,n=f[0];n&&(e=E.createEvent("HTMLEvents"),v.verbose("Triggering native change event"),e.initEvent("change",!0,!1),n.dispatchEvent(e))}},create:{label:function(){0<f.prevAll(g.label).length?(f.prev(g.label).detach().insertAfter(f),v.debug("Moving existing label",a)):v.has.label()||(a=D("<label>").insertAfter(f),v.debug("Creating label",a))}},has:{label:function(){return 0<a.length}},bind:{events:function(){v.verbose("Attaching checkbox events"),p.on("click"+t,v.event.click).on("change"+t,v.event.change).on("keydown"+t,g.input,v.event.keydown).on("keyup"+t,g.input,v.event.keyup)}},unbind:{events:function(){v.debug("Removing events"),p.off(t)}},uncheckOthers:function(){var e=v.get.otherRadios();v.debug("Unchecking other radios",e),e.removeClass(n.checked)},toggle:function(){v.can.change()?v.is.indeterminate()||v.is.unchecked()?(v.debug("Currently unchecked"),v.check()):v.is.checked()&&v.can.uncheck()&&(v.debug("Currently checked"),v.uncheck()):v.is.radio()||v.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,n){if(v.debug("Changing setting",e,n),D.isPlainObject(e))D.extend(!0,h,e);else{if(void 0===n)return h[e];D.isPlainObject(h[e])?D.extend(!0,h[e],n):h[e]=n}},internal:function(e,n){if(D.isPlainObject(e))D.extend(!0,v,e);else{if(void 0===n)return v[e];v[e]=n}},debug:function(){!h.silent&&h.debug&&(h.performance?v.performance.log(arguments):(v.debug=Function.prototype.bind.call(console.info,console,h.name+":"),v.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?v.performance.log(arguments):(v.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),v.verbose.apply(console,arguments)))},error:function(){h.silent||(v.error=Function.prototype.bind.call(console.error,console,h.name+":"),v.error.apply(console,arguments))},performance:{log:function(e){var n,i;h.performance&&(i=(n=Date.now())-(b||n),b=n,y.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:l,"Execution Time":i})),clearTimeout(v.performance.timer),v.performance.timer=setTimeout(v.performance.display,500)},display:function(){var e=h.name+":",i=0;b=!1,clearTimeout(v.performance.timer),D.each(y,function(e,n){i+=n["Execution Time"]}),e+=" "+i+"ms",0<y.length&&(console.groupCollapsed(e),console.table?console.table(y):D.each(y,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),y=[]}},invoke:function(t,e,n){var o,a,i,c=d;return e=e||w,n=n||l,"string"==typeof t&&void 0!==c&&(t=t.split(/[ .]/),o=t.length-1,D.each(t,function(e,n){var i=e!==o?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(D.isPlainObject(c[i])&&e!==o)c=c[i];else{if(void 0!==c[i])return a=c[i],!1;{if(!D.isPlainObject(c[n])||e===o)return void 0!==c[n]?a=c[n]:v.error(r.method,t),!1;c=c[n]}}})),S(a)?i=a.apply(n,e):void 0!==a&&(i=a),Array.isArray(u)?u.push(i):void 0!==u?u=[u,i]:void 0!==i&&(u=i),a}};x?(void 0===d&&v.initialize(),v.invoke(C)):(void 0!==d&&d.invoke("destroy"),v.initialize())}),void 0!==u?u: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);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* # Fomantic-UI 2.9.3-beta.
|
2
|
+
* # Fomantic-UI 2.9.3-beta.11+980ea5e - Dimmer
|
3
3
|
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
@@ -46,7 +46,6 @@
|
|
46
46
|
|
47
47
|
eventNamespace = '.' + namespace,
|
48
48
|
moduleNamespace = 'module-' + namespace,
|
49
|
-
moduleSelector = $allModules.selector || '',
|
50
49
|
|
51
50
|
clickEvent = 'ontouchstart' in document.documentElement
|
52
51
|
? 'touchstart'
|
@@ -542,9 +541,6 @@
|
|
542
541
|
totalTime += data['Execution Time'];
|
543
542
|
});
|
544
543
|
title += ' ' + totalTime + 'ms';
|
545
|
-
if (moduleSelector) {
|
546
|
-
title += ' \'' + moduleSelector + '\'';
|
547
|
-
}
|
548
544
|
if ($allModules.length > 1) {
|
549
545
|
title += ' (' + $allModules.length + ')';
|
550
546
|
}
|