webpack-bootstrap-ui-kit/dist/js/app.js
2022-08-25 21:38:42 +02:00

1 line
126 KiB
JavaScript

!function(){"use strict";var t={684:function(t){t.exports=function makeYoutubeEmbed(t){if("string"===typeof t){var o=function getId(t){var o=t.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(o&&11==o[2].length)return o[2]}(t);return o?"//www.youtube.com/embed/"+o:void 0}}}},o={};function __webpack_require__(a){var i=o[a];if(void 0!==i)return i.exports;var c=o[a]={exports:{}};return t[a](c,c.exports,__webpack_require__),c.exports}!function(){var t={APOLLO_ERROR:"apollo-error",AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",DOMLOADED:"DOMContentLoaded",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"},o=(function(o){var a="_main.visibility",i=document,c=i.body;i.addEventListener("visibilitychange",(function(){"hidden"===i.visibilityState?(console.log("".concat(a,": Tab: hidden")),c.classList.add("is-hidden"),c.classList.remove("is-focused"),o.dispatchEvent(new Event(t.TABHIDDEN))):(console.log("".concat(a,": Tab: focused")),c.classList.add("is-focused"),c.classList.remove("is-hidden"),o.dispatchEvent(new Event(t.TABFOCUSED)))}))}(window),function(o){var a,i,c="_main.touch",l=document,u=l.body,p=function SET_TOUCH_SCREEN(l,p){i||p===a||(l?(console.log("".concat(c,": Touch screen enabled")),u.classList.add("is-touch"),u.classList.remove("is-mouse"),o.dispatchEvent(new Event(t.TOUCHENABLE))):(console.log("".concat(c,": Touch screen disabled")),u.classList.add("is-mouse"),u.classList.remove("is-touch"),o.dispatchEvent(new Event(t.TOUCHDISABLED))),a=p,i||(i=setTimeout((function(){clearTimeout(i),i=null}),500)))};p("ontouchstart"in o||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0||o.matchMedia("(hover: none)").matches,"init"),l.addEventListener("touchend",(function(t){var o=!1;"click"!==t.type&&(o=!0),p(o,"click-touchend")})),l.addEventListener("click",(function(t){var o=!1;"click"!==t.type&&(o=!0),p(o,"click-touchend")}))}(window),{ENVS:["xs","sm","md","lg","xl","xxl","xxxl"]});function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function _unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return _arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _arrayLikeToArray(t,o)}(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}!function(a){var i=document,c=i.body,l=function detectCSSScreenSize(){var t,l=i.createElement("div");l.className="env-test",c.appendChild(l);var u=_toConsumableArray(o.ENVS).reverse(),p=u.shift();(t=c.classList).remove.apply(t,_toConsumableArray(u));for(var h=0;h<u.length;++h){var v=u[h];if(l.classList.add("d-".concat(v,"-none")),"none"===a.getComputedStyle(l).display){p=v,c.classList.add("".concat(p));break}}var g=!0;return a.innerWidth>a.innerHeight?(c.classList.add("landscape"),c.classList.remove("portrait")):(g=!1,c.classList.add("portrait"),c.classList.remove("landscape")),console.log("".concat("_main.css-screen-size",": screen size detected ").concat(p," | landscape ").concat(g)),c.removeChild(l),p};a.addEventListener("".concat(t.LOADED),l),a.addEventListener("".concat(t.RESIZE),l)}(window);function _defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var a="_main.loading-spinner",i=document.getElementById("PageLoading"),c=function(){function SpinnerUI(){!function _classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,SpinnerUI)}return function _createClass(t,o,a){return o&&_defineProperties(t.prototype,o),a&&_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(SpinnerUI,null,[{key:"show",value:function show(){console.log("".concat(a,": show")),i.classList.remove("d-none")}},{key:"hide",value:function hide(){console.log("".concat(a,": hide")),i.classList.add("d-none")}}]),SpinnerUI}();function main_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}!function(a){var i=document.body;console.info("%cUI Kit ".concat("@a2nt/ss-bootstrap-ui-webpack-boilerplate-react"," ").concat("4.7.3"),"color:yellow;font-size:14px"),console.info("%c".concat("@a2nt/meta-lightbox-js"," ").concat("4.2.3"),"color:yellow;font-size:12px"),console.info("%chttps://github.com/a2nt/webpack-bootstrap-ui-kit by ".concat("Tony Air <tony@twma.pro>"),"color:yellow;font-size:10px"),console.info("%cENV: ".concat("production"),"color:green;font-size:10px"),console.groupCollapsed("Events"),Object.keys(t).forEach((function(o){console.info("".concat(o,": ").concat(t[o]))})),console.groupEnd("Events"),console.groupCollapsed("Consts"),Object.keys(o).forEach((function(t){console.info("".concat(t,": ").concat(o[t]))})),console.groupEnd("Events"),console.groupCollapsed("Init"),console.time("init");var l=function(){function MainUI(){!function main_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,MainUI)}return function main_createClass(t,o,a){return o&&main_defineProperties(t.prototype,o),a&&main_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(MainUI,null,[{key:"init",value:function init(){a.history.replaceState({landing:a.location.href},document.title,a.location.href),this.loaded()}},{key:"loaded",value:function loaded(){console.log("".concat("_main",": loaded"))}}]),MainUI}(),u=function documentInit(){l.init(),i.classList.add("loaded"),c.hide(),console.groupEnd("init"),console.timeEnd("init"),a.addEventListener("".concat(t.LOADED),(function(o){a.dispatchEvent(new Event(t.LODEDANDREADY))}))};"loading"===document.readyState?document.addEventListener("".concat(t.DOMLOADED),u):u(),a.addEventListener("".concat(t.AJAX),(function(){l.loaded()})),a.MainUI=l}(window);var l="ajax-load",u="load-ready";function window_toConsumableArray(t){return function window_arrayWithoutHoles(t){if(Array.isArray(t))return window_arrayLikeToArray(t)}(t)||function window_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function window_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return window_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return window_arrayLikeToArray(t,o)}(t)||function window_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function window_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function window_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function window_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _defineProperty(t,o,a){return o in t?Object.defineProperty(t,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[o]=a,t}var p=window,h=function(){function MetaWindow(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shown:!1},a=arguments.length>1?arguments[1]:void 0;window_classCallCheck(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var o=t;console.log("".concat(o.name,": show")),o.setState({shown:!0}),p.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var o=t;console.log("".concat(o.name,": hide")),o.setState({shown:!1}),p.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var o=t,a=o.state.current.getAttribute("data-gallery"),i=o._currIndex();i<o.state.collections[a].length-1?i++:i=0,o.state.collections[a][i].click(),console.log("".concat(o.name,": next")),p.dispatchEvent(new Event("{ui.name}.next"))})),_defineProperty(this,"prev",(function(){var o=t,a=o.state.current.getAttribute("data-gallery"),i=o._currIndex();i>0?i--:i=o.state.collections[a].length-1,o.state.collections[a][i].click(),console.log("".concat(o.name,": prev")),p.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){t.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(o){var a=t;a.reset(),a.setState({loading:!0}),a.show(),window.fetch(o).then((function(t){var i=t.headers.get("content-type");console.log(t),console.log("".concat(a.name,": response content-type: ").concat(i));switch(i){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.arrayBuffer().then((function(t){a.setContent('<img src="data:'.concat(i,";base64,").concat(a._imageEncode(t),'" />'),"meta-".concat(a.name,"--image"))}));break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":a.setContent("".concat((!1).Content),["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--json")]);break;case"video/mp4":a.setContent('<video controls autoplay><source src="'.concat(o,'" type="video/mp4">Your browser does not support the video tag.</video>'),["meta-".concat(a.name,"--image"),"meta-".concat(a.name,"--video")]);break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":a.setContent(t.data,["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--pajax")]);break;default:console.warn("".concat(a.name,": Unknown response content-type!"))}p.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(t){console.error(t);var o="";if(t.response)switch(t.response.status){case 404:o="Not Found.";break;case 500:o="Server issue, please try again latter.";break;default:o="Something went wrong."}else t.request?o="No response received":console.warn("Error",t.message);a.setState({error:o}),p.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){a.setState({loading:!1}),setTimeout((function(){a.state.current.classList.remove("loading")}),1e3)}))})),_defineProperty(this,"_currIndex",(function(){var o=t,a=o.state.current,i=a.getAttribute("data-gallery");return o.state.collections[i].indexOf(a)})),_defineProperty(this,"embed",(function(o){var a=t;console.log("".concat(a.name,": embed")),a.reset(),a.setState({embed:o,loading:!1,type:["meta-".concat(a.name,"--embed"),"meta-".concat(a.name,"--video")]}),a.show()})),_defineProperty(this,"setCaption",(function(o){var a=t;console.log("".concat(a.name,": setCaption")),a.state.caption=o})),_defineProperty(this,"addExtraClass",(function(o){var a=t;o&&o.length&&(console.log("".concat(a.name,": addExtraClass(").concat(o,")")),a.state.extraClass=o)})),_defineProperty(this,"getCaption",(function(){return t.state.caption})),_defineProperty(this,"_imageEncode",(function(t){var o="";return[].slice.call(new Uint8Array(t)).forEach((function(t){o+=String.fromCharCode(t)})),window.btoa(o)})),_defineProperty(this,"setContent",(function(o,a){var i=t;console.log("".concat(i.name,": setContent"));var c=a||["meta-".concat(i.name,"--html"),"meta-".concat(i.name,"--text")];Array.isArray(c)||(c=a.split(" ")),i.setState({content:o,type:c})})),_defineProperty(this,"getHtml",(function(){var o=t;if(o.state.embed){var a=__webpack_require__(684)(o.state.embed);o.state.content='<iframe width="600" height="380" src="'.concat(a,'" frameborder="0"></iframe>')}return o.state.content}));var i=this;switch(i.name=i.constructor.name,console.log("".concat(i.name,": init")),i.setState(o),a){case"show":case"hide":i.hide()}p.dispatchEvent(new Event("{ui.name}.init"))}return function window_createClass(t,o,a){return o&&window_defineProperties(t.prototype,o),a&&window_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(MetaWindow,[{key:"cleanLinks",value:function cleanLinks(){document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(t){t.classList.remove("loading")}))}},{key:"collectGaleries",value:function collectGaleries(t){var o=this;t&&(o.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(a){o.state.collections[t].push(a)})))}},{key:"toggle",value:function toggle(t){var o=this;o.cleanLinks();var a=t.getAttribute("href")||t.getAttribute("data-href"),i=t.getAttribute("data-embed");t.classList.add("loading"),o.state.current=t;var c=t.getAttribute("data-title");c&&o.setCaption(c),i?o.embed(a):o.load(a),o.addExtraClass(t.getAttribute("data-lightbox-class"))}},{key:"init",value:function init(){var t=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery]').forEach((function(o){var a=o.getAttribute("data-gallery");t.collectGaleries(a),o.addEventListener("click",(function(o){o.preventDefault(),console.log("MetaWindow: [link] click");var a=o.currentTarget;t.toggle(a)}))}))}},{key:"setState",value:function setState(t){var o=this;o.state=Object.assign({},o.state,t),o.render()}},{key:"render",value:function render(){var t,o=this,a=o.name,i=o.state.current;o.state.target.innerHTML="";var c=document.createElement("div");c.classList.add("meta-".concat(a)),(t=c.classList).add.apply(t,window_toConsumableArray(o.state.type)),o.state.target.append(c);var l=document.createElement("div");l.classList.add("meta-".concat(a,"-overlay")),o.state.shown&&l.classList.add("meta-".concat(a,"-overlay--open")),o.state.loading&&l.classList.add("meta-".concat(a,"-overlay--loading")),o.state.error&&l.classList.add("meta-".concat(a,"-overlay--error")),c.append(l);var u=document.createElement("div");u.classList.add("meta-content"),l.append(u);var p=document.createElement("button");if(p.classList.add("meta-nav","meta-close","a"),p.innerHTML='<i class="icon fa fas fa-times"></i> <span class="visually-hidden">Close</span>',p.addEventListener("click",(function(t){t.preventDefault(),o.hide()})),u.append(p),i){var h=i.getAttribute("data-gallery");if(h&&o.state.collections[h].length>1){var v=document.createElement("nav");v.classList.add("meta-navs");var g=document.createElement("button");g.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),g.innerHTML='<i class="icon fa fas fa-chevron-left"></i> <span class="visually-hidden">Previous</span>',g.addEventListener("click",(function(t){t.preventDefault(),o.prev()})),v.append(g);var b=document.createElement("button");b.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),b.innerHTML='<i class="icon fa fas fa-chevron-right"></i> <span class="visually-hidden">Next</span>',b.addEventListener("click",(function(t){t.preventDefault(),o.next()})),v.append(b),u.append(v)}}var w=document.createElement("section");if(w.classList.add("meta-wrap","typography"),o.state.extraClass&&w.classList.add(o.state.extraClass),w.innerHTML=o.getHtml(),u.append(w),o.state.error){var _=document.createElement("div");_.classList.add("meta-error"),_.innerHTML=o.state.error,u.append(_)}else if(o.state.caption){var k=document.createElement("div");k.classList.add("meta-caption"),k.innerHTML=o.getCaption(),u.append(k)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),o}}]),MetaWindow}(),v=h,g=document.getElementById("MetaLightboxApp");g||console.log("MetaWindow: missing container #MetaLightboxApp");var b=function init(){var t=window.MetaWindow;"undefined"===typeof t&&(t=new v({target:g}),window.MetaWindow=t),t.init()};window.addEventListener("".concat(u),b),window.addEventListener("".concat(l),b),window.addEventListener("MetaWindow.initLinks",b);function _createForOfIteratorHelper(t,o){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function util_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return util_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return util_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){a&&(t=a);var i=0,c=function F(){};return{s:c,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(p)throw l}}}}function util_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var w="transitionend",_=function toType(t){return null===t||void 0===t?"".concat(t):Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase()},k=function getSelector(t){var o=t.getAttribute("data-bs-target");if(!o||"#"===o){var a=t.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a="#".concat(a.split("#")[1])),o=a&&"#"!==a?a.trim():null}return o},A=function getTransitionDurationFromElement(t){if(!t)return 0;var o=window.getComputedStyle(t),a=o.transitionDuration,i=o.transitionDelay,c=Number.parseFloat(a),l=Number.parseFloat(i);return c||l?(a=a.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(a)+Number.parseFloat(i))):0},O=function triggerTransitionEnd(t){t.dispatchEvent(new Event(w))},E=function isElement(t){return!(!t||"object"!==_typeof(t))&&("undefined"!==typeof t.jquery&&(t=t[0]),"undefined"!==typeof t.nodeType)},S=function getElement(t){return E(t)?t.jquery?t[0]:t:"string"===typeof t&&t.length>0?document.querySelector(t):null},P=function isVisible(t){if(!E(t)||0===t.getClientRects().length)return!1;var o="visible"===getComputedStyle(t).getPropertyValue("visibility"),a=t.closest("details:not([open])");if(!a)return o;if(a!==t){var i=t.closest("summary");if(i&&i.parentNode!==a)return!1;if(null===i)return!1}return o},T=function reflow(t){t.offsetHeight},C=function getjQuery(){return window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null},L=[],V=function isRTL(){return"rtl"===document.documentElement.dir},I=function execute(t){"function"===typeof t&&t()},x=function executeAfterTransition(t,o){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(a){var i=5,c=A(o)+i,l=!1,u=function handler(a){a.target===o&&(l=!0,o.removeEventListener(w,handler),I(t))};o.addEventListener(w,u),setTimeout((function(){l||O(o)}),c)}else I(t)},j=function getNextActiveElement(t,o,a,i){var c=t.length,l=t.indexOf(o);return-1===l?!a&&i?t[c-1]:t[0]:(l+=a?1:-1,i&&(l=(l+c)%c),t[Math.max(0,Math.min(l,c-1))])};function _slicedToArray(t,o){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,o){var a=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,c,l=[],u=!0,p=!1;try{for(a=a.call(t);!(u=(i=a.next()).done)&&(l.push(i.value),!o||l.length!==o);u=!0);}catch(h){p=!0,c=h}finally{try{u||null==a.return||a.return()}finally{if(p)throw c}}return l}(t,o)||event_handler_unsupportedIterableToArray(t,o)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_handler_createForOfIteratorHelper(t,o){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=event_handler_unsupportedIterableToArray(t))||o&&t&&"number"===typeof t.length){a&&(t=a);var i=0,c=function F(){};return{s:c,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(p)throw l}}}}function event_handler_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return event_handler_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?event_handler_arrayLikeToArray(t,o):void 0}}function event_handler_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}var N=/[^.]*(?=\..*)\.|.*/,R=/\..*/,Y=/::\d+$/,B={},H=1,W={mouseenter:"mouseover",mouseleave:"mouseout"},U=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function makeEventUid(t,o){return o&&"".concat(o,"::").concat(H++)||t.uidEvent||H++}function getElementEvents(t){var o=makeEventUid(t);return t.uidEvent=o,B[o]=B[o]||{},B[o]}function findHandler(t,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Object.values(t).find((function(t){return t.callable===o&&t.delegationSelector===a}))}function normalizeParameters(t,o,a){var i="string"===typeof o,c=i?a:o||a,l=getTypeEvent(t);return U.has(l)||(l=t),[i,c,l]}function addHandler(t,o,a,i,c){if("string"===typeof o&&t){var l=_slicedToArray(normalizeParameters(o,a,i),3),u=l[0],p=l[1],h=l[2];if(o in W){p=function wrapFunction(t){return function(o){if(!o.relatedTarget||o.relatedTarget!==o.delegateTarget&&!o.delegateTarget.contains(o.relatedTarget))return t.call(this,o)}}(p)}var v=getElementEvents(t),g=v[h]||(v[h]={}),b=findHandler(g,p,u?a:null);if(b)b.oneOff=b.oneOff&&c;else{var w=makeEventUid(p,o.replace(N,"")),_=u?function bootstrapDelegationHandler(t,o,a){return function handler(i){for(var c=t.querySelectorAll(o),l=i.target;l&&l!==this;l=l.parentNode){var u,p=event_handler_createForOfIteratorHelper(c);try{for(p.s();!(u=p.n()).done;)if(u.value===l)return hydrateObj(i,{delegateTarget:l}),handler.oneOff&&z.off(t,i.type,o,a),a.apply(l,[i])}catch(h){p.e(h)}finally{p.f()}}}}(t,a,p):function bootstrapHandler(t,o){return function handler(a){return hydrateObj(a,{delegateTarget:t}),handler.oneOff&&z.off(t,a.type,o),o.apply(t,[a])}}(t,p);_.delegationSelector=u?a:null,_.callable=p,_.oneOff=c,_.uidEvent=w,g[w]=_,t.addEventListener(h,_,u)}}}function removeHandler(t,o,a,i,c){var l=findHandler(o[a],i,c);l&&(t.removeEventListener(a,l,Boolean(c)),delete o[a][l.uidEvent])}function removeNamespacedHandlers(t,o,a,i){for(var c=o[a]||{},l=0,u=Object.keys(c);l<u.length;l++){var p=u[l];if(p.includes(i)){var h=c[p];removeHandler(t,o,a,h.callable,h.delegationSelector)}}}function getTypeEvent(t){return t=t.replace(R,""),W[t]||t}var z={on:function on(t,o,a,i){addHandler(t,o,a,i,!1)},one:function one(t,o,a,i){addHandler(t,o,a,i,!0)},off:function off(t,o,a,i){if("string"===typeof o&&t){var c=_slicedToArray(normalizeParameters(o,a,i),3),l=c[0],u=c[1],p=c[2],h=p!==o,v=getElementEvents(t),g=v[p]||{},b=o.startsWith(".");if("undefined"===typeof u){if(b)for(var w=0,_=Object.keys(v);w<_.length;w++){removeNamespacedHandlers(t,v,_[w],o.slice(1))}for(var k=0,A=Object.keys(g);k<A.length;k++){var O=A[k],E=O.replace(Y,"");if(!h||o.includes(E)){var S=g[O];removeHandler(t,v,p,S.callable,S.delegationSelector)}}}else{if(!Object.keys(g).length)return;removeHandler(t,v,p,u,l?a:null)}}},trigger:function trigger(t,o,a){if("string"!==typeof o||!t)return null;var $=C(),i=null,c=!0,l=!0,u=!1;o!==getTypeEvent(o)&&$&&(i=$.Event(o,a),$(t).trigger(i),c=!i.isPropagationStopped(),l=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());var p=new Event(o,{bubbles:c,cancelable:!0});return p=hydrateObj(p,a),u&&p.preventDefault(),l&&t.dispatchEvent(p),p.defaultPrevented&&i&&i.preventDefault(),p}};function hydrateObj(t,o){for(var a=function _loop(){var o=_slicedToArray(c[i],2),a=o[0],l=o[1];try{t[a]=l}catch(u){Object.defineProperty(t,a,{configurable:!0,get:function get(){return l}})}},i=0,c=Object.entries(o||{});i<c.length;i++)a();return t}var q=z;function manipulator_createForOfIteratorHelper(t,o){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function manipulator_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return manipulator_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return manipulator_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){a&&(t=a);var i=0,c=function F(){};return{s:c,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(p)throw l}}}}function manipulator_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function normalizeData(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!==typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(o){return t}}function normalizeDataKey(t){return t.replace(/[A-Z]/g,(function(t){return"-".concat(t.toLowerCase())}))}var K={setDataAttribute:function setDataAttribute(t,o,a){t.setAttribute("data-bs-".concat(normalizeDataKey(o)),a)},removeDataAttribute:function removeDataAttribute(t,o){t.removeAttribute("data-bs-".concat(normalizeDataKey(o)))},getDataAttributes:function getDataAttributes(t){if(!t)return{};var o,a={},i=Object.keys(t.dataset).filter((function(t){return t.startsWith("bs")&&!t.startsWith("bsConfig")})),c=manipulator_createForOfIteratorHelper(i);try{for(c.s();!(o=c.n()).done;){var l=o.value,u=l.replace(/^bs/,"");a[u=u.charAt(0).toLowerCase()+u.slice(1,u.length)]=normalizeData(t.dataset[l])}}catch(p){c.e(p)}finally{c.f()}return a},getDataAttribute:function getDataAttribute(t,o){return normalizeData(t.getAttribute("data-bs-".concat(normalizeDataKey(o))))}};function selector_engine_toConsumableArray(t){return function selector_engine_arrayWithoutHoles(t){if(Array.isArray(t))return selector_engine_arrayLikeToArray(t)}(t)||function selector_engine_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function selector_engine_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return selector_engine_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return selector_engine_arrayLikeToArray(t,o)}(t)||function selector_engine_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function selector_engine_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}var X={find:function find(t){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return(o=[]).concat.apply(o,selector_engine_toConsumableArray(Element.prototype.querySelectorAll.call(a,t)))},findOne:function findOne(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement;return Element.prototype.querySelector.call(o,t)},children:function children(t,o){var a;return(a=[]).concat.apply(a,selector_engine_toConsumableArray(t.children)).filter((function(t){return t.matches(o)}))},parents:function parents(t,o){for(var parents=[],a=t.parentNode.closest(o);a;)parents.push(a),a=a.parentNode.closest(o);return parents},prev:function prev(t,o){for(var a=t.previousElementSibling;a;){if(a.matches(o))return[a];a=a.previousElementSibling}return[]},next:function next(t,o){for(var next=t.nextElementSibling;next;){if(next.matches(o))return[next];next=next.nextElementSibling}return[]},focusableChildren:function focusableChildren(t){var o=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((function(t){return"".concat(t,':not([tabindex^="-"])')})).join(",");return this.find(o,t).filter((function(t){return!function isDisabled(t){return!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||("undefined"!==typeof t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled"))}(t)&&P(t)}))}},J=X;function config_typeof(t){return config_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},config_typeof(t)}function ownKeys(t,o){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),a.push.apply(a,i)}return a}function _objectSpread(t){for(var o=1;o<arguments.length;o++){var a=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(a),!0).forEach((function(o){config_defineProperty(t,o,a[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach((function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(a,o))}))}return t}function config_defineProperty(t,o,a){return o in t?Object.defineProperty(t,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[o]=a,t}function config_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var G=function(){function Config(){!function config_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Config)}return function config_createClass(t,o,a){return o&&config_defineProperties(t.prototype,o),a&&config_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(Config,[{key:"_getConfig",value:function _getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}},{key:"_configAfterMerge",value:function _configAfterMerge(t){return t}},{key:"_mergeConfigObj",value:function _mergeConfigObj(t,o){var a=E(o)?K.getDataAttribute(o,"config"):{};return _objectSpread(_objectSpread(_objectSpread(_objectSpread({},this.constructor.Default),"object"===config_typeof(a)?a:{}),E(o)?K.getDataAttributes(o):{}),"object"===config_typeof(t)?t:{})}},{key:"_typeCheckConfig",value:function _typeCheckConfig(t){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.constructor.DefaultType,a=0,i=Object.keys(o);a<i.length;a++){var c=i[a],l=o[c],u=t[c],p=E(u)?"element":_(u);if(!new RegExp(l).test(p))throw new TypeError("".concat(this.constructor.NAME.toUpperCase(),': Option "').concat(c,'" provided type "').concat(p,'" but expected type "').concat(l,'".'))}}}],[{key:"Default",get:function get(){return{}}},{key:"DefaultType",get:function get(){return{}}},{key:"NAME",get:function get(){throw new Error('You have to implement the static method "NAME", for each component!')}}]),Config}(),Z=G;function swipe_typeof(t){return swipe_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},swipe_typeof(t)}function swipe_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _setPrototypeOf(t,o){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},_setPrototypeOf(t,o)}function _createSuper(t){var o=function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=_getPrototypeOf(t);if(o){var c=_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return _possibleConstructorReturn(this,a)}}function _possibleConstructorReturn(t,o){if(o&&("object"===swipe_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}var Q=".bs.swipe",ee="touchstart".concat(Q),te="touchmove".concat(Q),ne="touchend".concat(Q),re="pointerdown".concat(Q),oe="pointerup".concat(Q),ae={endCallback:null,leftCallback:null,rightCallback:null},ie={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"},se=function(t){!function _inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&_setPrototypeOf(t,o)}(Swipe,t);var o=_createSuper(Swipe);function Swipe(t,a){var i;return function swipe_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Swipe),(i=o.call(this))._element=t,t&&Swipe.isSupported()?(i._config=i._getConfig(a),i._deltaX=0,i._supportPointerEvents=Boolean(window.PointerEvent),i._initEvents(),i):_possibleConstructorReturn(i)}return function swipe_createClass(t,o,a){return o&&swipe_defineProperties(t.prototype,o),a&&swipe_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(Swipe,[{key:"dispose",value:function dispose(){q.off(this._element,Q)}},{key:"_start",value:function _start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}},{key:"_end",value:function _end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),I(this._config.endCallback)}},{key:"_move",value:function _move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}},{key:"_handleSwipe",value:function _handleSwipe(){var t=Math.abs(this._deltaX);if(!(t<=40)){var o=t/this._deltaX;this._deltaX=0,o&&I(o>0?this._config.rightCallback:this._config.leftCallback)}}},{key:"_initEvents",value:function _initEvents(){var t=this;this._supportPointerEvents?(q.on(this._element,re,(function(o){return t._start(o)})),q.on(this._element,oe,(function(o){return t._end(o)})),this._element.classList.add("pointer-event")):(q.on(this._element,ee,(function(o){return t._start(o)})),q.on(this._element,te,(function(o){return t._move(o)})),q.on(this._element,ne,(function(o){return t._end(o)})))}},{key:"_eventIsPointerPenTouch",value:function _eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}}],[{key:"Default",get:function get(){return ae}},{key:"DefaultType",get:function get(){return ie}},{key:"NAME",get:function get(){return"swipe"}},{key:"isSupported",value:function isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}]),Swipe}(Z),ce=se,le=new Map,ue=function set(t,o,a){le.has(t)||le.set(t,new Map);var i=le.get(t);i.has(o)||0===i.size?i.set(o,a):console.error("Bootstrap doesn't allow more than one instance per element. Bound instance: ".concat(Array.from(i.keys())[0],"."))},de=function get(t,o){return le.has(t)&&le.get(t).get(o)||null},fe=function remove(t,o){if(le.has(t)){var a=le.get(t);a.delete(o),0===a.size&&le.delete(t)}};function base_component_typeof(t){return base_component_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},base_component_typeof(t)}function base_component_createForOfIteratorHelper(t,o){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function base_component_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return base_component_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return base_component_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){a&&(t=a);var i=0,c=function F(){};return{s:c,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(p)throw l}}}}function base_component_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function base_component_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function base_component_setPrototypeOf(t,o){return base_component_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},base_component_setPrototypeOf(t,o)}function base_component_createSuper(t){var o=function base_component_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=base_component_getPrototypeOf(t);if(o){var c=base_component_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return base_component_possibleConstructorReturn(this,a)}}function base_component_possibleConstructorReturn(t,o){if(o&&("object"===base_component_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return base_component_assertThisInitialized(t)}function base_component_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function base_component_getPrototypeOf(t){return base_component_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},base_component_getPrototypeOf(t)}var pe,ye=function(t){!function base_component_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&base_component_setPrototypeOf(t,o)}(BaseComponent,t);var o=base_component_createSuper(BaseComponent);function BaseComponent(t,a){var i;return function base_component_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,BaseComponent),i=o.call(this),(t=S(t))?(i._element=t,i._config=i._getConfig(a),ue(i._element,i.constructor.DATA_KEY,base_component_assertThisInitialized(i)),i):base_component_possibleConstructorReturn(i)}return function base_component_createClass(t,o,a){return o&&base_component_defineProperties(t.prototype,o),a&&base_component_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(BaseComponent,[{key:"dispose",value:function dispose(){fe(this._element,this.constructor.DATA_KEY),q.off(this._element,this.constructor.EVENT_KEY);var t,o=base_component_createForOfIteratorHelper(Object.getOwnPropertyNames(this));try{for(o.s();!(t=o.n()).done;){this[t.value]=null}}catch(a){o.e(a)}finally{o.f()}}},{key:"_queueCallback",value:function _queueCallback(t,o){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];x(t,o,a)}},{key:"_getConfig",value:function _getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}}],[{key:"getInstance",value:function getInstance(t){return de(S(t),this.DATA_KEY)}},{key:"getOrCreateInstance",value:function getOrCreateInstance(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getInstance(t)||new this(t,"object"===base_component_typeof(o)?o:null)}},{key:"VERSION",get:function get(){return"5.2.0"}},{key:"DATA_KEY",get:function get(){return"bs.".concat(this.NAME)}},{key:"EVENT_KEY",get:function get(){return".".concat(this.DATA_KEY)}},{key:"eventName",value:function eventName(t){return"".concat(t).concat(this.EVENT_KEY)}}]),BaseComponent}(Z),he=ye;function carousel_typeof(t){return carousel_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},carousel_typeof(t)}function carousel_createForOfIteratorHelper(t,o){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=function carousel_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return carousel_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return carousel_arrayLikeToArray(t,o)}(t))||o&&t&&"number"===typeof t.length){a&&(t=a);var i=0,c=function F(){};return{s:c,n:function n(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function s(){a=a.call(t)},n:function n(){var t=a.next();return u=t.done,t},e:function e(t){p=!0,l=t},f:function f(){try{u||null==a.return||a.return()}finally{if(p)throw l}}}}function carousel_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function carousel_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function _get(){return _get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,a){var i=_superPropBase(t,o);if(i){var c=Object.getOwnPropertyDescriptor(i,o);return c.get?c.get.call(arguments.length<3?t:a):c.value}},_get.apply(this,arguments)}function _superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=carousel_getPrototypeOf(t)););return t}function carousel_setPrototypeOf(t,o){return carousel_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},carousel_setPrototypeOf(t,o)}function carousel_createSuper(t){var o=function carousel_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=carousel_getPrototypeOf(t);if(o){var c=carousel_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return carousel_possibleConstructorReturn(this,a)}}function carousel_possibleConstructorReturn(t,o){if(o&&("object"===carousel_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function carousel_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function carousel_getPrototypeOf(t){return carousel_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},carousel_getPrototypeOf(t)}function carousel_defineProperty(t,o,a){return o in t?Object.defineProperty(t,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[o]=a,t}var ve=".".concat("bs.carousel"),me=".data-api",ge="next",be="prev",we="left",_e="right",ke="slide".concat(ve),De="slid".concat(ve),Ae="keydown".concat(ve),Oe="mouseenter".concat(ve),Ee="mouseleave".concat(ve),Se="dragstart".concat(ve),Pe="load".concat(ve).concat(me),Te="click".concat(ve).concat(me),Ce="carousel",Le="active",Ve="carousel-item-end",Ie="carousel-item-start",Me="carousel-item-next",xe="carousel-item-prev",je=".active",Ne=".carousel-item",Re=(carousel_defineProperty(pe={},"ArrowLeft",_e),carousel_defineProperty(pe,"ArrowRight",we),pe),Ye={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Fe={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"},Be=function(t){!function carousel_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&carousel_setPrototypeOf(t,o)}(Carousel,t);var o=carousel_createSuper(Carousel);function Carousel(t,a){var i;return function carousel_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Carousel),(i=o.call(this,t,a))._interval=null,i._activeElement=null,i._isSliding=!1,i.touchTimeout=null,i._swipeHelper=null,i._indicatorsElement=J.findOne(".carousel-indicators",i._element),i._addEventListeners(),i._config.ride===Ce&&i.cycle(),i}return function carousel_createClass(t,o,a){return o&&carousel_defineProperties(t.prototype,o),a&&carousel_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(Carousel,[{key:"next",value:function next(){this._slide(ge)}},{key:"nextWhenVisible",value:function nextWhenVisible(){!document.hidden&&P(this._element)&&this.next()}},{key:"prev",value:function prev(){this._slide(be)}},{key:"pause",value:function pause(){this._isSliding&&O(this._element),this._clearInterval()}},{key:"cycle",value:function cycle(){var t=this;this._clearInterval(),this._updateInterval(),this._interval=setInterval((function(){return t.nextWhenVisible()}),this._config.interval)}},{key:"_maybeEnableCycle",value:function _maybeEnableCycle(){var t=this;this._config.ride&&(this._isSliding?q.one(this._element,De,(function(){return t.cycle()})):this.cycle())}},{key:"to",value:function to(t){var o=this,a=this._getItems();if(!(t>a.length-1||t<0))if(this._isSliding)q.one(this._element,De,(function(){return o.to(t)}));else{var i=this._getItemIndex(this._getActive());if(i!==t){var c=t>i?ge:be;this._slide(c,a[t])}}}},{key:"dispose",value:function dispose(){this._swipeHelper&&this._swipeHelper.dispose(),_get(carousel_getPrototypeOf(Carousel.prototype),"dispose",this).call(this)}},{key:"_configAfterMerge",value:function _configAfterMerge(t){return t.defaultInterval=t.interval,t}},{key:"_addEventListeners",value:function _addEventListeners(){var t=this;this._config.keyboard&&q.on(this._element,Ae,(function(o){return t._keydown(o)})),"hover"===this._config.pause&&(q.on(this._element,Oe,(function(){return t.pause()})),q.on(this._element,Ee,(function(){return t._maybeEnableCycle()}))),this._config.touch&&ce.isSupported()&&this._addTouchEventListeners()}},{key:"_addTouchEventListeners",value:function _addTouchEventListeners(){var t,o=this,a=carousel_createForOfIteratorHelper(J.find(".carousel-item img",this._element));try{for(a.s();!(t=a.n()).done;){var i=t.value;q.on(i,Se,(function(t){return t.preventDefault()}))}}catch(l){a.e(l)}finally{a.f()}var c={leftCallback:function leftCallback(){return o._slide(o._directionToOrder(we))},rightCallback:function rightCallback(){return o._slide(o._directionToOrder(_e))},endCallback:function endCallBack(){"hover"===o._config.pause&&(o.pause(),o.touchTimeout&&clearTimeout(o.touchTimeout),o.touchTimeout=setTimeout((function(){return o._maybeEnableCycle()}),500+o._config.interval))}};this._swipeHelper=new ce(this._element,c)}},{key:"_keydown",value:function _keydown(t){if(!/input|textarea/i.test(t.target.tagName)){var o=Re[t.key];o&&(t.preventDefault(),this._slide(this._directionToOrder(o)))}}},{key:"_getItemIndex",value:function _getItemIndex(t){return this._getItems().indexOf(t)}},{key:"_setActiveIndicatorElement",value:function _setActiveIndicatorElement(t){if(this._indicatorsElement){var o=J.findOne(je,this._indicatorsElement);o.classList.remove(Le),o.removeAttribute("aria-current");var a=J.findOne('[data-bs-slide-to="'.concat(t,'"]'),this._indicatorsElement);a&&(a.classList.add(Le),a.setAttribute("aria-current","true"))}}},{key:"_updateInterval",value:function _updateInterval(){var t=this._activeElement||this._getActive();if(t){var o=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=o||this._config.defaultInterval}}},{key:"_slide",value:function _slide(t){var o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!this._isSliding){var i=this._getActive(),c=t===ge,l=a||j(this._getItems(),i,c,this._config.wrap);if(l!==i){var u=this._getItemIndex(l),p=function triggerEvent(a){return q.trigger(o._element,a,{relatedTarget:l,direction:o._orderToDirection(t),from:o._getItemIndex(i),to:u})},h=p(ke);if(!h.defaultPrevented&&i&&l){var v=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(u),this._activeElement=l;var g=c?Ie:Ve,b=c?Me:xe;l.classList.add(b),T(l),i.classList.add(g),l.classList.add(g);var w=function completeCallBack(){l.classList.remove(g,b),l.classList.add(Le),i.classList.remove(Le,b,g),o._isSliding=!1,p(De)};this._queueCallback(w,i,this._isAnimated()),v&&this.cycle()}}}}},{key:"_isAnimated",value:function _isAnimated(){return this._element.classList.contains("slide")}},{key:"_getActive",value:function _getActive(){return J.findOne(".active.carousel-item",this._element)}},{key:"_getItems",value:function _getItems(){return J.find(Ne,this._element)}},{key:"_clearInterval",value:function _clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}},{key:"_directionToOrder",value:function _directionToOrder(t){return V()?t===we?be:ge:t===we?ge:be}},{key:"_orderToDirection",value:function _orderToDirection(t){return V()?t===be?we:_e:t===be?_e:we}}],[{key:"Default",get:function get(){return Ye}},{key:"DefaultType",get:function get(){return Fe}},{key:"NAME",get:function get(){return"carousel"}},{key:"jQueryInterface",value:function jQueryInterface(t){return this.each((function(){var o=Carousel.getOrCreateInstance(this,t);if("number"!==typeof t){if("string"===typeof t){if(void 0===o[t]||t.startsWith("_")||"constructor"===t)throw new TypeError('No method named "'.concat(t,'"'));o[t]()}}else o.to(t)}))}}]),Carousel}(he);q.on(document,Te,"[data-bs-slide], [data-bs-slide-to]",(function(t){var o=function getElementFromSelector(t){var o=k(t);return o?document.querySelector(o):null}(this);if(o&&o.classList.contains(Ce)){t.preventDefault();var a=Be.getOrCreateInstance(o),i=this.getAttribute("data-bs-slide-to");if(i)return a.to(i),void a._maybeEnableCycle();if("next"===K.getDataAttribute(this,"slide"))return a.next(),void a._maybeEnableCycle();a.prev(),a._maybeEnableCycle()}})),q.on(window,Pe,(function(){var t,o=carousel_createForOfIteratorHelper(J.find('[data-bs-ride="carousel"]'));try{for(o.s();!(t=o.n()).done;){var a=t.value;Be.getOrCreateInstance(a)}}catch(i){o.e(i)}finally{o.f()}})),function defineJQueryPlugin(t){!function onDOMContentLoaded(t){"loading"===document.readyState?(L.length||document.addEventListener("DOMContentLoaded",(function(){var t,o=_createForOfIteratorHelper(L);try{for(o.s();!(t=o.n()).done;)(0,t.value)()}catch(a){o.e(a)}finally{o.f()}})),L.push(t)):t()}((function(){var $=C();if($){var o=t.NAME,a=$.fn[o];$.fn[o]=t.jQueryInterface,$.fn[o].Constructor=t,$.fn[o].noConflict=function(){return $.fn[o]=a,t.jQueryInterface}}}))}(Be);var He=Be;(function(o){var a="js-carousel",i=function init(){console.log("".concat(a,": init")),document.querySelectorAll(".".concat(a)).forEach((function(t,i){var c=!!t.dataset.bsInterval&&parseInt(t.dataset.bsInterval),l=new He(t,{interval:c});t.ui=l;var u=t.querySelectorAll(".carousel-item"),p=parseInt(u.length);if(t.dataset.bsArrows){var h=document.createElement("button");h.classList.add("carousel-control-next"),h.setAttribute("type","button"),h.setAttribute("aria-label","Next Slide"),h.setAttribute("data-bs-target",t.getAttribute("id")),h.setAttribute("data-bs-slide","next"),h.addEventListener("click",(function(t){l.next()})),h.innerHTML='<span class="carousel-control-next-icon" aria-hidden="true"></span><span class="visually-hidden">Next</span>',t.appendChild(h);var v=document.createElement("button");v.setAttribute("type","button"),v.setAttribute("aria-label","Previous Slide"),v.classList.add("carousel-control-prev"),v.setAttribute("data-bs-target",t.getAttribute("id")),v.setAttribute("data-bs-slide","prev"),v.addEventListener("click",(function(t){l.prev()})),v.innerHTML='<span class="carousel-control-prev-icon" aria-hidden="true"></span><span class="visually-hidden">Previous</span>',t.appendChild(v)}if(t.dataset.bsIndicators&&function(){var o=document.createElement("div");o.classList.add("carousel-indicators");for(var a=0;a<p;){var i=document.createElement("button");i.setAttribute("type","button"),i.setAttribute("aria-label","Slide to #".concat(a+1)),0===a&&i.classList.add("active"),i.setAttribute("data-bs-target",t.getAttribute("id")),i.setAttribute("data-bs-slide-to",a),i.addEventListener("click",(function(t){var a=t.target;l.to(a.getAttribute("data-bs-slide-to")),o.querySelectorAll(".active").forEach((function(t){t.classList.remove("active")})),a.classList.add("active")})),o.appendChild(i),a++}t.appendChild(o),t.addEventListener("slide.bs.carousel",(function(o){t.querySelectorAll(".carousel-indicators .active").forEach((function(t){t.classList.remove("active")})),t.querySelectorAll('.carousel-indicators [data-bs-slide-to="'.concat(o.to,'"]')).forEach((function(t){t.classList.add("active")}))}))}(),t.classList.contains("carousel-multislide")){var g=t.querySelector(".carousel-inner");u.forEach((function(t,o){var a=t.cloneNode(!0);a.classList.remove("active"),g.appendChild(a)})),u=t.querySelectorAll(".carousel-item"),p=parseInt(u.length),g.style.left="0px";var b=new o.ResizeObserver((function calculate(t){var o=t[0],a=o.target,i=o.contentRect.width,c=Math.min(parseInt(a.dataset.length),p),h=i/c;a.dataset.itemWidth=h,a.dataset.numToDisplay=c,g.style.width="".concat(p*h,"px"),u.forEach((function(t,o){t.style.width="".concat(h,"px")})),p===c&&(a.classList.add("js-carousel-no-slide"),l.pause())}));b.observe(t);var w=function resetPosition(){g.style.transition="none",g.classList.add("no-transition"),g.style.left="0px",setTimeout((function(){g.style.transition="",g.classList.remove("no-transition"),g.querySelectorAll(".carousel-item").forEach((function(t){t.classList.remove("active")})),g.querySelector(".carousel-item:first-child").classList.add("active")}),1e3)};t.addEventListener("slide.bs.carousel",(function(o){var i=Math.min(parseInt(t.dataset.length),p);if(console.log(".".concat(a,": ").concat(o.to," ").concat(p/2)),p-i<o.to)return o.preventDefault(),void w();switch(o.direction){case"left":case"right":g.style.left="".concat(-o.to*t.dataset.itemWidth,"px")}p/2===o.to&&w()})),t.classList.add("".concat(a,"-multislide-active"))}else 1===u.length&&t.classList.add("js-carousel-no-slide");c&&t.ui.cycle(),t.dataset.ui=t.ui,t.classList.add("".concat(a,"-active"))}))};o.addEventListener("".concat(t.LODEDANDREADY),i),o.addEventListener("".concat(t.AJAX),i)})(window),function(o){var a="js-dropdown",i=["active","active-dropdown"],c=function HideAll(){document.querySelectorAll(".dropdown-menu").forEach((function(t,o){var a;(a=t.closest(".dropdown").classList).remove.apply(a,i),t.classList.remove("show")}))},l=function Show(t){var o,a;(o=t.classList).add.apply(o,i),(a=t.closest(".dropdown").classList).add.apply(a,i),t.querySelector(".dropdown-menu").classList.add("show")},u=function Hide(t){var o,a;(o=t.classList).remove.apply(o,i),(a=t.closest(".dropdown").classList).remove.apply(a,i),t.querySelector(".dropdown-menu").classList.remove("show")},p=function init(){console.log("".concat(a,": init"));var t=document.querySelectorAll(".".concat(a,',[data-bs-toggle="dropdown"]')),o=document.querySelectorAll('[data-bs-toggle="hover"]'),i=function attachClickEvents(t){t.addEventListener("click",(function(t){t.preventDefault(),function Toggle(t){c(),t.querySelector(".dropdown-menu").classList.contains("show")?u(t):l(t)}(t.currentTarget.closest(".dropdown"))})),t.classList.add("".concat(a,"-active"))};document.addEventListener("click",(function(t){var o=!1,a=t.path||t.composedPath&&t.composedPath();a||console.warn("Browser does not provide event path to hide dropdowns on outside click"),a.forEach((function(t,a){o||(t===document&&c(),t.classList&&t.classList.contains("dropdown-toggle")&&(o=!0))}))})),o.forEach((function(t,o){!function attachHoverEvents(t){t.addEventListener("mouseover",(function(t){t.stopPropagation(),l(t.currentTarget)}),!1),t.addEventListener("mouseleave",(function(t){t.stopPropagation(),u(t.currentTarget)}),!1),t.classList.add("".concat(a,"-active"))}(t.closest(".dropdown"))})),t.forEach((function(t,o){i(t)}))};o.addEventListener("".concat(t.LODEDANDREADY),p),o.addEventListener("".concat(t.AJAX),p)}(window);function hasProperty(t,o){return Object.prototype.hasOwnProperty.call(t,o)}function lastItemOf(t){return t[t.length-1]}function pushUnique(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return a.forEach((function(o){t.includes(o)||t.push(o)})),t}function stringToArray(t,o){return t?t.split(o):[]}function isInRange(t,o,a){return(void 0===o||t>=o)&&(void 0===a||t<=a)}function limitToRange(t,o,a){return t<o?o:t>a?a:t}function createTagRepeat(t,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",l=Object.keys(a).reduce((function(t,o){var c=a[o];return"function"===typeof c&&(c=c(i)),"".concat(t," ").concat(o,'="').concat(c,'"')}),t);c+="<".concat(l,"></").concat(t,">");var u=i+1;return u<o?createTagRepeat(t,o,a,u,c):c}function optimizeTemplateHTML(t){return t.replace(/>\s+/g,">").replace(/\s+</,"<")}function stripTime(t){return new Date(t).setHours(0,0,0,0)}function today(){return(new Date).setHours(0,0,0,0)}function dateValue(){switch(arguments.length){case 0:return today();case 1:return stripTime(arguments.length<=0?void 0:arguments[0])}var t=new Date(0);return t.setFullYear.apply(t,arguments),t.setHours(0,0,0,0)}function addDays(t,o){var a=new Date(t);return a.setDate(a.getDate()+o)}function addMonths(t,o){var a=new Date(t),i=a.getMonth()+o,c=i%12;c<0&&(c+=12);var l=a.setMonth(i);return a.getMonth()!==c?a.setDate(0):l}function addYears(t,o){var a=new Date(t),i=a.getMonth(),c=a.setFullYear(a.getFullYear()+o);return 1===i&&2===a.getMonth()?a.setDate(0):c}function dayDiff(t,o){return(t-o+7)%7}function dayOfTheWeekOf(t,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=new Date(t).getDay();return addDays(t,dayDiff(o,a)-dayDiff(i,a))}function startOfYearPeriod(t,o){var a=new Date(t).getFullYear();return Math.floor(a/o)*o}function regularizeDate(t,o,a){if(1!==o&&2!==o)return t;var i=new Date(t);return 1===o?a?i.setMonth(i.getMonth()+1,0):i.setDate(1):a?i.setFullYear(i.getFullYear()+1,0,0):i.setMonth(0,1),i.setHours(0,0,0,0)}var We=/dd?|DD?|mm?|MM?|yy?(?:yy)?/,Ue=/[\s!-/:-@[-`{-~\u5e74\u6708\u65e5]+/,ze={},qe={y:function y(t,o){return new Date(t).setFullYear(parseInt(o,10))},m:function m(t,o,a){var i=new Date(t),c=parseInt(o,10)-1;if(isNaN(c)){if(!o)return NaN;var l=o.toLowerCase(),u=function compareNames(t){return t.toLowerCase().startsWith(l)};if((c=a.monthsShort.findIndex(u))<0&&(c=a.months.findIndex(u)),c<0)return NaN}return i.setMonth(c),i.getMonth()!==normalizeMonth(c)?i.setDate(0):i.getTime()},d:function d(t,o){return new Date(t).setDate(parseInt(o,10))}},Ke={d:function d(t){return t.getDate()},dd:function dd(t){return padZero(t.getDate(),2)},D:function D(t,o){return o.daysShort[t.getDay()]},DD:function DD(t,o){return o.days[t.getDay()]},m:function m(t){return t.getMonth()+1},mm:function mm(t){return padZero(t.getMonth()+1,2)},M:function M(t,o){return o.monthsShort[t.getMonth()]},MM:function MM(t,o){return o.months[t.getMonth()]},y:function y(t){return t.getFullYear()},yy:function yy(t){return padZero(t.getFullYear(),2).slice(-2)},yyyy:function yyyy(t){return padZero(t.getFullYear(),4)}};function normalizeMonth(t){return t>-1?t%12:normalizeMonth(t+12)}function padZero(t,o){return t.toString().padStart(o,"0")}function parseFormatString(t){if("string"!==typeof t)throw new Error("Invalid date format.");if(t in ze)return ze[t];var o=t.split(We),a=t.match(new RegExp(We,"g"));if(0===o.length||!a)throw new Error("Invalid date format.");var i=a.map((function(t){return Ke[t]})),c=Object.keys(qe).reduce((function(t,o){return a.find((function(t){return"D"!==t[0]&&t[0].toLowerCase()===o}))&&t.push(o),t}),[]);return ze[t]={parser:function parser(t,o){var i=t.split(Ue).reduce((function(t,o,i){if(o.length>0&&a[i]){var c=a[i][0];"M"===c?t.m=o:"D"!==c&&(t[c]=o)}return t}),{});return c.reduce((function(t,a){var c=qe[a](t,i[a],o);return isNaN(c)?t:c}),today())},formatter:function formatter(t,a){return i.reduce((function(i,c,l){return i+"".concat(o[l]).concat(c(t,a))}),"")+lastItemOf(o)}}}function date_format_parseDate(t,o,a){if(t instanceof Date||"number"===typeof t){var i=stripTime(t);return isNaN(i)?void 0:i}if(t){if("today"===t)return today();if(o&&o.toValue){var c=o.toValue(t,o,a);return isNaN(c)?void 0:stripTime(c)}return parseFormatString(o).parser(t,a)}}function date_format_formatDate(t,o,a){if(isNaN(t)||!t&&0!==t)return"";var i="number"===typeof t?new Date(t):t;return o.toDisplay?o.toDisplay(i,o,a):parseFormatString(o).formatter(i,a)}var Xe=document.createRange();function parseHTML(t){return Xe.createContextualFragment(t)}function getParent(t){return t.parentElement||(t.parentNode instanceof ShadowRoot?t.parentNode.host:void 0)}function isActiveElement(t){return t.getRootNode().activeElement===t}function hideElement(t){"none"!==t.style.display&&(t.style.display&&(t.dataset.styleDisplay=t.style.display),t.style.display="none")}function showElement(t){"none"===t.style.display&&(t.dataset.styleDisplay?(t.style.display=t.dataset.styleDisplay,delete t.dataset.styleDisplay):t.style.display="")}function emptyChildNodes(t){t.firstChild&&(t.removeChild(t.firstChild),emptyChildNodes(t))}function _toArray(t){return function event_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||event_iterableToArray(t)||event_unsupportedIterableToArray(t)||function event_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_toConsumableArray(t){return function event_arrayWithoutHoles(t){if(Array.isArray(t))return event_arrayLikeToArray(t)}(t)||event_iterableToArray(t)||event_unsupportedIterableToArray(t)||function event_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function event_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return event_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?event_arrayLikeToArray(t,o):void 0}}function event_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function event_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}var Je=new WeakMap,$e=EventTarget.prototype,Ge=$e.addEventListener,Ze=$e.removeEventListener;function registerListeners(t,o){var a=Je.get(t);a||(a=[],Je.set(t,a)),o.forEach((function(t){Ge.call.apply(Ge,event_toConsumableArray(t)),a.push(t)}))}if(!Event.prototype.composedPath){var Qe=function getComposedPath(t){var o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return a.push(t),t.parentNode?o=t.parentNode:t.host?o=t.host:t.defaultView&&(o=t.defaultView),o?getComposedPath(o,a):a};Event.prototype.composedPath=function(){return Qe(this.target)}}function findFromPath(t,o,a){var i=_toArray(t),c=i[0],l=i.slice(1);return o(c)?c:c!==a&&"HTML"!==c.tagName&&0!==l.length?findFromPath(l,o,a):void 0}function findElementInEventPath(t,o){var a="function"===typeof o?o:function(t){return t instanceof Element&&t.matches(o)};return findFromPath(t.composedPath(),a,t.currentTarget)}var et={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],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",clear:"Clear",titleFormat:"MM y"}},tt={autohide:!1,beforeShowDay:null,beforeShowDecade:null,beforeShowMonth:null,beforeShowYear:null,calendarWeeks:!1,clearBtn:!1,dateDelimiter:",",datesDisabled:[],daysOfWeekDisabled:[],daysOfWeekHighlighted:[],defaultViewDate:void 0,disableTouchKeyboard:!1,format:"mm/dd/yyyy",language:"en",maxDate:null,maxNumberOfDates:1,maxView:3,minDate:null,nextArrow:"\xbb",orientation:"auto",pickLevel:0,prevArrow:"\xab",showDaysOfWeek:!0,showOnClick:!0,showOnFocus:!0,startView:0,title:"",todayBtn:!1,todayBtnMode:0,todayHighlight:!1,updateOnBlur:!0,weekStart:0},nt=tt.language,rt=tt.format,ot=tt.weekStart;function sanitizeDOW(t,o){return t.length<6&&o>=0&&o<7?pushUnique(t,o):t}function calcEndOfWeek(t){return(t+6)%7}function validateDate(t,o,a,i){var c=date_format_parseDate(t,o,a);return void 0!==c?c:i}function validateViewId(t,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,i=parseInt(t,10);return i>=0&&i<=a?i:o}function processOptions(t,o){var a,i=Object.assign({},t),c={},l=o.constructor.locales,u=o.rangeSideIndex,p=o.config||{},h=p.format,v=p.language,g=p.locale,b=p.maxDate,w=p.maxView,_=p.minDate,k=p.pickLevel,A=p.startView,O=p.weekStart;if(i.language&&(i.language!==v&&(l[i.language]?a=i.language:void 0===l[a=i.language.split("-")[0]]&&(a=!1)),delete i.language,a)){v=c.language=a;var E=g||l[nt];g=Object.assign({format:rt,weekStart:ot},l[nt]),v!==nt&&Object.assign(g,l[v]),c.locale=g,h===E.format&&(h=c.format=g.format),O===E.weekStart&&(O=c.weekStart=g.weekStart,c.weekEnd=calcEndOfWeek(g.weekStart))}if(i.format){var S="function"===typeof i.format.toDisplay,P="function"===typeof i.format.toValue,T=We.test(i.format);(S&&P||T)&&(h=c.format=i.format),delete i.format}var C=k;void 0!==i.pickLevel&&(C=validateViewId(i.pickLevel,2),delete i.pickLevel),C!==k&&(C>k&&(void 0===i.minDate&&(i.minDate=_),void 0===i.maxDate&&(i.maxDate=b)),i.datesDisabled||(i.datesDisabled=[]),k=c.pickLevel=C);var L=_,V=b;if(void 0!==i.minDate){var I=dateValue(0,0,1);(L=null===i.minDate?I:validateDate(i.minDate,h,g,L))!==I&&(L=regularizeDate(L,k,!1)),delete i.minDate}if(void 0!==i.maxDate&&(void 0!==(V=null===i.maxDate?void 0:validateDate(i.maxDate,h,g,V))&&(V=regularizeDate(V,k,!0)),delete i.maxDate),V<L?(_=c.minDate=V,b=c.maxDate=L):(_!==L&&(_=c.minDate=L),b!==V&&(b=c.maxDate=V)),i.datesDisabled&&(c.datesDisabled=i.datesDisabled.reduce((function(t,o){var a=date_format_parseDate(o,h,g);return void 0!==a?pushUnique(t,regularizeDate(a,k,u)):t}),[]),delete i.datesDisabled),void 0!==i.defaultViewDate){var x=date_format_parseDate(i.defaultViewDate,h,g);void 0!==x&&(c.defaultViewDate=x),delete i.defaultViewDate}if(void 0!==i.weekStart){var j=Number(i.weekStart)%7;isNaN(j)||(O=c.weekStart=j,c.weekEnd=calcEndOfWeek(j)),delete i.weekStart}if(i.daysOfWeekDisabled&&(c.daysOfWeekDisabled=i.daysOfWeekDisabled.reduce(sanitizeDOW,[]),delete i.daysOfWeekDisabled),i.daysOfWeekHighlighted&&(c.daysOfWeekHighlighted=i.daysOfWeekHighlighted.reduce(sanitizeDOW,[]),delete i.daysOfWeekHighlighted),void 0!==i.maxNumberOfDates){var N=parseInt(i.maxNumberOfDates,10);N>=0&&(c.maxNumberOfDates=N,c.multidate=1!==N),delete i.maxNumberOfDates}i.dateDelimiter&&(c.dateDelimiter=String(i.dateDelimiter),delete i.dateDelimiter);var R=w;void 0!==i.maxView&&(R=validateViewId(i.maxView,w),delete i.maxView),(R=k>R?k:R)!==w&&(w=c.maxView=R);var Y=A;if(void 0!==i.startView&&(Y=validateViewId(i.startView,Y),delete i.startView),Y<k?Y=k:Y>w&&(Y=w),Y!==A&&(c.startView=Y),i.prevArrow){var B=parseHTML(i.prevArrow);B.childNodes.length>0&&(c.prevArrow=B.childNodes),delete i.prevArrow}if(i.nextArrow){var H=parseHTML(i.nextArrow);H.childNodes.length>0&&(c.nextArrow=H.childNodes),delete i.nextArrow}if(void 0!==i.disableTouchKeyboard&&(c.disableTouchKeyboard="ontouchstart"in document&&!!i.disableTouchKeyboard,delete i.disableTouchKeyboard),i.orientation){var W=i.orientation.toLowerCase().split(/\s+/g);c.orientation={x:W.find((function(t){return"left"===t||"right"===t}))||"auto",y:W.find((function(t){return"top"===t||"bottom"===t}))||"auto"},delete i.orientation}if(void 0!==i.todayBtnMode){switch(i.todayBtnMode){case 0:case 1:c.todayBtnMode=i.todayBtnMode}delete i.todayBtnMode}return Object.keys(i).forEach((function(t){void 0!==i[t]&&hasProperty(tt,t)&&(c[t]=i[t])})),c}var at=optimizeTemplateHTML('<div class="datepicker">\n <div class="datepicker-picker">\n <div class="datepicker-header">\n <div class="datepicker-title"></div>\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% prev-btn"></button>\n <button type="button" class="%buttonClass% view-switch"></button>\n <button type="button" class="%buttonClass% next-btn"></button>\n </div>\n </div>\n <div class="datepicker-main"></div>\n <div class="datepicker-footer">\n <div class="datepicker-controls">\n <button type="button" class="%buttonClass% today-btn"></button>\n <button type="button" class="%buttonClass% clear-btn"></button>\n </div>\n </div>\n </div>\n</div>'),it=optimizeTemplateHTML('<div class="days">\n <div class="days-of-week">'.concat(createTagRepeat("span",7,{class:"dow"}),'</div>\n <div class="datepicker-grid">').concat(createTagRepeat("span",42),"</div>\n</div>")),st=optimizeTemplateHTML('<div class="calendar-weeks">\n <div class="days-of-week"><span class="dow"></span></div>\n <div class="weeks">'.concat(createTagRepeat("span",6,{class:"week"}),"</div>\n</div>"));function View_toConsumableArray(t){return function View_arrayWithoutHoles(t){if(Array.isArray(t))return View_arrayLikeToArray(t)}(t)||function View_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function View_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return View_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return View_arrayLikeToArray(t,o)}(t)||function View_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function View_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function View_typeof(t){return View_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},View_typeof(t)}function View_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ct=function(){function View(t,o){!function View_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,View),Object.assign(this,o,{picker:t,element:parseHTML('<div class="datepicker-view"></div>').firstChild,selected:[]}),this.init(this.picker.datepicker.config)}return function View_createClass(t,o,a){return o&&View_defineProperties(t.prototype,o),a&&View_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(View,[{key:"init",value:function init(t){void 0!==t.pickLevel&&(this.isMinView=this.id===t.pickLevel),this.setOptions(t),this.updateFocus(),this.updateSelection()}},{key:"performBeforeHook",value:function performBeforeHook(t,o,a){var i=this.beforeShow(new Date(a));switch(View_typeof(i)){case"boolean":i={enabled:i};break;case"string":i={classes:i}}if(i){if(!1===i.enabled&&(t.classList.add("disabled"),pushUnique(this.disabled,o)),i.classes){var c,l=i.classes.split(/\s+/);(c=t.classList).add.apply(c,View_toConsumableArray(l)),l.includes("disabled")&&pushUnique(this.disabled,o)}i.content&&function replaceChildNodes(t,o){emptyChildNodes(t),o instanceof DocumentFragment?t.appendChild(o):"string"===typeof o?t.appendChild(parseHTML(o)):"function"===typeof o.forEach&&o.forEach((function(o){t.appendChild(o)}))}(t,i.content)}}}]),View}();function DaysView_typeof(t){return DaysView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},DaysView_typeof(t)}function DaysView_slicedToArray(t,o){return function DaysView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function DaysView_iterableToArrayLimit(t,o){var a=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,c,l=[],u=!0,p=!1;try{for(a=a.call(t);!(u=(i=a.next()).done)&&(l.push(i.value),!o||l.length!==o);u=!0);}catch(h){p=!0,c=h}finally{try{u||null==a.return||a.return()}finally{if(p)throw c}}return l}(t,o)||DaysView_unsupportedIterableToArray(t,o)||function DaysView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_toConsumableArray(t){return function DaysView_arrayWithoutHoles(t){if(Array.isArray(t))return DaysView_arrayLikeToArray(t)}(t)||function DaysView_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||DaysView_unsupportedIterableToArray(t)||function DaysView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DaysView_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return DaysView_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?DaysView_arrayLikeToArray(t,o):void 0}}function DaysView_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function DaysView_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function DaysView_get(){return DaysView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,a){var i=DaysView_superPropBase(t,o);if(i){var c=Object.getOwnPropertyDescriptor(i,o);return c.get?c.get.call(arguments.length<3?t:a):c.value}},DaysView_get.apply(this,arguments)}function DaysView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=DaysView_getPrototypeOf(t)););return t}function DaysView_setPrototypeOf(t,o){return DaysView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},DaysView_setPrototypeOf(t,o)}function DaysView_createSuper(t){var o=function DaysView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=DaysView_getPrototypeOf(t);if(o){var c=DaysView_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return DaysView_possibleConstructorReturn(this,a)}}function DaysView_possibleConstructorReturn(t,o){if(o&&("object"===DaysView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function DaysView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function DaysView_getPrototypeOf(t){return DaysView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},DaysView_getPrototypeOf(t)}var lt=function(t){!function DaysView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&DaysView_setPrototypeOf(t,o)}(DaysView,t);var o=DaysView_createSuper(DaysView);function DaysView(t){return function DaysView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,DaysView),o.call(this,t,{id:0,name:"days",cellClass:"day"})}return function DaysView_createClass(t,o,a){return o&&DaysView_defineProperties(t.prototype,o),a&&DaysView_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(DaysView,[{key:"init",value:function init(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(o){var a=parseHTML(it).firstChild;this.dow=a.firstChild,this.grid=a.lastChild,this.element.appendChild(a)}DaysView_get(DaysView_getPrototypeOf(DaysView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){var o,a=this;if(hasProperty(t,"minDate")&&(this.minDate=t.minDate),hasProperty(t,"maxDate")&&(this.maxDate=t.maxDate),t.datesDisabled&&(this.datesDisabled=t.datesDisabled),t.daysOfWeekDisabled&&(this.daysOfWeekDisabled=t.daysOfWeekDisabled,o=!0),t.daysOfWeekHighlighted&&(this.daysOfWeekHighlighted=t.daysOfWeekHighlighted),void 0!==t.todayHighlight&&(this.todayHighlight=t.todayHighlight),void 0!==t.weekStart&&(this.weekStart=t.weekStart,this.weekEnd=t.weekEnd,o=!0),t.locale){var i=this.locale=t.locale;this.dayNames=i.daysMin,this.switchLabelFormat=i.titleFormat,o=!0}if(void 0!==t.beforeShowDay&&(this.beforeShow="function"===typeof t.beforeShowDay?t.beforeShowDay:void 0),void 0!==t.calendarWeeks)if(t.calendarWeeks&&!this.calendarWeeks){var c=parseHTML(st).firstChild;this.calendarWeeks={element:c,dow:c.firstChild,weeks:c.lastChild},this.element.insertBefore(c,this.element.firstChild)}else this.calendarWeeks&&!t.calendarWeeks&&(this.element.removeChild(this.calendarWeeks.element),this.calendarWeeks=null);void 0!==t.showDaysOfWeek&&(t.showDaysOfWeek?(showElement(this.dow),this.calendarWeeks&&showElement(this.calendarWeeks.dow)):(hideElement(this.dow),this.calendarWeeks&&hideElement(this.calendarWeeks.dow))),o&&Array.from(this.dow.children).forEach((function(t,o){var i=(a.weekStart+o)%7;t.textContent=a.dayNames[i],t.className=a.daysOfWeekDisabled.includes(i)?"dow disabled":"dow"}))}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),o=t.getFullYear(),a=t.getMonth(),i=dateValue(o,a,1),c=dayOfTheWeekOf(i,this.weekStart,this.weekStart);this.first=i,this.last=dateValue(o,a+1,0),this.start=c,this.focused=this.picker.viewDate}},{key:"updateSelection",value:function updateSelection(){var t=this.picker.datepicker,o=t.dates,a=t.rangepicker;this.selected=o,a&&(this.range=a.dates)}},{key:"render",value:function render(){var t=this;this.today=this.todayHighlight?today():void 0,this.disabled=DaysView_toConsumableArray(this.datesDisabled);var o=date_format_formatDate(this.focused,this.switchLabelFormat,this.locale);if(this.picker.setViewSwitchLabel(o),this.picker.setPrevBtnDisabled(this.first<=this.minDate),this.picker.setNextBtnDisabled(this.last>=this.maxDate),this.calendarWeeks){var a=dayOfTheWeekOf(this.first,1,1);Array.from(this.calendarWeeks.weeks.children).forEach((function(t,o){t.textContent=function getWeek(t){var o=dayOfTheWeekOf(t,4,1),a=dayOfTheWeekOf(new Date(o).setMonth(0,4),4,1);return Math.round((o-a)/6048e5)+1}(function addWeeks(t,o){return addDays(t,7*o)}(a,o))}))}Array.from(this.grid.children).forEach((function(o,a){var i=o.classList,c=addDays(t.start,a),l=new Date(c),u=l.getDay();if(o.className="datepicker-cell ".concat(t.cellClass),o.dataset.date=c,o.textContent=l.getDate(),c<t.first?i.add("prev"):c>t.last&&i.add("next"),t.today===c&&i.add("today"),(c<t.minDate||c>t.maxDate||t.disabled.includes(c))&&i.add("disabled"),t.daysOfWeekDisabled.includes(u)&&(i.add("disabled"),pushUnique(t.disabled,c)),t.daysOfWeekHighlighted.includes(u)&&i.add("highlighted"),t.range){var p=DaysView_slicedToArray(t.range,2),h=p[0],v=p[1];c>h&&c<v&&i.add("range"),c===h&&i.add("range-start"),c===v&&i.add("range-end")}t.selected.includes(c)&&i.add("selected"),c===t.focused&&i.add("focused"),t.beforeShow&&t.performBeforeHook(o,c,c)}))}},{key:"refresh",value:function refresh(){var t=this,o=DaysView_slicedToArray(this.range||[],2),a=o[0],i=o[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(o){var c=Number(o.dataset.date),l=o.classList;c>a&&c<i&&l.add("range"),c===a&&l.add("range-start"),c===i&&l.add("range-end"),t.selected.includes(c)&&l.add("selected"),c===t.focused&&l.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){var t=Math.round((this.focused-this.start)/864e5);this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[t].classList.add("focused")}}]),DaysView}(ct);function MonthsView_typeof(t){return MonthsView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MonthsView_typeof(t)}function MonthsView_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function MonthsView_get(){return MonthsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,a){var i=MonthsView_superPropBase(t,o);if(i){var c=Object.getOwnPropertyDescriptor(i,o);return c.get?c.get.call(arguments.length<3?t:a):c.value}},MonthsView_get.apply(this,arguments)}function MonthsView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=MonthsView_getPrototypeOf(t)););return t}function MonthsView_setPrototypeOf(t,o){return MonthsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},MonthsView_setPrototypeOf(t,o)}function MonthsView_createSuper(t){var o=function MonthsView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=MonthsView_getPrototypeOf(t);if(o){var c=MonthsView_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return MonthsView_possibleConstructorReturn(this,a)}}function MonthsView_possibleConstructorReturn(t,o){if(o&&("object"===MonthsView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function MonthsView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function MonthsView_getPrototypeOf(t){return MonthsView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},MonthsView_getPrototypeOf(t)}function MonthsView_slicedToArray(t,o){return function MonthsView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function MonthsView_iterableToArrayLimit(t,o){var a=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,c,l=[],u=!0,p=!1;try{for(a=a.call(t);!(u=(i=a.next()).done)&&(l.push(i.value),!o||l.length!==o);u=!0);}catch(h){p=!0,c=h}finally{try{u||null==a.return||a.return()}finally{if(p)throw c}}return l}(t,o)||function MonthsView_unsupportedIterableToArray(t,o){if(!t)return;if("string"===typeof t)return MonthsView_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return MonthsView_arrayLikeToArray(t,o)}(t,o)||function MonthsView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function MonthsView_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function computeMonthRange(t,o){if(t&&t[0]&&t[1]){var a=MonthsView_slicedToArray(t,2),i=MonthsView_slicedToArray(a[0],2),c=i[0],l=i[1],u=MonthsView_slicedToArray(a[1],2),p=u[0],h=u[1];if(!(c>o||p<o))return[c===o?l:-1,p===o?h:12]}}var ut=function(t){!function MonthsView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&MonthsView_setPrototypeOf(t,o)}(MonthsView,t);var o=MonthsView_createSuper(MonthsView);function MonthsView(t){return function MonthsView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,MonthsView),o.call(this,t,{id:1,name:"months",cellClass:"month"})}return function MonthsView_createClass(t,o,a){return o&&MonthsView_defineProperties(t.prototype,o),a&&MonthsView_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(MonthsView,[{key:"init",value:function init(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o&&(this.grid=this.element,this.element.classList.add("months","datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12,{"data-month":function dataMonth(t){return t}})))),MonthsView_get(MonthsView_getPrototypeOf(MonthsView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){if(t.locale&&(this.monthNames=t.locale.monthsShort),hasProperty(t,"minDate"))if(void 0===t.minDate)this.minYear=this.minMonth=this.minDate=void 0;else{var o=new Date(t.minDate);this.minYear=o.getFullYear(),this.minMonth=o.getMonth(),this.minDate=o.setDate(1)}if(hasProperty(t,"maxDate"))if(void 0===t.maxDate)this.maxYear=this.maxMonth=this.maxDate=void 0;else{var a=new Date(t.maxDate);this.maxYear=a.getFullYear(),this.maxMonth=a.getMonth(),this.maxDate=dateValue(this.maxYear,this.maxMonth+1,0)}this.isMinView?t.datesDisabled&&(this.datesDisabled=t.datesDisabled):this.datesDisabled=[],void 0!==t.beforeShowMonth&&(this.beforeShow="function"===typeof t.beforeShowMonth?t.beforeShowMonth:void 0)}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate);this.year=t.getFullYear(),this.focused=t.getMonth()}},{key:"updateSelection",value:function updateSelection(){var t=this.picker.datepicker,o=t.dates,a=t.rangepicker;this.selected=o.reduce((function(t,o){var a=new Date(o),i=a.getFullYear(),c=a.getMonth();return void 0===t[i]?t[i]=[c]:pushUnique(t[i],c),t}),{}),a&&a.dates&&(this.range=a.dates.map((function(t){var o=new Date(t);return isNaN(o)?void 0:[o.getFullYear(),o.getMonth()]})))}},{key:"render",value:function render(){var t=this;this.disabled=this.datesDisabled.reduce((function(o,a){var i=new Date(a);return t.year===i.getFullYear()&&o.push(i.getMonth()),o}),[]),this.picker.setViewSwitchLabel(this.year),this.picker.setPrevBtnDisabled(this.year<=this.minYear),this.picker.setNextBtnDisabled(this.year>=this.maxYear);var o=this.selected[this.year]||[],a=this.year<this.minYear||this.year>this.maxYear,i=this.year===this.minYear,c=this.year===this.maxYear,l=computeMonthRange(this.range,this.year);Array.from(this.grid.children).forEach((function(u,p){var h=u.classList,v=dateValue(t.year,p,1);if(u.className="datepicker-cell ".concat(t.cellClass),t.isMinView&&(u.dataset.date=v),u.textContent=t.monthNames[p],(a||i&&p<t.minMonth||c&&p>t.maxMonth||t.disabled.includes(p))&&h.add("disabled"),l){var g=MonthsView_slicedToArray(l,2),b=g[0],w=g[1];p>b&&p<w&&h.add("range"),p===b&&h.add("range-start"),p===w&&h.add("range-end")}o.includes(p)&&h.add("selected"),p===t.focused&&h.add("focused"),t.beforeShow&&t.performBeforeHook(u,p,v)}))}},{key:"refresh",value:function refresh(){var t=this,o=this.selected[this.year]||[],a=MonthsView_slicedToArray(computeMonthRange(this.range,this.year)||[],2),i=a[0],c=a[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(a,l){var u=a.classList;l>i&&l<c&&u.add("range"),l===i&&u.add("range-start"),l===c&&u.add("range-end"),o.includes(l)&&u.add("selected"),l===t.focused&&u.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[this.focused].classList.add("focused")}}]),MonthsView}(ct);function YearsView_typeof(t){return YearsView_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},YearsView_typeof(t)}function YearsView_slicedToArray(t,o){return function YearsView_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function YearsView_iterableToArrayLimit(t,o){var a=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,c,l=[],u=!0,p=!1;try{for(a=a.call(t);!(u=(i=a.next()).done)&&(l.push(i.value),!o||l.length!==o);u=!0);}catch(h){p=!0,c=h}finally{try{u||null==a.return||a.return()}finally{if(p)throw c}}return l}(t,o)||YearsView_unsupportedIterableToArray(t,o)||function YearsView_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YearsView_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function YearsView_get(){return YearsView_get="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function _get(t,o,a){var i=YearsView_superPropBase(t,o);if(i){var c=Object.getOwnPropertyDescriptor(i,o);return c.get?c.get.call(arguments.length<3?t:a):c.value}},YearsView_get.apply(this,arguments)}function YearsView_superPropBase(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&null!==(t=YearsView_getPrototypeOf(t)););return t}function YearsView_setPrototypeOf(t,o){return YearsView_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,o){return t.__proto__=o,t},YearsView_setPrototypeOf(t,o)}function YearsView_createSuper(t){var o=function YearsView_isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var a,i=YearsView_getPrototypeOf(t);if(o){var c=YearsView_getPrototypeOf(this).constructor;a=Reflect.construct(i,arguments,c)}else a=i.apply(this,arguments);return YearsView_possibleConstructorReturn(this,a)}}function YearsView_possibleConstructorReturn(t,o){if(o&&("object"===YearsView_typeof(o)||"function"===typeof o))return o;if(void 0!==o)throw new TypeError("Derived constructors may only return object or undefined");return function YearsView_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function YearsView_getPrototypeOf(t){return YearsView_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},YearsView_getPrototypeOf(t)}function YearsView_toConsumableArray(t){return function YearsView_arrayWithoutHoles(t){if(Array.isArray(t))return YearsView_arrayLikeToArray(t)}(t)||function YearsView_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||YearsView_unsupportedIterableToArray(t)||function YearsView_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YearsView_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return YearsView_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?YearsView_arrayLikeToArray(t,o):void 0}}function YearsView_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function toTitleCase(t){return YearsView_toConsumableArray(t).reduce((function(t,o,a){return t+(a?o:o.toUpperCase())}),"")}var dt=function(t){!function YearsView_inherits(t,o){if("function"!==typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&YearsView_setPrototypeOf(t,o)}(YearsView,t);var o=YearsView_createSuper(YearsView);function YearsView(t,a){return function YearsView_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,YearsView),o.call(this,t,a)}return function YearsView_createClass(t,o,a){return o&&YearsView_defineProperties(t.prototype,o),a&&YearsView_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(YearsView,[{key:"init",value:function init(t){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o&&(this.navStep=10*this.step,this.beforeShowOption="beforeShow".concat(toTitleCase(this.cellClass)),this.grid=this.element,this.element.classList.add(this.name,"datepicker-grid"),this.grid.appendChild(parseHTML(createTagRepeat("span",12)))),YearsView_get(YearsView_getPrototypeOf(YearsView.prototype),"init",this).call(this,t)}},{key:"setOptions",value:function setOptions(t){if(hasProperty(t,"minDate")&&(void 0===t.minDate?this.minYear=this.minDate=void 0:(this.minYear=startOfYearPeriod(t.minDate,this.step),this.minDate=dateValue(this.minYear,0,1))),hasProperty(t,"maxDate")&&(void 0===t.maxDate?this.maxYear=this.maxDate=void 0:(this.maxYear=startOfYearPeriod(t.maxDate,this.step),this.maxDate=dateValue(this.maxYear,11,31))),this.isMinView?t.datesDisabled&&(this.datesDisabled=t.datesDisabled):this.datesDisabled=[],void 0!==t[this.beforeShowOption]){var o=t[this.beforeShowOption];this.beforeShow="function"===typeof o?o:void 0}}},{key:"updateFocus",value:function updateFocus(){var t=new Date(this.picker.viewDate),o=startOfYearPeriod(t,this.navStep),a=o+9*this.step;this.first=o,this.last=a,this.start=o-this.step,this.focused=startOfYearPeriod(t,this.step)}},{key:"updateSelection",value:function updateSelection(){var t=this,o=this.picker.datepicker,a=o.dates,i=o.rangepicker;this.selected=a.reduce((function(o,a){return pushUnique(o,startOfYearPeriod(a,t.step))}),[]),i&&i.dates&&(this.range=i.dates.map((function(o){if(void 0!==o)return startOfYearPeriod(o,t.step)})))}},{key:"render",value:function render(){var t=this;this.disabled=this.datesDisabled.map((function(t){return new Date(t).getFullYear()})),this.picker.setViewSwitchLabel("".concat(this.first,"-").concat(this.last)),this.picker.setPrevBtnDisabled(this.first<=this.minYear),this.picker.setNextBtnDisabled(this.last>=this.maxYear),Array.from(this.grid.children).forEach((function(o,a){var i=o.classList,c=t.start+a*t.step,l=dateValue(c,0,1);if(o.className="datepicker-cell ".concat(t.cellClass),t.isMinView&&(o.dataset.date=l),o.textContent=o.dataset.year=c,0===a?i.add("prev"):11===a&&i.add("next"),(c<t.minYear||c>t.maxYear||t.disabled.includes(c))&&i.add("disabled"),t.range){var u=YearsView_slicedToArray(t.range,2),p=u[0],h=u[1];c>p&&c<h&&i.add("range"),c===p&&i.add("range-start"),c===h&&i.add("range-end")}t.selected.includes(c)&&i.add("selected"),c===t.focused&&i.add("focused"),t.beforeShow&&t.performBeforeHook(o,c,l)}))}},{key:"refresh",value:function refresh(){var t=this,o=YearsView_slicedToArray(this.range||[],2),a=o[0],i=o[1];this.grid.querySelectorAll(".range, .range-start, .range-end, .selected, .focused").forEach((function(t){t.classList.remove("range","range-start","range-end","selected","focused")})),Array.from(this.grid.children).forEach((function(o){var c=Number(o.textContent),l=o.classList;c>a&&c<i&&l.add("range"),c===a&&l.add("range-start"),c===i&&l.add("range-end"),t.selected.includes(c)&&l.add("selected"),c===t.focused&&l.add("focused")}))}},{key:"refreshFocus",value:function refreshFocus(){var t=Math.round((this.focused-this.start)/this.step);this.grid.querySelectorAll(".focused").forEach((function(t){t.classList.remove("focused")})),this.grid.children[t].classList.add("focused")}}]),YearsView}(ct);function triggerDatepickerEvent(t,o){var a={date:t.getDate(),viewDate:new Date(t.picker.viewDate),viewId:t.picker.currentView.id,datepicker:t};t.element.dispatchEvent(new CustomEvent(o,{detail:a}))}function goToPrevOrNext(t,o){var a,i=t.config,c=i.minDate,l=i.maxDate,u=t.picker,p=u.currentView,h=u.viewDate;switch(p.id){case 0:a=addMonths(h,o);break;case 1:a=addYears(h,o);break;default:a=addYears(h,o*p.navStep)}a=limitToRange(a,c,l),t.picker.changeFocus(a).render()}function switchView(t){var o=t.picker.currentView.id;o!==t.config.maxView&&t.picker.changeView(o+1).render()}function unfocus(t){t.config.updateOnBlur?t.update({revert:!0}):t.refresh("input"),t.hide()}function goToSelectedMonthOrYear(t,o){var a=t.picker,i=new Date(a.viewDate),c=a.currentView.id,l=1===c?addMonths(i,o-i.getMonth()):addYears(i,o-i.getFullYear());a.changeFocus(l).changeView(c-1).render()}function onClickTodayBtn(t){var o=t.picker,a=today();if(1===t.config.todayBtnMode){if(t.config.autohide)return void t.setDate(a);t.setDate(a,{render:!1}),o.update()}o.viewDate!==a&&o.changeFocus(a),o.changeView(0).render()}function onClickClearBtn(t){t.setDate({clear:!0})}function onClickViewSwitch(t){switchView(t)}function onClickPrevBtn(t){goToPrevOrNext(t,-1)}function onClickNextBtn(t){goToPrevOrNext(t,1)}function onClickView(t,o){var a=findElementInEventPath(o,".datepicker-cell");if(a&&!a.classList.contains("disabled")){var i=t.picker.currentView,c=i.id;i.isMinView?t.setDate(Number(a.dataset.date)):goToSelectedMonthOrYear(t,Number(1===c?a.dataset.month:a.dataset.year))}}function onMousedownPicker(t){t.preventDefault()}function Picker_toConsumableArray(t){return function Picker_arrayWithoutHoles(t){if(Array.isArray(t))return Picker_arrayLikeToArray(t)}(t)||function Picker_iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Picker_unsupportedIterableToArray(t)||function Picker_nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Picker_slicedToArray(t,o){return function Picker_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function Picker_iterableToArrayLimit(t,o){var a=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var i,c,l=[],u=!0,p=!1;try{for(a=a.call(t);!(u=(i=a.next()).done)&&(l.push(i.value),!o||l.length!==o);u=!0);}catch(h){p=!0,c=h}finally{try{u||null==a.return||a.return()}finally{if(p)throw c}}return l}(t,o)||Picker_unsupportedIterableToArray(t,o)||function Picker_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Picker_unsupportedIterableToArray(t,o){if(t){if("string"===typeof t)return Picker_arrayLikeToArray(t,o);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Picker_arrayLikeToArray(t,o):void 0}}function Picker_arrayLikeToArray(t,o){(null==o||o>t.length)&&(o=t.length);for(var a=0,i=new Array(o);a<o;a++)i[a]=t[a];return i}function Picker_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var ft=["left","top","right","bottom"].reduce((function(t,o){return t[o]="datepicker-orient-".concat(o),t}),{}),pt=function toPx(t){return t?"".concat(t,"px"):t};function processPickerOptions(t,o){if(void 0!==o.title&&(o.title?(t.controls.title.textContent=o.title,showElement(t.controls.title)):(t.controls.title.textContent="",hideElement(t.controls.title))),o.prevArrow){var a=t.controls.prevBtn;emptyChildNodes(a),o.prevArrow.forEach((function(t){a.appendChild(t.cloneNode(!0))}))}if(o.nextArrow){var i=t.controls.nextBtn;emptyChildNodes(i),o.nextArrow.forEach((function(t){i.appendChild(t.cloneNode(!0))}))}if(o.locale&&(t.controls.todayBtn.textContent=o.locale.today,t.controls.clearBtn.textContent=o.locale.clear),void 0!==o.todayBtn&&(o.todayBtn?showElement(t.controls.todayBtn):hideElement(t.controls.todayBtn)),hasProperty(o,"minDate")||hasProperty(o,"maxDate")){var c=t.datepicker.config,l=c.minDate,u=c.maxDate;t.controls.todayBtn.disabled=!isInRange(today(),l,u)}void 0!==o.clearBtn&&(o.clearBtn?showElement(t.controls.clearBtn):hideElement(t.controls.clearBtn))}function computeResetViewDate(t){var o=t.dates,a=t.config;return limitToRange(o.length>0?lastItemOf(o):a.defaultViewDate,a.minDate,a.maxDate)}function setViewDate(t,o){var a=new Date(t.viewDate),i=new Date(o),c=t.currentView,l=c.id,u=c.year,p=c.first,h=c.last,v=i.getFullYear();switch(t.viewDate=o,v!==a.getFullYear()&&triggerDatepickerEvent(t.datepicker,"changeYear"),i.getMonth()!==a.getMonth()&&triggerDatepickerEvent(t.datepicker,"changeMonth"),l){case 0:return o<p||o>h;case 1:return v!==u;default:return v<p||v>h}}function getTextDirection(t){return window.getComputedStyle(t).direction}function findScrollParents(t){var o=getParent(t);if(o!==document.body&&o)return"visible"!==window.getComputedStyle(o).overflow?o:findScrollParents(o)}var yt=function(){function Picker(t){!function Picker_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,Picker);var o=(this.datepicker=t).config,a=at.replace(/%buttonClass%/g,o.buttonClass),i=this.element=parseHTML(a).firstChild,c=Picker_slicedToArray(i.firstChild.children,3),l=c[0],u=c[1],p=c[2],h=l.firstElementChild,v=Picker_slicedToArray(l.lastElementChild.children,3),g=v[0],b=v[1],w=v[2],_=Picker_slicedToArray(p.firstChild.children,2),k={title:h,prevBtn:g,viewSwitch:b,nextBtn:w,todayBtn:_[0],clearBtn:_[1]};this.main=u,this.controls=k;var A=t.inline?"inline":"dropdown";i.classList.add("datepicker-".concat(A)),processPickerOptions(this,o),this.viewDate=computeResetViewDate(t),registerListeners(t,[[i,"mousedown",onMousedownPicker],[u,"click",onClickView.bind(null,t)],[k.viewSwitch,"click",onClickViewSwitch.bind(null,t)],[k.prevBtn,"click",onClickPrevBtn.bind(null,t)],[k.nextBtn,"click",onClickNextBtn.bind(null,t)],[k.todayBtn,"click",onClickTodayBtn.bind(null,t)],[k.clearBtn,"click",onClickClearBtn.bind(null,t)]]),this.views=[new lt(this),new ut(this),new dt(this,{id:2,name:"years",cellClass:"year",step:1}),new dt(this,{id:3,name:"decades",cellClass:"decade",step:10})],this.currentView=this.views[o.startView],this.currentView.render(),this.main.appendChild(this.currentView.element),o.container?o.container.appendChild(this.element):t.inputField.after(this.element)}return function Picker_createClass(t,o,a){return o&&Picker_defineProperties(t.prototype,o),a&&Picker_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(Picker,[{key:"setOptions",value:function setOptions(t){processPickerOptions(this,t),this.views.forEach((function(o){o.init(t,!1)})),this.currentView.render()}},{key:"detach",value:function detach(){this.element.remove()}},{key:"show",value:function show(){if(!this.active){var t=this.datepicker,o=this.element;if(t.inline)o.classList.add("active");else{var a=getTextDirection(t.inputField);a!==getTextDirection(getParent(o))?o.dir=a:o.dir&&o.removeAttribute("dir"),o.style.visiblity="hidden",o.classList.add("active"),this.place(),o.style.visiblity="",t.config.disableTouchKeyboard&&t.inputField.blur()}this.active=!0,triggerDatepickerEvent(t,"show")}}},{key:"hide",value:function hide(){this.active&&(this.datepicker.exitEditMode(),this.element.classList.remove("active"),this.active=!1,triggerDatepickerEvent(this.datepicker,"hide"))}},{key:"place",value:function place(){var t=this.element,o=t.classList,a=t.offsetParent,i=t.style,c=this.datepicker,l=c.config,u=c.inputField,p=this.element.getBoundingClientRect(),h=p.width,v=p.height,g=u.getBoundingClientRect(),b=g.left,w=g.top,_=g.right,k=g.bottom,A=g.width,O=g.height,E=l.orientation,S=E.x,P=E.y,T=b,C=w;if(a!==document.body&&a){var L=a.getBoundingClientRect();T-=L.left-a.scrollLeft,C-=L.top-a.scrollTop}else T+=window.scrollX,C+=window.scrollY;var V=findScrollParents(u),I=0,x=0,j=document.documentElement,N=j.clientWidth,R=j.clientHeight;if(V){var Y=V.getBoundingClientRect();Y.top>0&&(x=Y.top),Y.left>0&&(I=Y.left),Y.right<N&&(N=Y.right),Y.bottom<R&&(R=Y.bottom)}var B=0;"auto"===S&&(b<I?(S="left",B=I-b):b+h>N?(S="right",N<_&&(B=N-_)):S="rtl"===getTextDirection(u)?_-h<I?"left":"right":"left"),"right"===S&&(T+=A-h),T+=B,"auto"===P&&(P=w-v>x&&k+v>R?"top":"bottom"),"top"===P?C-=v:C+=O,o.remove.apply(o,Picker_toConsumableArray(Object.values(ft))),o.add(ft[S],ft[P]),i.left=pt(T),i.top=pt(C)}},{key:"setViewSwitchLabel",value:function setViewSwitchLabel(t){this.controls.viewSwitch.textContent=t}},{key:"setPrevBtnDisabled",value:function setPrevBtnDisabled(t){this.controls.prevBtn.disabled=t}},{key:"setNextBtnDisabled",value:function setNextBtnDisabled(t){this.controls.nextBtn.disabled=t}},{key:"changeView",value:function changeView(t){var o=this.currentView,a=this.views[t];return a.id!==o.id&&(this.currentView=a,this._renderMethod="render",triggerDatepickerEvent(this.datepicker,"changeView"),this.main.replaceChild(a.element,o.element)),this}},{key:"changeFocus",value:function changeFocus(t){return this._renderMethod=setViewDate(this,t)?"render":"refreshFocus",this.views.forEach((function(t){t.updateFocus()})),this}},{key:"update",value:function update(){var t=computeResetViewDate(this.datepicker);return this._renderMethod=setViewDate(this,t)?"render":"refresh",this.views.forEach((function(t){t.updateFocus(),t.updateSelection()})),this}},{key:"render",value:function render(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=t&&this._renderMethod||"render";delete this._renderMethod,this.currentView[o]()}}]),Picker}();function findNextAvailableOne(t,o,a,i,c,l){if(isInRange(t,c,l))return i(t)?findNextAvailableOne(o(t,a),o,a,i,c,l):t}function moveByArrowKey(t,o,a,i){var c,l,u=t.picker,p=u.currentView,h=p.step||1,v=u.viewDate;switch(p.id){case 0:v=i?addDays(v,7*a):o.ctrlKey||o.metaKey?addYears(v,a):addDays(v,a),c=addDays,l=function testFn(t){return p.disabled.includes(t)};break;case 1:v=addMonths(v,i?4*a:a),c=addMonths,l=function testFn(t){var o=new Date(t),a=p.year,i=p.disabled;return o.getFullYear()===a&&i.includes(o.getMonth())};break;default:v=addYears(v,a*(i?4:1)*h),c=addYears,l=function testFn(t){return p.disabled.includes(startOfYearPeriod(t,h))}}void 0!==(v=findNextAvailableOne(v,c,a<0?-h:h,l,p.minDate,p.maxDate))&&u.changeFocus(v).render()}function onKeydown(t,o){var a=o.key;if("Tab"!==a){var i=t.picker,c=i.currentView,l=c.id,u=c.isMinView;if(i.active){if(t.editMode)return void("Enter"===a?t.exitEditMode({update:!0,autohide:t.config.autohide}):"Escape"===a&&i.hide());if("ArrowLeft"===a)if(o.ctrlKey||o.metaKey)goToPrevOrNext(t,-1);else{if(o.shiftKey)return void t.enterEditMode();moveByArrowKey(t,o,-1,!1)}else if("ArrowRight"===a)if(o.ctrlKey||o.metaKey)goToPrevOrNext(t,1);else{if(o.shiftKey)return void t.enterEditMode();moveByArrowKey(t,o,1,!1)}else if("ArrowUp"===a)if(o.ctrlKey||o.metaKey)switchView(t);else{if(o.shiftKey)return void t.enterEditMode();moveByArrowKey(t,o,-1,!0)}else if("ArrowDown"===a){if(o.shiftKey&&!o.ctrlKey&&!o.metaKey)return void t.enterEditMode();moveByArrowKey(t,o,1,!0)}else{if("Enter"!==a)return void("Escape"===a?i.hide():"Backspace"!==a&&"Delete"!==a&&(1!==a.length||o.ctrlKey||o.metaKey)||t.enterEditMode());if(u)return void t.setDate(i.viewDate);i.changeView(l-1).render()}}else{if("ArrowDown"!==a)return void("Enter"===a?t.update():"Escape"===a&&i.show());i.show()}o.preventDefault()}else unfocus(t)}function onFocus(t){t.config.showOnFocus&&!t._showing&&t.show()}function onMousedown(t,o){var a=o.target;(t.picker.active||t.config.showOnClick)&&(a._active=isActiveElement(a),a._clicking=setTimeout((function(){delete a._active,delete a._clicking}),2e3))}function onClickInput(t,o){var a=o.target;a._clicking&&(clearTimeout(a._clicking),delete a._clicking,a._active&&t.enterEditMode(),delete a._active,t.config.showOnClick&&t.show())}function onPaste(t,o){o.clipboardData.types.includes("text/plain")&&t.enterEditMode()}function onClickOutside(t,o){var a=t.element,i=t.picker;if(i.active||isActiveElement(a)){var c=i.element;findElementInEventPath(o,(function(t){return t===a||t===c}))||unfocus(t)}}function Datepicker_typeof(t){return Datepicker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Datepicker_typeof(t)}function Datepicker_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function Datepicker_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function stringifyDates(t,o){return t.map((function(t){return date_format_formatDate(t,o.format,o.locale)})).join(o.dateDelimiter)}function processInputDates(t,o){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.config,c=t.dates,l=t.rangeSideIndex;if(0===o.length)return a?[]:void 0;var u=o.reduce((function(t,o){var a=date_format_parseDate(o,i.format,i.locale);return void 0===a||!isInRange(a=regularizeDate(a,i.pickLevel,l),i.minDate,i.maxDate)||t.includes(a)||i.datesDisabled.includes(a)||!(i.pickLevel>0)&&i.daysOfWeekDisabled.includes(new Date(a).getDay())||t.push(a),t}),[]);return 0!==u.length?(i.multidate&&!a&&(u=u.reduce((function(t,o){return c.includes(o)||t.push(o),t}),c.filter((function(t){return!u.includes(t)})))),i.maxNumberOfDates&&u.length>i.maxNumberOfDates?u.slice(-1*i.maxNumberOfDates):u):void 0}function refreshUI(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.config,c=t.picker,l=t.inputField;if(2&o){var u=c.active?i.pickLevel:i.startView;c.update().changeView(u).render(a)}1&o&&l&&(l.value=stringifyDates(t.dates,i))}function _setDate(t,o,a){var i=a.clear,c=a.render,l=a.autohide,u=a.revert;void 0===c&&(c=!0),c?void 0===l&&(l=t.config.autohide):l=!1;var p=processInputDates(t,o,i);(p||u)&&(p&&p.toString()!==t.dates.toString()?(t.dates=p,refreshUI(t,c?3:1),triggerDatepickerEvent(t,"changeDate")):refreshUI(t,1),l&&t.hide())}var ht=function(){function Datepicker(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;Datepicker_classCallCheck(this,Datepicker),t.datepicker=this,this.element=t;var i,c,l=this.config=Object.assign({buttonClass:o.buttonClass&&String(o.buttonClass)||"button",container:null,defaultViewDate:today(),maxDate:void 0,minDate:void 0},processOptions(tt,this)),u=this.inline="INPUT"!==t.tagName;if(u?l.container=t:(o.container&&(l.container=o.container instanceof HTMLElement?o.container:document.querySelector(o.container)),(i=this.inputField=t).classList.add("datepicker-input")),a){var p=a.inputs.indexOf(i),h=a.datepickers;if(p<0||p>1||!Array.isArray(h))throw Error("Invalid rangepicker object.");h[p]=this,Object.defineProperty(this,"rangepicker",{get:function get(){return a}}),Object.defineProperty(this,"rangeSideIndex",{get:function get(){return p}})}this._options=o,Object.assign(l,processOptions(o,this)),u?(c=stringToArray(t.dataset.date,l.dateDelimiter),delete t.dataset.date):c=stringToArray(i.value,l.dateDelimiter),this.dates=[];var v=processInputDates(this,c);v&&v.length>0&&(this.dates=v),i&&(i.value=stringifyDates(this.dates,l));var g=this.picker=new yt(this);if(u)this.show();else{var b=onClickOutside.bind(null,this),w=[[i,"keydown",onKeydown.bind(null,this)],[i,"focus",onFocus.bind(null,this)],[i,"mousedown",onMousedown.bind(null,this)],[i,"click",onClickInput.bind(null,this)],[i,"paste",onPaste.bind(null,this)],[document,"mousedown",b],[document,"touchstart",b],[window,"resize",g.place.bind(g)]];registerListeners(this,w)}}return function Datepicker_createClass(t,o,a){return o&&Datepicker_defineProperties(t.prototype,o),a&&Datepicker_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(Datepicker,[{key:"active",get:function get(){return!(!this.picker||!this.picker.active)}},{key:"pickerElement",get:function get(){return this.picker?this.picker.element:void 0}},{key:"setOptions",value:function setOptions(t){var o=this.picker,a=processOptions(t,this);Object.assign(this._options,t),Object.assign(this.config,a),o.setOptions(a),refreshUI(this,3)}},{key:"show",value:function show(){if(this.inputField){if(this.inputField.disabled)return;isActiveElement(this.inputField)||this.config.disableTouchKeyboard||(this._showing=!0,this.inputField.focus(),delete this._showing)}this.picker.show()}},{key:"hide",value:function hide(){this.inline||(this.picker.hide(),this.picker.update().changeView(this.config.startView).render())}},{key:"destroy",value:function destroy(){return this.hide(),function unregisterListeners(t){var o=Je.get(t);o&&(o.forEach((function(t){Ze.call.apply(Ze,event_toConsumableArray(t))})),Je.delete(t))}(this),this.picker.detach(),this.inline||this.inputField.classList.remove("datepicker-input"),delete this.element.datepicker,this}},{key:"getDate",value:function getDate(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,a=o?function(a){return date_format_formatDate(a,o,t.config.locale)}:function(t){return new Date(t)};return this.config.multidate?this.dates.map(a):this.dates.length>0?a(this.dates[0]):void 0}},{key:"setDate",value:function setDate(){for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];var i=[].concat(o),c={},l=lastItemOf(o);"object"!==Datepicker_typeof(l)||Array.isArray(l)||l instanceof Date||!l||Object.assign(c,i.pop());var u=Array.isArray(i[0])?i[0]:i;_setDate(this,u,c)}},{key:"update",value:function update(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline){var o=Object.assign(t||{},{clear:!0,render:!0}),a=stringToArray(this.inputField.value,this.config.dateDelimiter);_setDate(this,a,o)}}},{key:"refresh",value:function refresh(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t&&"string"!==typeof t&&(o=t,t=void 0),refreshUI(this,"picker"===t?2:"input"===t?1:3,!o)}},{key:"enterEditMode",value:function enterEditMode(){this.inline||!this.picker.active||this.editMode||(this.editMode=!0,this.inputField.classList.add("in-edit"))}},{key:"exitEditMode",value:function exitEditMode(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(!this.inline&&this.editMode){var o=Object.assign({update:!1},t);delete this.editMode,this.inputField.classList.remove("in-edit"),o.update&&this.update(o)}}}],[{key:"formatDate",value:function formatDate(t,o,a){return date_format_formatDate(t,o,a&&et[a]||et.en)}},{key:"parseDate",value:function parseDate(t,o,a){return date_format_parseDate(t,o,a&&et[a]||et.en)}},{key:"locales",get:function get(){return et}}]),Datepicker}(),vt=function init(){document.querySelectorAll(".js-datepicker").forEach((function(t,o){var a=new ht(t);t.ui=a}))};window.addEventListener("".concat(t.LODEDANDREADY),vt),window.addEventListener("".concat(t.AJAX),vt);function redaxios_module_typeof(t){return redaxios_module_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},redaxios_module_typeof(t)}var mt=function e(t){function n(t,o,a){var i,c={};if(Array.isArray(t))return t.concat(o);for(i in t)c[a?i.toLowerCase():i]=t[i];for(i in o){var l=a?i.toLowerCase():i,u=o[i];c[l]=l in c&&"object"==redaxios_module_typeof(u)?n(c[l],u,"headers"==l):u}return c}function r(o,a,i,c,l){var u="string"!=typeof o?(a=o).url:o,p={config:a},h=n(t,a),v={};c=c||h.data,(h.transformRequest||[]).map((function(t){c=t(c,h.headers)||c})),h.auth&&(v.authorization=h.auth),c&&"object"==redaxios_module_typeof(c)&&"function"!=typeof c.append&&"function"!=typeof c.text&&(c=JSON.stringify(c),v["content-type"]="application/json");try{v[h.xsrfHeaderName]=decodeURIComponent(document.cookie.match(RegExp("(^|; )"+h.xsrfCookieName+"=([^;]*)"))[2])}catch(o){}return h.baseURL&&(u=u.replace(/^(?!.*\/\/)\/?/,h.baseURL+"/")),h.params&&(u+=(~u.indexOf("?")?"&":"?")+(h.paramsSerializer?h.paramsSerializer(h.params):new URLSearchParams(h.params))),(h.fetch||fetch)(u,{method:(i||h.method||"get").toUpperCase(),body:c,headers:n(h.headers,v,!0),credentials:h.withCredentials?"include":l}).then((function(t){for(var o in t)"function"!=typeof t[o]&&(p[o]=t[o]);return"stream"==h.responseType?(p.data=t.body,p):t[h.responseType||"text"]().then((function(t){p.data=t,p.data=JSON.parse(t)})).catch(Object).then((function(){return(h.validateStatus?h.validateStatus(t.status):t.ok)?p:Promise.reject(p)}))}))}return t=t||{},r.request=r,r.get=function(t,o){return r(t,o,"get")},r.delete=function(t,o){return r(t,o,"delete")},r.head=function(t,o){return r(t,o,"head")},r.options=function(t,o){return r(t,o,"options")},r.post=function(t,o,a){return r(t,a,"post",o)},r.put=function(t,o,a){return r(t,a,"put",o)},r.patch=function(t,o,a){return r(t,a,"patch",o)},r.all=Promise.all.bind(Promise),r.spread=function(t){return t.apply.bind(t,t)},r.CancelToken="function"==typeof AbortController?AbortController:Object,r.defaults=t,r.create=e,r}();!function(o){var a,i="main.online",c=document,l=c.body,u=c.querySelector('meta[name="ping"]'),p=!1,h=function UPDATE_ONLINE_STATUS(c){p||(p=!0,c?(l.classList.contains("is-offline")?(console.log("".concat(i,": back Online")),o.dispatchEvent(new Event(t.BACKONLINE))):(console.log("".concat(i,": Online")),o.dispatchEvent(new Event(t.ONLINE))),l.classList.add("is-online"),l.classList.remove("is-offline"),u&&!a&&(console.log("".concat(i,": SESSION_PING is active")),a=setInterval(g,3e5))):(console.log("".concat(i,": Offline")),l.classList.add("is-offline"),l.classList.remove("is-online"),clearInterval(a),a=null,o.dispatchEvent(new Event(t.OFFLINE))),p=!1)},v=!1,g=function SESSION_PING(){if(!v&&!l.classList.contains("is-offline")){var t=u.getAttribute("content");console.log("".concat(i,": session ping")),v=!0,mt.post(t,{}).then((function(t){v=!1,h(!0)})).catch((function(t){console.error(t),console.warn("".concat(i,": SESSION_PING failed")),v=!1,h(!1)}))}},b=function navigatorStateUpdate(){"undefined"!==typeof navigator.onLine&&(navigator.onLine?h(!0):h(!1))};o.addEventListener("".concat(t.OFFLINE),(function(){h(!1)})),o.addEventListener("".concat(t.ONLINE),(function(){h(!0)})),o.addEventListener("".concat(t.LOADED),b),o.addEventListener("".concat(t.AJAX),b)}(window);function image_defineProperties(t,o){for(var a=0;a<o.length;a++){var i=o[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var gt="ajax.models.image",bt=document.querySelector('meta[name="api_static_domain"]'),wt=bt?bt.getAttribute("content"):"".concat(window.location.protocol,"//").concat(window.location.host);console.log("".concat(gt," [static url]: ").concat(wt));var _t=function(){function ImageObject(){!function image_classCallCheck(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}(this,ImageObject)}return function image_createClass(t,o,a){return o&&image_defineProperties(t.prototype,o),a&&image_defineProperties(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t}(ImageObject,[{key:"load",value:function load(t,o){var a=t.startsWith("http")?t:wt+t;return o&&(o.classList.add("loading"),o.classList.remove("loading__network-error")),new Promise((function(t,i){mt.get(a,{responseType:"blob"}).then((function(a){var i=new window.FileReader;i.readAsDataURL(a.data),i.onload=function(){var a=i.result;o&&(o.classList.remove("loading"),o.classList.add("loading__success")),t(a)}})).catch((function(t){console.warn(t);var c="";if(t.response){switch(t.response.status){case 404:c="Not Found.";break;case 500:c="Server issue, please try again latter.";break;default:c="Something went wrong."}console.error("".concat(gt," [").concat(a,"]: ").concat(c))}else t.request?(c="No response received",console.error("".concat(gt," [").concat(a,"]: ").concat(c))):console.error("".concat(gt," [").concat(a,"]: ").concat(t.message));o&&(o.classList.remove("loading"),o.classList.add("loading__network-error"),o.classList.add("empty")),i(t)}))}))}}]),ImageObject}();(function(o){var a=document,i=function loadLazyImages(){console.log("".concat("main.lazy-images",": Load lazy images")),a.querySelectorAll("[data-lazy-src]").forEach((function(t){t.classList.remove("empty"),(new _t).load(t.getAttribute("data-lazy-src"),t).then((function(o){t.setAttribute("src",o)})).catch((function(){t.classList.add("empty")}))})),a.querySelectorAll("[data-lazy-bg]").forEach((function(t){t.classList.remove("empty"),(new _t).load(t.getAttribute("data-lazy-bg"),t).then((function(o){t.style.backgroundImage="url(".concat(o,")")})).catch((function(o){t.classList.add("empty")}))}))};o.addEventListener("".concat(t.LODEDANDREADY),i),o.addEventListener("".concat(t.AJAX),i)})(window),function(o){var a="_layout",i=document;o.addEventListener("".concat(t.LOADED),(function(){!function initFonts(){console.log("".concat(a,": initFonts"));var t=i.createElement("link");t.rel="stylesheet",t.type="text/css",t.media="all",t.href="https://fonts.googleapis.com/css?family=Roboto:ital,wght@0,400;0,700;1,400&display=swap",i.getElementsByTagName("head")[0].appendChild(t)}(),function initAnalytics(){console.log("".concat(a,": initAnalytics"))}()}))}(window)}()}();