-
-
Notifications
You must be signed in to change notification settings - Fork 1k
/
app.js
2 lines (2 loc) · 155 KB
/
app.js
1
2
/*! For license information please see app.js.LICENSE.txt */
(()=>{var e={27:e=>{e.exports=function e(t,i,n){function s(r,a){if(!i[r]){if(!t[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};t[r][0].call(c.exports,(function(e){return s(t[r][1][e]||e)}),c,c.exports,e,t,i,n)}return i[r].exports}for(var o=void 0,r=0;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.create=i.visible=void 0;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=document.createElement("div");return i.innerHTML=e.trim(),!0===t?i.children:i.firstChild},s=function(e,t){var i=e.children;return 1===i.length&&i[0].tagName===t},o=function(e){return null!=(e=e||document.querySelector(".basicLightbox"))&&!0===e.ownerDocument.body.contains(e)};i.visible=o,i.create=function(e,t){var i=function(e,t){var i=n('\n\t\t<div class="basicLightbox '.concat(t.className,'">\n\t\t\t<div class="basicLightbox__placeholder" role="dialog"></div>\n\t\t</div>\n\t')),o=i.querySelector(".basicLightbox__placeholder");e.forEach((function(e){return o.appendChild(e)}));var r=s(o,"IMG"),a=s(o,"VIDEO"),l=s(o,"IFRAME");return!0===r&&i.classList.add("basicLightbox--img"),!0===a&&i.classList.add("basicLightbox--video"),!0===l&&i.classList.add("basicLightbox--iframe"),i}(e=function(e){var t="string"==typeof e,i=e instanceof HTMLElement==1;if(!1===t&&!1===i)throw new Error("Content must be a DOM element/node or string");return!0===t?Array.from(n(e,!0)):"TEMPLATE"===e.tagName?[e.content.cloneNode(!0)]:Array.from(e.children)}(e),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null==(e=Object.assign({},e)).closable&&(e.closable=!0),null==e.className&&(e.className=""),null==e.onShow&&(e.onShow=function(){}),null==e.onClose&&(e.onClose=function(){}),"boolean"!=typeof e.closable)throw new Error("Property `closable` must be a boolean");if("string"!=typeof e.className)throw new Error("Property `className` must be a string");if("function"!=typeof e.onShow)throw new Error("Property `onShow` must be a function");if("function"!=typeof e.onClose)throw new Error("Property `onClose` must be a function");return e}(t)),r=function(e){return!1!==t.onClose(a)&&function(e,t){return e.classList.remove("basicLightbox--visible"),setTimeout((function(){return!1===o(e)||e.parentElement.removeChild(e),t()}),410),!0}(i,(function(){if("function"==typeof e)return e(a)}))};!0===t.closable&&i.addEventListener("click",(function(e){e.target===i&&r()}));var a={element:function(){return i},visible:function(){return o(i)},show:function(e){return!1!==t.onShow(a)&&function(e,t){return document.body.appendChild(e),setTimeout((function(){requestAnimationFrame((function(){return e.classList.add("basicLightbox--visible"),t()}))}),10),!0}(i,(function(){if("function"==typeof e)return e(a)}))},close:r};return a}},{}]},{},[1])(1)},5577:function(e){e.exports=function(){"use strict";const e=1e6,t=1e3,i="transitionend",n=e=>null==e?`${e}`:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),s=t=>{do{t+=Math.floor(Math.random()*e)}while(document.getElementById(t));return t},o=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let i=e.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),t=i&&"#"!==i?i.trim():null}return t},r=e=>{const t=o(e);return t&&document.querySelector(t)?t:null},a=e=>{const t=o(e);return t?document.querySelector(t):null},l=e=>{if(!e)return 0;let{transitionDuration:i,transitionDelay:n}=window.getComputedStyle(e);const s=Number.parseFloat(i),o=Number.parseFloat(n);return s||o?(i=i.split(",")[0],n=n.split(",")[0],(Number.parseFloat(i)+Number.parseFloat(n))*t):0},c=e=>{e.dispatchEvent(new Event(i))},d=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),u=e=>d(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,h=(e,t,i)=>{Object.keys(i).forEach((s=>{const o=i[s],r=t[s],a=r&&d(r)?"element":n(r);if(!new RegExp(o).test(a))throw new TypeError(`${e.toUpperCase()}: Option "${s}" provided type "${a}" but expected type "${o}".`)}))},p=e=>!(!d(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),f=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),g=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?g(e.parentNode):null},m=()=>{},v=e=>{e.offsetHeight},_=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},b=[],y=e=>{"loading"===document.readyState?(b.length||document.addEventListener("DOMContentLoaded",(()=>{b.forEach((e=>e()))})),b.push(e)):e()},w=()=>"rtl"===document.documentElement.dir,E=e=>{y((()=>{const t=_();if(t){const i=e.NAME,n=t.fn[i];t.fn[i]=e.jQueryInterface,t.fn[i].Constructor=e,t.fn[i].noConflict=()=>(t.fn[i]=n,e.jQueryInterface)}}))},O=e=>{"function"==typeof e&&e()},A=(e,t,n=!0)=>{if(!n)return void O(e);const s=5,o=l(t)+s;let r=!1;const a=({target:n})=>{n===t&&(r=!0,t.removeEventListener(i,a),O(e))};t.addEventListener(i,a),setTimeout((()=>{r||c(t)}),o)},x=(e,t,i,n)=>{let s=e.indexOf(t);if(-1===s)return e[!i&&n?e.length-1:0];const o=e.length;return s+=i?1:-1,n&&(s=(s+o)%o),e[Math.max(0,Math.min(s,o-1))]},S=/[^.]*(?=\..*)\.|.*/,C=/\..*/,k=/::\d+$/,T={};let I=1;const L={mouseenter:"mouseover",mouseleave:"mouseout"},N=/^(mouseenter|mouseleave)/i,$=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 D(e,t){return t&&`${t}::${I++}`||e.uidEvent||I++}function P(e){const t=D(e);return e.uidEvent=t,T[t]=T[t]||{},T[t]}function F(e,t){return function i(n){return n.delegateTarget=e,i.oneOff&&z.off(e,n.type,t),t.apply(e,[n])}}function j(e,t,i){return function n(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&z.off(e,s.type,t,i),i.apply(r,[s]);return null}}function M(e,t,i=null){const n=Object.keys(e);for(let s=0,o=n.length;s<o;s++){const o=e[n[s]];if(o.originalHandler===t&&o.delegationSelector===i)return o}return null}function q(e,t,i){const n="string"==typeof t,s=n?i:t;let o=W(e);return $.has(o)||(o=e),[n,s,o]}function R(e,t,i,n,s){if("string"!=typeof t||!e)return;if(i||(i=n,n=null),N.test(t)){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};n?n=e(n):i=e(i)}const[o,r,a]=q(t,i,n),l=P(e),c=l[a]||(l[a]={}),d=M(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const u=D(r,t.replace(S,"")),h=o?j(e,i,n):F(e,i);h.delegationSelector=o?i:null,h.originalHandler=r,h.oneOff=s,h.uidEvent=u,c[u]=h,e.addEventListener(a,h,o)}function H(e,t,i,n,s){const o=M(t[i],n,s);o&&(e.removeEventListener(i,o,Boolean(s)),delete t[i][o.uidEvent])}function B(e,t,i,n){const s=t[i]||{};Object.keys(s).forEach((o=>{if(o.includes(n)){const n=s[o];H(e,t,i,n.originalHandler,n.delegationSelector)}}))}function W(e){return e=e.replace(C,""),L[e]||e}const z={on(e,t,i,n){R(e,t,i,n,!1)},one(e,t,i,n){R(e,t,i,n,!0)},off(e,t,i,n){if("string"!=typeof t||!e)return;const[s,o,r]=q(t,i,n),a=r!==t,l=P(e),c=t.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void H(e,l,r,o,s?i:null)}c&&Object.keys(l).forEach((i=>{B(e,l,i,t.slice(1))}));const d=l[r]||{};Object.keys(d).forEach((i=>{const n=i.replace(k,"");if(!a||t.includes(n)){const t=d[i];H(e,l,r,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,i){if("string"!=typeof t||!e)return null;const n=_(),s=W(t),o=t!==s,r=$.has(s);let a,l=!0,c=!0,d=!1,u=null;return o&&n&&(a=n.Event(t,i),n(e).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),d=a.isDefaultPrevented()),r?(u=document.createEvent("HTMLEvents"),u.initEvent(s,l,!0)):u=new CustomEvent(t,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach((e=>{Object.defineProperty(u,e,{get:()=>i[e]})})),d&&u.preventDefault(),c&&e.dispatchEvent(u),u.defaultPrevented&&void 0!==a&&a.preventDefault(),u}},V=new Map,U={set(e,t,i){V.has(e)||V.set(e,new Map);const n=V.get(e);n.has(t)||0===n.size?n.set(t,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(e,t)=>V.has(e)&&V.get(e).get(t)||null,remove(e,t){if(!V.has(e))return;const i=V.get(e);i.delete(t),0===i.size&&V.delete(e)}},K="5.1.3";class Q{constructor(e){(e=u(e))&&(this._element=e,U.set(this._element,this.constructor.DATA_KEY,this))}dispose(){U.remove(this._element,this.constructor.DATA_KEY),z.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,i=!0){A(e,t,i)}static getInstance(e){return U.get(u(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return K}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const X=(e,t="hide")=>{const i=`click.dismiss${e.EVENT_KEY}`,n=e.NAME;z.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),f(this))return;const s=a(this)||this.closest(`.${n}`);e.getOrCreateInstance(s)[t]()}))},Y="alert",J=".bs.alert",G=`close${J}`,Z=`closed${J}`,ee="fade",te="show";class ie extends Q{static get NAME(){return Y}close(){if(z.trigger(this._element,G).defaultPrevented)return;this._element.classList.remove(te);const e=this._element.classList.contains(ee);this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),z.trigger(this._element,Z),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=ie.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}X(ie,"close"),E(ie);const ne="button",se="active",oe='[data-bs-toggle="button"]',re="click.bs.button.data-api";class ae extends Q{static get NAME(){return ne}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(se))}static jQueryInterface(e){return this.each((function(){const t=ae.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}function le(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function ce(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}z.on(document,re,oe,(e=>{e.preventDefault();const t=e.target.closest(oe);ae.getOrCreateInstance(t).toggle()})),E(ae);const de={setDataAttribute(e,t,i){e.setAttribute(`data-bs-${ce(t)}`,i)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${ce(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=le(e.dataset[i])})),t},getDataAttribute:(e,t)=>le(e.getAttribute(`data-bs-${ce(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position:e=>({top:e.offsetTop,left:e.offsetLeft})},ue=3,he={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const i=[];let n=e.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&n.nodeType!==ue;)n.matches(t)&&i.push(n),n=n.parentNode;return i},prev(e,t){let i=e.previousElementSibling;for(;i;){if(i.matches(t))return[i];i=i.previousElementSibling}return[]},next(e,t){let i=e.nextElementSibling;for(;i;){if(i.matches(t))return[i];i=i.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(", ");return this.find(t,e).filter((e=>!f(e)&&p(e)))}},pe="carousel",fe=".bs.carousel",ge=".data-api",me=500,ve=40,_e={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},be={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},ye="next",we="prev",Ee="left",Oe="right",Ae={ArrowLeft:Oe,ArrowRight:Ee},xe=`slide${fe}`,Se=`slid${fe}`,Ce=`keydown${fe}`,ke=`mouseenter${fe}`,Te=`mouseleave${fe}`,Ie=`touchstart${fe}`,Le=`touchmove${fe}`,Ne=`touchend${fe}`,$e=`pointerdown${fe}`,De=`pointerup${fe}`,Pe=`dragstart${fe}`,Fe=`load${fe}${ge}`,je=`click${fe}${ge}`,Me="carousel",qe="active",Re="slide",He="carousel-item-end",Be="carousel-item-start",We="carousel-item-next",ze="carousel-item-prev",Ve="pointer-event",Ue=".active",Ke=".active.carousel-item",Qe=".carousel-item",Xe=".carousel-item img",Ye=".carousel-item-next, .carousel-item-prev",Je=".carousel-indicators",Ge="[data-bs-target]",Ze="[data-bs-slide], [data-bs-slide-to]",et='[data-bs-ride="carousel"]',tt="touch",it="pen";class nt extends Q{constructor(e,t){super(e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._indicatorsElement=he.findOne(Je,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return _e}static get NAME(){return pe}next(){this._slide(ye)}nextWhenVisible(){!document.hidden&&p(this._element)&&this.next()}prev(){this._slide(we)}pause(e){e||(this._isPaused=!0),he.findOne(Ye,this._element)&&(c(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=he.findOne(Ke,this._element);const t=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding)return void z.one(this._element,Se,(()=>this.to(e)));if(t===e)return this.pause(),void this.cycle();const i=e>t?ye:we;this._slide(i,this._items[e])}_getConfig(e){return e={..._e,...de.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(pe,e,be),e}_handleSwipe(){const e=Math.abs(this.touchDeltaX);if(e<=ve)return;const t=e/this.touchDeltaX;this.touchDeltaX=0,t&&this._slide(t>0?Oe:Ee)}_addEventListeners(){this._config.keyboard&&z.on(this._element,Ce,(e=>this._keydown(e))),"hover"===this._config.pause&&(z.on(this._element,ke,(e=>this.pause(e))),z.on(this._element,Te,(e=>this.cycle(e)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=e=>this._pointerEvent&&(e.pointerType===it||e.pointerType===tt),t=t=>{e(t)?this.touchStartX=t.clientX:this._pointerEvent||(this.touchStartX=t.touches[0].clientX)},i=e=>{this.touchDeltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this.touchStartX},n=t=>{e(t)&&(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((e=>this.cycle(e)),me+this._config.interval))};he.find(Xe,this._element).forEach((e=>{z.on(e,Pe,(e=>e.preventDefault()))})),this._pointerEvent?(z.on(this._element,$e,(e=>t(e))),z.on(this._element,De,(e=>n(e))),this._element.classList.add(Ve)):(z.on(this._element,Ie,(e=>t(e))),z.on(this._element,Le,(e=>i(e))),z.on(this._element,Ne,(e=>n(e))))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Ae[e.key];t&&(e.preventDefault(),this._slide(t))}_getItemIndex(e){return this._items=e&&e.parentNode?he.find(Qe,e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,t){const i=e===ye;return x(this._items,t,i,this._config.wrap)}_triggerSlideEvent(e,t){const i=this._getItemIndex(e),n=this._getItemIndex(he.findOne(Ke,this._element));return z.trigger(this._element,xe,{relatedTarget:e,direction:t,from:n,to:i})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const t=he.findOne(Ue,this._indicatorsElement);t.classList.remove(qe),t.removeAttribute("aria-current");const i=he.find(Ge,this._indicatorsElement);for(let t=0;t<i.length;t++)if(Number.parseInt(i[t].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(e)){i[t].classList.add(qe),i[t].setAttribute("aria-current","true");break}}}_updateInterval(){const e=this._activeElement||he.findOne(Ke,this._element);if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);t?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=t):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(e,t){const i=this._directionToOrder(e),n=he.findOne(Ke,this._element),s=this._getItemIndex(n),o=t||this._getItemByOrder(i,n),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===ye,c=l?Be:He,d=l?We:ze,u=this._orderToDirection(i);if(o&&o.classList.contains(qe))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,u).defaultPrevented)return;if(!n||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const h=()=>{z.trigger(this._element,Se,{relatedTarget:o,direction:u,from:s,to:r})};if(this._element.classList.contains(Re)){o.classList.add(d),v(o),n.classList.add(c),o.classList.add(c);const e=()=>{o.classList.remove(c,d),o.classList.add(qe),n.classList.remove(qe,d,c),this._isSliding=!1,setTimeout(h,0)};this._queueCallback(e,n,!0)}else n.classList.remove(qe),o.classList.add(qe),this._isSliding=!1,h();a&&this.cycle()}_directionToOrder(e){return[Oe,Ee].includes(e)?w()?e===Ee?we:ye:e===Ee?ye:we:e}_orderToDirection(e){return[ye,we].includes(e)?w()?e===we?Ee:Oe:e===we?Oe:Ee:e}static carouselInterface(e,t){const i=nt.getOrCreateInstance(e,t);let{_config:n}=i;"object"==typeof t&&(n={...n,...t});const s="string"==typeof t?t:n.slide;if("number"==typeof t)i.to(t);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(e){return this.each((function(){nt.carouselInterface(this,e)}))}static dataApiClickHandler(e){const t=a(this);if(!t||!t.classList.contains(Me))return;const i={...de.getDataAttributes(t),...de.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),nt.carouselInterface(t,i),n&&nt.getInstance(t).to(n),e.preventDefault()}}z.on(document,je,Ze,nt.dataApiClickHandler),z.on(window,Fe,(()=>{const e=he.find(et);for(let t=0,i=e.length;t<i;t++)nt.carouselInterface(e[t],nt.getInstance(e[t]))})),E(nt);const st="collapse",ot="bs.collapse",rt=`.${ot}`,at={toggle:!0,parent:null},lt={toggle:"boolean",parent:"(null|element)"},ct=`show${rt}`,dt=`shown${rt}`,ut=`hide${rt}`,ht=`hidden${rt}`,pt=`click${rt}.data-api`,ft="show",gt="collapse",mt="collapsing",vt="collapsed",_t=`:scope .${gt} .${gt}`,bt="collapse-horizontal",yt="width",wt="height",Et=".collapse.show, .collapse.collapsing",Ot='[data-bs-toggle="collapse"]';class At extends Q{constructor(e,t){super(e),this._isTransitioning=!1,this._config=this._getConfig(t),this._triggerArray=[];const i=he.find(Ot);for(let e=0,t=i.length;e<t;e++){const t=i[e],n=r(t),s=he.find(n).filter((e=>e===this._element));null!==n&&s.length&&(this._selector=n,this._triggerArray.push(t))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return at}static get NAME(){return st}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e,t=[];if(this._config.parent){const e=he.find(_t,this._config.parent);t=he.find(Et,this._config.parent).filter((t=>!e.includes(t)))}const i=he.findOne(this._selector);if(t.length){const n=t.find((e=>i!==e));if(e=n?At.getInstance(n):null,e&&e._isTransitioning)return}if(z.trigger(this._element,ct).defaultPrevented)return;t.forEach((t=>{i!==t&&At.getOrCreateInstance(t,{toggle:!1}).hide(),e||U.set(t,ot,null)}));const n=this._getDimension();this._element.classList.remove(gt),this._element.classList.add(mt),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(mt),this._element.classList.add(gt,ft),this._element.style[n]="",z.trigger(this._element,dt)},o=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(s,this._element,!0),this._element.style[n]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(z.trigger(this._element,ut).defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,v(this._element),this._element.classList.add(mt),this._element.classList.remove(gt,ft);const t=this._triggerArray.length;for(let e=0;e<t;e++){const t=this._triggerArray[e],i=a(t);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;const i=()=>{this._isTransitioning=!1,this._element.classList.remove(mt),this._element.classList.add(gt),z.trigger(this._element,ht)};this._element.style[e]="",this._queueCallback(i,this._element,!0)}_isShown(e=this._element){return e.classList.contains(ft)}_getConfig(e){return(e={...at,...de.getDataAttributes(this._element),...e}).toggle=Boolean(e.toggle),e.parent=u(e.parent),h(st,e,lt),e}_getDimension(){return this._element.classList.contains(bt)?yt:wt}_initializeChildren(){if(!this._config.parent)return;const e=he.find(_t,this._config.parent);he.find(Ot,this._config.parent).filter((t=>!e.includes(t))).forEach((e=>{const t=a(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}))}_addAriaAndCollapsedClass(e,t){e.length&&e.forEach((e=>{t?e.classList.remove(vt):e.classList.add(vt),e.setAttribute("aria-expanded",t)}))}static jQueryInterface(e){return this.each((function(){const t={};"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1);const i=At.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}))}}z.on(document,pt,Ot,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=r(this);he.find(t).forEach((e=>{At.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),E(At);var xt="top",St="bottom",Ct="right",kt="left",Tt="auto",It=[xt,St,Ct,kt],Lt="start",Nt="end",$t="clippingParents",Dt="viewport",Pt="popper",Ft="reference",jt=It.reduce((function(e,t){return e.concat([t+"-"+Lt,t+"-"+Nt])}),[]),Mt=[].concat(It,[Tt]).reduce((function(e,t){return e.concat([t,t+"-"+Lt,t+"-"+Nt])}),[]),qt="beforeRead",Rt="read",Ht="afterRead",Bt="beforeMain",Wt="main",zt="afterMain",Vt="beforeWrite",Ut="write",Kt="afterWrite",Qt=[qt,Rt,Ht,Bt,Wt,zt,Vt,Ut,Kt];function Xt(e){return e?(e.nodeName||"").toLowerCase():null}function Yt(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Jt(e){return e instanceof Yt(e).Element||e instanceof Element}function Gt(e){return e instanceof Yt(e).HTMLElement||e instanceof HTMLElement}function Zt(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Yt(e).ShadowRoot||e instanceof ShadowRoot)}function ei(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var i=t.styles[e]||{},n=t.attributes[e]||{},s=t.elements[e];Gt(s)&&Xt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(e){var t=n[e];!1===t?s.removeAttribute(e):s.setAttribute(e,!0===t?"":t)})))}))}function ti(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],s=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:i[e]).reduce((function(e,t){return e[t]="",e}),{});Gt(n)&&Xt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(e){n.removeAttribute(e)})))}))}}const ii={name:"applyStyles",enabled:!0,phase:"write",fn:ei,effect:ti,requires:["computeStyles"]};function ni(e){return e.split("-")[0]}function si(e,t){var i=e.getBoundingClientRect(),n=1,s=1;return{width:i.width/n,height:i.height/s,top:i.top/s,right:i.right/n,bottom:i.bottom/s,left:i.left/n,x:i.left/n,y:i.top/s}}function oi(e){var t=si(e),i=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:n}}function ri(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Zt(i)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function ai(e){return Yt(e).getComputedStyle(e)}function li(e){return["table","td","th"].indexOf(Xt(e))>=0}function ci(e){return((Jt(e)?e.ownerDocument:e.document)||window.document).documentElement}function di(e){return"html"===Xt(e)?e:e.assignedSlot||e.parentNode||(Zt(e)?e.host:null)||ci(e)}function ui(e){return Gt(e)&&"fixed"!==ai(e).position?e.offsetParent:null}function hi(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&Gt(e)&&"fixed"===ai(e).position)return null;for(var i=di(e);Gt(i)&&["html","body"].indexOf(Xt(i))<0;){var n=ai(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}function pi(e){for(var t=Yt(e),i=ui(e);i&&li(i)&&"static"===ai(i).position;)i=ui(i);return i&&("html"===Xt(i)||"body"===Xt(i)&&"static"===ai(i).position)?t:i||hi(e)||t}function fi(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}var gi=Math.max,mi=Math.min,vi=Math.round;function _i(e,t,i){return gi(e,mi(t,i))}function bi(){return{top:0,right:0,bottom:0,left:0}}function yi(e){return Object.assign({},bi(),e)}function wi(e,t){return t.reduce((function(t,i){return t[i]=e,t}),{})}var Ei=function(e,t){return yi("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:wi(e,It))};function Oi(e){var t,i=e.state,n=e.name,s=e.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=ni(i.placement),l=fi(a),c=[kt,Ct].indexOf(a)>=0?"height":"width";if(o&&r){var d=Ei(s.padding,i),u=oi(o),h="y"===l?xt:kt,p="y"===l?St:Ct,f=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],g=r[l]-i.rects.reference[l],m=pi(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,_=f/2-g/2,b=d[h],y=v-u[c]-d[p],w=v/2-u[c]/2+_,E=_i(b,w,y),O=l;i.modifiersData[n]=((t={})[O]=E,t.centerOffset=E-w,t)}}function Ai(e){var t=e.state,i=e.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&ri(t.elements.popper,n)&&(t.elements.arrow=n)}const xi={name:"arrow",enabled:!0,phase:"main",fn:Oi,effect:Ai,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Si(e){return e.split("-")[1]}var Ci={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ki(e){var t=e.x,i=e.y,n=window.devicePixelRatio||1;return{x:vi(vi(t*n)/n)||0,y:vi(vi(i*n)/n)||0}}function Ti(e){var t,i=e.popper,n=e.popperRect,s=e.placement,o=e.variation,r=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,u=!0===d?ki(r):"function"==typeof d?d(r):r,h=u.x,p=void 0===h?0:h,f=u.y,g=void 0===f?0:f,m=r.hasOwnProperty("x"),v=r.hasOwnProperty("y"),_=kt,b=xt,y=window;if(c){var w=pi(i),E="clientHeight",O="clientWidth";w===Yt(i)&&"static"!==ai(w=ci(i)).position&&"absolute"===a&&(E="scrollHeight",O="scrollWidth"),w=w,s!==xt&&(s!==kt&&s!==Ct||o!==Nt)||(b=St,g-=w[E]-n.height,g*=l?1:-1),s!==kt&&(s!==xt&&s!==St||o!==Nt)||(_=Ct,p-=w[O]-n.width,p*=l?1:-1)}var A,x=Object.assign({position:a},c&&Ci);return l?Object.assign({},x,((A={})[b]=v?"0":"",A[_]=m?"0":"",A.transform=(y.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",A)):Object.assign({},x,((t={})[b]=v?g+"px":"",t[_]=m?p+"px":"",t.transform="",t))}function Ii(e){var t=e.state,i=e.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:ni(t.placement),variation:Si(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ti(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ti(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Li={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ii,data:{}};var Ni={passive:!0};function $i(e){var t=e.state,i=e.instance,n=e.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=Yt(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach((function(e){e.addEventListener("scroll",i.update,Ni)})),a&&l.addEventListener("resize",i.update,Ni),function(){o&&c.forEach((function(e){e.removeEventListener("scroll",i.update,Ni)})),a&&l.removeEventListener("resize",i.update,Ni)}}const Di={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:$i,data:{}};var Pi={left:"right",right:"left",bottom:"top",top:"bottom"};function Fi(e){return e.replace(/left|right|bottom|top/g,(function(e){return Pi[e]}))}var ji={start:"end",end:"start"};function Mi(e){return e.replace(/start|end/g,(function(e){return ji[e]}))}function qi(e){var t=Yt(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Ri(e){return si(ci(e)).left+qi(e).scrollLeft}function Hi(e){var t=Yt(e),i=ci(e),n=t.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,a=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=n.offsetLeft,a=n.offsetTop)),{width:s,height:o,x:r+Ri(e),y:a}}function Bi(e){var t,i=ci(e),n=qi(e),s=null==(t=e.ownerDocument)?void 0:t.body,o=gi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=gi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+Ri(e),l=-n.scrollTop;return"rtl"===ai(s||i).direction&&(a+=gi(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Wi(e){var t=ai(e),i=t.overflow,n=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function zi(e){return["html","body","#document"].indexOf(Xt(e))>=0?e.ownerDocument.body:Gt(e)&&Wi(e)?e:zi(di(e))}function Vi(e,t){var i;void 0===t&&(t=[]);var n=zi(e),s=n===(null==(i=e.ownerDocument)?void 0:i.body),o=Yt(n),r=s?[o].concat(o.visualViewport||[],Wi(n)?n:[]):n,a=t.concat(r);return s?a:a.concat(Vi(di(r)))}function Ui(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ki(e){var t=si(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Qi(e,t){return t===Dt?Ui(Hi(e)):Gt(t)?Ki(t):Ui(Bi(ci(e)))}function Xi(e){var t=Vi(di(e)),i=["absolute","fixed"].indexOf(ai(e).position)>=0&&Gt(e)?pi(e):e;return Jt(i)?t.filter((function(e){return Jt(e)&&ri(e,i)&&"body"!==Xt(e)})):[]}function Yi(e,t,i){var n="clippingParents"===t?Xi(e):[].concat(t),s=[].concat(n,[i]),o=s[0],r=s.reduce((function(t,i){var n=Qi(e,i);return t.top=gi(n.top,t.top),t.right=mi(n.right,t.right),t.bottom=mi(n.bottom,t.bottom),t.left=gi(n.left,t.left),t}),Qi(e,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function Ji(e){var t,i=e.reference,n=e.element,s=e.placement,o=s?ni(s):null,r=s?Si(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case xt:t={x:a,y:i.y-n.height};break;case St:t={x:a,y:i.y+i.height};break;case Ct:t={x:i.x+i.width,y:l};break;case kt:t={x:i.x-n.width,y:l};break;default:t={x:i.x,y:i.y}}var c=o?fi(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case Lt:t[c]=t[c]-(i[d]/2-n[d]/2);break;case Nt:t[c]=t[c]+(i[d]/2-n[d]/2)}}return t}function Gi(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=void 0===n?e.placement:n,o=i.boundary,r=void 0===o?$t:o,a=i.rootBoundary,l=void 0===a?Dt:a,c=i.elementContext,d=void 0===c?Pt:c,u=i.altBoundary,h=void 0!==u&&u,p=i.padding,f=void 0===p?0:p,g=yi("number"!=typeof f?f:wi(f,It)),m=d===Pt?Ft:Pt,v=e.rects.popper,_=e.elements[h?m:d],b=Yi(Jt(_)?_:_.contextElement||ci(e.elements.popper),r,l),y=si(e.elements.reference),w=Ji({reference:y,element:v,strategy:"absolute",placement:s}),E=Ui(Object.assign({},v,w)),O=d===Pt?E:y,A={top:b.top-O.top+g.top,bottom:O.bottom-b.bottom+g.bottom,left:b.left-O.left+g.left,right:O.right-b.right+g.right},x=e.modifiersData.offset;if(d===Pt&&x){var S=x[s];Object.keys(A).forEach((function(e){var t=[Ct,St].indexOf(e)>=0?1:-1,i=[xt,St].indexOf(e)>=0?"y":"x";A[e]+=S[i]*t}))}return A}function Zi(e,t){void 0===t&&(t={});var i=t,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?Mt:l,d=Si(n),u=d?a?jt:jt.filter((function(e){return Si(e)===d})):It,h=u.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=u);var p=h.reduce((function(t,i){return t[i]=Gi(e,{placement:i,boundary:s,rootBoundary:o,padding:r})[ni(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}function en(e){if(ni(e)===Tt)return[];var t=Fi(e);return[Mi(e),t,Mi(t)]}function tn(e){var t=e.state,i=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,u=i.rootBoundary,h=i.altBoundary,p=i.flipVariations,f=void 0===p||p,g=i.allowedAutoPlacements,m=t.options.placement,v=ni(m),_=l||(v!==m&&f?en(m):[Fi(m)]),b=[m].concat(_).reduce((function(e,i){return e.concat(ni(i)===Tt?Zi(t,{placement:i,boundary:d,rootBoundary:u,padding:c,flipVariations:f,allowedAutoPlacements:g}):i)}),[]),y=t.rects.reference,w=t.rects.popper,E=new Map,O=!0,A=b[0],x=0;x<b.length;x++){var S=b[x],C=ni(S),k=Si(S)===Lt,T=[xt,St].indexOf(C)>=0,I=T?"width":"height",L=Gi(t,{placement:S,boundary:d,rootBoundary:u,altBoundary:h,padding:c}),N=T?k?Ct:kt:k?St:xt;y[I]>w[I]&&(N=Fi(N));var $=Fi(N),D=[];if(o&&D.push(L[C]<=0),a&&D.push(L[N]<=0,L[$]<=0),D.every((function(e){return e}))){A=S,O=!1;break}E.set(S,D)}if(O)for(var P=function(e){var t=b.find((function(t){var i=E.get(t);if(i)return i.slice(0,e).every((function(e){return e}))}));if(t)return A=t,"break"},F=f?3:1;F>0&&"break"!==P(F);F--);t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const nn={name:"flip",enabled:!0,phase:"main",fn:tn,requiresIfExists:["offset"],data:{_skip:!1}};function sn(e,t,i){return void 0===i&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function on(e){return[xt,Ct,St,kt].some((function(t){return e[t]>=0}))}function rn(e){var t=e.state,i=e.name,n=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=Gi(t,{elementContext:"reference"}),a=Gi(t,{altBoundary:!0}),l=sn(r,n),c=sn(a,s,o),d=on(l),u=on(c);t.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":u})}const an={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rn};function ln(e,t,i){var n=ni(e),s=[kt,xt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},t,{placement:e})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[kt,Ct].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}function cn(e){var t=e.state,i=e.options,n=e.name,s=i.offset,o=void 0===s?[0,0]:s,r=Mt.reduce((function(e,i){return e[i]=ln(i,t.rects,o),e}),{}),a=r[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=r}const dn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:cn};function un(e){var t=e.state,i=e.name;t.modifiersData[i]=Ji({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const hn={name:"popperOffsets",enabled:!0,phase:"read",fn:un,data:{}};function pn(e){return"x"===e?"y":"x"}function fn(e){var t=e.state,i=e.options,n=e.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,u=i.padding,h=i.tether,p=void 0===h||h,f=i.tetherOffset,g=void 0===f?0:f,m=Gi(t,{boundary:l,rootBoundary:c,padding:u,altBoundary:d}),v=ni(t.placement),_=Si(t.placement),b=!_,y=fi(v),w=pn(y),E=t.modifiersData.popperOffsets,O=t.rects.reference,A=t.rects.popper,x="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,S={x:0,y:0};if(E){if(o||a){var C="y"===y?xt:kt,k="y"===y?St:Ct,T="y"===y?"height":"width",I=E[y],L=E[y]+m[C],N=E[y]-m[k],$=p?-A[T]/2:0,D=_===Lt?O[T]:A[T],P=_===Lt?-A[T]:-O[T],F=t.elements.arrow,j=p&&F?oi(F):{width:0,height:0},M=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:bi(),q=M[C],R=M[k],H=_i(0,O[T],j[T]),B=b?O[T]/2-$-H-q-x:D-H-q-x,W=b?-O[T]/2+$+H+R+x:P+H+R+x,z=t.elements.arrow&&pi(t.elements.arrow),V=z?"y"===y?z.clientTop||0:z.clientLeft||0:0,U=t.modifiersData.offset?t.modifiersData.offset[t.placement][y]:0,K=E[y]+B-U-V,Q=E[y]+W-U;if(o){var X=_i(p?mi(L,K):L,I,p?gi(N,Q):N);E[y]=X,S[y]=X-I}if(a){var Y="x"===y?xt:kt,J="x"===y?St:Ct,G=E[w],Z=G+m[Y],ee=G-m[J],te=_i(p?mi(Z,K):Z,G,p?gi(ee,Q):ee);E[w]=te,S[w]=te-G}}t.modifiersData[n]=S}}const gn={name:"preventOverflow",enabled:!0,phase:"main",fn,requiresIfExists:["offset"]};function mn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vn(e){return e!==Yt(e)&&Gt(e)?mn(e):qi(e)}function _n(e){var t=e.getBoundingClientRect(),i=t.width/e.offsetWidth||1,n=t.height/e.offsetHeight||1;return 1!==i||1!==n}function bn(e,t,i){void 0===i&&(i=!1);var n=Gt(t);Gt(t)&&_n(t);var s=ci(t),o=si(e),r={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(n||!n&&!i)&&(("body"!==Xt(t)||Wi(s))&&(r=vn(t)),Gt(t)?((a=si(t)).x+=t.clientLeft,a.y+=t.clientTop):s&&(a.x=Ri(s))),{x:o.left+r.scrollLeft-a.x,y:o.top+r.scrollTop-a.y,width:o.width,height:o.height}}function yn(e){var t=new Map,i=new Set,n=[];function s(e){i.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!i.has(e)){var n=t.get(e);n&&s(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){i.has(e.name)||s(e)})),n}function wn(e){var t=yn(e);return Qt.reduce((function(e,i){return e.concat(t.filter((function(e){return e.phase===i})))}),[])}function En(e){var t;return function(){return t||(t=new Promise((function(i){Promise.resolve().then((function(){t=void 0,i(e())}))}))),t}}function On(e){var t=e.reduce((function(e,t){var i=e[t.name];return e[t.name]=i?Object.assign({},i,t,{options:Object.assign({},i.options,t.options),data:Object.assign({},i.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var An={placement:"bottom",modifiers:[],strategy:"absolute"};function xn(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Sn(e){void 0===e&&(e={});var t=e,i=t.defaultModifiers,n=void 0===i?[]:i,s=t.defaultOptions,o=void 0===s?An:s;return function(e,t,i){void 0===i&&(i=o);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},An,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},r=[],a=!1,l={state:s,setOptions:function(i){var r="function"==typeof i?i(s.options):i;d(),s.options=Object.assign({},o,s.options,r),s.scrollParents={reference:Jt(e)?Vi(e):e.contextElement?Vi(e.contextElement):[],popper:Vi(t)};var a=wn(On([].concat(n,s.options.modifiers)));return s.orderedModifiers=a.filter((function(e){return e.enabled})),c(),l.update()},forceUpdate:function(){if(!a){var e=s.elements,t=e.reference,i=e.popper;if(xn(t,i)){s.rects={reference:bn(t,pi(i),"fixed"===s.options.strategy),popper:oi(i)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var n=0;n<s.orderedModifiers.length;n++)if(!0!==s.reset){var o=s.orderedModifiers[n],r=o.fn,c=o.options,d=void 0===c?{}:c,u=o.name;"function"==typeof r&&(s=r({state:s,options:d,name:u,instance:l})||s)}else s.reset=!1,n=-1}}},update:En((function(){return new Promise((function(e){l.forceUpdate(),e(s)}))})),destroy:function(){d(),a=!0}};if(!xn(e,t))return l;function c(){s.orderedModifiers.forEach((function(e){var t=e.name,i=e.options,n=void 0===i?{}:i,o=e.effect;if("function"==typeof o){var a=o({state:s,name:t,instance:l,options:n}),c=function(){};r.push(a||c)}}))}function d(){r.forEach((function(e){return e()})),r=[]}return l.setOptions(i).then((function(e){!a&&i.onFirstUpdate&&i.onFirstUpdate(e)})),l}}var Cn=Sn(),kn=Sn({defaultModifiers:[Di,hn,Li,ii]}),Tn=Sn({defaultModifiers:[Di,hn,Li,ii,dn,nn,gn,xi,an]});const In=Object.freeze({__proto__:null,popperGenerator:Sn,detectOverflow:Gi,createPopperBase:Cn,createPopper:Tn,createPopperLite:kn,top:xt,bottom:St,right:Ct,left:kt,auto:Tt,basePlacements:It,start:Lt,end:Nt,clippingParents:$t,viewport:Dt,popper:Pt,reference:Ft,variationPlacements:jt,placements:Mt,beforeRead:qt,read:Rt,afterRead:Ht,beforeMain:Bt,main:Wt,afterMain:zt,beforeWrite:Vt,write:Ut,afterWrite:Kt,modifierPhases:Qt,applyStyles:ii,arrow:xi,computeStyles:Li,eventListeners:Di,flip:nn,hide:an,offset:dn,popperOffsets:hn,preventOverflow:gn}),Ln="dropdown",Nn=".bs.dropdown",$n=".data-api",Dn="Escape",Pn="Space",Fn="Tab",jn="ArrowUp",Mn="ArrowDown",qn=2,Rn=new RegExp(`${jn}|${Mn}|${Dn}`),Hn=`hide${Nn}`,Bn=`hidden${Nn}`,Wn=`show${Nn}`,zn=`shown${Nn}`,Vn=`click${Nn}${$n}`,Un=`keydown${Nn}${$n}`,Kn=`keyup${Nn}${$n}`,Qn="show",Xn="dropup",Yn="dropend",Jn="dropstart",Gn="navbar",Zn='[data-bs-toggle="dropdown"]',es=".dropdown-menu",ts=".navbar-nav",is=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",ns=w()?"top-end":"top-start",ss=w()?"top-start":"top-end",os=w()?"bottom-end":"bottom-start",rs=w()?"bottom-start":"bottom-end",as=w()?"left-start":"right-start",ls=w()?"right-start":"left-start",cs={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},ds={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class us extends Q{constructor(e,t){super(e),this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return cs}static get DefaultType(){return ds}static get NAME(){return Ln}toggle(){return this._isShown()?this.hide():this.show()}show(){if(f(this._element)||this._isShown(this._menu))return;const e={relatedTarget:this._element};if(z.trigger(this._element,Wn,e).defaultPrevented)return;const t=us.getParentFromElement(this._element);this._inNavbar?de.setDataAttribute(this._menu,"popper","none"):this._createPopper(t),"ontouchstart"in document.documentElement&&!t.closest(ts)&&[].concat(...document.body.children).forEach((e=>z.on(e,"mouseover",m))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Qn),this._element.classList.add(Qn),z.trigger(this._element,zn,e)}hide(){if(f(this._element)||!this._isShown(this._menu))return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){z.trigger(this._element,Hn,e).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>z.off(e,"mouseover",m))),this._popper&&this._popper.destroy(),this._menu.classList.remove(Qn),this._element.classList.remove(Qn),this._element.setAttribute("aria-expanded","false"),de.removeDataAttribute(this._menu,"popper"),z.trigger(this._element,Bn,e))}_getConfig(e){if(e={...this.constructor.Default,...de.getDataAttributes(this._element),...e},h(Ln,e,this.constructor.DefaultType),"object"==typeof e.reference&&!d(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${Ln.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(e){if(void 0===In)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=e:d(this._config.reference)?t=u(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find((e=>"applyStyles"===e.name&&!1===e.enabled));this._popper=Tn(t,this._menu,i),n&&de.setDataAttribute(this._menu,"popper","static")}_isShown(e=this._element){return e.classList.contains(Qn)}_getMenuElement(){return he.next(this._element,es)[0]}_getPlacement(){const e=this._element.parentNode;if(e.classList.contains(Yn))return as;if(e.classList.contains(Jn))return ls;const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains(Xn)?t?ss:ns:t?rs:os}_detectNavbar(){return null!==this._element.closest(`.${Gn}`)}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_selectMenuItem({key:e,target:t}){const i=he.find(is,this._menu).filter(p);i.length&&x(i,t,e===Mn,!i.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=us.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}static clearMenus(e){if(e&&(e.button===qn||"keyup"===e.type&&e.key!==Fn))return;const t=he.find(Zn);for(let i=0,n=t.length;i<n;i++){const n=us.getInstance(t[i]);if(!n||!1===n._config.autoClose)continue;if(!n._isShown())continue;const s={relatedTarget:n._element};if(e){const t=e.composedPath(),i=t.includes(n._menu);if(t.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(e.target)&&("keyup"===e.type&&e.key===Fn||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;"click"===e.type&&(s.clickEvent=e)}n._completeHide(s)}}static getParentFromElement(e){return a(e)||e.parentNode}static dataApiKeydownHandler(e){if(/input|textarea/i.test(e.target.tagName)?e.key===Pn||e.key!==Dn&&(e.key!==Mn&&e.key!==jn||e.target.closest(es)):!Rn.test(e.key))return;const t=this.classList.contains(Qn);if(!t&&e.key===Dn)return;if(e.preventDefault(),e.stopPropagation(),f(this))return;const i=this.matches(Zn)?this:he.prev(this,Zn)[0],n=us.getOrCreateInstance(i);if(e.key!==Dn)return e.key===jn||e.key===Mn?(t||n.show(),void n._selectMenuItem(e)):void(t&&e.key!==Pn||us.clearMenus());n.hide()}}z.on(document,Un,Zn,us.dataApiKeydownHandler),z.on(document,Un,es,us.dataApiKeydownHandler),z.on(document,Vn,us.clearMenus),z.on(document,Kn,us.clearMenus),z.on(document,Vn,Zn,(function(e){e.preventDefault(),us.getOrCreateInstance(this).toggle()})),E(us);const hs=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ps=".sticky-top";class fs{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(t=>t+e)),this._setElementAttributes(hs,"paddingRight",(t=>t+e)),this._setElementAttributes(ps,"marginRight",(t=>t-e))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,i){const n=this.getWidth(),s=e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+n)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e)[t];e.style[t]=`${i(Number.parseFloat(s))}px`};this._applyManipulationCallback(e,s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(hs,"paddingRight"),this._resetElementAttributes(ps,"marginRight")}_saveInitialAttribute(e,t){const i=e.style[t];i&&de.setDataAttribute(e,t,i)}_resetElementAttributes(e,t){const i=e=>{const i=de.getDataAttribute(e,t);void 0===i?e.style.removeProperty(t):(de.removeDataAttribute(e,t),e.style[t]=i)};this._applyManipulationCallback(e,i)}_applyManipulationCallback(e,t){d(e)?t(e):he.find(e,this._element).forEach(t)}isOverflowing(){return this.getWidth()>0}}const gs={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},ms={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},vs="backdrop",_s="fade",bs="show",ys=`mousedown.bs.${vs}`;class ws{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){this._config.isVisible?(this._append(),this._config.isAnimated&&v(this._getElement()),this._getElement().classList.add(bs),this._emulateAnimation((()=>{O(e)}))):O(e)}hide(e){this._config.isVisible?(this._getElement().classList.remove(bs),this._emulateAnimation((()=>{this.dispose(),O(e)}))):O(e)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(_s),this._element=e}return this._element}_getConfig(e){return(e={...gs,..."object"==typeof e?e:{}}).rootElement=u(e.rootElement),h(vs,e,ms),e}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),z.on(this._getElement(),ys,(()=>{O(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&(z.off(this._element,ys),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){A(e,this._getElement(),this._config.isAnimated)}}const Es={trapElement:null,autofocus:!0},Os={trapElement:"element",autofocus:"boolean"},As="focustrap",xs=".bs.focustrap",Ss=`focusin${xs}`,Cs=`keydown.tab${xs}`,ks="Tab",Ts="forward",Is="backward";class Ls{constructor(e){this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:e,autofocus:t}=this._config;this._isActive||(t&&e.focus(),z.off(document,xs),z.on(document,Ss,(e=>this._handleFocusin(e))),z.on(document,Cs,(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,z.off(document,xs))}_handleFocusin(e){const{target:t}=e,{trapElement:i}=this._config;if(t===document||t===i||i.contains(t))return;const n=he.focusableChildren(i);0===n.length?i.focus():this._lastTabNavDirection===Is?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===ks&&(this._lastTabNavDirection=e.shiftKey?Is:Ts)}_getConfig(e){return e={...Es,..."object"==typeof e?e:{}},h(As,e,Os),e}}const Ns="modal",$s=".bs.modal",Ds="Escape",Ps={backdrop:!0,keyboard:!0,focus:!0},Fs={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},js=`hide${$s}`,Ms=`hidePrevented${$s}`,qs=`hidden${$s}`,Rs=`show${$s}`,Hs=`shown${$s}`,Bs=`resize${$s}`,Ws=`click.dismiss${$s}`,zs=`keydown.dismiss${$s}`,Vs=`mouseup.dismiss${$s}`,Us=`mousedown.dismiss${$s}`,Ks=`click${$s}.data-api`,Qs="modal-open",Xs="fade",Ys="show",Js="modal-static",Gs=".modal.show",Zs=".modal-dialog",eo=".modal-body",to='[data-bs-toggle="modal"]';class io extends Q{constructor(e,t){super(e),this._config=this._getConfig(t),this._dialog=he.findOne(Zs,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new fs}static get Default(){return Ps}static get NAME(){return Ns}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||z.trigger(this._element,Rs,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Qs),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),z.on(this._dialog,Us,(()=>{z.one(this._element,Vs,(e=>{e.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(e))))}hide(){if(!this._isShown||this._isTransitioning)return;if(z.trigger(this._element,js).defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(Ys),z.off(this._element,Ws),z.off(this._dialog,Us),this._queueCallback((()=>this._hideModal()),this._element,e)}dispose(){[window,this._dialog].forEach((e=>z.off(e,$s))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new ws({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ls({trapElement:this._element})}_getConfig(e){return e={...Ps,...de.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(Ns,e,Fs),e}_showElement(e){const t=this._isAnimated(),i=he.findOne(eo,this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),t&&v(this._element),this._element.classList.add(Ys);const n=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,z.trigger(this._element,Hs,{relatedTarget:e})};this._queueCallback(n,this._dialog,t)}_setEscapeEvent(){this._isShown?z.on(this._element,zs,(e=>{this._config.keyboard&&e.key===Ds?(e.preventDefault(),this.hide()):this._config.keyboard||e.key!==Ds||this._triggerBackdropTransition()})):z.off(this._element,zs)}_setResizeEvent(){this._isShown?z.on(window,Bs,(()=>this._adjustDialog())):z.off(window,Bs)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Qs),this._resetAdjustments(),this._scrollBar.reset(),z.trigger(this._element,qs)}))}_showBackdrop(e){z.on(this._element,Ws,(e=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:e.target===e.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains(Xs)}_triggerBackdropTransition(){if(z.trigger(this._element,Ms).defaultPrevented)return;const{classList:e,scrollHeight:t,style:i}=this._element,n=t>document.documentElement.clientHeight;!n&&"hidden"===i.overflowY||e.contains(Js)||(n||(i.overflowY="hidden"),e.add(Js),this._queueCallback((()=>{e.remove(Js),n||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),i=t>0;(!i&&e&&!w()||i&&!e&&w())&&(this._element.style.paddingLeft=`${t}px`),(i&&!e&&!w()||!i&&e&&w())&&(this._element.style.paddingRight=`${t}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const i=io.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e](t)}}))}}z.on(document,Ks,to,(function(e){const t=a(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),z.one(t,Rs,(e=>{e.defaultPrevented||z.one(t,qs,(()=>{p(this)&&this.focus()}))}));const i=he.findOne(Gs);i&&io.getInstance(i).hide(),io.getOrCreateInstance(t).toggle(this)})),X(io),E(io);const no="offcanvas",so=".bs.offcanvas",oo=".data-api",ro=`load${so}${oo}`,ao="Escape",lo={backdrop:!0,keyboard:!0,scroll:!1},co={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},uo="show",ho="offcanvas-backdrop",po=".offcanvas.show",fo=`show${so}`,go=`shown${so}`,mo=`hide${so}`,vo=`hidden${so}`,_o=`click${so}${oo}`,bo=`keydown.dismiss${so}`,yo='[data-bs-toggle="offcanvas"]';class wo extends Q{constructor(e,t){super(e),this._config=this._getConfig(t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return no}static get Default(){return lo}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown)return;if(z.trigger(this._element,fo,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new fs).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(uo);const t=()=>{this._config.scroll||this._focustrap.activate(),z.trigger(this._element,go,{relatedTarget:e})};this._queueCallback(t,this._element,!0)}hide(){if(!this._isShown)return;if(z.trigger(this._element,mo).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(uo),this._backdrop.hide();const e=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new fs).reset(),z.trigger(this._element,vo)};this._queueCallback(e,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(e){return e={...lo,...de.getDataAttributes(this._element),..."object"==typeof e?e:{}},h(no,e,co),e}_initializeBackDrop(){return new ws({className:ho,isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Ls({trapElement:this._element})}_addEventListeners(){z.on(this._element,bo,(e=>{this._config.keyboard&&e.key===ao&&this.hide()}))}static jQueryInterface(e){return this.each((function(){const t=wo.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}z.on(document,_o,yo,(function(e){const t=a(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),f(this))return;z.one(t,vo,(()=>{p(this)&&this.focus()}));const i=he.findOne(po);i&&i!==t&&wo.getInstance(i).hide(),wo.getOrCreateInstance(t).toggle(this)})),z.on(window,ro,(()=>he.find(po).forEach((e=>wo.getOrCreateInstance(e).show())))),X(wo),E(wo);const Eo=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Oo=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Ao=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,xo=(e,t)=>{const i=e.nodeName.toLowerCase();if(t.includes(i))return!Eo.has(i)||Boolean(Oo.test(e.nodeValue)||Ao.test(e.nodeValue));const n=t.filter((e=>e instanceof RegExp));for(let e=0,t=n.length;e<t;e++)if(n[e].test(i))return!0;return!1},So={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function Co(e,t,i){if(!e.length)return e;if(i&&"function"==typeof i)return i(e);const n=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(let e=0,i=s.length;e<i;e++){const i=s[e],n=i.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){i.remove();continue}const o=[].concat(...i.attributes),r=[].concat(t["*"]||[],t[n]||[]);o.forEach((e=>{xo(e,r)||i.removeAttribute(e.nodeName)}))}return n.body.innerHTML}const ko="tooltip",To=".bs.tooltip",Io="bs-tooltip",Lo=new Set(["sanitize","allowList","sanitizeFn"]),No={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},$o={AUTO:"auto",TOP:"top",RIGHT:w()?"left":"right",BOTTOM:"bottom",LEFT:w()?"right":"left"},Do={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:So,popperConfig:null},Po={HIDE:`hide${To}`,HIDDEN:`hidden${To}`,SHOW:`show${To}`,SHOWN:`shown${To}`,INSERTED:`inserted${To}`,CLICK:`click${To}`,FOCUSIN:`focusin${To}`,FOCUSOUT:`focusout${To}`,MOUSEENTER:`mouseenter${To}`,MOUSELEAVE:`mouseleave${To}`},Fo="fade",jo="show",Mo="show",qo="out",Ro=".tooltip-inner",Ho=".modal",Bo="hide.bs.modal",Wo="hover",zo="focus",Vo="click",Uo="manual";class Ko extends Q{constructor(e,t){if(void 0===In)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(t),this.tip=null,this._setListeners()}static get Default(){return Do}static get NAME(){return ko}static get Event(){return Po}static get DefaultType(){return No}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(this._isEnabled)if(e){const t=this._initializeOnDelegatedTarget(e);t._activeTrigger.click=!t._activeTrigger.click,t._isWithActiveTrigger()?t._enter(null,t):t._leave(null,t)}else{if(this.getTipElement().classList.contains(jo))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),z.off(this._element.closest(Ho),Bo,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const e=z.trigger(this._element,this.constructor.Event.SHOW),t=g(this._element),i=null===t?this._element.ownerDocument.documentElement.contains(this._element):t.contains(this._element);if(e.defaultPrevented||!i)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Ro).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),o=s(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add(Fo);const r="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;U.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),z.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Tn(this._element,n,this._getPopperConfig(a)),n.classList.add(jo);const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>{z.on(e,"mouseover",m)}));const d=()=>{const e=this._hoverState;this._hoverState=null,z.trigger(this._element,this.constructor.Event.SHOWN),e===qo&&this._leave(null,this)},u=this.tip.classList.contains(Fo);this._queueCallback(d,this.tip,u)}hide(){if(!this._popper)return;const e=this.getTipElement(),t=()=>{this._isWithActiveTrigger()||(this._hoverState!==Mo&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),z.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())};if(z.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(jo),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((e=>z.off(e,"mouseover",m))),this._activeTrigger[Vo]=!1,this._activeTrigger[zo]=!1,this._activeTrigger[Wo]=!1;const i=this.tip.classList.contains(Fo);this._queueCallback(t,this.tip,i),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const e=document.createElement("div");e.innerHTML=this._config.template;const t=e.children[0];return this.setContent(t),t.classList.remove(Fo,jo),this.tip=t,this.tip}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),Ro)}_sanitizeAndSetContent(e,t,i){const n=he.findOne(i,e);t||!n?this.setElementContent(n,t):n.remove()}setElementContent(e,t){if(null!==e)return d(t)?(t=u(t),void(this._config.html?t.parentNode!==e&&(e.innerHTML="",e.append(t)):e.textContent=t.textContent)):void(this._config.html?(this._config.sanitize&&(t=Co(t,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=t):e.textContent=t)}getTitle(){const e=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(e)}updateAttachment(e){return"right"===e?"end":"left"===e?"start":e}_initializeOnDelegatedTarget(e,t){return t||this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map((e=>Number.parseInt(e,10))):"function"==typeof e?t=>e(t,this._element):e}_resolvePossibleFunction(e){return"function"==typeof e?e.call(this._element):e}_getPopperConfig(e){const t={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:e=>this._handlePopperPlacementChange(e)}],onFirstUpdate:e=>{e.options.placement!==e.placement&&this._handlePopperPlacementChange(e)}};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_addAttachmentClass(e){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(e)}`)}_getAttachment(e){return $o[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((e=>{if("click"===e)z.on(this._element,this.constructor.Event.CLICK,this._config.selector,(e=>this.toggle(e)));else if(e!==Uo){const t=e===Wo?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=e===Wo?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;z.on(this._element,t,this._config.selector,(e=>this._enter(e))),z.on(this._element,i,this._config.selector,(e=>this._leave(e)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},z.on(this._element.closest(Ho),Bo,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const e=this._element.getAttribute("title"),t=typeof this._element.getAttribute("data-bs-original-title");(e||"string"!==t)&&(this._element.setAttribute("data-bs-original-title",e||""),!e||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusin"===e.type?zo:Wo]=!0),t.getTipElement().classList.contains(jo)||t._hoverState===Mo?t._hoverState=Mo:(clearTimeout(t._timeout),t._hoverState=Mo,t._config.delay&&t._config.delay.show?t._timeout=setTimeout((()=>{t._hoverState===Mo&&t.show()}),t._config.delay.show):t.show())}_leave(e,t){t=this._initializeOnDelegatedTarget(e,t),e&&(t._activeTrigger["focusout"===e.type?zo:Wo]=t._element.contains(e.relatedTarget)),t._isWithActiveTrigger()||(clearTimeout(t._timeout),t._hoverState=qo,t._config.delay&&t._config.delay.hide?t._timeout=setTimeout((()=>{t._hoverState===qo&&t.hide()}),t._config.delay.hide):t.hide())}_isWithActiveTrigger(){for(const e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){const t=de.getDataAttributes(this._element);return Object.keys(t).forEach((e=>{Lo.has(e)&&delete t[e]})),(e={...this.constructor.Default,...t,..."object"==typeof e&&e?e:{}}).container=!1===e.container?document.body:u(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),h(ko,e,this.constructor.DefaultType),e.sanitize&&(e.template=Co(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){const e={};for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e}_cleanTipClass(){const e=this.getTipElement(),t=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=e.getAttribute("class").match(t);null!==i&&i.length>0&&i.map((e=>e.trim())).forEach((t=>e.classList.remove(t)))}_getBasicClassPrefix(){return Io}_handlePopperPlacementChange(e){const{state:t}=e;t&&(this.tip=t.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(t.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(e){return this.each((function(){const t=Ko.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}E(Ko);const Qo="popover",Xo=".bs.popover",Yo="bs-popover",Jo={...Ko.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Go={...Ko.DefaultType,content:"(string|element|function)"},Zo={HIDE:`hide${Xo}`,HIDDEN:`hidden${Xo}`,SHOW:`show${Xo}`,SHOWN:`shown${Xo}`,INSERTED:`inserted${Xo}`,CLICK:`click${Xo}`,FOCUSIN:`focusin${Xo}`,FOCUSOUT:`focusout${Xo}`,MOUSEENTER:`mouseenter${Xo}`,MOUSELEAVE:`mouseleave${Xo}`},er=".popover-header",tr=".popover-body";class ir extends Ko{static get Default(){return Jo}static get NAME(){return Qo}static get Event(){return Zo}static get DefaultType(){return Go}isWithContent(){return this.getTitle()||this._getContent()}setContent(e){this._sanitizeAndSetContent(e,this.getTitle(),er),this._sanitizeAndSetContent(e,this._getContent(),tr)}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return Yo}static jQueryInterface(e){return this.each((function(){const t=ir.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}E(ir);const nr="scrollspy",sr=".bs.scrollspy",or={offset:10,method:"auto",target:""},rr={offset:"number",method:"string",target:"(string|element)"},ar=`activate${sr}`,lr=`scroll${sr}`,cr=`load${sr}.data-api`,dr="dropdown-item",ur="active",hr='[data-bs-spy="scroll"]',pr=".nav, .list-group",fr=".nav-link",gr=".nav-item",mr=".list-group-item",vr=`${fr}, ${mr}, .${dr}`,_r=".dropdown",br=".dropdown-toggle",yr="offset",wr="position";class Er extends Q{constructor(e,t){super(e),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(t),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,z.on(this._scrollElement,lr,(()=>this._process())),this.refresh(),this._process()}static get Default(){return or}static get NAME(){return nr}refresh(){const e=this._scrollElement===this._scrollElement.window?yr:wr,t="auto"===this._config.method?e:this._config.method,i=t===wr?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),he.find(vr,this._config.target).map((e=>{const n=r(e),s=n?he.findOne(n):null;if(s){const e=s.getBoundingClientRect();if(e.width||e.height)return[de[t](s).top+i,n]}return null})).filter((e=>e)).sort(((e,t)=>e[0]-t[0])).forEach((e=>{this._offsets.push(e[0]),this._targets.push(e[1])}))}dispose(){z.off(this._scrollElement,sr),super.dispose()}_getConfig(e){return(e={...or,...de.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}}).target=u(e.target)||document.documentElement,h(nr,e,rr),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){const e=this._targets[this._targets.length-1];this._activeTarget!==e&&this._activate(e)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let t=this._offsets.length;t--;)this._activeTarget!==this._targets[t]&&e>=this._offsets[t]&&(void 0===this._offsets[t+1]||e<this._offsets[t+1])&&this._activate(this._targets[t])}}_activate(e){this._activeTarget=e,this._clear();const t=vr.split(",").map((t=>`${t}[data-bs-target="${e}"],${t}[href="${e}"]`)),i=he.findOne(t.join(","),this._config.target);i.classList.add(ur),i.classList.contains(dr)?he.findOne(br,i.closest(_r)).classList.add(ur):he.parents(i,pr).forEach((e=>{he.prev(e,`${fr}, ${mr}`).forEach((e=>e.classList.add(ur))),he.prev(e,gr).forEach((e=>{he.children(e,fr).forEach((e=>e.classList.add(ur)))}))})),z.trigger(this._scrollElement,ar,{relatedTarget:e})}_clear(){he.find(vr,this._config.target).filter((e=>e.classList.contains(ur))).forEach((e=>e.classList.remove(ur)))}static jQueryInterface(e){return this.each((function(){const t=Er.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}z.on(window,cr,(()=>{he.find(hr).forEach((e=>new Er(e)))})),E(Er);const Or="tab",Ar=".bs.tab",xr=`hide${Ar}`,Sr=`hidden${Ar}`,Cr=`show${Ar}`,kr=`shown${Ar}`,Tr=`click${Ar}.data-api`,Ir="dropdown-menu",Lr="active",Nr="fade",$r="show",Dr=".dropdown",Pr=".nav, .list-group",Fr=".active",jr=":scope > li > .active",Mr='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',qr=".dropdown-toggle",Rr=":scope > .dropdown-menu .active";class Hr extends Q{static get NAME(){return Or}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Lr))return;let e;const t=a(this._element),i=this._element.closest(Pr);if(i){const t="UL"===i.nodeName||"OL"===i.nodeName?jr:Fr;e=he.find(t,i),e=e[e.length-1]}const n=e?z.trigger(e,xr,{relatedTarget:this._element}):null;if(z.trigger(this._element,Cr,{relatedTarget:e}).defaultPrevented||null!==n&&n.defaultPrevented)return;this._activate(this._element,i);const s=()=>{z.trigger(e,Sr,{relatedTarget:this._element}),z.trigger(this._element,kr,{relatedTarget:e})};t?this._activate(t,t.parentNode,s):s()}_activate(e,t,i){const n=(!t||"UL"!==t.nodeName&&"OL"!==t.nodeName?he.children(t,Fr):he.find(jr,t))[0],s=i&&n&&n.classList.contains(Nr),o=()=>this._transitionComplete(e,n,i);n&&s?(n.classList.remove($r),this._queueCallback(o,e,!0)):o()}_transitionComplete(e,t,i){if(t){t.classList.remove(Lr);const e=he.findOne(Rr,t.parentNode);e&&e.classList.remove(Lr),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!1)}e.classList.add(Lr),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),v(e),e.classList.contains(Nr)&&e.classList.add($r);let n=e.parentNode;if(n&&"LI"===n.nodeName&&(n=n.parentNode),n&&n.classList.contains(Ir)){const t=e.closest(Dr);t&&he.find(qr,t).forEach((e=>e.classList.add(Lr))),e.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(e){return this.each((function(){const t=Hr.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}z.on(document,Tr,Mr,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),f(this)||Hr.getOrCreateInstance(this).show()})),E(Hr);const Br="toast",Wr=".bs.toast",zr=`mouseover${Wr}`,Vr=`mouseout${Wr}`,Ur=`focusin${Wr}`,Kr=`focusout${Wr}`,Qr=`hide${Wr}`,Xr=`hidden${Wr}`,Yr=`show${Wr}`,Jr=`shown${Wr}`,Gr="fade",Zr="hide",ea="show",ta="showing",ia={animation:"boolean",autohide:"boolean",delay:"number"},na={animation:!0,autohide:!0,delay:5e3};class sa extends Q{constructor(e,t){super(e),this._config=this._getConfig(t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ia}static get Default(){return na}static get NAME(){return Br}show(){if(z.trigger(this._element,Yr).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(Gr);const e=()=>{this._element.classList.remove(ta),z.trigger(this._element,Jr),this._maybeScheduleHide()};this._element.classList.remove(Zr),v(this._element),this._element.classList.add(ea),this._element.classList.add(ta),this._queueCallback(e,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(ea))return;if(z.trigger(this._element,Qr).defaultPrevented)return;const e=()=>{this._element.classList.add(Zr),this._element.classList.remove(ta),this._element.classList.remove(ea),z.trigger(this._element,Xr)};this._element.classList.add(ta),this._queueCallback(e,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(ea)&&this._element.classList.remove(ea),super.dispose()}_getConfig(e){return e={...na,...de.getDataAttributes(this._element),..."object"==typeof e&&e?e:{}},h(Br,e,this.constructor.DefaultType),e}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=t;break;case"focusin":case"focusout":this._hasKeyboardInteraction=t}if(t)return void this._clearTimeout();const i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){z.on(this._element,zr,(e=>this._onInteraction(e,!0))),z.on(this._element,Vr,(e=>this._onInteraction(e,!1))),z.on(this._element,Ur,(e=>this._onInteraction(e,!0))),z.on(this._element,Kr,(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=sa.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return X(sa),E(sa),{Alert:ie,Button:ae,Carousel:nt,Collapse:At,Dropdown:us,Modal:io,Offcanvas:wo,Popover:ir,ScrollSpy:Er,Tab:Hr,Toast:sa,Tooltip:Ko}}()},6035:function(e){var t;t=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t){function i(e){return function(e){if(Array.isArray(e)){for(var t=0,i=new Array(e.length);t<e.length;t++)i[t]=e[t];return i}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(t){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.form=t,this.isDirty=!1,this.initialValues={},this.fields=[].concat(i(this.form.elements),i(this.form.querySelectorAll("trix-editor"))),this.message=s.message||"You have unsaved changes!",this.setupFields(),this.setFormHandlers()}var t,o,r;return t=e,(o=[{key:"setupFields",value:function(){var e=this;this.fields.forEach((function(t){t.name&&"submit"!=t.type&&"button"!=t.type&&"hidden"!=t.type&&(e.initialValues[t.name]=t.value,"TRIX-EDITOR"==t.nodeName?t.addEventListener("trix-change",e.checkValue.bind(e)):(t.addEventListener("change",e.checkValue.bind(e)),t.addEventListener("input",e.checkValue.bind(e))))}))}},{key:"setFormHandlers",value:function(){var e=this;window.addEventListener("submit",this.handleSubmit.bind(this)),this.form.addEventListener("submit",this.handleSubmit.bind(this)),window.onbeforeunload=function(){if(e.isDirty)return e.message},"undefined"!=typeof Turbolinks&&document.addEventListener("turbolinks:before-visit",(function(t){e.isDirty&&!confirm(e.message)?t.preventDefault():e.isDirty=!1}))}},{key:"checkValue",value:function(e){var t=e.target;this.initialValues[t.name]!=t.value&&(this.isDirty=!0)}},{key:"handleSubmit",value:function(){this.isDirty=!1}}])&&s(t.prototype,o),r&&s(t,r),e}();e.exports=o}])},e.exports=t()},312:(e,t,i)=>{"use strict";i.r(t)},6416:function(e){e.exports=function(){"use strict";function e(e,t){e.split(/\s+/).forEach((e=>{t(e)}))}class t{constructor(){this._events={}}on(t,i){e(t,(e=>{this._events[e]=this._events[e]||[],this._events[e].push(i)}))}off(t,i){var n=arguments.length;0!==n?e(t,(e=>{if(1===n)return delete this._events[e];e in this._events!=0&&this._events[e].splice(this._events[e].indexOf(i),1)})):this._events={}}trigger(t,...i){var n=this;e(t,(e=>{if(e in n._events!=0)for(let t of n._events[e])t.apply(n,i)}))}}var i;const n=new RegExp("[̀-ͯ·ʾ]","g");var s;const o={æ:"ae",ⱥ:"a",ø:"o"},r=new RegExp(Object.keys(o).join("|"),"g"),a=[[67,67],[160,160],[192,438],[452,652],[961,961],[1019,1019],[1083,1083],[1281,1289],[1984,1984],[5095,5095],[7429,7441],[7545,7549],[7680,7935],[8580,8580],[9398,9449],[11360,11391],[42792,42793],[42802,42851],[42873,42897],[42912,42922],[64256,64260],[65313,65338],[65345,65370]],l=e=>e.normalize("NFKD").replace(n,"").toLowerCase().replace(r,(function(e){return o[e]})),c=(e,t="|")=>{if(1==e.length)return e[0];var i=1;return e.forEach((e=>{i=Math.max(i,e.length)})),1==i?"["+e.join("")+"]":"(?:"+e.join(t)+")"},d=e=>{if(1===e.length)return[[e]];var t=[];return d(e.substring(1)).forEach((function(i){var n=i.slice(0);n[0]=e.charAt(0)+n[0],t.push(n),(n=i.slice(0)).unshift(e.charAt(0)),t.push(n)})),t},u=e=>(void 0===s&&(s=(()=>{var e={};a.forEach((t=>{for(let n=t[0];n<=t[1];n++){let t=String.fromCharCode(n),s=l(t);if(s!=t.toLowerCase()){s in e||(e[s]=[s]);var i=new RegExp(c(e[s]),"iu");t.match(i)||e[s].push(t)}}}));var t=Object.keys(e);t=t.sort(((e,t)=>t.length-e.length)),i=new RegExp("("+c(t)+"[̀-ͯ·ʾ]*)","g");var n={};return t.sort(((e,t)=>e.length-t.length)).forEach((t=>{var i=d(t).map((t=>(t=t.map((t=>e.hasOwnProperty(t)?c(e[t]):t)),c(t,""))));n[t]=c(i)})),n})()),e.normalize("NFKD").toLowerCase().split(i).map((e=>{if(""==e)return"";const t=l(e);if(s.hasOwnProperty(t))return s[t];const i=e.normalize("NFC");return i!=e?c([e,i]):e})).join("")),h=(e,t)=>{if(e)return e[t]},p=(e,t)=>{if(e){for(var i,n=t.split(".");(i=n.shift())&&(e=e[i]););return e}},f=(e,t,i)=>{var n,s;return e?-1===(s=(e+="").search(t.regex))?0:(n=t.string.length/e.length,0===s&&(n+=.5),n*i):0},g=e=>(e+"").replace(/([\$\(-\+\.\?\[-\^\{-\}])/g,"\\$1"),m=(e,t)=>{var i=e[t];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(e[t]=[i])},v=(e,t)=>{if(Array.isArray(e))e.forEach(t);else for(var i in e)e.hasOwnProperty(i)&&t(e[i],i)},_=(e,t)=>"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=l(e+"").toLowerCase())>(t=l(t+"").toLowerCase())?1:t>e?-1:0;class b{constructor(e,t){this.items=e,this.settings=t||{diacritics:!0}}tokenize(e,t,i){if(!e||!e.length)return[];const n=[],s=e.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(g).join("|")+"):(.*)$")),s.forEach((e=>{let i,s=null,r=null;o&&(i=e.match(o))&&(s=i[1],e=i[2]),e.length>0&&(r=g(e),this.settings.diacritics&&(r=u(r)),t&&(r="\\b"+r)),n.push({string:e,regex:r?new RegExp(r,"iu"):null,field:s})})),n}getScoreFunction(e,t){var i=this.prepareSearch(e,t);return this._getScoreFunction(i)}_getScoreFunction(e){const t=e.tokens,i=t.length;if(!i)return function(){return 0};const n=e.options.fields,s=e.weights,o=n.length,r=e.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(e,t){const i=n[0].field;return f(r(t,i),e,s[i])}:function(e,t){var i=0;if(e.field){const n=r(t,e.field);!e.regex&&n?i+=1/o:i+=f(n,e,1)}else v(s,((n,s)=>{i+=f(r(t,s),e,n)}));return i/o};return 1===i?function(e){return a(t[0],e)}:"and"===e.options.conjunction?function(e){for(var n,s=0,o=0;s<i;s++){if((n=a(t[s],e))<=0)return 0;o+=n}return o/i}:function(e){var n=0;return v(t,(t=>{n+=a(t,e)})),n/i}}getSortFunction(e,t){var i=this.prepareSearch(e,t);return this._getSortFunction(i)}_getSortFunction(e){var t,i,n;const s=this,o=e.options,r=!e.query&&o.sort_empty?o.sort_empty:o.sort,a=[],l=[];if("function"==typeof r)return r.bind(this);const c=function(t,i){return"$score"===t?i.score:e.getAttrFn(s.items[i.id],t)};if(r)for(t=0,i=r.length;t<i;t++)(e.query||"$score"!==r[t].field)&&a.push(r[t]);if(e.query){for(n=!0,t=0,i=a.length;t<i;t++)if("$score"===a[t].field){n=!1;break}n&&a.unshift({field:"$score",direction:"desc"})}else for(t=0,i=a.length;t<i;t++)if("$score"===a[t].field){a.splice(t,1);break}for(t=0,i=a.length;t<i;t++)l.push("desc"===a[t].direction?-1:1);const d=a.length;if(d){if(1===d){const e=a[0].field,t=l[0];return function(i,n){return t*_(c(e,i),c(e,n))}}return function(e,t){var i,n,s;for(i=0;i<d;i++)if(s=a[i].field,n=l[i]*_(c(s,e),c(s,t)))return n;return 0}}return null}prepareSearch(e,t){const i={};var n=Object.assign({},t);if(m(n,"sort"),m(n,"sort_empty"),n.fields){m(n,"fields");const e=[];n.fields.forEach((t=>{"string"==typeof t&&(t={field:t,weight:1}),e.push(t),i[t.field]="weight"in t?t.weight:1})),n.fields=e}return{options:n,query:e.toLowerCase().trim(),tokens:this.tokenize(e,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?p:h}}search(e,t){var i,n,s=this;n=this.prepareSearch(e,t),t=n.options,e=n.query;const o=t.score||s._getScoreFunction(n);e.length?v(s.items,((e,s)=>{i=o(e),(!1===t.filter||i>0)&&n.items.push({score:i,id:s})})):v(s.items,((e,t)=>{n.items.push({score:1,id:t})}));const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof t.limit&&(n.items=n.items.slice(0,t.limit)),n}}const y=e=>{if(e.jquery)return e[0];if(e instanceof HTMLElement)return e;if(e.indexOf("<")>-1){let t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild}return document.querySelector(e)},w=(e,t)=>{var i=document.createEvent("HTMLEvents");i.initEvent(t,!0,!1),e.dispatchEvent(i)},E=(e,t)=>{Object.assign(e.style,t)},O=(e,...t)=>{var i=x(t);(e=S(e)).map((e=>{i.map((t=>{e.classList.add(t)}))}))},A=(e,...t)=>{var i=x(t);(e=S(e)).map((e=>{i.map((t=>{e.classList.remove(t)}))}))},x=e=>{var t=[];return v(e,(e=>{"string"==typeof e&&(e=e.trim().split(/[\11\12\14\15\40]/)),Array.isArray(e)&&(t=t.concat(e))})),t.filter(Boolean)},S=e=>(Array.isArray(e)||(e=[e]),e),C=(e,t,i)=>{if(!i||i.contains(e))for(;e&&e.matches;){if(e.matches(t))return e;e=e.parentNode}},k=(e,t=0)=>t>0?e[e.length-1]:e[0],T=(e,t)=>{if(!e)return-1;t=t||e.nodeName;for(var i=0;e=e.previousElementSibling;)e.matches(t)&&i++;return i},I=(e,t)=>{v(t,((t,i)=>{null==t?e.removeAttribute(i):e.setAttribute(i,""+t)}))},L=(e,t)=>{e.parentNode&&e.parentNode.replaceChild(t,e)},N=(e,t)=>{if(null===t)return;if("string"==typeof t){if(!t.length)return;t=new RegExp(t,"i")}const i=e=>3===e.nodeType?(e=>{var i=e.data.match(t);if(i&&e.data.length>0){var n=document.createElement("span");n.className="highlight";var s=e.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),L(s,n),1}return 0})(e):((e=>{if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var t=0;t<e.childNodes.length;++t)t+=i(e.childNodes[t])})(e),0);i(e)},D="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey";var P={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(e){return e.length>0},render:{}};const F=e=>null==e?null:j(e),j=e=>"boolean"==typeof e?e?"1":"0":e+"",M=e=>(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),q=(e,t)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout((function(){i=null,o.loadedSearches[n]=!0,e.call(o,n,s)}),t)}},R=(e,t,i)=>{var n,s=e.trigger,o={};for(n in e.trigger=function(){var i=arguments[0];if(-1===t.indexOf(i))return s.apply(e,arguments);o[i]=arguments},i.apply(e,[]),e.trigger=s,o)s.apply(e,o[n])},H=(e,t=!1)=>{e&&(e.preventDefault(),t&&e.stopPropagation())},B=(e,t,i,n)=>{e.addEventListener(t,i,n)},W=(e,t)=>!!t&&!!t[e]&&1==(t.altKey?1:0)+(t.ctrlKey?1:0)+(t.shiftKey?1:0)+(t.metaKey?1:0),z=(e,t)=>e.getAttribute("id")||(e.setAttribute("id",t),t),V=e=>e.replace(/[\\"']/g,"\\$&"),U=(e,t)=>{t&&e.append(t)};function K(e,t){var i=Object.assign({},P,t),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=e.tagName.toLowerCase(),u=e.getAttribute("placeholder")||e.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let t=e.querySelector('option[value=""]');t&&(u=t.textContent)}var h,p,f,g,m,_,b={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===d?(p=b.options,f={},g=1,m=e=>{var t=Object.assign({},e.dataset),i=n&&t[n];return"string"==typeof i&&i.length&&(t=Object.assign(t,JSON.parse(i))),t},_=(e,t)=>{var n=F(e.value);if(null!=n&&(n||i.allowEmptyOption)){if(f.hasOwnProperty(n)){if(t){var l=f[n][a];l?Array.isArray(l)?l.push(t):f[n][a]=[l,t]:f[n][a]=t}}else{var c=m(e);c[s]=c[s]||e.textContent,c[o]=c[o]||n,c[r]=c[r]||e.disabled,c[a]=c[a]||t,c.$option=e,f[n]=c,p.push(c)}e.selected&&b.items.push(n)}},b.maxItems=e.hasAttribute("multiple")?null:1,v(e.children,(e=>{var t,i,n;"optgroup"===(h=e.tagName.toLowerCase())?((n=m(t=e))[l]=n[l]||t.getAttribute("label")||"",n[c]=n[c]||g++,n[r]=n[r]||t.disabled,b.optgroups.push(n),i=n[c],v(t.children,(e=>{_(e,i)}))):"option"===h&&_(e)}))):(()=>{const t=e.getAttribute(n);if(t)b.options=JSON.parse(t),v(b.options,(e=>{b.items.push(e[o])}));else{var r=e.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const t=r.split(i.delimiter);v(t,(e=>{const t={};t[s]=e,t[o]=e,b.options.push(t)})),b.items=t}})(),Object.assign({},P,b,t)}var Q=0;class X extends(function(e){return e.plugins={},class extends e{constructor(...e){super(...e),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(t,i){e.plugins[t]={name:t,fn:i}}initializePlugins(e){var t,i;const n=this,s=[];if(Array.isArray(e))e.forEach((e=>{"string"==typeof e?s.push(e):(n.plugins.settings[e.name]=e.options,s.push(e.name))}));else if(e)for(t in e)e.hasOwnProperty(t)&&(n.plugins.settings[t]=e[t],s.push(t));for(;i=s.shift();)n.require(i)}loadPlugin(t){var i=this,n=i.plugins,s=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');n.requested[t]=!0,n.loaded[t]=s.fn.apply(i,[i.plugins.settings[t]||{}]),n.names.push(t)}require(e){var t=this,i=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(i.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return i.loaded[e]}}}(t)){constructor(e,t){var i;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],Q++;var n=y(e);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=K(n,t);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=z(n,"tomselect-"+Q),this.isRequired=n.required,this.sifter=new b(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=e=>o.test(e):s.createFilter=()=>!0),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=y("<div>"),a=y("<div>"),l=this._render("dropdown"),c=y('<div role="listbox" tabindex="-1">'),d=this.input.getAttribute("class")||"",u=s.mode;var h;O(r,s.wrapperClass,d,u),O(a,s.controlClass),U(r,a),O(l,s.dropdownClass,u),s.copyClassesToDropdown&&O(l,d),O(c,s.dropdownContentClass),U(l,c),y(s.dropdownParent||r).appendChild(l),s.hasOwnProperty("controlInput")?s.controlInput?(h=y(s.controlInput),this.focus_node=h):(h=y("<input/>"),this.focus_node=a):(h=y('<input type="text" autocomplete="off" size="1" />'),v(["autocorrect","autocapitalize","autocomplete"],(e=>{n.getAttribute(e)&&I(h,{[e]:n.getAttribute(e)})})),h.tabIndex=-1,a.appendChild(h),this.focus_node=h),this.wrapper=r,this.dropdown=l,this.dropdown_content=c,this.control=a,this.control_input=h,this.setup()}setup(){const e=this,t=e.settings,i=e.control_input,n=e.dropdown,s=e.dropdown_content,o=e.wrapper,r=e.control,a=e.input,l=e.focus_node,c={passive:!0},d=e.inputId+"-ts-dropdown";I(s,{id:d}),I(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":d});const u=z(l,e.inputId+"-ts-control"),h="label[for='"+(e=>e.replace(/['"\\]/g,"\\$&"))(e.inputId)+"']",p=document.querySelector(h),f=e.focus.bind(e);if(p){B(p,"click",f),I(p,{for:u});const t=z(p,e.inputId+"-ts-label");I(l,{"aria-labelledby":t}),I(s,{"aria-labelledby":t})}if(o.style.width=a.style.width,e.plugins.names.length){const t="plugin-"+e.plugins.names.join(" plugin-");O([o,n],t)}(null===t.maxItems||t.maxItems>1)&&e.is_select_tag&&I(a,{multiple:"multiple"}),e.settings.placeholder&&I(i,{placeholder:t.placeholder}),!e.settings.splitOn&&e.settings.delimiter&&(e.settings.splitOn=new RegExp("\\s*"+g(e.settings.delimiter)+"+\\s*")),t.load&&t.loadThrottle&&(t.load=q(t.load,t.loadThrottle)),e.control_input.type=a.type,B(n,"click",(t=>{const i=C(t.target,"[data-selectable]");i&&(e.onOptionSelect(t,i),H(t,!0))})),B(r,"click",(t=>{var n=C(t.target,"[data-ts-item]",r);n&&e.onItemSelect(t,n)?H(t,!0):""==i.value&&(e.onClick(),H(t,!0))})),B(i,"mousedown",(e=>{""!==i.value&&e.stopPropagation()})),B(l,"keydown",(t=>e.onKeyDown(t))),B(i,"keypress",(t=>e.onKeyPress(t))),B(i,"input",(t=>e.onInput(t))),B(l,"resize",(()=>e.positionDropdown()),c),B(l,"blur",(t=>e.onBlur(t))),B(l,"focus",(t=>e.onFocus(t))),B(l,"paste",(t=>e.onPaste(t)));const m=t=>{const i=t.composedPath()[0];if(!o.contains(i)&&!n.contains(i))return e.isFocused&&e.blur(),void e.inputState();H(t,!0)};var v=()=>{e.isOpen&&e.positionDropdown()};B(document,"mousedown",m),B(window,"scroll",v,c),B(window,"resize",v,c),this._destroy=()=>{document.removeEventListener("mousedown",m),window.removeEventListener("sroll",v),window.removeEventListener("resize",v),p&&p.removeEventListener("click",f)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",e.wrapper),e.sync(!1),t.items=[],delete t.optgroups,delete t.options,B(a,"invalid",(t=>{e.isValid&&(e.isValid=!1,e.isInvalid=!0,e.refreshState())})),e.updateOriginalInput(),e.refreshItems(),e.close(!1),e.inputState(),e.isSetup=!0,a.disabled?e.disable():e.enable(),e.on("change",this.onChange),O(a,"tomselected","ts-hidden-accessible"),e.trigger("initialize"),!0===t.preload&&e.preload()}setupOptions(e=[],t=[]){this.addOptions(e),v(t,(e=>{this.registerOptionGroup(e)}))}setupTemplates(){var e=this,t=e.settings.labelField,i=e.settings.optgroupLabelField,n={optgroup:e=>{let t=document.createElement("div");return t.className="optgroup",t.appendChild(e.options),t},optgroup_header:(e,t)=>'<div class="optgroup-header">'+t(e[i])+"</div>",option:(e,i)=>"<div>"+i(e[t])+"</div>",item:(e,i)=>"<div>"+i(e[t])+"</div>",option_create:(e,t)=>'<div class="create">Add <strong>'+t(e.input)+"</strong>…</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};e.settings.render=Object.assign({},n,e.settings.render)}setupCallbacks(){var e,t,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in i)(t=this.settings[i[e]])&&this.on(e,t)}sync(e=!0){const t=this,i=e?K(t.input,{delimiter:t.settings.delimiter}):t.settings;t.setupOptions(i.options,i.optgroups),t.setValue(i.items,!0),t.lastQuery=null}onClick(){var e=this;if(e.activeItems.length>0)return e.clearActiveItems(),void e.focus();e.isFocused&&e.isOpen?e.blur():e.focus()}onMouseDown(){}onChange(){w(this.input,"input"),w(this.input,"change")}onPaste(e){var t=this;t.isFull()||t.isInputHidden||t.isLocked?H(e):t.settings.splitOn&&setTimeout((()=>{var e=t.inputValue();if(e.match(t.settings.splitOn)){var i=e.trim().split(t.settings.splitOn);v(i,(e=>{t.createItem(e)}))}}),0)}onKeyPress(e){var t=this;if(!t.isLocked){var i=String.fromCharCode(e.keyCode||e.which);return t.settings.create&&"multi"===t.settings.mode&&i===t.settings.delimiter?(t.createItem(),void H(e)):void 0}H(e)}onKeyDown(e){var t=this;if(t.isLocked)9!==e.keyCode&&H(e);else{switch(e.keyCode){case 65:if(W(D,e))return void t.selectAll();break;case 27:return t.isOpen&&(H(e,!0),t.close()),void t.clearActiveItems();case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.activeOption){let e=t.getAdjacent(t.activeOption,1);e&&t.setActiveOption(e)}return void H(e);case 38:if(t.activeOption){let e=t.getAdjacent(t.activeOption,-1);e&&t.setActiveOption(e)}return void H(e);case 13:return void(t.isOpen&&t.activeOption?(t.onOptionSelect(e,t.activeOption),H(e)):t.settings.create&&t.createItem()&&H(e));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return void(t.settings.selectOnTab&&(t.isOpen&&t.activeOption&&(t.onOptionSelect(e,t.activeOption),H(e)),t.settings.create&&t.createItem()&&H(e)));case 8:case 46:return void t.deleteSelection(e)}t.isInputHidden&&!W(D,e)&&H(e)}}onInput(e){var t=this;if(!t.isLocked){var i=t.inputValue();t.lastValue!==i&&(t.lastValue=i,t.settings.shouldLoad.call(t,i)&&t.load(i),t.refreshOptions(),t.trigger("type",i))}}onFocus(e){var t=this,i=t.isFocused;if(t.isDisabled)return t.blur(),void H(e);t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.preload(),i||t.trigger("focus"),t.activeItems.length||(t.showInput(),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())}onBlur(e){if(!1!==document.hasFocus()){var t=this;if(t.isFocused){t.isFocused=!1,t.ignoreFocus=!1;var i=()=>{t.close(),t.setActiveItem(),t.setCaret(t.items.length),t.trigger("blur")};t.settings.create&&t.settings.createOnBlur?t.createItem(null,!1,i):i()}}}onOptionSelect(e,t){var i,n=this;t&&(t.parentElement&&t.parentElement.matches("[data-disabled]")||(t.classList.contains("create")?n.createItem(null,!0,(()=>{n.settings.closeAfterSelect&&n.close()})):void 0!==(i=t.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&e.type&&/click/.test(e.type)&&n.setActiveOption(t))))}onItemSelect(e,t){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(H(e),i.setActiveItem(t,e),!0)}canLoad(e){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(e)}load(e){const t=this;if(!t.canLoad(e))return;O(t.wrapper,t.settings.loadingClass),t.loading++;const i=t.loadCallback.bind(t);t.settings.load.call(t,e,i)}loadCallback(e,t){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(e,t),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||A(i.wrapper,i.settings.loadingClass),i.trigger("load",e,t)}preload(){var e=this.wrapper.classList;e.contains("preloaded")||(e.add("preloaded"),this.load(""))}setTextboxValue(e=""){var t=this.control_input;t.value!==e&&(t.value=e,w(t,"update"),this.lastValue=e)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(e,t){R(this,t?[]:["change"],(()=>{this.clear(t),this.addItems(e,t)}))}setMaxItems(e){0===e&&(e=null),this.settings.maxItems=e,this.refreshState()}setActiveItem(e,t){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!e)return l.clearActiveItems(),void(l.isFocused&&l.showInput());if("click"===(i=t&&t.type.toLowerCase())&&W("shiftKey",t)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,e))&&(r=s,s=o,o=r),n=s;n<=o;n++)e=l.control.children[n],-1===l.activeItems.indexOf(e)&&l.setActiveItemClass(e);H(t)}else"click"===i&&W(D,t)||"keydown"===i&&W("shiftKey",t)?e.classList.contains("active")?l.removeActiveItem(e):l.setActiveItemClass(e):(l.clearActiveItems(),l.setActiveItemClass(e));l.hideInput(),l.isFocused||l.focus()}}setActiveItemClass(e){const t=this,i=t.control.querySelector(".last-active");i&&A(i,"last-active"),O(e,"active last-active"),t.trigger("item_select",e),-1==t.activeItems.indexOf(e)&&t.activeItems.push(e)}removeActiveItem(e){var t=this.activeItems.indexOf(e);this.activeItems.splice(t,1),A(e,"active")}clearActiveItems(){A(this.activeItems,"active"),this.activeItems=[]}setActiveOption(e){e!==this.activeOption&&(this.clearActiveOption(),e&&(this.activeOption=e,I(this.focus_node,{"aria-activedescendant":e.getAttribute("id")}),I(e,{"aria-selected":"true"}),O(e,"active"),this.scrollToOption(e)))}scrollToOption(e,t){if(!e)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=e.offsetHeight,r=e.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,t):r<s&&this.scroll(r,t)}scroll(e,t){const i=this.dropdown_content;t&&(i.style.scrollBehavior=t),i.scrollTop=e,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(A(this.activeOption,"active"),I(this.activeOption,{"aria-selected":null})),this.activeOption=null,I(this.focus_node,{"aria-activedescendant":null})}selectAll(){"single"!==this.settings.mode&&(this.activeItems=this.controlChildren(),this.activeItems.length&&(O(this.activeItems,"active"),this.hideInput(),this.close()),this.focus())}inputState(){var e=this;e.control.contains(e.control_input)&&(I(e.control_input,{placeholder:e.settings.placeholder}),e.activeItems.length>0||!e.isFocused&&e.settings.hidePlaceholder&&e.items.length>0?(e.setTextboxValue(),e.isInputHidden=!0):(e.settings.hidePlaceholder&&e.items.length>0&&I(e.control_input,{placeholder:""}),e.isInputHidden=!1),e.wrapper.classList.toggle("input-hidden",e.isInputHidden))}hideInput(){this.inputState()}showInput(){this.inputState()}inputValue(){return this.control_input.value.trim()}focus(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.focus_node.focus(),setTimeout((()=>{e.ignoreFocus=!1,e.onFocus()}),0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())}getSearchOptions(){var e=this.settings,t=e.sortField;return"string"==typeof e.sortField&&(t=[{field:e.sortField}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting}}search(e){var t,i,n,s=this,o=this.getSearchOptions();if(s.settings.score&&"function"!=typeof(n=s.settings.score.call(s,e)))throw new Error('Tom Select "score" setting must be a function that returns a function');if(e!==s.lastQuery?(s.lastQuery=e,i=s.sifter.search(e,Object.assign(o,{score:n})),s.currentResults=i):i=Object.assign({},s.currentResults),s.settings.hideSelected)for(t=i.items.length-1;t>=0;t--){let e=F(i.items[t].id);e&&-1!==s.items.indexOf(e)&&i.items.splice(t,1)}return i}refreshOptions(e=!0){var t,i,n,s,o,r,a,l,c,d,u;const h={},p=[];var f,g=this,m=g.inputValue(),_=g.search(m),b=g.activeOption,y=g.settings.shouldOpen||!1,w=g.dropdown_content;for(b&&(c=b.dataset.value,d=b.closest("[data-group]")),s=_.items.length,"number"==typeof g.settings.maxOptions&&(s=Math.min(s,g.settings.maxOptions)),s>0&&(y=!0),t=0;t<s;t++){let e=_.items[t].id,s=g.options[e],a=g.getOption(e,!0);for(g.settings.hideSelected||a.classList.toggle("selected",g.items.includes(e)),o=s[g.settings.optgroupField]||"",i=0,n=(r=Array.isArray(o)?o:[o])&&r.length;i<n;i++)o=r[i],g.optgroups.hasOwnProperty(o)||(o=""),h.hasOwnProperty(o)||(h[o]=document.createDocumentFragment(),p.push(o)),i>0&&(a=a.cloneNode(!0),I(a,{id:s.$id+"-clone-"+i,"aria-selected":null}),a.classList.add("ts-cloned"),A(a,"active")),c==e&&d&&d.dataset.group===o&&(b=a),h[o].appendChild(a)}this.settings.lockOptgroupOrder&&p.sort(((e,t)=>(g.optgroups[e]&&g.optgroups[e].$order||0)-(g.optgroups[t]&&g.optgroups[t].$order||0))),a=document.createDocumentFragment(),v(p,(e=>{if(g.optgroups.hasOwnProperty(e)&&h[e].children.length){let t=document.createDocumentFragment(),i=g.render("optgroup_header",g.optgroups[e]);U(t,i),U(t,h[e]);let n=g.render("optgroup",{group:g.optgroups[e],options:t});U(a,n)}else U(a,h[e])})),w.innerHTML="",U(w,a),g.settings.highlight&&(f=w.querySelectorAll("span.highlight"),Array.prototype.forEach.call(f,(function(e){var t=e.parentNode;t.replaceChild(e.firstChild,e),t.normalize()})),_.query.length&&_.tokens.length&&v(_.tokens,(e=>{N(w,e.regex)})));var E=e=>{let t=g.render(e,{input:m});return t&&(y=!0,w.insertBefore(t,w.firstChild)),t};if(g.loading?E("loading"):g.settings.shouldLoad.call(g,m)?0===_.items.length&&E("no_results"):E("not_loading"),(l=g.canCreate(m))&&(u=E("option_create")),g.hasOptions=_.items.length>0||l,y){if(_.items.length>0){if(!w.contains(b)&&"single"===g.settings.mode&&g.items.length&&(b=g.getOption(g.items[0])),!w.contains(b)){let e=0;u&&!g.settings.addPrecedence&&(e=1),b=g.selectable()[e]}}else u&&(b=u);e&&!g.isOpen&&(g.open(),g.scrollToOption(b,"auto")),g.setActiveOption(b)}else g.clearActiveOption(),e&&g.isOpen&&g.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(e,t=!1){const i=this;if(Array.isArray(e))return i.addOptions(e,t),!1;const n=F(e[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(e.$order=e.$order||++i.order,e.$id=i.inputId+"-opt-"+e.$order,i.options[n]=e,i.lastQuery=null,t&&(i.userOptions[n]=t,i.trigger("option_add",n,e)),n)}addOptions(e,t=!1){v(e,(e=>{this.addOption(e,t)}))}registerOption(e){return this.addOption(e)}registerOptionGroup(e){var t=F(e[this.settings.optgroupValueField]);return null!==t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)}addOptionGroup(e,t){var i;t[this.settings.optgroupValueField]=e,(i=this.registerOptionGroup(t))&&this.trigger("optgroup_add",i,t)}removeOptionGroup(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.clearCache(),this.trigger("optgroup_remove",e))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(e,t){const i=this;var n,s;const o=F(e),r=F(t[i.settings.valueField]);if(null===o)return;if(!i.options.hasOwnProperty(o))return;if("string"!=typeof r)throw new Error("Value must be set in option data");const a=i.getOption(o),l=i.getItem(o);if(t.$order=t.$order||i.options[o].$order,delete i.options[o],i.uncacheValue(r),i.options[r]=t,a){if(i.dropdown_content.contains(a)){const e=i._render("option",t);L(a,e),i.activeOption===a&&i.setActiveOption(e)}a.remove()}l&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",t),l.classList.contains("active")&&O(n,"active"),L(l,n)),i.lastQuery=null}removeOption(e,t){const i=this;e=j(e),i.uncacheValue(e),delete i.userOptions[e],delete i.options[e],i.lastQuery=null,i.trigger("option_remove",e),i.removeItem(e,t)}clearOptions(){this.loadedSearches={},this.userOptions={},this.clearCache();var e={};v(this.options,((t,i)=>{this.items.indexOf(i)>=0&&(e[i]=this.options[i])})),this.options=this.sifter.items=e,this.lastQuery=null,this.trigger("option_clear")}getOption(e,t=!1){const i=F(e);if(null!==i&&this.options.hasOwnProperty(i)){const e=this.options[i];if(e.$div)return e.$div;if(t)return this._render("option",e)}return null}getAdjacent(e,t,i="option"){var n;if(!e)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i<n.length;i++)if(n[i]==e)return t>0?n[i+1]:n[i-1];return null}getItem(e){if("object"==typeof e)return e;var t=F(e);return null!==t?this.control.querySelector(`[data-value="${V(t)}"]`):null}addItems(e,t){var i=this,n=Array.isArray(e)?e:[e];for(let e=0,s=(n=n.filter((e=>-1===i.items.indexOf(e)))).length;e<s;e++)i.isPending=e<s-1,i.addItem(n[e],t)}addItem(e,t){R(this,t?[]:["change"],(()=>{var i,n;const s=this,o=s.settings.mode,r=F(e);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(t),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let e=s.getOption(r),t=s.getAdjacent(e,1);t&&s.setActiveOption(t)}s.isPending||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:t})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}}))}removeItem(e=null,t){const i=this;if(!(e=i.getItem(e)))return;var n,s;const o=e.dataset.value;n=T(e),e.remove(),e.classList.contains("active")&&(s=i.activeItems.indexOf(e),i.activeItems.splice(s,1),A(e,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,t),n<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:t}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,e)}createItem(e=null,t=!0,i=(()=>{})){var n,s=this,o=s.caretPos;if(e=e||s.inputValue(),!s.canCreate(e))return i(),!1;s.lock();var r=!1,a=e=>{if(s.unlock(),!e||"object"!=typeof e)return i();var n=F(e[s.settings.valueField]);if("string"!=typeof n)return i();s.setTextboxValue(),s.addOption(e,!0),s.setCaret(o),s.addItem(n),s.refreshOptions(t&&"single"!==s.settings.mode),i(e),r=!0};return n="function"==typeof s.settings.create?s.settings.create.call(this,e,a):{[s.settings.labelField]:e,[s.settings.valueField]:e},r||a(n),!0}refreshItems(){var e=this;e.lastQuery=null,e.isSetup&&e.addItems(e.items),e.updateOriginalInput(),e.refreshState()}refreshState(){const e=this;e.refreshValidityState();const t=e.isFull(),i=e.isLocked;e.wrapper.classList.toggle("rtl",e.rtl);const n=e.wrapper.classList;var s;n.toggle("focus",e.isFocused),n.toggle("disabled",e.isDisabled),n.toggle("required",e.isRequired),n.toggle("invalid",!e.isValid),n.toggle("locked",i),n.toggle("full",t),n.toggle("input-active",e.isFocused&&!e.isInputHidden),n.toggle("dropdown-active",e.isOpen),n.toggle("has-options",(s=e.options,0===Object.keys(s).length)),n.toggle("has-items",e.items.length>0)}refreshValidityState(){var e=this;e.input.checkValidity&&(e.isValid=e.input.checkValidity(),e.isInvalid=!e.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(e={}){const t=this;var i,n;const s=t.input.querySelector('option[value=""]');if(t.is_select_tag){const e=[];function o(i,n,o){return i||(i=y('<option value="'+M(n)+'">'+M(o)+"</option>")),i!=s&&t.input.append(i),e.push(i),i.selected=!0,i}t.input.querySelectorAll("option:checked").forEach((e=>{e.selected=!1})),0==t.items.length&&"single"==t.settings.mode?o(s,"",""):t.items.forEach((s=>{i=t.options[s],n=i[t.settings.labelField]||"",e.includes(i.$option)?o(t.input.querySelector(`option[value="${V(s)}"]:not(:checked)`),s,n):i.$option=o(i.$option,s,n)}))}else t.input.value=t.getValue();t.isSetup&&(e.silent||t.trigger("change",t.getValue()))}open(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.isOpen=!0,I(e.focus_node,{"aria-expanded":"true"}),e.refreshState(),E(e.dropdown,{visibility:"hidden",display:"block"}),e.positionDropdown(),E(e.dropdown,{visibility:"visible",display:"block"}),e.focus(),e.trigger("dropdown_open",e.dropdown))}close(e=!0){var t=this,i=t.isOpen;e&&(t.setTextboxValue(),"single"===t.settings.mode&&t.items.length&&t.hideInput()),t.isOpen=!1,I(t.focus_node,{"aria-expanded":"false"}),E(t.dropdown,{display:"none"}),t.settings.hideSelected&&t.clearActiveOption(),t.refreshState(),i&&t.trigger("dropdown_close",t.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var e=this.control,t=e.getBoundingClientRect(),i=e.offsetHeight+t.top+window.scrollY,n=t.left+window.scrollX;E(this.dropdown,{width:t.width+"px",top:i+"px",left:n+"px"})}}clear(e){var t=this;if(t.items.length){var i=t.controlChildren();v(i,(e=>{t.removeItem(e,!0)})),t.showInput(),e||t.updateOriginalInput(),t.trigger("clear")}}insertAtCaret(e){const t=this,i=t.caretPos,n=t.control;n.insertBefore(e,n.children[i]),t.setCaret(i+1)}deleteSelection(e){var t,i,n,s,o,r=this;t=e&&8===e.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=k(r.activeItems,t),n=T(s),t>0&&n++,v(r.activeItems,(e=>a.push(e)));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const e=r.controlChildren();t<0&&0===i.start&&0===i.length?a.push(e[r.caretPos-1]):t>0&&i.start===r.inputValue().length&&a.push(e[r.caretPos])}const l=a.map((e=>e.dataset.value));if(!l.length||"function"==typeof r.settings.onDelete&&!1===r.settings.onDelete.call(r,l,e))return!1;for(H(e,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.showInput(),r.positionDropdown(),r.refreshOptions(!1),!0}advanceSelection(e,t){var i,n,s=this;s.rtl&&(e*=-1),s.inputValue().length||(W(D,t)||W("shiftKey",t)?(n=(i=s.getLastActive(e))?i.classList.contains("active")?s.getAdjacent(i,e,"item"):i:e>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(e))}moveCaret(e){}getLastActive(e){let t=this.control.querySelector(".last-active");if(t)return t;var i=this.control.querySelectorAll(".active");return i?k(i,e):void 0}setCaret(e){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.close(),this.isLocked=!0,this.refreshState()}unlock(){this.isLocked=!1,this.refreshState()}disable(){var e=this;e.input.disabled=!0,e.control_input.disabled=!0,e.focus_node.tabIndex=-1,e.isDisabled=!0,e.lock()}enable(){var e=this;e.input.disabled=!1,e.control_input.disabled=!1,e.focus_node.tabIndex=e.tabIndex,e.isDisabled=!1,e.unlock()}destroy(){var e=this,t=e.revertSettings;e.trigger("destroy"),e.off(),e.wrapper.remove(),e.dropdown.remove(),e.input.innerHTML=t.innerHTML,e.input.tabIndex=t.tabIndex,A(e.input,"tomselected","ts-hidden-accessible"),e._destroy(),delete e.input.tomselect}render(e,t){return"function"!=typeof this.settings.render[e]?null:this._render(e,t)}_render(e,t){var i,n,s="";const o=this;return"option"!==e&&"item"!=e||(s=j(t[o.settings.valueField])),null==(n=o.settings.render[e].call(this,t,M))||(n=y(n),"option"===e||"option_create"===e?t[o.settings.disabledField]?I(n,{"aria-disabled":"true"}):I(n,{"data-selectable":""}):"optgroup"===e&&(i=t.group[o.settings.optgroupValueField],I(n,{"data-group":i}),t.group[o.settings.disabledField]&&I(n,{"data-disabled":""})),"option"!==e&&"item"!==e||(I(n,{"data-value":s}),"item"===e?(O(n,o.settings.itemClass),I(n,{"data-ts-item":""})):(O(n,o.settings.optionClass),I(n,{role:"option",id:t.$id}),o.options[s].$div=n))),n}clearCache(){v(this.options,((e,t)=>{e.$div&&(e.$div.remove(),delete e.$div)}))}uncacheValue(e){const t=this.getOption(e);t&&t.remove()}canCreate(e){return this.settings.create&&e.length>0&&this.settings.createFilter.call(this,e)}hook(e,t,i){var n=this,s=n[t];n[t]=function(){var t,o;return"after"===e&&(t=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===e?o:("before"===e&&(t=s.apply(n,arguments)),t)}}}return X.define("change_listener",(function(){B(this.input,"change",(()=>{this.sync()}))})),X.define("checkbox_options",(function(){var e=this,t=e.onOptionSelect;e.settings.hideSelected=!1;var i=function(e){setTimeout((()=>{var t=e.querySelector("input");e.classList.contains("selected")?t.checked=!0:t.checked=!1}),1)};e.hook("after","setupTemplates",(()=>{var t=e.settings.render.option;e.settings.render.option=(i,n)=>{var s=y(t.call(e,i,n)),o=document.createElement("input");o.addEventListener("click",(function(e){H(e)})),o.type="checkbox";const r=F(i[e.settings.valueField]);return r&&e.items.indexOf(r)>-1&&(o.checked=!0),s.prepend(o),s}})),e.on("item_remove",(t=>{var n=e.getOption(t);n&&(n.classList.remove("selected"),i(n))})),e.hook("instead","onOptionSelect",((n,s)=>{if(s.classList.contains("selected"))return s.classList.remove("selected"),e.removeItem(s.dataset.value),e.refreshOptions(),void H(n,!0);t.call(e,n,s),i(s)}))})),X.define("clear_button",(function(e){const t=this,i=Object.assign({className:"clear-button",title:"Clear All",html:e=>`<div class="${e.className}" title="${e.title}">×</div>`},e);t.on("initialize",(()=>{var e=y(i.html(i));e.addEventListener("click",(e=>{t.clear(),"single"===t.settings.mode&&t.settings.allowEmptyOption&&t.addItem(""),e.preventDefault(),e.stopPropagation()})),t.control.appendChild(e)}))})),X.define("drag_drop",(function(){var e=this;if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===e.settings.mode){var t=e.lock,i=e.unlock;e.hook("instead","lock",(()=>{var i=$(e.control).data("sortable");return i&&i.disable(),t.call(e)})),e.hook("instead","unlock",(()=>{var t=$(e.control).data("sortable");return t&&t.enable(),i.call(e)})),e.on("initialize",(()=>{var t=$(e.control).sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:(e,i)=>{i.placeholder.css("width",i.helper.css("width")),t.css({overflow:"visible"})},stop:()=>{t.css({overflow:"hidden"});var i=[];t.children("[data-value]").each((function(){this.dataset.value&&i.push(this.dataset.value)})),e.setValue(i)}})}))}})),X.define("dropdown_header",(function(e){const t=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:e=>'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a class="'+e.closeClass+'">×</a></div></div>'},e);t.on("initialize",(()=>{var e=y(i.html(i)),n=e.querySelector("."+i.closeClass);n&&n.addEventListener("click",(e=>{H(e,!0),t.close()})),t.dropdown.insertBefore(e,t.dropdown.firstChild)}))})),X.define("caret_position",(function(){var e=this;e.hook("instead","setCaret",(t=>{"single"!==e.settings.mode&&e.control.contains(e.control_input)?(t=Math.max(0,Math.min(e.items.length,t)))==e.caretPos||e.isPending||e.controlChildren().forEach(((i,n)=>{n<t?e.control_input.insertAdjacentElement("beforebegin",i):e.control.appendChild(i)})):t=e.items.length,e.caretPos=t})),e.hook("instead","moveCaret",(t=>{if(!e.isFocused)return;const i=e.getLastActive(t);if(i){const n=T(i);e.setCaret(t>0?n+1:n),e.setActiveItem()}else e.setCaret(e.caretPos+t)}))})),X.define("dropdown_input",(function(){var e=this;e.settings.shouldOpen=!0,e.hook("before","setup",(()=>{e.focus_node=e.control,O(e.control_input,"dropdown-input");const t=y('<div class="dropdown-input-wrap">');t.append(e.control_input),e.dropdown.insertBefore(t,e.dropdown.firstChild)})),e.on("initialize",(()=>{e.control_input.addEventListener("keydown",(t=>{switch(t.keyCode){case 27:return e.isOpen&&(H(t,!0),e.close()),void e.clearActiveItems();case 9:e.focus_node.tabIndex=-1}return e.onKeyDown.call(e,t)})),e.on("blur",(()=>{e.focus_node.tabIndex=e.isDisabled?-1:e.tabIndex})),e.on("dropdown_open",(()=>{e.control_input.focus()}));const t=e.onBlur;e.hook("instead","onBlur",(i=>{if(!i||i.relatedTarget!=e.control_input)return t.call(e)})),B(e.control_input,"blur",(()=>e.onBlur())),e.hook("before","close",(()=>{e.isOpen&&e.focus_node.focus()}))}))})),X.define("input_autogrow",(function(){var e=this;e.on("initialize",(()=>{var t=document.createElement("span"),i=e.control_input;t.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",e.wrapper.appendChild(t);for(const e of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])t.style[e]=i.style[e];var n=()=>{e.items.length>0?(t.textContent=i.value,i.style.width=t.clientWidth+"px"):i.style.width=""};n(),e.on("update item_add item_remove",n),B(i,"input",n),B(i,"keyup",n),B(i,"blur",n),B(i,"update",n)}))})),X.define("no_backspace_delete",(function(){var e=this,t=e.deleteSelection;this.hook("instead","deleteSelection",(i=>!!e.activeItems.length&&t.call(e,i)))})),X.define("no_active_items",(function(){this.hook("instead","setActiveItem",(()=>{})),this.hook("instead","selectAll",(()=>{}))})),X.define("optgroup_columns",(function(){var e=this,t=e.onKeyDown;e.hook("instead","onKeyDown",(i=>{var n,s,o,r;if(!e.isOpen||37!==i.keyCode&&39!==i.keyCode)return t.call(e,i);r=C(e.activeOption,"[data-group]"),n=T(e.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(s=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,n)])&&e.setActiveOption(s)}))})),X.define("remove_button",(function(e){const t=Object.assign({label:"×",title:"Remove",className:"remove",append:!0},e);var i=this;if(t.append){var n='<a href="javascript:void(0)" class="'+t.className+'" tabindex="-1" title="'+M(t.title)+'">'+t.label+"</a>";i.hook("after","setupTemplates",(()=>{var e=i.settings.render.item;i.settings.render.item=(t,s)=>{var o=y(e.call(i,t,s)),r=y(n);return o.appendChild(r),B(r,"mousedown",(e=>{H(e,!0)})),B(r,"click",(e=>{if(H(e,!0),!i.isLocked){var t=o.dataset.value;i.removeItem(t),i.refreshOptions(!1)}})),o}}))}})),X.define("restore_on_backspace",(function(e){const t=this,i=Object.assign({text:e=>e[t.settings.labelField]},e);t.on("item_remove",(function(e){if(""===t.control_input.value.trim()){var n=t.options[e];n&&t.setTextboxValue(i.text.call(t,n))}}))})),X.define("virtual_scroll",(function(){const e=this,t=e.canLoad,i=e.clearActiveOption,n=e.loadCallback;var s,o={},r=!1;if(!e.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";function a(t){return!("number"==typeof e.settings.maxOptions&&s.children.length>=e.settings.maxOptions||!(t in o)||!o[t])}e.settings.sortField=[{field:"$order"},{field:"$score"}],e.setNextUrl=function(e,t){o[e]=t},e.getUrl=function(t){if(t in o){const e=o[t];return o[t]=!1,e}return o={},e.settings.firstUrl(t)},e.hook("instead","clearActiveOption",(()=>{if(!r)return i.call(e)})),e.hook("instead","canLoad",(i=>i in o?a(i):t.call(e,i))),e.hook("instead","loadCallback",((t,i)=>{r||e.clearOptions(),n.call(e,t,i),r=!1})),e.hook("after","refreshOptions",(()=>{const t=e.lastValue;var i;a(t)?(i=e.render("loading_more",{query:t}))&&i.setAttribute("data-selectable",""):t in o&&!s.querySelector(".no-results")&&(i=e.render("no_more_results",{query:t})),i&&(O(i,e.settings.optionClass),s.append(i))})),e.on("initialize",(()=>{s=e.dropdown_content,e.settings.render=Object.assign({},{loading_more:function(){return'<div class="loading-more-results">Loading more results ... </div>'},no_more_results:function(){return'<div class="no-more-results">No more results</div>'}},e.settings.render),s.addEventListener("scroll",(function(){s.clientHeight/(s.scrollHeight-s.scrollTop)<.95||a(e.lastValue)&&(r||(r=!0,e.load.call(e,e.lastValue)))}))}))})),X}()}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=i(5577),t=i.n(e);class n{constructor(e,t=!0,i=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=i,this.iframesTimeout=n}static matches(e,t){const i="string"==typeof t?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let t=!1;return i.every((i=>!n.call(e,i)||(t=!0,!1))),t}return!1}getContexts(){let e,t=[];return e=void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[],e.forEach((e=>{const i=t.filter((t=>t.contains(e))).length>0;-1!==t.indexOf(e)||i||t.push(e)})),t}getIframeContents(e,t,i=(()=>{})){let n;try{const t=e.contentWindow;if(n=t.document,!t||!n)throw new Error("iframe inaccessible")}catch(e){i()}n&&t(n)}isIframeBlank(e){const t="about:blank",i=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&i!==t&&i}observeIframeLoad(e,t,i){let n=!1,s=null;const o=()=>{if(!n){n=!0,clearTimeout(s);try{this.isIframeBlank(e)||(e.removeEventListener("load",o),this.getIframeContents(e,t,i))}catch(e){i()}}};e.addEventListener("load",o),s=setTimeout(o,this.iframesTimeout)}onIframeReady(e,t,i){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,i):this.getIframeContents(e,t,i):this.observeIframeLoad(e,t,i)}catch(e){i()}}waitForIframes(e,t){let i=0;this.forEachIframe(e,(()=>!0),(e=>{i++,this.waitForIframes(e.querySelector("html"),(()=>{--i||t()}))}),(e=>{e||t()}))}forEachIframe(e,t,i,s=(()=>{})){let o=e.querySelectorAll("iframe"),r=o.length,a=0;o=Array.prototype.slice.call(o);const l=()=>{--r<=0&&s(a)};r||l(),o.forEach((e=>{n.matches(e,this.exclude)?l():this.onIframeReady(e,(n=>{t(e)&&(a++,i(n)),l()}),l)}))}createIterator(e,t,i){return document.createNodeIterator(e,t,i,!1)}createInstanceOnIframe(e){return new n(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,i){if(e.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}getIteratorNode(e){const t=e.previousNode();let i;return i=(null===t||e.nextNode())&&e.nextNode(),{prevNode:t,node:i}}checkIframeFilter(e,t,i,n){let s=!1,o=!1;return n.forEach(((e,t)=>{e.val===i&&(s=t,o=e.handled)})),this.compareNodeIframe(e,t,i)?(!1!==s||o?!1===s||o||(n[s].handled=!0):n.push({val:i,handled:!0}),!0):(!1===s&&n.push({val:i,handled:!1}),!1)}handleOpenIframes(e,t,i,n){e.forEach((e=>{e.handled||this.getIframeContents(e.val,(e=>{this.createInstanceOnIframe(e).forEachNode(t,i,n)}))}))}iterateThroughNodes(e,t,i,n,s){const o=this.createIterator(t,e,n);let r,a,l=[],c=[],d=()=>(({prevNode:a,node:r}=this.getIteratorNode(o)),r);for(;d();)this.iframes&&this.forEachIframe(t,(e=>this.checkIframeFilter(r,a,e,l)),(t=>{this.createInstanceOnIframe(t).forEachNode(e,(e=>c.push(e)),n)})),c.push(r);c.forEach((e=>{i(e)})),this.iframes&&this.handleOpenIframes(l,e,i,n),s()}forEachNode(e,t,i,n=(()=>{})){const s=this.getContexts();let o=s.length;o||n(),s.forEach((s=>{const r=()=>{this.iterateThroughNodes(e,s,t,i,(()=>{--o<=0&&n()}))};this.iframes?this.waitForIframes(s,r):r()}))}}class s{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new n(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const i=this.opt.log;this.opt.debug&&"object"==typeof i&&"function"==typeof i[t]&&i[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e)}createSynonymsRegExp(e){const t=this.opt.synonyms,i=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let s in t)if(t.hasOwnProperty(s)){const o=t[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==r&&""!==a&&(e=e.replace(new RegExp(`(${this.escapeStr(r)}|${this.escapeStr(a)})`,`gm${i}`),n+`(${this.processSynomyms(r)}|`+`${this.processSynomyms(a)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return(e=e.replace(/(?:\\)*\?/g,(e=>"\\"===e.charAt(0)?"?":""))).replace(/(?:\\)*\*/g,(e=>"\\"===e.charAt(0)?"*":""))}createWildcardsRegExp(e){let t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,((e,t,i)=>{let n=i.charAt(t+1);return/[(|)\\]/.test(n)||""===n?e:e+"\0"}))}createJoinersRegExp(e){let t=[];const i=this.opt.ignorePunctuation;return Array.isArray(i)&&i.length&&t.push(this.escapeStr(i.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",i=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach((s=>{i.every((i=>{if(-1!==i.indexOf(s)){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0}))})),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gim,"[\\s]+")}createAccuracyRegExp(e){let t=this.opt.accuracy,i="string"==typeof t?t:t.value,n="string"==typeof t?[]:t.limiters,s="";switch(n.forEach((e=>{s+=`|${this.escapeStr(e)}`})),i){case"partially":default:return`()(${e})`;case"complementary":return s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")),`()([^${s}]*${e}[^${s}]*)`;case"exactly":return`(^|\\s${s})(${e})(?=$|\\s${s})`}}getSeparatedKeywords(e){let t=[];return e.forEach((e=>{this.opt.separateWordSearch?e.split(" ").forEach((e=>{e.trim()&&-1===t.indexOf(e)&&t.push(e)})):e.trim()&&-1===t.indexOf(e)&&t.push(e)})),{keywords:t.sort(((e,t)=>t.length-e.length)),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let i=0;return e.sort(((e,t)=>e.start-t.start)).forEach((e=>{let{start:n,end:s,valid:o}=this.callNoMatchOnInvalidRanges(e,i);o&&(e.start=n,e.length=s-n,t.push(e),i=s)})),t}callNoMatchOnInvalidRanges(e,t){let i,n,s=!1;return e&&void 0!==e.start?(i=parseInt(e.start,10),n=i+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-i>0?s=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:i,end:n,valid:s}}checkWhitespaceRanges(e,t,i){let n,s=!0,o=i.length,r=t-o,a=parseInt(e.start,10)-r;return a=a>o?o:a,n=a+parseInt(e.length,10),n>o&&(n=o,this.log(`End range automatically set to the max value of ${o}`)),a<0||n-a<0||a>o||n>o?(s=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):""===i.substring(a,n).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:n,valid:s}}getTextNodes(e){let t="",i=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(e=>{i.push({start:t.length,end:(t+=e.textContent).length,node:e})}),(e=>this.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT),(()=>{e({value:t,nodes:i})}))}matchesExclude(e){return n.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,i){const n=this.opt.element?this.opt.element:"mark",s=e.splitText(t),o=s.splitText(i-t);let r=document.createElement(n);return r.setAttribute("data-markjs","true"),this.opt.className&&r.setAttribute("class",this.opt.className),r.textContent=s.textContent,s.parentNode.replaceChild(r,s),o}wrapRangeInMappedTextNode(e,t,i,n,s){e.nodes.every(((o,r)=>{const a=e.nodes[r+1];if(void 0===a||a.start>t){if(!n(o.node))return!1;const a=t-o.start,l=(i>o.end?o.end:i)-o.start,c=e.value.substr(0,o.start),d=e.value.substr(l+o.start);if(o.node=this.wrapRangeInTextNode(o.node,a,l),e.value=c+d,e.nodes.forEach(((t,i)=>{i>=r&&(e.nodes[i].start>0&&i!==r&&(e.nodes[i].start-=l),e.nodes[i].end-=l)})),i-=l,s(o.node.previousSibling,o.start),!(i>o.end))return!1;t=o.end}return!0}))}wrapMatches(e,t,i,n,s){const o=0===t?0:t+1;this.getTextNodes((t=>{t.nodes.forEach((t=>{let s;for(t=t.node;null!==(s=e.exec(t.textContent))&&""!==s[o];){if(!i(s[o],t))continue;let r=s.index;if(0!==o)for(let e=1;e<o;e++)r+=s[e].length;t=this.wrapRangeInTextNode(t,r,r+s[o].length),n(t.previousSibling),e.lastIndex=0}})),s()}))}wrapMatchesAcrossElements(e,t,i,n,s){const o=0===t?0:t+1;this.getTextNodes((t=>{let r;for(;null!==(r=e.exec(t.value))&&""!==r[o];){let s=r.index;if(0!==o)for(let e=1;e<o;e++)s+=r[e].length;const a=s+r[o].length;this.wrapRangeInMappedTextNode(t,s,a,(e=>i(r[o],e)),((t,i)=>{e.lastIndex=i,n(t)}))}s()}))}wrapRangeFromIndex(e,t,i,n){this.getTextNodes((s=>{const o=s.value.length;e.forEach(((e,n)=>{let{start:r,end:a,valid:l}=this.checkWhitespaceRanges(e,o,s.value);l&&this.wrapRangeInMappedTextNode(s,r,a,(i=>t(i,e,s.value.substring(r,a),n)),(t=>{i(t,e)}))})),n()}))}unwrapMatches(e){const t=e.parentNode;let i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.removeChild(e.firstChild));t.replaceChild(i,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let i=0,n="wrapMatches";this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,((e,t)=>this.opt.filter(t,e,i)),(e=>{i++,this.opt.each(e)}),(()=>{0===i&&this.opt.noMatch(e),this.opt.done(i)}))}mark(e,t){this.opt=t;let i=0,n="wrapMatches";const{keywords:s,length:o}=this.getSeparatedKeywords("string"==typeof e?[e]:e),r=this.opt.caseSensitive?"":"i",a=e=>{let t=new RegExp(this.createRegExp(e),`gm${r}`),l=0;this.log(`Searching with expression "${t}"`),this[n](t,1,((t,n)=>this.opt.filter(n,e,i,l)),(e=>{l++,i++,this.opt.each(e)}),(()=>{0===l&&this.opt.noMatch(e),s[o-1]===e?this.opt.done(i):a(s[s.indexOf(e)+1])}))};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),0===o?this.opt.done(i):a(s[0])}markRanges(e,t){this.opt=t;let i=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,((e,t,i,n)=>this.opt.filter(e,t,i,n)),((e,t)=>{i++,this.opt.each(e,t)}),(()=>{this.opt.done(i)}))):this.opt.done(i)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,(e=>{this.unwrapMatches(e)}),(e=>{const i=n.matches(e,t),s=this.matchesExclude(e);return!i||s?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}}function o(e){const t=new s(e);return this.mark=(e,i)=>(t.mark(e,i),this),this.markRegExp=(e,i)=>(t.markRegExp(e,i),this),this.markRanges=(e,i)=>(t.markRanges(e,i),this),this.unmark=e=>(t.unmark(e),this),this}var r=i(6035),a=i.n(r),l=i(27),c=i(6416),d=i.n(c);function u(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function h(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?u(Object(i),!0).forEach((function(t){p(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function p(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,i){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return i}var v=new WeakSet,_=new WeakSet,b=new WeakSet,y=new WeakSet,w=new WeakSet,E=new WeakSet,O=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,E),g(this,w),g(this,y),g(this,b),g(this,_),g(this,v)}var t,i,n;return t=e,(i=[{key:"create",value:function(e){if(!e.classList.contains("tomselected")){var t=e.getAttribute("data-ea-autocomplete-endpoint-url");return null!==t?m(this,y,C).call(this,e,t):"true"===e.getAttribute("data-ea-autocomplete-render-items-as-html")?m(this,b,S).call(this,e):m(this,_,x).call(this,e)}}}])&&f(t.prototype,i),n&&f(t,n),e}();function A(e){var t={render:{no_results:function(t,i){return'<div class="no-results">'.concat(e.getAttribute("data-ea-i18n-no-results-found"),"</div>")}},plugins:{dropdown_input:{}}};return null===e.getAttribute("required")&&null===e.getAttribute("disabled")&&(t.plugins.clear_button={title:""}),null!==e.getAttribute("multiple")&&(t.plugins.remove_button={title:""}),null!==e.getAttribute("data-ea-autocomplete-endpoint-url")&&(t.plugins.virtual_scroll={}),"true"===e.getAttribute("data-ea-autocomplete-allow-item-create")&&(t.create=!0),t}function x(e){var t=m(this,E,T).call(this,m(this,v,A).call(this,e),{maxOptions:e.options.length});return new(d())(e,t)}function S(e){for(var t=[],i=0;i<e.options.length;i++){var n=e.options[i].text,s=e.options[i].value;t.push({label_text:m(this,w,k).call(this,n),label_raw:n,value:s})}var o=m(this,E,T).call(this,m(this,v,A).call(this,e),{valueField:"value",labelField:"label_raw",searchField:["label_text"],options:t,maxOptions:e.options.length,render:{item:function(e,t){return"<div>".concat(e.label_raw,"</div>")},option:function(e,t){return"<div>".concat(e.label_raw,"</div>")}}});return new(d())(e,o)}function C(e,t){var i=m(this,E,T).call(this,m(this,v,A).call(this,e),{valueField:"entityId",labelField:"entityAsString",searchField:["entityAsString"],firstUrl:function(e){return t+"&query="+encodeURIComponent(e)},load:function(e,t){var i=this,n=this.getUrl(e);fetch(n).then((function(e){return e.json()})).then((function(n){i.setNextUrl(e,n.next_page),t(n.results)})).catch((function(){return t()}))},render:{option:function(e,t){return"<div>".concat(e.entityAsString,"</div>")},item:function(e,t){return"<div>".concat(e.entityAsString,"</div>")},loading_more:function(t,i){return'<div class="loading-more-results">'.concat(e.getAttribute("data-ea-i18n-loading-more-results"),"</div>")},no_more_results:function(t,i){return'<div class="no-more-results">'.concat(e.getAttribute("data-ea-i18n-no-more-results"),"</div>")},no_results:function(t,i){return'<div class="no-results">'.concat(e.getAttribute("data-ea-i18n-no-results-found"),"</div>")}}});return new(d())(e,i)}function k(e){return e.replace(/(<([^>]+)>)/gi,"")}function T(e,t){return h(h({},e),t)}i(312),document.addEventListener("DOMContentLoaded",(function(){L.createMainMenu(),L.createLayoutResizeControls(),L.createNavigationToggler(),L.createSearchHighlight(),L.createFilters(),L.createToggleFields(),L.createAutoCompleteFields(),L.createBatchActions(),L.createModalWindowsForDeleteActions(),L.createPopovers(),L.createTooltips(),L.createUnsavedFormChangesWarning(),L.createNullableFields(),L.createImageFields(),L.createFileUploadFields(),L.createFieldsWithErrors(),L.preventMultipleFormSubmission(),document.addEventListener("ea.collection.item-added",(function(){return L.createAutoCompleteFields()}))}));var I,L=(I=function(e,t){e.innerHTML=t,Array.from(e.querySelectorAll("script")).forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),t.appendChild(document.createTextNode(e.innerHTML)),e.parentNode.replaceChild(t,e)}))},{createMainMenu:function(){var e=document.querySelectorAll("#main-menu .menu-item.has-submenu");e.forEach((function(t){var i=t.querySelector(".submenu");t.classList.contains("expanded")&&(i.style.maxHeight=i.scrollHeight+"px"),t.querySelector(".submenu-toggle").addEventListener("click",(function(n){n.preventDefault(),e.forEach((function(e){if(t!==e){var i=e.querySelector(".submenu");e.classList.contains("expanded")&&(i.style.maxHeight="0px",e.classList.remove("expanded"))}})),t.classList.contains("expanded")?(i.style.maxHeight="0px",t.classList.remove("expanded")):(i.style.maxHeight=i.scrollHeight+"px",t.classList.add("expanded"))}))}))},createLayoutResizeControls:function(){var e=document.getElementById("sidebar-resizer-handler");null!==e&&e.addEventListener("click",(function(){var e=localStorage.getItem("ea/sidebar/width")||"normal",t="normal"==e?"compact":"normal";document.querySelector("body").classList.remove("ea-sidebar-width-"+e),document.querySelector("body").classList.add("ea-sidebar-width-"+t),localStorage.setItem("ea/sidebar/width",t)}));var t=document.getElementById("content-resizer-handler");null!==t&&t.addEventListener("click",(function(){var e=localStorage.getItem("ea/content/width")||"normal",t="normal"==e?"full":"normal";document.querySelector("body").classList.remove("ea-content-width-"+e),document.querySelector("body").classList.add("ea-content-width-"+t),localStorage.setItem("ea/content/width",t)}))},createNavigationToggler:function(){var e,t=document.querySelector("#navigation-toggler"),i="ea-mobile-sidebar-visible";null!==t&&t.addEventListener("click",(function(){document.querySelector("body").classList.toggle(i),document.querySelector("body").classList.contains(i)?((e=document.createElement("div")).classList.add("modal-backdrop","fade","show"),e.onclick=function(){document.querySelector("body").classList.remove(i),document.body.removeChild(e),e=null},document.body.appendChild(e)):e&&(document.body.removeChild(e),e=null)}))},createSearchHighlight:function(){var e=document.querySelector('.form-action-search [name="query"]');if(null!==e){var t=e.value;""!==t.trim()&&new o(document.querySelectorAll("table tbody td:not(.actions)")).mark(t)}},createFilters:function(){var e=document.querySelector(".datagrid-filters .action-filters-button");if(null!==e){var t=document.querySelector(e.getAttribute("data-bs-target"));e.setAttribute("href",e.getAttribute("data-href")),e.removeAttribute("data-href"),e.classList.remove("disabled"),e.addEventListener("click",(function(i){var n=t.querySelector(".modal-body");n.innerHTML='<div class="fa-3x px-3 py-3 text-muted text-center"><i class="fas fa-circle-notch fa-spin"></i></div>',fetch(e.getAttribute("href")).then((function(e){return e.text()})).then((function(e){I(n,e),L.createAutoCompleteFields()})).catch((function(e){console.error(e)})),i.preventDefault()}));var i=function(e){e.closest("form").querySelectorAll('input[name^="filters['.concat(e.dataset.filterProperty,']"]')).forEach((function(e){e.remove()})),e.remove()};document.querySelector("#modal-clear-button").addEventListener("click",(function(){t.querySelectorAll(".filter-field").forEach((function(e){i(e)})),t.querySelector("form").submit()})),document.querySelector("#modal-apply-button").addEventListener("click",(function(){t.querySelectorAll(".filter-checkbox:not(:checked)").forEach((function(e){i(e.closest(".filter-field"))})),t.querySelector("form").submit()}))}},createToggleFields:function(){var e=function(e,t){e.checked=t,e.disabled=!0,e.closest(".custom-switch").classList.add("disabled")};document.querySelectorAll('td.field-boolean .form-switch input[type="checkbox"]').forEach((function(t){t.addEventListener("change",(function(){var i=t.checked,n=!i,s=t.getAttribute("data-toggle-url")+"&newValue="+i.toString();fetch(s,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then((function(i){return i.ok||e(t,n),i.text()})).then((function(){})).catch((function(){return e(t,n)}))}))}))},createBatchActions:function(){var e=document.querySelector(".form-batch-checkbox-all");if(null!==e){var t=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox');e.addEventListener("change",(function(){t.forEach((function(t){t.checked=e.checked,t.dispatchEvent(new Event("change"))}))}));var i=document.querySelector(".deselect-batch-button");null!==i&&i.addEventListener("click",(function(){e.checked=!1,e.dispatchEvent(new Event("change"))})),t.forEach((function(t){t.addEventListener("change",(function(){var i=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked'),n=t.closest("tr"),s=t.closest(".content");t.checked?n.classList.add("selected-row"):(n.classList.remove("selected-row"),e.checked=!1);var o=0!==i.length,r=document.querySelector(".content-header-title > .title"),a=s.querySelector(".datagrid-filters"),l=s.querySelector(".global-actions"),c=s.querySelector(".batch-actions");null!==r&&(r.style.visibility=o?"hidden":"visible"),null!==a&&(a.style.display=o?"none":"block"),null!==l&&(l.style.display=o?"none":"block"),null!==c&&(c.style.display=o?"block":"none")}))}));var n=document.querySelector("#batch-action-confirmation-title"),s=n.textContent;document.querySelectorAll("[data-action-batch]").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();var t="A"===e.target.tagName.toUpperCase()?e.target:e.target.parentNode,i=t.textContent.trim()||t.getAttribute("title"),o=document.querySelectorAll('input[type="checkbox"].form-batch-checkbox:checked');n.textContent=s.replace("%action_name%",i).replace("%num_items%",o.length.toString()),document.querySelector("#modal-batch-action-button").addEventListener("click",(function(){t.setAttribute("disabled","disabled");var e={batchActionName:t.getAttribute("data-action-name"),entityFqcn:t.getAttribute("data-entity-fqcn"),batchActionUrl:t.getAttribute("data-action-url"),batchActionCsrfToken:t.getAttribute("data-action-csrf-token")};o.forEach((function(t,i){e["batchActionEntityIds[".concat(i,"]")]=t.value}));var i=document.createElement("form");for(var n in i.setAttribute("method","POST"),i.setAttribute("action",t.getAttribute("data-action-url")),e){var s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name",n),s.setAttribute("value",e[n]),i.appendChild(s)}document.body.appendChild(i),i.submit()}))}))}))}},createAutoCompleteFields:function(){var e=new O;document.querySelectorAll('[data-ea-widget="ea-autocomplete"]').forEach((function(t){e.create(t)}))},createModalWindowsForDeleteActions:function(){document.querySelectorAll(".action-delete").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),document.querySelector("#modal-delete-button").addEventListener("click",(function(){var t=e.getAttribute("formaction"),i=document.querySelector("#delete-form");i.setAttribute("action",t),i.submit()}))}))}))},createPopovers:function(){document.querySelectorAll('[data-bs-toggle="popover"]').forEach((function(e){new(t().Popover)(e)}))},createTooltips:function(){document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach((function(e){new(t().Tooltip)(e)}))},createUnsavedFormChangesWarning:function(){[".ea-new-form",".ea-edit-form"].forEach((function(e){var t=document.querySelector(e);null!==t&&new(a())(t)}))},createNullableFields:function(){var e=function(e){var t=e.checked;e.closest(".form-group").querySelectorAll('select, input[type="date"], input[type="time"], input[type="datetime-local"]').forEach((function(e){e.disabled=t;var i=e.closest(".datetime-widget");null!==i&&(i.style.display=t?"none":"block")}))};document.querySelectorAll('.nullable-control input[type="checkbox"]').forEach((function(t){e(t),t.addEventListener("change",(function(){e(t)}))}))},createImageFields:function(){document.querySelectorAll(".ea-lightbox-thumbnail").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();var i=document.querySelector(e.getAttribute("data-ea-lightbox-content-selector")).innerHTML;l.create(i).show()}))}))},createFileUploadFields:function(){document.querySelectorAll('.ea-fileupload input[type="file"]').forEach((function(e){e.addEventListener("change",(function(){if(0!==e.files.length){var t="";t=1===e.files.length?e.files[0].name:e.files.length+" "+e.getAttribute("data-files-label");for(var i=0,n=0;n<e.files.length;n++)i+=e.files[n].size;var s=e.closest(".ea-fileupload"),o=s.querySelector(".custom-file-label"),r=s.querySelector(".input-group-text"),a=s.querySelector(".ea-fileupload-delete-btn");r.childNodes.forEach((function(e){e.nodeType===Node.TEXT_NODE&&r.removeChild(e)})),o.innerHTML=t,r.prepend(function(e){var t=Math.trunc(Math.floor(Math.log(e)/Math.log(1024)));return Math.trunc(e/Math.pow(1024,t))+["B","K","M","G","T","P","E","Z","Y"][t]}(i)),a.style.display="block"}}))})),document.querySelectorAll(".ea-fileupload .ea-fileupload-delete-btn").forEach((function(e){e.addEventListener("click",(function(){var t=e.closest(".ea-fileupload"),i=t.querySelector("input"),n=t.querySelector(".custom-file-label"),s=t.querySelector(".input-group-text"),o=t.querySelector(".fileupload-list"),r=t.querySelector("input[type=checkbox].form-check-input");r&&(r.checked=!0),i.value="",n.innerHTML="",e.style.display="none",s.childNodes.forEach((function(e){e.nodeType===Node.TEXT_NODE&&s.removeChild(e)})),null!==o&&(o.style.display="none")}))}))},createFieldsWithErrors:function(){[".ea-new-form",".ea-edit-form"].forEach((function(e){var t=document.querySelector(e);null!==t&&function(e,t){e.addEventListener("submit",(function(i){e.querySelectorAll("input,select,textarea").forEach((function(e){if(!e.validity.valid){var t=e.closest("div.form-group");t.classList.add("has-error"),t.addEventListener("click",(function e(){t.classList.remove("has-error"),t.removeEventListener("click",e)}))}}));var n=new CustomEvent("ea.form.submit",{cancelable:!0,detail:{page:t,form:e}});!1===document.dispatchEvent(n)&&(i.preventDefault(),i.stopPropagation())}))}(t,e.includes("-new-")?"new":"edit")}))},preventMultipleFormSubmission:function(){[".ea-new-form",".ea-edit-form"].forEach((function(e){var t=document.querySelector(e);null!==t&&t.addEventListener("submit",(function(){setTimeout((function(){t.querySelectorAll('[type="submit"]').forEach((function(e){e.setAttribute("disabled","disabled")}))}),1)}),!1)}))}})})()})();