diff --git a/docs/_data/manifest.json b/docs/_data/manifest.json
index aa1bb111..459a97e9 100644
--- a/docs/_data/manifest.json
+++ b/docs/_data/manifest.json
@@ -1,6 +1,6 @@
{
- "dist/main.css": "/dist/main.cfa0ed56.css",
- "dist/main.js": "/dist/main.896f6a93.js",
+ "dist/main.css": "/dist/main.98f9c826.css",
+ "dist/main.js": "/dist/main.8b056786.js",
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
"dist/455.095e6545.js": "/dist/455.095e6545.js",
"dist/411.29cd993e.css": "/dist/411.29cd993e.css",
diff --git a/docs/_includes/flasher-studio.html b/docs/_includes/flasher-studio.html
index c84af136..2b07cfbf 100644
--- a/docs/_includes/flasher-studio.html
+++ b/docs/_includes/flasher-studio.html
@@ -146,6 +146,7 @@
+
@@ -1038,7 +1039,7 @@ async function checkStatus() {
document.getElementById("title-input").value = state.title || "";
document.getElementById("message-input").value = state.message || "";
document.getElementById("position-select").value = state.position || "";
- document.getElementById("timeout-select").value = state.timeout || "";
+ document.getElementById("timeout-select").value = state.timeout === false ? "false" : (state.timeout || "");
document.getElementById("theme-select").value = state.theme || "";
document.getElementById("direction-select").value = state.direction || "";
document.getElementById("rtl-check").checked = !!state.rtl;
@@ -1116,8 +1117,8 @@ async function checkStatus() {
if (state.position) {
options.position = state.position;
}
- if (state.timeout) {
- options.timeout = parseInt(state.timeout);
+ if (state.timeout !== undefined && state.timeout !== "") {
+ options.timeout = state.timeout;
}
if (state.theme) {
options.theme = state.theme;
@@ -1153,8 +1154,9 @@ async function checkStatus() {
if (state.position) {
lines.push(`${indent} ->option('position', '${state.position}')`);
}
- if (state.timeout) {
- lines.push(`${indent} ->option('timeout', ${state.timeout})`);
+ if (state.timeout !== undefined && state.timeout !== "") {
+ const timeoutValue = state.timeout === false ? 'false' : state.timeout;
+ lines.push(`${indent} ->option('timeout', ${timeoutValue})`);
}
if (state.direction) {
lines.push(`${indent} ->option('direction', '${state.direction}')`);
@@ -1311,8 +1313,8 @@ async function checkStatus() {
if (state.position) {
options.position = state.position;
}
- if (state.timeout) {
- options.timeout = parseInt(state.timeout);
+ if (state.timeout !== undefined && state.timeout !== "") {
+ options.timeout = state.timeout;
}
if (state.direction) {
options.direction = state.direction;
@@ -1324,6 +1326,8 @@ async function checkStatus() {
options.escapeHtml = state.escapeHtml;
}
+ console.log("Showing notification with options:", options);
+
try {
if (typeof flasher !== "undefined") {
if (state.theme) {
@@ -1380,7 +1384,13 @@ async function checkStatus() {
state.position = e.target.value;
});
document.getElementById("timeout-select").addEventListener("change", (e) => {
- state.timeout = e.target.value ? parseInt(e.target.value) : "";
+ if (e.target.value === "false") {
+ state.timeout = false;
+ } else if (e.target.value) {
+ state.timeout = parseInt(e.target.value);
+ } else {
+ state.timeout = "";
+ }
});
document.getElementById("theme-select").addEventListener("change", (e) => {
state.theme = e.target.value;
diff --git a/docs/dist/entrypoints.json b/docs/dist/entrypoints.json
index 36266016..99e8dfc6 100644
--- a/docs/dist/entrypoints.json
+++ b/docs/dist/entrypoints.json
@@ -2,10 +2,10 @@
"entrypoints": {
"main": {
"css": [
- "/dist/main.cfa0ed56.css"
+ "/dist/main.98f9c826.css"
],
"js": [
- "/dist/main.896f6a93.js"
+ "/dist/main.8b056786.js"
]
}
}
diff --git a/docs/dist/main.896f6a93.js b/docs/dist/main.8b056786.js
similarity index 58%
rename from docs/dist/main.896f6a93.js
rename to docs/dist/main.8b056786.js
index d05cc91e..91699f92 100644
--- a/docs/dist/main.896f6a93.js
+++ b/docs/dist/main.8b056786.js
@@ -1,2 +1,2 @@
-/*! For license information please see main.896f6a93.js.LICENSE.txt */
-!function(){var e,t,n={79:function(e,t,n){"use strict";n.r(t);var r=n(2891),i=n(1061);t.default=class extends r.xI{connect(){(0,i.b)("theme.minimal")}}},113:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.css=t.deepExtend=t.animationEndEvents=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.inArray=function(e,t,n){var r=void 0;if(n){for(r in t)if(t.hasOwnProperty(r)&&t[r]===e)return!0}else for(r in t)if(t.hasOwnProperty(r)&&t[r]===e)return!0;return!1},t.stopPropagation=function(e){void 0!==(e=e||window.event).stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.generateID=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="noty_"+e+"_";return t+="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.outerHeight=function(e){var t=e.offsetHeight,n=window.getComputedStyle(e);return t+=parseInt(n.marginTop)+parseInt(n.marginBottom)},t.addListener=o,t.hasClass=s,t.addClass=function(e,t){var n=l(e),r=n+t;s(n,t)||(e.className=r.substring(1))},t.removeClass=function(e,t){var n=l(e),r=void 0;s(e,t)&&(r=n.replace(" "+t+" "," "),e.className=r.substring(1,r.length-1))},t.remove=a,t.classList=l,t.visibilityChangeFlow=function(){var e=void 0,t=void 0;function n(){i.PageHidden?setTimeout((function(){Object.keys(i.Store).forEach((function(e){i.Store.hasOwnProperty(e)&&i.Store[e].options.visibilityControl&&i.Store[e].stop()}))}),100):setTimeout((function(){Object.keys(i.Store).forEach((function(e){i.Store.hasOwnProperty(e)&&i.Store[e].options.visibilityControl&&i.Store[e].resume()})),i.queueRenderAll()}),100)}void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),t&&o(document,t,(function(){i.PageHidden=document[e],n()})),o(window,"blur",(function(){i.PageHidden=!0,n()})),o(window,"focus",(function(){i.PageHidden=!1,n()}))},t.createAudioElements=function(e){if(e.hasSound){var t=document.createElement("audio");e.options.sounds.sources.forEach((function(e){var n=document.createElement("source");n.src=e,n.type="audio/"+e.match(/\.([^.]+)$/)[1],t.appendChild(n)})),e.barDom?e.barDom.appendChild(t):document.querySelector("body").appendChild(t),t.volume=e.options.sounds.volume,e.soundPlayed||(t.play(),e.soundPlayed=!0),t.onended=function(){a(t)}}};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(1));function o(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=t.split(" ");for(var i=0;i
=0}function a(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e){return(" "+(e&&e.className||"")+" ").replace(/\s+/gi," ")}t.animationEndEvents="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",t.deepExtend=function e(t){t=t||{};for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:"global",t=0,n=a;return l.hasOwnProperty(e)&&(n=l[e].maxVisible,Object.keys(c).forEach((function(n){c[n].options.queue!==e||c[n].closed||t++}))),{current:t,maxVisible:n}},t.addToQueue=function(e){l.hasOwnProperty(e.options.queue)||(l[e.options.queue]={maxVisible:a,queue:[]}),l[e.options.queue].queue.push(e)},t.removeFromQueue=function(e){if(l.hasOwnProperty(e.options.queue)){var t=[];Object.keys(l[e.options.queue].queue).forEach((function(n){l[e.options.queue].queue[n].id!==e.id&&t.push(l[e.options.queue].queue[n])})),l[e.options.queue].queue=t}},t.queueRender=u,t.queueRenderAll=function(){Object.keys(l).forEach((function(e){u(e)}))},t.ghostFix=function(e){var t=r.generateID("ghost"),n=document.createElement("div");n.setAttribute("id",t),r.css(n,{height:r.outerHeight(e.barDom)+"px"}),e.barDom.insertAdjacentHTML("afterend",n.outerHTML),r.remove(e.barDom),n=document.getElementById(t),r.addClass(n,"noty_fix_effects_height"),r.addListener(n,r.animationEndEvents,(function(){r.remove(n)}))},t.build=function(e){!function(e){if(e.options.container)e.layoutDom=document.querySelector(e.options.container);else{var t="noty_layout__"+e.options.layout;e.layoutDom=document.querySelector("div#"+t),e.layoutDom||(e.layoutDom=document.createElement("div"),e.layoutDom.setAttribute("id",t),e.layoutDom.setAttribute("role","alert"),e.layoutDom.setAttribute("aria-live","polite"),r.addClass(e.layoutDom,"noty_layout"),document.querySelector("body").appendChild(e.layoutDom))}}(e);var t=''+e.options.text+"
"+function(e){if(d(e)){var t=document.createElement("div");return r.addClass(t,"noty_buttons"),Object.keys(e.options.buttons).forEach((function(n){t.appendChild(e.options.buttons[n].dom)})),e.options.buttons.forEach((function(e){t.appendChild(e.dom)})),t.outerHTML}return""}(e)+'';e.barDom=document.createElement("div"),e.barDom.setAttribute("id",e.id),r.addClass(e.barDom,"noty_bar noty_type__"+e.options.type+" noty_theme__"+e.options.theme),e.barDom.innerHTML=t,f(e,"onTemplate")},t.hasButtons=d,t.handleModal=function(e){var n,o;e.options.modal&&(0===i&&(n=document.querySelector("body"),o=document.createElement("div"),r.addClass(o,"noty_modal"),n.insertBefore(o,n.firstChild),r.addClass(o,"noty_modal_open"),r.addListener(o,r.animationEndEvents,(function(){r.removeClass(o,"noty_modal_open")}))),t.DocModalCount=i+=1)},t.handleModalClose=function(e){if(e.options.modal&&i>0&&(t.DocModalCount=i-=1,i<=0)){var n=document.querySelector(".noty_modal");n&&(r.removeClass(n,"noty_modal_open"),r.addClass(n,"noty_modal_close"),r.addListener(n,r.animationEndEvents,(function(){r.remove(n)})))}},t.queueClose=h,t.dequeueClose=p,t.fire=f,t.openFlow=function(e){f(e,"afterShow"),h(e),r.addListener(e.barDom,"mouseenter",(function(){p(e)})),r.addListener(e.barDom,"mouseleave",(function(){h(e)}))},t.closeFlow=function(e){delete c[e.id],e.closing=!1,f(e,"afterClose"),r.remove(e.barDom),0!==e.layoutDom.querySelectorAll(".noty_bar").length||e.options.container||r.remove(e.layoutDom),(r.inArray("docVisible",e.options.titleCount.conditions)||r.inArray("docHidden",e.options.titleCount.conditions))&&s.decrement(),u(e.options.queue)};var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));t.PageHidden=!1;var i=t.DocModalCount=0,o={originalTitle:null,count:0,changed:!1,timer:-1},s=t.docTitle={increment:function(){o.count++,s._update()},decrement:function(){o.count--,o.count<=0?s._clear():s._update()},_update:function(){var e=document.title;o.changed?document.title="("+o.count+") "+o.originalTitle:(o.originalTitle=e,document.title="("+o.count+") "+e,o.changed=!0)},_clear:function(){o.changed&&(o.count=0,document.title=o.originalTitle,o.changed=!1)}},a=t.DefaultMaxVisible=5,l=t.Queues={global:{maxVisible:a,queue:[]}},c=t.Store={};function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"global";if(l.hasOwnProperty(e)){var t=l[e].queue.shift();t&&t.show()}}function d(e){return!(!e.options.buttons||!Object.keys(e.options.buttons).length)}function h(e){e.options.timeout&&(e.options.progressBar&&e.progressDom&&r.css(e.progressDom,{transition:"width "+e.options.timeout+"ms linear",width:"0%"}),clearTimeout(e.closeTimer),e.closeTimer=setTimeout((function(){e.close()}),e.options.timeout))}function p(e){e.options.timeout&&e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=-1,e.options.progressBar&&e.progressDom&&r.css(e.progressDom,{transition:"width 0ms linear",width:"100%"}))}function f(e,t){e.listeners.hasOwnProperty(t)&&e.listeners[t].forEach((function(t){"function"==typeof t&&t.apply(e)}))}t.Defaults={type:"alert",layout:"topRight",theme:"mint",text:"",timeout:!1,progressBar:!0,closeWith:["click"],animation:{open:"noty_effects_open",close:"noty_effects_close"},id:!1,force:!1,killer:!1,queue:"global",container:!1,buttons:[],callbacks:{beforeShow:null,onShow:null,afterShow:null,onClose:null,afterClose:null,onClick:null,onHover:null,onTemplate:null},sounds:{sources:[],volume:1,conditions:[]},titleCount:{conditions:[]},modal:!1,visibilityControl:!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotyButton=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(n(0));t.NotyButton=function e(t,n,i){var o=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dom=document.createElement("button"),this.dom.innerHTML=t,this.id=s.id=s.id||r.generateID("button"),this.cb=i,Object.keys(s).forEach((function(e){o.dom.setAttribute(e,s[e])})),r.addClass(this.dom,n||"noty_btn"),this}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"/service-worker.js";return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.subData={},this.workerPath=t,this.listeners={onPermissionGranted:[],onPermissionDenied:[],onSubscriptionSuccess:[],onSubscriptionCancel:[],onWorkerError:[],onWorkerSuccess:[],onWorkerNotSupported:[]},this}return r(e,[{key:"on",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return"function"==typeof t&&this.listeners.hasOwnProperty(e)&&this.listeners[e].push(t),this}},{key:"fire",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.listeners.hasOwnProperty(e)&&this.listeners[e].forEach((function(e){"function"==typeof e&&e.apply(t,n)}))}},{key:"create",value:function(){console.log("NOT IMPLEMENTED YET")}},{key:"isSupported",value:function(){var e=!1;try{e=window.Notification||window.webkitNotifications||navigator.mozNotification||window.external&&void 0!==window.external.msIsSiteMode()}catch(e){}return e}},{key:"getPermissionStatus",value:function(){var e="default";if(window.Notification&&window.Notification.permissionLevel)e=window.Notification.permissionLevel;else if(window.webkitNotifications&&window.webkitNotifications.checkPermission)switch(window.webkitNotifications.checkPermission()){case 1:e="default";break;case 0:e="granted";break;default:e="denied"}else window.Notification&&window.Notification.permission?e=window.Notification.permission:navigator.mozNotification?e="granted":window.external&&void 0!==window.external.msIsSiteMode()&&(e=window.external.msIsSiteMode()?"granted":"default");return e.toString().toLowerCase()}},{key:"getEndpoint",value:function(e){var t=e.endpoint,n=e.subscriptionId;return n&&-1===t.indexOf(n)&&(t+="/"+n),t}},{key:"isSWRegistered",value:function(){try{return"activated"===navigator.serviceWorker.controller.state}catch(e){return!1}}},{key:"unregisterWorker",value:function(){var e=this;"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then((function(t){var n=!0,r=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)o.value.unregister(),e.fire("onSubscriptionCancel")}catch(e){r=!0,i=e}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}}))}},{key:"requestSubscription",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this,r=this.getPermissionStatus(),i=function(r){"granted"===r?(e.fire("onPermissionGranted"),"serviceWorker"in navigator?navigator.serviceWorker.register(e.workerPath).then((function(){navigator.serviceWorker.ready.then((function(e){n.fire("onWorkerSuccess"),e.pushManager.subscribe({userVisibleOnly:t}).then((function(e){var t=e.getKey("p256dh"),r=e.getKey("auth");n.subData={endpoint:n.getEndpoint(e),p256dh:t?window.btoa(String.fromCharCode.apply(null,new Uint8Array(t))):null,auth:r?window.btoa(String.fromCharCode.apply(null,new Uint8Array(r))):null},n.fire("onSubscriptionSuccess",[n.subData])})).catch((function(e){n.fire("onWorkerError",[e])}))}))})):n.fire("onWorkerNotSupported")):"denied"===r&&(e.fire("onPermissionDenied"),e.unregisterWorker())};"default"===r?window.Notification&&window.Notification.requestPermission?window.Notification.requestPermission(i):window.webkitNotifications&&window.webkitNotifications.checkPermission&&window.webkitNotifications.requestPermission(i):i(r)}}]),e}()},function(e,t,n){(function(t,r){var i;i=function(){"use strict";function e(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,s=void 0,a=void 0,l=function(e,t){m[o]=e,m[o+1]=t,2===(o+=2)&&(a?a(g):x())},c="undefined"!=typeof window?window:void 0,u=c||{},d=u.MutationObserver||u.WebKitMutationObserver,h="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(g,1)}}var m=new Array(1e3);function g(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=a.deepExtend({},l.Defaults,t),l.Store[this.options.id]?l.Store[this.options.id]:(this.id=this.options.id||a.generateID("bar"),this.closeTimer=-1,this.barDom=null,this.layoutDom=null,this.progressDom=null,this.showing=!1,this.shown=!1,this.closed=!1,this.closing=!1,this.killable=this.options.timeout||this.options.closeWith.length>0,this.hasSound=this.options.sounds.sources.length>0,this.soundPlayed=!1,this.listeners={beforeShow:[],onShow:[],afterShow:[],onClose:[],afterClose:[],onClick:[],onHover:[],onTemplate:[]},this.promises={show:null,close:null},this.on("beforeShow",this.options.callbacks.beforeShow),this.on("onShow",this.options.callbacks.onShow),this.on("afterShow",this.options.callbacks.afterShow),this.on("onClose",this.options.callbacks.onClose),this.on("afterClose",this.options.callbacks.afterClose),this.on("onClick",this.options.callbacks.onClick),this.on("onHover",this.options.callbacks.onHover),this.on("onTemplate",this.options.callbacks.onTemplate),this)}return r(e,[{key:"on",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return"function"==typeof t&&this.listeners.hasOwnProperty(e)&&this.listeners[e].push(t),this}},{key:"show",value:function(){var t=this;if(this.showing||this.shown)return this;!0===this.options.killer?e.closeAll():"string"==typeof this.options.killer&&e.closeAll(this.options.killer);var n=l.getQueueCounts(this.options.queue);if(n.current>=n.maxVisible||l.PageHidden&&this.options.visibilityControl)return l.addToQueue(this),l.PageHidden&&this.hasSound&&a.inArray("docHidden",this.options.sounds.conditions)&&a.createAudioElements(this),l.PageHidden&&a.inArray("docHidden",this.options.titleCount.conditions)&&l.docTitle.increment(),this;if(l.Store[this.id]=this,l.fire(this,"beforeShow"),this.showing=!0,this.closing)return this.showing=!1,this;if(l.build(this),l.handleModal(this),this.options.force?this.layoutDom.insertBefore(this.barDom,this.layoutDom.firstChild):this.layoutDom.appendChild(this.barDom),this.hasSound&&!this.soundPlayed&&a.inArray("docVisible",this.options.sounds.conditions)&&a.createAudioElements(this),a.inArray("docVisible",this.options.titleCount.conditions)&&l.docTitle.increment(),this.shown=!0,this.closed=!1,l.hasButtons(this)&&Object.keys(this.options.buttons).forEach((function(e){var n=t.barDom.querySelector("#"+t.options.buttons[e].id);a.addListener(n,"click",(function(n){a.stopPropagation(n),t.options.buttons[e].cb(t)}))})),this.progressDom=this.barDom.querySelector(".noty_progressbar"),a.inArray("click",this.options.closeWith)&&(a.addClass(this.barDom,"noty_close_with_click"),a.addListener(this.barDom,"click",(function(e){a.stopPropagation(e),l.fire(t,"onClick"),t.close()}),!1)),a.addListener(this.barDom,"mouseenter",(function(){l.fire(t,"onHover")}),!1),this.options.timeout&&a.addClass(this.barDom,"noty_has_timeout"),this.options.progressBar&&a.addClass(this.barDom,"noty_has_progressbar"),a.inArray("button",this.options.closeWith)){a.addClass(this.barDom,"noty_close_with_button");var r=document.createElement("div");a.addClass(r,"noty_close_button"),r.innerHTML="×",this.barDom.appendChild(r),a.addListener(r,"click",(function(e){a.stopPropagation(e),t.close()}),!1)}return l.fire(this,"onShow"),null===this.options.animation.open?this.promises.show=new s.default((function(e){e()})):"function"==typeof this.options.animation.open?this.promises.show=new s.default(this.options.animation.open.bind(this)):(a.addClass(this.barDom,this.options.animation.open),this.promises.show=new s.default((function(e){a.addListener(t.barDom,a.animationEndEvents,(function(){a.removeClass(t.barDom,t.options.animation.open),e()}))}))),this.promises.show.then((function(){var e=t;setTimeout((function(){l.openFlow(e)}),100)})),this}},{key:"stop",value:function(){return l.dequeueClose(this),this}},{key:"resume",value:function(){return l.queueClose(this),this}},{key:"setTimeout",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){if(this.stop(),this.options.timeout=e,this.barDom){this.options.timeout?a.addClass(this.barDom,"noty_has_timeout"):a.removeClass(this.barDom,"noty_has_timeout");var t=this;setTimeout((function(){t.resume()}),100)}return this}))},{key:"setText",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.barDom&&(this.barDom.querySelector(".noty_body").innerHTML=e),t&&(this.options.text=e),this}},{key:"setType",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.barDom&&(a.classList(this.barDom).split(" ").forEach((function(e){"noty_type__"===e.substring(0,11)&&a.removeClass(t.barDom,e)})),a.addClass(this.barDom,"noty_type__"+e)),n&&(this.options.type=e),this}},{key:"setTheme",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.barDom&&(a.classList(this.barDom).split(" ").forEach((function(e){"noty_theme__"===e.substring(0,12)&&a.removeClass(t.barDom,e)})),a.addClass(this.barDom,"noty_theme__"+e)),n&&(this.options.theme=e),this}},{key:"close",value:function(){var e=this;return this.closed?this:this.shown?(l.fire(this,"onClose"),this.closing=!0,null===this.options.animation.close||!1===this.options.animation.close?this.promises.close=new s.default((function(e){e()})):"function"==typeof this.options.animation.close?this.promises.close=new s.default(this.options.animation.close.bind(this)):(a.addClass(this.barDom,this.options.animation.close),this.promises.close=new s.default((function(t){a.addListener(e.barDom,a.animationEndEvents,(function(){e.options.force?a.remove(e.barDom):l.ghostFix(e),t()}))}))),this.promises.close.then((function(){l.closeFlow(e),l.handleModalClose(e)})),this.closed=!0,this):(l.removeFromQueue(this),this)}}],[{key:"closeAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Object.keys(l.Store).forEach((function(t){e?l.Store[t].options.queue===e&&l.Store[t].killable&&l.Store[t].close():l.Store[t].killable&&l.Store[t].close()})),this}},{key:"clearQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"global";return l.Queues.hasOwnProperty(e)&&(l.Queues[e].queue=[]),this}},{key:"overrideDefaults",value:function(e){return l.Defaults=a.deepExtend({},l.Defaults,e),this}},{key:"setMaxVisible",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.DefaultMaxVisible,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global";return l.Queues.hasOwnProperty(t)||(l.Queues[t]={maxVisible:e,queue:[]}),l.Queues[t].maxVisible=e,this}},{key:"button",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new c.NotyButton(e,t,n,r)}},{key:"version",value:function(){return"3.2.0-beta"}},{key:"Push",value:function(e){return new u.Push(e)}},{key:"Queues",get:function(){return l.Queues}},{key:"PageHidden",get:function(){return l.PageHidden}}]),e}();t.default=h,"undefined"!=typeof window&&a.visibilityChangeFlow(),e.exports=t.default},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d1)for(var n=1;n{const{type:t,message:n}=e,r="error"===t||"warning"===t;return`\n `}})},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},998:function(){"use strict";var e,t;e=void 0,t=function(e){e.addTheme("neon",{render:e=>{const{type:t,message:n}=e,r="error"===t||"warning"===t;return`\n `}})},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},1061:function(e,t,n){"use strict";n.d(t,{b:function(){return o}});var r=n(4104);function i(e){0!==e.length&&setTimeout((()=>{e[0](),i(e.slice(1))}),1500)}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=r.A.use(e),o=e.startsWith("theme.");let s={...t},a={...t},l={...t},c={...t};o&&(s={...t,position:"bottom-right"},a={...t,position:"bottom-right"},l={...t,position:"bottom-right"},c={...t,position:"bottom-right"}),n.info("Welcome back","Info",s),["sweetalert"].includes(e)||i([()=>n.error("Oops! Something went wrong!","Error",a),()=>n.warning("Are you sure you want to proceed?","Warning",l),()=>n.success("Data has been saved successfully!","Success",c)])}},1106:function(){"use strict";var e,t;e=void 0,t=function(e){e.addTheme("amazon",{render:e=>{const{type:t,message:n}=e,r="error"===t||"warning"===t;return`\n \n
\n
\n
\n ${(()=>{switch(t){case"success":return'
';case"error":return'
';case"warning":return'
';case"info":return'
'}return""})()}\n
\n
\n
${(()=>{switch(t){case"success":return"Success!";case"error":return"Problem";case"warning":return"Warning";case"info":return"Information";default:return"Alert"}})()}
\n
${n}
\n
\n
\n
\n
\n
`}})},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},1162:function(e,t,n){"use strict";n.r(t);var r=n(2891);t.default=class extends r.xI{connect(){const e=document.getElementById("menu-toggle"),t=document.getElementById("main-navigation"),n=document.getElementById("main-article");function r(e,t){e.classList.contains(t)?e.classList.remove(t):e.classList.add(t)}e.addEventListener("click",(i=>{i.preventDefault(),r(e,"menu-closed"),r(t,"hidden"),r(n,"hidden")}))}}},1180:function(){"use strict";var e,t;e=void 0,t=function(e){e.addTheme("minimal",{render:e=>{const{type:t,message:n}=e,r="error"===t||"warning"===t;return`\n `}})},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},1476:function(e,t,n){"use strict";n.r(t);var r=n(2891),i=n(1061);t.default=class extends r.xI{connect(){(0,i.b)("theme.sapphire")}}},1612:function(){"use strict";var e,t;e=void 0,t=function(e){const t={render:e=>{const{type:t,message:n,title:r}=e,i="error"===t||"warning"===t,o=i?"alert":"status",s=i?"assertive":"polite",a=(new Date).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"}),l=r||"PHPFlasher";return`\n `}};e.addTheme("ios",t)},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},1835:function(e,t,n){"use strict";n.r(t);var r=n(2891);t.default=class extends r.xI{connect(){this.container=document.querySelector("#anchor-navigation"),this.container&&(this.createAnchorNavigation(),this.highlightCurrentAnchor(),this.stickyHeight(),this.setupEventListeners())}createAnchorNavigation(){const e=this.container.querySelector("ul"),t=document.querySelectorAll("#main-article h3, #main-article h2, #main-article a.anchor");0!==t.length?(this.container.classList.add("lg:block"),t.forEach((t=>{const n=this.createNavItem(t);e.appendChild(n)}))):this.container.remove()}createNavItem(e){const t=document.createElement("li");t.className="px-6 rounded w-full","A"===e.tagName&&(t.className="px-12 rounded w-full");const n=document.createElement("a");return n.href="A"===e.tagName?e.hash:`#${e.getAttribute("id")}`,n.innerHTML="A"===e.tagName?e.textContent:`${e.textContent}`,n.className="leading-loose text-md inline-block w-full text-indigo-500",t.appendChild(n),t}highlightCurrentAnchor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.hash;if(0===e.length)return;document.querySelectorAll("a.anchor, #anchor-navigation ul li a").forEach((t=>{const n=t.parentElement;e===t.hash?(t.classList.remove("text-gray-900"),t.classList.add("text-white"),n.classList.add("bg-indigo-500")):(t.classList.add("text-gray-900"),t.classList.remove("text-white"),n.classList.remove("bg-indigo-500"))}))}stickyHeight(){const e=document.querySelector("#main-article");document.querySelectorAll(".sticky").forEach((t=>{if(t.offsetHeight>window.innerHeight&&e&&e.clientHeight>t.offsetHeight){const e=document.createElement("div");e.className="h-screen overflow-y-auto",e.innerHTML=t.innerHTML,t.innerHTML=e.outerHTML}}))}setupEventListeners(){this.container.querySelectorAll("a").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault(),window.location.hash=e.hash,this.highlightCurrentAnchor(e.hash)}))}))}}},1880:function(e,t,n){"use strict";n.r(t);var r=n(2891),i=n(1061);t.default=class extends r.xI{connect(){(0,i.b)("noty")}}},2108:function(e,t,n){"use strict";n.r(t);var r=n(2891),i=n(1061);t.default=class extends r.xI{connect(){(0,i.b)("theme.crystal")}}},2226:function(){"use strict";var e,t;e=void 0,t=function(e){e.addTheme("onyx",{render:e=>{const{type:t,message:n}=e,r="error"===t||"warning"===t;return`\n `}})},"object"==typeof exports&&"undefined"!=typeof module?t(require("@flasher/flasher")):"function"==typeof define&&define.amd?define(["@flasher/flasher"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).flasher)},2240:function(e,t,n){"use strict";var r=n(4104),i=n(113);class o{success(e,t,n){this.flash("success",e,t,n)}error(e,t,n){this.flash("error",e,t,n)}info(e,t,n){this.flash("info",e,t,n)}warning(e,t,n){this.flash("warning",e,t,n)}flash(e,t,n,r){let i,o,s,a={};if("object"==typeof e?(a=Object.assign({},e),i=a.type,o=a.message,s=a.title,delete a.type,delete a.message,delete a.title):"object"==typeof t?(a=Object.assign({},t),i=e,o=a.message,s=a.title,delete a.message,delete a.title):(i=e,o=t,null==n?(s=void 0,a=r||{}):"string"==typeof n?(s=n,a=r||{}):"object"==typeof n&&(a=Object.assign({},n),"title"in a?(s=a.title,delete a.title):s=void 0,r&&"object"==typeof r&&(a=Object.assign(Object.assign({},a),r)))),!i)throw new Error("Type is required for notifications");if(null==o)throw new Error("Message is required for notifications");null==s&&(s=i.charAt(0).toUpperCase()+i.slice(1));const l={type:i,message:o,title:s,options:a,metadata:{plugin:""}};this.renderOptions({}),this.renderEnvelopes([l])}}const s=new class extends o{constructor(){super(...arguments),this.defaultOptions={timeout:1e4}}renderEnvelopes(e){(null==e?void 0:e.length)&&e.forEach((e=>{try{const t=Object.assign({text:e.message,type:e.type},this.defaultOptions);e.options&&Object.assign(t,e.options);const n=new i(t);n.show();const r=n.layoutDom;r&&"object"==typeof r.dataset&&(r.dataset.turboTemporary="")}catch(t){console.error("PHPFlasher Noty: Error rendering notification",t,e)}}))}renderOptions(e){e&&(Object.assign(this.defaultOptions,e),i.overrideDefaults(this.defaultOptions))}};r.A.addPlugin("noty",s)},2304:function(e,t,n){"use strict";var r=n(4104),i=n(4003);class o{success(e,t,n){this.flash("success",e,t,n)}error(e,t,n){this.flash("error",e,t,n)}info(e,t,n){this.flash("info",e,t,n)}warning(e,t,n){this.flash("warning",e,t,n)}flash(e,t,n,r){let i,o,s,a={};if("object"==typeof e?(a=Object.assign({},e),i=a.type,o=a.message,s=a.title,delete a.type,delete a.message,delete a.title):"object"==typeof t?(a=Object.assign({},t),i=e,o=a.message,s=a.title,delete a.message,delete a.title):(i=e,o=t,null==n?(s=void 0,a=r||{}):"string"==typeof n?(s=n,a=r||{}):"object"==typeof n&&(a=Object.assign({},n),"title"in a?(s=a.title,delete a.title):s=void 0,r&&"object"==typeof r&&(a=Object.assign(Object.assign({},a),r)))),!i)throw new Error("Type is required for notifications");if(null==o)throw new Error("Message is required for notifications");null==s&&(s=i.charAt(0).toUpperCase()+i.slice(1));const l={type:i,message:o,title:s,options:a,metadata:{plugin:""}};this.renderOptions({}),this.renderEnvelopes([l])}}const s=new class extends o{renderEnvelopes(e){(null==e?void 0:e.length)&&this.isDependencyAvailable()&&e.forEach((e=>{try{const{message:t,title:n,type:r,options:o}=e,s=i[r](t,n,o);if(s&&s.parent)try{const e=s.parent();e&&"function"==typeof e.attr&&e.attr("data-turbo-temporary","")}catch(e){console.error("PHPFlasher Toastr: Error setting Turbo compatibility",e)}}catch(t){console.error("PHPFlasher Toastr: Error rendering notification",t,e)}}))}renderOptions(e){if(this.isDependencyAvailable())try{i.options=Object.assign({timeOut:e.timeOut||1e4,progressBar:e.progressBar||!0},e)}catch(e){console.error("PHPFlasher Toastr: Error applying options",e)}}isDependencyAvailable(){return!(!window.jQuery&&!window.$)||(console.error("PHPFlasher Toastr: jQuery is required but not loaded. Make sure jQuery is loaded before using Toastr."),!1)}};r.A.addPlugin("toastr",s)},2325:function(e){e.exports=function(){"use strict";function e(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function t(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function n(t,n){return t.get(e(t,n))}function r(e,n,r){t(e,n),n.set(e,r)}function i(t,n,r){return t.set(e(t,n),r),r}const o=100,s={},a=()=>{s.previousActiveElement instanceof HTMLElement?(s.previousActiveElement.focus(),s.previousActiveElement=null):document.body&&document.body.focus()},l=e=>new Promise((t=>{if(!e)return t();const n=window.scrollX,r=window.scrollY;s.restoreFocusTimeout=setTimeout((()=>{a(),t()}),o),window.scrollTo(n,r)})),c="swal2-",u=["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","draggable","dragging"].reduce(((e,t)=>(e[t]=c+t,e)),{}),d=["success","warning","info","question","error"].reduce(((e,t)=>(e[t]=c+t,e)),{}),h="SweetAlert2:",p=e=>e.charAt(0).toUpperCase()+e.slice(1),f=e=>{console.warn(`${h} ${"object"==typeof e?e.join(" "):e}`)},m=e=>{console.error(`${h} ${e}`)},g=[],v=e=>{g.includes(e)||(g.push(e),f(e))},y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;v(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},w=e=>"function"==typeof e?e():e,b=e=>e&&"function"==typeof e.toPromise,x=e=>b(e)?e.toPromise():Promise.resolve(e),k=e=>e&&Promise.resolve(e)===e,E=()=>document.body.querySelector(`.${u.container}`),C=e=>{const t=E();return t?t.querySelector(e):null},A=e=>C(`.${e}`),T=()=>A(u.popup),O=()=>A(u.icon),S=()=>A(u["icon-content"]),$=()=>A(u.title),j=()=>A(u["html-container"]),_=()=>A(u.image),L=()=>A(u["progress-steps"]),M=()=>A(u["validation-message"]),N=()=>C(`.${u.actions} .${u.confirm}`),D=()=>C(`.${u.actions} .${u.cancel}`),P=()=>C(`.${u.actions} .${u.deny}`),F=()=>A(u["input-label"]),B=()=>C(`.${u.loader}`),H=()=>A(u.actions),q=()=>A(u.footer),I=()=>A(u["timer-progress-bar"]),z=()=>A(u.close),R='\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n',V=()=>{const e=T();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort(((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),r=parseInt(t.getAttribute("tabindex")||"0");return n>r?1:n"-1"!==e.getAttribute("tabindex")));return[...new Set(n.concat(i))].filter((e=>ue(e)))},W=()=>Y(document.body,u.shown)&&!Y(document.body,u["toast-shown"])&&!Y(document.body,u["no-backdrop"]),U=()=>{const e=T();return!!e&&Y(e,u.toast)},K=()=>{const e=T();return!!e&&e.hasAttribute("data-loading")},X=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),r=n.querySelector("head");r&&Array.from(r.childNodes).forEach((t=>{e.appendChild(t)}));const i=n.querySelector("body");i&&Array.from(i.childNodes).forEach((t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)}))}},Y=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t{Array.from(e.classList).forEach((n=>{Object.values(u).includes(n)||Object.values(d).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)}))},Q=(e,t,n)=>{if(Z(e,t),!t.customClass)return;const r=t.customClass[n];r&&("string"==typeof r||r.forEach?te(e,r):f(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`))},G=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${u.popup} > .${u[t]}`);case"checkbox":return e.querySelector(`.${u.popup} > .${u.checkbox} input`);case"radio":return e.querySelector(`.${u.popup} > .${u.radio} input:checked`)||e.querySelector(`.${u.popup} > .${u.radio} input:first-child`);case"range":return e.querySelector(`.${u.popup} > .${u.range} input`);default:return e.querySelector(`.${u.popup} > .${u.input}`)}},J=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},ee=(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)})))},te=(e,t)=>{ee(e,t,!0)},ne=(e,t)=>{ee(e,t,!1)},re=(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.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},oe=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"flex";e&&(e.style.display=t)},se=e=>{e&&(e.style.display="none")},ae=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"block";e&&new MutationObserver((()=>{ce(e,e.innerHTML,t)})).observe(e,{childList:!0,subtree:!0})},le=(e,t,n,r)=>{const i=e.querySelector(t);i&&i.style.setProperty(n,r)},ce=function(e,t){t?oe(e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"flex"):se(e)},ue=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),de=()=>!ue(N())&&!ue(P())&&!ue(D()),he=e=>!!(e.scrollHeight>e.clientHeight),pe=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},fe=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=I();n&&ue(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout((()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"}),10))},me=()=>{const e=I();if(!e)return;const 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}%`},ge=()=>"undefined"==typeof window||"undefined"==typeof document,ve=`\n \n`.replace(/(^|\n)\s*/g,""),ye=()=>{const e=E();return!!e&&(e.remove(),ne([document.documentElement,document.body],[u["no-backdrop"],u["toast-shown"],u["has-column"]]),!0)},we=()=>{s.currentInstance.resetValidationMessage()},be=()=>{const e=T(),t=re(e,u.input),n=re(e,u.file),r=e.querySelector(`.${u.range} input`),i=e.querySelector(`.${u.range} output`),o=re(e,u.select),s=e.querySelector(`.${u.checkbox} input`),a=re(e,u.textarea);t.oninput=we,n.onchange=we,o.onchange=we,s.onchange=we,a.oninput=we,r.oninput=()=>{we(),i.value=r.value},r.onchange=()=>{we(),i.value=r.value}},xe=e=>"string"==typeof e?document.querySelector(e):e,ke=e=>{const t=T();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")},Ee=e=>{"rtl"===window.getComputedStyle(e).direction&&te(E(),u.rtl)},Ce=e=>{const t=ye();if(ge())return void m("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=u.container,t&&te(n,u["no-transition"]),X(n,ve),n.dataset.swal2Theme=e.theme;const r=xe(e.target);r.appendChild(n),ke(e),Ee(r),be()},Ae=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?Te(e,t):e&&X(t,e)},Te=(e,t)=>{e.jquery?Oe(t,e):X(t,e.toString())},Oe=(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))},Se=(e,t)=>{const n=H(),r=B();n&&r&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?oe(n):se(n),Q(n,t,"actions"),$e(n,r,t),X(r,t.loaderHtml||""),Q(r,t,"loader"))};function $e(e,t,n){const r=N(),i=P(),o=D();r&&i&&o&&(_e(r,"confirm",n),_e(i,"deny",n),_e(o,"cancel",n),je(r,i,o,n),n.reverseButtons&&(n.toast?(e.insertBefore(o,r),e.insertBefore(i,r)):(e.insertBefore(o,t),e.insertBefore(i,t),e.insertBefore(r,t))))}function je(e,t,n,r){r.buttonsStyling?(te([e,t,n],u.styled),r.confirmButtonColor&&(e.style.backgroundColor=r.confirmButtonColor,te(e,u["default-outline"])),r.denyButtonColor&&(t.style.backgroundColor=r.denyButtonColor,te(t,u["default-outline"])),r.cancelButtonColor&&(n.style.backgroundColor=r.cancelButtonColor,te(n,u["default-outline"]))):ne([e,t,n],u.styled)}function _e(e,t,n){const r=p(t);ce(e,n[`show${r}Button`],"inline-block"),X(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=u[t],Q(e,n,`${t}Button`)}const Le=(e,t)=>{const n=z();n&&(X(n,t.closeButtonHtml||""),Q(n,t,"closeButton"),ce(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))},Me=(e,t)=>{const n=E();n&&(Ne(n,t.backdrop),De(n,t.position),Pe(n,t.grow),Q(n,t,"container"))};function Ne(e,t){"string"==typeof t?e.style.background=t:t||te([document.documentElement,document.body],u["no-backdrop"])}function De(e,t){t&&(t in u?te(e,u[t]):(f('The "position" parameter is not valid, defaulting to "center"'),te(e,u.center)))}function Pe(e,t){t&&te(e,u[`grow-${t}`])}var Fe={innerParams:new WeakMap,domCache:new WeakMap};const Be=["input","file","range","select","radio","checkbox","textarea"],He=(e,t)=>{const n=T();if(!n)return;const r=Fe.innerParams.get(e),i=!r||t.input!==r.input;Be.forEach((e=>{const r=re(n,u[e]);r&&(ze(e,t.inputAttributes),r.className=u[e],i&&se(r))})),t.input&&(i&&qe(t),Re(t))},qe=e=>{if(!e.input)return;if(!Xe[e.input])return void m(`Unexpected type of input! Expected ${Object.keys(Xe).join(" | ")}, got "${e.input}"`);const t=Ue(e.input);if(!t)return;const n=Xe[e.input](t,e);oe(t),e.inputAutoFocus&&setTimeout((()=>{J(n)}))},Ie=e=>{for(let t=0;t{const n=T();if(!n)return;const r=G(n,e);if(r){Ie(r);for(const e in t)r.setAttribute(e,t[e])}},Re=e=>{if(!e.input)return;const t=Ue(e.input);t&&Q(t,e,"input")},Ve=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},We=(e,t,n)=>{if(n.inputLabel){const r=document.createElement("label"),i=u["input-label"];r.setAttribute("for",e.id),r.className=i,"object"==typeof n.customClass&&te(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Ue=e=>{const t=T();if(t)return re(t,u[e]||u.input)},Ke=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:k(t)||f(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Xe={};Xe.text=Xe.email=Xe.password=Xe.number=Xe.tel=Xe.url=Xe.search=Xe.date=Xe["datetime-local"]=Xe.time=Xe.week=Xe.month=(e,t)=>(Ke(e,t.inputValue),We(e,e,t),Ve(e,t),e.type=t.input,e),Xe.file=(e,t)=>(We(e,e,t),Ve(e,t),e),Xe.range=(e,t)=>{const n=e.querySelector("input"),r=e.querySelector("output");return Ke(n,t.inputValue),n.type=t.input,Ke(r,t.inputValue),We(n,e,t),e},Xe.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");X(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return We(e,e,t),e},Xe.radio=e=>(e.textContent="",e),Xe.checkbox=(e,t)=>{const n=G(T(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const r=e.querySelector("span");return X(r,t.inputPlaceholder||t.inputLabel),n},Xe.textarea=(e,t)=>{Ke(e,t.inputValue),Ve(e,t),We(e,e,t);const n=e=>parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight);return setTimeout((()=>{if("MutationObserver"in window){const r=parseInt(window.getComputedStyle(T()).width);new MutationObserver((()=>{if(!document.body.contains(e))return;const i=e.offsetWidth+n(e);i>r?T().style.width=`${i}px`:ie(T(),"width",t.width)})).observe(e,{attributes:!0,attributeFilter:["style"]})}})),e};const Ye=(e,t)=>{const n=j();n&&(ae(n),Q(n,t,"htmlContainer"),t.html?(Ae(t.html,n),oe(n,"block")):t.text?(n.textContent=t.text,oe(n,"block")):se(n),He(e,t))},Ze=(e,t)=>{const n=q();n&&(ae(n),ce(n,t.footer,"block"),t.footer&&Ae(t.footer,n),Q(n,t,"footer"))},Qe=(e,t)=>{const n=Fe.innerParams.get(e),r=O();if(r){if(n&&t.icon===n.icon)return nt(r,t),void Ge(r,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(d).indexOf(t.icon))return m(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void se(r);oe(r),nt(r,t),Ge(r,t),te(r,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Je)}else se(r)}},Ge=(e,t)=>{for(const[n,r]of Object.entries(d))t.icon!==n&&ne(e,r);te(e,t.icon&&d[t.icon]),rt(e,t),Je(),Q(e,t,"icon")},Je=()=>{const e=T();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e \n