window.Modernizr=function(e,t,n){function r(e){b.cssText=e}function o(e,t){return r(S.join(e+";")+(t||""))}function a(e,t){return typeof e===t}function i(e,t){return!!~(""+e).indexOf(t)}function c(e,t){for(var r in e){var o=e[r];if(!i(o,"-")&&b[o]!==n)return"pfx"==t?o:!0}return!1}function s(e,t,r){for(var o in e){var i=t[e[o]];if(i!==n)return r===!1?e[o]:a(i,"function")?i.bind(r||t):i}return!1}function u(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),o=(e+" "+k.join(r+" ")+r).split(" ");return a(t,"string")||a(t,"undefined")?c(o,t):(o=(e+" "+T.join(r+" ")+r).split(" "),s(o,t,n))}function l(){p.input=function(n){for(var r=0,o=n.length;o>r;r++)j[n[r]]=!!(n[r]in E);return j.list&&(j.list=!(!t.createElement("datalist")||!e.HTMLDataListElement)),j}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(e){for(var r,o,a,i=0,c=e.length;c>i;i++)E.setAttribute("type",o=e[i]),r="text"!==E.type,r&&(E.value=x,E.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(o)&&E.style.WebkitAppearance!==n?(g.appendChild(E),a=t.defaultView,r=a.getComputedStyle&&"textfield"!==a.getComputedStyle(E,null).WebkitAppearance&&0!==E.offsetHeight,g.removeChild(E)):/^(search|tel)$/.test(o)||(r=/^(url|email)$/.test(o)?E.checkValidity&&E.checkValidity()===!1:E.value!=x)),P[e[i]]=!!r;return P}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var d,f,m="2.8.3",p={},h=!0,g=t.documentElement,v="modernizr",y=t.createElement(v),b=y.style,E=t.createElement("input"),x=":)",w={}.toString,S=" -webkit- -moz- -o- -ms- ".split(" "),C="Webkit Moz O ms",k=C.split(" "),T=C.toLowerCase().split(" "),N={svg:"//www.w3.org/2000/svg"},M={},P={},j={},$=[],D=$.slice,F=function(e,n,r,o){var a,i,c,s,u=t.createElement("div"),l=t.body,d=l||t.createElement("body");if(parseInt(r,10))for(;r--;)c=t.createElement("div"),c.id=o?o[r]:v+(r+1),u.appendChild(c);return a=["­",'"].join(""),u.id=v,(l?u:d).innerHTML+=a,d.appendChild(u),l||(d.style.background="",d.style.overflow="hidden",s=g.style.overflow,g.style.overflow="hidden",g.appendChild(d)),i=n(u,e),l?u.parentNode.removeChild(u):(d.parentNode.removeChild(d),g.style.overflow=s),!!i},z=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t)&&n(t).matches||!1;var r;return F("@media "+t+" { #"+v+" { position: absolute; } }",function(t){r="absolute"==(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position}),r},A=function(){function e(e,o){o=o||t.createElement(r[e]||"div"),e="on"+e;var i=e in o;return i||(o.setAttribute||(o=t.createElement("div")),o.setAttribute&&o.removeAttribute&&(o.setAttribute(e,""),i=a(o[e],"function"),a(o[e],"undefined")||(o[e]=n),o.removeAttribute(e))),o=null,i}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),L={}.hasOwnProperty;f=a(L,"undefined")||a(L.call,"undefined")?function(e,t){return t in e&&a(e.constructor.prototype[t],"undefined")}:function(e,t){return L.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=D.call(arguments,1),r=function(){if(this instanceof r){var o=function(){};o.prototype=t.prototype;var a=new o,i=t.apply(a,n.concat(D.call(arguments)));return Object(i)===i?i:a}return t.apply(e,n.concat(D.call(arguments)))};return r}),M.flexbox=function(){return u("flexWrap")},M.flexboxlegacy=function(){return u("boxDirection")},M.canvas=function(){var e=t.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))},M.canvastext=function(){return!(!p.canvas||!a(t.createElement("canvas").getContext("2d").fillText,"function"))},M.webgl=function(){return!!e.WebGLRenderingContext},M.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:F(["@media (",S.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n},M.geolocation=function(){return"geolocation"in navigator},M.postmessage=function(){return!!e.postMessage},M.websqldatabase=function(){return!!e.openDatabase},M.indexedDB=function(){return!!u("indexedDB",e)},M.hashchange=function(){return A("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},M.history=function(){return!(!e.history||!history.pushState)},M.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},M.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},M.rgba=function(){return r("background-color:rgba(150,255,150,.5)"),i(b.backgroundColor,"rgba")},M.hsla=function(){return r("background-color:hsla(120,40%,100%,.5)"),i(b.backgroundColor,"rgba")||i(b.backgroundColor,"hsla")},M.multiplebgs=function(){return r("background:url(//),url(//),red url(//)"),/(url\s*\(.*?){3}/.test(b.background)},M.backgroundsize=function(){return u("backgroundSize")},M.borderimage=function(){return u("borderImage")},M.borderradius=function(){return u("borderRadius")},M.boxshadow=function(){return u("boxShadow")},M.textshadow=function(){return""===t.createElement("div").style.textShadow},M.opacity=function(){return o("opacity:.55"),/^0.55$/.test(b.opacity)},M.cssanimations=function(){return u("animationName")},M.csscolumns=function(){return u("columnCount")},M.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return r((e+"-webkit- ".split(" ").join(t+e)+S.join(n+e)).slice(0,-e.length)),i(b.backgroundImage,"gradient")},M.cssreflections=function(){return u("boxReflect")},M.csstransforms=function(){return!!u("transform")},M.csstransforms3d=function(){var e=!!u("perspective");return e&&"webkitPerspective"in g.style&&F("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){e=9===t.offsetLeft&&3===t.offsetHeight}),e},M.csstransitions=function(){return u("transition")},M.fontface=function(){var e;return F('@font-face {font-family:"font";src:url("//")}',function(n,r){var o=t.getElementById("smodernizr"),a=o.sheet||o.styleSheet,i=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"";e=/src/i.test(i)&&0===i.indexOf(r.split(" ")[0])}),e},M.generatedcontent=function(){var e;return F(["#",v,"{font:0/0 a}#",v,':after{content:"',x,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){e=t.offsetHeight>=3}),e},M.video=function(){var e=t.createElement("video"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n},M.audio=function(){var e=t.createElement("audio"),n=!1;try{(n=!!e.canPlayType)&&(n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n},M.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},M.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},M.webworkers=function(){return!!e.Worker},M.applicationcache=function(){return!!e.applicationCache},M.svg=function(){return!!t.createElementNS&&!!t.createElementNS(N.svg,"svg").createSVGRect},M.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="",(e.firstChild&&e.firstChild.namespaceURI)==N.svg},M.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(w.call(t.createElementNS(N.svg,"animate")))},M.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(w.call(t.createElementNS(N.svg,"clipPath")))};for(var H in M)f(M,H)&&(d=H.toLowerCase(),p[d]=M[H](),$.push((p[d]?"":"no-")+d));return p.input||l(),p.addTest=function(e,t){if("object"==typeof e)for(var r in e)f(e,r)&&p.addTest(r,e[r]);else{if(e=e.toLowerCase(),p[e]!==n)return p;t="function"==typeof t?t():t,"undefined"!=typeof h&&h&&(g.className+=" "+(t?"":"no-")+e),p[e]=t}return p},r(""),y=E=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=y.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=v[e[h]];return t||(t={},g++,e[h]=g,v[g]=t),t}function a(e,n,r){if(n||(n=t),l)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():p.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function i(e,n){if(e||(e=t),l)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,c=r(),s=c.length;s>i;i++)a.createElement(c[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return y.shivMethods?a(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(y,t.frag)}function s(e){e||(e=t);var r=o(e);return!y.shivCSS||u||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||c(e,r),e}var u,l,d="3.7.0",f=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",g=0,v={};!function(){try{var e=t.createElement("a");e.innerHTML="",u="hidden"in e,l=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){u=!0,l=!0}}();var y={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:d,shivCSS:f.shivCSS!==!1,supportsUnknownElements:l,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:s,createElement:a,createDocumentFragment:i};e.html5=y,s(t)}(this,t),p._version=m,p._prefixes=S,p._domPrefixes=T,p._cssomPrefixes=k,p.mq=z,p.hasEvent=A,p.testProp=function(e){return c([e])},p.testAllProps=u,p.testStyles=F,p.prefixed=function(e,t,n){return t?u(e,t,n):u(e,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(h?" js "+$.join(" "):""),p}(this,this.document); "use strict"; var CONFIG = { isNavMenuVerticalCollapsed: true, //theme: 'light', }; Object.keys(CONFIG).forEach(function (key) { if (localStorage.getItem(key) === null) { localStorage.setItem(key, CONFIG[key]); } }); /*if (localStorage.getItem('theme') === 'dark') { //document.documentElement.classList.add('dark'); document.documentElement.classList.add('light'); }*/ var _excluded = ["endValue"]; function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } /* -------------------------------------------------------------------------- */ /* Utils */ /* -------------------------------------------------------------------------- */ //var docReady = function docReady(fn, d) { // // // if (document.readyState === 'loading') { // document.addEventListener('DOMContentLoaded', fn(d)); // } else { // setTimeout(fn(d), 1); // } //}; var docReady = function docReady(fn, d) { if (d) { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn(d)); } else { setTimeout(fn(d), 1); } } else { if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', fn); } else { setTimeout(fn, 1); } } }; var camelize = function camelize(str) { var text = str.replace(/[-_\s.]+(.)?/g, function (_, c) { return c ? c.toUpperCase() : ''; }); return "".concat(text.substr(0, 1).toLowerCase()).concat(text.substr(1)); }; var getData = function getData(el, data) { try { return JSON.parse(el.dataset[camelize(data)]); } catch (e) { return el.dataset[camelize(data)]; } }; /* -------------------------------------------------------------------------- */ /* Tooltip */ /* -------------------------------------------------------------------------- */ var tooltipInit = function tooltipInit() { var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); tooltipTriggerList.map(function (tooltipTriggerEl) { return new window.bootstrap.Tooltip(tooltipTriggerEl, { trigger: 'hover' }); }); }; docReady(tooltipInit); $("[data-toggle='tooltip']").each("click", function () { $(this).tooltip('destroy'); }); /* -------------------------------------------------------------------------- */ /* popperjs/core v2.10.1 - MIT License */ "use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Popper={})}(this,(function(e){function t(e){return null==e?window:"[object Window]"!==e.toString()?(e=e.ownerDocument)&&e.defaultView||window:e}function n(e){return e instanceof t(e).Element||e instanceof Element}function o(e){return e instanceof t(e).HTMLElement||e instanceof HTMLElement}function r(e){return"undefined"!=typeof ShadowRoot&&(e instanceof t(e).ShadowRoot||e instanceof ShadowRoot)}function i(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;return o(e)&&t&&(t=e.offsetHeight,0<(e=e.offsetWidth)&&(r=n.width/e||1),0=Math.abs(t.width-n)&&(n=t.width),1>=Math.abs(t.height-o)&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function h(e){return"html"===s(e)?e:e.assignedSlot||e.parentNode||(r(e)?e.host:null)||f(e)}function m(e){return 0<=["html","body","#document"].indexOf(s(e))?e.ownerDocument.body:o(e)&&l(e)?e:m(h(e))}function v(e,n){var o;void 0===n&&(n=[]);var r=m(e);return e=r===(null==(o=e.ownerDocument)?void 0:o.body),o=t(r),r=e?[o].concat(o.visualViewport||[],l(r)?r:[]):r,n=n.concat(r),e?n:n.concat(v(h(r)))}function g(e){return o(e)&&"fixed"!==c(e).position?e.offsetParent:null}function b(e){for(var n=t(e),r=g(e);r&&0<=["table","td","th"].indexOf(s(r))&&"static"===c(r).position;)r=g(r);if(r&&("html"===s(r)||"body"===s(r)&&"static"===c(r).position))return n;if(!r)e:{if(r=-1!==navigator.userAgent.toLowerCase().indexOf("firefox"),-1===navigator.userAgent.indexOf("Trident")||!o(e)||"fixed"!==c(e).position)for(e=h(e);o(e)&&0>["html","body"].indexOf(s(e));){var i=c(e);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||r&&"filter"===i.willChange||r&&i.filter&&"none"!==i.filter){r=e;break e}e=e.parentNode}r=null}return r||n}function y(e){function t(e){o.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){o.has(e)||(e=n.get(e))&&t(e)})),r.push(e)}var n=new Map,o=new Set,r=[];return e.forEach((function(e){n.set(e.name,e)})),e.forEach((function(e){o.has(e.name)||t(e)})),r}function w(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function x(e){return e.split("-")[0]}function O(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&r(n))do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function j(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function E(e,n){if("viewport"===n){n=t(e);var r=f(e);n=n.visualViewport;var s=r.clientWidth;r=r.clientHeight;var l=0,u=0;n&&(s=n.width,r=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(l=n.offsetLeft,u=n.offsetTop)),e=j(e={width:s,height:r,x:l+p(e),y:u})}else o(n)?((e=i(n)).top+=n.clientTop,e.left+=n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top):(u=f(e),e=f(u),s=a(u),n=null==(r=u.ownerDocument)?void 0:r.body,r=z(e.scrollWidth,e.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),l=z(e.scrollHeight,e.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),u=-s.scrollLeft+p(u),s=-s.scrollTop,"rtl"===c(n||e).direction&&(u+=z(e.clientWidth,n?n.clientWidth:0)-r),e=j({width:r,height:l,x:u,y:s}));return e}function D(e,t,r){return t="clippingParents"===t?function(e){var t=v(h(e)),r=0<=["absolute","fixed"].indexOf(c(e).position)&&o(e)?b(e):e;return n(r)?t.filter((function(e){return n(e)&&O(e,r)&&"body"!==s(e)})):[]}(e):[].concat(t),(r=(r=[].concat(t,[r])).reduce((function(t,n){return n=E(e,n),t.top=z(n.top,t.top),t.right=F(n.right,t.right),t.bottom=F(n.bottom,t.bottom),t.left=z(n.left,t.left),t}),E(e,r[0]))).width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function L(e){return e.split("-")[1]}function M(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function P(e){var t=e.reference,n=e.element,o=(e=e.placement)?x(e):null;e=e?L(e):null;var r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2;switch(o){case"top":r={x:r,y:t.y-n.height};break;case"bottom":r={x:r,y:t.y+t.height};break;case"right":r={x:t.x+t.width,y:i};break;case"left":r={x:t.x-n.width,y:i};break;default:r={x:t.x,y:t.y}}if(null!=(o=o?M(o):null))switch(i="y"===o?"height":"width",e){case"start":r[o]-=t[i]/2-n[i]/2;break;case"end":r[o]+=t[i]/2-n[i]/2}return r}function k(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function W(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function A(e,t){void 0===t&&(t={});var o=t;t=void 0===(t=o.placement)?e.placement:t;var r=o.boundary,a=void 0===r?"clippingParents":r,s=void 0===(r=o.rootBoundary)?"viewport":r;r=void 0===(r=o.elementContext)?"popper":r;var p=o.altBoundary,c=void 0!==p&&p;o=k("number"!=typeof(o=void 0===(o=o.padding)?0:o)?o:W(o,V)),p=e.rects.popper,a=D(n(c=e.elements[c?"popper"===r?"reference":"popper":r])?c:c.contextElement||f(e.elements.popper),a,s),c=P({reference:s=i(e.elements.reference),element:p,strategy:"absolute",placement:t}),p=j(Object.assign({},p,c)),s="popper"===r?p:s;var l={top:a.top-s.top+o.top,bottom:s.bottom-a.bottom+o.bottom,left:a.left-s.left+o.left,right:s.right-a.right+o.right};if(e=e.modifiersData.offset,"popper"===r&&e){var u=e[t];Object.keys(l).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,n=0<=["top","bottom"].indexOf(e)?"y":"x";l[e]+=u[n]*t}))}return l}function B(){for(var e=arguments.length,t=Array(e),n=0;n=(y.devicePixelRatio||1)?"translate("+e+"px, "+d+"px)":"translate3d("+e+"px, "+d+"px, 0)",m)):Object.assign({},o,((n={})[g]=s?d+"px":"",n[v]=h?e+"px":"",n.transform="",n))}function R(e){return e.replace(/left|right|bottom|top/g,(function(e){return te[e]}))}function S(e){return e.replace(/start|end/g,(function(e){return ne[e]}))}function C(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 q(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var N=Math.round,V=["top","bottom","right","left"],I=V.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),_=[].concat(V,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),U="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),z=Math.max,F=Math.min,X=Math.round,Y={placement:"bottom",modifiers:[],strategy:"absolute"},G={passive:!0},J={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var n=e.state,o=e.instance,r=(e=e.options).scroll,i=void 0===r||r,a=void 0===(e=e.resize)||e,s=t(n.elements.popper),f=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",o.update,G)})),a&&s.addEventListener("resize",o.update,G),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",o.update,G)})),a&&s.removeEventListener("resize",o.update,G)}},data:{}},K={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=P({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},Q={top:"auto",right:"auto",bottom:"auto",left:"auto"},Z={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options;e=void 0===(e=n.gpuAcceleration)||e;var o=n.adaptive;o=void 0===o||o,n=void 0===(n=n.roundOffsets)||n,e={placement:x(t.placement),variation:L(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,T(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:n})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,T(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:n})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},$={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];o(i)&&s(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{}),o(r)&&s(r)&&(Object.assign(r.style,e),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.name,o=void 0===(e=e.options.offset)?[0,0]:e,r=(e=_.reduce((function(e,n){var r=t.rects,i=x(n),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof o?o(Object.assign({},r,{placement:n})):o;return r=(r=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:r}:{x:r,y:s},e[n]=i,e}),{}))[t.placement],i=r.x;r=r.y,null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=r),t.modifiersData[n]=e}},te={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"},oe={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options;if(e=e.name,!t.modifiersData[e]._skip){var o=n.mainAxis;o=void 0===o||o;var r=n.altAxis;r=void 0===r||r;var i=n.fallbackPlacements,a=n.padding,s=n.boundary,f=n.rootBoundary,p=n.altBoundary,c=n.flipVariations,l=void 0===c||c,u=n.allowedAutoPlacements;c=x(n=t.options.placement),i=i||(c!==n&&l?function(e){if("auto"===x(e))return[];var t=R(e);return[S(e),t,S(t)]}(n):[R(n)]);var d=[n].concat(i).reduce((function(e,n){return e.concat("auto"===x(n)?function(e,t){void 0===t&&(t={});var n=t.boundary,o=t.rootBoundary,r=t.padding,i=t.flipVariations,a=t.allowedAutoPlacements,s=void 0===a?_:a,f=L(t.placement);0===(i=(t=f?i?I:I.filter((function(e){return L(e)===f})):V).filter((function(e){return 0<=s.indexOf(e)}))).length&&(i=t);var p=i.reduce((function(t,i){return t[i]=A(e,{placement:i,boundary:n,rootBoundary:o,padding:r})[x(i)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:s,rootBoundary:f,padding:a,flipVariations:l,allowedAutoPlacements:u}):n)}),[]);n=t.rects.reference,i=t.rects.popper;var h=new Map;c=!0;for(var m=d[0],v=0;vi[O]&&(y=R(y)),O=R(y),w=[],o&&w.push(0>=j[b]),r&&w.push(0>=j[y],0>=j[O]),w.every((function(e){return e}))){m=g,c=!1;break}h.set(g,w)}if(c)for(o=function(e){var t=d.find((function(t){if(t=h.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return m=t,"break"},r=l?3:1;0 t[i] }) } return e.default = t, Object.freeze(e) } const i = e(t), s = "transitionend", n = t => { let e = t.getAttribute("data-bs-target"); if (!e || "#" === e) { let i = t.getAttribute("href"); if (!i || !i.includes("#") && !i.startsWith(".")) return null; i.includes("#") && !i.startsWith("#") && (i = `#${i.split("#")[1]}`), e = i && "#" !== i ? i.trim() : null } return e }, o = t => { const e = n(t); return e && document.querySelector(e) ? e : null }, r = t => { const e = n(t); return e ? document.querySelector(e) : null }, a = t => { t.dispatchEvent(new Event(s)) }, l = t => !(!t || "object" != typeof t) && (void 0 !== t.jquery && (t = t[0]), void 0 !== t.nodeType), c = t => l(t) ? t.jquery ? t[0] : t : "string" == typeof t && t.length > 0 ? document.querySelector(t) : null, h = t => { if (!l(t) || 0 === t.getClientRects().length) return !1; const e = "visible" === getComputedStyle(t).getPropertyValue("visibility"), i = t.closest("details:not([open])"); if (!i) return e; if (i !== t) { const e = t.closest("summary"); if (e && e.parentNode !== i) return !1; if (null === e) return !1 } return e }, d = t => !t || t.nodeType !== Node.ELEMENT_NODE || !!t.classList.contains("disabled") || (void 0 !== t.disabled ? t.disabled : t.hasAttribute("disabled") && "false" !== t.getAttribute("disabled")), u = t => { if (!document.documentElement.attachShadow) return null; if ("function" == typeof t.getRootNode) { const e = t.getRootNode(); return e instanceof ShadowRoot ? e : null } return t instanceof ShadowRoot ? t : t.parentNode ? u(t.parentNode) : null }, _ = () => { }, g = t => { t.offsetHeight }, f = () => window.jQuery && !document.body.hasAttribute("data-bs-no-jquery") ? window.jQuery : null, p = [], m = () => "rtl" === document.documentElement.dir, b = t => { var e; e = () => { const e = f(); if (e) { const i = t.NAME, s = e.fn[i]; e.fn[i] = t.jQueryInterface, e.fn[i].Constructor = t, e.fn[i].noConflict = () => (e.fn[i] = s, t.jQueryInterface) } }, "loading" === document.readyState ? (p.length || document.addEventListener("DOMContentLoaded", (() => { for (const t of p) t() })), p.push(e)) : e() }, v = t => { "function" == typeof t && t() }, y = (t, e, i = !0) => { if (!i) return void v(t); const n = (t => { if (!t) return 0; let { transitionDuration: e, transitionDelay: i } = window.getComputedStyle(t); const s = Number.parseFloat(e), n = Number.parseFloat(i); return s || n ? (e = e.split(",")[0], i = i.split(",")[0], 1e3 * (Number.parseFloat(e) + Number.parseFloat(i))) : 0 })(e) + 5; let o = !1; const r = ({ target: i }) => { i === e && (o = !0, e.removeEventListener(s, r), v(t)) }; e.addEventListener(s, r), setTimeout((() => { o || a(e) }), n) }, w = (t, e, i, s) => { const n = t.length; let o = t.indexOf(e); return -1 === o ? !i && s ? t[n - 1] : t[0] : (o += i ? 1 : -1, s && (o = (o + n) % n), t[Math.max(0, Math.min(o, n - 1))]) }, A = /[^.]*(?=\..*)\.|.*/, E = /\..*/, C = /::\d+$/, T = {}; let k = 1; const L = { mouseenter: "mouseover", mouseleave: "mouseout" }, O = 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 I(t, e) { return e && `${e}::${k++}` || t.uidEvent || k++ } function S(t) { const e = I(t); return t.uidEvent = e, T[e] = T[e] || {}, T[e] } function D(t, e, i = null) { return Object.values(t).find((t => t.callable === e && t.delegationSelector === i)) } function N(t, e, i) { const s = "string" == typeof e, n = s ? i : e || i; let o = j(t); return O.has(o) || (o = t), [s, n, o] } function P(t, e, i, s, n) { if ("string" != typeof e || !t) return; let [o, r, a] = N(e, i, s); if (e in L) { const t = t => function (e) { if (!e.relatedTarget || e.relatedTarget !== e.delegateTarget && !e.delegateTarget.contains(e.relatedTarget)) return t.call(this, e) }; r = t(r) } const l = S(t), c = l[a] || (l[a] = {}), h = D(c, r, o ? i : null); if (h) return void (h.oneOff = h.oneOff && n); const d = I(r, e.replace(A, "")), u = o ? function (t, e, i) { return function s(n) { const o = t.querySelectorAll(e); for (let { target: r } = n; r && r !== this; r = r.parentNode)for (const a of o) if (a === r) return F(n, { delegateTarget: r }), s.oneOff && $.off(t, n.type, e, i), i.apply(r, [n]) } }(t, i, r) : function (t, e) { return function i(s) { return F(s, { delegateTarget: t }), i.oneOff && $.off(t, s.type, e), e.apply(t, [s]) } }(t, r); u.delegationSelector = o ? i : null, u.callable = r, u.oneOff = n, u.uidEvent = d, c[d] = u, t.addEventListener(a, u, o) } function x(t, e, i, s, n) { const o = D(e[i], s, n); o && (t.removeEventListener(i, o, Boolean(n)), delete e[i][o.uidEvent]) } function M(t, e, i, s) { const n = e[i] || {}; for (const o of Object.keys(n)) if (o.includes(s)) { const s = n[o]; x(t, e, i, s.callable, s.delegationSelector) } } function j(t) { return t = t.replace(E, ""), L[t] || t } const $ = { on(t, e, i, s) { P(t, e, i, s, !1) }, one(t, e, i, s) { P(t, e, i, s, !0) }, off(t, e, i, s) { if ("string" != typeof e || !t) return; const [n, o, r] = N(e, i, s), a = r !== e, l = S(t), c = l[r] || {}, h = e.startsWith("."); if (void 0 === o) { if (h) for (const i of Object.keys(l)) M(t, l, i, e.slice(1)); for (const i of Object.keys(c)) { const s = i.replace(C, ""); if (!a || e.includes(s)) { const e = c[i]; x(t, l, r, e.callable, e.delegationSelector) } } } else { if (!Object.keys(c).length) return; x(t, l, r, o, n ? i : null) } }, trigger(t, e, i) { if ("string" != typeof e || !t) return null; const s = f(); let n = null, o = !0, r = !0, a = !1; e !== j(e) && s && (n = s.Event(e, i), s(t).trigger(n), o = !n.isPropagationStopped(), r = !n.isImmediatePropagationStopped(), a = n.isDefaultPrevented()); let l = new Event(e, { bubbles: o, cancelable: !0 }); return l = F(l, i), a && l.preventDefault(), r && t.dispatchEvent(l), l.defaultPrevented && n && n.preventDefault(), l } }; function F(t, e) { for (const [i, s] of Object.entries(e || {})) try { t[i] = s } catch (e) { Object.defineProperty(t, i, { configurable: !0, get: () => s }) } return t } const z = new Map, H = { set(t, e, i) { z.has(t) || z.set(t, new Map); const s = z.get(t); s.has(e) || 0 === s.size ? s.set(e, i) : console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`) }, get: (t, e) => z.has(t) && z.get(t).get(e) || null, remove(t, e) { if (!z.has(t)) return; const i = z.get(t); i.delete(e), 0 === i.size && z.delete(t) } }; function q(t) { if ("true" === t) return !0; if ("false" === t) return !1; if (t === Number(t).toString()) return Number(t); if ("" === t || "null" === t) return null; if ("string" != typeof t) return t; try { return JSON.parse(decodeURIComponent(t)) } catch (e) { return t } } function B(t) { return t.replace(/[A-Z]/g, (t => `-${t.toLowerCase()}`)) } const W = { setDataAttribute(t, e, i) { t.setAttribute(`data-bs-${B(e)}`, i) }, removeDataAttribute(t, e) { t.removeAttribute(`data-bs-${B(e)}`) }, getDataAttributes(t) { if (!t) return {}; const e = {}, i = Object.keys(t.dataset).filter((t => t.startsWith("bs") && !t.startsWith("bsConfig"))); for (const s of i) { let i = s.replace(/^bs/, ""); i = i.charAt(0).toLowerCase() + i.slice(1, i.length), e[i] = q(t.dataset[s]) } return e }, getDataAttribute: (t, e) => q(t.getAttribute(`data-bs-${B(e)}`)) }; class R { 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(t) { return t = this._mergeConfigObj(t), t = this._configAfterMerge(t), this._typeCheckConfig(t), t } _configAfterMerge(t) { return t } _mergeConfigObj(t, e) { const i = l(e) ? W.getDataAttribute(e, "config") : {}; return { ...this.constructor.Default, ..."object" == typeof i ? i : {}, ...l(e) ? W.getDataAttributes(e) : {}, ..."object" == typeof t ? t : {} } } _typeCheckConfig(t, e = this.constructor.DefaultType) { for (const s of Object.keys(e)) { const n = e[s], o = t[s], r = l(o) ? "element" : null == (i = o) ? `${i}` : Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase(); if (!new RegExp(n).test(r)) throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`) } var i } } class V extends R { constructor(t, e) { super(), (t = c(t)) && (this._element = t, this._config = this._getConfig(e), H.set(this._element, this.constructor.DATA_KEY, this)) } dispose() { H.remove(this._element, this.constructor.DATA_KEY), $.off(this._element, this.constructor.EVENT_KEY); for (const t of Object.getOwnPropertyNames(this)) this[t] = null } _queueCallback(t, e, i = !0) { y(t, e, i) } _getConfig(t) { return t = this._mergeConfigObj(t, this._element), t = this._configAfterMerge(t), this._typeCheckConfig(t), t } static getInstance(t) { return H.get(c(t), this.DATA_KEY) } static getOrCreateInstance(t, e = {}) { return this.getInstance(t) || new this(t, "object" == typeof e ? e : null) } static get VERSION() { return "5.2.2" } static get DATA_KEY() { return `bs.${this.NAME}` } static get EVENT_KEY() { return `.${this.DATA_KEY}` } static eventName(t) { return `${t}${this.EVENT_KEY}` } } const K = (t, e = "hide") => { const i = `click.dismiss${t.EVENT_KEY}`, s = t.NAME; $.on(document, i, `[data-bs-dismiss="${s}"]`, (function (i) { if (["A", "AREA"].includes(this.tagName) && i.preventDefault(), d(this)) return; const n = r(this) || this.closest(`.${s}`); t.getOrCreateInstance(n)[e]() })) }; class Q extends V { static get NAME() { return "alert" } close() { if ($.trigger(this._element, "close.bs.alert").defaultPrevented) return; this._element.classList.remove("show"); const t = this._element.classList.contains("fade"); this._queueCallback((() => this._destroyElement()), this._element, t) } _destroyElement() { this._element.remove(), $.trigger(this._element, "closed.bs.alert"), this.dispose() } static jQueryInterface(t) { return this.each((function () { const e = Q.getOrCreateInstance(this); if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t](this) } })) } } K(Q, "close"), b(Q); const X = '[data-bs-toggle="button"]'; class Y extends V { static get NAME() { return "button" } toggle() { this._element.setAttribute("aria-pressed", this._element.classList.toggle("active")) } static jQueryInterface(t) { return this.each((function () { const e = Y.getOrCreateInstance(this); "toggle" === t && e[t]() })) } } $.on(document, "click.bs.button.data-api", X, (t => { t.preventDefault(); const e = t.target.closest(X); Y.getOrCreateInstance(e).toggle() })), b(Y); const U = { find: (t, e = document.documentElement) => [].concat(...Element.prototype.querySelectorAll.call(e, t)), findOne: (t, e = document.documentElement) => Element.prototype.querySelector.call(e, t), children: (t, e) => [].concat(...t.children).filter((t => t.matches(e))), parents(t, e) { const i = []; let s = t.parentNode.closest(e); for (; s;)i.push(s), s = s.parentNode.closest(e); return i }, prev(t, e) { let i = t.previousElementSibling; for (; i;) { if (i.matches(e)) return [i]; i = i.previousElementSibling } return [] }, next(t, e) { let i = t.nextElementSibling; for (; i;) { if (i.matches(e)) return [i]; i = i.nextElementSibling } return [] }, focusableChildren(t) { const e = ["a", "button", "input", "textarea", "select", "details", "[tabindex]", '[contenteditable="true"]'].map((t => `${t}:not([tabindex^="-"])`)).join(","); return this.find(e, t).filter((t => !d(t) && h(t))) } }, G = { endCallback: null, leftCallback: null, rightCallback: null }, J = { endCallback: "(function|null)", leftCallback: "(function|null)", rightCallback: "(function|null)" }; class Z extends R { constructor(t, e) { super(), this._element = t, t && Z.isSupported() && (this._config = this._getConfig(e), this._deltaX = 0, this._supportPointerEvents = Boolean(window.PointerEvent), this._initEvents()) } static get Default() { return G } static get DefaultType() { return J } static get NAME() { return "swipe" } dispose() { $.off(this._element, ".bs.swipe") } _start(t) { this._supportPointerEvents ? this._eventIsPointerPenTouch(t) && (this._deltaX = t.clientX) : this._deltaX = t.touches[0].clientX } _end(t) { this._eventIsPointerPenTouch(t) && (this._deltaX = t.clientX - this._deltaX), this._handleSwipe(), v(this._config.endCallback) } _move(t) { this._deltaX = t.touches && t.touches.length > 1 ? 0 : t.touches[0].clientX - this._deltaX } _handleSwipe() { const t = Math.abs(this._deltaX); if (t <= 40) return; const e = t / this._deltaX; this._deltaX = 0, e && v(e > 0 ? this._config.rightCallback : this._config.leftCallback) } _initEvents() { this._supportPointerEvents ? ($.on(this._element, "pointerdown.bs.swipe", (t => this._start(t))), $.on(this._element, "pointerup.bs.swipe", (t => this._end(t))), this._element.classList.add("pointer-event")) : ($.on(this._element, "touchstart.bs.swipe", (t => this._start(t))), $.on(this._element, "touchmove.bs.swipe", (t => this._move(t))), $.on(this._element, "touchend.bs.swipe", (t => this._end(t)))) } _eventIsPointerPenTouch(t) { return this._supportPointerEvents && ("pen" === t.pointerType || "touch" === t.pointerType) } static isSupported() { return "ontouchstart" in document.documentElement || navigator.maxTouchPoints > 0 } } const tt = "next", et = "prev", it = "left", st = "right", nt = "slid.bs.carousel", ot = "carousel", rt = "active", at = { ArrowLeft: st, ArrowRight: it }, lt = { interval: 5e3, keyboard: !0, pause: "hover", ride: !1, touch: !0, wrap: !0 }, ct = { interval: "(number|boolean)", keyboard: "boolean", pause: "(string|boolean)", ride: "(boolean|string)", touch: "boolean", wrap: "boolean" }; class ht extends V { constructor(t, e) { super(t, e), this._interval = null, this._activeElement = null, this._isSliding = !1, this.touchTimeout = null, this._swipeHelper = null, this._indicatorsElement = U.findOne(".carousel-indicators", this._element), this._addEventListeners(), this._config.ride === ot && this.cycle() } static get Default() { return lt } static get DefaultType() { return ct } static get NAME() { return "carousel" } next() { this._slide(tt) } nextWhenVisible() { !document.hidden && h(this._element) && this.next() } prev() { this._slide(et) } pause() { this._isSliding && a(this._element), this._clearInterval() } cycle() { this._clearInterval(), this._updateInterval(), this._interval = setInterval((() => this.nextWhenVisible()), this._config.interval) } _maybeEnableCycle() { this._config.ride && (this._isSliding ? $.one(this._element, nt, (() => this.cycle())) : this.cycle()) } to(t) { const e = this._getItems(); if (t > e.length - 1 || t < 0) return; if (this._isSliding) return void $.one(this._element, nt, (() => this.to(t))); const i = this._getItemIndex(this._getActive()); if (i === t) return; const s = t > i ? tt : et; this._slide(s, e[t]) } dispose() { this._swipeHelper && this._swipeHelper.dispose(), super.dispose() } _configAfterMerge(t) { return t.defaultInterval = t.interval, t } _addEventListeners() { this._config.keyboard && $.on(this._element, "keydown.bs.carousel", (t => this._keydown(t))), "hover" === this._config.pause && ($.on(this._element, "mouseenter.bs.carousel", (() => this.pause())), $.on(this._element, "mouseleave.bs.carousel", (() => this._maybeEnableCycle()))), this._config.touch && Z.isSupported() && this._addTouchEventListeners() } _addTouchEventListeners() { for (const t of U.find(".carousel-item img", this._element)) $.on(t, "dragstart.bs.carousel", (t => t.preventDefault())); const t = { leftCallback: () => this._slide(this._directionToOrder(it)), rightCallback: () => this._slide(this._directionToOrder(st)), endCallback: () => { "hover" === this._config.pause && (this.pause(), this.touchTimeout && clearTimeout(this.touchTimeout), this.touchTimeout = setTimeout((() => this._maybeEnableCycle()), 500 + this._config.interval)) } }; this._swipeHelper = new Z(this._element, t) } _keydown(t) { if (/input|textarea/i.test(t.target.tagName)) return; const e = at[t.key]; e && (t.preventDefault(), this._slide(this._directionToOrder(e))) } _getItemIndex(t) { return this._getItems().indexOf(t) } _setActiveIndicatorElement(t) { if (!this._indicatorsElement) return; const e = U.findOne(".active", this._indicatorsElement); e.classList.remove(rt), e.removeAttribute("aria-current"); const i = U.findOne(`[data-bs-slide-to="${t}"]`, this._indicatorsElement); i && (i.classList.add(rt), i.setAttribute("aria-current", "true")) } _updateInterval() { const t = this._activeElement || this._getActive(); if (!t) return; const e = Number.parseInt(t.getAttribute("data-bs-interval"), 10); this._config.interval = e || this._config.defaultInterval } _slide(t, e = null) { if (this._isSliding) return; const i = this._getActive(), s = t === tt, n = e || w(this._getItems(), i, s, this._config.wrap); if (n === i) return; const o = this._getItemIndex(n), r = e => $.trigger(this._element, e, { relatedTarget: n, direction: this._orderToDirection(t), from: this._getItemIndex(i), to: o }); if (r("slide.bs.carousel").defaultPrevented) return; if (!i || !n) return; const a = Boolean(this._interval); this.pause(), this._isSliding = !0, this._setActiveIndicatorElement(o), this._activeElement = n; const l = s ? "carousel-item-start" : "carousel-item-end", c = s ? "carousel-item-next" : "carousel-item-prev"; n.classList.add(c), g(n), i.classList.add(l), n.classList.add(l), this._queueCallback((() => { n.classList.remove(l, c), n.classList.add(rt), i.classList.remove(rt, c, l), this._isSliding = !1, r(nt) }), i, this._isAnimated()), a && this.cycle() } _isAnimated() { return this._element.classList.contains("slide") } _getActive() { return U.findOne(".active.carousel-item", this._element) } _getItems() { return U.find(".carousel-item", this._element) } _clearInterval() { this._interval && (clearInterval(this._interval), this._interval = null) } _directionToOrder(t) { return m() ? t === it ? et : tt : t === it ? tt : et } _orderToDirection(t) { return m() ? t === et ? it : st : t === et ? st : it } static jQueryInterface(t) { return this.each((function () { const e = ht.getOrCreateInstance(this, t); if ("number" != typeof t) { if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t]() } } else e.to(t) })) } } $.on(document, "click.bs.carousel.data-api", "[data-bs-slide], [data-bs-slide-to]", (function (t) { const e = r(this); if (!e || !e.classList.contains(ot)) return; t.preventDefault(); const i = ht.getOrCreateInstance(e), s = this.getAttribute("data-bs-slide-to"); return s ? (i.to(s), void i._maybeEnableCycle()) : "next" === W.getDataAttribute(this, "slide") ? (i.next(), void i._maybeEnableCycle()) : (i.prev(), void i._maybeEnableCycle()) })), $.on(window, "load.bs.carousel.data-api", (() => { const t = U.find('[data-bs-ride="carousel"]'); for (const e of t) ht.getOrCreateInstance(e) })), b(ht); const dt = "show", ut = "collapse", _t = "collapsing", gt = '[data-bs-toggle="collapse"]', ft = { parent: null, toggle: !0 }, pt = { parent: "(null|element)", toggle: "boolean" }; class mt extends V { constructor(t, e) { super(t, e), this._isTransitioning = !1, this._triggerArray = []; const i = U.find(gt); for (const t of i) { const e = o(t), i = U.find(e).filter((t => t === this._element)); null !== e && i.length && this._triggerArray.push(t) } this._initializeChildren(), this._config.parent || this._addAriaAndCollapsedClass(this._triggerArray, this._isShown()), this._config.toggle && this.toggle() } static get Default() { return ft } static get DefaultType() { return pt } static get NAME() { return "collapse" } toggle() { this._isShown() ? this.hide() : this.show() } show() { if (this._isTransitioning || this._isShown()) return; let t = []; if (this._config.parent && (t = this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t => t !== this._element)).map((t => mt.getOrCreateInstance(t, { toggle: !1 })))), t.length && t[0]._isTransitioning) return; if ($.trigger(this._element, "show.bs.collapse").defaultPrevented) return; for (const e of t) e.hide(); const e = this._getDimension(); this._element.classList.remove(ut), this._element.classList.add(_t), this._element.style[e] = 0, this._addAriaAndCollapsedClass(this._triggerArray, !0), this._isTransitioning = !0; const i = `scroll${e[0].toUpperCase() + e.slice(1)}`; this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(_t), this._element.classList.add(ut, dt), this._element.style[e] = "", $.trigger(this._element, "shown.bs.collapse") }), this._element, !0), this._element.style[e] = `${this._element[i]}px` } hide() { if (this._isTransitioning || !this._isShown()) return; if ($.trigger(this._element, "hide.bs.collapse").defaultPrevented) return; const t = this._getDimension(); this._element.style[t] = `${this._element.getBoundingClientRect()[t]}px`, g(this._element), this._element.classList.add(_t), this._element.classList.remove(ut, dt); for (const t of this._triggerArray) { const e = r(t); e && !this._isShown(e) && this._addAriaAndCollapsedClass([t], !1) } this._isTransitioning = !0, this._element.style[t] = "", this._queueCallback((() => { this._isTransitioning = !1, this._element.classList.remove(_t), this._element.classList.add(ut), $.trigger(this._element, "hidden.bs.collapse") }), this._element, !0) } _isShown(t = this._element) { return t.classList.contains(dt) } _configAfterMerge(t) { return t.toggle = Boolean(t.toggle), t.parent = c(t.parent), t } _getDimension() { return this._element.classList.contains("collapse-horizontal") ? "width" : "height" } _initializeChildren() { if (!this._config.parent) return; const t = this._getFirstLevelChildren(gt); for (const e of t) { const t = r(e); t && this._addAriaAndCollapsedClass([e], this._isShown(t)) } } _getFirstLevelChildren(t) { const e = U.find(":scope .collapse .collapse", this._config.parent); return U.find(t, this._config.parent).filter((t => !e.includes(t))) } _addAriaAndCollapsedClass(t, e) { if (t.length) for (const i of t) i.classList.toggle("collapsed", !e), i.setAttribute("aria-expanded", e) } static jQueryInterface(t) { const e = {}; return "string" == typeof t && /show|hide/.test(t) && (e.toggle = !1), this.each((function () { const i = mt.getOrCreateInstance(this, e); if ("string" == typeof t) { if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); i[t]() } })) } } $.on(document, "click.bs.collapse.data-api", gt, (function (t) { ("A" === t.target.tagName || t.delegateTarget && "A" === t.delegateTarget.tagName) && t.preventDefault(); const e = o(this), i = U.find(e); for (const t of i) mt.getOrCreateInstance(t, { toggle: !1 }).toggle() })), b(mt); const bt = "dropdown", vt = "ArrowUp", yt = "ArrowDown", wt = "click.bs.dropdown.data-api", At = "keydown.bs.dropdown.data-api", Et = "show", Ct = '[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)', Tt = `${Ct}.show`, kt = ".dropdown-menu", Lt = m() ? "top-end" : "top-start", Ot = m() ? "top-start" : "top-end", It = m() ? "bottom-end" : "bottom-start", St = m() ? "bottom-start" : "bottom-end", Dt = m() ? "left-start" : "right-start", Nt = m() ? "right-start" : "left-start", Pt = { autoClose: !0, boundary: "clippingParents", display: "dynamic", offset: [0, 2], popperConfig: null, reference: "toggle" }, xt = { autoClose: "(boolean|string)", boundary: "(string|element)", display: "string", offset: "(array|string|function)", popperConfig: "(null|object|function)", reference: "(string|element|object)" }; class Mt extends V { constructor(t, e) { super(t, e), this._popper = null, this._parent = this._element.parentNode, this._menu = U.next(this._element, kt)[0] || U.prev(this._element, kt)[0] || U.findOne(kt, this._parent), this._inNavbar = this._detectNavbar() } static get Default() { return Pt } static get DefaultType() { return xt } static get NAME() { return bt } toggle() { return this._isShown() ? this.hide() : this.show() } show() { if (d(this._element) || this._isShown()) return; const t = { relatedTarget: this._element }; if (!$.trigger(this._element, "show.bs.dropdown", t).defaultPrevented) { if (this._createPopper(), "ontouchstart" in document.documentElement && !this._parent.closest(".navbar-nav")) for (const t of [].concat(...document.body.children)) $.on(t, "mouseover", _); this._element.focus(), this._element.setAttribute("aria-expanded", !0), this._menu.classList.add(Et), this._element.classList.add(Et), $.trigger(this._element, "shown.bs.dropdown", t) } } hide() { if (d(this._element) || !this._isShown()) return; const t = { relatedTarget: this._element }; this._completeHide(t) } dispose() { this._popper && this._popper.destroy(), super.dispose() } update() { this._inNavbar = this._detectNavbar(), this._popper && this._popper.update() } _completeHide(t) { if (!$.trigger(this._element, "hide.bs.dropdown", t).defaultPrevented) { if ("ontouchstart" in document.documentElement) for (const t of [].concat(...document.body.children)) $.off(t, "mouseover", _); this._popper && this._popper.destroy(), this._menu.classList.remove(Et), this._element.classList.remove(Et), this._element.setAttribute("aria-expanded", "false"), W.removeDataAttribute(this._menu, "popper"), $.trigger(this._element, "hidden.bs.dropdown", t) } } _getConfig(t) { if ("object" == typeof (t = super._getConfig(t)).reference && !l(t.reference) && "function" != typeof t.reference.getBoundingClientRect) throw new TypeError(`${bt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`); return t } _createPopper() { if (void 0 === i) throw new TypeError("Bootstrap's dropdowns require Popper (//popper.js.org)"); let t = this._element; "parent" === this._config.reference ? t = this._parent : l(this._config.reference) ? t = c(this._config.reference) : "object" == typeof this._config.reference && (t = this._config.reference); const e = this._getPopperConfig(); this._popper = i.createPopper(t, this._menu, e) } _isShown() { return this._menu.classList.contains(Et) } _getPlacement() { const t = this._parent; if (t.classList.contains("dropend")) return Dt; if (t.classList.contains("dropstart")) return Nt; if (t.classList.contains("dropup-center")) return "top"; if (t.classList.contains("dropdown-center")) return "bottom"; const e = "end" === getComputedStyle(this._menu).getPropertyValue("--bs-position").trim(); return t.classList.contains("dropup") ? e ? Ot : Lt : e ? St : It } _detectNavbar() { return null !== this._element.closest(".navbar") } _getOffset() { const { offset: t } = this._config; return "string" == typeof t ? t.split(",").map((t => Number.parseInt(t, 10))) : "function" == typeof t ? e => t(e, this._element) : t } _getPopperConfig() { const t = { placement: this._getPlacement(), modifiers: [{ name: "preventOverflow", options: { boundary: this._config.boundary } }, { name: "offset", options: { offset: this._getOffset() } }] }; return (this._inNavbar || "static" === this._config.display) && (W.setDataAttribute(this._menu, "popper", "static"), t.modifiers = [{ name: "applyStyles", enabled: !1 }]), { ...t, ..."function" == typeof this._config.popperConfig ? this._config.popperConfig(t) : this._config.popperConfig } } _selectMenuItem({ key: t, target: e }) { const i = U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)", this._menu).filter((t => h(t))); i.length && w(i, e, t === yt, !i.includes(e)).focus() } static jQueryInterface(t) { return this.each((function () { const e = Mt.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } static clearMenus(t) { if (2 === t.button || "keyup" === t.type && "Tab" !== t.key) return; const e = U.find(Tt); for (const i of e) { const e = Mt.getInstance(i); if (!e || !1 === e._config.autoClose) continue; const s = t.composedPath(), n = s.includes(e._menu); if (s.includes(e._element) || "inside" === e._config.autoClose && !n || "outside" === e._config.autoClose && n) continue; if (e._menu.contains(t.target) && ("keyup" === t.type && "Tab" === t.key || /input|select|option|textarea|form/i.test(t.target.tagName))) continue; const o = { relatedTarget: e._element }; "click" === t.type && (o.clickEvent = t), e._completeHide(o) } } static dataApiKeydownHandler(t) { const e = /input|textarea/i.test(t.target.tagName), i = "Escape" === t.key, s = [vt, yt].includes(t.key); if (!s && !i) return; if (e && !i) return; t.preventDefault(); const n = this.matches(Ct) ? this : U.prev(this, Ct)[0] || U.next(this, Ct)[0] || U.findOne(Ct, t.delegateTarget.parentNode), o = Mt.getOrCreateInstance(n); if (s) return t.stopPropagation(), o.show(), void o._selectMenuItem(t); o._isShown() && (t.stopPropagation(), o.hide(), n.focus()) } } $.on(document, At, Ct, Mt.dataApiKeydownHandler), $.on(document, At, kt, Mt.dataApiKeydownHandler), $.on(document, wt, Mt.clearMenus), $.on(document, "keyup.bs.dropdown.data-api", Mt.clearMenus), $.on(document, wt, Ct, (function (t) { t.preventDefault(), Mt.getOrCreateInstance(this).toggle() })), b(Mt); const jt = ".fixed-top, .fixed-bottom, .is-fixed, .sticky-top", $t = ".sticky-top", Ft = "padding-right", zt = "margin-right"; class Ht { constructor() { this._element = document.body } getWidth() { const t = document.documentElement.clientWidth; return Math.abs(window.innerWidth - t) } hide() { const t = this.getWidth(); this._disableOverFlow(), this._setElementAttributes(this._element, Ft, (e => e + t)), this._setElementAttributes(jt, Ft, (e => e + t)), this._setElementAttributes($t, zt, (e => e - t)) } reset() { this._resetElementAttributes(this._element, "overflow"), this._resetElementAttributes(this._element, Ft), this._resetElementAttributes(jt, Ft), this._resetElementAttributes($t, zt) } isOverflowing() { return this.getWidth() > 0 } _disableOverFlow() { this._saveInitialAttribute(this._element, "overflow"), this._element.style.overflow = "hidden" } _setElementAttributes(t, e, i) { const s = this.getWidth(); this._applyManipulationCallback(t, (t => { if (t !== this._element && window.innerWidth > t.clientWidth + s) return; this._saveInitialAttribute(t, e); const n = window.getComputedStyle(t).getPropertyValue(e); t.style.setProperty(e, `${i(Number.parseFloat(n))}px`) })) } _saveInitialAttribute(t, e) { const i = t.style.getPropertyValue(e); i && W.setDataAttribute(t, e, i) } _resetElementAttributes(t, e) { this._applyManipulationCallback(t, (t => { const i = W.getDataAttribute(t, e); null !== i ? (W.removeDataAttribute(t, e), t.style.setProperty(e, i)) : t.style.removeProperty(e) })) } _applyManipulationCallback(t, e) { if (l(t)) e(t); else for (const i of U.find(t, this._element)) e(i) } } const qt = "show", Bt = "mousedown.bs.backdrop", Wt = { className: "modal-backdrop", clickCallback: null, isAnimated: !1, isVisible: !0, rootElement: "body" }, Rt = { className: "string", clickCallback: "(function|null)", isAnimated: "boolean", isVisible: "boolean", rootElement: "(element|string)" }; class Vt extends R { constructor(t) { super(), this._config = this._getConfig(t), this._isAppended = !1, this._element = null } static get Default() { return Wt } static get DefaultType() { return Rt } static get NAME() { return "backdrop" } show(t) { if (!this._config.isVisible) return void v(t); this._append(); const e = this._getElement(); this._config.isAnimated && g(e), e.classList.add(qt), this._emulateAnimation((() => { v(t) })) } hide(t) { this._config.isVisible ? (this._getElement().classList.remove(qt), this._emulateAnimation((() => { this.dispose(), v(t) }))) : v(t) } dispose() { this._isAppended && ($.off(this._element, Bt), this._element.remove(), this._isAppended = !1) } _getElement() { if (!this._element) { const t = document.createElement("div"); t.className = this._config.className, this._config.isAnimated && t.classList.add("fade"), this._element = t } return this._element } _configAfterMerge(t) { return t.rootElement = c(t.rootElement), t } _append() { if (this._isAppended) return; const t = this._getElement(); this._config.rootElement.append(t), $.on(t, Bt, (() => { v(this._config.clickCallback) })), this._isAppended = !0 } _emulateAnimation(t) { y(t, this._getElement(), this._config.isAnimated) } } const Kt = ".bs.focustrap", Qt = "backward", Xt = { autofocus: !0, trapElement: null }, Yt = { autofocus: "boolean", trapElement: "element" }; class Ut extends R { constructor(t) { super(), this._config = this._getConfig(t), this._isActive = !1, this._lastTabNavDirection = null } static get Default() { return Xt } static get DefaultType() { return Yt } static get NAME() { return "focustrap" } activate() { this._isActive || (this._config.autofocus && this._config.trapElement.focus(), $.off(document, Kt), $.on(document, "focusin.bs.focustrap", (t => this._handleFocusin(t))), $.on(document, "keydown.tab.bs.focustrap", (t => this._handleKeydown(t))), this._isActive = !0) } deactivate() { this._isActive && (this._isActive = !1, $.off(document, Kt)) } _handleFocusin(t) { const { trapElement: e } = this._config; if (t.target === document || t.target === e || e.contains(t.target)) return; const i = U.focusableChildren(e); 0 === i.length ? e.focus() : this._lastTabNavDirection === Qt ? i[i.length - 1].focus() : i[0].focus() } _handleKeydown(t) { "Tab" === t.key && (this._lastTabNavDirection = t.shiftKey ? Qt : "forward") } } const Gt = "hidden.bs.modal", Jt = "show.bs.modal", Zt = "modal-open", te = "show", ee = "modal-static", ie = { backdrop: !0, focus: !0, keyboard: !0 }, se = { backdrop: "(boolean|string)", focus: "boolean", keyboard: "boolean" }; class ne extends V { constructor(t, e) { super(t, e), this._dialog = U.findOne(".modal-dialog", this._element), this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._isShown = !1, this._isTransitioning = !1, this._scrollBar = new Ht, this._addEventListeners() } static get Default() { return ie } static get DefaultType() { return se } static get NAME() { return "modal" } toggle(t) { return this._isShown ? this.hide() : this.show(t) } show(t) { this._isShown || this._isTransitioning || $.trigger(this._element, Jt, { relatedTarget: t }).defaultPrevented || (this._isShown = !0, this._isTransitioning = !0, this._scrollBar.hide(), document.body.classList.add(Zt), this._adjustDialog(), this._backdrop.show((() => this._showElement(t)))) } hide() { this._isShown && !this._isTransitioning && ($.trigger(this._element, "hide.bs.modal").defaultPrevented || (this._isShown = !1, this._isTransitioning = !0, this._focustrap.deactivate(), this._element.classList.remove(te), this._queueCallback((() => this._hideModal()), this._element, this._isAnimated()))) } dispose() { for (const t of [window, this._dialog]) $.off(t, ".bs.modal"); this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose() } handleUpdate() { this._adjustDialog() } _initializeBackDrop() { return new Vt({ isVisible: Boolean(this._config.backdrop), isAnimated: this._isAnimated() }) } _initializeFocusTrap() { return new Ut({ trapElement: this._element }) } _showElement(t) { 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 e = U.findOne(".modal-body", this._dialog); e && (e.scrollTop = 0), g(this._element), this._element.classList.add(te), this._queueCallback((() => { this._config.focus && this._focustrap.activate(), this._isTransitioning = !1, $.trigger(this._element, "shown.bs.modal", { relatedTarget: t }) }), this._dialog, this._isAnimated()) } _addEventListeners() { $.on(this._element, "keydown.dismiss.bs.modal", (t => { if ("Escape" === t.key) return this._config.keyboard ? (t.preventDefault(), void this.hide()) : void this._triggerBackdropTransition() })), $.on(window, "resize.bs.modal", (() => { this._isShown && !this._isTransitioning && this._adjustDialog() })), $.on(this._element, "mousedown.dismiss.bs.modal", (t => { $.one(this._element, "click.dismiss.bs.modal", (e => { this._element === t.target && this._element === e.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(Zt), this._resetAdjustments(), this._scrollBar.reset(), $.trigger(this._element, Gt) })) } _isAnimated() { return this._element.classList.contains("fade") } _triggerBackdropTransition() { if ($.trigger(this._element, "hidePrevented.bs.modal").defaultPrevented) return; const t = this._element.scrollHeight > document.documentElement.clientHeight, e = this._element.style.overflowY; "hidden" === e || this._element.classList.contains(ee) || (t || (this._element.style.overflowY = "hidden"), this._element.classList.add(ee), this._queueCallback((() => { this._element.classList.remove(ee), this._queueCallback((() => { this._element.style.overflowY = e }), this._dialog) }), this._dialog), this._element.focus()) } _adjustDialog() { const t = this._element.scrollHeight > document.documentElement.clientHeight, e = this._scrollBar.getWidth(), i = e > 0; if (i && !t) { const t = m() ? "paddingLeft" : "paddingRight"; this._element.style[t] = `${e}px` } if (!i && t) { const t = m() ? "paddingRight" : "paddingLeft"; this._element.style[t] = `${e}px` } } _resetAdjustments() { this._element.style.paddingLeft = "", this._element.style.paddingRight = "" } static jQueryInterface(t, e) { return this.each((function () { const i = ne.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === i[t]) throw new TypeError(`No method named "${t}"`); i[t](e) } })) } } $.on(document, "click.bs.modal.data-api", '[data-bs-toggle="modal"]', (function (t) { const e = r(this);["A", "AREA"].includes(this.tagName) && t.preventDefault(), $.one(e, Jt, (t => { t.defaultPrevented || $.one(e, Gt, (() => { h(this) && this.focus() })) })); const i = U.findOne(".modal.show"); i && ne.getInstance(i).hide(), ne.getOrCreateInstance(e).toggle(this) })), K(ne), b(ne); const oe = "show", re = "showing", ae = "hiding", le = ".offcanvas.show", ce = "hidePrevented.bs.offcanvas", he = "hidden.bs.offcanvas", de = { backdrop: !0, keyboard: !0, scroll: !1 }, ue = { backdrop: "(boolean|string)", keyboard: "boolean", scroll: "boolean" }; class _e extends V { constructor(t, e) { super(t, e), this._isShown = !1, this._backdrop = this._initializeBackDrop(), this._focustrap = this._initializeFocusTrap(), this._addEventListeners() } static get Default() { return de } static get DefaultType() { return ue } static get NAME() { return "offcanvas" } toggle(t) { return this._isShown ? this.hide() : this.show(t) } show(t) { this._isShown || $.trigger(this._element, "show.bs.offcanvas", { relatedTarget: t }).defaultPrevented || (this._isShown = !0, this._backdrop.show(), this._config.scroll || (new Ht).hide(), this._element.setAttribute("aria-modal", !0), this._element.setAttribute("role", "dialog"), this._element.classList.add(re), this._queueCallback((() => { this._config.scroll && !this._config.backdrop || this._focustrap.activate(), this._element.classList.add(oe), this._element.classList.remove(re), $.trigger(this._element, "shown.bs.offcanvas", { relatedTarget: t }) }), this._element, !0)) } hide() { this._isShown && ($.trigger(this._element, "hide.bs.offcanvas").defaultPrevented || (this._focustrap.deactivate(), this._element.blur(), this._isShown = !1, this._element.classList.add(ae), this._backdrop.hide(), this._queueCallback((() => { this._element.classList.remove(oe, ae), this._element.removeAttribute("aria-modal"), this._element.removeAttribute("role"), this._config.scroll || (new Ht).reset(), $.trigger(this._element, he) }), this._element, !0))) } dispose() { this._backdrop.dispose(), this._focustrap.deactivate(), super.dispose() } _initializeBackDrop() { const t = Boolean(this._config.backdrop); return new Vt({ className: "offcanvas-backdrop", isVisible: t, isAnimated: !0, rootElement: this._element.parentNode, clickCallback: t ? () => { "static" !== this._config.backdrop ? this.hide() : $.trigger(this._element, ce) } : null }) } _initializeFocusTrap() { return new Ut({ trapElement: this._element }) } _addEventListeners() { $.on(this._element, "keydown.dismiss.bs.offcanvas", (t => { "Escape" === t.key && (this._config.keyboard ? this.hide() : $.trigger(this._element, ce)) })) } static jQueryInterface(t) { return this.each((function () { const e = _e.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t](this) } })) } } $.on(document, "click.bs.offcanvas.data-api", '[data-bs-toggle="offcanvas"]', (function (t) { const e = r(this); if (["A", "AREA"].includes(this.tagName) && t.preventDefault(), d(this)) return; $.one(e, he, (() => { h(this) && this.focus() })); const i = U.findOne(le); i && i !== e && _e.getInstance(i).hide(), _e.getOrCreateInstance(e).toggle(this) })), $.on(window, "load.bs.offcanvas.data-api", (() => { for (const t of U.find(le)) _e.getOrCreateInstance(t).show() })), $.on(window, "resize.bs.offcanvas", (() => { for (const t of U.find("[aria-modal][class*=show][class*=offcanvas-]")) "fixed" !== getComputedStyle(t).position && _e.getOrCreateInstance(t).hide() })), K(_e), b(_e); const ge = new Set(["background", "cite", "href", "itemtype", "longdesc", "poster", "src", "xlink:href"]), fe = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i, pe = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i, me = (t, e) => { const i = t.nodeName.toLowerCase(); return e.includes(i) ? !ge.has(i) || Boolean(fe.test(t.nodeValue) || pe.test(t.nodeValue)) : e.filter((t => t instanceof RegExp)).some((t => t.test(i))) }, be = { "*": ["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: [] }, ve = { allowList: be, content: {}, extraClass: "", html: !1, sanitize: !0, sanitizeFn: null, template: "
" }, ye = { allowList: "object", content: "object", extraClass: "(string|function)", html: "boolean", sanitize: "boolean", sanitizeFn: "(null|function)", template: "string" }, we = { entry: "(string|element|function|null)", selector: "(string|element)" }; class Ae extends R { constructor(t) { super(), this._config = this._getConfig(t) } static get Default() { return ve } static get DefaultType() { return ye } static get NAME() { return "TemplateFactory" } getContent() { return Object.values(this._config.content).map((t => this._resolvePossibleFunction(t))).filter(Boolean) } hasContent() { return this.getContent().length > 0 } changeContent(t) { return this._checkContent(t), this._config.content = { ...this._config.content, ...t }, this } toHtml() { const t = document.createElement("div"); t.innerHTML = this._maybeSanitize(this._config.template); for (const [e, i] of Object.entries(this._config.content)) this._setContent(t, i, e); const e = t.children[0], i = this._resolvePossibleFunction(this._config.extraClass); return i && e.classList.add(...i.split(" ")), e } _typeCheckConfig(t) { super._typeCheckConfig(t), this._checkContent(t.content) } _checkContent(t) { for (const [e, i] of Object.entries(t)) super._typeCheckConfig({ selector: e, entry: i }, we) } _setContent(t, e, i) { const s = U.findOne(i, t); s && ((e = this._resolvePossibleFunction(e)) ? l(e) ? this._putElementInTemplate(c(e), s) : this._config.html ? s.innerHTML = this._maybeSanitize(e) : s.textContent = e : s.remove()) } _maybeSanitize(t) { return this._config.sanitize ? function (t, e, i) { if (!t.length) return t; if (i && "function" == typeof i) return i(t); const s = (new window.DOMParser).parseFromString(t, "text/html"), n = [].concat(...s.body.querySelectorAll("*")); for (const t of n) { const i = t.nodeName.toLowerCase(); if (!Object.keys(e).includes(i)) { t.remove(); continue } const s = [].concat(...t.attributes), n = [].concat(e["*"] || [], e[i] || []); for (const e of s) me(e, n) || t.removeAttribute(e.nodeName) } return s.body.innerHTML }(t, this._config.allowList, this._config.sanitizeFn) : t } _resolvePossibleFunction(t) { return "function" == typeof t ? t(this) : t } _putElementInTemplate(t, e) { if (this._config.html) return e.innerHTML = "", void e.append(t); e.textContent = t.textContent } } const Ee = new Set(["sanitize", "allowList", "sanitizeFn"]), Ce = "fade", Te = "show", ke = ".modal", Le = "hide.bs.modal", Oe = "hover", Ie = "focus", Se = { AUTO: "auto", TOP: "top", RIGHT: m() ? "left" : "right", BOTTOM: "bottom", LEFT: m() ? "right" : "left" }, De = { allowList: be, 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" }, Ne = { 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 Pe extends V { constructor(t, e) { if (void 0 === i) throw new TypeError("Bootstrap's tooltips require Popper (//popper.js.org)"); super(t, e), 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 De } static get DefaultType() { return Ne } 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), $.off(this._element.closest(ke), Le, this._hideModalHandler), this.tip && this.tip.remove(), 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 t = $.trigger(this._element, this.constructor.eventName("show")), e = (u(this._element) || this._element.ownerDocument.documentElement).contains(this._element); if (t.defaultPrevented || !e) return; this.tip && (this.tip.remove(), this.tip = null); const i = this._getTipElement(); this._element.setAttribute("aria-describedby", i.getAttribute("id")); const { container: s } = this._config; if (this._element.ownerDocument.documentElement.contains(this.tip) || (s.append(i), $.trigger(this._element, this.constructor.eventName("inserted"))), this._popper ? this._popper.update() : this._popper = this._createPopper(i), i.classList.add(Te), "ontouchstart" in document.documentElement) for (const t of [].concat(...document.body.children)) $.on(t, "mouseover", _); this._queueCallback((() => { $.trigger(this._element, this.constructor.eventName("shown")), !1 === this._isHovered && this._leave(), this._isHovered = !1 }), this.tip, this._isAnimated()) } hide() { if (!this._isShown()) return; if ($.trigger(this._element, this.constructor.eventName("hide")).defaultPrevented) return; const t = this._getTipElement(); if (t.classList.remove(Te), "ontouchstart" in document.documentElement) for (const t of [].concat(...document.body.children)) $.off(t, "mouseover", _); this._activeTrigger.click = !1, this._activeTrigger.focus = !1, this._activeTrigger.hover = !1, this._isHovered = null, this._queueCallback((() => { this._isWithActiveTrigger() || (this._isHovered || t.remove(), this._element.removeAttribute("aria-describedby"), $.trigger(this._element, this.constructor.eventName("hidden")), this._disposePopper()) }), 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(t) { const e = this._getTemplateFactory(t).toHtml(); if (!e) return null; e.classList.remove(Ce, Te), e.classList.add(`bs-${this.constructor.NAME}-auto`); const i = (t => { do { t += Math.floor(1e6 * Math.random()) } while (document.getElementById(t)); return t })(this.constructor.NAME).toString(); return e.setAttribute("id", i), this._isAnimated() && e.classList.add(Ce), e } setContent(t) { this._newContent = t, this._isShown() && (this._disposePopper(), this.show()) } _getTemplateFactory(t) { return this._templateFactory ? this._templateFactory.changeContent(t) : this._templateFactory = new Ae({ ...this._config, content: t, 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(t) { return this.constructor.getOrCreateInstance(t.delegateTarget, this._getDelegateConfig()) } _isAnimated() { return this._config.animation || this.tip && this.tip.classList.contains(Ce) } _isShown() { return this.tip && this.tip.classList.contains(Te) } _createPopper(t) { const e = "function" == typeof this._config.placement ? this._config.placement.call(this, t, this._element) : this._config.placement, s = Se[e.toUpperCase()]; return i.createPopper(this._element, t, this._getPopperConfig(s)) } _getOffset() { const { offset: t } = this._config; return "string" == typeof t ? t.split(",").map((t => Number.parseInt(t, 10))) : "function" == typeof t ? e => t(e, this._element) : t } _resolvePossibleFunction(t) { return "function" == typeof t ? t.call(this._element) : t } _getPopperConfig(t) { const e = { placement: t, 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: t => { this._getTipElement().setAttribute("data-popper-placement", t.state.placement) } }] }; return { ...e, ..."function" == typeof this._config.popperConfig ? this._config.popperConfig(e) : this._config.popperConfig } } _setListeners() { const t = this._config.trigger.split(" "); for (const e of t) if ("click" === e) $.on(this._element, this.constructor.eventName("click"), this._config.selector, (t => { this._initializeOnDelegatedTarget(t).toggle() })); else if ("manual" !== e) { const t = e === Oe ? this.constructor.eventName("mouseenter") : this.constructor.eventName("focusin"), i = e === Oe ? this.constructor.eventName("mouseleave") : this.constructor.eventName("focusout"); $.on(this._element, t, this._config.selector, (t => { const e = this._initializeOnDelegatedTarget(t); e._activeTrigger["focusin" === t.type ? Ie : Oe] = !0, e._enter() })), $.on(this._element, i, this._config.selector, (t => { const e = this._initializeOnDelegatedTarget(t); e._activeTrigger["focusout" === t.type ? Ie : Oe] = e._element.contains(t.relatedTarget), e._leave() })) } this._hideModalHandler = () => { this._element && this.hide() }, $.on(this._element.closest(ke), Le, this._hideModalHandler) } _fixTitle() { const t = this._element.getAttribute("title"); t && (this._element.getAttribute("aria-label") || this._element.textContent.trim() || this._element.setAttribute("aria-label", t), this._element.setAttribute("data-bs-original-title", t), 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(t, e) { clearTimeout(this._timeout), this._timeout = setTimeout(t, e) } _isWithActiveTrigger() { return Object.values(this._activeTrigger).includes(!0) } _getConfig(t) { const e = W.getDataAttributes(this._element); for (const t of Object.keys(e)) Ee.has(t) && delete e[t]; return t = { ...e, ..."object" == typeof t && t ? t : {} }, t = this._mergeConfigObj(t), t = this._configAfterMerge(t), this._typeCheckConfig(t), t } _configAfterMerge(t) { return t.container = !1 === t.container ? document.body : c(t.container), "number" == typeof t.delay && (t.delay = { show: t.delay, hide: t.delay }), "number" == typeof t.title && (t.title = t.title.toString()), "number" == typeof t.content && (t.content = t.content.toString()), t } _getDelegateConfig() { const t = {}; for (const e in this._config) this.constructor.Default[e] !== this._config[e] && (t[e] = this._config[e]); return t.selector = !1, t.trigger = "manual", t } _disposePopper() { this._popper && (this._popper.destroy(), this._popper = null) } static jQueryInterface(t) { return this.each((function () { const e = Pe.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } b(Pe); const xe = { ...Pe.Default, content: "", offset: [0, 8], placement: "right", template: '', trigger: "click" }, Me = { ...Pe.DefaultType, content: "(null|string|element|function)" }; class je extends Pe { static get Default() { return xe } static get DefaultType() { return Me } 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(t) { return this.each((function () { const e = je.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } b(je); const $e = "click.bs.scrollspy", Fe = "active", ze = "[href]", He = { offset: null, rootMargin: "0px 0px -25%", smoothScroll: !1, target: null, threshold: [.1, .5, 1] }, qe = { offset: "(number|null)", rootMargin: "string", smoothScroll: "boolean", target: "element", threshold: "array" }; class Be extends V { constructor(t, e) { super(t, e), 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 He } static get DefaultType() { return qe } static get NAME() { return "scrollspy" } refresh() { this._initializeTargetsAndObservables(), this._maybeEnableSmoothScroll(), this._observer ? this._observer.disconnect() : this._observer = this._getNewObserver(); for (const t of this._observableSections.values()) this._observer.observe(t) } dispose() { this._observer.disconnect(), super.dispose() } _configAfterMerge(t) { return t.target = c(t.target) || document.body, t.rootMargin = t.offset ? `${t.offset}px 0px -30%` : t.rootMargin, "string" == typeof t.threshold && (t.threshold = t.threshold.split(",").map((t => Number.parseFloat(t)))), t } _maybeEnableSmoothScroll() { this._config.smoothScroll && ($.off(this._config.target, $e), $.on(this._config.target, $e, ze, (t => { const e = this._observableSections.get(t.target.hash); if (e) { t.preventDefault(); const i = this._rootElement || window, s = e.offsetTop - this._element.offsetTop; if (i.scrollTo) return void i.scrollTo({ top: s, behavior: "smooth" }); i.scrollTop = s } }))) } _getNewObserver() { const t = { root: this._rootElement, threshold: this._config.threshold, rootMargin: this._config.rootMargin }; return new IntersectionObserver((t => this._observerCallback(t)), t) } _observerCallback(t) { const e = t => this._targetLinks.get(`#${t.target.id}`), i = t => { this._previousScrollData.visibleEntryTop = t.target.offsetTop, this._process(e(t)) }, s = (this._rootElement || document.documentElement).scrollTop, n = s >= this._previousScrollData.parentScrollTop; this._previousScrollData.parentScrollTop = s; for (const o of t) { if (!o.isIntersecting) { this._activeTarget = null, this._clearActiveClass(e(o)); continue } const t = o.target.offsetTop >= this._previousScrollData.visibleEntryTop; if (n && t) { if (i(o), !s) return } else n || t || i(o) } } _initializeTargetsAndObservables() { this._targetLinks = new Map, this._observableSections = new Map; const t = U.find(ze, this._config.target); for (const e of t) { if (!e.hash || d(e)) continue; const t = U.findOne(e.hash, this._element); h(t) && (this._targetLinks.set(e.hash, e), this._observableSections.set(e.hash, t)) } } _process(t) { this._activeTarget !== t && (this._clearActiveClass(this._config.target), this._activeTarget = t, t.classList.add(Fe), this._activateParents(t), $.trigger(this._element, "activate.bs.scrollspy", { relatedTarget: t })) } _activateParents(t) { if (t.classList.contains("dropdown-item")) U.findOne(".dropdown-toggle", t.closest(".dropdown")).classList.add(Fe); else for (const e of U.parents(t, ".nav, .list-group")) for (const t of U.prev(e, ".nav-link, .nav-item > .nav-link, .list-group-item")) t.classList.add(Fe) } _clearActiveClass(t) { t.classList.remove(Fe); const e = U.find("[href].active", t); for (const t of e) t.classList.remove(Fe) } static jQueryInterface(t) { return this.each((function () { const e = Be.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } $.on(window, "load.bs.scrollspy.data-api", (() => { for (const t of U.find('[data-bs-spy="scroll"]')) Be.getOrCreateInstance(t) })), b(Be); const We = "ArrowLeft", Re = "ArrowRight", Ve = "ArrowUp", Ke = "ArrowDown", Qe = "active", Xe = "fade", Ye = "show", Ue = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]', Ge = `.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ue}`; class Je extends V { constructor(t) { super(t), this._parent = this._element.closest('.list-group, .nav, [role="tablist"]'), this._parent && (this._setInitialAttributes(this._parent, this._getChildren()), $.on(this._element, "keydown.bs.tab", (t => this._keydown(t)))) } static get NAME() { return "tab" } show() { const t = this._element; if (this._elemIsActive(t)) return; const e = this._getActiveElem(), i = e ? $.trigger(e, "hide.bs.tab", { relatedTarget: t }) : null; $.trigger(t, "show.bs.tab", { relatedTarget: e }).defaultPrevented || i && i.defaultPrevented || (this._deactivate(e, t), this._activate(t, e)) } _activate(t, e) { t && (t.classList.add(Qe), this._activate(r(t)), this._queueCallback((() => { "tab" === t.getAttribute("role") ? (t.removeAttribute("tabindex"), t.setAttribute("aria-selected", !0), this._toggleDropDown(t, !0), $.trigger(t, "shown.bs.tab", { relatedTarget: e })) : t.classList.add(Ye) }), t, t.classList.contains(Xe))) } _deactivate(t, e) { t && (t.classList.remove(Qe), t.blur(), this._deactivate(r(t)), this._queueCallback((() => { "tab" === t.getAttribute("role") ? (t.setAttribute("aria-selected", !1), t.setAttribute("tabindex", "-1"), this._toggleDropDown(t, !1), $.trigger(t, "hidden.bs.tab", { relatedTarget: e })) : t.classList.remove(Ye) }), t, t.classList.contains(Xe))) } _keydown(t) { if (![We, Re, Ve, Ke].includes(t.key)) return; t.stopPropagation(), t.preventDefault(); const e = [Re, Ke].includes(t.key), i = w(this._getChildren().filter((t => !d(t))), t.target, e, !0); i && (i.focus({ preventScroll: !0 }), Je.getOrCreateInstance(i).show()) } _getChildren() { return U.find(Ge, this._parent) } _getActiveElem() { return this._getChildren().find((t => this._elemIsActive(t))) || null } _setInitialAttributes(t, e) { this._setAttributeIfNotExists(t, "role", "tablist"); for (const t of e) this._setInitialAttributesOnChild(t) } _setInitialAttributesOnChild(t) { t = this._getInnerElement(t); const e = this._elemIsActive(t), i = this._getOuterElement(t); t.setAttribute("aria-selected", e), i !== t && this._setAttributeIfNotExists(i, "role", "presentation"), e || t.setAttribute("tabindex", "-1"), this._setAttributeIfNotExists(t, "role", "tab"), this._setInitialAttributesOnTargetPanel(t) } _setInitialAttributesOnTargetPanel(t) { const e = r(t); e && (this._setAttributeIfNotExists(e, "role", "tabpanel"), t.id && this._setAttributeIfNotExists(e, "aria-labelledby", `#${t.id}`)) } _toggleDropDown(t, e) { const i = this._getOuterElement(t); if (!i.classList.contains("dropdown")) return; const s = (t, s) => { const n = U.findOne(t, i); n && n.classList.toggle(s, e) }; s(".dropdown-toggle", Qe), s(".dropdown-menu", Ye), i.setAttribute("aria-expanded", e) } _setAttributeIfNotExists(t, e, i) { t.hasAttribute(e) || t.setAttribute(e, i) } _elemIsActive(t) { return t.classList.contains(Qe) } _getInnerElement(t) { return t.matches(Ge) ? t : U.findOne(Ge, t) } _getOuterElement(t) { return t.closest(".nav-item, .list-group-item") || t } static jQueryInterface(t) { return this.each((function () { const e = Je.getOrCreateInstance(this); if ("string" == typeof t) { if (void 0 === e[t] || t.startsWith("_") || "constructor" === t) throw new TypeError(`No method named "${t}"`); e[t]() } })) } } $.on(document, "click.bs.tab", Ue, (function (t) { ["A", "AREA"].includes(this.tagName) && t.preventDefault(), d(this) || Je.getOrCreateInstance(this).show() })), $.on(window, "load.bs.tab", (() => { for (const t of U.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]')) Je.getOrCreateInstance(t) })), b(Je); const Ze = "hide", ti = "show", ei = "showing", ii = { animation: "boolean", autohide: "boolean", delay: "number" }, si = { animation: !0, autohide: !0, delay: 5e3 }; class ni extends V { constructor(t, e) { super(t, e), this._timeout = null, this._hasMouseInteraction = !1, this._hasKeyboardInteraction = !1, this._setListeners() } static get Default() { return si } static get DefaultType() { return ii } static get NAME() { return "toast" } show() { $.trigger(this._element, "show.bs.toast").defaultPrevented || (this._clearTimeout(), this._config.animation && this._element.classList.add("fade"), this._element.classList.remove(Ze), g(this._element), this._element.classList.add(ti, ei), this._queueCallback((() => { this._element.classList.remove(ei), $.trigger(this._element, "shown.bs.toast"), this._maybeScheduleHide() }), this._element, this._config.animation)) } hide() { this.isShown() && ($.trigger(this._element, "hide.bs.toast").defaultPrevented || (this._element.classList.add(ei), this._queueCallback((() => { this._element.classList.add(Ze), this._element.classList.remove(ei, ti), $.trigger(this._element, "hidden.bs.toast") }), this._element, this._config.animation))) } dispose() { this._clearTimeout(), this.isShown() && this._element.classList.remove(ti), super.dispose() } isShown() { return this._element.classList.contains(ti) } _maybeScheduleHide() { this._config.autohide && (this._hasMouseInteraction || this._hasKeyboardInteraction || (this._timeout = setTimeout((() => { this.hide() }), this._config.delay))) } _onInteraction(t, e) { switch (t.type) { case "mouseover": case "mouseout": this._hasMouseInteraction = e; break; case "focusin": case "focusout": this._hasKeyboardInteraction = e }if (e) return void this._clearTimeout(); const i = t.relatedTarget; this._element === i || this._element.contains(i) || this._maybeScheduleHide() } _setListeners() { $.on(this._element, "mouseover.bs.toast", (t => this._onInteraction(t, !0))), $.on(this._element, "mouseout.bs.toast", (t => this._onInteraction(t, !1))), $.on(this._element, "focusin.bs.toast", (t => this._onInteraction(t, !0))), $.on(this._element, "focusout.bs.toast", (t => this._onInteraction(t, !1))) } _clearTimeout() { clearTimeout(this._timeout), this._timeout = null } static jQueryInterface(t) { return this.each((function () { const e = ni.getOrCreateInstance(this, t); if ("string" == typeof t) { if (void 0 === e[t]) throw new TypeError(`No method named "${t}"`); e[t](this) } })) } } return K(ni), b(ni), { Alert: Q, Button: Y, Carousel: ht, Collapse: mt, Dropdown: Mt, Modal: ne, Offcanvas: _e, Popover: je, ScrollSpy: Be, Tab: Je, Toast: ni, Tooltip: Pe } })); /** * Bootbox.js ?alert, confirm, prompt, and flexible dialogs for the Bootstrap framework * @version: 6.0.0 * @project: //github.com/makeusabrew/bootbox * @license: MIT //bootboxjs.com/license.txt * case 'small': case 'sm': e.addClass('modal-sm'); break; case 'sm-max': e.addClass('modal-sm max-size'); break; case 'large': case 'lg': e.addClass('modal-lg'); break; case 'lg-max': e.addClass('modal-lg max-size'); break; case 'extra-large': case 'xl': e.addClass('modal-xl'), break; case 'xl-max': e.addClass('modal-xl max-size'), break; case 'xxl-max': e.addClass('modal-xxl max-size'), break; case '': e.addClass('modal-sm') */ !function (e, t) { 'use strict'; 'function' == typeof define && define.amd ? define(['jquery'], t) : 'object' == typeof exports ? module.exports = t(require('jquery')) : e.bootbox = t(e.jQuery) }(this, function t(s, c) { 'use strict'; let r = {}; r.VERSION = '6.0.0'; let i = { en: { OK: 'OK', CANCEL: 'Cancel', CONFIRM: 'OK' } }, d = { dialog: '', header: '', footer: '', closeButton: '', form: '
', button: '', option: '', promptMessage: '
', inputs: { text: '', textarea: '', email: '', select: '', checkbox: '
', radio: '
', date: '', time: '', number: '', password: '', range: '' } }, u = { locale: 'en', backdrop: 'static', animate: !0, className: null, closeButton: !0, show: !0, container: 'body', value: '', inputType: 'text', errorMessage: null, swapButtonOrder: !1, centerVertical: !1, multiple: !1, scrollable: !1, reusable: !1, relatedTarget: null, size: null, id: null }; function l(e, t, o) { return s.extend(!0, {}, e, function (e, t) { var o = e.length; let a = {}; if (o < 1 || 2 < o) throw new Error('Invalid argument length'); return 2 === o || 'string' == typeof e[0] ? (a[t[0]] = e[0], a[t[1]] = e[1]) : a = e[0], a }(t, o)) } function p(e, t, a, r) { let o; r && r[0] && (o = r[0].locale || u.locale, (r[0].swapButtonOrder || u.swapButtonOrder) && (t = t.reverse())); e = { className: 'bootbox-' + e, buttons: function (o, a) { let r = {}; for (let t = 0, e = o.length; t < e; t++) { let e = o[t]; var n = e.toLowerCase(), l = e.toUpperCase(); r[n] = { label: function (e, t) { t = i[t]; return (t || i.en)[e] }(l, a) } } return r }(t, o) }; { e = l(e, r, a); var n = t; let o = {}; return f(n, function (e, t) { o[t] = !0 }), f(e.buttons, function (e) { if (o[e] === c) throw new Error('button key "' + e + '" is not allowed (options are ' + n.join(' ') + ')') }), e } } function b(e) { return Object.keys(e).length } function f(e, o) { let a = 0; s.each(e, function (e, t) { o(e, t, a++) }) } function m(e) { e.data.dialog.find('.bootbox-accept').first().trigger('focus') } function h(e) { e.target === e.data.dialog[0] && e.data.dialog.remove() } function C(e) { e.target === e.data.dialog[0] && (e.data.dialog.off('escape.close.bb'), e.data.dialog.off('click')) } function O(e, t, o) { e.stopPropagation(), e.preventDefault(), s.isFunction(o) && !1 === o.call(t, e) || t.modal('hide') } function w(e) { return /([01][0-9]|2[0-3]):[0-5][0-9]?:[0-5][0-9]/.test(e) } function g(e) { return /(\d{4})-(\d{2})-(\d{2})/.test(e) } return r.locales = function (e) { return e ? i[e] : i }, r.addLocale = function (e, o) { return s.each(['OK', 'CANCEL', 'CONFIRM'], function (e, t) { if (!o[t]) throw new Error('Please supply a translation for "' + t + '"') }), i[e] = { OK: o.OK, CANCEL: o.CANCEL, CONFIRM: o.CONFIRM }, r }, r.removeLocale = function (e) { if ('en' === e) throw new Error('"en" is used as the default and fallback locale and cannot be removed.'); return delete i[e], r }, r.setLocale = function (e) { return r.setDefaults('locale', e) }, r.setDefaults = function () { let e = {}; return 2 === arguments.length ? e[arguments[0]] = arguments[1] : e = arguments[0], s.extend(u, e), r }, r.hideAll = function () { return s('.bootbox').modal('hide'), r }, r.init = function (e) { return t(e || s) }, r.dialog = function (t) { if (s.fn.modal === c) throw new Error('"$.fn.modal" is not defined; please double check you have included the Bootstrap JavaScript library. See //getbootstrap.com/docs/5.1/getting-started/introduction/ for more details.'); t = function (a) { let r, n; if ('object' != typeof a) throw new Error('Please supply an object of options'); if (!a.message) throw new Error('"message" option must not be null or an empty string.'); (a = s.extend({}, u, a)).backdrop ? a.backdrop = 'string' != typeof a.backdrop || 'static' !== a.backdrop.toLowerCase() || 'static' : a.backdrop = !1 !== a.backdrop && 0 !== a.backdrop && 'static'; a.buttons || (a.buttons = {}); return r = a.buttons, n = b(r), f(r, function (e, t, o) { if (s.isFunction(t) && (t = r[e] = { callback: t }), 'object' !== s.type(t)) throw new Error('button with key "' + e + '" must be an object'); if (t.label || (t.label = e), !t.className) { let e = !1; e = a.swapButtonOrder ? 0 === o : o === n - 1, n <= 2 && e ? t.className = 'btn-primary' : t.className = 'btn-secondary btn-default' } }), a }(t), s.fn.modal.Constructor.VERSION ? (t.fullBootstrapVersion = s.fn.modal.Constructor.VERSION, l = t.fullBootstrapVersion.indexOf('.'), t.bootstrap = t.fullBootstrapVersion.substring(0, l)) : (t.bootstrap = '2', t.fullBootstrapVersion = '2.3.2', console.warn('Bootbox will *mostly* work with Bootstrap 2, but we do not officially support it. Please upgrade, if possible.')); let o = s(d.dialog), e = o.find('.modal-dialog'), a = o.find('.modal-body'), r = s(d.header), n = s(d.footer); var l = t.buttons; let i = { onEscape: t.onEscape }; if (a.find('.bootbox-body').html(t.message), 0 < b(t.buttons) && (f(l, function (e, t) { let o = s(d.button); switch (o.data('bb-handler', e), o.addClass(t.className), e) { case 'ok': case 'confirm': o.addClass('bootbox-accept'); break; case 'cancel': o.addClass('bootbox-cancel') }o.html(t.label), t.id && o.attr({ id: t.id }), !0 === t.disabled && o.prop({ disabled: !0 }), n.append(o), i[e] = t.callback }), a.after(n)), !0 === t.animate && o.addClass('fade'), t.className && o.addClass(t.className), t.id && o.attr({ id: t.id }), t.size) switch (t.fullBootstrapVersion.substring(0, 3) < '3.1' && console.warn('"size" requires Bootstrap 3.1.0 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.'), t.size) { case 'small': case 'sm': e.addClass('modal-sm'); break; case 'sm-max': e.addClass('modal-sm max-size'); break; case 'large': case 'lg': e.addClass('modal-lg'); break; case 'lg-max': e.addClass('modal-lg max-size'); break; case 'extra-large': case 'xl': e.addClass('modal-xl'), t.fullBootstrapVersion.substring(0, 3) < '4.2' && console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.'); break; case 'xl-max': e.addClass('modal-xl max-size'), t.fullBootstrapVersion.substring(0, 3) < '4.2' && console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.'); break; case 'xxl-max': e.addClass('modal-xxl max-size'), t.fullBootstrapVersion.substring(0, 3) < '4.2' && console.warn('Using size "xl"/"extra-large" requires Bootstrap 4.2.0 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.'); break; case '': e.addClass('modal-sm') }if (t.scrollable && (e.addClass('modal-dialog-scrollable'), t.fullBootstrapVersion.substring(0, 3) < '4.3' && console.warn('Using "scrollable" requires Bootstrap 4.3.0 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.')), t.title || t.closeButton) { if (t.title ? r.find('.modal-title').html(t.title) : r.find('.modal-title').html(' Thông báo'), t.closeButton) { let e = s(d.closeButton); t.bootstrap < 5 && e.html('×'), t.bootstrap < 4 ? r.prepend(e) : r.append(e) } a.before(r) } if (t.centerVertical && (e.addClass('modal-dialog-centered'), t.fullBootstrapVersion < '4.0.0' && console.warn('"centerVertical" requires Bootstrap 4.0.0-beta.3 or higher. You appear to be using ' + t.fullBootstrapVersion + '. Please upgrade to use this option.')), t.reusable || (o.one('hide.bs.modal', { dialog: o }, C), o.one('hidden.bs.modal', { dialog: o }, h)), t.onHide) { if (!s.isFunction(t.onHide)) throw new Error('Argument supplied to "onHide" must be a function'); o.on('hide.bs.modal', t.onHide) } if (t.onHidden) { if (!s.isFunction(t.onHidden)) throw new Error('Argument supplied to "onHidden" must be a function'); o.on('hidden.bs.modal', t.onHidden) } if (t.onShow) { if (!s.isFunction(t.onShow)) throw new Error('Argument supplied to "onShow" must be a function'); o.on('show.bs.modal', t.onShow) } if (o.one('shown.bs.modal', { dialog: o }, m), t.onShown) { if (!s.isFunction(t.onShown)) throw new Error('Argument supplied to "onShown" must be a function'); o.on('shown.bs.modal', t.onShown) } if (!0 === t.backdrop) { let t = !1; o.on('mousedown', '.modal-content', function (e) { e.stopPropagation(), t = !0 }), o.on('click.dismiss.bs.modal', function (e) { t || e.target !== e.currentTarget || o.trigger('escape.close.bb') }) } return o.on('escape.close.bb', function (e) { i.onEscape && O(e, o, i.onEscape) }), o.on('click', '.modal-footer button:not(.disabled)', function (e) { var t = s(this).data('bb-handler'); t !== c && O(e, o, i[t]) }), o.on('click', '.bootbox-close-button', function (e) { O(e, o, i.onEscape) }), o.on('keyup', function (e) { 27 === e.which && o.trigger('escape.close.bb') }), s(t.container).append(o), o.modal({ backdrop: t.backdrop, keyboard: !1, show: !1 }), t.show && o.modal('show', t.relatedTarget), o }, r.alert = function () { let e; if ((e = p('alert', ['ok'], ['message', 'callback'], arguments)).callback && !s.isFunction(e.callback)) throw new Error('alert requires the "callback" property to be a function when provided'); return e.buttons.ok.callback = e.onEscape = function () { return !s.isFunction(e.callback) || e.callback.call(this) }, r.dialog(e) }, r.confirm = function () { let e; if (e = p('confirm', ['cancel', 'confirm'], ['message', 'callback'], arguments), s.isFunction(e.callback)) return e.buttons.cancel.callback = e.onEscape = function () { return e.callback.call(this, !1) }, e.buttons.confirm.callback = function () { return e.callback.call(this, !0) }, r.dialog(e); throw new Error('confirm requires a callback') }, r.prompt = function () { let n, t, e, l; var o, a; let i; if (e = s(d.form), (n = p('prompt', ['cancel', 'confirm'], ['title', 'callback'], arguments)).value || (n.value = u.value), n.inputType || (n.inputType = u.inputType), o = (n.show === c ? u : n).show, n.show = !1, n.buttons.cancel.callback = n.onEscape = function () { return n.callback.call(this, null) }, n.buttons.confirm.callback = function () { let t; if ('checkbox' === n.inputType) t = l.find('input:checked').map(function () { return s(this).val() }).get(); else if ('radio' === n.inputType) t = l.find('input:checked').val(); else { let e = l[0]; if (n.errorMessage && e.setCustomValidity(''), e.checkValidity && !e.checkValidity()) return n.errorMessage && e.setCustomValidity(n.errorMessage), e.reportValidity && e.reportValidity(), !1; t = 'select' === n.inputType && !0 === n.multiple ? l.find('option:selected').map(function () { return s(this).val() }).get() : l.val() } return n.callback.call(this, t) }, !n.title) throw new Error('prompt requires a title'); if (!s.isFunction(n.callback)) throw new Error('prompt requires a callback'); if (!d.inputs[n.inputType]) throw new Error('Invalid prompt type'); switch (l = s(d.inputs[n.inputType]), n.inputType) { case 'text': case 'textarea': case 'email': case 'password': l.val(n.value), n.placeholder && l.attr('placeholder', n.placeholder), n.pattern && l.attr('pattern', n.pattern), n.maxlength && l.attr('maxlength', n.maxlength), n.required && l.prop({ required: !0 }), n.rows && !isNaN(parseInt(n.rows)) && 'textarea' === n.inputType && l.attr({ rows: n.rows }); break; case 'date': case 'time': case 'number': case 'range': if (l.val(n.value), n.placeholder && l.attr('placeholder', n.placeholder), n.pattern ? l.attr('pattern', n.pattern) : 'date' === n.inputType ? l.attr('pattern', 'd{4}-d{2}-d{2}') : 'time' === n.inputType && l.attr('pattern', 'd{2}:d{2}'), n.required && l.prop({ required: !0 }), 'date' !== n.inputType && n.step) { if (!('any' === n.step || !isNaN(n.step) && 0 < parseFloat(n.step))) throw new Error('"step" must be a valid positive number or the value "any". See //developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-step for more information.'); l.attr('step', n.step) } !function (e, t, o) { let a = !1, r = !0, n = !0; if ('date' === e) t === c || (r = g(t)) ? o === c || (n = g(o)) || console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 //www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your max value may not be enforced by this browser.') : console.warn('Browsers which natively support the "date" input type expect date values to be of the form "YYYY-MM-DD" (see ISO-8601 //www.iso.org/iso-8601-date-and-time-format.html). Bootbox does not enforce this rule, but your min value may not be enforced by this browser.'); else if ('time' === e) { if (t !== c && !(r = w(t))) throw new Error('"min" is not a valid time. See //www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.'); if (o !== c && !(n = w(o))) throw new Error('"max" is not a valid time. See //www.w3.org/TR/2012/WD-html-markup-20120315/datatypes.html#form.data.time for more information.') } else { if (t !== c && isNaN(t)) throw r = !1, new Error('"min" must be a valid number. See //developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-min for more information.'); if (o !== c && isNaN(o)) throw n = !1, new Error('"max" must be a valid number. See //developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.') } if (r && n) { if (o <= t) throw new Error('"max" must be greater than "min". See //developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-max for more information.'); a = !0 } return a }(n.inputType, n.min, n.max) || (n.min !== c && l.attr('min', n.min), n.max !== c && l.attr('max', n.max)); break; case 'select': let r = {}; if (i = n.inputOptions || [], !s.isArray(i)) throw new Error('Please pass an array of input options'); if (!i.length) throw new Error('prompt with "inputType" set to "select" requires at least one option'); n.required && l.prop({ required: !0 }), n.multiple && l.prop({ multiple: !0 }), f(i, function (e, t) { let o = l; if (t.value === c || t.text === c) throw new Error('each option needs a "value" property and a "text" property'); t.group && (r[t.group] || (r[t.group] = s('').attr('label', t.group)), o = r[t.group]); let a = s(d.option); a.attr('value', t.value).text(t.text), o.append(a) }), f(r, function (e, t) { l.append(t) }), l.val(n.value), n.bootstrap < 5 && l.removeClass('form-select').addClass('form-control'); break; case 'checkbox': let t = s.isArray(n.value) ? n.value : [n.value]; if (!(i = n.inputOptions || []).length) throw new Error('prompt with "inputType" set to "checkbox" requires at least one option'); l = s('
'), f(i, function (e, o) { if (o.value === c || o.text === c) throw new Error('each option needs a "value" property and a "text" property'); let a = s(d.inputs[n.inputType]); a.find('input').attr('value', o.value), a.find('label').append('\n' + o.text), f(t, function (e, t) { t === o.value && a.find('input').prop('checked', !0) }), l.append(a) }); break; case 'radio': if (n.value !== c && s.isArray(n.value)) throw new Error('prompt with "inputType" set to "radio" requires a single, non-array value for "value"'); if (!(i = n.inputOptions || []).length) throw new Error('prompt with "inputType" set to "radio" requires at least one option'); l = s('
'); let a = !0; f(i, function (e, t) { if (t.value === c || t.text === c) throw new Error('each option needs a "value" property and a "text" property'); let o = s(d.inputs[n.inputType]); o.find('input').attr('value', t.value), o.find('label').append('\n' + t.text), n.value !== c && t.value === n.value && (o.find('input').prop('checked', !0), a = !1), l.append(o) }), a && l.find('input[type="radio"]').first().prop('checked', !0) }return e.append(l), e.on('submit', function (e) { e.preventDefault(), e.stopPropagation(), t.find('.bootbox-accept').trigger('click') }), '' !== s.trim(n.message) && (a = s(d.promptMessage).html(n.message), e.prepend(a)), n.message = e, (t = r.dialog(n)).off('shown.bs.modal', m), t.on('shown.bs.modal', function () { l.focus() }), !0 === o && t.modal('show'), t }, r }), function (e, t) { 'use strict'; 'function' == typeof define && define.amd ? define(['bootbox'], t) : 'object' == typeof module && module.exports ? t(require('./bootbox')) : t(e.bootbox) }(this, function (e) { 'use strict'; e.addLocale('ar', { OK: 'موافق', CANCEL: 'الغاء', CONFIRM: 'تأكيد' }), e.addLocale('az', { OK: 'OK', CANCEL: 'İmtina et', CONFIRM: 'Təsdiq et' }), e.addLocale('bg-BG', { OK: 'Ок', CANCEL: 'Отказ', CONFIRM: 'Потвърждавам' }), e.addLocale('cs', { OK: 'OK', CANCEL: 'Zrušit', CONFIRM: 'Potvrdit' }), e.addLocale('da', { OK: 'OK', CANCEL: 'Annuller', CONFIRM: 'Accepter' }), e.addLocale('de', { OK: 'OK', CANCEL: 'Abbrechen', CONFIRM: 'Akzeptieren' }), e.addLocale('el', { OK: 'Εντάξει', CANCEL: 'Ακύρωση', CONFIRM: 'Επιβεβαίωση' }), e.addLocale('en', { OK: 'OK', CANCEL: 'Cancel', CONFIRM: 'OK' }), e.addLocale('es', { OK: 'OK', CANCEL: 'Cancelar', CONFIRM: 'Aceptar' }), e.addLocale('et', { OK: 'OK', CANCEL: 'Katkesta', CONFIRM: 'OK' }), e.addLocale('eu', { OK: 'OK', CANCEL: 'Ezeztatu', CONFIRM: 'Onartu' }), e.addLocale('fa', { OK: 'قبول', CANCEL: 'لغو', CONFIRM: 'تایید' }), e.addLocale('fi', { OK: 'OK', CANCEL: 'Peruuta', CONFIRM: 'OK' }), e.addLocale('fr', { OK: 'OK', CANCEL: 'Annuler', CONFIRM: 'Confirmer' }), e.addLocale('he', { OK: 'אישור', CANCEL: 'ביטול', CONFIRM: 'אישור' }), e.addLocale('hr', { OK: 'OK', CANCEL: 'Odustani', CONFIRM: 'Potvrdi' }), e.addLocale('hu', { OK: 'OK', CANCEL: 'Mégsem', CONFIRM: 'Megerősít' }), e.addLocale('id', { OK: 'OK', CANCEL: 'Batal', CONFIRM: 'OK' }), e.addLocale('it', { OK: 'OK', CANCEL: 'Annulla', CONFIRM: 'Conferma' }), e.addLocale('ja', { OK: 'OK', CANCEL: 'キャンセ?, CONFIRM: '確認' }), e.addLocale('ka', { OK: 'OK', CANCEL: 'გაუქმება', CONFIRM: 'დადასტურებ? }), e.addLocale('ko', { OK: 'OK', CANCEL: '취소', CONFIRM: '확인' }), e.addLocale('lt', { OK: 'Gerai', CANCEL: 'Atšaukti', CONFIRM: 'Patvirtinti' }), e.addLocale('lv', { OK: 'Labi', CANCEL: 'Atcelt', CONFIRM: 'Apstiprināt' }), e.addLocale('nl', { OK: 'OK', CANCEL: 'Annuleren', CONFIRM: 'Accepteren' }), e.addLocale('no', { OK: 'OK', CANCEL: 'Avbryt', CONFIRM: 'OK' }), e.addLocale('pl', { OK: 'OK', CANCEL: 'Anuluj', CONFIRM: 'Potwierdź' }), e.addLocale('pt-BR', { OK: 'OK', CANCEL: 'Cancelar', CONFIRM: 'Sim' }), e.addLocale('pt', { OK: 'OK', CANCEL: 'Cancelar', CONFIRM: 'Confirmar' }), e.addLocale('ru', { OK: 'OK', CANCEL: 'Отмена', CONFIRM: 'Применить' }), e.addLocale('sk', { OK: 'OK', CANCEL: 'Zrušiť', CONFIRM: 'Potvrdiť' }), e.addLocale('sl', { OK: 'OK', CANCEL: 'Prekliči', CONFIRM: 'Potrdi' }), e.addLocale('sq', { OK: 'OK', CANCEL: 'Anulo', CONFIRM: 'Prano' }), e.addLocale('sv', { OK: 'OK', CANCEL: 'Avbryt', CONFIRM: 'OK' }), e.addLocale('sw', { OK: 'Sawa', CANCEL: 'Ghairi', CONFIRM: 'Thibitisha' }), e.addLocale('ta', { OK: 'சர?, CANCEL: 'ரத்த?செய்', CONFIRM: 'உறுத?செய்' }), e.addLocale('th', { OK: 'ตกลง', CANCEL: 'ยกเลิ?, CONFIRM: 'ยืนยัน' }), e.addLocale('tr', { OK: 'Tamam', CANCEL: 'İptal', CONFIRM: 'Onayla' }), e.addLocale('uk', { OK: 'OK', CANCEL: 'Відміна', CONFIRM: 'Прийняти' }), e.addLocale('vi', { OK: 'OK', CANCEL: 'Hủy b?, CONFIRM: 'Xác nhận' }), e.addLocale('zh-CN', { OK: 'OK', CANCEL: '取消', CONFIRM: '确认' }), e.addLocale('zh-TW', { OK: 'OK', CANCEL: '取消', CONFIRM: '確認' }) }); /*! * sweetalert2 v11.7.3 * Released under the MIT License. * .swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:rgba(0,0,0,0) !important}.swal2-container.swal2-top-start,.swal2-container.swal2-center-start,.swal2-container.swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}.swal2-container.swal2-top,.swal2-container.swal2-center,.swal2-container.swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}.swal2-container.swal2-top-end,.swal2-container.swal2-center-end,.swal2-container.swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-start>.swal2-popup,.swal2-container.swal2-center-left>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-start>.swal2-popup,.swal2-container.swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-row>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none !important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:none}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:none}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:rgba(0,0,0,0);color:#f27474}.swal2-close:focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-input,.swal2-file,.swal2-textarea,.swal2-select,.swal2-radio,.swal2-checkbox{margin:1em 2em 3px}.swal2-input,.swal2-file,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-input.swal2-inputerror,.swal2-file.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}.swal2-input:focus,.swal2-file:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-input::placeholder,.swal2-file::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 3px;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}.swal2-radio,.swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-radio label,.swal2-checkbox label{margin:0 .6em;font-size:1.125em}.swal2-radio input,.swal2-checkbox input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto} */ !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"]), o = t(["success", "warning", "info", "question", "error"]), i = "SweetAlert2:", s = e => e.charAt(0).toUpperCase() + e.slice(1), r = e => { console.warn(`${i} ${"object" == typeof e ? e.join(" ") : e}`) }, a = e => { console.error(`${i} ${e}`) }, l = [], c = (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)) }, u = e => "function" == typeof e ? e() : e, d = e => e && "function" == typeof e.toPromise, p = e => d(e) ? e.toPromise() : Promise.resolve(e), m = e => e && Promise.resolve(e) === e, g = () => document.body.querySelector(`.${n.container}`), h = e => { const t = g(); return t ? t.querySelector(e) : null }, f = e => h(`.${e}`), b = () => f(n.popup), y = () => f(n.icon), w = () => f(n.title), v = () => f(n["html-container"]), C = () => f(n.image), A = () => f(n["progress-steps"]), k = () => f(n["validation-message"]), B = () => h(`.${n.actions} .${n.confirm}`), P = () => h(`.${n.actions} .${n.cancel}`), x = () => h(`.${n.actions} .${n.deny}`), E = () => h(`.${n.loader}`), $ = () => f(n.actions), T = () => f(n.footer), S = () => f(n["timer-progress-bar"]), L = () => f(n.close), O = () => { const e = Array.from(b().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort(((e, t) => { const n = parseInt(e.getAttribute("tabindex")), o = parseInt(t.getAttribute("tabindex")); return n > o ? 1 : n < o ? -1 : 0 })), t = Array.from(b().querySelectorAll('\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')).filter((e => "-1" !== e.getAttribute("tabindex"))); return (e => { const t = []; for (let n = 0; n < e.length; n++)-1 === t.indexOf(e[n]) && t.push(e[n]); return t })(e.concat(t)).filter((e => J(e))) }, j = () => D(document.body, n.shown) && !D(document.body, n["toast-shown"]) && !D(document.body, n["no-backdrop"]), M = () => b() && D(b(), n.toast), H = { previousBodyPadding: null }, I = (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) })) } }, D = (e, t) => { if (!t) return !1; const n = t.split(/\s+/); for (let t = 0; t < n.length; t++)if (!e.classList.contains(n[t])) return !1; return !0 }, q = (e, t, i) => { if (((e, t) => { Array.from(e.classList).forEach((i => { Object.values(n).includes(i) || Object.values(o).includes(i) || Object.values(t.showClass).includes(i) || e.classList.remove(i) })) })(e, t), t.customClass && t.customClass[i]) { if ("string" != typeof t.customClass[i] && !t.customClass[i].forEach) return void r(`Invalid type of customClass.${i}! Expected string or iterable object, got "${typeof t.customClass[i]}"`); R(e, t.customClass[i]) } }, V = (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}`) } }, N = e => { if (e.focus(), "file" !== e.type) { const t = e.value; e.value = "", e.value = t } }, F = (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) => { F(e, t, !0) }, U = (e, t) => { F(e, t, !1) }, _ = (e, t) => { const n = Array.from(e.children); for (let e = 0; e < n.length; e++) { const o = n[e]; if (o instanceof HTMLElement && D(o, t)) return o } }, W = (e, t, n) => { n === `${parseInt(n)}` && (n = parseInt(n)), n || 0 === parseInt(n) ? e.style[t] = "number" == typeof n ? `${n}px` : n : e.style.removeProperty(t) }, z = function (e) { let t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "flex"; e.style.display = t }, K = e => { e.style.display = "none" }, Y = (e, t, n, o) => { const i = e.querySelector(t); i && (i.style[n] = o) }, Z = function (e, t) { t ? z(e, arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "flex") : K(e) }, J = e => !(!e || !(e.offsetWidth || e.offsetHeight || e.getClientRects().length)), X = e => !!(e.scrollHeight > e.clientHeight), G = e => { const t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), o = parseFloat(t.getPropertyValue("transition-duration") || "0"); return n > 0 || o > 0 }, Q = function (e) { let t = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; const n = S(); J(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout((() => { n.style.transition = `width ${e / 1e3}s linear`, n.style.width = "0%" }), 10)) }, ee = {}, te = e => new Promise((t => { if (!e) return t(); const n = window.scrollX, o = window.scrollY; ee.restoreFocusTimeout = setTimeout((() => { ee.previousActiveElement instanceof HTMLElement ? (ee.previousActiveElement.focus(), ee.previousActiveElement = null) : document.body && document.body.focus(), t() }), 100), window.scrollTo(n, o) })), ne = () => "undefined" == typeof window || "undefined" == typeof document, oe = `\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 = () => { ee.currentInstance.resetValidationMessage() }, se = e => { const t = (() => { const e = g(); return !!e && (e.remove(), U([document.documentElement, document.body], [n["no-backdrop"], n["toast-shown"], n["has-column"]]), !0) })(); if (ne()) return void a("SweetAlert2 requires document to initialize"); const o = document.createElement("div"); o.className = n.container, t && R(o, n["no-transition"]), I(o, oe); const i = "string" == typeof (s = e.target) ? document.querySelector(s) : s; var s; i.appendChild(o), (e => { const t = b(); 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(g(), n.rtl) })(i), (() => { const e = b(), t = _(e, n.input), o = _(e, n.file), i = e.querySelector(`.${n.range} input`), s = e.querySelector(`.${n.range} output`), r = _(e, n.select), a = e.querySelector(`.${n.checkbox} input`), l = _(e, n.textarea); t.oninput = ie, o.onchange = ie, r.onchange = ie, a.onchange = ie, l.oninput = ie, i.oninput = () => { ie(), s.value = i.value }, i.onchange = () => { ie(), s.value = i.value } })() }, re = (e, t) => { e instanceof HTMLElement ? t.appendChild(e) : "object" == typeof e ? ae(e, t) : e && I(t, e) }, ae = (e, t) => { e.jquery ? le(t, e) : I(t, e.toString()) }, le = (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)) }, ce = (() => { if (ne()) 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 })(), ue = (e, t) => { const o = $(), i = E(); t.showConfirmButton || t.showDenyButton || t.showCancelButton ? z(o) : K(o), q(o, t, "actions"), function (e, t, o) { const i = B(), s = x(), r = P(); de(i, "confirm", o), de(s, "deny", o), de(r, "cancel", o), function (e, t, o, i) { if (!i.buttonsStyling) return void U([e, t, o], n.styled); R([e, t, o], n.styled), i.confirmButtonColor && (e.style.backgroundColor = i.confirmButtonColor, R(e, n["default-outline"])); i.denyButtonColor && (t.style.backgroundColor = i.denyButtonColor, R(t, n["default-outline"])); i.cancelButtonColor && (o.style.backgroundColor = i.cancelButtonColor, R(o, n["default-outline"])) }(i, s, r, o), o.reverseButtons && (o.toast ? (e.insertBefore(r, i), e.insertBefore(s, i)) : (e.insertBefore(r, t), e.insertBefore(s, t), e.insertBefore(i, t))) }(o, i, t), I(i, t.loaderHtml), q(i, t, "loader") }; function de(e, t, o) { Z(e, o[`show${s(t)}Button`], "inline-block"), I(e, o[`${t}ButtonText`]), e.setAttribute("aria-label", o[`${t}ButtonAriaLabel`]), e.className = n[t], q(e, o, `${t}Button`), R(e, o[`${t}ButtonClass`]) } const pe = (e, t) => { const o = g(); o && (!function (e, t) { "string" == typeof t ? e.style.background = t : t || R([document.documentElement, document.body], n["no-backdrop"]) }(o, 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)) }(o, t.position), function (e, t) { if (t && "string" == typeof t) { const o = `grow-${t}`; o in n && R(e, n[o]) } }(o, t.grow), q(o, t, "container")) }; const me = ["input", "file", "range", "select", "radio", "checkbox", "textarea"], ge = e => { if (!Ce[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 = we(e.input), n = Ce[e.input](t, e); z(t), e.inputAutoFocus && setTimeout((() => { N(n) })) }, he = (e, t) => { const n = V(b(), e); if (n) { (e => { for (let t = 0; t < e.attributes.length; t++) { const n = e.attributes[t].name;["type", "value", "style"].includes(n) || e.removeAttribute(n) } })(n); for (const e in t) n.setAttribute(e, t[e]) } }, fe = e => { const t = we(e.input); "object" == typeof e.customClass && R(t, e.customClass.input) }, be = (e, t) => { e.placeholder && !t.inputPlaceholder || (e.placeholder = t.inputPlaceholder) }, ye = (e, t, o) => { if (o.inputLabel) { e.id = n.input; const i = document.createElement("label"), s = n["input-label"]; i.setAttribute("for", e.id), i.className = s, "object" == typeof o.customClass && R(i, o.customClass.inputLabel), i.innerText = o.inputLabel, t.insertAdjacentElement("beforebegin", i) } }, we = e => _(b(), n[e] || n.input), ve = (e, t) => { ["string", "number"].includes(typeof t) ? e.value = `${t}` : m(t) || r(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`) }, Ce = {}; Ce.text = Ce.email = Ce.password = Ce.number = Ce.tel = Ce.url = (e, t) => (ve(e, t.inputValue), ye(e, e, t), be(e, t), e.type = t.input, e), Ce.file = (e, t) => (ye(e, e, t), be(e, t), e), Ce.range = (e, t) => { const n = e.querySelector("input"), o = e.querySelector("output"); return ve(n, t.inputValue), n.type = t.input, ve(o, t.inputValue), ye(n, e, t), e }, Ce.select = (e, t) => { if (e.textContent = "", t.inputPlaceholder) { const n = document.createElement("option"); I(n, t.inputPlaceholder), n.value = "", n.disabled = !0, n.selected = !0, e.appendChild(n) } return ye(e, e, t), e }, Ce.radio = e => (e.textContent = "", e), Ce.checkbox = (e, t) => { const o = V(b(), "checkbox"); o.value = "1", o.id = n.checkbox, o.checked = Boolean(t.inputValue); const i = e.querySelector("span"); return I(i, t.inputPlaceholder), o }, Ce.textarea = (e, t) => { ve(e, t.inputValue), be(e, t), ye(e, e, t); return setTimeout((() => { if ("MutationObserver" in window) { const t = parseInt(window.getComputedStyle(b()).width); new MutationObserver((() => { const n = e.offsetWidth + (o = e, parseInt(window.getComputedStyle(o).marginLeft) + parseInt(window.getComputedStyle(o).marginRight)); var o; b().style.width = n > t ? `${n}px` : null })).observe(e, { attributes: !0, attributeFilter: ["style"] }) } })), e }; const Ae = (t, o) => { const i = v(); q(i, o, "htmlContainer"), o.html ? (re(o.html, i), z(i, "block")) : o.text ? (i.textContent = o.text, z(i, "block")) : K(i), ((t, o) => { const i = b(), s = e.innerParams.get(t), r = !s || o.input !== s.input; me.forEach((e => { const t = _(i, n[e]); he(e, o.inputAttributes), t.className = n[e], r && K(t) })), o.input && (r && ge(o), fe(o)) })(t, o) }, ke = (e, t) => { for (const n in o) t.icon !== n && U(e, o[n]); R(e, o[t.icon]), xe(e, t), Be(), q(e, t, "icon") }, Be = () => { const e = b(), t = window.getComputedStyle(e).getPropertyValue("background-color"), n = e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"); for (let e = 0; e < n.length; e++)n[e].style.backgroundColor = t }, Pe = (e, t) => { let n, o = e.innerHTML; if (t.iconHtml) n = Ee(t.iconHtml); else if ("success" === t.icon) n = '\n
    \n \n
    \n
    \n', o = o.replace(/ style=".*?"/g, ""); else if ("error" === t.icon) n = '\n \n \n \n \n'; else { n = Ee({ question: "?", warning: "!", info: "i" }[t.icon]) } o.trim() !== n.trim() && I(e, n) }, xe = (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"]) Y(e, n, "backgroundColor", t.iconColor); Y(e, ".swal2-success-ring", "borderColor", t.iconColor) } }, Ee = e => `
    ${e}
    `, $e = (e, t) => { e.className = `${n.popup} ${J(e) ? t.showClass.popup : ""}`, t.toast ? (R([document.documentElement, document.body], n["toast-shown"]), R(e, n.toast)) : R(e, n.modal), q(e, t, "popup"), "string" == typeof t.customClass && R(e, t.customClass), t.icon && R(e, n[`icon-${t.icon}`]) }, Te = e => { const t = document.createElement("li"); return R(t, n["progress-step"]), I(t, e), t }, Se = e => { const t = document.createElement("li"); return R(t, n["progress-step-line"]), e.progressStepsDistance && W(t, "width", e.progressStepsDistance), t }, Le = (t, i) => { ((e, t) => { const n = g(), o = b(); t.toast ? (W(n, "width", t.width), o.style.width = "100%", o.insertBefore(E(), y())) : W(o, "width", t.width), W(o, "padding", t.padding), t.color && (o.style.color = t.color), t.background && (o.style.background = t.background), K(k()), $e(o, t) })(0, i), pe(0, i), ((e, t) => { const o = A(); t.progressSteps && 0 !== t.progressSteps.length ? (z(o), o.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, i) => { const s = Te(e); if (o.appendChild(s), i === t.currentProgressStep && R(s, n["active-progress-step"]), i !== t.progressSteps.length - 1) { const e = Se(t); o.appendChild(e) } }))) : K(o) })(0, i), ((t, n) => { const i = e.innerParams.get(t), s = y(); if (i && n.icon === i.icon) return Pe(s, n), void ke(s, n); if (n.icon || n.iconHtml) { if (n.icon && -1 === Object.keys(o).indexOf(n.icon)) return a(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${n.icon}"`), void K(s); z(s), Pe(s, n), ke(s, n), R(s, n.showClass.icon) } else K(s) })(t, i), ((e, t) => { const o = C(); t.imageUrl ? (z(o, ""), o.setAttribute("src", t.imageUrl), o.setAttribute("alt", t.imageAlt), W(o, "width", t.imageWidth), W(o, "height", t.imageHeight), o.className = n.image, q(o, t, "image")) : K(o) })(0, i), ((e, t) => { const n = w(); Z(n, t.title || t.titleText, "block"), t.title && re(t.title, n), t.titleText && (n.innerText = t.titleText), q(n, t, "title") })(0, i), ((e, t) => { const n = L(); I(n, t.closeButtonHtml), q(n, t, "closeButton"), Z(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel) })(0, i), Ae(t, i), ue(0, i), ((e, t) => { const n = T(); Z(n, t.footer), t.footer && re(t.footer, n), q(n, t, "footer") })(0, i), "function" == typeof i.didRender && i.didRender(b()) }; function Oe() { const t = e.innerParams.get(this); if (!t) return; const o = e.domCache.get(this); K(o.loader), M() ? t.icon && z(y()) : je(o), U([o.popup, o.actions], n.loading), o.popup.removeAttribute("aria-busy"), o.popup.removeAttribute("data-loading"), o.confirmButton.disabled = !1, o.denyButton.disabled = !1, o.cancelButton.disabled = !1 } const je = e => { const t = e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace")); t.length ? z(t[0], "inline-block") : J(B()) || J(x()) || J(P()) || K(e.actions) }; const Me = () => B() && B().click(), He = Object.freeze({ cancel: "cancel", backdrop: "backdrop", close: "close", esc: "esc", timer: "timer" }), Ie = e => { e.keydownTarget && e.keydownHandlerAdded && (e.keydownTarget.removeEventListener("keydown", e.keydownHandler, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !1) }, De = (e, t) => { const n = O(); if (n.length) return (e += t) === n.length ? e = 0 : -1 === e && (e = n.length - 1), void n[e].focus(); b().focus() }, qe = ["ArrowRight", "ArrowDown"], Ve = ["ArrowLeft", "ArrowUp"], Ne = (t, n, o) => { const i = e.innerParams.get(t); i && (n.isComposing || 229 === n.keyCode || (i.stopKeydownPropagation && n.stopPropagation(), "Enter" === n.key ? Fe(t, n, i) : "Tab" === n.key ? Re(n) : [...qe, ...Ve].includes(n.key) ? Ue(n.key) : "Escape" === n.key && _e(n, i, o))) }, Fe = (e, t, n) => { if (u(n.allowEnterKey) && t.target && e.getInput() && t.target instanceof HTMLElement && t.target.outerHTML === e.getInput().outerHTML) { if (["textarea", "file"].includes(n.input)) return; Me(), t.preventDefault() } }, Re = e => { const t = e.target, n = O(); let o = -1; for (let e = 0; e < n.length; e++)if (t === n[e]) { o = e; break } e.shiftKey ? De(o, -1) : De(o, 1), e.stopPropagation(), e.preventDefault() }, Ue = e => { const t = [B(), x(), P()]; if (document.activeElement instanceof HTMLElement && !t.includes(document.activeElement)) return; const n = qe.includes(e) ? "nextElementSibling" : "previousElementSibling"; let o = document.activeElement; for (let e = 0; e < $().children.length; e++) { if (o = o[n], !o) return; if (o instanceof HTMLButtonElement && J(o)) break } o instanceof HTMLButtonElement && o.focus() }, _e = (e, t, n) => { u(t.allowEscapeKey) && (e.preventDefault(), n(He.esc)) }; var We = { swalPromiseResolve: new WeakMap, swalPromiseReject: new WeakMap }; const ze = () => { 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") })) }, Ke = () => { 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; b().scrollHeight > window.innerHeight - e && (g().style.paddingBottom = `${e}px`) } }, Ye = () => { const e = g(); let t; e.ontouchstart = e => { t = Ze(e) }, e.ontouchmove = e => { t && (e.preventDefault(), e.stopPropagation()) } }, Ze = e => { const t = e.target, n = g(); return !Je(e) && !Xe(e) && (t === n || !X(n) && t instanceof HTMLElement && "INPUT" !== t.tagName && "TEXTAREA" !== t.tagName && (!X(v()) || !v().contains(t))) }, Je = e => e.touches && e.touches.length && "stylus" === e.touches[0].touchType, Xe = e => e.touches && e.touches.length > 1, Ge = () => { if (D(document.body, n.iosfix)) { const e = parseInt(document.body.style.top, 10); U(document.body, n.iosfix), document.body.style.top = "", document.body.scrollTop = -1 * e } }, Qe = () => { null === H.previousBodyPadding && document.body.scrollHeight > window.innerHeight && (H.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${H.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`) }, et = () => { null !== H.previousBodyPadding && (document.body.style.paddingRight = `${H.previousBodyPadding}px`, H.previousBodyPadding = null) }; function tt(e, t, o, i) { M() ? lt(e, i) : (te(o).then((() => lt(e, i))), Ie(ee)); /^((?!chrome|android).)*safari/i.test(navigator.userAgent) ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), j() && (et(), Ge(), ze()), U([document.documentElement, document.body], [n.shown, n["height-auto"], n["no-backdrop"], n["toast-shown"]]) } function nt(e) { e = st(e); const t = We.swalPromiseResolve.get(this), n = ot(this); this.isAwaitingPromise() ? e.isDismissed || (it(this), t(e)) : n && t(e) } const ot = t => { const n = b(); if (!n) return !1; const o = e.innerParams.get(t); if (!o || D(n, o.hideClass.popup)) return !1; U(n, o.showClass.popup), R(n, o.hideClass.popup); const i = g(); return U(i, o.showClass.backdrop), R(i, o.hideClass.backdrop), rt(t, n, o), !0 }; const it = t => { t.isAwaitingPromise() && (e.awaitingPromise.delete(t), e.innerParams.get(t) || t._destroy()) }, st = e => void 0 === e ? { isConfirmed: !1, isDenied: !1, isDismissed: !0 } : Object.assign({ isConfirmed: !1, isDenied: !1, isDismissed: !1 }, e), rt = (e, t, n) => { const o = g(), i = ce && G(t); "function" == typeof n.willClose && n.willClose(t), i ? at(e, t, o, n.returnFocus, n.didClose) : tt(e, o, n.returnFocus, n.didClose) }, at = (e, t, n, o, i) => { ee.swalCloseEventFinishedCallback = tt.bind(null, e, n, o, i), t.addEventListener(ce, (function (e) { e.target === t && (ee.swalCloseEventFinishedCallback(), delete ee.swalCloseEventFinishedCallback) })) }, lt = (e, t) => { setTimeout((() => { "function" == typeof t && t.bind(e.params)(), e._destroy() })) }; function ct(t, n, o) { const i = e.domCache.get(t); n.forEach((e => { i[e].disabled = o })) } function ut(e, t) { if (e) if ("radio" === e.type) { const n = e.parentNode.parentNode.querySelectorAll("input"); for (let e = 0; e < n.length; e++)n[e].disabled = t } else e.disabled = t } const dt = { title: "", titleText: "", text: "", html: "", footer: "", icon: void 0, iconColor: void 0, iconHtml: void 0, template: void 0, toast: !1, showClass: { popup: "swal2-show", backdrop: "swal2-backdrop-show", icon: "swal2-icon-show" }, hideClass: { popup: "swal2-hide", backdrop: "swal2-backdrop-hide", icon: "swal2-icon-hide" }, customClass: {}, target: "body", color: void 0, backdrop: !0, heightAuto: !0, allowOutsideClick: !0, allowEscapeKey: !0, allowEnterKey: !0, stopKeydownPropagation: !0, keydownListenerCapture: !1, showConfirmButton: !0, showDenyButton: !1, showCancelButton: !1, preConfirm: void 0, preDeny: void 0, confirmButtonText: "OK", confirmButtonAriaLabel: "", confirmButtonColor: void 0, denyButtonText: "No", denyButtonAriaLabel: "", denyButtonColor: void 0, cancelButtonText: "Cancel", cancelButtonAriaLabel: "", cancelButtonColor: void 0, buttonsStyling: !0, reverseButtons: !1, focusConfirm: !0, focusDeny: !1, focusCancel: !1, returnFocus: !0, showCloseButton: !1, closeButtonHtml: "×", closeButtonAriaLabel: "Close this dialog", loaderHtml: "", showLoaderOnConfirm: !1, showLoaderOnDeny: !1, imageUrl: void 0, imageWidth: void 0, imageHeight: void 0, imageAlt: "", timer: void 0, timerProgressBar: !1, width: void 0, padding: void 0, background: void 0, input: void 0, inputPlaceholder: "", inputLabel: "", inputValue: "", inputOptions: {}, inputAutoFocus: !0, inputAutoTrim: !0, inputAttributes: {}, inputValidator: void 0, returnInputValueOnDeny: !1, validationMessage: void 0, grow: !1, position: "center", progressSteps: [], currentProgressStep: void 0, progressStepsDistance: void 0, willOpen: void 0, didOpen: void 0, didRender: void 0, willClose: void 0, didClose: void 0, didDestroy: void 0, scrollbarPadding: !0 }, pt = ["allowEscapeKey", "allowOutsideClick", "background", "buttonsStyling", "cancelButtonAriaLabel", "cancelButtonColor", "cancelButtonText", "closeButtonAriaLabel", "closeButtonHtml", "color", "confirmButtonAriaLabel", "confirmButtonColor", "confirmButtonText", "currentProgressStep", "customClass", "denyButtonAriaLabel", "denyButtonColor", "denyButtonText", "didClose", "didDestroy", "footer", "hideClass", "html", "icon", "iconColor", "iconHtml", "imageAlt", "imageHeight", "imageUrl", "imageWidth", "preConfirm", "preDeny", "progressSteps", "returnFocus", "reverseButtons", "showCancelButton", "showCloseButton", "showConfirmButton", "showDenyButton", "text", "title", "titleText", "willClose"], mt = {}, gt = ["allowOutsideClick", "allowEnterKey", "backdrop", "focusConfirm", "focusDeny", "focusCancel", "returnFocus", "heightAuto", "keydownListenerCapture"], ht = e => Object.prototype.hasOwnProperty.call(dt, e), ft = e => -1 !== pt.indexOf(e), bt = e => mt[e], yt = e => { ht(e) || r(`Unknown parameter "${e}"`) }, wt = e => { gt.includes(e) && r(`The parameter "${e}" is incompatible with toasts`) }, vt = e => { bt(e) && c(e, bt(e)) }; const Ct = e => { const t = {}; return Object.keys(e).forEach((n => { ft(n) ? t[n] = e[n] : r(`Invalid parameter to update: ${n}`) })), t }; const At = e => { kt(e), delete e.params, delete ee.keydownHandler, delete ee.keydownTarget, delete ee.currentInstance }, kt = t => { t.isAwaitingPromise() ? (Bt(e, t), e.awaitingPromise.set(t, !0)) : (Bt(We, t), Bt(e, t)) }, Bt = (e, t) => { for (const n in e) e[n].delete(t) }; var Pt = Object.freeze({ __proto__: null, _destroy: function () { const t = e.domCache.get(this), n = e.innerParams.get(this); n ? (t.popup && ee.swalCloseEventFinishedCallback && (ee.swalCloseEventFinishedCallback(), delete ee.swalCloseEventFinishedCallback), "function" == typeof n.didDestroy && n.didDestroy(), At(this)) : kt(this) }, close: nt, closeModal: nt, closePopup: nt, closeToast: nt, disableButtons: function () { ct(this, ["confirmButton", "denyButton", "cancelButton"], !0) }, disableInput: function () { ut(this.getInput(), !0) }, disableLoading: Oe, enableButtons: function () { ct(this, ["confirmButton", "denyButton", "cancelButton"], !1) }, enableInput: function () { ut(this.getInput(), !1) }, getInput: function (t) { const n = e.innerParams.get(t || this), o = e.domCache.get(t || this); return o ? V(o.popup, n.input) : null }, handleAwaitingPromise: it, hideLoading: Oe, isAwaitingPromise: function () { return !!e.awaitingPromise.get(this) }, rejectPromise: function (e) { const t = We.swalPromiseReject.get(this); it(this), t && t(e) }, resetValidationMessage: function () { const t = e.domCache.get(this); t.validationMessage && K(t.validationMessage); const o = this.getInput(); o && (o.removeAttribute("aria-invalid"), o.removeAttribute("aria-describedby"), U(o, n.inputerror)) }, showValidationMessage: function (t) { const o = e.domCache.get(this), i = e.innerParams.get(this); I(o.validationMessage, t), o.validationMessage.className = n["validation-message"], i.customClass && i.customClass.validationMessage && R(o.validationMessage, i.customClass.validationMessage), z(o.validationMessage); const s = this.getInput(); s && (s.setAttribute("aria-invalid", !0), s.setAttribute("aria-describedby", n["validation-message"]), N(s), R(s, n.inputerror)) }, update: function (t) { const n = b(), o = e.innerParams.get(this); if (!n || D(n, o.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 i = Ct(t), s = Object.assign({}, o, i); Le(this, s), e.innerParams.set(this, s), Object.defineProperties(this, { params: { value: Object.assign({}, this.params, t), writable: !1, enumerable: !0 } }) } }); const xt = e => { let t = b(); t || new Tn, t = b(); const n = E(); M() ? K(y()) : Et(t, e), z(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus() }, Et = (e, t) => { const o = $(), i = E(); !t && J(B()) && (t = B()), z(o), t && (K(t), i.setAttribute("data-button-to-replace", t.className)), i.parentNode.insertBefore(i, t), R([e, o], n.loading) }, $t = e => e.checked ? 1 : 0, Tt = e => e.checked ? e.value : null, St = e => e.files.length ? null !== e.getAttribute("multiple") ? e.files : e.files[0] : null, Lt = (e, t) => { const n = b(), o = e => { jt[t.input](n, Mt(e), t) }; d(t.inputOptions) || m(t.inputOptions) ? (xt(B()), p(t.inputOptions).then((t => { e.hideLoading(), o(t) }))) : "object" == typeof t.inputOptions ? o(t.inputOptions) : a("Unexpected type of inputOptions! Expected object, Map or Promise, got " + typeof t.inputOptions) }, Ot = (e, t) => { const n = e.getInput(); K(n), p(t.inputValue).then((o => { n.value = "number" === t.input ? `${parseFloat(o) || 0}` : `${o}`, z(n), n.focus(), e.hideLoading() })).catch((t => { a(`Error in inputValue promise: ${t}`), n.value = "", z(n), n.focus(), e.hideLoading() })) }, jt = { select: (e, t, o) => { const i = _(e, n.select), s = (e, t, n) => { const i = document.createElement("option"); i.value = n, I(i, t), i.selected = Ht(n, o.inputValue), e.appendChild(i) }; 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, i.appendChild(e), n.forEach((t => s(e, t[1], t[0]))) } else s(i, n, t) })), i.focus() }, radio: (e, t, o) => { const i = _(e, n.radio); t.forEach((e => { const t = e[0], s = e[1], r = document.createElement("input"), a = document.createElement("label"); r.type = "radio", r.name = n.radio, r.value = t, Ht(t, o.inputValue) && (r.checked = !0); const l = document.createElement("span"); I(l, s), l.className = n.label, a.appendChild(r), a.appendChild(l), i.appendChild(a) })); const s = i.querySelectorAll("input"); s.length && s[0].focus() } }, Mt = e => { const t = []; return "undefined" != typeof Map && e instanceof Map ? e.forEach(((e, n) => { let o = e; "object" == typeof o && (o = Mt(o)), t.push([n, o]) })) : Object.keys(e).forEach((n => { let o = e[n]; "object" == typeof o && (o = Mt(o)), t.push([n, o]) })), t }, Ht = (e, t) => t && t.toString() === e.toString(), It = (t, n) => { const o = e.innerParams.get(t); if (!o.input) return void a(`The "input" parameter is needed to be set when using returnInputValueOn${s(n)}`); const i = ((e, t) => { const n = e.getInput(); if (!n) return null; switch (t.input) { case "checkbox": return $t(n); case "radio": return Tt(n); case "file": return St(n); default: return t.inputAutoTrim ? n.value.trim() : n.value } })(t, o); o.inputValidator ? Dt(t, i, n) : t.getInput().checkValidity() ? "deny" === n ? qt(t, i) : Ft(t, i) : (t.enableButtons(), t.showValidationMessage(o.validationMessage)) }, Dt = (t, n, o) => { const i = e.innerParams.get(t); t.disableInput(); Promise.resolve().then((() => p(i.inputValidator(n, i.validationMessage)))).then((e => { t.enableButtons(), t.enableInput(), e ? t.showValidationMessage(e) : "deny" === o ? qt(t, n) : Ft(t, n) })) }, qt = (t, n) => { const o = e.innerParams.get(t || void 0); if (o.showLoaderOnDeny && xt(x()), o.preDeny) { e.awaitingPromise.set(t || void 0, !0); Promise.resolve().then((() => p(o.preDeny(n, o.validationMessage)))).then((e => { !1 === e ? (t.hideLoading(), it(t)) : t.close({ isDenied: !0, value: void 0 === e ? n : e }) })).catch((e => Nt(t || void 0, e))) } else t.close({ isDenied: !0, value: n }) }, Vt = (e, t) => { e.close({ isConfirmed: !0, value: t }) }, Nt = (e, t) => { e.rejectPromise(t) }, Ft = (t, n) => { const o = e.innerParams.get(t || void 0); if (o.showLoaderOnConfirm && xt(), o.preConfirm) { t.resetValidationMessage(), e.awaitingPromise.set(t || void 0, !0); Promise.resolve().then((() => p(o.preConfirm(n, o.validationMessage)))).then((e => { J(k()) || !1 === e ? (t.hideLoading(), it(t)) : Vt(t, void 0 === e ? n : e) })).catch((e => Nt(t || void 0, e))) } else Vt(t, n) }, Rt = (t, n, o) => { n.popup.onclick = () => { const n = e.innerParams.get(t); n && (Ut(n) || n.timer || n.input) || o(He.close) } }, Ut = e => e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton; let _t = !1; const Wt = e => { e.popup.onmousedown = () => { e.container.onmouseup = function (t) { e.container.onmouseup = void 0, t.target === e.container && (_t = !0) } } }, zt = e => { e.container.onmousedown = () => { e.popup.onmouseup = function (t) { e.popup.onmouseup = void 0, (t.target === e.popup || e.popup.contains(t.target)) && (_t = !0) } } }, Kt = (t, n, o) => { n.container.onclick = i => { const s = e.innerParams.get(t); _t ? _t = !1 : i.target === n.container && u(s.allowOutsideClick) && o(He.backdrop) } }, Yt = e => e instanceof Element || (e => "object" == typeof e && e.jquery)(e); const Zt = () => { if (ee.timeout) return (() => { const e = S(), 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}%` })(), ee.timeout.stop() }, Jt = () => { if (ee.timeout) { const e = ee.timeout.start(); return Q(e), e } }; let Xt = !1; const Gt = {}; const Qt = e => { for (let t = e.target; t && t !== document; t = t.parentNode)for (const e in Gt) { const n = t.getAttribute(e); if (n) return void Gt[e].fire({ template: n }) } }; var en = Object.freeze({ __proto__: null, argsToParams: e => { const t = {}; return "object" != typeof e[0] || Yt(e[0]) ? ["title", "html", "icon"].forEach(((n, o) => { const i = e[o]; "string" == typeof i || Yt(i) ? t[n] = i : void 0 !== i && a(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`) })) : Object.assign(t, e[0]), t }, bindClickHandler: function () { Gt[arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "data-swal-template"] = this, Xt || (document.body.addEventListener("click", Qt), Xt = !0) }, clickCancel: () => P() && P().click(), clickConfirm: Me, clickDeny: () => x() && x().click(), enableLoading: xt, fire: function () { for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)t[n] = arguments[n]; return new this(...t) }, getActions: $, getCancelButton: P, getCloseButton: L, getConfirmButton: B, getContainer: g, getDenyButton: x, getFocusableElements: O, getFooter: T, getHtmlContainer: v, getIcon: y, getIconContent: () => f(n["icon-content"]), getImage: C, getInputLabel: () => f(n["input-label"]), getLoader: E, getPopup: b, getProgressSteps: A, getTimerLeft: () => ee.timeout && ee.timeout.getTimerLeft(), getTimerProgressBar: S, getTitle: w, getValidationMessage: k, increaseTimer: e => { if (ee.timeout) { const t = ee.timeout.increase(e); return Q(t, !0), t } }, isDeprecatedParameter: bt, isLoading: () => b().hasAttribute("data-loading"), isTimerRunning: () => ee.timeout && ee.timeout.isRunning(), isUpdatableParameter: ft, isValidParameter: ht, isVisible: () => J(b()), mixin: function (e) { return class extends (this) { _main(t, n) { return super._main(t, Object.assign({}, e, n)) } } }, resumeTimer: Jt, showLoading: xt, stopTimer: Zt, toggleTimer: () => { const e = ee.timeout; return e && (e.running ? Zt() : Jt()) } }); class tn { 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 nn = ["swal-title", "swal-html", "swal-footer"], on = e => { const t = {}; return Array.from(e.querySelectorAll("swal-param")).forEach((e => { pn(e, ["name", "value"]); const n = e.getAttribute("name"), o = e.getAttribute("value"); t[n] = "boolean" == typeof dt[n] ? "false" !== o : "object" == typeof dt[n] ? JSON.parse(o) : o })), t }, sn = e => { const t = {}; return Array.from(e.querySelectorAll("swal-function-param")).forEach((e => { const n = e.getAttribute("name"), o = e.getAttribute("value"); t[n] = new Function(`return ${o}`)() })), t }, rn = e => { const t = {}; return Array.from(e.querySelectorAll("swal-button")).forEach((e => { pn(e, ["type", "color", "aria-label"]); const n = e.getAttribute("type"); t[`${n}ButtonText`] = e.innerHTML, t[`show${s(n)}Button`] = !0, e.hasAttribute("color") && (t[`${n}ButtonColor`] = e.getAttribute("color")), e.hasAttribute("aria-label") && (t[`${n}ButtonAriaLabel`] = e.getAttribute("aria-label")) })), t }, an = e => { const t = {}, n = e.querySelector("swal-image"); return n && (pn(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 }, ln = e => { const t = {}, n = e.querySelector("swal-icon"); return n && (pn(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t }, cn = e => { const t = {}, n = e.querySelector("swal-input"); n && (pn(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 o = Array.from(e.querySelectorAll("swal-input-option")); return o.length && (t.inputOptions = {}, o.forEach((e => { pn(e, ["value"]); const n = e.getAttribute("value"), o = e.innerHTML; t.inputOptions[n] = o }))), t }, un = (e, t) => { const n = {}; for (const o in t) { const i = t[o], s = e.querySelector(i); s && (pn(s, []), n[i.replace(/^swal-/, "")] = s.innerHTML.trim()) } return n }, dn = e => { const t = nn.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}>`) })) }, pn = (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.")]) })) }, mn = e => { const t = g(), o = b(); "function" == typeof e.willOpen && e.willOpen(o); const i = window.getComputedStyle(document.body).overflowY; bn(t, o, e), setTimeout((() => { hn(t, o) }), 10), j() && (fn(t, e.scrollbarPadding, i), Array.from(document.body.children).forEach((e => { e === g() || e.contains(g()) || (e.hasAttribute("aria-hidden") && e.setAttribute("data-previous-aria-hidden", e.getAttribute("aria-hidden")), e.setAttribute("aria-hidden", "true")) }))), M() || ee.previousActiveElement || (ee.previousActiveElement = document.activeElement), "function" == typeof e.didOpen && setTimeout((() => e.didOpen(o))), U(t, n["no-transition"]) }, gn = e => { const t = b(); if (e.target !== t) return; const n = g(); t.removeEventListener(ce, gn), n.style.overflowY = "auto" }, hn = (e, t) => { ce && G(t) ? (e.style.overflowY = "hidden", t.addEventListener(ce, gn)) : e.style.overflowY = "auto" }, fn = (e, t, o) => { (() => { if ((/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream || "MacIntel" === navigator.platform && navigator.maxTouchPoints > 1) && !D(document.body, n.iosfix)) { const e = document.body.scrollTop; document.body.style.top = -1 * e + "px", R(document.body, n.iosfix), Ye(), Ke() } })(), t && "hidden" !== o && Qe(), setTimeout((() => { e.scrollTop = 0 })) }, bn = (e, t, o) => { R(e, o.showClass.backdrop), t.style.setProperty("opacity", "0", "important"), z(t, "grid"), setTimeout((() => { R(t, o.showClass.popup), t.style.removeProperty("opacity") }), 10), R([document.documentElement, document.body], n.shown), o.heightAuto && o.backdrop && !o.toast && R([document.documentElement, document.body], n["height-auto"]) }; var yn = { 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") }; function wn(e) { !function (e) { e.inputValidator || Object.keys(yn).forEach((t => { e.input === t && (e.inputValidator = yn[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:\n//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) } let vn; class Cn { constructor() { if ("undefined" == typeof window) return; vn = this; for (var t = arguments.length, n = new Array(t), o = 0; o < t; o++)n[o] = arguments[o]; const i = Object.freeze(this.constructor.argsToParams(n)); Object.defineProperties(this, { params: { value: i, writable: !1, enumerable: !0, configurable: !0 } }); const s = vn._main(vn.params); e.promise.set(this, s) } _main(t) { let n = arguments.length > 1 && 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) yt(t), e.toast && wt(t), vt(t) })(Object.assign({}, n, t)), ee.currentInstance && (ee.currentInstance._destroy(), j() && ze()), ee.currentInstance = vn; const o = kn(t, n); wn(o), Object.freeze(o), ee.timeout && (ee.timeout.stop(), delete ee.timeout), clearTimeout(ee.restoreFocusTimeout); const i = Bn(vn); return Le(vn, o), e.innerParams.set(vn, o), An(vn, i, o) } then(t) { return e.promise.get(this).then(t) } finally(t) { return e.promise.get(this).finally(t) } } const An = (t, n, o) => new Promise(((i, s) => { const r = e => { t.close({ isDismissed: !0, dismiss: e }) }; We.swalPromiseResolve.set(t, i), We.swalPromiseReject.set(t, s), n.confirmButton.onclick = () => { (t => { const n = e.innerParams.get(t); t.disableButtons(), n.input ? It(t, "confirm") : Ft(t, !0) })(t) }, n.denyButton.onclick = () => { (t => { const n = e.innerParams.get(t); t.disableButtons(), n.returnInputValueOnDeny ? It(t, "deny") : qt(t, !1) })(t) }, n.cancelButton.onclick = () => { ((e, t) => { e.disableButtons(), t(He.cancel) })(t, r) }, n.closeButton.onclick = () => { r(He.close) }, ((t, n, o) => { e.innerParams.get(t).toast ? Rt(t, n, o) : (Wt(n), zt(n), Kt(t, n, o)) })(t, n, r), ((e, t, n, o) => { Ie(t), n.toast || (t.keydownHandler = t => Ne(e, t, o), t.keydownTarget = n.keydownListenerCapture ? window : b(), t.keydownListenerCapture = n.keydownListenerCapture, t.keydownTarget.addEventListener("keydown", t.keydownHandler, { capture: t.keydownListenerCapture }), t.keydownHandlerAdded = !0) })(t, ee, o, r), ((e, t) => { "select" === t.input || "radio" === t.input ? Lt(e, t) : ["text", "email", "number", "tel", "textarea"].includes(t.input) && (d(t.inputValue) || m(t.inputValue)) && (xt(B()), Ot(e, t)) })(t, o), mn(o), Pn(ee, o, r), xn(n, o), setTimeout((() => { n.container.scrollTop = 0 })) })), kn = (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 dn(n), Object.assign(on(n), sn(n), rn(n), an(n), ln(n), cn(n), un(n, nn)) })(e), o = Object.assign({}, dt, t, n, e); return o.showClass = Object.assign({}, dt.showClass, o.showClass), o.hideClass = Object.assign({}, dt.hideClass, o.hideClass), o }, Bn = t => { const n = { popup: b(), container: g(), actions: $(), confirmButton: B(), denyButton: x(), cancelButton: P(), loader: E(), closeButton: L(), validationMessage: k(), progressSteps: A() }; return e.domCache.set(t, n), n }, Pn = (e, t, n) => { const o = S(); K(o), t.timer && (e.timeout = new tn((() => { n("timer"), delete e.timeout }), t.timer), t.timerProgressBar && (z(o), q(o, t, "timerProgressBar"), setTimeout((() => { e.timeout && e.timeout.running && Q(t.timer) })))) }, xn = (e, t) => { t.toast || (u(t.allowEnterKey) ? En(e, t) || De(-1, 1) : $n()) }, En = (e, t) => t.focusDeny && J(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && J(e.cancelButton) ? (e.cancelButton.focus(), !0) : !(!t.focusConfirm || !J(e.confirmButton)) && (e.confirmButton.focus(), !0), $n = () => { 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 = "//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(Cn.prototype, Pt), Object.assign(Cn, en), Object.keys(Pt).forEach((e => { Cn[e] = function () { if (vn) return vn[e](...arguments) } })), Cn.DismissReason = He, Cn.version = "11.7.3"; const Tn = Cn; return Tn.default = Tn, Tn })), void 0 !== this && this.Sweetalert2 && (this.swal = this.sweetAlert = this.Swal = this.SweetAlert = this.Sweetalert2); "undefined" != typeof document && function (e, t) { var n = e.createElement("style"); if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t); else try { n.innerHTML = t } catch (e) { n.innerText = t } }(document, ""); /* PNotifyBootstrap4.js PNotifyFontAwesome5Fix.js */ /*PNotify.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotify = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() {} function assign(tar, src) { // @ts-ignore for (var k in src) { tar[k] = src[k]; } return tar; } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function action_destroyer(action_result) { return action_result && is_function(action_result.destroy) ? action_result.destroy : noop; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function empty() { return text(''); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return function () { return node.removeEventListener(event, handler, options); }; } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute);else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function set_data(text, data) { data = '' + data; if (text.wholeText !== data) text.data = data; } function custom_event(type, detail) { var e = document.createEvent('CustomEvent'); e.initCustomEvent(type, false, false, detail); return e; } var HtmlTag = /*#__PURE__*/function () { function HtmlTag() { var anchor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; _classCallCheck(this, HtmlTag); this.a = anchor; this.e = this.n = null; } _createClass(HtmlTag, [{ key: "m", value: function m(html, target) { var anchor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; if (!this.e) { this.e = element(target.nodeName); this.t = target; this.h(html); } this.i(anchor); } }, { key: "h", value: function h(html) { this.e.innerHTML = html; this.n = Array.from(this.e.childNodes); } }, { key: "i", value: function i(anchor) { for (var i = 0; i < this.n.length; i += 1) { insert(this.t, this.n[i], anchor); } } }, { key: "p", value: function p(html) { this.d(); this.h(html); this.i(this.a); } }, { key: "d", value: function d() { this.n.forEach(detach); } }]); return HtmlTag; }(); var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function beforeUpdate(fn) { get_current_component().$$.before_update.push(fn); } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } function createEventDispatcher() { var component = get_current_component(); return function (type, detail) { var callbacks = component.$$.callbacks[type]; if (callbacks) { // TODO are there situations where events could be dispatched // in a server (non-DOM) environment? var event = custom_event(type, detail); callbacks.slice().forEach(function (fn) { fn.call(component, event); }); } }; } // shorthand events, or if we want to implement // a real bubbling mechanism function bubble(component, event) { var callbacks = component.$$.callbacks[event.type]; if (callbacks) { callbacks.slice().forEach(function (fn) { return fn(event); }); } } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function tick() { schedule_update(); return resolved_promise; } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { // first, call beforeUpdate functions // and update components for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); var outros; function group_outros() { outros = { r: 0, c: [], p: outros // parent group }; } function check_outros() { if (!outros.r) { run_all(outros.c); } outros = outros.p; } function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function transition_out(block, local, detach, callback) { if (block && block.o) { if (outroing.has(block)) return; outroing.add(block); outros.c.push(function () { outroing["delete"](block); if (callback) { if (detach) block.d(1); callback(); } }); block.o(local); } } var globals = typeof window !== 'undefined' ? window : typeof globalThis !== 'undefined' ? globalThis : global; function outro_and_destroy_block(block, lookup) { transition_out(block, 1, 1, function () { lookup["delete"](block.key); }); } function update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) { var o = old_blocks.length; var n = list.length; var i = o; var old_indexes = {}; while (i--) { old_indexes[old_blocks[i].key] = i; } var new_blocks = []; var new_lookup = new Map(); var deltas = new Map(); i = n; while (i--) { var child_ctx = get_context(ctx, list, i); var key = get_key(child_ctx); var block = lookup.get(key); if (!block) { block = create_each_block(key, child_ctx); block.c(); } else if (dynamic) { block.p(child_ctx, dirty); } new_lookup.set(key, new_blocks[i] = block); if (key in old_indexes) deltas.set(key, Math.abs(i - old_indexes[key])); } var will_move = new Set(); var did_move = new Set(); function insert(block) { transition_in(block, 1); block.m(node, next); lookup.set(block.key, block); next = block.first; n--; } while (o && n) { var new_block = new_blocks[n - 1]; var old_block = old_blocks[o - 1]; var new_key = new_block.key; var old_key = old_block.key; if (new_block === old_block) { // do nothing next = new_block.first; o--; n--; } else if (!new_lookup.has(old_key)) { // remove old block destroy(old_block, lookup); o--; } else if (!lookup.has(new_key) || will_move.has(new_key)) { insert(new_block); } else if (did_move.has(old_key)) { o--; } else if (deltas.get(new_key) > deltas.get(old_key)) { did_move.add(new_key); insert(new_block); } else { will_move.add(old_key); o--; } } while (o--) { var _old_block = old_blocks[o]; if (!new_lookup.has(_old_block.key)) destroy(_old_block, lookup); } while (n) { insert(new_blocks[n - 1]); } return new_blocks; } function get_spread_update(levels, updates) { var update = {}; var to_null_out = {}; var accounted_for = { $$scope: 1 }; var i = levels.length; while (i--) { var o = levels[i]; var n = updates[i]; if (n) { for (var key in o) { if (!(key in n)) to_null_out[key] = 1; } for (var _key3 in n) { if (!accounted_for[_key3]) { update[_key3] = n[_key3]; accounted_for[_key3] = 1; } } levels[i] = n; } else { for (var _key4 in o) { accounted_for[_key4] = 1; } } } for (var _key5 in to_null_out) { if (!(_key5 in update)) update[_key5] = undefined; } return update; } function get_spread_object(spread_props) { return _typeof(spread_props) === 'object' && spread_props !== null ? spread_props : {}; } // source: //html.spec.whatwg.org/multipage/indices.html function create_component(block) { block && block.c(); } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, // state props: props, update: noop, not_equal: not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = /*#__PURE__*/function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); var Stack = /*#__PURE__*/function () { function Stack(options) { _classCallCheck(this, Stack); // TODO: label for close all button Object.assign(this, { dir1: null, dir2: null, firstpos1: null, firstpos2: null, spacing1: 25, spacing2: 25, push: 'bottom', maxOpen: 1, maxStrategy: 'wait', maxClosureCausesWait: true, modal: 'ish', modalishFlash: true, overlayClose: true, overlayClosesPinned: false, positioned: true, context: window && document.body || null }, options); // Validate the options. if (this.modal === 'ish' && this.maxOpen !== 1) { throw new Error('A modalish stack must have a maxOpen value of 1.'); } if (this.modal === 'ish' && !this.dir1) { throw new Error('A modalish stack must have a direction.'); } if (this.push === 'top' && this.modal === 'ish' && this.maxStrategy !== 'close') { throw new Error('A modalish stack that pushes to the top must use the close maxStrategy.'); } // -- Private properties. // The head of the notice double linked list. this._noticeHead = { notice: null, prev: null, next: null }; // The tail of the notice double linked list. this._noticeTail = { notice: null, prev: this._noticeHead, next: null }; this._noticeHead.next = this._noticeTail; // The map of notices to nodes. this._noticeMap = new WeakMap(); // The number of notices in the stack. this._length = 0; // How much space to add along the secondary axis when moving notices to the // next column/row. this._addpos2 = 0; // Whether the stack's notices should animate while moving. this._animation = true; // A timer to debounce positioning. this._posTimer = null; // The number of open notices. this._openNotices = 0; // A listener for positioning events. this._listener = null; // Whether the overlay is currently open. this._overlayOpen = false; // Whether the overlay is currently inserted into the DOM. this._overlayInserted = false; // Whether the modal state is collapsing. (Notices go back to waiting and // shouldn't resposition.) this._collapsingModalState = false; // The leader is the first open notice in a modalish stack. this._leader = null; this._leaderOff = null; // The next waiting notice that is masking. this._masking = null; this._maskingOff = null; // Swapping notices, so don't open a new one. Set to the opening notice on // swap. this._swapping = false; // Event listener callbacks. this._callbacks = {}; } _createClass(Stack, [{ key: "forEach", value: function forEach(callback) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$start = _ref.start, start = _ref$start === void 0 ? 'oldest' : _ref$start, _ref$dir = _ref.dir, dir = _ref$dir === void 0 ? 'newer' : _ref$dir, _ref$skipModuleHandle = _ref.skipModuleHandled, skipModuleHandled = _ref$skipModuleHandle === void 0 ? false : _ref$skipModuleHandle; var node; if (start === 'head' || start === 'newest' && this.push === 'top' || start === 'oldest' && this.push === 'bottom') { node = this._noticeHead.next; } else if (start === 'tail' || start === 'newest' && this.push === 'bottom' || start === 'oldest' && this.push === 'top') { node = this._noticeTail.prev; } else if (this._noticeMap.has(start)) { node = this._noticeMap.get(start); } else { throw new Error('Invalid start param.'); } while (node.notice) { var _notice = node.notice; // Get the next node first. if (dir === 'prev' || this.push === 'top' && dir === 'newer' || this.push === 'bottom' && dir === 'older') { node = node.prev; } else if (dir === 'next' || this.push === 'top' && dir === 'older' || this.push === 'bottom' && dir === 'newer') { node = node.next; } else { throw new Error('Invalid dir param.'); } // Call the callback last, just in case the callback removes the notice. if ((!skipModuleHandled || !_notice.getModuleHandled()) && callback(_notice) === false) { break; } } } }, { key: "close", value: function close(immediate) { this.forEach(function (notice) { return notice.close(immediate, false, false); }); } }, { key: "open", value: function open(immediate) { this.forEach(function (notice) { return notice.open(immediate); }); } }, { key: "openLast", value: function openLast() { // Look up the last notice, and display it. this.forEach(function (notice) { if (['opening', 'open', 'waiting'].indexOf(notice.getState()) === -1) { notice.open(); return false; } }, { start: 'newest', dir: 'older' }); } }, { key: "swap", value: function swap(one, theOther) { var _this = this; var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var waitAfter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (['open', 'opening', 'closing'].indexOf(one.getState()) === -1) { // One is closed. Return rejected promise. return Promise.reject(); } this._swapping = theOther; return one.close(immediate, false, waitAfter).then(function () { return theOther.open(immediate); })["finally"](function () { _this._swapping = false; }); } }, { key: "on", value: function on(event, callback) { var _this2 = this; if (!(event in this._callbacks)) { this._callbacks[event] = []; } this._callbacks[event].push(callback); return function () { _this2._callbacks[event].splice(_this2._callbacks[event].indexOf(callback), 1); }; } }, { key: "fire", value: function fire(event) { var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; detail.stack = this; if (event in this._callbacks) { this._callbacks[event].forEach(function (cb) { return cb(detail); }); } } }, { key: "position", value: function position() { var _this3 = this; // Reset the next position data. if (this.positioned && this._length > 0) { this.fire('beforePosition'); this._resetPositionData(); this.forEach(function (notice) { _this3._positionNotice(notice); }, { start: 'head', dir: 'next', skipModuleHandled: true }); this.fire('afterPosition'); } else { delete this._nextpos1; delete this._nextpos2; } } // Queue the position so it doesn't run repeatedly and use up resources. }, { key: "queuePosition", value: function queuePosition() { var _this4 = this; var milliseconds = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; if (this._posTimer) { clearTimeout(this._posTimer); } this._posTimer = setTimeout(function () { return _this4.position(); }, milliseconds); } }, { key: "_resetPositionData", value: function _resetPositionData() { this._nextpos1 = this.firstpos1; this._nextpos2 = this.firstpos2; this._addpos2 = 0; } // Position the notice. }, { key: "_positionNotice", value: function _positionNotice(notice) { var masking = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : notice === this._masking; if (!this.positioned) { return; } // Get the notice's element. var elem = notice.refs.elem; if (!elem) { return; } // Skip this notice if it's not shown. if (!elem.classList.contains('pnotify-in') && !elem.classList.contains('pnotify-initial') && !masking) { return; } // Use local variables, since a masking notice position shouldn't update the // stack. var _ref2 = [this.firstpos1, this.firstpos2, this._nextpos1, this._nextpos2, this._addpos2], firstpos1 = _ref2[0], firstpos2 = _ref2[1], _nextpos1 = _ref2[2], _nextpos2 = _ref2[3], _addpos2 = _ref2[4]; // Read from the DOM to cause refresh. elem.getBoundingClientRect(); if (this._animation && !masking && !this._collapsingModalState) { // Add animate class. notice._setMoveClass('pnotify-move'); } else { notice._setMoveClass(''); } var spaceY = this.context === document.body ? window.innerHeight : this.context.scrollHeight; var spaceX = this.context === document.body ? window.innerWidth : this.context.scrollWidth; var csspos1; if (this.dir1) { csspos1 = { down: 'top', up: 'bottom', left: 'right', right: 'left' }[this.dir1]; // Calculate the current pos1 value. var curpos1; switch (this.dir1) { case 'down': curpos1 = elem.offsetTop; break; case 'up': curpos1 = spaceY - elem.scrollHeight - elem.offsetTop; break; case 'left': curpos1 = spaceX - elem.scrollWidth - elem.offsetLeft; break; case 'right': curpos1 = elem.offsetLeft; break; } // Remember the first pos1, so the first notice goes there. if (firstpos1 == null) { firstpos1 = curpos1; _nextpos1 = firstpos1; } } if (this.dir1 && this.dir2) { var csspos2 = { down: 'top', up: 'bottom', left: 'right', right: 'left' }[this.dir2]; // Calculate the current pos2 value. var curpos2; switch (this.dir2) { case 'down': curpos2 = elem.offsetTop; break; case 'up': curpos2 = spaceY - elem.scrollHeight - elem.offsetTop; break; case 'left': curpos2 = spaceX - elem.scrollWidth - elem.offsetLeft; break; case 'right': curpos2 = elem.offsetLeft; break; } // Remember the first pos2, so the first notice goes there. if (firstpos2 == null) { firstpos2 = curpos2; _nextpos2 = firstpos2; } // Don't move masking notices along dir2. They should always be beside the // leader along dir1. if (!masking) { // Check that it's not beyond the viewport edge. var endY = _nextpos1 + elem.offsetHeight + this.spacing1; var endX = _nextpos1 + elem.offsetWidth + this.spacing1; if ((this.dir1 === 'down' || this.dir1 === 'up') && endY > spaceY || (this.dir1 === 'left' || this.dir1 === 'right') && endX > spaceX) { // If it is, it needs to go back to the first pos1, and over on pos2. _nextpos1 = firstpos1; _nextpos2 += _addpos2 + this.spacing2; _addpos2 = 0; } } // Move the notice on dir2. if (_nextpos2 != null) { elem.style[csspos2] = "".concat(_nextpos2, "px"); if (!this._animation) { elem.style[csspos2]; // Read from the DOM for update. } } // Keep track of the widest/tallest notice in the column/row, so we can push the next column/row. switch (this.dir2) { case 'down': case 'up': if (elem.offsetHeight + (parseFloat(elem.style.marginTop, 10) || 0) + (parseFloat(elem.style.marginBottom, 10) || 0) > _addpos2) { _addpos2 = elem.offsetHeight; } break; case 'left': case 'right': if (elem.offsetWidth + (parseFloat(elem.style.marginLeft, 10) || 0) + (parseFloat(elem.style.marginRight, 10) || 0) > _addpos2) { _addpos2 = elem.offsetWidth; } break; } } else if (this.dir1) { // Center the notice along dir1 axis, because the stack has no dir2. var cssMiddle, cssposCross; switch (this.dir1) { case 'down': case 'up': cssposCross = ['left', 'right']; cssMiddle = this.context.scrollWidth / 2 - elem.offsetWidth / 2; break; case 'left': case 'right': cssposCross = ['top', 'bottom']; cssMiddle = spaceY / 2 - elem.offsetHeight / 2; break; } elem.style[cssposCross[0]] = "".concat(cssMiddle, "px"); elem.style[cssposCross[1]] = 'auto'; if (!this._animation) { elem.style[cssposCross[0]]; // Read from the DOM for update. } } if (this.dir1) { // Move the notice on dir1. if (_nextpos1 != null) { elem.style[csspos1] = "".concat(_nextpos1, "px"); if (!this._animation) { elem.style[csspos1]; // Read from the DOM for update. } } // Calculate the next dir1 position. switch (this.dir1) { case 'down': case 'up': _nextpos1 += elem.offsetHeight + this.spacing1; break; case 'left': case 'right': _nextpos1 += elem.offsetWidth + this.spacing1; break; } } else { // Center the notice on the screen, because the stack has no dir1. var cssMiddleLeft = spaceX / 2 - elem.offsetWidth / 2; var cssMiddleTop = spaceY / 2 - elem.offsetHeight / 2; elem.style.left = "".concat(cssMiddleLeft, "px"); elem.style.top = "".concat(cssMiddleTop, "px"); if (!this._animation) { elem.style.left; // Read from the DOM for update. } } // If we're not positioning the masking notice, update the stack properties. if (!masking) { this.firstpos1 = firstpos1; this.firstpos2 = firstpos2; this._nextpos1 = _nextpos1; this._nextpos2 = _nextpos2; this._addpos2 = _addpos2; } } }, { key: "_addNotice", value: function _addNotice(notice) { var _this5 = this; this.fire('beforeAddNotice', { notice: notice }); var handleNoticeOpen = function handleNoticeOpen() { _this5.fire('beforeOpenNotice', { notice: notice }); if (notice.getModuleHandled()) { // We don't deal with notices that are handled by a module. _this5.fire('afterOpenNotice', { notice: notice }); return; } _this5._openNotices++; // Check the max in stack. if (!(_this5.modal === 'ish' && _this5._overlayOpen) && _this5.maxOpen !== Infinity && _this5._openNotices > _this5.maxOpen && _this5.maxStrategy === 'close') { var toClose = _this5._openNotices - _this5.maxOpen; _this5.forEach(function (notice) { if (['opening', 'open'].indexOf(notice.getState()) !== -1) { // Close oldest notices, leaving only stack.maxOpen from the stack. notice.close(false, false, _this5.maxClosureCausesWait); if (notice === _this5._leader) { _this5._setLeader(null); } toClose--; return !!toClose; } }); } if (_this5.modal === true) { _this5._insertOverlay(); } if (_this5.modal === 'ish' && (!_this5._leader || ['opening', 'open', 'closing'].indexOf(_this5._leader.getState()) === -1)) { _this5._setLeader(notice); } if (_this5.modal === 'ish' && _this5._overlayOpen) { notice._preventTimerClose(true); } // this.queuePosition(0); _this5.fire('afterOpenNotice', { notice: notice }); }; var handleNoticeClosed = function handleNoticeClosed() { _this5.fire('beforeCloseNotice', { notice: notice }); if (notice.getModuleHandled()) { // We don't deal with notices that are handled by a module. _this5.fire('afterCloseNotice', { notice: notice }); return; } _this5._openNotices--; if (_this5.modal === 'ish' && notice === _this5._leader) { _this5._setLeader(null); if (_this5._masking) { _this5._setMasking(null); } } if (!_this5._swapping && _this5.maxOpen !== Infinity && _this5._openNotices < _this5.maxOpen) { var done = false; var open = function open(contender) { if (contender !== notice && contender.getState() === 'waiting') { contender.open()["catch"](function () {}); if (_this5._openNotices >= _this5.maxOpen) { done = true; return false; } } }; if (_this5.maxStrategy === 'wait') { // Check for the next waiting notice and open it. _this5.forEach(open, { start: notice, dir: 'next' }); if (!done) { _this5.forEach(open, { start: notice, dir: 'prev' }); } } else if (_this5.maxStrategy === 'close' && _this5.maxClosureCausesWait) { // Check for the last closed notice and re-open it. _this5.forEach(open, { start: notice, dir: 'older' }); if (!done) { _this5.forEach(open, { start: notice, dir: 'newer' }); } } } if (_this5._openNotices <= 0) { _this5._openNotices = 0; _this5._resetPositionData(); if (_this5._overlayOpen && !_this5._swapping) { _this5._removeOverlay(); } } else if (!_this5._collapsingModalState) { _this5.queuePosition(0); } _this5.fire('afterCloseNotice', { notice: notice }); }; // This is the linked list node. var node = { notice: notice, prev: null, next: null, beforeOpenOff: notice.on('pnotify:beforeOpen', handleNoticeOpen), afterCloseOff: notice.on('pnotify:afterClose', handleNoticeClosed) }; // Push to the correct side of the linked list. if (this.push === 'top') { node.next = this._noticeHead.next; node.prev = this._noticeHead; node.next.prev = node; node.prev.next = node; } else { node.prev = this._noticeTail.prev; node.next = this._noticeTail; node.prev.next = node; node.next.prev = node; } // Add to the map. this._noticeMap.set(notice, node); // Increment the length to match. this._length++; if (!this._listener) { this._listener = function () { return _this5.position(); }; this.context.addEventListener('pnotify:position', this._listener); } if (['open', 'opening', 'closing'].indexOf(notice.getState()) !== -1) { // If the notice is already open, handle it immediately. handleNoticeOpen(); } else if (this.modal === 'ish' && this.modalishFlash && this._shouldNoticeWait(notice)) { // If it's not open, and it's going to be a waiting notice, flash it. var off = notice.on('pnotify:mount', function () { off(); notice._setMasking(true, false, function () { notice._setMasking(false); }); _this5._resetPositionData(); _this5._positionNotice(_this5._leader); window.requestAnimationFrame(function () { _this5._positionNotice(notice, true); }); }); } this.fire('afterAddNotice', { notice: notice }); } }, { key: "_removeNotice", value: function _removeNotice(notice) { if (!this._noticeMap.has(notice)) { return; } this.fire('beforeRemoveNotice', { notice: notice }); var node = this._noticeMap.get(notice); if (this._leader === notice) { // Clear the leader. this._setLeader(null); } if (this._masking === notice) { // Clear masking. this._setMasking(null); } // Remove the notice from the linked list. node.prev.next = node.next; node.next.prev = node.prev; node.prev = null; node.next = null; node.beforeOpenOff(); node.beforeOpenOff = null; node.afterCloseOff(); node.afterCloseOff = null; // Remove the notice from the map. this._noticeMap["delete"](notice); // Reduce the length to match. this._length--; if (!this._length && this._listener) { // Remove the listener. this.context.removeEventListener('pnotify:position', this._listener); this._listener = null; } if (!this._length && this._overlayOpen) { this._removeOverlay(); } // If the notice is open, handle it as if it had closed. if (['open', 'opening', 'closing'].indexOf(notice.getState()) !== -1) { this._handleNoticeClosed(notice); } this.fire('afterRemoveNotice', { notice: notice }); } }, { key: "_setLeader", value: function _setLeader(leader) { var _this6 = this; this.fire('beforeSetLeader', { leader: leader }); if (this._leaderOff) { this._leaderOff(); this._leaderOff = null; } this._leader = leader; if (!this._leader) { this.fire('afterSetLeader', { leader: leader }); return; } // If the mouse enters this notice while it's the leader, then the next // waiting notice should start masking. var leaderInteraction = function leaderInteraction() { // This is a workaround for leaving the modal state. var nextNoticeFromModalState = null; // If the leader is moused over: if (_this6._overlayOpen) { _this6._collapsingModalState = true; _this6.forEach(function (notice) { // Allow the notices to timed close. notice._preventTimerClose(false); // Close and set to wait any open notices other than the leader. if (notice !== _this6._leader && ['opening', 'open'].indexOf(notice.getState()) !== -1) { if (!nextNoticeFromModalState) { nextNoticeFromModalState = notice; } notice.close(notice === nextNoticeFromModalState, false, true); } }, { start: _this6._leader, dir: 'next', skipModuleHandled: true }); // Remove the modal state overlay. _this6._removeOverlay(); } // Turn off any masking off timer that may still be running. if (maskingOffTimer) { clearTimeout(maskingOffTimer); maskingOffTimer = null; } // Set the next waiting notice to be masking. _this6.forEach(function (notice) { if (notice === _this6._leader) { // Skip the leader, and start with the next one. return; } // The next notice that is "waiting" is usually fine, but if we're // leaving the modal state, it will still be "closing" here, so we have // to work around that. :P // Also, when coming back from modal state, the notice should // immediately be masking instead of fading in. if (notice.getState() === 'waiting' || notice === nextNoticeFromModalState) { _this6._setMasking(notice, !!nextNoticeFromModalState); return false; } }, { start: _this6._leader, dir: 'next', skipModuleHandled: true }); }; // If the mouse leaves this notice while it's the leader, then the next // waiting notice should stop masking. var maskingOffTimer = null; var leaderLeaveInteraction = function leaderLeaveInteraction() { if (maskingOffTimer) { clearTimeout(maskingOffTimer); maskingOffTimer = null; } // TODO: Something wrong here when you come right back from the modal state. maskingOffTimer = setTimeout(function () { maskingOffTimer = null; _this6._setMasking(null); }, 750); }; this._leaderOff = function (offs) { return function () { return offs.map(function (off) { return off(); }); }; }([this._leader.on('mouseenter', leaderInteraction), this._leader.on('focusin', leaderInteraction), this._leader.on('mouseleave', leaderLeaveInteraction), this._leader.on('focusout', leaderLeaveInteraction)]); this.fire('afterSetLeader', { leader: leader }); } }, { key: "_setMasking", value: function _setMasking(masking, immediate) { var _this7 = this; if (this._masking) { if (this._masking === masking) { // Nothing to do. return; } this._masking._setMasking(false, immediate); } if (this._maskingOff) { this._maskingOff(); this._maskingOff = null; } this._masking = masking; if (!this._masking) { return; } // Reset the position data and position the leader. this._resetPositionData(); if (this._leader) { this._positionNotice(this._leader); } // Get this notice ready for positioning. this._masking._setMasking(true, immediate); // Wait for the DOM to update. window.requestAnimationFrame(function () { if (_this7._masking) { _this7._positionNotice(_this7._masking); } }); var maskingInteraction = function maskingInteraction() { // If the masked notice is moused over or focused, the stack enters the // modal state, and the notices appear. if (_this7.modal === 'ish') { _this7._insertOverlay(); _this7._setMasking(null, true); _this7.forEach(function (notice) { // Prevent the notices from timed closing. notice._preventTimerClose(true); if (notice.getState() === 'waiting') { notice.open(); } }, { start: _this7._leader, dir: 'next', skipModuleHandled: true }); } }; this._maskingOff = function (offs) { return function () { return offs.map(function (off) { return off(); }); }; }([this._masking.on('mouseenter', maskingInteraction), this._masking.on('focusin', maskingInteraction)]); } }, { key: "_shouldNoticeWait", value: function _shouldNoticeWait(notice) { return this._swapping !== notice && !(this.modal === 'ish' && this._overlayOpen) && this.maxOpen !== Infinity && this._openNotices >= this.maxOpen && this.maxStrategy === 'wait'; } }, { key: "_insertOverlay", value: function _insertOverlay() { var _this8 = this; if (!this._overlay) { this._overlay = document.createElement('div'); this._overlay.classList.add('pnotify-modal-overlay'); if (this.dir1) { this._overlay.classList.add("pnotify-modal-overlay-".concat(this.dir1)); } if (this.overlayClose) { this._overlay.classList.add('pnotify-modal-overlay-closes'); } if (this.context !== document.body) { this._overlay.style.height = "".concat(this.context.scrollHeight, "px"); this._overlay.style.width = "".concat(this.context.scrollWidth, "px"); } // Close the notices on overlay click. this._overlay.addEventListener('click', function (clickEvent) { if (_this8.overlayClose) { _this8.fire('overlayClose', { clickEvent: clickEvent }); if (clickEvent.defaultPrevented) { return; } if (_this8._leader) { // Clear the leader. A new one will be found while closing. _this8._setLeader(null); } _this8.forEach(function (notice) { if (['closed', 'closing', 'waiting'].indexOf(notice.getState()) !== -1) { return; } if (notice.hide || _this8.overlayClosesPinned) { notice.close(); } else if (!notice.hide && _this8.modal === 'ish') { if (_this8._leader) { notice.close(false, false, true); } else { _this8._setLeader(notice); } } }, { skipModuleHandled: true }); if (_this8._overlayOpen) { _this8._removeOverlay(); } } }); } if (this._overlay.parentNode !== this.context) { this.fire('beforeAddOverlay'); this._overlay.classList.remove('pnotify-modal-overlay-in'); this._overlay = this.context.insertBefore(this._overlay, this.context.firstChild); this._overlayOpen = true; this._overlayInserted = true; window.requestAnimationFrame(function () { _this8._overlay.classList.add('pnotify-modal-overlay-in'); _this8.fire('afterAddOverlay'); }); } this._collapsingModalState = false; } }, { key: "_removeOverlay", value: function _removeOverlay() { var _this9 = this; if (this._overlay.parentNode) { this.fire('beforeRemoveOverlay'); this._overlay.classList.remove('pnotify-modal-overlay-in'); this._overlayOpen = false; setTimeout(function () { _this9._overlayInserted = false; if (_this9._overlay.parentNode) { _this9._overlay.parentNode.removeChild(_this9._overlay); _this9.fire('afterRemoveOverlay'); } }, 250); setTimeout(function () { _this9._collapsingModalState = false; }, 400); } } }, { key: "notices", get: function get() { var notices = []; this.forEach(function (notice) { return notices.push(notice); }); return notices; } }, { key: "length", get: function get() { return this._length; } }, { key: "leader", get: function get() { return this._leader; } }]); return Stack; }(); var component = function component() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _construct(Core, args); }; function forwardEventsBuilder(component) { var additionalEvents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; // prettier-ignore var events = ['focus', 'blur', 'fullscreenchange', 'fullscreenerror', 'scroll', 'cut', 'copy', 'paste', 'keydown', 'keypress', 'keyup', 'auxclick', 'click', 'contextmenu', 'dblclick', 'mousedown', 'mouseenter', 'mouseleave', 'mousemove', 'mouseover', 'mouseout', 'mouseup', 'pointerlockchange', 'pointerlockerror', 'select', 'wheel', 'drag', 'dragend', 'dragenter', 'dragstart', 'dragleave', 'dragover', 'drop', 'touchcancel', 'touchend', 'touchmove', 'touchstart', 'pointerover', 'pointerenter', 'pointerdown', 'pointermove', 'pointerup', 'pointercancel', 'pointerout', 'pointerleave', 'gotpointercapture', 'lostpointercapture'].concat(_toConsumableArray(additionalEvents)); function forward(e) { bubble(component, e); } return function (node) { var destructors = []; for (var i = 0; i < events.length; i++) { destructors.push(listen(node, events[i], forward)); } return { destroy: function destroy() { for (var _i = 0; _i < destructors.length; _i++) { destructors[_i](); } } }; }; } var Map_1 = globals.Map; function get_each_context(ctx, list, i) { var child_ctx = ctx.slice(); child_ctx[109] = list[i][0]; child_ctx[110] = list[i][1]; return child_ctx; } function get_each_context_1(ctx, list, i) { var child_ctx = ctx.slice(); child_ctx[109] = list[i][0]; child_ctx[110] = list[i][1]; return child_ctx; } function get_each_context_2(ctx, list, i) { var child_ctx = ctx.slice(); child_ctx[109] = list[i][0]; child_ctx[110] = list[i][1]; return child_ctx; } function get_each_context_3(ctx, list, i) { var child_ctx = ctx.slice(); child_ctx[109] = list[i][0]; child_ctx[110] = list[i][1]; return child_ctx; } // (931:4) {#each modulesPrependContainer as [module, options] (module)} function create_each_block_3(key_1, ctx) { var first; var switch_instance; var switch_instance_anchor; var current; var switch_instance_spread_levels = [{ self: /*self*/ ctx[42] }, /*options*/ ctx[110]]; var switch_value = /*module*/ ctx[109]["default"]; function switch_props(ctx) { var switch_instance_props = {}; for (var i = 0; i < switch_instance_spread_levels.length; i += 1) { switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]); } return { props: switch_instance_props }; } if (switch_value) { switch_instance = new switch_value(switch_props()); } return { key: key_1, first: null, c: function c() { first = empty(); if (switch_instance) create_component(switch_instance.$$.fragment); switch_instance_anchor = empty(); this.first = first; }, m: function m(target, anchor) { insert(target, first, anchor); if (switch_instance) { mount_component(switch_instance, target, anchor); } insert(target, switch_instance_anchor, anchor); current = true; }, p: function p(ctx, dirty) { var switch_instance_changes = dirty[1] & /*self, modulesPrependContainer*/ 2176 ? get_spread_update(switch_instance_spread_levels, [dirty[1] & /*self*/ 2048 && { self: /*self*/ ctx[42] }, dirty[1] & /*modulesPrependContainer*/ 128 && get_spread_object( /*options*/ ctx[110])]) : {}; if (switch_value !== (switch_value = /*module*/ ctx[109]["default"])) { if (switch_instance) { group_outros(); var old_component = switch_instance; transition_out(old_component.$$.fragment, 1, 0, function () { destroy_component(old_component, 1); }); check_outros(); } if (switch_value) { switch_instance = new switch_value(switch_props()); create_component(switch_instance.$$.fragment); transition_in(switch_instance.$$.fragment, 1); mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); } else { switch_instance = null; } } else if (switch_value) { switch_instance.$set(switch_instance_changes); } }, i: function i(local) { if (current) return; if (switch_instance) transition_in(switch_instance.$$.fragment, local); current = true; }, o: function o(local) { if (switch_instance) transition_out(switch_instance.$$.fragment, local); current = false; }, d: function d(detaching) { if (detaching) detach(first); if (detaching) detach(switch_instance_anchor); if (switch_instance) destroy_component(switch_instance, detaching); } }; } // (934:4) {#if closer && !_nonBlock} function create_if_block_8(ctx) { var div; var span; var span_class_value; var div_class_value; var div_title_value; var mounted; var dispose; return { c: function c() { div = element("div"); span = element("span"); attr(span, "class", span_class_value = /*getIcon*/ ctx[22]("closer")); attr(div, "class", div_class_value = "pnotify-closer ".concat( /*getStyle*/ ctx[21]("closer"), " ").concat((! /*closerHover*/ ctx[17] || /*_interacting*/ ctx[26]) && ! /*_masking*/ ctx[28] ? "" : "pnotify-hidden")); attr(div, "role", "button"); attr(div, "tabindex", "0"); attr(div, "title", div_title_value = /*labels*/ ctx[20].close); }, m: function m(target, anchor) { insert(target, div, anchor); append(div, span); if (!mounted) { dispose = listen(div, "click", /*click_handler*/ ctx[81]); mounted = true; } }, p: function p(ctx, dirty) { if (dirty[0] & /*closerHover, _interacting, _masking*/ 335675392 && div_class_value !== (div_class_value = "pnotify-closer ".concat( /*getStyle*/ ctx[21]("closer"), " ").concat((! /*closerHover*/ ctx[17] || /*_interacting*/ ctx[26]) && ! /*_masking*/ ctx[28] ? "" : "pnotify-hidden"))) { attr(div, "class", div_class_value); } if (dirty[0] & /*labels*/ 1048576 && div_title_value !== (div_title_value = /*labels*/ ctx[20].close)) { attr(div, "title", div_title_value); } }, d: function d(detaching) { if (detaching) detach(div); mounted = false; dispose(); } }; } // (945:4) {#if sticker && !_nonBlock} function create_if_block_7(ctx) { var div; var span; var span_class_value; var div_class_value; var div_aria_pressed_value; var div_title_value; var mounted; var dispose; return { c: function c() { div = element("div"); span = element("span"); attr(span, "class", span_class_value = "".concat( /*getIcon*/ ctx[22]("sticker"), " ").concat( /*hide*/ ctx[3] ? /*getIcon*/ ctx[22]("unstuck") : /*getIcon*/ ctx[22]("stuck"))); attr(div, "class", div_class_value = "pnotify-sticker ".concat( /*getStyle*/ ctx[21]("sticker"), " ").concat((! /*stickerHover*/ ctx[19] || /*_interacting*/ ctx[26]) && ! /*_masking*/ ctx[28] ? "" : "pnotify-hidden")); attr(div, "role", "button"); attr(div, "aria-pressed", div_aria_pressed_value = ! /*hide*/ ctx[3]); attr(div, "tabindex", "0"); attr(div, "title", div_title_value = /*hide*/ ctx[3] ? /*labels*/ ctx[20].stick : /*labels*/ ctx[20].unstick); }, m: function m(target, anchor) { insert(target, div, anchor); append(div, span); if (!mounted) { dispose = listen(div, "click", /*click_handler_1*/ ctx[82]); mounted = true; } }, p: function p(ctx, dirty) { if (dirty[0] & /*hide*/ 8 && span_class_value !== (span_class_value = "".concat( /*getIcon*/ ctx[22]("sticker"), " ").concat( /*hide*/ ctx[3] ? /*getIcon*/ ctx[22]("unstuck") : /*getIcon*/ ctx[22]("stuck")))) { attr(span, "class", span_class_value); } if (dirty[0] & /*stickerHover, _interacting, _masking*/ 336068608 && div_class_value !== (div_class_value = "pnotify-sticker ".concat( /*getStyle*/ ctx[21]("sticker"), " ").concat((! /*stickerHover*/ ctx[19] || /*_interacting*/ ctx[26]) && ! /*_masking*/ ctx[28] ? "" : "pnotify-hidden"))) { attr(div, "class", div_class_value); } if (dirty[0] & /*hide*/ 8 && div_aria_pressed_value !== (div_aria_pressed_value = ! /*hide*/ ctx[3])) { attr(div, "aria-pressed", div_aria_pressed_value); } if (dirty[0] & /*hide, labels*/ 1048584 && div_title_value !== (div_title_value = /*hide*/ ctx[3] ? /*labels*/ ctx[20].stick : /*labels*/ ctx[20].unstick)) { attr(div, "title", div_title_value); } }, d: function d(detaching) { if (detaching) detach(div); mounted = false; dispose(); } }; } // (959:4) {#if icon !== false} function create_if_block_6(ctx) { var div; var span; var span_class_value; var div_class_value; return { c: function c() { div = element("div"); span = element("span"); attr(span, "class", span_class_value = /*icon*/ ctx[13] === true ? /*getIcon*/ ctx[22]( /*type*/ ctx[4]) : /*icon*/ ctx[13]); attr(div, "class", div_class_value = "pnotify-icon ".concat( /*getStyle*/ ctx[21]("icon"))); }, m: function m(target, anchor) { insert(target, div, anchor); append(div, span); /*div_binding*/ ctx[83](div); }, p: function p(ctx, dirty) { if (dirty[0] & /*icon, type*/ 8208 && span_class_value !== (span_class_value = /*icon*/ ctx[13] === true ? /*getIcon*/ ctx[22]( /*type*/ ctx[4]) : /*icon*/ ctx[13])) { attr(span, "class", span_class_value); } }, d: function d(detaching) { if (detaching) detach(div); /*div_binding*/ ctx[83](null); } }; } // (971:6) {#each modulesPrependContent as [module, options] (module)} function create_each_block_2(key_1, ctx) { var first; var switch_instance; var switch_instance_anchor; var current; var switch_instance_spread_levels = [{ self: /*self*/ ctx[42] }, /*options*/ ctx[110]]; var switch_value = /*module*/ ctx[109]["default"]; function switch_props(ctx) { var switch_instance_props = {}; for (var i = 0; i < switch_instance_spread_levels.length; i += 1) { switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]); } return { props: switch_instance_props }; } if (switch_value) { switch_instance = new switch_value(switch_props()); } return { key: key_1, first: null, c: function c() { first = empty(); if (switch_instance) create_component(switch_instance.$$.fragment); switch_instance_anchor = empty(); this.first = first; }, m: function m(target, anchor) { insert(target, first, anchor); if (switch_instance) { mount_component(switch_instance, target, anchor); } insert(target, switch_instance_anchor, anchor); current = true; }, p: function p(ctx, dirty) { var switch_instance_changes = dirty[1] & /*self, modulesPrependContent*/ 2304 ? get_spread_update(switch_instance_spread_levels, [dirty[1] & /*self*/ 2048 && { self: /*self*/ ctx[42] }, dirty[1] & /*modulesPrependContent*/ 256 && get_spread_object( /*options*/ ctx[110])]) : {}; if (switch_value !== (switch_value = /*module*/ ctx[109]["default"])) { if (switch_instance) { group_outros(); var old_component = switch_instance; transition_out(old_component.$$.fragment, 1, 0, function () { destroy_component(old_component, 1); }); check_outros(); } if (switch_value) { switch_instance = new switch_value(switch_props()); create_component(switch_instance.$$.fragment); transition_in(switch_instance.$$.fragment, 1); mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); } else { switch_instance = null; } } else if (switch_value) { switch_instance.$set(switch_instance_changes); } }, i: function i(local) { if (current) return; if (switch_instance) transition_in(switch_instance.$$.fragment, local); current = true; }, o: function o(local) { if (switch_instance) transition_out(switch_instance.$$.fragment, local); current = false; }, d: function d(detaching) { if (detaching) detach(first); if (detaching) detach(switch_instance_anchor); if (switch_instance) destroy_component(switch_instance, detaching); } }; } // (974:6) {#if title !== false} function create_if_block_3(ctx) { var div; var div_class_value; var if_block = ! /*_titleElement*/ ctx[34] && create_if_block_4(ctx); return { c: function c() { div = element("div"); if (if_block) if_block.c(); attr(div, "class", div_class_value = "pnotify-title ".concat( /*getStyle*/ ctx[21]("title"))); }, m: function m(target, anchor) { insert(target, div, anchor); if (if_block) if_block.m(div, null); /*div_binding_1*/ ctx[84](div); }, p: function p(ctx, dirty) { if (! /*_titleElement*/ ctx[34]) { if (if_block) { if_block.p(ctx, dirty); } else { if_block = create_if_block_4(ctx); if_block.c(); if_block.m(div, null); } } else if (if_block) { if_block.d(1); if_block = null; } }, d: function d(detaching) { if (detaching) detach(div); if (if_block) if_block.d(); /*div_binding_1*/ ctx[84](null); } }; } // (979:10) {#if !_titleElement} function create_if_block_4(ctx) { var if_block_anchor; function select_block_type(ctx, dirty) { if ( /*titleTrusted*/ ctx[6]) return create_if_block_5; return create_else_block_1; } var current_block_type = select_block_type(ctx); var if_block = current_block_type(ctx); return { c: function c() { if_block.c(); if_block_anchor = empty(); }, m: function m(target, anchor) { if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, p: function p(ctx, dirty) { if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { if_block.p(ctx, dirty); } else { if_block.d(1); if_block = current_block_type(ctx); if (if_block) { if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } } }, d: function d(detaching) { if_block.d(detaching); if (detaching) detach(if_block_anchor); } }; } // (982:12) {:else} function create_else_block_1(ctx) { var span; var t; return { c: function c() { span = element("span"); t = text( /*title*/ ctx[5]); attr(span, "class", "pnotify-pre-line"); }, m: function m(target, anchor) { insert(target, span, anchor); append(span, t); }, p: function p(ctx, dirty) { if (dirty[0] & /*title*/ 32) set_data(t, /*title*/ ctx[5]); }, d: function d(detaching) { if (detaching) detach(span); } }; } // (980:12) {#if titleTrusted} function create_if_block_5(ctx) { var html_tag; var html_anchor; return { c: function c() { html_anchor = empty(); html_tag = new HtmlTag(html_anchor); }, m: function m(target, anchor) { html_tag.m( /*title*/ ctx[5], target, anchor); insert(target, html_anchor, anchor); }, p: function p(ctx, dirty) { if (dirty[0] & /*title*/ 32) html_tag.p( /*title*/ ctx[5]); }, d: function d(detaching) { if (detaching) detach(html_anchor); if (detaching) html_tag.d(); } }; } // (988:6) {#if text !== false} function create_if_block(ctx) { var div; var div_class_value; var if_block = ! /*_textElement*/ ctx[35] && create_if_block_1(ctx); return { c: function c() { div = element("div"); if (if_block) if_block.c(); attr(div, "class", div_class_value = "pnotify-text ".concat( /*getStyle*/ ctx[21]("text"), " ").concat( /*_maxTextHeightStyle*/ ctx[33] === "" ? "" : "pnotify-text-with-max-height")); attr(div, "style", /*_maxTextHeightStyle*/ ctx[33]); attr(div, "role", "alert"); }, m: function m(target, anchor) { insert(target, div, anchor); if (if_block) if_block.m(div, null); /*div_binding_2*/ ctx[85](div); }, p: function p(ctx, dirty) { if (! /*_textElement*/ ctx[35]) { if (if_block) { if_block.p(ctx, dirty); } else { if_block = create_if_block_1(ctx); if_block.c(); if_block.m(div, null); } } else if (if_block) { if_block.d(1); if_block = null; } if (dirty[1] & /*_maxTextHeightStyle*/ 4 && div_class_value !== (div_class_value = "pnotify-text ".concat( /*getStyle*/ ctx[21]("text"), " ").concat( /*_maxTextHeightStyle*/ ctx[33] === "" ? "" : "pnotify-text-with-max-height"))) { attr(div, "class", div_class_value); } if (dirty[1] & /*_maxTextHeightStyle*/ 4) { attr(div, "style", /*_maxTextHeightStyle*/ ctx[33]); } }, d: function d(detaching) { if (detaching) detach(div); if (if_block) if_block.d(); /*div_binding_2*/ ctx[85](null); } }; } // (995:10) {#if !_textElement} function create_if_block_1(ctx) { var if_block_anchor; function select_block_type_1(ctx, dirty) { if ( /*textTrusted*/ ctx[8]) return create_if_block_2; return create_else_block; } var current_block_type = select_block_type_1(ctx); var if_block = current_block_type(ctx); return { c: function c() { if_block.c(); if_block_anchor = empty(); }, m: function m(target, anchor) { if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, p: function p(ctx, dirty) { if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) { if_block.p(ctx, dirty); } else { if_block.d(1); if_block = current_block_type(ctx); if (if_block) { if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } } }, d: function d(detaching) { if_block.d(detaching); if (detaching) detach(if_block_anchor); } }; } // (998:12) {:else} function create_else_block(ctx) { var span; var t; return { c: function c() { span = element("span"); t = text( /*text*/ ctx[7]); attr(span, "class", "pnotify-pre-line"); }, m: function m(target, anchor) { insert(target, span, anchor); append(span, t); }, p: function p(ctx, dirty) { if (dirty[0] & /*text*/ 128) set_data(t, /*text*/ ctx[7]); }, d: function d(detaching) { if (detaching) detach(span); } }; } // (996:12) {#if textTrusted} function create_if_block_2(ctx) { var html_tag; var html_anchor; return { c: function c() { html_anchor = empty(); html_tag = new HtmlTag(html_anchor); }, m: function m(target, anchor) { html_tag.m( /*text*/ ctx[7], target, anchor); insert(target, html_anchor, anchor); }, p: function p(ctx, dirty) { if (dirty[0] & /*text*/ 128) html_tag.p( /*text*/ ctx[7]); }, d: function d(detaching) { if (detaching) detach(html_anchor); if (detaching) html_tag.d(); } }; } // (1004:6) {#each modulesAppendContent as [module, options] (module)} function create_each_block_1(key_1, ctx) { var first; var switch_instance; var switch_instance_anchor; var current; var switch_instance_spread_levels = [{ self: /*self*/ ctx[42] }, /*options*/ ctx[110]]; var switch_value = /*module*/ ctx[109]["default"]; function switch_props(ctx) { var switch_instance_props = {}; for (var i = 0; i < switch_instance_spread_levels.length; i += 1) { switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]); } return { props: switch_instance_props }; } if (switch_value) { switch_instance = new switch_value(switch_props()); } return { key: key_1, first: null, c: function c() { first = empty(); if (switch_instance) create_component(switch_instance.$$.fragment); switch_instance_anchor = empty(); this.first = first; }, m: function m(target, anchor) { insert(target, first, anchor); if (switch_instance) { mount_component(switch_instance, target, anchor); } insert(target, switch_instance_anchor, anchor); current = true; }, p: function p(ctx, dirty) { var switch_instance_changes = dirty[1] & /*self, modulesAppendContent*/ 2560 ? get_spread_update(switch_instance_spread_levels, [dirty[1] & /*self*/ 2048 && { self: /*self*/ ctx[42] }, dirty[1] & /*modulesAppendContent*/ 512 && get_spread_object( /*options*/ ctx[110])]) : {}; if (switch_value !== (switch_value = /*module*/ ctx[109]["default"])) { if (switch_instance) { group_outros(); var old_component = switch_instance; transition_out(old_component.$$.fragment, 1, 0, function () { destroy_component(old_component, 1); }); check_outros(); } if (switch_value) { switch_instance = new switch_value(switch_props()); create_component(switch_instance.$$.fragment); transition_in(switch_instance.$$.fragment, 1); mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); } else { switch_instance = null; } } else if (switch_value) { switch_instance.$set(switch_instance_changes); } }, i: function i(local) { if (current) return; if (switch_instance) transition_in(switch_instance.$$.fragment, local); current = true; }, o: function o(local) { if (switch_instance) transition_out(switch_instance.$$.fragment, local); current = false; }, d: function d(detaching) { if (detaching) detach(first); if (detaching) detach(switch_instance_anchor); if (switch_instance) destroy_component(switch_instance, detaching); } }; } // (1008:4) {#each modulesAppendContainer as [module, options] (module)} function create_each_block(key_1, ctx) { var first; var switch_instance; var switch_instance_anchor; var current; var switch_instance_spread_levels = [{ self: /*self*/ ctx[42] }, /*options*/ ctx[110]]; var switch_value = /*module*/ ctx[109]["default"]; function switch_props(ctx) { var switch_instance_props = {}; for (var i = 0; i < switch_instance_spread_levels.length; i += 1) { switch_instance_props = assign(switch_instance_props, switch_instance_spread_levels[i]); } return { props: switch_instance_props }; } if (switch_value) { switch_instance = new switch_value(switch_props()); } return { key: key_1, first: null, c: function c() { first = empty(); if (switch_instance) create_component(switch_instance.$$.fragment); switch_instance_anchor = empty(); this.first = first; }, m: function m(target, anchor) { insert(target, first, anchor); if (switch_instance) { mount_component(switch_instance, target, anchor); } insert(target, switch_instance_anchor, anchor); current = true; }, p: function p(ctx, dirty) { var switch_instance_changes = dirty[1] & /*self, modulesAppendContainer*/ 3072 ? get_spread_update(switch_instance_spread_levels, [dirty[1] & /*self*/ 2048 && { self: /*self*/ ctx[42] }, dirty[1] & /*modulesAppendContainer*/ 1024 && get_spread_object( /*options*/ ctx[110])]) : {}; if (switch_value !== (switch_value = /*module*/ ctx[109]["default"])) { if (switch_instance) { group_outros(); var old_component = switch_instance; transition_out(old_component.$$.fragment, 1, 0, function () { destroy_component(old_component, 1); }); check_outros(); } if (switch_value) { switch_instance = new switch_value(switch_props()); create_component(switch_instance.$$.fragment); transition_in(switch_instance.$$.fragment, 1); mount_component(switch_instance, switch_instance_anchor.parentNode, switch_instance_anchor); } else { switch_instance = null; } } else if (switch_value) { switch_instance.$set(switch_instance_changes); } }, i: function i(local) { if (current) return; if (switch_instance) transition_in(switch_instance.$$.fragment, local); current = true; }, o: function o(local) { if (switch_instance) transition_out(switch_instance.$$.fragment, local); current = false; }, d: function d(detaching) { if (detaching) detach(first); if (detaching) detach(switch_instance_anchor); if (switch_instance) destroy_component(switch_instance, detaching); } }; } function create_fragment(ctx) { var div2; var div1; var each_blocks_3 = []; var each0_lookup = new Map_1(); var t0; var t1; var t2; var t3; var div0; var each_blocks_2 = []; var each1_lookup = new Map_1(); var t4; var t5; var t6; var each_blocks_1 = []; var each2_lookup = new Map_1(); var div0_class_value; var t7; var each_blocks = []; var each3_lookup = new Map_1(); var div1_class_value; var div1_style_value; var div2_class_value; var forwardEvents_action; var current; var mounted; var dispose; var each_value_3 = /*modulesPrependContainer*/ ctx[38]; var get_key = function get_key(ctx) { return ( /*module*/ ctx[109] ); }; for (var i = 0; i < each_value_3.length; i += 1) { var child_ctx = get_each_context_3(ctx, each_value_3, i); var key = get_key(child_ctx); each0_lookup.set(key, each_blocks_3[i] = create_each_block_3(key, child_ctx)); } var if_block0 = /*closer*/ ctx[16] && ! /*_nonBlock*/ ctx[36] && create_if_block_8(ctx); var if_block1 = /*sticker*/ ctx[18] && ! /*_nonBlock*/ ctx[36] && create_if_block_7(ctx); var if_block2 = /*icon*/ ctx[13] !== false && create_if_block_6(ctx); var each_value_2 = /*modulesPrependContent*/ ctx[39]; var get_key_1 = function get_key_1(ctx) { return ( /*module*/ ctx[109] ); }; for (var _i = 0; _i < each_value_2.length; _i += 1) { var _child_ctx = get_each_context_2(ctx, each_value_2, _i); var _key = get_key_1(_child_ctx); each1_lookup.set(_key, each_blocks_2[_i] = create_each_block_2(_key, _child_ctx)); } var if_block3 = /*title*/ ctx[5] !== false && create_if_block_3(ctx); var if_block4 = /*text*/ ctx[7] !== false && create_if_block(ctx); var each_value_1 = /*modulesAppendContent*/ ctx[40]; var get_key_2 = function get_key_2(ctx) { return ( /*module*/ ctx[109] ); }; for (var _i2 = 0; _i2 < each_value_1.length; _i2 += 1) { var _child_ctx2 = get_each_context_1(ctx, each_value_1, _i2); var _key2 = get_key_2(_child_ctx2); each2_lookup.set(_key2, each_blocks_1[_i2] = create_each_block_1(_key2, _child_ctx2)); } var each_value = /*modulesAppendContainer*/ ctx[41]; var get_key_3 = function get_key_3(ctx) { return ( /*module*/ ctx[109] ); }; for (var _i3 = 0; _i3 < each_value.length; _i3 += 1) { var _child_ctx3 = get_each_context(ctx, each_value, _i3); var _key3 = get_key_3(_child_ctx3); each3_lookup.set(_key3, each_blocks[_i3] = create_each_block(_key3, _child_ctx3)); } return { c: function c() { div2 = element("div"); div1 = element("div"); for (var _i4 = 0; _i4 < each_blocks_3.length; _i4 += 1) { each_blocks_3[_i4].c(); } t0 = space(); if (if_block0) if_block0.c(); t1 = space(); if (if_block1) if_block1.c(); t2 = space(); if (if_block2) if_block2.c(); t3 = space(); div0 = element("div"); for (var _i5 = 0; _i5 < each_blocks_2.length; _i5 += 1) { each_blocks_2[_i5].c(); } t4 = space(); if (if_block3) if_block3.c(); t5 = space(); if (if_block4) if_block4.c(); t6 = space(); for (var _i6 = 0; _i6 < each_blocks_1.length; _i6 += 1) { each_blocks_1[_i6].c(); } t7 = space(); for (var _i7 = 0; _i7 < each_blocks.length; _i7 += 1) { each_blocks[_i7].c(); } attr(div0, "class", div0_class_value = "pnotify-content ".concat( /*getStyle*/ ctx[21]("content"))); attr(div1, "class", div1_class_value = "pnotify-container ".concat( /*getStyle*/ ctx[21]("container"), " ").concat( /*getStyle*/ ctx[21]( /*type*/ ctx[4]), " ").concat( /*shadow*/ ctx[15] ? "pnotify-shadow" : "", " ").concat( /*_moduleClasses*/ ctx[27].container.join(" "))); attr(div1, "style", div1_style_value = "".concat( /*_widthStyle*/ ctx[31], " ").concat( /*_minHeightStyle*/ ctx[32])); attr(div1, "role", "alert"); attr(div2, "data-pnotify", ""); attr(div2, "class", div2_class_value = "pnotify ".concat(! /*stack*/ ctx[0] || /*stack*/ ctx[0].positioned ? "pnotify-positioned" : "", " ").concat( /*icon*/ ctx[13] !== false ? "pnotify-with-icon" : "", " ").concat( /*getStyle*/ ctx[21]("elem"), " pnotify-mode-").concat( /*mode*/ ctx[9], " ").concat( /*addClass*/ ctx[10], " ").concat( /*_animatingClass*/ ctx[24], " ").concat( /*_moveClass*/ ctx[25], " ").concat( /*_stackDirClass*/ ctx[37], " ").concat( /*animation*/ ctx[2] === "fade" ? "pnotify-fade-".concat( /*animateSpeed*/ ctx[14]) : "", " ").concat( /*_modal*/ ctx[30] ? "pnotify-modal ".concat( /*addModalClass*/ ctx[11]) : /*addModelessClass*/ ctx[12], " ").concat( /*_masking*/ ctx[28] ? "pnotify-masking" : "", " ").concat( /*_maskingIn*/ ctx[29] ? "pnotify-masking-in" : "", " ").concat( /*_moduleClasses*/ ctx[27].elem.join(" "))); attr(div2, "aria-live", "assertive"); attr(div2, "role", "alertdialog"); }, m: function m(target, anchor) { insert(target, div2, anchor); append(div2, div1); for (var _i8 = 0; _i8 < each_blocks_3.length; _i8 += 1) { each_blocks_3[_i8].m(div1, null); } append(div1, t0); if (if_block0) if_block0.m(div1, null); append(div1, t1); if (if_block1) if_block1.m(div1, null); append(div1, t2); if (if_block2) if_block2.m(div1, null); append(div1, t3); append(div1, div0); for (var _i9 = 0; _i9 < each_blocks_2.length; _i9 += 1) { each_blocks_2[_i9].m(div0, null); } append(div0, t4); if (if_block3) if_block3.m(div0, null); append(div0, t5); if (if_block4) if_block4.m(div0, null); append(div0, t6); for (var _i10 = 0; _i10 < each_blocks_1.length; _i10 += 1) { each_blocks_1[_i10].m(div0, null); } /*div0_binding*/ ctx[86](div0); append(div1, t7); for (var _i11 = 0; _i11 < each_blocks.length; _i11 += 1) { each_blocks[_i11].m(div1, null); } /*div1_binding*/ ctx[87](div1); /*div2_binding*/ ctx[88](div2); current = true; if (!mounted) { dispose = [action_destroyer(forwardEvents_action = /*forwardEvents*/ ctx[43].call(null, div2)), listen(div2, "mouseenter", /*handleInteraction*/ ctx[44]), listen(div2, "mouseleave", /*handleLeaveInteraction*/ ctx[45]), listen(div2, "focusin", /*handleInteraction*/ ctx[44]), listen(div2, "focusout", /*handleLeaveInteraction*/ ctx[45])]; mounted = true; } }, p: function p(ctx, dirty) { if (dirty[1] & /*modulesPrependContainer, self*/ 2176) { var _each_value_ = /*modulesPrependContainer*/ ctx[38]; group_outros(); each_blocks_3 = update_keyed_each(each_blocks_3, dirty, get_key, 1, ctx, _each_value_, each0_lookup, div1, outro_and_destroy_block, create_each_block_3, t0, get_each_context_3); check_outros(); } if ( /*closer*/ ctx[16] && ! /*_nonBlock*/ ctx[36]) { if (if_block0) { if_block0.p(ctx, dirty); } else { if_block0 = create_if_block_8(ctx); if_block0.c(); if_block0.m(div1, t1); } } else if (if_block0) { if_block0.d(1); if_block0 = null; } if ( /*sticker*/ ctx[18] && ! /*_nonBlock*/ ctx[36]) { if (if_block1) { if_block1.p(ctx, dirty); } else { if_block1 = create_if_block_7(ctx); if_block1.c(); if_block1.m(div1, t2); } } else if (if_block1) { if_block1.d(1); if_block1 = null; } if ( /*icon*/ ctx[13] !== false) { if (if_block2) { if_block2.p(ctx, dirty); } else { if_block2 = create_if_block_6(ctx); if_block2.c(); if_block2.m(div1, t3); } } else if (if_block2) { if_block2.d(1); if_block2 = null; } if (dirty[1] & /*modulesPrependContent, self*/ 2304) { var _each_value_2 = /*modulesPrependContent*/ ctx[39]; group_outros(); each_blocks_2 = update_keyed_each(each_blocks_2, dirty, get_key_1, 1, ctx, _each_value_2, each1_lookup, div0, outro_and_destroy_block, create_each_block_2, t4, get_each_context_2); check_outros(); } if ( /*title*/ ctx[5] !== false) { if (if_block3) { if_block3.p(ctx, dirty); } else { if_block3 = create_if_block_3(ctx); if_block3.c(); if_block3.m(div0, t5); } } else if (if_block3) { if_block3.d(1); if_block3 = null; } if ( /*text*/ ctx[7] !== false) { if (if_block4) { if_block4.p(ctx, dirty); } else { if_block4 = create_if_block(ctx); if_block4.c(); if_block4.m(div0, t6); } } else if (if_block4) { if_block4.d(1); if_block4 = null; } if (dirty[1] & /*modulesAppendContent, self*/ 2560) { var _each_value_3 = /*modulesAppendContent*/ ctx[40]; group_outros(); each_blocks_1 = update_keyed_each(each_blocks_1, dirty, get_key_2, 1, ctx, _each_value_3, each2_lookup, div0, outro_and_destroy_block, create_each_block_1, null, get_each_context_1); check_outros(); } if (dirty[1] & /*modulesAppendContainer, self*/ 3072) { var _each_value = /*modulesAppendContainer*/ ctx[41]; group_outros(); each_blocks = update_keyed_each(each_blocks, dirty, get_key_3, 1, ctx, _each_value, each3_lookup, div1, outro_and_destroy_block, create_each_block, null, get_each_context); check_outros(); } if (!current || dirty[0] & /*type, shadow, _moduleClasses*/ 134250512 && div1_class_value !== (div1_class_value = "pnotify-container ".concat( /*getStyle*/ ctx[21]("container"), " ").concat( /*getStyle*/ ctx[21]( /*type*/ ctx[4]), " ").concat( /*shadow*/ ctx[15] ? "pnotify-shadow" : "", " ").concat( /*_moduleClasses*/ ctx[27].container.join(" ")))) { attr(div1, "class", div1_class_value); } if (!current || dirty[1] & /*_widthStyle, _minHeightStyle*/ 3 && div1_style_value !== (div1_style_value = "".concat( /*_widthStyle*/ ctx[31], " ").concat( /*_minHeightStyle*/ ctx[32]))) { attr(div1, "style", div1_style_value); } if (!current || dirty[0] & /*stack, icon, mode, addClass, _animatingClass, _moveClass, animation, animateSpeed, _modal, addModalClass, addModelessClass, _masking, _maskingIn, _moduleClasses*/ 2063629829 | dirty[1] & /*_stackDirClass*/ 64 && div2_class_value !== (div2_class_value = "pnotify ".concat(! /*stack*/ ctx[0] || /*stack*/ ctx[0].positioned ? "pnotify-positioned" : "", " ").concat( /*icon*/ ctx[13] !== false ? "pnotify-with-icon" : "", " ").concat( /*getStyle*/ ctx[21]("elem"), " pnotify-mode-").concat( /*mode*/ ctx[9], " ").concat( /*addClass*/ ctx[10], " ").concat( /*_animatingClass*/ ctx[24], " ").concat( /*_moveClass*/ ctx[25], " ").concat( /*_stackDirClass*/ ctx[37], " ").concat( /*animation*/ ctx[2] === "fade" ? "pnotify-fade-".concat( /*animateSpeed*/ ctx[14]) : "", " ").concat( /*_modal*/ ctx[30] ? "pnotify-modal ".concat( /*addModalClass*/ ctx[11]) : /*addModelessClass*/ ctx[12], " ").concat( /*_masking*/ ctx[28] ? "pnotify-masking" : "", " ").concat( /*_maskingIn*/ ctx[29] ? "pnotify-masking-in" : "", " ").concat( /*_moduleClasses*/ ctx[27].elem.join(" ")))) { attr(div2, "class", div2_class_value); } }, i: function i(local) { if (current) return; for (var _i12 = 0; _i12 < each_value_3.length; _i12 += 1) { transition_in(each_blocks_3[_i12]); } for (var _i13 = 0; _i13 < each_value_2.length; _i13 += 1) { transition_in(each_blocks_2[_i13]); } for (var _i14 = 0; _i14 < each_value_1.length; _i14 += 1) { transition_in(each_blocks_1[_i14]); } for (var _i15 = 0; _i15 < each_value.length; _i15 += 1) { transition_in(each_blocks[_i15]); } current = true; }, o: function o(local) { for (var _i16 = 0; _i16 < each_blocks_3.length; _i16 += 1) { transition_out(each_blocks_3[_i16]); } for (var _i17 = 0; _i17 < each_blocks_2.length; _i17 += 1) { transition_out(each_blocks_2[_i17]); } for (var _i18 = 0; _i18 < each_blocks_1.length; _i18 += 1) { transition_out(each_blocks_1[_i18]); } for (var _i19 = 0; _i19 < each_blocks.length; _i19 += 1) { transition_out(each_blocks[_i19]); } current = false; }, d: function d(detaching) { if (detaching) detach(div2); for (var _i20 = 0; _i20 < each_blocks_3.length; _i20 += 1) { each_blocks_3[_i20].d(); } if (if_block0) if_block0.d(); if (if_block1) if_block1.d(); if (if_block2) if_block2.d(); for (var _i21 = 0; _i21 < each_blocks_2.length; _i21 += 1) { each_blocks_2[_i21].d(); } if (if_block3) if_block3.d(); if (if_block4) if_block4.d(); for (var _i22 = 0; _i22 < each_blocks_1.length; _i22 += 1) { each_blocks_1[_i22].d(); } /*div0_binding*/ ctx[86](null); for (var _i23 = 0; _i23 < each_blocks.length; _i23 += 1) { each_blocks[_i23].d(); } /*div1_binding*/ ctx[87](null); /*div2_binding*/ ctx[88](null); mounted = false; run_all(dispose); } }; } var alert = function alert(options) { return component(getDefaultArgs(options)); }; var notice = function notice(options) { return component(getDefaultArgs(options, "notice")); }; var info = function info(options) { return component(getDefaultArgs(options, "info")); }; var success = function success(options) { return component(getDefaultArgs(options, "success")); }; var error = function error(options) { return component(getDefaultArgs(options, "error")); }; // Default arguments for the new notice helper functions. function getDefaultArgs(options, type) { if (_typeof(options) !== "object") { options = { text: options }; } // Only assign the type if it was requested, so we don't overwrite // options.type if it has something assigned. if (type) { options.type = type; } var target = document.body; if ("stack" in options && options.stack && options.stack.context) { target = options.stack.context; } return { target: target, props: options }; } var defaultStack = new Stack({ dir1: "down", dir2: "left", firstpos1: 25, firstpos2: 25, spacing1: 36, spacing2: 36, push: "bottom" }); var defaultModules = new Map(); var defaults = { type: "notice", title: false, titleTrusted: false, text: false, textTrusted: false, styling: "brighttheme", icons: "brighttheme", mode: "no-preference", addClass: "", addModalClass: "", addModelessClass: "", autoOpen: true, width: "360px", minHeight: "16px", maxTextHeight: "200px", icon: true, animation: "fade", animateSpeed: "normal", shadow: true, hide: true, delay: 8000, mouseReset: true, closer: true, closerHover: true, sticker: true, stickerHover: true, labels: { close: "Close", stick: "Pin", unstick: "Unpin" }, remove: true, destroy: true, stack: defaultStack, modules: defaultModules }; var posTimer; // These actions need to be done once the DOM is ready. function onDocumentLoaded() { if (!defaultStack.context) { defaultStack.context = document.body; } // Reposition the notices when the window resizes. window.addEventListener("resize", function () { // This timer is used for queueing the position event so it doesn't run // repeatedly. if (posTimer) { clearTimeout(posTimer); } posTimer = setTimeout(function () { var event = new Event("pnotify:position"); document.body.dispatchEvent(event); posTimer = null; }, 10); }); } // Run the deferred actions once the DOM is ready. if (window && document.body) { onDocumentLoaded(); } else { document.addEventListener("DOMContentLoaded", onDocumentLoaded); } function instance($$self, $$props, $$invalidate) { var self = get_current_component(); var dispatch = createEventDispatcher(); var forwardEvents = forwardEventsBuilder(self, ["pnotify:init", "pnotify:mount", "pnotify:update", "pnotify:beforeOpen", "pnotify:afterOpen", "pnotify:enterModal", "pnotify:leaveModal", "pnotify:beforeClose", "pnotify:afterClose", "pnotify:beforeDestroy", "pnotify:afterDestroy", "focusin", "focusout", "animationend", "transitionend"]); var _$$props$modules = $$props.modules, modules = _$$props$modules === void 0 ? new Map(defaults.modules) : _$$props$modules; var _$$props$stack = $$props.stack, stack = _$$props$stack === void 0 ? defaults.stack : _$$props$stack; var refs = { elem: null, container: null, content: null, iconContainer: null, titleContainer: null, textContainer: null }; // Run init to give a chance for modules to override defaults. var selfDefaults = _objectSpread2({}, defaults); dispatchLifecycleEvent("init", { notice: self, defaults: selfDefaults }); var _$$props$type = $$props.type, type = _$$props$type === void 0 ? selfDefaults.type : _$$props$type; var _$$props$title = $$props.title, title = _$$props$title === void 0 ? selfDefaults.title : _$$props$title; var _$$props$titleTrusted = $$props.titleTrusted, titleTrusted = _$$props$titleTrusted === void 0 ? selfDefaults.titleTrusted : _$$props$titleTrusted; var _$$props$text = $$props.text, text = _$$props$text === void 0 ? selfDefaults.text : _$$props$text; var _$$props$textTrusted = $$props.textTrusted, textTrusted = _$$props$textTrusted === void 0 ? selfDefaults.textTrusted : _$$props$textTrusted; var _$$props$styling = $$props.styling, styling = _$$props$styling === void 0 ? selfDefaults.styling : _$$props$styling; var _$$props$icons = $$props.icons, icons = _$$props$icons === void 0 ? selfDefaults.icons : _$$props$icons; var _$$props$mode = $$props.mode, mode = _$$props$mode === void 0 ? selfDefaults.mode : _$$props$mode; var _$$props$addClass = $$props.addClass, addClass = _$$props$addClass === void 0 ? selfDefaults.addClass : _$$props$addClass; var _$$props$addModalClas = $$props.addModalClass, addModalClass = _$$props$addModalClas === void 0 ? selfDefaults.addModalClass : _$$props$addModalClas; var _$$props$addModelessC = $$props.addModelessClass, addModelessClass = _$$props$addModelessC === void 0 ? selfDefaults.addModelessClass : _$$props$addModelessC; var _$$props$autoOpen = $$props.autoOpen, autoOpen = _$$props$autoOpen === void 0 ? selfDefaults.autoOpen : _$$props$autoOpen; var _$$props$width = $$props.width, width = _$$props$width === void 0 ? selfDefaults.width : _$$props$width; var _$$props$minHeight = $$props.minHeight, minHeight = _$$props$minHeight === void 0 ? selfDefaults.minHeight : _$$props$minHeight; var _$$props$maxTextHeigh = $$props.maxTextHeight, maxTextHeight = _$$props$maxTextHeigh === void 0 ? selfDefaults.maxTextHeight : _$$props$maxTextHeigh; var _$$props$icon = $$props.icon, icon = _$$props$icon === void 0 ? selfDefaults.icon : _$$props$icon; var _$$props$animation = $$props.animation, animation = _$$props$animation === void 0 ? selfDefaults.animation : _$$props$animation; var _$$props$animateSpeed = $$props.animateSpeed, animateSpeed = _$$props$animateSpeed === void 0 ? selfDefaults.animateSpeed : _$$props$animateSpeed; var _$$props$shadow = $$props.shadow, shadow = _$$props$shadow === void 0 ? selfDefaults.shadow : _$$props$shadow; var _$$props$hide = $$props.hide, hide = _$$props$hide === void 0 ? selfDefaults.hide : _$$props$hide; var _$$props$delay = $$props.delay, delay = _$$props$delay === void 0 ? selfDefaults.delay : _$$props$delay; var _$$props$mouseReset = $$props.mouseReset, mouseReset = _$$props$mouseReset === void 0 ? selfDefaults.mouseReset : _$$props$mouseReset; var _$$props$closer = $$props.closer, closer = _$$props$closer === void 0 ? selfDefaults.closer : _$$props$closer; var _$$props$closerHover = $$props.closerHover, closerHover = _$$props$closerHover === void 0 ? selfDefaults.closerHover : _$$props$closerHover; var _$$props$sticker = $$props.sticker, sticker = _$$props$sticker === void 0 ? selfDefaults.sticker : _$$props$sticker; var _$$props$stickerHover = $$props.stickerHover, stickerHover = _$$props$stickerHover === void 0 ? selfDefaults.stickerHover : _$$props$stickerHover; var _$$props$labels = $$props.labels, labels = _$$props$labels === void 0 ? selfDefaults.labels : _$$props$labels; var _$$props$remove = $$props.remove, remove = _$$props$remove === void 0 ? selfDefaults.remove : _$$props$remove; var _$$props$destroy = $$props.destroy, destroy = _$$props$destroy === void 0 ? selfDefaults.destroy : _$$props$destroy; // The state can be 'waiting', 'opening', 'open', 'closing', or 'closed'. var _state = "closed"; // Auto close timer. var _timer = null; // Animation timers. var _animInTimer = null; var _animOutTimer = null; // Stores what is currently being animated (in or out). var _animating = false; // Stores the class that adds entry/exit animation effects. var _animatingClass = ""; // Stores the class that adds movement animation effects. var _moveClass = ""; // Stores whether the notice was hidden by a timer. var _timerHide = false; // Whether the mouse is over the notice or the notice is focused. var _interacting = false; // Holds classes that modules add for the notice element or container element. var _moduleClasses = { elem: [], container: [] }; // Modules that change how the notice displays (causing the notice element to // not appear) can set these to true to make PNotify handle it correctly. var _moduleHandled = false; var _moduleOpen = false; // The masking control for the second notice in a modalish stack when the // first notice is hovered. var _masking = false; var _maskingIn = false; var _maskingTimer = null; // Save the old value of hide, so we can reset the timer if it changes. var _oldHide = hide; // Promise that resolves when the notice has opened. var _openPromise = null; // Promise that resolved when the notice closes. var _closePromise = null; var getState = function getState() { return _state; }; var getTimer = function getTimer() { return _timer; }; var getStyle = function getStyle(name) { return typeof styling === "string" ? "".concat(styling, "-").concat(name) : name in styling ? styling[name] : "".concat(styling.prefix, "-").concat(name); }; var getIcon = function getIcon(name) { return typeof icons === "string" ? "".concat(icons, "-icon-").concat(name) : name in icons ? icons[name] : "".concat(icons.prefix, "-icon-").concat(name); }; // Whether the notification is in a modal stack (or a modalish stack in modal // state). var _modal = stack && (stack.modal === true || stack.modal === "ish" && _timer === "prevented"); var _oldStack = NaN; var _stackBeforeAddOverlayOff = null; var _stackAfterRemoveOverlayOff = null; onMount(function () { dispatchLifecycleEvent("mount"); // Display the notice. if (autoOpen) { open()["catch"](function () {}); } }); beforeUpdate(function () { dispatchLifecycleEvent("update"); // Update the timed hiding. if (_state !== "closed" && _state !== "waiting" && hide !== _oldHide) { if (!hide) { cancelClose(); } else if (!_oldHide) { queueClose(); } } // Queue a position if (_state !== "closed" && _state !== "closing" && stack && !stack._collapsingModalState) { stack.queuePosition(); } // Save old options. _oldHide = hide; }); function handleInteraction(e) { $$invalidate(26, _interacting = true); // Stop animation, reset the removal timer when the user interacts. if (mouseReset && _state === "closing") { if (!_timerHide) { return; } cancelClose(); } // Stop the close timer. if (hide && mouseReset) { cancelClose(); } } function handleLeaveInteraction(e) { $$invalidate(26, _interacting = false); // Start the close timer. if (hide && mouseReset && _animating !== "out" && ["open", "opening"].indexOf(_state) !== -1) { queueClose(); } } // This runs an event on all the modules. function dispatchLifecycleEvent(event) { var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var eventDetail = _objectSpread2({ notice: self }, detail); if (event === "init") { Array.from(modules).forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), module = _ref2[0], options = _ref2[1]; return "init" in module && module.init(eventDetail); }); } var target = refs.elem || stack && stack.context || document.body; if (!target) { dispatch("pnotify:".concat(event), eventDetail); return true; } var eventObj = new Event("pnotify:".concat(event), { bubbles: event === "init" || event === "mount", cancelable: event.startsWith("before") }); eventObj.detail = eventDetail; target.dispatchEvent(eventObj); return !eventObj.defaultPrevented; } function insertIntoDOM() { // If the notice is not in the DOM, or in the wrong context, append it. var target = stack && stack.context || document.body; if (!target) { throw new Error("No context to insert this notice into."); } if (!refs.elem) { throw new Error("Trying to insert notice before element is available."); } if (refs.elem.parentNode !== target) { target.appendChild(refs.elem); } } function removeFromDOM() { refs.elem && refs.elem.parentNode.removeChild(refs.elem); } var _$$props$open = $$props.open, open = _$$props$open === void 0 ? function (immediate) { if (_state === "opening") { return _openPromise; } if (_state === "open") { if (hide) { queueClose(); } return Promise.resolve(); } if (!_moduleHandled && stack && stack._shouldNoticeWait(self)) { _state = "waiting"; return Promise.reject(); } if (!dispatchLifecycleEvent("beforeOpen", { immediate: immediate })) { return Promise.reject(); } _state = "opening"; $$invalidate(28, _masking = false); // This makes the notice visibity: hidden; so its dimensions can be // determined. $$invalidate(24, _animatingClass = "pnotify-initial pnotify-hidden"); var resolve; var reject; var promise = new Promise(function (res, rej) { resolve = res; reject = rej; }); _openPromise = promise; var afterOpenCallback = function afterOpenCallback() { // Now set it to hide. if (hide) { queueClose(); } _state = "open"; dispatchLifecycleEvent("afterOpen", { immediate: immediate }); _openPromise = null; resolve(); }; if (_moduleOpen) { afterOpenCallback(); return Promise.resolve(); } insertIntoDOM(); // Wait until the DOM is updated. window.requestAnimationFrame(function () { if (_state !== "opening") { reject(); _openPromise = null; return; } if (stack) { // Mark the stack so it won't animate the new notice. $$invalidate(0, stack._animation = false, stack); if (stack.push === "top") { // Reset the position data so the notice is positioned as the first // notice. stack._resetPositionData(); } // Now position the stack's the notices. stack._positionNotice(self); stack.queuePosition(0); // Reset animation. $$invalidate(0, stack._animation = true, stack); } animateIn(afterOpenCallback, immediate); }); return promise; } : _$$props$open; var _$$props$close = $$props.close, close = _$$props$close === void 0 ? function (immediate, timerHide, waitAfterward) { if (_state === "closing") { return _closePromise; } if (_state === "closed") { return Promise.resolve(); } var runDestroy = function runDestroy() { if (!dispatchLifecycleEvent("beforeDestroy")) { return; } if (stack) { stack._removeNotice(self); } self.$destroy(); dispatchLifecycleEvent("afterDestroy"); }; if (_state === "waiting") { if (waitAfterward) { return Promise.resolve(); } _state = "closed"; // It's debatable whether the notice should be destroyed in this case, but // I'm going to go ahead and say yes. if (destroy && !waitAfterward) { runDestroy(); } return Promise.resolve(); } if (!dispatchLifecycleEvent("beforeClose", { immediate: immediate, timerHide: timerHide, waitAfterward: waitAfterward })) { return Promise.reject(); } _state = "closing"; _timerHide = !!timerHide; // Make sure it's a boolean. if (_timer && _timer !== "prevented" && clearTimeout) { clearTimeout(_timer); } _timer = null; var resolve; var promise = new Promise(function (res, rej) { resolve = res; }); _closePromise = promise; animateOut(function () { $$invalidate(26, _interacting = false); _timerHide = false; _state = waitAfterward ? "waiting" : "closed"; dispatchLifecycleEvent("afterClose", { immediate: immediate, timerHide: timerHide, waitAfterward: waitAfterward }); _closePromise = null; resolve(); if (!waitAfterward) { if (destroy) { // If we're supposed to destroy the notice, run the destroy module // events, remove from stack, and let Svelte handle DOM removal. runDestroy(); } else if (remove) { // If we're supposed to remove the notice from the DOM, do it. removeFromDOM(); } } }, immediate); return promise; } : _$$props$close; var _$$props$animateIn = $$props.animateIn, animateIn = _$$props$animateIn === void 0 ? function (callback, immediate) { // Declare that the notice is animating in. _animating = "in"; var finished = function finished(event) { if (event && refs.elem && event.target !== refs.elem) { return; } refs.elem && refs.elem.removeEventListener("transitionend", finished); if (_animInTimer) { clearTimeout(_animInTimer); } if (_animating !== "in") { return; } var visible = _moduleOpen; if (!visible && refs.elem) { var domRect = refs.elem.getBoundingClientRect(); for (var prop in domRect) { if (domRect[prop] > 0) { visible = true; break; } } } if (visible) { if (callback) { callback.call(); } // Declare that the notice has completed animating. _animating = false; } else { _animInTimer = setTimeout(finished, 40); } }; if (animation === "fade" && !immediate) { refs.elem && refs.elem.addEventListener("transitionend", finished); $$invalidate(24, _animatingClass = "pnotify-in"); tick().then(function () { $$invalidate(24, _animatingClass = "pnotify-in pnotify-fade-in"); // Just in case the event doesn't fire, call it after 650 ms. _animInTimer = setTimeout(finished, 650); }); } else { var _animation = animation; $$invalidate(2, animation = "none"); $$invalidate(24, _animatingClass = "pnotify-in ".concat(_animation === "fade" ? "pnotify-fade-in" : "")); tick().then(function () { $$invalidate(2, animation = _animation); finished(); }); } } : _$$props$animateIn; var _$$props$animateOut = $$props.animateOut, animateOut = _$$props$animateOut === void 0 ? function (callback, immediate) { // Declare that the notice is animating out. _animating = "out"; var finished = function finished(event) { if (event && refs.elem && event.target !== refs.elem) { return; } refs.elem && refs.elem.removeEventListener("transitionend", finished); if (_animOutTimer) { clearTimeout(_animOutTimer); } if (_animating !== "out") { return; } var visible = _moduleOpen; if (!visible && refs.elem) { var domRect = refs.elem.getBoundingClientRect(); for (var prop in domRect) { if (domRect[prop] > 0) { visible = true; break; } } } if (!refs.elem || !refs.elem.style.opacity || refs.elem.style.opacity === "0" || !visible) { $$invalidate(24, _animatingClass = ""); if (callback) { callback.call(); } // Declare that the notice has completed animating. _animating = false; } else { // In case this was called before the notice finished animating. _animOutTimer = setTimeout(finished, 40); } }; if (animation === "fade" && !immediate) { refs.elem && refs.elem.addEventListener("transitionend", finished); $$invalidate(24, _animatingClass = "pnotify-in"); // Just in case the event doesn't fire, call it after 650 ms. _animOutTimer = setTimeout(finished, 650); } else { $$invalidate(24, _animatingClass = ""); tick().then(function () { finished(); }); } } : _$$props$animateOut; function cancelClose() { if (_timer && _timer !== "prevented") { clearTimeout(_timer); _timer = null; } if (_animOutTimer) { clearTimeout(_animOutTimer); } if (_state === "closing") { // If it's animating out, stop it. _state = "open"; _animating = false; $$invalidate(24, _animatingClass = animation === "fade" ? "pnotify-in pnotify-fade-in" : "pnotify-in"); } } function queueClose() { if (_timer === "prevented") { return; } // Cancel any current close timer. cancelClose(); if (delay !== Infinity) { _timer = setTimeout(function () { return close(false, true); }, isNaN(delay) ? 0 : delay); } } function _preventTimerClose(prevent) { if (prevent) { cancelClose(); _timer = "prevented"; } else if (_timer === "prevented") { _timer = null; if (_state === "open" && hide) { queueClose(); } } } function on() { return self.$on.apply(self, arguments); } function update() { return self.$set.apply(self, arguments); } function fire(name, detail) { dispatch(name, detail); } function addModuleClass(element) { for (var i = 0; i < (arguments.length <= 1 ? 0 : arguments.length - 1); i++) { var className = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; if (_moduleClasses[element].indexOf(className) === -1) { _moduleClasses[element].push(className); } } $$invalidate(27, _moduleClasses); } function removeModuleClass(element) { for (var i = 0; i < (arguments.length <= 1 ? 0 : arguments.length - 1); i++) { var className = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; var idx = _moduleClasses[element].indexOf(className); if (idx !== -1) { _moduleClasses[element].splice(idx, 1); } } $$invalidate(27, _moduleClasses); } function hasModuleClass(element) { for (var i = 0; i < (arguments.length <= 1 ? 0 : arguments.length - 1); i++) { var className = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; if (_moduleClasses[element].indexOf(className) === -1) { return false; } } return true; } function getModuleHandled() { return _moduleHandled; } function setModuleHandled(value) { return _moduleHandled = value; } function getModuleOpen() { return _moduleOpen; } function setModuleOpen(value) { return _moduleOpen = value; } function setAnimating(value) { return _animating = value; } function getAnimatingClass() { return _animatingClass; } function setAnimatingClass(value) { return $$invalidate(24, _animatingClass = value); } function _getMoveClass() { return _moveClass; } function _setMoveClass(value) { return $$invalidate(25, _moveClass = value); } function _setMasking(value, immediate, callback) { if (_maskingTimer) { clearTimeout(_maskingTimer); } if (_masking === value) { return; } if (value) { $$invalidate(28, _masking = true); $$invalidate(29, _maskingIn = !!immediate); insertIntoDOM(); tick().then(function () { window.requestAnimationFrame(function () { if (_masking) { if (immediate && callback) { callback(); } else { $$invalidate(29, _maskingIn = true); var finished = function finished() { refs.elem && refs.elem.removeEventListener("transitionend", finished); if (_maskingTimer) { clearTimeout(_maskingTimer); } if (_maskingIn && callback) { callback(); } }; refs.elem && refs.elem.addEventListener("transitionend", finished); _maskingTimer = setTimeout(finished, 650); } } }); }); } else if (immediate) { $$invalidate(28, _masking = false); $$invalidate(29, _maskingIn = false); if (remove && ["open", "opening", "closing"].indexOf(_state) === -1) { removeFromDOM(); } if (callback) { callback(); } } else { var finished = function finished() { refs.elem && refs.elem.removeEventListener("transitionend", finished); if (_maskingTimer) { clearTimeout(_maskingTimer); } if (!_maskingIn) { $$invalidate(28, _masking = false); if (remove && ["open", "opening", "closing"].indexOf(_state) === -1) { removeFromDOM(); } if (callback) { callback(); } } }; $$invalidate(29, _maskingIn = false); refs.elem && refs.elem.addEventListener("transitionend", finished); refs.elem && refs.elem.style.opacity; // This line is necessary for some reason. Some notices don't fade without it. // Just in case the event doesn't fire, call it after 650 ms. _maskingTimer = setTimeout(finished, 650); } } var click_handler = function click_handler() { return close(false); }; var click_handler_1 = function click_handler_1() { return $$invalidate(3, hide = !hide); }; function div_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.iconContainer = $$value; $$invalidate(1, refs); }); } function div_binding_1($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.titleContainer = $$value; $$invalidate(1, refs); }); } function div_binding_2($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.textContainer = $$value; $$invalidate(1, refs); }); } function div0_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.content = $$value; $$invalidate(1, refs); }); } function div1_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.container = $$value; $$invalidate(1, refs); }); } function div2_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { refs.elem = $$value; $$invalidate(1, refs); }); } // khai báo $$self.$$set = function ($$props) { if ("modules" in $$props) $$invalidate(46, modules = $$props.modules); if ("stack" in $$props) $$invalidate(0, stack = $$props.stack); if ("type" in $$props) $$invalidate(4, type = $$props.type); if ("title" in $$props) $$invalidate(5, title = $$props.title); if ("titleTrusted" in $$props) $$invalidate(6, titleTrusted = $$props.titleTrusted); if ("text" in $$props) $$invalidate(7, text = $$props.text); if ("textTrusted" in $$props) $$invalidate(8, textTrusted = $$props.textTrusted); if ("styling" in $$props) $$invalidate(47, styling = $$props.styling); if ("icons" in $$props) $$invalidate(48, icons = $$props.icons); if ("mode" in $$props) $$invalidate(9, mode = $$props.mode); if ("addClass" in $$props) $$invalidate(10, addClass = $$props.addClass); if ("addModalClass" in $$props) $$invalidate(11, addModalClass = $$props.addModalClass); if ("addModelessClass" in $$props) $$invalidate(12, addModelessClass = $$props.addModelessClass); if ("autoOpen" in $$props) $$invalidate(49, autoOpen = $$props.autoOpen); if ("width" in $$props) $$invalidate(50, width = $$props.width); if ("minHeight" in $$props) $$invalidate(51, minHeight = $$props.minHeight); if ("maxTextHeight" in $$props) $$invalidate(52, maxTextHeight = $$props.maxTextHeight); if ("icon" in $$props) $$invalidate(13, icon = $$props.icon); if ("animation" in $$props) $$invalidate(2, animation = $$props.animation); if ("animateSpeed" in $$props) $$invalidate(14, animateSpeed = $$props.animateSpeed); if ("shadow" in $$props) $$invalidate(15, shadow = $$props.shadow); if ("hide" in $$props) $$invalidate(3, hide = $$props.hide); if ("delay" in $$props) $$invalidate(53, delay = $$props.delay); if ("mouseReset" in $$props) $$invalidate(54, mouseReset = $$props.mouseReset); if ("closer" in $$props) $$invalidate(16, closer = $$props.closer); if ("closerHover" in $$props) $$invalidate(17, closerHover = $$props.closerHover); if ("sticker" in $$props) $$invalidate(18, sticker = $$props.sticker); if ("stickerHover" in $$props) $$invalidate(19, stickerHover = $$props.stickerHover); if ("labels" in $$props) $$invalidate(20, labels = $$props.labels); if ("remove" in $$props) $$invalidate(55, remove = $$props.remove); if ("destroy" in $$props) $$invalidate(56, destroy = $$props.destroy); if ("open" in $$props) $$invalidate(59, open = $$props.open); if ("close" in $$props) $$invalidate(23, close = $$props.close); if ("animateIn" in $$props) $$invalidate(60, animateIn = $$props.animateIn); if ("animateOut" in $$props) $$invalidate(61, animateOut = $$props.animateOut); }; var _widthStyle; var _minHeightStyle; var _maxTextHeightStyle; var _titleElement; var _textElement; var _nonBlock; var _stackDirClass; var modulesPrependContainer; var modulesPrependContent; var modulesAppendContent; var modulesAppendContainer; $$self.$$.update = function () { if ($$self.$$.dirty[1] & /*width*/ 524288) { // Grab the icons from the icons object or use provided icons $$invalidate(31, _widthStyle = typeof width === "string" ? "width: ".concat(width, ";") : ""); } if ($$self.$$.dirty[1] & /*minHeight*/ 1048576) { $$invalidate(32, _minHeightStyle = typeof minHeight === "string" ? "min-height: ".concat(minHeight, ";") : ""); } if ($$self.$$.dirty[1] & /*maxTextHeight*/ 2097152) { $$invalidate(33, _maxTextHeightStyle = typeof maxTextHeight === "string" ? "max-height: ".concat(maxTextHeight, ";") : ""); } if ($$self.$$.dirty[0] & /*title*/ 32) { $$invalidate(34, _titleElement = title instanceof HTMLElement); } if ($$self.$$.dirty[0] & /*text*/ 128) { $$invalidate(35, _textElement = text instanceof HTMLElement); } if ($$self.$$.dirty[0] & /*stack*/ 1 | $$self.$$.dirty[3] & /*_oldStack, _stackBeforeAddOverlayOff, _stackAfterRemoveOverlayOff*/ 1792) { if (_oldStack !== stack) { if (_oldStack) { // Remove the notice from the old stack. _oldStack._removeNotice(self); // Remove the listeners. $$invalidate(30, _modal = false); _stackBeforeAddOverlayOff(); _stackAfterRemoveOverlayOff(); } if (stack) { // Add the notice to the stack. stack._addNotice(self); // Add listeners for modal state. $$invalidate(102, _stackBeforeAddOverlayOff = stack.on("beforeAddOverlay", function () { $$invalidate(30, _modal = true); dispatchLifecycleEvent("enterModal"); })); $$invalidate(103, _stackAfterRemoveOverlayOff = stack.on("afterRemoveOverlay", function () { $$invalidate(30, _modal = false); dispatchLifecycleEvent("leaveModal"); })); } $$invalidate(101, _oldStack = stack); } } if ($$self.$$.dirty[0] & /*addClass, addModalClass, _modal, addModelessClass*/ 1073748992) { $$invalidate(36, _nonBlock = addClass.match(/\bnonblock\b/) || addModalClass.match(/\bnonblock\b/) && _modal || addModelessClass.match(/\bnonblock\b/) && !_modal); } if ($$self.$$.dirty[0] & /*stack*/ 1) { // This is for specific styling for how notices stack. $$invalidate(37, _stackDirClass = stack && stack.dir1 ? "pnotify-stack-".concat(stack.dir1) : ""); } if ($$self.$$.dirty[1] & /*modules*/ 32768) { // Filter through the module objects, getting an array for each position. $$invalidate(38, modulesPrependContainer = Array.from(modules).filter(function (_ref3) { var _ref4 = _slicedToArray(_ref3, 2), module = _ref4[0], options = _ref4[1]; return module.position === "PrependContainer"; })); } if ($$self.$$.dirty[1] & /*modules*/ 32768) { $$invalidate(39, modulesPrependContent = Array.from(modules).filter(function (_ref5) { var _ref6 = _slicedToArray(_ref5, 2), module = _ref6[0], options = _ref6[1]; return module.position === "PrependContent"; })); } if ($$self.$$.dirty[1] & /*modules*/ 32768) { $$invalidate(40, modulesAppendContent = Array.from(modules).filter(function (_ref7) { var _ref8 = _slicedToArray(_ref7, 2), module = _ref8[0], options = _ref8[1]; return module.position === "AppendContent"; })); } if ($$self.$$.dirty[1] & /*modules*/ 32768) { $$invalidate(41, modulesAppendContainer = Array.from(modules).filter(function (_ref9) { var _ref10 = _slicedToArray(_ref9, 2), module = _ref10[0], options = _ref10[1]; return module.position === "AppendContainer"; })); } if ($$self.$$.dirty[0] & /*refs, title*/ 34 | $$self.$$.dirty[1] & /*_titleElement*/ 8) { if (_titleElement && refs.titleContainer) { refs.titleContainer.appendChild(title); } } if ($$self.$$.dirty[0] & /*refs, text*/ 130 | $$self.$$.dirty[1] & /*_textElement*/ 16) { if (_textElement && refs.textContainer) { refs.textContainer.appendChild(text); } } }; return [stack, refs, animation, hide, type, title, titleTrusted, text, textTrusted, mode, addClass, addModalClass, addModelessClass, icon, animateSpeed, shadow, closer, closerHover, sticker, stickerHover, labels, getStyle, getIcon, close, _animatingClass, _moveClass, _interacting, _moduleClasses, _masking, _maskingIn, _modal, _widthStyle, _minHeightStyle, _maxTextHeightStyle, _titleElement, _textElement, _nonBlock, _stackDirClass, modulesPrependContainer, modulesPrependContent, modulesAppendContent, modulesAppendContainer, self, forwardEvents, handleInteraction, handleLeaveInteraction, modules, styling, icons, autoOpen, width, minHeight, maxTextHeight, delay, mouseReset, remove, destroy, getState, getTimer, open, animateIn, animateOut, cancelClose, queueClose, _preventTimerClose, on, update, fire, addModuleClass, removeModuleClass, hasModuleClass, getModuleHandled, setModuleHandled, getModuleOpen, setModuleOpen, setAnimating, getAnimatingClass, setAnimatingClass, _getMoveClass, _setMoveClass, _setMasking, click_handler, click_handler_1, div_binding, div_binding_1, div_binding_2, div0_binding, div1_binding, div2_binding]; } var Core = /*#__PURE__*/function (_SvelteComponent) { _inherits(Core, _SvelteComponent); var _super = _createSuper(Core); function Core(options) { var _this; _classCallCheck(this, Core); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { modules: 46, stack: 0, refs: 1, type: 4, title: 5, titleTrusted: 6, text: 7, textTrusted: 8, styling: 47, icons: 48, mode: 9, addClass: 10, addModalClass: 11, addModelessClass: 12, autoOpen: 49, width: 50, minHeight: 51, maxTextHeight: 52, icon: 13, animation: 2, animateSpeed: 14, shadow: 15, hide: 3, delay: 53, mouseReset: 54, closer: 16, closerHover: 17, sticker: 18, stickerHover: 19, labels: 20, remove: 55, destroy: 56, getState: 57, getTimer: 58, getStyle: 21, getIcon: 22, open: 59, close: 23, animateIn: 60, animateOut: 61, cancelClose: 62, queueClose: 63, _preventTimerClose: 64, on: 65, update: 66, fire: 67, addModuleClass: 68, removeModuleClass: 69, hasModuleClass: 70, getModuleHandled: 71, setModuleHandled: 72, getModuleOpen: 73, setModuleOpen: 74, setAnimating: 75, getAnimatingClass: 76, setAnimatingClass: 77, _getMoveClass: 78, _setMoveClass: 79, _setMasking: 80 }, [-1, -1, -1, -1]); return _this; } _createClass(Core, [{ key: "modules", get: function get() { return this.$$.ctx[46]; }, set: function set(modules) { this.$set({ modules: modules }); flush(); } }, { key: "stack", get: function get() { return this.$$.ctx[0]; }, set: function set(stack) { this.$set({ stack: stack }); flush(); } }, { key: "refs", get: function get() { return this.$$.ctx[1]; } }, { key: "type", get: function get() { return this.$$.ctx[4]; }, set: function set(type) { this.$set({ type: type }); flush(); } }, { key: "title", get: function get() { return this.$$.ctx[5]; }, set: function set(title) { this.$set({ title: title }); flush(); } }, { key: "titleTrusted", get: function get() { return this.$$.ctx[6]; }, set: function set(titleTrusted) { this.$set({ titleTrusted: titleTrusted }); flush(); } }, { key: "text", get: function get() { return this.$$.ctx[7]; }, set: function set(text) { this.$set({ text: text }); flush(); } }, { key: "textTrusted", get: function get() { return this.$$.ctx[8]; }, set: function set(textTrusted) { this.$set({ textTrusted: textTrusted }); flush(); } }, { key: "styling", get: function get() { return this.$$.ctx[47]; }, set: function set(styling) { this.$set({ styling: styling }); flush(); } }, { key: "icons", get: function get() { return this.$$.ctx[48]; }, set: function set(icons) { this.$set({ icons: icons }); flush(); } }, { key: "mode", get: function get() { return this.$$.ctx[9]; }, set: function set(mode) { this.$set({ mode: mode }); flush(); } }, { key: "addClass", get: function get() { return this.$$.ctx[10]; }, set: function set(addClass) { this.$set({ addClass: addClass }); flush(); } }, { key: "addModalClass", get: function get() { return this.$$.ctx[11]; }, set: function set(addModalClass) { this.$set({ addModalClass: addModalClass }); flush(); } }, { key: "addModelessClass", get: function get() { return this.$$.ctx[12]; }, set: function set(addModelessClass) { this.$set({ addModelessClass: addModelessClass }); flush(); } }, { key: "autoOpen", get: function get() { return this.$$.ctx[49]; }, set: function set(autoOpen) { this.$set({ autoOpen: autoOpen }); flush(); } }, { key: "width", get: function get() { return this.$$.ctx[50]; }, set: function set(width) { this.$set({ width: width }); flush(); } }, { key: "minHeight", get: function get() { return this.$$.ctx[51]; }, set: function set(minHeight) { this.$set({ minHeight: minHeight }); flush(); } }, { key: "maxTextHeight", get: function get() { return this.$$.ctx[52]; }, set: function set(maxTextHeight) { this.$set({ maxTextHeight: maxTextHeight }); flush(); } }, { key: "icon", get: function get() { return this.$$.ctx[13]; }, set: function set(icon) { this.$set({ icon: icon }); flush(); } }, { key: "animation", get: function get() { return this.$$.ctx[2]; }, set: function set(animation) { this.$set({ animation: animation }); flush(); } }, { key: "animateSpeed", get: function get() { return this.$$.ctx[14]; }, set: function set(animateSpeed) { this.$set({ animateSpeed: animateSpeed }); flush(); } }, { key: "shadow", get: function get() { return this.$$.ctx[15]; }, set: function set(shadow) { this.$set({ shadow: shadow }); flush(); } }, { key: "hide", get: function get() { return this.$$.ctx[3]; }, set: function set(hide) { this.$set({ hide: hide }); flush(); } }, { key: "delay", get: function get() { return this.$$.ctx[53]; }, set: function set(delay) { this.$set({ delay: delay }); flush(); } }, { key: "mouseReset", get: function get() { return this.$$.ctx[54]; }, set: function set(mouseReset) { this.$set({ mouseReset: mouseReset }); flush(); } }, { key: "closer", get: function get() { return this.$$.ctx[16]; }, set: function set(closer) { this.$set({ closer: closer }); flush(); } }, { key: "closerHover", get: function get() { return this.$$.ctx[17]; }, set: function set(closerHover) { this.$set({ closerHover: closerHover }); flush(); } }, { key: "sticker", get: function get() { return this.$$.ctx[18]; }, set: function set(sticker) { this.$set({ sticker: sticker }); flush(); } }, { key: "stickerHover", get: function get() { return this.$$.ctx[19]; }, set: function set(stickerHover) { this.$set({ stickerHover: stickerHover }); flush(); } }, { key: "labels", get: function get() { return this.$$.ctx[20]; }, set: function set(labels) { this.$set({ labels: labels }); flush(); } }, { key: "remove", get: function get() { return this.$$.ctx[55]; }, set: function set(remove) { this.$set({ remove: remove }); flush(); } }, { key: "destroy", get: function get() { return this.$$.ctx[56]; }, set: function set(destroy) { this.$set({ destroy: destroy }); flush(); } }, { key: "getState", get: function get() { return this.$$.ctx[57]; } }, { key: "getTimer", get: function get() { return this.$$.ctx[58]; } }, { key: "getStyle", get: function get() { return this.$$.ctx[21]; } }, { key: "getIcon", get: function get() { return this.$$.ctx[22]; } }, { key: "open", get: function get() { return this.$$.ctx[59]; }, set: function set(open) { this.$set({ open: open }); flush(); } }, { key: "close", get: function get() { return this.$$.ctx[23]; }, set: function set(close) { this.$set({ close: close }); flush(); } }, { key: "animateIn", get: function get() { return this.$$.ctx[60]; }, set: function set(animateIn) { this.$set({ animateIn: animateIn }); flush(); } }, { key: "animateOut", get: function get() { return this.$$.ctx[61]; }, set: function set(animateOut) { this.$set({ animateOut: animateOut }); flush(); } }, { key: "cancelClose", get: function get() { return this.$$.ctx[62]; } }, { key: "queueClose", get: function get() { return this.$$.ctx[63]; } }, { key: "_preventTimerClose", get: function get() { return this.$$.ctx[64]; } }, { key: "on", get: function get() { return this.$$.ctx[65]; } }, { key: "update", get: function get() { return this.$$.ctx[66]; } }, { key: "fire", get: function get() { return this.$$.ctx[67]; } }, { key: "addModuleClass", get: function get() { return this.$$.ctx[68]; } }, { key: "removeModuleClass", get: function get() { return this.$$.ctx[69]; } }, { key: "hasModuleClass", get: function get() { return this.$$.ctx[70]; } }, { key: "getModuleHandled", get: function get() { return this.$$.ctx[71]; } }, { key: "setModuleHandled", get: function get() { return this.$$.ctx[72]; } }, { key: "getModuleOpen", get: function get() { return this.$$.ctx[73]; } }, { key: "setModuleOpen", get: function get() { return this.$$.ctx[74]; } }, { key: "setAnimating", get: function get() { return this.$$.ctx[75]; } }, { key: "getAnimatingClass", get: function get() { return this.$$.ctx[76]; } }, { key: "setAnimatingClass", get: function get() { return this.$$.ctx[77]; } }, { key: "_getMoveClass", get: function get() { return this.$$.ctx[78]; } }, { key: "_setMoveClass", get: function get() { return this.$$.ctx[79]; } }, { key: "_setMasking", get: function get() { return this.$$.ctx[80]; } }]); return Core; }(SvelteComponent); exports.Stack = Stack; exports.alert = alert; exports.default = Core; exports.defaultModules = defaultModules; exports.defaultStack = defaultStack; exports.defaults = defaults; exports.error = error; exports.info = info; exports.notice = notice; exports.success = success; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotify.js end*/ /*PNotifyFontAwesome5.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyFontAwesome5 = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function detach(node) { node.parentNode.removeChild(node); } function children(element) { return Array.from(element.childNodes); } var current_component; function set_current_component(component) { current_component = component; } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { // first, call beforeUpdate functions // and update components for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, // state props: props, update: noop, not_equal: not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = /*#__PURE__*/function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); var position = "PrependContainer"; var defaults = {}; function init$1(eventDetail) { // You must have Font Awesome v5.0+ eventDetail.defaults.icons = { prefix: "fontawesome5", notice: "fas fa-exclamation-circle", info: "fas fa-info-circle", success: "fas fa-check-circle", error: "fas fa-exclamation-triangle", // Buttons Module closer: "fas fa-times", sticker: "fas", stuck: "fa-play", unstuck: "fa-pause", // Reference Module (Useful for other modules.) refresh: "fas fa-sync" }; } var Font_awesome5 = /*#__PURE__*/function (_SvelteComponent) { _inherits(Font_awesome5, _SvelteComponent); var _super = _createSuper(Font_awesome5); function Font_awesome5(options) { var _this; _classCallCheck(this, Font_awesome5); _this = _super.call(this); init(_assertThisInitialized(_this), options, null, null, safe_not_equal, {}); return _this; } return Font_awesome5; }(SvelteComponent); exports.default = Font_awesome5; exports.defaults = defaults; exports.init = init$1; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyFontAwesome5.js end*/ /*PNotifyAnimate.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyAnimate = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function detach(node) { node.parentNode.removeChild(node); } function children(element) { return Array.from(element.childNodes); } var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, props: props, update: noop, not_equal: not_equal, bound: blank_object(), on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); var position = "PrependContainer"; var defaults = { inClass: null, outClass: null }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$inClass = $$props.inClass, inClass = _$$props$inClass === void 0 ? defaults.inClass : _$$props$inClass; var _$$props$outClass = $$props.outClass, outClass = _$$props$outClass === void 0 ? defaults.outClass : _$$props$outClass; var _animation = self.animation; var _animateIn = self.animateIn; var _animateOut = self.animateOut; onDestroy(function () { self.$set({ animation: _animation, animateIn: _animateIn, animateOut: _animateOut }); }); self.on("pnotify:update", function () { if (self.refs.elem) { var animSpeed = 250; if (self.animateSpeed === "slow") { animSpeed = 400; } else if (self.animateSpeed === "fast") { animSpeed = 100; } else if (self.animateSpeed > 0) { animSpeed = self.animateSpeed; } animSpeed = animSpeed / 1000; if (self.refs.elem.style.animationDuration !== "".concat(animSpeed, "s")) { $$invalidate(0, self.refs.elem.style.animationDuration = "".concat(animSpeed, "s"), self); } } }); function animateIn(callback, immediate) { self.setAnimating("in"); var off; var finished = function finished(event) { if (event && self.refs.elem && event.target !== self.refs.elem) { return; } off(); self.setAnimatingClass("pnotify-in animated"); if (callback) { callback.call(); } self.setAnimating(false); }; off = self.on("animationend", finished); if (immediate) { finished(); } else { self.setAnimatingClass("pnotify-in animated ".concat(inClass || outClass)); } } function animateOut(callback, immediate) { self.setAnimating("out"); var off; var finished = function finished(event) { if (event && self.refs.elem && event.target !== self.refs.elem) { return; } off(); self.setAnimatingClass("animated"); if (callback) { callback.call(); } if (self.setAnimating) { self.setAnimating(false); } }; off = self.on("animationend", finished); if (immediate) { finished(); } else { self.setAnimatingClass("pnotify-in animated ".concat(outClass || inClass)); } } self.attention = function (aniClass, callback) { var off; var cb = function cb() { off(); self.removeModuleClass("container", "animated", aniClass); if (callback) { callback.call(self); } }; off = self.on("animationend", cb); self.addModuleClass("container", "animated", aniClass); }; $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(0, self = $$props.self); if ("inClass" in $$props) $$invalidate(1, inClass = $$props.inClass); if ("outClass" in $$props) $$invalidate(2, outClass = $$props.outClass); }; $$self.$$.update = function () { if ($$self.$$.dirty & 7) { if (inClass || outClass) { self.$set({ animation: "none", animateIn: animateIn, animateOut: animateOut }); } else { self.$set({ animation: _animation, animateIn: _animateIn, animateOut: _animateOut }); } } }; return [self, inClass, outClass]; } var Animate = function (_SvelteComponent) { _inherits(Animate, _SvelteComponent); var _super = _createSuper(Animate); function Animate(options) { var _this; _classCallCheck(this, Animate); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, null, safe_not_equal, { self: 0, inClass: 1, outClass: 2 }); return _this; } return Animate; }(SvelteComponent); exports.default = Animate; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyAnimate.js end*/ /*PNotifyMobile.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyMobile = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function detach(node) { node.parentNode.removeChild(node); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return function () { return node.removeEventListener(event, handler, options); }; } function children(element) { return Array.from(element.childNodes); } var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { // first, call beforeUpdate functions // and update components for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } var globals = typeof window !== 'undefined' ? window : typeof globalThis !== 'undefined' ? globalThis : global; function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, // state props: props, update: noop, not_equal: not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = /*#__PURE__*/function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); var window_1 = globals.window; function create_fragment(ctx) { var mounted; var dispose; return { c: noop, m: function m(target, anchor) { if (!mounted) { dispose = listen(window_1, "resize", /*resize_handler*/ ctx[3]); mounted = true; } }, p: noop, i: noop, o: noop, d: function d(detaching) { mounted = false; dispose(); } }; } var position = "PrependContainer"; var defaults = { swipeDismiss: true }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$swipeDismiss = $$props.swipeDismiss, swipeDismiss = _$$props$swipeDismiss === void 0 ? defaults.swipeDismiss : _$$props$swipeDismiss; var origXY = null; var diffXY = null; var noticeWidthHeight = null; var noticeOpacity = null; var csspos = "left"; var direction = "X"; var span = "Width"; var windowInnerWidth = window.innerWidth; var offs = []; onMount(function () { offs = [self.on("touchstart", function (e) { if (!swipeDismiss) { return; } var stack = self.stack; if (stack) { switch (stack.dir1) { case "up": case "down": csspos = "left"; direction = "X"; span = "Width"; break; case "left": case "right": csspos = "top"; direction = "Y"; span = "Height"; break; } } origXY = e.touches[0]["screen".concat(direction)]; noticeWidthHeight = self.refs.elem["scroll".concat(span)]; noticeOpacity = window.getComputedStyle(self.refs.elem)["opacity"]; $$invalidate(1, self.refs.container.style[csspos] = 0, self); }), self.on("touchmove", function (e) { if (!origXY || !swipeDismiss) { return; } var curXY = e.touches[0]["screen".concat(direction)]; diffXY = curXY - origXY; var opacity = (1 - Math.abs(diffXY) / noticeWidthHeight) * noticeOpacity; $$invalidate(1, self.refs.elem.style.opacity = opacity, self); $$invalidate(1, self.refs.container.style[csspos] = "".concat(diffXY, "px"), self); }), self.on("touchend", function () { if (!origXY || !swipeDismiss) { return; } self.refs.container.classList.add("pnotify-mobile-animate-left"); if (Math.abs(diffXY) > 40) { var goLeft = diffXY < 0 ? noticeWidthHeight * -2 : noticeWidthHeight * 2; $$invalidate(1, self.refs.elem.style.opacity = 0, self); $$invalidate(1, self.refs.container.style[csspos] = "".concat(goLeft, "px"), self); self.close(); } else { self.refs.elem.style.removeProperty("opacity"); self.refs.container.style.removeProperty(csspos); } origXY = null; diffXY = null; noticeWidthHeight = null; noticeOpacity = null; }), self.on("touchcancel", function () { if (!origXY || !swipeDismiss) { return; } self.refs.elem.style.removeProperty("opacity"); self.refs.container.style.removeProperty(csspos); origXY = null; diffXY = null; noticeWidthHeight = null; noticeOpacity = null; }), self.on("pnotify:afterClose", function () { // Remove any styling we added to close it. if (!swipeDismiss) { return; } self.refs.elem.style.removeProperty("opacity"); self.refs.container.style.removeProperty("left"); self.refs.container.style.removeProperty("top"); })]; }); onDestroy(function () { offs.forEach(function (off) { return off(); }); }); var resize_handler = function resize_handler() { return $$invalidate(0, windowInnerWidth = window.innerWidth); }; $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(1, self = $$props.self); if ("swipeDismiss" in $$props) $$invalidate(2, swipeDismiss = $$props.swipeDismiss); }; $$self.$$.update = function () { if ($$self.$$.dirty & /*self, windowInnerWidth*/ 3) { { var stack = self.stack; if (stack) { if (windowInnerWidth <= 480) { if (!("_m_spacing1" in stack)) { stack._m_spacing1 = stack.spacing1; stack._m_firstpos1 = stack.firstpos1; stack._m_spacing2 = stack.spacing2; stack._m_firstpos2 = stack.firstpos2; stack.spacing1 = 0; stack.firstpos1 = 0; stack.spacing2 = 0; stack.firstpos2 = 0; stack.queuePosition(); } } else { if ("_m_spacing1" in stack) { stack.spacing1 = stack._m_spacing1; delete stack._m_spacing1; stack.firstpos1 = stack._m_firstpos1; delete stack._m_firstpos1; stack.spacing2 = stack._m_spacing2; delete stack._m_spacing2; stack.firstpos2 = stack._m_firstpos2; delete stack._m_firstpos2; stack.queuePosition(); } } } } } }; return [windowInnerWidth, self, swipeDismiss, resize_handler]; } var Mobile = /*#__PURE__*/function (_SvelteComponent) { _inherits(Mobile, _SvelteComponent); var _super = _createSuper(Mobile); function Mobile(options) { var _this; _classCallCheck(this, Mobile); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { self: 1, swipeDismiss: 2 }); return _this; } return Mobile; }(SvelteComponent); exports.default = Mobile; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyMobile.js end*/ /*PNotifyDesktop.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyDesktop = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function detach(node) { node.parentNode.removeChild(node); } function children(element) { return Array.from(element.childNodes); } var current_component; function set_current_component(component) { current_component = component; } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, props: props, update: noop, not_equal: not_equal, bound: blank_object(), on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); var position = "PrependContainer"; var defaults = { fallback: true, icon: null, tag: null, title: null, text: null, options: {} }; function requestPermission() { if (typeof Notification !== "undefined" && "requestPermission" in Notification) { Notification.requestPermission(); } else if ("webkitNotifications" in window) { window.webkitNotifications.requestPermission(); } } var Notification = window.Notification; var _notify = function notify(title, options, onclick, onclose) { if ("Notification" in window) { _notify = function notify(title, options, onclick, onclose) { var notice = new Notification(title, options); if ("NotificationEvent" in window) { notice.addEventListener("notificationclick", onclick); notice.addEventListener("close", onclose); } else if ("addEventListener" in notice) { notice.addEventListener("click", onclick); notice.addEventListener("close", onclose); } else { notice.onclick = onclick; notice.onclose = onclose; } return notice; }; } else if ("mozNotification" in navigator) { _notify = function notify(title, options, onclick, onclose) { var notice = navigator.mozNotification.createNotification(title, options.body, options.icon).show(); notice.onclick = onclick; notice.onclose = onclose; return notice; }; } else if ("webkitNotifications" in window) { _notify = function notify(title, options, onclick, onclose) { var notice = window.webkitNotifications.createNotification(options.icon, title, options.body); notice.onclick = onclick; notice.onclose = onclose; return notice; }; } else { _notify = function notify(title, options, onclick, onclose) { return null; }; } return _notify(title, options, onclick, onclose); }; function checkPermission() { if (typeof Notification !== "undefined" && "permission" in Notification) { return Notification.permission === "granted"; } else if ("webkitNotifications" in window) { return window.webkitNotifications.checkPermission() == 0; } return false; } var _permission = checkPermission(); function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$fallback = $$props.fallback, fallback = _$$props$fallback === void 0 ? defaults.fallback : _$$props$fallback; var _$$props$icon = $$props.icon, icon = _$$props$icon === void 0 ? defaults.icon : _$$props$icon; var _$$props$tag = $$props.tag, tag = _$$props$tag === void 0 ? defaults.tag : _$$props$tag; var _$$props$title = $$props.title, title = _$$props$title === void 0 ? defaults.title : _$$props$title; var _$$props$text = $$props.text, text = _$$props$text === void 0 ? defaults.text : _$$props$text; var _$$props$options = $$props.options, options = _$$props$options === void 0 ? defaults.options : _$$props$options; var _desktop; var _oldAnimation = "none"; var _icon; var _tag; self.on("pnotify:beforeOpen", function () { if (!_permission) { requestPermission(); return; } if (_desktop && "show" in _desktop) { self.setModuleOpen(true); _desktop.show(); } }); self.on("pnotify:beforeClose", function () { if (!_permission) { return; } if (_desktop && "close" in _desktop) { _desktop.close(); self.setModuleOpen(false); } }); _permission = checkPermission(); if (_permission) { self.addModuleClass("elem", "pnotify-desktop-hide"); self.animation = "none"; genNotice(); } else if (!fallback) { self.autoOpen = false; } function genNotice() { if (icon === null) { switch (self.type) { case "error": _icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQg7e6HvQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAABr0lEQVRYw8WXu0oDQRSGv7hRSFYrLTTWKihaqUgUJO+gphBLL1jYpPSCVcAggpWthYhC7Ows9An0IbSPkMRCw8ZmFuI6yczs9cAPuzNz5v92brtrESxGARtokkCcAg2hk7jNl4G2R/m4zFPAiwTgWdRFHnmJuaulOAAaPQDqUZvv9DB3tR0lwIcGwHtU5uca5q4qYZvngJbHpAZ8CtU8dS1gLEyAisegBGTFKWiL65KnzVlY5uOSId6VtNuTtMupOu/TAHiQlNmSskHNXCOAGWBeUp7VhFoApoMAXAOWJoCszBJ9+ALY6vL0JiPgjsKmKUAaOOoBZwIAcNxlJLsCrAOTIQJMAWu62y4LOIqT7lGS96TIcYCMDkBZ46h1gB+PHI28ssq8X/G6DaqG8Piz2DrjVjGXbtSBy46F5QAHwJAizwZugKKscs7gSaqS/KpB/qxsFxwafhf6Odb/eblJi8BGwJdW26BtURxQpMU83hmaDQsNiPtvYMSwj3tgAqDgYzU7wJdHjo9+CgBvEW47lV5Tgj5DMtG0xIfESkIAF+522gdWxTzGEX3i9+6KpOMXF5UBt0NKJCAAAAAASUVORK5CYII="; break; case "success": _icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQPRj+65AAAAdBJREFUWMPtlzsvRFEQx3+7HmEjoiYKolVJJDRqnS8ggvVIVEQhCIUsEYJGCEH2E4h4FPREaLTbEo1IEJXHrmY2GTf33nPuY7ud5OTenTMz//89Z86ZWShLWf5LB3AOfACFiOMF2AkC3qOc88BXxFEAxlX8ftGdaNCEen8H6oFHYBR4FocwkpTngzzHgF01fwL0aYcp9fVtMW/rsMcWXWijK1Hexgye9smRT6CxaHgjytMYwccNSXqoja9FeVbiZS+OVaeDiUBLAPAJA/i2m5MXgRSQk7llC/DBMOBeBGqAe0eAjQhfvurH3EmgQk6EW6CVEHt+ZFo6J4EU8OoTcF35jhnAl2wSx20LFgyB1yyOWtY2c72ScMAAkPeZy6g4zUBdGAIAcyEq4Z7y7xbdTFgCACMBwPVJqVDHeNqvaplkH5i0sNuUwmaNkQxww20ZSOy7gFvX7SAk0i76jPQQlJoAwAEwq35ngfmwVatSdUMArZZ+K9JQ1Bp6iGqgSt7f/AIOqSzujLEn6AV+JG6zm4HuCZ+AJuAbWAQu5aIJu7JDck0ngDugC/j1c2qPqR13jpxuvWyS8liY/kQcean/lX6ACQ99DdAQYe+Lf0zylMUgf7qDKgzv284QAAAAAElFTkSuQmCC"; break; case "info": _icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATQ09zRTwAAAAdxJREFUWMPtl88rRFEUxz8zBolRCgsrpOym8TMSO2WplLKwUrKi/B0W7JSFmhVLNlhSlLKx8CtRGpEsJpofpZk3Nkc9b968e++8mdlw6vTeu/edc773nl/3wl+ngOH/zUAf0AN0AmEgB7wCD8AtcFMJoM3ADpAHLHk62RIwL8B0uQwHgXVRnDfkS2DSj/EW4K0Ew05eLMV4O/CuUJwEUvJUgdgwMd4IpBUKl13kVG6aL+ZjJ20DDQqQXy5jKYVMDBhVrb5f069LLrKfGnInqh040HRTvsTAHgei9oGQ7X0YaNNUNCdFKChgQvKtQ1vAkNvEahlSToez9oXad2BCA30ceHZxRxMQMShuvZLmv+hOA32/h+KUwS7MugVhqwb6Go+5nEEwht0ABDUEzyXdFsrQYwqMJjTbdxio9Qkg6QbgvkpnkLw0uQIAZ1UCYNkXawdw4qPCmVBcuADAMZCpAoCVYr3AKtYyHZSWauakjMx50TWwrzJw6lFARjQOt3se8jM6W9TloSCqIb9bRHbN5Fg+KkEZcow/Ak+KFBsD6h3jR8CUabAMlqn7xfxEbAdwWKLhhO3sGPCbOsNSvSyF0Z/5TaCuEleziLhmAOiWG1NWrmZXwIVU1A/+SZO+AcgLC4wt0zD3AAAAAElFTkSuQmCC"; break; case "notice": default: _icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQJATM4scOJLAAAAcxJREFUWMPtljtLA0EQx3+J0QRfnYqCiCA+MERBrIwgFtoFbMTOR61i5QcQBdEihZWNoEWwsNAvkMJeBLHRQtHC0iIP4utOmw2cx97d7l2SRgcGbufmv/Pf2dmdhb8uIR+YJqAPaBff30AeeAHuxLgqMgRkgS/AAEybGuLfEdBcycCTwKVYmY5mgO6gwdd8BLaqAST9Bs8EDG7VTd3gex4TbgEjwKjQOHDugZlRDb7sMZEJpCS4bYVMJOygsG1cB+wqHN0Gib1RYXFpLwL74nx7Sb3EFlXATQNjTgRagA3FbZIRiCliT5wITGgUaRACA0CPjMC4xtUcDUAgDAzLCCQ0MhALQCAE9MoIdGkQCJIBgE4ZgWiNMvDL10qgUMMMFGQEnjQmkLXbVg38s8y4qtFcTCAnHiJ5oKiJnSoHjVgIXAmHkGIl5yy+YcWruIy9dvqpupIDCfZWEXvh1gsWFVfxIbG9a3RbRwJnYiuqJYfAqxsBgBWFiQyJzfTAlIB1uzEicbwBFoBTl8lSwINoSuXKjrv4F4FBh61zlKUKvgn7/e5ZEngMEDgLdFSieHaAT42LpgTMVbqC24B54Bi4twV9E6cnDcw6PFj+RSo/l6rlSlldhx4AAAAASUVORK5CYII="; break; } } else if (icon === false) { _icon = null; } else { _icon = icon; } if (!_tag || tag !== null) { _tag = tag === null ? "PNotify-".concat(Math.round(Math.random() * 1000000)) : tag; } var desktopOptions = { body: text || self.text, tag: _tag }; if (!self.hide) { desktopOptions.requireInteraction = true; } if (_icon !== null) { desktopOptions.icon = _icon; } Object.apply(desktopOptions, options); _desktop = _notify(title || self.title, desktopOptions, function () { self.fire && self.fire("click", { target: _desktop }); }, function () { self.close && self.close(); }); if (!("close" in _desktop) && "cancel" in _desktop) { _desktop.close = function () { _desktop.cancel(); }; } } $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(0, self = $$props.self); if ("fallback" in $$props) $$invalidate(1, fallback = $$props.fallback); if ("icon" in $$props) $$invalidate(2, icon = $$props.icon); if ("tag" in $$props) $$invalidate(3, tag = $$props.tag); if ("title" in $$props) $$invalidate(4, title = $$props.title); if ("text" in $$props) $$invalidate(5, text = $$props.text); if ("options" in $$props) $$invalidate(6, options = $$props.options); }; $$self.$$.update = function () { if ($$self.$$.dirty & 257) { { if (self.animation !== "none") { $$invalidate(8, _oldAnimation = self.animation); } if (self.getAnimatingClass() !== "" && _permission) { self.setAnimatingClass(""); } if (!_permission && self.hasModuleClass("elem", "pnotify-desktop-hide")) { self.removeModuleClass("elem", "pnotify-desktop-hide"); $$invalidate(0, self.animation = _oldAnimation, self); } else if (_permission && !self.hasModuleClass("elem", "pnotify-desktop-hide")) { self.addModuleClass("elem", "pnotify-desktop-hide"); $$invalidate(0, self.animation = "none", self); genNotice(); } } } if ($$self.$$.dirty & 1) { { self.setModuleHandled(_permission); } } }; return [self, fallback, icon, tag, title, text, options]; } var Desktop = function (_SvelteComponent) { _inherits(Desktop, _SvelteComponent); var _super = _createSuper(Desktop); function Desktop(options) { var _this; _classCallCheck(this, Desktop); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, null, safe_not_equal, { self: 0, fallback: 1, icon: 2, tag: 3, title: 4, text: 5, options: 6 }); return _this; } return Desktop; }(SvelteComponent); exports.default = Desktop; exports.defaults = defaults; exports.permission = requestPermission; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyDesktop.js end*/ /*PNotifyConfirm.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyConfirm = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function destroy_each(iterations, detaching) { for (var i = 0; i < iterations.length; i += 1) { if (iterations[i]) iterations[i].d(detaching); } } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function empty() { return text(''); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return function () { return node.removeEventListener(event, handler, options); }; } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function set_data(text, data) { data = '' + data; if (text.wholeText !== data) text.data = data; } function set_input_value(input, value) { input.value = value == null ? '' : value; } var HtmlTag = /*#__PURE__*/function () { function HtmlTag() { var anchor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; _classCallCheck(this, HtmlTag); this.a = anchor; this.e = this.n = null; } _createClass(HtmlTag, [{ key: "m", value: function m(html, target) { var anchor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; if (!this.e) { this.e = element(target.nodeName); this.t = target; this.h(html); } this.i(anchor); } }, { key: "h", value: function h(html) { this.e.innerHTML = html; this.n = Array.from(this.e.childNodes); } }, { key: "i", value: function i(anchor) { for (var i = 0; i < this.n.length; i += 1) { insert(this.t, this.n[i], anchor); } } }, { key: "p", value: function p(html) { this.d(); this.h(html); this.i(this.a); } }, { key: "d", value: function d() { this.n.forEach(detach); } }]); return HtmlTag; }(); var current_component; function set_current_component(component) { current_component = component; } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { // first, call beforeUpdate functions // and update components for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, // state props: props, update: noop, not_equal: not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = /*#__PURE__*/function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); function get_each_context(ctx, list, i) { var child_ctx = ctx.slice(); child_ctx[21] = list[i]; return child_ctx; } // (107:0) {#if confirm || prompt} function create_if_block(ctx) { var div1; var t; var div0; var div0_class_value; var div0_style_value; var div1_class_value; var if_block = /*prompt*/ ctx[3] && create_if_block_2(ctx); var each_value = /*buttons*/ ctx[7]; var each_blocks = []; for (var i = 0; i < each_value.length; i += 1) { each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i)); } return { c: function c() { div1 = element("div"); if (if_block) if_block.c(); t = space(); div0 = element("div"); for (var _i = 0; _i < each_blocks.length; _i += 1) { each_blocks[_i].c(); } attr(div0, "class", div0_class_value = "pnotify-action-bar ".concat( /*self*/ ctx[1].getStyle("action-bar"))); attr(div0, "style", div0_style_value = "justify-content: ".concat( /*align*/ ctx[6], ";")); attr(div1, "class", div1_class_value = "pnotify-confirm ".concat( /*self*/ ctx[1].getStyle("text"), " ").concat( /*self*/ ctx[1].getStyle("confirm"))); }, m: function m(target, anchor) { insert(target, div1, anchor); if (if_block) if_block.m(div1, null); append(div1, t); append(div1, div0); for (var _i2 = 0; _i2 < each_blocks.length; _i2 += 1) { each_blocks[_i2].m(div0, null); } /*div0_binding*/ ctx[19](div0); }, p: function p(ctx, dirty) { if ( /*prompt*/ ctx[3]) { if (if_block) { if_block.p(ctx, dirty); } else { if_block = create_if_block_2(ctx); if_block.c(); if_block.m(div1, t); } } else if (if_block) { if_block.d(1); if_block = null; } if (dirty & /*self, buttons, handleClick*/ 2178) { each_value = /*buttons*/ ctx[7]; var _i3; for (_i3 = 0; _i3 < each_value.length; _i3 += 1) { var child_ctx = get_each_context(ctx, each_value, _i3); if (each_blocks[_i3]) { each_blocks[_i3].p(child_ctx, dirty); } else { each_blocks[_i3] = create_each_block(child_ctx); each_blocks[_i3].c(); each_blocks[_i3].m(div0, null); } } for (; _i3 < each_blocks.length; _i3 += 1) { each_blocks[_i3].d(1); } each_blocks.length = each_value.length; } if (dirty & /*self*/ 2 && div0_class_value !== (div0_class_value = "pnotify-action-bar ".concat( /*self*/ ctx[1].getStyle("action-bar")))) { attr(div0, "class", div0_class_value); } if (dirty & /*align*/ 64 && div0_style_value !== (div0_style_value = "justify-content: ".concat( /*align*/ ctx[6], ";"))) { attr(div0, "style", div0_style_value); } if (dirty & /*self*/ 2 && div1_class_value !== (div1_class_value = "pnotify-confirm ".concat( /*self*/ ctx[1].getStyle("text"), " ").concat( /*self*/ ctx[1].getStyle("confirm")))) { attr(div1, "class", div1_class_value); } }, d: function d(detaching) { if (detaching) detach(div1); if (if_block) if_block.d(); destroy_each(each_blocks, detaching); /*div0_binding*/ ctx[19](null); } }; } // (111:4) {#if prompt} function create_if_block_2(ctx) { var div; var div_class_value; function select_block_type(ctx, dirty) { if ( /*promptMultiLine*/ ctx[5]) return create_if_block_3; return create_else_block_1; } var current_block_type = select_block_type(ctx); var if_block = current_block_type(ctx); return { c: function c() { div = element("div"); if_block.c(); attr(div, "class", div_class_value = "pnotify-prompt-bar ".concat( /*self*/ ctx[1].getStyle("prompt-bar"))); }, m: function m(target, anchor) { insert(target, div, anchor); if_block.m(div, null); }, p: function p(ctx, dirty) { if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) { if_block.p(ctx, dirty); } else { if_block.d(1); if_block = current_block_type(ctx); if (if_block) { if_block.c(); if_block.m(div, null); } } if (dirty & /*self*/ 2 && div_class_value !== (div_class_value = "pnotify-prompt-bar ".concat( /*self*/ ctx[1].getStyle("prompt-bar")))) { attr(div, "class", div_class_value); } }, d: function d(detaching) { if (detaching) detach(div); if_block.d(); } }; } // (121:8) {:else} function create_else_block_1(ctx) { var input; var input_class_value; var mounted; var dispose; return { c: function c() { input = element("input"); attr(input, "type", "text"); attr(input, "class", input_class_value = "pnotify-prompt-input ".concat( /*self*/ ctx[1].getStyle("input"), " ").concat( /*promptClass*/ ctx[4])); }, m: function m(target, anchor) { insert(target, input, anchor); /*input_binding*/ ctx[16](input); set_input_value(input, /*promptValue*/ ctx[0]); if (!mounted) { dispose = [listen(input, "keypress", /*handleKeyPress*/ ctx[12]), listen(input, "input", /*input_input_handler*/ ctx[17])]; mounted = true; } }, p: function p(ctx, dirty) { if (dirty & /*self, promptClass*/ 18 && input_class_value !== (input_class_value = "pnotify-prompt-input ".concat( /*self*/ ctx[1].getStyle("input"), " ").concat( /*promptClass*/ ctx[4]))) { attr(input, "class", input_class_value); } if (dirty & /*promptValue*/ 1 && input.value !== /*promptValue*/ ctx[0]) { set_input_value(input, /*promptValue*/ ctx[0]); } }, d: function d(detaching) { if (detaching) detach(input); /*input_binding*/ ctx[16](null); mounted = false; run_all(dispose); } }; } // (113:8) {#if promptMultiLine} function create_if_block_3(ctx) { var textarea; var textarea_class_value; var mounted; var dispose; return { c: function c() { textarea = element("textarea"); attr(textarea, "rows", "5"); attr(textarea, "class", textarea_class_value = "pnotify-prompt-input ".concat( /*self*/ ctx[1].getStyle("input"), " ").concat( /*promptClass*/ ctx[4])); }, m: function m(target, anchor) { insert(target, textarea, anchor); /*textarea_binding*/ ctx[14](textarea); set_input_value(textarea, /*promptValue*/ ctx[0]); if (!mounted) { dispose = [listen(textarea, "keypress", /*handleKeyPress*/ ctx[12]), listen(textarea, "input", /*textarea_input_handler*/ ctx[15])]; mounted = true; } }, p: function p(ctx, dirty) { if (dirty & /*self, promptClass*/ 18 && textarea_class_value !== (textarea_class_value = "pnotify-prompt-input ".concat( /*self*/ ctx[1].getStyle("input"), " ").concat( /*promptClass*/ ctx[4]))) { attr(textarea, "class", textarea_class_value); } if (dirty & /*promptValue*/ 1) { set_input_value(textarea, /*promptValue*/ ctx[0]); } }, d: function d(detaching) { if (detaching) detach(textarea); /*textarea_binding*/ ctx[14](null); mounted = false; run_all(dispose); } }; } // (145:10) {:else} function create_else_block(ctx) { var t_value = /*button*/ ctx[21].text + ""; var t; return { c: function c() { t = text(t_value); }, m: function m(target, anchor) { insert(target, t, anchor); }, p: function p(ctx, dirty) { if (dirty & /*buttons*/ 128 && t_value !== (t_value = /*button*/ ctx[21].text + "")) set_data(t, t_value); }, d: function d(detaching) { if (detaching) detach(t); } }; } // (143:10) {#if button.textTrusted} function create_if_block_1(ctx) { var html_tag; var raw_value = /*button*/ ctx[21].text + ""; var html_anchor; return { c: function c() { html_anchor = empty(); html_tag = new HtmlTag(html_anchor); }, m: function m(target, anchor) { html_tag.m(raw_value, target, anchor); insert(target, html_anchor, anchor); }, p: function p(ctx, dirty) { if (dirty & /*buttons*/ 128 && raw_value !== (raw_value = /*button*/ ctx[21].text + "")) html_tag.p(raw_value); }, d: function d(detaching) { if (detaching) detach(html_anchor); if (detaching) html_tag.d(); } }; } // (137:6) {#each buttons as button} function create_each_block(ctx) { var button; var t; var button_class_value; var mounted; var dispose; function select_block_type_1(ctx, dirty) { if ( /*button*/ ctx[21].textTrusted) return create_if_block_1; return create_else_block; } var current_block_type = select_block_type_1(ctx); var if_block = current_block_type(ctx); function click_handler() { var _ctx; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return ( /*click_handler*/ (_ctx = ctx)[18].apply(_ctx, [ /*button*/ ctx[21]].concat(args)) ); } return { c: function c() { button = element("button"); if_block.c(); t = space(); attr(button, "type", "button"); attr(button, "class", button_class_value = "pnotify-action-button ".concat( /*self*/ ctx[1].getStyle("btn"), " ").concat( /*button*/ ctx[21].primary ? /*self*/ ctx[1].getStyle("btn-primary") : /*self*/ ctx[1].getStyle("btn-secondary"), " ").concat( /*button*/ ctx[21].addClass ? /*button*/ ctx[21].addClass : "")); }, m: function m(target, anchor) { insert(target, button, anchor); if_block.m(button, null); append(button, t); if (!mounted) { dispose = listen(button, "click", click_handler); mounted = true; } }, p: function p(new_ctx, dirty) { ctx = new_ctx; if (current_block_type === (current_block_type = select_block_type_1(ctx)) && if_block) { if_block.p(ctx, dirty); } else { if_block.d(1); if_block = current_block_type(ctx); if (if_block) { if_block.c(); if_block.m(button, t); } } if (dirty & /*self, buttons*/ 130 && button_class_value !== (button_class_value = "pnotify-action-button ".concat( /*self*/ ctx[1].getStyle("btn"), " ").concat( /*button*/ ctx[21].primary ? /*self*/ ctx[1].getStyle("btn-primary") : /*self*/ ctx[1].getStyle("btn-secondary"), " ").concat( /*button*/ ctx[21].addClass ? /*button*/ ctx[21].addClass : ""))) { attr(button, "class", button_class_value); } }, d: function d(detaching) { if (detaching) detach(button); if_block.d(); mounted = false; dispose(); } }; } function create_fragment(ctx) { var if_block_anchor; var if_block = ( /*confirm*/ ctx[2] || /*prompt*/ ctx[3]) && create_if_block(ctx); return { c: function c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, m: function m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, p: function p(ctx, _ref) { var _ref2 = _slicedToArray(_ref, 1), dirty = _ref2[0]; if ( /*confirm*/ ctx[2] || /*prompt*/ ctx[3]) { if (if_block) { if_block.p(ctx, dirty); } else { if_block = create_if_block(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } } else if (if_block) { if_block.d(1); if_block = null; } }, i: noop, o: noop, d: function d(detaching) { if (if_block) if_block.d(detaching); if (detaching) detach(if_block_anchor); } }; } var position = "AppendContent"; var defaults = { confirm: false, prompt: false, promptClass: "", promptValue: "", promptMultiLine: false, focus: null, align: "flex-end", buttons: [{ text: "Ok", primary: true, promptTrigger: true, click: function click(notice, value) { notice.close(); notice.fire("pnotify:confirm", { notice: notice, value: value }); } }, { text: "Cancel", click: function click(notice) { notice.close(); notice.fire("pnotify:cancel", { notice: notice }); } }] }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$confirm = $$props.confirm, confirm = _$$props$confirm === void 0 ? defaults.confirm : _$$props$confirm; var _$$props$prompt = $$props.prompt, prompt = _$$props$prompt === void 0 ? defaults.prompt : _$$props$prompt; var _$$props$promptClass = $$props.promptClass, promptClass = _$$props$promptClass === void 0 ? defaults.promptClass : _$$props$promptClass; var _$$props$promptValue = $$props.promptValue, promptValue = _$$props$promptValue === void 0 ? defaults.promptValue : _$$props$promptValue; var _$$props$promptMultiL = $$props.promptMultiLine, promptMultiLine = _$$props$promptMultiL === void 0 ? defaults.promptMultiLine : _$$props$promptMultiL; var _$$props$focus = $$props.focus, focus = _$$props$focus === void 0 ? defaults.focus : _$$props$focus; var _$$props$align = $$props.align, align = _$$props$align === void 0 ? defaults.align : _$$props$align; var _$$props$buttons = $$props.buttons, buttons = _$$props$buttons === void 0 ? defaults.buttons : _$$props$buttons; var promptMultiElem; var promptSingleElem; var buttonsElem; var focusNextChange = false; self.on("pnotify:afterOpen", function () { $$invalidate(20, focusNextChange = true); }); function handleClick(button, event) { if (button.click) { button.click(self, prompt ? promptValue : null, event); } } function handleKeyPress(event) { if (event.keyCode === 13 && !event.shiftKey) { event.preventDefault(); var _this$get = this.get(), _buttons = _this$get.buttons; for (var i = 0; i < _buttons.length; i++) { if (_buttons[i].promptTrigger && _buttons[i].click) { _buttons[i].click(self, prompt ? promptValue : null, event); } } } } function textarea_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { promptMultiElem = $$value; $$invalidate(8, promptMultiElem); }); } function textarea_input_handler() { promptValue = this.value; $$invalidate(0, promptValue); } function input_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { promptSingleElem = $$value; $$invalidate(9, promptSingleElem); }); } function input_input_handler() { promptValue = this.value; $$invalidate(0, promptValue); } var click_handler = function click_handler(button, event) { return handleClick(button, event); }; function div0_binding($$value) { binding_callbacks[$$value ? "unshift" : "push"](function () { buttonsElem = $$value; $$invalidate(10, buttonsElem); }); } $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(1, self = $$props.self); if ("confirm" in $$props) $$invalidate(2, confirm = $$props.confirm); if ("prompt" in $$props) $$invalidate(3, prompt = $$props.prompt); if ("promptClass" in $$props) $$invalidate(4, promptClass = $$props.promptClass); if ("promptValue" in $$props) $$invalidate(0, promptValue = $$props.promptValue); if ("promptMultiLine" in $$props) $$invalidate(5, promptMultiLine = $$props.promptMultiLine); if ("focus" in $$props) $$invalidate(13, focus = $$props.focus); if ("align" in $$props) $$invalidate(6, align = $$props.align); if ("buttons" in $$props) $$invalidate(7, buttons = $$props.buttons); }; $$self.$$.update = function () { if ($$self.$$.dirty & /*focusNextChange, prompt, focus, promptMultiLine, promptMultiElem, promptSingleElem, confirm, self, buttons, buttonsElem*/ 1058734) { { if (focusNextChange) { if (prompt && focus !== false) { if (promptMultiLine) { if (promptMultiElem) { promptMultiElem.focus(); $$invalidate(20, focusNextChange = false); } } else { if (promptSingleElem) { promptSingleElem.focus(); $$invalidate(20, focusNextChange = false); } } } else if (confirm && (focus === true || focus === null && self.stack.modal === true)) { if (buttons.length && buttonsElem) { var i = buttons.length - 1; while (i > 0) { if (buttons[i].promptTrigger) { break; } i--; } buttonsElem.children[i].focus(); $$invalidate(20, focusNextChange = false); } } } } } }; return [promptValue, self, confirm, prompt, promptClass, promptMultiLine, align, buttons, promptMultiElem, promptSingleElem, buttonsElem, handleClick, handleKeyPress, focus, textarea_binding, textarea_input_handler, input_binding, input_input_handler, click_handler, div0_binding]; } var Confirm = /*#__PURE__*/function (_SvelteComponent) { _inherits(Confirm, _SvelteComponent); var _super = _createSuper(Confirm); function Confirm(options) { var _this; _classCallCheck(this, Confirm); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { self: 1, confirm: 2, prompt: 3, promptClass: 4, promptValue: 0, promptMultiLine: 5, focus: 13, align: 6, buttons: 7 }); return _this; } return Confirm; }(SvelteComponent); exports.default = Confirm; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyConfirm.js end*/ /*PNotifyCountdown.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyCountdown = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function empty() { return text(''); } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { // first, call beforeUpdate functions // and update components for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } // then, once components are updated, call // afterUpdate functions. This may cause // subsequent updates... for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { // ...so guard against infinite loops seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); // onMount happens before the initial afterUpdate add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { // Edge case - component was destroyed immediately, // most likely as a result of a binding initialising run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); // TODO null out other refs, including component.$$ (but need to // preserve final state?) $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, // state props: props, update: noop, not_equal: not_equal, bound: blank_object(), // lifecycle on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), // everything else callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); // `false` as a special case of no DOM component $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = /*#__PURE__*/function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); function create_if_block(ctx) { var div1; var div0; var div0_class_value; var div0_style_value; var div1_class_value; return { c: function c() { div1 = element("div"); div0 = element("div"); attr(div0, "class", div0_class_value = "pnotify-countdown-bar ".concat( /*self*/ ctx[0].getStyle("countdown-bar"))); attr(div0, "style", div0_style_value = "height: ".concat( /*anchor*/ ctx[1] === "right" || /*anchor*/ ctx[1] === "left" ? /*_percent*/ ctx[3] : "100", "%; width: ").concat( /*anchor*/ ctx[1] === "top" || /*anchor*/ ctx[1] === "bottom" ? /*_percent*/ ctx[3] : "100", "%;")); attr(div1, "class", div1_class_value = "pnotify-countdown pnotify-countdown-".concat( /*anchor*/ ctx[1], " ").concat( /*reverse*/ ctx[2] ? "pnotify-countdown-reverse" : "", " ").concat( /*self*/ ctx[0].getStyle("countdown"))); }, m: function m(target, anchor) { insert(target, div1, anchor); append(div1, div0); }, p: function p(ctx, dirty) { if (dirty & /*self*/ 1 && div0_class_value !== (div0_class_value = "pnotify-countdown-bar ".concat( /*self*/ ctx[0].getStyle("countdown-bar")))) { attr(div0, "class", div0_class_value); } if (dirty & /*anchor, _percent*/ 10 && div0_style_value !== (div0_style_value = "height: ".concat( /*anchor*/ ctx[1] === "right" || /*anchor*/ ctx[1] === "left" ? /*_percent*/ ctx[3] : "100", "%; width: ").concat( /*anchor*/ ctx[1] === "top" || /*anchor*/ ctx[1] === "bottom" ? /*_percent*/ ctx[3] : "100", "%;"))) { attr(div0, "style", div0_style_value); } if (dirty & /*anchor, reverse, self*/ 7 && div1_class_value !== (div1_class_value = "pnotify-countdown pnotify-countdown-".concat( /*anchor*/ ctx[1], " ").concat( /*reverse*/ ctx[2] ? "pnotify-countdown-reverse" : "", " ").concat( /*self*/ ctx[0].getStyle("countdown")))) { attr(div1, "class", div1_class_value); } }, d: function d(detaching) { if (detaching) detach(div1); } }; } function create_fragment(ctx) { var if_block_anchor; var if_block = /*showCountdown*/ ctx[4] && create_if_block(ctx); return { c: function c() { if (if_block) if_block.c(); if_block_anchor = empty(); }, m: function m(target, anchor) { if (if_block) if_block.m(target, anchor); insert(target, if_block_anchor, anchor); }, p: function p(ctx, _ref) { var _ref2 = _slicedToArray(_ref, 1), dirty = _ref2[0]; if ( /*showCountdown*/ ctx[4]) { if (if_block) { if_block.p(ctx, dirty); } else { if_block = create_if_block(ctx); if_block.c(); if_block.m(if_block_anchor.parentNode, if_block_anchor); } } else if (if_block) { if_block.d(1); if_block = null; } }, i: noop, o: noop, d: function d(detaching) { if (if_block) if_block.d(detaching); if (detaching) detach(if_block_anchor); } }; } var position = "AppendContainer"; var defaults = { anchor: "bottom", reverse: false }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$anchor = $$props.anchor, anchor = _$$props$anchor === void 0 ? defaults.anchor : _$$props$anchor; var _$$props$reverse = $$props.reverse, reverse = _$$props$reverse === void 0 ? defaults.reverse : _$$props$reverse; var _state = self.getState(); var _timer = self.getTimer(); var _msLeft = 0; var _percent = 100; var ival; var offUpdate; var offAfterOpen; var getValues = function getValues() { $$invalidate(5, _state = self.getState()); $$invalidate(6, _timer = self.getTimer()); }; onMount(function () { offUpdate = self.on("pnotify:update", getValues); offAfterOpen = self.on("pnotify:afterOpen", getValues); ival = setInterval(function () { if (showCountdown) { if (timeStart) { _msLeft = self.delay - (new Date() - timeStart); $$invalidate(3, _percent = _msLeft / self.delay * 100); } else { $$invalidate(3, _percent = _state === "closing" ? 0 : 100); } } }, 100); }); onDestroy(function () { offUpdate && offUpdate(); offAfterOpen && offAfterOpen(); clearInterval(ival); }); $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(0, self = $$props.self); if ("anchor" in $$props) $$invalidate(1, anchor = $$props.anchor); if ("reverse" in $$props) $$invalidate(2, reverse = $$props.reverse); }; var showCountdown; var timeStart; $$self.$$.update = function () { if ($$self.$$.dirty & /*_state, self*/ 33) { $$invalidate(4, showCountdown = ["opening", "open", "closing"].indexOf(_state) !== -1 && self.hide && self.delay !== Infinity); } if ($$self.$$.dirty & /*showCountdown, _timer*/ 80) { timeStart = showCountdown && _timer && _timer !== "prevented" ? new Date() : null; } if ($$self.$$.dirty & /*self, showCountdown, anchor*/ 19) { { self.removeModuleClass("elem", "pnotify-with-countdown", "pnotify-with-countdown-bottom", "pnotify-with-countdown-top", "pnotify-with-countdown-left", "pnotify-with-countdown-right"); if (showCountdown) { self.addModuleClass("elem", "pnotify-with-countdown", "pnotify-with-countdown-".concat(anchor)); } } } }; return [self, anchor, reverse, _percent, showCountdown]; } var Countdown = /*#__PURE__*/function (_SvelteComponent) { _inherits(Countdown, _SvelteComponent); var _super = _createSuper(Countdown); function Countdown(options) { var _this; _classCallCheck(this, Countdown); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { self: 0, anchor: 1, reverse: 2 }); return _this; } return Countdown; }(SvelteComponent); exports.default = Countdown; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyCountdown.js end*/ /*PNotifyPaginate.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyPaginate = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return function () { return node.removeEventListener(event, handler, options); }; } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function set_data(text, data) { data = '' + data; if (text.wholeText !== data) text.data = data; } var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function onMount(fn) { get_current_component().$$.on_mount.push(fn); } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, props: props, update: noop, not_equal: not_equal, bound: blank_object(), on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); function create_if_block_1(ctx) { var div2; var div0; var div0_tabindex_value; var div0_aria_disabled_value; var div0_class_value; var div0_title_value; var t; var div1; var div1_tabindex_value; var div1_aria_disabled_value; var div1_class_value; var div1_title_value; var div2_class_value; var mounted; var dispose; return { c: function c() { div2 = element("div"); div0 = element("div"); t = space(); div1 = element("div"); attr(div0, "role", "button"); attr(div0, "tabindex", div0_tabindex_value = ctx[4] === 1 ? "-1" : "0"); attr(div0, "aria-disabled", div0_aria_disabled_value = ctx[4] === 1); attr(div0, "class", div0_class_value = "pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn"), " ").concat(ctx[0].getStyle("paginate-previous"))); attr(div0, "title", div0_title_value = ctx[3].previous); attr(div1, "role", "button"); attr(div1, "tabindex", div1_tabindex_value = ctx[4] === ctx[5] ? "-1" : "0"); attr(div1, "aria-disabled", div1_aria_disabled_value = ctx[4] === ctx[5]); attr(div1, "class", div1_class_value = "pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn"), " ").concat(ctx[0].getStyle("paginate-next"))); attr(div1, "title", div1_title_value = ctx[3].next); attr(div2, "class", div2_class_value = "pnotify-paginate-buttons ".concat(ctx[0].getStyle("paginate-buttons"))); }, m: function m(target, anchor) { insert(target, div2, anchor); append(div2, div0); append(div2, t); append(div2, div1); if (!mounted) { dispose = [listen(div0, "click", ctx[10]), listen(div1, "click", ctx[11])]; mounted = true; } }, p: function p(ctx, dirty) { if (dirty & 16 && div0_tabindex_value !== (div0_tabindex_value = ctx[4] === 1 ? "-1" : "0")) { attr(div0, "tabindex", div0_tabindex_value); } if (dirty & 16 && div0_aria_disabled_value !== (div0_aria_disabled_value = ctx[4] === 1)) { attr(div0, "aria-disabled", div0_aria_disabled_value); } if (dirty & 1 && div0_class_value !== (div0_class_value = "pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn"), " ").concat(ctx[0].getStyle("paginate-previous")))) { attr(div0, "class", div0_class_value); } if (dirty & 8 && div0_title_value !== (div0_title_value = ctx[3].previous)) { attr(div0, "title", div0_title_value); } if (dirty & 48 && div1_tabindex_value !== (div1_tabindex_value = ctx[4] === ctx[5] ? "-1" : "0")) { attr(div1, "tabindex", div1_tabindex_value); } if (dirty & 48 && div1_aria_disabled_value !== (div1_aria_disabled_value = ctx[4] === ctx[5])) { attr(div1, "aria-disabled", div1_aria_disabled_value); } if (dirty & 1 && div1_class_value !== (div1_class_value = "pnotify-paginate-button ".concat(ctx[0].getStyle("paginate-btn"), " ").concat(ctx[0].getStyle("paginate-next")))) { attr(div1, "class", div1_class_value); } if (dirty & 8 && div1_title_value !== (div1_title_value = ctx[3].next)) { attr(div1, "title", div1_title_value); } if (dirty & 1 && div2_class_value !== (div2_class_value = "pnotify-paginate-buttons ".concat(ctx[0].getStyle("paginate-buttons")))) { attr(div2, "class", div2_class_value); } }, d: function d(detaching) { if (detaching) detach(div2); mounted = false; run_all(dispose); } }; } function create_if_block(ctx) { var div; var span0; var t0; var span0_class_value; var t1; var span1; var t2_value = ctx[3].of + ""; var t2; var span1_class_value; var t3; var span2; var t4; var span2_class_value; var div_class_value; return { c: function c() { div = element("div"); span0 = element("span"); t0 = text(ctx[4]); t1 = space(); span1 = element("span"); t2 = text(t2_value); t3 = space(); span2 = element("span"); t4 = text(ctx[5]); attr(span0, "class", span0_class_value = "pnotify-paginate-count-current ".concat(ctx[0].getStyle("paginate-count-current"))); attr(span1, "class", span1_class_value = "pnotify-paginate-count-of ".concat(ctx[0].getStyle("paginate-count-of"))); attr(span2, "class", span2_class_value = "pnotify-paginate-count-total ".concat(ctx[0].getStyle("paginate-count-total"))); attr(div, "class", div_class_value = "pnotify-paginate-count ".concat(ctx[0].getStyle("paginate-count"))); }, m: function m(target, anchor) { insert(target, div, anchor); append(div, span0); append(span0, t0); append(div, t1); append(div, span1); append(span1, t2); append(div, t3); append(div, span2); append(span2, t4); }, p: function p(ctx, dirty) { if (dirty & 16) set_data(t0, ctx[4]); if (dirty & 1 && span0_class_value !== (span0_class_value = "pnotify-paginate-count-current ".concat(ctx[0].getStyle("paginate-count-current")))) { attr(span0, "class", span0_class_value); } if (dirty & 8 && t2_value !== (t2_value = ctx[3].of + "")) set_data(t2, t2_value); if (dirty & 1 && span1_class_value !== (span1_class_value = "pnotify-paginate-count-of ".concat(ctx[0].getStyle("paginate-count-of")))) { attr(span1, "class", span1_class_value); } if (dirty & 32) set_data(t4, ctx[5]); if (dirty & 1 && span2_class_value !== (span2_class_value = "pnotify-paginate-count-total ".concat(ctx[0].getStyle("paginate-count-total")))) { attr(span2, "class", span2_class_value); } if (dirty & 1 && div_class_value !== (div_class_value = "pnotify-paginate-count ".concat(ctx[0].getStyle("paginate-count")))) { attr(div, "class", div_class_value); } }, d: function d(detaching) { if (detaching) detach(div); } }; } function create_fragment(ctx) { var div; var t; var div_class_value; var if_block0 = ctx[1] && create_if_block_1(ctx); var if_block1 = ctx[2] && create_if_block(ctx); return { c: function c() { div = element("div"); if (if_block0) if_block0.c(); t = space(); if (if_block1) if_block1.c(); attr(div, "class", div_class_value = "pnotify-paginate ".concat(ctx[0].getStyle("paginate"))); }, m: function m(target, anchor) { insert(target, div, anchor); if (if_block0) if_block0.m(div, null); append(div, t); if (if_block1) if_block1.m(div, null); }, p: function p(ctx, _ref) { var _ref2 = _slicedToArray(_ref, 1), dirty = _ref2[0]; if (ctx[1]) { if (if_block0) { if_block0.p(ctx, dirty); } else { if_block0 = create_if_block_1(ctx); if_block0.c(); if_block0.m(div, t); } } else if (if_block0) { if_block0.d(1); if_block0 = null; } if (ctx[2]) { if (if_block1) { if_block1.p(ctx, dirty); } else { if_block1 = create_if_block(ctx); if_block1.c(); if_block1.m(div, null); } } else if (if_block1) { if_block1.d(1); if_block1 = null; } if (dirty & 1 && div_class_value !== (div_class_value = "pnotify-paginate ".concat(ctx[0].getStyle("paginate")))) { attr(div, "class", div_class_value); } }, i: noop, o: noop, d: function d(detaching) { if (detaching) detach(div); if (if_block0) if_block0.d(); if (if_block1) if_block1.d(); } }; } var position = "PrependContainer"; var defaults = { buttons: true, count: true, immediateTransition: true, waiting: true, labels: { previous: "Previous", next: "Next", of: "of" } }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$buttons = $$props.buttons, buttons = _$$props$buttons === void 0 ? defaults.buttons : _$$props$buttons; var _$$props$count = $$props.count, count = _$$props$count === void 0 ? defaults.count : _$$props$count; var _$$props$immediateTra = $$props.immediateTransition, immediateTransition = _$$props$immediateTra === void 0 ? defaults.immediateTransition : _$$props$immediateTra; var _$$props$waiting = $$props.waiting, waiting = _$$props$waiting === void 0 ? defaults.waiting : _$$props$waiting; var _$$props$labels = $$props.labels, labels = _$$props$labels === void 0 ? defaults.labels : _$$props$labels; var currentIndex; var stackLength; var handlerCallback = function handlerCallback() { $$invalidate(4, currentIndex = 0); try { self.stack.forEach(function (notice) { return $$invalidate(4, currentIndex++, currentIndex); }, { start: self, dir: "prev" }); } catch (e) { if (e.message !== "Invalid start param.") { throw e; } } $$invalidate(5, stackLength = self.stack.length); }; var addHandlerOff; var removeHandlerOff; var beforeOpenHandlerOff; onMount(function () { handlerCallback(); addHandlerOff = self.stack.on("afterAddNotice", handlerCallback); removeHandlerOff = self.stack.on("afterRemoveNotice", handlerCallback); beforeOpenHandlerOff = self.on("beforeOpen", handlerCallback); }); onDestroy(function () { addHandlerOff(); removeHandlerOff(); beforeOpenHandlerOff(); }); function handleNext() { self.stack.forEach(function (notice) { if (notice !== self && (notice.getState() === "waiting" || !waiting && notice.getState() === "closed")) { self.stack.swap(self, notice, immediateTransition, waiting); return false; } }, { start: self, dir: "next" }); } function handlePrevious() { self.stack.forEach(function (notice) { if (notice !== self && notice.getState() === "waiting") { self.stack.swap(self, notice, immediateTransition, true); return false; } }, { start: self, dir: "prev" }); } var click_handler = function click_handler(event) { return handlePrevious(); }; var click_handler_1 = function click_handler_1(event) { return handleNext(); }; $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(0, self = $$props.self); if ("buttons" in $$props) $$invalidate(1, buttons = $$props.buttons); if ("count" in $$props) $$invalidate(2, count = $$props.count); if ("immediateTransition" in $$props) $$invalidate(8, immediateTransition = $$props.immediateTransition); if ("waiting" in $$props) $$invalidate(9, waiting = $$props.waiting); if ("labels" in $$props) $$invalidate(3, labels = $$props.labels); }; return [self, buttons, count, labels, currentIndex, stackLength, handleNext, handlePrevious, immediateTransition, waiting, click_handler, click_handler_1]; } var Paginate = function (_SvelteComponent) { _inherits(Paginate, _SvelteComponent); var _super = _createSuper(Paginate); function Paginate(options) { var _this; _classCallCheck(this, Paginate); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { self: 0, buttons: 1, count: 2, immediateTransition: 8, waiting: 9, labels: 3 }); return _this; } return Paginate; }(SvelteComponent); exports.default = Paginate; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyPaginate.js end*/ /*PNotifyReference.js start*/ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PNotifyReference = {})); }(this, (function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () { })); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i]; return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function noop() { } function run(fn) { return fn(); } function blank_object() { return Object.create(null); } function run_all(fns) { fns.forEach(run); } function is_function(thing) { return typeof thing === 'function'; } function safe_not_equal(a, b) { return a != a ? b == b : a !== b || a && _typeof(a) === 'object' || typeof a === 'function'; } function is_empty(obj) { return Object.keys(obj).length === 0; } function null_to_empty(value) { return value == null ? '' : value; } function append(target, node) { target.appendChild(node); } function insert(target, node, anchor) { target.insertBefore(node, anchor || null); } function detach(node) { node.parentNode.removeChild(node); } function element(name) { return document.createElement(name); } function text(data) { return document.createTextNode(data); } function space() { return text(' '); } function listen(node, event, handler, options) { node.addEventListener(event, handler, options); return function () { return node.removeEventListener(event, handler, options); }; } function attr(node, attribute, value) { if (value == null) node.removeAttribute(attribute); else if (node.getAttribute(attribute) !== value) node.setAttribute(attribute, value); } function children(element) { return Array.from(element.childNodes); } function set_data(text, data) { data = '' + data; if (text.wholeText !== data) text.data = data; } var current_component; function set_current_component(component) { current_component = component; } function get_current_component() { if (!current_component) throw new Error('Function called outside component initialization'); return current_component; } function onDestroy(fn) { get_current_component().$$.on_destroy.push(fn); } var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; var flush_callbacks = []; var resolved_promise = Promise.resolve(); var update_scheduled = false; function schedule_update() { if (!update_scheduled) { update_scheduled = true; resolved_promise.then(flush); } } function add_render_callback(fn) { render_callbacks.push(fn); } var flushing = false; var seen_callbacks = new Set(); function flush() { if (flushing) return; flushing = true; do { for (var i = 0; i < dirty_components.length; i += 1) { var component = dirty_components[i]; set_current_component(component); update(component.$$); } set_current_component(null); dirty_components.length = 0; while (binding_callbacks.length) { binding_callbacks.pop()(); } for (var _i = 0; _i < render_callbacks.length; _i += 1) { var callback = render_callbacks[_i]; if (!seen_callbacks.has(callback)) { seen_callbacks.add(callback); callback(); } } render_callbacks.length = 0; } while (dirty_components.length); while (flush_callbacks.length) { flush_callbacks.pop()(); } update_scheduled = false; flushing = false; seen_callbacks.clear(); } function update($$) { if ($$.fragment !== null) { $$.update(); run_all($$.before_update); var dirty = $$.dirty; $$.dirty = [-1]; $$.fragment && $$.fragment.p($$.ctx, dirty); $$.after_update.forEach(add_render_callback); } } var outroing = new Set(); function transition_in(block, local) { if (block && block.i) { outroing["delete"](block); block.i(local); } } function mount_component(component, target, anchor) { var _component$$$ = component.$$, fragment = _component$$$.fragment, on_mount = _component$$$.on_mount, on_destroy = _component$$$.on_destroy, after_update = _component$$$.after_update; fragment && fragment.m(target, anchor); add_render_callback(function () { var new_on_destroy = on_mount.map(run).filter(is_function); if (on_destroy) { on_destroy.push.apply(on_destroy, _toConsumableArray(new_on_destroy)); } else { run_all(new_on_destroy); } component.$$.on_mount = []; }); after_update.forEach(add_render_callback); } function destroy_component(component, detaching) { var $$ = component.$$; if ($$.fragment !== null) { run_all($$.on_destroy); $$.fragment && $$.fragment.d(detaching); $$.on_destroy = $$.fragment = null; $$.ctx = []; } } function make_dirty(component, i) { if (component.$$.dirty[0] === -1) { dirty_components.push(component); schedule_update(); component.$$.dirty.fill(0); } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } function init(component, options, instance, create_fragment, not_equal, props) { var dirty = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [-1]; var parent_component = current_component; set_current_component(component); var prop_values = options.props || {}; var $$ = component.$$ = { fragment: null, ctx: null, props: props, update: noop, not_equal: not_equal, bound: blank_object(), on_mount: [], on_destroy: [], before_update: [], after_update: [], context: new Map(parent_component ? parent_component.$$.context : []), callbacks: blank_object(), dirty: dirty, skip_bound: false }; var ready = false; $$.ctx = instance ? instance(component, prop_values, function (i, ret) { var value = (arguments.length <= 2 ? 0 : arguments.length - 2) ? arguments.length <= 2 ? undefined : arguments[2] : ret; if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) { if (!$$.skip_bound && $$.bound[i]) $$.bound[i](value); if (ready) make_dirty(component, i); } return ret; }) : []; $$.update(); ready = true; run_all($$.before_update); $$.fragment = create_fragment ? create_fragment($$.ctx) : false; if (options.target) { if (options.hydrate) { var nodes = children(options.target); $$.fragment && $$.fragment.l(nodes); nodes.forEach(detach); } else { $$.fragment && $$.fragment.c(); } if (options.intro) transition_in(component.$$.fragment); mount_component(component, options.target, options.anchor); flush(); } set_current_component(parent_component); } var SvelteComponent = function () { function SvelteComponent() { _classCallCheck(this, SvelteComponent); } _createClass(SvelteComponent, [{ key: "$destroy", value: function $destroy() { destroy_component(this, 1); this.$destroy = noop; } }, { key: "$on", value: function $on(type, callback) { var callbacks = this.$$.callbacks[type] || (this.$$.callbacks[type] = []); callbacks.push(callback); return function () { var index = callbacks.indexOf(callback); if (index !== -1) callbacks.splice(index, 1); }; } }, { key: "$set", value: function $set($$props) { if (this.$$set && !is_empty($$props)) { this.$$.skip_bound = true; this.$$set($$props); this.$$.skip_bound = false; } } }]); return SvelteComponent; }(); function create_fragment(ctx) { var button; var i; var i_class_value; var t0; var t1_value = ctx[1].text + ""; var t1; var button_class_value; var button_disabled_value; var t2; var div; var mounted; var dispose; return { c: function c() { button = element("button"); i = element("i"); t0 = text("\n  "); t1 = text(t1_value); t2 = space(); div = element("div"); attr(i, "class", i_class_value = "" + (null_to_empty(ctx[0].getIcon("refresh")) + " svelte-1tn3i34")); attr(button, "class", button_class_value = "" + (null_to_empty("pnotify-action-button pnotify-reference-button ".concat(ctx[0].getStyle("btn"), " ").concat(ctx[0].getStyle("btn-secondary"))) + " svelte-1tn3i34")); attr(button, "type", "button"); button.disabled = button_disabled_value = !ctx[2]; attr(div, "class", "pnotify-reference-clearing svelte-1tn3i34"); }, m: function m(target, anchor) { insert(target, button, anchor); append(button, i); append(button, t0); append(button, t1); insert(target, t2, anchor); insert(target, div, anchor); if (!mounted) { dispose = listen(button, "click", ctx[3]); mounted = true; } }, p: function p(ctx, _ref) { var _ref2 = _slicedToArray(_ref, 1), dirty = _ref2[0]; if (dirty & 1 && i_class_value !== (i_class_value = "" + (null_to_empty(ctx[0].getIcon("refresh")) + " svelte-1tn3i34"))) { attr(i, "class", i_class_value); } if (dirty & 2 && t1_value !== (t1_value = ctx[1].text + "")) set_data(t1, t1_value); if (dirty & 1 && button_class_value !== (button_class_value = "" + (null_to_empty("pnotify-action-button pnotify-reference-button ".concat(ctx[0].getStyle("btn"), " ").concat(ctx[0].getStyle("btn-secondary"))) + " svelte-1tn3i34"))) { attr(button, "class", button_class_value); } if (dirty & 4 && button_disabled_value !== (button_disabled_value = !ctx[2])) { button.disabled = button_disabled_value; } }, i: noop, o: noop, d: function d(detaching) { if (detaching) detach(button); if (detaching) detach(t2); if (detaching) detach(div); mounted = false; dispose(); } }; } var position = "AppendContent"; var defaults = { labels: { text: "Spin Around" } }; function instance($$self, $$props, $$invalidate) { var _$$props$self = $$props.self, self = _$$props$self === void 0 ? null : _$$props$self; var _$$props$labels = $$props.labels, labels = _$$props$labels === void 0 ? defaults.labels : _$$props$labels; var mouseIsIn = false; var removeMouseEnter = self.on("mouseenter", function () { return $$invalidate(2, mouseIsIn = true); }); var removeMouseLeave = self.on("mouseleave", function () { return $$invalidate(2, mouseIsIn = false); }); onDestroy(function () { removeMouseEnter && removeMouseEnter(); removeMouseLeave && removeMouseLeave(); }); function doSomething() { var curAngle = 0; var timer = setInterval(function () { curAngle += 10; if (curAngle === 360) { curAngle = 0; clearInterval(timer); } $$invalidate(0, self.refs.elem.style.transform = "rotate(".concat(curAngle, "deg)"), self); }, 20); } $$self.$$set = function ($$props) { if ("self" in $$props) $$invalidate(0, self = $$props.self); if ("labels" in $$props) $$invalidate(1, labels = $$props.labels); }; return [self, labels, mouseIsIn, doSomething]; } var Reference = function (_SvelteComponent) { _inherits(Reference, _SvelteComponent); var _super = _createSuper(Reference); function Reference(options) { var _this; _classCallCheck(this, Reference); _this = _super.call(this); init(_assertThisInitialized(_this), options, instance, create_fragment, safe_not_equal, { self: 0, labels: 1 }); return _this; } return Reference; }(SvelteComponent); exports.default = Reference; exports.defaults = defaults; exports.position = position; Object.defineProperty(exports, '__esModule', { value: true }); }))); /*PNotifyReference.js end*/ /*khởi tạo*/ PNotify.defaults.mode = 'light'; PNotify.defaultModules.set(PNotifyFontAwesome5, {}); PNotify.defaultStack.close(); /* const PNotifyNew = PNotify.error({ // Math.round(Math.random() * 9999) title: 'Regular Notice', titleTrusted: true, text: 'Check me out! I\'m a notice.', // text: document.getElementById('evil_html').innerHTML, textTrusted: true, //icon: false, //icon: 'far fa-envelope', // 'fas fa-spinner fa-pulse', //icons: { // prefix: PNotify.defaults.icons, // closer: 'fas fa-bomb', // sticker: 'fas', // stuck: 'fa-hourglass', // unstuck: 'fa-anchor' //}, //closer: false // nút close //sticker: false // nút //hide: false //width: '500px', //minHeight: '400px' //maxTextHeight: '180px' // null // addClass: 'translucent' // addModelessClass: 'nonblock', //delay: Infinity delay: 3000, //dir1: 'up', //dir2: 'right', //firstpos1: 25, //firstpos2: 25, //modules: new Map([ // ...PNotify.defaultModules, // [PNotifyCountdown, {}] //]) }); PNotifyNew.on('click', () => { PNotifyNew.close(); }); */ /* const PNotifyStack = new PNotify.Stack({ dir1: 'up', // down up dir2: 'right', // left right firstpos1: 25, firstpos2: 25, modal: false, maxOpen: 1, // s?lượng thông báo cùng hiển th? maxStrategy: 'close', // 'close' 'wait' maxClosureCausesWait: false, push: 'top', }); function PNotifyStart(data) { var PNotifyOption = { //title: 'Regular Notice', //titleTrusted: true, text: data.text, textTrusted: true, stack: PNotifyStack, delay: 3000, modules: new Map([...PNotify.defaultModules, [PNotifyCountdown, {}]]), } let PNotifyNew = {}; switch (data.status) { case "success": PNotifyNew = new PNotify.success(PNotifyOption); break; case "error": PNotifyNew = new PNotify.error(PNotifyOption); break; case "info": PNotifyNew = new PNotify.info(PNotifyOption); break; default: PNotifyNew = new PNotify.notice(PNotifyOption); break; } //PNotifyNew.on('click', () => { // PNotifyNew.close(); //}); } */ //jQuery.browser = {}; //(function () { // jQuery.browser.msie = false; // jQuery.browser.version = 0; // if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { // jQuery.browser.msie = true; // jQuery.browser.version = RegExp.$1; // } //})();