diff --git a/demo/index.bbee436f.js b/demo/index.bbee436f.js deleted file mode 100644 index 56dad3f..0000000 --- a/demo/index.bbee436f.js +++ /dev/null @@ -1 +0,0 @@ -var e=Object.defineProperty,l=Object.prototype.hasOwnProperty,o=Object.getOwnPropertySymbols,a=Object.prototype.propertyIsEnumerable,t=(l,o,a)=>o in l?e(l,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):l[o]=a,s=(e,s)=>{for(var n in s||(s={}))l.call(s,n)&&t(e,n,s[n]);if(o)for(var n of o(s))a.call(s,n)&&t(e,n,s[n]);return e};import{d as n,r as d,c as r,a as u,F as i,b as c,o as m,w as v,e as b,f as h,p,g as f,h as M,i as w,n as y,j as C,k as S,l as g,t as k,m as E,q as x,T as V,s as _,u as L,v as A,x as U,y as j,z as D,A as R,B as O}from"./vendor.020e047f.js";!function(e=".",l="__import__"){try{self[l]=new Function("u","return import(u)")}catch(o){const a=new URL(e,location),t=e=>{URL.revokeObjectURL(e.src),e.remove()};self[l]=e=>new Promise(((o,s)=>{const n=new URL(e,a);if(self[l].moduleMap[n])return o(self[l].moduleMap[n]);const d=new Blob([`import * as m from '${n}';`,`${l}.moduleMap['${n}']=m;`],{type:"text/javascript"}),r=Object.assign(document.createElement("script"),{type:"module",src:URL.createObjectURL(d),onerror(){s(new Error(`Failed to import: ${e}`)),t(r)},onload(){o(self[l].moduleMap[n]),t(r)}});document.head.appendChild(r)})),self[l].moduleMap={}}}("/vue-universal-modal/demo/");const $={h3:"mt-6 mb-2 text-xl font-bold",ul:"mt-2 list-disc list-inside",button:"mt-2 rounded-full py-1 px-4 bg-white transition border-blue-500 border-2 text-blue-500 text-sm hover:border-blue-700 hover:text-blue-700 focus:bg-blue-700 focus:text-white focus:outline-none"};var T=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const B={class:"modal"},K=u("p",null," Hello ",-1);T.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 1. basic ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=(...l)=>e.showModal&&e.showModal(...l))}," Show modal ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/1.basic.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{modelValue:e.isShow,"onUpdate:modelValue":l[3]||(l[3]=l=>e.isShow=l),close:e.closeModal},{default:v((()=>[u("div",B,[K,u("button",{class:e.style.button,onClick:l[2]||(l[2]=(...l)=>e.closeModal&&e.closeModal(...l))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var N=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const F={class:"modal"},I=u("p",null," change v-show ",-1);N.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 2. change v-show (always mounted) ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=(...l)=>e.showModal&&e.showModal(...l))}," Show modal ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/2.visible.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{"model-value":!0,close:e.closeModal,disabled:!e.isShow},{default:v((()=>[u("div",F,[I,u("button",{class:e.style.button,onClick:l[2]||(l[2]=(...l)=>e.closeModal&&e.closeModal(...l))}," close ",2)])])),_:1},8,["close","disabled"])],64)};var P=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,options:{transition:!1,closeClickDimmed:!1,closeKeyCode:!1,styleModalContent:{justifyContent:"flex-start"}},showModal:function(l){e[l]=!0},closeModal:function(l){e[l]=!1},style:$}}});const H=u("li",null,"transition: false",-1),q=u("li",null,"closeClickDimmed: false",-1),z=u("li",null,"closeKeyCode: false",-1),G=u("li",null,"styleModalContent: { justifyContent: 'flex-start' }",-1),J={class:"modal"},Q=u("p",null," modal1 ",-1),W={class:"modal"},X=u("p",null," modal2 ",-1);P.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 3. options ",2),u("ul",{class:e.style.ul},[H,q,z,G],2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=l=>e.showModal("modal1"))}," Show modal ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/3.options.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{modelValue:e.isShowModal.modal1,"onUpdate:modelValue":l[4]||(l[4]=l=>e.isShowModal.modal1=l),close:()=>e.closeModal("modal1"),options:e.options,style:{backgroundColor:"rgba(59, 130, 246, 0.3)"}},{default:v((()=>[u("div",J,[Q,u("button",{class:[e.style.button,"mr-2"],onClick:l[2]||(l[2]=l=>e.showModal("modal2"))}," open modal2 ",2),u("button",{class:e.style.button,onClick:l[3]||(l[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close","options","style"]),u(n,{modelValue:e.isShowModal.modal2,"onUpdate:modelValue":l[6]||(l[6]=l=>e.isShowModal.modal2=l),close:()=>e.closeModal("modal2"),options:e.options},{default:v((()=>[u("div",W,[X,u("button",{class:e.style.button,onClick:l[5]||(l[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close","options"])],64)};var Y=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,showModal:function(l){e[l]=!0},closeModal:function(l){e[l]=!1},style:$}}});const Z={class:"modal"},ee=u("p",null," modal1 ",-1),le={class:"modal"},oe=u("p",null," modal2 ",-1);Y.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 4. modal in modal ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=l=>e.showModal("modal1"))}," Show modal1 ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/4.modal.on.modal.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{modelValue:e.isShowModal.modal1,"onUpdate:modelValue":l[4]||(l[4]=l=>e.isShowModal.modal1=l),close:()=>e.closeModal("modal1")},{default:v((()=>[u("div",Z,[ee,u("button",{class:e.style.button,style:{marginRight:"10px"},onClick:l[2]||(l[2]=l=>e.showModal("modal2"))}," open modal2 ",2),u("button",{class:e.style.button,onClick:l[3]||(l[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close"]),u(n,{modelValue:e.isShowModal.modal2,"onUpdate:modelValue":l[6]||(l[6]=l=>e.isShowModal.modal2=l),close:()=>e.closeModal("modal2")},{default:v((()=>[u("div",le,[oe,u("button",{class:e.style.button,onClick:l[5]||(l[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var ae=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const te=h();p("data-v-118afcd2");const se={class:"modal"},ne=u("p",null," Hello ",-1);f();const de=te(((e,l,o,a,t,s)=>{const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 5. custom animation ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=(...l)=>e.showModal&&e.showModal(...l))}," Show modal ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/5.custom.animation.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{modelValue:e.isShow,"onUpdate:modelValue":l[3]||(l[3]=l=>e.isShow=l),close:e.closeModal},{default:te((()=>[u("div",se,[ne,u("button",{class:e.style.button,onClick:l[2]||(l[2]=(...l)=>e.closeModal&&e.closeModal(...l))}," close ",2)])])),_:1},8,["modelValue","close"])],64)}));ae.render=de,ae.__scopeId="data-v-118afcd2";var re=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,showModal:function(l){e[l]=!0},closeModal:function(l){e[l]=!1},style:$}}});const ue={class:"modal"},ie=u("h2",{id:"heading-modal1"}," wai-aria1 ",-1),ce={class:"modal"},me=u("h2",{id:"heading-modal2"}," wai-aria2 ",-1);re.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 6. wai-aria ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=l=>e.showModal("modal1"))}," Show modal1 ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/6.wai-aria.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{id:"aria-modal1",modelValue:e.isShowModal.modal1,"onUpdate:modelValue":l[4]||(l[4]=l=>e.isShowModal.modal1=l),class:"border-8 border-white-700 focus:border-blue-700","aria-labelledby":"heading-modal1",close:()=>e.closeModal("modal1")},{default:v((()=>[u("div",ue,[ie,u("button",{class:[e.style.button,"mr-2"],onClick:l[2]||(l[2]=l=>e.showModal("modal2"))}," open modal2 ",2),u("button",{class:e.style.button,onClick:l[3]||(l[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close"]),u(n,{id:"aria-modal2",modelValue:e.isShowModal.modal2,"onUpdate:modelValue":l[6]||(l[6]=l=>e.isShowModal.modal2=l),class:"border-8 border-white-700 focus:border-blue-700","aria-labelledby":"heading-modal2",close:()=>e.closeModal("modal2")},{default:v((()=>[u("div",ce,[me,u("button",{class:e.style.button,onClick:l[5]||(l[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var ve=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$,beforeEnter:function(){console.log("before enter")},afterEnter:function(){console.log("after enter")},beforeLeave:function(){console.log("before leave")},afterLeave:function(){console.log("after leave")}}}});const be={class:"modal"},he=u("p",null," Hello ",-1);ve.render=function(e,l,o,a,t,s){const n=c("Modal");return m(),r(i,null,[u("h3",{class:e.style.h3}," 7. event (please see console) ",2),u("div",null,[u("button",{class:e.style.button,onClick:l[1]||(l[1]=(...l)=>e.showModal&&e.showModal(...l))}," Show modal ",2),u("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/7.event.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),u(n,{modelValue:e.isShow,"onUpdate:modelValue":l[3]||(l[3]=l=>e.isShow=l),close:e.closeModal,onBeforeEnter:e.beforeEnter,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:v((()=>[u("div",be,[he,u("button",{class:e.style.button,onClick:l[2]||(l[2]=(...l)=>e.closeModal&&e.closeModal(...l))}," close ",2)])])),_:1},8,["modelValue","close","onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],64)};var pe=n({components:{Example1:T,Example2:N,Example3:P,Example4:Y,Example5:ae,Example6:re,Example7:ve}});const fe=u("h2",{class:"text-2xl font-bold mt-8 mb-4"}," Examples ",-1);pe.render=function(e,l,o,a,t,s){const n=c("Example1"),d=c("Example2"),v=c("Example3"),b=c("Example4"),h=c("Example5"),p=c("Example6"),f=c("Example7");return m(),r(i,null,[fe,u(n),u(d),u(v),u(b),u(h),u(p),u(f)],64)};const Me=({modalRef:e,latest:l,show:o})=>{let a;function t(o){const t=o.target.closest(`.${Ce}`);if(l.value&&(!t||t!==e.value)){if(t&&!t.classList.contains(`${Ce}-show`))return;a=o.target}}M((()=>{document.addEventListener("click",t),w((()=>o.value),(l=>{y((()=>function(l){l?e.value&&e.value.focus():a&&a.focus()}(l)))}),{immediate:o.value})})),C((()=>{document.removeEventListener("click",t)}))};var we=n({inheritAttrs:!1,props:{close:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!0},options:{type:Object,default:()=>({})}},emits:["before-enter","enter","after-enter","enter-cancelled","before-leave","leave","after-leave","leave-cancelled"],setup(e,l){const{teleportTarget:o}=g(ye),{close:a,disabled:t,options:n,modelValue:r}=k(e),u=d(void 0===r.value||r.value),i=d(null),c=d(!t.value),m=s({transition:300,closeClickDimmed:!0,closeKeyCode:27,styleModalContent:{}},n.value);w([()=>r.value,()=>t.value],(()=>{const e=r.value&&!t.value;c.value=e,r.value&&(u.value=r.value)}),{immediate:!0});const{latest:v}=(({modalRef:e,show:l})=>{const{visibleModals:o,addVisibleModals:a,removeVisibleModals:t}=g(ye),s=S((()=>{const l=[...o.value.values()];return!(!l.length||!e.value)&&l[l.length-1]===e.value}));return w((()=>l.value),(()=>{y((()=>{e.value&&(l.value?a(e.value):t(e.value))}))}),{immediate:!0}),{latest:s}})({modalRef:i,show:c});Me({latest:v,modalRef:i,show:c});const{onClickDimmed:b}=(({close:e,closeClickDimmed:l,closeKeyCode:o,latest:a})=>{function t(l){l.keyCode===o&&a.value&&e.value()}return M((()=>{o&&document.addEventListener("keyup",t)})),C((()=>{o&&document.removeEventListener("keyup",t)})),{onClickDimmed:function(){l&&e.value()}}})({close:a,closeClickDimmed:m.closeClickDimmed,closeKeyCode:m.closeKeyCode,latest:v}),h={beforeEnter:()=>l.emit("before-enter"),enter:()=>l.emit("enter"),afterEnter:()=>l.emit("after-enter"),enterCancelled:()=>l.emit("enter-cancelled"),beforeLeave:()=>l.emit("before-leave"),leave:()=>l.emit("leave"),afterLeave:()=>{l.emit("after-leave"),!1===r.value&&(u.value=!1)},leaveCancelled:()=>l.emit("leave-cancelled")};return{CLASS_NAME:Ce,emitClose:()=>{console.warn("emitClose was deprecated.\nhttps://github.com/hoiheart/vue-universal-modal#usage-modal"),a.value()},inserted:u,latest:v,mergeOptions:m,modalRef:i,onClickDimmed:b,onTransitionEmit:h,show:c,teleportTarget:o,transition:!!m.transition&&m.transition/1e3+"s"}}});we.render=function(e,l,o,a,t,n){return e.inserted?(m(),r(_,{key:0,to:e.teleportTarget,disabled:e.disabled},[u(V,E({appear:"",name:e.CLASS_NAME},x(e.onTransitionEmit)),{default:v((()=>{var o;return[A(u("div",E({ref:"modalRef",role:"dialog",tabindex:"-1","aria-modal":"true","aria-label":"Modal window",class:[e.CLASS_NAME,{[`${e.CLASS_NAME}-show`]:e.show},{[`${e.CLASS_NAME}-latest`]:e.latest}],style:{transitionDuration:e.transition}},e.$attrs),[u("div",{class:`${e.CLASS_NAME}-content`,style:s({transitionDuration:e.transition},null==(o=e.mergeOptions)?void 0:o.styleModalContent),onClick:l[1]||(l[1]=j(((...l)=>e.onClickDimmed&&e.onClickDimmed(...l)),["self"]))},[D(e.$slots,"default",{emitClose:e.emitClose}),D(e.$slots,"close")],6)],16),[[U,e.show]])]})),_:3},16,["name"])],8,["to","disabled"])):L("",!0)};const ye="VueUniversalModal",Ce="vue-universal-modal";var Se={install:(e,l={})=>{const{teleportTarget:o="",teleportComponent:a="",teleportComponentId:t="",modalComponent:s="Modal"}=l;if(!o)return console.error("teleportTarget is required.");if(a||t)return console.error("teleportComponent, teleportComponentId was deprecated. use teleportTarget instead. (https://github.com/hoiheart/vue-universal-modal)");const n=d(new Set);e.provide(ye,{teleportTarget:o,visibleModals:R(n),addVisibleModals:e=>{n.value.add(e)},removeVisibleModals:e=>{n.value.delete(e)}}),e.component(s,we)}};const ge=O(pe);ge.use(Se,{teleportTarget:"#modals"}),ge.mount("#app"); diff --git a/demo/index.c2b2a454.js b/demo/index.c2b2a454.js new file mode 100644 index 0000000..f158591 --- /dev/null +++ b/demo/index.c2b2a454.js @@ -0,0 +1 @@ +var e=Object.defineProperty,o=Object.prototype.hasOwnProperty,l=Object.getOwnPropertySymbols,a=Object.prototype.propertyIsEnumerable,t=(o,l,a)=>l in o?e(o,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[l]=a,s=(e,s)=>{for(var n in s||(s={}))o.call(s,n)&&t(e,n,s[n]);if(l)for(var n of l(s))a.call(s,n)&&t(e,n,s[n]);return e};import{d as n,r as d,c as u,a as r,w as i,F as c,b as m,o as v,e as b,f as h,p,g as f,h as M,i as w,n as y,j as C,k as g,l as S,t as k,m as E,q as x,T as V,s as _,u as L,v as D,x as U,y as A,z as j,A as R,B as O}from"./vendor.2f2c88a5.js";!function(e=".",o="__import__"){try{self[o]=new Function("u","return import(u)")}catch(l){const a=new URL(e,location),t=e=>{URL.revokeObjectURL(e.src),e.remove()};self[o]=e=>new Promise(((l,s)=>{const n=new URL(e,a);if(self[o].moduleMap[n])return l(self[o].moduleMap[n]);const d=new Blob([`import * as m from '${n}';`,`${o}.moduleMap['${n}']=m;`],{type:"text/javascript"}),u=Object.assign(document.createElement("script"),{type:"module",src:URL.createObjectURL(d),onerror(){s(new Error(`Failed to import: ${e}`)),t(u)},onload(){l(self[o].moduleMap[n]),t(u)}});document.head.appendChild(u)})),self[o].moduleMap={}}}("/vue-universal-modal/demo/");const $={h3:"mt-6 mb-2 text-xl font-bold",ul:"mt-2 list-disc list-inside",button:"mt-2 rounded-full py-1 px-4 bg-white transition border-blue-500 border-2 text-blue-500 text-sm hover:border-blue-700 hover:text-blue-700 focus:bg-blue-700 focus:text-white focus:outline-none"};var T=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const B={class:"modal"},K=r("p",null," Hello ",-1);T.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 1. basic ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=(...o)=>e.showModal&&e.showModal(...o))}," Show modal ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/1.basic.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{modelValue:e.isShow,"onUpdate:modelValue":o[3]||(o[3]=o=>e.isShow=o),close:e.closeModal},{default:i((()=>[r("div",B,[K,r("button",{class:e.style.button,onClick:o[2]||(o[2]=(...o)=>e.closeModal&&e.closeModal(...o))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var N=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const F={class:"modal"},I=r("p",null," change v-show ",-1);N.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 2. change v-show (always mounted) ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=(...o)=>e.showModal&&e.showModal(...o))}," Show modal ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/2.visible.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{"model-value":!0,close:e.closeModal,disabled:!e.isShow},{default:i((()=>[r("div",F,[I,r("button",{class:e.style.button,onClick:o[2]||(o[2]=(...o)=>e.closeModal&&e.closeModal(...o))}," close ",2)])])),_:1},8,["close","disabled"])],64)};var P=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,options:{transition:!1,closeClickDimmed:!1,closeKeyCode:!1,styleModalContent:{justifyContent:"flex-start"}},showModal:function(o){e[o]=!0},closeModal:function(o){e[o]=!1},style:$}}});const H=r("li",null,"transition: false",-1),q=r("li",null,"closeClickDimmed: false",-1),z=r("li",null,"closeKeyCode: false",-1),G=r("li",null,"styleModalContent: { justifyContent: 'flex-start' }",-1),J={class:"modal"},Q=r("p",null," modal1 ",-1),W={class:"modal"},X=r("p",null," modal2 ",-1);P.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 3. options ",2),r("ul",{class:e.style.ul},[H,q,z,G],2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=o=>e.showModal("modal1"))}," Show modal ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/3.options.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{modelValue:e.isShowModal.modal1,"onUpdate:modelValue":o[4]||(o[4]=o=>e.isShowModal.modal1=o),close:()=>e.closeModal("modal1"),options:e.options,style:{backgroundColor:"rgba(59, 130, 246, 0.3)"}},{default:i((()=>[r("div",J,[Q,r("button",{class:[e.style.button,"mr-2"],onClick:o[2]||(o[2]=o=>e.showModal("modal2"))}," open modal2 ",2),r("button",{class:e.style.button,onClick:o[3]||(o[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close","options","style"]),r(n,{modelValue:e.isShowModal.modal2,"onUpdate:modelValue":o[6]||(o[6]=o=>e.isShowModal.modal2=o),close:()=>e.closeModal("modal2"),options:e.options},{default:i((()=>[r("div",W,[X,r("button",{class:e.style.button,onClick:o[5]||(o[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close","options"])],64)};var Y=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,showModal:function(o){e[o]=!0},closeModal:function(o){e[o]=!1},style:$}}});const Z={class:"modal"},ee=r("p",null," modal1 ",-1),oe={class:"modal"},le=r("p",null," modal2 ",-1);Y.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 4. modal in modal ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=o=>e.showModal("modal1"))}," Show modal1 ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/4.modal.on.modal.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{modelValue:e.isShowModal.modal1,"onUpdate:modelValue":o[4]||(o[4]=o=>e.isShowModal.modal1=o),close:()=>e.closeModal("modal1")},{default:i((()=>[r("div",Z,[ee,r("button",{class:e.style.button,style:{marginRight:"10px"},onClick:o[2]||(o[2]=o=>e.showModal("modal2"))}," open modal2 ",2),r("button",{class:e.style.button,onClick:o[3]||(o[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close"]),r(n,{modelValue:e.isShowModal.modal2,"onUpdate:modelValue":o[6]||(o[6]=o=>e.isShowModal.modal2=o),close:()=>e.closeModal("modal2")},{default:i((()=>[r("div",oe,[le,r("button",{class:e.style.button,onClick:o[5]||(o[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var ae=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$}}});const te=h();p("data-v-118afcd2");const se={class:"modal"},ne=r("p",null," Hello ",-1);f();const de=te(((e,o,l,a,t,s)=>{const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 5. custom animation ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=(...o)=>e.showModal&&e.showModal(...o))}," Show modal ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/5.custom.animation.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{modelValue:e.isShow,"onUpdate:modelValue":o[3]||(o[3]=o=>e.isShow=o),close:e.closeModal},{default:te((()=>[r("div",se,[ne,r("button",{class:e.style.button,onClick:o[2]||(o[2]=(...o)=>e.closeModal&&e.closeModal(...o))}," close ",2)])])),_:1},8,["modelValue","close"])],64)}));ae.render=de,ae.__scopeId="data-v-118afcd2";var ue=n({setup(){const e=b({modal1:!1,modal2:!1});return{isShowModal:e,showModal:function(o){e[o]=!0},closeModal:function(o){e[o]=!1},style:$}}});const re={class:"modal"},ie=r("h2",{id:"heading-modal1"}," wai-aria1 ",-1),ce={class:"modal"},me=r("h2",{id:"heading-modal2"}," wai-aria2 ",-1);ue.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 6. wai-aria ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=o=>e.showModal("modal1"))}," Show modal1 ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/6.wai-aria.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{id:"aria-modal1",modelValue:e.isShowModal.modal1,"onUpdate:modelValue":o[4]||(o[4]=o=>e.isShowModal.modal1=o),class:"border-8 border-white-700 focus:border-blue-700","aria-labelledby":"heading-modal1",close:()=>e.closeModal("modal1")},{default:i((()=>[r("div",re,[ie,r("button",{class:[e.style.button,"mr-2"],onClick:o[2]||(o[2]=o=>e.showModal("modal2"))}," open modal2 ",2),r("button",{class:e.style.button,onClick:o[3]||(o[3]=()=>e.closeModal("modal1"))}," close ",2)])])),_:1},8,["modelValue","close"]),r(n,{id:"aria-modal2",modelValue:e.isShowModal.modal2,"onUpdate:modelValue":o[6]||(o[6]=o=>e.isShowModal.modal2=o),class:"border-8 border-white-700 focus:border-blue-700","aria-labelledby":"heading-modal2",close:()=>e.closeModal("modal2")},{default:i((()=>[r("div",ce,[me,r("button",{class:e.style.button,onClick:o[5]||(o[5]=()=>e.closeModal("modal2"))}," close ",2)])])),_:1},8,["modelValue","close"])],64)};var ve=n({setup(){const e=d(!1);return{isShow:e,showModal:function(){e.value=!0},closeModal:function(){e.value=!1},style:$,beforeEnter:function(){console.log("before enter")},afterEnter:function(){console.log("after enter")},beforeLeave:function(){console.log("before leave")},afterLeave:function(){console.log("after leave")}}}});const be={class:"modal"},he=r("p",null," Hello ",-1);ve.render=function(e,o,l,a,t,s){const n=m("Modal");return v(),u(c,null,[r("h3",{class:e.style.h3}," 7. event (please see console) ",2),r("div",null,[r("button",{class:e.style.button,onClick:o[1]||(o[1]=(...o)=>e.showModal&&e.showModal(...o))}," Show modal ",2),r("a",{href:"https://github.com/hoiheart/vue-universal-modal/blob/master/example/7.event.vue",target:"_blank",class:[e.style.button,"ml-2"]}," Source ",2)]),r(n,{modelValue:e.isShow,"onUpdate:modelValue":o[3]||(o[3]=o=>e.isShow=o),close:e.closeModal,onBeforeEnter:e.beforeEnter,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:i((()=>[r("div",be,[he,r("button",{class:e.style.button,onClick:o[2]||(o[2]=(...o)=>e.closeModal&&e.closeModal(...o))}," close ",2)])])),_:1},8,["modelValue","close","onBeforeEnter","onAfterEnter","onBeforeLeave","onAfterLeave"])],64)};var pe=n({components:{Example1:T,Example2:N,Example3:P,Example4:Y,Example5:ae,Example6:ue,Example7:ve}});const fe=r("h2",{class:"text-2xl font-bold mt-8 mb-4"}," Examples ",-1);pe.render=function(e,o,l,a,t,s){const n=m("Example1"),d=m("Example2"),i=m("Example3"),b=m("Example4"),h=m("Example5"),p=m("Example6"),f=m("Example7");return v(),u(c,null,[fe,r(n),r(d),r(i),r(b),r(h),r(p),r(f)],64)};const Me=({modalRef:e,latest:o,show:l})=>{let a;function t(l){const t=l.target.closest(`.${Ce}`);if(o.value&&(!t||t!==e.value)){if(t&&!t.classList.contains(`${Ce}-show`))return;a=l.target}}M((()=>{document.addEventListener("click",t),w((()=>l.value),(o=>{y((()=>function(o){o?e.value&&e.value.focus():a&&a.focus()}(o)))}),{immediate:l.value})})),C((()=>{document.removeEventListener("click",t)}))};var we=n({inheritAttrs:!1,props:{close:{type:Function,default:()=>{}},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!0},options:{type:Object,default:()=>({})}},emits:["before-enter","enter","after-enter","enter-cancelled","before-leave","leave","after-leave","leave-cancelled"],setup(e,o){const{teleportTarget:l}=S(ye),{close:a,disabled:t,options:n,modelValue:u}=k(e),r=d(void 0===u.value||u.value),i=d(null),c=d(!t.value),m=s({transition:300,closeClickDimmed:!0,closeKeyCode:27,styleModalContent:{}},n.value);w([()=>u.value,()=>t.value],(()=>{const e=u.value&&!t.value;c.value=e,u.value&&(r.value=u.value)}),{immediate:!0});const{latest:v}=(({modalRef:e,show:o})=>{const{visibleModals:l,addVisibleModals:a,removeVisibleModals:t}=S(ye),s=g((()=>{const o=[...l.value.values()];return!(!o.length||!e.value)&&o[o.length-1]===e.value}));return w((()=>o.value),(()=>{y((()=>{e.value&&(o.value?a(e.value):t(e.value))}))}),{immediate:!0}),{latest:s}})({modalRef:i,show:c});Me({latest:v,modalRef:i,show:c});const{onMouseDownDimmed:b,onMouseUpDimmed:h}=(({close:e,closeClickDimmed:o,closeKeyCode:l,latest:a})=>{let t=null;function s(o){o.keyCode===l&&a.value&&e.value()}return M((()=>{l&&document.addEventListener("keyup",s)})),C((()=>{l&&document.removeEventListener("keyup",s)})),{onMouseDownDimmed:function(e){t=e.target},onMouseUpDimmed:function(l){o&&t===l.target&&e.value(),t=null}}})({close:a,closeClickDimmed:m.closeClickDimmed,closeKeyCode:m.closeKeyCode,latest:v}),p={beforeEnter:()=>o.emit("before-enter"),enter:()=>o.emit("enter"),afterEnter:()=>o.emit("after-enter"),enterCancelled:()=>o.emit("enter-cancelled"),beforeLeave:()=>o.emit("before-leave"),leave:()=>o.emit("leave"),afterLeave:()=>{o.emit("after-leave"),!1===u.value&&(r.value=!1)},leaveCancelled:()=>o.emit("leave-cancelled")};return{CLASS_NAME:Ce,emitClose:()=>{console.warn("emitClose was deprecated.\nhttps://github.com/hoiheart/vue-universal-modal#usage-modal"),a.value&&a.value()},inserted:r,latest:v,mergeOptions:m,modalRef:i,onMouseDownDimmed:b,onMouseUpDimmed:h,onTransitionEmit:p,show:c,teleportTarget:l,transition:!!m.transition&&m.transition/1e3+"s"}}});we.render=function(e,o,l,a,t,n){return e.inserted?(v(),u(_,{key:0,to:e.teleportTarget,disabled:e.disabled},[r(V,E({appear:"",name:e.CLASS_NAME},x(e.onTransitionEmit)),{default:i((()=>{var l;return[D(r("div",E({ref:"modalRef",role:"dialog",tabindex:"-1","aria-modal":"true","aria-label":"Modal window",class:[e.CLASS_NAME,{[`${e.CLASS_NAME}-show`]:e.show},{[`${e.CLASS_NAME}-latest`]:e.latest}],style:{transitionDuration:e.transition}},e.$attrs),[r("div",{class:`${e.CLASS_NAME}-content`,style:s({transitionDuration:e.transition},null==(l=e.mergeOptions)?void 0:l.styleModalContent),onMousedown:o[1]||(o[1]=A(((...o)=>e.onMouseDownDimmed&&e.onMouseDownDimmed(...o)),["self"])),onMouseup:o[2]||(o[2]=(...o)=>e.onMouseUpDimmed&&e.onMouseUpDimmed(...o))},[j(e.$slots,"default",{emitClose:e.emitClose}),j(e.$slots,"close")],38)],16),[[U,e.show]])]})),_:3},16,["name"])],8,["to","disabled"])):L("",!0)};const ye="VueUniversalModal",Ce="vue-universal-modal";var ge={install:(e,o={})=>{const{teleportTarget:l="",teleportComponent:a="",teleportComponentId:t="",modalComponent:s="Modal"}=o;if(!l)return console.error("teleportTarget is required.");if(a||t)return console.error("teleportComponent, teleportComponentId was deprecated. use teleportTarget instead. (https://github.com/hoiheart/vue-universal-modal)");const n=d(new Set);e.provide(ye,{teleportTarget:l,visibleModals:R(n),addVisibleModals:e=>{n.value.add(e)},removeVisibleModals:e=>{n.value.delete(e)}}),e.component(s,we)}};const Se=O(pe);Se.use(ge,{teleportTarget:"#modals"}),Se.mount("#app"); diff --git a/demo/index.html b/demo/index.html index adfe771..9ae8ed1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -11,8 +11,8 @@ - - + + diff --git a/demo/vendor.020e047f.js b/demo/vendor.020e047f.js deleted file mode 100644 index 7e9d74a..0000000 --- a/demo/vendor.020e047f.js +++ /dev/null @@ -1 +0,0 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(_(e)){const t={};for(let n=0;n{if(e){const n=e.split(s);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function i(e){let t="";if(C(e))t=e;else if(_(e))for(let n=0;n{},f=()=>!1,p=/^on[^a-z]/,d=e=>p.test(e),h=e=>e.startsWith("onUpdate:"),v=Object.assign,g=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},m=Object.prototype.hasOwnProperty,y=(e,t)=>m.call(e,t),_=Array.isArray,b=e=>"[object Map]"===F(e),x=e=>"function"==typeof e,C=e=>"string"==typeof e,S=e=>"symbol"==typeof e,w=e=>null!==e&&"object"==typeof e,E=e=>w(e)&&x(e.then)&&x(e.catch),A=Object.prototype.toString,F=e=>A.call(e),k=e=>C(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=e(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),O=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},R=/-(\w)/g,L=O((e=>e.replace(R,((e,t)=>t?t.toUpperCase():"")))),M=/\B([A-Z])/g,N=O((e=>e.replace(M,"-$1").toLowerCase())),P=O((e=>e.charAt(0).toUpperCase()+e.slice(1))),I=O((e=>e?`on${P(e)}`:"")),$=(e,t)=>e!==t&&(e==e||t==t),j=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},B=e=>{const t=parseFloat(e);return isNaN(t)?e:t},U=new WeakMap,D=[];let z;const W=Symbol(""),K=Symbol("");function H(e,t=c){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return t.scheduler?void 0:e();if(!D.includes(n)){J(n);try{return Z.push(X),X=!0,D.push(n),z=n,e()}finally{D.pop(),Y(),z=D[D.length-1]}}};return n.id=G++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function q(e){e.active&&(J(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let G=0;function J(e){const{deps:t}=e;if(t.length){for(let n=0;n{e&&e.forEach((e=>{(e!==z||e.allowRecurse)&&i.add(e)}))};if("clear"===t)l.forEach(c);else if("length"===n&&_(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&c(e)}));else switch(void 0!==n&&c(l.get(n)),t){case"add":_(e)?k(n)&&c(l.get("length")):(c(l.get(W)),b(e)&&c(l.get(K)));break;case"delete":_(e)||(c(l.get(W)),b(e)&&c(l.get(K)));break;case"set":b(e)&&c(l.get(W))}i.forEach((e=>{e.options.scheduler?e.options.scheduler(e):e()}))}const ne=e("__proto__,__v_isRef,__isVue"),oe=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(S)),re=ae(),se=ae(!1,!0),le=ae(!0),ie=ae(!0,!0),ce={};function ae(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?t?Ve:je:t?$e:Ie).get(n))return n;const s=_(n);if(!e&&s&&y(ce,o))return Reflect.get(ce,o,r);const l=Reflect.get(n,o,r);if(S(o)?oe.has(o):ne(o))return l;if(e||ee(n,0,o),t)return l;if(Je(l)){return!s||!k(o)?l.value:l}return w(l)?e?De(l):Ue(l):l}}["includes","indexOf","lastIndexOf"].forEach((e=>{const t=Array.prototype[e];ce[e]=function(...e){const n=qe(this);for(let t=0,r=this.length;t{const t=Array.prototype[e];ce[e]=function(...e){Q();const n=t.apply(this,e);return Y(),n}}));function ue(e=!1){return function(t,n,o,r){let s=t[n];if(!e&&(o=qe(o),s=qe(s),!_(t)&&Je(s)&&!Je(o)))return s.value=o,!0;const l=_(t)&&k(n)?Number(n)!0,deleteProperty:(e,t)=>!0},de=v({},fe,{get:se,set:ue(!0)});v({},pe,{get:ie});const he=e=>w(e)?Ue(e):e,ve=e=>w(e)?De(e):e,ge=e=>e,me=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,o=!1){const r=qe(e=e.__v_raw),s=qe(t);t!==s&&!n&&ee(r,0,t),!n&&ee(r,0,s);const{has:l}=me(r),i=o?ge:n?ve:he;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void 0}function _e(e,t=!1){const n=this.__v_raw,o=qe(n),r=qe(e);return e!==r&&!t&&ee(o,0,e),!t&&ee(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function be(e,t=!1){return e=e.__v_raw,!t&&ee(qe(e),0,W),Reflect.get(e,"size",e)}function xe(e){e=qe(e);const t=qe(this);return me(t).has.call(t,e)||(t.add(e),te(t,"add",e,e)),this}function Ce(e,t){t=qe(t);const n=qe(this),{has:o,get:r}=me(n);let s=o.call(n,e);s||(e=qe(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?$(t,l)&&te(n,"set",e,t):te(n,"add",e,t),this}function Se(e){const t=qe(this),{has:n,get:o}=me(t);let r=n.call(t,e);r||(e=qe(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&te(t,"delete",e,void 0),s}function we(){const e=qe(this),t=0!==e.size,n=e.clear();return t&&te(e,"clear",void 0,void 0),n}function Ee(e,t){return function(n,o){const r=this,s=r.__v_raw,l=qe(s),i=t?ge:e?ve:he;return!e&&ee(l,0,W),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function Ae(e,t,n){return function(...o){const r=this.__v_raw,s=qe(r),l=b(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?ge:t?ve:he;return!t&&ee(s,0,c?K:W),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Fe(e){return function(...t){return"delete"!==e&&this}}const ke={get(e){return ye(this,e)},get size(){return be(this)},has:_e,add:xe,set:Ce,delete:Se,clear:we,forEach:Ee(!1,!1)},Te={get(e){return ye(this,e,!1,!0)},get size(){return be(this)},has:_e,add:xe,set:Ce,delete:Se,clear:we,forEach:Ee(!1,!0)},Oe={get(e){return ye(this,e,!0)},get size(){return be(this,!0)},has(e){return _e.call(this,e,!0)},add:Fe("add"),set:Fe("set"),delete:Fe("delete"),clear:Fe("clear"),forEach:Ee(!0,!1)},Re={get(e){return ye(this,e,!0,!0)},get size(){return be(this,!0)},has(e){return _e.call(this,e,!0)},add:Fe("add"),set:Fe("set"),delete:Fe("delete"),clear:Fe("clear"),forEach:Ee(!0,!0)};function Le(e,t){const n=t?e?Re:Te:e?Oe:ke;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(y(n,o)&&o in t?n:t,o,r)}["keys","values","entries",Symbol.iterator].forEach((e=>{ke[e]=Ae(e,!1,!1),Oe[e]=Ae(e,!0,!1),Te[e]=Ae(e,!1,!0),Re[e]=Ae(e,!0,!0)}));const Me={get:Le(!1,!1)},Ne={get:Le(!1,!0)},Pe={get:Le(!0,!1)},Ie=new WeakMap,$e=new WeakMap,je=new WeakMap,Ve=new WeakMap;function Be(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>F(e).slice(8,-1))(e))}function Ue(e){return e&&e.__v_isReadonly?e:ze(e,!1,fe,Me,Ie)}function De(e){return ze(e,!0,pe,Pe,je)}function ze(e,t,n,o,r){if(!w(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=Be(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function We(e){return Ke(e)?We(e.__v_raw):!(!e||!e.__v_isReactive)}function Ke(e){return!(!e||!e.__v_isReadonly)}function He(e){return We(e)||Ke(e)}function qe(e){return e&&qe(e.__v_raw)||e}const Ge=e=>w(e)?Ue(e):e;function Je(e){return Boolean(e&&!0===e.__v_isRef)}function Xe(e){return function(e,t=!1){if(Je(e))return e;return new Ze(e,t)}(e)}class Ze{constructor(e,t=!1){this._rawValue=e,this._shallow=t,this.__v_isRef=!0,this._value=t?e:Ge(e)}get value(){return ee(qe(this),0,"value"),this._value}set value(e){$(qe(e),this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Ge(e),te(qe(this),"set","value",e))}}const Qe={get:(e,t,n)=>{return Je(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const r=e[t];return Je(r)&&!Je(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ye(e){return We(e)?e:new Proxy(e,Qe)}function et(e){const t=_(e)?new Array(e.length):{};for(const n in e)t[n]=nt(e,n);return t}class tt{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function nt(e,t){return Je(e[t])?e[t]:new tt(e,t)}class ot{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=H(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,te(qe(this),"set","value"))}}),this.__v_isReadonly=n}get value(){const e=qe(this);return e._dirty&&(e._value=this.effect(),e._dirty=!1),ee(e,0,"value"),e._value}set value(e){this._setter(e)}}function rt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){lt(s,t,n)}return r}function st(e,t,n,o){if(x(e)){const r=rt(e,t,n,o);return r&&E(r)&&r.catch((e=>{lt(e,t,n)})),r}const r=[];for(let s=0;s>>1;At(at[e])-1?at.splice(t,0,e):at.push(e),Ct()}}function Ct(){it||ct||(ct=!0,yt=mt.then(Ft))}function St(e,t,n,o){_(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),Ct()}function wt(e,t=null){if(ft.length){for(_t=t,pt=[...new Set(ft)],ft.length=0,dt=0;dtAt(e)-At(t))),gt=0;gtnull==e.id?1/0:e.id;function Ft(e){ct=!1,it=!0,wt(e),at.sort(((e,t)=>At(e)-At(t)));try{for(ut=0;ute.trim())):t&&(r=n.map(B))}let i,a=o[i=I(t)]||o[i=I(L(t))];!a&&s&&(a=o[i=I(N(t))]),a&&st(a,e,6,r);const u=o[i+"Once"];if(u){if(e.emitted){if(e.emitted[i])return}else(e.emitted={})[i]=!0;st(u,e,6,r)}}function Tt(e,t,n=!1){if(!t.deopt&&void 0!==e.__emits)return e.__emits;const o=e.emits;let r={},s=!1;if(!x(e)){const o=e=>{const n=Tt(e,t,!0);n&&(s=!0,v(r,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return o||s?(_(o)?o.forEach((e=>r[e]=null)):v(r,o),e.__emits=r):e.__emits=null}function Ot(e,t){return!(!e||!d(t))&&(t=t.slice(2).replace(/Once$/,""),y(e,t[0].toLowerCase()+t.slice(1))||y(e,N(t))||y(e,t))}let Rt=0;const Lt=e=>Rt+=e;function Mt(e,t,n={},o,r){let s=e[t];Rt++,lo();const l=s&&Nt(s(n)),i=co(eo,{key:n.key||`_${t}`},l||(o?o():[]),l&&1===e._?64:-2);return!r&&i.scopeId&&(i.slotScopeIds=[i.scopeId+"-s"]),Rt--,i}function Nt(e){return e.some((e=>!ao(e)||e.type!==no&&!(e.type===eo&&!Nt(e.children))))?e:null}let Pt=null,It=null;function $t(e){const t=Pt;return Pt=e,It=e&&e.type.__scopeId||null,t}function jt(e){It=e}function Vt(){It=null}const Bt=e=>Ut;function Ut(e,t=Pt){if(!t)return e;const n=(...n)=>{Rt||lo(!0);const o=$t(t),r=e(...n);return $t(o),Rt||io(),r};return n._c=!0,n}function Dt(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:v}=e;let g;const m=$t(e);try{let e;if(4&n.shapeFlag){const t=r||o;g=_o(u.call(t,t,f,s,d,p,v)),e=c}else{const n=t;0,g=_o(n.length>1?n(s,{attrs:c,slots:i,emit:a}):n(s,null)),e=t.props?c:Wt(c)}let m=g;if(!1!==t.inheritAttrs&&e){const t=Object.keys(e),{shapeFlag:n}=m;t.length&&(1&n||6&n)&&(l&&t.some(h)&&(e=Kt(e,l)),m=go(m,e))}n.dirs&&(m.dirs=m.dirs?m.dirs.concat(n.dirs):n.dirs),n.transition&&(m.transition=n.transition),g=m}catch(y){ro.length=0,lt(y,e,1),g=vo(no)}return $t(m),g}function zt(e){let t;for(let n=0;n{let t;for(const n in e)("class"===n||"style"===n||d(n))&&((t||(t={}))[n]=e[n]);return t},Kt=(e,t)=>{const n={};for(const o in e)h(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Ht(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r{l=!0;const[n,o]=Zt(e,t,!0);v(r,n),o&&s.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!o&&!l)return e.__props=a;if(_(o))for(let i=0;i-1,n[1]=o<0||t-1||y(n,"default"))&&s.push(e)}}}return e.__props=[r,s]}function Qt(e){return"$"!==e[0]}function Yt(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function en(e,t){return Yt(e)===Yt(t)}function tn(e,t){return _(t)?t.findIndex((t=>en(t,e))):x(t)&&en(t,e)?0:-1}function nn(e,t,n=jo,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Q(),Bo(n);const r=st(t,n,e,o);return Bo(null),Y(),r});return o?r.unshift(s):r.push(s),s}}const on=e=>(t,n=jo)=>!Do&&nn(e,t,n),rn=on("bm"),sn=on("m"),ln=on("bu"),cn=on("u"),an=on("bum"),un=on("um"),fn=on("rtg"),pn=on("rtc"),dn={};function hn(e,t,n){return vn(e,t,n)}function vn(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:l}=c,i=jo){let a,f,p=!1;if(Je(e)?(a=()=>e.value,p=!!e._shallow):We(e)?(a=()=>e,o=!0):a=_(e)?()=>e.map((e=>Je(e)?e.value:We(e)?mn(e):x(e)?rt(e,i,2,[i&&i.proxy]):void 0)):x(e)?t?()=>rt(e,i,2,[i&&i.proxy]):()=>{if(!i||!i.isUnmounted)return f&&f(),st(e,i,3,[d])}:u,t&&o){const e=a;a=()=>mn(e())}let d=e=>{f=y.options.onStop=()=>{rt(e,i,4)}},h=_(e)?[]:dn;const v=()=>{if(y.active)if(t){const e=y();(o||p||$(e,h))&&(f&&f(),st(t,i,3,[e,h===dn?void 0:h,d]),h=e)}else y()};let m;v.allowRecurse=!!t,m="sync"===r?v:"post"===r?()=>Un(v,i&&i.suspense):()=>{!i||i.isMounted?function(e){St(e,pt,ft,dt)}(v):v()};const y=H(a,{lazy:!0,onTrack:s,onTrigger:l,scheduler:m});return Ko(y,i),t?n?v():h=y():"post"===r?Un(y,i&&i.suspense):y(),()=>{q(y),i&&g(i.effects,y)}}function gn(e,t,n){const o=this.proxy;return vn(C(e)?()=>o[e]:e.bind(o),t.bind(o),n,this)}function mn(e,t=new Set){if(!w(e)||t.has(e))return e;if(t.add(e),Je(e))mn(e.value,t);else if(_(e))for(let n=0;n{mn(e,t)}));else for(const n in e)mn(e[n],t);return e}const yn=[Function,Array],_n={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:yn,onEnter:yn,onAfterEnter:yn,onEnterCancelled:yn,onBeforeLeave:yn,onLeave:yn,onAfterLeave:yn,onLeaveCancelled:yn,onBeforeAppear:yn,onAppear:yn,onAfterAppear:yn,onAppearCancelled:yn},setup(e,{slots:t}){const n=Vo(),o=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return sn((()=>{e.isMounted=!0})),an((()=>{e.isUnmounting=!0})),e}();let r;return()=>{const s=t.default&&En(t.default(),!0);if(!s||!s.length)return;const l=qe(e),{mode:i}=l,c=s[0];if(o.isLeaving)return Cn(c);const a=Sn(c);if(!a)return Cn(c);const u=xn(a,l,o,n);wn(a,u);const f=n.subTree,p=f&&Sn(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==no&&(!uo(a,p)||d)){const e=xn(p,l,o,n);if(wn(p,e),"out-in"===i)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},Cn(c);"in-out"===i&&a.type!==no&&(e.delayLeave=(e,t,n)=>{bn(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return c}}};function bn(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function xn(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:v,onAppear:g,onAfterAppear:m,onAppearCancelled:y}=t,_=String(e.key),b=bn(n,e),x=(e,t)=>{e&&st(e,o,9,t)},C={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=v||i}t._leaveCb&&t._leaveCb(!0);const s=b[_];s&&uo(e,s)&&s.el._leaveCb&&s.el._leaveCb(),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=m||a,s=y||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,x(t?s:o,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?(t(e,i),t.length<=1&&i()):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();x(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),x(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?(p(t,l),p.length<=1&&l()):l()},clone:e=>xn(e,t,n,o)};return C}function Cn(e){if(An(e))return(e=go(e)).children=null,e}function Sn(e){return An(e)?e.children?e.children[0]:void 0:e}function wn(e,t){6&e.shapeFlag&&e.component?wn(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function En(e,t=!1){let n=[],o=0;for(let r=0;r1)for(let r=0;re.type.__isKeepAlive;function Fn(e,t,n=jo){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(nn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)An(e.parent.vnode)&&kn(o,t,n,e),e=e.parent}}function kn(e,t,n,o){const r=nn(t,e,o,!0);un((()=>{g(o[t],r)}),n)}const Tn=e=>"_"===e[0]||"$stable"===e,On=e=>_(e)?e.map(_o):[_o(e)],Rn=(e,t,n)=>Ut((e=>On(t(e))),n),Ln=(e,t)=>{const n=e._ctx;for(const o in e){if(Tn(o))continue;const r=e[o];if(x(r))t[o]=Rn(0,r,n);else if(null!=r){const e=On(r);t[o]=()=>e}}},Mn=(e,t)=>{const n=On(t);e.slots.default=()=>n};function Nn(e,t){if(null===Pt)return e;const n=Pt.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r(s.has(e)||(e&&x(e.install)?(s.add(e),e.install(i,...t)):x(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||(r.mixins.push(e),(e.props||e.emits)&&(r.deopt=!0)),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=vo(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}function Vn(e){return x(e)?{setup:e,name:e.name}:e}const Bn={scheduler:xt,allowRecurse:!0},Un=function(e,t){t&&t.pendingBranch?_(e)?t.effects.push(...e):t.effects.push(e):St(e,vt,ht,gt)},Dn=(e,t,n,o)=>{if(_(e))return void e.forEach(((e,r)=>Dn(e,t&&(_(t)?t[r]:t),n,o)));let r;if(o){if(o.type.__asyncLoader)return;r=4&o.shapeFlag?o.component.exposed||o.component.proxy:o.el}else r=null;const{i:s,r:l}=e,i=t&&t.r,a=s.refs===c?s.refs={}:s.refs,u=s.setupState;if(null!=i&&i!==l&&(C(i)?(a[i]=null,y(u,i)&&(u[i]=null)):Je(i)&&(i.value=null)),C(l)){const e=()=>{a[l]=r,y(u,l)&&(u[l]=r)};r?(e.id=-1,Un(e,n)):e()}else if(Je(l)){const e=()=>{l.value=r};r?(e.id=-1,Un(e,n)):e()}else x(l)&&rt(l,s,12,[r,a])};function zn(e){return function(e,t){const{insert:n,remove:o,patchProp:r,forcePatchProp:s,createElement:l,createText:i,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:g,setScopeId:m=u,cloneNode:_,insertStaticContent:b}=e,x=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!1)=>{e&&!uo(e,t)&&(o=le(e),ee(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case to:C(e,t,n,o);break;case no:S(e,t,n,o);break;case oo:null==e&&w(t,n,o,l);break;case eo:B(e,t,n,o,r,s,l,i,c);break;default:1&f?k(e,t,n,o,r,s,l,i,c):6&f?U(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ce)}null!=u&&r&&Dn(u,e&&e.ref,s,t)},C=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=f(t.children||""),o,r):t.el=e.el},w=(e,t,n,o)=>{[e.el,e.anchor]=b(e.children,t,n,o)},A=({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=g(e),n(e,o,r),e=s;n(t,o,r)},F=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),o(e),e=n;o(t)},k=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?O(t,n,o,r,s,l,i,c):P(e,t,r,s,l,i,c)},O=(e,t,o,s,i,c,a,u)=>{let f,p;const{type:h,props:v,shapeFlag:g,transition:m,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==_&&-1===y)f=e.el=_(e.el);else{if(f=e.el=l(e.type,c,v&&v.is,v),8&g?d(f,e.children):16&g&&M(e.children,f,null,s,i,c&&"foreignObject"!==h,a,u||!!e.dynamicChildren),b&&Pn(e,null,s,"created"),v){for(const t in v)T(t)||r(f,t,null,v[t],c,e.children,s,i,se);(p=v.onVnodeBeforeMount)&&Wn(p,s,e)}R(f,e,e.scopeId,a,s)}b&&Pn(e,null,s,"beforeMount");const x=(!i||i&&!i.pendingBranch)&&m&&!m.persisted;x&&m.beforeEnter(f),n(f,t,o),((p=v&&v.onVnodeMounted)||x||b)&&Un((()=>{p&&Wn(p,s,e),x&&m.enter(f),b&&Pn(e,null,s,"mounted")}),i)},R=(e,t,n,o,r)=>{if(n&&m(e,n),o)for(let s=0;s{for(let a=c;a{const u=t.el=e.el;let{patchFlag:f,dynamicChildren:p,dirs:h}=t;f|=16&e.patchFlag;const v=e.props||c,g=t.props||c;let m;if((m=g.onVnodeBeforeUpdate)&&Wn(m,n,t,e),h&&Pn(t,e,n,"beforeUpdate"),f>0){if(16&f)$(u,t,v,g,n,o,l);else if(2&f&&v.class!==g.class&&r(u,"class",null,g.class,l),4&f&&r(u,"style",v.style,g.style,l),8&f){const i=t.dynamicProps;for(let t=0;t{m&&Wn(m,n,t,e),h&&Pn(t,e,n,"updated")}),o)},I=(e,t,n,o,r,s,l)=>{for(let i=0;i{if(n!==o){for(const c in o){if(T(c))continue;const u=o[c],f=n[c];(u!==f||s&&s(e,c))&&r(e,c,f,u,a,t.children,l,i,se)}if(n!==c)for(const s in n)T(s)||s in o||r(e,s,n[s],null,a,t.children,l,i,se)}},B=(e,t,o,r,s,l,c,a,u)=>{const f=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;d>0&&(u=!0),v&&(a=a?a.concat(v):v),null==e?(n(f,o,r),n(p,o,r),M(t.children,o,p,s,l,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(I(e.dynamicChildren,h,o,s,l,c,a),(null!=t.key||s&&t===s.subTree)&&Kn(e,t,!0)):G(e,t,o,p,s,l,c,a,u)},U=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):D(t,n,o,r,s,l,c):z(e,t,c)},D=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Io,s={uid:$o++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,exposed:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Zt(o,r),emitsOptions:Tt(o,r),emit:null,emitted:null,propsDefaults:c,ctx:c,data:c,props:c,attrs:c,slots:c,refs:c,setupState:c,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=kt.bind(null,s),s}(e,o,r);if(An(e)&&(i.ctx.renderer=ce),function(e,t=!1){Do=t;const{props:n,children:o}=e.vnode,r=Uo(e);Gt(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=t,V(t,"_",n)):Ln(t,e.slots={})}else e.slots={},t&&Mn(e,t);V(e.slots,fo,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,No);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=Ye(t)};return{attrs:e.attrs,slots:e.slots,emit:e.emit,expose:t}}(e):null;jo=e,Q();const r=rt(o,e,0,[e.props,n]);if(Y(),jo=null,E(r)){if(t)return r.then((t=>{zo(e,t)})).catch((t=>{lt(t,e,0)}));e.asyncDep=r}else zo(e,r)}else Wo(e)}(e,t):void 0;Do=!1}(i),i.asyncDep){if(r&&r.registerDep(i,W),!e.el){const e=i.subTree=vo(no);S(null,e,t,n)}}else W(i,e,t,n,r,s,l)},z=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||Ht(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?Ht(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;tut&&at.splice(t,1)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},W=(e,t,n,o,r,s,l)=>{e.update=H((function(){if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,u=n;n?(n.el=a.el,K(e,n,l)):n=a,o&&j(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Wn(t,c,n,a);const f=Dt(e),p=e.subTree;e.subTree=f,x(p,f,h(p.el),le(p),e,r,s),n.el=f.el,null===u&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,f.el),i&&Un(i,r),(t=n.props&&n.props.onVnodeUpdated)&&Un((()=>{Wn(t,c,n,a)}),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e;a&&j(a),(l=c&&c.onVnodeBeforeMount)&&Wn(l,f,t);const p=e.subTree=Dt(e);if(i&&ue?ue(t.el,p,e,r,null):(x(null,p,n,o,e,r,s),t.el=p.el),u&&Un(u,r),l=c&&c.onVnodeMounted){const e=t;Un((()=>{Wn(l,f,e)}),r)}const{a:d}=e;d&&256&t.shapeFlag&&Un(d,r),e.isMounted=!0,t=n=o=null}}),Bn)},K=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=qe(r),[a]=e.propsOptions;if(!(o||l>0)||16&l){let o;Jt(e,t,r,s);for(const s in i)t&&(y(t,s)||(o=N(s))!==s&&y(t,o))||(a?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Xt(a,t||c,s,void 0,e)):delete r[s]);if(s!==i)for(const e in s)t&&y(t,e)||delete s[e]}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:o,slots:r}=e;let s=!0,l=c;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(v(r,t),n||1!==e||delete r._):(s=!t.$stable,Ln(t,r)),l=t}else t&&(Mn(e,t),l={default:1});if(s)for(const i in r)Tn(i)||i in l||delete r[i]})(e,t.children,n),Q(),wt(void 0,e.update),Y()},G=(e,t,n,o,r,s,l,i,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void X(a,f,n,o,r,s,l,i,c);if(256&p)return void J(a,f,n,o,r,s,l,i,c)}8&h?(16&u&&se(a,r,s),f!==a&&d(n,f)):16&u?16&h?X(a,f,n,o,r,s,l,i,c):se(a,r,s,!0):(8&u&&d(n,""),16&h&&M(f,n,o,r,s,l,i,c))},J=(e,t,n,o,r,s,l,i,c)=>{t=t||a;const u=(e=e||a).length,f=t.length,p=Math.min(u,f);let d;for(d=0;df?se(e,r,s,!0,!1,p):M(t,n,o,r,s,l,i,c,p)},X=(e,t,n,o,r,s,l,i,c)=>{let u=0;const f=t.length;let p=e.length-1,d=f-1;for(;u<=p&&u<=d;){const o=e[u],a=t[u]=c?bo(t[u]):_o(t[u]);if(!uo(o,a))break;x(o,a,n,null,r,s,l,i,c),u++}for(;u<=p&&u<=d;){const o=e[p],a=t[d]=c?bo(t[d]):_o(t[d]);if(!uo(o,a))break;x(o,a,n,null,r,s,l,i,c),p--,d--}if(u>p){if(u<=d){const e=d+1,a=ed)for(;u<=p;)ee(e[u],r,s,!0),u++;else{const h=u,v=u,g=new Map;for(u=v;u<=d;u++){const e=t[u]=c?bo(t[u]):_o(t[u]);null!=e.key&&g.set(e.key,u)}let m,y=0;const _=d-v+1;let b=!1,C=0;const S=new Array(_);for(u=0;u<_;u++)S[u]=0;for(u=h;u<=p;u++){const o=e[u];if(y>=_){ee(o,r,s,!0);continue}let a;if(null!=o.key)a=g.get(o.key);else for(m=v;m<=d;m++)if(0===S[m-v]&&uo(o,t[m])){a=m;break}void 0===a?ee(o,r,s,!0):(S[a-v]=u+1,a>=C?C=a:b=!0,x(o,t[a],n,null,r,s,l,i,c),y++)}const w=b?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(S):a;for(m=w.length-1,u=_-1;u>=0;u--){const e=v+u,a=t[e],p=e+1{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void Z(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ce);if(i===eo){n(l,t,o);for(let e=0;ec.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},ee=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&Dn(i,null,n,null),256&u)return void t.ctx.deactivate(e);const d=1&u&&p;let h;if((h=l&&l.onVnodeBeforeUnmount)&&Wn(h,t,e),6&u)re(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Pn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ce,o):a&&(s!==eo||f>0&&64&f)?se(a,t,n,!1,!0):(s===eo&&(128&f||256&f)||!r&&16&u)&&se(c,t,n),o&&ne(e)}((h=l&&l.onVnodeUnmounted)||d)&&Un((()=>{h&&Wn(h,t,e),d&&Pn(e,null,t,"unmounted")}),n)},ne=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===eo)return void oe(n,r);if(t===oo)return void F(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},oe=(e,t)=>{let n;for(;e!==t;)n=g(e),o(e),e=n;o(t)},re=(e,t,n)=>{const{bum:o,effects:r,update:s,subTree:l,um:i}=e;if(o&&j(o),r)for(let c=0;c{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},se=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l6&e.shapeFlag?le(e.component.subTree):128&e.shapeFlag?e.suspense.next():g(e.anchor||e.el),ie=(e,t,n)=>{null==e?t._vnode&&ee(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),Et(),t._vnode=e},ce={p:x,um:ee,m:Z,r:ne,mt:D,mc:M,pc:G,pbc:I,n:le,o:e};let ae,ue;t&&([ae,ue]=t(ce));return{render:ie,hydrate:ae,createApp:jn(ie,ae)}}(e)}function Wn(e,t,n,o=null){st(e,t,7,[n,o])}function Kn(e,t,n=!1){const o=e.children,r=t.children;if(_(o)&&_(r))for(let s=0;se&&(e.disabled||""===e.disabled),qn=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Gn=(e,t)=>{const n=e&&e.to;if(C(n)){if(t){return t(n)}return null}return n};function Jn(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||Hn(u))&&16&c)for(let p=0;p{16&y&&u(_,e,t,r,s,l,i,c)};m?g(n,a):f&&g(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,v=Hn(e.props),g=v?n:u,y=v?o:d;if(l=l||qn(u),t.dynamicChildren?(p(e.dynamicChildren,t.dynamicChildren,g,r,s,l,i),Kn(e,t,!0)):c||f(e,t,g,y,r,s,l,i,!1),m)v||Jn(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Gn(t.props,h);e&&Jn(t,e,null,a,0)}else v&&Jn(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!Hn(p))&&(s(a),16&i))for(let d=0;dnull!=e?e:null,ho=({ref:e})=>null!=e?C(e)||Je(e)||x(e)?{i:Pt,r:e}:e:null,vo=function(e,t=null,n=null,r=0,s=null,l=!1){e&&e!==Qn||(e=no);if(ao(e)){const o=go(e,t,!0);return n&&xo(o,n),o}c=e,x(c)&&"__vccOpts"in c&&(e=e.__vccOpts);var c;if(t){(He(t)||fo in t)&&(t=v({},t));let{class:e,style:n}=t;e&&!C(e)&&(t.class=i(e)),w(n)&&(He(n)&&!_(n)&&(n=v({},n)),t.style=o(n))}const a=C(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:w(e)?4:x(e)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&po(t),ref:t&&ho(t),scopeId:It,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null};if(xo(u,n),128&a){const{content:e,fallback:t}=function(e){const{shapeFlag:t,children:n}=e;let o,r;return 32&t?(o=qt(n.default),r=qt(n.fallback)):(o=qt(n),r=_o(null)),{content:o,fallback:r}}(u);u.ssContent=e,u.ssFallback=t}!l&&so&&(r>0||6&a)&&32!==r&&so.push(u);return u};function go(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?Co(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&po(i),ref:t&&t.ref?n&&r?_(r)?r.concat(ho(t)):[r,ho(t)]:ho(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==eo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&go(e.ssContent),ssFallback:e.ssFallback&&go(e.ssFallback),el:e.el,anchor:e.anchor}}function mo(e=" ",t=0){return vo(to,null,e,t)}function yo(e="",t=!1){return t?(lo(),co(no,null,e)):vo(no,null,e)}function _o(e){return null==e||"boolean"==typeof e?vo(no):_(e)?vo(eo,null,e):"object"==typeof e?null===e.el?e:go(e):vo(to,null,String(e))}function bo(e){return null===e.el?e:go(e)}function xo(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(_(t))n=16;else if("object"==typeof t){if(1&o||64&o){const n=t.default;return void(n&&(n._c&&Lt(1),xo(e,n()),n._c&&Lt(-1)))}{n=32;const o=t._;o||fo in t?3===o&&Pt&&(1024&Pt.vnode.patchFlag?(t._=2,e.patchFlag|=1024):t._=1):t._ctx=Pt}}else x(t)?(t={default:t,_ctx:Pt},n=32):(t=String(t),64&o?(n=16,t=[mo(t)]):n=8);e.children=t,e.shapeFlag|=n}function Co(...e){const t=v({},e[0]);for(let n=1;n1)return n&&x(t)?t():t}}let wo=!0;function Eo(e,t,n=[],o=[],r=[],s=!1){const{mixins:l,extends:i,data:a,computed:f,methods:p,watch:d,provide:h,inject:g,components:m,directives:y,beforeMount:b,mounted:C,beforeUpdate:S,updated:E,activated:A,deactivated:F,beforeDestroy:k,beforeUnmount:T,destroyed:O,unmounted:R,render:L,renderTracked:M,renderTriggered:N,errorCaptured:P,expose:I}=t,$=e.proxy,j=e.ctx,V=e.appContext.mixins;if(s&&L&&e.render===u&&(e.render=L),s||(wo=!1,Ao("beforeCreate","bc",t,e,V),wo=!0,ko(e,V,n,o,r)),i&&Eo(e,i,n,o,r,!0),l&&ko(e,l,n,o,r),g)if(_(g))for(let c=0;cTo(e,t,$))),a&&To(e,a,$)),f)for(const c in f){const e=f[c],t=qo({get:x(e)?e.bind($,$):x(e.get)?e.get.bind($,$):u,set:!x(e)&&x(e.set)?e.set.bind($):u});Object.defineProperty(j,c,{enumerable:!0,configurable:!0,get:()=>t.value,set:e=>t.value=e})}var B;if(d&&o.push(d),!s&&o.length&&o.forEach((e=>{for(const t in e)Oo(e[t],j,$,t)})),h&&r.push(h),!s&&r.length&&r.forEach((e=>{const t=x(e)?e.call($):e;Reflect.ownKeys(t).forEach((e=>{!function(e,t){if(jo){let n=jo.provides;const o=jo.parent&&jo.parent.provides;o===n&&(n=jo.provides=Object.create(o)),n[e]=t}}(e,t[e])}))})),s&&(m&&v(e.components||(e.components=v({},e.type.components)),m),y&&v(e.directives||(e.directives=v({},e.type.directives)),y)),s||Ao("created","c",t,e,V),b&&rn(b.bind($)),C&&sn(C.bind($)),S&&ln(S.bind($)),E&&cn(E.bind($)),A&&Fn(A.bind($),"a",B),F&&function(e,t){Fn(e,"da",t)}(F.bind($)),P&&((e,t=jo)=>{nn("ec",e,t)})(P.bind($)),M&&pn(M.bind($)),N&&fn(N.bind($)),T&&an(T.bind($)),R&&un(R.bind($)),_(I)&&!s)if(I.length){const t=e.exposed||(e.exposed=Ye({}));I.forEach((e=>{t[e]=nt($,e)}))}else e.exposed||(e.exposed=c)}function Ao(e,t,n,o,r){for(let s=0;s{let t=e;for(let e=0;en[o];if(C(e)){const n=t[e];x(n)&&hn(r,n)}else if(x(e))hn(r,e.bind(n));else if(w(e))if(_(e))e.forEach((e=>Oo(e,t,n,o)));else{const o=x(e.handler)?e.handler.bind(n):t[e.handler];x(o)&&hn(r,o,e)}}function Ro(e,t,n){const o=n.appContext.config.optionMergeStrategies,{mixins:r,extends:s}=t;s&&Ro(e,s,n),r&&r.forEach((t=>Ro(e,t,n)));for(const l in t)o&&y(o,l)?e[l]=o[l](e[l],t[l],n.proxy,l):e[l]=t[l]}const Lo=e=>e?Uo(e)?e.exposed?e.exposed:e.proxy:Lo(e.parent):null,Mo=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Lo(e.parent),$root:e=>Lo(e.root),$emit:e=>e.emit,$options:e=>function(e){const t=e.type,{__merged:n,mixins:o,extends:r}=t;if(n)return n;const s=e.appContext.mixins;if(!s.length&&!o&&!r)return t;const l={};return s.forEach((t=>Ro(l,t,e))),Ro(l,t,e),t.__merged=l}(e),$forceUpdate:e=>()=>xt(e.update),$nextTick:e=>bt.bind(e.proxy),$watch:e=>gn.bind(e)}),No={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:a}=e;if("__v_skip"===t)return!0;let u;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return s[t]}else{if(o!==c&&y(o,t))return l[t]=0,o[t];if(r!==c&&y(r,t))return l[t]=1,r[t];if((u=e.propsOptions[0])&&y(u,t))return l[t]=2,s[t];if(n!==c&&y(n,t))return l[t]=3,n[t];wo&&(l[t]=4)}}const f=Mo[t];let p,d;return f?("$attrs"===t&&ee(e,0,t),f(e)):(p=i.__cssModules)&&(p=p[t])?p:n!==c&&y(n,t)?(l[t]=3,n[t]):(d=a.config.globalProperties,y(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;if(r!==c&&y(r,t))r[t]=n;else if(o!==c&&y(o,t))o[t]=n;else if(y(e.props,t))return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return void 0!==n[l]||e!==c&&y(e,l)||t!==c&&y(t,l)||(i=s[0])&&y(i,l)||y(o,l)||y(Mo,l)||y(r.config.globalProperties,l)}},Po=v({},No,{get(e,t){if(t!==Symbol.unscopables)return No.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),Io=In();let $o=0;let jo=null;const Vo=()=>jo||Pt,Bo=e=>{jo=e};function Uo(e){return 4&e.vnode.shapeFlag}let Do=!1;function zo(e,t,n){x(t)?e.render=t:w(t)&&(e.setupState=Ye(t)),Wo(e)}function Wo(e,t){const n=e.type;e.render||(e.render=n.render||u,e.render._rc&&(e.withProxy=new Proxy(e.ctx,Po))),jo=e,Q(),Eo(e,n),Y(),jo=null}function Ko(e,t=jo){t&&(t.effects||(t.effects=[])).push(e)}function Ho(e){return x(e)&&e.displayName||e.name}function qo(e){const t=function(e){let t,n;return x(e)?(t=e,n=u):(t=e.get,n=e.set),new ot(t,n,x(e)||!e.set)}(e);return Ko(t.effect),t}function Go(e){const t={};for(const n in e)t[I(n)]=e[n];return t}const Jo="3.0.11",Xo="http://www.w3.org/2000/svg",Zo="undefined"!=typeof document?document:null;let Qo,Yo;const er={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?Zo.createElementNS(Xo,e):Zo.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Zo.createTextNode(e),createComment:e=>Zo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o){const r=o?Yo||(Yo=Zo.createElementNS(Xo,"svg")):Qo||(Qo=Zo.createElement("div"));r.innerHTML=e;const s=r.firstChild;let l=s,i=l;for(;l;)i=l,er.insert(l,t,n),l=r.firstChild;return[s,i]}};const tr=/\s*!important$/;function nr(e,t,n){if(_(n))n.forEach((n=>nr(e,t,n)));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=rr[t];if(n)return n;let o=L(t);if("filter"!==o&&o in e)return rr[t]=o;o=P(o);for(let r=0;rdocument.createEvent("Event").timeStamp&&(lr=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);ir=!!(e&&Number(e[1])<=53)}let cr=0;const ar=Promise.resolve(),ur=()=>{cr=0};function fr(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(pr.test(e)){let n;for(t={};n=e.match(pr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[N(e.slice(2)),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,s[t]=function(e,t){const n=e=>{const o=e.timeStamp||lr();(ir||o>=n.attached-1)&&st(function(e,t){if(_(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>cr||(ar.then(ur),cr=lr()))(),n}(o,r),i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const pr=/(?:Once|Passive|Capture)$/;const dr=/^on[a-z]/;const hr="transition",vr=(e,{slots:t})=>function(e,t,n){const o=arguments.length;return 2===o?w(t)&&!_(t)?ao(t)?vo(e,null,[t]):vo(e,t):vo(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ao(n)&&(n=[n]),vo(e,t,n))}(_n,function(e){let{name:t="v",type:n,css:o=!0,duration:r,enterFromClass:s=`${t}-enter-from`,enterActiveClass:l=`${t}-enter-active`,enterToClass:i=`${t}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${t}-leave-from`,leaveActiveClass:p=`${t}-leave-active`,leaveToClass:d=`${t}-leave-to`}=e;const h={};for(const v in e)v in gr||(h[v]=e[v]);if(!o)return h;const g=function(e){if(null==e)return null;if(w(e))return[mr(e.enter),mr(e.leave)];{const t=mr(e);return[t,t]}}(r),m=g&&g[0],y=g&&g[1],{onBeforeEnter:_,onEnter:b,onEnterCancelled:x,onLeave:C,onLeaveCancelled:S,onBeforeAppear:E=_,onAppear:A=b,onAppearCancelled:F=x}=h,k=(e,t,n)=>{_r(e,t?u:i),_r(e,t?a:l),n&&n()},T=(e,t)=>{_r(e,d),_r(e,p),t&&t()},O=e=>(t,o)=>{const r=e?A:b,l=()=>k(t,e,o);r&&r(t,l),br((()=>{_r(t,e?c:s),yr(t,e?u:i),r&&r.length>1||Cr(t,n,m,l)}))};return v(h,{onBeforeEnter(e){_&&_(e),yr(e,s),yr(e,l)},onBeforeAppear(e){E&&E(e),yr(e,c),yr(e,a)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){const o=()=>T(e,t);yr(e,f),document.body.offsetHeight,yr(e,p),br((()=>{_r(e,f),yr(e,d),C&&C.length>1||Cr(e,n,y,o)})),C&&C(e,o)},onEnterCancelled(e){k(e,!1),x&&x(e)},onAppearCancelled(e){k(e,!0),F&&F(e)},onLeaveCancelled(e){T(e),S&&S(e)}})}(e),t);vr.displayName="Transition";const gr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};function mr(e){return B(e)}function yr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function _r(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function br(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}vr.props=v({},_n.props,gr);let xr=0;function Cr(e,t,n,o){const r=e._endId=++xr,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=function(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Sr(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Sr(i,c);let u=null,f=0,p=0;t===hr?l>0&&(u=hr,f=l,p=s.length):"animation"===t?a>0&&(u="animation",f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?hr:"animation":null,p=u?u===hr?s.length:c.length:0);const d=u===hr&&/\b(transform|all)(,|$)/.test(n.transitionProperty);return{type:u,timeout:f,propCount:p,hasTransform:d}}(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{uwr(t)+wr(e[n]))))}function wr(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}const Er=["ctrl","shift","alt","meta"],Ar={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Er.some((n=>e[`${n}Key`]&&!t.includes(n)))},Fr=(e,t)=>(n,...o)=>{for(let e=0;e{Tr(e,!1)})):Tr(e,t))},beforeUnmount(e,{value:t}){Tr(e,t)}};function Tr(e,t){e.style.display=t?e._vod:"none"}const Or=v({patchProp:(e,t,o,r,s=!1,l,i,c,a)=>{switch(t){case"class":!function(e,t,n){if(null==t&&(t=""),n)e.setAttribute("class",t);else{const n=e._vtc;n&&(t=(t?[t,...n]:[...n]).join(" ")),e.className=t}}(e,r,s);break;case"style":!function(e,t,n){const o=e.style;if(n)if(C(n)){if(t!==n){const t=o.display;o.cssText=n,"_vod"in e&&(o.display=t)}}else{for(const e in n)nr(o,e,n[e]);if(t&&!C(t))for(const e in t)null==n[e]&&nr(o,e,"")}else e.removeAttribute("style")}(e,o,r);break;default:d(t)?h(t)||fr(e,t,0,r,i):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&dr.test(t)&&x(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(dr.test(t)&&C(n))return!1;return t in e}(e,t,r,s)?function(e,t,n,o,r,s,l){if("innerHTML"===t||"textContent"===t)return o&&l(o,r,s),void(e[t]=null==n?"":n);if("value"!==t||"PROGRESS"===e.tagName){if(""===n||null==n){const o=typeof e[t];if(""===n&&"boolean"===o)return void(e[t]=!0);if(null==n&&"string"===o)return e[t]="",void e.removeAttribute(t);if("number"===o)return e[t]=0,void e.removeAttribute(t)}try{e[t]=n}catch(i){}}else{e._value=n;const t=null==n?"":n;e.value!==t&&(e.value=t)}}(e,t,r,l,i,c,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,o,r){if(r&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(sr,t.slice(6,t.length)):e.setAttributeNS(sr,t,o);else{const r=n(t);null==o||r&&!1===o?e.removeAttribute(t):e.setAttribute(t,r?"":o)}}(e,t,r,s))}},forcePatchProp:(e,t)=>"value"===t},er);let Rr;const Lr=(...e)=>{const t=(Rr||(Rr=zn(Or))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(C(e)){return document.querySelector(e)}return e}(e);if(!o)return;const r=t._component;x(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};export{De as A,Lr as B,eo as F,vr as T,vo as a,Zn as b,co as c,Vn as d,Ue as e,Bt as f,Vt as g,sn as h,hn as i,un as j,qo as k,So as l,Co as m,bt as n,lo as o,jt as p,Go as q,Xe as r,Xn as s,et as t,yo as u,Nn as v,Ut as w,kr as x,Fr as y,Mt as z}; diff --git a/demo/vendor.2f2c88a5.js b/demo/vendor.2f2c88a5.js new file mode 100644 index 0000000..c105268 --- /dev/null +++ b/demo/vendor.2f2c88a5.js @@ -0,0 +1 @@ +function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}const t=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),n=e("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function o(e){if(_(e)){const t={};for(let n=0;n{if(e){const n=e.split(s);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function i(e){let t="";if(C(e))t=e;else if(_(e))for(let n=0;n{},f=()=>!1,p=/^on[^a-z]/,d=e=>p.test(e),h=e=>e.startsWith("onUpdate:"),v=Object.assign,g=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},m=Object.prototype.hasOwnProperty,y=(e,t)=>m.call(e,t),_=Array.isArray,b=e=>"[object Map]"===F(e),x=e=>"function"==typeof e,C=e=>"string"==typeof e,w=e=>"symbol"==typeof e,S=e=>null!==e&&"object"==typeof e,A=e=>S(e)&&x(e.then)&&x(e.catch),E=Object.prototype.toString,F=e=>E.call(e),k=e=>C(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=e(",key,ref,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),O=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},M=/-(\w)/g,P=O((e=>e.replace(M,((e,t)=>t?t.toUpperCase():"")))),L=/\B([A-Z])/g,R=O((e=>e.replace(L,"-$1").toLowerCase())),j=O((e=>e.charAt(0).toUpperCase()+e.slice(1))),N=O((e=>e?`on${j(e)}`:"")),I=(e,t)=>e!==t&&(e==e||t==t),$=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},U=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=new WeakMap,D=[];let z;const W=Symbol(""),K=Symbol("");function H(e,t=c){(function(e){return e&&!0===e._isEffect})(e)&&(e=e.raw);const n=function(e,t){const n=function(){if(!n.active)return e();if(!D.includes(n)){J(n);try{return Z.push(X),X=!0,D.push(n),z=n,e()}finally{D.pop(),Y(),z=D[D.length-1]}}};return n.id=G++,n.allowRecurse=!!t.allowRecurse,n._isEffect=!0,n.active=!0,n.raw=e,n.deps=[],n.options=t,n}(e,t);return t.lazy||n(),n}function q(e){e.active&&(J(e),e.options.onStop&&e.options.onStop(),e.active=!1)}let G=0;function J(e){const{deps:t}=e;if(t.length){for(let n=0;n{e&&e.forEach((e=>{(e!==z||e.allowRecurse)&&i.add(e)}))};if("clear"===t)l.forEach(c);else if("length"===n&&_(e))l.forEach(((e,t)=>{("length"===t||t>=o)&&c(e)}));else switch(void 0!==n&&c(l.get(n)),t){case"add":_(e)?k(n)&&c(l.get("length")):(c(l.get(W)),b(e)&&c(l.get(K)));break;case"delete":_(e)||(c(l.get(W)),b(e)&&c(l.get(K)));break;case"set":b(e)&&c(l.get(W))}i.forEach((e=>{e.options.scheduler?e.options.scheduler(e):e()}))}const ne=e("__proto__,__v_isRef,__isVue"),oe=new Set(Object.getOwnPropertyNames(Symbol).map((e=>Symbol[e])).filter(w)),re=ae(),se=ae(!1,!0),le=ae(!0),ie=ce();function ce(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Ge(this);for(let t=0,r=this.length;t{e[t]=function(...e){Q();const n=Ge(this)[t].apply(this,e);return Y(),n}})),e}function ae(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_raw"===o&&r===(e?t?Ue:Ve:t?$e:Ie).get(n))return n;const s=_(n);if(!e&&s&&y(ie,o))return Reflect.get(ie,o,r);const l=Reflect.get(n,o,r);if(w(o)?oe.has(o):ne(o))return l;if(e||ee(n,0,o),t)return l;if(Ze(l)){return!s||!k(o)?l.value:l}return S(l)?e?ze(l):De(l):l}}function ue(e=!1){return function(t,n,o,r){let s=t[n];if(!e&&(o=Ge(o),s=Ge(s),!_(t)&&Ze(s)&&!Ze(o)))return s.value=o,!0;const l=_(t)&&k(n)?Number(n)!0,deleteProperty:(e,t)=>!0},de=v({},fe,{get:se,set:ue(!0)}),he=e=>S(e)?De(e):e,ve=e=>S(e)?ze(e):e,ge=e=>e,me=e=>Reflect.getPrototypeOf(e);function ye(e,t,n=!1,o=!1){const r=Ge(e=e.__v_raw),s=Ge(t);t!==s&&!n&&ee(r,0,t),!n&&ee(r,0,s);const{has:l}=me(r),i=o?ge:n?ve:he;return l.call(r,t)?i(e.get(t)):l.call(r,s)?i(e.get(s)):void(e!==r&&e.get(t))}function _e(e,t=!1){const n=this.__v_raw,o=Ge(n),r=Ge(e);return e!==r&&!t&&ee(o,0,e),!t&&ee(o,0,r),e===r?n.has(e):n.has(e)||n.has(r)}function be(e,t=!1){return e=e.__v_raw,!t&&ee(Ge(e),0,W),Reflect.get(e,"size",e)}function xe(e){e=Ge(e);const t=Ge(this);return me(t).has.call(t,e)||(t.add(e),te(t,"add",e,e)),this}function Ce(e,t){t=Ge(t);const n=Ge(this),{has:o,get:r}=me(n);let s=o.call(n,e);s||(e=Ge(e),s=o.call(n,e));const l=r.call(n,e);return n.set(e,t),s?I(t,l)&&te(n,"set",e,t):te(n,"add",e,t),this}function we(e){const t=Ge(this),{has:n,get:o}=me(t);let r=n.call(t,e);r||(e=Ge(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&te(t,"delete",e,void 0),s}function Se(){const e=Ge(this),t=0!==e.size,n=e.clear();return t&&te(e,"clear",void 0,void 0),n}function Ae(e,t){return function(n,o){const r=this,s=r.__v_raw,l=Ge(s),i=t?ge:e?ve:he;return!e&&ee(l,0,W),s.forEach(((e,t)=>n.call(o,i(e),i(t),r)))}}function Ee(e,t,n){return function(...o){const r=this.__v_raw,s=Ge(r),l=b(s),i="entries"===e||e===Symbol.iterator&&l,c="keys"===e&&l,a=r[e](...o),u=n?ge:t?ve:he;return!t&&ee(s,0,c?K:W),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:i?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Fe(e){return function(...t){return"delete"!==e&&this}}function ke(){const e={get(e){return ye(this,e)},get size(){return be(this)},has:_e,add:xe,set:Ce,delete:we,clear:Se,forEach:Ae(!1,!1)},t={get(e){return ye(this,e,!1,!0)},get size(){return be(this)},has:_e,add:xe,set:Ce,delete:we,clear:Se,forEach:Ae(!1,!0)},n={get(e){return ye(this,e,!0)},get size(){return be(this,!0)},has(e){return _e.call(this,e,!0)},add:Fe("add"),set:Fe("set"),delete:Fe("delete"),clear:Fe("clear"),forEach:Ae(!0,!1)},o={get(e){return ye(this,e,!0,!0)},get size(){return be(this,!0)},has(e){return _e.call(this,e,!0)},add:Fe("add"),set:Fe("set"),delete:Fe("delete"),clear:Fe("clear"),forEach:Ae(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=Ee(r,!1,!1),n[r]=Ee(r,!0,!1),t[r]=Ee(r,!1,!0),o[r]=Ee(r,!0,!0)})),[e,n,t,o]}const[Te,Oe,Me,Pe]=ke();function Le(e,t){const n=t?e?Pe:Me:e?Oe:Te;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(y(n,o)&&o in t?n:t,o,r)}const Re={get:Le(!1,!1)},je={get:Le(!1,!0)},Ne={get:Le(!0,!1)},Ie=new WeakMap,$e=new WeakMap,Ve=new WeakMap,Ue=new WeakMap;function Be(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>F(e).slice(8,-1))(e))}function De(e){return e&&e.__v_isReadonly?e:We(e,!1,fe,Re,Ie)}function ze(e){return We(e,!0,pe,Ne,Ve)}function We(e,t,n,o,r){if(!S(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const l=Be(e);if(0===l)return e;const i=new Proxy(e,2===l?o:n);return r.set(e,i),i}function Ke(e){return He(e)?Ke(e.__v_raw):!(!e||!e.__v_isReactive)}function He(e){return!(!e||!e.__v_isReadonly)}function qe(e){return Ke(e)||He(e)}function Ge(e){return e&&Ge(e.__v_raw)||e}function Je(e){return V(e,"__v_skip",!0),e}const Xe=e=>S(e)?De(e):e;function Ze(e){return Boolean(e&&!0===e.__v_isRef)}function Qe(e){return function(e,t=!1){if(Ze(e))return e;return new Ye(e,t)}(e)}class Ye{constructor(e,t=!1){this._shallow=t,this.__v_isRef=!0,this._rawValue=t?e:Ge(e),this._value=t?e:Xe(e)}get value(){return ee(Ge(this),0,"value"),this._value}set value(e){e=this._shallow?e:Ge(e),I(e,this._rawValue)&&(this._rawValue=e,this._value=this._shallow?e:Xe(e),te(Ge(this),"set","value",e))}}const et={get:(e,t,n)=>{return Ze(o=Reflect.get(e,t,n))?o.value:o;var o},set:(e,t,n,o)=>{const r=e[t];return Ze(r)&&!Ze(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function tt(e){return Ke(e)?e:new Proxy(e,et)}function nt(e){const t=_(e)?new Array(e.length):{};for(const n in e)t[n]=rt(e,n);return t}class ot{constructor(e,t){this._object=e,this._key=t,this.__v_isRef=!0}get value(){return this._object[this._key]}set value(e){this._object[this._key]=e}}function rt(e,t){return Ze(e[t])?e[t]:new ot(e,t)}class st{constructor(e,t,n){this._setter=t,this._dirty=!0,this.__v_isRef=!0,this.effect=H(e,{lazy:!0,scheduler:()=>{this._dirty||(this._dirty=!0,te(Ge(this),"set","value"))}}),this.__v_isReadonly=n}get value(){const e=Ge(this);return e._dirty&&(e._value=this.effect(),e._dirty=!1),ee(e,0,"value"),e._value}set value(e){this._setter(e)}}function lt(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){ct(s,t,n)}return r}function it(e,t,n,o){if(x(e)){const r=lt(e,t,n,o);return r&&A(r)&&r.catch((e=>{ct(e,t,n)})),r}const r=[];for(let s=0;s>>1;kt(ft[e])-1?ft.splice(t,0,e):ft.push(e),St()}}function St(){at||ut||(ut=!0,bt=_t.then(Tt))}function At(e,t,n,o){_(e)?n.push(...e):t&&t.includes(e,e.allowRecurse?o+1:o)||n.push(e),St()}function Et(e,t=null){if(dt.length){for(xt=t,ht=[...new Set(dt)],dt.length=0,vt=0;vtkt(e)-kt(t))),yt=0;ytnull==e.id?1/0:e.id;function Tt(e){ut=!1,at=!0,Et(e),ft.sort(((e,t)=>kt(e)-kt(t)));try{for(pt=0;pte.trim())):t&&(r=n.map(U))}let i,a=o[i=N(t)]||o[i=N(P(t))];!a&&s&&(a=o[i=N(R(t))]),a&&it(a,e,6,r);const u=o[i+"Once"];if(u){if(e.emitted){if(e.emitted[i])return}else e.emitted={};e.emitted[i]=!0,it(u,e,6,r)}}function Mt(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let l={},i=!1;if(!x(e)){const o=e=>{const n=Mt(e,t,!0);n&&(i=!0,v(l,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||i?(_(s)?s.forEach((e=>l[e]=null)):v(l,s),o.set(e,l),l):(o.set(e,null),null)}function Pt(e,t){return!(!e||!d(t))&&(t=t.slice(2).replace(/Once$/,""),y(e,t[0].toLowerCase()+t.slice(1))||y(e,R(t))||y(e,t))}let Lt=null,Rt=null;function jt(e){const t=Lt;return Lt=e,Rt=e&&e.type.__scopeId||null,t}function Nt(e){Rt=e}function It(){Rt=null}const $t=e=>Vt;function Vt(e,t=Lt,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&wo(-1);const r=jt(t),s=e(...n);return jt(r),o._d&&wo(1),s};return o._n=!0,o._c=!0,o._d=!0,o}function Ut(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[l],slots:i,attrs:c,emit:a,render:u,renderCache:f,data:p,setupState:d,ctx:v,inheritAttrs:g}=e;let m;const y=jt(e);try{let e;if(4&n.shapeFlag){const t=r||o;m=Ro(u.call(t,t,f,s,d,p,v)),e=c}else{const n=t;0,m=Ro(n.length>1?n(s,{attrs:c,slots:i,emit:a}):n(s,null)),e=t.props?c:Bt(c)}let y=m;if(e&&!1!==g){const t=Object.keys(e),{shapeFlag:n}=y;t.length&&(1&n||6&n)&&(l&&t.some(h)&&(e=Dt(e,l)),y=Mo(y,e))}0,n.dirs&&(y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&(y.transition=n.transition),m=y}catch(_){_o.length=0,ct(_,e,1),m=Oo(mo)}return jt(y),m}const Bt=e=>{let t;for(const n in e)("class"===n||"style"===n||d(n))&&((t||(t={}))[n]=e[n]);return t},Dt=(e,t)=>{const n={};for(const o in e)h(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function zt(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;r1)return n&&x(t)?t.call(o.proxy):t}}const Kt={};function Ht(e,t,n){return qt(e,t,n)}function qt(e,t,{immediate:n,deep:o,flush:r,onTrack:s,onTrigger:l}=c,i=qo){let a,f,p=!1,d=!1;if(Ze(e)?(a=()=>e.value,p=!!e._shallow):Ke(e)?(a=()=>e,o=!0):_(e)?(d=!0,p=e.some(Ke),a=()=>e.map((e=>Ze(e)?e.value:Ke(e)?Xt(e):x(e)?lt(e,i,2):void 0))):a=x(e)?t?()=>lt(e,i,2):()=>{if(!i||!i.isUnmounted)return f&&f(),it(e,i,3,[h])}:u,t&&o){const e=a;a=()=>Xt(e())}let h=e=>{f=b.options.onStop=()=>{lt(e,i,4)}},v=d?[]:Kt;const m=()=>{if(b.active)if(t){const e=b();(o||p||(d?e.some(((e,t)=>I(e,v[t]))):I(e,v)))&&(f&&f(),it(t,i,3,[e,v===Kt?void 0:v,h]),v=e)}else b()};let y;m.allowRecurse=!!t,y="sync"===r?m:"post"===r?()=>to(m,i&&i.suspense):()=>{!i||i.isMounted?function(e){At(e,ht,dt,vt)}(m):m()};const b=H(a,{lazy:!0,onTrack:s,onTrigger:l,scheduler:y});return tr(b,i),t?n?m():v=b():"post"===r?to(b,i&&i.suspense):b(),()=>{q(b),i&&g(i.effects,b)}}function Gt(e,t,n){const o=this.proxy,r=C(e)?e.includes(".")?Jt(o,e):()=>o[e]:e.bind(o,o);let s;return x(t)?s=t:(s=t.handler,n=t),qt(r,s.bind(o),n,this)}function Jt(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{Xt(e,t)}));else if((e=>"[object Object]"===F(e))(e))for(const n in e)Xt(e[n],t);return e}const Zt=[Function,Array],Qt={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zt,onEnter:Zt,onAfterEnter:Zt,onEnterCancelled:Zt,onBeforeLeave:Zt,onLeave:Zt,onAfterLeave:Zt,onLeaveCancelled:Zt,onBeforeAppear:Zt,onAppear:Zt,onAfterAppear:Zt,onAppearCancelled:Zt},setup(e,{slots:t}){const n=Go(),o=function(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return gn((()=>{e.isMounted=!0})),_n((()=>{e.isUnmounting=!0})),e}();let r;return()=>{const s=t.default&&rn(t.default(),!0);if(!s||!s.length)return;const l=Ge(e),{mode:i}=l,c=s[0];if(o.isLeaving)return tn(c);const a=nn(c);if(!a)return tn(c);const u=en(a,l,o,n);on(a,u);const f=n.subTree,p=f&&nn(f);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(p&&p.type!==mo&&(!Eo(a,p)||d)){const e=en(p,l,o,n);if(on(p,e),"out-in"===i)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,n.update()},tn(c);"in-out"===i&&a.type!==mo&&(e.delayLeave=(e,t,n)=>{Yt(o,p)[String(p.key)]=p,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return c}}};function Yt(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function en(e,t,n,o){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:i,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:f,onLeave:p,onAfterLeave:d,onLeaveCancelled:h,onBeforeAppear:v,onAppear:g,onAfterAppear:m,onAppearCancelled:y}=t,_=String(e.key),b=Yt(n,e),x=(e,t)=>{e&&it(e,o,9,t)},C={mode:s,persisted:l,beforeEnter(t){let o=i;if(!n.isMounted){if(!r)return;o=v||i}t._leaveCb&&t._leaveCb(!0);const s=b[_];s&&Eo(e,s)&&s.el._leaveCb&&s.el._leaveCb(),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=g||c,o=m||a,s=y||u}let l=!1;const i=e._enterCb=t=>{l||(l=!0,x(t?s:o,[e]),C.delayedLeave&&C.delayedLeave(),e._enterCb=void 0)};t?(t(e,i),t.length<=1&&i()):i()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();x(f,[t]);let s=!1;const l=t._leaveCb=n=>{s||(s=!0,o(),x(n?h:d,[t]),t._leaveCb=void 0,b[r]===e&&delete b[r])};b[r]=e,p?(p(t,l),p.length<=1&&l()):l()},clone:e=>en(e,t,n,o)};return C}function tn(e){if(cn(e))return(e=Mo(e)).children=null,e}function nn(e){return cn(e)?e.children?e.children[0]:void 0:e}function on(e,t){6&e.shapeFlag&&e.component?on(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function rn(e,t=!1){let n=[],o=0;for(let r=0;r1)for(let r=0;r!!e.type.__asyncLoader,cn=e=>e.type.__isKeepAlive;function an(e,t){fn(e,"a",t)}function un(e,t){fn(e,"da",t)}function fn(e,t,n=qo){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}e()});if(dn(t,o,n),n){let e=n.parent;for(;e&&e.parent;)cn(e.parent.vnode)&&pn(o,t,n,e),e=e.parent}}function pn(e,t,n,o){const r=dn(t,e,o,!0);bn((()=>{g(o[t],r)}),n)}function dn(e,t,n=qo,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;Q(),Jo(n);const r=it(t,n,e,o);return Jo(null),Y(),r});return o?r.unshift(s):r.push(s),s}}const hn=e=>(t,n=qo)=>(!Zo||"sp"===e)&&dn(e,t,n),vn=hn("bm"),gn=hn("m"),mn=hn("bu"),yn=hn("u"),_n=hn("bum"),bn=hn("um"),xn=hn("sp"),Cn=hn("rtg"),wn=hn("rtc");function Sn(e,t=qo){dn("ec",e,t)}let An=!0;function En(e){const t=Tn(e),n=e.proxy,o=e.ctx;An=!1,t.beforeCreate&&Fn(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:l,watch:i,provide:c,inject:a,created:f,beforeMount:p,mounted:d,beforeUpdate:h,updated:v,activated:g,deactivated:m,beforeDestroy:y,beforeUnmount:b,destroyed:C,unmounted:w,render:A,renderTracked:E,renderTriggered:F,errorCaptured:k,serverPrefetch:T,expose:O,inheritAttrs:M,components:P,directives:L,filters:R}=t;if(a&&function(e,t,n=u){_(e)&&(e=Ln(e));for(const o in e){const n=e[o];S(n)?t[o]="default"in n?Wt(n.from||o,n.default,!0):Wt(n.from||o):t[o]=Wt(n)}}(a,o,null),l)for(const u in l){const e=l[u];x(e)&&(o[u]=e.bind(n))}if(r){const t=r.call(n,n);S(t)&&(e.data=De(t))}if(An=!0,s)for(const _ in s){const e=s[_],t=or({get:x(e)?e.bind(n,n):x(e.get)?e.get.bind(n,n):u,set:!x(e)&&x(e.set)?e.set.bind(n):u});Object.defineProperty(o,_,{enumerable:!0,configurable:!0,get:()=>t.value,set:e=>t.value=e})}if(i)for(const u in i)kn(i[u],o,n,u);if(c){const e=x(c)?c.call(n):c;Reflect.ownKeys(e).forEach((t=>{!function(e,t){if(qo){let n=qo.provides;const o=qo.parent&&qo.parent.provides;o===n&&(n=qo.provides=Object.create(o)),n[e]=t}}(t,e[t])}))}function j(e,t){_(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(f&&Fn(f,e,"c"),j(vn,p),j(gn,d),j(mn,h),j(yn,v),j(an,g),j(un,m),j(Sn,k),j(wn,E),j(Cn,F),j(_n,b),j(bn,w),j(xn,T),_(O))if(O.length){const t=e.exposed||(e.exposed={});O.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});A&&e.render===u&&(e.render=A),null!=M&&(e.inheritAttrs=M),P&&(e.components=P),L&&(e.directives=L)}function Fn(e,t,n){it(_(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function kn(e,t,n,o){const r=o.includes(".")?Jt(n,o):()=>n[o];if(C(e)){const n=t[e];x(n)&&Ht(r,n)}else if(x(e))Ht(r,e.bind(n));else if(S(e))if(_(e))e.forEach((e=>kn(e,t,n,o)));else{const o=x(e.handler)?e.handler.bind(n):t[e.handler];x(o)&&Ht(r,o,e)}}function Tn(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:l}}=e.appContext,i=s.get(t);let c;return i?c=i:r.length||n||o?(c={},r.length&&r.forEach((e=>On(c,e,l,!0))),On(c,t,l)):c=t,s.set(t,c),c}function On(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&On(e,s,n,!0),r&&r.forEach((t=>On(e,t,n,!0)));for(const l in t)if(o&&"expose"===l);else{const o=Mn[l]||n&&n[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const Mn={data:Pn,props:jn,emits:jn,methods:jn,computed:jn,beforeCreate:Rn,created:Rn,beforeMount:Rn,mounted:Rn,beforeUpdate:Rn,updated:Rn,beforeDestroy:Rn,destroyed:Rn,activated:Rn,deactivated:Rn,errorCaptured:Rn,serverPrefetch:Rn,components:jn,directives:jn,watch:function(e,t){if(!e)return t;if(!t)return e;const n=v(Object.create(null),e);for(const o in t)n[o]=Rn(e[o],t[o]);return n},provide:Pn,inject:function(e,t){return jn(Ln(e),Ln(t))}};function Pn(e,t){return t?e?function(){return v(x(e)?e.call(this,this):e,x(t)?t.call(this,this):t)}:t:e}function Ln(e){if(_(e)){const t={};for(let n=0;n{u=!0;const[n,o]=Vn(e,t,!0);v(l,n),o&&i.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!s&&!u)return o.set(e,a),a;if(_(s))for(let a=0;a-1,n[1]=o<0||t-1||y(n,"default"))&&i.push(e)}}}const f=[l,i];return o.set(e,f),f}function Un(e){return"$"!==e[0]}function Bn(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Dn(e,t){return Bn(e)===Bn(t)}function zn(e,t){return _(t)?t.findIndex((t=>Dn(t,e))):x(t)&&Dn(t,e)?0:-1}const Wn=e=>"_"===e[0]||"$stable"===e,Kn=e=>_(e)?e.map(Ro):[Ro(e)],Hn=(e,t,n)=>{const o=Vt((e=>Kn(t(e))),n);return o._c=!1,o},qn=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Wn(r))continue;const n=e[r];if(x(n))t[r]=Hn(0,n,o);else if(null!=n){const e=Kn(n);t[r]=()=>e}}},Gn=(e,t)=>{const n=Kn(t);e.slots.default=()=>n};function Jn(e,t){if(null===Lt)return e;const n=Lt.proxy,o=e.dirs||(e.dirs=[]);for(let r=0;r(s.has(e)||(e&&x(e.install)?(s.add(e),e.install(i,...t)):x(e)&&(s.add(e),e(i,...t))),i),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),i),component:(e,t)=>t?(r.components[e]=t,i):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,i):r.directives[e],mount(s,c,a){if(!l){const u=Oo(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),l=!0,i._container=s,s.__vue_app__=i,u.component.proxy}},unmount(){l&&(e(null,i._container),delete i._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,i)};return i}}const eo={scheduler:wt,allowRecurse:!0},to=function(e,t){t&&t.pendingBranch?_(e)?t.effects.push(...e):t.effects.push(e):At(e,mt,gt,yt)},no=(e,t,n,o,r=!1)=>{if(_(e))return void e.forEach(((e,s)=>no(e,t&&(_(t)?t[s]:t),n,o,r)));if(ln(o)&&!r)return;const s=4&o.shapeFlag?er(o.component)||o.component.proxy:o.el,l=r?null:s,{i:i,r:a}=e,u=t&&t.r,f=i.refs===c?i.refs={}:i.refs,p=i.setupState;if(null!=u&&u!==a&&(C(u)?(f[u]=null,y(p,u)&&(p[u]=null)):Ze(u)&&(u.value=null)),C(a)){const e=()=>{f[a]=l,y(p,a)&&(p[a]=l)};l?(e.id=-1,to(e,n)):e()}else if(Ze(a)){const e=()=>{a.value=l};l?(e.id=-1,to(e,n)):e()}else x(a)&<(a,i,12,[l,f])};function oo(e){return function(e,t){const{insert:n,remove:o,patchProp:r,forcePatchProp:s,createElement:l,createText:i,createComment:f,setText:p,setElementText:d,parentNode:h,nextSibling:g,setScopeId:m=u,cloneNode:_,insertStaticContent:b}=e,x=(e,t,n,o=null,r=null,s=null,l=!1,i=null,c=!!t.dynamicChildren)=>{e&&!Eo(e,t)&&(o=le(e),ee(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:f}=t;switch(a){case go:C(e,t,n,o);break;case mo:w(e,t,n,o);break;case yo:null==e&&S(t,n,o,l);break;case vo:U(e,t,n,o,r,s,l,i,c);break;default:1&f?k(e,t,n,o,r,s,l,i,c):6&f?B(e,t,n,o,r,s,l,i,c):(64&f||128&f)&&a.process(e,t,n,o,r,s,l,i,c,ce)}null!=u&&r&&no(u,e&&e.ref,s,t||e,!t)},C=(e,t,o,r)=>{if(null==e)n(t.el=i(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&p(n,t.children)}},w=(e,t,o,r)=>{null==e?n(t.el=f(t.children||""),o,r):t.el=e.el},S=(e,t,n,o)=>{[e.el,e.anchor]=b(e.children,t,n,o)},E=({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=g(e),n(e,o,r),e=s;n(t,o,r)},F=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),o(e),e=n;o(t)},k=(e,t,n,o,r,s,l,i,c)=>{l=l||"svg"===t.type,null==e?O(t,n,o,r,s,l,i,c):j(e,t,r,s,l,i,c)},O=(e,t,o,s,i,c,a,u)=>{let f,p;const{type:h,props:v,shapeFlag:g,transition:m,patchFlag:y,dirs:b}=e;if(e.el&&void 0!==_&&-1===y)f=e.el=_(e.el);else{if(f=e.el=l(e.type,c,v&&v.is,v),8&g?d(f,e.children):16&g&&L(e.children,f,null,s,i,c&&"foreignObject"!==h,a,u),b&&Xn(e,null,s,"created"),v){for(const t in v)T(t)||r(f,t,null,v[t],c,e.children,s,i,se);(p=v.onVnodeBeforeMount)&&ro(p,s,e)}M(f,e,e.scopeId,a,s)}b&&Xn(e,null,s,"beforeMount");const x=(!i||i&&!i.pendingBranch)&&m&&!m.persisted;x&&m.beforeEnter(f),n(f,t,o),((p=v&&v.onVnodeMounted)||x||b)&&to((()=>{p&&ro(p,s,e),x&&m.enter(f),b&&Xn(e,null,s,"mounted")}),i)},M=(e,t,n,o,r)=>{if(n&&m(e,n),o)for(let s=0;s{for(let a=c;a{const u=t.el=e.el;let{patchFlag:f,dynamicChildren:p,dirs:h}=t;f|=16&e.patchFlag;const v=e.props||c,g=t.props||c;let m;if((m=g.onVnodeBeforeUpdate)&&ro(m,n,t,e),h&&Xn(t,e,n,"beforeUpdate"),f>0){if(16&f)I(u,t,v,g,n,o,l);else if(2&f&&v.class!==g.class&&r(u,"class",null,g.class,l),4&f&&r(u,"style",v.style,g.style,l),8&f){const i=t.dynamicProps;for(let t=0;t{m&&ro(m,n,t,e),h&&Xn(t,e,n,"updated")}),o)},N=(e,t,n,o,r,s,l)=>{for(let i=0;i{if(n!==o){for(const c in o){if(T(c))continue;const u=o[c],f=n[c];(u!==f||s&&s(e,c))&&r(e,c,f,u,a,t.children,l,i,se)}if(n!==c)for(const s in n)T(s)||s in o||r(e,s,n[s],null,a,t.children,l,i,se)}},U=(e,t,o,r,s,l,c,a,u)=>{const f=t.el=e?e.el:i(""),p=t.anchor=e?e.anchor:i("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:v}=t;h&&(u=!0),v&&(a=a?a.concat(v):v),null==e?(n(f,o,r),n(p,o,r),L(t.children,o,p,s,l,c,a,u)):d>0&&64&d&&h&&e.dynamicChildren?(N(e.dynamicChildren,h,o,s,l,c,a),(null!=t.key||s&&t===s.subTree)&&so(e,t,!0)):G(e,t,o,p,s,l,c,a,u)},B=(e,t,n,o,r,s,l,i,c)=>{t.slotScopeIds=i,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,l,c):D(t,n,o,r,s,l,c):z(e,t,c)},D=(e,t,n,o,r,s,l)=>{const i=e.component=function(e,t,n){const o=e.type,r=(t?t.appContext:e.appContext)||Ko,s={uid:Ho++,vnode:e,type:o,parent:t,appContext:r,root:null,next:null,subTree:null,update:null,render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,effects:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Vn(o,r),emitsOptions:Mt(o,r),emit:null,emitted:null,propsDefaults:c,inheritAttrs:o.inheritAttrs,ctx:c,data:c,props:c,attrs:c,slots:c,refs:c,setupState:c,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=Ot.bind(null,s),s}(e,o,r);if(cn(e)&&(i.ctx.renderer=ce),function(e,t=!1){Zo=t;const{props:n,children:o}=e.vnode,r=Xo(e);Nn(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Ge(t),V(t,"_",n)):qn(t,e.slots={})}else e.slots={},t&&Gn(e,t);V(e.slots,Fo,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Je(new Proxy(e.ctx,zo));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?function(e){const t=t=>{e.exposed=t||{}};return{attrs:e.attrs,slots:e.slots,emit:e.emit,expose:t}}(e):null;qo=e,Q();const r=lt(o,e,0,[e.props,n]);if(Y(),qo=null,A(r)){const n=()=>{qo=null};if(r.then(n,n),t)return r.then((t=>{Qo(e,t)})).catch((t=>{ct(t,e,0)}));e.asyncDep=r}else Qo(e,r)}else Yo(e)}(e,t):void 0;Zo=!1}(i),i.asyncDep){if(r&&r.registerDep(i,W),!e.el){const e=i.subTree=Oo(mo);w(null,e,t,n)}}else W(i,e,t,n,r,s,l)},z=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:l,children:i,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!i||i&&i.$stable)||o!==l&&(o?!l||zt(o,l,a):!!l);if(1024&c)return!0;if(16&c)return o?zt(o,l,a):!!l;if(8&c){const e=t.dynamicProps;for(let t=0;tpt&&ft.splice(t,1)}(o.update),o.update()}else t.component=e.component,t.el=e.el,o.vnode=t},W=(e,t,n,o,r,s,l)=>{e.update=H((function(){if(e.isMounted){let t,{next:n,bu:o,u:i,parent:c,vnode:a}=e,u=n;n?(n.el=a.el,K(e,n,l)):n=a,o&&$(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&ro(t,c,n,a);const f=Ut(e),p=e.subTree;e.subTree=f,x(p,f,h(p.el),le(p),e,r,s),n.el=f.el,null===u&&function({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}(e,f.el),i&&to(i,r),(t=n.props&&n.props.onVnodeUpdated)&&to((()=>ro(t,c,n,a)),r)}else{let l;const{el:i,props:c}=t,{bm:a,m:u,parent:f}=e;if(a&&$(a),(l=c&&c.onVnodeBeforeMount)&&ro(l,f,t),i&&ue){const n=()=>{e.subTree=Ut(e),ue(i,e.subTree,e,r,null)};ln(t)?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const l=e.subTree=Ut(e);x(null,l,n,o,e,r,s),t.el=l.el}if(u&&to(u,r),l=c&&c.onVnodeMounted){const e=t;to((()=>ro(l,f,e)),r)}256&t.shapeFlag&&e.a&&to(e.a,r),e.isMounted=!0,t=n=o=null}}),eo)},K=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:l}}=e,i=Ge(r),[c]=e.propsOptions;let a=!1;if(!(o||l>0)||16&l){let o;In(e,t,r,s)&&(a=!0);for(const s in i)t&&(y(t,s)||(o=R(s))!==s&&y(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=$n(c,i,s,void 0,e,!0)):delete r[s]);if(s!==i)for(const e in s)t&&y(t,e)||(delete s[e],a=!0)}else if(8&l){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:o,slots:r}=e;let s=!0,l=c;if(32&o.shapeFlag){const e=t._;e?n&&1===e?s=!1:(v(r,t),n||1!==e||delete r._):(s=!t.$stable,qn(t,r)),l=t}else t&&(Gn(e,t),l={default:1});if(s)for(const i in r)Wn(i)||i in l||delete r[i]})(e,t.children,n),Q(),Et(void 0,e.update),Y()},G=(e,t,n,o,r,s,l,i,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void X(a,f,n,o,r,s,l,i,c);if(256&p)return void J(a,f,n,o,r,s,l,i,c)}8&h?(16&u&&se(a,r,s),f!==a&&d(n,f)):16&u?16&h?X(a,f,n,o,r,s,l,i,c):se(a,r,s,!0):(8&u&&d(n,""),16&h&&L(f,n,o,r,s,l,i,c))},J=(e,t,n,o,r,s,l,i,c)=>{t=t||a;const u=(e=e||a).length,f=t.length,p=Math.min(u,f);let d;for(d=0;df?se(e,r,s,!0,!1,p):L(t,n,o,r,s,l,i,c,p)},X=(e,t,n,o,r,s,l,i,c)=>{let u=0;const f=t.length;let p=e.length-1,d=f-1;for(;u<=p&&u<=d;){const o=e[u],a=t[u]=c?jo(t[u]):Ro(t[u]);if(!Eo(o,a))break;x(o,a,n,null,r,s,l,i,c),u++}for(;u<=p&&u<=d;){const o=e[p],a=t[d]=c?jo(t[d]):Ro(t[d]);if(!Eo(o,a))break;x(o,a,n,null,r,s,l,i,c),p--,d--}if(u>p){if(u<=d){const e=d+1,a=ed)for(;u<=p;)ee(e[u],r,s,!0),u++;else{const h=u,v=u,g=new Map;for(u=v;u<=d;u++){const e=t[u]=c?jo(t[u]):Ro(t[u]);null!=e.key&&g.set(e.key,u)}let m,y=0;const _=d-v+1;let b=!1,C=0;const w=new Array(_);for(u=0;u<_;u++)w[u]=0;for(u=h;u<=p;u++){const o=e[u];if(y>=_){ee(o,r,s,!0);continue}let a;if(null!=o.key)a=g.get(o.key);else for(m=v;m<=d;m++)if(0===w[m-v]&&Eo(o,t[m])){a=m;break}void 0===a?ee(o,r,s,!0):(w[a-v]=u+1,a>=C?C=a:b=!0,x(o,t[a],n,null,r,s,l,i,c),y++)}const S=b?function(e){const t=e.slice(),n=[0];let o,r,s,l,i;const c=e.length;for(o=0;o0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,l=n[s-1];for(;s-- >0;)n[s]=l,l=t[l];return n}(w):a;for(m=S.length-1,u=_-1;u>=0;u--){const e=v+u,a=t[e],p=e+1{const{el:l,type:i,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void Z(e.component.subTree,t,o,r);if(128&u)return void e.suspense.move(t,o,r);if(64&u)return void i.move(e,t,o,ce);if(i===vo){n(l,t,o);for(let e=0;ec.enter(l)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,i=()=>n(l,t,o),a=()=>{e(l,(()=>{i(),s&&s()}))};r?r(l,i,a):a()}else n(l,t,o)},ee=(e,t,n,o=!1,r=!1)=>{const{type:s,props:l,ref:i,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:f,dirs:p}=e;if(null!=i&&no(i,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&p;let h;if((h=l&&l.onVnodeBeforeUnmount)&&ro(h,t,e),6&u)re(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&Xn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ce,o):a&&(s!==vo||f>0&&64&f)?se(a,t,n,!1,!0):(s===vo&&(128&f||256&f)||!r&&16&u)&&se(c,t,n),o&&ne(e)}((h=l&&l.onVnodeUnmounted)||d)&&to((()=>{h&&ro(h,t,e),d&&Xn(e,null,t,"unmounted")}),n)},ne=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===vo)return void oe(n,r);if(t===yo)return void F(e);const l=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,l);o?o(e.el,l,r):r()}else l()},oe=(e,t)=>{let n;for(;e!==t;)n=g(e),o(e),e=n;o(t)},re=(e,t,n)=>{const{bum:o,effects:r,update:s,subTree:l,um:i}=e;if(o&&$(o),r)for(let c=0;c{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},se=(e,t,n,o=!1,r=!1,s=0)=>{for(let l=s;l6&e.shapeFlag?le(e.component.subTree):128&e.shapeFlag?e.suspense.next():g(e.anchor||e.el),ie=(e,t,n)=>{null==e?t._vnode&&ee(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),Ft(),t._vnode=e},ce={p:x,um:ee,m:Z,r:ne,mt:D,mc:L,pc:G,pbc:N,n:le,o:e};let ae,ue;t&&([ae,ue]=t(ce));return{render:ie,hydrate:ae,createApp:Yn(ie,ae)}}(e)}function ro(e,t,n,o=null){it(e,t,7,[n,o])}function so(e,t,n=!1){const o=e.children,r=t.children;if(_(o)&&_(r))for(let s=0;se&&(e.disabled||""===e.disabled),io=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,co=(e,t)=>{const n=e&&e.to;if(C(n)){if(t){return t(n)}return null}return n};function ao(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:l,anchor:i,shapeFlag:c,children:a,props:u}=e,f=2===s;if(f&&o(l,t,n),(!f||lo(u))&&16&c)for(let p=0;p{16&y&&u(_,e,t,r,s,l,i,c)};m?g(n,a):f&&g(f,p)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,v=lo(e.props),g=v?n:u,y=v?o:d;if(l=l||io(u),b?(p(e.dynamicChildren,b,g,r,s,l,i),so(e,t,!0)):c||f(e,t,g,y,r,s,l,i,!1),m)v||ao(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=co(t.props,h);e&&ao(t,e,null,a,0)}else v&&ao(t,u,d,a,1)}},remove(e,t,n,o,{um:r,o:{remove:s}},l){const{shapeFlag:i,children:c,anchor:a,targetAnchor:u,target:f,props:p}=e;if(f&&s(u),(l||!lo(p))&&(s(a),16&i))for(let d=0;d0?bo||a:null,_o.pop(),bo=_o[_o.length-1]||null,Co>0&&bo&&bo.push(s),s}function Ao(e){return!!e&&!0===e.__v_isVNode}function Eo(e,t){return e.type===t.type&&e.key===t.key}const Fo="__vInternal",ko=({key:e})=>null!=e?e:null,To=({ref:e})=>null!=e?C(e)||Ze(e)||x(e)?{i:Lt,r:e}:e:null,Oo=function(e,t=null,n=null,r=0,s=null,l=!1){e&&e!==po||(e=mo);if(Ao(e)){const o=Mo(e,t,!0);return n&&No(o,n),o}c=e,x(c)&&"__vccOpts"in c&&(e=e.__vccOpts);var c;if(t){(qe(t)||Fo in t)&&(t=v({},t));let{class:e,style:n}=t;e&&!C(e)&&(t.class=i(e)),S(n)&&(qe(n)&&!_(n)&&(n=v({},n)),t.style=o(n))}const a=C(e)?1:(e=>e.__isSuspense)(e)?128:(e=>e.__isTeleport)(e)?64:S(e)?4:x(e)?2:0,u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ko(t),ref:t&&To(t),scopeId:Rt,slotScopeIds:null,children:null,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,shapeFlag:a,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null};No(u,n),128&a&&e.normalize(u);Co>0&&!l&&bo&&(r>0||6&a)&&32!==r&&bo.push(u);return u};function Mo(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:l}=e,i=t?Io(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:i,key:i&&ko(i),ref:t&&t.ref?n&&r?_(r)?r.concat(To(t)):[r,To(t)]:To(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==vo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Mo(e.ssContent),ssFallback:e.ssFallback&&Mo(e.ssFallback),el:e.el,anchor:e.anchor}}function Po(e=" ",t=0){return Oo(go,null,e,t)}function Lo(e="",t=!1){return t?(xo(),So(mo,null,e)):Oo(mo,null,e)}function Ro(e){return null==e||"boolean"==typeof e?Oo(mo):_(e)?Oo(vo,null,e.slice()):"object"==typeof e?jo(e):Oo(go,null,String(e))}function jo(e){return null===e.el?e:Mo(e)}function No(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(_(t))n=16;else if("object"==typeof t){if(1&o||64&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),No(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Fo in t?3===o&&Lt&&(1===Lt.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Lt}}else x(t)?(t={default:t,_ctx:Lt},n=32):(t=String(t),64&o?(n=16,t=[Po(t)]):n=8);e.children=t,e.shapeFlag|=n}function Io(...e){const t=v({},e[0]);for(let n=1;n!Ao(e)||e.type!==mo&&!(e.type===vo&&!Vo(e.children))))?e:null}function Uo(e){const t={};for(const n in e)t[N(n)]=e[n];return t}const Bo=e=>e?Xo(e)?er(e)||e.proxy:Bo(e.parent):null,Do=v(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Bo(e.parent),$root:e=>Bo(e.root),$emit:e=>e.emit,$options:e=>Tn(e),$forceUpdate:e=>()=>wt(e.update),$nextTick:e=>Ct.bind(e.proxy),$watch:e=>Gt.bind(e)}),zo={get({_:e},t){const{ctx:n,setupState:o,data:r,props:s,accessCache:l,type:i,appContext:a}=e;let u;if("$"!==t[0]){const i=l[t];if(void 0!==i)switch(i){case 0:return o[t];case 1:return r[t];case 3:return n[t];case 2:return s[t]}else{if(o!==c&&y(o,t))return l[t]=0,o[t];if(r!==c&&y(r,t))return l[t]=1,r[t];if((u=e.propsOptions[0])&&y(u,t))return l[t]=2,s[t];if(n!==c&&y(n,t))return l[t]=3,n[t];An&&(l[t]=4)}}const f=Do[t];let p,d;return f?("$attrs"===t&&ee(e,0,t),f(e)):(p=i.__cssModules)&&(p=p[t])?p:n!==c&&y(n,t)?(l[t]=3,n[t]):(d=a.config.globalProperties,y(d,t)?d[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:s}=e;if(r!==c&&y(r,t))r[t]=n;else if(o!==c&&y(o,t))o[t]=n;else if(y(e.props,t))return!1;return("$"!==t[0]||!(t.slice(1)in e))&&(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:s}},l){let i;return void 0!==n[l]||e!==c&&y(e,l)||t!==c&&y(t,l)||(i=s[0])&&y(i,l)||y(o,l)||y(Do,l)||y(r.config.globalProperties,l)}},Wo=v({},zo,{get(e,t){if(t!==Symbol.unscopables)return zo.get(e,t,e)},has:(e,n)=>"_"!==n[0]&&!t(n)}),Ko=Zn();let Ho=0;let qo=null;const Go=()=>qo||Lt,Jo=e=>{qo=e};function Xo(e){return 4&e.vnode.shapeFlag}let Zo=!1;function Qo(e,t,n){x(t)?e.render=t:S(t)&&(e.setupState=tt(t)),Yo(e)}function Yo(e,t,n){const o=e.type;e.render||(e.render=o.render||u,e.render._rc&&(e.withProxy=new Proxy(e.ctx,Wo))),qo=e,Q(),En(e),Y(),qo=null}function er(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(tt(Je(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Do?Do[n](e):void 0}))}function tr(e,t=qo){t&&(t.effects||(t.effects=[])).push(e)}function nr(e){return x(e)&&e.displayName||e.name}function or(e){const t=function(e){let t,n;return x(e)?(t=e,n=u):(t=e.get,n=e.set),new st(t,n,x(e)||!e.set)}(e);return tr(t.effect),t}const rr="3.1.5",sr="undefined"!=typeof document?document:null,lr=new Map,ir={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?sr.createElementNS("http://www.w3.org/2000/svg",e):sr.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>sr.createTextNode(e),createComment:e=>sr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>sr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,o){const r=n?n.previousSibling:t.lastChild;let s=lr.get(e);if(!s){const t=sr.createElement("template");if(t.innerHTML=o?`${e}`:e,s=t.content,o){const e=s.firstChild;for(;e.firstChild;)s.appendChild(e.firstChild);s.removeChild(e)}lr.set(e,s)}return t.insertBefore(s.cloneNode(!0),n),[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const cr=/\s*!important$/;function ar(e,t,n){if(_(n))n.forEach((n=>ar(e,t,n)));else if(t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=fr[t];if(n)return n;let o=P(t);if("filter"!==o&&o in e)return fr[t]=o;o=j(o);for(let r=0;rdocument.createEvent("Event").timeStamp&&(dr=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);hr=!!(e&&Number(e[1])<=53)}let vr=0;const gr=Promise.resolve(),mr=()=>{vr=0};function yr(e,t,n,o,r=null){const s=e._vei||(e._vei={}),l=s[t];if(o&&l)l.value=o;else{const[n,i]=function(e){let t;if(_r.test(e)){let n;for(t={};n=e.match(_r);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[R(e.slice(2)),t]}(t);if(o){!function(e,t,n,o){e.addEventListener(t,n,o)}(e,n,s[t]=function(e,t){const n=e=>{const o=e.timeStamp||dr();(hr||o>=n.attached-1)&&it(function(e,t){if(_(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>vr||(gr.then(mr),vr=dr()))(),n}(o,r),i)}else l&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,l,i),s[t]=void 0)}}const _r=/(?:Once|Passive|Capture)$/;const br=/^on[a-z]/;const xr="transition",Cr=(e,{slots:t})=>function(e,t,n){const o=arguments.length;return 2===o?S(t)&&!_(t)?Ao(t)?Oo(e,null,[t]):Oo(e,t):Oo(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Ao(n)&&(n=[n]),Oo(e,t,n))}(Qt,function(e){const t={};for(const v in e)v in wr||(t[v]=e[v]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:l=`${n}-enter-active`,enterToClass:i=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=l,appearToClass:u=i,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:d=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(S(e))return[Er(e.enter),Er(e.leave)];{const t=Er(e);return[t,t]}}(r),g=h&&h[0],m=h&&h[1],{onBeforeEnter:y,onEnter:_,onEnterCancelled:b,onLeave:x,onLeaveCancelled:C,onBeforeAppear:w=y,onAppear:A=_,onAppearCancelled:E=b}=t,F=(e,t,n)=>{kr(e,t?u:i),kr(e,t?a:l),n&&n()},k=(e,t)=>{kr(e,d),kr(e,p),t&&t()},T=e=>(t,n)=>{const r=e?A:_,l=()=>F(t,e,n);Sr(r,[t,l]),Tr((()=>{kr(t,e?c:s),Fr(t,e?u:i),Ar(r)||Mr(t,o,g,l)}))};return v(t,{onBeforeEnter(e){Sr(y,[e]),Fr(e,s),Fr(e,l)},onBeforeAppear(e){Sr(w,[e]),Fr(e,c),Fr(e,a)},onEnter:T(!1),onAppear:T(!0),onLeave(e,t){const n=()=>k(e,t);Fr(e,f),document.body.offsetHeight,Fr(e,p),Tr((()=>{kr(e,f),Fr(e,d),Ar(x)||Mr(e,o,m,n)})),Sr(x,[e,n])},onEnterCancelled(e){F(e,!1),Sr(b,[e])},onAppearCancelled(e){F(e,!0),Sr(E,[e])},onLeaveCancelled(e){k(e),Sr(C,[e])}})}(e),t);Cr.displayName="Transition";const wr={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};Cr.props=v({},Qt.props,wr);const Sr=(e,t=[])=>{_(e)?e.forEach((e=>e(...t))):e&&e(...t)},Ar=e=>!!e&&(_(e)?e.some((e=>e.length>1)):e.length>1);function Er(e){return U(e)}function Fr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function kr(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Tr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Or=0;function Mr(e,t,n,o){const r=e._endId=++Or,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:l,timeout:i,propCount:c}=function(e,t){const n=window.getComputedStyle(e),o=e=>(n[e]||"").split(", "),r=o("transitionDelay"),s=o("transitionDuration"),l=Pr(r,s),i=o("animationDelay"),c=o("animationDuration"),a=Pr(i,c);let u=null,f=0,p=0;t===xr?l>0&&(u=xr,f=l,p=s.length):"animation"===t?a>0&&(u="animation",f=a,p=c.length):(f=Math.max(l,a),u=f>0?l>a?xr:"animation":null,p=u?u===xr?s.length:c.length:0);const d=u===xr&&/\b(transform|all)(,|$)/.test(n.transitionProperty);return{type:u,timeout:f,propCount:p,hasTransform:d}}(e,t);if(!l)return o();const a=l+"end";let u=0;const f=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&f()};setTimeout((()=>{uLr(t)+Lr(e[n]))))}function Lr(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}const Rr=["ctrl","shift","alt","meta"],jr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Rr.some((n=>e[`${n}Key`]&&!t.includes(n)))},Nr=(e,t)=>(n,...o)=>{for(let e=0;e{$r(e,!1)})):$r(e,t))},beforeUnmount(e,{value:t}){$r(e,t)}};function $r(e,t){e.style.display=t?e._vod:"none"}const Vr=v({patchProp:(e,t,o,r,s=!1,l,i,c,a)=>{switch(t){case"class":!function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s);break;case"style":!function(e,t,n){const o=e.style;if(n)if(C(n)){if(t!==n){const t=o.display;o.cssText=n,"_vod"in e&&(o.display=t)}}else{for(const e in n)ar(o,e,n[e]);if(t&&!C(t))for(const e in t)null==n[e]&&ar(o,e,"")}else e.removeAttribute("style")}(e,o,r);break;default:d(t)?h(t)||yr(e,t,0,r,i):function(e,t,n,o){if(o)return"innerHTML"===t||!!(t in e&&br.test(t)&&x(n));if("spellcheck"===t||"draggable"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(br.test(t)&&C(n))return!1;return t in e}(e,t,r,s)?function(e,t,n,o,r,s,l){if("innerHTML"===t||"textContent"===t)return o&&l(o,r,s),void(e[t]=null==n?"":n);if("value"===t&&"PROGRESS"!==e.tagName){e._value=n;const o=null==n?"":n;return e.value!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}if(""===n||null==n){const o=typeof e[t];if(""===n&&"boolean"===o)return void(e[t]=!0);if(null==n&&"string"===o)return e[t]="",void e.removeAttribute(t);if("number"===o){try{e[t]=0}catch(i){}return void e.removeAttribute(t)}}try{e[t]=n}catch(c){}}(e,t,r,l,i,c,a):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),function(e,t,o,r,s){if(r&&t.startsWith("xlink:"))null==o?e.removeAttributeNS(pr,t.slice(6,t.length)):e.setAttributeNS(pr,t,o);else{const r=n(t);null==o||r&&!1===o?e.removeAttribute(t):e.setAttribute(t,r?"":o)}}(e,t,r,s))}},forcePatchProp:(e,t)=>"value"===t},ir);let Ur;const Br=(...e)=>{const t=(Ur||(Ur=oo(Vr))).createApp(...e),{mount:n}=t;return t.mount=e=>{const o=function(e){if(C(e)){return document.querySelector(e)}return e}(e);if(!o)return;const r=t._component;x(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t};export{ze as A,Br as B,vo as F,Cr as T,Oo as a,fo as b,So as c,sn as d,De as e,$t as f,It as g,gn as h,Ht as i,bn as j,or as k,Wt as l,Io as m,Ct as n,xo as o,Nt as p,Uo as q,Qe as r,uo as s,nt as t,Lo as u,Jn as v,Vt as w,Ir as x,Nr as y,$o as z}; diff --git a/dist/Modal.vue.d.ts b/dist/Modal.vue.d.ts index 0b37bd1..64cb30b 100644 --- a/dist/Modal.vue.d.ts +++ b/dist/Modal.vue.d.ts @@ -30,7 +30,8 @@ declare const _default: import("vue").DefineComponent<{ latest: import("vue").ComputedRef; mergeOptions: MergeOptions; modalRef: import("vue").Ref; - onClickDimmed: () => void; + onMouseDownDimmed: (e: MouseEvent) => void; + onMouseUpDimmed: (e: MouseEvent) => void; onTransitionEmit: { beforeEnter: () => void; enter: () => void; @@ -45,11 +46,17 @@ declare const _default: import("vue").DefineComponent<{ teleportTarget: string; transition: string | boolean; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("before-enter" | "enter" | "after-enter" | "enter-cancelled" | "before-leave" | "leave" | "after-leave" | "leave-cancelled")[], "before-enter" | "enter" | "after-enter" | "enter-cancelled" | "before-leave" | "leave" | "after-leave" | "leave-cancelled", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ - close: Function; + close?: unknown; + disabled?: unknown; + modelValue?: unknown; + options?: unknown; +} & { disabled: boolean; modelValue: boolean; options: Record; -} & {}>, { +} & { + close?: Function | undefined; +}>, { close: Function; disabled: boolean; modelValue: boolean; diff --git a/dist/hooks.d.ts b/dist/hooks.d.ts index 32570be..dcf0619 100644 --- a/dist/hooks.d.ts +++ b/dist/hooks.d.ts @@ -10,7 +10,8 @@ declare type UseClose = ({ close, closeKeyCode, latest }: { closeKeyCode: number | false; latest: ComputedRef; }) => { - onClickDimmed: () => void; + onMouseDownDimmed: (e: MouseEvent) => void; + onMouseUpDimmed: (e: MouseEvent) => void; }; declare type UseOrder = ({ modalRef, show }: { modalRef: Ref; diff --git a/dist/index.es5.js b/dist/index.es5.js index ba1b7ce..0ea386e 100644 --- a/dist/index.es5.js +++ b/dist/index.es5.js @@ -1729,11 +1729,18 @@ var useClose = function useClose(_ref2) { closeClickDimmed = _ref2.closeClickDimmed, closeKeyCode = _ref2.closeKeyCode, latest = _ref2.latest; + var actionTarget = null; - function onClickDimmed() { - if (closeClickDimmed) { + function onMouseDownDimmed(e) { + actionTarget = e.target; + } + + function onMouseUpDimmed(e) { + if (closeClickDimmed && actionTarget === e.target) { close.value(); } + + actionTarget = null; } function closeKeyEvent(event) { @@ -1753,7 +1760,8 @@ var useClose = function useClose(_ref2) { } }); return { - onClickDimmed: onClickDimmed + onMouseDownDimmed: onMouseDownDimmed, + onMouseUpDimmed: onMouseUpDimmed }; }; var useOrder = function useOrder(_ref3) { @@ -1873,7 +1881,8 @@ var script = defineComponent({ closeKeyCode: mergeOptions.closeKeyCode, latest: latest }), - onClickDimmed = _useClose.onClickDimmed; + onMouseDownDimmed = _useClose.onMouseDownDimmed, + onMouseUpDimmed = _useClose.onMouseUpDimmed; var onTransitionEmit = { beforeEnter: function beforeEnter() { @@ -1911,7 +1920,7 @@ var script = defineComponent({ var emitClose = function emitClose() { console.warn('emitClose was deprecated.\nhttps://github.com/hoiheart/vue-universal-modal#usage-modal'); - close.value(); + if (close.value) close.value(); }; return { @@ -1921,7 +1930,8 @@ var script = defineComponent({ latest: latest, mergeOptions: mergeOptions, modalRef: modalRef, - onClickDimmed: onClickDimmed, + onMouseDownDimmed: onMouseDownDimmed, + onMouseUpDimmed: onMouseUpDimmed, onTransitionEmit: onTransitionEmit, show: show, teleportTarget: teleportTarget, @@ -1957,13 +1967,16 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { style: _objectSpread2({ transitionDuration: _ctx.transition }, (_ctx$mergeOptions = _ctx.mergeOptions) === null || _ctx$mergeOptions === void 0 ? void 0 : _ctx$mergeOptions.styleModalContent), - onClick: _cache[1] || (_cache[1] = withModifiers(function () { - return _ctx.onClickDimmed && _ctx.onClickDimmed.apply(_ctx, arguments); - }, ["self"])) + onMousedown: _cache[1] || (_cache[1] = withModifiers(function () { + return _ctx.onMouseDownDimmed && _ctx.onMouseDownDimmed.apply(_ctx, arguments); + }, ["self"])), + onMouseup: _cache[2] || (_cache[2] = function () { + return _ctx.onMouseUpDimmed && _ctx.onMouseUpDimmed.apply(_ctx, arguments); + }) }, [renderSlot(_ctx.$slots, "default", { emitClose: _ctx.emitClose - }), renderSlot(_ctx.$slots, "close")], 6 - /* CLASS, STYLE */ + }), renderSlot(_ctx.$slots, "close")], 38 + /* CLASS, STYLE, HYDRATE_EVENTS */ )], 16 /* FULL_PROPS */ ), [[vShow, _ctx.show]])]; diff --git a/dist/index.js b/dist/index.js index f1b3abf..cb5ae36 100644 --- a/dist/index.js +++ b/dist/index.js @@ -53,10 +53,18 @@ const useClose = ({ closeKeyCode, latest }) => { - function onClickDimmed() { - if (closeClickDimmed) { + let actionTarget = null; + + function onMouseDownDimmed(e) { + actionTarget = e.target; + } + + function onMouseUpDimmed(e) { + if (closeClickDimmed && actionTarget === e.target) { close.value(); } + + actionTarget = null; } function closeKeyEvent(event) { @@ -76,7 +84,8 @@ const useClose = ({ } }); return { - onClickDimmed + onMouseDownDimmed, + onMouseUpDimmed }; }; @@ -180,7 +189,8 @@ var script = defineComponent({ show }); const { - onClickDimmed + onMouseDownDimmed, + onMouseUpDimmed } = useClose({ close, closeClickDimmed: mergeOptions.closeClickDimmed, @@ -209,7 +219,7 @@ var script = defineComponent({ const emitClose = () => { console.warn('emitClose was deprecated.\nhttps://github.com/hoiheart/vue-universal-modal#usage-modal'); - close.value(); + if (close.value) close.value(); }; return { @@ -219,7 +229,8 @@ var script = defineComponent({ latest, mergeOptions, modalRef, - onClickDimmed, + onMouseDownDimmed, + onMouseUpDimmed, onTransitionEmit, show, teleportTarget, @@ -261,11 +272,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) { transitionDuration: _ctx.transition, ...((_ctx$mergeOptions = _ctx.mergeOptions) === null || _ctx$mergeOptions === void 0 ? void 0 : _ctx$mergeOptions.styleModalContent) }, - onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.onClickDimmed && _ctx.onClickDimmed(...args), ["self"])) + onMousedown: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.onMouseDownDimmed && _ctx.onMouseDownDimmed(...args), ["self"])), + onMouseup: _cache[2] || (_cache[2] = (...args) => _ctx.onMouseUpDimmed && _ctx.onMouseUpDimmed(...args)) }, [renderSlot(_ctx.$slots, "default", { emitClose: _ctx.emitClose - }), renderSlot(_ctx.$slots, "close")], 6 - /* CLASS, STYLE */ + }), renderSlot(_ctx.$slots, "close")], 38 + /* CLASS, STYLE, HYDRATE_EVENTS */ )], 16 /* FULL_PROPS */ ), [[vShow, _ctx.show]])]; diff --git a/dist/index.runtime.js b/dist/index.runtime.js index e703cf6..e8e53cf 100644 --- a/dist/index.runtime.js +++ b/dist/index.runtime.js @@ -1733,11 +1733,18 @@ closeClickDimmed = _ref2.closeClickDimmed, closeKeyCode = _ref2.closeKeyCode, latest = _ref2.latest; + var actionTarget = null; - function onClickDimmed() { - if (closeClickDimmed) { + function onMouseDownDimmed(e) { + actionTarget = e.target; + } + + function onMouseUpDimmed(e) { + if (closeClickDimmed && actionTarget === e.target) { close.value(); } + + actionTarget = null; } function closeKeyEvent(event) { @@ -1757,7 +1764,8 @@ } }); return { - onClickDimmed: onClickDimmed + onMouseDownDimmed: onMouseDownDimmed, + onMouseUpDimmed: onMouseUpDimmed }; }; var useOrder = function useOrder(_ref3) { @@ -1877,7 +1885,8 @@ closeKeyCode: mergeOptions.closeKeyCode, latest: latest }), - onClickDimmed = _useClose.onClickDimmed; + onMouseDownDimmed = _useClose.onMouseDownDimmed, + onMouseUpDimmed = _useClose.onMouseUpDimmed; var onTransitionEmit = { beforeEnter: function beforeEnter() { @@ -1915,7 +1924,7 @@ var emitClose = function emitClose() { console.warn('emitClose was deprecated.\nhttps://github.com/hoiheart/vue-universal-modal#usage-modal'); - close.value(); + if (close.value) close.value(); }; return { @@ -1925,7 +1934,8 @@ latest: latest, mergeOptions: mergeOptions, modalRef: modalRef, - onClickDimmed: onClickDimmed, + onMouseDownDimmed: onMouseDownDimmed, + onMouseUpDimmed: onMouseUpDimmed, onTransitionEmit: onTransitionEmit, show: show, teleportTarget: teleportTarget, @@ -1961,13 +1971,16 @@ style: _objectSpread2({ transitionDuration: _ctx.transition }, (_ctx$mergeOptions = _ctx.mergeOptions) === null || _ctx$mergeOptions === void 0 ? void 0 : _ctx$mergeOptions.styleModalContent), - onClick: _cache[1] || (_cache[1] = vue.withModifiers(function () { - return _ctx.onClickDimmed && _ctx.onClickDimmed.apply(_ctx, arguments); - }, ["self"])) + onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(function () { + return _ctx.onMouseDownDimmed && _ctx.onMouseDownDimmed.apply(_ctx, arguments); + }, ["self"])), + onMouseup: _cache[2] || (_cache[2] = function () { + return _ctx.onMouseUpDimmed && _ctx.onMouseUpDimmed.apply(_ctx, arguments); + }) }, [vue.renderSlot(_ctx.$slots, "default", { emitClose: _ctx.emitClose - }), vue.renderSlot(_ctx.$slots, "close")], 6 - /* CLASS, STYLE */ + }), vue.renderSlot(_ctx.$slots, "close")], 38 + /* CLASS, STYLE, HYDRATE_EVENTS */ )], 16 /* FULL_PROPS */ ), [[vue.vShow, _ctx.show]])]; diff --git a/package-lock.json b/package-lock.json index bdd5204..f16fd66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vue-universal-modal", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 49041d8..20c5529 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-universal-modal", - "version": "1.1.2", + "version": "1.1.3", "description": "Universal modal plugin for Vue@3", "license": "ISC", "author": {