diff --git a/.babelrc.json b/.babelrc.json new file mode 100644 index 0000000..c99adb8 --- /dev/null +++ b/.babelrc.json @@ -0,0 +1,3 @@ +{ + "presets": [["@babel/env", { "modules": false }]] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9d08a1a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c3438bd --- /dev/null +++ b/.prettierrc @@ -0,0 +1,8 @@ +{ + "singleQuote": true, + "printWidth": 120, + "endOfLine": "lf", + "semi": true, + "arrowParens": "always", + "trailingComma": "none" +} diff --git a/dist/Bs5Utils.min.js b/dist/Bs5Utils.min.js new file mode 100644 index 0000000..8aa0e54 --- /dev/null +++ b/dist/Bs5Utils.min.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Bs5Utils=e()}(this,(function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n'),f.forEach((function(t,n){if("dismiss"===(t.type||"button"))C+=' ");else{var o="toast-".concat(a(e,b),"-button-").concat(n);C+=' "),t.hasOwnProperty("handler")&&"function"==typeof t.handler&&A.push({id:o,handler:t.handler})}})),C+=""),x.innerHTML='\n
\n ').concat(i,'\n ').concat(r,"\n ").concat(d,"\n ").concat(y?''):"",'\n
\n
\n ').concat(u,"\n ").concat(C,"\n
\n "),g.defaults.toasts.stacking||document.querySelectorAll("#".concat(g.defaults.toasts.container," .toast")).forEach((function(t){t.remove()})),document.querySelector("#".concat(g.defaults.toasts.container)).appendChild(x),x.addEventListener("hidden.bs.toast",(function(t){t.target.remove()})),A.forEach((function(t){document.getElementById(t.id).addEventListener("click",t.handler)}));var L={autohide:p>0&&"number"==typeof p};p>0&&"number"==typeof p&&(L.delay=p);var j=new bootstrap.Toast(x,L);return j.show(),j}}]),t}(),f=new WeakMap,h=function(){function t(){e(this,t),c(this,f,{writable:!0,value:0})}return o(t,[{key:"show",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";s(this,f,+a(this,f)+1);var r=g.defaults.styles[t],c=r.btnClose.join(" "),d=document.createElement("div");d.classList.add("toast","align-items-center","border-0"),r.main.forEach((function(t){d.classList.add(t)})),d.setAttribute("id","snack-".concat(a(this,f))),d.setAttribute("role","alert"),d.setAttribute("aria-live","assertive"),d.setAttribute("aria-atomic","true"),d.innerHTML='\n
\n '.concat(i,'\n
').concat(e,"
\n ").concat(o?''):"","\n
\n "),g.defaults.toasts.stacking||document.querySelectorAll("#".concat(g.defaults.toasts.container," .toast")).forEach((function(t){t.remove()})),document.querySelector("#".concat(g.defaults.toasts.container)).appendChild(d),d.addEventListener("hidden.bs.toast",(function(t){t.target.remove()}));var l={autohide:n>0&&"number"==typeof n};n>0&&"number"==typeof n&&(l.delay=n);var u=new bootstrap.Toast(d,l);return u.show(),u}}]),t}(),p=new WeakMap,v=function(){function t(){e(this,t),c(this,p,{writable:!0,value:0})}return o(t,[{key:"show",value:function(t){var e=this,n=t.type,o=void 0===n?"default":n,i=t.title,r=void 0===i?"":i,c=t.content,d=void 0===c?"":c,l=t.buttons,u=void 0===l?[]:l,b=t.centered,m=void 0!==b&&b,f=t.dismissible,h=void 0===f||f,v=t.backdrop,y=void 0===v?!!h||"static":v,w=t.keyboard,k=void 0===w?h:w,E=t.focus,x=void 0===E||E,C=t.fullscreen,A=void 0!==C&&C,L=t.size,j=void 0===L?"":L;s(this,p,+a(this,p)+1),j=["sm","lg","xl"].includes(j)?"modal-".concat(j):"",A=A?"modal-fullscreen":"",m=m?"modal-dialog-centered modal-dialog-scrollable":"";var T=g.defaults.styles[o],S=T.btnClose.join(" "),M=T.border,q=document.createElement("div");q.setAttribute("id","modal-".concat(a(this,p))),q.setAttribute("tabindex","-1"),q.classList.add("modal"),g.defaults.toasts.namespace.length>0&&q.classList.add(g.defaults.toasts.namespace);var O="",P=[];Array.isArray(u)&&u.length&&(O+='"),q.innerHTML='\n \n "),document.body.appendChild(q),q.addEventListener("hidden.bs.modal",(function(t){t.target.remove()})),P.forEach((function(t){document.getElementById(t.id).addEventListener("click",t.handler)}));var H={backdrop:y,keyboard:k,focus:x},W=new bootstrap.Modal(q,H);return W.show(),W}}]),t}(),y=new WeakSet,g=function(){function n(){var t,o;e(this,n),r(t=this,o=y),o.add(t),function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,y,w).call(this),this.Toast=new m,this.Snack=new h,this.Modal=new v}return o(n,null,[{key:"registerStyle",value:function(e,o){if("object"!==t(o)&&Array.isArray(o))throw"The styles parameter must be an object when you register component style.";n.defaults.styles[e]=o}}]),n}();function w(){var t=document.querySelector("#".concat(g.defaults.toasts.container));if(!t){var e={"top-left":"top-0 start-0 ms-1 mt-1","top-center":"top-0 start-50 translate-middle-x mt-1","top-right":"top-0 end-0 me-1 mt-1","middle-left":"top-50 start-0 translate-middle-y ms-1","middle-center":"top-50 start-50 translate-middle p-3","middle-right":"top-50 end-0 translate-middle-y me-1","bottom-left":"bottom-0 start-0 ms-1 mb-1","bottom-center":"bottom-0 start-50 translate-middle-x mb-1","bottom-right":"bottom-0 end-0 me-1 mb-1"};(t=document.createElement("div")).classList.add("position-relative"),g.defaults.toasts.namespace.length>0&&t.classList.add(g.defaults.toasts.namespace),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.innerHTML='
'),document.body.appendChild(t)}}return u={toasts:{position:"top-right",container:"toast-container",namespace:"",stacking:!0},styles:{secondary:{btnClose:["btn-close-white"],main:["text-white","bg-secondary"],border:["border-secondary"]},light:{btnClose:[],main:["text-dark","bg-light","border-bottom","border-dark"],border:["border-dark"]},white:{btnClose:[],main:["text-dark","bg-white","border-bottom","border-dark"],border:["border-dark"]},dark:{btnClose:["btn-close-white"],main:["text-white","bg-dark"],border:["border-dark"]},info:{btnClose:["btn-close-white"],main:["text-white","bg-info"],border:["border-info"]},primary:{btnClose:["btn-close-white"],main:["text-white","bg-primary"],border:["border-primary"]},success:{btnClose:["btn-close-white"],main:["text-white","bg-success"],border:["border-success"]},warning:{btnClose:["btn-close-white"],main:["text-white","bg-warning"],border:["border-warning"]},danger:{btnClose:["btn-close-white"],main:["text-white","bg-danger"],border:["border-danger"]},default:{btnClose:[],main:["border-bottom"],border:[]}}},(l="defaults")in(d=g)?Object.defineProperty(d,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):d[l]=u,g})); +//# sourceMappingURL=Bs5Utils.min.js.map diff --git a/dist/Bs5Utils.min.js.map b/dist/Bs5Utils.min.js.map new file mode 100644 index 0000000..d6377c0 --- /dev/null +++ b/dist/Bs5Utils.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Bs5Utils.min.js","sources":["../src/js/components/Toast.js","../src/js/components/Snack.js","../src/js/components/Modal.js","../src/js/Bs5Utils.js"],"sourcesContent":["import Bs5Utils from '../Bs5Utils';\n\nexport default class Toast {\n /**\n * A counter for the Toasts\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a toast for alerts\n * @param type - the theme of the snack\n * @param icon - Set an icon in the top-left corner, you can pass HTML directly\n * @param title - the title of the of the toast\n * @param subtitle - the subtitle of the toast\n * @param content - the content of the toast\n * @param buttons - the action buttons of the toast\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n */\n show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n toast = document.createElement('div');\n\n toast.setAttribute('id', `toast-${this.#count}`);\n toast.setAttribute('role', 'alert');\n toast.setAttribute('aria-live', 'assertive');\n toast.setAttribute('aria-atomic', 'true');\n\n toast.classList.add('toast', 'align-items-center');\n borderStyles.forEach((value) => {\n toast.classList.add(value);\n });\n\n let buttonsHtml = ``,\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n buttonsHtml += `
`;\n\n buttons.forEach((button, key) => {\n const type = button.type || 'button';\n\n switch (type) {\n case 'dismiss':\n buttonsHtml += ` `;\n break;\n\n default:\n let id = `toast-${this.#count}-button-${key}`;\n\n buttonsHtml += ` `;\n\n if (button.hasOwnProperty('handler') && typeof button.handler === 'function') {\n buttonIds.push({\n id,\n handler: button.handler\n });\n }\n }\n });\n\n buttonsHtml += `
`;\n }\n\n toast.innerHTML = `\n
\n ${icon}\n ${title}\n ${subtitle}\n ${\n dismissible\n ? ``\n : ''\n }\n
\n
\n ${content}\n ${buttonsHtml}\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast);\n\n toast.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsToast = new bootstrap.Toast(toast, opts);\n\n bsToast.show();\n\n return bsToast;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Snack {\n /**\n * A counter for the Snacks\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a lightweight toast\n * @param type - the theme of the snack\n * @param title - the title of the of the snack\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n * @param icon - Set an icon in the left of the message, pass HTML directly\n */\n show(type, title, delay = 0, dismissible = true, icon = '') {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyle = style.btnClose.join(' '),\n snack = document.createElement('div');\n\n snack.classList.add('toast', 'align-items-center', 'border-0');\n style.main.forEach((value) => {\n snack.classList.add(value);\n });\n snack.setAttribute('id', `snack-${this.#count}`);\n snack.setAttribute('role', 'alert');\n snack.setAttribute('aria-live', 'assertive');\n snack.setAttribute('aria-atomic', 'true');\n snack.innerHTML = `\n
\n ${icon}\n
${title}
\n ${\n dismissible\n ? ``\n : ''\n }\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack);\n\n snack.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsSnack = new bootstrap.Toast(snack, opts);\n\n bsSnack.show();\n\n return bsSnack;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Modal {\n /**\n * A counter for the Modals\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a modal\n * @param type - the theme of the snack\n * @param title - the title of the modal, if omitted, the modal-header element is removed\n * @param content - the content of the modal, if omitted, the modal-body element is removed\n * @param buttons - any action buttons, if omitted, the the modal-footer element is removed\n * @param centered - set whether the modal is centered\n * @param dismissible - set whether the dismiss button should show\n * @param backdrop - set the type of backdrop: true, false, static\n * @param keyboard - set whether the escape key closes the modal\n * @param focus - set whether the modal is autofocussed when initialized\n * @param fullscreen - set whether the modal is fullscreen\n * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string\n */\n show({\n type = 'default',\n title = '',\n content = '',\n buttons = [],\n centered = false,\n dismissible = true,\n backdrop = dismissible ? true : 'static',\n keyboard = dismissible,\n focus = true,\n fullscreen = false,\n size = ''\n }) {\n this.#count++;\n\n size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : '';\n fullscreen = fullscreen ? 'modal-fullscreen' : '';\n centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : '';\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n modal = document.createElement('div');\n\n modal.setAttribute('id', `modal-${this.#count}`);\n modal.setAttribute('tabindex', '-1');\n modal.classList.add('modal');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n modal.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n\n let footerHtml = '',\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n footerHtml += ``;\n }\n\n modal.innerHTML = `\n
\n
\n ${\n title.length\n ? `
${title}
\n ${\n dismissible\n ? ``\n : ``\n }\n
`\n : ``\n }\n ${content.length ? `
${content}
` : ``}\n ${footerHtml}\n
\n
\n `;\n\n document.body.appendChild(modal);\n\n modal.addEventListener('hidden.bs.modal', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n backdrop,\n keyboard,\n focus\n };\n\n const bsModal = new bootstrap.Modal(modal, opts);\n\n bsModal.show();\n\n return bsModal;\n }\n}\n","import Toast from './components/Toast';\nimport Snack from './components/Snack';\nimport Modal from './components/Modal';\n\nclass Bs5Utils {\n /**\n * Default config options\n * @type {{toasts: {container: string, position: string, stacking: boolean}}}\n */\n static defaults = {\n toasts: {\n position: 'top-right',\n container: 'toast-container',\n namespace: '',\n stacking: true\n },\n\n styles: {\n secondary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-secondary'],\n border: ['border-secondary']\n },\n light: {\n btnClose: [],\n main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n white: {\n btnClose: [],\n main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n dark: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-dark'],\n border: ['border-dark']\n },\n info: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-info'],\n border: ['border-info']\n },\n primary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-primary'],\n border: ['border-primary']\n },\n success: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-success'],\n border: ['border-success']\n },\n warning: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-warning'],\n border: ['border-warning']\n },\n danger: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-danger'],\n border: ['border-danger']\n },\n default: {\n btnClose: [],\n main: ['border-bottom'],\n border: []\n }\n }\n };\n\n constructor() {\n this.#createToastContainer();\n\n this.Toast = new Toast();\n this.Snack = new Snack();\n this.Modal = new Modal();\n }\n\n #createToastContainer() {\n let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`);\n\n if (!containerEl) {\n const positionToClass = {\n 'top-left': 'top-0 start-0 ms-1 mt-1',\n 'top-center': 'top-0 start-50 translate-middle-x mt-1',\n 'top-right': 'top-0 end-0 me-1 mt-1',\n 'middle-left': 'top-50 start-0 translate-middle-y ms-1',\n 'middle-center': 'top-50 start-50 translate-middle p-3',\n 'middle-right': 'top-50 end-0 translate-middle-y me-1',\n 'bottom-left': 'bottom-0 start-0 ms-1 mb-1',\n 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1',\n 'bottom-right': 'bottom-0 end-0 me-1 mb-1'\n };\n\n containerEl = document.createElement('div');\n containerEl.classList.add('position-relative');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n containerEl.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n containerEl.setAttribute('aria-live', 'polite');\n containerEl.setAttribute('aria-atomic', 'true');\n containerEl.innerHTML = `
`;\n\n document.body.appendChild(containerEl);\n }\n }\n\n /**\n * Register a style for the components\n * @param key - To reference your style\n * @param styles - The style object\n */\n static registerStyle(key, styles) {\n if (typeof styles !== 'object' && Array.isArray(styles)) {\n throw 'The styles parameter must be an object when you register component style.';\n }\n\n Bs5Utils.defaults.styles[key] = styles;\n }\n}\n\nexport { Bs5Utils as default };\n"],"names":["Toast","type","icon","title","subtitle","content","buttons","delay","dismissible","style","Bs5Utils","defaults","styles","btnCloseStyles","btnClose","join","borderStyles","border","toast","document","createElement","setAttribute","this","classList","add","forEach","value","buttonsHtml","buttonIds","Array","isArray","length","button","key","text","id","_this","hasOwnProperty","handler","push","innerHTML","main","toasts","stacking","querySelectorAll","container","remove","querySelector","appendChild","addEventListener","e","target","getElementById","opts","autohide","bsToast","bootstrap","show","Snack","btnCloseStyle","snack","bsSnack","Modal","centered","backdrop","keyboard","focus","fullscreen","size","includes","modal","namespace","footerHtml","body","bsModal","_typeof","containerEl","positionToClass","position","secondary","light","white","dark","info","primary","success","warning","danger"],"mappings":"63CAEqBA,gEAKV,yDAaFC,IAAAA,SAAMC,KAAAA,aAAO,KAAIC,IAAAA,UAAOC,SAAAA,aAAW,SAAIC,QAAAA,aAAU,SAAIC,QAAAA,aAAU,SAAIC,MAAAA,aAAQ,QAAGC,YAAAA,2CAG7EC,EAAQC,EAASC,SAASC,OAAOX,GACrCY,EAAiBJ,EAAMK,SAASC,KAAK,KACrCC,EAAeP,EAAMQ,OACrBC,EAAQC,SAASC,cAAc,OAEjCF,EAAMG,aAAa,uBAAeC,UAClCJ,EAAMG,aAAa,OAAQ,SAC3BH,EAAMG,aAAa,YAAa,aAChCH,EAAMG,aAAa,cAAe,QAElCH,EAAMK,UAAUC,IAAI,QAAS,sBAC7BR,EAAaS,SAAQ,SAACC,GACpBR,EAAMK,UAAUC,IAAIE,UAGlBC,KACFC,EAAY,GAEVC,MAA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AC,0BAEF,CACPH,SAAU,GACV2B,KAAM,CAAC,iBACPxB,OAAQ,yBA9DVP"} \ No newline at end of file diff --git a/dist/cjs/Bs5Utils.js b/dist/cjs/Bs5Utils.js new file mode 100644 index 0000000..700e4b0 --- /dev/null +++ b/dist/cjs/Bs5Utils.js @@ -0,0 +1,441 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +class Toast { + /** + * A counter for the Toasts + * @type {number} + */ + #count = 0; + + /** + * Display a toast for alerts + * @param type - the theme of the snack + * @param icon - Set an icon in the top-left corner, you can pass HTML directly + * @param title - the title of the of the toast + * @param subtitle - the subtitle of the toast + * @param content - the content of the toast + * @param buttons - the action buttons of the toast + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + */ + show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) { + this.#count++; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + toast = document.createElement('div'); + + toast.setAttribute('id', `toast-${this.#count}`); + toast.setAttribute('role', 'alert'); + toast.setAttribute('aria-live', 'assertive'); + toast.setAttribute('aria-atomic', 'true'); + + toast.classList.add('toast', 'align-items-center'); + borderStyles.forEach((value) => { + toast.classList.add(value); + }); + + let buttonsHtml = ``, + buttonIds = []; + + if (Array.isArray(buttons) && buttons.length) { + buttonsHtml += `
`; + + buttons.forEach((button, key) => { + const type = button.type || 'button'; + + switch (type) { + case 'dismiss': + buttonsHtml += ` `; + break; + + default: + let id = `toast-${this.#count}-button-${key}`; + + buttonsHtml += ` `; + + if (button.hasOwnProperty('handler') && typeof button.handler === 'function') { + buttonIds.push({ + id, + handler: button.handler + }); + } + } + }); + + buttonsHtml += `
`; + } + + toast.innerHTML = ` +
+ ${icon} + ${title} + ${subtitle} + ${ + dismissible + ? `` + : '' + } +
+
+ ${content} + ${buttonsHtml} +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } + + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast); + + toast.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); + + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); + + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; + + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; + } + + const bsToast = new bootstrap.Toast(toast, opts); + + bsToast.show(); + + return bsToast; + } +} + +class Snack { + /** + * A counter for the Snacks + * @type {number} + */ + #count = 0; + + /** + * Display a lightweight toast + * @param type - the theme of the snack + * @param title - the title of the of the snack + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + * @param icon - Set an icon in the left of the message, pass HTML directly + */ + show(type, title, delay = 0, dismissible = true, icon = '') { + this.#count++; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyle = style.btnClose.join(' '), + snack = document.createElement('div'); + + snack.classList.add('toast', 'align-items-center', 'border-0'); + style.main.forEach((value) => { + snack.classList.add(value); + }); + snack.setAttribute('id', `snack-${this.#count}`); + snack.setAttribute('role', 'alert'); + snack.setAttribute('aria-live', 'assertive'); + snack.setAttribute('aria-atomic', 'true'); + snack.innerHTML = ` +
+ ${icon} +
${title}
+ ${ + dismissible + ? `` + : '' + } +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } + + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack); + + snack.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); + + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; + + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; + } + + const bsSnack = new bootstrap.Toast(snack, opts); + + bsSnack.show(); + + return bsSnack; + } +} + +class Modal { + /** + * A counter for the Modals + * @type {number} + */ + #count = 0; + + /** + * Display a modal + * @param type - the theme of the snack + * @param title - the title of the modal, if omitted, the modal-header element is removed + * @param content - the content of the modal, if omitted, the modal-body element is removed + * @param buttons - any action buttons, if omitted, the the modal-footer element is removed + * @param centered - set whether the modal is centered + * @param dismissible - set whether the dismiss button should show + * @param backdrop - set the type of backdrop: true, false, static + * @param keyboard - set whether the escape key closes the modal + * @param focus - set whether the modal is autofocussed when initialized + * @param fullscreen - set whether the modal is fullscreen + * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string + */ + show({ + type = 'default', + title = '', + content = '', + buttons = [], + centered = false, + dismissible = true, + backdrop = dismissible ? true : 'static', + keyboard = dismissible, + focus = true, + fullscreen = false, + size = '' + }) { + this.#count++; + + size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : ''; + fullscreen = fullscreen ? 'modal-fullscreen' : ''; + centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : ''; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + modal = document.createElement('div'); + + modal.setAttribute('id', `modal-${this.#count}`); + modal.setAttribute('tabindex', '-1'); + modal.classList.add('modal'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + modal.classList.add(Bs5Utils.defaults.toasts.namespace); + } + + let footerHtml = '', + buttonIds = []; + + if (Array.isArray(buttons) && buttons.length) { + footerHtml += ``; + } + + modal.innerHTML = ` + + `; + + document.body.appendChild(modal); + + modal.addEventListener('hidden.bs.modal', function (e) { + e.target.remove(); + }); + + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); + + const opts = { + backdrop, + keyboard, + focus + }; + + const bsModal = new bootstrap.Modal(modal, opts); + + bsModal.show(); + + return bsModal; + } +} + +class Bs5Utils { + /** + * Default config options + * @type {{toasts: {container: string, position: string, stacking: boolean}}} + */ + static defaults = { + toasts: { + position: 'top-right', + container: 'toast-container', + namespace: '', + stacking: true + }, + + styles: { + secondary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-secondary'], + border: ['border-secondary'] + }, + light: { + btnClose: [], + main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + white: { + btnClose: [], + main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + dark: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-dark'], + border: ['border-dark'] + }, + info: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-info'], + border: ['border-info'] + }, + primary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-primary'], + border: ['border-primary'] + }, + success: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-success'], + border: ['border-success'] + }, + warning: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-warning'], + border: ['border-warning'] + }, + danger: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-danger'], + border: ['border-danger'] + }, + default: { + btnClose: [], + main: ['border-bottom'], + border: [] + } + } + }; + + constructor() { + this.#createToastContainer(); + + this.Toast = new Toast(); + this.Snack = new Snack(); + this.Modal = new Modal(); + } + + #createToastContainer() { + let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`); + + if (!containerEl) { + const positionToClass = { + 'top-left': 'top-0 start-0 ms-1 mt-1', + 'top-center': 'top-0 start-50 translate-middle-x mt-1', + 'top-right': 'top-0 end-0 me-1 mt-1', + 'middle-left': 'top-50 start-0 translate-middle-y ms-1', + 'middle-center': 'top-50 start-50 translate-middle p-3', + 'middle-right': 'top-50 end-0 translate-middle-y me-1', + 'bottom-left': 'bottom-0 start-0 ms-1 mb-1', + 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1', + 'bottom-right': 'bottom-0 end-0 me-1 mb-1' + }; + + containerEl = document.createElement('div'); + containerEl.classList.add('position-relative'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + containerEl.classList.add(Bs5Utils.defaults.toasts.namespace); + } + containerEl.setAttribute('aria-live', 'polite'); + containerEl.setAttribute('aria-atomic', 'true'); + containerEl.innerHTML = `
`; + + document.body.appendChild(containerEl); + } + } + + /** + * Register a style for the components + * @param key - To reference your style + * @param styles - The style object + */ + static registerStyle(key, styles) { + if (typeof styles !== 'object' && Array.isArray(styles)) { + throw 'The styles parameter must be an object when you register component style.'; + } + + Bs5Utils.defaults.styles[key] = styles; + } +} + +exports["default"] = Bs5Utils; +//# sourceMappingURL=Bs5Utils.js.map diff --git a/dist/cjs/Bs5Utils.js.map b/dist/cjs/Bs5Utils.js.map new file mode 100644 index 0000000..da9a8d7 --- /dev/null +++ b/dist/cjs/Bs5Utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Bs5Utils.js","sources":["../../src/js/components/Toast.js","../../src/js/components/Snack.js","../../src/js/components/Modal.js","../../src/js/Bs5Utils.js"],"sourcesContent":["import Bs5Utils from '../Bs5Utils';\n\nexport default class Toast {\n /**\n * A counter for the Toasts\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a toast for alerts\n * @param type - the theme of the snack\n * @param icon - Set an icon in the top-left corner, you can pass HTML directly\n * @param title - the title of the of the toast\n * @param subtitle - the subtitle of the toast\n * @param content - the content of the toast\n * @param buttons - the action buttons of the toast\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n */\n show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n toast = document.createElement('div');\n\n toast.setAttribute('id', `toast-${this.#count}`);\n toast.setAttribute('role', 'alert');\n toast.setAttribute('aria-live', 'assertive');\n toast.setAttribute('aria-atomic', 'true');\n\n toast.classList.add('toast', 'align-items-center');\n borderStyles.forEach((value) => {\n toast.classList.add(value);\n });\n\n let buttonsHtml = ``,\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n buttonsHtml += `
`;\n\n buttons.forEach((button, key) => {\n const type = button.type || 'button';\n\n switch (type) {\n case 'dismiss':\n buttonsHtml += ` `;\n break;\n\n default:\n let id = `toast-${this.#count}-button-${key}`;\n\n buttonsHtml += ` `;\n\n if (button.hasOwnProperty('handler') && typeof button.handler === 'function') {\n buttonIds.push({\n id,\n handler: button.handler\n });\n }\n }\n });\n\n buttonsHtml += `
`;\n }\n\n toast.innerHTML = `\n
\n ${icon}\n ${title}\n ${subtitle}\n ${\n dismissible\n ? ``\n : ''\n }\n
\n
\n ${content}\n ${buttonsHtml}\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast);\n\n toast.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsToast = new bootstrap.Toast(toast, opts);\n\n bsToast.show();\n\n return bsToast;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Snack {\n /**\n * A counter for the Snacks\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a lightweight toast\n * @param type - the theme of the snack\n * @param title - the title of the of the snack\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n * @param icon - Set an icon in the left of the message, pass HTML directly\n */\n show(type, title, delay = 0, dismissible = true, icon = '') {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyle = style.btnClose.join(' '),\n snack = document.createElement('div');\n\n snack.classList.add('toast', 'align-items-center', 'border-0');\n style.main.forEach((value) => {\n snack.classList.add(value);\n });\n snack.setAttribute('id', `snack-${this.#count}`);\n snack.setAttribute('role', 'alert');\n snack.setAttribute('aria-live', 'assertive');\n snack.setAttribute('aria-atomic', 'true');\n snack.innerHTML = `\n
\n ${icon}\n
${title}
\n ${\n dismissible\n ? ``\n : ''\n }\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack);\n\n snack.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsSnack = new bootstrap.Toast(snack, opts);\n\n bsSnack.show();\n\n return bsSnack;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Modal {\n /**\n * A counter for the Modals\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a modal\n * @param type - the theme of the snack\n * @param title - the title of the modal, if omitted, the modal-header element is removed\n * @param content - the content of the modal, if omitted, the modal-body element is removed\n * @param buttons - any action buttons, if omitted, the the modal-footer element is removed\n * @param centered - set whether the modal is centered\n * @param dismissible - set whether the dismiss button should show\n * @param backdrop - set the type of backdrop: true, false, static\n * @param keyboard - set whether the escape key closes the modal\n * @param focus - set whether the modal is autofocussed when initialized\n * @param fullscreen - set whether the modal is fullscreen\n * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string\n */\n show({\n type = 'default',\n title = '',\n content = '',\n buttons = [],\n centered = false,\n dismissible = true,\n backdrop = dismissible ? true : 'static',\n keyboard = dismissible,\n focus = true,\n fullscreen = false,\n size = ''\n }) {\n this.#count++;\n\n size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : '';\n fullscreen = fullscreen ? 'modal-fullscreen' : '';\n centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : '';\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n modal = document.createElement('div');\n\n modal.setAttribute('id', `modal-${this.#count}`);\n modal.setAttribute('tabindex', '-1');\n modal.classList.add('modal');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n modal.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n\n let footerHtml = '',\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n footerHtml += ``;\n }\n\n modal.innerHTML = `\n
\n
\n ${\n title.length\n ? `
${title}
\n ${\n dismissible\n ? ``\n : ``\n }\n
`\n : ``\n }\n ${content.length ? `
${content}
` : ``}\n ${footerHtml}\n
\n
\n `;\n\n document.body.appendChild(modal);\n\n modal.addEventListener('hidden.bs.modal', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n backdrop,\n keyboard,\n focus\n };\n\n const bsModal = new bootstrap.Modal(modal, opts);\n\n bsModal.show();\n\n return bsModal;\n }\n}\n","import Toast from './components/Toast';\nimport Snack from './components/Snack';\nimport Modal from './components/Modal';\n\nclass Bs5Utils {\n /**\n * Default config options\n * @type {{toasts: {container: string, position: string, stacking: boolean}}}\n */\n static defaults = {\n toasts: {\n position: 'top-right',\n container: 'toast-container',\n namespace: '',\n stacking: true\n },\n\n styles: {\n secondary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-secondary'],\n border: ['border-secondary']\n },\n light: {\n btnClose: [],\n main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n white: {\n btnClose: [],\n main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n dark: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-dark'],\n border: ['border-dark']\n },\n info: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-info'],\n border: ['border-info']\n },\n primary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-primary'],\n border: ['border-primary']\n },\n success: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-success'],\n border: ['border-success']\n },\n warning: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-warning'],\n border: ['border-warning']\n },\n danger: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-danger'],\n border: ['border-danger']\n },\n default: {\n btnClose: [],\n main: ['border-bottom'],\n border: []\n }\n }\n };\n\n constructor() {\n this.#createToastContainer();\n\n this.Toast = new Toast();\n this.Snack = new Snack();\n this.Modal = new Modal();\n }\n\n #createToastContainer() {\n let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`);\n\n if (!containerEl) {\n const positionToClass = {\n 'top-left': 'top-0 start-0 ms-1 mt-1',\n 'top-center': 'top-0 start-50 translate-middle-x mt-1',\n 'top-right': 'top-0 end-0 me-1 mt-1',\n 'middle-left': 'top-50 start-0 translate-middle-y ms-1',\n 'middle-center': 'top-50 start-50 translate-middle p-3',\n 'middle-right': 'top-50 end-0 translate-middle-y me-1',\n 'bottom-left': 'bottom-0 start-0 ms-1 mb-1',\n 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1',\n 'bottom-right': 'bottom-0 end-0 me-1 mb-1'\n };\n\n containerEl = document.createElement('div');\n containerEl.classList.add('position-relative');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n containerEl.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n containerEl.setAttribute('aria-live', 'polite');\n containerEl.setAttribute('aria-atomic', 'true');\n containerEl.innerHTML = `
`;\n\n document.body.appendChild(containerEl);\n }\n }\n\n /**\n * Register a style for the components\n * @param key - To reference your style\n * @param styles - The style object\n */\n static registerStyle(key, styles) {\n if (typeof styles !== 'object' && Array.isArray(styles)) {\n throw 'The styles parameter must be an object when you register component style.';\n }\n\n Bs5Utils.defaults.styles[key] = styles;\n }\n}\n\nexport { Bs5Utils as default };\n"],"names":[],"mappings":";;;;AAEe,MAAM,KAAK,CAAC;AAC3B;A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AM,2EAA2E,CAAC;AACxF,KAAK;AACL;AACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC3C,GAAG;AACH;;;;"} \ No newline at end of file diff --git a/dist/esm/Bs5Utils.js b/dist/esm/Bs5Utils.js new file mode 100644 index 0000000..9d5806b --- /dev/null +++ b/dist/esm/Bs5Utils.js @@ -0,0 +1,437 @@ +class Toast { + /** + * A counter for the Toasts + * @type {number} + */ + #count = 0; + + /** + * Display a toast for alerts + * @param type - the theme of the snack + * @param icon - Set an icon in the top-left corner, you can pass HTML directly + * @param title - the title of the of the toast + * @param subtitle - the subtitle of the toast + * @param content - the content of the toast + * @param buttons - the action buttons of the toast + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + */ + show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) { + this.#count++; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + toast = document.createElement('div'); + + toast.setAttribute('id', `toast-${this.#count}`); + toast.setAttribute('role', 'alert'); + toast.setAttribute('aria-live', 'assertive'); + toast.setAttribute('aria-atomic', 'true'); + + toast.classList.add('toast', 'align-items-center'); + borderStyles.forEach((value) => { + toast.classList.add(value); + }); + + let buttonsHtml = ``, + buttonIds = []; + + if (Array.isArray(buttons) && buttons.length) { + buttonsHtml += `
`; + + buttons.forEach((button, key) => { + const type = button.type || 'button'; + + switch (type) { + case 'dismiss': + buttonsHtml += ` `; + break; + + default: + let id = `toast-${this.#count}-button-${key}`; + + buttonsHtml += ` `; + + if (button.hasOwnProperty('handler') && typeof button.handler === 'function') { + buttonIds.push({ + id, + handler: button.handler + }); + } + } + }); + + buttonsHtml += `
`; + } + + toast.innerHTML = ` +
+ ${icon} + ${title} + ${subtitle} + ${ + dismissible + ? `` + : '' + } +
+
+ ${content} + ${buttonsHtml} +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } + + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast); + + toast.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); + + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); + + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; + + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; + } + + const bsToast = new bootstrap.Toast(toast, opts); + + bsToast.show(); + + return bsToast; + } +} + +class Snack { + /** + * A counter for the Snacks + * @type {number} + */ + #count = 0; + + /** + * Display a lightweight toast + * @param type - the theme of the snack + * @param title - the title of the of the snack + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + * @param icon - Set an icon in the left of the message, pass HTML directly + */ + show(type, title, delay = 0, dismissible = true, icon = '') { + this.#count++; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyle = style.btnClose.join(' '), + snack = document.createElement('div'); + + snack.classList.add('toast', 'align-items-center', 'border-0'); + style.main.forEach((value) => { + snack.classList.add(value); + }); + snack.setAttribute('id', `snack-${this.#count}`); + snack.setAttribute('role', 'alert'); + snack.setAttribute('aria-live', 'assertive'); + snack.setAttribute('aria-atomic', 'true'); + snack.innerHTML = ` +
+ ${icon} +
${title}
+ ${ + dismissible + ? `` + : '' + } +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } + + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack); + + snack.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); + + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; + + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; + } + + const bsSnack = new bootstrap.Toast(snack, opts); + + bsSnack.show(); + + return bsSnack; + } +} + +class Modal { + /** + * A counter for the Modals + * @type {number} + */ + #count = 0; + + /** + * Display a modal + * @param type - the theme of the snack + * @param title - the title of the modal, if omitted, the modal-header element is removed + * @param content - the content of the modal, if omitted, the modal-body element is removed + * @param buttons - any action buttons, if omitted, the the modal-footer element is removed + * @param centered - set whether the modal is centered + * @param dismissible - set whether the dismiss button should show + * @param backdrop - set the type of backdrop: true, false, static + * @param keyboard - set whether the escape key closes the modal + * @param focus - set whether the modal is autofocussed when initialized + * @param fullscreen - set whether the modal is fullscreen + * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string + */ + show({ + type = 'default', + title = '', + content = '', + buttons = [], + centered = false, + dismissible = true, + backdrop = dismissible ? true : 'static', + keyboard = dismissible, + focus = true, + fullscreen = false, + size = '' + }) { + this.#count++; + + size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : ''; + fullscreen = fullscreen ? 'modal-fullscreen' : ''; + centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : ''; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + modal = document.createElement('div'); + + modal.setAttribute('id', `modal-${this.#count}`); + modal.setAttribute('tabindex', '-1'); + modal.classList.add('modal'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + modal.classList.add(Bs5Utils.defaults.toasts.namespace); + } + + let footerHtml = '', + buttonIds = []; + + if (Array.isArray(buttons) && buttons.length) { + footerHtml += ``; + } + + modal.innerHTML = ` + + `; + + document.body.appendChild(modal); + + modal.addEventListener('hidden.bs.modal', function (e) { + e.target.remove(); + }); + + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); + + const opts = { + backdrop, + keyboard, + focus + }; + + const bsModal = new bootstrap.Modal(modal, opts); + + bsModal.show(); + + return bsModal; + } +} + +class Bs5Utils { + /** + * Default config options + * @type {{toasts: {container: string, position: string, stacking: boolean}}} + */ + static defaults = { + toasts: { + position: 'top-right', + container: 'toast-container', + namespace: '', + stacking: true + }, + + styles: { + secondary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-secondary'], + border: ['border-secondary'] + }, + light: { + btnClose: [], + main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + white: { + btnClose: [], + main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + dark: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-dark'], + border: ['border-dark'] + }, + info: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-info'], + border: ['border-info'] + }, + primary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-primary'], + border: ['border-primary'] + }, + success: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-success'], + border: ['border-success'] + }, + warning: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-warning'], + border: ['border-warning'] + }, + danger: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-danger'], + border: ['border-danger'] + }, + default: { + btnClose: [], + main: ['border-bottom'], + border: [] + } + } + }; + + constructor() { + this.#createToastContainer(); + + this.Toast = new Toast(); + this.Snack = new Snack(); + this.Modal = new Modal(); + } + + #createToastContainer() { + let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`); + + if (!containerEl) { + const positionToClass = { + 'top-left': 'top-0 start-0 ms-1 mt-1', + 'top-center': 'top-0 start-50 translate-middle-x mt-1', + 'top-right': 'top-0 end-0 me-1 mt-1', + 'middle-left': 'top-50 start-0 translate-middle-y ms-1', + 'middle-center': 'top-50 start-50 translate-middle p-3', + 'middle-right': 'top-50 end-0 translate-middle-y me-1', + 'bottom-left': 'bottom-0 start-0 ms-1 mb-1', + 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1', + 'bottom-right': 'bottom-0 end-0 me-1 mb-1' + }; + + containerEl = document.createElement('div'); + containerEl.classList.add('position-relative'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + containerEl.classList.add(Bs5Utils.defaults.toasts.namespace); + } + containerEl.setAttribute('aria-live', 'polite'); + containerEl.setAttribute('aria-atomic', 'true'); + containerEl.innerHTML = `
`; + + document.body.appendChild(containerEl); + } + } + + /** + * Register a style for the components + * @param key - To reference your style + * @param styles - The style object + */ + static registerStyle(key, styles) { + if (typeof styles !== 'object' && Array.isArray(styles)) { + throw 'The styles parameter must be an object when you register component style.'; + } + + Bs5Utils.defaults.styles[key] = styles; + } +} + +export { Bs5Utils as default }; +//# sourceMappingURL=Bs5Utils.js.map diff --git a/dist/esm/Bs5Utils.js.map b/dist/esm/Bs5Utils.js.map new file mode 100644 index 0000000..7ed361a --- /dev/null +++ b/dist/esm/Bs5Utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Bs5Utils.js","sources":["../../src/js/components/Toast.js","../../src/js/components/Snack.js","../../src/js/components/Modal.js","../../src/js/Bs5Utils.js"],"sourcesContent":["import Bs5Utils from '../Bs5Utils';\n\nexport default class Toast {\n /**\n * A counter for the Toasts\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a toast for alerts\n * @param type - the theme of the snack\n * @param icon - Set an icon in the top-left corner, you can pass HTML directly\n * @param title - the title of the of the toast\n * @param subtitle - the subtitle of the toast\n * @param content - the content of the toast\n * @param buttons - the action buttons of the toast\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n */\n show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n toast = document.createElement('div');\n\n toast.setAttribute('id', `toast-${this.#count}`);\n toast.setAttribute('role', 'alert');\n toast.setAttribute('aria-live', 'assertive');\n toast.setAttribute('aria-atomic', 'true');\n\n toast.classList.add('toast', 'align-items-center');\n borderStyles.forEach((value) => {\n toast.classList.add(value);\n });\n\n let buttonsHtml = ``,\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n buttonsHtml += `
`;\n\n buttons.forEach((button, key) => {\n const type = button.type || 'button';\n\n switch (type) {\n case 'dismiss':\n buttonsHtml += ` `;\n break;\n\n default:\n let id = `toast-${this.#count}-button-${key}`;\n\n buttonsHtml += ` `;\n\n if (button.hasOwnProperty('handler') && typeof button.handler === 'function') {\n buttonIds.push({\n id,\n handler: button.handler\n });\n }\n }\n });\n\n buttonsHtml += `
`;\n }\n\n toast.innerHTML = `\n
\n ${icon}\n ${title}\n ${subtitle}\n ${\n dismissible\n ? ``\n : ''\n }\n
\n
\n ${content}\n ${buttonsHtml}\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast);\n\n toast.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsToast = new bootstrap.Toast(toast, opts);\n\n bsToast.show();\n\n return bsToast;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Snack {\n /**\n * A counter for the Snacks\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a lightweight toast\n * @param type - the theme of the snack\n * @param title - the title of the of the snack\n * @param delay - in ms, if specified the snack will autohide after the specified amount\n * @param dismissible - set whether the dismiss button should show\n * @param icon - Set an icon in the left of the message, pass HTML directly\n */\n show(type, title, delay = 0, dismissible = true, icon = '') {\n this.#count++;\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyle = style.btnClose.join(' '),\n snack = document.createElement('div');\n\n snack.classList.add('toast', 'align-items-center', 'border-0');\n style.main.forEach((value) => {\n snack.classList.add(value);\n });\n snack.setAttribute('id', `snack-${this.#count}`);\n snack.setAttribute('role', 'alert');\n snack.setAttribute('aria-live', 'assertive');\n snack.setAttribute('aria-atomic', 'true');\n snack.innerHTML = `\n
\n ${icon}\n
${title}
\n ${\n dismissible\n ? ``\n : ''\n }\n
\n `;\n\n if (!Bs5Utils.defaults.toasts.stacking) {\n document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => {\n toast.remove();\n });\n }\n\n document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack);\n\n snack.addEventListener('hidden.bs.toast', function (e) {\n e.target.remove();\n });\n\n const opts = {\n autohide: delay > 0 && typeof delay === 'number'\n };\n\n if (delay > 0 && typeof delay === 'number') {\n opts['delay'] = delay;\n }\n\n const bsSnack = new bootstrap.Toast(snack, opts);\n\n bsSnack.show();\n\n return bsSnack;\n }\n}\n","import Bs5Utils from '../Bs5Utils';\n\nexport default class Modal {\n /**\n * A counter for the Modals\n * @type {number}\n */\n #count = 0;\n\n /**\n * Display a modal\n * @param type - the theme of the snack\n * @param title - the title of the modal, if omitted, the modal-header element is removed\n * @param content - the content of the modal, if omitted, the modal-body element is removed\n * @param buttons - any action buttons, if omitted, the the modal-footer element is removed\n * @param centered - set whether the modal is centered\n * @param dismissible - set whether the dismiss button should show\n * @param backdrop - set the type of backdrop: true, false, static\n * @param keyboard - set whether the escape key closes the modal\n * @param focus - set whether the modal is autofocussed when initialized\n * @param fullscreen - set whether the modal is fullscreen\n * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string\n */\n show({\n type = 'default',\n title = '',\n content = '',\n buttons = [],\n centered = false,\n dismissible = true,\n backdrop = dismissible ? true : 'static',\n keyboard = dismissible,\n focus = true,\n fullscreen = false,\n size = ''\n }) {\n this.#count++;\n\n size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : '';\n fullscreen = fullscreen ? 'modal-fullscreen' : '';\n centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : '';\n\n const style = Bs5Utils.defaults.styles[type],\n btnCloseStyles = style.btnClose.join(' '),\n borderStyles = style.border,\n modal = document.createElement('div');\n\n modal.setAttribute('id', `modal-${this.#count}`);\n modal.setAttribute('tabindex', '-1');\n modal.classList.add('modal');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n modal.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n\n let footerHtml = '',\n buttonIds = [];\n\n if (Array.isArray(buttons) && buttons.length) {\n footerHtml += ``;\n }\n\n modal.innerHTML = `\n
\n
\n ${\n title.length\n ? `
${title}
\n ${\n dismissible\n ? ``\n : ``\n }\n
`\n : ``\n }\n ${content.length ? `
${content}
` : ``}\n ${footerHtml}\n
\n
\n `;\n\n document.body.appendChild(modal);\n\n modal.addEventListener('hidden.bs.modal', function (e) {\n e.target.remove();\n });\n\n buttonIds.forEach((value) => {\n document.getElementById(value.id).addEventListener('click', value.handler);\n });\n\n const opts = {\n backdrop,\n keyboard,\n focus\n };\n\n const bsModal = new bootstrap.Modal(modal, opts);\n\n bsModal.show();\n\n return bsModal;\n }\n}\n","import Toast from './components/Toast';\nimport Snack from './components/Snack';\nimport Modal from './components/Modal';\n\nclass Bs5Utils {\n /**\n * Default config options\n * @type {{toasts: {container: string, position: string, stacking: boolean}}}\n */\n static defaults = {\n toasts: {\n position: 'top-right',\n container: 'toast-container',\n namespace: '',\n stacking: true\n },\n\n styles: {\n secondary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-secondary'],\n border: ['border-secondary']\n },\n light: {\n btnClose: [],\n main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n white: {\n btnClose: [],\n main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'],\n border: ['border-dark']\n },\n dark: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-dark'],\n border: ['border-dark']\n },\n info: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-info'],\n border: ['border-info']\n },\n primary: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-primary'],\n border: ['border-primary']\n },\n success: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-success'],\n border: ['border-success']\n },\n warning: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-warning'],\n border: ['border-warning']\n },\n danger: {\n btnClose: ['btn-close-white'],\n main: ['text-white', 'bg-danger'],\n border: ['border-danger']\n },\n default: {\n btnClose: [],\n main: ['border-bottom'],\n border: []\n }\n }\n };\n\n constructor() {\n this.#createToastContainer();\n\n this.Toast = new Toast();\n this.Snack = new Snack();\n this.Modal = new Modal();\n }\n\n #createToastContainer() {\n let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`);\n\n if (!containerEl) {\n const positionToClass = {\n 'top-left': 'top-0 start-0 ms-1 mt-1',\n 'top-center': 'top-0 start-50 translate-middle-x mt-1',\n 'top-right': 'top-0 end-0 me-1 mt-1',\n 'middle-left': 'top-50 start-0 translate-middle-y ms-1',\n 'middle-center': 'top-50 start-50 translate-middle p-3',\n 'middle-right': 'top-50 end-0 translate-middle-y me-1',\n 'bottom-left': 'bottom-0 start-0 ms-1 mb-1',\n 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1',\n 'bottom-right': 'bottom-0 end-0 me-1 mb-1'\n };\n\n containerEl = document.createElement('div');\n containerEl.classList.add('position-relative');\n if (Bs5Utils.defaults.toasts.namespace.length > 0) {\n containerEl.classList.add(Bs5Utils.defaults.toasts.namespace);\n }\n containerEl.setAttribute('aria-live', 'polite');\n containerEl.setAttribute('aria-atomic', 'true');\n containerEl.innerHTML = `
`;\n\n document.body.appendChild(containerEl);\n }\n }\n\n /**\n * Register a style for the components\n * @param key - To reference your style\n * @param styles - The style object\n */\n static registerStyle(key, styles) {\n if (typeof styles !== 'object' && Array.isArray(styles)) {\n throw 'The styles parameter must be an object when you register component style.';\n }\n\n Bs5Utils.defaults.styles[key] = styles;\n }\n}\n\nexport { Bs5Utils as default };\n"],"names":[],"mappings":"AAEe,MAAM,KAAK,CA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7D,MAAM,MAAM,2EAA2E,CAAC;AACxF,KAAK;AACL;AACA,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;AAC3C,GAAG;AACH;;;;"} \ No newline at end of file diff --git a/dist/js/Bs5Utils.js b/dist/js/Bs5Utils.js deleted file mode 100644 index 72cefe9..0000000 --- a/dist/js/Bs5Utils.js +++ /dev/null @@ -1 +0,0 @@ -typeof exports === 'undefined' ? exports = {} : null; "use strict";function _classPrivateMethodInitSpec(t,e){_checkPrivateRedeclaration(t,e),e.add(t)}function _defineProperty(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function _classPrivateMethodGet(t,e,s){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return s}function _classPrivateFieldInitSpec(t,e,s){_checkPrivateRedeclaration(t,e),e.set(t,s)}function _checkPrivateRedeclaration(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _classPrivateFieldSet(t,e,s){return _classApplyDescriptorSet(t,_classExtractFieldDescriptor(t,e,"set"),s),s}function _classApplyDescriptorSet(t,e,s){if(e.set)e.set.call(t,s);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=s}}function _classPrivateFieldGet(t,e){return _classApplyDescriptorGet(t,_classExtractFieldDescriptor(t,e,"get"))}function _classExtractFieldDescriptor(t,e,s){if(!e.has(t))throw new TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}function _classApplyDescriptorGet(t,e){return e.get?e.get.call(t):e.value}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _count=new WeakMap;class Toast{constructor(){_classPrivateFieldInitSpec(this,_count,{writable:!0,value:0})}show({type:t,icon:e="",title:s,subtitle:a="",content:o="",buttons:i=[],delay:n=0,dismissible:r=!0}){_classPrivateFieldSet(this,_count,1+ +_classPrivateFieldGet(this,_count));const l=Bs5Utils.defaults.styles[t],d=l.btnClose.join(" "),c=l.border,b=document.createElement("div");b.setAttribute("id",`toast-${_classPrivateFieldGet(this,_count)}`),b.setAttribute("role","alert"),b.setAttribute("aria-live","assertive"),b.setAttribute("aria-atomic","true"),b.classList.add("toast","align-items-center"),c.forEach(t=>{b.classList.add(t)});let u="",m=[];Array.isArray(i)&&i.length&&(u+=`
`,i.forEach((t,e)=>{switch(t.type||"button"){case"dismiss":u+=` `;break;default:let s=`toast-${_classPrivateFieldGet(this,_count)}-button-${e}`;u+=` `,t.hasOwnProperty("handler")&&"function"==typeof t.handler&&m.push({id:s,handler:t.handler})}}),u+="
"),b.innerHTML=`
\n ${e}\n ${s}\n ${a}\n ${r?``:""}\n
\n
\n ${o}\n ${u}\n
`,Bs5Utils.defaults.toasts.stacking||document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach(t=>{t.remove()}),document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(b),b.addEventListener("hidden.bs.toast",function(t){t.target.remove()}),m.forEach(t=>{document.getElementById(t.id).addEventListener("click",t.handler)});const h={autohide:n>0&&"number"==typeof n};n>0&&"number"==typeof n&&(h.delay=n);const p=new bootstrap.Toast(b,h);return p.show(),p}}var _count2=new WeakMap;class Snack{constructor(){_classPrivateFieldInitSpec(this,_count2,{writable:!0,value:0})}show(t,e,s=0,a=!0){_classPrivateFieldSet(this,_count2,1+ +_classPrivateFieldGet(this,_count2));const o=Bs5Utils.defaults.styles[t],i=o.btnClose.join(" "),n=document.createElement("div");n.classList.add("toast","align-items-center","border-1","border-dark"),o.main.forEach(t=>{n.classList.add(t)}),n.setAttribute("id",`snack-${_classPrivateFieldGet(this,_count2)}`),n.setAttribute("role","alert"),n.setAttribute("aria-live","assertive"),n.setAttribute("aria-atomic","true"),n.innerHTML=`
\n
${e}
\n ${a?``:""}\n
`,Bs5Utils.defaults.toasts.stacking||document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach(t=>{t.remove()}),document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(n),n.addEventListener("hidden.bs.toast",function(t){t.target.remove()});const r={autohide:s>0&&"number"==typeof s};s>0&&"number"==typeof s&&(r.delay=s);const l=new bootstrap.Toast(n,r);return l.show(),l}}var _count3=new WeakMap;class Modal{constructor(){_classPrivateFieldInitSpec(this,_count3,{writable:!0,value:0})}show({type:t,title:e="",content:s="",buttons:a=[],centered:o=!1,dismissible:i=!0,backdrop:n=!!i||"static",keyboard:r=i,focus:l=!0,fullscreen:d=!1,size:c=""}){_classPrivateFieldSet(this,_count3,1+ +_classPrivateFieldGet(this,_count3)),c=["sm","lg","xl"].includes(c)?`modal-${c}`:"",d=d?"modal-fullscreen":"",o=o?"modal-dialog-centered modal-dialog-scrollable":"";const b=Bs5Utils.defaults.styles[t],u=b.btnClose.join(" "),m=b.border,h=document.createElement("div");h.setAttribute("id",`modal-${_classPrivateFieldGet(this,_count3)}`),h.setAttribute("tabindex","-1"),h.classList.add("modal");let p="",v=[];Array.isArray(a)&&a.length&&(p+=`"),h.innerHTML=` `,document.body.appendChild(h),h.addEventListener("hidden.bs.modal",function(t){t.target.remove()}),v.forEach(t=>{document.getElementById(t.id).addEventListener("click",t.handler)});const f={backdrop:n,keyboard:r,focus:l},y=new bootstrap.Modal(h,f);return y.show(),y}}var _createToastContainer=new WeakSet;class Bs5Utils{constructor(){_classPrivateMethodInitSpec(this,_createToastContainer),_classPrivateMethodGet(this,_createToastContainer,_createToastContainer2).call(this),this.Toast=new Toast,this.Snack=new Snack,this.Modal=new Modal}static registerStyle(t,e){if("object"!=typeof e&&Array.isArray(e))throw"The styles parameter must be an object when you register component style.";Bs5Utils.defaults.styles[t]=e}}function _createToastContainer2(){let t=document.querySelector(`#${Bs5Utils.defaults.toasts.container}`);if(!t){const e={"top-left":"top-0 start-0 ms-1 mt-1","top-center":"top-0 start-50 translate-middle-x mt-1","top-right":"top-0 end-0 me-1 mt-1","middle-left":"top-50 start-0 translate-middle-y ms-1","middle-center":"top-50 start-50 translate-middle p-3","middle-right":"top-50 end-0 translate-middle-y me-1","bottom-left":"bottom-0 start-0 ms-1 mb-1","bottom-center":"bottom-0 start-50 translate-middle-x mb-1","bottom-right":"bottom-0 end-0 me-1 mb-1"};(t=document.createElement("div")).classList.add("position-relative"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.innerHTML=`
`,document.body.appendChild(t)}}exports.default=Bs5Utils,_defineProperty(Bs5Utils,"defaults",{toasts:{position:"top-right",container:"toast-container",stacking:!0},styles:{secondary:{btnClose:["btn-close-white"],main:["text-white","bg-secondary"],border:["border-secondary"]},light:{btnClose:[],main:["text-dark","bg-light","border-bottom","border-dark"],border:["border-dark"]},white:{btnClose:[],main:["text-dark","bg-white","border-bottom","border-dark"],border:["border-dark"]},dark:{btnClose:["btn-close-white"],main:["text-white","bg-dark"],border:["border-dark"]},info:{btnClose:["btn-close-white"],main:["text-white","bg-info"],border:["border-info"]},primary:{btnClose:["btn-close-white"],main:["text-white","bg-primary"],border:["border-primary"]},success:{btnClose:["btn-close-white"],main:["text-white","bg-success"],border:["border-success"]},warning:{btnClose:["btn-close-white"],main:["text-white","bg-warning"],border:["border-warning"]},danger:{btnClose:["btn-close-white"],main:["text-white","bg-danger"],border:["border-danger"]}}}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c191e1e..294b311 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,10 +4,1757 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.16.7" + } + }, + "@babel/compat-data": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.8.tgz", + "integrity": "sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q==", + "dev": true + }, + "@babel/core": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.16.7.tgz", + "integrity": "sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.7", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helpers": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + } + }, + "@babel/generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.8.tgz", + "integrity": "sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.8", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", + "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz", + "integrity": "sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-validator-option": "^7.16.7", + "browserslist": "^4.17.5", + "semver": "^6.3.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz", + "integrity": "sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz", + "integrity": "sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz", + "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz", + "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", + "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz", + "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz", + "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz", + "integrity": "sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-module-transforms": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz", + "integrity": "sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", + "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", + "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-wrap-function": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helper-replace-supers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz", + "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-member-expression-to-functions": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-simple-access": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz", + "integrity": "sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", + "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "dev": true, + "requires": { + "@babel/types": "^7.16.7" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", + "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.16.7", + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.8", + "@babel/types": "^7.16.8" + } + }, + "@babel/helpers": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.16.7.tgz", + "integrity": "sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw==", + "dev": true, + "requires": { + "@babel/template": "^7.16.7", + "@babel/traverse": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/highlight": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz", + "integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.8.tgz", + "integrity": "sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw==", + "dev": true + }, + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz", + "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz", + "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-proposal-optional-chaining": "^7.16.7" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz", + "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz", + "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz", + "integrity": "sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", + "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz", + "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz", + "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz", + "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz", + "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", + "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz", + "integrity": "sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.7" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", + "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz", + "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz", + "integrity": "sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz", + "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-create-class-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz", + "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz", + "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz", + "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-remap-async-to-generator": "^7.16.8" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", + "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz", + "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz", + "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz", + "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz", + "integrity": "sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", + "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz", + "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", + "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz", + "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", + "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz", + "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", + "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz", + "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz", + "integrity": "sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-simple-access": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz", + "integrity": "sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-identifier": "^7.16.7", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz", + "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz", + "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz", + "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", + "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz", + "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", + "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz", + "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz", + "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", + "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz", + "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", + "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz", + "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz", + "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", + "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", + "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7" + } + }, + "@babel/preset-env": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.8.tgz", + "integrity": "sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.16.8", + "@babel/helper-compilation-targets": "^7.16.7", + "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-async-generator-functions": "^7.16.8", + "@babel/plugin-proposal-class-properties": "^7.16.7", + "@babel/plugin-proposal-class-static-block": "^7.16.7", + "@babel/plugin-proposal-dynamic-import": "^7.16.7", + "@babel/plugin-proposal-export-namespace-from": "^7.16.7", + "@babel/plugin-proposal-json-strings": "^7.16.7", + "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7", + "@babel/plugin-proposal-numeric-separator": "^7.16.7", + "@babel/plugin-proposal-object-rest-spread": "^7.16.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.16.7", + "@babel/plugin-proposal-optional-chaining": "^7.16.7", + "@babel/plugin-proposal-private-methods": "^7.16.7", + "@babel/plugin-proposal-private-property-in-object": "^7.16.7", + "@babel/plugin-proposal-unicode-property-regex": "^7.16.7", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.16.7", + "@babel/plugin-transform-async-to-generator": "^7.16.8", + "@babel/plugin-transform-block-scoped-functions": "^7.16.7", + "@babel/plugin-transform-block-scoping": "^7.16.7", + "@babel/plugin-transform-classes": "^7.16.7", + "@babel/plugin-transform-computed-properties": "^7.16.7", + "@babel/plugin-transform-destructuring": "^7.16.7", + "@babel/plugin-transform-dotall-regex": "^7.16.7", + "@babel/plugin-transform-duplicate-keys": "^7.16.7", + "@babel/plugin-transform-exponentiation-operator": "^7.16.7", + "@babel/plugin-transform-for-of": "^7.16.7", + "@babel/plugin-transform-function-name": "^7.16.7", + "@babel/plugin-transform-literals": "^7.16.7", + "@babel/plugin-transform-member-expression-literals": "^7.16.7", + "@babel/plugin-transform-modules-amd": "^7.16.7", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-systemjs": "^7.16.7", + "@babel/plugin-transform-modules-umd": "^7.16.7", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8", + "@babel/plugin-transform-new-target": "^7.16.7", + "@babel/plugin-transform-object-super": "^7.16.7", + "@babel/plugin-transform-parameters": "^7.16.7", + "@babel/plugin-transform-property-literals": "^7.16.7", + "@babel/plugin-transform-regenerator": "^7.16.7", + "@babel/plugin-transform-reserved-words": "^7.16.7", + "@babel/plugin-transform-shorthand-properties": "^7.16.7", + "@babel/plugin-transform-spread": "^7.16.7", + "@babel/plugin-transform-sticky-regex": "^7.16.7", + "@babel/plugin-transform-template-literals": "^7.16.7", + "@babel/plugin-transform-typeof-symbol": "^7.16.7", + "@babel/plugin-transform-unicode-escapes": "^7.16.7", + "@babel/plugin-transform-unicode-regex": "^7.16.7", + "@babel/preset-modules": "^0.1.5", + "@babel/types": "^7.16.8", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.5.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.20.2", + "semver": "^6.3.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", + "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", + "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" + } + }, + "@babel/traverse": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.8.tgz", + "integrity": "sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.16.8", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.16.7", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.16.8", + "@babel/types": "^7.16.8", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.16.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.8.tgz", + "integrity": "sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.16.7", + "to-fast-properties": "^2.0.0" + } + }, + "@rollup/plugin-babel": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.0.tgz", + "integrity": "sha512-9uIC8HZOnVLrLHxayq/PTzw+uS25E14KPUBh5ktF+18Mjo5yK0ToMMx6epY0uEgkjwJw0aBW4x2horYXh8juWw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.10.4", + "@rollup/pluginutils": "^3.1.0" + } + }, + "@rollup/plugin-node-resolve": { + "version": "13.1.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-13.1.3.tgz", + "integrity": "sha512-BdxNk+LtmElRo5d06MGY4zoepyrXX1tkzX2hrnPEZ53k78GuOMWLqmJDGIIOPwVRIFZrLQOo+Yr6KtCuLIA0AQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "@types/resolve": "1.17.1", + "builtin-modules": "^3.1.0", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.19.0" + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "17.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.8.tgz", + "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz", + "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.3.1", + "semver": "^6.1.1" + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.1.tgz", + "integrity": "sha512-TihqEe4sQcb/QcPJvxe94/9RZuLQuF1+To4WqQcRvc+3J3gLCPIPgDKzGLG6zmQLfH3nn25heRuDNkS2KR4I8A==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1", + "core-js-compat": "^3.20.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz", + "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.3.1" + } + }, "bootstrap": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.0.tgz", "integrity": "sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==" + }, + "browserslist": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.19.1.tgz", + "integrity": "sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001286", + "electron-to-chromium": "^1.4.17", + "escalade": "^3.1.1", + "node-releases": "^2.0.1", + "picocolors": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caniuse-lite": { + "version": "1.0.30001299", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz", + "integrity": "sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-js-compat": { + "version": "3.20.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.20.3.tgz", + "integrity": "sha512-c8M5h0IkNZ+I92QhIpuSijOxGAcj3lgpsWdkCqmUTZNwidujF4r3pi6x1DCN+Vcs5qTS2XWWMfWSuCqyupX8gw==", + "dev": true, + "requires": { + "browserslist": "^4.19.1", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "debug": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", + "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "electron-to-chromium": { + "version": "1.4.46", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.46.tgz", + "integrity": "sha512-UtV0xUA/dibCKKP2JMxOpDtXR74zABevuUEH4K0tvduFSIoxRVcYmQsbB51kXsFTX8MmOyWMt8tuZAlmDOqkrQ==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "is-core-module": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", + "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node-releases": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", + "integrity": "sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", + "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", + "dev": true, + "requires": { + "regenerate": "^1.4.2" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regexpu-core": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", + "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", + "dev": true, + "requires": { + "regenerate": "^1.4.2", + "regenerate-unicode-properties": "^9.0.0", + "regjsgen": "^0.5.2", + "regjsparser": "^0.7.0", + "unicode-match-property-ecmascript": "^2.0.0", + "unicode-match-property-value-ecmascript": "^2.0.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", + "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "resolve": { + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz", + "integrity": "sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA==", + "dev": true, + "requires": { + "is-core-module": "^2.8.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "rollup": { + "version": "2.64.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.64.0.tgz", + "integrity": "sha512-+c+lbw1lexBKSMb1yxGDVfJ+vchJH3qLbmavR+awDinTDA2C5Ug9u7lkOzj62SCu0PKUExsW36tpgW7Fmpn3yQ==", + "dev": true, + "requires": { + "fsevents": "~2.3.2" + } + }, + "rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "terser": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", + "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", + "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^2.0.0", + "unicode-property-aliases-ecmascript": "^2.0.0" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", + "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", + "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", + "dev": true } } } diff --git a/package.json b/package.json index 6a2bfe5..2622225 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,11 @@ "name": "bs5-utils", "version": "1.0.2", "description": "A JavaScript utility package for Bootstrap 5 components.", - "main": "src/js/Bs5Utils.js", + "main": "dist/cjs/Bs5Utils.js", + "module": "dist/esm/Bs5Utils.js", + "files": [ + "dist" + ], "repository": { "type": "git", "url": "git+https://github.com/Script47/bs5-utils.git" @@ -17,9 +21,19 @@ "url": "https://github.com/Script47/bs5-utils/issues" }, "homepage": "https://github.com/Script47/bs5-utils", - "scripts": {}, + "scripts": { + "build": "rollup -c", + "dev": "rollup -c -w" + }, "dependencies": { "bootstrap": ">=5.0" }, - "devDependencies": {} + "devDependencies": { + "@babel/core": "^7.16.7", + "@babel/preset-env": "^7.16.8", + "@rollup/plugin-babel": "^5.3.0", + "@rollup/plugin-node-resolve": "^13.1.3", + "rollup": "^2.64.0", + "rollup-plugin-terser": "^7.0.2" + } } diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..896a4c4 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,45 @@ +import { nodeResolve } from '@rollup/plugin-node-resolve'; +import { terser } from 'rollup-plugin-terser'; +import babel from '@rollup/plugin-babel'; + +const input = ['src/js/Bs5Utils.js']; + +export default [ + { + // UMD + input, + plugins: [ + nodeResolve(), + babel({ + babelHelpers: 'bundled' + }), + terser() + ], + output: { + file: `dist/Bs5Utils.min.js`, + format: 'umd', + name: 'Bs5Utils', + esModule: false, + sourcemap: true + } + }, + { + // ESM and CJS + input, + plugins: [nodeResolve()], + output: [ + { + dir: 'dist/esm', + format: 'esm', + exports: 'named', + sourcemap: true + }, + { + dir: 'dist/cjs', + format: 'cjs', + exports: 'named', + sourcemap: true + } + ] + } +]; diff --git a/src/js/Bs5Utils.js b/src/js/Bs5Utils.js index 820b23a..c33c47d 100644 --- a/src/js/Bs5Utils.js +++ b/src/js/Bs5Utils.js @@ -1,116 +1,127 @@ -import Toast from "./components/Toast"; -import Snack from "./components/Snack"; -import Modal from "./components/Modal"; +import Toast from './components/Toast'; +import Snack from './components/Snack'; +import Modal from './components/Modal'; class Bs5Utils { - /** - * Default config options - * @type {{toasts: {container: string, position: string, stacking: boolean}}} - */ - static defaults = { - toasts: { - position: 'top-right', - container: 'toast-container', - stacking: true - }, + /** + * Default config options + * @type {{toasts: {container: string, position: string, stacking: boolean}}} + */ + static defaults = { + toasts: { + position: 'top-right', + container: 'toast-container', + namespace: '', + stacking: true + }, - styles: { - secondary: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-secondary'], - border: ['border-secondary'] - }, - light: { - btnClose: [], - main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'], - border: ['border-dark'] - }, - white: { - btnClose: [], - main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'], - border: ['border-dark'] - }, - dark: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-dark'], - border: ['border-dark'] - }, - info: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-info'], - border: ['border-info'] - }, - primary: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-primary'], - border: ['border-primary'] - }, - success: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-success'], - border: ['border-success'] - }, - warning: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-warning'], - border: ['border-warning'] - }, - danger: { - btnClose: ['btn-close-white'], - main: ['text-white', 'bg-danger'], - border: ['border-danger'] - } - } + styles: { + secondary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-secondary'], + border: ['border-secondary'] + }, + light: { + btnClose: [], + main: ['text-dark', 'bg-light', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + white: { + btnClose: [], + main: ['text-dark', 'bg-white', 'border-bottom', 'border-dark'], + border: ['border-dark'] + }, + dark: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-dark'], + border: ['border-dark'] + }, + info: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-info'], + border: ['border-info'] + }, + primary: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-primary'], + border: ['border-primary'] + }, + success: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-success'], + border: ['border-success'] + }, + warning: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-warning'], + border: ['border-warning'] + }, + danger: { + btnClose: ['btn-close-white'], + main: ['text-white', 'bg-danger'], + border: ['border-danger'] + }, + default: { + btnClose: [], + main: ['border-bottom'], + border: [] + } } + }; - constructor() { - this.#createToastContainer(); + constructor() { + this.#createToastContainer(); - this.Toast = new Toast(); - this.Snack = new Snack(); - this.Modal = new Modal(); - } + this.Toast = new Toast(); + this.Snack = new Snack(); + this.Modal = new Modal(); + } - #createToastContainer() { - let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`); + #createToastContainer() { + let containerEl = document.querySelector(`#${Bs5Utils.defaults.toasts.container}`); - if (!containerEl) { - const positionToClass = { - 'top-left': 'top-0 start-0 ms-1 mt-1', - 'top-center': 'top-0 start-50 translate-middle-x mt-1', - 'top-right': 'top-0 end-0 me-1 mt-1', - 'middle-left': 'top-50 start-0 translate-middle-y ms-1', - 'middle-center': 'top-50 start-50 translate-middle p-3', - 'middle-right': 'top-50 end-0 translate-middle-y me-1', - 'bottom-left': 'bottom-0 start-0 ms-1 mb-1', - 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1', - 'bottom-right': 'bottom-0 end-0 me-1 mb-1' - }; + if (!containerEl) { + const positionToClass = { + 'top-left': 'top-0 start-0 ms-1 mt-1', + 'top-center': 'top-0 start-50 translate-middle-x mt-1', + 'top-right': 'top-0 end-0 me-1 mt-1', + 'middle-left': 'top-50 start-0 translate-middle-y ms-1', + 'middle-center': 'top-50 start-50 translate-middle p-3', + 'middle-right': 'top-50 end-0 translate-middle-y me-1', + 'bottom-left': 'bottom-0 start-0 ms-1 mb-1', + 'bottom-center': 'bottom-0 start-50 translate-middle-x mb-1', + 'bottom-right': 'bottom-0 end-0 me-1 mb-1' + }; - containerEl = document.createElement('div'); - containerEl.classList.add('position-relative'); - containerEl.setAttribute('aria-live', 'polite'); - containerEl.setAttribute('aria-atomic', 'true'); - containerEl.innerHTML = `
`; + containerEl = document.createElement('div'); + containerEl.classList.add('position-relative'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + containerEl.classList.add(Bs5Utils.defaults.toasts.namespace); + } + containerEl.setAttribute('aria-live', 'polite'); + containerEl.setAttribute('aria-atomic', 'true'); + containerEl.innerHTML = `
`; - document.body.appendChild(containerEl); - } + document.body.appendChild(containerEl); } + } - /** - * Register a style for the components - * @param key - To reference your style - * @param styles - The style object - */ - static registerStyle(key, styles) { - if (typeof styles !== 'object' && Array.isArray(styles)) { - throw 'The styles parameter must be an object when you register component style.' - } - - Bs5Utils.defaults.styles[key] = styles; + /** + * Register a style for the components + * @param key - To reference your style + * @param styles - The style object + */ + static registerStyle(key, styles) { + if (typeof styles !== 'object' && Array.isArray(styles)) { + throw 'The styles parameter must be an object when you register component style.'; } + + Bs5Utils.defaults.styles[key] = styles; + } } -export { - Bs5Utils as default -}; \ No newline at end of file +export { Bs5Utils as default }; diff --git a/src/js/components/Modal.js b/src/js/components/Modal.js index 12ca696..a77e0fb 100644 --- a/src/js/components/Modal.js +++ b/src/js/components/Modal.js @@ -1,116 +1,128 @@ -import Bs5Utils from "../Bs5Utils"; +import Bs5Utils from '../Bs5Utils'; export default class Modal { - /** - * A counter for the Modals - * @type {number} - */ - #count = 0; - - /** - * Display a modal - * @param type - the theme of the snack - * @param title - the title of the modal, if omitted, the modal-header element is removed - * @param content - the content of the modal, if omitted, the modal-body element is removed - * @param buttons - any action buttons, if omitted, the the modal-footer element is removed - * @param centered - set whether the modal is centered - * @param dismissible - set whether the dismiss button should show - * @param backdrop - set the type of backdrop: true, false, static - * @param keyboard - set whether the escape key closes the modal - * @param focus - set whether the modal is autofocussed when initialized - * @param fullscreen - set whether the modal is fullscreen - * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string - */ - show({ - type, - title = '', - content = '', - buttons = [], - centered = false, - dismissible = true, - backdrop = dismissible ? true : 'static', - keyboard = dismissible, - focus = true, - fullscreen = false, - size = '' - }) { - this.#count++; - - size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : ''; - fullscreen = fullscreen ? 'modal-fullscreen' : ''; - centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : ''; - - const style = Bs5Utils.defaults.styles[type], - btnCloseStyles = style.btnClose.join(' '), - borderStyles = style.border, - modal = document.createElement('div'); - - modal.setAttribute('id', `modal-${this.#count}`) - modal.setAttribute('tabindex', '-1'); - modal.classList.add('modal'); - - let footerHtml = '', - buttonIds = []; - - if (Array.isArray(buttons) && buttons.length) { - footerHtml += ``; - } + /** + * A counter for the Modals + * @type {number} + */ + #count = 0; + + /** + * Display a modal + * @param type - the theme of the snack + * @param title - the title of the modal, if omitted, the modal-header element is removed + * @param content - the content of the modal, if omitted, the modal-body element is removed + * @param buttons - any action buttons, if omitted, the the modal-footer element is removed + * @param centered - set whether the modal is centered + * @param dismissible - set whether the dismiss button should show + * @param backdrop - set the type of backdrop: true, false, static + * @param keyboard - set whether the escape key closes the modal + * @param focus - set whether the modal is autofocussed when initialized + * @param fullscreen - set whether the modal is fullscreen + * @param modalSize - set the size of the modal: sm, lg, xl by default, it's an empty string + */ + show({ + type = 'default', + title = '', + content = '', + buttons = [], + centered = false, + dismissible = true, + backdrop = dismissible ? true : 'static', + keyboard = dismissible, + focus = true, + fullscreen = false, + size = '' + }) { + this.#count++; + + size = ['sm', 'lg', 'xl'].includes(size) ? `modal-${size}` : ''; + fullscreen = fullscreen ? 'modal-fullscreen' : ''; + centered = centered ? 'modal-dialog-centered modal-dialog-scrollable' : ''; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + modal = document.createElement('div'); + + modal.setAttribute('id', `modal-${this.#count}`); + modal.setAttribute('tabindex', '-1'); + modal.classList.add('modal'); + if (Bs5Utils.defaults.toasts.namespace.length > 0) { + modal.classList.add(Bs5Utils.defaults.toasts.namespace); + } - modal.innerHTML = ` `; + let footerHtml = '', + buttonIds = []; - document.body.appendChild(modal); + if (Array.isArray(buttons) && buttons.length) { + footerHtml += ``; } -} \ No newline at end of file + + modal.innerHTML = ` + + `; + + document.body.appendChild(modal); + + modal.addEventListener('hidden.bs.modal', function (e) { + e.target.remove(); + }); + + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); + + const opts = { + backdrop, + keyboard, + focus + }; + + const bsModal = new bootstrap.Modal(modal, opts); + + bsModal.show(); + + return bsModal; + } +} diff --git a/src/js/components/Snack.js b/src/js/components/Snack.js index 7ce167a..a7551aa 100644 --- a/src/js/components/Snack.js +++ b/src/js/components/Snack.js @@ -1,63 +1,71 @@ -import Bs5Utils from "../Bs5Utils"; +import Bs5Utils from '../Bs5Utils'; export default class Snack { - /** - * A counter for the Snacks - * @type {number} - */ - #count = 0; - - /** - * Display a lightweight toast - * @param type - the theme of the snack - * @param title - the title of the of the snack - * @param delay - in ms, if specified the snack will autohide after the specified amount - * @param dismissible - set whether the dismiss button should show - */ - show(type, title, delay = 0, dismissible = true) { - this.#count++; - - const style = Bs5Utils.defaults.styles[type], - btnCloseStyle = style.btnClose.join(' '), - snack = document.createElement('div'); - - snack.classList.add('toast', 'align-items-center', 'border-1', 'border-dark'); - style.main.forEach(value => { - snack.classList.add(value); - }); - snack.setAttribute('id', `snack-${this.#count}`); - snack.setAttribute('role', 'alert'); - snack.setAttribute('aria-live', 'assertive'); - snack.setAttribute('aria-atomic', 'true'); - snack.innerHTML = `
-
${title}
- ${dismissible ? `` : ''} -
`; - - if (!Bs5Utils.defaults.toasts.stacking) { - document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { - toast.remove(); - }); - } - - document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack); + /** + * A counter for the Snacks + * @type {number} + */ + #count = 0; - snack.addEventListener('hidden.bs.toast', function (e) { - e.target.remove(); - }); + /** + * Display a lightweight toast + * @param type - the theme of the snack + * @param title - the title of the of the snack + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + * @param icon - Set an icon in the left of the message, pass HTML directly + */ + show(type, title, delay = 0, dismissible = true, icon = '') { + this.#count++; - const opts = { - autohide: (delay > 0 && typeof delay === 'number'), - }; + const style = Bs5Utils.defaults.styles[type], + btnCloseStyle = style.btnClose.join(' '), + snack = document.createElement('div'); - if (delay > 0 && typeof delay === 'number') { - opts['delay'] = delay; + snack.classList.add('toast', 'align-items-center', 'border-0'); + style.main.forEach((value) => { + snack.classList.add(value); + }); + snack.setAttribute('id', `snack-${this.#count}`); + snack.setAttribute('role', 'alert'); + snack.setAttribute('aria-live', 'assertive'); + snack.setAttribute('aria-atomic', 'true'); + snack.innerHTML = ` +
+ ${icon} +
${title}
+ ${ + dismissible + ? `` + : '' } +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } - const bsSnack = new bootstrap.Toast(snack, opts); + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(snack); - bsSnack.show(); + snack.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); - return bsSnack; + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; + + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; } -} \ No newline at end of file + + const bsSnack = new bootstrap.Toast(snack, opts); + + bsSnack.show(); + + return bsSnack; + } +} diff --git a/src/js/components/Toast.js b/src/js/components/Toast.js index e902340..2886f3d 100644 --- a/src/js/components/Toast.js +++ b/src/js/components/Toast.js @@ -1,120 +1,117 @@ -import Bs5Utils from "../Bs5Utils"; +import Bs5Utils from '../Bs5Utils'; export default class Toast { - /** - * A counter for the Toasts - * @type {number} - */ - #count = 0; - - /** - * Display a toast for alerts - * @param type - the theme of the snack - * @param icon - Set an icon in the top-left corner, you can pass HTML directly - * @param title - the title of the of the toast - * @param subtitle - the subtitle of the toast - * @param content - the content of the toast - * @param buttons - the action buttons of the toast - * @param delay - in ms, if specified the snack will autohide after the specified amount - * @param dismissible - set whether the dismiss button should show - */ - show({ - type, - icon = '', - title, - subtitle = '', - content = '', - buttons = [], - delay = 0, - dismissible = true - }) { - this.#count++; - - const style = Bs5Utils.defaults.styles[type], - btnCloseStyles = style.btnClose.join(' '), - borderStyles = style.border, - toast = document.createElement('div'); - - toast.setAttribute('id', `toast-${this.#count}`); - toast.setAttribute('role', 'alert'); - toast.setAttribute('aria-live', 'assertive'); - toast.setAttribute('aria-atomic', 'true'); - - toast.classList.add('toast', 'align-items-center'); - borderStyles.forEach(value => { - toast.classList.add(value); - }); - - let buttonsHtml = ``, - buttonIds = []; - - if (Array.isArray(buttons) && buttons.length) { - buttonsHtml += `
`; - - buttons.forEach((button, key) => { - const type = button.type || 'button'; - - switch (type) { - case 'dismiss': - buttonsHtml += ` `; - break; - - default: - let id = `toast-${this.#count}-button-${key}`; - - buttonsHtml += ` `; - - if (button.hasOwnProperty('handler') && typeof button.handler === 'function') { - buttonIds.push({ - id, - handler: button.handler - }); - } - } - }); - - buttonsHtml += `
`; + /** + * A counter for the Toasts + * @type {number} + */ + #count = 0; + + /** + * Display a toast for alerts + * @param type - the theme of the snack + * @param icon - Set an icon in the top-left corner, you can pass HTML directly + * @param title - the title of the of the toast + * @param subtitle - the subtitle of the toast + * @param content - the content of the toast + * @param buttons - the action buttons of the toast + * @param delay - in ms, if specified the snack will autohide after the specified amount + * @param dismissible - set whether the dismiss button should show + */ + show({ type, icon = '', title, subtitle = '', content = '', buttons = [], delay = 0, dismissible = true }) { + this.#count++; + + const style = Bs5Utils.defaults.styles[type], + btnCloseStyles = style.btnClose.join(' '), + borderStyles = style.border, + toast = document.createElement('div'); + + toast.setAttribute('id', `toast-${this.#count}`); + toast.setAttribute('role', 'alert'); + toast.setAttribute('aria-live', 'assertive'); + toast.setAttribute('aria-atomic', 'true'); + + toast.classList.add('toast', 'align-items-center'); + borderStyles.forEach((value) => { + toast.classList.add(value); + }); + + let buttonsHtml = ``, + buttonIds = []; + + if (Array.isArray(buttons) && buttons.length) { + buttonsHtml += `
`; + + buttons.forEach((button, key) => { + const type = button.type || 'button'; + + switch (type) { + case 'dismiss': + buttonsHtml += ` `; + break; + + default: + let id = `toast-${this.#count}-button-${key}`; + + buttonsHtml += ` `; + + if (button.hasOwnProperty('handler') && typeof button.handler === 'function') { + buttonIds.push({ + id, + handler: button.handler + }); + } } + }); - toast.innerHTML = `
- ${icon} - ${title} - ${subtitle} - ${dismissible ? `` : ''} -
-
- ${content} - ${buttonsHtml} -
`; - - if (!Bs5Utils.defaults.toasts.stacking) { - document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { - toast.remove(); - }); - } + buttonsHtml += `
`; + } - document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast); + toast.innerHTML = ` +
+ ${icon} + ${title} + ${subtitle} + ${ + dismissible + ? `` + : '' + } +
+
+ ${content} + ${buttonsHtml} +
+ `; + + if (!Bs5Utils.defaults.toasts.stacking) { + document.querySelectorAll(`#${Bs5Utils.defaults.toasts.container} .toast`).forEach((toast) => { + toast.remove(); + }); + } - toast.addEventListener('hidden.bs.toast', function (e) { - e.target.remove(); - }); + document.querySelector(`#${Bs5Utils.defaults.toasts.container}`).appendChild(toast); - buttonIds.forEach(value => { - document.getElementById(value.id).addEventListener('click', value.handler) - }); + toast.addEventListener('hidden.bs.toast', function (e) { + e.target.remove(); + }); - const opts = { - autohide: (delay > 0 && typeof delay === 'number'), - }; + buttonIds.forEach((value) => { + document.getElementById(value.id).addEventListener('click', value.handler); + }); - if (delay > 0 && typeof delay === 'number') { - opts['delay'] = delay; - } + const opts = { + autohide: delay > 0 && typeof delay === 'number' + }; - const bsToast = new bootstrap.Toast(toast, opts); + if (delay > 0 && typeof delay === 'number') { + opts['delay'] = delay; + } - bsToast.show(); + const bsToast = new bootstrap.Toast(toast, opts); - return bsToast; - } -} \ No newline at end of file + bsToast.show(); + + return bsToast; + } +}