vrembem 1.40.3 → 1.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).vrembem={})}(this,function(t){var e=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?(e.inert=!0,e.setAttribute("aria-hidden",!0)):(e.inert=null,e.removeAttribute("aria-hidden"))})},n=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?e.style.overflow="hidden":e.style.removeProperty("overflow")})},i=function(t){t&&document.querySelectorAll(t).forEach(function(t){t.setAttribute("tabindex","-1")})},r=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).add.apply(n,[].slice.call(e,1))})},s=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],o=function(t,e){var n=t.querySelector("[data-"+e.dataFocus+"]");if(n)n.focus();else{var i=t.querySelector('[tabindex="-1"]');i&&i.focus()}},a=function(t){void 0===t&&(t=null),t&&t.memory&&t.memory.trigger&&(t.memory.trigger.focus(),t.memory.trigger=null)},c=/*#__PURE__*/function(){function t(){this.target=null,this.__handlerFocusTrap=this.handlerFocusTrap.bind(this)}var e=t.prototype;return e.init=function(t){this.target=t,this.inner=this.target.querySelector('[tabindex="-1"]'),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):this.target.addEventListener("keydown",this.handlerFocusLock)},e.destroy=function(){this.target&&(this.inner=null,this.focusable=null,this.focusableFirst=null,this.focusableLast=null,this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.target=null)},e.refresh=function(){this.target&&(this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):(this.focusableFirst=null,this.focusableLast=null,this.target.addEventListener("keydown",this.handlerFocusLock)))},e.handlerFocusTrap=function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement!==this.focusableFirst&&document.activeElement!==this.inner||(this.focusableLast.focus(),t.preventDefault()):document.activeElement!==this.focusableLast&&document.activeElement!==this.inner||(this.focusableFirst.focus(),t.preventDefault()))},e.handlerFocusLock=function(t){("Tab"===t.key||9===t.keyCode)&&t.preventDefault()},e.getFocusable=function(){var t=[],e=document.activeElement,n=this.inner?this.inner.scrollTop:0;return this.target.querySelectorAll(s.join(",")).forEach(function(e){e.focus(),e===document.activeElement&&t.push(e)}),this.inner&&(this.inner.scrollTop=n),e.focus(),t},t}(),l=function(t,e){return void 0===e&&(e=0),"string"!=typeof t?t:e?document.querySelector(t):document.querySelectorAll(t)},u=function(t){return t=[].slice.call(t=t.forEach?t:[t]),[].slice.call(arguments,1).some(function(e){return t.some(function(t){if(t.classList.contains(e))return!0})})};function d(t,e,n){if(void 0===n&&(n=!1),n){var i=l(t);if(!i.length)throw new Error('Move target element "'+t+'" not found!');var r=l(n,1);if(!r)throw new Error('Move reference element "'+n+'" not found!');i.forEach(function(t){switch(e){case"after":return r.after(t),{ref:r,el:t,type:e};case"before":return r.before(t),{ref:r,el:t,type:e};case"append":return r.append(t),{ref:r,el:t,type:e};case"prepend":return r.prepend(t),{ref:r,el:t,type:e};default:throw new Error('Move type "'+e+'" does not exist!')}})}}var f=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).remove.apply(n,[].slice.call(e,1))})},h=function(t,e){return new Promise(function(n){e.transition?(t.classList.remove(e.stateClosed),t.classList.add(e.stateOpening),t.addEventListener("transitionend",function i(){t.classList.add(e.stateOpened),t.classList.remove(e.stateOpening),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateOpened),t.classList.remove(e.stateClosed),n(t))})},p=function(t,e){return new Promise(function(n){e.transition?(t.classList.add(e.stateClosing),t.classList.remove(e.stateOpened),t.addEventListener("transitionend",function i(){t.classList.remove(e.stateClosing),t.classList.add(e.stateClosed),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateClosed),t.classList.remove(e.stateOpened),n(t))})},g={__proto__:null,setInert:e,setOverflowHidden:n,setTabindex:i,addClass:r,camelCase:function(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})},focusTarget:o,focusTrigger:a,FocusTrap:c,getElement:l,hasClass:u,hyphenCase:function(t){return t.replace(/([a-z][A-Z])/g,function(t){return t[0]+"-"+t[1].toLowerCase()})},moveElement:d,removeClass:f,toggleClass:function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){[].slice.call(e,1).forEach(function(e){t.classList.toggle(e)})})},openTransition:h,closeTransition:p};function v(){return(v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var m={autoInit:!1,stateAttr:"aria-checked",stateValue:"mixed"},y=/*#__PURE__*/function(){function t(t){this.defaults=m,this.settings=v({},this.defaults,t),this.__handlerClick=this.handlerClick.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t));var e=document.querySelectorAll("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');this.setIndeterminate(e),document.addEventListener("click",this.__handlerClick,!1)},e.destroy=function(){document.removeEventListener("click",this.__handlerClick,!1)},e.handlerClick=function(t){var e=t.target.closest("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');e&&(this.removeAriaState(e),this.setIndeterminate(e))},e.setAriaState=function(t,e){var n=this;void 0===e&&(e=this.settings.stateValue),(t=t.forEach?t:[t]).forEach(function(t){t.setAttribute(n.settings.stateAttr,e)})},e.removeAriaState=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.removeAttribute(e.settings.stateAttr)})},e.setIndeterminate=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.indeterminate=!!t.hasAttribute(e.settings.stateAttr)})},t}(),b={autoInit:!1,dataDrawer:"drawer",dataDialog:"drawer-dialog",dataToggle:"drawer-toggle",dataOpen:"drawer-open",dataClose:"drawer-close",dataBreakpoint:"drawer-breakpoint",dataFocus:"drawer-focus",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",classModal:"drawer_modal",selectorInert:null,selectorOverflow:null,breakpoints:null,customEventPrefix:"drawer:",eventListeners:!0,stateSave:!0,stateKey:"DrawerState",setTabindex:!0,transition:!0},w=/*#__PURE__*/function(){function t(t){this.mediaQueryLists=[],this.parent=t,this.prefix=this.getVariablePrefix(),this.__check=this.check.bind(this)}var e=t.prototype;return e.init=function(){var t=this;document.querySelectorAll("[data-"+this.parent.settings.dataBreakpoint+"]").forEach(function(e){var n=e.getAttribute("data-"+t.parent.settings.dataDrawer),i=e.getAttribute("data-"+t.parent.settings.dataBreakpoint),r=t.getBreakpoint(i),s=window.matchMedia("(min-width:"+r+")");t.match(s,e),"function"==typeof s.addEventListener?s.addEventListener("change",t.__check):s.addListener(t.__check),t.mediaQueryLists.push({mql:s,drawer:n})})},e.destroy=function(){var t=this;this.mediaQueryLists&&this.mediaQueryLists.length&&this.mediaQueryLists.forEach(function(e){e.mql.removeListener(t.__check)}),this.mediaQueryLists=null},e.check=function(t){var e=this;void 0===t&&(t=null),this.mediaQueryLists&&this.mediaQueryLists.length&&(this.mediaQueryLists.forEach(function(n){if(!t||t.media==n.mql.media){var i=document.querySelector("[data-"+e.parent.settings.dataDrawer+'="'+n.drawer+'"]');i&&e.match(n.mql,i)}}),document.dispatchEvent(new CustomEvent(this.parent.settings.customEventPrefix+"breakpoint",{bubbles:!0})))},e.match=function(t,e){t.matches?this.parent.switchToDefault(e):this.parent.switchToModal(e)},e.getBreakpoint=function(t){var e=t;return this.parent.settings.breakpoints&&this.parent.settings.breakpoints[t]?e=this.parent.settings.breakpoints[t]:getComputedStyle(document.body).getPropertyValue(this.prefix+t)&&(e=getComputedStyle(document.body).getPropertyValue(this.prefix+t)),e},e.getVariablePrefix=function(){var t="--";return(t+=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"))+"breakpoint-"},t}();function E(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataDrawer+'="'+t+'"]')}function x(t){return Promise.reject(new Error('Did not find drawer with key: "'+t+'"'))}var L=function(t){try{var i=this,r=i.getDrawer(t);return r?u(r,i.settings.stateOpened)?(i.working=!0,u(r,i.settings.classModal)&&(e(!1,i.settings.selectorInert),n(!1,i.settings.selectorOverflow)),Promise.resolve(p(r,i.settings)).then(function(){return i.stateSave(r),a(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(x(t))}catch(t){return Promise.reject(t)}};function O(t){if(!this.working){var e=t.target.closest("[data-"+this.settings.dataToggle+"]");if(e){var n=e.getAttribute("data-"+this.settings.dataToggle);return this.memory.trigger=e,this.toggle(n),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataOpen+"]")){var i=e.getAttribute("data-"+this.settings.dataOpen);return this.memory.trigger=e,this.open(i),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataClose+"]")){var r=e.getAttribute("data-"+this.settings.dataClose);if(r)this.memory.trigger=e,this.close(r);else{var s=t.target.closest("[data-"+this.settings.dataDrawer+"]");s&&this.close(s)}t.preventDefault()}else t.target.hasAttribute("data-"+this.settings.dataDrawer)&&this.close(t.target)}}function k(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("."+this.settings.classModal+"."+this.settings.stateOpened);e&&this.close(e)}}var _=function(t){try{var i=this,r=i.getDrawer(t);if(!r)return Promise.resolve(x(t));if(u(r,i.settings.stateOpened))return o(r,i.settings),Promise.resolve(r);i.working=!0;var s=u(r,i.settings.classModal);return s&&n(!0,i.settings.selectorOverflow),Promise.resolve(h(r,i.settings)).then(function(){return i.stateSave(r),s&&(i.focusTrap.init(r),e(!0,i.settings.selectorInert)),o(r,i.settings),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})}catch(t){return Promise.reject(t)}};function A(t,e){if(!e.stateSave)return P(e);var n=localStorage.getItem(e.stateKey)?JSON.parse(localStorage.getItem(e.stateKey)):{};return(t?[t]:document.querySelectorAll("[data-"+e.dataDrawer+"]")).forEach(function(t){if(!u(t,e.classModal)){var i=t.getAttribute("data-"+e.dataDrawer);n[i]=u(t,e.stateOpened)?e.stateOpened:e.stateClosed}}),localStorage.setItem(e.stateKey,JSON.stringify(n)),n}function P(t){return localStorage.getItem(t.stateKey)&&localStorage.removeItem(t.stateKey),{}}var C=function(t){try{var i=this,s=i.getDrawer(t);return s?u(s,i.settings.classModal)?(e(!1,i.settings.selectorInert),n(!1,i.settings.selectorOverflow),f(s,i.settings.classModal),i.focusTrap.destroy(),t=s.getAttribute("data-"+i.settings.dataDrawer),i.state[t]==i.settings.stateOpened&&(r(s,i.settings.stateOpened),f(s,i.settings.stateClosed)),s.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"toDefault",{bubbles:!0})),Promise.resolve(s)):Promise.resolve():Promise.resolve(x(t))}catch(t){return Promise.reject(t)}},S=function(t){try{var e=this,n=e.getDrawer(t);return n?u(n,e.settings.classModal)?Promise.resolve():(r(n,e.settings.classModal),r(n,e.settings.stateClosed),f(n,e.settings.stateOpened),n.dispatchEvent(new CustomEvent(e.settings.customEventPrefix+"toModal",{bubbles:!0})),Promise.resolve(n)):Promise.resolve(x(t))}catch(t){return Promise.reject(t)}},T=function(t){try{var e=this,n=e.getDrawer(t);if(!n)return Promise.resolve(x(t));var i=!u(n,e.settings.stateOpened);return Promise.resolve(i?e.open(n):e.close(n))}catch(t){return Promise.reject(t)}},D=/*#__PURE__*/function(){function t(t){this.defaults=b,this.settings=v({},this.defaults,t),this.working=!1,this.memory={},this.state={},this.focusTrap=new c,this.breakpoint=new w(this),this.__handlerClick=O.bind(this),this.__handlerKeydown=k.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t)),this.stateSet(),this.settings.setTabindex&&this.setTabindex(),this.breakpoint.init(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.breakpoint.destroy(),this.memory={},this.state={},localStorage.removeItem(this.settings.stateKey),this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getDrawer=function(t){return E.call(this,t)},e.setTabindex=function(){return i("\n [data-"+this.settings.dataDrawer+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.stateSet=function(){this.state=function(t){if(!t.stateSave)return P(t);var e=localStorage.getItem(t.stateKey);if(!e||e&&0===Object.keys(JSON.parse(e)).length)return A(null,t);var n=JSON.parse(localStorage.getItem(t.stateKey));return Object.keys(n).forEach(function(e){var i=document.querySelector("[data-"+t.dataDrawer+'="'+e+'"]');i&&(n[e]==t.stateOpened?r(i,t.stateOpened):f(i,t.stateOpened))}),n}(this.settings)},e.stateSave=function(t){void 0===t&&(t=null),this.state=A(t,this.settings)},e.stateClear=function(){this.state=P(this.settings)},e.switchToDefault=function(t){return C.call(this,t)},e.switchToModal=function(t){return S.call(this,t)},e.toggle=function(t){return T.call(this,t)},e.open=function(t){return _.call(this,t)},e.close=function(t){return L.call(this,t)},t}(),M={autoInit:!1,dataModal:"modal",dataDialog:"modal-dialog",dataOpen:"modal-open",dataClose:"modal-close",dataFocus:"modal-focus",dataRequired:"modal-required",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",selectorInert:null,selectorOverflow:"body",customEventPrefix:"modal:",eventListeners:!0,moveModals:{ref:null,type:null},setTabindex:!0,transition:!0},j=function(t){void 0===t&&(t=!0);try{var i=this,r=document.querySelector("[data-"+i.settings.dataModal+"]."+i.settings.stateOpened);return r?(i.working=!0,e(!1,i.settings.selectorInert),n(!1,i.settings.selectorOverflow),Promise.resolve(p(r,i.settings)).then(function(){return t&&a(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r)}catch(t){return Promise.reject(t)}},q=function(t){try{var e,n=function(n){return e?n:t.target.closest("[data-"+i.settings.dataClose+"]")?(t.preventDefault(),void i.close()):void(t.target.hasAttribute("data-"+i.settings.dataModal)&&!t.target.hasAttribute("data-"+i.settings.dataRequired)&&i.close())},i=this;if(i.working)return Promise.resolve();var r=t.target.closest("[data-"+i.settings.dataOpen+"]"),s=function(){if(r){t.preventDefault();var n=r.getAttribute("data-"+i.settings.dataOpen),s=t.target.closest("[data-"+i.settings.dataModal+"]");return s||(i.memory.trigger=r),Promise.resolve(i.close(!s)).then(function(){i.open(n),e=1})}}();return Promise.resolve(s&&s.then?s.then(n):n(s))}catch(t){return Promise.reject(t)}};function I(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("[data-"+this.settings.dataModal+"]."+this.settings.stateOpened);e&&!e.hasAttribute("data-"+this.settings.dataRequired)&&this.close()}}function F(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataModal+'="'+t+'"]')}function B(t,e){void 0===t&&(t=this.settings.moveModals.type),void 0===e&&(e=this.settings.moveModals.ref);var n=document.querySelectorAll("[data-"+this.settings.dataModal+"]");n.length&&d(n,t,e)}function V(){var t=this;document.querySelectorAll("[data-"+this.settings.dataModal+"]").forEach(function(i){i.classList.contains(t.settings.stateOpened)&&(e(!1,t.settings.selectorInert),n(!1,t.settings.selectorOverflow),a(t),t.focusTrap.destroy()),f(i,t.settings.stateOpened,t.settings.stateOpening,t.settings.stateClosing),r(i,t.settings.stateClosed)})}var K=function(t){try{var i=this,r=F.call(i,t);return r?u(r,i.settings.stateClosed)?(i.working=!0,n(!0,i.settings.selectorOverflow),Promise.resolve(h(r,i.settings)).then(function(){return i.focusTrap.init(r),o(r,i.settings),e(!0,i.settings.selectorInert),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(Promise.reject(new Error('Did not find modal with key: "'+t+'"')))}catch(t){return Promise.reject(t)}},W=/*#__PURE__*/function(){function t(t){this.defaults=M,this.settings=v({},this.defaults,t),this.working=!1,this.memory={},this.focusTrap=new c,this.__handlerClick=q.bind(this),this.__handlerKeydown=I.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t)),this.moveModals(),this.setInitialState(),this.settings.setTabindex&&this.setTabindex(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.memory={},this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getModal=function(t){return F.call(this,t)},e.setTabindex=function(){return i("\n [data-"+this.settings.dataModal+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.setInitialState=function(){return V.call(this)},e.moveModals=function(t,e){return B.call(this,t,e)},e.open=function(t){return K.call(this,t)},e.close=function(t){return j.call(this,t)},t}(),R={autoInit:!1,dataPopover:"popover",dataTrigger:"popover-trigger",dataArrow:"popover-arrow",dataEventType:"popover-event",dataPlacement:"popover-placement",stateActive:"is-active",eventType:"click",eventListeners:!0,placement:"bottom-start"};function H(t){t.target.classList.remove(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","false"),t.popper.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]});var e=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[e].state="closed",t.trigger===this.memory.trigger&&(this.memory.trigger=null),t}function N(){var t=this;return this.collection.forEach(function(e){"opened"===e.state&&t.close(e)}),this.collection}function Q(t){var e=this;"opened"==t.state&&setTimeout(function(){var n=t.target.closest(":hover")===t.target||t.trigger.closest(":hover")===t.trigger,i=document.activeElement.closest("[data-"+e.settings.dataPopover+"]")===t.target||document.activeElement.closest("[data-"+e.settings.dataTrigger+"]")===t.trigger;return n||i||e.close(t),t},1)}function z(t){t.target.classList.contains(this.settings.stateActive)?this.close(t):(this.memory.trigger=t.trigger,this.open(t),J.call(this,t))}function U(t){var e=this;switch(t.key){case"Escape":return this.memory.trigger&&this.memory.trigger.focus(),void this.closeAll();case"Tab":return void this.collection.forEach(function(t){Q.call(e,t)});default:return}}function J(t){var e=this;document.addEventListener("click",function n(i){var r=i.target.closest("[data-"+e.settings.dataPopover+"], [data-"+e.settings.dataTrigger+"]");r===t.target||r===t.trigger?t.target.classList.contains(e.settings.stateActive)||this.removeEventListener("click",n):(t.target.classList.contains(e.settings.stateActive)&&e.close(t),this.removeEventListener("click",n))})}function X(t,e){var n=getComputedStyle(t),i={placement:e.placement,event:e.eventType,offset:0,"overflow-padding":0,"flip-padding":0,"arrow-element":"[data-"+e.dataArrow+"]","arrow-padding":0};for(var r in i){var s=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"),o=n.getPropertyValue("--"+s+"popover-"+r).trim();o&&(i[r]=o)}return i}function Y(t,e,n){return void 0===n&&(n=!1),t.hasAttribute("data-"+e)?t.getAttribute("data-"+e):n}function Z(t){var e,n="string"==typeof t?t.trim().split(" "):[t];switch(n.forEach(function(t,e){n[e]=parseInt(t,10)}),n.length){case 1:e=n[0];break;case 2:e={top:n[0],right:n[1],bottom:n[0],left:n[1]};break;case 3:e={top:n[0],right:n[1],bottom:n[2],left:n[1]};break;case 4:e={top:n[0],right:n[1],bottom:n[2],left:n[3]};break;default:e=!1}return e}function G(t){var e;t.target.classList.add(this.settings.stateActive),t.trigger.setAttribute("aria-expanded","true"),t.config=X(t.target,this.settings),t.popper.setOptions({placement:Y(t.target,this.settings.dataPlacement,t.config.placement),modifiers:[{name:"eventListeners",enabled:!0}].concat((e=t.config,[{name:"offset",options:{offset:[0,parseInt(e.offset,10)]}},{name:"preventOverflow",options:{padding:Z(e["overflow-padding"])}},{name:"flip",options:{padding:Z(e["flip-padding"])}},{name:"arrow",options:{element:e["arrow-element"],padding:Z(e["arrow-padding"])}}]))}),t.popper.update();var n=this.collection.findIndex(function(e){return e.target===t.target});return this.collection[n].state="opened",t}var $="top",tt="bottom",et="right",nt="left",it="auto",rt=[$,tt,et,nt],st="start",ot="end",at="viewport",ct="popper",lt=/*#__PURE__*/rt.reduce(function(t,e){return t.concat([e+"-"+st,e+"-"+ot])},[]),ut=/*#__PURE__*/[].concat(rt,[it]).reduce(function(t,e){return t.concat([e,e+"-"+st,e+"-"+ot])},[]),dt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ft(t){return t?(t.nodeName||"").toLowerCase():null}function ht(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function pt(t){return t instanceof ht(t).Element||t instanceof Element}function gt(t){return t instanceof ht(t).HTMLElement||t instanceof HTMLElement}function vt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ht(t).ShadowRoot||t instanceof ShadowRoot)}function mt(t){return t.split("-")[0]}var yt=Math.max,bt=Math.min,wt=Math.round;function Et(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),i=1,r=1;if(gt(t)&&e){var s=t.offsetHeight,o=t.offsetWidth;o>0&&(i=wt(n.width)/o||1),s>0&&(r=wt(n.height)/s||1)}return{width:n.width/i,height:n.height/r,top:n.top/r,right:n.right/i,bottom:n.bottom/r,left:n.left/i,x:n.left/i,y:n.top/r}}function xt(t){var e=Et(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function Lt(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&vt(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Ot(t){return ht(t).getComputedStyle(t)}function kt(t){return["table","td","th"].indexOf(ft(t))>=0}function _t(t){return((pt(t)?t.ownerDocument:t.document)||window.document).documentElement}function At(t){return"html"===ft(t)?t:t.assignedSlot||t.parentNode||(vt(t)?t.host:null)||_t(t)}function Pt(t){return gt(t)&&"fixed"!==Ot(t).position?t.offsetParent:null}function Ct(t){for(var e=ht(t),n=Pt(t);n&&kt(n)&&"static"===Ot(n).position;)n=Pt(n);return n&&("html"===ft(n)||"body"===ft(n)&&"static"===Ot(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&gt(t)&&"fixed"===Ot(t).position)return null;for(var n=At(t);gt(n)&&["html","body"].indexOf(ft(n))<0;){var i=Ot(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function St(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Tt(t,e,n){return yt(t,bt(e,n))}function Dt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Mt(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function jt(t){return t.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function It(t){var e,n=t.popper,i=t.popperRect,r=t.placement,s=t.variation,o=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=o.x,h=void 0===f?0:f,p=o.y,g=void 0===p?0:p,v="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var m=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),b=nt,w=$,E=window;if(l){var x=Ct(n),L="clientHeight",O="clientWidth";x===ht(n)&&"static"!==Ot(x=_t(n)).position&&"absolute"===a&&(L="scrollHeight",O="scrollWidth"),x=x,(r===$||(r===nt||r===et)&&s===ot)&&(w=tt,g-=(d&&E.visualViewport?E.visualViewport.height:x[L])-i.height,g*=c?1:-1),r!==nt&&(r!==$&&r!==tt||s!==ot)||(b=et,h-=(d&&E.visualViewport?E.visualViewport.width:x[O])-i.width,h*=c?1:-1)}var k,_=Object.assign({position:a},l&&qt),A=!0===u?function(t){var e=t.y,n=window.devicePixelRatio||1;return{x:wt(t.x*n)/n||0,y:wt(e*n)/n||0}}({x:h,y:g}):{x:h,y:g};return h=A.x,g=A.y,Object.assign({},_,c?((k={})[w]=y?"0":"",k[b]=m?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",k):((e={})[w]=y?g+"px":"",e[b]=m?h+"px":"",e.transform="",e))}var Ft={passive:!0},Bt={left:"right",right:"left",bottom:"top",top:"bottom"};function Vt(t){return t.replace(/left|right|bottom|top/g,function(t){return Bt[t]})}var Kt={start:"end",end:"start"};function Wt(t){return t.replace(/start|end/g,function(t){return Kt[t]})}function Rt(t){var e=ht(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ht(t){return Et(_t(t)).left+Rt(t).scrollLeft}function Nt(t){var e=Ot(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Qt(t){return["html","body","#document"].indexOf(ft(t))>=0?t.ownerDocument.body:gt(t)&&Nt(t)?t:Qt(At(t))}function zt(t,e){var n;void 0===e&&(e=[]);var i=Qt(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),s=ht(i),o=r?[s].concat(s.visualViewport||[],Nt(i)?i:[]):i,a=e.concat(o);return r?a:a.concat(zt(At(o)))}function Ut(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jt(t,e){return e===at?Ut(function(t){var e=ht(t),n=_t(t),i=e.visualViewport,r=n.clientWidth,s=n.clientHeight,o=0,a=0;return i&&(r=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=i.offsetLeft,a=i.offsetTop)),{width:r,height:s,x:o+Ht(t),y:a}}(t)):pt(e)?function(t){var e=Et(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Ut(function(t){var e,n=_t(t),i=Rt(t),r=null==(e=t.ownerDocument)?void 0:e.body,s=yt(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=yt(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Ht(t),c=-i.scrollTop;return"rtl"===Ot(r||n).direction&&(a+=yt(n.clientWidth,r?r.clientWidth:0)-s),{width:s,height:o,x:a,y:c}}(_t(t)))}function Xt(t){var e,n=t.reference,i=t.element,r=t.placement,s=r?mt(r):null,o=r?jt(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(s){case $:e={x:a,y:n.y-i.height};break;case tt:e={x:a,y:n.y+n.height};break;case et:e={x:n.x+n.width,y:c};break;case nt:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var l=s?St(s):null;if(null!=l){var u="y"===l?"height":"width";switch(o){case st:e[l]=e[l]-(n[u]/2-i[u]/2);break;case ot:e[l]=e[l]+(n[u]/2-i[u]/2)}}return e}function Yt(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.boundary,s=void 0===r?"clippingParents":r,o=e.rootBoundary,a=void 0===o?at:o,c=e.elementContext,l=void 0===c?ct:c,u=e.altBoundary,d=void 0!==u&&u,f=e.padding,h=void 0===f?0:f,p=Dt("number"!=typeof h?h:Mt(h,rt)),g=t.rects.popper,v=t.elements[d?l===ct?"reference":ct:l],m=function(t,e,n){var i="clippingParents"===e?function(t){var e=zt(At(t)),n=["absolute","fixed"].indexOf(Ot(t).position)>=0&&gt(t)?Ct(t):t;return pt(n)?e.filter(function(t){return pt(t)&&Lt(t,n)&&"body"!==ft(t)}):[]}(t):[].concat(e),r=[].concat(i,[n]),s=r.reduce(function(e,n){var i=Jt(t,n);return e.top=yt(i.top,e.top),e.right=bt(i.right,e.right),e.bottom=bt(i.bottom,e.bottom),e.left=yt(i.left,e.left),e},Jt(t,r[0]));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(pt(v)?v:v.contextElement||_t(t.elements.popper),s,a),y=Et(t.elements.reference),b=Xt({reference:y,element:g,strategy:"absolute",placement:i}),w=Ut(Object.assign({},g,b)),E=l===ct?w:y,x={top:m.top-E.top+p.top,bottom:E.bottom-m.bottom+p.bottom,left:m.left-E.left+p.left,right:E.right-m.right+p.right},L=t.modifiersData.offset;if(l===ct&&L){var O=L[i];Object.keys(x).forEach(function(t){var e=[et,tt].indexOf(t)>=0?1:-1,n=[$,tt].indexOf(t)>=0?"y":"x";x[t]+=O[n]*e})}return x}function Zt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,s=e.flipVariations,o=e.allowedAutoPlacements,a=void 0===o?ut:o,c=jt(e.placement),l=c?s?lt:lt.filter(function(t){return jt(t)===c}):rt,u=l.filter(function(t){return a.indexOf(t)>=0});0===u.length&&(u=l);var d=u.reduce(function(e,s){return e[s]=Yt(t,{placement:s,boundary:n,rootBoundary:i,padding:r})[mt(s)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}function Gt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function $t(t){return[$,et,tt,nt].some(function(e){return t[e]>=0})}function te(t,e,n){void 0===n&&(n=!1);var i,r,s=gt(e),o=gt(e)&&function(t){var e=t.getBoundingClientRect(),n=wt(e.width)/t.offsetWidth||1,i=wt(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=_t(e),c=Et(t,o),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&(("body"!==ft(e)||Nt(a))&&(l=(i=e)!==ht(i)&&gt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Rt(i)),gt(e)?((u=Et(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=Ht(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function ee(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var ne={placement:"bottom",modifiers:[],strategy:"absolute"};function ie(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function re(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?ne:i;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ne,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:pt(t)?zt(t):t.contextElement?zt(t.contextElement):[],popper:zt(e)};var o,l,f=function(t){var e=ee(t);return dt.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((o=[].concat(n,a.options.modifiers),l=o.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(l).map(function(t){return l[t]})));return a.orderedModifiers=f.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:u,options:void 0===e?{}:e});c.push(i||function(){})}}),u.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,n=t.popper;if(ie(e,n)){a.rects={reference:te(e,Ct(n),"fixed"===a.options.strategy),popper:xt(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],s=r.fn,o=r.options;"function"==typeof s&&(a=s({state:a,options:void 0===o?{}:o,name:r.name,instance:u})||a)}else a.reset=!1,i=-1}}},update:(s=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){d(),l=!0}};if(!ie(t,e))return u;function d(){c.forEach(function(t){return t()}),c=[]}return u.setOptions(i).then(function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)}),u}}var se=/*#__PURE__*/re({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,s=void 0===r||r,o=i.resize,a=void 0===o||o,c=ht(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&l.forEach(function(t){t.addEventListener("scroll",n.update,Ft)}),a&&c.addEventListener("resize",n.update,Ft),function(){s&&l.forEach(function(t){t.removeEventListener("scroll",n.update,Ft)}),a&&c.removeEventListener("resize",n.update,Ft)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=Xt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,s=n.adaptive,o=void 0===s||s,a=n.roundOffsets,c=void 0===a||a,l={placement:mt(e.placement),variation:jt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,It(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,It(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];gt(r)&&ft(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],r=e.attributes[t]||{},s=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});gt(i)&&ft(i)&&(Object.assign(i.style,s),Object.keys(r).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,s=ut.reduce(function(t,n){return t[n]=function(t,e,n){var i=mt(t),r=[nt,$].indexOf(i)>=0?-1:1,s="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*r,[nt,et].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}(n,e.rects,r),t},{}),o=s[e.placement],a=o.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=o.x,e.modifiersData.popperOffsets.y+=a),e.modifiersData[n]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0===o||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,v=e.options.placement,m=mt(v),y=c||(m!==v&&p?function(t){if(mt(t)===it)return[];var e=Vt(t);return[Wt(t),e,Wt(e)]}(v):[Vt(v)]),b=[v].concat(y).reduce(function(t,n){return t.concat(mt(n)===it?Zt(e,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)},[]),w=e.rects.reference,E=e.rects.popper,x=new Map,L=!0,O=b[0],k=0;k<b.length;k++){var _=b[k],A=mt(_),P=jt(_)===st,C=[$,tt].indexOf(A)>=0,S=C?"width":"height",T=Yt(e,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),D=C?P?et:nt:P?tt:$;w[S]>E[S]&&(D=Vt(D));var M=Vt(D),j=[];if(s&&j.push(T[A]<=0),a&&j.push(T[D]<=0,T[M]<=0),j.every(function(t){return t})){O=_,L=!1;break}x.set(_,j)}if(L)for(var q=function(t){var e=b.find(function(e){var n=x.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return O=e,"break"},I=p?3:1;I>0&&"break"!==q(I);I--);e.placement!==O&&(e.modifiersData[i]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,s=void 0===r||r,o=n.altAxis,a=void 0!==o&&o,c=n.tether,l=void 0===c||c,u=n.tetherOffset,d=void 0===u?0:u,f=Yt(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),h=mt(e.placement),p=jt(e.placement),g=!p,v=St(h),m="x"===v?"y":"x",y=e.modifiersData.popperOffsets,b=e.rects.reference,w=e.rects.popper,E="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,x="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),L=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,O={x:0,y:0};if(y){if(s){var k,_="y"===v?$:nt,A="y"===v?tt:et,P="y"===v?"height":"width",C=y[v],S=C+f[_],T=C-f[A],D=l?-w[P]/2:0,M=p===st?b[P]:w[P],j=p===st?-w[P]:-b[P],q=e.elements.arrow,I=l&&q?xt(q):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[_],V=F[A],K=Tt(0,b[P],I[P]),W=g?b[P]/2-D-K-B-x.mainAxis:M-K-B-x.mainAxis,R=g?-b[P]/2+D+K+V+x.mainAxis:j+K+V+x.mainAxis,H=e.elements.arrow&&Ct(e.elements.arrow),N=null!=(k=null==L?void 0:L[v])?k:0,Q=C+R-N,z=Tt(l?bt(S,C+W-N-(H?"y"===v?H.clientTop||0:H.clientLeft||0:0)):S,C,l?yt(T,Q):T);y[v]=z,O[v]=z-C}if(a){var U,J=y[m],X="y"===m?"height":"width",Y=J+f["x"===v?$:nt],Z=J-f["x"===v?tt:et],G=-1!==[$,nt].indexOf(h),it=null!=(U=null==L?void 0:L[m])?U:0,rt=G?Y:J-b[X]-w[X]-it+x.altAxis,ot=G?J+b[X]+w[X]-it-x.altAxis:Z,at=l&&G?function(t,e,n){var i=Tt(t,e,n);return i>n?n:i}(rt,J,ot):Tt(l?rt:Y,J,l?ot:Z);y[m]=at,O[m]=at-J}e.modifiersData[i]=O}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=mt(n.placement),c=St(a),l=[nt,et].indexOf(a)>=0?"height":"width";if(s&&o){var u=function(t,e){return Dt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Mt(t,rt))}(r.padding,n),d=xt(s),f="y"===c?$:nt,h="y"===c?tt:et,p=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],g=o[c]-n.rects.reference[c],v=Ct(s),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=m/2-d[l]/2+(p/2-g/2),b=Tt(u[f],y,m-d[l]-u[h]);n.modifiersData[i]=((e={})[c]=b,e.centerOffset=b-y,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&Lt(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,o=Yt(e,{elementContext:"reference"}),a=Yt(e,{altBoundary:!0}),c=Gt(o,i),l=Gt(a,r,s),u=$t(c),d=$t(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function oe(t,e){if(!e&&!(e=function(t,e){var n=t.getAttribute("data-"+e.dataTrigger).trim();return n?document.querySelector("[data-"+e.dataPopover+'="'+n+'"]'):!(!t.nextElementSibling||!t.nextElementSibling.hasAttribute("data-"+e.dataPopover))&&t.nextElementSibling}(t,this.settings)))return console.error("No popover associated with the provided trigger:",t),!1;var n,i=this.collection.findIndex(function(n){return n.trigger===t&&n.target===e});if(i>=0)n=this.collection[i];else{var r=se(t,e);n={state:"closed",trigger:t,target:e,popper:r,config:X(e,this.settings)},this.collection.push(n)}return ce.call(this,n),n.target.classList.contains(this.settings.stateActive)?(this.open(n),J.call(this,n)):this.close(n),n}function ae(t){var e=this.collection.findIndex(function(e){return e.trigger===t.trigger&&e.target===t.target});return e>=0&&("opened"===t.state&&this.close(t),t.popper.destroy(),le(t),this.collection.splice(e,1)),this.collection}function ce(t){return t.__eventListeners||("hover"===Y(t.target,this.settings.dataEventType,t.config.event)?(t.__eventListeners=[{el:["trigger"],type:["mouseenter","focus"],listener:G.bind(this,t)},{el:["trigger","target"],type:["mouseleave","focusout"],listener:Q.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})})):(t.__eventListeners=[{el:["trigger"],type:["click"],listener:z.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})}))),t}function le(t){return t.__eventListeners&&(t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].removeEventListener(i,e.listener,!1)})})}),delete t.__eventListeners),t}function ue(){var t=this;return document.querySelectorAll("[data-"+this.settings.dataTrigger+"]").forEach(function(e){t.register(e,!1)}),this.collection}function de(){for(;this.collection.length>0;)this.deregister(this.collection[0]);return this.collection}var fe=/*#__PURE__*/function(){function t(t){this.defaults=R,this.settings=v({},this.defaults,t),this.collection=[],this.memory={trigger:null},this.__handlerKeydown=U.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t)),this.registerCollection(),this.settings.eventListeners&&this.initEventListeners(!1)},e.destroy=function(){this.deregisterCollection(),this.settings.eventListeners&&this.destroyEventListeners(!1)},e.initEventListeners=function(t){var e=this;void 0===t&&(t=!0),t&&this.collection.forEach(function(t){ce.call(e,t)}),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(t){void 0===t&&(t=!0),t&&this.collection.forEach(function(t){le(t)}),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.register=function(t,e){return void 0===e&&(e=!1),oe.call(this,t,e)},e.deregister=function(t){return ae.call(this,t)},e.registerCollection=function(){return ue.call(this)},e.deregisterCollection=function(){return de.call(this)},e.open=function(t){return G.call(this,t)},e.close=function(t){return H.call(this,t)},e.closeAll=function(){return N.call(this)},t}();t.Checkbox=y,t.Drawer=D,t.Modal=W,t.Popover=fe,t.core=g});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t||self).vrembem={})}(this,function(t){var e=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?(e.inert=!0,e.setAttribute("aria-hidden",!0)):(e.inert=null,e.removeAttribute("aria-hidden"))})},n=function(t,e){e&&document.querySelectorAll(e).forEach(function(e){t?e.style.overflow="hidden":e.style.removeProperty("overflow")})},i=function(t){t&&document.querySelectorAll(t).forEach(function(t){t.setAttribute("tabindex","-1")})},r=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).add.apply(n,[].slice.call(e,1))})},o=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'],s=function(t,e){var n=t.querySelector("[data-"+e.dataFocus+"]");if(n)n.focus();else{var i=t.querySelector('[tabindex="-1"]');i&&i.focus()}},a=function(t){void 0===t&&(t=null),t&&t.memory&&t.memory.trigger&&(t.memory.trigger.focus(),t.memory.trigger=null)},c=/*#__PURE__*/function(){function t(){this.target=null,this.__handlerFocusTrap=this.handlerFocusTrap.bind(this)}var e=t.prototype;return e.init=function(t){this.target=t,this.inner=this.target.querySelector('[tabindex="-1"]'),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):this.target.addEventListener("keydown",this.handlerFocusLock)},e.destroy=function(){this.target&&(this.inner=null,this.focusable=null,this.focusableFirst=null,this.focusableLast=null,this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.target=null)},e.refresh=function(){this.target&&(this.target.removeEventListener("keydown",this.__handlerFocusTrap),this.target.removeEventListener("keydown",this.handlerFocusLock),this.focusable=this.getFocusable(),this.focusable.length?(this.focusableFirst=this.focusable[0],this.focusableLast=this.focusable[this.focusable.length-1],this.target.addEventListener("keydown",this.__handlerFocusTrap)):(this.focusableFirst=null,this.focusableLast=null,this.target.addEventListener("keydown",this.handlerFocusLock)))},e.handlerFocusTrap=function(t){("Tab"===t.key||9===t.keyCode)&&(t.shiftKey?document.activeElement!==this.focusableFirst&&document.activeElement!==this.inner||(this.focusableLast.focus(),t.preventDefault()):document.activeElement!==this.focusableLast&&document.activeElement!==this.inner||(this.focusableFirst.focus(),t.preventDefault()))},e.handlerFocusLock=function(t){("Tab"===t.key||9===t.keyCode)&&t.preventDefault()},e.getFocusable=function(){var t=[],e=document.activeElement,n=this.inner?this.inner.scrollTop:0;return this.target.querySelectorAll(o.join(",")).forEach(function(e){e.focus(),e===document.activeElement&&t.push(e)}),this.inner&&(this.inner.scrollTop=n),e.focus(),t},t}(),l=function(t,e){return void 0===e&&(e=0),"string"!=typeof t?t:e?document.querySelector(t):document.querySelectorAll(t)},u=function(t){return t=[].slice.call(t=t.forEach?t:[t]),[].slice.call(arguments,1).some(function(e){return t.some(function(t){if(t.classList.contains(e))return!0})})};function d(t,e,n){if(void 0===n&&(n=!1),n){var i=l(t);if(!i.length)throw new Error('Move target element "'+t+'" not found!');var r=l(n,1);if(!r)throw new Error('Move reference element "'+n+'" not found!');i.forEach(function(t){switch(e){case"after":return r.after(t),{ref:r,el:t,type:e};case"before":return r.before(t),{ref:r,el:t,type:e};case"append":return r.append(t),{ref:r,el:t,type:e};case"prepend":return r.prepend(t),{ref:r,el:t,type:e};default:throw new Error('Move type "'+e+'" does not exist!')}})}}var f=function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){var n;(n=t.classList).remove.apply(n,[].slice.call(e,1))})},h=function(t,e){return new Promise(function(n){e.transition?(t.classList.remove(e.stateClosed),t.classList.add(e.stateOpening),t.addEventListener("transitionend",function i(){t.classList.add(e.stateOpened),t.classList.remove(e.stateOpening),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateOpened),t.classList.remove(e.stateClosed),n(t))})},p=function(t,e){return new Promise(function(n){e.transition?(t.classList.add(e.stateClosing),t.classList.remove(e.stateOpened),t.addEventListener("transitionend",function i(){t.classList.remove(e.stateClosing),t.classList.add(e.stateClosed),n(t),this.removeEventListener("transitionend",i)})):(t.classList.add(e.stateClosed),t.classList.remove(e.stateOpened),n(t))})},g={__proto__:null,setInert:e,setOverflowHidden:n,setTabindex:i,addClass:r,camelCase:function(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})},focusTarget:s,focusTrigger:a,FocusTrap:c,getElement:l,hasClass:u,hyphenCase:function(t){return t.replace(/([a-z][A-Z])/g,function(t){return t[0]+"-"+t[1].toLowerCase()})},moveElement:d,removeClass:f,toggleClass:function(t){var e=arguments;(t=t.forEach?t:[t]).forEach(function(t){[].slice.call(e,1).forEach(function(e){t.classList.toggle(e)})})},openTransition:h,closeTransition:p};function v(){return(v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var y={autoInit:!1,stateAttr:"aria-checked",stateValue:"mixed"},b=/*#__PURE__*/function(){function t(t){this.defaults=y,this.settings=v({},this.defaults,t),this.__handlerClick=this.handlerClick.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t));var e=document.querySelectorAll("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');this.setIndeterminate(e),document.addEventListener("click",this.__handlerClick,!1)},e.destroy=function(){document.removeEventListener("click",this.__handlerClick,!1)},e.handlerClick=function(t){var e=t.target.closest("["+this.settings.stateAttr+'="'+this.settings.stateValue+'"]');e&&(this.removeAriaState(e),this.setIndeterminate(e))},e.setAriaState=function(t,e){var n=this;void 0===e&&(e=this.settings.stateValue),(t=t.forEach?t:[t]).forEach(function(t){t.setAttribute(n.settings.stateAttr,e)})},e.removeAriaState=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.removeAttribute(e.settings.stateAttr)})},e.setIndeterminate=function(t){var e=this;(t=t.forEach?t:[t]).forEach(function(t){t.indeterminate=!!t.hasAttribute(e.settings.stateAttr)})},t}(),w={autoInit:!1,dataDrawer:"drawer",dataDialog:"drawer-dialog",dataToggle:"drawer-toggle",dataOpen:"drawer-open",dataClose:"drawer-close",dataBreakpoint:"drawer-breakpoint",dataFocus:"drawer-focus",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",classModal:"drawer_modal",selectorInert:null,selectorOverflow:null,breakpoints:null,customEventPrefix:"drawer:",eventListeners:!0,stateSave:!0,stateKey:"DrawerState",setTabindex:!0,transition:!0},E=/*#__PURE__*/function(){function t(t){this.mediaQueryLists=[],this.parent=t,this.prefix=this.getVariablePrefix(),this.__check=this.check.bind(this)}var e=t.prototype;return e.init=function(){var t=this;document.querySelectorAll("[data-"+this.parent.settings.dataBreakpoint+"]").forEach(function(e){var n=e.getAttribute("data-"+t.parent.settings.dataDrawer),i=e.getAttribute("data-"+t.parent.settings.dataBreakpoint),r=t.getBreakpoint(i),o=window.matchMedia("(min-width:"+r+")");t.match(o,e),"function"==typeof o.addEventListener?o.addEventListener("change",t.__check):o.addListener(t.__check),t.mediaQueryLists.push({mql:o,drawer:n})})},e.destroy=function(){var t=this;this.mediaQueryLists&&this.mediaQueryLists.length&&this.mediaQueryLists.forEach(function(e){e.mql.removeListener(t.__check)}),this.mediaQueryLists=null},e.check=function(t){var e=this;void 0===t&&(t=null),this.mediaQueryLists&&this.mediaQueryLists.length&&(this.mediaQueryLists.forEach(function(n){if(!t||t.media==n.mql.media){var i=document.querySelector("[data-"+e.parent.settings.dataDrawer+'="'+n.drawer+'"]');i&&e.match(n.mql,i)}}),document.dispatchEvent(new CustomEvent(this.parent.settings.customEventPrefix+"breakpoint",{bubbles:!0})))},e.match=function(t,e){t.matches?this.parent.switchToDefault(e):this.parent.switchToModal(e)},e.getBreakpoint=function(t){var e=t;return this.parent.settings.breakpoints&&this.parent.settings.breakpoints[t]?e=this.parent.settings.breakpoints[t]:getComputedStyle(document.body).getPropertyValue(this.prefix+t)&&(e=getComputedStyle(document.body).getPropertyValue(this.prefix+t)),e},e.getVariablePrefix=function(){var t="--";return(t+=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"))+"breakpoint-"},t}();function x(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataDrawer+'="'+t+'"]')}function O(t){return Promise.reject(new Error('Did not find drawer with key: "'+t+'"'))}var L=function(t){try{var i=this,r=i.getDrawer(t);return r?u(r,i.settings.stateOpened)?(i.working=!0,u(r,i.settings.classModal)&&(e(!1,i.settings.selectorInert),n(!1,i.settings.selectorOverflow)),Promise.resolve(p(r,i.settings)).then(function(){return i.stateSave(r),a(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r):Promise.resolve(O(t))}catch(t){return Promise.reject(t)}};function k(t){if(!this.working){var e=t.target.closest("[data-"+this.settings.dataToggle+"]");if(e){var n=e.getAttribute("data-"+this.settings.dataToggle);return this.memory.trigger=e,this.toggle(n),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataOpen+"]")){var i=e.getAttribute("data-"+this.settings.dataOpen);return this.memory.trigger=e,this.open(i),void t.preventDefault()}if(e=t.target.closest("[data-"+this.settings.dataClose+"]")){var r=e.getAttribute("data-"+this.settings.dataClose);if(r)this.memory.trigger=e,this.close(r);else{var o=t.target.closest("[data-"+this.settings.dataDrawer+"]");o&&this.close(o)}t.preventDefault()}else t.target.hasAttribute("data-"+this.settings.dataDrawer)&&this.close(t.target)}}function _(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("."+this.settings.classModal+"."+this.settings.stateOpened);e&&this.close(e)}}var A=function(t){try{var i=this,r=i.getDrawer(t);if(!r)return Promise.resolve(O(t));if(u(r,i.settings.stateOpened))return s(r,i.settings),Promise.resolve(r);i.working=!0;var o=u(r,i.settings.classModal);return o&&n(!0,i.settings.selectorOverflow),Promise.resolve(h(r,i.settings)).then(function(){return i.stateSave(r),o&&(i.focusTrap.init(r),e(!0,i.settings.selectorInert)),s(r,i.settings),r.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})}catch(t){return Promise.reject(t)}};function C(t,e){if(!e.stateSave)return P(e);var n=localStorage.getItem(e.stateKey)?JSON.parse(localStorage.getItem(e.stateKey)):{};return(t?[t]:document.querySelectorAll("[data-"+e.dataDrawer+"]")).forEach(function(t){if(!u(t,e.classModal)){var i=t.getAttribute("data-"+e.dataDrawer);n[i]=u(t,e.stateOpened)?e.stateOpened:e.stateClosed}}),localStorage.setItem(e.stateKey,JSON.stringify(n)),n}function P(t){return localStorage.getItem(t.stateKey)&&localStorage.removeItem(t.stateKey),{}}var S=function(t){try{var i=this,o=i.getDrawer(t);return o?u(o,i.settings.classModal)?(e(!1,i.settings.selectorInert),n(!1,i.settings.selectorOverflow),f(o,i.settings.classModal),i.focusTrap.destroy(),t=o.getAttribute("data-"+i.settings.dataDrawer),i.state[t]==i.settings.stateOpened&&(r(o,i.settings.stateOpened),f(o,i.settings.stateClosed)),o.dispatchEvent(new CustomEvent(i.settings.customEventPrefix+"toDefault",{bubbles:!0})),Promise.resolve(o)):Promise.resolve():Promise.resolve(O(t))}catch(t){return Promise.reject(t)}},D=function(t){try{var e=this,n=e.getDrawer(t);return n?u(n,e.settings.classModal)?Promise.resolve():(r(n,e.settings.classModal),r(n,e.settings.stateClosed),f(n,e.settings.stateOpened),n.dispatchEvent(new CustomEvent(e.settings.customEventPrefix+"toModal",{bubbles:!0})),Promise.resolve(n)):Promise.resolve(O(t))}catch(t){return Promise.reject(t)}},T=function(t){try{var e=this,n=e.getDrawer(t);if(!n)return Promise.resolve(O(t));var i=!u(n,e.settings.stateOpened);return Promise.resolve(i?e.open(n):e.close(n))}catch(t){return Promise.reject(t)}},j=/*#__PURE__*/function(){function t(t){this.defaults=w,this.settings=v({},this.defaults,t),this.working=!1,this.memory={},this.state={},this.focusTrap=new c,this.breakpoint=new E(this),this.__handlerClick=k.bind(this),this.__handlerKeydown=_.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t)),this.stateSet(),this.settings.setTabindex&&this.setTabindex(),this.breakpoint.init(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.breakpoint.destroy(),this.memory={},this.state={},localStorage.removeItem(this.settings.stateKey),this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getDrawer=function(t){return x.call(this,t)},e.setTabindex=function(){return i("\n [data-"+this.settings.dataDrawer+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.stateSet=function(){this.state=function(t){if(!t.stateSave)return P(t);var e=localStorage.getItem(t.stateKey);if(!e||e&&0===Object.keys(JSON.parse(e)).length)return C(null,t);var n=JSON.parse(localStorage.getItem(t.stateKey));return Object.keys(n).forEach(function(e){var i=document.querySelector("[data-"+t.dataDrawer+'="'+e+'"]');i&&(n[e]==t.stateOpened?r(i,t.stateOpened):f(i,t.stateOpened))}),n}(this.settings)},e.stateSave=function(t){void 0===t&&(t=null),this.state=C(t,this.settings)},e.stateClear=function(){this.state=P(this.settings)},e.switchToDefault=function(t){return S.call(this,t)},e.switchToModal=function(t){return D.call(this,t)},e.toggle=function(t){return T.call(this,t)},e.open=function(t){return A.call(this,t)},e.close=function(t){return L.call(this,t)},t}(),M={autoInit:!1,dataModal:"modal",dataDialog:"modal-dialog",dataOpen:"modal-open",dataClose:"modal-close",dataFocus:"modal-focus",dataRequired:"modal-required",dataConfig:"modal-config",stateOpened:"is-opened",stateOpening:"is-opening",stateClosing:"is-closing",stateClosed:"is-closed",selectorInert:null,selectorOverflow:"body",customEventPrefix:"modal:",eventListeners:!0,moveModals:{ref:null,type:null},setTabindex:!0,transition:!0};function q(t){var e=t.getAttribute("data-"+this.settings.dataConfig);if(e){var n=JSON.parse(e);return v({},this.settings,n)}return this.settings}function I(t){return"string"!=typeof t?t:document.querySelector("[data-"+this.settings.dataModal+'="'+t+'"]')}function F(t,e){void 0===t&&(t=this.settings.moveModals.type),void 0===e&&(e=this.settings.moveModals.ref);var n=document.querySelectorAll("[data-"+this.settings.dataModal+"]");n.length&&d(n,t,e)}var B=function(t){void 0===t&&(t=!0);try{var i=this,r=document.querySelector("[data-"+i.settings.dataModal+"]."+i.settings.stateOpened);if(r){i.working=!0;var o=q.call(i,r);return e(!1,o.selectorInert),n(!1,o.selectorOverflow),Promise.resolve(p(r,o)).then(function(){return t&&a(i),i.focusTrap.destroy(),r.dispatchEvent(new CustomEvent(o.customEventPrefix+"closed",{detail:i,bubbles:!0})),i.working=!1,r})}return Promise.resolve(r)}catch(t){return Promise.reject(t)}},V=function(t){try{var e,n=function(n){return e?n:t.target.closest("[data-"+i.settings.dataClose+"]")?(t.preventDefault(),void i.close()):void(t.target.hasAttribute("data-"+i.settings.dataModal)&&!t.target.hasAttribute("data-"+i.settings.dataRequired)&&i.close())},i=this;if(i.working)return Promise.resolve();var r=t.target.closest("[data-"+i.settings.dataOpen+"]"),o=function(){if(r){t.preventDefault();var n=r.getAttribute("data-"+i.settings.dataOpen),o=t.target.closest("[data-"+i.settings.dataModal+"]");return o||(i.memory.trigger=r),Promise.resolve(i.close(!o)).then(function(){i.open(n),e=1})}}();return Promise.resolve(o&&o.then?o.then(n):n(o))}catch(t){return Promise.reject(t)}};function K(t){if(!this.working&&"Escape"===t.key){var e=document.querySelector("[data-"+this.settings.dataModal+"]."+this.settings.stateOpened);e&&!e.hasAttribute("data-"+this.settings.dataRequired)&&this.close()}}function R(){var t=this;document.querySelectorAll("[data-"+this.settings.dataModal+"]").forEach(function(i){i.classList.contains(t.settings.stateOpened)&&(e(!1,t.settings.selectorInert),n(!1,t.settings.selectorOverflow),a(t),t.focusTrap.destroy()),f(i,t.settings.stateOpened,t.settings.stateOpening,t.settings.stateClosing),r(i,t.settings.stateClosed)})}var W=function(t){try{var i=this,r=I.call(i,t);if(!r)return Promise.resolve(Promise.reject(new Error('Did not find modal with key: "'+t+'"')));var o=q.call(i,r);return u(r,o.stateClosed)?(i.working=!0,n(!0,o.selectorOverflow),Promise.resolve(h(r,o)).then(function(){return i.focusTrap.init(r),s(r,o),e(!0,o.selectorInert),r.dispatchEvent(new CustomEvent(o.customEventPrefix+"opened",{detail:i,bubbles:!0})),i.working=!1,r})):Promise.resolve(r)}catch(t){return Promise.reject(t)}},H=/*#__PURE__*/function(){function t(t){this.defaults=M,this.settings=v({},this.defaults,t),this.working=!1,this.memory={},this.focusTrap=new c,this.__handlerClick=V.bind(this),this.__handlerKeydown=K.bind(this),this.settings.autoInit&&this.init()}var e=t.prototype;return e.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t)),this.moveModals(),this.setInitialState(),this.settings.setTabindex&&this.setTabindex(),this.settings.eventListeners&&this.initEventListeners()},e.destroy=function(){this.memory={},this.settings.eventListeners&&this.destroyEventListeners()},e.initEventListeners=function(){document.addEventListener("click",this.__handlerClick,!1),document.addEventListener("touchend",this.__handlerClick,!1),document.addEventListener("keydown",this.__handlerKeydown,!1)},e.destroyEventListeners=function(){document.removeEventListener("click",this.__handlerClick,!1),document.removeEventListener("touchend",this.__handlerClick,!1),document.removeEventListener("keydown",this.__handlerKeydown,!1)},e.getModal=function(t){return I.call(this,t)},e.setTabindex=function(){return i("\n [data-"+this.settings.dataModal+"]\n [data-"+this.settings.dataDialog+"]\n ")},e.setInitialState=function(){return R.call(this)},e.moveModals=function(t,e){return F.call(this,t,e)},e.open=function(t){return W.call(this,t)},e.close=function(t){return B.call(this,t)},t}(),N=/*#__PURE__*/function(){function t(){this.collection=[]}var e=t.prototype;return e.register=function(t){return this.deregister(t),this.collection.push(t),this.collection},e.deregister=function(t){var e=this.collection.findIndex(function(e){return e===t});if(e>=0){var n=this.collection[e];Object.getOwnPropertyNames(n).forEach(function(t){delete n[t]}),this.collection.splice(e,1)}return this.collection},e.registerCollection=function(t){var e=this;return t.forEach(function(t){e.register(t)}),this.collection},e.deregisterCollection=function(){for(;this.collection.length>0;)this.deregister(this.collection[0]);return this.collection},e.get=function(t,e){return void 0===e&&(e="id"),this.collection.find(function(n){return n[e]===t})||null},t}(),Q={autoInit:!1,selectorPopover:".popover",selectorArrow:".popover__arrow",stateActive:"is-active",eventListeners:!0,eventType:"click",placement:"bottom"};function z(t){return t.target.classList.remove(this.settings.stateActive),t.trigger.hasAttribute("aria-controls")&&t.trigger.setAttribute("aria-expanded","false"),t.popper.setOptions({modifiers:[{name:"eventListeners",enabled:!1}]}),t.state="closed",t.trigger===this.memory.trigger&&(this.memory.trigger=null),t}function J(){return this.collection.forEach(function(t){"opened"===t.state&&t.close()}),this.collection}function U(t){"opened"==t.state&&setTimeout(function(){var e=t.target.closest(":hover")===t.target||t.trigger.closest(":hover")===t.trigger,n=document.activeElement.closest("#"+t.id+', [aria-controls="'+t.id+'"]');return e||n||t.close(),t},1)}function X(t){t.target.classList.contains(this.settings.stateActive)?t.close():(this.memory.trigger=t.trigger,t.open(),Z.call(this,t))}function Y(t){var e=this;switch(t.key){case"Escape":return this.memory.trigger&&this.memory.trigger.focus(),void J.call(this);case"Tab":return void this.collection.forEach(function(t){U.call(e,t)});default:return}}function Z(t){var e=this;document.addEventListener("click",function n(i){i.target.closest("#"+t.id+', [aria-controls="'+t.id+'"]')?t.target&&!t.target.classList.contains(e.settings.stateActive)&&this.removeEventListener("click",n):(t.target&&t.target.classList.contains(e.settings.stateActive)&&t.close(),this.removeEventListener("click",n))})}function G(t,e){var n=getComputedStyle(t),i={placement:e.placement,event:e.eventType,offset:0,"overflow-padding":0,"flip-padding":0,"arrow-element":e.selectorArrow,"arrow-padding":0};for(var r in i){var o=getComputedStyle(document.body).getPropertyValue("--vrembem-variable-prefix"),s=n.getPropertyValue("--"+o+"popover-"+r).trim();s&&(i[r]=s)}return i}function $(t){var e,n="string"==typeof t?t.trim().split(" "):[t];switch(n.forEach(function(t,e){n[e]=parseInt(t,10)}),n.length){case 1:e=n[0];break;case 2:e={top:n[0],right:n[1],bottom:n[0],left:n[1]};break;case 3:e={top:n[0],right:n[1],bottom:n[2],left:n[1]};break;case 4:e={top:n[0],right:n[1],bottom:n[2],left:n[3]};break;default:e=!1}return e}function tt(t){return"string"==typeof t?t:"function"==typeof t.hasAttribute?t.hasAttribute("aria-controls")?t.getAttribute("aria-controls"):t.hasAttribute("aria-describedby")?t.getAttribute("aria-describedby"):!!t.closest(this.settings.selectorPopover)&&t.id:!!t.id&&t.id}function et(t){var e=tt.call(this,t);if(e){var n=document.querySelector('[aria-controls="'+e+'"]')||document.querySelector('[aria-describedby="'+e+'"]'),i=document.querySelector("#"+e);return n||i?n?i||console.error("No popover associated with the provided popover trigger:",n):console.error("No popover trigger associated with the provided popover:",i):console.error("No popover elements found using the provided ID:",e),!(!n||!i)&&{trigger:n,target:i}}return console.error("Could not resolve the popover ID:",t),!1}var nt="top",it="bottom",rt="right",ot="left",st="auto",at=[nt,it,rt,ot],ct="start",lt="end",ut="viewport",dt="popper",ft=/*#__PURE__*/at.reduce(function(t,e){return t.concat([e+"-"+ct,e+"-"+lt])},[]),ht=/*#__PURE__*/[].concat(at,[st]).reduce(function(t,e){return t.concat([e,e+"-"+ct,e+"-"+lt])},[]),pt=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function gt(t){return t?(t.nodeName||"").toLowerCase():null}function vt(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function mt(t){return t instanceof vt(t).Element||t instanceof Element}function yt(t){return t instanceof vt(t).HTMLElement||t instanceof HTMLElement}function bt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof vt(t).ShadowRoot||t instanceof ShadowRoot)}function wt(t){return t.split("-")[0]}var Et=Math.max,xt=Math.min,Ot=Math.round;function Lt(t,e){void 0===e&&(e=!1);var n=t.getBoundingClientRect(),i=1,r=1;if(yt(t)&&e){var o=t.offsetHeight,s=t.offsetWidth;s>0&&(i=Ot(n.width)/s||1),o>0&&(r=Ot(n.height)/o||1)}return{width:n.width/i,height:n.height/r,top:n.top/r,right:n.right/i,bottom:n.bottom/r,left:n.left/i,x:n.left/i,y:n.top/r}}function kt(t){var e=Lt(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function _t(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&bt(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function At(t){return vt(t).getComputedStyle(t)}function Ct(t){return["table","td","th"].indexOf(gt(t))>=0}function Pt(t){return((mt(t)?t.ownerDocument:t.document)||window.document).documentElement}function St(t){return"html"===gt(t)?t:t.assignedSlot||t.parentNode||(bt(t)?t.host:null)||Pt(t)}function Dt(t){return yt(t)&&"fixed"!==At(t).position?t.offsetParent:null}function Tt(t){for(var e=vt(t),n=Dt(t);n&&Ct(n)&&"static"===At(n).position;)n=Dt(n);return n&&("html"===gt(n)||"body"===gt(n)&&"static"===At(n).position)?e:n||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&yt(t)&&"fixed"===At(t).position)return null;for(var n=St(t);yt(n)&&["html","body"].indexOf(gt(n))<0;){var i=At(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function jt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Mt(t,e,n){return Et(t,xt(e,n))}function qt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function It(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function Ft(t){return t.split("-")[1]}var Bt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,d=t.isFixed,f=s.x,h=void 0===f?0:f,p=s.y,g=void 0===p?0:p,v="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var m=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=ot,w=nt,E=window;if(l){var x=Tt(n),O="clientHeight",L="clientWidth";x===vt(n)&&"static"!==At(x=Pt(n)).position&&"absolute"===a&&(O="scrollHeight",L="scrollWidth"),x=x,(r===nt||(r===ot||r===rt)&&o===lt)&&(w=it,g-=(d&&E.visualViewport?E.visualViewport.height:x[O])-i.height,g*=c?1:-1),r!==ot&&(r!==nt&&r!==it||o!==lt)||(b=rt,h-=(d&&E.visualViewport?E.visualViewport.width:x[L])-i.width,h*=c?1:-1)}var k,_=Object.assign({position:a},l&&Bt),A=!0===u?function(t){var e=t.y,n=window.devicePixelRatio||1;return{x:Ot(t.x*n)/n||0,y:Ot(e*n)/n||0}}({x:h,y:g}):{x:h,y:g};return h=A.x,g=A.y,Object.assign({},_,c?((k={})[w]=y?"0":"",k[b]=m?"0":"",k.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",k):((e={})[w]=y?g+"px":"",e[b]=m?h+"px":"",e.transform="",e))}var Kt={passive:!0},Rt={left:"right",right:"left",bottom:"top",top:"bottom"};function Wt(t){return t.replace(/left|right|bottom|top/g,function(t){return Rt[t]})}var Ht={start:"end",end:"start"};function Nt(t){return t.replace(/start|end/g,function(t){return Ht[t]})}function Qt(t){var e=vt(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function zt(t){return Lt(Pt(t)).left+Qt(t).scrollLeft}function Jt(t){var e=At(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function Ut(t){return["html","body","#document"].indexOf(gt(t))>=0?t.ownerDocument.body:yt(t)&&Jt(t)?t:Ut(St(t))}function Xt(t,e){var n;void 0===e&&(e=[]);var i=Ut(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=vt(i),s=r?[o].concat(o.visualViewport||[],Jt(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(Xt(St(s)))}function Yt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Zt(t,e){return e===ut?Yt(function(t){var e=vt(t),n=Pt(t),i=e.visualViewport,r=n.clientWidth,o=n.clientHeight,s=0,a=0;return i&&(r=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,a=i.offsetTop)),{width:r,height:o,x:s+zt(t),y:a}}(t)):mt(e)?function(t){var e=Lt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Yt(function(t){var e,n=Pt(t),i=Qt(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=Et(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=Et(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+zt(t),c=-i.scrollTop;return"rtl"===At(r||n).direction&&(a+=Et(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}(Pt(t)))}function Gt(t){var e,n=t.reference,i=t.element,r=t.placement,o=r?wt(r):null,s=r?Ft(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(o){case nt:e={x:a,y:n.y-i.height};break;case it:e={x:a,y:n.y+n.height};break;case rt:e={x:n.x+n.width,y:c};break;case ot:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var l=o?jt(o):null;if(null!=l){var u="y"===l?"height":"width";switch(s){case ct:e[l]=e[l]-(n[u]/2-i[u]/2);break;case lt:e[l]=e[l]+(n[u]/2-i[u]/2)}}return e}function $t(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.boundary,o=void 0===r?"clippingParents":r,s=e.rootBoundary,a=void 0===s?ut:s,c=e.elementContext,l=void 0===c?dt:c,u=e.altBoundary,d=void 0!==u&&u,f=e.padding,h=void 0===f?0:f,p=qt("number"!=typeof h?h:It(h,at)),g=t.rects.popper,v=t.elements[d?l===dt?"reference":dt:l],m=function(t,e,n){var i="clippingParents"===e?function(t){var e=Xt(St(t)),n=["absolute","fixed"].indexOf(At(t).position)>=0&&yt(t)?Tt(t):t;return mt(n)?e.filter(function(t){return mt(t)&&_t(t,n)&&"body"!==gt(t)}):[]}(t):[].concat(e),r=[].concat(i,[n]),o=r.reduce(function(e,n){var i=Zt(t,n);return e.top=Et(i.top,e.top),e.right=xt(i.right,e.right),e.bottom=xt(i.bottom,e.bottom),e.left=Et(i.left,e.left),e},Zt(t,r[0]));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}(mt(v)?v:v.contextElement||Pt(t.elements.popper),o,a),y=Lt(t.elements.reference),b=Gt({reference:y,element:g,strategy:"absolute",placement:i}),w=Yt(Object.assign({},g,b)),E=l===dt?w:y,x={top:m.top-E.top+p.top,bottom:E.bottom-m.bottom+p.bottom,left:m.left-E.left+p.left,right:E.right-m.right+p.right},O=t.modifiersData.offset;if(l===dt&&O){var L=O[i];Object.keys(x).forEach(function(t){var e=[rt,it].indexOf(t)>=0?1:-1,n=[nt,it].indexOf(t)>=0?"y":"x";x[t]+=L[n]*e})}return x}function te(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,s=e.allowedAutoPlacements,a=void 0===s?ht:s,c=Ft(e.placement),l=c?o?ft:ft.filter(function(t){return Ft(t)===c}):at,u=l.filter(function(t){return a.indexOf(t)>=0});0===u.length&&(u=l);var d=u.reduce(function(e,o){return e[o]=$t(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[wt(o)],e},{});return Object.keys(d).sort(function(t,e){return d[t]-d[e]})}function ee(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function ne(t){return[nt,rt,it,ot].some(function(e){return t[e]>=0})}function ie(t,e,n){void 0===n&&(n=!1);var i,r,o=yt(e),s=yt(e)&&function(t){var e=t.getBoundingClientRect(),n=Ot(e.width)/t.offsetWidth||1,i=Ot(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=Pt(e),c=Lt(t,s),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==gt(e)||Jt(a))&&(l=(i=e)!==vt(i)&&yt(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Qt(i)),yt(e)?((u=Lt(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=zt(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function re(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function se(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function ae(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?oe:i;return function(t,e,i){void 0===i&&(i=r);var o,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},c=[],l=!1,u={state:a,setOptions:function(i){var o="function"==typeof i?i(a.options):i;d(),a.options=Object.assign({},r,a.options,o),a.scrollParents={reference:mt(t)?Xt(t):t.contextElement?Xt(t.contextElement):[],popper:Xt(e)};var s,l,f=function(t){var e=re(t);return pt.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[])}((s=[].concat(n,a.options.modifiers),l=s.reduce(function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t},{}),Object.keys(l).map(function(t){return l[t]})));return a.orderedModifiers=f.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:a,name:t.name,instance:u,options:void 0===e?{}:e});c.push(i||function(){})}}),u.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,n=t.popper;if(se(e,n)){a.rects={reference:ie(e,Tt(n),"fixed"===a.options.strategy),popper:kt(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var i=0;i<a.orderedModifiers.length;i++)if(!0!==a.reset){var r=a.orderedModifiers[i],o=r.fn,s=r.options;"function"==typeof o&&(a=o({state:a,options:void 0===s?{}:s,name:r.name,instance:u})||a)}else a.reset=!1,i=-1}}},update:(o=function(){return new Promise(function(t){u.forceUpdate(),t(a)})},function(){return s||(s=new Promise(function(t){Promise.resolve().then(function(){s=void 0,t(o())})})),s}),destroy:function(){d(),l=!0}};if(!se(t,e))return u;function d(){c.forEach(function(t){return t()}),c=[]}return u.setOptions(i).then(function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)}),u}}var ce=/*#__PURE__*/ae({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,s=i.resize,a=void 0===s||s,c=vt(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&l.forEach(function(t){t.addEventListener("scroll",n.update,Kt)}),a&&c.addEventListener("resize",n.update,Kt),function(){o&&l.forEach(function(t){t.removeEventListener("scroll",n.update,Kt)}),a&&c.removeEventListener("resize",n.update,Kt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=Gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,s=void 0===o||o,a=n.roundOffsets,c=void 0===a||a,l={placement:wt(e.placement),variation:Ft(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Vt(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:c})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Vt(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];yt(r)&&gt(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});yt(i)&&gt(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=ht.reduce(function(t,n){return t[n]=function(t,e,n){var i=wt(t),r=[ot,nt].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[ot,rt].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,r),t},{}),s=o[e.placement],a=s.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=s.x,e.modifiersData.popperOffsets.y+=a),e.modifiersData[n]=o}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,v=e.options.placement,m=wt(v),y=c||(m!==v&&p?function(t){if(wt(t)===st)return[];var e=Wt(t);return[Nt(t),e,Nt(e)]}(v):[Wt(v)]),b=[v].concat(y).reduce(function(t,n){return t.concat(wt(n)===st?te(e,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)},[]),w=e.rects.reference,E=e.rects.popper,x=new Map,O=!0,L=b[0],k=0;k<b.length;k++){var _=b[k],A=wt(_),C=Ft(_)===ct,P=[nt,it].indexOf(A)>=0,S=P?"width":"height",D=$t(e,{placement:_,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),T=P?C?rt:ot:C?it:nt;w[S]>E[S]&&(T=Wt(T));var j=Wt(T),M=[];if(o&&M.push(D[A]<=0),a&&M.push(D[T]<=0,D[j]<=0),M.every(function(t){return t})){L=_,O=!1;break}x.set(_,M)}if(O)for(var q=function(t){var e=b.find(function(e){var n=x.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return L=e,"break"},I=p?3:1;I>0&&"break"!==q(I);I--);e.placement!==L&&(e.modifiersData[i]._skip=!0,e.placement=L,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,c=n.tether,l=void 0===c||c,u=n.tetherOffset,d=void 0===u?0:u,f=$t(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),h=wt(e.placement),p=Ft(e.placement),g=!p,v=jt(h),m="x"===v?"y":"x",y=e.modifiersData.popperOffsets,b=e.rects.reference,w=e.rects.popper,E="function"==typeof d?d(Object.assign({},e.rects,{placement:e.placement})):d,x="number"==typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,L={x:0,y:0};if(y){if(o){var k,_="y"===v?nt:ot,A="y"===v?it:rt,C="y"===v?"height":"width",P=y[v],S=P+f[_],D=P-f[A],T=l?-w[C]/2:0,j=p===ct?b[C]:w[C],M=p===ct?-w[C]:-b[C],q=e.elements.arrow,I=l&&q?kt(q):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[_],V=F[A],K=Mt(0,b[C],I[C]),R=g?b[C]/2-T-K-B-x.mainAxis:j-K-B-x.mainAxis,W=g?-b[C]/2+T+K+V+x.mainAxis:M+K+V+x.mainAxis,H=e.elements.arrow&&Tt(e.elements.arrow),N=null!=(k=null==O?void 0:O[v])?k:0,Q=P+W-N,z=Mt(l?xt(S,P+R-N-(H?"y"===v?H.clientTop||0:H.clientLeft||0:0)):S,P,l?Et(D,Q):D);y[v]=z,L[v]=z-P}if(a){var J,U=y[m],X="y"===m?"height":"width",Y=U+f["x"===v?nt:ot],Z=U-f["x"===v?it:rt],G=-1!==[nt,ot].indexOf(h),$=null!=(J=null==O?void 0:O[m])?J:0,tt=G?Y:U-b[X]-w[X]-$+x.altAxis,et=G?U+b[X]+w[X]-$-x.altAxis:Z,st=l&&G?function(t,e,n){var i=Mt(t,e,n);return i>n?n:i}(tt,U,et):Mt(l?tt:Y,U,l?et:Z);y[m]=st,L[m]=st-U}e.modifiersData[i]=L}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=wt(n.placement),c=jt(a),l=[ot,rt].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(t,e){return qt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:It(t,at))}(r.padding,n),d=kt(o),f="y"===c?nt:ot,h="y"===c?it:rt,p=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],g=s[c]-n.rects.reference[c],v=Tt(o),m=v?"y"===c?v.clientHeight||0:v.clientWidth||0:0,y=m/2-d[l]/2+(p/2-g/2),b=Mt(u[f],y,m-d[l]-u[h]);n.modifiersData[i]=((e={})[c]=b,e.centerOffset=b-y,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&_t(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=$t(e,{elementContext:"reference"}),a=$t(e,{altBoundary:!0}),c=ee(s,i),l=ee(a,r,o),u=ne(c),d=ne(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function le(t){var e;return t.target.classList.add(this.settings.stateActive),t.trigger.hasAttribute("aria-controls")&&t.trigger.setAttribute("aria-expanded","true"),t.config=G(t.target,this.settings),t.popper.setOptions({placement:t.config.placement,modifiers:[{name:"eventListeners",enabled:!0}].concat((e=t.config,[{name:"offset",options:{offset:[0,parseInt(e.offset,10)]}},{name:"preventOverflow",options:{padding:$(e["overflow-padding"])}},{name:"flip",options:{padding:$(e["flip-padding"])}},{name:"arrow",options:{element:e["arrow-element"],padding:$(e["arrow-padding"])}}]))}),t.popper.update(),t.state="opened",t}function ue(t,e){this.deregister(e.id);var n=ce(t,e),i=this,r={open:function(){le.call(i,this)},close:function(){z.call(i,this)},deregister:function(){de.call(i,this)}},o=v({id:e.id,state:"closed",trigger:t,target:e,popper:n,config:G(e,this.settings)},r);return fe.call(this,o),o.target.classList.contains(this.settings.stateActive)?(o.open(),Z.call(this,o)):o.close(),this.collection.push(o),o}function de(t){var e=this.collection.findIndex(function(e){return e.id===t.id});if(e>=0){var n=this.collection[e];"opened"===n.state&&n.close(),n.popper.destroy(),he(n),Object.getOwnPropertyNames(n).forEach(function(t){delete n[t]}),this.collection.splice(e,1)}return this.collection}function fe(t){return t.__eventListeners||("hover"===t.config.event?(t.__eventListeners=[{el:["trigger"],type:["mouseenter","focus"],listener:le.bind(this,t)},{el:["trigger","target"],type:["mouseleave","focusout"],listener:U.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})})):(t.__eventListeners=[{el:["trigger"],type:["click"],listener:X.bind(this,t)}],t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].addEventListener(i,e.listener,!1)})})}))),t}function he(t){return t.__eventListeners&&(t.__eventListeners.forEach(function(e){e.el.forEach(function(n){e.type.forEach(function(i){t[n].removeEventListener(i,e.listener,!1)})})}),delete t.__eventListeners),t}var pe=/*#__PURE__*/function(t){var e,n;function i(e){var n;return(n=t.call(this)||this).defaults=Q,n.settings=v({},n.defaults,e),n.memory={trigger:null},n.__handlerKeydown=Y.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n)),n.settings.autoInit&&n.init(),n}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,m(e,n);var r=i.prototype;return r.init=function(t){void 0===t&&(t=null),t&&(this.settings=v({},this.settings,t));var e=document.querySelectorAll(this.settings.selectorPopover);this.registerCollection(e),this.settings.eventListeners&&this.initEventListeners(!1)},r.destroy=function(){this.deregisterCollection(),this.settings.eventListeners&&this.destroyEventListeners(!1)},r.initEventListeners=function(t){var e=this;void 0===t&&(t=!0),t&&this.collection.forEach(function(t){fe.call(e,t)}),document.addEventListener("keydown",this.__handlerKeydown,!1)},r.destroyEventListeners=function(t){void 0===t&&(t=!0),t&&this.collection.forEach(function(t){he(t)}),document.removeEventListener("keydown",this.__handlerKeydown,!1)},r.register=function(t){var e=et.call(this,t);return!!e&&ue.call(this,e.trigger,e.target)},r.deregister=function(t){var e=this.get(tt(t));return!!e&&de.call(this,e)},r.open=function(t){var e=this.get(t);return!!e&&e.open()},r.close=function(t){if(t){var e=this.get(t);return!!e&&e.close()}return J.call(this)},i}(N);t.Checkbox=b,t.Drawer=j,t.Modal=H,t.Popover=pe,t.core=g});
2
2
  //# sourceMappingURL=scripts.umd.js.map