From 21433fc6a66d512bee9ac449f61b2c431ac6cb6d Mon Sep 17 00:00:00 2001 From: Vijay Sapkota Date: Wed, 21 Jun 2023 12:05:10 +0200 Subject: [PATCH 1/9] Use environment variable for admin uri (#1040) Co-authored-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- config/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/system.php b/config/system.php index 575724aacb..171ed1e74f 100644 --- a/config/system.php +++ b/config/system.php @@ -35,7 +35,7 @@ | */ - 'adminUri' => '/admin', + 'adminUri' => env('IGNITER_ADMIN_URI', '/admin'), /* |-------------------------------------------------------------------------- From eb45338a1776ca115cbee56b7e30d2035733c079 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Wed, 5 Jul 2023 14:25:08 +0100 Subject: [PATCH 2/9] Allow deselecting select options Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/admin/assets/js/admin.js | 2 +- app/admin/assets/src/js/selectlist.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/assets/js/admin.js b/app/admin/assets/js/admin.js index 55f09eb440..402a4bc8cb 100644 --- a/app/admin/assets/js/admin.js +++ b/app/admin/assets/js/admin.js @@ -1 +1 @@ -if(function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],i=Object.getPrototypeOf,s=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},r=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),p={},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var i,s,o=(n=n||m).createElement("script");if(o.text=e,t)for(i in v)(s=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,s);n.head.appendChild(o).parentNode.removeChild(o)}function y(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var w="3.6.3",_=function(e,t){return new _.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=y(e);return!f(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),z=new RegExp(B),X=new RegExp("^"+q+"$"),Q={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,se=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},re=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(L=N.call(_.childNodes),_.childNodes),L[_.childNodes.length].nodeType}catch(t){P={apply:L.length?function(e,t){j.apply(e,N.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,s){var o,a,c,u,d,f,v,b=t&&t.ownerDocument,_=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return i;if(!s&&(h(t),t=t||p,g)){if(11!==_&&(d=Z.exec(e)))if(o=d[1]){if(9===_){if(!(c=t.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(b&&(c=b.getElementById(o))&&y(t,c)&&c.id===o)return i.push(c),i}else{if(d[2])return P.apply(i,t.getElementsByTagName(e)),i;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==_||"object"!==t.nodeName.toLowerCase())){if(v=e,b=t,1===_&&(U.test(e)||W.test(e))){for((b=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(ie,se):t.setAttribute("id",u=w)),a=(f=r(e)).length;a--;)f[a]=(u?"#"+u:":scope")+" "+ye(f[a]);v=f.join(",")}try{if(n.cssSupportsSelector&&!CSS.supports("selector(:is("+v+"))"))throw new Error;return P.apply(i,b.querySelectorAll(v)),i}catch(t){k(e,!0)}finally{u===w&&t.removeAttribute("id")}}}return l(e.replace(F,"$1"),t,i,s)}function le(){var e=[];return function t(n,s){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=s}}function ce(e){return e[w]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),s=n.length;s--;)i.attrHandle[n[s]]=t}function he(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,i){for(var s,o=e([],n.length,t),r=o.length;r--;)n[s=o[r]]&&(n[s]=!(i[s]=n[s]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var t,s,r=e?e.ownerDocument||e:_;return r!=p&&9===r.nodeType&&r.documentElement&&(f=(p=r).documentElement,g=!o(p),_!=p&&(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",oe,!1):s.attachEvent&&s.attachEvent("onunload",oe)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.cssSupportsSelector=ue((function(){return CSS.supports("selector(*)")&&p.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,i,s,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(s=t.getElementsByName(e),i=0;o=s[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],s=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[s++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=J.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=J.test(b=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=b.call(e,"*"),b.call(e,"[s!='']:x"),v.push("!=",B)})),n.cssSupportsSelector||m.push(":has"),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=J.test(f.compareDocumentPosition),y=t||J.test(f.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e==p||e.ownerDocument==_&&y(_,e)?-1:t==p||t.ownerDocument==_&&y(_,t)?1:u?$(u,e)-$(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,s=e.parentNode,o=t.parentNode,r=[e],a=[t];if(!s||!o)return e==p?-1:t==p?1:s?-1:o?1:u?$(u,e)-$(u,t):0;if(s===o)return he(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;r[i]===a[i];)i++;return i?he(r[i],a[i]):r[i]==_?-1:a[i]==_?1:0}),p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!k[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var i=b.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=r(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var s=ae.attr(i,e);return null==s?"!="===t:!t||(s+="","="===t?s===n:"!="===t?s!==n:"^="===t?n&&0===s.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return f(t)?_.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var i,s;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:D.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),S.test(i[1])&&_.isPlainObject(t))for(i in t)f(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(s=m.getElementById(i[2]))&&(this[0]=s,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,L=_(m);var j=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function N(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i;ue=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),p.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="",p.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="",p.option=!!ue.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?_.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n",""]);var be=/<|&#?\w+;/;function ye(e,t,n,i,s){for(var o,r,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p\s*$/g;function Oe(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,i,s,o,r,a;if(1===t.nodeType){if(K.hasData(e)&&(a=K.get(e).events))for(s in K.remove(t,"handle events"),a)for(n=0,i=a[s].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&s("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Ut,zt=[],Xt=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||_.expando+"_"+Ct.guid++;return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",(function(t,n,i){var s,o,r,a=!1!==t.jsonp&&(Xt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Xt,"$1"+s):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||_.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=e[s],e[s]=function(){r=arguments},i.always((function(){void 0===o?_(e).removeProp(s):e[s]=o,t[s]&&(t.jsonpCallback=n.jsonpCallback,zt.push(s)),r&&f(o)&&o(r[0]),r=o=void 0})),"script"})),p.createHTMLDocument=((Ut=m.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),_.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((i=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(i)):t=m),o=!n&&[],(s=S.exec(e))?[t.createElement(s[1])]:(s=ye([e],t,o),o&&o.length&&_(o).remove(),_.merge([],s.childNodes)));var i,s,o},_.fn.load=function(e,t,n){var i,s,o,r=this,a=e.indexOf(" ");return-1").append(_.parseHTML(e)).find(i):e)})).always(n&&function(e,t){r.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},_.expr.pseudos.animated=function(e){return _.grep(_.timers,(function(t){return e===t.elem})).length},_.offset={setOffset:function(e,t,n){var i,s,o,r,a,l,c=_.css(e,"position"),u=_(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=_.css(e,"top"),l=_.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(r=(i=u.position()).top,s=i.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),f(t)&&(t=t.call(e,n,_.extend({},a))),null!=t.top&&(d.top=t.top-a.top+r),null!=t.left&&(d.left=t.left-a.left+s),"using"in t?t.using.call(e,d):u.css(d)}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){_.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],s={top:0,left:0};if("fixed"===_.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((s=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),s.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-s.top-_.css(i,"marginTop",!0),left:t.left-s.left-_.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent;return e||ie}))}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;_.fn[e]=function(i){return F(this,(function(e,i,s){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===s)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:s,n?s:o.pageYOffset):e[i]=s}),e,i,arguments.length)}})),_.each(["top","left"],(function(e,t){_.cssHooks[t]=Ve(p.pixelPosition,(function(e,n){if(n)return n=Fe(e,t),$e.test(n)?_(e).position()[t]+"px":n}))})),_.each({Height:"height",Width:"width"},(function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){_.fn[i]=function(s,o){var r=arguments.length&&(n||"boolean"!=typeof s),a=n||(!0===s||!0===o?"margin":"border");return F(this,(function(t,n,s){var o;return g(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===s?_.css(t,n,a):_.style(t,n,s,a)}),t,r?s:void 0,r)}}))})),_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){_.fn[t]=function(e){return this.on(t,e)}})),_.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){_.fn[t]=function(e,n){return 00&&a(r.width)/e.offsetWidth||1,u=e.offsetHeight>0&&a(r.height)/e.offsetHeight||1);var d=(n(e)?t(e):window).visualViewport,h=!c()&&o,p=(r.left+(h&&d?d.offsetLeft:0))/l,f=(r.top+(h&&d?d.offsetTop:0))/u,g=r.width/l,m=r.height/u;return{width:g,height:m,top:f,right:p+g,bottom:f+m,left:p,x:p,y:f}}function d(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return u(p(e)).left+d(e).scrollLeft}function g(e){return t(e).getComputedStyle(e)}function m(e){var t=g(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function v(e,n,s){void 0===s&&(s=!1);var o,r,l=i(n),c=i(n)&&function(e){var t=e.getBoundingClientRect(),n=a(t.width)/e.offsetWidth||1,i=a(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(n),g=p(n),v=u(e,c,s),b={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(l||!l&&!s)&&(("body"!==h(n)||m(g))&&(b=(o=n)!==t(o)&&i(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:d(o)),i(n)?((y=u(n,!0)).x+=n.clientLeft,y.y+=n.clientTop):g&&(y.x=f(g))),{x:v.left+b.scrollLeft-y.x,y:v.top+b.scrollTop-y.y,width:v.width,height:v.height}}function b(e){var t=u(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function y(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||p(e)}function w(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:i(e)&&m(e)?e:w(y(e))}function _(e,n){var i;void 0===n&&(n=[]);var s=w(e),o=s===(null==(i=e.ownerDocument)?void 0:i.body),r=t(s),a=o?[r].concat(r.visualViewport||[],m(s)?s:[]):s,l=n.concat(a);return o?l:l.concat(_(y(a)))}function x(e){return["table","td","th"].indexOf(h(e))>=0}function C(e){return i(e)&&"fixed"!==g(e).position?e.offsetParent:null}function T(e){for(var n=t(e),o=C(e);o&&x(o)&&"static"===g(o).position;)o=C(o);return o&&("html"===h(o)||"body"===h(o)&&"static"===g(o).position)?n:o||function(e){var t=/firefox/i.test(l());if(/Trident/i.test(l())&&i(e)&&"fixed"===g(e).position)return null;var n=y(e);for(s(n)&&(n=n.host);i(n)&&["html","body"].indexOf(h(n))<0;){var o=g(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||n}var E="top",A="bottom",k="right",S="left",O="auto",L=[E,A,k,S],D="start",j="end",P="viewport",N="popper",$=L.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+j])}),[]),I=[].concat(L,[O]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+j])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,i=[];function s(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&s(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||s(e)})),i}function H(e){return e.split("-")[0]}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&s(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function R(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function F(e,i,s){return i===P?R(function(e,n){var i=t(e),s=p(e),o=i.visualViewport,r=s.clientWidth,a=s.clientHeight,l=0,u=0;if(o){r=o.width,a=o.height;var d=c();(d||!d&&"fixed"===n)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:r,height:a,x:l+f(e),y:u}}(e,s)):n(i)?function(e,t){var n=u(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(i,s):R(function(e){var t,n=p(e),i=d(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=o(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=o(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-i.scrollLeft+f(e),c=-i.scrollTop;return"rtl"===g(s||n).direction&&(l+=o(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:a,x:l,y:c}}(p(e)))}function V(e,t,s,a){var l="clippingParents"===t?function(e){var t=_(y(e)),s=["absolute","fixed"].indexOf(g(e).position)>=0&&i(e)?T(e):e;return n(s)?t.filter((function(e){return n(e)&&B(e,s)&&"body"!==h(e)})):[]}(e):[].concat(t),c=[].concat(l,[s]),u=c[0],d=c.reduce((function(t,n){var i=F(e,n,a);return t.top=o(i.top,t.top),t.right=r(i.right,t.right),t.bottom=r(i.bottom,t.bottom),t.left=o(i.left,t.left),t}),F(e,u,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function W(e){return e.split("-")[1]}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function z(e){var t,n=e.reference,i=e.element,s=e.placement,o=s?H(s):null,r=s?W(s):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case E:t={x:a,y:n.y-i.height};break;case A:t={x:a,y:n.y+n.height};break;case k:t={x:n.x+n.width,y:l};break;case S:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?U(o):null;if(null!=c){var u="y"===c?"height":"width";switch(r){case D:t[c]=t[c]-(n[u]/2-i[u]/2);break;case j:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Q(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function K(e,t){void 0===t&&(t={});var i=t,s=i.placement,o=void 0===s?e.placement:s,r=i.strategy,a=void 0===r?e.strategy:r,l=i.boundary,c=void 0===l?"clippingParents":l,d=i.rootBoundary,h=void 0===d?P:d,f=i.elementContext,g=void 0===f?N:f,m=i.altBoundary,v=void 0!==m&&m,b=i.padding,y=void 0===b?0:b,w=X("number"!=typeof y?y:Q(y,L)),_=g===N?"reference":N,x=e.rects.popper,C=e.elements[v?_:g],T=V(n(C)?C:C.contextElement||p(e.elements.popper),c,h,a),S=u(e.elements.reference),O=z({reference:S,element:x,strategy:"absolute",placement:o}),D=R(Object.assign({},x,O)),j=g===N?D:S,$={top:T.top-j.top+w.top,bottom:j.bottom-T.bottom+w.bottom,left:T.left-j.left+w.left,right:j.right-T.right+w.right},I=e.modifiersData.offset;if(g===N&&I){var M=I[o];Object.keys($).forEach((function(e){var t=[k,A].indexOf(e)>=0?1:-1,n=[E,A].indexOf(e)>=0?"y":"x";$[e]+=M[n]*t}))}return $}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function G(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[S,k].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}(n,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[i]=r}},ae={left:"right",right:"left",bottom:"top",top:"bottom"};function le(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var ce={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function de(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?I:l,u=W(i),d=u?a?$:$.filter((function(e){return W(e)===u})):L,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=K(e,{placement:n,boundary:s,rootBoundary:o,padding:r})[H(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}var he={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=void 0===s||s,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,g=n.allowedAutoPlacements,m=t.options.placement,v=H(m),b=l||(v!==m&&f?function(e){if(H(e)===O)return[];var t=le(e);return[ue(e),t,ue(t)]}(m):[le(m)]),y=[m].concat(b).reduce((function(e,n){return e.concat(H(n)===O?de(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:g}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,C=!0,T=y[0],L=0;L=0,I=$?"width":"height",M=K(t,{placement:j,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),q=$?N?k:S:N?A:E;w[I]>_[I]&&(q=le(q));var B=le(q),R=[];if(o&&R.push(M[P]<=0),a&&R.push(M[q]<=0,M[B]<=0),R.every((function(e){return e}))){T=j,C=!1;break}x.set(j,R)}if(C)for(var F=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},V=f?3:1;V>0&&"break"!==F(V);V--);t.placement!==T&&(t.modifiersData[i]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pe(e,t,n){return o(e,r(t,n))}var fe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,a=void 0===s||s,l=n.altAxis,c=void 0!==l&&l,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,f=n.tether,g=void 0===f||f,m=n.tetherOffset,v=void 0===m?0:m,y=K(t,{boundary:u,rootBoundary:d,padding:p,altBoundary:h}),w=H(t.placement),_=W(t.placement),x=!_,C=U(w),O="x"===C?"y":"x",L=t.modifiersData.popperOffsets,j=t.rects.reference,P=t.rects.popper,N="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,$="number"==typeof N?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(L){if(a){var q,B="y"===C?E:S,R="y"===C?A:k,F="y"===C?"height":"width",V=L[C],z=V+y[B],X=V-y[R],Q=g?-P[F]/2:0,Y=_===D?j[F]:P[F],G=_===D?-P[F]:-j[F],J=t.elements.arrow,Z=g&&J?b(J):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[B],ne=ee[R],ie=pe(0,j[F],Z[F]),se=x?j[F]/2-Q-ie-te-$.mainAxis:Y-ie-te-$.mainAxis,oe=x?-j[F]/2+Q+ie+ne+$.mainAxis:G+ie+ne+$.mainAxis,re=t.elements.arrow&&T(t.elements.arrow),ae=re?"y"===C?re.clientTop||0:re.clientLeft||0:0,le=null!=(q=null==I?void 0:I[C])?q:0,ce=V+oe-le,ue=pe(g?r(z,V+se-le-ae):z,V,g?o(X,ce):X);L[C]=ue,M[C]=ue-V}if(c){var de,he="x"===C?E:S,fe="x"===C?A:k,ge=L[O],me="y"===O?"height":"width",ve=ge+y[he],be=ge-y[fe],ye=-1!==[E,S].indexOf(w),we=null!=(de=null==I?void 0:I[O])?de:0,_e=ye?ve:ge-j[me]-P[me]-we+$.altAxis,xe=ye?ge+j[me]+P[me]-we-$.altAxis:be,Ce=g&&ye?function(e,t,n){var i=pe(e,t,n);return i>n?n:i}(_e,ge,xe):pe(g?_e:ve,ge,g?xe:be);L[O]=Ce,M[O]=Ce-ge}t.modifiersData[i]=M}},requiresIfExists:["offset"]},ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=H(n.placement),l=U(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&r){var u=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Q(e,L))}(s.padding,n),d=b(o),h="y"===l?E:S,p="y"===l?A:k,f=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],g=r[l]-n.rects.reference[l],m=T(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=f/2-g/2,w=u[h],_=v-d[c]-u[p],x=v/2-d[c]/2+y,C=pe(w,x,_),O=l;n.modifiersData[i]=((t={})[O]=C,t.centerOffset=C-x,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&B(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ve(e){return[E,k,A,S].some((function(t){return e[t]>=0}))}var be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=K(t,{elementContext:"reference"}),a=K(t,{altBoundary:!0}),l=me(r,i),c=me(a,s,o),u=ve(l),d=ve(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},ye=J({defaultModifiers:[ee,te,se,oe]}),we=[ee,te,se,oe,re,he,fe,ge,be],_e=J({defaultModifiers:we});e.applyStyles=oe,e.arrow=ge,e.computeStyles=se,e.createPopper=_e,e.createPopperLite=ye,e.defaultModifiers=we,e.detectOverflow=K,e.eventListeners=ee,e.flip=he,e.hide=be,e.offset=re,e.popperGenerator=J,e.popperOffsets=te,e.preventOverflow=fe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t(e.Popper)}(this,(function(e){"use strict";const t=function(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}(e),n="transitionend",i=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t},s=e=>{const t=i(e);return t&&document.querySelector(t)?t:null},o=e=>{const t=i(e);return t?document.querySelector(t):null},r=e=>{e.dispatchEvent(new Event(n))},a=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,c=e=>{if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},u=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),d=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?d(e.parentNode):null},h=()=>{},p=e=>{e.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,g=[],m=()=>"rtl"===document.documentElement.dir,v=e=>{var t;t=()=>{const t=f();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(g.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of g)e()})),g.push(t)):t()},b=e=>{"function"==typeof e&&e()},y=(e,t,i=!0)=>{if(!i)return void b(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const a=({target:i})=>{i===t&&(o=!0,t.removeEventListener(n,a),b(e))};t.addEventListener(n,a),setTimeout((()=>{o||r(t)}),s)},w=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])},_=/[^.]*(?=\..*)\.|.*/,x=/\..*/,C=/::\d+$/,T={};let E=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},k=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 S(e,t){return t&&`${t}::${E++}`||e.uidEvent||E++}function O(e){const t=S(e);return e.uidEvent=t,T[t]=T[t]||{},T[t]}function L(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function D(e,t,n){const i="string"==typeof t,s=i?n:t||n;let o=$(e);return k.has(o)||(o=e),[i,s,o]}function j(e,t,n,i,s){if("string"!=typeof t||!e)return;let[o,r,a]=D(t,n,i);if(t in A){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=O(e),c=l[a]||(l[a]={}),u=L(c,r,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=S(r,t.replace(_,"")),h=o?function(e,t,n){return function i(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return M(s,{delegateTarget:r}),i.oneOff&&I.off(e,s.type,t,n),n.apply(r,[s])}}(e,n,r):function(e,t){return function n(i){return M(i,{delegateTarget:e}),n.oneOff&&I.off(e,i.type,t),t.apply(e,[i])}}(e,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function P(e,t,n,i,s){const o=L(t[n],i,s);o&&(e.removeEventListener(n,o,Boolean(s)),delete t[n][o.uidEvent])}function N(e,t,n,i){const s=t[n]||{};for(const o of Object.keys(s))if(o.includes(i)){const i=s[o];P(e,t,n,i.callable,i.delegationSelector)}}function $(e){return e=e.replace(x,""),A[e]||e}const I={on(e,t,n,i){j(e,t,n,i,!1)},one(e,t,n,i){j(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,o,r]=D(t,n,i),a=r!==t,l=O(e),c=l[r]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))N(e,l,n,t.slice(1));for(const n of Object.keys(c)){const i=n.replace(C,"");if(!a||t.includes(i)){const t=c[n];P(e,l,r,t.callable,t.delegationSelector)}}}else{if(!Object.keys(c).length)return;P(e,l,r,o,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=f();let s=null,o=!0,r=!0,a=!1;t!==$(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(t,{bubbles:o,cancelable:!0});return l=M(l,n),a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function M(e,t){for(const[n,i]of Object.entries(t||{}))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}const q=new Map,H={set(e,t,n){q.has(e)||q.set(e,new Map);const i=q.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>q.has(e)&&q.get(e).get(t)||null,remove(e,t){if(!q.has(e))return;const n=q.get(e);n.delete(t),0===n.size&&q.delete(e)}};function B(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function R(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const F={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${R(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${R(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=B(e.dataset[i])}return t},getDataAttribute:(e,t)=>B(e.getAttribute(`data-bs-${R(t)}`))};class V{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=a(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...a(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const i of Object.keys(t)){const s=t[i],o=e[i],r=a(o)?"element":null==(n=o)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}var n}}class W extends V{constructor(e,t){super(),(e=l(e))&&(this._element=e,this._config=this._getConfig(t),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),I.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){y(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return H.get(l(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const U=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;I.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),u(this))return;const s=o(this)||this.closest(`.${i}`);e.getOrCreateInstance(s)[t]()}))};class z extends W{static get NAME(){return"alert"}close(){if(I.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),I.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=z.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)}}))}}U(z,"close"),v(z);const X='[data-bs-toggle="button"]';class Q extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=Q.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}I.on(document,"click.bs.button.data-api",X,(e=>{e.preventDefault();const t=e.target.closest(X);Q.getOrCreateInstance(t).toggle()})),v(Q);const K={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 n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.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=>!u(e)&&c(e)))}},Y={endCallback:null,leftCallback:null,rightCallback:null},G={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class J extends V{constructor(e,t){super(),this._element=e,e&&J.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Y}static get DefaultType(){return G}static get NAME(){return"swipe"}dispose(){I.off(this._element,".bs.swipe")}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),b(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&b(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(I.on(this._element,"pointerdown.bs.swipe",(e=>this._start(e))),I.on(this._element,"pointerup.bs.swipe",(e=>this._end(e))),this._element.classList.add("pointer-event")):(I.on(this._element,"touchstart.bs.swipe",(e=>this._start(e))),I.on(this._element,"touchmove.bs.swipe",(e=>this._move(e))),I.on(this._element,"touchend.bs.swipe",(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z="next",ee="prev",te="left",ne="right",ie="slid.bs.carousel",se="carousel",oe="active",re={ArrowLeft:ne,ArrowRight:te},ae={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},le={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ce extends W{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===se&&this.cycle()}static get Default(){return ae}static get DefaultType(){return le}static get NAME(){return"carousel"}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&c(this._element)&&this.next()}prev(){this._slide(ee)}pause(){this._isSliding&&r(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?I.one(this._element,ie,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void I.one(this._element,ie,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Z:ee;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&I.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(I.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),I.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&J.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of K.find(".carousel-item img",this._element))I.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(te)),rightCallback:()=>this._slide(this._directionToOrder(ne)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new J(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=re[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=K.findOne(".active",this._indicatorsElement);t.classList.remove(oe),t.removeAttribute("aria-current");const n=K.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(oe),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Z,s=t||w(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=t=>I.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),p(s),n.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(oe),n.classList.remove(oe,c,l),this._isSliding=!1,r(ie)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(".active.carousel-item",this._element)}_getItems(){return K.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return m()?e===te?ee:Z:e===te?Z:ee}_orderToDirection(e){return m()?e===ee?te:ne:e===ee?ne:te}static jQueryInterface(e){return this.each((function(){const t=ce.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}I.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(e){const t=o(this);if(!t||!t.classList.contains(se))return;e.preventDefault();const n=ce.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),I.on(window,"load.bs.carousel.data-api",(()=>{const e=K.find('[data-bs-ride="carousel"]');for(const t of e)ce.getOrCreateInstance(t)})),v(ce);const ue="show",de="collapse",he="collapsing",pe='[data-bs-toggle="collapse"]',fe={parent:null,toggle:!0},ge={parent:"(null|element)",toggle:"boolean"};class me extends W{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=K.find(pe);for(const e of n){const t=s(e),n=K.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return fe}static get DefaultType(){return ge}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>me.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(I.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(de),this._element.classList.add(he),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(he),this._element.classList.add(de,ue),this._element.style[t]="",I.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(I.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,p(this._element),this._element.classList.add(he),this._element.classList.remove(de,ue);for(const e of this._triggerArray){const t=o(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(he),this._element.classList.add(de),I.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(ue)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=l(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(pe);for(const t of e){const e=o(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=K.find(":scope .collapse .collapse",this._config.parent);return K.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=me.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}I.on(document,"click.bs.collapse.data-api",pe,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=s(this),n=K.find(t);for(const e of n)me.getOrCreateInstance(e,{toggle:!1}).toggle()})),v(me);const ve="dropdown",be="ArrowUp",ye="ArrowDown",we="click.bs.dropdown.data-api",_e="keydown.bs.dropdown.data-api",xe="show",Ce='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Te=`${Ce}.show`,Ee=".dropdown-menu",Ae=m()?"top-end":"top-start",ke=m()?"top-start":"top-end",Se=m()?"bottom-end":"bottom-start",Oe=m()?"bottom-start":"bottom-end",Le=m()?"left-start":"right-start",De=m()?"right-start":"left-start",je={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Pe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Ne extends W{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,Ee)[0]||K.prev(this._element,Ee)[0]||K.findOne(Ee,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return je}static get DefaultType(){return Pe}static get NAME(){return ve}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!I.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))I.on(e,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(xe),this._element.classList.add(xe),I.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(u(this._element)||!this._isShown())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){if(!I.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.off(e,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(xe),this._element.classList.remove(xe),this._element.setAttribute("aria-expanded","false"),F.removeDataAttribute(this._menu,"popper"),I.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!a(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${ve.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===t)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:a(this._config.reference)?e=l(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=t.createPopper(e,this._menu,n)}_isShown(){return this._menu.classList.contains(xe)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Le;if(e.classList.contains("dropstart"))return De;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?ke:Ae:t?Oe:Se}_detectNavbar(){return null!==this._element.closest(".navbar")}_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(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),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 n=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>c(e)));n.length&&w(n,t,e===ye,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Ne.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(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=K.find(Te);for(const n of t){const t=Ne.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),s=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!s||"outside"===t._config.autoClose&&s)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[be,ye].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const s=this.matches(Ce)?this:K.prev(this,Ce)[0]||K.next(this,Ce)[0]||K.findOne(Ce,e.delegateTarget.parentNode),o=Ne.getOrCreateInstance(s);if(i)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}}I.on(document,_e,Ce,Ne.dataApiKeydownHandler),I.on(document,_e,Ee,Ne.dataApiKeydownHandler),I.on(document,we,Ne.clearMenus),I.on(document,"keyup.bs.dropdown.data-api",Ne.clearMenus),I.on(document,we,Ce,(function(e){e.preventDefault(),Ne.getOrCreateInstance(this).toggle()})),v(Ne);const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ie=".sticky-top",Me="padding-right",qe="margin-right";class He{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,Me,(t=>t+e)),this._setElementAttributes($e,Me,(t=>t+e)),this._setElementAttributes(Ie,qe,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Me),this._resetElementAttributes($e,Me),this._resetElementAttributes(Ie,qe)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&F.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=F.getDataAttribute(e,t);null!==n?(F.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const n of K.find(e,this._element))t(n)}}const Be="show",Re="mousedown.bs.backdrop",Fe={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ve={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class We extends V{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Fe}static get DefaultType(){return Ve}static get NAME(){return"backdrop"}show(e){if(!this._config.isVisible)return void b(e);this._append();const t=this._getElement();this._config.isAnimated&&p(t),t.classList.add(Be),this._emulateAnimation((()=>{b(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(Be),this._emulateAnimation((()=>{this.dispose(),b(e)}))):b(e)}dispose(){this._isAppended&&(I.off(this._element,Re),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=l(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),I.on(e,Re,(()=>{b(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){y(e,this._getElement(),this._config.isAnimated)}}const Ue=".bs.focustrap",ze="backward",Xe={autofocus:!0,trapElement:null},Qe={autofocus:"boolean",trapElement:"element"};class Ke extends V{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Xe}static get DefaultType(){return Qe}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),I.off(document,Ue),I.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),I.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,I.off(document,Ue))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=K.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===ze?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?ze:"forward")}}const Ye="hidden.bs.modal",Ge="show.bs.modal",Je="modal-open",Ze="show",et="modal-static",tt={backdrop:!0,focus:!0,keyboard:!0},nt={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class it extends W{constructor(e,t){super(e,t),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new He,this._addEventListeners()}static get Default(){return tt}static get DefaultType(){return nt}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||I.trigger(this._element,Ge,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Je),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(I.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ze),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const e of[window,this._dialog])I.off(e,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new We({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ke({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||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;const t=K.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),p(this._element),this._element.classList.add(Ze),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,I.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){I.on(this._element,"keydown.dismiss.bs.modal",(e=>{if("Escape"===e.key)return this._config.keyboard?(e.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),I.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),I.on(this._element,"mousedown.dismiss.bs.modal",(e=>{I.one(this._element,"click.dismiss.bs.modal",(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_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(Je),this._resetAdjustments(),this._scrollBar.reset(),I.trigger(this._element,Ye)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(I.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(et)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(et),this._queueCallback((()=>{this._element.classList.remove(et),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=m()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=m()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=it.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}I.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=o(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),I.one(t,Ge,(e=>{e.defaultPrevented||I.one(t,Ye,(()=>{c(this)&&this.focus()}))}));const n=K.findOne(".modal.show");n&&it.getInstance(n).hide(),it.getOrCreateInstance(t).toggle(this)})),U(it),v(it);const st="show",ot="showing",rt="hiding",at=".offcanvas.show",lt="hidePrevented.bs.offcanvas",ct="hidden.bs.offcanvas",ut={backdrop:!0,keyboard:!0,scroll:!1},dt={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ht extends W{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ut}static get DefaultType(){return dt}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||I.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new He).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ot),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(st),this._element.classList.remove(ot),I.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0))}hide(){this._isShown&&(I.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(rt),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(st,rt),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new He).reset(),I.trigger(this._element,ct)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new We({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():I.trigger(this._element,lt)}:null})}_initializeFocusTrap(){return new Ke({trapElement:this._element})}_addEventListeners(){I.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():I.trigger(this._element,lt))}))}static jQueryInterface(e){return this.each((function(){const t=ht.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)}}))}}I.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=o(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),u(this))return;I.one(t,ct,(()=>{c(this)&&this.focus()}));const n=K.findOne(at);n&&n!==t&&ht.getInstance(n).hide(),ht.getOrCreateInstance(t).toggle(this)})),I.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of K.find(at))ht.getOrCreateInstance(e).show()})),I.on(window,"resize.bs.offcanvas",(()=>{for(const e of K.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&ht.getOrCreateInstance(e).hide()})),U(ht),v(ht);const pt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ft=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,gt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,mt=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!pt.has(n)||Boolean(ft.test(e.nodeValue)||gt.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},vt={"*":["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:[]},bt={allowList:vt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},yt={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},wt={entry:"(string|element|function|null)",selector:"(string|element)"};class _t extends V{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return bt}static get DefaultType(){return yt}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},wt)}_setContent(e,t,n){const i=K.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?a(t)?this._putElementInTemplate(l(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const e of s){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[n]||[]);for(const t of i)mt(t,s)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return"function"==typeof e?e(this):e}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const xt=new Set(["sanitize","allowList","sanitizeFn"]),Ct="fade",Tt="show",Et=".modal",At="hide.bs.modal",kt="hover",St="focus",Ot={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},Lt={allowList:vt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Dt={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class jt extends W{constructor(e,n){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Lt}static get DefaultType(){return Dt}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),I.off(this._element.closest(Et),At,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),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=I.trigger(this._element,this.constructor.eventName("show")),t=(d(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),I.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(Tt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.on(e,"mouseover",h);this._queueCallback((()=>{I.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!I.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Tt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.off(e,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),I.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Ct,Tt),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Ct),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new _t({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ct)}_isShown(){return this.tip&&this.tip.classList.contains(Tt)}_createPopper(e){const n="function"==typeof this._config.placement?this._config.placement.call(this,e,this._element):this._config.placement,i=Ot[n.toUpperCase()];return t.createPopper(this._element,e,this._getPopperConfig(i))}_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:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)I.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===kt?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===kt?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");I.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?St:kt]=!0,t._enter()})),I.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?St:kt]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},I.on(this._element.closest(Et),At,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=F.getDataAttributes(this._element);for(const e of Object.keys(t))xt.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:l(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()),e}_getDelegateConfig(){const e={};for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=jt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}v(jt);const Pt={...jt.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Nt={...jt.DefaultType,content:"(null|string|element|function)"};class $t extends jt{static get Default(){return Pt}static get DefaultType(){return Nt}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=$t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}v($t);const It="click.bs.scrollspy",Mt="active",qt="[href]",Ht={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Bt={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Rt extends W{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ht}static get DefaultType(){return Bt}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=l(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(I.off(this._config.target,It),I.on(this._config.target,It,qt,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&e){if(n(o),!i)return}else s||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=K.find(qt,this._config.target);for(const t of e){if(!t.hash||u(t))continue;const e=K.findOne(t.hash,this._element);c(e)&&(this._targetLinks.set(t.hash,t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Mt),this._activateParents(e),I.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(Mt);else for(const t of K.parents(e,".nav, .list-group"))for(const e of K.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(Mt)}_clearActiveClass(e){e.classList.remove(Mt);const t=K.find("[href].active",e);for(const e of t)e.classList.remove(Mt)}static jQueryInterface(e){return this.each((function(){const t=Rt.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]()}}))}}I.on(window,"load.bs.scrollspy.data-api",(()=>{for(const e of K.find('[data-bs-spy="scroll"]'))Rt.getOrCreateInstance(e)})),v(Rt);const Ft="ArrowLeft",Vt="ArrowRight",Wt="ArrowUp",Ut="ArrowDown",zt="active",Xt="fade",Qt="show",Kt='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Yt=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Kt}`;class Gt extends W{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),I.on(this._element,"keydown.bs.tab",(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?I.trigger(t,"hide.bs.tab",{relatedTarget:e}):null;I.trigger(e,"show.bs.tab",{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(zt),this._activate(o(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),I.trigger(e,"shown.bs.tab",{relatedTarget:t})):e.classList.add(Qt)}),e,e.classList.contains(Xt)))}_deactivate(e,t){e&&(e.classList.remove(zt),e.blur(),this._deactivate(o(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),I.trigger(e,"hidden.bs.tab",{relatedTarget:t})):e.classList.remove(Qt)}),e,e.classList.contains(Xt)))}_keydown(e){if(![Ft,Vt,Wt,Ut].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[Vt,Ut].includes(e.key),n=w(this._getChildren().filter((e=>!u(e))),e.target,t,!0);n&&(n.focus({preventScroll:!0}),Gt.getOrCreateInstance(n).show())}_getChildren(){return K.find(Yt,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=o(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`#${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const s=K.findOne(e,n);s&&s.classList.toggle(i,t)};i(".dropdown-toggle",zt),i(".dropdown-menu",Qt),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(zt)}_getInnerElement(e){return e.matches(Yt)?e:K.findOne(Yt,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Gt.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}I.on(document,"click.bs.tab",Kt,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),u(this)||Gt.getOrCreateInstance(this).show()})),I.on(window,"load.bs.tab",(()=>{for(const e of K.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Gt.getOrCreateInstance(e)})),v(Gt);const Jt="hide",Zt="show",en="showing",tn={animation:"boolean",autohide:"boolean",delay:"number"},nn={animation:!0,autohide:!0,delay:5e3};class sn extends W{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return nn}static get DefaultType(){return tn}static get NAME(){return"toast"}show(){I.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Jt),p(this._element),this._element.classList.add(Zt,en),this._queueCallback((()=>{this._element.classList.remove(en),I.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(I.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(en),this._queueCallback((()=>{this._element.classList.add(Jt),this._element.classList.remove(en,Zt),I.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Zt),super.dispose()}isShown(){return this._element.classList.contains(Zt)}_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 n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){I.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),I.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),I.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),I.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=sn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return U(sn),v(sn),{Alert:z,Button:Q,Carousel:ce,Collapse:me,Dropdown:Ne,Modal:it,Offcanvas:ht,Popover:$t,ScrollSpy:Rt,Tab:Gt,Toast:sn,Tooltip:jt}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),i=t(["success","warning","info","question","error"]),s="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),r=e=>{console.warn(`${s} ${"object"==typeof e?e.join(" "):e}`)},a=e=>{console.error(`${s} ${e}`)},l=[],c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,p=()=>document.body.querySelector(`.${n.container}`),f=e=>{const t=p();return t?t.querySelector(e):null},g=e=>f(`.${e}`),m=()=>g(n.popup),v=()=>g(n.icon),b=()=>g(n.title),y=()=>g(n["html-container"]),w=()=>g(n.image),_=()=>g(n["progress-steps"]),x=()=>g(n["validation-message"]),C=()=>f(`.${n.actions} .${n.confirm}`),T=()=>f(`.${n.actions} .${n.cancel}`),E=()=>f(`.${n.actions} .${n.deny}`),A=()=>f(`.${n.loader}`),k=()=>g(n.actions),S=()=>g(n.footer),O=()=>g(n["timer-progress-bar"]),L=()=>g(n.close),D=()=>{const e=Array.from(m().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),i=parseInt(t.getAttribute("tabindex"));return n>i?1:n"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;nK(e)))},j=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),P=()=>m()&&I(m(),n.toast),N={previousBodyPadding:null},$=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{if(((e,t)=>{Array.from(e.classList).forEach((s=>{Object.values(n).includes(s)||Object.values(i).includes(s)||Object.values(t.showClass).includes(s)||e.classList.remove(s)}))})(e,t),t.customClass&&t.customClass[s]){if("string"!=typeof t.customClass[s]&&!t.customClass[s].forEach)return void r(`Invalid type of customClass.${s}! Expected string or iterable object, got "${typeof t.customClass[s]}"`);R(e,t.customClass[s])}},q=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},H=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},B=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},R=(e,t)=>{B(e,t,!0)},F=(e,t)=>{B(e,t,!1)},V=(e,t)=>{const n=Array.from(e.children);for(let e=0;e{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},X=(e,t,n,i)=>{const s=e.querySelector(t);s&&(s.style[n]=i)},Q=function(e,t){t?U(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):z(e)},K=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Y=e=>!!(e.scrollHeight>e.clientHeight),G=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),i=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||i>0},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=O();K(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Z={},ee=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;Z.restoreFocusTimeout=setTimeout((()=>{Z.previousActiveElement instanceof HTMLElement?(Z.previousActiveElement.focus(),Z.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),te=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n`.replace(/(^|\n)\s*/g,""),ie=()=>{Z.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=p();return!!e&&(e.remove(),F([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(te())return void a("SweetAlert2 requires document to initialize");const i=document.createElement("div");i.className=n.container,t&&R(i,n["no-transition"]),$(i,ne);const s="string"==typeof(o=e.target)?document.querySelector(o):o;var o;s.appendChild(i),(e=>{const t=m();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&R(p(),n.rtl)})(s),(()=>{const e=m(),t=V(e,n.input),i=V(e,n.file),s=e.querySelector(`.${n.range} input`),o=e.querySelector(`.${n.range} output`),r=V(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=V(e,n.textarea);t.oninput=ie,i.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,s.oninput=()=>{ie(),o.value=s.value},s.onchange=()=>{ie(),o.value=s.value}})()},oe=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?re(e,t):e&&$(t,e)},re=(e,t)=>{e.jquery?ae(t,e):$(t,e.toString())},ae=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})();function ce(e,t,i){Q(e,i[`show${o(t)}Button`],"inline-block"),$(e,i[`${t}ButtonText`]),e.setAttribute("aria-label",i[`${t}ButtonAriaLabel`]),e.className=n[t],M(e,i,`${t}Button`),R(e,i[`${t}ButtonClass`])}const ue=["input","file","range","select","radio","checkbox","textarea"],de=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},he=(e,t,i)=>{if(i.inputLabel){e.id=n.input;const s=document.createElement("label"),o=n["input-label"];s.setAttribute("for",e.id),s.className=o,"object"==typeof i.customClass&&R(s,i.customClass.inputLabel),s.innerText=i.inputLabel,t.insertAdjacentElement("beforebegin",s)}},pe=e=>V(m(),n[e]||n.input),fe=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ge={};ge.text=ge.email=ge.password=ge.number=ge.tel=ge.url=(e,t)=>(fe(e,t.inputValue),he(e,e,t),de(e,t),e.type=t.input,e),ge.file=(e,t)=>(he(e,e,t),de(e,t),e),ge.range=(e,t)=>{const n=e.querySelector("input"),i=e.querySelector("output");return fe(n,t.inputValue),n.type=t.input,fe(i,t.inputValue),he(n,e,t),e},ge.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");$(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return he(e,e,t),e},ge.radio=e=>(e.textContent="",e),ge.checkbox=(e,t)=>{const i=q(m(),"checkbox");i.value="1",i.id=n.checkbox,i.checked=Boolean(t.inputValue);const s=e.querySelector("span");return $(s,t.inputPlaceholder),i},ge.textarea=(e,t)=>(fe(e,t.inputValue),de(e,t),he(e,e,t),setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(m()).width);new MutationObserver((()=>{const n=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;m().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e);const me=(t,i)=>{const s=y();M(s,i,"htmlContainer"),i.html?(oe(i.html,s),U(s,"block")):i.text?(s.textContent=i.text,U(s,"block")):z(s),((t,i)=>{const s=m(),o=e.innerParams.get(t),r=!o||i.input!==o.input;ue.forEach((e=>{const t=V(s,n[e]);((e,t)=>{const n=q(m(),e);if(n){(e=>{for(let t=0;t{if(!ge[e.input])return void a(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=pe(e.input),n=ge[e.input](t,e);U(t),e.inputAutoFocus&&setTimeout((()=>{H(n)}))})(i),(e=>{const t=pe(e.input);"object"==typeof e.customClass&&R(t,e.customClass.input)})(i))})(t,i)},ve=(e,t)=>{for(const n in i)t.icon!==n&&F(e,i[n]);R(e,i[t.icon]),we(e,t),be(),M(e,t,"icon")},be=()=>{const e=m(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{let n,i=e.innerHTML;t.iconHtml?n=_e(t.iconHtml):"success"===t.icon?(n='\n
    \n \n
    \n
    \n',i=i.replace(/ style=".*?"/g,"")):n="error"===t.icon?'\n \n \n \n \n':_e({question:"?",warning:"!",info:"i"}[t.icon]),i.trim()!==n.trim()&&$(e,n)},we=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},_e=e=>`
    ${e}
    `,xe=(e,t)=>{e.className=`${n.popup} ${K(e)?t.showClass.popup:""}`,t.toast?(R([document.documentElement,document.body],n["toast-shown"]),R(e,n.toast)):R(e,n.modal),M(e,t,"popup"),"string"==typeof t.customClass&&R(e,t.customClass),t.icon&&R(e,n[`icon-${t.icon}`])},Ce=(t,s)=>{((e,t)=>{const n=p(),i=m();t.toast?(W(n,"width",t.width),i.style.width="100%",i.insertBefore(A(),v())):W(i,"width",t.width),W(i,"padding",t.padding),t.color&&(i.style.color=t.color),t.background&&(i.style.background=t.background),z(x()),xe(i,t)})(0,s),((e,t)=>{const i=p();i&&(function(e,t){"string"==typeof t?e.style.background=t:t||R([document.documentElement,document.body],n["no-backdrop"])}(i,t.backdrop),function(e,t){t in n?R(e,n[t]):(r('The "position" parameter is not valid, defaulting to "center"'),R(e,n.center))}(i,t.position),function(e,t){if(t&&"string"==typeof t){const i=`grow-${t}`;i in n&&R(e,n[i])}}(i,t.grow),M(i,t,"container"))})(0,s),((e,t)=>{const i=_();t.progressSteps&&0!==t.progressSteps.length?(U(i),i.textContent="",t.currentProgressStep>=t.progressSteps.length&&r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,s)=>{const o=(e=>{const t=document.createElement("li");return R(t,n["progress-step"]),$(t,e),t})(e);if(i.appendChild(o),s===t.currentProgressStep&&R(o,n["active-progress-step"]),s!==t.progressSteps.length-1){const e=(e=>{const t=document.createElement("li");return R(t,n["progress-step-line"]),e.progressStepsDistance&&W(t,"width",e.progressStepsDistance),t})(t);i.appendChild(e)}}))):z(i)})(0,s),((t,n)=>{const s=e.innerParams.get(t),o=v();if(s&&n.icon===s.icon)return ye(o,n),void ve(o,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(i).indexOf(n.icon))return a(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(o);U(o),ye(o,n),ve(o,n),R(o,n.showClass.icon)}else z(o)})(t,s),((e,t)=>{const i=w();t.imageUrl?(U(i,""),i.setAttribute("src",t.imageUrl),i.setAttribute("alt",t.imageAlt),W(i,"width",t.imageWidth),W(i,"height",t.imageHeight),i.className=n.image,M(i,t,"image")):z(i)})(0,s),((e,t)=>{const n=b();Q(n,t.title||t.titleText,"block"),t.title&&oe(t.title,n),t.titleText&&(n.innerText=t.titleText),M(n,t,"title")})(0,s),((e,t)=>{const n=L();$(n,t.closeButtonHtml),M(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,s),me(t,s),((e,t)=>{const i=k(),s=A();t.showConfirmButton||t.showDenyButton||t.showCancelButton?U(i):z(i),M(i,t,"actions"),function(e,t,i){const s=C(),o=E(),r=T();ce(s,"confirm",i),ce(o,"deny",i),ce(r,"cancel",i),function(e,t,i,s){s.buttonsStyling?(R([e,t,i],n.styled),s.confirmButtonColor&&(e.style.backgroundColor=s.confirmButtonColor,R(e,n["default-outline"])),s.denyButtonColor&&(t.style.backgroundColor=s.denyButtonColor,R(t,n["default-outline"])),s.cancelButtonColor&&(i.style.backgroundColor=s.cancelButtonColor,R(i,n["default-outline"]))):F([e,t,i],n.styled)}(s,o,r,i),i.reverseButtons&&(i.toast?(e.insertBefore(r,s),e.insertBefore(o,s)):(e.insertBefore(r,t),e.insertBefore(o,t),e.insertBefore(s,t)))}(i,s,t),$(s,t.loaderHtml),M(s,t,"loader")})(0,s),((e,t)=>{const n=S();Q(n,t.footer),t.footer&&oe(t.footer,n),M(n,t,"footer")})(0,s),"function"==typeof s.didRender&&s.didRender(m())};function Te(){const t=e.innerParams.get(this);if(!t)return;const i=e.domCache.get(this);z(i.loader),P()?t.icon&&U(v()):Ee(i),F([i.popup,i.actions],n.loading),i.popup.removeAttribute("aria-busy"),i.popup.removeAttribute("data-loading"),i.confirmButton.disabled=!1,i.denyButton.disabled=!1,i.cancelButton.disabled=!1}const Ee=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?U(t[0],"inline-block"):K(C())||K(E())||K(T())||z(e.actions)},Ae=()=>C()&&C().click(),ke=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Se=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Oe=(e,t)=>{const n=D();if(n.length)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();m().focus()},Le=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],je=(t,n,i)=>{const s=e.innerParams.get(t);s&&(n.isComposing||229===n.keyCode||(s.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Pe(t,n,s):"Tab"===n.key?Ne(n):[...Le,...De].includes(n.key)?$e(n.key):"Escape"===n.key&&Ie(n,s,i)))},Pe=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Ae(),t.preventDefault()}},Ne=e=>{const t=e.target,n=D();let i=-1;for(let e=0;e{const t=[C(),E(),T()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const n=Le.includes(e)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let e=0;e{c(t.allowEscapeKey)&&(e.preventDefault(),n(ke.esc))};var Me={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const qe=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},He=e=>{const t=e.target,n=p();return!(Be(e)||Re(e)||t!==n&&(Y(n)||!(t instanceof HTMLElement)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||Y(y())&&y().contains(t)))},Be=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Re=e=>e.touches&&e.touches.length>1,Fe=()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);F(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Ve=()=>{null!==N.previousBodyPadding&&(document.body.style.paddingRight=`${N.previousBodyPadding}px`,N.previousBodyPadding=null)};function We(e,t,i,s){P()?Ge(e,s):(ee(i).then((()=>Ge(e,s))),Se(Z)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),j()&&(Ve(),Fe(),qe()),F([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Ue(e){e=Qe(e);const t=Me.swalPromiseResolve.get(this),n=ze(this);this.isAwaitingPromise()?e.isDismissed||(Xe(this),t(e)):n&&t(e)}const ze=t=>{const n=m();if(!n)return!1;const i=e.innerParams.get(t);if(!i||I(n,i.hideClass.popup))return!1;F(n,i.showClass.popup),R(n,i.hideClass.popup);const s=p();return F(s,i.showClass.backdrop),R(s,i.hideClass.backdrop),Ke(t,n,i),!0},Xe=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},Qe=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Ke=(e,t,n)=>{const i=p(),s=le&&G(t);"function"==typeof n.willClose&&n.willClose(t),s?Ye(e,t,i,n.returnFocus,n.didClose):We(e,i,n.returnFocus,n.didClose)},Ye=(e,t,n,i,s)=>{Z.swalCloseEventFinishedCallback=We.bind(null,e,n,i,s),t.addEventListener(le,(function(e){e.target===t&&(Z.swalCloseEventFinishedCallback(),delete Z.swalCloseEventFinishedCallback)}))},Ge=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function Je(t,n,i){const s=e.domCache.get(t);n.forEach((e=>{s[e].disabled=i}))}function Ze(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;eObject.prototype.hasOwnProperty.call(et,e),ot=e=>-1!==tt.indexOf(e),rt=e=>nt[e],at=e=>{st(e)||r(`Unknown parameter "${e}"`)},lt=e=>{it.includes(e)&&r(`The parameter "${e}" is incompatible with toasts`)},ct=e=>{rt(e)&&((e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,l.includes(n)||(l.push(n),r(n))})(e,rt(e))},ut=t=>{t.isAwaitingPromise()?(dt(e,t),e.awaitingPromise.set(t,!0)):(dt(Me,t),dt(e,t))},dt=(e,t)=>{for(const n in e)e[n].delete(t)};var ht=Object.freeze({__proto__:null,_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Z.swalCloseEventFinishedCallback&&(Z.swalCloseEventFinishedCallback(),delete Z.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),(e=>{ut(e),delete e.params,delete Z.keydownHandler,delete Z.keydownTarget,delete Z.currentInstance})(this)):ut(this)},close:Ue,closeModal:Ue,closePopup:Ue,closeToast:Ue,disableButtons:function(){Je(this,["confirmButton","denyButton","cancelButton"],!0)},disableInput:function(){Ze(this.getInput(),!0)},disableLoading:Te,enableButtons:function(){Je(this,["confirmButton","denyButton","cancelButton"],!1)},enableInput:function(){Ze(this.getInput(),!1)},getInput:function(t){const n=e.innerParams.get(t||this),i=e.domCache.get(t||this);return i?q(i.popup,n.input):null},handleAwaitingPromise:Xe,hideLoading:Te,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=Me.swalPromiseReject.get(this);Xe(this),t&&t(e)},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const i=this.getInput();i&&(i.removeAttribute("aria-invalid"),i.removeAttribute("aria-describedby"),F(i,n.inputerror))},showValidationMessage:function(t){const i=e.domCache.get(this),s=e.innerParams.get(this);$(i.validationMessage,t),i.validationMessage.className=n["validation-message"],s.customClass&&s.customClass.validationMessage&&R(i.validationMessage,s.customClass.validationMessage),U(i.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",n["validation-message"]),H(o),R(o,n.inputerror))},update:function(t){const n=m(),i=e.innerParams.get(this);if(!n||I(n,i.hideClass.popup))return void r("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s=(e=>{const t={};return Object.keys(e).forEach((n=>{ot(n)?t[n]=e[n]:r(`Invalid parameter to update: ${n}`)})),t})(t),o=Object.assign({},i,s);Ce(this,o),e.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}});const pt=e=>{let t=m();t||new Gt,t=m();const n=A();P()?z(v()):ft(t,e),U(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},ft=(e,t)=>{const i=k(),s=A();!t&&K(C())&&(t=C()),U(i),t&&(z(t),s.setAttribute("data-button-to-replace",t.className)),s.parentNode.insertBefore(s,t),R([e,i],n.loading)},gt={select:(e,t,i)=>{const s=V(e,n.select),o=(e,t,n)=>{const s=document.createElement("option");s.value=n,$(s,t),s.selected=vt(n,i.inputValue),e.appendChild(s)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,s.appendChild(e),n.forEach((t=>o(e,t[1],t[0])))}else o(s,n,t)})),s.focus()},radio:(e,t,i)=>{const s=V(e,n.radio);t.forEach((e=>{const t=e[0],o=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,vt(t,i.inputValue)&&(r.checked=!0);const l=document.createElement("span");$(l,o),l.className=n.label,a.appendChild(r),a.appendChild(l),s.appendChild(a)}));const o=s.querySelectorAll("input");o.length&&o[0].focus()}},mt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let i=e;"object"==typeof i&&(i=mt(i)),t.push([n,i])})):Object.keys(e).forEach((n=>{let i=e[n];"object"==typeof i&&(i=mt(i)),t.push([n,i])})),t},vt=(e,t)=>t&&t.toString()===e.toString(),bt=(t,n)=>{const i=e.innerParams.get(t);if(!i.input)return void a(`The "input" parameter is needed to be set when using returnInputValueOn${o(n)}`);const s=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return(e=>e.checked?1:0)(n);case"radio":return(e=>e.checked?e.value:null)(n);case"file":return(e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null)(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,i);i.inputValidator?yt(t,s,n):t.getInput().checkValidity()?"deny"===n?wt(t,s):Ct(t,s):(t.enableButtons(),t.showValidationMessage(i.validationMessage))},yt=(t,n,i)=>{const s=e.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>d(s.inputValidator(n,s.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===i?wt(t,n):Ct(t,n)}))},wt=(t,n)=>{const i=e.innerParams.get(t||void 0);i.showLoaderOnDeny&&pt(E()),i.preDeny?(e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(i.preDeny(n,i.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),Xe(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>xt(t||void 0,e)))):t.close({isDenied:!0,value:n})},_t=(e,t)=>{e.close({isConfirmed:!0,value:t})},xt=(e,t)=>{e.rejectPromise(t)},Ct=(t,n)=>{const i=e.innerParams.get(t||void 0);i.showLoaderOnConfirm&&pt(),i.preConfirm?(t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(i.preConfirm(n,i.validationMessage)))).then((e=>{K(x())||!1===e?(t.hideLoading(),Xe(t)):_t(t,void 0===e?n:e)})).catch((e=>xt(t||void 0,e)))):_t(t,n)},Tt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Et=!1;const At=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),kt=()=>{if(Z.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),Z.timeout.stop()},St=()=>{if(Z.timeout){const e=Z.timeout.start();return J(e),e}};let Ot=!1;const Lt={},Dt=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Lt){const n=t.getAttribute(e);if(n)return void Lt[e].fire({template:n})}};var jt=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||At(e[0])?["title","html","icon"].forEach(((n,i)=>{const s=e[i];"string"==typeof s||At(s)?t[n]=s:void 0!==s&&a(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){Lt[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Ot||(document.body.addEventListener("click",Dt),Ot=!0)},clickCancel:()=>T()&&T().click(),clickConfirm:Ae,clickDeny:()=>E()&&E().click(),enableLoading:pt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;ng(n["icon-content"]),getImage:w,getInputLabel:()=>g(n["input-label"]),getLoader:A,getPopup:m,getProgressSteps:_,getTimerLeft:()=>Z.timeout&&Z.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:b,getValidationMessage:x,increaseTimer:e=>{if(Z.timeout){const t=Z.timeout.increase(e);return J(t,!0),t}},isDeprecatedParameter:rt,isLoading:()=>m().hasAttribute("data-loading"),isTimerRunning:()=>Z.timeout&&Z.timeout.isRunning(),isUpdatableParameter:ot,isValidParameter:st,isVisible:()=>K(m()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},resumeTimer:St,showLoading:pt,stopTimer:kt,toggleTimer:()=>{const e=Z.timeout;return e&&(e.running?kt():St())}});class Pt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Nt=["swal-title","swal-html","swal-footer"],$t=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&r([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])}))},It=e=>{const t=p(),i=m();"function"==typeof e.willOpen&&e.willOpen(i);const s=window.getComputedStyle(document.body).overflowY;Bt(t,i,e),setTimeout((()=>{qt(t,i)}),10),j()&&(Ht(t,e.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===p()||e.contains(p())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),P()||Z.previousActiveElement||(Z.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(i))),F(t,n["no-transition"])},Mt=e=>{const t=m();if(e.target!==t)return;const n=p();t.removeEventListener(le,Mt),n.style.overflowY="auto"},qt=(e,t)=>{le&&G(t)?(e.style.overflowY="hidden",t.addEventListener(le,Mt)):e.style.overflowY="auto"},Ht=(e,t,i)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",R(document.body,n.iosfix),(()=>{const e=p();let t;e.ontouchstart=e=>{t=He(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}})(),(()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;m().scrollHeight>window.innerHeight-e&&(p().style.paddingBottom=`${e}px`)}})()}})(),t&&"hidden"!==i&&(null===N.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(N.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${N.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)),setTimeout((()=>{e.scrollTop=0}))},Bt=(e,t,i)=>{R(e,i.showClass.backdrop),t.style.setProperty("opacity","0","important"),U(t,"grid"),setTimeout((()=>{R(t,i.showClass.popup),t.style.removeProperty("opacity")}),10),R([document.documentElement,document.body],n.shown),i.heightAuto&&i.backdrop&&!i.toast&&R([document.documentElement,document.body],n["height-auto"])};var Rt={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};let Ft;class Vt{constructor(){if("undefined"==typeof window)return;Ft=this;for(var t=arguments.length,n=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&r('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)at(t),e.toast&<(t),ct(t)})(Object.assign({},n,t)),Z.currentInstance&&(Z.currentInstance._destroy(),j()&&qe()),Z.currentInstance=Ft;const i=Ut(t,n);(function(e){!function(e){e.inputValidator||Object.keys(Rt).forEach((t=>{e.input===t&&(e.inputValidator=Rt[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&r("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(r('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
    ")),se(e)})(i),Object.freeze(i),Z.timeout&&(Z.timeout.stop(),delete Z.timeout),clearTimeout(Z.restoreFocusTimeout);const s=zt(Ft);return Ce(Ft,i),e.innerParams.set(Ft,i),Wt(Ft,s,i)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const Wt=(t,n,i)=>new Promise(((s,o)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};Me.swalPromiseResolve.set(t,s),Me.swalPromiseReject.set(t,o),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?bt(t,"confirm"):Ct(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?bt(t,"deny"):wt(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(ke.cancel)})(t,r)},n.closeButton.onclick=()=>{r(ke.close)},((t,n,i)=>{e.innerParams.get(t).toast?((t,n,i)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(Tt(n)||n.timer||n.input)||i(ke.close)}})(t,n,i):((e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Et=!0)}}})(n),(e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Et=!0)}}})(n),((t,n,i)=>{n.container.onclick=s=>{const o=e.innerParams.get(t);Et?Et=!1:s.target===n.container&&c(o.allowOutsideClick)&&i(ke.backdrop)}})(t,n,i))})(t,n,r),((e,t,n,i)=>{Se(t),n.toast||(t.keydownHandler=t=>je(e,t,i),t.keydownTarget=n.keydownListenerCapture?window:m(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Z,i,r),((e,t)=>{"select"===t.input||"radio"===t.input?((e,t)=>{const n=m(),i=e=>{gt[t.input](n,mt(e),t)};u(t.inputOptions)||h(t.inputOptions)?(pt(C()),d(t.inputOptions).then((t=>{e.hideLoading(),i(t)}))):"object"==typeof t.inputOptions?i(t.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)})(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||h(t.inputValue))&&(pt(C()),((e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((i=>{n.value="number"===t.input?`${parseFloat(i)||0}`:`${i}`,U(n),n.focus(),e.hideLoading()})).catch((t=>{a(`Error in inputValue promise: ${t}`),n.value="",U(n),n.focus(),e.hideLoading()}))})(e,t))})(t,i),It(i),Xt(Z,i,r),Qt(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),Ut=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return(e=>{const t=Nt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||r(`Unrecognized element <${n}>`)}))})(n),Object.assign((e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{$t(e,["name","value"]);const n=e.getAttribute("name"),i=e.getAttribute("value");t[n]="boolean"==typeof et[n]?"false"!==i:"object"==typeof et[n]?JSON.parse(i):i})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),i=e.getAttribute("value");t[n]=new Function(`return ${i}`)()})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{$t(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${o(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t})(n),(e=>{const t={},n=e.querySelector("swal-image");return n&&($t(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t})(n),(e=>{const t={},n=e.querySelector("swal-icon");return n&&($t(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t})(n),(e=>{const t={},n=e.querySelector("swal-input");n&&($t(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const i=Array.from(e.querySelectorAll("swal-input-option"));return i.length&&(t.inputOptions={},i.forEach((e=>{$t(e,["value"]);const n=e.getAttribute("value"),i=e.innerHTML;t.inputOptions[n]=i}))),t})(n),((e,t)=>{const n={};for(const i in t){const s=t[i],o=e.querySelector(s);o&&($t(o,[]),n[s.replace(/^swal-/,"")]=o.innerHTML.trim())}return n})(n,Nt))})(e),i=Object.assign({},et,t,n,e);return i.showClass=Object.assign({},et.showClass,i.showClass),i.hideClass=Object.assign({},et.hideClass,i.hideClass),i},zt=t=>{const n={popup:m(),container:p(),actions:k(),confirmButton:C(),denyButton:E(),cancelButton:T(),loader:A(),closeButton:L(),validationMessage:x(),progressSteps:_()};return e.domCache.set(t,n),n},Xt=(e,t,n)=>{const i=O();z(i),t.timer&&(e.timeout=new Pt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(U(i),M(i,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&J(t.timer)}))))},Qt=(e,t)=>{t.toast||(c(t.allowEnterKey)?Kt(e,t)||Oe(-1,1):Yt())},Kt=(e,t)=>t.focusDeny&&K(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&K(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!K(e.confirmButton)||(e.confirmButton.focus(),0)),Yt=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Object.assign(Vt.prototype,ht),Object.assign(Vt,jt),Object.keys(ht).forEach((e=>{Vt[e]=function(){if(Ft)return Ft[e](...arguments)}})),Vt.DismissReason=ke,Vt.version="11.7.2";const Gt=Vt;return Gt.default=Gt,Gt})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),function(e){var t;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=n,i}}}((function(){function e(){for(var e=0,t={};e{i=null,n||e.apply(o,s)}),t),r&&e.apply(o,s)}}function n(e,t){return JSON.stringify(e)===JSON.stringify(t)}class i{constructor(t){this.id="",this.style="",this.class=[],this.isMultiple=!1,this.isOpen=!1,this.isFullOpen=!1,this.intervalMove=null,t||(t={}),this.id="ss-"+e(),this.style=t.style||"",this.class=t.class||[],this.disabled=void 0!==t.disabled&&t.disabled,this.alwaysOpen=void 0!==t.alwaysOpen&&t.alwaysOpen,this.showSearch=void 0===t.showSearch||t.showSearch,this.searchPlaceholder=t.searchPlaceholder||"Search",this.searchText=t.searchText||"No Results",this.searchingText=t.searchingText||"Searching...",this.searchHighlight=void 0!==t.searchHighlight&&t.searchHighlight,this.closeOnSelect=void 0===t.closeOnSelect||t.closeOnSelect,this.contentLocation=t.contentLocation||document.body,this.contentPosition=t.contentPosition||"absolute",this.openPosition=t.openPosition||"auto",this.placeholderText=void 0!==t.placeholderText?t.placeholderText:"Select Value",this.allowDeselect=void 0!==t.allowDeselect&&t.allowDeselect,this.hideSelected=void 0!==t.hideSelected&&t.hideSelected,this.showOptionTooltips=void 0!==t.showOptionTooltips&&t.showOptionTooltips,this.minSelected=t.minSelected||0,this.maxSelected=t.maxSelected||1e3,this.timeoutDelay=t.timeoutDelay||200,this.maxValuesShown=t.maxValuesShown||20,this.maxValuesMessage=t.maxValuesMessage||"{number} selected"}}class s{constructor(t){if(this.id=t.id&&""!==t.id?t.id:e(),this.label=t.label||"",this.selectAll=void 0!==t.selectAll&&t.selectAll,this.closable=t.closable||"off",this.options=[],t.options)for(const e of t.options)this.options.push(new o(e))}}class o{constructor(t){this.id=t.id&&""!==t.id?t.id:e(),this.value=void 0===t.value?t.text:t.value,this.text=t.text||"",this.html=t.html||"",this.selected=void 0!==t.selected&&t.selected,this.display=void 0===t.display||t.display,this.disabled=void 0!==t.disabled&&t.disabled,this.mandatory=void 0!==t.mandatory&&t.mandatory,this.placeholder=void 0!==t.placeholder&&t.placeholder,this.class=t.class||"",this.style=t.style||"",this.data=t.data||{}}}class r{constructor(e,t){this.selectType="single",this.data=[],this.selectType=e,this.setData(t)}validateDataArray(e){if(!Array.isArray(e))return new Error("Data must be an array");for(let t of e){if(!(t instanceof s||"label"in t))return t instanceof o||"text"in t?this.validateOption(t):new Error("Data object must be a valid optgroup or option");if(!("label"in t))return new Error("Optgroup must have a label");if("options"in t&&t.options)for(let e of t.options)return this.validateOption(e)}return null}validateOption(e){return"text"in e?null:new Error("Option must have a text")}partialToFullData(e){let t=[];return e.forEach((e=>{if(e instanceof s||"label"in e){let n=[];"options"in e&&e.options&&e.options.forEach((e=>{n.push(new o(e))})),n.length>0&&t.push(new s(e))}(e instanceof o||"text"in e)&&t.push(new o(e))})),t}setData(e){this.data=this.partialToFullData(e),"single"===this.selectType&&this.setSelectedBy("value",this.getSelected())}getData(){return this.filter(null,!0)}getDataOptions(){return this.filter(null,!1)}addOption(e){this.setData(this.getData().concat(new o(e)))}setSelectedBy(e,t){let n=null,i=!1;for(let r of this.data){if(r instanceof s)for(let s of r.options)n||(n=s),s.selected=!i&&t.includes(s[e]),s.selected&&"single"===this.selectType&&(i=!0);r instanceof o&&(n||(n=r),r.selected=!i&&t.includes(r[e]),r.selected&&"single"===this.selectType&&(i=!0))}"single"===this.selectType&&n&&!i&&(n.selected=!0)}getSelected(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.value)})),t}getSelectedOptions(){return this.filter((e=>e.selected),!1)}getSelectedIDs(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.id)})),t}getOptgroupByID(e){for(let t of this.data)if(t instanceof s&&t.id===e)return t;return null}getOptionByID(e){let t=this.filter((t=>t.id===e),!1);return t.length?t[0]:null}search(e,t){return""===(e=e.trim())?this.getData():this.filter((n=>t(n,e)),!0)}filter(e,t){const n=[];return this.data.forEach((i=>{if(i instanceof s){let r=[];if(i.options.forEach((i=>{e&&!e(i)||(t?r.push(new o(i)):n.push(new o(i)))})),r.length>0){let e=new s(i);e.options=r,n.push(e)}}i instanceof o&&(e&&!e(i)||n.push(new o(i)))})),n}}class a{constructor(e,t,n){this.classes={main:"ss-main",placeholder:"ss-placeholder",values:"ss-values",single:"ss-single",max:"ss-max",value:"ss-value",valueText:"ss-value-text",valueDelete:"ss-value-delete",valueOut:"ss-value-out",deselect:"ss-deselect",deselectPath:"M10,10 L90,90 M10,90 L90,10",arrow:"ss-arrow",arrowClose:"M10,30 L50,70 L90,30",arrowOpen:"M10,70 L50,30 L90,70",content:"ss-content",openAbove:"ss-open-above",openBelow:"ss-open-below",search:"ss-search",searchHighlighter:"ss-search-highlight",searching:"ss-searching",addable:"ss-addable",addablePath:"M50,10 L50,90 M10,50 L90,50",list:"ss-list",optgroup:"ss-optgroup",optgroupLabel:"ss-optgroup-label",optgroupLabelText:"ss-optgroup-label-text",optgroupActions:"ss-optgroup-actions",optgroupSelectAll:"ss-selectall",optgroupSelectAllBox:"M60,10 L10,10 L10,90 L90,90 L90,50",optgroupSelectAllCheck:"M30,45 L50,70 L90,10",optgroupClosable:"ss-closable",option:"ss-option",optionDelete:"M10,10 L90,90 M10,90 L90,10",highlighted:"ss-highlighted",open:"ss-open",close:"ss-close",selected:"ss-selected",error:"ss-error",disabled:"ss-disabled",hide:"ss-hide"},this.store=t,this.settings=e,this.callbacks=n,this.main=this.mainDiv(),this.content=this.contentDiv(),this.updateClassStyles(),this.updateAriaAttributes(),this.settings.contentLocation.appendChild(this.content.main)}enable(){this.main.main.classList.remove(this.classes.disabled),this.content.search.input.disabled=!1}disable(){this.main.main.classList.add(this.classes.disabled),this.content.search.input.disabled=!0}open(){this.main.arrow.path.setAttribute("d",this.classes.arrowOpen),this.main.main.classList.add("up"===this.settings.openPosition?this.classes.openAbove:this.classes.openBelow),this.main.main.setAttribute("aria-expanded","true"),this.moveContent();const e=this.store.getSelectedOptions();if(e.length){const t=e[e.length-1].id,n=this.content.list.querySelector('[data-id="'+t+'"]');n&&this.ensureElementInView(this.content.list,n)}}close(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.remove(this.classes.openBelow),this.main.main.setAttribute("aria-expanded","false"),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.main.arrow.path.setAttribute("d",this.classes.arrowClose)}updateClassStyles(){if(this.main.main.className="",this.main.main.removeAttribute("style"),this.content.main.className="",this.content.main.removeAttribute("style"),this.main.main.classList.add(this.classes.main),this.content.main.classList.add(this.classes.content),""!==this.settings.style&&(this.content.main.style.cssText=this.settings.style),this.settings.class.length)for(const e of this.settings.class)""!==e.trim()&&(this.main.main.classList.add(e.trim()),this.content.main.classList.add(e.trim()));"relative"===this.settings.contentPosition&&this.content.main.classList.add("ss-"+this.settings.contentPosition)}updateAriaAttributes(){this.main.main.role="combobox",this.main.main.setAttribute("aria-haspopup","listbox"),this.main.main.setAttribute("aria-controls",this.content.main.id),this.main.main.setAttribute("aria-expanded","false"),this.content.main.setAttribute("role","listbox")}mainDiv(){const e=document.createElement("div");e.dataset.id=this.settings.id,e.id=this.settings.id,e.tabIndex=0,e.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return this.callbacks.open(),"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Enter":case" ":this.callbacks.open();const t=this.content.list.querySelector("."+this.classes.highlighted);return t&&t.click(),!1;case"Escape":return this.callbacks.close(),!1}},e.onclick=e=>{this.settings.disabled||(this.settings.isOpen?this.callbacks.close():this.callbacks.open())};const t=document.createElement("div");t.classList.add(this.classes.values),e.appendChild(t);const n=document.createElement("div");n.classList.add(this.classes.deselect),this.settings.allowDeselect&&!this.settings.isMultiple||n.classList.add(this.classes.hide),n.onclick=e=>{if(e.stopPropagation(),this.settings.disabled)return;let t=!0;const n=this.store.getSelectedOptions(),i=[];this.callbacks.beforeChange&&(t=!0===this.callbacks.beforeChange(i,n)),t&&(this.callbacks.setSelected([""],!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(i))};const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 100 100");const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.deselectPath),i.appendChild(s),n.appendChild(i),e.appendChild(n);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.classList.add(this.classes.arrow),o.setAttribute("viewBox","0 0 100 100");const r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",this.classes.arrowClose),this.settings.alwaysOpen&&o.classList.add(this.classes.hide),o.appendChild(r),e.appendChild(o),{main:e,values:t,deselect:{main:n,svg:i,path:s},arrow:{main:o,path:r}}}mainFocus(e){"click"!==e&&this.main.main.focus({preventScroll:!0})}placeholder(){const e=this.store.filter((e=>e.placeholder),!1);let t=this.settings.placeholderText;e.length&&(""!==e[0].html?t=e[0].html:""!==e[0].text&&(t=e[0].text));const n=document.createElement("div");return n.classList.add(this.classes.placeholder),n.innerHTML=t,n}renderValues(){this.settings.isMultiple?this.renderMultipleValues():this.renderSingleValue()}renderSingleValue(){const e=this.store.filter((e=>e.selected&&!e.placeholder),!1),t=e.length>0?e[0]:null;if(t){const e=document.createElement("div");e.classList.add(this.classes.single),e.innerHTML=t.html?t.html:t.text,this.main.values.innerHTML=e.outerHTML}else this.main.values.innerHTML=this.placeholder().outerHTML;this.settings.allowDeselect&&e.length?this.main.deselect.main.classList.remove(this.classes.hide):this.main.deselect.main.classList.add(this.classes.hide)}renderMultipleValues(){let e=this.main.values.childNodes,t=this.store.filter((e=>e.selected&&e.display),!1);if(0===t.length)return void(this.main.values.innerHTML=this.placeholder().outerHTML);{const e=this.main.values.querySelector("."+this.classes.placeholder);e&&e.remove()}if(t.length>this.settings.maxValuesShown){const e=document.createElement("div");return e.classList.add(this.classes.max),e.textContent=this.settings.maxValuesMessage.replace("{number}",t.length.toString()),void(this.main.values.innerHTML=e.outerHTML)}{const e=this.main.values.querySelector("."+this.classes.max);e&&e.remove()}let n=[];for(let i=0;ie.id===o),!1).length||n.push(s))}for(const e of n)e.classList.add(this.classes.valueOut),setTimeout((()=>{this.main.values.removeChild(e)}),100);e=this.main.values.childNodes;for(let n=0;n{if(t.preventDefault(),t.stopPropagation(),this.settings.disabled)return;let n=!0;const i=this.store.getSelectedOptions(),r=i.filter((t=>t.selected&&t.id!==e.id),!0);if(!(this.settings.minSelected&&r.length{this.callbacks.search(e.target.value)}),100),n.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Escape":return this.callbacks.close(),!1;case"Enter":case" ":if(this.callbacks.addable&&e.ctrlKey)return i.click(),!1;{const e=this.content.list.querySelector("."+this.classes.highlighted);if(e)return e.click(),!1}return!0}},e.appendChild(n),this.callbacks.addable){i.classList.add(this.classes.addable);const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 100 100");const n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",this.classes.addablePath),t.appendChild(n),i.appendChild(t),i.onclick=e=>{if(e.preventDefault(),e.stopPropagation(),!this.callbacks.addable)return;const t=this.content.search.input.value.trim();if(""===t)return void this.content.search.input.focus();const n=e=>{let t=new o(e);if(this.callbacks.addOption(t),this.settings.isMultiple){let e=this.store.getSelected();e.push(t.value),this.callbacks.setSelected(e,!0)}else this.callbacks.setSelected([t.value],!0);this.callbacks.search(""),this.settings.closeOnSelect&&setTimeout((()=>{this.callbacks.close()}),100)},i=this.callbacks.addable(t);i instanceof Promise?i.then((e=>{n("string"==typeof e?{text:e,value:e}:e)})):n("string"==typeof i?{text:i,value:i}:i)},e.appendChild(i),s.addable={main:i,svg:t,path:n}}return s}searchFocus(){this.content.search.input.focus()}getOptions(e=!1,t=!1,n=!1){let i="."+this.classes.option;return e&&(i+=":not(."+this.classes.placeholder+")"),t&&(i+=":not(."+this.classes.disabled+")"),n&&(i+=":not(."+this.classes.hide+")"),Array.from(this.content.list.querySelectorAll(i))}highlight(e){const t=this.getOptions(!0,!0,!0);if(0!==t.length)if(1!==t.length||t[0].classList.contains(this.classes.highlighted)){for(let n=0;n=0?n-1:t.length-1];o.classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,o);const r=o.parentElement;if(r&&r.classList.contains(this.classes.close)){const e=r.querySelector("."+this.classes.optgroupLabel);e&&e.click()}return}t["down"===e?0:t.length-1].classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,t["down"===e?0:t.length-1])}else t[0].classList.add(this.classes.highlighted)}listDiv(){const e=document.createElement("div");return e.classList.add(this.classes.list),e}renderError(e){this.content.list.innerHTML="";const t=document.createElement("div");t.classList.add(this.classes.error),t.textContent=e,this.content.list.appendChild(t)}renderSearching(){this.content.list.innerHTML="";const e=document.createElement("div");e.classList.add(this.classes.searching),e.textContent=this.settings.searchingText,this.content.list.appendChild(e)}renderOptions(e){if(this.content.list.innerHTML="",0===e.length){const e=document.createElement("div");return e.classList.add(this.classes.search),e.innerHTML=this.settings.searchText,void this.content.list.appendChild(e)}for(const t of e){if(t instanceof s){const e=document.createElement("div");e.classList.add(this.classes.optgroup);const n=document.createElement("div");n.classList.add(this.classes.optgroupLabel),e.appendChild(n);const i=document.createElement("div");i.classList.add(this.classes.optgroupLabelText),i.textContent=t.label,n.appendChild(i);const s=document.createElement("div");if(s.classList.add(this.classes.optgroupActions),n.appendChild(s),this.settings.isMultiple&&t.selectAll){const e=document.createElement("div");e.classList.add(this.classes.optgroupSelectAll);let n=!0;for(const e of t.options)if(!e.selected){n=!1;break}n&&e.classList.add(this.classes.selected);const i=document.createElement("span");i.textContent="Select All",e.appendChild(i);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100"),e.appendChild(o);const r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",this.classes.optgroupSelectAllBox),o.appendChild(r);const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",this.classes.optgroupSelectAllCheck),o.appendChild(a),e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const i=this.store.getSelected();if(n){const e=i.filter((e=>{for(const n of t.options)if(e===n.value)return!1;return!0}));this.callbacks.setSelected(e,!0)}else{const e=i.concat(t.options.map((e=>e.value)));this.callbacks.setSelected(e,!0)}})),s.appendChild(e)}if("off"!==t.closable){const i=document.createElement("div");i.classList.add(this.classes.optgroupClosable);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100"),o.classList.add(this.classes.arrow),i.appendChild(o);const r=document.createElementNS("http://www.w3.org/2000/svg","path");o.appendChild(r),t.options.some((e=>e.selected))||""!==this.content.search.input.value.trim()?(i.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):"open"===t.closable?(e.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):"close"===t.closable&&(e.classList.add(this.classes.close),r.setAttribute("d",this.classes.arrowClose)),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),e.classList.contains(this.classes.close)?(e.classList.remove(this.classes.close),e.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):(e.classList.remove(this.classes.open),e.classList.add(this.classes.close),r.setAttribute("d",this.classes.arrowClose))})),s.appendChild(i)}e.appendChild(n);for(const n of t.options)e.appendChild(this.option(n));this.content.list.appendChild(e)}t instanceof o&&this.content.list.appendChild(this.option(t))}}option(e){if(e.placeholder){const e=document.createElement("div");return e.classList.add(this.classes.option),e.classList.add(this.classes.hide),e}const t=document.createElement("div");return t.dataset.id=e.id,t.id=e.id,t.classList.add(this.classes.option),t.setAttribute("role","option"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.style&&(t.style.cssText=e.style),this.settings.searchHighlight&&""!==this.content.search.input.value.trim()?t.innerHTML=this.highlightText(""!==e.html?e.html:e.text,this.content.search.input.value,this.classes.searchHighlighter):""!==e.html?t.innerHTML=e.html:t.textContent=e.text,this.settings.showOptionTooltips&&t.textContent&&t.setAttribute("title",t.textContent),e.display||t.classList.add(this.classes.hide),e.disabled&&t.classList.add(this.classes.disabled),e.selected&&this.settings.hideSelected&&t.classList.add(this.classes.hide),e.selected?(t.classList.add(this.classes.selected),t.setAttribute("aria-selected","true"),this.main.main.setAttribute("aria-activedescendant",t.id)):(t.classList.remove(this.classes.selected),t.setAttribute("aria-selected","false")),t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation();const n=this.store.getSelected(),i=t.currentTarget,s=String(i.dataset.id);if(e.disabled||e.selected&&!this.settings.allowDeselect)return;if(this.settings.isMultiple&&this.settings.maxSelected<=n.length&&!e.selected||this.settings.isMultiple&&this.settings.minSelected>=n.length&&e.selected)return;let o=!1;const r=this.store.getSelectedOptions();let a=[];this.settings.isMultiple&&(a=e.selected?r.filter((e=>e.id!==s)):r.concat(e)),this.settings.isMultiple||(a=e.selected?[]:[e]),this.callbacks.beforeChange||(o=!0),this.callbacks.beforeChange&&(o=!1!==this.callbacks.beforeChange(a,r)),o&&(this.store.getOptionByID(s)||this.callbacks.addOption(e),this.callbacks.setSelected(a.map((e=>e.value)),!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(a))})),t}destroy(){this.main.main.remove(),this.content.main.remove()}highlightText(e,t,n){let i=e;const s=new RegExp("("+t.trim()+")(?![^<]*>[^<>]*${a}`),i}moveContentAbove(){const e=this.main.main.offsetHeight,t=this.content.main.offsetHeight;this.main.main.classList.remove(this.classes.openBelow),this.main.main.classList.add(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.content.main.classList.add(this.classes.openAbove);const n=this.main.main.getBoundingClientRect();this.content.main.style.margin="-"+(e+t-1)+"px 0px 0px 0px",this.content.main.style.top=n.top+n.height+window.scrollY+"px",this.content.main.style.left=n.left+window.scrollX+"px",this.content.main.style.width=n.width+"px"}moveContentBelow(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.add(this.classes.openBelow),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.add(this.classes.openBelow);const e=this.main.main.getBoundingClientRect();this.content.main.style.margin="-1px 0px 0px 0px","relative"!==this.settings.contentPosition&&(this.content.main.style.top=e.top+e.height+window.scrollY+"px",this.content.main.style.left=e.left+window.scrollX+"px",this.content.main.style.width=e.width+"px")}ensureElementInView(e,t){const n=e.scrollTop+e.offsetTop,i=n+e.clientHeight,s=t.offsetTop,o=s+t.clientHeight;si&&(e.scrollTop+=o-i)}putContent(){const e=this.main.main.offsetHeight,t=this.main.main.getBoundingClientRect(),n=this.content.main.offsetHeight;return window.innerHeight-(t.top+e)<=n&&t.top>n?"up":"down"}}class l{constructor(e){this.listen=!1,this.observer=null,this.select=e,this.select.addEventListener("change",this.valueChange.bind(this),{passive:!0}),this.observer=new MutationObserver(this.observeCall.bind(this)),this.changeListen(!0)}enable(){this.select.disabled=!1}disable(){this.select.disabled=!0}hideUI(){this.select.tabIndex=-1,this.select.style.display="none",this.select.setAttribute("aria-hidden","true")}showUI(){this.select.removeAttribute("tabindex"),this.select.style.display="",this.select.removeAttribute("aria-hidden")}changeListen(e){this.listen=e,e&&this.observer&&this.observer.observe(this.select,{subtree:!0,childList:!0,attributes:!0}),e||this.observer&&this.observer.disconnect()}valueChange(e){return this.listen&&this.onValueChange&&this.onValueChange(this.getSelectedValues()),!0}observeCall(e){if(!this.listen)return;let t=!1,n=!1,i=!1;for(const s of e)s.target===this.select&&("disabled"===s.attributeName&&(n=!0),"class"===s.attributeName&&(t=!0)),"OPTGROUP"!==s.target.nodeName&&"OPTION"!==s.target.nodeName||(i=!0);t&&this.onClassChange&&this.onClassChange(this.select.className.split(" ")),n&&this.onDisabledChange&&(this.changeListen(!1),this.onDisabledChange(this.select.disabled),this.changeListen(!0)),i&&this.onOptionsChange&&(this.changeListen(!1),this.onOptionsChange(this.getData()),this.changeListen(!0))}getData(){let e=[];const t=this.select.childNodes;for(const n of t)"OPTGROUP"===n.nodeName&&e.push(this.getDataFromOptgroup(n)),"OPTION"===n.nodeName&&e.push(this.getDataFromOption(n));return e}getDataFromOptgroup(e){let t={id:e.id,label:e.label,selectAll:!!e.dataset&&"true"===e.dataset.selectall,closable:e.dataset?e.dataset.closable:"off",options:[]};const n=e.childNodes;for(const e of n)"OPTION"===e.nodeName&&t.options.push(this.getDataFromOption(e));return t}getDataFromOption(e){return{id:e.id,value:e.value,text:e.text,html:e.dataset&&e.dataset.html?e.dataset.html:"",selected:e.selected,display:"none"!==e.style.display,disabled:e.disabled,mandatory:!!e.dataset&&"true"===e.dataset.mandatory,placeholder:"true"===e.dataset.placeholder,class:e.className,style:e.style.cssText,data:e.dataset}}getSelectedValues(){let e=[];const t=this.select.childNodes;for(const n of t){if("OPTGROUP"===n.nodeName){const t=n.childNodes;for(const n of t)if("OPTION"===n.nodeName){const t=n;t.selected&&e.push(t.value)}}if("OPTION"===n.nodeName){const t=n;t.selected&&e.push(t.value)}}return e}setSelected(e){this.changeListen(!1);const t=this.select.childNodes;for(const n of t){if("OPTGROUP"===n.nodeName){const t=n.childNodes;for(const n of t)if("OPTION"===n.nodeName){const t=n;t.selected=e.includes(t.value)}}if("OPTION"===n.nodeName){const t=n;t.selected=e.includes(t.value)}}this.changeListen(!0)}updateSelect(e,t,n){this.changeListen(!1),e&&(this.select.dataset.id=e),t&&(this.select.style.cssText=t),n&&(this.select.className="",n.forEach((e=>{""!==e.trim()&&this.select.classList.add(e.trim())}))),this.changeListen(!0)}updateOptions(e){this.changeListen(!1),this.select.innerHTML="";for(const t of e)t instanceof s&&this.select.appendChild(this.createOptgroup(t)),t instanceof o&&this.select.appendChild(this.createOption(t));this.select.dispatchEvent(new Event("change")),this.changeListen(!0)}createOptgroup(e){const t=document.createElement("optgroup");if(t.id=e.id,t.label=e.label,e.selectAll&&(t.dataset.selectAll="true"),"off"!==e.closable&&(t.dataset.closable=e.closable),e.options)for(const n of e.options)t.appendChild(this.createOption(n));return t}createOption(e){const t=document.createElement("option");return t.id=e.id,t.value=e.value,t.innerHTML=e.text,""!==e.html&&t.setAttribute("data-html",e.html),e.selected&&(t.selected=e.selected),e.disabled&&(t.disabled=!0),!1===e.display&&(t.style.display="none"),e.placeholder&&t.setAttribute("data-placeholder","true"),e.mandatory&&t.setAttribute("data-mandatory","true"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.data&&"object"==typeof e.data&&Object.keys(e.data).forEach((n=>{t.setAttribute("data-"+function(e){const t=e.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e=>"-"+e.toLowerCase()));return e[0]===e[0].toUpperCase()?t.substring(1):t}(n),e.data[n])})),t}destroy(){this.changeListen(!1),this.select.removeEventListener("change",this.valueChange.bind(this)),this.observer&&(this.observer.disconnect(),this.observer=null),delete this.select.dataset.id,this.showUI()}}return class{constructor(e){var n;if(this.events={search:void 0,searchFilter:(e,t)=>-1!==e.text.toLowerCase().indexOf(t.toLowerCase()),addable:void 0,beforeChange:void 0,afterChange:void 0,beforeOpen:void 0,afterOpen:void 0,beforeClose:void 0,afterClose:void 0},this.windowResize=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.windowScroll=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.documentClick=e=>{this.settings.isOpen&&e.target&&!function(e,t){function n(e,n){return n&&e&&e.classList&&e.classList.contains(n)||n&&e&&e.dataset&&e.dataset.id&&e.dataset.id===t?e:null}return n(e,t)||function e(t,i){return t&&t!==document?n(t,i)?t:e(t.parentNode,i):null}(e,t)}(e.target,this.settings.id)&&this.close(e.type)},this.windowVisibilityChange=()=>{document.hidden&&this.close()},this.selectEl="string"==typeof e.select?document.querySelector(e.select):e.select,!this.selectEl)return void(e.events&&e.events.error&&e.events.error(new Error("Could not find select element")));if("SELECT"!==this.selectEl.tagName)return void(e.events&&e.events.error&&e.events.error(new Error("Element isnt of type select")));this.selectEl.dataset.ssid&&this.destroy(),this.settings=new i(e.settings);const s=["afterChange","beforeOpen","afterOpen","beforeClose","afterClose"];for(const n in e.events)e.events.hasOwnProperty(n)&&(-1!==s.indexOf(n)?this.events[n]=t(e.events[n],100):this.events[n]=e.events[n]);this.settings.disabled=(null===(n=e.settings)||void 0===n?void 0:n.disabled)?e.settings.disabled:this.selectEl.disabled,this.settings.isMultiple=this.selectEl.multiple,this.settings.style=this.selectEl.style.cssText,this.settings.class=this.selectEl.className.split(" "),this.select=new l(this.selectEl),this.select.updateSelect(this.settings.id,this.settings.style,this.settings.class),this.select.hideUI(),this.select.onValueChange=e=>{this.setSelected(e)},this.select.onClassChange=e=>{this.settings.class=e,this.render.updateClassStyles()},this.select.onDisabledChange=e=>{e?this.disable():this.enable()},this.select.onOptionsChange=e=>{this.setData(e)},this.store=new r(this.settings.isMultiple?"multiple":"single",e.data?e.data:this.select.getData()),e.data&&this.select.updateOptions(this.store.getData());const o={open:this.open.bind(this),close:this.close.bind(this),addable:this.events.addable?this.events.addable:void 0,setSelected:this.setSelected.bind(this),addOption:this.addOption.bind(this),search:this.search.bind(this),beforeChange:this.events.beforeChange,afterChange:this.events.afterChange};this.render=new a(this.settings,this.store,o),this.render.renderValues(),this.render.renderOptions(this.store.getData());const c=this.selectEl.getAttribute("aria-label"),u=this.selectEl.getAttribute("aria-labelledby");c?this.render.main.main.setAttribute("aria-label",c):u&&this.render.main.main.setAttribute("aria-labelledby",u),this.selectEl.parentNode&&this.selectEl.parentNode.insertBefore(this.render.main.main,this.selectEl.nextSibling),document.addEventListener("click",this.documentClick),window.addEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.addEventListener("scroll",this.windowScroll,!1),document.addEventListener("visibilitychange",this.windowVisibilityChange),this.settings.disabled&&this.disable(),this.settings.alwaysOpen&&this.open(),this.selectEl.slim=this}enable(){this.settings.disabled=!1,this.select.enable(),this.render.enable()}disable(){this.settings.disabled=!0,this.select.disable(),this.render.disable()}getData(){return this.store.getData()}setData(e){const t=this.store.getSelected(),i=this.store.validateDataArray(e);if(i)return void(this.events.error&&this.events.error(i));this.store.setData(e);const s=this.store.getData();this.select.updateOptions(s),this.render.renderValues(),this.render.renderOptions(s),this.events.afterChange&&!n(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}getSelected(){return this.store.getSelected()}setSelected(e,t=!0){const i=this.store.getSelected();this.store.setSelectedBy("value",Array.isArray(e)?e:[e]);const s=this.store.getData();this.select.updateOptions(s),this.render.renderValues(),""!==this.render.content.search.input.value?this.search(this.render.content.search.input.value):this.render.renderOptions(s),t&&this.events.afterChange&&!n(i,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}addOption(e){const t=this.store.getSelected();this.store.getDataOptions().some((t=>{var n;return t.value===(null!==(n=e.value)&&void 0!==n?n:e.text)}))||this.store.addOption(e);const i=this.store.getData();this.select.updateOptions(i),this.render.renderValues(),this.render.renderOptions(i),this.events.afterChange&&!n(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}open(){this.settings.disabled||this.settings.isOpen||(this.events.beforeOpen&&this.events.beforeOpen(),this.render.open(),this.settings.showSearch&&this.render.searchFocus(),this.settings.isOpen=!0,setTimeout((()=>{this.events.afterOpen&&this.events.afterOpen(),this.settings.isOpen&&(this.settings.isFullOpen=!0)}),this.settings.timeoutDelay),"absolute"===this.settings.contentPosition&&(this.settings.intervalMove&&clearInterval(this.settings.intervalMove),this.settings.intervalMove=setInterval(this.render.moveContent.bind(this.render),500)))}close(e=null){this.settings.isOpen&&!this.settings.alwaysOpen&&(this.events.beforeClose&&this.events.beforeClose(),this.render.close(),""!==this.render.content.search.input.value&&this.search(""),this.render.mainFocus(e),this.settings.isOpen=!1,this.settings.isFullOpen=!1,setTimeout((()=>{this.events.afterClose&&this.events.afterClose()}),this.settings.timeoutDelay),this.settings.intervalMove&&clearInterval(this.settings.intervalMove))}search(e){if(this.render.content.search.input.value!==e&&(this.render.content.search.input.value=e),!this.events.search)return void this.render.renderOptions(""===e?this.store.getData():this.store.search(e,this.events.searchFilter));this.render.renderSearching();const t=this.events.search(e,this.store.getSelectedOptions());t instanceof Promise?t.then((e=>{this.render.renderOptions(this.store.partialToFullData(e))})).catch((e=>{this.render.renderError("string"==typeof e?e:e.message)})):Array.isArray(t)?this.render.renderOptions(this.store.partialToFullData(t)):this.render.renderError("Search event must return a promise or an array of data")}destroy(){document.removeEventListener("click",this.documentClick),window.removeEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.removeEventListener("scroll",this.windowScroll,!1),document.removeEventListener("visibilitychange",this.windowVisibilityChange),this.store.setData([]),this.render.destroy(),this.select.destroy()}}})),function(e){e.waterfall=function(){var t=[],n=e.Deferred(),i=0;return e.each(arguments,(function(s,o){t.push((function(){var s,r=[].slice.apply(arguments);"function"==typeof o?(s=o.apply(null,r))&&s.promise||(s=e.Deferred()[!1===s?"reject":"resolve"](s)):s=o&&o.promise?o:e.Deferred()[!1===o?"reject":"resolve"](o),s.fail((function(){n.reject.apply(n,[].slice.apply(arguments))})).done((function(e){i++,r.push(e),i==t.length?n.resolve.apply(n,r):t[i].apply(null,r)}))}))})),t.length?t[0]():n.resolve(),n}}(jQuery),void 0===window.jQuery)throw new Error("TastyIgniter Javascript requires jQuery.");if(void 0!==window.jQuery.request)throw new Error("The TastyIgniter Javascript framework is already loaded.");!function(e){"use strict";e(document).ready((function(){e(document).trigger("render")})),e(window).on("ajaxUpdateComplete",(function(){e(document).trigger("render")})),e.fn.render=function(t){e(document).on("render",t)}}(window.jQuery),function($){"use strict";var Request=function(element,handler,options){var $el=this.$el=$(element);this.options=options||{};var $form=options.form?$(options.form):$el.closest("form"),$triggerEl=$form.length?$form:$el,context={handler:handler,options:options},loading=void 0!==options.loading&&options.loading.length?$(options.loading):null,isRedirect=void 0!==options.redirect&&options.redirect.length,_event=jQuery.Event("ajaxSetup");if($triggerEl.trigger(_event,context),!_event.isDefaultPrevented()){"string"==$.type(loading)&&(loading=$(loading));var requestData,inputName,submitForm=!!options.submit,data={};$.each($el.parents("[data-request-data]").toArray().reverse(),(function(){$.extend(data,stringToObj("data-request-data",$(this).data("request-data")))})),$el.is(":input")&&!$form.length&&(inputName=$el.attr("name"),void 0!==inputName&&void 0===options.data[inputName]&&(options.data[inputName]=$el.val())),void 0===options.data||$.isEmptyObject(options.data)||$.extend(data,options.data),submitForm?(data._handler=handler,$form.append(appendObjToForm(data,$form))):requestData=[$form.serialize(),$.param(data)].filter(Boolean).join("&");var requestOptions={context:context,headers:{"X-IGNITER-REQUEST-HANDLER":handler},success:function(data,textStatus,jqXHR){if(!1!==this.options.beforeUpdate.apply(this,[data,textStatus,jqXHR])&&(!options.fireBeforeUpdate||!1!==eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireBeforeUpdate+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))"))){var _event=jQuery.Event("ajaxBeforeUpdate");if($triggerEl.trigger(_event,[context,data,textStatus,jqXHR]),!_event.isDefaultPrevented()){var updatePromise=requestOptions.handleUpdateResponse(data,textStatus,jqXHR);return updatePromise.done((function(){$triggerEl.trigger("ajaxSuccess",[context,data,textStatus,jqXHR]),options.fireSuccess&&eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireSuccess+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))")})),updatePromise}}},error:function(jqXHR,textStatus,errorThrown){var errorMsg,updatePromise=$.Deferred();if("abort"!=errorThrown)return isRedirect=!1,options.redirect=null,406==jqXHR.status&&jqXHR.responseJSON?(errorMsg=jqXHR.responseJSON.X_IGNITER_ERROR_MESSAGE,updatePromise=requestOptions.handleUpdateResponse(jqXHR.responseJSON,textStatus,jqXHR)):(errorMsg=jqXHR.responseText?jqXHR.responseText:jqXHR.statusText,updatePromise.resolve()),updatePromise.done((function(){var _event=jQuery.Event("ajaxError");$triggerEl.trigger(_event,[context,textStatus,jqXHR]),_event.isDefaultPrevented()||options.fireError&&!1===eval("(function($el, context, textStatus, jqXHR) {"+options.fireError+"}.call($el.get(0), $el, context, textStatus, jqXHR))")||requestOptions.handleErrorMessage(errorMsg)})),updatePromise},complete:function(data,textStatus,jqXHR){$triggerEl.trigger("ajaxComplete",[context,data,textStatus,jqXHR]),options.fireComplete&&eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireComplete+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))")},handleConfirmMessage:function(e){var t=jQuery.Event("ajaxConfirmMessage");return t.promise=$.Deferred(),void 0!==$(window).triggerHandler(t,[e])?(t.promise.done((function(){options.confirm=null,new Request(element,handler,options)})),!1):t.isDefaultPrevented()?void 0:e?confirm(e):void 0},handleErrorMessage:function(e){var t=jQuery.Event("ajaxErrorMessage");$(window).trigger(t,[e]),t.isDefaultPrevented()||e&&alert(e)},handleValidationMessage:function(e,t){$triggerEl.trigger("ajaxValidation",[context,e,t]);var n=!0;$.each(t,(function(e,t){e=e.replace(/\.(\w+)/g,"[$1]");var i=$form.find('[name="'+e+'"], [name="'+e+'[]"], [name$="['+e+']"], [name$="['+e+'][]"]').filter(":enabled").first();if(i.length>0){var s=jQuery.Event("ajaxInvalidField");$(window).trigger(s,[i.get(0),e,t,n]),n&&(s.isDefaultPrevented()||i.focus(),n=!1)}}))},handleRedirectResponse:function(e){window.location.href=e},handleUpdateResponse:function(e,t,n){var i=$.Deferred().done((function(){var i=[];try{i="object"===jQuery.type(e)?e:jQuery.parseJSON(e)}catch(e){}for(var s in i){var o=s;"string"===jQuery.type(o)&&"@"==o.charAt(0)?$(o.substring(1)).append(i[s]).trigger("ajaxUpdate",[context,e,t,n]):"string"==jQuery.type(o)&&"^"==o.charAt(0)?$(o.substring(1)).prepend(i[s]).trigger("ajaxUpdate",[context,e,t,n]):"string"==jQuery.type(o)&&"~"==o.charAt(0)?$(o.substring(1)).replaceWith(i[s]).trigger("ajaxUpdate",[context,e,t,n]):($(o).trigger("ajaxBeforeReplace"),$(o).html(i[s]).trigger("ajaxUpdate",[context,e,t,n]))}setTimeout((function(){$(window).trigger("ajaxUpdateComplete",[context,e,t,n]).trigger("resize")}),0)}));return e.X_IGNITER_REDIRECT&&(options.redirect=e.X_IGNITER_REDIRECT,isRedirect=!0),isRedirect&&requestOptions.handleRedirectResponse(options.redirect),e.X_IGNITER_ERROR_FIELDS&&requestOptions.handleValidationMessage(e.X_IGNITER_ERROR_MESSAGE,e.X_IGNITER_ERROR_FIELDS),i.resolve(),i}};if(context.success=requestOptions.success,context.error=requestOptions.error,context.complete=requestOptions.complete,requestOptions=$.extend(requestOptions,options),requestOptions.data=requestData,!options.confirm||requestOptions.handleConfirmMessage(options.confirm)){if(loading&&loading.show(),!submitForm)return $(window).trigger("ajaxBeforeSend",[context]),$el.trigger("ajaxPromise",[context]),$.ajax(requestOptions).fail((function(e,t,n){isRedirect||$el.trigger("ajaxFail",[context,t,e])})).done((function(e,t,n){isRedirect||$el.trigger("ajaxDone",[context,e,t,n]),loading&&loading.hide()})).always((function(e,t,n){$el.trigger("ajaxAlways",[context,e,t,n])}));$form.submit()}}};Request.DEFAULTS={type:"POST",update:{},beforeUpdate:function(e,t,n){},fireBeforeUpdate:null,fireSuccess:null,fireError:null,fireComplete:null};var old=$.fn.request;function stringToObj(name,value){if(void 0===value&&(value=""),"object"==typeof value)return value;try{return JSON.parse(JSON.stringify(eval("({"+value+"})")))}catch(e){throw new Error("Error parsing the "+name+" attribute value. "+e)}}function appendObjToForm(e,t){$.each(e,(function(e,n){var i=$("").attr({type:"hidden",name:e}).val(n);t.append(i)}))}$.fn.request=function(e,t){var n=$(this).first(),i={fireBeforeUpdate:n.data("request-before-update"),fireSuccess:n.data("request-success"),fireError:n.data("request-error"),fireComplete:n.data("request-complete"),confirm:n.data("request-confirm"),redirect:n.data("request-redirect"),loading:n.data("request-loading"),submit:n.data("request-submit"),form:n.data("request-form"),update:stringToObj("data-request-update",n.data("request-update")),data:stringToObj("data-request-data",n.data("request-data"))};e||(e=n.data("request"));var s=$.extend(!0,{},Request.DEFAULTS,i,"object"==typeof t&&t);return new Request(n,e,s)},$.fn.request.Constructor=Request,$.request=function(e,t){return $("
    ").request(e,t)},$.fn.request.noConflict=function(){return $.fn.request=old,this},$(document).on("submit","[data-request]",(function(){return $(this).request(),!1})),$(document).on("change","select[data-request]",(function(){return $(this).request(),!1})),$(document).on("click","a[data-request], button[data-request]",(function(e){if(e.preventDefault(),$(this).request(),$(this).is("[type=submit]"))return!1}))}(window.jQuery),function(e){"use strict";void 0===e.ti&&(e.ti={});const t="ti-loading";var n=function(){var t=this;this.timeout=void 0,this.counter=0,this.progress=0,this.indicator=e("
    ").addClass("bar-loading-indicator loaded").append(e("
    ").addClass("bar")).append(e("
    ").addClass("bar-loaded")),this.bar=this.indicator.find(".bar"),this.bar.html('
    '),e(document).ready((function(){e(document.body).append(t.indicator)}))};function i(e,n){if(e&&e.length){var i=e.data("attach-loading").length?e.data("attach-loading"):t;!0===n?e.addClass(i).prop("disabled",!0):e.removeClass(i).prop("disabled",!1)}}function s(e,n){if(e&&e.length){var i=e.data("replace-loading").length?e.data("replace-loading"):t;!0===n?(e.children().wrapAll('
    '),e.find(".replace-loading-bk").before(''),e.prop("disabled",!0)):(e.find(".replace-loading").remove(),e.find(".replace-loading-bk").children().unwrap(),e.prop("disabled",!1))}}n.barTemplate=['
    ','
    ',"
    "].join("\n"),n.prototype.show=function(){if(this.counter++,this.bar.after(this.bar=this.bar.clone()).remove(),!(this.counter>1)){this.progress=.125,this.indicator.removeClass("loaded"),e(document.body).addClass("ti-loading"),this.bar.animate({translateX:"0%"},0);var t=this;setTimeout((function(){t.animate(),t.trickle()}),0)}},n.prototype.hide=function(t){this.counter--,void 0!==t&&t&&(this.counter=0),this.counter<=0&&(this.indicator.addClass("loaded"),e(document.body).removeClass("ti-loading"))},n.prototype.animate=function(){this.indicator.animate({translateX:100*this.progress+"%"},200)},n.prototype.clear=function(){this.timeout&&clearTimeout(this.timeout),this.timeout=void 0},n.prototype.trickle=function(){var e=this;this.timeout=setTimeout((function(){e.increment(.035*(.875-e.progress)*Math.random()),e.trickle()}),350+400*Math.random())},n.prototype.increment=function(e){this.progress<.875&&(this.progress+=e||.05),this.animate()},e.ti.loadingIndicator=new n,e(document).on("ajaxPromise","[data-request]",(function(t){t.stopPropagation(),e.ti.loadingIndicator.show();var n=e(this);e(window).one("ajaxUpdateComplete",(function(){0===n.closest("html").length&&e.ti.loadingIndicator.hide()}))})).on("ajaxFail ajaxDone","[data-request]",(function(t){t.stopPropagation(),e.ti.loadingIndicator.hide()})),e(document).on("ajaxPromise","[data-request]",(function(){var t=e(this);void 0!==t.data("attach-loading")&&i(t,!0),t.is("form")&&(i(e("[data-attach-loading]",t),!0),s(e("[data-replace-loading]",t),!0)),void 0!==t.data("replace-loading")&&s(t,!0)})).on("ajaxFail ajaxDone","[data-request]",(function(){var t=e(this);void 0!==t.data("attach-loading")&&i(t,!1),t.is("form")&&(i(e("[data-attach-loading]",t),!1),s(e("[data-replace-loading]",t),!1)),void 0!==t.data("replace-loading")&&s(t,!1)}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.$el=e(t),this.options=n||{},this.counter=0,this.show()};t.prototype.hide=function(){this.counter--,this.counter<=0&&(e("div.progress-indicator",this.$el).remove(),this.$el.removeClass("in-progress"))},t.prototype.show=function(t){t&&(this.options=t),this.hide();var n=e('
    ');n.append(e('')),n.append(e("
    ").text(this.options.text)),void 0!==this.options.opaque&&n.addClass("is-opaque"),void 0!==this.options.centered&&n.addClass("indicator-center"),"small"===this.options.size&&n.addClass("size-small"),this.$el.prepend(n),this.$el.addClass("in-progress"),this.counter++},t.prototype.destroy=function(){this.$el.removeData("ti.progressIndicator"),this.$el=null},t.DEFAULTS={text:""};var n=e.fn.progressIndicator;e.fn.progressIndicator=function(n){var i=arguments;return this.each((function(){var s=e(this),o=s.data("ti.progressIndicator"),r=e.extend({},t.DEFAULTS,"object"==typeof n&&n);if(o)if("string"!=typeof n)o.show(r);else{for(var a=[],l=1;l p.flash-message").remove(),0===s.length&&(s=e("
    ",{class:"alert alert-"+n.class}).html(n.text)),s.addClass("flash-message animated fadeInDown"),s.attr("data-control",null),n.allowDismiss&&(s.addClass("alert-dismissible"),s.append('')),s.on("click","button",r),n.interval>0&&s.on("click",r),e(n.container).prepend(s);var o=null;function r(){window.clearInterval(o),s.addClass("fadeOutUp"),s.on("animationend",(()=>{s.remove()}))}setTimeout((function(){s.addClass("show")}),100),n.allowDismiss&&n.interval>0&&(o=window.setTimeout(r,1e3*n.interval))};t.DEFAULTS={container:"#notification",class:"success",text:"text",interval:5,allowDismiss:!0},void 0===e.ti&&(e.ti={}),e.ti.flashMessage=t,e(document).render((function(){e('[data-control="flash-message"]').each((function(t,n){setTimeout((function(){e.ti.flashMessage(e(n).data(),n)}),500*(t+1))})),e('[data-control="flash-overlay"]').each((function(t,n){var i=e(n),s=e.extend({},i.data(),!0===i.data("closeOnEsc")?{timer:3e3*(t+1)}:{});Swal.fire(s)}))})),e(document).on("ajaxValidation","[data-request][data-request-validate]",(function(t,n,i,s){var o,r=e(this).closest("form"),a=e("[data-validate-error]",r),l=[];if(e.each(s,(function(t,n){o=e('[data-validate-for="'+t+'"]',r),l=e.merge(l,n),o.length&&(o.text().length&&1!=o.data("emptyMode")||o.data("emptyMode",!0).text(n.join(", ")),o.addClass("visible"))})),a.length&&(a=e("[data-validate-error]",r)),a.length){var c=e("[data-message]",a);if(a.addClass("visible"),c.length){var u=c.first();e.each(l,(function(e,t){u.clone().text(t).insertAfter(u)})),c.remove()}else a.text(i)}r.one("ajaxError",(function(e){e.preventDefault()}))})),e(document).on("ajaxPromise","[data-request][data-request-validate]",(function(){var t=e(this).closest("form");e("[data-validate-for]",t).removeClass("visible"),e("[data-validate-error]",t).removeClass("visible")}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$el=e(t),this.$el.on("click",e.proxy(this.onClicked,this)),this.options.disabled&&this.$el.attr("readonly",!0)};t.DEFAULTS={disabled:!0},t.prototype.onClicked=function(t){e(t.target).attr("readonly")&&this.$el.attr("readonly",!1)};var n=e.fn.toggler;e.fn.toggler=function(n){var i,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var o=e(this),r=o.data("ti.toggler"),a=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);if(r||o.data("ti.toggler",r=new t(this,a)),"string"==typeof n&&(i=r[n].apply(r,s)),void 0!==i)return!1})),i||this},e.fn.toggler.Constructor=t,e.fn.toggler.noConflict=function(){return e.fn.toggler=n,this},e(document).render((function(){e('[data-toggle="disabled"]').toggler()}))}(window.jQuery),function(e){"use strict";var t=function(t,n){var i=this.$el=e(t);if(this.options=n||{},!1===this.options.triggerCondition)throw new Error("Trigger condition is not specified.");if(!1===this.options.trigger)throw new Error("Trigger selector is not specified.");if(!1===this.options.triggerAction)throw new Error("Trigger action is not specified.");if(this.triggerCondition=this.options.triggerCondition,0==this.options.triggerCondition.indexOf("value")){var s=this.options.triggerCondition.match(/[^[\]]+(?=])/g);this.triggerCondition="value",this.triggerConditionValue=s||[""]}this.triggerParent=void 0!==this.options.triggerClosestParent?i.closest(this.options.triggerClosestParent):void 0,"checked"!=this.triggerCondition&&"unchecked"!=this.triggerCondition&&"value"!=this.triggerCondition||e(document).on("change",this.options.trigger,e.proxy(this.onConditionChanged,this));var o=this;i.on("ti.triggerOn.update",(function(e){e.stopPropagation(),o.onConditionChanged()})),o.onConditionChanged()};t.prototype.onConditionChanged=function(){if("checked"==this.triggerCondition)this.updateTarget(!!e(this.options.trigger+":checked",this.triggerParent).length);else if("unchecked"==this.triggerCondition)this.updateTarget(!e(this.options.trigger+":checked",this.triggerParent).length);else if("value"==this.triggerCondition){var t,n="";(t=e(this.options.trigger,this.triggerParent).not("input[type=checkbox], input[type=radio], input[type=button], input[type=submit]")).length||(t=e(this.options.trigger,this.triggerParent).not(":not(input[type=checkbox]:checked, input[type=radio]:checked)")),t.length&&(n=t.val()),this.updateTarget(-1!=e.inArray(n,this.triggerConditionValue))}},t.prototype.updateTarget=function(t){var n=this,i=this.options.triggerAction.split("|");e.each(i,(function(e,i){n.updateTargetAction(i,t)})),e(window).trigger("resize"),this.$el.trigger("ti.triggerOn.afterUpdate",t)},t.prototype.updateTargetAction=function(e,t){"show"==e?this.$el.toggleClass("animated fadeIn",t).toggleClass("hide",!t).trigger("hide.ti.triggerapi",[!t]):"hide"==e?this.$el.toggleClass("animated fadeIn",!t).toggleClass("hide",t).trigger("hide.ti.triggerapi",[t]):"enable"==e?this.$el.prop("disabled",!t).toggleClass("control-disabled",!t).trigger("disable.ti.triggerapi",[!t]):"disable"==e?this.$el.prop("disabled",t).toggleClass("control-disabled",t).trigger("disable.ti.triggerapi",[t]):"check"==e&&t?this.$el.filter("input[type=checkbox]").prop("checked",!0):"empty"==e&&t&&(this.$el.not("input[type=checkbox], input[type=radio], input[type=button], input[type=submit]").val(""),this.$el.not(":not(input[type=checkbox], input[type=radio])").prop("checked",!1),this.$el.trigger("empty.ti.triggerapi").trigger("change")),"show"!=e&&"hide"!=e||this.fixButtonClasses()},t.prototype.fixButtonClasses=function(){this.$el.closest(".btn-group").length>0&&this.$el.is(":last-child")&&this.$el.prev().toggleClass("last",this.$el.hasClass("hide"))},t.DEFAULTS={triggerAction:!1,triggerCondition:!1,triggerClosestParent:void 0,trigger:!1};var n=e.fn.triggerOn;e.fn.triggerOn=function(n){return this.each((function(){var i=e(this),s=i.data("ti.triggerOn"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);s||i.data("ti.triggerOn",s=new t(this,o))}))},e.fn.triggerOn.Constructor=t,e.fn.triggerOn.noConflict=function(){return e.fn.triggerOn=n,this},e(document).render((function(){e("[data-trigger]").triggerOn()}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.$el=e(t),this.options=n,this.slimSelect=null,this.init()};t.prototype.constructor=t,t.prototype.init=function(){this.slimSelect=new SlimSelect({select:this.$el.get(0),settings:this.options,events:{afterChange:e=>{this.$el.trigger("change")}}})},t.DEFAULTS={maxValuesShown:5,showSearch:!1};var n=e.fn.selectList;e.fn.selectList=function(n){var i=Array.prototype.slice.call(arguments,1),s=void 0;return this.each((function(){var o=e(this),r=o.data("ti.selectList"),a=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);if(r||o.data("ti.selectList",r=new t(this,a)),"string"==typeof n&&(s=r[n].apply(r,i)),void 0!==s)return!1})),s||this},e.fn.selectList.Constructor=t,e.fn.selectList.noConflict=function(){return e.fn.selectList=n,this},e(document).render((function(){e('[data-control="selectlist"]').selectList()}))}(window.jQuery),function(e){"use strict";e("#side-nav-menu").metisMenu({toggle:!0,collapseInClass:"show"}),e("#navSidebar").on("show.bs.collapse",(function(){e(".sidebar").addClass("show")})).on("hide.bs.collapse",(function(){e(".sidebar").removeClass("show")})),e(document).render((function(){e("a[title], span[title], button[title]",document).not("[data-bs-toggle]").tooltip({placement:"bottom"}),e(".alert",document).alert()})),e(document).on("show.bs.modal",".modal",(function(){var t=10*e(".modal:visible").length+1+1040;e(this).css("z-index",t),e(".modal-backdrop").not(".modal-stack").css("z-index",t-2).addClass("modal-stack"),setTimeout((function(){e(".modal-backdrop").not(".modal-stack").css("z-index",t-1).addClass("modal-stack")}),0)})),e(document).on("hidden.bs.modal",".modal",(function(){e(".modal:visible").length&&e(document.body).addClass("modal-open")})),e(document).on("show.bs.modal",".modal",(function(t){var n=e(this),i=e(t.relatedTarget);i.length&&e.each(i.get(0).attributes,(function(e,t){if(/^data-modal-/.test(t.name)){var i=t.name.substr(11),s=t.value;n.find('[data-modal-html="'+i+'"]').html(s),n.find('[data-modal-text="'+i+'"]').text(s),n.find('[data-modal-input="'+i+'"]').val(s)}}))})),e(window).on("ajaxErrorMessage",(function(t,n){n&&(e.ti.flashMessage({class:"danger",text:n,allowDismiss:!1}),t.preventDefault())})),e.ajaxPrefilter((function(t){var n=e('meta[name="csrf-token"]').attr("content");n&&(t.headers||(t.headers={}),t.headers["X-CSRF-TOKEN"]=n)}))}(window.jQuery); +if(function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,(function(e,t){"use strict";var n=[],i=Object.getPrototypeOf,s=n.slice,o=n.flat?function(e){return n.flat.call(e)}:function(e){return n.concat.apply([],e)},r=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,d=u.toString,h=d.call(Object),p={},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},g=function(e){return null!=e&&e===e.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var i,s,o=(n=n||m).createElement("script");if(o.text=e,t)for(i in v)(s=t[i]||t.getAttribute&&t.getAttribute(i))&&o.setAttribute(i,s);n.head.appendChild(o).parentNode.removeChild(o)}function y(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var w="3.6.3",_=function(e,t){return new _.fn.init(e,t)};function x(e){var t=!!e&&"length"in e&&e.length,n=y(e);return!f(e)&&!g(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),z=new RegExp(B),X=new RegExp("^"+q+"$"),Q={ID:new RegExp("^#("+q+")"),CLASS:new RegExp("^\\.("+q+")"),TAG:new RegExp("^("+q+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},K=/HTML$/i,Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,J=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ie=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,se=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){h()},re=we((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{P.apply(L=N.call(_.childNodes),_.childNodes),L[_.childNodes.length].nodeType}catch(t){P={apply:L.length?function(e,t){j.apply(e,N.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function ae(e,t,i,s){var o,a,c,u,d,f,v,b=t&&t.ownerDocument,_=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==_&&9!==_&&11!==_)return i;if(!s&&(h(t),t=t||p,g)){if(11!==_&&(d=Z.exec(e)))if(o=d[1]){if(9===_){if(!(c=t.getElementById(o)))return i;if(c.id===o)return i.push(c),i}else if(b&&(c=b.getElementById(o))&&y(t,c)&&c.id===o)return i.push(c),i}else{if(d[2])return P.apply(i,t.getElementsByTagName(e)),i;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return P.apply(i,t.getElementsByClassName(o)),i}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==_||"object"!==t.nodeName.toLowerCase())){if(v=e,b=t,1===_&&(U.test(e)||W.test(e))){for((b=ee.test(e)&&ve(t.parentNode)||t)===t&&n.scope||((u=t.getAttribute("id"))?u=u.replace(ie,se):t.setAttribute("id",u=w)),a=(f=r(e)).length;a--;)f[a]=(u?"#"+u:":scope")+" "+ye(f[a]);v=f.join(",")}try{if(n.cssSupportsSelector&&!CSS.supports("selector(:is("+v+"))"))throw new Error;return P.apply(i,b.querySelectorAll(v)),i}catch(t){k(e,!0)}finally{u===w&&t.removeAttribute("id")}}}return l(e.replace(F,"$1"),t,i,s)}function le(){var e=[];return function t(n,s){return e.push(n+" ")>i.cacheLength&&delete t[e.shift()],t[n+" "]=s}}function ce(e){return e[w]=!0,e}function ue(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function de(e,t){for(var n=e.split("|"),s=n.length;s--;)i.attrHandle[n[s]]=t}function he(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&re(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,i){for(var s,o=e([],n.length,t),r=o.length;r--;)n[s=o[r]]&&(n[s]=!(i[s]=n[s]))}))}))}function ve(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!K.test(t||n&&n.nodeName||"HTML")},h=ae.setDocument=function(e){var t,s,r=e?e.ownerDocument||e:_;return r!=p&&9===r.nodeType&&r.documentElement&&(f=(p=r).documentElement,g=!o(p),_!=p&&(s=p.defaultView)&&s.top!==s&&(s.addEventListener?s.addEventListener("unload",oe,!1):s.attachEvent&&s.attachEvent("onunload",oe)),n.scope=ue((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.cssSupportsSelector=ue((function(){return CSS.supports("selector(*)")&&p.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")})),n.attributes=ue((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ue((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=J.test(p.getElementsByClassName),n.getById=ue((function(e){return f.appendChild(e).id=w,!p.getElementsByName||!p.getElementsByName(w).length})),n.getById?(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(i.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},i.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,i,s,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(s=t.getElementsByName(e),i=0;o=s[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),i.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],s=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[s++];)1===n.nodeType&&i.push(n);return i}return o},i.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],m=[],(n.qsa=J.test(p.querySelectorAll))&&(ue((function(e){var t;f.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+I+")"),e.querySelectorAll("[id~="+w+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+w+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),ue((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=J.test(b=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ue((function(e){n.disconnectedMatch=b.call(e,"*"),b.call(e,"[s!='']:x"),v.push("!=",B)})),n.cssSupportsSelector||m.push(":has"),m=m.length&&new RegExp(m.join("|")),v=v.length&&new RegExp(v.join("|")),t=J.test(f.compareDocumentPosition),y=t||J.test(f.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return d=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===i?e==p||e.ownerDocument==_&&y(_,e)?-1:t==p||t.ownerDocument==_&&y(_,t)?1:u?$(u,e)-$(u,t):0:4&i?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,i=0,s=e.parentNode,o=t.parentNode,r=[e],a=[t];if(!s||!o)return e==p?-1:t==p?1:s?-1:o?1:u?$(u,e)-$(u,t):0;if(s===o)return he(e,t);for(n=e;n=n.parentNode;)r.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;r[i]===a[i];)i++;return i?he(r[i],a[i]):r[i]==_?-1:a[i]==_?1:0}),p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(h(e),n.matchesSelector&&g&&!k[t+" "]&&(!v||!v.test(t))&&(!m||!m.test(t)))try{var i=b.call(e,t);if(i||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){k(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=r(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(i){var s=ae.attr(i,e);return null==s?"!="===t:!t||(s+="","="===t?s===n:"!="===t?s!==n:"^="===t?n&&0===s.indexOf(n):"*="===t?n&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(e,t,n){return f(t)?_.grep(e,(function(e,i){return!!t.call(e,i,e)!==n})):t.nodeType?_.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?_.grep(e,(function(e){return-1)[^>]*|#([\w-]+))$/;(_.fn.init=function(e,t,n){var i,s;if(!e)return this;if(n=n||L,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:D.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof _?t[0]:t,_.merge(this,_.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),S.test(i[1])&&_.isPlainObject(t))for(i in t)f(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(s=m.getElementById(i[2]))&&(this[0]=s,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):f(e)?void 0!==n.ready?n.ready(e):e(_):_.makeArray(e,this)}).prototype=_.fn,L=_(m);var j=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};function N(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}_.fn.extend({has:function(e){var t=_(e,this),n=t.length;return this.filter((function(){for(var e=0;e\x20\t\r\n\f]*)/i,fe=/^$|^module$|\/(?:java|ecma)script/i;ue=m.createDocumentFragment().appendChild(m.createElement("div")),(de=m.createElement("input")).setAttribute("type","radio"),de.setAttribute("checked","checked"),de.setAttribute("name","t"),ue.appendChild(de),p.checkClone=ue.cloneNode(!0).cloneNode(!0).lastChild.checked,ue.innerHTML="",p.noCloneChecked=!!ue.cloneNode(!0).lastChild.defaultValue,ue.innerHTML="",p.option=!!ue.lastChild;var ge={thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};function me(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&k(e,t)?_.merge([e],n):n}function ve(e,t){for(var n=0,i=e.length;n",""]);var be=/<|&#?\w+;/;function ye(e,t,n,i,s){for(var o,r,a,l,c,u,d=t.createDocumentFragment(),h=[],p=0,f=e.length;p\s*$/g;function Oe(e,t){return k(e,"table")&&k(11!==t.nodeType?t:t.firstChild,"tr")&&_(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function je(e,t){var n,i,s,o,r,a;if(1===t.nodeType){if(K.hasData(e)&&(a=K.get(e).events))for(s in K.remove(t,"handle events"),a)for(n=0,i=a[s].length;n").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&s("error"===e.type?404:200,e.type)}),m.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Ut,zt=[],Xt=/(=)\?(?=&|$)|\?\?/;_.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||_.expando+"_"+Ct.guid++;return this[e]=!0,e}}),_.ajaxPrefilter("json jsonp",(function(t,n,i){var s,o,r,a=!1!==t.jsonp&&(Xt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Xt.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=f(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Xt,"$1"+s):!1!==t.jsonp&&(t.url+=(Tt.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||_.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=e[s],e[s]=function(){r=arguments},i.always((function(){void 0===o?_(e).removeProp(s):e[s]=o,t[s]&&(t.jsonpCallback=n.jsonpCallback,zt.push(s)),r&&f(o)&&o(r[0]),r=o=void 0})),"script"})),p.createHTMLDocument=((Ut=m.implementation.createHTMLDocument("").body).innerHTML="
    ",2===Ut.childNodes.length),_.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(p.createHTMLDocument?((i=(t=m.implementation.createHTMLDocument("")).createElement("base")).href=m.location.href,t.head.appendChild(i)):t=m),o=!n&&[],(s=S.exec(e))?[t.createElement(s[1])]:(s=ye([e],t,o),o&&o.length&&_(o).remove(),_.merge([],s.childNodes)));var i,s,o},_.fn.load=function(e,t,n){var i,s,o,r=this,a=e.indexOf(" ");return-1").append(_.parseHTML(e)).find(i):e)})).always(n&&function(e,t){r.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},_.expr.pseudos.animated=function(e){return _.grep(_.timers,(function(t){return e===t.elem})).length},_.offset={setOffset:function(e,t,n){var i,s,o,r,a,l,c=_.css(e,"position"),u=_(e),d={};"static"===c&&(e.style.position="relative"),a=u.offset(),o=_.css(e,"top"),l=_.css(e,"left"),("absolute"===c||"fixed"===c)&&-1<(o+l).indexOf("auto")?(r=(i=u.position()).top,s=i.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),f(t)&&(t=t.call(e,n,_.extend({},a))),null!=t.top&&(d.top=t.top-a.top+r),null!=t.left&&(d.left=t.left-a.left+s),"using"in t?t.using.call(e,d):u.css(d)}},_.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){_.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],s={top:0,left:0};if("fixed"===_.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===_.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((s=_(e).offset()).top+=_.css(e,"borderTopWidth",!0),s.left+=_.css(e,"borderLeftWidth",!0))}return{top:t.top-s.top-_.css(i,"marginTop",!0),left:t.left-s.left-_.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===_.css(e,"position");)e=e.offsetParent;return e||ie}))}}),_.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;_.fn[e]=function(i){return F(this,(function(e,i,s){var o;if(g(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===s)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:s,n?s:o.pageYOffset):e[i]=s}),e,i,arguments.length)}})),_.each(["top","left"],(function(e,t){_.cssHooks[t]=Ve(p.pixelPosition,(function(e,n){if(n)return n=Fe(e,t),$e.test(n)?_(e).position()[t]+"px":n}))})),_.each({Height:"height",Width:"width"},(function(e,t){_.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){_.fn[i]=function(s,o){var r=arguments.length&&(n||"boolean"!=typeof s),a=n||(!0===s||!0===o?"margin":"border");return F(this,(function(t,n,s){var o;return g(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===s?_.css(t,n,a):_.style(t,n,s,a)}),t,r?s:void 0,r)}}))})),_.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){_.fn[t]=function(e){return this.on(t,e)}})),_.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),_.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){_.fn[t]=function(e,n){return 00&&a(r.width)/e.offsetWidth||1,u=e.offsetHeight>0&&a(r.height)/e.offsetHeight||1);var d=(n(e)?t(e):window).visualViewport,h=!c()&&o,p=(r.left+(h&&d?d.offsetLeft:0))/l,f=(r.top+(h&&d?d.offsetTop:0))/u,g=r.width/l,m=r.height/u;return{width:g,height:m,top:f,right:p+g,bottom:f+m,left:p,x:p,y:f}}function d(e){var n=t(e);return{scrollLeft:n.pageXOffset,scrollTop:n.pageYOffset}}function h(e){return e?(e.nodeName||"").toLowerCase():null}function p(e){return((n(e)?e.ownerDocument:e.document)||window.document).documentElement}function f(e){return u(p(e)).left+d(e).scrollLeft}function g(e){return t(e).getComputedStyle(e)}function m(e){var t=g(e),n=t.overflow,i=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function v(e,n,s){void 0===s&&(s=!1);var o,r,l=i(n),c=i(n)&&function(e){var t=e.getBoundingClientRect(),n=a(t.width)/e.offsetWidth||1,i=a(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(n),g=p(n),v=u(e,c,s),b={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(l||!l&&!s)&&(("body"!==h(n)||m(g))&&(b=(o=n)!==t(o)&&i(o)?{scrollLeft:(r=o).scrollLeft,scrollTop:r.scrollTop}:d(o)),i(n)?((y=u(n,!0)).x+=n.clientLeft,y.y+=n.clientTop):g&&(y.x=f(g))),{x:v.left+b.scrollLeft-y.x,y:v.top+b.scrollTop-y.y,width:v.width,height:v.height}}function b(e){var t=u(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function y(e){return"html"===h(e)?e:e.assignedSlot||e.parentNode||(s(e)?e.host:null)||p(e)}function w(e){return["html","body","#document"].indexOf(h(e))>=0?e.ownerDocument.body:i(e)&&m(e)?e:w(y(e))}function _(e,n){var i;void 0===n&&(n=[]);var s=w(e),o=s===(null==(i=e.ownerDocument)?void 0:i.body),r=t(s),a=o?[r].concat(r.visualViewport||[],m(s)?s:[]):s,l=n.concat(a);return o?l:l.concat(_(y(a)))}function x(e){return["table","td","th"].indexOf(h(e))>=0}function C(e){return i(e)&&"fixed"!==g(e).position?e.offsetParent:null}function T(e){for(var n=t(e),o=C(e);o&&x(o)&&"static"===g(o).position;)o=C(o);return o&&("html"===h(o)||"body"===h(o)&&"static"===g(o).position)?n:o||function(e){var t=/firefox/i.test(l());if(/Trident/i.test(l())&&i(e)&&"fixed"===g(e).position)return null;var n=y(e);for(s(n)&&(n=n.host);i(n)&&["html","body"].indexOf(h(n))<0;){var o=g(n);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return n;n=n.parentNode}return null}(e)||n}var E="top",A="bottom",k="right",S="left",O="auto",L=[E,A,k,S],D="start",j="end",P="viewport",N="popper",$=L.reduce((function(e,t){return e.concat([t+"-"+D,t+"-"+j])}),[]),I=[].concat(L,[O]).reduce((function(e,t){return e.concat([t,t+"-"+D,t+"-"+j])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function q(e){var t=new Map,n=new Set,i=[];function s(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&s(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||s(e)})),i}function H(e){return e.split("-")[0]}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&s(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function R(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function F(e,i,s){return i===P?R(function(e,n){var i=t(e),s=p(e),o=i.visualViewport,r=s.clientWidth,a=s.clientHeight,l=0,u=0;if(o){r=o.width,a=o.height;var d=c();(d||!d&&"fixed"===n)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:r,height:a,x:l+f(e),y:u}}(e,s)):n(i)?function(e,t){var n=u(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(i,s):R(function(e){var t,n=p(e),i=d(e),s=null==(t=e.ownerDocument)?void 0:t.body,r=o(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),a=o(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-i.scrollLeft+f(e),c=-i.scrollTop;return"rtl"===g(s||n).direction&&(l+=o(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:a,x:l,y:c}}(p(e)))}function V(e,t,s,a){var l="clippingParents"===t?function(e){var t=_(y(e)),s=["absolute","fixed"].indexOf(g(e).position)>=0&&i(e)?T(e):e;return n(s)?t.filter((function(e){return n(e)&&B(e,s)&&"body"!==h(e)})):[]}(e):[].concat(t),c=[].concat(l,[s]),u=c[0],d=c.reduce((function(t,n){var i=F(e,n,a);return t.top=o(i.top,t.top),t.right=r(i.right,t.right),t.bottom=r(i.bottom,t.bottom),t.left=o(i.left,t.left),t}),F(e,u,a));return d.width=d.right-d.left,d.height=d.bottom-d.top,d.x=d.left,d.y=d.top,d}function W(e){return e.split("-")[1]}function U(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function z(e){var t,n=e.reference,i=e.element,s=e.placement,o=s?H(s):null,r=s?W(s):null,a=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(o){case E:t={x:a,y:n.y-i.height};break;case A:t={x:a,y:n.y+n.height};break;case k:t={x:n.x+n.width,y:l};break;case S:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=o?U(o):null;if(null!=c){var u="y"===c?"height":"width";switch(r){case D:t[c]=t[c]-(n[u]/2-i[u]/2);break;case j:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}function X(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Q(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function K(e,t){void 0===t&&(t={});var i=t,s=i.placement,o=void 0===s?e.placement:s,r=i.strategy,a=void 0===r?e.strategy:r,l=i.boundary,c=void 0===l?"clippingParents":l,d=i.rootBoundary,h=void 0===d?P:d,f=i.elementContext,g=void 0===f?N:f,m=i.altBoundary,v=void 0!==m&&m,b=i.padding,y=void 0===b?0:b,w=X("number"!=typeof y?y:Q(y,L)),_=g===N?"reference":N,x=e.rects.popper,C=e.elements[v?_:g],T=V(n(C)?C:C.contextElement||p(e.elements.popper),c,h,a),S=u(e.elements.reference),O=z({reference:S,element:x,strategy:"absolute",placement:o}),D=R(Object.assign({},x,O)),j=g===N?D:S,$={top:T.top-j.top+w.top,bottom:j.bottom-T.bottom+w.bottom,left:T.left-j.left+w.left,right:j.right-T.right+w.right},I=e.modifiersData.offset;if(g===N&&I){var M=I[o];Object.keys($).forEach((function(e){var t=[k,A].indexOf(e)>=0?1:-1,n=[E,A].indexOf(e)>=0?"y":"x";$[e]+=M[n]*t}))}return $}var Y={placement:"bottom",modifiers:[],strategy:"absolute"};function G(){for(var e=arguments.length,t=new Array(e),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},t,{placement:e})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[S,k].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}(n,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[i]=r}},ae={left:"right",right:"left",bottom:"top",top:"bottom"};function le(e){return e.replace(/left|right|bottom|top/g,(function(e){return ae[e]}))}var ce={start:"end",end:"start"};function ue(e){return e.replace(/start|end/g,(function(e){return ce[e]}))}function de(e,t){void 0===t&&(t={});var n=t,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?I:l,u=W(i),d=u?a?$:$.filter((function(e){return W(e)===u})):L,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=K(e,{placement:n,boundary:s,rootBoundary:o,padding:r})[H(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}var he={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var s=n.mainAxis,o=void 0===s||s,r=n.altAxis,a=void 0===r||r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,g=n.allowedAutoPlacements,m=t.options.placement,v=H(m),b=l||(v!==m&&f?function(e){if(H(e)===O)return[];var t=le(e);return[ue(e),t,ue(t)]}(m):[le(m)]),y=[m].concat(b).reduce((function(e,n){return e.concat(H(n)===O?de(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:g}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,C=!0,T=y[0],L=0;L=0,I=$?"width":"height",M=K(t,{placement:j,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),q=$?N?k:S:N?A:E;w[I]>_[I]&&(q=le(q));var B=le(q),R=[];if(o&&R.push(M[P]<=0),a&&R.push(M[q]<=0,M[B]<=0),R.every((function(e){return e}))){T=j,C=!1;break}x.set(j,R)}if(C)for(var F=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return T=t,"break"},V=f?3:1;V>0&&"break"!==F(V);V--);t.placement!==T&&(t.modifiersData[i]._skip=!0,t.placement=T,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function pe(e,t,n){return o(e,r(t,n))}var fe={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,s=n.mainAxis,a=void 0===s||s,l=n.altAxis,c=void 0!==l&&l,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,f=n.tether,g=void 0===f||f,m=n.tetherOffset,v=void 0===m?0:m,y=K(t,{boundary:u,rootBoundary:d,padding:p,altBoundary:h}),w=H(t.placement),_=W(t.placement),x=!_,C=U(w),O="x"===C?"y":"x",L=t.modifiersData.popperOffsets,j=t.rects.reference,P=t.rects.popper,N="function"==typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,$="number"==typeof N?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(L){if(a){var q,B="y"===C?E:S,R="y"===C?A:k,F="y"===C?"height":"width",V=L[C],z=V+y[B],X=V-y[R],Q=g?-P[F]/2:0,Y=_===D?j[F]:P[F],G=_===D?-P[F]:-j[F],J=t.elements.arrow,Z=g&&J?b(J):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},te=ee[B],ne=ee[R],ie=pe(0,j[F],Z[F]),se=x?j[F]/2-Q-ie-te-$.mainAxis:Y-ie-te-$.mainAxis,oe=x?-j[F]/2+Q+ie+ne+$.mainAxis:G+ie+ne+$.mainAxis,re=t.elements.arrow&&T(t.elements.arrow),ae=re?"y"===C?re.clientTop||0:re.clientLeft||0:0,le=null!=(q=null==I?void 0:I[C])?q:0,ce=V+oe-le,ue=pe(g?r(z,V+se-le-ae):z,V,g?o(X,ce):X);L[C]=ue,M[C]=ue-V}if(c){var de,he="x"===C?E:S,fe="x"===C?A:k,ge=L[O],me="y"===O?"height":"width",ve=ge+y[he],be=ge-y[fe],ye=-1!==[E,S].indexOf(w),we=null!=(de=null==I?void 0:I[O])?de:0,_e=ye?ve:ge-j[me]-P[me]-we+$.altAxis,xe=ye?ge+j[me]+P[me]-we-$.altAxis:be,Ce=g&&ye?function(e,t,n){var i=pe(e,t,n);return i>n?n:i}(_e,ge,xe):pe(g?_e:ve,ge,g?xe:be);L[O]=Ce,M[O]=Ce-ge}t.modifiersData[i]=M}},requiresIfExists:["offset"]},ge={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,s=e.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=H(n.placement),l=U(a),c=[S,k].indexOf(a)>=0?"height":"width";if(o&&r){var u=function(e,t){return X("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Q(e,L))}(s.padding,n),d=b(o),h="y"===l?E:S,p="y"===l?A:k,f=n.rects.reference[c]+n.rects.reference[l]-r[l]-n.rects.popper[c],g=r[l]-n.rects.reference[l],m=T(o),v=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=f/2-g/2,w=u[h],_=v-d[c]-u[p],x=v/2-d[c]/2+y,C=pe(w,x,_),O=l;n.modifiersData[i]=((t={})[O]=C,t.centerOffset=C-x,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&B(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function me(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ve(e){return[E,k,A,S].some((function(t){return e[t]>=0}))}var be={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,s=t.rects.popper,o=t.modifiersData.preventOverflow,r=K(t,{elementContext:"reference"}),a=K(t,{altBoundary:!0}),l=me(r,i),c=me(a,s,o),u=ve(l),d=ve(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}},ye=J({defaultModifiers:[ee,te,se,oe]}),we=[ee,te,se,oe,re,he,fe,ge,be],_e=J({defaultModifiers:we});e.applyStyles=oe,e.arrow=ge,e.computeStyles=se,e.createPopper=_e,e.createPopperLite=ye,e.defaultModifiers=we,e.detectOverflow=K,e.eventListeners=ee,e.flip=he,e.hide=be,e.offset=re,e.popperGenerator=J,e.popperOffsets=te,e.preventOverflow=fe,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).bootstrap=t(e.Popper)}(this,(function(e){"use strict";const t=function(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}(e),n="transitionend",i=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t},s=e=>{const t=i(e);return t&&document.querySelector(t)?t:null},o=e=>{const t=i(e);return t?document.querySelector(t):null},r=e=>{e.dispatchEvent(new Event(n))},a=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,c=e=>{if(!a(e)||0===e.getClientRects().length)return!1;const t="visible"===getComputedStyle(e).getPropertyValue("visibility"),n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const t=e.closest("summary");if(t&&t.parentNode!==n)return!1;if(null===t)return!1}return t},u=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),d=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?d(e.parentNode):null},h=()=>{},p=e=>{e.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,g=[],m=()=>"rtl"===document.documentElement.dir,v=e=>{var t;t=()=>{const t=f();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=i,e.jQueryInterface)}},"loading"===document.readyState?(g.length||document.addEventListener("DOMContentLoaded",(()=>{for(const e of g)e()})),g.push(t)):t()},b=e=>{"function"==typeof e&&e()},y=(e,t,i=!0)=>{if(!i)return void b(e);const s=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),s=Number.parseFloat(n);return i||s?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let o=!1;const a=({target:i})=>{i===t&&(o=!0,t.removeEventListener(n,a),b(e))};t.addEventListener(n,a),setTimeout((()=>{o||r(t)}),s)},w=(e,t,n,i)=>{const s=e.length;let o=e.indexOf(t);return-1===o?!n&&i?e[s-1]:e[0]:(o+=n?1:-1,i&&(o=(o+s)%s),e[Math.max(0,Math.min(o,s-1))])},_=/[^.]*(?=\..*)\.|.*/,x=/\..*/,C=/::\d+$/,T={};let E=1;const A={mouseenter:"mouseover",mouseleave:"mouseout"},k=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 S(e,t){return t&&`${t}::${E++}`||e.uidEvent||E++}function O(e){const t=S(e);return e.uidEvent=t,T[t]=T[t]||{},T[t]}function L(e,t,n=null){return Object.values(e).find((e=>e.callable===t&&e.delegationSelector===n))}function D(e,t,n){const i="string"==typeof t,s=i?n:t||n;let o=$(e);return k.has(o)||(o=e),[i,s,o]}function j(e,t,n,i,s){if("string"!=typeof t||!e)return;let[o,r,a]=D(t,n,i);if(t in A){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r=e(r)}const l=O(e),c=l[a]||(l[a]={}),u=L(c,r,o?n:null);if(u)return void(u.oneOff=u.oneOff&&s);const d=S(r,t.replace(_,"")),h=o?function(e,t,n){return function i(s){const o=e.querySelectorAll(t);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return M(s,{delegateTarget:r}),i.oneOff&&I.off(e,s.type,t,n),n.apply(r,[s])}}(e,n,r):function(e,t){return function n(i){return M(i,{delegateTarget:e}),n.oneOff&&I.off(e,i.type,t),t.apply(e,[i])}}(e,r);h.delegationSelector=o?n:null,h.callable=r,h.oneOff=s,h.uidEvent=d,c[d]=h,e.addEventListener(a,h,o)}function P(e,t,n,i,s){const o=L(t[n],i,s);o&&(e.removeEventListener(n,o,Boolean(s)),delete t[n][o.uidEvent])}function N(e,t,n,i){const s=t[n]||{};for(const o of Object.keys(s))if(o.includes(i)){const i=s[o];P(e,t,n,i.callable,i.delegationSelector)}}function $(e){return e=e.replace(x,""),A[e]||e}const I={on(e,t,n,i){j(e,t,n,i,!1)},one(e,t,n,i){j(e,t,n,i,!0)},off(e,t,n,i){if("string"!=typeof t||!e)return;const[s,o,r]=D(t,n,i),a=r!==t,l=O(e),c=l[r]||{},u=t.startsWith(".");if(void 0===o){if(u)for(const n of Object.keys(l))N(e,l,n,t.slice(1));for(const n of Object.keys(c)){const i=n.replace(C,"");if(!a||t.includes(i)){const t=c[n];P(e,l,r,t.callable,t.delegationSelector)}}}else{if(!Object.keys(c).length)return;P(e,l,r,o,s?n:null)}},trigger(e,t,n){if("string"!=typeof t||!e)return null;const i=f();let s=null,o=!0,r=!0,a=!1;t!==$(t)&&i&&(s=i.Event(t,n),i(e).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(t,{bubbles:o,cancelable:!0});return l=M(l,n),a&&l.preventDefault(),r&&e.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function M(e,t){for(const[n,i]of Object.entries(t||{}))try{e[n]=i}catch(t){Object.defineProperty(e,n,{configurable:!0,get:()=>i})}return e}const q=new Map,H={set(e,t,n){q.has(e)||q.set(e,new Map);const i=q.get(e);i.has(t)||0===i.size?i.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`)},get:(e,t)=>q.has(e)&&q.get(e).get(t)||null,remove(e,t){if(!q.has(e))return;const n=q.get(e);n.delete(t),0===n.size&&q.delete(e)}};function B(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch(t){return e}}function R(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const F={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${R(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${R(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter((e=>e.startsWith("bs")&&!e.startsWith("bsConfig")));for(const i of n){let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),t[n]=B(e.dataset[i])}return t},getDataAttribute:(e,t)=>B(e.getAttribute(`data-bs-${R(t)}`))};class V{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){const n=a(t)?F.getDataAttribute(t,"config"):{};return{...this.constructor.Default,..."object"==typeof n?n:{},...a(t)?F.getDataAttributes(t):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const i of Object.keys(t)){const s=t[i],o=e[i],r=a(o)?"element":null==(n=o)?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${r}" but expected type "${s}".`)}var n}}class W extends V{constructor(e,t){super(),(e=l(e))&&(this._element=e,this._config=this._getConfig(t),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),I.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){y(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return H.get(l(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const U=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;I.on(document,n,`[data-bs-dismiss="${i}"]`,(function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),u(this))return;const s=o(this)||this.closest(`.${i}`);e.getOrCreateInstance(s)[t]()}))};class z extends W{static get NAME(){return"alert"}close(){if(I.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const e=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,e)}_destroyElement(){this._element.remove(),I.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(e){return this.each((function(){const t=z.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)}}))}}U(z,"close"),v(z);const X='[data-bs-toggle="button"]';class Q extends W{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(e){return this.each((function(){const t=Q.getOrCreateInstance(this);"toggle"===e&&t[e]()}))}}I.on(document,"click.bs.button.data-api",X,(e=>{e.preventDefault();const t=e.target.closest(X);Q.getOrCreateInstance(t).toggle()})),v(Q);const K={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 n=[];let i=e.parentNode.closest(t);for(;i;)n.push(i),i=i.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.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=>!u(e)&&c(e)))}},Y={endCallback:null,leftCallback:null,rightCallback:null},G={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class J extends V{constructor(e,t){super(),this._element=e,e&&J.isSupported()&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Y}static get DefaultType(){return G}static get NAME(){return"swipe"}dispose(){I.off(this._element,".bs.swipe")}_start(e){this._supportPointerEvents?this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX):this._deltaX=e.touches[0].clientX}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),b(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=40)return;const t=e/this._deltaX;this._deltaX=0,t&&b(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(I.on(this._element,"pointerdown.bs.swipe",(e=>this._start(e))),I.on(this._element,"pointerup.bs.swipe",(e=>this._end(e))),this._element.classList.add("pointer-event")):(I.on(this._element,"touchstart.bs.swipe",(e=>this._start(e))),I.on(this._element,"touchmove.bs.swipe",(e=>this._move(e))),I.on(this._element,"touchend.bs.swipe",(e=>this._end(e))))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&("pen"===e.pointerType||"touch"===e.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Z="next",ee="prev",te="left",ne="right",ie="slid.bs.carousel",se="carousel",oe="active",re={ArrowLeft:ne,ArrowRight:te},ae={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},le={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ce extends W{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===se&&this.cycle()}static get Default(){return ae}static get DefaultType(){return le}static get NAME(){return"carousel"}next(){this._slide(Z)}nextWhenVisible(){!document.hidden&&c(this._element)&&this.next()}prev(){this._slide(ee)}pause(){this._isSliding&&r(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?I.one(this._element,ie,(()=>this.cycle())):this.cycle())}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding)return void I.one(this._element,ie,(()=>this.to(e)));const n=this._getItemIndex(this._getActive());if(n===e)return;const i=e>n?Z:ee;this._slide(i,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&I.on(this._element,"keydown.bs.carousel",(e=>this._keydown(e))),"hover"===this._config.pause&&(I.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),I.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&J.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const e of K.find(".carousel-item img",this._element))I.on(e,"dragstart.bs.carousel",(e=>e.preventDefault()));const e={leftCallback:()=>this._slide(this._directionToOrder(te)),rightCallback:()=>this._slide(this._directionToOrder(ne)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new J(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=re[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=K.findOne(".active",this._indicatorsElement);t.classList.remove(oe),t.removeAttribute("aria-current");const n=K.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(oe),n.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const n=this._getActive(),i=e===Z,s=t||w(this._getItems(),n,i,this._config.wrap);if(s===n)return;const o=this._getItemIndex(s),r=t=>I.trigger(this._element,t,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!n||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=i?"carousel-item-start":"carousel-item-end",c=i?"carousel-item-next":"carousel-item-prev";s.classList.add(c),p(s),n.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(oe),n.classList.remove(oe,c,l),this._isSliding=!1,r(ie)}),n,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return K.findOne(".active.carousel-item",this._element)}_getItems(){return K.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return m()?e===te?ee:Z:e===te?Z:ee}_orderToDirection(e){return m()?e===ee?te:ne:e===ee?ne:te}static jQueryInterface(e){return this.each((function(){const t=ce.getOrCreateInstance(this,e);if("number"!=typeof e){if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}else t.to(e)}))}}I.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(e){const t=o(this);if(!t||!t.classList.contains(se))return;e.preventDefault();const n=ce.getOrCreateInstance(t),i=this.getAttribute("data-bs-slide-to");return i?(n.to(i),void n._maybeEnableCycle()):"next"===F.getDataAttribute(this,"slide")?(n.next(),void n._maybeEnableCycle()):(n.prev(),void n._maybeEnableCycle())})),I.on(window,"load.bs.carousel.data-api",(()=>{const e=K.find('[data-bs-ride="carousel"]');for(const t of e)ce.getOrCreateInstance(t)})),v(ce);const ue="show",de="collapse",he="collapsing",pe='[data-bs-toggle="collapse"]',fe={parent:null,toggle:!0},ge={parent:"(null|element)",toggle:"boolean"};class me extends W{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const n=K.find(pe);for(const e of n){const t=s(e),n=K.find(t).filter((e=>e===this._element));null!==t&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return fe}static get DefaultType(){return ge}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((e=>e!==this._element)).map((e=>me.getOrCreateInstance(e,{toggle:!1})))),e.length&&e[0]._isTransitioning)return;if(I.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const t of e)t.hide();const t=this._getDimension();this._element.classList.remove(de),this._element.classList.add(he),this._element.style[t]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${t[0].toUpperCase()+t.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(he),this._element.classList.add(de,ue),this._element.style[t]="",I.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[t]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(I.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,p(this._element),this._element.classList.add(he),this._element.classList.remove(de,ue);for(const e of this._triggerArray){const t=o(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(he),this._element.classList.add(de),I.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(ue)}_configAfterMerge(e){return e.toggle=Boolean(e.toggle),e.parent=l(e.parent),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(pe);for(const t of e){const e=o(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){const t=K.find(":scope .collapse .collapse",this._config.parent);return K.find(e,this._config.parent).filter((e=>!t.includes(e)))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const n of e)n.classList.toggle("collapsed",!t),n.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1),this.each((function(){const n=me.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}I.on(document,"click.bs.collapse.data-api",pe,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=s(this),n=K.find(t);for(const e of n)me.getOrCreateInstance(e,{toggle:!1}).toggle()})),v(me);const ve="dropdown",be="ArrowUp",ye="ArrowDown",we="click.bs.dropdown.data-api",_e="keydown.bs.dropdown.data-api",xe="show",Ce='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Te=`${Ce}.show`,Ee=".dropdown-menu",Ae=m()?"top-end":"top-start",ke=m()?"top-start":"top-end",Se=m()?"bottom-end":"bottom-start",Oe=m()?"bottom-start":"bottom-end",Le=m()?"left-start":"right-start",De=m()?"right-start":"left-start",je={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Pe={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Ne extends W{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,Ee)[0]||K.prev(this._element,Ee)[0]||K.findOne(Ee,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return je}static get DefaultType(){return Pe}static get NAME(){return ve}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!I.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const e of[].concat(...document.body.children))I.on(e,"mouseover",h);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(xe),this._element.classList.add(xe),I.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(u(this._element)||!this._isShown())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){if(!I.trigger(this._element,"hide.bs.dropdown",e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.off(e,"mouseover",h);this._popper&&this._popper.destroy(),this._menu.classList.remove(xe),this._element.classList.remove(xe),this._element.setAttribute("aria-expanded","false"),F.removeDataAttribute(this._menu,"popper"),I.trigger(this._element,"hidden.bs.dropdown",e)}}_getConfig(e){if("object"==typeof(e=super._getConfig(e)).reference&&!a(e.reference)&&"function"!=typeof e.reference.getBoundingClientRect)throw new TypeError(`${ve.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(void 0===t)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=this._parent:a(this._config.reference)?e=l(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=t.createPopper(e,this._menu,n)}_isShown(){return this._menu.classList.contains(xe)}_getPlacement(){const e=this._parent;if(e.classList.contains("dropend"))return Le;if(e.classList.contains("dropstart"))return De;if(e.classList.contains("dropup-center"))return"top";if(e.classList.contains("dropdown-center"))return"bottom";const t="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return e.classList.contains("dropup")?t?ke:Ae:t?Oe:Se}_detectNavbar(){return null!==this._element.closest(".navbar")}_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(this._inNavbar||"static"===this._config.display)&&(F.setDataAttribute(this._menu,"popper","static"),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 n=K.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((e=>c(e)));n.length&&w(n,t,e===ye,!n.includes(t)).focus()}static jQueryInterface(e){return this.each((function(){const t=Ne.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(2===e.button||"keyup"===e.type&&"Tab"!==e.key)return;const t=K.find(Te);for(const n of t){const t=Ne.getInstance(n);if(!t||!1===t._config.autoClose)continue;const i=e.composedPath(),s=i.includes(t._menu);if(i.includes(t._element)||"inside"===t._config.autoClose&&!s||"outside"===t._config.autoClose&&s)continue;if(t._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const o={relatedTarget:t._element};"click"===e.type&&(o.clickEvent=e),t._completeHide(o)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),n="Escape"===e.key,i=[be,ye].includes(e.key);if(!i&&!n)return;if(t&&!n)return;e.preventDefault();const s=this.matches(Ce)?this:K.prev(this,Ce)[0]||K.next(this,Ce)[0]||K.findOne(Ce,e.delegateTarget.parentNode),o=Ne.getOrCreateInstance(s);if(i)return e.stopPropagation(),o.show(),void o._selectMenuItem(e);o._isShown()&&(e.stopPropagation(),o.hide(),s.focus())}}I.on(document,_e,Ce,Ne.dataApiKeydownHandler),I.on(document,_e,Ee,Ne.dataApiKeydownHandler),I.on(document,we,Ne.clearMenus),I.on(document,"keyup.bs.dropdown.data-api",Ne.clearMenus),I.on(document,we,Ce,(function(e){e.preventDefault(),Ne.getOrCreateInstance(this).toggle()})),v(Ne);const $e=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Ie=".sticky-top",Me="padding-right",qe="margin-right";class He{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,Me,(t=>t+e)),this._setElementAttributes($e,Me,(t=>t+e)),this._setElementAttributes(Ie,qe,(t=>t-e))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Me),this._resetElementAttributes($e,Me),this._resetElementAttributes(Ie,qe)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,(e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const s=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(e,t){const n=e.style.getPropertyValue(t);n&&F.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,(e=>{const n=F.getDataAttribute(e,t);null!==n?(F.removeDataAttribute(e,t),e.style.setProperty(t,n)):e.style.removeProperty(t)}))}_applyManipulationCallback(e,t){if(a(e))t(e);else for(const n of K.find(e,this._element))t(n)}}const Be="show",Re="mousedown.bs.backdrop",Fe={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ve={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class We extends V{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Fe}static get DefaultType(){return Ve}static get NAME(){return"backdrop"}show(e){if(!this._config.isVisible)return void b(e);this._append();const t=this._getElement();this._config.isAnimated&&p(t),t.classList.add(Be),this._emulateAnimation((()=>{b(e)}))}hide(e){this._config.isVisible?(this._getElement().classList.remove(Be),this._emulateAnimation((()=>{this.dispose(),b(e)}))):b(e)}dispose(){this._isAppended&&(I.off(this._element,Re),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=l(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),I.on(e,Re,(()=>{b(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(e){y(e,this._getElement(),this._config.isAnimated)}}const Ue=".bs.focustrap",ze="backward",Xe={autofocus:!0,trapElement:null},Qe={autofocus:"boolean",trapElement:"element"};class Ke extends V{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Xe}static get DefaultType(){return Qe}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),I.off(document,Ue),I.on(document,"focusin.bs.focustrap",(e=>this._handleFocusin(e))),I.on(document,"keydown.tab.bs.focustrap",(e=>this._handleKeydown(e))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,I.off(document,Ue))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const n=K.focusableChildren(t);0===n.length?t.focus():this._lastTabNavDirection===ze?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?ze:"forward")}}const Ye="hidden.bs.modal",Ge="show.bs.modal",Je="modal-open",Ze="show",et="modal-static",tt={backdrop:!0,focus:!0,keyboard:!0},nt={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class it extends W{constructor(e,t){super(e,t),this._dialog=K.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new He,this._addEventListeners()}static get Default(){return tt}static get DefaultType(){return nt}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||I.trigger(this._element,Ge,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Je),this._adjustDialog(),this._backdrop.show((()=>this._showElement(e))))}hide(){this._isShown&&!this._isTransitioning&&(I.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Ze),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const e of[window,this._dialog])I.off(e,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new We({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ke({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||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;const t=K.findOne(".modal-body",this._dialog);t&&(t.scrollTop=0),p(this._element),this._element.classList.add(Ze),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,I.trigger(this._element,"shown.bs.modal",{relatedTarget:e})}),this._dialog,this._isAnimated())}_addEventListeners(){I.on(this._element,"keydown.dismiss.bs.modal",(e=>{if("Escape"===e.key)return this._config.keyboard?(e.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),I.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),I.on(this._element,"mousedown.dismiss.bs.modal",(e=>{I.one(this._element,"click.dismiss.bs.modal",(t=>{this._element===e.target&&this._element===t.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_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(Je),this._resetAdjustments(),this._scrollBar.reset(),I.trigger(this._element,Ye)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(I.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;"hidden"===t||this._element.classList.contains(et)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(et),this._queueCallback((()=>{this._element.classList.remove(et),this._queueCallback((()=>{this._element.style.overflowY=t}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){const e=m()?"paddingLeft":"paddingRight";this._element.style[e]=`${t}px`}if(!n&&e){const e=m()?"paddingRight":"paddingLeft";this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each((function(){const n=it.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e](t)}}))}}I.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(e){const t=o(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),I.one(t,Ge,(e=>{e.defaultPrevented||I.one(t,Ye,(()=>{c(this)&&this.focus()}))}));const n=K.findOne(".modal.show");n&&it.getInstance(n).hide(),it.getOrCreateInstance(t).toggle(this)})),U(it),v(it);const st="show",ot="showing",rt="hiding",at=".offcanvas.show",lt="hidePrevented.bs.offcanvas",ct="hidden.bs.offcanvas",ut={backdrop:!0,keyboard:!0,scroll:!1},dt={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ht extends W{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ut}static get DefaultType(){return dt}static get NAME(){return"offcanvas"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||I.trigger(this._element,"show.bs.offcanvas",{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new He).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ot),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(st),this._element.classList.remove(ot),I.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:e})}),this._element,!0))}hide(){this._isShown&&(I.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(rt),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(st,rt),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new He).reset(),I.trigger(this._element,ct)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=Boolean(this._config.backdrop);return new We({className:"offcanvas-backdrop",isVisible:e,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:e?()=>{"static"!==this._config.backdrop?this.hide():I.trigger(this._element,lt)}:null})}_initializeFocusTrap(){return new Ke({trapElement:this._element})}_addEventListeners(){I.on(this._element,"keydown.dismiss.bs.offcanvas",(e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():I.trigger(this._element,lt))}))}static jQueryInterface(e){return this.each((function(){const t=ht.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)}}))}}I.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const t=o(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),u(this))return;I.one(t,ct,(()=>{c(this)&&this.focus()}));const n=K.findOne(at);n&&n!==t&&ht.getInstance(n).hide(),ht.getOrCreateInstance(t).toggle(this)})),I.on(window,"load.bs.offcanvas.data-api",(()=>{for(const e of K.find(at))ht.getOrCreateInstance(e).show()})),I.on(window,"resize.bs.offcanvas",(()=>{for(const e of K.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(e).position&&ht.getOrCreateInstance(e).hide()})),U(ht),v(ht);const pt=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ft=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,gt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,mt=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?!pt.has(n)||Boolean(ft.test(e.nodeValue)||gt.test(e.nodeValue)):t.filter((e=>e instanceof RegExp)).some((e=>e.test(n)))},vt={"*":["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:[]},bt={allowList:vt,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
    "},yt={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},wt={entry:"(string|element|function|null)",selector:"(string|element)"};class _t extends V{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return bt}static get DefaultType(){return yt}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((e=>this._resolvePossibleFunction(e))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);const t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},wt)}_setContent(e,t,n){const i=K.findOne(n,e);i&&((t=this._resolvePossibleFunction(t))?a(t)?this._putElementInTemplate(l(t),i):this._config.html?i.innerHTML=this._maybeSanitize(t):i.textContent=t:i.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,t,n){if(!e.length)return e;if(n&&"function"==typeof n)return n(e);const i=(new window.DOMParser).parseFromString(e,"text/html"),s=[].concat(...i.body.querySelectorAll("*"));for(const e of s){const n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}const i=[].concat(...e.attributes),s=[].concat(t["*"]||[],t[n]||[]);for(const t of i)mt(t,s)||e.removeAttribute(t.nodeName)}return i.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return"function"==typeof e?e(this):e}_putElementInTemplate(e,t){if(this._config.html)return t.innerHTML="",void t.append(e);t.textContent=e.textContent}}const xt=new Set(["sanitize","allowList","sanitizeFn"]),Ct="fade",Tt="show",Et=".modal",At="hide.bs.modal",kt="hover",St="focus",Ot={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},Lt={allowList:vt,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},Dt={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class jt extends W{constructor(e,n){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return Lt}static get DefaultType(){return Dt}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),I.off(this._element.closest(Et),At,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),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=I.trigger(this._element,this.constructor.eventName("show")),t=(d(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();const n=this._getTipElement();this._element.setAttribute("aria-describedby",n.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(n),I.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(n),n.classList.add(Tt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.on(e,"mouseover",h);this._queueCallback((()=>{I.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!I.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Tt),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))I.off(e,"mouseover",h);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),I.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(Ct,Tt),t.classList.add(`bs-${this.constructor.NAME}-auto`);const n=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return t.setAttribute("id",n),this._isAnimated()&&t.classList.add(Ct),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new _t({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ct)}_isShown(){return this.tip&&this.tip.classList.contains(Tt)}_createPopper(e){const n="function"==typeof this._config.placement?this._config.placement.call(this,e,this._element):this._config.placement,i=Ot[n.toUpperCase()];return t.createPopper(this._element,e,this._getPopperConfig(i))}_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:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if("click"===t)I.on(this._element,this.constructor.eventName("click"),this._config.selector,(e=>{this._initializeOnDelegatedTarget(e).toggle()}));else if("manual"!==t){const e=t===kt?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),n=t===kt?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");I.on(this._element,e,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusin"===e.type?St:kt]=!0,t._enter()})),I.on(this._element,n,this._config.selector,(e=>{const t=this._initializeOnDelegatedTarget(e);t._activeTrigger["focusout"===e.type?St:kt]=t._element.contains(e.relatedTarget),t._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},I.on(this._element.closest(Et),At,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=F.getDataAttributes(this._element);for(const e of Object.keys(t))xt.has(e)&&delete t[e];return e={...t,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:l(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()),e}_getDelegateConfig(){const e={};for(const t in this._config)this.constructor.Default[t]!==this._config[t]&&(e[t]=this._config[t]);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each((function(){const t=jt.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}v(jt);const Pt={...jt.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},Nt={...jt.DefaultType,content:"(null|string|element|function)"};class $t extends jt{static get Default(){return Pt}static get DefaultType(){return Nt}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each((function(){const t=$t.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e]()}}))}}v($t);const It="click.bs.scrollspy",Mt="active",qt="[href]",Ht={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Bt={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Rt extends W{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Ht}static get DefaultType(){return Bt}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=l(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,"string"==typeof e.threshold&&(e.threshold=e.threshold.split(",").map((e=>Number.parseFloat(e)))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(I.off(this._config.target,It),I.on(this._config.target,It,qt,(e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const n=this._rootElement||window,i=t.offsetTop-this._element.offsetTop;if(n.scrollTo)return void n.scrollTo({top:i,behavior:"smooth"});n.scrollTop=i}})))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((e=>this._observerCallback(e)),e)}_observerCallback(e){const t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},i=(this._rootElement||document.documentElement).scrollTop,s=i>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=i;for(const o of e){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(o));continue}const e=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&e){if(n(o),!i)return}else s||e||n(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=K.find(qt,this._config.target);for(const t of e){if(!t.hash||u(t))continue;const e=K.findOne(t.hash,this._element);c(e)&&(this._targetLinks.set(t.hash,t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Mt),this._activateParents(e),I.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:e}))}_activateParents(e){if(e.classList.contains("dropdown-item"))K.findOne(".dropdown-toggle",e.closest(".dropdown")).classList.add(Mt);else for(const t of K.parents(e,".nav, .list-group"))for(const e of K.prev(t,".nav-link, .nav-item > .nav-link, .list-group-item"))e.classList.add(Mt)}_clearActiveClass(e){e.classList.remove(Mt);const t=K.find("[href].active",e);for(const e of t)e.classList.remove(Mt)}static jQueryInterface(e){return this.each((function(){const t=Rt.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]()}}))}}I.on(window,"load.bs.scrollspy.data-api",(()=>{for(const e of K.find('[data-bs-spy="scroll"]'))Rt.getOrCreateInstance(e)})),v(Rt);const Ft="ArrowLeft",Vt="ArrowRight",Wt="ArrowUp",Ut="ArrowDown",zt="active",Xt="fade",Qt="show",Kt='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Yt=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Kt}`;class Gt extends W{constructor(e){super(e),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),I.on(this._element,"keydown.bs.tab",(e=>this._keydown(e))))}static get NAME(){return"tab"}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),n=t?I.trigger(t,"hide.bs.tab",{relatedTarget:e}):null;I.trigger(e,"show.bs.tab",{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(zt),this._activate(o(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),I.trigger(e,"shown.bs.tab",{relatedTarget:t})):e.classList.add(Qt)}),e,e.classList.contains(Xt)))}_deactivate(e,t){e&&(e.classList.remove(zt),e.blur(),this._deactivate(o(e)),this._queueCallback((()=>{"tab"===e.getAttribute("role")?(e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),I.trigger(e,"hidden.bs.tab",{relatedTarget:t})):e.classList.remove(Qt)}),e,e.classList.contains(Xt)))}_keydown(e){if(![Ft,Vt,Wt,Ut].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[Vt,Ut].includes(e.key),n=w(this._getChildren().filter((e=>!u(e))),e.target,t,!0);n&&(n.focus({preventScroll:!0}),Gt.getOrCreateInstance(n).show())}_getChildren(){return K.find(Yt,this._parent)}_getActiveElem(){return this._getChildren().find((e=>this._elemIsActive(e)))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute("aria-selected",t),n!==e&&this._setAttributeIfNotExists(n,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=o(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`#${e.id}`))}_toggleDropDown(e,t){const n=this._getOuterElement(e);if(!n.classList.contains("dropdown"))return;const i=(e,i)=>{const s=K.findOne(e,n);s&&s.classList.toggle(i,t)};i(".dropdown-toggle",zt),i(".dropdown-menu",Qt),n.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(zt)}_getInnerElement(e){return e.matches(Yt)?e:K.findOne(Yt,e)}_getOuterElement(e){return e.closest(".nav-item, .list-group-item")||e}static jQueryInterface(e){return this.each((function(){const t=Gt.getOrCreateInstance(this);if("string"==typeof e){if(void 0===t[e]||e.startsWith("_")||"constructor"===e)throw new TypeError(`No method named "${e}"`);t[e]()}}))}}I.on(document,"click.bs.tab",Kt,(function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),u(this)||Gt.getOrCreateInstance(this).show()})),I.on(window,"load.bs.tab",(()=>{for(const e of K.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Gt.getOrCreateInstance(e)})),v(Gt);const Jt="hide",Zt="show",en="showing",tn={animation:"boolean",autohide:"boolean",delay:"number"},nn={animation:!0,autohide:!0,delay:5e3};class sn extends W{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return nn}static get DefaultType(){return tn}static get NAME(){return"toast"}show(){I.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Jt),p(this._element),this._element.classList.add(Zt,en),this._queueCallback((()=>{this._element.classList.remove(en),I.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(I.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(en),this._queueCallback((()=>{this._element.classList.add(Jt),this._element.classList.remove(en,Zt),I.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(Zt),super.dispose()}isShown(){return this._element.classList.contains(Zt)}_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 n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){I.on(this._element,"mouseover.bs.toast",(e=>this._onInteraction(e,!0))),I.on(this._element,"mouseout.bs.toast",(e=>this._onInteraction(e,!1))),I.on(this._element,"focusin.bs.toast",(e=>this._onInteraction(e,!0))),I.on(this._element,"focusout.bs.toast",(e=>this._onInteraction(e,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each((function(){const t=sn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===t[e])throw new TypeError(`No method named "${e}"`);t[e](this)}}))}}return U(sn),v(sn),{Alert:z,Button:Q,Carousel:ce,Collapse:me,Dropdown:Ne,Modal:it,Offcanvas:ht,Popover:$t,ScrollSpy:Rt,Tab:Gt,Toast:sn,Tooltip:jt}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Sweetalert2=t()}(this,(function(){"use strict";var e={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const t=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t},n=t(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),i=t(["success","warning","info","question","error"]),s="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),r=e=>{console.warn(`${s} ${"object"==typeof e?e.join(" "):e}`)},a=e=>{console.error(`${s} ${e}`)},l=[],c=e=>"function"==typeof e?e():e,u=e=>e&&"function"==typeof e.toPromise,d=e=>u(e)?e.toPromise():Promise.resolve(e),h=e=>e&&Promise.resolve(e)===e,p=()=>document.body.querySelector(`.${n.container}`),f=e=>{const t=p();return t?t.querySelector(e):null},g=e=>f(`.${e}`),m=()=>g(n.popup),v=()=>g(n.icon),b=()=>g(n.title),y=()=>g(n["html-container"]),w=()=>g(n.image),_=()=>g(n["progress-steps"]),x=()=>g(n["validation-message"]),C=()=>f(`.${n.actions} .${n.confirm}`),T=()=>f(`.${n.actions} .${n.cancel}`),E=()=>f(`.${n.actions} .${n.deny}`),A=()=>f(`.${n.loader}`),k=()=>g(n.actions),S=()=>g(n.footer),O=()=>g(n["timer-progress-bar"]),L=()=>g(n.close),D=()=>{const e=Array.from(m().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")),i=parseInt(t.getAttribute("tabindex"));return n>i?1:n"-1"!==e.getAttribute("tabindex")));return(e=>{const t=[];for(let n=0;nK(e)))},j=()=>I(document.body,n.shown)&&!I(document.body,n["toast-shown"])&&!I(document.body,n["no-backdrop"]),P=()=>m()&&I(m(),n.toast),N={previousBodyPadding:null},$=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html");Array.from(n.querySelector("head").childNodes).forEach((t=>{e.appendChild(t)})),Array.from(n.querySelector("body").childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},I=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{if(((e,t)=>{Array.from(e.classList).forEach((s=>{Object.values(n).includes(s)||Object.values(i).includes(s)||Object.values(t.showClass).includes(s)||e.classList.remove(s)}))})(e,t),t.customClass&&t.customClass[s]){if("string"!=typeof t.customClass[s]&&!t.customClass[s].forEach)return void r(`Invalid type of customClass.${s}! Expected string or iterable object, got "${typeof t.customClass[s]}"`);R(e,t.customClass[s])}},q=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${n.popup} > .${n[t]}`);case"checkbox":return e.querySelector(`.${n.popup} > .${n.checkbox} input`);case"radio":return e.querySelector(`.${n.popup} > .${n.radio} input:checked`)||e.querySelector(`.${n.popup} > .${n.radio} input:first-child`);case"range":return e.querySelector(`.${n.popup} > .${n.range} input`);default:return e.querySelector(`.${n.popup} > .${n.input}`)}},H=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},B=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach((t=>{Array.isArray(e)?e.forEach((e=>{n?e.classList.add(t):e.classList.remove(t)})):n?e.classList.add(t):e.classList.remove(t)})))},R=(e,t)=>{B(e,t,!0)},F=(e,t)=>{B(e,t,!1)},V=(e,t)=>{const n=Array.from(e.children);for(let e=0;e{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style[t]="number"==typeof n?`${n}px`:n:e.style.removeProperty(t)},U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e.style.display=t},z=e=>{e.style.display="none"},X=(e,t,n,i)=>{const s=e.querySelector(t);s&&(s.style[n]=i)},Q=function(e,t){t?U(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):z(e)},K=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),Y=e=>!!(e.scrollHeight>e.clientHeight),G=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),i=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||i>0},J=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=O();K(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},Z={},ee=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,i=window.scrollY;Z.restoreFocusTimeout=setTimeout((()=>{Z.previousActiveElement instanceof HTMLElement?(Z.previousActiveElement.focus(),Z.previousActiveElement=null):document.body&&document.body.focus(),t()}),100),window.scrollTo(n,i)})),te=()=>"undefined"==typeof window||"undefined"==typeof document,ne=`\n
    \n \n
      \n
      \n \n

      \n
      \n \n \n
      \n \n \n
      \n \n
      \n \n \n
      \n
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n
      \n`.replace(/(^|\n)\s*/g,""),ie=()=>{Z.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=p();return!!e&&(e.remove(),F([document.documentElement,document.body],[n["no-backdrop"],n["toast-shown"],n["has-column"]]),!0)})();if(te())return void a("SweetAlert2 requires document to initialize");const i=document.createElement("div");i.className=n.container,t&&R(i,n["no-transition"]),$(i,ne);const s="string"==typeof(o=e.target)?document.querySelector(o):o;var o;s.appendChild(i),(e=>{const t=m();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&R(p(),n.rtl)})(s),(()=>{const e=m(),t=V(e,n.input),i=V(e,n.file),s=e.querySelector(`.${n.range} input`),o=e.querySelector(`.${n.range} output`),r=V(e,n.select),a=e.querySelector(`.${n.checkbox} input`),l=V(e,n.textarea);t.oninput=ie,i.onchange=ie,r.onchange=ie,a.onchange=ie,l.oninput=ie,s.oninput=()=>{ie(),o.value=s.value},s.onchange=()=>{ie(),o.value=s.value}})()},oe=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?re(e,t):e&&$(t,e)},re=(e,t)=>{e.jquery?ae(t,e):$(t,e.toString())},ae=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},le=(()=>{if(te())return!1;const e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})();function ce(e,t,i){Q(e,i[`show${o(t)}Button`],"inline-block"),$(e,i[`${t}ButtonText`]),e.setAttribute("aria-label",i[`${t}ButtonAriaLabel`]),e.className=n[t],M(e,i,`${t}Button`),R(e,i[`${t}ButtonClass`])}const ue=["input","file","range","select","radio","checkbox","textarea"],de=(e,t)=>{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},he=(e,t,i)=>{if(i.inputLabel){e.id=n.input;const s=document.createElement("label"),o=n["input-label"];s.setAttribute("for",e.id),s.className=o,"object"==typeof i.customClass&&R(s,i.customClass.inputLabel),s.innerText=i.inputLabel,t.insertAdjacentElement("beforebegin",s)}},pe=e=>V(m(),n[e]||n.input),fe=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:h(t)||r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ge={};ge.text=ge.email=ge.password=ge.number=ge.tel=ge.url=(e,t)=>(fe(e,t.inputValue),he(e,e,t),de(e,t),e.type=t.input,e),ge.file=(e,t)=>(he(e,e,t),de(e,t),e),ge.range=(e,t)=>{const n=e.querySelector("input"),i=e.querySelector("output");return fe(n,t.inputValue),n.type=t.input,fe(i,t.inputValue),he(n,e,t),e},ge.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");$(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return he(e,e,t),e},ge.radio=e=>(e.textContent="",e),ge.checkbox=(e,t)=>{const i=q(m(),"checkbox");i.value="1",i.id=n.checkbox,i.checked=Boolean(t.inputValue);const s=e.querySelector("span");return $(s,t.inputPlaceholder),i},ge.textarea=(e,t)=>(fe(e,t.inputValue),de(e,t),he(e,e,t),setTimeout((()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(m()).width);new MutationObserver((()=>{const n=e.offsetWidth+(i=e,parseInt(window.getComputedStyle(i).marginLeft)+parseInt(window.getComputedStyle(i).marginRight));var i;m().style.width=n>t?`${n}px`:null})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e);const me=(t,i)=>{const s=y();M(s,i,"htmlContainer"),i.html?(oe(i.html,s),U(s,"block")):i.text?(s.textContent=i.text,U(s,"block")):z(s),((t,i)=>{const s=m(),o=e.innerParams.get(t),r=!o||i.input!==o.input;ue.forEach((e=>{const t=V(s,n[e]);((e,t)=>{const n=q(m(),e);if(n){(e=>{for(let t=0;t{if(!ge[e.input])return void a(`Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "${e.input}"`);const t=pe(e.input),n=ge[e.input](t,e);U(t),e.inputAutoFocus&&setTimeout((()=>{H(n)}))})(i),(e=>{const t=pe(e.input);"object"==typeof e.customClass&&R(t,e.customClass.input)})(i))})(t,i)},ve=(e,t)=>{for(const n in i)t.icon!==n&&F(e,i[n]);R(e,i[t.icon]),we(e,t),be(),M(e,t,"icon")},be=()=>{const e=m(),t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{let n,i=e.innerHTML;t.iconHtml?n=_e(t.iconHtml):"success"===t.icon?(n='\n
      \n \n
      \n
      \n',i=i.replace(/ style=".*?"/g,"")):n="error"===t.icon?'\n \n \n \n \n':_e({question:"?",warning:"!",info:"i"}[t.icon]),i.trim()!==n.trim()&&$(e,n)},we=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])X(e,n,"backgroundColor",t.iconColor);X(e,".swal2-success-ring","borderColor",t.iconColor)}},_e=e=>`
      ${e}
      `,xe=(e,t)=>{e.className=`${n.popup} ${K(e)?t.showClass.popup:""}`,t.toast?(R([document.documentElement,document.body],n["toast-shown"]),R(e,n.toast)):R(e,n.modal),M(e,t,"popup"),"string"==typeof t.customClass&&R(e,t.customClass),t.icon&&R(e,n[`icon-${t.icon}`])},Ce=(t,s)=>{((e,t)=>{const n=p(),i=m();t.toast?(W(n,"width",t.width),i.style.width="100%",i.insertBefore(A(),v())):W(i,"width",t.width),W(i,"padding",t.padding),t.color&&(i.style.color=t.color),t.background&&(i.style.background=t.background),z(x()),xe(i,t)})(0,s),((e,t)=>{const i=p();i&&(function(e,t){"string"==typeof t?e.style.background=t:t||R([document.documentElement,document.body],n["no-backdrop"])}(i,t.backdrop),function(e,t){t in n?R(e,n[t]):(r('The "position" parameter is not valid, defaulting to "center"'),R(e,n.center))}(i,t.position),function(e,t){if(t&&"string"==typeof t){const i=`grow-${t}`;i in n&&R(e,n[i])}}(i,t.grow),M(i,t,"container"))})(0,s),((e,t)=>{const i=_();t.progressSteps&&0!==t.progressSteps.length?(U(i),i.textContent="",t.currentProgressStep>=t.progressSteps.length&&r("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),t.progressSteps.forEach(((e,s)=>{const o=(e=>{const t=document.createElement("li");return R(t,n["progress-step"]),$(t,e),t})(e);if(i.appendChild(o),s===t.currentProgressStep&&R(o,n["active-progress-step"]),s!==t.progressSteps.length-1){const e=(e=>{const t=document.createElement("li");return R(t,n["progress-step-line"]),e.progressStepsDistance&&W(t,"width",e.progressStepsDistance),t})(t);i.appendChild(e)}}))):z(i)})(0,s),((t,n)=>{const s=e.innerParams.get(t),o=v();if(s&&n.icon===s.icon)return ye(o,n),void ve(o,n);if(n.icon||n.iconHtml){if(n.icon&&-1===Object.keys(i).indexOf(n.icon))return a(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`),void z(o);U(o),ye(o,n),ve(o,n),R(o,n.showClass.icon)}else z(o)})(t,s),((e,t)=>{const i=w();t.imageUrl?(U(i,""),i.setAttribute("src",t.imageUrl),i.setAttribute("alt",t.imageAlt),W(i,"width",t.imageWidth),W(i,"height",t.imageHeight),i.className=n.image,M(i,t,"image")):z(i)})(0,s),((e,t)=>{const n=b();Q(n,t.title||t.titleText,"block"),t.title&&oe(t.title,n),t.titleText&&(n.innerText=t.titleText),M(n,t,"title")})(0,s),((e,t)=>{const n=L();$(n,t.closeButtonHtml),M(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)})(0,s),me(t,s),((e,t)=>{const i=k(),s=A();t.showConfirmButton||t.showDenyButton||t.showCancelButton?U(i):z(i),M(i,t,"actions"),function(e,t,i){const s=C(),o=E(),r=T();ce(s,"confirm",i),ce(o,"deny",i),ce(r,"cancel",i),function(e,t,i,s){s.buttonsStyling?(R([e,t,i],n.styled),s.confirmButtonColor&&(e.style.backgroundColor=s.confirmButtonColor,R(e,n["default-outline"])),s.denyButtonColor&&(t.style.backgroundColor=s.denyButtonColor,R(t,n["default-outline"])),s.cancelButtonColor&&(i.style.backgroundColor=s.cancelButtonColor,R(i,n["default-outline"]))):F([e,t,i],n.styled)}(s,o,r,i),i.reverseButtons&&(i.toast?(e.insertBefore(r,s),e.insertBefore(o,s)):(e.insertBefore(r,t),e.insertBefore(o,t),e.insertBefore(s,t)))}(i,s,t),$(s,t.loaderHtml),M(s,t,"loader")})(0,s),((e,t)=>{const n=S();Q(n,t.footer),t.footer&&oe(t.footer,n),M(n,t,"footer")})(0,s),"function"==typeof s.didRender&&s.didRender(m())};function Te(){const t=e.innerParams.get(this);if(!t)return;const i=e.domCache.get(this);z(i.loader),P()?t.icon&&U(v()):Ee(i),F([i.popup,i.actions],n.loading),i.popup.removeAttribute("aria-busy"),i.popup.removeAttribute("data-loading"),i.confirmButton.disabled=!1,i.denyButton.disabled=!1,i.cancelButton.disabled=!1}const Ee=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?U(t[0],"inline-block"):K(C())||K(E())||K(T())||z(e.actions)},Ae=()=>C()&&C().click(),ke=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),Se=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},Oe=(e,t)=>{const n=D();if(n.length)return(e+=t)===n.length?e=0:-1===e&&(e=n.length-1),void n[e].focus();m().focus()},Le=["ArrowRight","ArrowDown"],De=["ArrowLeft","ArrowUp"],je=(t,n,i)=>{const s=e.innerParams.get(t);s&&(n.isComposing||229===n.keyCode||(s.stopKeydownPropagation&&n.stopPropagation(),"Enter"===n.key?Pe(t,n,s):"Tab"===n.key?Ne(n):[...Le,...De].includes(n.key)?$e(n.key):"Escape"===n.key&&Ie(n,s,i)))},Pe=(e,t,n)=>{if(c(n.allowEnterKey)&&t.target&&e.getInput()&&t.target instanceof HTMLElement&&t.target.outerHTML===e.getInput().outerHTML){if(["textarea","file"].includes(n.input))return;Ae(),t.preventDefault()}},Ne=e=>{const t=e.target,n=D();let i=-1;for(let e=0;e{const t=[C(),E(),T()];if(document.activeElement instanceof HTMLElement&&!t.includes(document.activeElement))return;const n=Le.includes(e)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;for(let e=0;e{c(t.allowEscapeKey)&&(e.preventDefault(),n(ke.esc))};var Me={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const qe=()=>{Array.from(document.body.children).forEach((e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")}))},He=e=>{const t=e.target,n=p();return!(Be(e)||Re(e)||t!==n&&(Y(n)||!(t instanceof HTMLElement)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||Y(y())&&y().contains(t)))},Be=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,Re=e=>e.touches&&e.touches.length>1,Fe=()=>{if(I(document.body,n.iosfix)){const e=parseInt(document.body.style.top,10);F(document.body,n.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}},Ve=()=>{null!==N.previousBodyPadding&&(document.body.style.paddingRight=`${N.previousBodyPadding}px`,N.previousBodyPadding=null)};function We(e,t,i,s){P()?Ge(e,s):(ee(i).then((()=>Ge(e,s))),Se(Z)),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),j()&&(Ve(),Fe(),qe()),F([document.documentElement,document.body],[n.shown,n["height-auto"],n["no-backdrop"],n["toast-shown"]])}function Ue(e){e=Qe(e);const t=Me.swalPromiseResolve.get(this),n=ze(this);this.isAwaitingPromise()?e.isDismissed||(Xe(this),t(e)):n&&t(e)}const ze=t=>{const n=m();if(!n)return!1;const i=e.innerParams.get(t);if(!i||I(n,i.hideClass.popup))return!1;F(n,i.showClass.popup),R(n,i.hideClass.popup);const s=p();return F(s,i.showClass.backdrop),R(s,i.hideClass.backdrop),Ke(t,n,i),!0},Xe=t=>{t.isAwaitingPromise()&&(e.awaitingPromise.delete(t),e.innerParams.get(t)||t._destroy())},Qe=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),Ke=(e,t,n)=>{const i=p(),s=le&&G(t);"function"==typeof n.willClose&&n.willClose(t),s?Ye(e,t,i,n.returnFocus,n.didClose):We(e,i,n.returnFocus,n.didClose)},Ye=(e,t,n,i,s)=>{Z.swalCloseEventFinishedCallback=We.bind(null,e,n,i,s),t.addEventListener(le,(function(e){e.target===t&&(Z.swalCloseEventFinishedCallback(),delete Z.swalCloseEventFinishedCallback)}))},Ge=(e,t)=>{setTimeout((()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()}))};function Je(t,n,i){const s=e.domCache.get(t);n.forEach((e=>{s[e].disabled=i}))}function Ze(e,t){if(e)if("radio"===e.type){const n=e.parentNode.parentNode.querySelectorAll("input");for(let e=0;eObject.prototype.hasOwnProperty.call(et,e),ot=e=>-1!==tt.indexOf(e),rt=e=>nt[e],at=e=>{st(e)||r(`Unknown parameter "${e}"`)},lt=e=>{it.includes(e)&&r(`The parameter "${e}" is incompatible with toasts`)},ct=e=>{rt(e)&&((e,t)=>{var n;n=`"${e}" is deprecated and will be removed in the next major release. Please use "${t}" instead.`,l.includes(n)||(l.push(n),r(n))})(e,rt(e))},ut=t=>{t.isAwaitingPromise()?(dt(e,t),e.awaitingPromise.set(t,!0)):(dt(Me,t),dt(e,t))},dt=(e,t)=>{for(const n in e)e[n].delete(t)};var ht=Object.freeze({__proto__:null,_destroy:function(){const t=e.domCache.get(this),n=e.innerParams.get(this);n?(t.popup&&Z.swalCloseEventFinishedCallback&&(Z.swalCloseEventFinishedCallback(),delete Z.swalCloseEventFinishedCallback),"function"==typeof n.didDestroy&&n.didDestroy(),(e=>{ut(e),delete e.params,delete Z.keydownHandler,delete Z.keydownTarget,delete Z.currentInstance})(this)):ut(this)},close:Ue,closeModal:Ue,closePopup:Ue,closeToast:Ue,disableButtons:function(){Je(this,["confirmButton","denyButton","cancelButton"],!0)},disableInput:function(){Ze(this.getInput(),!0)},disableLoading:Te,enableButtons:function(){Je(this,["confirmButton","denyButton","cancelButton"],!1)},enableInput:function(){Ze(this.getInput(),!1)},getInput:function(t){const n=e.innerParams.get(t||this),i=e.domCache.get(t||this);return i?q(i.popup,n.input):null},handleAwaitingPromise:Xe,hideLoading:Te,isAwaitingPromise:function(){return!!e.awaitingPromise.get(this)},rejectPromise:function(e){const t=Me.swalPromiseReject.get(this);Xe(this),t&&t(e)},resetValidationMessage:function(){const t=e.domCache.get(this);t.validationMessage&&z(t.validationMessage);const i=this.getInput();i&&(i.removeAttribute("aria-invalid"),i.removeAttribute("aria-describedby"),F(i,n.inputerror))},showValidationMessage:function(t){const i=e.domCache.get(this),s=e.innerParams.get(this);$(i.validationMessage,t),i.validationMessage.className=n["validation-message"],s.customClass&&s.customClass.validationMessage&&R(i.validationMessage,s.customClass.validationMessage),U(i.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",n["validation-message"]),H(o),R(o,n.inputerror))},update:function(t){const n=m(),i=e.innerParams.get(this);if(!n||I(n,i.hideClass.popup))return void r("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const s=(e=>{const t={};return Object.keys(e).forEach((n=>{ot(n)?t[n]=e[n]:r(`Invalid parameter to update: ${n}`)})),t})(t),o=Object.assign({},i,s);Ce(this,o),e.innerParams.set(this,o),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})}});const pt=e=>{let t=m();t||new Gt,t=m();const n=A();P()?z(v()):ft(t,e),U(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},ft=(e,t)=>{const i=k(),s=A();!t&&K(C())&&(t=C()),U(i),t&&(z(t),s.setAttribute("data-button-to-replace",t.className)),s.parentNode.insertBefore(s,t),R([e,i],n.loading)},gt={select:(e,t,i)=>{const s=V(e,n.select),o=(e,t,n)=>{const s=document.createElement("option");s.value=n,$(s,t),s.selected=vt(n,i.inputValue),e.appendChild(s)};t.forEach((e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,s.appendChild(e),n.forEach((t=>o(e,t[1],t[0])))}else o(s,n,t)})),s.focus()},radio:(e,t,i)=>{const s=V(e,n.radio);t.forEach((e=>{const t=e[0],o=e[1],r=document.createElement("input"),a=document.createElement("label");r.type="radio",r.name=n.radio,r.value=t,vt(t,i.inputValue)&&(r.checked=!0);const l=document.createElement("span");$(l,o),l.className=n.label,a.appendChild(r),a.appendChild(l),s.appendChild(a)}));const o=s.querySelectorAll("input");o.length&&o[0].focus()}},mt=e=>{const t=[];return"undefined"!=typeof Map&&e instanceof Map?e.forEach(((e,n)=>{let i=e;"object"==typeof i&&(i=mt(i)),t.push([n,i])})):Object.keys(e).forEach((n=>{let i=e[n];"object"==typeof i&&(i=mt(i)),t.push([n,i])})),t},vt=(e,t)=>t&&t.toString()===e.toString(),bt=(t,n)=>{const i=e.innerParams.get(t);if(!i.input)return void a(`The "input" parameter is needed to be set when using returnInputValueOn${o(n)}`);const s=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return(e=>e.checked?1:0)(n);case"radio":return(e=>e.checked?e.value:null)(n);case"file":return(e=>e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null)(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(t,i);i.inputValidator?yt(t,s,n):t.getInput().checkValidity()?"deny"===n?wt(t,s):Ct(t,s):(t.enableButtons(),t.showValidationMessage(i.validationMessage))},yt=(t,n,i)=>{const s=e.innerParams.get(t);t.disableInput(),Promise.resolve().then((()=>d(s.inputValidator(n,s.validationMessage)))).then((e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):"deny"===i?wt(t,n):Ct(t,n)}))},wt=(t,n)=>{const i=e.innerParams.get(t||void 0);i.showLoaderOnDeny&&pt(E()),i.preDeny?(e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(i.preDeny(n,i.validationMessage)))).then((e=>{!1===e?(t.hideLoading(),Xe(t)):t.close({isDenied:!0,value:void 0===e?n:e})})).catch((e=>xt(t||void 0,e)))):t.close({isDenied:!0,value:n})},_t=(e,t)=>{e.close({isConfirmed:!0,value:t})},xt=(e,t)=>{e.rejectPromise(t)},Ct=(t,n)=>{const i=e.innerParams.get(t||void 0);i.showLoaderOnConfirm&&pt(),i.preConfirm?(t.resetValidationMessage(),e.awaitingPromise.set(t||void 0,!0),Promise.resolve().then((()=>d(i.preConfirm(n,i.validationMessage)))).then((e=>{K(x())||!1===e?(t.hideLoading(),Xe(t)):_t(t,void 0===e?n:e)})).catch((e=>xt(t||void 0,e)))):_t(t,n)},Tt=e=>e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton;let Et=!1;const At=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e),kt=()=>{if(Z.timeout)return(()=>{const e=O(),t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),Z.timeout.stop()},St=()=>{if(Z.timeout){const e=Z.timeout.start();return J(e),e}};let Ot=!1;const Lt={},Dt=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in Lt){const n=t.getAttribute(e);if(n)return void Lt[e].fire({template:n})}};var jt=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||At(e[0])?["title","html","icon"].forEach(((n,i)=>{const s=e[i];"string"==typeof s||At(s)?t[n]=s:void 0!==s&&a(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof s}`)})):Object.assign(t,e[0]),t},bindClickHandler:function(){Lt[arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Ot||(document.body.addEventListener("click",Dt),Ot=!0)},clickCancel:()=>T()&&T().click(),clickConfirm:Ae,clickDeny:()=>E()&&E().click(),enableLoading:pt,fire:function(){for(var e=arguments.length,t=new Array(e),n=0;ng(n["icon-content"]),getImage:w,getInputLabel:()=>g(n["input-label"]),getLoader:A,getPopup:m,getProgressSteps:_,getTimerLeft:()=>Z.timeout&&Z.timeout.getTimerLeft(),getTimerProgressBar:O,getTitle:b,getValidationMessage:x,increaseTimer:e=>{if(Z.timeout){const t=Z.timeout.increase(e);return J(t,!0),t}},isDeprecatedParameter:rt,isLoading:()=>m().hasAttribute("data-loading"),isTimerRunning:()=>Z.timeout&&Z.timeout.isRunning(),isUpdatableParameter:ot,isValidParameter:st,isVisible:()=>K(m()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},resumeTimer:St,showLoading:pt,stopTimer:kt,toggleTimer:()=>{const e=Z.timeout;return e&&(e.running?kt():St())}});class Pt{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const Nt=["swal-title","swal-html","swal-footer"],$t=(e,t)=>{Array.from(e.attributes).forEach((n=>{-1===t.indexOf(n.name)&&r([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])}))},It=e=>{const t=p(),i=m();"function"==typeof e.willOpen&&e.willOpen(i);const s=window.getComputedStyle(document.body).overflowY;Bt(t,i,e),setTimeout((()=>{qt(t,i)}),10),j()&&(Ht(t,e.scrollbarPadding,s),Array.from(document.body.children).forEach((e=>{e===p()||e.contains(p())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}))),P()||Z.previousActiveElement||(Z.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout((()=>e.didOpen(i))),F(t,n["no-transition"])},Mt=e=>{const t=m();if(e.target!==t)return;const n=p();t.removeEventListener(le,Mt),n.style.overflowY="auto"},qt=(e,t)=>{le&&G(t)?(e.style.overflowY="hidden",t.addEventListener(le,Mt)):e.style.overflowY="auto"},Ht=(e,t,i)=>{(()=>{if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!I(document.body,n.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",R(document.body,n.iosfix),(()=>{const e=p();let t;e.ontouchstart=e=>{t=He(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}})(),(()=>{const e=navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);if(t&&n&&!e.match(/CriOS/i)){const e=44;m().scrollHeight>window.innerHeight-e&&(p().style.paddingBottom=`${e}px`)}})()}})(),t&&"hidden"!==i&&(null===N.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(N.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${N.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=n["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)),setTimeout((()=>{e.scrollTop=0}))},Bt=(e,t,i)=>{R(e,i.showClass.backdrop),t.style.setProperty("opacity","0","important"),U(t,"grid"),setTimeout((()=>{R(t,i.showClass.popup),t.style.removeProperty("opacity")}),10),R([document.documentElement,document.body],n.shown),i.heightAuto&&i.backdrop&&!i.toast&&R([document.documentElement,document.body],n["height-auto"])};var Rt={email:(e,t)=>/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};let Ft;class Vt{constructor(){if("undefined"==typeof window)return;Ft=this;for(var t=arguments.length,n=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:{};(e=>{!1===e.backdrop&&e.allowOutsideClick&&r('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)at(t),e.toast&<(t),ct(t)})(Object.assign({},n,t)),Z.currentInstance&&(Z.currentInstance._destroy(),j()&&qe()),Z.currentInstance=Ft;const i=Ut(t,n);(function(e){!function(e){e.inputValidator||Object.keys(Rt).forEach((t=>{e.input===t&&(e.inputValidator=Rt[t])}))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&r("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(r('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
      ")),se(e)})(i),Object.freeze(i),Z.timeout&&(Z.timeout.stop(),delete Z.timeout),clearTimeout(Z.restoreFocusTimeout);const s=zt(Ft);return Ce(Ft,i),e.innerParams.set(Ft,i),Wt(Ft,s,i)}then(t){return e.promise.get(this).then(t)}finally(t){return e.promise.get(this).finally(t)}}const Wt=(t,n,i)=>new Promise(((s,o)=>{const r=e=>{t.close({isDismissed:!0,dismiss:e})};Me.swalPromiseResolve.set(t,s),Me.swalPromiseReject.set(t,o),n.confirmButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.input?bt(t,"confirm"):Ct(t,!0)})(t)},n.denyButton.onclick=()=>{(t=>{const n=e.innerParams.get(t);t.disableButtons(),n.returnInputValueOnDeny?bt(t,"deny"):wt(t,!1)})(t)},n.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(ke.cancel)})(t,r)},n.closeButton.onclick=()=>{r(ke.close)},((t,n,i)=>{e.innerParams.get(t).toast?((t,n,i)=>{n.popup.onclick=()=>{const n=e.innerParams.get(t);n&&(Tt(n)||n.timer||n.input)||i(ke.close)}})(t,n,i):((e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=void 0,t.target===e.container&&(Et=!0)}}})(n),(e=>{e.container.onmousedown=()=>{e.popup.onmouseup=function(t){e.popup.onmouseup=void 0,(t.target===e.popup||e.popup.contains(t.target))&&(Et=!0)}}})(n),((t,n,i)=>{n.container.onclick=s=>{const o=e.innerParams.get(t);Et?Et=!1:s.target===n.container&&c(o.allowOutsideClick)&&i(ke.backdrop)}})(t,n,i))})(t,n,r),((e,t,n,i)=>{Se(t),n.toast||(t.keydownHandler=t=>je(e,t,i),t.keydownTarget=n.keydownListenerCapture?window:m(),t.keydownListenerCapture=n.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)})(t,Z,i,r),((e,t)=>{"select"===t.input||"radio"===t.input?((e,t)=>{const n=m(),i=e=>{gt[t.input](n,mt(e),t)};u(t.inputOptions)||h(t.inputOptions)?(pt(C()),d(t.inputOptions).then((t=>{e.hideLoading(),i(t)}))):"object"==typeof t.inputOptions?i(t.inputOptions):a("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)})(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(u(t.inputValue)||h(t.inputValue))&&(pt(C()),((e,t)=>{const n=e.getInput();z(n),d(t.inputValue).then((i=>{n.value="number"===t.input?`${parseFloat(i)||0}`:`${i}`,U(n),n.focus(),e.hideLoading()})).catch((t=>{a(`Error in inputValue promise: ${t}`),n.value="",U(n),n.focus(),e.hideLoading()}))})(e,t))})(t,i),It(i),Xt(Z,i,r),Qt(n,i),setTimeout((()=>{n.container.scrollTop=0}))})),Ut=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return(e=>{const t=Nt.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach((e=>{const n=e.tagName.toLowerCase();t.includes(n)||r(`Unrecognized element <${n}>`)}))})(n),Object.assign((e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach((e=>{$t(e,["name","value"]);const n=e.getAttribute("name"),i=e.getAttribute("value");t[n]="boolean"==typeof et[n]?"false"!==i:"object"==typeof et[n]?JSON.parse(i):i})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach((e=>{const n=e.getAttribute("name"),i=e.getAttribute("value");t[n]=new Function(`return ${i}`)()})),t})(n),(e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach((e=>{$t(e,["type","color","aria-label"]);const n=e.getAttribute("type");t[`${n}ButtonText`]=e.innerHTML,t[`show${o(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label"))})),t})(n),(e=>{const t={},n=e.querySelector("swal-image");return n&&($t(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt"))),t})(n),(e=>{const t={},n=e.querySelector("swal-icon");return n&&($t(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t})(n),(e=>{const t={},n=e.querySelector("swal-input");n&&($t(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const i=Array.from(e.querySelectorAll("swal-input-option"));return i.length&&(t.inputOptions={},i.forEach((e=>{$t(e,["value"]);const n=e.getAttribute("value"),i=e.innerHTML;t.inputOptions[n]=i}))),t})(n),((e,t)=>{const n={};for(const i in t){const s=t[i],o=e.querySelector(s);o&&($t(o,[]),n[s.replace(/^swal-/,"")]=o.innerHTML.trim())}return n})(n,Nt))})(e),i=Object.assign({},et,t,n,e);return i.showClass=Object.assign({},et.showClass,i.showClass),i.hideClass=Object.assign({},et.hideClass,i.hideClass),i},zt=t=>{const n={popup:m(),container:p(),actions:k(),confirmButton:C(),denyButton:E(),cancelButton:T(),loader:A(),closeButton:L(),validationMessage:x(),progressSteps:_()};return e.domCache.set(t,n),n},Xt=(e,t,n)=>{const i=O();z(i),t.timer&&(e.timeout=new Pt((()=>{n("timer"),delete e.timeout}),t.timer),t.timerProgressBar&&(U(i),M(i,t,"timerProgressBar"),setTimeout((()=>{e.timeout&&e.timeout.running&&J(t.timer)}))))},Qt=(e,t)=>{t.toast||(c(t.allowEnterKey)?Kt(e,t)||Oe(-1,1):Yt())},Kt=(e,t)=>t.focusDeny&&K(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&K(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!K(e.confirmButton)||(e.confirmButton.focus(),0)),Yt=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout((()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout((()=>{e.play().catch((()=>{}))}),2500)}),500):localStorage.setItem("swal-initiation",`${e}`)}Object.assign(Vt.prototype,ht),Object.assign(Vt,jt),Object.keys(ht).forEach((e=>{Vt[e]=function(){if(Ft)return Ft[e](...arguments)}})),Vt.DismissReason=ke,Vt.version="11.7.2";const Gt=Vt;return Gt.default=Gt,Gt})),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),function(e){var t;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var n=window.Cookies,i=window.Cookies=e();i.noConflict=function(){return window.Cookies=n,i}}}((function(){function e(){for(var e=0,t={};e{i=null,n||e.apply(o,s)}),t),r&&e.apply(o,s)}}function n(e,t){return JSON.stringify(e)===JSON.stringify(t)}class i{constructor(t){this.id="",this.style="",this.class=[],this.isMultiple=!1,this.isOpen=!1,this.isFullOpen=!1,this.intervalMove=null,t||(t={}),this.id="ss-"+e(),this.style=t.style||"",this.class=t.class||[],this.disabled=void 0!==t.disabled&&t.disabled,this.alwaysOpen=void 0!==t.alwaysOpen&&t.alwaysOpen,this.showSearch=void 0===t.showSearch||t.showSearch,this.searchPlaceholder=t.searchPlaceholder||"Search",this.searchText=t.searchText||"No Results",this.searchingText=t.searchingText||"Searching...",this.searchHighlight=void 0!==t.searchHighlight&&t.searchHighlight,this.closeOnSelect=void 0===t.closeOnSelect||t.closeOnSelect,this.contentLocation=t.contentLocation||document.body,this.contentPosition=t.contentPosition||"absolute",this.openPosition=t.openPosition||"auto",this.placeholderText=void 0!==t.placeholderText?t.placeholderText:"Select Value",this.allowDeselect=void 0!==t.allowDeselect&&t.allowDeselect,this.hideSelected=void 0!==t.hideSelected&&t.hideSelected,this.showOptionTooltips=void 0!==t.showOptionTooltips&&t.showOptionTooltips,this.minSelected=t.minSelected||0,this.maxSelected=t.maxSelected||1e3,this.timeoutDelay=t.timeoutDelay||200,this.maxValuesShown=t.maxValuesShown||20,this.maxValuesMessage=t.maxValuesMessage||"{number} selected"}}class s{constructor(t){if(this.id=t.id&&""!==t.id?t.id:e(),this.label=t.label||"",this.selectAll=void 0!==t.selectAll&&t.selectAll,this.closable=t.closable||"off",this.options=[],t.options)for(const e of t.options)this.options.push(new o(e))}}class o{constructor(t){this.id=t.id&&""!==t.id?t.id:e(),this.value=void 0===t.value?t.text:t.value,this.text=t.text||"",this.html=t.html||"",this.selected=void 0!==t.selected&&t.selected,this.display=void 0===t.display||t.display,this.disabled=void 0!==t.disabled&&t.disabled,this.mandatory=void 0!==t.mandatory&&t.mandatory,this.placeholder=void 0!==t.placeholder&&t.placeholder,this.class=t.class||"",this.style=t.style||"",this.data=t.data||{}}}class r{constructor(e,t){this.selectType="single",this.data=[],this.selectType=e,this.setData(t)}validateDataArray(e){if(!Array.isArray(e))return new Error("Data must be an array");for(let t of e){if(!(t instanceof s||"label"in t))return t instanceof o||"text"in t?this.validateOption(t):new Error("Data object must be a valid optgroup or option");if(!("label"in t))return new Error("Optgroup must have a label");if("options"in t&&t.options)for(let e of t.options)return this.validateOption(e)}return null}validateOption(e){return"text"in e?null:new Error("Option must have a text")}partialToFullData(e){let t=[];return e.forEach((e=>{if(e instanceof s||"label"in e){let n=[];"options"in e&&e.options&&e.options.forEach((e=>{n.push(new o(e))})),n.length>0&&t.push(new s(e))}(e instanceof o||"text"in e)&&t.push(new o(e))})),t}setData(e){this.data=this.partialToFullData(e),"single"===this.selectType&&this.setSelectedBy("value",this.getSelected())}getData(){return this.filter(null,!0)}getDataOptions(){return this.filter(null,!1)}addOption(e){this.setData(this.getData().concat(new o(e)))}setSelectedBy(e,t){let n=null,i=!1;for(let r of this.data){if(r instanceof s)for(let s of r.options)n||(n=s),s.selected=!i&&t.includes(s[e]),s.selected&&"single"===this.selectType&&(i=!0);r instanceof o&&(n||(n=r),r.selected=!i&&t.includes(r[e]),r.selected&&"single"===this.selectType&&(i=!0))}"single"===this.selectType&&n&&!i&&(n.selected=!0)}getSelected(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.value)})),t}getSelectedOptions(){return this.filter((e=>e.selected),!1)}getSelectedIDs(){let e=this.getSelectedOptions(),t=[];return e.forEach((e=>{t.push(e.id)})),t}getOptgroupByID(e){for(let t of this.data)if(t instanceof s&&t.id===e)return t;return null}getOptionByID(e){let t=this.filter((t=>t.id===e),!1);return t.length?t[0]:null}search(e,t){return""===(e=e.trim())?this.getData():this.filter((n=>t(n,e)),!0)}filter(e,t){const n=[];return this.data.forEach((i=>{if(i instanceof s){let r=[];if(i.options.forEach((i=>{e&&!e(i)||(t?r.push(new o(i)):n.push(new o(i)))})),r.length>0){let e=new s(i);e.options=r,n.push(e)}}i instanceof o&&(e&&!e(i)||n.push(new o(i)))})),n}}class a{constructor(e,t,n){this.classes={main:"ss-main",placeholder:"ss-placeholder",values:"ss-values",single:"ss-single",max:"ss-max",value:"ss-value",valueText:"ss-value-text",valueDelete:"ss-value-delete",valueOut:"ss-value-out",deselect:"ss-deselect",deselectPath:"M10,10 L90,90 M10,90 L90,10",arrow:"ss-arrow",arrowClose:"M10,30 L50,70 L90,30",arrowOpen:"M10,70 L50,30 L90,70",content:"ss-content",openAbove:"ss-open-above",openBelow:"ss-open-below",search:"ss-search",searchHighlighter:"ss-search-highlight",searching:"ss-searching",addable:"ss-addable",addablePath:"M50,10 L50,90 M10,50 L90,50",list:"ss-list",optgroup:"ss-optgroup",optgroupLabel:"ss-optgroup-label",optgroupLabelText:"ss-optgroup-label-text",optgroupActions:"ss-optgroup-actions",optgroupSelectAll:"ss-selectall",optgroupSelectAllBox:"M60,10 L10,10 L10,90 L90,90 L90,50",optgroupSelectAllCheck:"M30,45 L50,70 L90,10",optgroupClosable:"ss-closable",option:"ss-option",optionDelete:"M10,10 L90,90 M10,90 L90,10",highlighted:"ss-highlighted",open:"ss-open",close:"ss-close",selected:"ss-selected",error:"ss-error",disabled:"ss-disabled",hide:"ss-hide"},this.store=t,this.settings=e,this.callbacks=n,this.main=this.mainDiv(),this.content=this.contentDiv(),this.updateClassStyles(),this.updateAriaAttributes(),this.settings.contentLocation.appendChild(this.content.main)}enable(){this.main.main.classList.remove(this.classes.disabled),this.content.search.input.disabled=!1}disable(){this.main.main.classList.add(this.classes.disabled),this.content.search.input.disabled=!0}open(){this.main.arrow.path.setAttribute("d",this.classes.arrowOpen),this.main.main.classList.add("up"===this.settings.openPosition?this.classes.openAbove:this.classes.openBelow),this.main.main.setAttribute("aria-expanded","true"),this.moveContent();const e=this.store.getSelectedOptions();if(e.length){const t=e[e.length-1].id,n=this.content.list.querySelector('[data-id="'+t+'"]');n&&this.ensureElementInView(this.content.list,n)}}close(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.remove(this.classes.openBelow),this.main.main.setAttribute("aria-expanded","false"),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.main.arrow.path.setAttribute("d",this.classes.arrowClose)}updateClassStyles(){if(this.main.main.className="",this.main.main.removeAttribute("style"),this.content.main.className="",this.content.main.removeAttribute("style"),this.main.main.classList.add(this.classes.main),this.content.main.classList.add(this.classes.content),""!==this.settings.style&&(this.content.main.style.cssText=this.settings.style),this.settings.class.length)for(const e of this.settings.class)""!==e.trim()&&(this.main.main.classList.add(e.trim()),this.content.main.classList.add(e.trim()));"relative"===this.settings.contentPosition&&this.content.main.classList.add("ss-"+this.settings.contentPosition)}updateAriaAttributes(){this.main.main.role="combobox",this.main.main.setAttribute("aria-haspopup","listbox"),this.main.main.setAttribute("aria-controls",this.content.main.id),this.main.main.setAttribute("aria-expanded","false"),this.content.main.setAttribute("role","listbox")}mainDiv(){const e=document.createElement("div");e.dataset.id=this.settings.id,e.id=this.settings.id,e.tabIndex=0,e.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return this.callbacks.open(),"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Enter":case" ":this.callbacks.open();const t=this.content.list.querySelector("."+this.classes.highlighted);return t&&t.click(),!1;case"Escape":return this.callbacks.close(),!1}},e.onclick=e=>{this.settings.disabled||(this.settings.isOpen?this.callbacks.close():this.callbacks.open())};const t=document.createElement("div");t.classList.add(this.classes.values),e.appendChild(t);const n=document.createElement("div");n.classList.add(this.classes.deselect),this.settings.allowDeselect&&!this.settings.isMultiple||n.classList.add(this.classes.hide),n.onclick=e=>{if(e.stopPropagation(),this.settings.disabled)return;let t=!0;const n=this.store.getSelectedOptions(),i=[];this.callbacks.beforeChange&&(t=!0===this.callbacks.beforeChange(i,n)),t&&(this.callbacks.setSelected([""],!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(i))};const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.setAttribute("viewBox","0 0 100 100");const s=document.createElementNS("http://www.w3.org/2000/svg","path");s.setAttribute("d",this.classes.deselectPath),i.appendChild(s),n.appendChild(i),e.appendChild(n);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.classList.add(this.classes.arrow),o.setAttribute("viewBox","0 0 100 100");const r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",this.classes.arrowClose),this.settings.alwaysOpen&&o.classList.add(this.classes.hide),o.appendChild(r),e.appendChild(o),{main:e,values:t,deselect:{main:n,svg:i,path:s},arrow:{main:o,path:r}}}mainFocus(e){"click"!==e&&this.main.main.focus({preventScroll:!0})}placeholder(){const e=this.store.filter((e=>e.placeholder),!1);let t=this.settings.placeholderText;e.length&&(""!==e[0].html?t=e[0].html:""!==e[0].text&&(t=e[0].text));const n=document.createElement("div");return n.classList.add(this.classes.placeholder),n.innerHTML=t,n}renderValues(){this.settings.isMultiple?this.renderMultipleValues():this.renderSingleValue()}renderSingleValue(){const e=this.store.filter((e=>e.selected&&!e.placeholder),!1),t=e.length>0?e[0]:null;if(t){const e=document.createElement("div");e.classList.add(this.classes.single),e.innerHTML=t.html?t.html:t.text,this.main.values.innerHTML=e.outerHTML}else this.main.values.innerHTML=this.placeholder().outerHTML;this.settings.allowDeselect&&e.length?this.main.deselect.main.classList.remove(this.classes.hide):this.main.deselect.main.classList.add(this.classes.hide)}renderMultipleValues(){let e=this.main.values.childNodes,t=this.store.filter((e=>e.selected&&e.display),!1);if(0===t.length)return void(this.main.values.innerHTML=this.placeholder().outerHTML);{const e=this.main.values.querySelector("."+this.classes.placeholder);e&&e.remove()}if(t.length>this.settings.maxValuesShown){const e=document.createElement("div");return e.classList.add(this.classes.max),e.textContent=this.settings.maxValuesMessage.replace("{number}",t.length.toString()),void(this.main.values.innerHTML=e.outerHTML)}{const e=this.main.values.querySelector("."+this.classes.max);e&&e.remove()}let n=[];for(let i=0;ie.id===o),!1).length||n.push(s))}for(const e of n)e.classList.add(this.classes.valueOut),setTimeout((()=>{this.main.values.removeChild(e)}),100);e=this.main.values.childNodes;for(let n=0;n{if(t.preventDefault(),t.stopPropagation(),this.settings.disabled)return;let n=!0;const i=this.store.getSelectedOptions(),r=i.filter((t=>t.selected&&t.id!==e.id),!0);if(!(this.settings.minSelected&&r.length{this.callbacks.search(e.target.value)}),100),n.onkeydown=e=>{switch(e.key){case"ArrowUp":case"ArrowDown":return"ArrowDown"===e.key?this.highlight("down"):this.highlight("up"),!1;case"Tab":return this.callbacks.close(),!0;case"Escape":return this.callbacks.close(),!1;case"Enter":case" ":if(this.callbacks.addable&&e.ctrlKey)return i.click(),!1;{const e=this.content.list.querySelector("."+this.classes.highlighted);if(e)return e.click(),!1}return!0}},e.appendChild(n),this.callbacks.addable){i.classList.add(this.classes.addable);const t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 100 100");const n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",this.classes.addablePath),t.appendChild(n),i.appendChild(t),i.onclick=e=>{if(e.preventDefault(),e.stopPropagation(),!this.callbacks.addable)return;const t=this.content.search.input.value.trim();if(""===t)return void this.content.search.input.focus();const n=e=>{let t=new o(e);if(this.callbacks.addOption(t),this.settings.isMultiple){let e=this.store.getSelected();e.push(t.value),this.callbacks.setSelected(e,!0)}else this.callbacks.setSelected([t.value],!0);this.callbacks.search(""),this.settings.closeOnSelect&&setTimeout((()=>{this.callbacks.close()}),100)},i=this.callbacks.addable(t);i instanceof Promise?i.then((e=>{n("string"==typeof e?{text:e,value:e}:e)})):n("string"==typeof i?{text:i,value:i}:i)},e.appendChild(i),s.addable={main:i,svg:t,path:n}}return s}searchFocus(){this.content.search.input.focus()}getOptions(e=!1,t=!1,n=!1){let i="."+this.classes.option;return e&&(i+=":not(."+this.classes.placeholder+")"),t&&(i+=":not(."+this.classes.disabled+")"),n&&(i+=":not(."+this.classes.hide+")"),Array.from(this.content.list.querySelectorAll(i))}highlight(e){const t=this.getOptions(!0,!0,!0);if(0!==t.length)if(1!==t.length||t[0].classList.contains(this.classes.highlighted)){for(let n=0;n=0?n-1:t.length-1];o.classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,o);const r=o.parentElement;if(r&&r.classList.contains(this.classes.close)){const e=r.querySelector("."+this.classes.optgroupLabel);e&&e.click()}return}t["down"===e?0:t.length-1].classList.add(this.classes.highlighted),this.ensureElementInView(this.content.list,t["down"===e?0:t.length-1])}else t[0].classList.add(this.classes.highlighted)}listDiv(){const e=document.createElement("div");return e.classList.add(this.classes.list),e}renderError(e){this.content.list.innerHTML="";const t=document.createElement("div");t.classList.add(this.classes.error),t.textContent=e,this.content.list.appendChild(t)}renderSearching(){this.content.list.innerHTML="";const e=document.createElement("div");e.classList.add(this.classes.searching),e.textContent=this.settings.searchingText,this.content.list.appendChild(e)}renderOptions(e){if(this.content.list.innerHTML="",0===e.length){const e=document.createElement("div");return e.classList.add(this.classes.search),e.innerHTML=this.settings.searchText,void this.content.list.appendChild(e)}for(const t of e){if(t instanceof s){const e=document.createElement("div");e.classList.add(this.classes.optgroup);const n=document.createElement("div");n.classList.add(this.classes.optgroupLabel),e.appendChild(n);const i=document.createElement("div");i.classList.add(this.classes.optgroupLabelText),i.textContent=t.label,n.appendChild(i);const s=document.createElement("div");if(s.classList.add(this.classes.optgroupActions),n.appendChild(s),this.settings.isMultiple&&t.selectAll){const e=document.createElement("div");e.classList.add(this.classes.optgroupSelectAll);let n=!0;for(const e of t.options)if(!e.selected){n=!1;break}n&&e.classList.add(this.classes.selected);const i=document.createElement("span");i.textContent="Select All",e.appendChild(i);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100"),e.appendChild(o);const r=document.createElementNS("http://www.w3.org/2000/svg","path");r.setAttribute("d",this.classes.optgroupSelectAllBox),o.appendChild(r);const a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("d",this.classes.optgroupSelectAllCheck),o.appendChild(a),e.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const i=this.store.getSelected();if(n){const e=i.filter((e=>{for(const n of t.options)if(e===n.value)return!1;return!0}));this.callbacks.setSelected(e,!0)}else{const e=i.concat(t.options.map((e=>e.value)));this.callbacks.setSelected(e,!0)}})),s.appendChild(e)}if("off"!==t.closable){const i=document.createElement("div");i.classList.add(this.classes.optgroupClosable);const o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("viewBox","0 0 100 100"),o.classList.add(this.classes.arrow),i.appendChild(o);const r=document.createElementNS("http://www.w3.org/2000/svg","path");o.appendChild(r),t.options.some((e=>e.selected))||""!==this.content.search.input.value.trim()?(i.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):"open"===t.closable?(e.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):"close"===t.closable&&(e.classList.add(this.classes.close),r.setAttribute("d",this.classes.arrowClose)),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),e.classList.contains(this.classes.close)?(e.classList.remove(this.classes.close),e.classList.add(this.classes.open),r.setAttribute("d",this.classes.arrowOpen)):(e.classList.remove(this.classes.open),e.classList.add(this.classes.close),r.setAttribute("d",this.classes.arrowClose))})),s.appendChild(i)}e.appendChild(n);for(const n of t.options)e.appendChild(this.option(n));this.content.list.appendChild(e)}t instanceof o&&this.content.list.appendChild(this.option(t))}}option(e){if(e.placeholder){const e=document.createElement("div");return e.classList.add(this.classes.option),e.classList.add(this.classes.hide),e}const t=document.createElement("div");return t.dataset.id=e.id,t.id=e.id,t.classList.add(this.classes.option),t.setAttribute("role","option"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.style&&(t.style.cssText=e.style),this.settings.searchHighlight&&""!==this.content.search.input.value.trim()?t.innerHTML=this.highlightText(""!==e.html?e.html:e.text,this.content.search.input.value,this.classes.searchHighlighter):""!==e.html?t.innerHTML=e.html:t.textContent=e.text,this.settings.showOptionTooltips&&t.textContent&&t.setAttribute("title",t.textContent),e.display||t.classList.add(this.classes.hide),e.disabled&&t.classList.add(this.classes.disabled),e.selected&&this.settings.hideSelected&&t.classList.add(this.classes.hide),e.selected?(t.classList.add(this.classes.selected),t.setAttribute("aria-selected","true"),this.main.main.setAttribute("aria-activedescendant",t.id)):(t.classList.remove(this.classes.selected),t.setAttribute("aria-selected","false")),t.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation();const n=this.store.getSelected(),i=t.currentTarget,s=String(i.dataset.id);if(e.disabled||e.selected&&!this.settings.allowDeselect)return;if(this.settings.isMultiple&&this.settings.maxSelected<=n.length&&!e.selected||this.settings.isMultiple&&this.settings.minSelected>=n.length&&e.selected)return;let o=!1;const r=this.store.getSelectedOptions();let a=[];this.settings.isMultiple&&(a=e.selected?r.filter((e=>e.id!==s)):r.concat(e)),this.settings.isMultiple||(a=e.selected?[]:[e]),this.callbacks.beforeChange||(o=!0),this.callbacks.beforeChange&&(o=!1!==this.callbacks.beforeChange(a,r)),o&&(this.store.getOptionByID(s)||this.callbacks.addOption(e),this.callbacks.setSelected(a.map((e=>e.value)),!1),this.settings.closeOnSelect&&this.callbacks.close(),this.callbacks.afterChange&&this.callbacks.afterChange(a))})),t}destroy(){this.main.main.remove(),this.content.main.remove()}highlightText(e,t,n){let i=e;const s=new RegExp("("+t.trim()+")(?![^<]*>[^<>]*${a}`),i}moveContentAbove(){const e=this.main.main.offsetHeight,t=this.content.main.offsetHeight;this.main.main.classList.remove(this.classes.openBelow),this.main.main.classList.add(this.classes.openAbove),this.content.main.classList.remove(this.classes.openBelow),this.content.main.classList.add(this.classes.openAbove);const n=this.main.main.getBoundingClientRect();this.content.main.style.margin="-"+(e+t-1)+"px 0px 0px 0px",this.content.main.style.top=n.top+n.height+window.scrollY+"px",this.content.main.style.left=n.left+window.scrollX+"px",this.content.main.style.width=n.width+"px"}moveContentBelow(){this.main.main.classList.remove(this.classes.openAbove),this.main.main.classList.add(this.classes.openBelow),this.content.main.classList.remove(this.classes.openAbove),this.content.main.classList.add(this.classes.openBelow);const e=this.main.main.getBoundingClientRect();this.content.main.style.margin="-1px 0px 0px 0px","relative"!==this.settings.contentPosition&&(this.content.main.style.top=e.top+e.height+window.scrollY+"px",this.content.main.style.left=e.left+window.scrollX+"px",this.content.main.style.width=e.width+"px")}ensureElementInView(e,t){const n=e.scrollTop+e.offsetTop,i=n+e.clientHeight,s=t.offsetTop,o=s+t.clientHeight;si&&(e.scrollTop+=o-i)}putContent(){const e=this.main.main.offsetHeight,t=this.main.main.getBoundingClientRect(),n=this.content.main.offsetHeight;return window.innerHeight-(t.top+e)<=n&&t.top>n?"up":"down"}}class l{constructor(e){this.listen=!1,this.observer=null,this.select=e,this.select.addEventListener("change",this.valueChange.bind(this),{passive:!0}),this.observer=new MutationObserver(this.observeCall.bind(this)),this.changeListen(!0)}enable(){this.select.disabled=!1}disable(){this.select.disabled=!0}hideUI(){this.select.tabIndex=-1,this.select.style.display="none",this.select.setAttribute("aria-hidden","true")}showUI(){this.select.removeAttribute("tabindex"),this.select.style.display="",this.select.removeAttribute("aria-hidden")}changeListen(e){this.listen=e,e&&this.observer&&this.observer.observe(this.select,{subtree:!0,childList:!0,attributes:!0}),e||this.observer&&this.observer.disconnect()}valueChange(e){return this.listen&&this.onValueChange&&this.onValueChange(this.getSelectedValues()),!0}observeCall(e){if(!this.listen)return;let t=!1,n=!1,i=!1;for(const s of e)s.target===this.select&&("disabled"===s.attributeName&&(n=!0),"class"===s.attributeName&&(t=!0)),"OPTGROUP"!==s.target.nodeName&&"OPTION"!==s.target.nodeName||(i=!0);t&&this.onClassChange&&this.onClassChange(this.select.className.split(" ")),n&&this.onDisabledChange&&(this.changeListen(!1),this.onDisabledChange(this.select.disabled),this.changeListen(!0)),i&&this.onOptionsChange&&(this.changeListen(!1),this.onOptionsChange(this.getData()),this.changeListen(!0))}getData(){let e=[];const t=this.select.childNodes;for(const n of t)"OPTGROUP"===n.nodeName&&e.push(this.getDataFromOptgroup(n)),"OPTION"===n.nodeName&&e.push(this.getDataFromOption(n));return e}getDataFromOptgroup(e){let t={id:e.id,label:e.label,selectAll:!!e.dataset&&"true"===e.dataset.selectall,closable:e.dataset?e.dataset.closable:"off",options:[]};const n=e.childNodes;for(const e of n)"OPTION"===e.nodeName&&t.options.push(this.getDataFromOption(e));return t}getDataFromOption(e){return{id:e.id,value:e.value,text:e.text,html:e.dataset&&e.dataset.html?e.dataset.html:"",selected:e.selected,display:"none"!==e.style.display,disabled:e.disabled,mandatory:!!e.dataset&&"true"===e.dataset.mandatory,placeholder:"true"===e.dataset.placeholder,class:e.className,style:e.style.cssText,data:e.dataset}}getSelectedValues(){let e=[];const t=this.select.childNodes;for(const n of t){if("OPTGROUP"===n.nodeName){const t=n.childNodes;for(const n of t)if("OPTION"===n.nodeName){const t=n;t.selected&&e.push(t.value)}}if("OPTION"===n.nodeName){const t=n;t.selected&&e.push(t.value)}}return e}setSelected(e){this.changeListen(!1);const t=this.select.childNodes;for(const n of t){if("OPTGROUP"===n.nodeName){const t=n.childNodes;for(const n of t)if("OPTION"===n.nodeName){const t=n;t.selected=e.includes(t.value)}}if("OPTION"===n.nodeName){const t=n;t.selected=e.includes(t.value)}}this.changeListen(!0)}updateSelect(e,t,n){this.changeListen(!1),e&&(this.select.dataset.id=e),t&&(this.select.style.cssText=t),n&&(this.select.className="",n.forEach((e=>{""!==e.trim()&&this.select.classList.add(e.trim())}))),this.changeListen(!0)}updateOptions(e){this.changeListen(!1),this.select.innerHTML="";for(const t of e)t instanceof s&&this.select.appendChild(this.createOptgroup(t)),t instanceof o&&this.select.appendChild(this.createOption(t));this.select.dispatchEvent(new Event("change")),this.changeListen(!0)}createOptgroup(e){const t=document.createElement("optgroup");if(t.id=e.id,t.label=e.label,e.selectAll&&(t.dataset.selectAll="true"),"off"!==e.closable&&(t.dataset.closable=e.closable),e.options)for(const n of e.options)t.appendChild(this.createOption(n));return t}createOption(e){const t=document.createElement("option");return t.id=e.id,t.value=e.value,t.innerHTML=e.text,""!==e.html&&t.setAttribute("data-html",e.html),e.selected&&(t.selected=e.selected),e.disabled&&(t.disabled=!0),!1===e.display&&(t.style.display="none"),e.placeholder&&t.setAttribute("data-placeholder","true"),e.mandatory&&t.setAttribute("data-mandatory","true"),e.class&&e.class.split(" ").forEach((e=>{t.classList.add(e)})),e.data&&"object"==typeof e.data&&Object.keys(e.data).forEach((n=>{t.setAttribute("data-"+function(e){const t=e.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,(e=>"-"+e.toLowerCase()));return e[0]===e[0].toUpperCase()?t.substring(1):t}(n),e.data[n])})),t}destroy(){this.changeListen(!1),this.select.removeEventListener("change",this.valueChange.bind(this)),this.observer&&(this.observer.disconnect(),this.observer=null),delete this.select.dataset.id,this.showUI()}}return class{constructor(e){var n;if(this.events={search:void 0,searchFilter:(e,t)=>-1!==e.text.toLowerCase().indexOf(t.toLowerCase()),addable:void 0,beforeChange:void 0,afterChange:void 0,beforeOpen:void 0,afterOpen:void 0,beforeClose:void 0,afterClose:void 0},this.windowResize=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.windowScroll=t((()=>{(this.settings.isOpen||this.settings.isFullOpen)&&this.render.moveContent()})),this.documentClick=e=>{this.settings.isOpen&&e.target&&!function(e,t){function n(e,n){return n&&e&&e.classList&&e.classList.contains(n)||n&&e&&e.dataset&&e.dataset.id&&e.dataset.id===t?e:null}return n(e,t)||function e(t,i){return t&&t!==document?n(t,i)?t:e(t.parentNode,i):null}(e,t)}(e.target,this.settings.id)&&this.close(e.type)},this.windowVisibilityChange=()=>{document.hidden&&this.close()},this.selectEl="string"==typeof e.select?document.querySelector(e.select):e.select,!this.selectEl)return void(e.events&&e.events.error&&e.events.error(new Error("Could not find select element")));if("SELECT"!==this.selectEl.tagName)return void(e.events&&e.events.error&&e.events.error(new Error("Element isnt of type select")));this.selectEl.dataset.ssid&&this.destroy(),this.settings=new i(e.settings);const s=["afterChange","beforeOpen","afterOpen","beforeClose","afterClose"];for(const n in e.events)e.events.hasOwnProperty(n)&&(-1!==s.indexOf(n)?this.events[n]=t(e.events[n],100):this.events[n]=e.events[n]);this.settings.disabled=(null===(n=e.settings)||void 0===n?void 0:n.disabled)?e.settings.disabled:this.selectEl.disabled,this.settings.isMultiple=this.selectEl.multiple,this.settings.style=this.selectEl.style.cssText,this.settings.class=this.selectEl.className.split(" "),this.select=new l(this.selectEl),this.select.updateSelect(this.settings.id,this.settings.style,this.settings.class),this.select.hideUI(),this.select.onValueChange=e=>{this.setSelected(e)},this.select.onClassChange=e=>{this.settings.class=e,this.render.updateClassStyles()},this.select.onDisabledChange=e=>{e?this.disable():this.enable()},this.select.onOptionsChange=e=>{this.setData(e)},this.store=new r(this.settings.isMultiple?"multiple":"single",e.data?e.data:this.select.getData()),e.data&&this.select.updateOptions(this.store.getData());const o={open:this.open.bind(this),close:this.close.bind(this),addable:this.events.addable?this.events.addable:void 0,setSelected:this.setSelected.bind(this),addOption:this.addOption.bind(this),search:this.search.bind(this),beforeChange:this.events.beforeChange,afterChange:this.events.afterChange};this.render=new a(this.settings,this.store,o),this.render.renderValues(),this.render.renderOptions(this.store.getData());const c=this.selectEl.getAttribute("aria-label"),u=this.selectEl.getAttribute("aria-labelledby");c?this.render.main.main.setAttribute("aria-label",c):u&&this.render.main.main.setAttribute("aria-labelledby",u),this.selectEl.parentNode&&this.selectEl.parentNode.insertBefore(this.render.main.main,this.selectEl.nextSibling),document.addEventListener("click",this.documentClick),window.addEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.addEventListener("scroll",this.windowScroll,!1),document.addEventListener("visibilitychange",this.windowVisibilityChange),this.settings.disabled&&this.disable(),this.settings.alwaysOpen&&this.open(),this.selectEl.slim=this}enable(){this.settings.disabled=!1,this.select.enable(),this.render.enable()}disable(){this.settings.disabled=!0,this.select.disable(),this.render.disable()}getData(){return this.store.getData()}setData(e){const t=this.store.getSelected(),i=this.store.validateDataArray(e);if(i)return void(this.events.error&&this.events.error(i));this.store.setData(e);const s=this.store.getData();this.select.updateOptions(s),this.render.renderValues(),this.render.renderOptions(s),this.events.afterChange&&!n(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}getSelected(){return this.store.getSelected()}setSelected(e,t=!0){const i=this.store.getSelected();this.store.setSelectedBy("value",Array.isArray(e)?e:[e]);const s=this.store.getData();this.select.updateOptions(s),this.render.renderValues(),""!==this.render.content.search.input.value?this.search(this.render.content.search.input.value):this.render.renderOptions(s),t&&this.events.afterChange&&!n(i,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}addOption(e){const t=this.store.getSelected();this.store.getDataOptions().some((t=>{var n;return t.value===(null!==(n=e.value)&&void 0!==n?n:e.text)}))||this.store.addOption(e);const i=this.store.getData();this.select.updateOptions(i),this.render.renderValues(),this.render.renderOptions(i),this.events.afterChange&&!n(t,this.store.getSelected())&&this.events.afterChange(this.store.getSelectedOptions())}open(){this.settings.disabled||this.settings.isOpen||(this.events.beforeOpen&&this.events.beforeOpen(),this.render.open(),this.settings.showSearch&&this.render.searchFocus(),this.settings.isOpen=!0,setTimeout((()=>{this.events.afterOpen&&this.events.afterOpen(),this.settings.isOpen&&(this.settings.isFullOpen=!0)}),this.settings.timeoutDelay),"absolute"===this.settings.contentPosition&&(this.settings.intervalMove&&clearInterval(this.settings.intervalMove),this.settings.intervalMove=setInterval(this.render.moveContent.bind(this.render),500)))}close(e=null){this.settings.isOpen&&!this.settings.alwaysOpen&&(this.events.beforeClose&&this.events.beforeClose(),this.render.close(),""!==this.render.content.search.input.value&&this.search(""),this.render.mainFocus(e),this.settings.isOpen=!1,this.settings.isFullOpen=!1,setTimeout((()=>{this.events.afterClose&&this.events.afterClose()}),this.settings.timeoutDelay),this.settings.intervalMove&&clearInterval(this.settings.intervalMove))}search(e){if(this.render.content.search.input.value!==e&&(this.render.content.search.input.value=e),!this.events.search)return void this.render.renderOptions(""===e?this.store.getData():this.store.search(e,this.events.searchFilter));this.render.renderSearching();const t=this.events.search(e,this.store.getSelectedOptions());t instanceof Promise?t.then((e=>{this.render.renderOptions(this.store.partialToFullData(e))})).catch((e=>{this.render.renderError("string"==typeof e?e:e.message)})):Array.isArray(t)?this.render.renderOptions(this.store.partialToFullData(t)):this.render.renderError("Search event must return a promise or an array of data")}destroy(){document.removeEventListener("click",this.documentClick),window.removeEventListener("resize",this.windowResize,!1),"auto"===this.settings.openPosition&&window.removeEventListener("scroll",this.windowScroll,!1),document.removeEventListener("visibilitychange",this.windowVisibilityChange),this.store.setData([]),this.render.destroy(),this.select.destroy()}}})),function(e){e.waterfall=function(){var t=[],n=e.Deferred(),i=0;return e.each(arguments,(function(s,o){t.push((function(){var s,r=[].slice.apply(arguments);"function"==typeof o?(s=o.apply(null,r))&&s.promise||(s=e.Deferred()[!1===s?"reject":"resolve"](s)):s=o&&o.promise?o:e.Deferred()[!1===o?"reject":"resolve"](o),s.fail((function(){n.reject.apply(n,[].slice.apply(arguments))})).done((function(e){i++,r.push(e),i==t.length?n.resolve.apply(n,r):t[i].apply(null,r)}))}))})),t.length?t[0]():n.resolve(),n}}(jQuery),void 0===window.jQuery)throw new Error("TastyIgniter Javascript requires jQuery.");if(void 0!==window.jQuery.request)throw new Error("The TastyIgniter Javascript framework is already loaded.");!function(e){"use strict";e(document).ready((function(){e(document).trigger("render")})),e(window).on("ajaxUpdateComplete",(function(){e(document).trigger("render")})),e.fn.render=function(t){e(document).on("render",t)}}(window.jQuery),function($){"use strict";var Request=function(element,handler,options){var $el=this.$el=$(element);this.options=options||{};var $form=options.form?$(options.form):$el.closest("form"),$triggerEl=$form.length?$form:$el,context={handler:handler,options:options},loading=void 0!==options.loading&&options.loading.length?$(options.loading):null,isRedirect=void 0!==options.redirect&&options.redirect.length,_event=jQuery.Event("ajaxSetup");if($triggerEl.trigger(_event,context),!_event.isDefaultPrevented()){"string"==$.type(loading)&&(loading=$(loading));var requestData,inputName,submitForm=!!options.submit,data={};$.each($el.parents("[data-request-data]").toArray().reverse(),(function(){$.extend(data,stringToObj("data-request-data",$(this).data("request-data")))})),$el.is(":input")&&!$form.length&&(inputName=$el.attr("name"),void 0!==inputName&&void 0===options.data[inputName]&&(options.data[inputName]=$el.val())),void 0===options.data||$.isEmptyObject(options.data)||$.extend(data,options.data),submitForm?(data._handler=handler,$form.append(appendObjToForm(data,$form))):requestData=[$form.serialize(),$.param(data)].filter(Boolean).join("&");var requestOptions={context:context,headers:{"X-IGNITER-REQUEST-HANDLER":handler},success:function(data,textStatus,jqXHR){if(!1!==this.options.beforeUpdate.apply(this,[data,textStatus,jqXHR])&&(!options.fireBeforeUpdate||!1!==eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireBeforeUpdate+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))"))){var _event=jQuery.Event("ajaxBeforeUpdate");if($triggerEl.trigger(_event,[context,data,textStatus,jqXHR]),!_event.isDefaultPrevented()){var updatePromise=requestOptions.handleUpdateResponse(data,textStatus,jqXHR);return updatePromise.done((function(){$triggerEl.trigger("ajaxSuccess",[context,data,textStatus,jqXHR]),options.fireSuccess&&eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireSuccess+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))")})),updatePromise}}},error:function(jqXHR,textStatus,errorThrown){var errorMsg,updatePromise=$.Deferred();if("abort"!=errorThrown)return isRedirect=!1,options.redirect=null,406==jqXHR.status&&jqXHR.responseJSON?(errorMsg=jqXHR.responseJSON.X_IGNITER_ERROR_MESSAGE,updatePromise=requestOptions.handleUpdateResponse(jqXHR.responseJSON,textStatus,jqXHR)):(errorMsg=jqXHR.responseText?jqXHR.responseText:jqXHR.statusText,updatePromise.resolve()),updatePromise.done((function(){var _event=jQuery.Event("ajaxError");$triggerEl.trigger(_event,[context,textStatus,jqXHR]),_event.isDefaultPrevented()||options.fireError&&!1===eval("(function($el, context, textStatus, jqXHR) {"+options.fireError+"}.call($el.get(0), $el, context, textStatus, jqXHR))")||requestOptions.handleErrorMessage(errorMsg)})),updatePromise},complete:function(data,textStatus,jqXHR){$triggerEl.trigger("ajaxComplete",[context,data,textStatus,jqXHR]),options.fireComplete&&eval("(function($el, context, data, textStatus, jqXHR) {"+options.fireComplete+"}.call($el.get(0), $el, context, data, textStatus, jqXHR))")},handleConfirmMessage:function(e){var t=jQuery.Event("ajaxConfirmMessage");return t.promise=$.Deferred(),void 0!==$(window).triggerHandler(t,[e])?(t.promise.done((function(){options.confirm=null,new Request(element,handler,options)})),!1):t.isDefaultPrevented()?void 0:e?confirm(e):void 0},handleErrorMessage:function(e){var t=jQuery.Event("ajaxErrorMessage");$(window).trigger(t,[e]),t.isDefaultPrevented()||e&&alert(e)},handleValidationMessage:function(e,t){$triggerEl.trigger("ajaxValidation",[context,e,t]);var n=!0;$.each(t,(function(e,t){e=e.replace(/\.(\w+)/g,"[$1]");var i=$form.find('[name="'+e+'"], [name="'+e+'[]"], [name$="['+e+']"], [name$="['+e+'][]"]').filter(":enabled").first();if(i.length>0){var s=jQuery.Event("ajaxInvalidField");$(window).trigger(s,[i.get(0),e,t,n]),n&&(s.isDefaultPrevented()||i.focus(),n=!1)}}))},handleRedirectResponse:function(e){window.location.href=e},handleUpdateResponse:function(e,t,n){var i=$.Deferred().done((function(){var i=[];try{i="object"===jQuery.type(e)?e:jQuery.parseJSON(e)}catch(e){}for(var s in i){var o=s;"string"===jQuery.type(o)&&"@"==o.charAt(0)?$(o.substring(1)).append(i[s]).trigger("ajaxUpdate",[context,e,t,n]):"string"==jQuery.type(o)&&"^"==o.charAt(0)?$(o.substring(1)).prepend(i[s]).trigger("ajaxUpdate",[context,e,t,n]):"string"==jQuery.type(o)&&"~"==o.charAt(0)?$(o.substring(1)).replaceWith(i[s]).trigger("ajaxUpdate",[context,e,t,n]):($(o).trigger("ajaxBeforeReplace"),$(o).html(i[s]).trigger("ajaxUpdate",[context,e,t,n]))}setTimeout((function(){$(window).trigger("ajaxUpdateComplete",[context,e,t,n]).trigger("resize")}),0)}));return e.X_IGNITER_REDIRECT&&(options.redirect=e.X_IGNITER_REDIRECT,isRedirect=!0),isRedirect&&requestOptions.handleRedirectResponse(options.redirect),e.X_IGNITER_ERROR_FIELDS&&requestOptions.handleValidationMessage(e.X_IGNITER_ERROR_MESSAGE,e.X_IGNITER_ERROR_FIELDS),i.resolve(),i}};if(context.success=requestOptions.success,context.error=requestOptions.error,context.complete=requestOptions.complete,requestOptions=$.extend(requestOptions,options),requestOptions.data=requestData,!options.confirm||requestOptions.handleConfirmMessage(options.confirm)){if(loading&&loading.show(),!submitForm)return $(window).trigger("ajaxBeforeSend",[context]),$el.trigger("ajaxPromise",[context]),$.ajax(requestOptions).fail((function(e,t,n){isRedirect||$el.trigger("ajaxFail",[context,t,e])})).done((function(e,t,n){isRedirect||$el.trigger("ajaxDone",[context,e,t,n]),loading&&loading.hide()})).always((function(e,t,n){$el.trigger("ajaxAlways",[context,e,t,n])}));$form.submit()}}};Request.DEFAULTS={type:"POST",update:{},beforeUpdate:function(e,t,n){},fireBeforeUpdate:null,fireSuccess:null,fireError:null,fireComplete:null};var old=$.fn.request;function stringToObj(name,value){if(void 0===value&&(value=""),"object"==typeof value)return value;try{return JSON.parse(JSON.stringify(eval("({"+value+"})")))}catch(e){throw new Error("Error parsing the "+name+" attribute value. "+e)}}function appendObjToForm(e,t){$.each(e,(function(e,n){var i=$("").attr({type:"hidden",name:e}).val(n);t.append(i)}))}$.fn.request=function(e,t){var n=$(this).first(),i={fireBeforeUpdate:n.data("request-before-update"),fireSuccess:n.data("request-success"),fireError:n.data("request-error"),fireComplete:n.data("request-complete"),confirm:n.data("request-confirm"),redirect:n.data("request-redirect"),loading:n.data("request-loading"),submit:n.data("request-submit"),form:n.data("request-form"),update:stringToObj("data-request-update",n.data("request-update")),data:stringToObj("data-request-data",n.data("request-data"))};e||(e=n.data("request"));var s=$.extend(!0,{},Request.DEFAULTS,i,"object"==typeof t&&t);return new Request(n,e,s)},$.fn.request.Constructor=Request,$.request=function(e,t){return $("
      ").request(e,t)},$.fn.request.noConflict=function(){return $.fn.request=old,this},$(document).on("submit","[data-request]",(function(){return $(this).request(),!1})),$(document).on("change","select[data-request]",(function(){return $(this).request(),!1})),$(document).on("click","a[data-request], button[data-request]",(function(e){if(e.preventDefault(),$(this).request(),$(this).is("[type=submit]"))return!1}))}(window.jQuery),function(e){"use strict";void 0===e.ti&&(e.ti={});const t="ti-loading";var n=function(){var t=this;this.timeout=void 0,this.counter=0,this.progress=0,this.indicator=e("
      ").addClass("bar-loading-indicator loaded").append(e("
      ").addClass("bar")).append(e("
      ").addClass("bar-loaded")),this.bar=this.indicator.find(".bar"),this.bar.html('
      '),e(document).ready((function(){e(document.body).append(t.indicator)}))};function i(e,n){if(e&&e.length){var i=e.data("attach-loading").length?e.data("attach-loading"):t;!0===n?e.addClass(i).prop("disabled",!0):e.removeClass(i).prop("disabled",!1)}}function s(e,n){if(e&&e.length){var i=e.data("replace-loading").length?e.data("replace-loading"):t;!0===n?(e.children().wrapAll('
      '),e.find(".replace-loading-bk").before(''),e.prop("disabled",!0)):(e.find(".replace-loading").remove(),e.find(".replace-loading-bk").children().unwrap(),e.prop("disabled",!1))}}n.barTemplate=['
      ','
      ',"
      "].join("\n"),n.prototype.show=function(){if(this.counter++,this.bar.after(this.bar=this.bar.clone()).remove(),!(this.counter>1)){this.progress=.125,this.indicator.removeClass("loaded"),e(document.body).addClass("ti-loading"),this.bar.animate({translateX:"0%"},0);var t=this;setTimeout((function(){t.animate(),t.trickle()}),0)}},n.prototype.hide=function(t){this.counter--,void 0!==t&&t&&(this.counter=0),this.counter<=0&&(this.indicator.addClass("loaded"),e(document.body).removeClass("ti-loading"))},n.prototype.animate=function(){this.indicator.animate({translateX:100*this.progress+"%"},200)},n.prototype.clear=function(){this.timeout&&clearTimeout(this.timeout),this.timeout=void 0},n.prototype.trickle=function(){var e=this;this.timeout=setTimeout((function(){e.increment(.035*(.875-e.progress)*Math.random()),e.trickle()}),350+400*Math.random())},n.prototype.increment=function(e){this.progress<.875&&(this.progress+=e||.05),this.animate()},e.ti.loadingIndicator=new n,e(document).on("ajaxPromise","[data-request]",(function(t){t.stopPropagation(),e.ti.loadingIndicator.show();var n=e(this);e(window).one("ajaxUpdateComplete",(function(){0===n.closest("html").length&&e.ti.loadingIndicator.hide()}))})).on("ajaxFail ajaxDone","[data-request]",(function(t){t.stopPropagation(),e.ti.loadingIndicator.hide()})),e(document).on("ajaxPromise","[data-request]",(function(){var t=e(this);void 0!==t.data("attach-loading")&&i(t,!0),t.is("form")&&(i(e("[data-attach-loading]",t),!0),s(e("[data-replace-loading]",t),!0)),void 0!==t.data("replace-loading")&&s(t,!0)})).on("ajaxFail ajaxDone","[data-request]",(function(){var t=e(this);void 0!==t.data("attach-loading")&&i(t,!1),t.is("form")&&(i(e("[data-attach-loading]",t),!1),s(e("[data-replace-loading]",t),!1)),void 0!==t.data("replace-loading")&&s(t,!1)}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.$el=e(t),this.options=n||{},this.counter=0,this.show()};t.prototype.hide=function(){this.counter--,this.counter<=0&&(e("div.progress-indicator",this.$el).remove(),this.$el.removeClass("in-progress"))},t.prototype.show=function(t){t&&(this.options=t),this.hide();var n=e('
      ');n.append(e('')),n.append(e("
      ").text(this.options.text)),void 0!==this.options.opaque&&n.addClass("is-opaque"),void 0!==this.options.centered&&n.addClass("indicator-center"),"small"===this.options.size&&n.addClass("size-small"),this.$el.prepend(n),this.$el.addClass("in-progress"),this.counter++},t.prototype.destroy=function(){this.$el.removeData("ti.progressIndicator"),this.$el=null},t.DEFAULTS={text:""};var n=e.fn.progressIndicator;e.fn.progressIndicator=function(n){var i=arguments;return this.each((function(){var s=e(this),o=s.data("ti.progressIndicator"),r=e.extend({},t.DEFAULTS,"object"==typeof n&&n);if(o)if("string"!=typeof n)o.show(r);else{for(var a=[],l=1;l p.flash-message").remove(),0===s.length&&(s=e("
      ",{class:"alert alert-"+n.class}).html(n.text)),s.addClass("flash-message animated fadeInDown"),s.attr("data-control",null),n.allowDismiss&&(s.addClass("alert-dismissible"),s.append('')),s.on("click","button",r),n.interval>0&&s.on("click",r),e(n.container).prepend(s);var o=null;function r(){window.clearInterval(o),s.addClass("fadeOutUp"),s.on("animationend",(()=>{s.remove()}))}setTimeout((function(){s.addClass("show")}),100),n.allowDismiss&&n.interval>0&&(o=window.setTimeout(r,1e3*n.interval))};t.DEFAULTS={container:"#notification",class:"success",text:"text",interval:5,allowDismiss:!0},void 0===e.ti&&(e.ti={}),e.ti.flashMessage=t,e(document).render((function(){e('[data-control="flash-message"]').each((function(t,n){setTimeout((function(){e.ti.flashMessage(e(n).data(),n)}),500*(t+1))})),e('[data-control="flash-overlay"]').each((function(t,n){var i=e(n),s=e.extend({},i.data(),!0===i.data("closeOnEsc")?{timer:3e3*(t+1)}:{});Swal.fire(s)}))})),e(document).on("ajaxValidation","[data-request][data-request-validate]",(function(t,n,i,s){var o,r=e(this).closest("form"),a=e("[data-validate-error]",r),l=[];if(e.each(s,(function(t,n){o=e('[data-validate-for="'+t+'"]',r),l=e.merge(l,n),o.length&&(o.text().length&&1!=o.data("emptyMode")||o.data("emptyMode",!0).text(n.join(", ")),o.addClass("visible"))})),a.length&&(a=e("[data-validate-error]",r)),a.length){var c=e("[data-message]",a);if(a.addClass("visible"),c.length){var u=c.first();e.each(l,(function(e,t){u.clone().text(t).insertAfter(u)})),c.remove()}else a.text(i)}r.one("ajaxError",(function(e){e.preventDefault()}))})),e(document).on("ajaxPromise","[data-request][data-request-validate]",(function(){var t=e(this).closest("form");e("[data-validate-for]",t).removeClass("visible"),e("[data-validate-error]",t).removeClass("visible")}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.options=n,this.$el=e(t),this.$el.on("click",e.proxy(this.onClicked,this)),this.options.disabled&&this.$el.attr("readonly",!0)};t.DEFAULTS={disabled:!0},t.prototype.onClicked=function(t){e(t.target).attr("readonly")&&this.$el.attr("readonly",!1)};var n=e.fn.toggler;e.fn.toggler=function(n){var i,s=Array.prototype.slice.call(arguments,1);return this.each((function(){var o=e(this),r=o.data("ti.toggler"),a=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);if(r||o.data("ti.toggler",r=new t(this,a)),"string"==typeof n&&(i=r[n].apply(r,s)),void 0!==i)return!1})),i||this},e.fn.toggler.Constructor=t,e.fn.toggler.noConflict=function(){return e.fn.toggler=n,this},e(document).render((function(){e('[data-toggle="disabled"]').toggler()}))}(window.jQuery),function(e){"use strict";var t=function(t,n){var i=this.$el=e(t);if(this.options=n||{},!1===this.options.triggerCondition)throw new Error("Trigger condition is not specified.");if(!1===this.options.trigger)throw new Error("Trigger selector is not specified.");if(!1===this.options.triggerAction)throw new Error("Trigger action is not specified.");if(this.triggerCondition=this.options.triggerCondition,0==this.options.triggerCondition.indexOf("value")){var s=this.options.triggerCondition.match(/[^[\]]+(?=])/g);this.triggerCondition="value",this.triggerConditionValue=s||[""]}this.triggerParent=void 0!==this.options.triggerClosestParent?i.closest(this.options.triggerClosestParent):void 0,"checked"!=this.triggerCondition&&"unchecked"!=this.triggerCondition&&"value"!=this.triggerCondition||e(document).on("change",this.options.trigger,e.proxy(this.onConditionChanged,this));var o=this;i.on("ti.triggerOn.update",(function(e){e.stopPropagation(),o.onConditionChanged()})),o.onConditionChanged()};t.prototype.onConditionChanged=function(){if("checked"==this.triggerCondition)this.updateTarget(!!e(this.options.trigger+":checked",this.triggerParent).length);else if("unchecked"==this.triggerCondition)this.updateTarget(!e(this.options.trigger+":checked",this.triggerParent).length);else if("value"==this.triggerCondition){var t,n="";(t=e(this.options.trigger,this.triggerParent).not("input[type=checkbox], input[type=radio], input[type=button], input[type=submit]")).length||(t=e(this.options.trigger,this.triggerParent).not(":not(input[type=checkbox]:checked, input[type=radio]:checked)")),t.length&&(n=t.val()),this.updateTarget(-1!=e.inArray(n,this.triggerConditionValue))}},t.prototype.updateTarget=function(t){var n=this,i=this.options.triggerAction.split("|");e.each(i,(function(e,i){n.updateTargetAction(i,t)})),e(window).trigger("resize"),this.$el.trigger("ti.triggerOn.afterUpdate",t)},t.prototype.updateTargetAction=function(e,t){"show"==e?this.$el.toggleClass("animated fadeIn",t).toggleClass("hide",!t).trigger("hide.ti.triggerapi",[!t]):"hide"==e?this.$el.toggleClass("animated fadeIn",!t).toggleClass("hide",t).trigger("hide.ti.triggerapi",[t]):"enable"==e?this.$el.prop("disabled",!t).toggleClass("control-disabled",!t).trigger("disable.ti.triggerapi",[!t]):"disable"==e?this.$el.prop("disabled",t).toggleClass("control-disabled",t).trigger("disable.ti.triggerapi",[t]):"check"==e&&t?this.$el.filter("input[type=checkbox]").prop("checked",!0):"empty"==e&&t&&(this.$el.not("input[type=checkbox], input[type=radio], input[type=button], input[type=submit]").val(""),this.$el.not(":not(input[type=checkbox], input[type=radio])").prop("checked",!1),this.$el.trigger("empty.ti.triggerapi").trigger("change")),"show"!=e&&"hide"!=e||this.fixButtonClasses()},t.prototype.fixButtonClasses=function(){this.$el.closest(".btn-group").length>0&&this.$el.is(":last-child")&&this.$el.prev().toggleClass("last",this.$el.hasClass("hide"))},t.DEFAULTS={triggerAction:!1,triggerCondition:!1,triggerClosestParent:void 0,trigger:!1};var n=e.fn.triggerOn;e.fn.triggerOn=function(n){return this.each((function(){var i=e(this),s=i.data("ti.triggerOn"),o=e.extend({},t.DEFAULTS,i.data(),"object"==typeof n&&n);s||i.data("ti.triggerOn",s=new t(this,o))}))},e.fn.triggerOn.Constructor=t,e.fn.triggerOn.noConflict=function(){return e.fn.triggerOn=n,this},e(document).render((function(){e("[data-trigger]").triggerOn()}))}(window.jQuery),function(e){"use strict";var t=function(t,n){this.$el=e(t),this.options=n,this.slimSelect=null,this.init()};t.prototype.constructor=t,t.prototype.init=function(){this.slimSelect=new SlimSelect({select:this.$el.get(0),settings:this.options,events:{afterChange:e=>{this.$el.trigger("change")}}})},t.DEFAULTS={maxValuesShown:5,showSearch:!1,allowDeselect:!0};var n=e.fn.selectList;e.fn.selectList=function(n){var i=Array.prototype.slice.call(arguments,1),s=void 0;return this.each((function(){var o=e(this),r=o.data("ti.selectList"),a=e.extend({},t.DEFAULTS,o.data(),"object"==typeof n&&n);if(r||o.data("ti.selectList",r=new t(this,a)),"string"==typeof n&&(s=r[n].apply(r,i)),void 0!==s)return!1})),s||this},e.fn.selectList.Constructor=t,e.fn.selectList.noConflict=function(){return e.fn.selectList=n,this},e(document).render((function(){e('[data-control="selectlist"]').selectList()}))}(window.jQuery),function(e){"use strict";e("#side-nav-menu").metisMenu({toggle:!0,collapseInClass:"show"}),e("#navSidebar").on("show.bs.collapse",(function(){e(".sidebar").addClass("show")})).on("hide.bs.collapse",(function(){e(".sidebar").removeClass("show")})),e(document).render((function(){e("a[title], span[title], button[title]",document).not("[data-bs-toggle]").tooltip({placement:"bottom"}),e(".alert",document).alert()})),e(document).on("show.bs.modal",".modal",(function(){var t=10*e(".modal:visible").length+1+1040;e(this).css("z-index",t),e(".modal-backdrop").not(".modal-stack").css("z-index",t-2).addClass("modal-stack"),setTimeout((function(){e(".modal-backdrop").not(".modal-stack").css("z-index",t-1).addClass("modal-stack")}),0)})),e(document).on("hidden.bs.modal",".modal",(function(){e(".modal:visible").length&&e(document.body).addClass("modal-open")})),e(document).on("show.bs.modal",".modal",(function(t){var n=e(this),i=e(t.relatedTarget);i.length&&e.each(i.get(0).attributes,(function(e,t){if(/^data-modal-/.test(t.name)){var i=t.name.substr(11),s=t.value;n.find('[data-modal-html="'+i+'"]').html(s),n.find('[data-modal-text="'+i+'"]').text(s),n.find('[data-modal-input="'+i+'"]').val(s)}}))})),e(window).on("ajaxErrorMessage",(function(t,n){n&&(e.ti.flashMessage({class:"danger",text:n,allowDismiss:!1}),t.preventDefault())})),e.ajaxPrefilter((function(t){var n=e('meta[name="csrf-token"]').attr("content");n&&(t.headers||(t.headers={}),t.headers["X-CSRF-TOKEN"]=n)}))}(window.jQuery); diff --git a/app/admin/assets/src/js/selectlist.js b/app/admin/assets/src/js/selectlist.js index 749d0ecc2d..1c63dd2758 100644 --- a/app/admin/assets/src/js/selectlist.js +++ b/app/admin/assets/src/js/selectlist.js @@ -32,7 +32,7 @@ SelectList.DEFAULTS = { maxValuesShown: 5, showSearch: false, - + allowDeselect: true } var old = $.fn.selectList From f667e3f8a74887c65eda0f0b1a09a2c1b4abea79 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Thu, 20 Jul 2023 21:26:03 +0100 Subject: [PATCH 3/9] Code refactor Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/main/classes/MediaLibrary.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main/classes/MediaLibrary.php b/app/main/classes/MediaLibrary.php index 19f60044bc..3ef353519a 100644 --- a/app/main/classes/MediaLibrary.php +++ b/app/main/classes/MediaLibrary.php @@ -66,8 +66,7 @@ public function listFolderContents($fullPath, $methodName, $recursive = false) if (array_has($cached, $cachedKey)) { $folderContents = array_get($cached, $cachedKey); - } - else { + } else { $folderContents = $this->scanFolderContents($fullPath, $methodName, $recursive); $cached[$cacheSuffix][$methodName][$fullPath] = $folderContents; @@ -236,6 +235,9 @@ public function validatePath($path, $stripTrailingSlash = false) public function getMediaUrl($path) { + if (starts_with($path, ['http://', 'https://', '//'])) + return $path; + $path = $this->validatePath($path); return $this->storagePath.$path; From d6780908ce03e6cc456d094405e7d5985308df5d Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Mon, 7 Aug 2023 21:50:42 +0100 Subject: [PATCH 4/9] Refactor Reservations_model::getNextBookableTable() to only retrieve confirmed reservations. Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/admin/models/Reservations_model.php | 2 +- app/system/language/en/lang.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/models/Reservations_model.php b/app/admin/models/Reservations_model.php index bcd78eeac6..7e482e5838 100644 --- a/app/admin/models/Reservations_model.php +++ b/app/admin/models/Reservations_model.php @@ -308,7 +308,7 @@ public static function findReservedTables($location, $dateTime) }); $query->whereLocationId($location->getKey()); $query->whereBetweenDate($dateTime->toDateTimeString()); - $query->whereNotIn('status_id', [0, setting('canceled_reservation_status')]); + $query->where('status_id', setting('confirmed_reservation_status')); $result = $query->get(); return $result->pluck('tables')->flatten()->keyBy('table_id'); diff --git a/app/system/language/en/lang.php b/app/system/language/en/lang.php index b4eb978c0d..8cf9ac067f 100644 --- a/app/system/language/en/lang.php +++ b/app/system/language/en/lang.php @@ -524,7 +524,7 @@ 'help_invoice_prefix' => 'Set the invoice prefix (e.g. INV-2015-001123). Leave blank to use no prefix. The following macros are available: {year} {month} {day} {hour} {minute} {second}', 'help_default_reservation_status' => 'Select the default reservation status when new reservation received', 'help_canceled_reservation_status' => 'Select the reservation status when a reservation is marked as canceled or suspected of fraudulent activity', - 'help_confirmed_reservation_status' => 'Select the reservation status to mark a reservation as confirmed before table is reserved', + 'help_confirmed_reservation_status' => 'Select the reservation status when a reservation is confirmed and table marked as reserved', 'help_delete_thumbs' => 'This will delete all created thumbs. Note thumbs are automatically created.', 'help_media_max_size' => 'The maximum size (in kilobytes) limit for file when uploading.', 'help_media_extensions' => 'The allowed file extensions for uploaded files. Multiple extensions can be separated by commas.', From cf3403c65460308615de0e437598c24293609c97 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Tue, 15 Aug 2023 18:49:25 +0100 Subject: [PATCH 5/9] Refactor LogUserLastSeen.php to support multiple authentication services and update last seen time for each authenticated user. Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- ...properties_on_user_preferences_table.php.php | 2 +- app/admin/middleware/LogUserLastSeen.php | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/admin/database/migrations/2023_06_06_000400_update_dashboard_widget_properties_on_user_preferences_table.php.php b/app/admin/database/migrations/2023_06_06_000400_update_dashboard_widget_properties_on_user_preferences_table.php.php index 5aa44b3721..483e999103 100644 --- a/app/admin/database/migrations/2023_06_06_000400_update_dashboard_widget_properties_on_user_preferences_table.php.php +++ b/app/admin/database/migrations/2023_06_06_000400_update_dashboard_widget_properties_on_user_preferences_table.php.php @@ -29,7 +29,7 @@ public function up() ->value('value'); $widgets = collect(json_decode($widgets, true))->mapWithKeys(function ($properties, $alias) { - if ($options = array_get($this->widgetsMap, array_pull($properties, 'class'))) { + if ($options = array_get($this->widgetsMap, array_pull($properties, 'class', ''))) { $properties['widget'] = $options[0]; $props = array_pull($properties, 'config'); diff --git a/app/admin/middleware/LogUserLastSeen.php b/app/admin/middleware/LogUserLastSeen.php index 7cefc77f53..f1faf3117c 100644 --- a/app/admin/middleware/LogUserLastSeen.php +++ b/app/admin/middleware/LogUserLastSeen.php @@ -2,7 +2,6 @@ namespace Admin\Middleware; -use Admin\Facades\AdminAuth; use Carbon\Carbon; use Closure; use Illuminate\Support\Facades\App; @@ -12,12 +11,16 @@ class LogUserLastSeen { public function handle($request, Closure $next) { - if (App::hasDatabase() && AdminAuth::check()) { - $cacheKey = 'is-online-user-'.AdminAuth::getId(); - $expireAt = Carbon::now()->addMinutes(2); - Cache::remember($cacheKey, $expireAt, function () { - return AdminAuth::user()->updateLastSeen(Carbon::now()->addMinutes(5)); - }); + if (App::hasDatabase()) { + foreach (['admin.auth', 'auth'] as $authService) { + if (App::hasDatabase() && resolve($authService)->check()) { + $cacheKey = 'is-online-'.str_replace('.', '-', $authService).'-user-'.resolve($authService)->getId(); + $expireAt = Carbon::now()->addMinutes(2); + Cache::remember($cacheKey, $expireAt, function () use ($authService) { + return resolve($authService)->user()->updateLastSeen(Carbon::now()); + }); + } + } } return $next($request); From e92c6e41153b02fae5a72eca96a89f44cea8dbe0 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Wed, 30 Aug 2023 19:59:36 +0100 Subject: [PATCH 6/9] Escape richeditor, markdowneditor eidget values to avoid XSS attacks Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/admin/formwidgets/markdowneditor/markdowneditor.blade.php | 2 +- app/admin/formwidgets/richeditor/richeditor.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/admin/formwidgets/markdowneditor/markdowneditor.blade.php b/app/admin/formwidgets/markdowneditor/markdowneditor.blade.php index 248ddfa807..39b0ce38dd 100644 --- a/app/admin/formwidgets/markdowneditor/markdowneditor.blade.php +++ b/app/admin/formwidgets/markdowneditor/markdowneditor.blade.php @@ -12,6 +12,6 @@ class="field-markdowneditor size-{{ $size }}" rows="20" class="form-control" {!! $this->previewMode ? 'disabled="disabled"' : '' !!} - >{!! $value !!} + >{{$value}}
      @endif diff --git a/app/admin/formwidgets/richeditor/richeditor.blade.php b/app/admin/formwidgets/richeditor/richeditor.blade.php index 073a61db04..06e51ae9e5 100644 --- a/app/admin/formwidgets/richeditor/richeditor.blade.php +++ b/app/admin/formwidgets/richeditor/richeditor.blade.php @@ -9,6 +9,6 @@ class="field-richeditor size-{{ $size }}" name="{{ $name }}" id="{{ $this->getId('textarea') }}" class="form-control" - >{!! trim($value) !!} + >{{trim($value)}}
      @endif From 502b49bf8607a570ac35484e27dc66db6d1bcec8 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Wed, 30 Aug 2023 21:36:43 +0100 Subject: [PATCH 7/9] Remove option to configure sendmail path by admin Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/system/classes/MailManager.php | 8 ++------ app/system/language/en/lang.php | 2 -- app/system/models/config/mail_settings.php | 12 ------------ app/system/requests/MailSettings.php | 2 -- 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/app/system/classes/MailManager.php b/app/system/classes/MailManager.php index a2919939e4..0c8938bf3d 100644 --- a/app/system/classes/MailManager.php +++ b/app/system/classes/MailManager.php @@ -71,8 +71,7 @@ public function addContentToMailer($message, $code, $data, $plainOnly = false) { if (isset($this->templateCache[$code])) { $template = $this->templateCache[$code]; - } - else { + } else { $this->templateCache[$code] = $template = Mail_templates_model::findOrMakeTemplate($code); } @@ -100,9 +99,6 @@ public function applyMailerConfigValues() $config->set('mail.from.address', $settings->get('sender_email')); switch ($settings->get('protocol')) { - case 'sendmail': - $config->set('mail.mailers.sendmail.path', $settings->get('sendmail_path')); - break; case 'smtp': $config->set('mail.mailers.smtp.host', $settings->get('smtp_host')); $config->set('mail.mailers.smtp.port', $settings->get('smtp_port')); @@ -273,7 +269,7 @@ public function renderPartial() $code = array_pop($this->partialStack); if (!$partial = Mail_partials_model::findOrMakePartial($code)) - return ''; + return ''; $currentPartial = count($this->partialStack); $params = $this->partialData[$currentPartial]; diff --git a/app/system/language/en/lang.php b/app/system/language/en/lang.php index 8cf9ac067f..d95ced3f51 100644 --- a/app/system/language/en/lang.php +++ b/app/system/language/en/lang.php @@ -472,7 +472,6 @@ 'label_sender_name' => 'Sender Name', 'label_sender_email' => 'Sender Email', 'label_protocol' => 'Mail Protocol', - 'label_sendmail_path' => 'Sendmail Path', 'label_smtp_host' => 'SMTP Host', 'label_smtp_port' => 'SMTP Port', 'label_smtp_user' => 'SMTP Username', @@ -534,7 +533,6 @@ 'help_media_move' => 'Enable or disable moving file/folder', 'help_media_rename' => 'Enable or disable file/folder rename', 'help_media_delete' => 'Enable or disable deleting file/folder', - 'help_sendmail_path' => 'Please specify the sendmail path.', 'help_mail_logo' => 'Upload logo to display in emails', 'help_allow_registration' => 'If this is disabled customers can only be created by administrators.', 'help_registration_email' => 'Send a confirmation mail to the customer and/or admin email after successfully account registration', diff --git a/app/system/models/config/mail_settings.php b/app/system/models/config/mail_settings.php index 35ee9978e9..3090f3a35b 100644 --- a/app/system/models/config/mail_settings.php +++ b/app/system/models/config/mail_settings.php @@ -50,18 +50,6 @@ 'comment' => 'lang:system::lang.settings.help_mail_logo', ], - 'sendmail_path' => [ - 'label' => 'lang:system::lang.settings.label_sendmail_path', - 'comment' => 'lang:system::lang.settings.help_sendmail_path', - 'type' => 'text', - 'default' => '/usr/sbin/sendmail -bs', - 'trigger' => [ - 'action' => 'show', - 'field' => 'protocol', - 'condition' => 'value[sendmail]', - ], - ], - 'smtp_host' => [ 'label' => 'lang:system::lang.settings.label_smtp_host', 'type' => 'text', diff --git a/app/system/requests/MailSettings.php b/app/system/requests/MailSettings.php index a8c397364b..d3b6950dd2 100644 --- a/app/system/requests/MailSettings.php +++ b/app/system/requests/MailSettings.php @@ -14,7 +14,6 @@ public function attributes() 'protocol' => lang('system::lang.settings.label_protocol'), 'mail_logo' => lang('system::lang.settings.label_mail_logo'), - 'sendmail_path' => lang('system::lang.settings.label_sendmail_path'), 'smtp_host' => lang('system::lang.settings.label_smtp_host'), 'smtp_port' => lang('system::lang.settings.label_smtp_port'), @@ -41,7 +40,6 @@ public function rules() 'protocol' => ['required'], 'mail_logo' => ['string'], - 'sendmail_path' => ['required_if:protocol,sendmail', 'string'], 'smtp_host' => ['string'], 'smtp_port' => ['string'], From e4ed0765af8e76b531fe5809481767d66e94226b Mon Sep 17 00:00:00 2001 From: Luca Benati <97920581+Concreta09@users.noreply.github.com> Date: Wed, 27 Sep 2023 19:29:41 +0200 Subject: [PATCH 8/9] Menu priority rule (#1050) Priority cannot be null, change rule to 'min:0' --- app/admin/requests/Menu.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/requests/Menu.php b/app/admin/requests/Menu.php index 7722ed4b61..509a5fbd28 100644 --- a/app/admin/requests/Menu.php +++ b/app/admin/requests/Menu.php @@ -38,7 +38,7 @@ public function rules() 'order_restriction.*' => ['nullable', 'string'], 'menu_status' => ['boolean'], 'mealtime_id' => ['nullable', 'integer'], - 'menu_priority' => ['nullable', 'integer'], + 'menu_priority' => ['min:0', 'integer'], ]; } } From 2682642e283dc9723668d1b47c3000491e0229a7 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:38:48 +0100 Subject: [PATCH 9/9] Fix UI issue with markdown editor Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- app/admin/formwidgets/MediaFinder.php | 9 ++++++++- .../assets/css/markdowneditor.css | 19 +++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/admin/formwidgets/MediaFinder.php b/app/admin/formwidgets/MediaFinder.php index 6505b8ea83..829fd42fcb 100644 --- a/app/admin/formwidgets/MediaFinder.php +++ b/app/admin/formwidgets/MediaFinder.php @@ -238,7 +238,12 @@ public function onAddAttachment() )); } - $items = post('items'); + $items = $this->validate(request()->input(), [ + 'items' => ['required', 'array'], + 'items.*.name' => ['required', 'string'], + 'items.*.path' => ['required', 'string'], + ]); + if (!is_array($items)) throw new ApplicationException(lang('main::lang.media_manager.alert_select_item_to_attach')); @@ -248,6 +253,8 @@ public function onAddAttachment() $manager = MediaLibrary::instance(); foreach ($items as &$item) { + $item['path'] = strip_tags($item['path']); + $media = $model->newMediaInstance(); $media->addFromRaw( $manager->get(array_get($item, 'path'), true), diff --git a/app/admin/formwidgets/markdowneditor/assets/css/markdowneditor.css b/app/admin/formwidgets/markdowneditor/assets/css/markdowneditor.css index 30ecbc48bd..8f3b58c73a 100644 --- a/app/admin/formwidgets/markdowneditor/assets/css/markdowneditor.css +++ b/app/admin/formwidgets/markdowneditor/assets/css/markdowneditor.css @@ -1,17 +1,24 @@ .editor-toolbar { - border-color: var(--bs-gray-300); - border-top-left-radius: 3px; - border-top-right-radius: 3px; + border-color: var(--bs-gray-300); + border-top-left-radius: 3px; + border-top-right-radius: 3px; } + +.editor-toolbar button.table { + width: 30px; +} + .editor-toolbar button.active, .editor-toolbar button:hover { - border-color: var(--bs-gray-300); + border-color: var(--bs-gray-300); } + .field-markdowneditor .CodeMirror { - border: 1px solid var(--bs-gray-300); + border: 1px solid var(--bs-gray-300); } + .editor-toolbar.fullscreen, .field-markdowneditor .CodeMirror-fullscreen, .editor-preview-side { - z-index: 1040; + z-index: 1040; }