Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jenesius-vue-modal

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jenesius-vue-modal - npm Package Compare versions

Comparing version 1.11.4 to 1.11.5

4

dist/jenesius-vue-modal.cjs.js
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".modal-container{position:fixed;left:0;top:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background-color:#3e3e3e21;cursor:pointer}.modal-item{cursor:default}.modal-list-enter-active,.modal-list-leave-active,.modal-list-enter-active .modal-item,.modal-list-leave-active .modal-item{transition:all .2s ease}.modal-list-enter-from,.modal-list-leave-to{opacity:0!important}.modal-list-enter-from .modal-item,.modal-list-leave-to .modal-item{transform:translateY(-60px)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
"use strict";/*!
* jenesius-vue-modal v1.11.4
* jenesius-vue-modal v1.11.5
* (c) 2024 Jenesius
* @license MIT
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue");var j=function(n,t){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])},j(n,t)};function ee(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");j(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function k(n,t,e,a){function r(i){return i instanceof e?i:new e(function(c){c(i)})}return new(e||(e=Promise))(function(i,c){function f(o){try{s(a.next(o))}catch(u){c(u)}}function d(o){try{s(a.throw(o))}catch(u){c(u)}}function s(o){o.done?i(o.value):r(o.value).then(f,d)}s((a=a.apply(n,t||[])).next())})}function S(n,t){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,r,i,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(s){return function(o){return d([s,o])}}function d(s){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(e=0)),e;)try{if(a=1,r&&(i=s[0]&2?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,r=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(i=e.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){e.label=s[1];break}if(s[0]===6&&e.label<i[1]){e.label=i[1],i=s;break}if(i&&e.label<i[2]){e.label=i[2],e.ops.push(s);break}i[2]&&e.ops.pop(),e.trys.pop();continue}s=t.call(n,e)}catch(o){s=[6,o],r=0}finally{a=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var g=function(n){ee(t,n);function t(e,a){a===void 0&&(a=null);var r=n.call(this)||this;return r.isModalError=!0,r.message=e,r.details=a,r}return t.Undefined=function(e){return new t("Modal with id: ".concat(e," not founded. The modal window may have been closed earlier."))},t.UndefinedGuardName=function(e){return new t("Guard's name ".concat(e," is not declaration."))},t.NextReject=function(e){return new t("Guard returned false. Modal navigation was stopped. Modal id ".concat(e))},t.GuardDeclarationType=function(e){return new t("Guard's type should be a function. Provided:",e)},t.ConfigurationType=function(e){return new t("Configuration type must be an Object. Provided",e)},t.ConfigurationUndefinedParam=function(e,a){return new t("In configuration founded unknown parameter: ".concat(e,". Available are ").concat(a.join(", ")," "))},t.QueueNoEmpty=function(){return new t("Modal's queue is not empty. Probably some modal reject closing by onClose hook.")},t.EmptyModalQueue=function(){return new t("Modal queue is empty.")},t.NotInitialized=function(e){return new t("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(e,". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."))},t.ModalComponentNotProvided=function(){return new t("The first parameter(VueComponent) was not specified.")},t.DuplicatedRouterIntegration=function(){return new t("useModalRouter.init should escaped only once.")},t.ModalRouterIntegrationNotInitialized=function(){return new t("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation")},t.ModalEventNameMustBeString=function(e){return new t("Event name must be a string. Provided: ".concat(e))},t.ModalNotFoundByID=function(e){return new t("Modal with ID ".concat(e," was not found."))},t.ModalNotExistsInStore=function(e){return new t("Provided name(".concat(e,") don't exist in the store. Has the given name been added to the store?"))},t}(Error),E=function(){function n(){this.state=new Map,n.instance=this}return n.prototype.getByName=function(t){return t===void 0&&(t=n.DEFAULT_NAMESPACE),this.state.has(t)||this.state.set(t,{queue:m.reactive([]),initialized:!1}),this.state.get(t)},n.prototype.forceClean=function(){this.state.forEach(function(t){t.queue.splice(0,t.queue.length)})},n.DEFAULT_NAMESPACE="default",n}(),G=function(){var n=new E,t={scrollLock:!0,animation:"modal-list",backgroundClose:!0,escClose:!0,store:{},skipInitCheck:!1,draggable:!1},e=n.getByName().queue;return m.watch(function(){return e},function(){t.scrollLock&&(e.length?document.body.style.overflowY="hidden":document.body.style.overflowY="auto")},{deep:!0}),{namespaceStore:n,configuration:t}}();function y(n){return G.namespaceStore.getByName(n)}var _=G.configuration;function Q(n){var t={backgroundClose:_.backgroundClose,isRoute:!1,namespace:E.DEFAULT_NAMESPACE,draggable:_.draggable};return n.backgroundClose!==void 0&&(t.backgroundClose=n.backgroundClose),n.isRoute&&(t.isRoute=n.isRoute),n.namespace&&(t.namespace=n.namespace),n.draggable!==void 0&&(t.draggable=n.draggable),t}function L(n){n===void 0&&(n={});var t={background:!1,esc:!1};return Object.assign(t,n)}function Y(n){return n||(n={}),n}function T(n,t){t===void 0&&(t={});var e=I.STORE.get(n);if(!e)return Promise.reject(g.ModalNotFoundByID(n));var a=y(e.namespace),r=a.queue.findIndex(function(c){return c.id===n});if(r===-1)return Promise.reject(g.Undefined(n));var i=w.get(n,"close").map(function(c){return ne(c,n,L(t))});return X(i).then(function(){a.queue.splice(r,1)}).then(function(){w.get(n,"destroy").forEach(function(c){return c(L(t))})}).then(function(){w.delete(n)})}var I=function(){function n(t,e,a){var r=this;this.events=m.reactive({}),this.backgroundClose=!0,this.isRoute=!1,this.id=n.modalId++,this.component=t,this.props=m.ref(e),this.closed=m.computed(function(){return!y(a.namespace).queue.includes(r)}),t.beforeModalClose&&w.add(this.id,"close",t.beforeModalClose);var i=Q(a);this.backgroundClose=i.backgroundClose,this.isRoute=i.isRoute,this.namespace=i.namespace,this.draggable=i.draggable,n.STORE.set(this.id,this)}return n.prototype.close=function(){return T(this.id)},Object.defineProperty(n.prototype,"onclose",{set:function(t){w.add(this.id,"close",t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ondestroy",{set:function(t){w.add(this.id,"destroy",t)},enumerable:!1,configurable:!0}),n.prototype.on=function(t,e){var a=this;return Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(e),function(){var r=a.events[t].indexOf(e);r!==-1&&a.events[t].splice(r,1)}},n.STORE=new Map,n.modalId=0,n.EVENT_PROMPT="jenesius-vue-modal:____P____R____O____M____P____T",n}();function W(n){return I.STORE.get(n)}var te={store:{},add:function(n,t,e){var a,r;if(typeof e!="function")throw g.GuardDeclarationType(e);this.store[n]||(this.store[n]=(a={},a[t]=[],a)),this.store[n][t]||(this.store[n][t]=[]),(r=this.store[n][t])===null||r===void 0||r.push(e)},get:function(n,t){return n in this.store?t in this.store[n]?this.store[n][t]||[]:[]:[]},delete:function(n){n in this.store&&delete this.store[n]}};const w=te;function X(n){return n.reduce(function(t,e){return t.then(function(){return e()})},Promise.resolve())}function ne(n,t,e){return function(){return new Promise(function(a,r){var i,c=function(f){f===void 0&&(f=!0),f===!1&&r(g.NextReject(t)),a()};Promise.resolve(n.call((i=W(t))===null||i===void 0?void 0:i.instance,e)).then(c).catch(function(f){return r(f)})})}}function J(n){return n=Y(n),X(y(n.namespace).queue.map(function(t){return function(){return t.close()}}))}function q(n){var t=y(n),e=t.queue;if(e.length!==0)return e[e.length-1]}function re(n){n=Y(n);var t=q(n.namespace);return t?t.close():Promise.resolve()}function oe(n,t,e){var a=Q(e),r=y(a.namespace);if(a.namespace===E.DEFAULT_NAMESPACE&&!r.initialized&&!_.skipInitCheck)throw g.NotInitialized(a.namespace);if(typeof n=="string"){var i=Z(n);if(!i)throw g.ModalNotExistsInStore(n);n=i}if(!n)throw g.ModalComponentNotProvided();var c=new I(n,t,a);return r.queue.push(m.markRaw(c)),c}function B(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),Promise.resolve().then(function(){return oe(n,t,e)})}function H(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),J({namespace:e.namespace}).then(function(){var a=y(e.namespace);if(a.queue.length)throw g.QueueNoEmpty()}).then(function(){return B(n,t,e)})}function ie(n){if(typeof n!="object")throw g.ConfigurationType(n);Object.assign(_,n)}function ae(n){var t,e,a,r=m.getCurrentInstance(),i=String(((t=r==null?void 0:r.props)===null||t===void 0?void 0:t.modalId)||((e=r==null?void 0:r.props)===null||e===void 0?void 0:e["modal-id"])||((a=r==null?void 0:r.attrs)===null||a===void 0?void 0:a.modalId)),c=i.replace(/[^0-9]/g,"");w.add(Number(c),"close",n)}function ue(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),k(this,void 0,void 0,function(){var a,r,i=this;return S(this,function(c){switch(c.label){case 0:return[4,B(n,t,e)];case 1:return a=c.sent(),r=!1,[2,new Promise(function(f){a.on(I.EVENT_PROMPT,function(d){return k(i,void 0,void 0,function(){return S(this,function(s){return r=!0,[2,a.close().then(function(){return f(d)}).catch(function(){return r=!1})]})})}),a.ondestroy=function(){r||f(null)}})]}})})}function Z(n){return _.store[n]||void 0}function se(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var D={exports:{}},x,z;function ce(){if(z)return x;z=1;var n=1e3,t=n*60,e=t*60,a=e*24,r=a*7,i=a*365.25;x=function(o,u){u=u||{};var l=typeof o;if(l==="string"&&o.length>0)return c(o);if(l==="number"&&isFinite(o))return u.long?d(o):f(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function c(o){if(o=String(o),!(o.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(u){var l=parseFloat(u[1]),p=(u[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*r;case"days":case"day":case"d":return l*a;case"hours":case"hour":case"hrs":case"hr":case"h":return l*e;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function f(o){var u=Math.abs(o);return u>=a?Math.round(o/a)+"d":u>=e?Math.round(o/e)+"h":u>=t?Math.round(o/t)+"m":u>=n?Math.round(o/n)+"s":o+"ms"}function d(o){var u=Math.abs(o);return u>=a?s(o,u,a,"day"):u>=e?s(o,u,e,"hour"):u>=t?s(o,u,t,"minute"):u>=n?s(o,u,n,"second"):o+" ms"}function s(o,u,l,p){var F=u>=l*1.5;return Math.round(o/l)+" "+p+(F?"s":"")}return x}function le(n){e.debug=e,e.default=e,e.coerce=d,e.disable=i,e.enable=r,e.enabled=c,e.humanize=ce(),e.destroy=s,Object.keys(n).forEach(o=>{e[o]=n[o]}),e.names=[],e.skips=[],e.formatters={};function t(o){let u=0;for(let l=0;l<o.length;l++)u=(u<<5)-u+o.charCodeAt(l),u|=0;return e.colors[Math.abs(u)%e.colors.length]}e.selectColor=t;function e(o){let u,l=null,p,F;function v(...h){if(!v.enabled)return;const C=v,M=Number(new Date),O=M-(u||M);C.diff=O,C.prev=u,C.curr=M,u=M,h[0]=e.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let b=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(P,R)=>{if(P==="%%")return"%";b++;const N=e.formatters[R];if(typeof N=="function"){const K=h[b];P=N.call(C,K),h.splice(b,1),b--}return P}),e.formatArgs.call(C,h),(C.log||e.log).apply(C,h)}return v.namespace=o,v.useColors=e.useColors(),v.color=e.selectColor(o),v.extend=a,v.destroy=e.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(p!==e.namespaces&&(p=e.namespaces,F=e.enabled(o)),F),set:h=>{l=h}}),typeof e.init=="function"&&e.init(v),v}function a(o,u){const l=e(this.namespace+(typeof u>"u"?":":u)+o);return l.log=this.log,l}function r(o){e.save(o),e.namespaces=o,e.names=[],e.skips=[];let u;const l=(typeof o=="string"?o:"").split(/[\s,]+/),p=l.length;for(u=0;u<p;u++)l[u]&&(o=l[u].replace(/\*/g,".*?"),o[0]==="-"?e.skips.push(new RegExp("^"+o.slice(1)+"$")):e.names.push(new RegExp("^"+o+"$")))}function i(){const o=[...e.names.map(f),...e.skips.map(f).map(u=>"-"+u)].join(",");return e.enable(""),o}function c(o){if(o[o.length-1]==="*")return!0;let u,l;for(u=0,l=e.skips.length;u<l;u++)if(e.skips[u].test(o))return!1;for(u=0,l=e.names.length;u<l;u++)if(e.names[u].test(o))return!0;return!1}function f(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}function d(o){return o instanceof Error?o.stack||o.message:o}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}var de=le;(function(n,t){t.formatArgs=a,t.save=r,t.load=i,t.useColors=e,t.storage=c(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function e(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;d.splice(1,0,s,"color: inherit");let o=0,u=0;d[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(o++,l==="%c"&&(u=o))}),d.splice(u,0,s)}t.log=console.debug||console.log||(()=>{});function r(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function i(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof process<"u"&&"env"in process&&(d=process.env.DEBUG),d}function c(){try{return localStorage}catch{}}n.exports=de(t);const{formatters:f}=n.exports;f.j=function(d){try{return JSON.stringify(d)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}})(D,D.exports);var fe=D.exports;const me=se(fe);function he(n){return me("jenesius-vue-modal:".concat(n))}const ve=["onPointerdown"],U={__name:"WidgetModalContainerItem",props:{id:Number},setup(n){const t=m.ref(null),e=he("modal-item"),a=n,r=W(a.id);function i(){if(r.backgroundClose)return T(r.id,{background:!0}).catch(()=>{})}m.watch(()=>t.value,f=>{r.instance=f}),m.onMounted(()=>{if(e(`Modal(${r.id}) is mounted`),r.draggable){const f=typeof r.draggable=="string"?r.draggable:`[modalid=_modal_${a.id}]`;e(`The modal window is movable(${f}).`),setTimeout(()=>{c(document.querySelector(f))},0)}});function c(f){if(!f){e("draggable item not found.");return}const d=document.querySelector(`[modalid=_modal_${a.id}]`);f.addEventListener("pointerdown",s=>{var O;const o=(O=d.getAttribute("style"))==null?void 0:O.match(/transform: translate\((.*)px,\s*(.*)px\)/);let u=o==null?void 0:o[1],l=o==null?void 0:o[2];u=typeof u=="string"?Number.parseInt(u):0,l=typeof l=="string"?Number.parseInt(l):0;const{clientX:p,clientY:F}=s,v=p,h=F;e(`movement started at (${h}, ${h})`),document.addEventListener("pointermove",C,{passive:!0}),document.addEventListener("pointerup",M,{once:!0});function C(b){const{clientX:$,clientY:P}=b,R=u+$-v,N=l+P-h;e(`move at (${R}, ${N})`),d.style.transform=`translate(${R}px,${N}px)`}function M(b){e("movement completed"),document.removeEventListener("pointermove",C),b.preventDefault()}})}return(f,d)=>(m.openBlock(),m.createElementBlock("div",{class:"widget__modal-container__item modal-container",onPointerdown:m.withModifiers(i,["self","stop"])},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(m.unref(r).component),m.mergeProps(m.unref(r).props.value,{class:"modal-item widget__modal-wrap",modalId:`_modal_${n.id}`,ref_key:"modalRef",ref:t},m.toHandlers(m.unref(r).events)),null,16,["modalId"]))],40,ve))}};function ge(n){n===void 0&&(n=E.DEFAULT_NAMESPACE);var t=E.instance.getByName(n);t.initialized=!0,n===E.DEFAULT_NAMESPACE&&document.addEventListener("keyup",function(e){if(_.escClose&&(e.key==="Escape"||e.code==="Escape")){var a=q(n);if(!a)return;T(a.id,{esc:!0}).catch(function(){})}})}const pe={props:{namespace:String},setup(n){return m.onMounted(()=>{ge(n.namespace)}),()=>{const t=y(n.namespace);return m.h(m.TransitionGroup,{name:_.animation,tag:"div"},{default:()=>t.queue.map(e=>m.h(U,{key:e.id,id:e.id}))})}},components:{WidgetContainerModalItem:U}};var A={router:null};function Ce(n){var t=this;if(A.router)throw g.DuplicatedRouterIntegration();A.router=n;function e(a){for(var r=a.matched.length-1;r>=0;r--){var i=a.matched[r].components,c=Object.values(i).find(function(f){return f._isModal});if(c)return c}return null}n.beforeEach(function(a,r){return k(t,void 0,void 0,function(){var i,c,f;return S(this,function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),i=e(r),i&&!(!((f=(c=i.getModalObject())===null||c===void 0?void 0:c.closed)===null||f===void 0)&&f.value)?[4,i.close(!0)]:[3,2];case 1:d.sent(),d.label=2;case 2:return[3,4];case 3:return d.sent(),[2,!1];case 4:return[2]}})})}),n.afterEach(function(a){return k(t,void 0,void 0,function(){var r;return S(this,function(i){switch(i.label){case 0:return r=e(a),r?[4,r.initialize()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})})}function V(n){var t=null,e=!1;function a(){return k(this,void 0,void 0,function(){return S(this,function(r){switch(r.label){case 0:if(!A.router)throw g.ModalRouterIntegrationNotInitialized();return e=!1,t=null,[4,H(n,m.computed(function(){var i;return(i=A.router)===null||i===void 0?void 0:i.currentRoute.value.params}),{isRoute:!0})];case 1:return t=r.sent(),t.onclose=function(){var i;e||(i=A.router)===null||i===void 0||i.back()},[2]}})})}return{getModalObject:function(){return t},_isModal:!0,close:function(r){return r===void 0&&(r=!1),k(this,void 0,void 0,function(){return S(this,function(i){switch(i.label){case 0:return e=r,t?[4,t.close()]:[3,2];case 1:return[2,i.sent()];case 2:return[2]}})})},initialize:a,setup:function(){return function(){return null}}}}V.init=Ce;var ye=y().queue;function be(n){return y(n).queue}exports.Modal=I;exports.closeById=T;exports.closeModal=J;exports.config=ie;exports.container=pe;exports.getComponentFromStore=Z;exports.getCurrentModal=q;exports.getQueueByNamespace=be;exports.modalQueue=ye;exports.onBeforeModalClose=ae;exports.openModal=H;exports.popModal=re;exports.promptModal=ue;exports.pushModal=B;exports.useModalRouter=V;
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue");var D=function(n,e){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},D(n,e)};function ne(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");D(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function S(n,e,t,r){function a(i){return i instanceof t?i:new t(function(l){l(i)})}return new(t||(t=Promise))(function(i,l){function f(o){try{s(r.next(o))}catch(u){l(u)}}function c(o){try{s(r.throw(o))}catch(u){l(u)}}function s(o){o.done?i(o.value):a(o.value).then(f,c)}s((r=r.apply(n,e||[])).next())})}function P(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,l;return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(s){return function(o){return c([s,o])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(t=0)),t;)try{if(r=1,a&&(i=s[0]&2?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1],i=s;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(s);break}i[2]&&t.ops.pop(),t.trys.pop();continue}s=e.call(n,t)}catch(o){s=[6,o],a=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var C=function(n){ne(e,n);function e(t,r){r===void 0&&(r=null);var a=n.call(this)||this;return a.isModalError=!0,a.message=t,a.details=r,a}return e.Undefined=function(t){return new e("Modal with id: ".concat(t," not founded. The modal window may have been closed earlier."))},e.UndefinedGuardName=function(t){return new e("Guard's name ".concat(t," is not declaration."))},e.NextReject=function(t){return new e("Guard returned false. Modal navigation was stopped. Modal id ".concat(t))},e.GuardDeclarationType=function(t){return new e("Guard's type should be a function. Provided:",t)},e.ConfigurationType=function(t){return new e("Configuration type must be an Object. Provided",t)},e.ConfigurationUndefinedParam=function(t,r){return new e("In configuration founded unknown parameter: ".concat(t,". Available are ").concat(r.join(", ")," "))},e.QueueNoEmpty=function(){return new e("Modal's queue is not empty. Probably some modal reject closing by onClose hook.")},e.EmptyModalQueue=function(){return new e("Modal queue is empty.")},e.NotInitialized=function(t){return new e("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(t,". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."))},e.ModalComponentNotProvided=function(){return new e("The first parameter(VueComponent) was not specified.")},e.DuplicatedRouterIntegration=function(){return new e("useModalRouter.init should escaped only once.")},e.ModalRouterIntegrationNotInitialized=function(){return new e("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation")},e.ModalEventNameMustBeString=function(t){return new e("Event name must be a string. Provided: ".concat(t))},e.ModalNotFoundByID=function(t){return new e("Modal with ID ".concat(t," was not found."))},e.ModalNotExistsInStore=function(t){return new e("Provided name(".concat(t,") don't exist in the store. Has the given name been added to the store?"))},e}(Error),k=function(){function n(){this.state=new Map,n.instance=this}return n.prototype.getByName=function(e){return e===void 0&&(e=n.DEFAULT_NAMESPACE),this.state.has(e)||this.state.set(e,{queue:m.reactive([]),initialized:!1}),this.state.get(e)},n.prototype.forceClean=function(){this.state.forEach(function(e){e.queue.splice(0,e.queue.length)})},n.DEFAULT_NAMESPACE="default",n}(),X=function(){var n=new k,e={scrollLock:!0,animation:"modal-list",backgroundClose:!0,escClose:!0,store:{},skipInitCheck:!1,draggable:!1},t=n.getByName().queue;return m.watch(function(){return t},function(){e.scrollLock&&(t.length?document.body.style.overflowY="hidden":document.body.style.overflowY="auto")},{deep:!0}),{namespaceStore:n,configuration:e}}();function y(n){return X.namespaceStore.getByName(n)}var _=X.configuration;function W(n){var e={backgroundClose:_.backgroundClose,isRoute:!1,namespace:k.DEFAULT_NAMESPACE,draggable:_.draggable};return n.backgroundClose!==void 0&&(e.backgroundClose=n.backgroundClose),n.isRoute&&(e.isRoute=n.isRoute),n.namespace&&(e.namespace=n.namespace),n.draggable!==void 0&&(e.draggable=n.draggable),e}function G(n){n===void 0&&(n={});var e={background:!1,esc:!1};return Object.assign(e,n)}function H(n){return n||(n={}),n}function T(n,e){e===void 0&&(e={});var t=I.STORE.get(n);if(!t)return Promise.reject(C.ModalNotFoundByID(n));var r=y(t.namespace),a=r.queue.findIndex(function(l){return l.id===n});if(a===-1)return Promise.reject(C.Undefined(n));var i=w.get(n,"close").map(function(l){return oe(l,n,G(e))});return Z(i).then(function(){r.queue.splice(a,1)}).then(function(){w.get(n,"destroy").forEach(function(l){return l(G(e))})}).then(function(){w.delete(n)})}var I=function(){function n(e,t,r){var a=this;this.events=m.reactive({}),this.backgroundClose=!0,this.isRoute=!1,this.id=n.modalId++,this.component=e,this.props=m.ref(t),this.closed=m.computed(function(){return!y(r.namespace).queue.includes(a)}),e.beforeModalClose&&w.add(this.id,"close",e.beforeModalClose);var i=W(r);this.backgroundClose=i.backgroundClose,this.isRoute=i.isRoute,this.namespace=i.namespace,this.draggable=i.draggable,n.STORE.set(this.id,this)}return n.prototype.close=function(){return T(this.id)},Object.defineProperty(n.prototype,"onclose",{set:function(e){w.add(this.id,"close",e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ondestroy",{set:function(e){w.add(this.id,"destroy",e)},enumerable:!1,configurable:!0}),n.prototype.on=function(e,t){var r=this;return Array.isArray(this.events[e])||(this.events[e]=[]),this.events[e].push(t),function(){var a=r.events[e].indexOf(t);a!==-1&&r.events[e].splice(a,1)}},n.STORE=new Map,n.modalId=0,n.EVENT_PROMPT="jenesius-vue-modal:____P____R____O____M____P____T",n}();function J(n){return I.STORE.get(n)}var re={store:{},add:function(n,e,t){var r,a;if(typeof t!="function")throw C.GuardDeclarationType(t);this.store[n]||(this.store[n]=(r={},r[e]=[],r)),this.store[n][e]||(this.store[n][e]=[]),(a=this.store[n][e])===null||a===void 0||a.push(t)},get:function(n,e){return n in this.store?e in this.store[n]?this.store[n][e]||[]:[]:[]},delete:function(n){n in this.store&&delete this.store[n]}};const w=re;function Z(n){return n.reduce(function(e,t){return e.then(function(){return t()})},Promise.resolve())}function oe(n,e,t){return function(){return new Promise(function(r,a){var i,l=function(f){f===void 0&&(f=!0),f===!1&&a(C.NextReject(e)),r()};Promise.resolve(n.call((i=J(e))===null||i===void 0?void 0:i.instance,t)).then(l).catch(function(f){return a(f)})})}}function V(n){return n=H(n),Z(y(n.namespace).queue.map(function(e){return function(){return e.close()}}))}function L(n){var e=y(n),t=e.queue;if(t.length!==0)return t[t.length-1]}function ie(n){n=H(n);var e=L(n.namespace);return e?e.close():Promise.resolve()}function ae(n,e,t){var r=W(t),a=y(r.namespace);if(r.namespace===k.DEFAULT_NAMESPACE&&!a.initialized&&!_.skipInitCheck)throw C.NotInitialized(r.namespace);if(typeof n=="string"){var i=ee(n);if(!i)throw C.ModalNotExistsInStore(n);n=i}if(!n)throw C.ModalComponentNotProvided();var l=new I(n,e,r);return a.queue.push(m.markRaw(l)),l}function B(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),Promise.resolve().then(function(){return ae(n,e,t)})}function K(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),V({namespace:t.namespace}).then(function(){var r=y(t.namespace);if(r.queue.length)throw C.QueueNoEmpty()}).then(function(){return B(n,e,t)})}function ue(n){if(typeof n!="object")throw C.ConfigurationType(n);Object.assign(_,n)}function se(n){var e,t,r,a=m.getCurrentInstance(),i=String(((e=a==null?void 0:a.props)===null||e===void 0?void 0:e.modalId)||((t=a==null?void 0:a.props)===null||t===void 0?void 0:t["modal-id"])||((r=a==null?void 0:a.attrs)===null||r===void 0?void 0:r.modalId)),l=i.replace(/[^0-9]/g,"");w.add(Number(l),"close",n)}function ce(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),S(this,void 0,void 0,function(){var r,a,i=this;return P(this,function(l){switch(l.label){case 0:return[4,B(n,e,t)];case 1:return r=l.sent(),a=!1,[2,new Promise(function(f){r.on(I.EVENT_PROMPT,function(c){return S(i,void 0,void 0,function(){return P(this,function(s){return a=!0,[2,r.close().then(function(){return f(c)}).catch(function(){return a=!1})]})})}),r.ondestroy=function(){a||f(null)}})]}})})}function ee(n){return _.store[n]||void 0}function le(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var q={exports:{}},x,Q;function de(){if(Q)return x;Q=1;var n=1e3,e=n*60,t=e*60,r=t*24,a=r*7,i=r*365.25;x=function(o,u){u=u||{};var d=typeof o;if(d==="string"&&o.length>0)return l(o);if(d==="number"&&isFinite(o))return u.long?c(o):f(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function l(o){if(o=String(o),!(o.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(u){var d=parseFloat(u[1]),g=(u[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*t;case"minutes":case"minute":case"mins":case"min":case"m":return d*e;case"seconds":case"second":case"secs":case"sec":case"s":return d*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function f(o){var u=Math.abs(o);return u>=r?Math.round(o/r)+"d":u>=t?Math.round(o/t)+"h":u>=e?Math.round(o/e)+"m":u>=n?Math.round(o/n)+"s":o+"ms"}function c(o){var u=Math.abs(o);return u>=r?s(o,u,r,"day"):u>=t?s(o,u,t,"hour"):u>=e?s(o,u,e,"minute"):u>=n?s(o,u,n,"second"):o+" ms"}function s(o,u,d,g){var F=u>=d*1.5;return Math.round(o/d)+" "+g+(F?"s":"")}return x}function fe(n){t.debug=t,t.default=t,t.coerce=c,t.disable=i,t.enable=a,t.enabled=l,t.humanize=de(),t.destroy=s,Object.keys(n).forEach(o=>{t[o]=n[o]}),t.names=[],t.skips=[],t.formatters={};function e(o){let u=0;for(let d=0;d<o.length;d++)u=(u<<5)-u+o.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(o){let u,d=null,g,F;function v(...h){if(!v.enabled)return;const p=v,M=Number(new Date),A=M-(u||M);p.diff=A,p.prev=u,p.curr=M,u=M,h[0]=t.coerce(h[0]),typeof h[0]!="string"&&h.unshift("%O");let b=0;h[0]=h[0].replace(/%([a-zA-Z%])/g,(E,N)=>{if(E==="%%")return"%";b++;const O=t.formatters[N];if(typeof O=="function"){const j=h[b];E=O.call(p,j),h.splice(b,1),b--}return E}),t.formatArgs.call(p,h),(p.log||t.log).apply(p,h)}return v.namespace=o,v.useColors=t.useColors(),v.color=t.selectColor(o),v.extend=r,v.destroy=t.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(g!==t.namespaces&&(g=t.namespaces,F=t.enabled(o)),F),set:h=>{d=h}}),typeof t.init=="function"&&t.init(v),v}function r(o,u){const d=t(this.namespace+(typeof u>"u"?":":u)+o);return d.log=this.log,d}function a(o){t.save(o),t.namespaces=o,t.names=[],t.skips=[];let u;const d=(typeof o=="string"?o:"").split(/[\s,]+/),g=d.length;for(u=0;u<g;u++)d[u]&&(o=d[u].replace(/\*/g,".*?"),o[0]==="-"?t.skips.push(new RegExp("^"+o.slice(1)+"$")):t.names.push(new RegExp("^"+o+"$")))}function i(){const o=[...t.names.map(f),...t.skips.map(f).map(u=>"-"+u)].join(",");return t.enable(""),o}function l(o){if(o[o.length-1]==="*")return!0;let u,d;for(u=0,d=t.skips.length;u<d;u++)if(t.skips[u].test(o))return!1;for(u=0,d=t.names.length;u<d;u++)if(t.names[u].test(o))return!0;return!1}function f(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}function c(o){return o instanceof Error?o.stack||o.message:o}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var me=fe;(function(n,e){e.formatArgs=r,e.save=a,e.load=i,e.useColors=t,e.storage=l(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;c.splice(1,0,s,"color: inherit");let o=0,u=0;c[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(o++,d==="%c"&&(u=o))}),c.splice(u,0,s)}e.log=console.debug||console.log||(()=>{});function a(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function i(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function l(){try{return localStorage}catch{}}n.exports=me(e);const{formatters:f}=n.exports;f.j=function(c){try{return JSON.stringify(c)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}})(q,q.exports);var he=q.exports;const ve=le(he);function ge(n){return ve("jenesius-vue-modal:".concat(n))}const Ce=["onPointerdown"],Y=m.defineComponent({__name:"WidgetModalContainerItem",props:{id:{}},setup(n){const e=ge("modal-item"),t=n,r=J(t.id),a=m.ref(),i=m.ref();function l(){if(r.backgroundClose)return T(r.id,{background:!0}).catch(()=>{})}m.watch(()=>i.value,c=>{r.instance=c}),m.onMounted(()=>{var c;if(e(`Modal(${r.id}) is mounted`),r.draggable){const s=`[modalid=_modal_${t.id}]`,o=typeof r.draggable=="string"?r.draggable:s;e(`The modal window is movable(${o}).`),a.value?(e("Finding an item to drag: %s",o),f((c=a.value)==null?void 0:c.querySelector(s),a.value.querySelector(o))):e("The modal container is not mounted. Modal id %d.",r.id)}});function f(c,s){if(!s){e("draggable item not found.");return}if(!c){e("HTML modal is not founded.");return}s.addEventListener("pointerdown",o=>{var E;const u=(E=c.getAttribute("style"))==null?void 0:E.match(/transform: translate\((.*)px,\s*(.*)px\)/),d=u==null?void 0:u[1],g=u==null?void 0:u[2];let F=typeof d=="string"?Number.parseInt(d):0,v=typeof g=="string"?Number.parseInt(g):0;const{clientX:h,clientY:p}=o,M=h,A=p;e(`movement started at (${A}, ${A})`),document.addEventListener("pointermove",b,{passive:!0}),document.addEventListener("pointerup",$,{once:!0});function b(N){const{clientX:O,clientY:j}=N,z=F+O-M,U=v+j-A;e(`move at (${z}, ${U})`),c.style.transform=`translate(${z}px,${U}px)`}function $(N){e("movement completed"),document.removeEventListener("pointermove",b),N.preventDefault()}})}return(c,s)=>(m.openBlock(),m.createElementBlock("div",{class:"widget__modal-container__item modal-container",onPointerdown:m.withModifiers(l,["self","stop"]),ref_key:"modalContainerRef",ref:a},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(m.unref(r).component),m.mergeProps(m.unref(r).props.value,{class:"modal-item widget__modal-wrap",modalId:`_modal_${c.id}`,ref_key:"modalRef",ref:i},m.toHandlers(m.unref(r).events)),null,16,["modalId"]))],40,Ce))}});function pe(n){n===void 0&&(n=k.DEFAULT_NAMESPACE);var e=k.instance.getByName(n);e.initialized=!0,n===k.DEFAULT_NAMESPACE&&document.addEventListener("keyup",function(t){if(_.escClose&&(t.key==="Escape"||t.code==="Escape")){var r=L(n);if(!r)return;T(r.id,{esc:!0}).catch(function(){})}})}const ye={props:{namespace:String},setup(n){return m.onMounted(()=>{pe(n.namespace)}),()=>{const e=y(n.namespace);return m.h(m.TransitionGroup,{name:_.animation,tag:"div"},{default:()=>e.queue.map(t=>m.h(Y,{key:t.id,id:t.id}))})}},components:{WidgetContainerModalItem:Y}};var R={router:null};function be(n){var e=this;if(R.router)throw C.DuplicatedRouterIntegration();R.router=n;function t(r){for(var a=r.matched.length-1;a>=0;a--){var i=r.matched[a].components,l=Object.values(i).find(function(f){return f._isModal});if(l)return l}return null}n.beforeEach(function(r,a){return S(e,void 0,void 0,function(){var i,l,f;return P(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),i=t(a),i&&!(!((f=(l=i.getModalObject())===null||l===void 0?void 0:l.closed)===null||f===void 0)&&f.value)?[4,i.close(!0)]:[3,2];case 1:c.sent(),c.label=2;case 2:return[3,4];case 3:return c.sent(),[2,!1];case 4:return[2]}})})}),n.afterEach(function(r){return S(e,void 0,void 0,function(){var a;return P(this,function(i){switch(i.label){case 0:return a=t(r),a?[4,a.initialize()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})})}function te(n){var e=null,t=!1;function r(){return S(this,void 0,void 0,function(){return P(this,function(a){switch(a.label){case 0:if(!R.router)throw C.ModalRouterIntegrationNotInitialized();return t=!1,e=null,[4,K(n,m.computed(function(){var i;return(i=R.router)===null||i===void 0?void 0:i.currentRoute.value.params}),{isRoute:!0})];case 1:return e=a.sent(),e.onclose=function(){var i;t||(i=R.router)===null||i===void 0||i.back()},[2]}})})}return{getModalObject:function(){return e},_isModal:!0,close:function(a){return a===void 0&&(a=!1),S(this,void 0,void 0,function(){return P(this,function(i){switch(i.label){case 0:return t=a,e?[4,e.close()]:[3,2];case 1:return[2,i.sent()];case 2:return[2]}})})},initialize:r,setup:function(){return function(){return null}}}}te.init=be;var we=y().queue;function _e(n){return y(n).queue}exports.Modal=I;exports.closeById=T;exports.closeModal=V;exports.config=ue;exports.container=ye;exports.getComponentFromStore=ee;exports.getCurrentModal=L;exports.getQueueByNamespace=_e;exports.modalQueue=we;exports.onBeforeModalClose=se;exports.openModal=K;exports.popModal=ie;exports.promptModal=ce;exports.pushModal=B;exports.useModalRouter=te;
//# sourceMappingURL=jenesius-vue-modal.cjs.js.map
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".modal-container{position:fixed;left:0;top:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background-color:#3e3e3e21;cursor:pointer}.modal-item{cursor:default}.modal-list-enter-active,.modal-list-leave-active,.modal-list-enter-active .modal-item,.modal-list-leave-active .modal-item{transition:all .2s ease}.modal-list-enter-from,.modal-list-leave-to{opacity:0!important}.modal-list-enter-from .modal-item,.modal-list-leave-to .modal-item{transform:translateY(-60px)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import { reactive as G, watch as Q, ref as Y, computed as W, markRaw as re, getCurrentInstance as oe, onMounted as X, openBlock as $, createElementBlock as ie, withModifiers as ae, createBlock as ue, resolveDynamicComponent as se, unref as R, mergeProps as ce, toHandlers as le, h as L, TransitionGroup as de } from "vue";
import { reactive as W, watch as H, ref as j, computed as J, markRaw as ie, getCurrentInstance as ae, defineComponent as ue, onMounted as Z, openBlock as U, createElementBlock as se, withModifiers as ce, createBlock as le, resolveDynamicComponent as de, unref as T, mergeProps as fe, toHandlers as he, h as G, TransitionGroup as me } from "vue";
/*!
* jenesius-vue-modal v1.11.4
* jenesius-vue-modal v1.11.5
* (c) 2024 Jenesius
* @license MIT
*/
var x = function(n, t) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, a) {
e.__proto__ = a;
} || function(e, a) {
for (var r in a)
Object.prototype.hasOwnProperty.call(a, r) && (e[r] = a[r]);
}, x(n, t);
var D = function(n, e) {
return D = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
t.__proto__ = r;
} || function(t, r) {
for (var a in r)
Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
}, D(n, e);
};
function fe(n, t) {
if (typeof t != "function" && t !== null)
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
x(n, t);
function e() {
function ve(n, e) {
if (typeof e != "function" && e !== null)
throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
D(n, e);
function t() {
this.constructor = n;
}
n.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
n.prototype = e === null ? Object.create(e) : (t.prototype = e.prototype, new t());
}
function E(n, t, e, a) {
function r(i) {
return i instanceof e ? i : new e(function(c) {
c(i);
function k(n, e, t, r) {
function a(i) {
return i instanceof t ? i : new t(function(l) {
l(i);
});
}
return new (e || (e = Promise))(function(i, c) {
return new (t || (t = Promise))(function(i, l) {
function f(o) {
try {
s(a.next(o));
s(r.next(o));
} catch (u) {
c(u);
l(u);
}
}
function d(o) {
function c(o) {
try {
s(a.throw(o));
s(r.throw(o));
} catch (u) {
c(u);
l(u);
}
}
function s(o) {
o.done ? i(o.value) : r(o.value).then(f, d);
o.done ? i(o.value) : a(o.value).then(f, c);
}
s((a = a.apply(n, t || [])).next());
s((r = r.apply(n, e || [])).next());
});
}
function k(n, t) {
var e = { label: 0, sent: function() {
function S(n, e) {
var t = { label: 0, sent: function() {
if (i[0] & 1)
throw i[1];
return i[1];
}, trys: [], ops: [] }, a, r, i, c;
return c = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (c[Symbol.iterator] = function() {
}, trys: [], ops: [] }, r, a, i, l;
return l = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
return this;
}), c;
}), l;
function f(s) {
return function(o) {
return d([s, o]);
return c([s, o]);
};
}
function d(s) {
if (a)
function c(s) {
if (r)
throw new TypeError("Generator is already executing.");
for (; c && (c = 0, s[0] && (e = 0)), e; )
for (; l && (l = 0, s[0] && (t = 0)), t; )
try {
if (a = 1, r && (i = s[0] & 2 ? r.return : s[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, s[1])).done)
if (r = 1, a && (i = s[0] & 2 ? a.return : s[0] ? a.throw || ((i = a.return) && i.call(a), 0) : a.next) && !(i = i.call(a, s[1])).done)
return i;
switch (r = 0, i && (s = [s[0] & 2, i.value]), s[0]) {
switch (a = 0, i && (s = [s[0] & 2, i.value]), s[0]) {
case 0:

@@ -79,34 +79,34 @@ case 1:

case 4:
return e.label++, { value: s[1], done: !1 };
return t.label++, { value: s[1], done: !1 };
case 5:
e.label++, r = s[1], s = [0];
t.label++, a = s[1], s = [0];
continue;
case 7:
s = e.ops.pop(), e.trys.pop();
s = t.ops.pop(), t.trys.pop();
continue;
default:
if (i = e.trys, !(i = i.length > 0 && i[i.length - 1]) && (s[0] === 6 || s[0] === 2)) {
e = 0;
if (i = t.trys, !(i = i.length > 0 && i[i.length - 1]) && (s[0] === 6 || s[0] === 2)) {
t = 0;
continue;
}
if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
e.label = s[1];
t.label = s[1];
break;
}
if (s[0] === 6 && e.label < i[1]) {
e.label = i[1], i = s;
if (s[0] === 6 && t.label < i[1]) {
t.label = i[1], i = s;
break;
}
if (i && e.label < i[2]) {
e.label = i[2], e.ops.push(s);
if (i && t.label < i[2]) {
t.label = i[2], t.ops.push(s);
break;
}
i[2] && e.ops.pop(), e.trys.pop();
i[2] && t.ops.pop(), t.trys.pop();
continue;
}
s = t.call(n, e);
s = e.call(n, t);
} catch (o) {
s = [6, o], r = 0;
s = [6, o], a = 0;
} finally {
a = i = 0;
r = i = 0;
}

@@ -118,44 +118,44 @@ if (s[0] & 5)

}
var v = (
var g = (
/** @class */
function(n) {
fe(t, n);
function t(e, a) {
a === void 0 && (a = null);
var r = n.call(this) || this;
return r.isModalError = !0, r.message = e, r.details = a, r;
ve(e, n);
function e(t, r) {
r === void 0 && (r = null);
var a = n.call(this) || this;
return a.isModalError = !0, a.message = t, a.details = r, a;
}
return t.Undefined = function(e) {
return new t("Modal with id: ".concat(e, " not founded. The modal window may have been closed earlier."));
}, t.UndefinedGuardName = function(e) {
return new t("Guard's name ".concat(e, " is not declaration."));
}, t.NextReject = function(e) {
return new t("Guard returned false. Modal navigation was stopped. Modal id ".concat(e));
}, t.GuardDeclarationType = function(e) {
return new t("Guard's type should be a function. Provided:", e);
}, t.ConfigurationType = function(e) {
return new t("Configuration type must be an Object. Provided", e);
}, t.ConfigurationUndefinedParam = function(e, a) {
return new t("In configuration founded unknown parameter: ".concat(e, ". Available are ").concat(a.join(", "), " "));
}, t.QueueNoEmpty = function() {
return new t("Modal's queue is not empty. Probably some modal reject closing by onClose hook.");
}, t.EmptyModalQueue = function() {
return new t("Modal queue is empty.");
}, t.NotInitialized = function(e) {
return new t("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(e, ". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."));
}, t.ModalComponentNotProvided = function() {
return new t("The first parameter(VueComponent) was not specified.");
}, t.DuplicatedRouterIntegration = function() {
return new t("useModalRouter.init should escaped only once.");
}, t.ModalRouterIntegrationNotInitialized = function() {
return new t("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation");
}, t.ModalEventNameMustBeString = function(e) {
return new t("Event name must be a string. Provided: ".concat(e));
}, t.ModalNotFoundByID = function(e) {
return new t("Modal with ID ".concat(e, " was not found."));
}, t.ModalNotExistsInStore = function(e) {
return new t("Provided name(".concat(e, ") don't exist in the store. Has the given name been added to the store?"));
}, t;
return e.Undefined = function(t) {
return new e("Modal with id: ".concat(t, " not founded. The modal window may have been closed earlier."));
}, e.UndefinedGuardName = function(t) {
return new e("Guard's name ".concat(t, " is not declaration."));
}, e.NextReject = function(t) {
return new e("Guard returned false. Modal navigation was stopped. Modal id ".concat(t));
}, e.GuardDeclarationType = function(t) {
return new e("Guard's type should be a function. Provided:", t);
}, e.ConfigurationType = function(t) {
return new e("Configuration type must be an Object. Provided", t);
}, e.ConfigurationUndefinedParam = function(t, r) {
return new e("In configuration founded unknown parameter: ".concat(t, ". Available are ").concat(r.join(", "), " "));
}, e.QueueNoEmpty = function() {
return new e("Modal's queue is not empty. Probably some modal reject closing by onClose hook.");
}, e.EmptyModalQueue = function() {
return new e("Modal queue is empty.");
}, e.NotInitialized = function(t) {
return new e("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(t, ". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."));
}, e.ModalComponentNotProvided = function() {
return new e("The first parameter(VueComponent) was not specified.");
}, e.DuplicatedRouterIntegration = function() {
return new e("useModalRouter.init should escaped only once.");
}, e.ModalRouterIntegrationNotInitialized = function() {
return new e("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation");
}, e.ModalEventNameMustBeString = function(t) {
return new e("Event name must be a string. Provided: ".concat(t));
}, e.ModalNotFoundByID = function(t) {
return new e("Modal with ID ".concat(t, " was not found."));
}, e.ModalNotExistsInStore = function(t) {
return new e("Provided name(".concat(t, ") don't exist in the store. Has the given name been added to the store?"));
}, e;
}(Error)
), M = (
), E = (
/** @class */

@@ -166,15 +166,15 @@ function() {

}
return n.prototype.getByName = function(t) {
return t === void 0 && (t = n.DEFAULT_NAMESPACE), this.state.has(t) || this.state.set(t, {
queue: G([]),
return n.prototype.getByName = function(e) {
return e === void 0 && (e = n.DEFAULT_NAMESPACE), this.state.has(e) || this.state.set(e, {
queue: W([]),
initialized: !1
}), this.state.get(t);
}), this.state.get(e);
}, n.prototype.forceClean = function() {
this.state.forEach(function(t) {
t.queue.splice(0, t.queue.length);
this.state.forEach(function(e) {
e.queue.splice(0, e.queue.length);
});
}, n.DEFAULT_NAMESPACE = "default", n;
}()
), J = function() {
var n = new M(), t = {
), V = function() {
var n = new E(), e = {
scrollLock: !0,

@@ -187,54 +187,54 @@ animation: "modal-list",

draggable: !1
}, e = n.getByName().queue;
return Q(function() {
return e;
}, t = n.getByName().queue;
return H(function() {
return t;
}, function() {
t.scrollLock && (e.length ? document.body.style.overflowY = "hidden" : document.body.style.overflowY = "auto");
e.scrollLock && (t.length ? document.body.style.overflowY = "hidden" : document.body.style.overflowY = "auto");
}, { deep: !0 }), {
namespaceStore: n,
configuration: t
configuration: e
};
}();
function p(n) {
return J.namespaceStore.getByName(n);
return V.namespaceStore.getByName(n);
}
var w = J.configuration;
function H(n) {
var t = {
var w = V.configuration;
function K(n) {
var e = {
backgroundClose: w.backgroundClose,
isRoute: !1,
namespace: M.DEFAULT_NAMESPACE,
namespace: E.DEFAULT_NAMESPACE,
draggable: w.draggable
};
return n.backgroundClose !== void 0 && (t.backgroundClose = n.backgroundClose), n.isRoute && (t.isRoute = n.isRoute), n.namespace && (t.namespace = n.namespace), n.draggable !== void 0 && (t.draggable = n.draggable), t;
return n.backgroundClose !== void 0 && (e.backgroundClose = n.backgroundClose), n.isRoute && (e.isRoute = n.isRoute), n.namespace && (e.namespace = n.namespace), n.draggable !== void 0 && (e.draggable = n.draggable), e;
}
function z(n) {
function Y(n) {
n === void 0 && (n = {});
var t = {
var e = {
background: !1,
esc: !1
};
return Object.assign(t, n);
return Object.assign(e, n);
}
function Z(n) {
function ee(n) {
return n || (n = {}), n;
}
function D(n, t) {
t === void 0 && (t = {});
var e = O.STORE.get(n);
if (!e)
return Promise.reject(v.ModalNotFoundByID(n));
var a = p(e.namespace), r = a.queue.findIndex(function(c) {
return c.id === n;
function L(n, e) {
e === void 0 && (e = {});
var t = I.STORE.get(n);
if (!t)
return Promise.reject(g.ModalNotFoundByID(n));
var r = p(t.namespace), a = r.queue.findIndex(function(l) {
return l.id === n;
});
if (r === -1)
return Promise.reject(v.Undefined(n));
var i = b.get(n, "close").map(function(c) {
return he(c, n, z(t));
if (a === -1)
return Promise.reject(g.Undefined(n));
var i = b.get(n, "close").map(function(l) {
return Ce(l, n, Y(e));
});
return K(i).then(function() {
a.queue.splice(r, 1);
return ne(i).then(function() {
r.queue.splice(a, 1);
}).then(function() {
b.get(n, "destroy").forEach(function(c) {
return c(z(t));
b.get(n, "destroy").forEach(function(l) {
return l(Y(e));
});

@@ -245,15 +245,15 @@ }).then(function() {

}
var O = (
var I = (
/** @class */
function() {
function n(t, e, a) {
var r = this;
this.events = G({}), this.backgroundClose = !0, this.isRoute = !1, this.id = n.modalId++, this.component = t, this.props = Y(e), this.closed = W(function() {
return !p(a.namespace).queue.includes(r);
}), t.beforeModalClose && b.add(this.id, "close", t.beforeModalClose);
var i = H(a);
function n(e, t, r) {
var a = this;
this.events = W({}), this.backgroundClose = !0, this.isRoute = !1, this.id = n.modalId++, this.component = e, this.props = j(t), this.closed = J(function() {
return !p(r.namespace).queue.includes(a);
}), e.beforeModalClose && b.add(this.id, "close", e.beforeModalClose);
var i = K(r);
this.backgroundClose = i.backgroundClose, this.isRoute = i.isRoute, this.namespace = i.namespace, this.draggable = i.draggable, n.STORE.set(this.id, this);
}
return n.prototype.close = function() {
return D(this.id);
return L(this.id);
}, Object.defineProperty(n.prototype, "onclose", {

@@ -263,4 +263,4 @@ /**

* */
set: function(t) {
b.add(this.id, "close", t);
set: function(e) {
b.add(this.id, "close", e);
},

@@ -273,12 +273,12 @@ enumerable: !1,

* */
set: function(t) {
b.add(this.id, "destroy", t);
set: function(e) {
b.add(this.id, "destroy", e);
},
enumerable: !1,
configurable: !0
}), n.prototype.on = function(t, e) {
var a = this;
return Array.isArray(this.events[t]) || (this.events[t] = []), this.events[t].push(e), function() {
var r = a.events[t].indexOf(e);
r !== -1 && a.events[t].splice(r, 1);
}), n.prototype.on = function(e, t) {
var r = this;
return Array.isArray(this.events[e]) || (this.events[e] = []), this.events[e].push(t), function() {
var a = r.events[e].indexOf(t);
a !== -1 && r.events[e].splice(a, 1);
};

@@ -288,15 +288,15 @@ }, n.STORE = /* @__PURE__ */ new Map(), n.modalId = 0, n.EVENT_PROMPT = "jenesius-vue-modal:____P____R____O____M____P____T", n;

);
function V(n) {
return O.STORE.get(n);
function te(n) {
return I.STORE.get(n);
}
var me = {
var ge = {
store: {},
add: function(n, t, e) {
var a, r;
if (typeof e != "function")
throw v.GuardDeclarationType(e);
this.store[n] || (this.store[n] = (a = {}, a[t] = [], a)), this.store[n][t] || (this.store[n][t] = []), (r = this.store[n][t]) === null || r === void 0 || r.push(e);
add: function(n, e, t) {
var r, a;
if (typeof t != "function")
throw g.GuardDeclarationType(t);
this.store[n] || (this.store[n] = (r = {}, r[e] = [], r)), this.store[n][e] || (this.store[n][e] = []), (a = this.store[n][e]) === null || a === void 0 || a.push(t);
},
get: function(n, t) {
return n in this.store ? t in this.store[n] ? this.store[n][t] || [] : [] : [];
get: function(n, e) {
return n in this.store ? e in this.store[n] ? this.store[n][e] || [] : [] : [];
},

@@ -307,18 +307,18 @@ delete: function(n) {

};
const b = me;
function K(n) {
return n.reduce(function(t, e) {
return t.then(function() {
return e();
const b = ge;
function ne(n) {
return n.reduce(function(e, t) {
return e.then(function() {
return t();
});
}, Promise.resolve());
}
function he(n, t, e) {
function Ce(n, e, t) {
return function() {
return new Promise(function(a, r) {
var i, c = function(f) {
f === void 0 && (f = !0), f === !1 && r(v.NextReject(t)), a();
return new Promise(function(r, a) {
var i, l = function(f) {
f === void 0 && (f = !0), f === !1 && a(g.NextReject(e)), r();
};
Promise.resolve(n.call((i = V(t)) === null || i === void 0 ? void 0 : i.instance, e)).then(c).catch(function(f) {
return r(f);
Promise.resolve(n.call((i = te(e)) === null || i === void 0 ? void 0 : i.instance, t)).then(l).catch(function(f) {
return a(f);
});

@@ -328,80 +328,80 @@ });

}
function ve(n) {
return n = Z(n), K(p(n.namespace).queue.map(function(t) {
function pe(n) {
return n = ee(n), ne(p(n.namespace).queue.map(function(e) {
return function() {
return t.close();
return e.close();
};
}));
}
function ee(n) {
var t = p(n), e = t.queue;
if (e.length !== 0)
return e[e.length - 1];
function re(n) {
var e = p(n), t = e.queue;
if (t.length !== 0)
return t[t.length - 1];
}
function Ie(n) {
n = Z(n);
var t = ee(n.namespace);
return t ? t.close() : Promise.resolve();
function Te(n) {
n = ee(n);
var e = re(n.namespace);
return e ? e.close() : Promise.resolve();
}
function ge(n, t, e) {
var a = H(e), r = p(a.namespace);
if (a.namespace === M.DEFAULT_NAMESPACE && !r.initialized && !w.skipInitCheck)
throw v.NotInitialized(a.namespace);
function ye(n, e, t) {
var r = K(t), a = p(r.namespace);
if (r.namespace === E.DEFAULT_NAMESPACE && !a.initialized && !w.skipInitCheck)
throw g.NotInitialized(r.namespace);
if (typeof n == "string") {
var i = pe(n);
var i = we(n);
if (!i)
throw v.ModalNotExistsInStore(n);
throw g.ModalNotExistsInStore(n);
n = i;
}
if (!n)
throw v.ModalComponentNotProvided();
var c = new O(n, t, a);
return r.queue.push(re(c)), c;
throw g.ModalComponentNotProvided();
var l = new I(n, e, r);
return a.queue.push(ie(l)), l;
}
function te(n, t, e) {
return t === void 0 && (t = {}), e === void 0 && (e = {}), Promise.resolve().then(function() {
return ge(n, t, e);
function oe(n, e, t) {
return e === void 0 && (e = {}), t === void 0 && (t = {}), Promise.resolve().then(function() {
return ye(n, e, t);
});
}
function Ce(n, t, e) {
return t === void 0 && (t = {}), e === void 0 && (e = {}), ve({
namespace: e.namespace
function be(n, e, t) {
return e === void 0 && (e = {}), t === void 0 && (t = {}), pe({
namespace: t.namespace
}).then(function() {
var a = p(e.namespace);
if (a.queue.length)
throw v.QueueNoEmpty();
var r = p(t.namespace);
if (r.queue.length)
throw g.QueueNoEmpty();
}).then(function() {
return te(n, t, e);
return oe(n, e, t);
});
}
function Oe(n) {
function xe(n) {
if (typeof n != "object")
throw v.ConfigurationType(n);
throw g.ConfigurationType(n);
Object.assign(w, n);
}
function Re(n) {
var t, e, a, r = oe(), i = String(((t = r == null ? void 0 : r.props) === null || t === void 0 ? void 0 : t.modalId) || ((e = r == null ? void 0 : r.props) === null || e === void 0 ? void 0 : e["modal-id"]) || ((a = r == null ? void 0 : r.attrs) === null || a === void 0 ? void 0 : a.modalId)), c = i.replace(/[^0-9]/g, "");
b.add(Number(c), "close", n);
function je(n) {
var e, t, r, a = ae(), i = String(((e = a == null ? void 0 : a.props) === null || e === void 0 ? void 0 : e.modalId) || ((t = a == null ? void 0 : a.props) === null || t === void 0 ? void 0 : t["modal-id"]) || ((r = a == null ? void 0 : a.attrs) === null || r === void 0 ? void 0 : r.modalId)), l = i.replace(/[^0-9]/g, "");
b.add(Number(l), "close", n);
}
function Te(n, t, e) {
return t === void 0 && (t = {}), e === void 0 && (e = {}), E(this, void 0, void 0, function() {
var a, r, i = this;
return k(this, function(c) {
switch (c.label) {
function De(n, e, t) {
return e === void 0 && (e = {}), t === void 0 && (t = {}), k(this, void 0, void 0, function() {
var r, a, i = this;
return S(this, function(l) {
switch (l.label) {
case 0:
return [4, te(n, t, e)];
return [4, oe(n, e, t)];
case 1:
return a = c.sent(), r = !1, [2, new Promise(function(f) {
a.on(O.EVENT_PROMPT, function(d) {
return E(i, void 0, void 0, function() {
return k(this, function(s) {
return r = !0, [2, a.close().then(function() {
return f(d);
return r = l.sent(), a = !1, [2, new Promise(function(f) {
r.on(I.EVENT_PROMPT, function(c) {
return k(i, void 0, void 0, function() {
return S(this, function(s) {
return a = !0, [2, r.close().then(function() {
return f(c);
}).catch(function() {
return r = !1;
return a = !1;
})];
});
});
}), a.ondestroy = function() {
r || f(null);
}), r.ondestroy = function() {
a || f(null);
};

@@ -413,21 +413,21 @@ })];

}
function pe(n) {
function we(n) {
return w.store[n] || void 0;
}
function ye(n) {
function _e(n) {
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
}
var j = { exports: {} }, T, B;
function be() {
if (B)
return T;
B = 1;
var n = 1e3, t = n * 60, e = t * 60, a = e * 24, r = a * 7, i = a * 365.25;
T = function(o, u) {
var q = { exports: {} }, x, Q;
function Fe() {
if (Q)
return x;
Q = 1;
var n = 1e3, e = n * 60, t = e * 60, r = t * 24, a = r * 7, i = r * 365.25;
x = function(o, u) {
u = u || {};
var l = typeof o;
if (l === "string" && o.length > 0)
return c(o);
if (l === "number" && isFinite(o))
return u.long ? d(o) : f(o);
var d = typeof o;
if (d === "string" && o.length > 0)
return l(o);
if (d === "number" && isFinite(o))
return u.long ? c(o) : f(o);
throw new Error(

@@ -437,3 +437,3 @@ "val is not a non-empty string or a valid number. val=" + JSON.stringify(o)

};
function c(o) {
function l(o) {
if (o = String(o), !(o.length > 100)) {

@@ -444,4 +444,4 @@ var u = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(

if (u) {
var l = parseFloat(u[1]), g = (u[2] || "ms").toLowerCase();
switch (g) {
var d = parseFloat(u[1]), v = (u[2] || "ms").toLowerCase();
switch (v) {
case "years":

@@ -452,11 +452,11 @@ case "year":

case "y":
return l * i;
return d * i;
case "weeks":
case "week":
case "w":
return l * r;
return d * a;
case "days":
case "day":
case "d":
return l * a;
return d * r;
case "hours":

@@ -467,3 +467,3 @@ case "hour":

case "h":
return l * e;
return d * t;
case "minutes":

@@ -474,3 +474,3 @@ case "minute":

case "m":
return l * t;
return d * e;
case "seconds":

@@ -481,3 +481,3 @@ case "second":

case "s":
return l * n;
return d * n;
case "milliseconds":

@@ -488,3 +488,3 @@ case "millisecond":

case "ms":
return l;
return d;
default:

@@ -498,81 +498,81 @@ return;

var u = Math.abs(o);
return u >= a ? Math.round(o / a) + "d" : u >= e ? Math.round(o / e) + "h" : u >= t ? Math.round(o / t) + "m" : u >= n ? Math.round(o / n) + "s" : o + "ms";
return u >= r ? Math.round(o / r) + "d" : u >= t ? Math.round(o / t) + "h" : u >= e ? Math.round(o / e) + "m" : u >= n ? Math.round(o / n) + "s" : o + "ms";
}
function d(o) {
function c(o) {
var u = Math.abs(o);
return u >= a ? s(o, u, a, "day") : u >= e ? s(o, u, e, "hour") : u >= t ? s(o, u, t, "minute") : u >= n ? s(o, u, n, "second") : o + " ms";
return u >= r ? s(o, u, r, "day") : u >= t ? s(o, u, t, "hour") : u >= e ? s(o, u, e, "minute") : u >= n ? s(o, u, n, "second") : o + " ms";
}
function s(o, u, l, g) {
var _ = u >= l * 1.5;
return Math.round(o / l) + " " + g + (_ ? "s" : "");
function s(o, u, d, v) {
var _ = u >= d * 1.5;
return Math.round(o / d) + " " + v + (_ ? "s" : "");
}
return T;
return x;
}
function we(n) {
e.debug = e, e.default = e, e.coerce = d, e.disable = i, e.enable = r, e.enabled = c, e.humanize = be(), e.destroy = s, Object.keys(n).forEach((o) => {
e[o] = n[o];
}), e.names = [], e.skips = [], e.formatters = {};
function t(o) {
function Me(n) {
t.debug = t, t.default = t, t.coerce = c, t.disable = i, t.enable = a, t.enabled = l, t.humanize = Fe(), t.destroy = s, Object.keys(n).forEach((o) => {
t[o] = n[o];
}), t.names = [], t.skips = [], t.formatters = {};
function e(o) {
let u = 0;
for (let l = 0; l < o.length; l++)
u = (u << 5) - u + o.charCodeAt(l), u |= 0;
return e.colors[Math.abs(u) % e.colors.length];
for (let d = 0; d < o.length; d++)
u = (u << 5) - u + o.charCodeAt(d), u |= 0;
return t.colors[Math.abs(u) % t.colors.length];
}
e.selectColor = t;
function e(o) {
let u, l = null, g, _;
function h(...m) {
if (!h.enabled)
t.selectColor = e;
function t(o) {
let u, d = null, v, _;
function m(...h) {
if (!m.enabled)
return;
const C = h, F = Number(/* @__PURE__ */ new Date()), N = F - (u || F);
C.diff = N, C.prev = u, C.curr = F, u = F, m[0] = e.coerce(m[0]), typeof m[0] != "string" && m.unshift("%O");
const C = m, F = Number(/* @__PURE__ */ new Date()), P = F - (u || F);
C.diff = P, C.prev = u, C.curr = F, u = F, h[0] = t.coerce(h[0]), typeof h[0] != "string" && h.unshift("%O");
let y = 0;
m[0] = m[0].replace(/%([a-zA-Z%])/g, (S, I) => {
if (S === "%%")
h[0] = h[0].replace(/%([a-zA-Z%])/g, (M, A) => {
if (M === "%%")
return "%";
y++;
const P = e.formatters[I];
if (typeof P == "function") {
const ne = m[y];
S = P.call(C, ne), m.splice(y, 1), y--;
const R = t.formatters[A];
if (typeof R == "function") {
const O = h[y];
M = R.call(C, O), h.splice(y, 1), y--;
}
return S;
}), e.formatArgs.call(C, m), (C.log || e.log).apply(C, m);
return M;
}), t.formatArgs.call(C, h), (C.log || t.log).apply(C, h);
}
return h.namespace = o, h.useColors = e.useColors(), h.color = e.selectColor(o), h.extend = a, h.destroy = e.destroy, Object.defineProperty(h, "enabled", {
return m.namespace = o, m.useColors = t.useColors(), m.color = t.selectColor(o), m.extend = r, m.destroy = t.destroy, Object.defineProperty(m, "enabled", {
enumerable: !0,
configurable: !1,
get: () => l !== null ? l : (g !== e.namespaces && (g = e.namespaces, _ = e.enabled(o)), _),
set: (m) => {
l = m;
get: () => d !== null ? d : (v !== t.namespaces && (v = t.namespaces, _ = t.enabled(o)), _),
set: (h) => {
d = h;
}
}), typeof e.init == "function" && e.init(h), h;
}), typeof t.init == "function" && t.init(m), m;
}
function a(o, u) {
const l = e(this.namespace + (typeof u > "u" ? ":" : u) + o);
return l.log = this.log, l;
function r(o, u) {
const d = t(this.namespace + (typeof u > "u" ? ":" : u) + o);
return d.log = this.log, d;
}
function r(o) {
e.save(o), e.namespaces = o, e.names = [], e.skips = [];
function a(o) {
t.save(o), t.namespaces = o, t.names = [], t.skips = [];
let u;
const l = (typeof o == "string" ? o : "").split(/[\s,]+/), g = l.length;
for (u = 0; u < g; u++)
l[u] && (o = l[u].replace(/\*/g, ".*?"), o[0] === "-" ? e.skips.push(new RegExp("^" + o.slice(1) + "$")) : e.names.push(new RegExp("^" + o + "$")));
const d = (typeof o == "string" ? o : "").split(/[\s,]+/), v = d.length;
for (u = 0; u < v; u++)
d[u] && (o = d[u].replace(/\*/g, ".*?"), o[0] === "-" ? t.skips.push(new RegExp("^" + o.slice(1) + "$")) : t.names.push(new RegExp("^" + o + "$")));
}
function i() {
const o = [
...e.names.map(f),
...e.skips.map(f).map((u) => "-" + u)
...t.names.map(f),
...t.skips.map(f).map((u) => "-" + u)
].join(",");
return e.enable(""), o;
return t.enable(""), o;
}
function c(o) {
function l(o) {
if (o[o.length - 1] === "*")
return !0;
let u, l;
for (u = 0, l = e.skips.length; u < l; u++)
if (e.skips[u].test(o))
let u, d;
for (u = 0, d = t.skips.length; u < d; u++)
if (t.skips[u].test(o))
return !1;
for (u = 0, l = e.names.length; u < l; u++)
if (e.names[u].test(o))
for (u = 0, d = t.names.length; u < d; u++)
if (t.names[u].test(o))
return !0;

@@ -584,3 +584,3 @@ return !1;

}
function d(o) {
function c(o) {
return o instanceof Error ? o.stack || o.message : o;

@@ -591,12 +591,12 @@ }

}
return e.enable(e.load()), e;
return t.enable(t.load()), t;
}
var _e = we;
(function(n, t) {
t.formatArgs = a, t.save = r, t.load = i, t.useColors = e, t.storage = c(), t.destroy = (() => {
let d = !1;
var Ee = Me;
(function(n, e) {
e.formatArgs = r, e.save = a, e.load = i, e.useColors = t, e.storage = l(), e.destroy = (() => {
let c = !1;
return () => {
d || (d = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
c || (c = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
};
})(), t.colors = [
})(), e.colors = [
"#0000CC",

@@ -679,3 +679,3 @@ "#0000FF",

];
function e() {
function t() {
return typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs) ? !0 : typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/) ? !1 : typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773

@@ -687,17 +687,17 @@ typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?

}
function a(d) {
if (d[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + d[0] + (this.useColors ? "%c " : " ") + "+" + n.exports.humanize(this.diff), !this.useColors)
function r(c) {
if (c[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + c[0] + (this.useColors ? "%c " : " ") + "+" + n.exports.humanize(this.diff), !this.useColors)
return;
const s = "color: " + this.color;
d.splice(1, 0, s, "color: inherit");
c.splice(1, 0, s, "color: inherit");
let o = 0, u = 0;
d[0].replace(/%[a-zA-Z%]/g, (l) => {
l !== "%%" && (o++, l === "%c" && (u = o));
}), d.splice(u, 0, s);
c[0].replace(/%[a-zA-Z%]/g, (d) => {
d !== "%%" && (o++, d === "%c" && (u = o));
}), c.splice(u, 0, s);
}
t.log = console.debug || console.log || (() => {
e.log = console.debug || console.log || (() => {
});
function r(d) {
function a(c) {
try {
d ? t.storage.setItem("debug", d) : t.storage.removeItem("debug");
c ? e.storage.setItem("debug", c) : e.storage.removeItem("debug");
} catch {

@@ -707,10 +707,10 @@ }

function i() {
let d;
let c;
try {
d = t.storage.getItem("debug");
c = e.storage.getItem("debug");
} catch {
}
return !d && typeof process < "u" && "env" in process && (d = process.env.DEBUG), d;
return !c && typeof process < "u" && "env" in process && (c = process.env.DEBUG), c;
}
function c() {
function l() {
try {

@@ -721,7 +721,7 @@ return localStorage;

}
n.exports = _e(t);
n.exports = Ee(e);
const { formatters: f } = n.exports;
f.j = function(d) {
f.j = function(c) {
try {
return JSON.stringify(d);
return JSON.stringify(c);
} catch (s) {

@@ -731,74 +731,80 @@ return "[UnexpectedJSONParseError]: " + s.message;

};
})(j, j.exports);
var Fe = j.exports;
const Me = /* @__PURE__ */ ye(Fe);
function Ee(n) {
return Me("jenesius-vue-modal:".concat(n));
})(q, q.exports);
var ke = q.exports;
const Se = /* @__PURE__ */ _e(ke);
function Pe(n) {
return Se("jenesius-vue-modal:".concat(n));
}
const ke = ["onPointerdown"], U = {
const Ae = ["onPointerdown"], X = /* @__PURE__ */ ue({
__name: "WidgetModalContainerItem",
props: {
id: Number
id: {}
},
setup(n) {
const t = Y(null), e = Ee("modal-item"), a = n, r = V(a.id);
function i() {
const e = Pe("modal-item"), t = n, r = te(t.id), a = j(), i = j();
function l() {
if (r.backgroundClose)
return D(r.id, { background: !0 }).catch(() => {
return L(r.id, { background: !0 }).catch(() => {
});
}
Q(() => t.value, (f) => {
r.instance = f;
}), X(() => {
H(() => i.value, (c) => {
r.instance = c;
}), Z(() => {
var c;
if (e(`Modal(${r.id}) is mounted`), r.draggable) {
const f = typeof r.draggable == "string" ? r.draggable : `[modalid=_modal_${a.id}]`;
e(`The modal window is movable(${f}).`), setTimeout(() => {
c(document.querySelector(f));
}, 0);
const s = `[modalid=_modal_${t.id}]`, o = typeof r.draggable == "string" ? r.draggable : s;
e(`The modal window is movable(${o}).`), a.value ? (e("Finding an item to drag: %s", o), f(
(c = a.value) == null ? void 0 : c.querySelector(s),
a.value.querySelector(o)
)) : e("The modal container is not mounted. Modal id %d.", r.id);
}
});
function c(f) {
if (!f) {
function f(c, s) {
if (!s) {
e("draggable item not found.");
return;
}
const d = document.querySelector(`[modalid=_modal_${a.id}]`);
f.addEventListener("pointerdown", (s) => {
var N;
const o = (N = d.getAttribute("style")) == null ? void 0 : N.match(/transform: translate\((.*)px,\s*(.*)px\)/);
let u = o == null ? void 0 : o[1], l = o == null ? void 0 : o[2];
u = typeof u == "string" ? Number.parseInt(u) : 0, l = typeof l == "string" ? Number.parseInt(l) : 0;
const { clientX: g, clientY: _ } = s, h = g, m = _;
e(`movement started at (${m}, ${m})`), document.addEventListener("pointermove", C, { passive: !0 }), document.addEventListener("pointerup", F, { once: !0 });
function C(y) {
const { clientX: q, clientY: S } = y, I = u + q - h, P = l + S - m;
e(`move at (${I}, ${P})`), d.style.transform = `translate(${I}px,${P}px)`;
if (!c) {
e("HTML modal is not founded.");
return;
}
s.addEventListener("pointerdown", (o) => {
var M;
const u = (M = c.getAttribute("style")) == null ? void 0 : M.match(/transform: translate\((.*)px,\s*(.*)px\)/), d = u == null ? void 0 : u[1], v = u == null ? void 0 : u[2];
let _ = typeof d == "string" ? Number.parseInt(d) : 0, m = typeof v == "string" ? Number.parseInt(v) : 0;
const { clientX: h, clientY: C } = o, F = h, P = C;
e(`movement started at (${P}, ${P})`), document.addEventListener("pointermove", y, { passive: !0 }), document.addEventListener("pointerup", $, { once: !0 });
function y(A) {
const { clientX: R, clientY: O } = A, z = _ + R - F, B = m + O - P;
e(`move at (${z}, ${B})`), c.style.transform = `translate(${z}px,${B}px)`;
}
function F(y) {
e("movement completed"), document.removeEventListener("pointermove", C), y.preventDefault();
function $(A) {
e("movement completed"), document.removeEventListener("pointermove", y), A.preventDefault();
}
});
}
return (f, d) => ($(), ie("div", {
return (c, s) => (U(), se("div", {
class: "widget__modal-container__item modal-container",
onPointerdown: ae(i, ["self", "stop"])
onPointerdown: ce(l, ["self", "stop"]),
ref_key: "modalContainerRef",
ref: a
}, [
($(), ue(se(R(r).component), ce(R(r).props.value, {
(U(), le(de(T(r).component), fe(T(r).props.value, {
class: "modal-item widget__modal-wrap",
modalId: `_modal_${n.id}`,
modalId: `_modal_${c.id}`,
ref_key: "modalRef",
ref: t
}, le(R(r).events)), null, 16, ["modalId"]))
], 40, ke));
ref: i
}, he(T(r).events)), null, 16, ["modalId"]))
], 40, Ae));
}
};
function Se(n) {
n === void 0 && (n = M.DEFAULT_NAMESPACE);
var t = M.instance.getByName(n);
t.initialized = !0, n === M.DEFAULT_NAMESPACE && document.addEventListener("keyup", function(e) {
if (w.escClose && (e.key === "Escape" || e.code === "Escape")) {
var a = ee(n);
if (!a)
});
function Ne(n) {
n === void 0 && (n = E.DEFAULT_NAMESPACE);
var e = E.instance.getByName(n);
e.initialized = !0, n === E.DEFAULT_NAMESPACE && document.addEventListener("keyup", function(t) {
if (w.escClose && (t.key === "Escape" || t.code === "Escape")) {
var r = re(n);
if (!r)
return;
D(a.id, { esc: !0 }).catch(function() {
L(r.id, { esc: !0 }).catch(function() {
});

@@ -808,3 +814,3 @@ }

}
const xe = {
const qe = {
props: {

@@ -814,10 +820,10 @@ namespace: String

setup(n) {
return X(() => {
Se(n.namespace);
return Z(() => {
Ne(n.namespace);
}), () => {
const t = p(n.namespace);
return L(de, { name: w.animation, tag: "div" }, {
default: () => t.queue.map((e) => L(U, {
key: e.id,
id: e.id
const e = p(n.namespace);
return G(me, { name: w.animation, tag: "div" }, {
default: () => e.queue.map((t) => G(X, {
key: t.id,
id: t.id
}))

@@ -827,35 +833,35 @@ });

},
components: { WidgetContainerModalItem: U }
components: { WidgetContainerModalItem: X }
};
var A = {
var N = {
router: null
};
function Pe(n) {
var t = this;
if (A.router)
throw v.DuplicatedRouterIntegration();
A.router = n;
function e(a) {
for (var r = a.matched.length - 1; r >= 0; r--) {
var i = a.matched[r].components, c = Object.values(i).find(function(f) {
function Re(n) {
var e = this;
if (N.router)
throw g.DuplicatedRouterIntegration();
N.router = n;
function t(r) {
for (var a = r.matched.length - 1; a >= 0; a--) {
var i = r.matched[a].components, l = Object.values(i).find(function(f) {
return f._isModal;
});
if (c)
return c;
if (l)
return l;
}
return null;
}
n.beforeEach(function(a, r) {
return E(t, void 0, void 0, function() {
var i, c, f;
return k(this, function(d) {
switch (d.label) {
n.beforeEach(function(r, a) {
return k(e, void 0, void 0, function() {
var i, l, f;
return S(this, function(c) {
switch (c.label) {
case 0:
return d.trys.push([0, 3, , 4]), i = e(r), i && !(!((f = (c = i.getModalObject()) === null || c === void 0 ? void 0 : c.closed) === null || f === void 0) && f.value) ? [4, i.close(!0)] : [3, 2];
return c.trys.push([0, 3, , 4]), i = t(a), i && !(!((f = (l = i.getModalObject()) === null || l === void 0 ? void 0 : l.closed) === null || f === void 0) && f.value) ? [4, i.close(!0)] : [3, 2];
case 1:
d.sent(), d.label = 2;
c.sent(), c.label = 2;
case 2:
return [3, 4];
case 3:
return d.sent(), [2, !1];
return c.sent(), [2, !1];
case 4:

@@ -869,9 +875,9 @@ return [

});
}), n.afterEach(function(a) {
return E(t, void 0, void 0, function() {
var r;
return k(this, function(i) {
}), n.afterEach(function(r) {
return k(e, void 0, void 0, function() {
var a;
return S(this, function(i) {
switch (i.label) {
case 0:
return r = e(a), r ? [4, r.initialize()] : [3, 2];
return a = t(r), a ? [4, a.initialize()] : [3, 2];
case 1:

@@ -889,19 +895,19 @@ i.sent(), i.label = 2;

}
function Ae(n) {
var t = null, e = !1;
function a() {
return E(this, void 0, void 0, function() {
return k(this, function(r) {
switch (r.label) {
function Ie(n) {
var e = null, t = !1;
function r() {
return k(this, void 0, void 0, function() {
return S(this, function(a) {
switch (a.label) {
case 0:
if (!A.router)
throw v.ModalRouterIntegrationNotInitialized();
return e = !1, t = null, [4, Ce(n, W(function() {
if (!N.router)
throw g.ModalRouterIntegrationNotInitialized();
return t = !1, e = null, [4, be(n, J(function() {
var i;
return (i = A.router) === null || i === void 0 ? void 0 : i.currentRoute.value.params;
return (i = N.router) === null || i === void 0 ? void 0 : i.currentRoute.value.params;
}), { isRoute: !0 })];
case 1:
return t = r.sent(), t.onclose = function() {
return e = a.sent(), e.onclose = function() {
var i;
e || (i = A.router) === null || i === void 0 || i.back();
t || (i = N.router) === null || i === void 0 || i.back();
}, [

@@ -917,3 +923,3 @@ 2

getModalObject: function() {
return t;
return e;
},

@@ -925,8 +931,8 @@ /**

_isModal: !0,
close: function(r) {
return r === void 0 && (r = !1), E(this, void 0, void 0, function() {
return k(this, function(i) {
close: function(a) {
return a === void 0 && (a = !1), k(this, void 0, void 0, function() {
return S(this, function(i) {
switch (i.label) {
case 0:
return e = r, t ? [4, t.close()] : [3, 2];
return t = a, e ? [4, e.close()] : [3, 2];
case 1:

@@ -943,3 +949,3 @@ return [2, i.sent()];

},
initialize: a,
initialize: r,
/**

@@ -959,24 +965,24 @@ * Мнимая обёртка. Для того, чтобы рендеринг запускался.

}
Ae.init = Pe;
var je = p().queue;
function De(n) {
Ie.init = Re;
var Le = p().queue;
function $e(n) {
return p(n).queue;
}
export {
O as Modal,
D as closeById,
ve as closeModal,
Oe as config,
xe as container,
pe as getComponentFromStore,
ee as getCurrentModal,
De as getQueueByNamespace,
je as modalQueue,
Re as onBeforeModalClose,
Ce as openModal,
Ie as popModal,
Te as promptModal,
te as pushModal,
Ae as useModalRouter
I as Modal,
L as closeById,
pe as closeModal,
xe as config,
qe as container,
we as getComponentFromStore,
re as getCurrentModal,
$e as getQueueByNamespace,
Le as modalQueue,
je as onBeforeModalClose,
be as openModal,
Te as popModal,
De as promptModal,
oe as pushModal,
Ie as useModalRouter
};
//# sourceMappingURL=jenesius-vue-modal.es.js.map
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".modal-container{position:fixed;left:0;top:0;height:100%;width:100%;display:flex;align-items:center;justify-content:center;background-color:#3e3e3e21;cursor:pointer}.modal-item{cursor:default}.modal-list-enter-active,.modal-list-leave-active,.modal-list-enter-active .modal-item,.modal-list-leave-active .modal-item{transition:all .2s ease}.modal-list-enter-from,.modal-list-leave-to{opacity:0!important}.modal-list-enter-from .modal-item,.modal-list-leave-to .modal-item{transform:translateY(-60px)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
(function(h,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(h=typeof globalThis<"u"?globalThis:h||self,m(h.JenesiusVueModal={},h.Vue))})(this,function(h,m){"use strict";/*!
* jenesius-vue-modal v1.11.4
(function(m,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(m=typeof globalThis<"u"?globalThis:m||self,f(m.JenesiusVueModal={},m.Vue))})(this,function(m,f){"use strict";/*!
* jenesius-vue-modal v1.11.5
* (c) 2024 Jenesius
* @license MIT
*/var D=function(n,t){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},D(n,t)};function ee(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");D(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function M(n,t,e,i){function r(a){return a instanceof e?a:new e(function(c){c(a)})}return new(e||(e=Promise))(function(a,c){function f(o){try{s(i.next(o))}catch(u){c(u)}}function d(o){try{s(i.throw(o))}catch(u){c(u)}}function s(o){o.done?a(o.value):r(o.value).then(f,d)}s((i=i.apply(n,t||[])).next())})}function E(n,t){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,c;return c={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function f(s){return function(o){return d([s,o])}}function d(s){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,s[0]&&(e=0)),e;)try{if(i=1,r&&(a=s[0]&2?r.return:s[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;switch(r=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return e.label++,{value:s[1],done:!1};case 5:e.label++,r=s[1],s=[0];continue;case 7:s=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){e.label=s[1];break}if(s[0]===6&&e.label<a[1]){e.label=a[1],a=s;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(s);break}a[2]&&e.ops.pop(),e.trys.pop();continue}s=t.call(n,e)}catch(o){s=[6,o],r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var v=function(n){ee(t,n);function t(e,i){i===void 0&&(i=null);var r=n.call(this)||this;return r.isModalError=!0,r.message=e,r.details=i,r}return t.Undefined=function(e){return new t("Modal with id: ".concat(e," not founded. The modal window may have been closed earlier."))},t.UndefinedGuardName=function(e){return new t("Guard's name ".concat(e," is not declaration."))},t.NextReject=function(e){return new t("Guard returned false. Modal navigation was stopped. Modal id ".concat(e))},t.GuardDeclarationType=function(e){return new t("Guard's type should be a function. Provided:",e)},t.ConfigurationType=function(e){return new t("Configuration type must be an Object. Provided",e)},t.ConfigurationUndefinedParam=function(e,i){return new t("In configuration founded unknown parameter: ".concat(e,". Available are ").concat(i.join(", ")," "))},t.QueueNoEmpty=function(){return new t("Modal's queue is not empty. Probably some modal reject closing by onClose hook.")},t.EmptyModalQueue=function(){return new t("Modal queue is empty.")},t.NotInitialized=function(e){return new t("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(e,". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."))},t.ModalComponentNotProvided=function(){return new t("The first parameter(VueComponent) was not specified.")},t.DuplicatedRouterIntegration=function(){return new t("useModalRouter.init should escaped only once.")},t.ModalRouterIntegrationNotInitialized=function(){return new t("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation")},t.ModalEventNameMustBeString=function(e){return new t("Event name must be a string. Provided: ".concat(e))},t.ModalNotFoundByID=function(e){return new t("Modal with ID ".concat(e," was not found."))},t.ModalNotExistsInStore=function(e){return new t("Provided name(".concat(e,") don't exist in the store. Has the given name been added to the store?"))},t}(Error),k=function(){function n(){this.state=new Map,n.instance=this}return n.prototype.getByName=function(t){return t===void 0&&(t=n.DEFAULT_NAMESPACE),this.state.has(t)||this.state.set(t,{queue:m.reactive([]),initialized:!1}),this.state.get(t)},n.prototype.forceClean=function(){this.state.forEach(function(t){t.queue.splice(0,t.queue.length)})},n.DEFAULT_NAMESPACE="default",n}(),L=function(){var n=new k,t={scrollLock:!0,animation:"modal-list",backgroundClose:!0,escClose:!0,store:{},skipInitCheck:!1,draggable:!1},e=n.getByName().queue;return m.watch(function(){return e},function(){t.scrollLock&&(e.length?document.body.style.overflowY="hidden":document.body.style.overflowY="auto")},{deep:!0}),{namespaceStore:n,configuration:t}}();function b(n){return L.namespaceStore.getByName(n)}var _=L.configuration;function z(n){var t={backgroundClose:_.backgroundClose,isRoute:!1,namespace:k.DEFAULT_NAMESPACE,draggable:_.draggable};return n.backgroundClose!==void 0&&(t.backgroundClose=n.backgroundClose),n.isRoute&&(t.isRoute=n.isRoute),n.namespace&&(t.namespace=n.namespace),n.draggable!==void 0&&(t.draggable=n.draggable),t}function U(n){n===void 0&&(n={});var t={background:!1,esc:!1};return Object.assign(t,n)}function G(n){return n||(n={}),n}function R(n,t){t===void 0&&(t={});var e=N.STORE.get(n);if(!e)return Promise.reject(v.ModalNotFoundByID(n));var i=b(e.namespace),r=i.queue.findIndex(function(c){return c.id===n});if(r===-1)return Promise.reject(v.Undefined(n));var a=F.get(n,"close").map(function(c){return ne(c,n,U(t))});return Y(a).then(function(){i.queue.splice(r,1)}).then(function(){F.get(n,"destroy").forEach(function(c){return c(U(t))})}).then(function(){F.delete(n)})}var N=function(){function n(t,e,i){var r=this;this.events=m.reactive({}),this.backgroundClose=!0,this.isRoute=!1,this.id=n.modalId++,this.component=t,this.props=m.ref(e),this.closed=m.computed(function(){return!b(i.namespace).queue.includes(r)}),t.beforeModalClose&&F.add(this.id,"close",t.beforeModalClose);var a=z(i);this.backgroundClose=a.backgroundClose,this.isRoute=a.isRoute,this.namespace=a.namespace,this.draggable=a.draggable,n.STORE.set(this.id,this)}return n.prototype.close=function(){return R(this.id)},Object.defineProperty(n.prototype,"onclose",{set:function(t){F.add(this.id,"close",t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ondestroy",{set:function(t){F.add(this.id,"destroy",t)},enumerable:!1,configurable:!0}),n.prototype.on=function(t,e){var i=this;return Array.isArray(this.events[t])||(this.events[t]=[]),this.events[t].push(e),function(){var r=i.events[t].indexOf(e);r!==-1&&i.events[t].splice(r,1)}},n.STORE=new Map,n.modalId=0,n.EVENT_PROMPT="jenesius-vue-modal:____P____R____O____M____P____T",n}();function Q(n){return N.STORE.get(n)}var te={store:{},add:function(n,t,e){var i,r;if(typeof e!="function")throw v.GuardDeclarationType(e);this.store[n]||(this.store[n]=(i={},i[t]=[],i)),this.store[n][t]||(this.store[n][t]=[]),(r=this.store[n][t])===null||r===void 0||r.push(e)},get:function(n,t){return n in this.store?t in this.store[n]?this.store[n][t]||[]:[]:[]},delete:function(n){n in this.store&&delete this.store[n]}};const F=te;function Y(n){return n.reduce(function(t,e){return t.then(function(){return e()})},Promise.resolve())}function ne(n,t,e){return function(){return new Promise(function(i,r){var a,c=function(f){f===void 0&&(f=!0),f===!1&&r(v.NextReject(t)),i()};Promise.resolve(n.call((a=Q(t))===null||a===void 0?void 0:a.instance,e)).then(c).catch(function(f){return r(f)})})}}function W(n){return n=G(n),Y(b(n.namespace).queue.map(function(t){return function(){return t.close()}}))}function q(n){var t=b(n),e=t.queue;if(e.length!==0)return e[e.length-1]}function re(n){n=G(n);var t=q(n.namespace);return t?t.close():Promise.resolve()}function oe(n,t,e){var i=z(e),r=b(i.namespace);if(i.namespace===k.DEFAULT_NAMESPACE&&!r.initialized&&!_.skipInitCheck)throw v.NotInitialized(i.namespace);if(typeof n=="string"){var a=J(n);if(!a)throw v.ModalNotExistsInStore(n);n=a}if(!n)throw v.ModalComponentNotProvided();var c=new N(n,t,i);return r.queue.push(m.markRaw(c)),c}function B(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),Promise.resolve().then(function(){return oe(n,t,e)})}function X(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),W({namespace:e.namespace}).then(function(){var i=b(e.namespace);if(i.queue.length)throw v.QueueNoEmpty()}).then(function(){return B(n,t,e)})}function ie(n){if(typeof n!="object")throw v.ConfigurationType(n);Object.assign(_,n)}function ae(n){var t,e,i,r=m.getCurrentInstance(),a=String(((t=r==null?void 0:r.props)===null||t===void 0?void 0:t.modalId)||((e=r==null?void 0:r.props)===null||e===void 0?void 0:e["modal-id"])||((i=r==null?void 0:r.attrs)===null||i===void 0?void 0:i.modalId)),c=a.replace(/[^0-9]/g,"");F.add(Number(c),"close",n)}function ue(n,t,e){return t===void 0&&(t={}),e===void 0&&(e={}),M(this,void 0,void 0,function(){var i,r,a=this;return E(this,function(c){switch(c.label){case 0:return[4,B(n,t,e)];case 1:return i=c.sent(),r=!1,[2,new Promise(function(f){i.on(N.EVENT_PROMPT,function(d){return M(a,void 0,void 0,function(){return E(this,function(s){return r=!0,[2,i.close().then(function(){return f(d)}).catch(function(){return r=!1})]})})}),i.ondestroy=function(){r||f(null)}})]}})})}function J(n){return _.store[n]||void 0}function se(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var x={exports:{}},$,V;function ce(){if(V)return $;V=1;var n=1e3,t=n*60,e=t*60,i=e*24,r=i*7,a=i*365.25;$=function(o,u){u=u||{};var l=typeof o;if(l==="string"&&o.length>0)return c(o);if(l==="number"&&isFinite(o))return u.long?d(o):f(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function c(o){if(o=String(o),!(o.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(u){var l=parseFloat(u[1]),p=(u[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return l*a;case"weeks":case"week":case"w":return l*r;case"days":case"day":case"d":return l*i;case"hours":case"hour":case"hrs":case"hr":case"h":return l*e;case"minutes":case"minute":case"mins":case"min":case"m":return l*t;case"seconds":case"second":case"secs":case"sec":case"s":return l*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function f(o){var u=Math.abs(o);return u>=i?Math.round(o/i)+"d":u>=e?Math.round(o/e)+"h":u>=t?Math.round(o/t)+"m":u>=n?Math.round(o/n)+"s":o+"ms"}function d(o){var u=Math.abs(o);return u>=i?s(o,u,i,"day"):u>=e?s(o,u,e,"hour"):u>=t?s(o,u,t,"minute"):u>=n?s(o,u,n,"second"):o+" ms"}function s(o,u,l,p){var S=u>=l*1.5;return Math.round(o/l)+" "+p+(S?"s":"")}return $}function le(n){e.debug=e,e.default=e,e.coerce=d,e.disable=a,e.enable=r,e.enabled=c,e.humanize=ce(),e.destroy=s,Object.keys(n).forEach(o=>{e[o]=n[o]}),e.names=[],e.skips=[],e.formatters={};function t(o){let u=0;for(let l=0;l<o.length;l++)u=(u<<5)-u+o.charCodeAt(l),u|=0;return e.colors[Math.abs(u)%e.colors.length]}e.selectColor=t;function e(o){let u,l=null,p,S;function C(...g){if(!C.enabled)return;const y=C,P=Number(new Date),T=P-(u||P);y.diff=T,y.prev=u,y.curr=P,u=P,g[0]=e.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let w=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(I,j)=>{if(I==="%%")return"%";w++;const O=e.formatters[j];if(typeof O=="function"){const we=g[w];I=O.call(y,we),g.splice(w,1),w--}return I}),e.formatArgs.call(y,g),(y.log||e.log).apply(y,g)}return C.namespace=o,C.useColors=e.useColors(),C.color=e.selectColor(o),C.extend=i,C.destroy=e.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>l!==null?l:(p!==e.namespaces&&(p=e.namespaces,S=e.enabled(o)),S),set:g=>{l=g}}),typeof e.init=="function"&&e.init(C),C}function i(o,u){const l=e(this.namespace+(typeof u>"u"?":":u)+o);return l.log=this.log,l}function r(o){e.save(o),e.namespaces=o,e.names=[],e.skips=[];let u;const l=(typeof o=="string"?o:"").split(/[\s,]+/),p=l.length;for(u=0;u<p;u++)l[u]&&(o=l[u].replace(/\*/g,".*?"),o[0]==="-"?e.skips.push(new RegExp("^"+o.slice(1)+"$")):e.names.push(new RegExp("^"+o+"$")))}function a(){const o=[...e.names.map(f),...e.skips.map(f).map(u=>"-"+u)].join(",");return e.enable(""),o}function c(o){if(o[o.length-1]==="*")return!0;let u,l;for(u=0,l=e.skips.length;u<l;u++)if(e.skips[u].test(o))return!1;for(u=0,l=e.names.length;u<l;u++)if(e.names[u].test(o))return!0;return!1}function f(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}function d(o){return o instanceof Error?o.stack||o.message:o}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return e.enable(e.load()),e}var de=le;(function(n,t){t.formatArgs=i,t.save=r,t.load=a,t.useColors=e,t.storage=c(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function e(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function i(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;d.splice(1,0,s,"color: inherit");let o=0,u=0;d[0].replace(/%[a-zA-Z%]/g,l=>{l!=="%%"&&(o++,l==="%c"&&(u=o))}),d.splice(u,0,s)}t.log=console.debug||console.log||(()=>{});function r(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function a(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof process<"u"&&"env"in process&&(d=process.env.DEBUG),d}function c(){try{return localStorage}catch{}}n.exports=de(t);const{formatters:f}=n.exports;f.j=function(d){try{return JSON.stringify(d)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}})(x,x.exports);var fe=x.exports;const me=se(fe);function he(n){return me("jenesius-vue-modal:".concat(n))}const _e="",ge=["onPointerdown"],H={__name:"WidgetModalContainerItem",props:{id:Number},setup(n){const t=m.ref(null),e=he("modal-item"),i=n,r=Q(i.id);function a(){if(r.backgroundClose)return R(r.id,{background:!0}).catch(()=>{})}m.watch(()=>t.value,f=>{r.instance=f}),m.onMounted(()=>{if(e(`Modal(${r.id}) is mounted`),r.draggable){const f=typeof r.draggable=="string"?r.draggable:`[modalid=_modal_${i.id}]`;e(`The modal window is movable(${f}).`),setTimeout(()=>{c(document.querySelector(f))},0)}});function c(f){if(!f){e("draggable item not found.");return}const d=document.querySelector(`[modalid=_modal_${i.id}]`);f.addEventListener("pointerdown",s=>{var T;const o=(T=d.getAttribute("style"))==null?void 0:T.match(/transform: translate\((.*)px,\s*(.*)px\)/);let u=o==null?void 0:o[1],l=o==null?void 0:o[2];u=typeof u=="string"?Number.parseInt(u):0,l=typeof l=="string"?Number.parseInt(l):0;const{clientX:p,clientY:S}=s,C=p,g=S;e(`movement started at (${g}, ${g})`),document.addEventListener("pointermove",y,{passive:!0}),document.addEventListener("pointerup",P,{once:!0});function y(w){const{clientX:K,clientY:I}=w,j=u+K-C,O=l+I-g;e(`move at (${j}, ${O})`),d.style.transform=`translate(${j}px,${O}px)`}function P(w){e("movement completed"),document.removeEventListener("pointermove",y),w.preventDefault()}})}return(f,d)=>(m.openBlock(),m.createElementBlock("div",{class:"widget__modal-container__item modal-container",onPointerdown:m.withModifiers(a,["self","stop"])},[(m.openBlock(),m.createBlock(m.resolveDynamicComponent(m.unref(r).component),m.mergeProps(m.unref(r).props.value,{class:"modal-item widget__modal-wrap",modalId:`_modal_${n.id}`,ref_key:"modalRef",ref:t},m.toHandlers(m.unref(r).events)),null,16,["modalId"]))],40,ge))}};function Ce(n){n===void 0&&(n=k.DEFAULT_NAMESPACE);var t=k.instance.getByName(n);t.initialized=!0,n===k.DEFAULT_NAMESPACE&&document.addEventListener("keyup",function(e){if(_.escClose&&(e.key==="Escape"||e.code==="Escape")){var i=q(n);if(!i)return;R(i.id,{esc:!0}).catch(function(){})}})}const Fe="",ve={props:{namespace:String},setup(n){return m.onMounted(()=>{Ce(n.namespace)}),()=>{const t=b(n.namespace);return m.h(m.TransitionGroup,{name:_.animation,tag:"div"},{default:()=>t.queue.map(e=>m.h(H,{key:e.id,id:e.id}))})}},components:{WidgetContainerModalItem:H}};var A={router:null};function pe(n){var t=this;if(A.router)throw v.DuplicatedRouterIntegration();A.router=n;function e(i){for(var r=i.matched.length-1;r>=0;r--){var a=i.matched[r].components,c=Object.values(a).find(function(f){return f._isModal});if(c)return c}return null}n.beforeEach(function(i,r){return M(t,void 0,void 0,function(){var a,c,f;return E(this,function(d){switch(d.label){case 0:return d.trys.push([0,3,,4]),a=e(r),a&&!(!((f=(c=a.getModalObject())===null||c===void 0?void 0:c.closed)===null||f===void 0)&&f.value)?[4,a.close(!0)]:[3,2];case 1:d.sent(),d.label=2;case 2:return[3,4];case 3:return d.sent(),[2,!1];case 4:return[2]}})})}),n.afterEach(function(i){return M(t,void 0,void 0,function(){var r;return E(this,function(a){switch(a.label){case 0:return r=e(i),r?[4,r.initialize()]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})})}function Z(n){var t=null,e=!1;function i(){return M(this,void 0,void 0,function(){return E(this,function(r){switch(r.label){case 0:if(!A.router)throw v.ModalRouterIntegrationNotInitialized();return e=!1,t=null,[4,X(n,m.computed(function(){var a;return(a=A.router)===null||a===void 0?void 0:a.currentRoute.value.params}),{isRoute:!0})];case 1:return t=r.sent(),t.onclose=function(){var a;e||(a=A.router)===null||a===void 0||a.back()},[2]}})})}return{getModalObject:function(){return t},_isModal:!0,close:function(r){return r===void 0&&(r=!1),M(this,void 0,void 0,function(){return E(this,function(a){switch(a.label){case 0:return e=r,t?[4,t.close()]:[3,2];case 1:return[2,a.sent()];case 2:return[2]}})})},initialize:i,setup:function(){return function(){return null}}}}Z.init=pe;var ye=b().queue;function be(n){return b(n).queue}h.Modal=N,h.closeById=R,h.closeModal=W,h.config=ie,h.container=ve,h.getComponentFromStore=J,h.getCurrentModal=q,h.getQueueByNamespace=be,h.modalQueue=ye,h.onBeforeModalClose=ae,h.openModal=X,h.popModal=re,h.promptModal=ue,h.pushModal=B,h.useModalRouter=Z,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
*/var D=function(n,e){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},D(n,e)};function re(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");D(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function M(n,e,t,r){function a(i){return i instanceof t?i:new t(function(l){l(i)})}return new(t||(t=Promise))(function(i,l){function h(o){try{s(r.next(o))}catch(u){l(u)}}function c(o){try{s(r.throw(o))}catch(u){l(u)}}function s(o){o.done?i(o.value):a(o.value).then(h,c)}s((r=r.apply(n,e||[])).next())})}function E(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,a,i,l;return l={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function h(s){return function(o){return c([s,o])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,s[0]&&(t=0)),t;)try{if(r=1,a&&(i=s[0]&2?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1],i=s;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(s);break}i[2]&&t.ops.pop(),t.trys.pop();continue}s=e.call(n,t)}catch(o){s=[6,o],a=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;var v=function(n){re(e,n);function e(t,r){r===void 0&&(r=null);var a=n.call(this)||this;return a.isModalError=!0,a.message=t,a.details=r,a}return e.Undefined=function(t){return new e("Modal with id: ".concat(t," not founded. The modal window may have been closed earlier."))},e.UndefinedGuardName=function(t){return new e("Guard's name ".concat(t," is not declaration."))},e.NextReject=function(t){return new e("Guard returned false. Modal navigation was stopped. Modal id ".concat(t))},e.GuardDeclarationType=function(t){return new e("Guard's type should be a function. Provided:",t)},e.ConfigurationType=function(t){return new e("Configuration type must be an Object. Provided",t)},e.ConfigurationUndefinedParam=function(t,r){return new e("In configuration founded unknown parameter: ".concat(t,". Available are ").concat(r.join(", ")," "))},e.QueueNoEmpty=function(){return new e("Modal's queue is not empty. Probably some modal reject closing by onClose hook.")},e.EmptyModalQueue=function(){return new e("Modal queue is empty.")},e.NotInitialized=function(t){return new e("Modal Container not found. Put container from jenesius-vue-modal in App's template. Namespace: ".concat(t,". Check documentation for more information https://modal.jenesius.com/docs.html/installation#getting-started."))},e.ModalComponentNotProvided=function(){return new e("The first parameter(VueComponent) was not specified.")},e.DuplicatedRouterIntegration=function(){return new e("useModalRouter.init should escaped only once.")},e.ModalRouterIntegrationNotInitialized=function(){return new e("The integration was not initialized. Please, use useModalRouter.init(router). For more information: https://modal.jenesius.com/docs.html/integration-vue-router#installation")},e.ModalEventNameMustBeString=function(t){return new e("Event name must be a string. Provided: ".concat(t))},e.ModalNotFoundByID=function(t){return new e("Modal with ID ".concat(t," was not found."))},e.ModalNotExistsInStore=function(t){return new e("Provided name(".concat(t,") don't exist in the store. Has the given name been added to the store?"))},e}(Error),k=function(){function n(){this.state=new Map,n.instance=this}return n.prototype.getByName=function(e){return e===void 0&&(e=n.DEFAULT_NAMESPACE),this.state.has(e)||this.state.set(e,{queue:f.reactive([]),initialized:!1}),this.state.get(e)},n.prototype.forceClean=function(){this.state.forEach(function(e){e.queue.splice(0,e.queue.length)})},n.DEFAULT_NAMESPACE="default",n}(),z=function(){var n=new k,e={scrollLock:!0,animation:"modal-list",backgroundClose:!0,escClose:!0,store:{},skipInitCheck:!1,draggable:!1},t=n.getByName().queue;return f.watch(function(){return t},function(){e.scrollLock&&(t.length?document.body.style.overflowY="hidden":document.body.style.overflowY="auto")},{deep:!0}),{namespaceStore:n,configuration:e}}();function y(n){return z.namespaceStore.getByName(n)}var w=z.configuration;function U(n){var e={backgroundClose:w.backgroundClose,isRoute:!1,namespace:k.DEFAULT_NAMESPACE,draggable:w.draggable};return n.backgroundClose!==void 0&&(e.backgroundClose=n.backgroundClose),n.isRoute&&(e.isRoute=n.isRoute),n.namespace&&(e.namespace=n.namespace),n.draggable!==void 0&&(e.draggable=n.draggable),e}function G(n){n===void 0&&(n={});var e={background:!1,esc:!1};return Object.assign(e,n)}function Q(n){return n||(n={}),n}function T(n,e){e===void 0&&(e={});var t=N.STORE.get(n);if(!t)return Promise.reject(v.ModalNotFoundByID(n));var r=y(t.namespace),a=r.queue.findIndex(function(l){return l.id===n});if(a===-1)return Promise.reject(v.Undefined(n));var i=_.get(n,"close").map(function(l){return ie(l,n,G(e))});return X(i).then(function(){r.queue.splice(a,1)}).then(function(){_.get(n,"destroy").forEach(function(l){return l(G(e))})}).then(function(){_.delete(n)})}var N=function(){function n(e,t,r){var a=this;this.events=f.reactive({}),this.backgroundClose=!0,this.isRoute=!1,this.id=n.modalId++,this.component=e,this.props=f.ref(t),this.closed=f.computed(function(){return!y(r.namespace).queue.includes(a)}),e.beforeModalClose&&_.add(this.id,"close",e.beforeModalClose);var i=U(r);this.backgroundClose=i.backgroundClose,this.isRoute=i.isRoute,this.namespace=i.namespace,this.draggable=i.draggable,n.STORE.set(this.id,this)}return n.prototype.close=function(){return T(this.id)},Object.defineProperty(n.prototype,"onclose",{set:function(e){_.add(this.id,"close",e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ondestroy",{set:function(e){_.add(this.id,"destroy",e)},enumerable:!1,configurable:!0}),n.prototype.on=function(e,t){var r=this;return Array.isArray(this.events[e])||(this.events[e]=[]),this.events[e].push(t),function(){var a=r.events[e].indexOf(t);a!==-1&&r.events[e].splice(a,1)}},n.STORE=new Map,n.modalId=0,n.EVENT_PROMPT="jenesius-vue-modal:____P____R____O____M____P____T",n}();function Y(n){return N.STORE.get(n)}var oe={store:{},add:function(n,e,t){var r,a;if(typeof t!="function")throw v.GuardDeclarationType(t);this.store[n]||(this.store[n]=(r={},r[e]=[],r)),this.store[n][e]||(this.store[n][e]=[]),(a=this.store[n][e])===null||a===void 0||a.push(t)},get:function(n,e){return n in this.store?e in this.store[n]?this.store[n][e]||[]:[]:[]},delete:function(n){n in this.store&&delete this.store[n]}};const _=oe;function X(n){return n.reduce(function(e,t){return e.then(function(){return t()})},Promise.resolve())}function ie(n,e,t){return function(){return new Promise(function(r,a){var i,l=function(h){h===void 0&&(h=!0),h===!1&&a(v.NextReject(e)),r()};Promise.resolve(n.call((i=Y(e))===null||i===void 0?void 0:i.instance,t)).then(l).catch(function(h){return a(h)})})}}function W(n){return n=Q(n),X(y(n.namespace).queue.map(function(e){return function(){return e.close()}}))}function q(n){var e=y(n),t=e.queue;if(t.length!==0)return t[t.length-1]}function ae(n){n=Q(n);var e=q(n.namespace);return e?e.close():Promise.resolve()}function ue(n,e,t){var r=U(t),a=y(r.namespace);if(r.namespace===k.DEFAULT_NAMESPACE&&!a.initialized&&!w.skipInitCheck)throw v.NotInitialized(r.namespace);if(typeof n=="string"){var i=H(n);if(!i)throw v.ModalNotExistsInStore(n);n=i}if(!n)throw v.ModalComponentNotProvided();var l=new N(n,e,r);return a.queue.push(f.markRaw(l)),l}function L(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),Promise.resolve().then(function(){return ue(n,e,t)})}function J(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),W({namespace:t.namespace}).then(function(){var r=y(t.namespace);if(r.queue.length)throw v.QueueNoEmpty()}).then(function(){return L(n,e,t)})}function se(n){if(typeof n!="object")throw v.ConfigurationType(n);Object.assign(w,n)}function ce(n){var e,t,r,a=f.getCurrentInstance(),i=String(((e=a==null?void 0:a.props)===null||e===void 0?void 0:e.modalId)||((t=a==null?void 0:a.props)===null||t===void 0?void 0:t["modal-id"])||((r=a==null?void 0:a.attrs)===null||r===void 0?void 0:r.modalId)),l=i.replace(/[^0-9]/g,"");_.add(Number(l),"close",n)}function le(n,e,t){return e===void 0&&(e={}),t===void 0&&(t={}),M(this,void 0,void 0,function(){var r,a,i=this;return E(this,function(l){switch(l.label){case 0:return[4,L(n,e,t)];case 1:return r=l.sent(),a=!1,[2,new Promise(function(h){r.on(N.EVENT_PROMPT,function(c){return M(i,void 0,void 0,function(){return E(this,function(s){return a=!0,[2,r.close().then(function(){return h(c)}).catch(function(){return a=!1})]})})}),r.ondestroy=function(){a||h(null)}})]}})})}function H(n){return w.store[n]||void 0}function de(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var B={exports:{}},x,V;function fe(){if(V)return x;V=1;var n=1e3,e=n*60,t=e*60,r=t*24,a=r*7,i=r*365.25;x=function(o,u){u=u||{};var d=typeof o;if(d==="string"&&o.length>0)return l(o);if(d==="number"&&isFinite(o))return u.long?c(o):h(o);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(o))};function l(o){if(o=String(o),!(o.length>100)){var u=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(o);if(u){var d=parseFloat(u[1]),p=(u[2]||"ms").toLowerCase();switch(p){case"years":case"year":case"yrs":case"yr":case"y":return d*i;case"weeks":case"week":case"w":return d*a;case"days":case"day":case"d":return d*r;case"hours":case"hour":case"hrs":case"hr":case"h":return d*t;case"minutes":case"minute":case"mins":case"min":case"m":return d*e;case"seconds":case"second":case"secs":case"sec":case"s":return d*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return d;default:return}}}}function h(o){var u=Math.abs(o);return u>=r?Math.round(o/r)+"d":u>=t?Math.round(o/t)+"h":u>=e?Math.round(o/e)+"m":u>=n?Math.round(o/n)+"s":o+"ms"}function c(o){var u=Math.abs(o);return u>=r?s(o,u,r,"day"):u>=t?s(o,u,t,"hour"):u>=e?s(o,u,e,"minute"):u>=n?s(o,u,n,"second"):o+" ms"}function s(o,u,d,p){var S=u>=d*1.5;return Math.round(o/d)+" "+p+(S?"s":"")}return x}function he(n){t.debug=t,t.default=t,t.coerce=c,t.disable=i,t.enable=a,t.enabled=l,t.humanize=fe(),t.destroy=s,Object.keys(n).forEach(o=>{t[o]=n[o]}),t.names=[],t.skips=[],t.formatters={};function e(o){let u=0;for(let d=0;d<o.length;d++)u=(u<<5)-u+o.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(o){let u,d=null,p,S;function C(...g){if(!C.enabled)return;const b=C,P=Number(new Date),I=P-(u||P);b.diff=I,b.prev=u,b.curr=P,u=P,g[0]=t.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let F=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(A,O)=>{if(A==="%%")return"%";F++;const j=t.formatters[O];if(typeof j=="function"){const $=g[F];A=j.call(b,$),g.splice(F,1),F--}return A}),t.formatArgs.call(b,g),(b.log||t.log).apply(b,g)}return C.namespace=o,C.useColors=t.useColors(),C.color=t.selectColor(o),C.extend=r,C.destroy=t.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(p!==t.namespaces&&(p=t.namespaces,S=t.enabled(o)),S),set:g=>{d=g}}),typeof t.init=="function"&&t.init(C),C}function r(o,u){const d=t(this.namespace+(typeof u>"u"?":":u)+o);return d.log=this.log,d}function a(o){t.save(o),t.namespaces=o,t.names=[],t.skips=[];let u;const d=(typeof o=="string"?o:"").split(/[\s,]+/),p=d.length;for(u=0;u<p;u++)d[u]&&(o=d[u].replace(/\*/g,".*?"),o[0]==="-"?t.skips.push(new RegExp("^"+o.slice(1)+"$")):t.names.push(new RegExp("^"+o+"$")))}function i(){const o=[...t.names.map(h),...t.skips.map(h).map(u=>"-"+u)].join(",");return t.enable(""),o}function l(o){if(o[o.length-1]==="*")return!0;let u,d;for(u=0,d=t.skips.length;u<d;u++)if(t.skips[u].test(o))return!1;for(u=0,d=t.names.length;u<d;u++)if(t.names[u].test(o))return!0;return!1}function h(o){return o.toString().substring(2,o.toString().length-2).replace(/\.\*\?$/,"*")}function c(o){return o instanceof Error?o.stack||o.message:o}function s(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}var me=he;(function(n,e){e.formatArgs=r,e.save=a,e.load=i,e.useColors=t,e.storage=l(),e.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const s="color: "+this.color;c.splice(1,0,s,"color: inherit");let o=0,u=0;c[0].replace(/%[a-zA-Z%]/g,d=>{d!=="%%"&&(o++,d==="%c"&&(u=o))}),c.splice(u,0,s)}e.log=console.debug||console.log||(()=>{});function a(c){try{c?e.storage.setItem("debug",c):e.storage.removeItem("debug")}catch{}}function i(){let c;try{c=e.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function l(){try{return localStorage}catch{}}n.exports=me(e);const{formatters:h}=n.exports;h.j=function(c){try{return JSON.stringify(c)}catch(s){return"[UnexpectedJSONParseError]: "+s.message}}})(B,B.exports);var ge=B.exports;const Ce=de(ge);function ve(n){return Ce("jenesius-vue-modal:".concat(n))}const pe=["onPointerdown"],Z=f.defineComponent({__name:"WidgetModalContainerItem",props:{id:{}},setup(n){const e=ve("modal-item"),t=n,r=Y(t.id),a=f.ref(),i=f.ref();function l(){if(r.backgroundClose)return T(r.id,{background:!0}).catch(()=>{})}f.watch(()=>i.value,c=>{r.instance=c}),f.onMounted(()=>{var c;if(e(`Modal(${r.id}) is mounted`),r.draggable){const s=`[modalid=_modal_${t.id}]`,o=typeof r.draggable=="string"?r.draggable:s;e(`The modal window is movable(${o}).`),a.value?(e("Finding an item to drag: %s",o),h((c=a.value)==null?void 0:c.querySelector(s),a.value.querySelector(o))):e("The modal container is not mounted. Modal id %d.",r.id)}});function h(c,s){if(!s){e("draggable item not found.");return}if(!c){e("HTML modal is not founded.");return}s.addEventListener("pointerdown",o=>{var A;const u=(A=c.getAttribute("style"))==null?void 0:A.match(/transform: translate\((.*)px,\s*(.*)px\)/),d=u==null?void 0:u[1],p=u==null?void 0:u[2];let S=typeof d=="string"?Number.parseInt(d):0,C=typeof p=="string"?Number.parseInt(p):0;const{clientX:g,clientY:b}=o,P=g,I=b;e(`movement started at (${I}, ${I})`),document.addEventListener("pointermove",F,{passive:!0}),document.addEventListener("pointerup",ee,{once:!0});function F(O){const{clientX:j,clientY:$}=O,te=S+j-P,ne=C+$-I;e(`move at (${te}, ${ne})`),c.style.transform=`translate(${te}px,${ne}px)`}function ee(O){e("movement completed"),document.removeEventListener("pointermove",F),O.preventDefault()}})}return(c,s)=>(f.openBlock(),f.createElementBlock("div",{class:"widget__modal-container__item modal-container",onPointerdown:f.withModifiers(l,["self","stop"]),ref_key:"modalContainerRef",ref:a},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(f.unref(r).component),f.mergeProps(f.unref(r).props.value,{class:"modal-item widget__modal-wrap",modalId:`_modal_${c.id}`,ref_key:"modalRef",ref:i},f.toHandlers(f.unref(r).events)),null,16,["modalId"]))],40,pe))}}),Me="";function ye(n){n===void 0&&(n=k.DEFAULT_NAMESPACE);var e=k.instance.getByName(n);e.initialized=!0,n===k.DEFAULT_NAMESPACE&&document.addEventListener("keyup",function(t){if(w.escClose&&(t.key==="Escape"||t.code==="Escape")){var r=q(n);if(!r)return;T(r.id,{esc:!0}).catch(function(){})}})}const Ee="",be={props:{namespace:String},setup(n){return f.onMounted(()=>{ye(n.namespace)}),()=>{const e=y(n.namespace);return f.h(f.TransitionGroup,{name:w.animation,tag:"div"},{default:()=>e.queue.map(t=>f.h(Z,{key:t.id,id:t.id}))})}},components:{WidgetContainerModalItem:Z}};var R={router:null};function we(n){var e=this;if(R.router)throw v.DuplicatedRouterIntegration();R.router=n;function t(r){for(var a=r.matched.length-1;a>=0;a--){var i=r.matched[a].components,l=Object.values(i).find(function(h){return h._isModal});if(l)return l}return null}n.beforeEach(function(r,a){return M(e,void 0,void 0,function(){var i,l,h;return E(this,function(c){switch(c.label){case 0:return c.trys.push([0,3,,4]),i=t(a),i&&!(!((h=(l=i.getModalObject())===null||l===void 0?void 0:l.closed)===null||h===void 0)&&h.value)?[4,i.close(!0)]:[3,2];case 1:c.sent(),c.label=2;case 2:return[3,4];case 3:return c.sent(),[2,!1];case 4:return[2]}})})}),n.afterEach(function(r){return M(e,void 0,void 0,function(){var a;return E(this,function(i){switch(i.label){case 0:return a=t(r),a?[4,a.initialize()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})})}function K(n){var e=null,t=!1;function r(){return M(this,void 0,void 0,function(){return E(this,function(a){switch(a.label){case 0:if(!R.router)throw v.ModalRouterIntegrationNotInitialized();return t=!1,e=null,[4,J(n,f.computed(function(){var i;return(i=R.router)===null||i===void 0?void 0:i.currentRoute.value.params}),{isRoute:!0})];case 1:return e=a.sent(),e.onclose=function(){var i;t||(i=R.router)===null||i===void 0||i.back()},[2]}})})}return{getModalObject:function(){return e},_isModal:!0,close:function(a){return a===void 0&&(a=!1),M(this,void 0,void 0,function(){return E(this,function(i){switch(i.label){case 0:return t=a,e?[4,e.close()]:[3,2];case 1:return[2,i.sent()];case 2:return[2]}})})},initialize:r,setup:function(){return function(){return null}}}}K.init=we;var _e=y().queue;function Fe(n){return y(n).queue}m.Modal=N,m.closeById=T,m.closeModal=W,m.config=se,m.container=be,m.getComponentFromStore=H,m.getCurrentModal=q,m.getQueueByNamespace=Fe,m.modalQueue=_e,m.onBeforeModalClose=ce,m.openModal=J,m.popModal=ae,m.promptModal=le,m.pushModal=L,m.useModalRouter=K,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
//# sourceMappingURL=jenesius-vue-modal.umd.js.map
{
"name": "jenesius-vue-modal",
"version": "1.11.4",
"version": "1.11.5",
"private": false,

@@ -5,0 +5,0 @@ "description": "The progressive and simple modal system for Vue.js v3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc