@aevantec/litevue 0.5.16 → 0.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/litevue-plugins.dev.iife.js +32 -29
- package/dist/litevue-plugins.dev.mjs +32 -29
- package/dist/litevue-plugins.iife.js +1 -1
- package/dist/litevue-plugins.mjs +1 -1
- package/dist/litevue-plugins.umd.js +1 -1
- package/dist/litevue.dev.iife.js +232 -213
- package/dist/litevue.dev.mjs +232 -213
- package/dist/litevue.iife.js +1 -1
- package/dist/litevue.mjs +1 -1
- package/dist/litevue.umd.js +1 -1
- package/dist/plugins/focus.iife.js +1 -1
- package/dist/plugins/focus.mjs +1 -1
- package/dist/plugins/focus.umd.js +1 -1
- package/dist/plugins/mask.iife.js +1 -1
- package/dist/plugins/mask.mjs +1 -1
- package/dist/plugins/mask.umd.js +1 -1
- package/dist/plugins/media.dev.iife.js +9 -7
- package/dist/plugins/media.dev.mjs +9 -7
- package/dist/plugins/media.iife.js +1 -1
- package/dist/plugins/media.mjs +1 -1
- package/dist/plugins/media.umd.js +1 -1
- package/dist/plugins/morph.dev.iife.js +7 -4
- package/dist/plugins/morph.dev.mjs +7 -4
- package/dist/plugins/morph.iife.js +1 -1
- package/dist/plugins/morph.mjs +1 -1
- package/dist/plugins/morph.umd.js +1 -1
- package/dist/plugins/navigate.dev.iife.js +36 -16
- package/dist/plugins/navigate.dev.mjs +36 -16
- package/dist/plugins/navigate.iife.js +1 -1
- package/dist/plugins/navigate.mjs +1 -1
- package/dist/plugins/navigate.umd.js +1 -1
- package/dist/plugins/persist.dev.iife.js +1 -2
- package/dist/plugins/persist.dev.mjs +1 -2
- package/dist/types/block.d.mts +1 -1
- package/dist/types/block.d.ts +1 -1
- package/dist/types/context.d.mts +7 -1
- package/dist/types/context.d.ts +7 -1
- package/dist/types/directives/on.d.mts +2 -0
- package/dist/types/directives/on.d.ts +2 -0
- package/dist/types/directives/show.d.mts +4 -1
- package/dist/types/directives/show.d.ts +4 -1
- package/dist/types/ownership.d.mts +2 -0
- package/dist/types/ownership.d.ts +2 -0
- package/dist/types/scheduler.d.mts +9 -1
- package/dist/types/scheduler.d.ts +9 -1
- package/dist/types/walk.d.mts +1 -0
- package/dist/types/walk.d.ts +1 -0
- package/package.json +2 -2
package/dist/litevue.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVue=function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},i=Object.prototype.hasOwnProperty,o=(e,t)=>i.call(e,t),c=Array.isArray,l=e=>"[object Map]"===d(e),a=e=>"[object Date]"===d(e),u=e=>"string"==typeof e,f=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,h=Object.prototype.toString,d=e=>h.call(e),m=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},g=/-(\w)/g,_=v(e=>e.replace(g,(e,t)=>t?t.toUpperCase():"")),y=/\B([A-Z])/g,b=v(e=>e.replace(y,"-$1").toLowerCase()),w=v(e=>e.charAt(0).toUpperCase()+e.slice(1)),x=(v(e=>e?`on${w(e)}`:""),(e,t)=>!Object.is(e,t)),$=e=>{const t=u(e)?Number(e):NaN;return isNaN(t)?e:t};function k(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=u(s)?L(s):k(s);if(r)for(const e in r)t[e]=r[e]}return t}if(u(e)||p(e))return e}var O=/;(?![^(]*\))/g,S=/:([^]+)/,E=/\/\*[^]*?\*\//g;function L(e){const t={};return e.replace(E,"").split(O).forEach(e=>{if(e){const n=e.split(S);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function j(e){let t="";if(u(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=j(e[n]);s&&(t+=s+" ")}else if(p(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}var A;function T(e,t){if(e===t)return!0;let n=a(e),s=a(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=f(e),s=f(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=T(e[s],t[s]);return n}(e,t);if(n=p(e),s=p(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!T(e[n],t[n]))return!1}}return String(e)===String(t)}function N(e,t){return e.findIndex(e=>T(e,t))}function P(e,t=void 0){t&&t.active&&t.effects.push(e)}var R=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,P(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,K();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(I(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),F()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=z,t=A;try{return z=!0,A=this,this._runnings++,C(this),this.fn()}finally{M(this),this._runnings--,A=t,z=e}}stop(){this.active&&(C(this),M(this),this.onStop&&this.onStop(),this.active=!1)}};function I(e){return e.value}function C(e){e._trackId++,e._depsLength=0}function M(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)V(e.deps[t],e);e.deps.length=e._depsLength}}function V(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function W(e,t){e.effect instanceof R&&(e=e.effect.fn);const r=new R(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&P(r,t.scope)),t&&t.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}var z=!0,B=0,D=[];function K(){D.push(z),z=!1}function F(){const e=D.pop();z=void 0===e||e}function U(){B++}function q(){for(B--;!B&&Z.length;)Z.shift()()}function J(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&V(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var Z=[];function H(e,t,n){U();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&Z.push(s.scheduler)))}q()}var G=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Q=new WeakMap,X=Symbol(""),Y=Symbol("");function ee(e,t,n){if(z&&A){let t=Q.get(e);t||Q.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=G(()=>t.delete(n))),J(A,s)}}function te(e,t,n,s,r,i){const o=Q.get(e);if(!o)return;let a=[];if("clear"===t)a=[...o.values()];else if("length"===n&&c(e)){const e=Number(s);o.forEach((t,n)=>{("length"===n||!f(n)&&n>=e)&&a.push(t)})}else switch(void 0!==n&&a.push(o.get(n)),t){case"add":c(e)?m(n)&&a.push(o.get("length")):(a.push(o.get(X)),l(e)&&a.push(o.get(Y)));break;case"delete":c(e)||(a.push(o.get(X)),l(e)&&a.push(o.get(Y)));break;case"set":l(e)&&a.push(o.get(X))}U();for(const c of a)c&&H(c,4);q()}var ne=t("__proto__,__v_isRef,__isVue"),se=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(f)),re=ie();function ie(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=be(this);for(let t=0,r=this.length;t<r;t++)ee(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(be)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){K(),U();const n=be(this)[t].apply(this,e);return q(),F(),n}}),e}function oe(e){f(e)||(e=String(e));const t=be(this);return ee(t,0,e),t.hasOwnProperty(e)}var ce=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?me:de:r?he:pe).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const i=c(e);if(!s){if(i&&o(re,t))return Reflect.get(re,t,n);if("hasOwnProperty"===t)return oe}const l=Reflect.get(e,t,n);return(f(t)?se.has(t):ne(t))?l:(s||ee(e,0,t),r?l:$e(l)?i&&m(t)?l:l.value:p(l)?s?function(e){return _e(e,!0,fe,null,de)}(l):ge(l):l)}},le=class extends ce{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ye(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||ye(n)||(r=be(r),n=be(n)),!c(e)&&$e(r)&&!$e(n))return!t&&(r.value=n,!0)}const i=c(e)&&m(t)?Number(t)<e.length:o(e,t),l=Reflect.set(e,t,n,s);return e===be(s)&&(i?x(n,r)&&te(e,"set",t,n):te(e,"add",t,n)),l}deleteProperty(e,t){const n=o(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&te(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return f(t)&&se.has(t)||ee(e,0,t),n}ownKeys(e){return ee(e,0,c(e)?"length":X),Reflect.ownKeys(e)}},ae=class extends ce{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ue=new le,fe=new ae,pe=new WeakMap,he=new WeakMap,de=new WeakMap,me=new WeakMap;function ve(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>d(e).slice(8,-1))(e))}function ge(e){return ye(e)?e:_e(e,!1,ue,null,pe)}function _e(e,t,n,s,r){if(!p(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=ve(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function ye(e){return!(!e||!e.__v_isReadonly)}function be(e){const t=e&&e.__v_raw;return t?be(t):e}var we=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R(()=>e(this._value),()=>xe(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=be(this);var t,n;return e._cacheable&&!e.effect.dirty||!x(e._value,e._value=e.effect.run())||xe(e,4),t=e,z&&A&&(t=be(t),J(A,null!=(n=t.dep)?n:t.dep=G(()=>t.dep=void 0,t instanceof we?t:void 0))),e.effect._dirtyLevel>=2&&xe(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}};function xe(e,t=4,n,s){const r=(e=be(e)).dep;r&&H(r,t)}function $e(e){return!(!e||!0!==e.__v_isRef)}var ke=new Map,Oe=new Map,Se=new Map,Ee=new Map,Le=new Set,je=[],Ae=!1,Te=()=>Ae||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Ne={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},Pe=(e,...t)=>{Ne[e].forEach(e=>e(...t))},Re=()=>{},Ie=(e,t,n,s)=>Te()?Re:(ke.set(e,t),n&&Oe.set(e,n),s&&Se.set(e,s),Pe("scope:mount",e,t),()=>{ke.delete(e)&&(Oe.delete(e),Se.delete(e),Pe("scope:unmount",e))}),Ce={scopes:ke,exps:Oe,names:Se,stores:Ee,components:Le,plugins:je,getScopeByName(e){for(const[t,n]of Se)if(n===e)return ke.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=ke.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Ne[e].add(t),()=>Ne[e].delete(t)),off(e,t){Ne[e].delete(t)}};"undefined"==typeof window||Te()||(window.__LITE_VUE__=Ce);var Me,Ve=[],We=(e,t)=>{for(const s of[...Ve])try{s(e,t)}catch(n){}Ve.length||console.error(e)},ze=new WeakSet,Be=e=>{ze.add(e),e.effect&&function(e){e.effect.stop()}(e)},De=!1,Ke=[],Fe=Promise.resolve(),Ue=-1,qe=e=>Fe.then(e),Je=e=>{Ke.includes(e,Ue+1)||Ke.push(e),De||(De=!0,qe(Ze))},Ze=()=>{const e=new Map;for(Ue=0;Ue<Ke.length;Ue++){const n=Ke[Ue];if(ze.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)We(Error("update loop"),{phase:"effect"});else try{n()}catch(t){We(t,{phase:"effect"})}}Ke.length=0,Ue=-1,De=!1,Ne.flush.size&&!Te()&&Pe("flush")},He=0,Ge=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++He}`)},Qe=e=>(t,n,s)=>{const r="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,o=!1;const c=e.effect(()=>{const e=r(),t=i;if(i=e,o?e!==t:s?.immediate){K();try{n(e,t)}finally{F()}}o=!0});return()=>Be(c)},Xe=/^(spellcheck|draggable|form|list|type)$/,Ye=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=_(s)),et(e,s,n,i);else{for(const t in n)et(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||et(e,t,null)}i="[object Object]"===d(n)?{...n}:n,s||(e.__bound=i)})},et=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",j(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=tt(n),i=tt(s);for(const e in r)st(t,e,r[e]);for(const e in i)null==r[e]&&st(t,e,"");t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Xe.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:null!=n?e.setAttribute(t,n):e.removeAttribute(t):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},tt=e=>u(e=k(e))?L(e):e||{},nt=/\s*!important$/,st=(e,t,n)=>{c(n)?n.forEach(n=>st(e,t,n)):t.startsWith("--")?e.setProperty(t,n):nt.test(n)?e.setProperty(b(t),n.replace(nt,""),"important"):e[t]=n},rt=Object.create(null),it=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ot=["ctrl","shift","alt","meta"],ct={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)=>ot.some(n=>e[`${n}Key`]&&!t[n])},lt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},at=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,ut=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const i=/\bawait\b/.test(n)?"async ":"";let o,c=it.test(n)?t(`(e => ${n}(e))`):(e=>{const t=rt[e];if(void 0!==t)return t;try{return new Function(`return (${e})`),rt[e]=!0}catch{return rt[e]=!1}})(n)?t(`(${i}$event => (${n}))`):t(`(${i}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return qe(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(o),o=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!at.test(e)||e in lt);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=b(s.key);if(!n.some(t=>t===e||lt[t]===e))return}for(const e in r){const t=ct[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,r),()=>{clearTimeout(o),l.removeEventListener(a,c,r)}},ft=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=pt(t())})},pt=e=>null==e?"":p(e)?JSON.stringify(e,null,2):String(e),ht=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},dt=e=>"_value"in e?e._value:e.value,mt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},vt=e=>{e.target.composing=!0},gt=e=>{const t=e.target;t.composing&&(t.composing=!1,_t(t,"input"))},_t=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},yt=Object.create(null),bt=0,wt=e=>e.replace(/^return\(([^]*)\)$/,"$1"),xt=(e,t,n,s)=>$t(e,`return(${t})`,n,s),$t=(e,t,n,s)=>{let r=yt[t];r||(++bt>1e3&&(yt=Object.create(null),bt=1),r=yt[t]=kt(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(i){We(i,{phase:"expression",expression:s?.expression??wt(t),source:s?.source,el:s?.el??n,scope:e})}},kt=(e,t,n)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(s){return We(s,{phase:"compile",expression:n?.expression??wt(e),source:n?.source,el:n?.el??t}),()=>{}}},Ot=new WeakMap,St=e=>{const t=Me;return Me=e,t},Et=(e,t=Me)=>{if(!t)return;const n=Ot.get(t);n?n.push(e):Ot.set(t,[e])},Lt=e=>{const t=Ot.get(e);if(t){Ot.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Lt(n),n=e}},jt={bind:Ye,on:ut,show:({el:e,get:t,effect:n})=>{const s="none"==e.style.display?"":e.style.display;n(()=>{e.style.display=t()?s:"none"})},text:ft,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,o=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===i,lazy:u,fill:f}=r||{},p=[],h=(t,n)=>p.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));if("SELECT"===e.tagName){const t=e;h("change",()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>a?$(dt(e)):dt(e));o(t.multiple?e:e[0])}),s(()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],i=dt(r);if(s)r.selected=c(e)&&N(e,i)>-1;else if(T(dt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)})}else if("checkbox"===i)h("change",()=>{const t=n(),s=e.checked;if(c(t)){const n=dt(e),r=N(t,n),i=-1!==r;if(s&&!i)o(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),o(e)}}else o(mt(e,s))}),s(()=>{const t=n();c(t)?e.checked=N(t,dt(e))>-1:e.checked=T(t,mt(e,!0))});else if("radio"===i)h("change",()=>{o(dt(e))}),s(()=>{e.checked=T(n(),dt(e))});else{const t=e=>(l&&(e=e.trim()),a?$(e):e);let i,c=o;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;c=t=>{clearTimeout(i),i=setTimeout(o,e,t)},p.push(()=>clearTimeout(i))}}if(h("compositionstart",vt),h("compositionend",gt),h(u?"change":"input",()=>{e.composing||c(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),f){const s=n();null!=s&&""!==s||!e.value||o(t(e.value))}s(()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)})}return()=>p.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;return qe(()=>{if(!r)return;const i=St(e);try{s(()=>$t(t.scope,n,e,{source:"v-effect",el:e}))}finally{St(i)}}),()=>{r=!1}}},At=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Tt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Nt=/^\(|\)$/g,Pt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Rt=(e,t,n)=>{const s=t.match(At);if(!s)return;const r=e.nextSibling,i=new Text("");e.replaceWith(i);const o=()=>i.parentNode;St(i);const l=s[2].trim();let a,u,f,h,d=s[1].trim().replace(Nt,"").trim(),m=!1,v="key",g=e.getAttribute(v)||e.getAttribute(v=":key")||e.getAttribute(v="v-bind:key");g&&(e.removeAttribute(v),"key"===v&&(g=JSON.stringify(g))),(h=d.match(Tt))&&(d=d.replace(Tt,"").trim(),u=h[1].trim(),h[2]&&(f=h[2].trim())),(h=d.match(Pt))&&(a=h[1].split(",").map(e=>e.trim()),m="["===d[0]);let _,y,b,w=!1;const x=(t,s,r,i)=>{const o={};a?a.forEach((e,t)=>o[e]=s[m?t:e]):o[d]=s,i?(u&&(o[u]=i),f&&(o[f]=r)):u&&(o[u]=r);const c=g?xt(Object.setPrototypeOf(o,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:o,key:c}},$=(t,s)=>{const r=new nn(e,en(n,t.data));return r.key=t.key,r.insert(o(),s),r};return n.effect(()=>{const t=xt(n.scope,l,e,{source:"v-for",el:e}),s=b;if([y,b]=(e=>{const t=new Map,n=[];if(c(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(p(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let s=0;s<_.length;s++)b.has(_[s].key)||_[s].remove();const e=[];let t,n,r=y.length;for(;r--;){const c=y[r],l=s.get(c.key);let a;null==l?a=$(c,t?t.el:i):(a=_[l],Object.assign(a.ctx.scope,c.data),l!==r&&(_[l+1]===t&&n!==t||(n=a,a.insert(o(),t?t.el:i)))),e[r]=t=a}_=e}else _=y.map(e=>$(e,i)),w=!0}),r},It=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Ct=["visible","idle","interaction"],Mt=["[v-scope]",...Ct.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],Wt=(e,t,n,s)=>{const r=Ct.find(t=>e.hasAttribute(`v-scope.${t}`));if(!r)return!1;const i=`v-scope.${r}`,o=((e,t,n)=>{let s=!1;const r=()=>{s||(s=!0,i(),n())};let i=()=>{};if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&r()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(r):setTimeout(r);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,r);i=()=>{for(const t of Vt)e.removeEventListener(t,r)}}return()=>{s=!0,i()}})(e,r,()=>{e.hasAttribute(i)&&(e.setAttribute("v-scope",e.getAttribute(i)),e.removeAttribute(i),n(e,t,s))});return t.cleanups.push(o),Et(o),!0},zt=/^(?:v-|:|@)/,Bt=/\.([\w-]+)/g,Dt=!1,Kt=(e,t,n)=>{e.cleanups.push(t),Et(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ft=(e,t,n)=>{const s=Dt;Dt=n;try{Ut(e,t)}finally{Dt=s}},Ut=(e,t)=>{const n=St(e);try{return qt(e,t)}finally{St(n)}},qt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(n.hasAttribute("v-pre"))return;if(Wt(n,t,Ft,Dt))return;let s;if(ht(n,"v-cloak"),null!=(s=ht(n,"v-if")))return((e,t,n)=>{const s=new Comment("v-if");e.before(s);const r=[{exp:t.trim()||"0",el:e}];let i,o;for(;(i=e.nextElementSibling)&&(o=null,""===ht(i,"v-else")||(o=ht(i,"v-else-if")));)i.remove(),r.push({exp:o,el:i});const c=e.nextSibling;let l;e.remove(),St(s);let a=-1;const u=()=>{l&&(s.parentNode||l.el.before(s),l.remove(),l=void 0)};let f;const p=()=>Be(f);return f=n.effect(()=>{for(let e=0;e<r.length;e++){const{exp:t,el:i}=r[e];if(!t||xt(n.scope,t,i,{source:"v-if",el:i})){if(e!==a){u();const t=s.parentNode;l=new nn(i,n),l.insert(t,s),Et(p,l.el),l.el.parentNode===t&&s.remove(),a=e}return}}a=-1,u()}),Et(p,s),c})(n,s,t);if(s=ht(n,"v-for"))return Rt(n,s,t);const r=ht(n,"v-name");let i;if(s=ht(n,"v-teleport")){const e=Gt(s,n,"v-teleport");if(e){i=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Kt(t,()=>{Lt(n),n.remove()},s)}}if((s=ht(n,"v-scope"))||""===s){const e=(s?xt(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=en(t,e),n.__ctx=t,Kt(t,Ie(n,t.scope,s||void 0,r||void 0)),e.$template&&Qt(n,e.$template)}const o=Dt;null!=ht(n,"v-once")&&(Dt=!0),(s=ht(n,"ref"))&&Ht(n,It,`"${s}"`,t),Jt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])zt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Zt(n,e,l,t));for(const[e,l]of c)Zt(n,e,l,t);return Dt=o,i}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],i=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(i,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),i=s.index+s[0].length}i<n.length&&r.push(JSON.stringify(n.slice(i))),Ht(e,ft,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Jt(e,t)},Jt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ut(n,t)||n.nextSibling},Zt=(e,t,n,s)=>{let r,i,o;const c=t;if(":"===(t=t.replace(Bt,(e,t)=>((o||(o={}))[t]=!0,"")))[0])r=Ye,i=t.slice(1);else if("@"===t[0])r=ut,i=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=jt[n]||s.dirs[n],i=e>0?t.slice(e+1):void 0}r&&(r===Ye&&"ref"===i&&(r=It),Ht(e,r,n,s,i,o,c),e.removeAttribute(c))},Ht=(e,t,n,s,r,i,o,c)=>{const l={source:o,el:e,expression:c},a=t=>We(t,{phase:"handler",source:o,el:e,expression:n,scope:s.scope}),u=t=>{const r=xt(s.scope,t??n,e,l);return t&&"function"==typeof r?(...e)=>{try{const t=r(...e);return t instanceof Promise&&t.catch(a),t}catch(t){a(t)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i})}catch(p){return void We(p,{phase:"directive",source:o,el:e,expression:n})}f&&Kt(s,f)},Gt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){We(s,{phase:"directive",source:n,el:t,expression:e})}},Qt=(e,t)=>{if("#"===t[0]){const n=Gt(t,e,"v-scope");if(!n)return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Xt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:ge({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt)return Je(e),e;const n=W(e,{scheduler:()=>Je(n)});return t.effects.push(n),Et(()=>{Be(n),r(t.effects,n)}),n}};return t},Yt=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),en=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),Yt(s,"$refs",Object.create(n.$refs));const r=ge(new Proxy(s,{set:(e,t,s,i)=>i!==r||o(e,t)?Reflect.set(e,t,s,i):Reflect.set(n,t,s)})),i={...e,scope:r};return Yt(s,"$watch",Qe(i)),Yt(s,"$id",Ge()),tn(r),i},tn=e=>{for(const t of Object.keys(e)){const n=Object.getOwnPropertyDescriptor(e,t).value;"function"==typeof n&&(e[t]=n.bind(e))}},nn=class{template;ctx;key;parentCtx;isFragment;start;end;owned=!1;get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Xt(t),Ut(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Et(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),n!==this.end);)n=t}else e.removeChild(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Be),this.ctx.cleanups.splice(0).forEach(e=>e())}},sn=ge(Object.create(null)),rn=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),on=e=>{const t=Xt();if("function"==typeof e&&(e=e()),e&&(t.scope=ge(e),tn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(rn(n)+"([^]+?)"+rn(s),"g")}t.scope.$s=pt,t.scope.$nextTick=qe,t.scope.$refs=Object.create(null),t.scope.$store=sn,t.scope.$watch=Qe(t),t.scope.$id=Ge(),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const r=[],i=new Set,o=[],c=[],l={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Te()||Le.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Ve.push(n),()=>{const e=Ve.indexOf(n);e>-1&&Ve.splice(e,1)});var n;return c.push(t),()=>{const e=c.indexOf(t);e>-1&&c.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n=("function"==typeof e?e:e.install)(l,t);"function"==typeof n&&o.push(n)}return l},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Mt)?[e]:[...e.querySelectorAll(Mt)].filter(e=>!e.matches(`:where(${Mt}) *`)),n.length||(n=[e]),t.walk??=Ut,t.dispose??=Lt;for(const r of n){const e=r.getAttribute("v-name"),n=new nn(r,t,!0);r.__ctx??=n.ctx,Ce.scopes.has(r)||r.matches(Mt)||n.ctx.cleanups.push(Ie(r,n.ctx.scope,void 0,e||void 0)),s.push(n)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Be),r.splice(0).forEach(e=>e()),o.splice(0).forEach(e=>{try{e()}catch(t){We(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void c.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const l=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():l.push(t)}s=l}};return l},cn=document.currentScript;return cn&&cn.hasAttribute("init")&&on().mount(),e.computed=function(e,t,s=!1){let r,i;const o="function"==typeof e;return o?(r=e,i=n):(r=e.get,i=e.set),new we(r,i,o||!i,s)},e.createApp=on,e.devtools=Ce,e.disableDevtools=()=>{Ae=!0,ke.clear(),Oe.clear(),Se.clear(),Ee.clear(),Le.clear(),je.length=0;for(const e in Ne)Ne[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ce&&delete window.__LITE_VUE__},e.nextTick=qe,e.reactive=ge,e.store=(e,t)=>(void 0!==t&&(sn[e]=t,"function"==typeof sn[e].init&&sn[e].init(),((e,t)=>{Te()||(Ee.set(e,t),Pe("store:register",e,t))})(e,sn[e])),sn[e]),e.watchEffect=e=>{let t;return t=W(e,{scheduler:()=>Je(t)}),()=>Be(t)},e}({});
|
|
1
|
+
var LiteVue=function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,i=(e,t)=>o.call(e,t),c=Array.isArray,l=e=>"[object Date]"===d(e),a=e=>"string"==typeof e,u=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,p=Object.prototype.toString,d=e=>p.call(e),h=e=>a(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},m=/-(\w)/g,g=v(e=>e.replace(m,(e,t)=>t?t.toUpperCase():"")),_=/\B([A-Z])/g,y=v(e=>e.replace(_,"-$1").toLowerCase()),b=(e,t)=>!Object.is(e,t);function w(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=a(s)?S(s):w(s);if(r)for(const e in r)t[e]=r[e]}return t}if(a(e)||f(e))return e}var x,$=/;(?![^(]*\))/g,k=/:([^]+)/,O=/\/\*[^]*?\*\//g;function S(e){const t={};return e.replace(O,"").split($).forEach(e=>{if(e){const n=e.split(k);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function E(e){let t="";if(a(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=E(e[n]);s&&(t+=s+" ")}else if(f(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function L(e,t){if(e===t)return!0;let n=l(e),s=l(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=u(e),s=u(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=L(e[s],t[s]);return n}(e,t);if(n=f(e),s=f(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!L(e[n],t[n]))return!1}}return String(e)===String(t)}function j(e,t){return e.findIndex(e=>L(e,t))}function T(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,T(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,z();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(N(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),B()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=M,t=x;try{return M=!0,x=this,this._runnings++,P(this),this.fn()}finally{R(this),this._runnings--,x=t,M=e}}stop(){this.active&&(P(this),R(this),this.onStop&&this.onStop(),this.active=!1)}};function N(e){return e.value}function P(e){e._trackId++,e._depsLength=0}function R(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)I(e.deps[t],e);e.deps.length=e._depsLength}}function I(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function C(e,t){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&T(r,t.scope)),t&&t.lazy||r.run();const o=r.run.bind(r);return o.effect=r,o}var M=!0,V=0,W=[];function z(){W.push(M),M=!1}function B(){const e=W.pop();M=void 0===e||e}function D(){V++}function K(){for(V--;!V&&q.length;)q.shift()()}function F(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&I(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var q=[];function U(e,t,n){D();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&q.push(s.scheduler)))}K()}var H=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},J=new WeakMap,Z=Symbol("");function G(e,t,n){if(M&&x){let t=J.get(e);t||J.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=H(()=>t.delete(n))),F(x,s)}}function Q(e,t,n,s,r,o){const i=J.get(e);if(!i)return;let l=[];if("length"===n&&c(e)){const e=Number(s);i.forEach((t,n)=>{("length"===n||!u(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":c(e)?h(n)&&l.push(i.get("length")):l.push(i.get(Z));break;case"delete":c(e)||l.push(i.get(Z))}D();for(const c of l)c&&U(c,4);K()}var X=t("__proto__,__v_isRef,__isVue"),Y=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(u)),ee=te();function te(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=me(this);for(let t=0,r=this.length;t<r;t++)G(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(me)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){z(),D();const n=me(this)[t].apply(this,e);return K(),B(),n}}),e}function ne(e){u(e)||(e=String(e));const t=me(this);return G(t,0,e),t.hasOwnProperty(e)}var se=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?fe:ue:r?ae:le).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=c(e);if(!s){if(o&&i(ee,t))return Reflect.get(ee,t,n);if("hasOwnProperty"===t)return ne}const l=Reflect.get(e,t,n);return(u(t)?Y.has(t):X(t))?l:(s||G(e,0,t),r?l:ye(l)?o&&h(t)?l:l.value:f(l)?s?function(e){return he(e,!0,ce,null,ue)}(l):de(l):l)}},re=class extends se{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ve(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||ve(n)||(r=me(r),n=me(n)),!c(e)&&ye(r)&&!ye(n))return!t&&(r.value=n,!0)}const o=c(e)&&h(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===me(s)&&(o?b(n,r)&&Q(e,"set",t,n):Q(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&Q(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return u(t)&&Y.has(t)||G(e,0,t),n}ownKeys(e){return G(e,0,c(e)?"length":Z),Reflect.ownKeys(e)}},oe=class extends se{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ie=new re,ce=new oe,le=new WeakMap,ae=new WeakMap,ue=new WeakMap,fe=new WeakMap;function pe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>d(e).slice(8,-1))(e))}function de(e){return ve(e)?e:he(e,!1,ie,null,le)}function he(e,t,n,s,r){if(!f(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=pe(e);if(0===i)return e;const c=new Proxy(e,2===i?s:n);return r.set(e,c),c}function ve(e){return!(!e||!e.__v_isReadonly)}function me(e){const t=e&&e.__v_raw;return t?me(t):e}var ge=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>_e(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=me(this);var t,n;return e._cacheable&&!e.effect.dirty||!b(e._value,e._value=e.effect.run())||_e(e,4),t=e,M&&x&&(t=me(t),F(x,null!=(n=t.dep)?n:t.dep=H(()=>t.dep=void 0,t instanceof ge?t:void 0))),e.effect._dirtyLevel>=2&&_e(e,2),e._value}set value(e){this._setter(e)}};function _e(e,t=4,n,s){const r=(e=me(e)).dep;r&&U(r,t)}function ye(e){return!(!e||!0!==e.__v_isRef)}var be=new Map,we=new Map,xe=new Map,$e=new Map,ke=new Set,Oe=[],Se=!1,Ee=()=>Se||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Le={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},je=(e,...t)=>{Le[e].forEach(e=>e(...t))},Te=(e,t,s,r)=>Ee()?n:(be.set(e,t),s&&we.set(e,s),r&&xe.set(e,r),je("scope:mount",e,t),()=>{be.delete(e)&&(we.delete(e),xe.delete(e),je("scope:unmount",e))}),Ae={scopes:be,exps:we,names:xe,stores:$e,components:ke,plugins:Oe,getScopeByName(e){for(const[t,n]of xe)if(n===e)return be.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=be.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Le[e].add(t),()=>Le[e].delete(t)),off(e,t){Le[e].delete(t)}};"undefined"==typeof window||Ee()||(window.__LITE_VUE__=Ae);var Ne,Pe=[],Re=(e,t)=>{for(const s of[...Pe])try{s(e,t)}catch(n){}Pe.length||console.error(e)},Ie=new WeakSet,Ce=e=>{Ie.add(e),e.effect&&function(e){e.effect.stop()}(e)},Me=!1,Ve=0,We=new Set,ze=Promise.resolve(),Be=e=>ze.then(e),De=e=>(e.i=Ve++,e),Ke=e=>{e.i??De(e),We.add(e),Me||(Me=!0,Be(Fe))},Fe=()=>{const e=new Map;for(;We.size;)for(const n of[...We].sort((e,t)=>e.i-t.i)){if(We.delete(n),Ie.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Re(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Re(t,{phase:"effect"})}}Me=!1,Le.flush.size&&!Ee()&&je("flush")},qe=0,Ue=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++qe}`)},He=e=>(t,n,s)=>{const o="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,c=!1;const l=e.effect(()=>{const e=o(),t=i;if(i=e,c?b(e,t):s?.immediate){z();try{n(e,t)}finally{B()}}c=!0});return()=>{Ce(l),r(e.effects,l)}},Je=/^(spellcheck|draggable|translate|form|list|type)$/,Ze=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Ge=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let o;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=g(s)),Qe(e,s,n,o);else{for(const t in n)Qe(e,t,n[t],o&&o[t]);for(const t in o)n&&t in n||Qe(e,t,null,o[t])}o="[object Object]"===d(n)?{...n}:n,s||(e.__bound=o)})},Qe=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",E(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=Xe(n),o=Xe(s);for(const e in r)et(t,e,r[e]);for(const e in o)null==r[e]&&et(t,e,"");"_vod"in e&&(("display"in r||"display"in o)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Je.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Ze.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},Xe=e=>a(e=w(e))?S(e):e||{},Ye=/\s*!important$/,et=(e,t,n)=>{c(n)?n.forEach(n=>et(e,t,n)):t.startsWith("--")?e.setProperty(t,n):Ye.test(n)?e.setProperty(y(t),n.replace(Ye,""),"important"):e[t]=n},tt=Object.create(null),nt=0,st=e=>e.replace(/^return\(([^]*)\)$/,"$1"),rt=(e,t,n,s)=>ot(e,`return(${t})`,n,s),ot=(e,t,n,s)=>{let r=tt[t];r||(++nt>1e3&&(tt=Object.create(null),nt=1),r=tt[t]=it(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(o){Re(o,{phase:"expression",expression:s?.expression??st(t),source:s?.source,el:s?.el??n,scope:e})}},it=(e,t,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Re(r,{phase:"compile",expression:s?.expression??st(e),source:s?.source,el:s?.el??t}),n}},ct=Object.create(null),lt=0,at=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,ut=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ft=["ctrl","shift","alt","meta"],pt={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)=>ft.some(n=>e[`${n}Key`]&&!t[n])},dt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},ht=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,vt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const o=/\bawait\b/.test(n)?"async ":"";let i,c=ut.test(n)||at.test(n)?t(`(e => (${n})(e))`):(e=>{const t=ct[e];if(void 0!==t)return t;++lt>1e3&&(ct=Object.create(null),lt=1);try{return new Function(`return (${e})`),ct[e]=!0}catch{return ct[e]=!1}})(n)?t(`(${o}$event => (${n}))`):t(`(${o}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Be(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(i),i=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!ht.test(e)||e in dt);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=y(s.key);if(!n.some(t=>t===e||dt[t]===e))return}for(const e in r){const t=pt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(i),l.removeEventListener(a,c,r)}},mt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=gt(t())})},gt=e=>null==e?"":f(e)?JSON.stringify(e,null,2):String(e),_t=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},yt=e=>"_value"in e?e._value:e.value,bt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},wt=e=>{e.target.composing=!0},xt=e=>{const t=e.target;t.composing&&(t.composing=!1,$t(t,"input"))},$t=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},kt=new WeakMap,Ot=e=>{const t=Ne;return Ne=e,t},St=(e,t=Ne)=>{if(!t)return;const n=kt.get(t);n?n.push(e):kt.set(t,[e])},Et=e=>{const t=kt.get(e);if(t){kt.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Et(n),n=e}},Lt={bind:Ge,on:vt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:mt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const o=e.type,i=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===o,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(yt(e)));i(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],o=yt(r);if(s)r.selected=c(e)&&j(e,o)>-1;else if(L(yt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===o)h("change",v=()=>{const t=n(),s=e.checked;if(c(t)){const n=yt(e),r=j(t,n),o=-1!==r;if(s&&!o)i(t.concat(n));else if(!s&&o){const e=[...t];e.splice(r,1),i(e)}}else i(bt(e,s))}),m=()=>{const t=n();c(t)?e.checked=j(t,yt(e))>-1:e.checked=L(t,bt(e,!0))};else if("radio"===o)h("change",v=()=>i(yt(e))),m=()=>{e.checked=L(n(),yt(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>i(t(e.value));let s,o=i;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;o=t=>{clearTimeout(s),s=setTimeout(i,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",wt),h("compositionend",xt),h(u?"change":"input",()=>{e.composing||o(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===o&&!e.checked||v()}const _=s(m);if(!g){const t=new MutationObserver(()=>_());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const o=Dt;return Be(()=>{if(!r)return;const i=Ot(e);try{Ft(o,()=>s(()=>ot(t.scope,n,e,{source:"v-effect",el:e})))}finally{Ot(i)}}),()=>{r=!1}}},jt=(e,t,n)=>{const s=new Comment("v-if");e.before(s);const o=[{exp:t.trim()||"0",el:e}];let i,c;for(;(i=e.nextElementSibling)&&(c=null,""===_t(i,"v-else")||null!=(c=_t(i,"v-else-if")));)i.remove(),o.push({exp:null==c?c:c.trim()||"0",el:i});const l=e.nextSibling;let a;e.remove(),Ot(s);let u=-1;const f=()=>{var e,t;a&&(s.parentNode||a.el.before(s),e=d,t=a.el,r(kt.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Ce(p);return p=n.effect(()=>{for(let e=0;e<o.length;e++){const{exp:t,el:r}=o[e];if(!t||rt(n.scope,t,r,{source:"v-if",el:r})){if(e!==u){f();const t=s.parentNode;a=new sn(r,n),a.insert(t,s),St(d,a.el),a.el.parentNode===t&&s.remove(),u=e}return}}u=-1,f()}),St(d,s),l},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,At=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Nt=/^\(|\)$/g,Pt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Rt=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,o=new Text("");e.replaceWith(o);const i=()=>o.parentNode;Ot(o);const l=s[2].trim();let a,u,p,d,h=s[1].trim().replace(Nt,"").trim(),v=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(d=h.match(At))&&(h=h.replace(At,"").trim(),u=d[1].trim(),d[2]&&(p=d[2].trim())),(d=h.match(Pt))&&(a=d[1].split(",").map(e=>e.trim()),v="["===h[0]);let _,y,b,w=!1;const x=(t,s,r,o)=>{const i={};a?a.forEach((e,t)=>i[e]=s?.[v?t:e]):i[h]=s,o?(u&&(i[u]=o),p&&(i[p]=r)):u&&(i[u]=r);const c=g?rt(Object.setPrototypeOf(i,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:i,key:c}},$=(t,s)=>{const r=new sn(e,tn(n,t.data));return r.key=t.key,r.insert(i(),s),r};return n.effect(()=>{const t=rt(n.scope,l,e,{source:"v-for",el:e}),s=b;if([y,b]=(e=>{const t=new Map,n=[];if(c(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(f(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let r=0;r<_.length;r++){const e=_[r].key;b.has(e)&&s.get(e)===r||_[r].remove()}const e=[];let t,n=y.length;for(;n--;){const r=y[n],c=s.get(r.key);s.delete(r.key);const l=t?t.el:o;let a;null==c?a=$(r,l):(a=_[c],Object.assign(a.ctx.scope,r.data),c!==n&&(a.end||a.el).nextSibling!==l&&a.insert(i(),l)),e[n]=t=a}_=e}else _=y.map(e=>$(e,o)),w=!0}),r},It=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Ct=["visible","idle","interaction"],Mt=["[v-scope]",...Ct.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],Wt=(e,t,s,o)=>{const i=Ct.find(t=>e.hasAttribute(`v-scope.${t}`));if(!i)return!1;const c=`v-scope.${i}`,l=((e,t,s)=>{let r=!1;const o=()=>{r||(r=!0,i(),s())};let i=n;if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(o):setTimeout(o);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,o);i=()=>{for(const t of Vt)e.removeEventListener(t,o)}}return()=>{r=!0,i()}})(e,i,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),s(e,t,o))});return t.cleanups.push(l),St(()=>{r(t.cleanups,l),l()}),!0},zt=/^(?:v-|:|@)/,Bt=/\.([\w-]+)/g,Dt=!1,Kt=(e,t,n)=>{e.cleanups.push(t),St(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ft=(e,t)=>{const n=Dt;Dt=e;try{t()}finally{Dt=n}},qt=(e,t,n)=>Ft(n,()=>Ut(e,t)),Ut=(e,t)=>{const n=Ot(e);try{return Ht(e,t)}finally{Ot(n)}},Ht=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Jt(n,t);if(n.hasAttribute("v-pre"))return;if(Wt(n,t,qt,Dt))return;let s;if(_t(n,"v-cloak"),null!=(s=_t(n,"v-if")))return jt(n,s,t);if(s=_t(n,"v-for"))return Rt(n,s,t);const r=_t(n,"v-name");let o;if(s=_t(n,"v-teleport")){const e=Qt(s,n,"v-teleport");if(e){o=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Kt(t,()=>{Et(n),n.remove()},s)}}if((s=_t(n,"v-scope"))||""===s){const e=(s?rt(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=tn(t,e),n.__ctx=t;const o=Te(n,t.scope,s||void 0,r||void 0);Kt(t,()=>{o(),delete n.__ctx}),e.$template&&Xt(n,e.$template)}const i=Dt;null!=_t(n,"v-once")&&(Dt=!0),(s=_t(n,"ref"))&&Gt(n,It,`"${s}"`,t),Jt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])zt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Zt(n,e,l,t));for(const[e,l]of c)Zt(n,e,l,t);return Dt=i,o}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],o=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(o,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),o=s.index+s[0].length}o<n.length&&r.push(JSON.stringify(n.slice(o))),Gt(e,mt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Jt(e,t)},Jt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ut(n,t)||n.nextSibling},Zt=(e,t,n,s)=>{let r,o,i;const c=t;if(":"===(t=t.replace(Bt,(e,t)=>((i||(i={}))[t]=!0,"")))[0])r=Ge,o=t.slice(1);else if("@"===t[0])r=vt,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=Lt[n]||s.dirs[n],o=e>0?t.slice(e+1):void 0}r&&(r===Ge&&"ref"===o&&(r=It),Gt(e,r,n,s,o,i,c),e.removeAttribute(c))},Gt=(e,t,n,s,r,o,i,c)=>{const l={source:i,el:e,expression:c},a=t=>Re(t,{phase:"handler",source:i,el:e,expression:n,scope:s.scope}),u=t=>{const r=rt(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=Ot(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{Ot(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:o})}catch(p){return void Re(p,{phase:"directive",source:i,el:e,expression:n})}f&&Kt(s,f)},Qt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Re(s,{phase:"directive",source:n,el:t,expression:e})}},Xt=(e,t)=>{if("#"===t[0]){const n=Qt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Yt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:de({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt){const t=()=>Ft(!0,e);return Ke(t),t}const n=De(C(e,{scheduler:()=>Ke(n),lazy:!0}));return t.effects.push(n),St(()=>{Ce(n),r(t.effects,n)}),n(),n}};return t},en=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),tn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),en(s,"$refs",Object.create(n.$refs));const r=de(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return en(s,"$watch",He(o)),en(s,"$id",Ue()),nn(r,s),o},nn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},sn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Yt(t),Ut(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,St(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Et(n),n!==this.end);)n=t}else e.removeChild(this.template),Et(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Ce),this.ctx.cleanups.splice(0).forEach(e=>e())}},rn=de(Object.create(null)),on=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),cn=e=>{const t=Yt();if("function"==typeof e&&(e=e()),e&&(t.scope=de(e),nn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(on(n)+"([^]+?)"+on(s),"g")}en(t.scope,"$s",gt),en(t.scope,"$nextTick",Be),en(t.scope,"$refs",Object.create(null)),en(t.scope,"$store",rn),en(t.scope,"$watch",He(t)),en(t.scope,"$id",Ue()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const o=[],i=new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ee()||ke.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Pe.push(n),()=>{const e=Pe.indexOf(n);e>-1&&Pe.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n=("function"==typeof e?e:e.install)(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Mt)?[e]:[...e.querySelectorAll(Mt)].filter(e=>!e.matches(`:where(${Mt}) *`)),n.length||(n=[e]),t.walk??=Ut,t.dispose??=Et;for(const o of n){const e=o.getAttribute("v-name"),n=new sn(o,t,!0);o.__ctx??=n.ctx,Ae.scopes.has(o)||o.matches(Mt)||n.ctx.cleanups.push(Te(o,n.ctx.scope,void 0,e||void 0)),s.push(n),St(()=>r(s,n),o),n.ctx.cleanups.push(()=>delete o.__ctx)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Ce),o.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Re(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const r=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():r.push(t)}s=r}};return a},ln=document.currentScript;return ln&&ln.hasAttribute("init")&&cn().mount(),e.computed=function(e,t,s=!1){let r,o;const i="function"==typeof e;return i?(r=e,o=n):(r=e.get,o=e.set),new ge(r,o,i||!o,s)},e.createApp=cn,e.devtools=Ae,e.disableDevtools=()=>{Se=!0,be.clear(),we.clear(),xe.clear(),$e.clear(),ke.clear(),Oe.length=0;for(const e in Le)Le[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ae&&delete window.__LITE_VUE__},e.nextTick=Be,e.reactive=de,e.store=(e,t)=>(void 0!==t&&(rn[e]=t,"function"==typeof rn[e].init&&rn[e].init(),((e,t)=>{Ee()||($e.set(e,t),je("store:register",e,t))})(e,rn[e])),rn[e]),e.watchEffect=e=>{const t=C(e,{scheduler:()=>Ke(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Ce(t),n}return()=>Ce(t)},e}({});
|
package/dist/litevue.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}var t=()=>{},n=Object.assign,s=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),o=Array.isArray,c=e=>"[object Map]"===h(e),l=e=>"[object Date]"===h(e),a=e=>"string"==typeof e,u=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,p=Object.prototype.toString,h=e=>p.call(e),d=e=>a(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,m=e=>{const t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},v=/-(\w)/g,g=m(e=>e.replace(v,(e,t)=>t?t.toUpperCase():"")),_=/\B([A-Z])/g,y=m(e=>e.replace(_,"-$1").toLowerCase()),b=m(e=>e.charAt(0).toUpperCase()+e.slice(1)),w=(m(e=>e?`on${b(e)}`:""),(e,t)=>!Object.is(e,t)),x=e=>{const t=a(e)?Number(e):NaN;return isNaN(t)?e:t};function $(e){if(o(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=a(s)?E(s):$(s);if(r)for(const e in r)t[e]=r[e]}return t}if(a(e)||f(e))return e}var k=/;(?![^(]*\))/g,O=/:([^]+)/,S=/\/\*[^]*?\*\//g;function E(e){const t={};return e.replace(S,"").split(k).forEach(e=>{if(e){const n=e.split(O);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function L(e){let t="";if(a(e))t=e;else if(o(e))for(let n=0;n<e.length;n++){const s=L(e[n]);s&&(t+=s+" ")}else if(f(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}var j;function A(e,t){if(e===t)return!0;let n=l(e),s=l(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=u(e),s=u(t),n||s)return e===t;if(n=o(e),s=o(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=A(e[s],t[s]);return n}(e,t);if(n=f(e),s=f(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!A(e[n],t[n]))return!1}}return String(e)===String(t)}function N(e,t){return e.findIndex(e=>A(e,t))}function T(e,t=void 0){t&&t.active&&t.effects.push(e)}var P=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,T(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,K();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(R(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),D()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=V,t=j;try{return V=!0,j=this,this._runnings++,I(this),this.fn()}finally{C(this),this._runnings--,j=t,V=e}}stop(){this.active&&(I(this),C(this),this.onStop&&this.onStop(),this.active=!1)}};function R(e){return e.value}function I(e){e._trackId++,e._depsLength=0}function C(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)M(e.deps[t],e);e.deps.length=e._depsLength}}function M(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function W(e,s){e.effect instanceof P&&(e=e.effect.fn);const r=new P(e,t,()=>{r.dirty&&r.run()});s&&(n(r,s),s.scope&&T(r,s.scope)),s&&s.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}var V=!0,z=0,B=[];function K(){B.push(V),V=!1}function D(){const e=B.pop();V=void 0===e||e}function F(){z++}function U(){for(z--;!z&&J.length;)J.shift()()}function q(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&M(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var J=[];function Z(e,t,n){F();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&J.push(s.scheduler)))}U()}var H=(e,t)=>{const n=/* @__PURE__ */new Map;return n.cleanup=e,n.computed=t,n},G=/* @__PURE__ */new WeakMap,Q=Symbol(""),X=Symbol("");function Y(e,t,n){if(V&&j){let t=G.get(e);t||G.set(e,t=/* @__PURE__ */new Map);let s=t.get(n);s||t.set(n,s=H(()=>t.delete(n))),q(j,s)}}function ee(e,t,n,s,r,i){const l=G.get(e);if(!l)return;let a=[];if("clear"===t)a=[...l.values()];else if("length"===n&&o(e)){const e=Number(s);l.forEach((t,n)=>{("length"===n||!u(n)&&n>=e)&&a.push(t)})}else switch(void 0!==n&&a.push(l.get(n)),t){case"add":o(e)?d(n)&&a.push(l.get("length")):(a.push(l.get(Q)),c(e)&&a.push(l.get(X)));break;case"delete":o(e)||(a.push(l.get(Q)),c(e)&&a.push(l.get(X)));break;case"set":c(e)&&a.push(l.get(Q))}F();for(const o of a)o&&Z(o,4);U()}var te=/* @__PURE__ */e("__proto__,__v_isRef,__isVue"),ne=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(u)),se=/* @__PURE__ */re();function re(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=ye(this);for(let t=0,r=this.length;t<r;t++)Y(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(ye)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){K(),F();const n=ye(this)[t].apply(this,e);return U(),D(),n}}),e}function ie(e){u(e)||(e=String(e));const t=ye(this);return Y(t,0,e),t.hasOwnProperty(e)}var oe=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?de:he:r?pe:fe).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(se,t))return Reflect.get(se,t,n);if("hasOwnProperty"===t)return ie}const l=Reflect.get(e,t,n);return(u(t)?ne.has(t):te(t))?l:(s||Y(e,0,t),r?l:$e(l)?c&&d(t)?l:l.value:f(l)?s?function(e){return ge(e,!0,ue,null,he)}(l):ve(l):l)}},ce=class extends oe{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=_e(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||_e(n)||(r=ye(r),n=ye(n)),!o(e)&&$e(r)&&!$e(n))return!t&&(r.value=n,!0)}const c=o(e)&&d(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===ye(s)&&(c?w(n,r)&&ee(e,"set",t,n):ee(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&ee(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return u(t)&&ne.has(t)||Y(e,0,t),n}ownKeys(e){return Y(e,0,o(e)?"length":Q),Reflect.ownKeys(e)}},le=class extends oe{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ae=/* @__PURE__ */new ce,ue=/* @__PURE__ */new le,fe=/* @__PURE__ */new WeakMap,pe=/* @__PURE__ */new WeakMap,he=/* @__PURE__ */new WeakMap,de=/* @__PURE__ */new WeakMap;function me(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>h(e).slice(8,-1))(e))}function ve(e){return _e(e)?e:ge(e,!1,ae,null,fe)}function ge(e,t,n,s,r){if(!f(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=me(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function _e(e){return!(!e||!e.__v_isReadonly)}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}var be=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new P(()=>e(this._value),()=>xe(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=ye(this);var t,n;return e._cacheable&&!e.effect.dirty||!w(e._value,e._value=e.effect.run())||xe(e,4),t=e,V&&j&&(t=ye(t),q(j,null!=(n=t.dep)?n:t.dep=H(()=>t.dep=void 0,t instanceof be?t:void 0))),e.effect._dirtyLevel>=2&&xe(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}};function we(e,n,s=!1){let r,i;const o="function"==typeof e;return o?(r=e,i=t):(r=e.get,i=e.set),new be(r,i,o||!i,s)}function xe(e,t=4,n,s){const r=(e=ye(e)).dep;r&&Z(r,t)}function $e(e){return!(!e||!0!==e.__v_isRef)}var ke=/* @__PURE__ */new Map,Oe=/* @__PURE__ */new Map,Se=/* @__PURE__ */new Map,Ee=/* @__PURE__ */new Map,Le=/* @__PURE__ */new Set,je=[],Ae=!1,Ne=()=>Ae||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Te={"scope:mount":/* @__PURE__ */new Set,"scope:unmount":/* @__PURE__ */new Set,"store:register":/* @__PURE__ */new Set,"plugin:install":/* @__PURE__ */new Set,flush:/* @__PURE__ */new Set},Pe=(e,...t)=>{Te[e].forEach(e=>e(...t))},Re=()=>{},Ie=(e,t,n,s)=>Ne()?Re:(ke.set(e,t),n&&Oe.set(e,n),s&&Se.set(e,s),Pe("scope:mount",e,t),()=>{ke.delete(e)&&(Oe.delete(e),Se.delete(e),Pe("scope:unmount",e))}),Ce={scopes:ke,exps:Oe,names:Se,stores:Ee,components:Le,plugins:je,getScopeByName(e){for(const[t,n]of Se)if(n===e)return ke.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=ke.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Te[e].add(t),()=>Te[e].delete(t)),off(e,t){Te[e].delete(t)}},Me=()=>{Ae=!0,ke.clear(),Oe.clear(),Se.clear(),Ee.clear(),Le.clear(),je.length=0;for(const e in Te)Te[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ce&&delete window.__LITE_VUE__};"undefined"==typeof window||Ne()||(window.__LITE_VUE__=Ce);var We,Ve=[],ze=(e,t)=>{for(const s of[...Ve])try{s(e,t)}catch(n){}Ve.length||console.error(e)},Be=/* @__PURE__ */new WeakSet,Ke=e=>{Be.add(e),e.effect&&function(e){e.effect.stop()}(e)},De=!1,Fe=[],Ue=Promise.resolve(),qe=-1,Je=e=>Ue.then(e),Ze=e=>{Fe.includes(e,qe+1)||Fe.push(e),De||(De=!0,Je(He))},He=()=>{const e=/* @__PURE__ */new Map;for(qe=0;qe<Fe.length;qe++){const n=Fe[qe];if(Be.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)ze(Error("update loop"),{phase:"effect"});else try{n()}catch(t){ze(t,{phase:"effect"})}}Fe.length=0,qe=-1,De=!1,Te.flush.size&&!Ne()&&Pe("flush")},Ge=0,Qe=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++Ge}`)},Xe=e=>(t,n,s)=>{const r="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,o=!1;const c=e.effect(()=>{const e=r(),t=i;if(i=e,o?e!==t:s?.immediate){K();try{n(e,t)}finally{D()}}o=!0});return()=>Ke(c)},Ye=/^(spellcheck|draggable|form|list|type)$/,et=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=g(s)),tt(e,s,n,i);else{for(const t in n)tt(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||tt(e,t,null)}i="[object Object]"===h(n)?{...n}:n,s||(e.__bound=i)})},tt=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",L(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=nt(n),i=nt(s);for(const e in r)rt(t,e,r[e]);for(const e in i)null==r[e]&&rt(t,e,"");t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Ye.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:null!=n?e.setAttribute(t,n):e.removeAttribute(t):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},nt=e=>a(e=$(e))?E(e):e||{},st=/\s*!important$/,rt=(e,t,n)=>{o(n)?n.forEach(n=>rt(e,t,n)):t.startsWith("--")?e.setProperty(t,n):st.test(n)?e.setProperty(y(t),n.replace(st,""),"important"):e[t]=n},it=Object.create(null),ot=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ct=["ctrl","shift","alt","meta"],lt={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)=>ct.some(n=>e[`${n}Key`]&&!t[n])},at={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},ut=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,ft=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const i=/\bawait\b/.test(n)?"async ":"";let o,c=ot.test(n)?t(`(e => ${n}(e))`):(e=>{const t=it[e];if(void 0!==t)return t;try{return new Function(`return (${e})`),it[e]=!0}catch{return it[e]=!1}})(n)?t(`(${i}$event => (${n}))`):t(`(${i}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Je(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(o),o=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!ut.test(e)||e in at);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=y(s.key);if(!n.some(t=>t===e||at[t]===e))return}for(const e in r){const t=lt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,r),()=>{clearTimeout(o),l.removeEventListener(a,c,r)}},pt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=ht(t())})},ht=e=>null==e?"":f(e)?JSON.stringify(e,null,2):String(e),dt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},mt=e=>"_value"in e?e._value:e.value,vt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},gt=e=>{e.target.composing=!0},_t=e=>{const t=e.target;t.composing&&(t.composing=!1,yt(t,"input"))},yt=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},bt=Object.create(null),wt=0,xt=e=>e.replace(/^return\(([^]*)\)$/,"$1"),$t=(e,t,n,s)=>kt(e,`return(${t})`,n,s),kt=(e,t,n,s)=>{let r=bt[t];r||(++wt>1e3&&(bt=Object.create(null),wt=1),r=bt[t]=Ot(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(i){ze(i,{phase:"expression",expression:s?.expression??xt(t),source:s?.source,el:s?.el??n,scope:e})}},Ot=(e,t,n)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(s){return ze(s,{phase:"compile",expression:n?.expression??xt(e),source:n?.source,el:n?.el??t}),()=>{}}},St=/* @__PURE__ */new WeakMap,Et=e=>{const t=We;return We=e,t},Lt=(e,t=We)=>{if(!t)return;const n=St.get(t);n?n.push(e):St.set(t,[e])},jt=e=>{const t=St.get(e);if(t){St.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;jt(n),n=e}},At={bind:et,on:ft,show:({el:e,get:t,effect:n})=>{const s="none"==e.style.display?"":e.style.display;n(()=>{e.style.display=t()?s:"none"})},text:pt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,c=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===i,lazy:u,fill:f}=r||{},p=[],h=(t,n)=>p.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));if("SELECT"===e.tagName){const t=e;h("change",()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>a?x(mt(e)):mt(e));c(t.multiple?e:e[0])}),s(()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],i=mt(r);if(s)r.selected=o(e)&&N(e,i)>-1;else if(A(mt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)})}else if("checkbox"===i)h("change",()=>{const t=n(),s=e.checked;if(o(t)){const n=mt(e),r=N(t,n),i=-1!==r;if(s&&!i)c(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),c(e)}}else c(vt(e,s))}),s(()=>{const t=n();o(t)?e.checked=N(t,mt(e))>-1:e.checked=A(t,vt(e,!0))});else if("radio"===i)h("change",()=>{c(mt(e))}),s(()=>{e.checked=A(n(),mt(e))});else{const t=e=>(l&&(e=e.trim()),a?x(e):e);let i,o=c;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;o=t=>{clearTimeout(i),i=setTimeout(c,e,t)},p.push(()=>clearTimeout(i))}}if(h("compositionstart",gt),h("compositionend",_t),h(u?"change":"input",()=>{e.composing||o(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),f){const s=n();null!=s&&""!==s||!e.value||c(t(e.value))}s(()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)})}return()=>p.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;return Je(()=>{if(!r)return;const i=Et(e);try{s(()=>kt(t.scope,n,e,{source:"v-effect",el:e}))}finally{Et(i)}}),()=>{r=!1}}},Nt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Tt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Pt=/^\(|\)$/g,Rt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,It=(e,t,n)=>{const s=t.match(Nt);if(!s)return;const r=e.nextSibling,i=new Text("");e.replaceWith(i);const c=()=>i.parentNode;Et(i);const l=s[2].trim();let a,u,p,h,d=s[1].trim().replace(Pt,"").trim(),m=!1,v="key",g=e.getAttribute(v)||e.getAttribute(v=":key")||e.getAttribute(v="v-bind:key");g&&(e.removeAttribute(v),"key"===v&&(g=JSON.stringify(g))),(h=d.match(Tt))&&(d=d.replace(Tt,"").trim(),u=h[1].trim(),h[2]&&(p=h[2].trim())),(h=d.match(Rt))&&(a=h[1].split(",").map(e=>e.trim()),m="["===d[0]);let _,y,b,w=!1;const x=(t,s,r,i)=>{const o={};a?a.forEach((e,t)=>o[e]=s[m?t:e]):o[d]=s,i?(u&&(o[u]=i),p&&(o[p]=r)):u&&(o[u]=r);const c=g?$t(Object.setPrototypeOf(o,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:o,key:c}},$=(t,s)=>{const r=new sn(e,tn(n,t.data));return r.key=t.key,r.insert(c(),s),r};return n.effect(()=>{const t=$t(n.scope,l,e,{source:"v-for",el:e}),s=b;if([y,b]=(e=>{const t=/* @__PURE__ */new Map,n=[];if(o(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(f(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let s=0;s<_.length;s++)b.has(_[s].key)||_[s].remove();const e=[];let t,n,r=y.length;for(;r--;){const o=y[r],l=s.get(o.key);let a;null==l?a=$(o,t?t.el:i):(a=_[l],Object.assign(a.ctx.scope,o.data),l!==r&&(_[l+1]===t&&n!==t||(n=a,a.insert(c(),t?t.el:i)))),e[r]=t=a}_=e}else _=y.map(e=>$(e,i)),w=!0}),r},Ct=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Mt=["visible","idle","interaction"],Wt=["[v-scope]",...Mt.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],zt=(e,t,n,s)=>{const r=Mt.find(t=>e.hasAttribute(`v-scope.${t}`));if(!r)return!1;const i=`v-scope.${r}`,o=((e,t,n)=>{let s=!1;const r=()=>{s||(s=!0,i(),n())};let i=()=>{};if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&r()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(r):setTimeout(r);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,r);i=()=>{for(const t of Vt)e.removeEventListener(t,r)}}return()=>{s=!0,i()}})(e,r,()=>{e.hasAttribute(i)&&(e.setAttribute("v-scope",e.getAttribute(i)),e.removeAttribute(i),n(e,t,s))});return t.cleanups.push(o),Lt(o),!0},Bt=/^(?:v-|:|@)/,Kt=/\.([\w-]+)/g,Dt=!1,Ft=(e,t,n)=>{e.cleanups.push(t),Lt(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ut=(e,t,n)=>{const s=Dt;Dt=n;try{qt(e,t)}finally{Dt=s}},qt=(e,t)=>{const n=Et(e);try{return Jt(e,t)}finally{Et(n)}},Jt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(n.hasAttribute("v-pre"))return;if(zt(n,t,Ut,Dt))return;let s;if(dt(n,"v-cloak"),null!=(s=dt(n,"v-if")))return((e,t,n)=>{const s=new Comment("v-if");e.before(s);const r=[{exp:t.trim()||"0",el:e}];let i,o;for(;(i=e.nextElementSibling)&&(o=null,""===dt(i,"v-else")||(o=dt(i,"v-else-if")));)i.remove(),r.push({exp:o,el:i});const c=e.nextSibling;let l;e.remove(),Et(s);let a=-1;const u=()=>{l&&(s.parentNode||l.el.before(s),l.remove(),l=void 0)};let f;const p=()=>Ke(f);return f=n.effect(()=>{for(let e=0;e<r.length;e++){const{exp:t,el:i}=r[e];if(!t||$t(n.scope,t,i,{source:"v-if",el:i})){if(e!==a){u();const t=s.parentNode;l=new sn(i,n),l.insert(t,s),Lt(p,l.el),l.el.parentNode===t&&s.remove(),a=e}return}}a=-1,u()}),Lt(p,s),c})(n,s,t);if(s=dt(n,"v-for"))return It(n,s,t);const r=dt(n,"v-name");let i;if(s=dt(n,"v-teleport")){const e=Qt(s,n,"v-teleport");if(e){i=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Ft(t,()=>{jt(n),n.remove()},s)}}if((s=dt(n,"v-scope"))||""===s){const e=(s?$t(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=tn(t,e),n.__ctx=t,Ft(t,Ie(n,t.scope,s||void 0,r||void 0)),e.$template&&Xt(n,e.$template)}const o=Dt;null!=dt(n,"v-once")&&(Dt=!0),(s=dt(n,"ref"))&&Gt(n,Ct,`"${s}"`,t),Zt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])Bt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Ht(n,e,l,t));for(const[e,l]of c)Ht(n,e,l,t);return Dt=o,i}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],i=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(i,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),i=s.index+s[0].length}i<n.length&&r.push(JSON.stringify(n.slice(i))),Gt(e,pt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Zt(e,t)},Zt=(e,t)=>{let n=e.firstChild;for(;n;)n=qt(n,t)||n.nextSibling},Ht=(e,t,n,s)=>{let r,i,o;const c=t;if(":"===(t=t.replace(Kt,(e,t)=>((o||(o={}))[t]=!0,"")))[0])r=et,i=t.slice(1);else if("@"===t[0])r=ft,i=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=At[n]||s.dirs[n],i=e>0?t.slice(e+1):void 0}r&&(r===et&&"ref"===i&&(r=Ct),Gt(e,r,n,s,i,o,c),e.removeAttribute(c))},Gt=(e,t,n,s,r,i,o,c)=>{const l={source:o,el:e,expression:c},a=t=>ze(t,{phase:"handler",source:o,el:e,expression:n,scope:s.scope}),u=t=>{const r=$t(s.scope,t??n,e,l);return t&&"function"==typeof r?(...e)=>{try{const t=r(...e);return t instanceof Promise&&t.catch(a),t}catch(t){a(t)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i})}catch(p){return void ze(p,{phase:"directive",source:o,el:e,expression:n})}f&&Ft(s,f)},Qt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){ze(s,{phase:"directive",source:n,el:t,expression:e})}},Xt=(e,t)=>{if("#"===t[0]){const n=Qt(t,e,"v-scope");if(!n)return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Yt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:ve({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt)return Ze(e),e;const n=W(e,{scheduler:()=>Ze(n)});return t.effects.push(n),Lt(()=>{Ke(n),s(t.effects,n)}),n}};return t},en=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),tn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),en(s,"$refs",Object.create(n.$refs));const r=ve(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return en(s,"$watch",Xe(o)),en(s,"$id",Qe()),nn(r),o},nn=e=>{for(const t of Object.keys(e)){const n=Object.getOwnPropertyDescriptor(e,t).value;"function"==typeof n&&(e[t]=n.bind(e))}},sn=class{template;ctx;key;parentCtx;isFragment;start;end;owned=!1;get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Yt(t),qt(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Lt(()=>this.discard(),this.el))}remove(){this.parentCtx&&s(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),n!==this.end);)n=t}else e.removeChild(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&s(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Ke),this.ctx.cleanups.splice(0).forEach(e=>e())}},rn=ve(Object.create(null)),on=(e,t)=>(void 0!==t&&(rn[e]=t,"function"==typeof rn[e].init&&rn[e].init(),((e,t)=>{Ne()||(Ee.set(e,t),Pe("store:register",e,t))})(e,rn[e])),rn[e]),cn=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),ln=e=>{const t=Yt();if("function"==typeof e&&(e=e()),e&&(t.scope=ve(e),nn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(cn(n)+"([^]+?)"+cn(s),"g")}t.scope.$s=ht,t.scope.$nextTick=Je,t.scope.$refs=Object.create(null),t.scope.$store=rn,t.scope.$watch=Xe(t),t.scope.$id=Qe(),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const r=[],i=/* @__PURE__ */new Set,o=[],c=[],l={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ne()||Le.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Ve.push(n),()=>{const e=Ve.indexOf(n);e>-1&&Ve.splice(e,1)});var n;return c.push(t),()=>{const e=c.indexOf(t);e>-1&&c.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n=("function"==typeof e?e:e.install)(l,t);"function"==typeof n&&o.push(n)}return l},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Wt)?[e]:[...e.querySelectorAll(Wt)].filter(e=>!e.matches(`:where(${Wt}) *`)),n.length||(n=[e]),t.walk??=qt,t.dispose??=jt;for(const r of n){const e=r.getAttribute("v-name"),n=new sn(r,t,!0);r.__ctx??=n.ctx,Ce.scopes.has(r)||r.matches(Wt)||n.ctx.cleanups.push(Ie(r,n.ctx.scope,void 0,e||void 0)),s.push(n)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Ke),r.splice(0).forEach(e=>e()),o.splice(0).forEach(e=>{try{e()}catch(t){ze(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void c.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const l=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():l.push(t)}s=l}};return l},an=e=>{let t;return t=W(e,{scheduler:()=>Ze(t)}),()=>Ke(t)},un=document.currentScript;un&&un.hasAttribute("init")&&ln().mount();export{we as computed,ln as createApp,Ce as devtools,Me as disableDevtools,Je as nextTick,ve as reactive,on as store,an as watchEffect};
|
|
1
|
+
function e(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}var t=()=>{},n=Object.assign,s=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},r=Object.prototype.hasOwnProperty,i=(e,t)=>r.call(e,t),o=Array.isArray,c=e=>"[object Date]"===p(e),l=e=>"string"==typeof e,a=e=>"symbol"==typeof e,u=e=>null!==e&&"object"==typeof e,f=Object.prototype.toString,p=e=>f.call(e),d=e=>l(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,h=e=>{const t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},v=/-(\w)/g,m=/* @__PURE__ */h(e=>e.replace(v,(e,t)=>t?t.toUpperCase():"")),g=/\B([A-Z])/g,_=/* @__PURE__ */h(e=>e.replace(g,"-$1").toLowerCase()),y=(e,t)=>!Object.is(e,t);function b(e){if(o(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=l(s)?O(s):b(s);if(r)for(const e in r)t[e]=r[e]}return t}if(l(e)||u(e))return e}var w,x=/;(?![^(]*\))/g,$=/:([^]+)/,k=/\/\*[^]*?\*\//g;function O(e){const t={};return e.replace(k,"").split(x).forEach(e=>{if(e){const n=e.split($);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function S(e){let t="";if(l(e))t=e;else if(o(e))for(let n=0;n<e.length;n++){const s=S(e[n]);s&&(t+=s+" ")}else if(u(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function E(e,t){if(e===t)return!0;let n=c(e),s=c(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=a(e),s=a(t),n||s)return e===t;if(n=o(e),s=o(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=E(e[s],t[s]);return n}(e,t);if(n=u(e),s=u(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!E(e[n],t[n]))return!1}}return String(e)===String(t)}function L(e,t){return e.findIndex(e=>E(e,t))}function j(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,j(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,V();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(T(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),z()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=C,t=w;try{return C=!0,w=this,this._runnings++,N(this),this.fn()}finally{P(this),this._runnings--,w=t,C=e}}stop(){this.active&&(N(this),P(this),this.onStop&&this.onStop(),this.active=!1)}};function T(e){return e.value}function N(e){e._trackId++,e._depsLength=0}function P(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)R(e.deps[t],e);e.deps.length=e._depsLength}}function R(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function I(e,s){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,t,()=>{r.dirty&&r.run()});s&&(n(r,s),s.scope&&j(r,s.scope)),s&&s.lazy||r.run();const i=r.run.bind(r);return i.effect=r,i}var C=!0,M=0,W=[];function V(){W.push(C),C=!1}function z(){const e=W.pop();C=void 0===e||e}function B(){M++}function K(){for(M--;!M&&F.length;)F.shift()()}function D(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&R(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var F=[];function q(e,t,n){B();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&F.push(s.scheduler)))}K()}var U=(e,t)=>{const n=/* @__PURE__ */new Map;return n.cleanup=e,n.computed=t,n},H=/* @__PURE__ */new WeakMap,J=Symbol("");function Z(e,t,n){if(C&&w){let t=H.get(e);t||H.set(e,t=/* @__PURE__ */new Map);let s=t.get(n);s||t.set(n,s=U(()=>t.delete(n))),D(w,s)}}function G(e,t,n,s,r,i){const c=H.get(e);if(!c)return;let l=[];if("length"===n&&o(e)){const e=Number(s);c.forEach((t,n)=>{("length"===n||!a(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(c.get(n)),t){case"add":o(e)?d(n)&&l.push(c.get("length")):l.push(c.get(J));break;case"delete":o(e)||l.push(c.get(J))}B();for(const o of l)o&&q(o,4);K()}var Q=/* @__PURE__ */e("__proto__,__v_isRef,__isVue"),X=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(a)),Y=/* @__PURE__ */ee();function ee(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=ve(this);for(let t=0,r=this.length;t<r;t++)Z(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(ve)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){V(),B();const n=ve(this)[t].apply(this,e);return K(),z(),n}}),e}function te(e){a(e)||(e=String(e));const t=ve(this);return Z(t,0,e),t.hasOwnProperty(e)}var ne=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?ue:ae:r?le:ce).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const c=o(e);if(!s){if(c&&i(Y,t))return Reflect.get(Y,t,n);if("hasOwnProperty"===t)return te}const l=Reflect.get(e,t,n);return(a(t)?X.has(t):Q(t))?l:(s||Z(e,0,t),r?l:ye(l)?c&&d(t)?l:l.value:u(l)?s?function(e){return de(e,!0,oe,null,ae)}(l):pe(l):l)}},se=class extends ne{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=he(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||he(n)||(r=ve(r),n=ve(n)),!o(e)&&ye(r)&&!ye(n))return!t&&(r.value=n,!0)}const c=o(e)&&d(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===ve(s)&&(c?y(n,r)&&G(e,"set",t,n):G(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&G(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return a(t)&&X.has(t)||Z(e,0,t),n}ownKeys(e){return Z(e,0,o(e)?"length":J),Reflect.ownKeys(e)}},re=class extends ne{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ie=/* @__PURE__ */new se,oe=/* @__PURE__ */new re,ce=/* @__PURE__ */new WeakMap,le=/* @__PURE__ */new WeakMap,ae=/* @__PURE__ */new WeakMap,ue=/* @__PURE__ */new WeakMap;function fe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>p(e).slice(8,-1))(e))}function pe(e){return he(e)?e:de(e,!1,ie,null,ce)}function de(e,t,n,s,r){if(!u(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=fe(e);if(0===o)return e;const c=new Proxy(e,2===o?s:n);return r.set(e,c),c}function he(e){return!(!e||!e.__v_isReadonly)}function ve(e){const t=e&&e.__v_raw;return t?ve(t):e}var me=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>_e(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=ve(this);var t,n;return e._cacheable&&!e.effect.dirty||!y(e._value,e._value=e.effect.run())||_e(e,4),t=e,C&&w&&(t=ve(t),D(w,null!=(n=t.dep)?n:t.dep=U(()=>t.dep=void 0,t instanceof me?t:void 0))),e.effect._dirtyLevel>=2&&_e(e,2),e._value}set value(e){this._setter(e)}};function ge(e,n,s=!1){let r,i;const o="function"==typeof e;return o?(r=e,i=t):(r=e.get,i=e.set),new me(r,i,o||!i,s)}function _e(e,t=4,n,s){const r=(e=ve(e)).dep;r&&q(r,t)}function ye(e){return!(!e||!0!==e.__v_isRef)}var be=/* @__PURE__ */new Map,we=/* @__PURE__ */new Map,xe=/* @__PURE__ */new Map,$e=/* @__PURE__ */new Map,ke=/* @__PURE__ */new Set,Oe=[],Se=!1,Ee=()=>Se||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Le={"scope:mount":/* @__PURE__ */new Set,"scope:unmount":/* @__PURE__ */new Set,"store:register":/* @__PURE__ */new Set,"plugin:install":/* @__PURE__ */new Set,flush:/* @__PURE__ */new Set},je=(e,...t)=>{Le[e].forEach(e=>e(...t))},Ae=(e,n,s,r)=>Ee()?t:(be.set(e,n),s&&we.set(e,s),r&&xe.set(e,r),je("scope:mount",e,n),()=>{be.delete(e)&&(we.delete(e),xe.delete(e),je("scope:unmount",e))}),Te={scopes:be,exps:we,names:xe,stores:$e,components:ke,plugins:Oe,getScopeByName(e){for(const[t,n]of xe)if(n===e)return be.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=be.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Le[e].add(t),()=>Le[e].delete(t)),off(e,t){Le[e].delete(t)}},Ne=()=>{Se=!0,be.clear(),we.clear(),xe.clear(),$e.clear(),ke.clear(),Oe.length=0;for(const e in Le)Le[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Te&&delete window.__LITE_VUE__};"undefined"==typeof window||Ee()||(window.__LITE_VUE__=Te);var Pe,Re=[],Ie=(e,t)=>{for(const s of[...Re])try{s(e,t)}catch(n){}Re.length||console.error(e)},Ce=/* @__PURE__ */new WeakSet,Me=e=>{Ce.add(e),e.effect&&function(e){e.effect.stop()}(e)},We=!1,Ve=0,ze=/* @__PURE__ */new Set,Be=Promise.resolve(),Ke=e=>Be.then(e),De=e=>(e.i=Ve++,e),Fe=e=>{e.i??De(e),ze.add(e),We||(We=!0,Ke(qe))},qe=()=>{const e=/* @__PURE__ */new Map;for(;ze.size;)for(const n of[...ze].sort((e,t)=>e.i-t.i)){if(ze.delete(n),Ce.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Ie(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Ie(t,{phase:"effect"})}}We=!1,Le.flush.size&&!Ee()&&je("flush")},Ue=0,He=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++Ue}`)},Je=e=>(t,n,r)=>{const i="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let o,c=!1;const l=e.effect(()=>{const e=i(),t=o;if(o=e,c?y(e,t):r?.immediate){V();try{n(e,t)}finally{z()}}c=!0});return()=>{Me(l),s(e.effects,l)}},Ze=/^(spellcheck|draggable|translate|form|list|type)$/,Ge=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Qe=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let i;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=m(s)),Xe(e,s,n,i);else{for(const t in n)Xe(e,t,n[t],i&&i[t]);for(const t in i)n&&t in n||Xe(e,t,null,i[t])}i="[object Object]"===p(n)?{...n}:n,s||(e.__bound=i)})},Xe=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",S(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=Ye(n),i=Ye(s);for(const e in r)tt(t,e,r[e]);for(const e in i)null==r[e]&&tt(t,e,"");"_vod"in e&&(("display"in r||"display"in i)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Ze.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Ge.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},Ye=e=>l(e=b(e))?O(e):e||{},et=/\s*!important$/,tt=(e,t,n)=>{o(n)?n.forEach(n=>tt(e,t,n)):t.startsWith("--")?e.setProperty(t,n):et.test(n)?e.setProperty(_(t),n.replace(et,""),"important"):e[t]=n},nt=Object.create(null),st=0,rt=e=>e.replace(/^return\(([^]*)\)$/,"$1"),it=(e,t,n,s)=>ot(e,`return(${t})`,n,s),ot=(e,t,n,s)=>{let r=nt[t];r||(++st>1e3&&(nt=Object.create(null),st=1),r=nt[t]=ct(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(i){Ie(i,{phase:"expression",expression:s?.expression??rt(t),source:s?.source,el:s?.el??n,scope:e})}},ct=(e,n,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Ie(r,{phase:"compile",expression:s?.expression??rt(e),source:s?.source,el:s?.el??n}),t}},lt=Object.create(null),at=0,ut=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,ft=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,pt=["ctrl","shift","alt","meta"],dt={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)=>pt.some(n=>e[`${n}Key`]&&!t[n])},ht={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},vt=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,mt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const i=/\bawait\b/.test(n)?"async ":"";let o,c=ft.test(n)||ut.test(n)?t(`(e => (${n})(e))`):(e=>{const t=lt[e];if(void 0!==t)return t;++at>1e3&&(lt=Object.create(null),at=1);try{return new Function(`return (${e})`),lt[e]=!0}catch{return lt[e]=!1}})(n)?t(`(${i}$event => (${n}))`):t(`(${i}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Ke(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(o),o=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!vt.test(e)||e in ht);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=_(s.key);if(!n.some(t=>t===e||ht[t]===e))return}for(const e in r){const t=dt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(o),l.removeEventListener(a,c,r)}},gt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=_t(t())})},_t=e=>null==e?"":u(e)?JSON.stringify(e,null,2):String(e),yt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},bt=e=>"_value"in e?e._value:e.value,wt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},xt=e=>{e.target.composing=!0},$t=e=>{const t=e.target;t.composing&&(t.composing=!1,kt(t,"input"))},kt=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},Ot=/* @__PURE__ */new WeakMap,St=e=>{const t=Pe;return Pe=e,t},Et=(e,t=Pe)=>{if(!t)return;const n=Ot.get(t);n?n.push(e):Ot.set(t,[e])},Lt=e=>{const t=Ot.get(e);if(t){Ot.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Lt(n),n=e}},jt={bind:Qe,on:mt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:gt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const i=e.type,c=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===i,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(bt(e)));c(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],i=bt(r);if(s)r.selected=o(e)&&L(e,i)>-1;else if(E(bt(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===i)h("change",v=()=>{const t=n(),s=e.checked;if(o(t)){const n=bt(e),r=L(t,n),i=-1!==r;if(s&&!i)c(t.concat(n));else if(!s&&i){const e=[...t];e.splice(r,1),c(e)}}else c(wt(e,s))}),m=()=>{const t=n();o(t)?e.checked=L(t,bt(e))>-1:e.checked=E(t,wt(e,!0))};else if("radio"===i)h("change",v=()=>c(bt(e))),m=()=>{e.checked=E(n(),bt(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>c(t(e.value));let s,i=c;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;i=t=>{clearTimeout(s),s=setTimeout(c,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",xt),h("compositionend",$t),h(u?"change":"input",()=>{e.composing||i(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===i&&!e.checked||v()}const _=s(m);if(!g){const t=new MutationObserver(()=>_());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const i=Dt;return Ke(()=>{if(!r)return;const o=St(e);try{qt(i,()=>s(()=>ot(t.scope,n,e,{source:"v-effect",el:e})))}finally{St(o)}}),()=>{r=!1}}},At=(e,t,n)=>{const r=new Comment("v-if");e.before(r);const i=[{exp:t.trim()||"0",el:e}];let o,c;for(;(o=e.nextElementSibling)&&(c=null,""===yt(o,"v-else")||null!=(c=yt(o,"v-else-if")));)o.remove(),i.push({exp:null==c?c:c.trim()||"0",el:o});const l=e.nextSibling;let a;e.remove(),St(r);let u=-1;const f=()=>{var e,t;a&&(r.parentNode||a.el.before(r),e=d,t=a.el,s(Ot.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Me(p);return p=n.effect(()=>{for(let e=0;e<i.length;e++){const{exp:t,el:s}=i[e];if(!t||it(n.scope,t,s,{source:"v-if",el:s})){if(e!==u){f();const t=r.parentNode;a=new rn(s,n),a.insert(t,r),Et(d,a.el),a.el.parentNode===t&&r.remove(),u=e}return}}u=-1,f()}),Et(d,r),l},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Nt=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Pt=/^\(|\)$/g,Rt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,It=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,i=new Text("");e.replaceWith(i);const c=()=>i.parentNode;St(i);const l=s[2].trim();let a,f,p,d,h=s[1].trim().replace(Pt,"").trim(),v=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(d=h.match(Nt))&&(h=h.replace(Nt,"").trim(),f=d[1].trim(),d[2]&&(p=d[2].trim())),(d=h.match(Rt))&&(a=d[1].split(",").map(e=>e.trim()),v="["===h[0]);let _,y,b,w=!1;const x=(t,s,r,i)=>{const o={};a?a.forEach((e,t)=>o[e]=s?.[v?t:e]):o[h]=s,i?(f&&(o[f]=i),p&&(o[p]=r)):f&&(o[f]=r);const c=g?it(Object.setPrototypeOf(o,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:o,key:c}},$=(t,s)=>{const r=new rn(e,nn(n,t.data));return r.key=t.key,r.insert(c(),s),r};return n.effect(()=>{const t=it(n.scope,l,e,{source:"v-for",el:e}),s=b;if([y,b]=(e=>{const t=/* @__PURE__ */new Map,n=[];if(o(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(u(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let r=0;r<_.length;r++){const e=_[r].key;b.has(e)&&s.get(e)===r||_[r].remove()}const e=[];let t,n=y.length;for(;n--;){const r=y[n],o=s.get(r.key);s.delete(r.key);const l=t?t.el:i;let a;null==o?a=$(r,l):(a=_[o],Object.assign(a.ctx.scope,r.data),o!==n&&(a.end||a.el).nextSibling!==l&&a.insert(c(),l)),e[n]=t=a}_=e}else _=y.map(e=>$(e,i)),w=!0}),r},Ct=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Mt=["visible","idle","interaction"],Wt=["[v-scope]",...Mt.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],zt=(e,n,r,i)=>{const o=Mt.find(t=>e.hasAttribute(`v-scope.${t}`));if(!o)return!1;const c=`v-scope.${o}`,l=((e,n,s)=>{let r=!1;const i=()=>{r||(r=!0,o(),s())};let o=t;if("visible"===n&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i()});t.observe(e),o=()=>t.disconnect()}else if("interaction"!==n){const e=window.requestIdleCallback,t=e?e(i):setTimeout(i);o=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,i);o=()=>{for(const t of Vt)e.removeEventListener(t,i)}}return()=>{r=!0,o()}})(e,o,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),r(e,n,i))});return n.cleanups.push(l),Et(()=>{s(n.cleanups,l),l()}),!0},Bt=/^(?:v-|:|@)/,Kt=/\.([\w-]+)/g,Dt=!1,Ft=(e,t,n)=>{e.cleanups.push(t),Et(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},qt=(e,t)=>{const n=Dt;Dt=e;try{t()}finally{Dt=n}},Ut=(e,t,n)=>qt(n,()=>Ht(e,t)),Ht=(e,t)=>{const n=St(e);try{return Jt(e,t)}finally{St(n)}},Jt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Zt(n,t);if(n.hasAttribute("v-pre"))return;if(zt(n,t,Ut,Dt))return;let s;if(yt(n,"v-cloak"),null!=(s=yt(n,"v-if")))return At(n,s,t);if(s=yt(n,"v-for"))return It(n,s,t);const r=yt(n,"v-name");let i;if(s=yt(n,"v-teleport")){const e=Xt(s,n,"v-teleport");if(e){i=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Ft(t,()=>{Lt(n),n.remove()},s)}}if((s=yt(n,"v-scope"))||""===s){const e=(s?it(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=nn(t,e),n.__ctx=t;const i=Ae(n,t.scope,s||void 0,r||void 0);Ft(t,()=>{i(),delete n.__ctx}),e.$template&&Yt(n,e.$template)}const o=Dt;null!=yt(n,"v-once")&&(Dt=!0),(s=yt(n,"ref"))&&Qt(n,Ct,`"${s}"`,t),Zt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])Bt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Gt(n,e,l,t));for(const[e,l]of c)Gt(n,e,l,t);return Dt=o,i}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],i=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(i,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),i=s.index+s[0].length}i<n.length&&r.push(JSON.stringify(n.slice(i))),Qt(e,gt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Zt(e,t)},Zt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ht(n,t)||n.nextSibling},Gt=(e,t,n,s)=>{let r,i,o;const c=t;if(":"===(t=t.replace(Kt,(e,t)=>((o||(o={}))[t]=!0,"")))[0])r=Qe,i=t.slice(1);else if("@"===t[0])r=mt,i=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=jt[n]||s.dirs[n],i=e>0?t.slice(e+1):void 0}r&&(r===Qe&&"ref"===i&&(r=Ct),Qt(e,r,n,s,i,o,c),e.removeAttribute(c))},Qt=(e,t,n,s,r,i,o,c)=>{const l={source:o,el:e,expression:c},a=t=>Ie(t,{phase:"handler",source:o,el:e,expression:n,scope:s.scope}),u=t=>{const r=it(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=St(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{St(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:i})}catch(p){return void Ie(p,{phase:"directive",source:o,el:e,expression:n})}f&&Ft(s,f)},Xt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Ie(s,{phase:"directive",source:n,el:t,expression:e})}},Yt=(e,t)=>{if("#"===t[0]){const n=Xt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},en=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:pe({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt){const t=()=>qt(!0,e);return Fe(t),t}const n=De(I(e,{scheduler:()=>Fe(n),lazy:!0}));return t.effects.push(n),Et(()=>{Me(n),s(t.effects,n)}),n(),n}};return t},tn=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),nn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),tn(s,"$refs",Object.create(n.$refs));const r=pe(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return tn(s,"$watch",Je(o)),tn(s,"$id",He()),sn(r,s),o},sn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},rn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=en(t),Ht(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Et(()=>this.discard(),this.el))}remove(){this.parentCtx&&s(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Lt(n),n!==this.end);)n=t}else e.removeChild(this.template),Lt(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&s(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Me),this.ctx.cleanups.splice(0).forEach(e=>e())}},on=pe(Object.create(null)),cn=(e,t)=>(void 0!==t&&(on[e]=t,"function"==typeof on[e].init&&on[e].init(),((e,t)=>{Ee()||($e.set(e,t),je("store:register",e,t))})(e,on[e])),on[e]),ln=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),an=e=>{const t=en();if("function"==typeof e&&(e=e()),e&&(t.scope=pe(e),sn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(ln(n)+"([^]+?)"+ln(s),"g")}tn(t.scope,"$s",_t),tn(t.scope,"$nextTick",Ke),tn(t.scope,"$refs",Object.create(null)),tn(t.scope,"$store",on),tn(t.scope,"$watch",Je(t)),tn(t.scope,"$id",He()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let r=[];const i=[],o=/* @__PURE__ */new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ee()||ke.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Re.push(n),()=>{const e=Re.indexOf(n);e>-1&&Re.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!o.has(e)){o.add(e);const n=("function"==typeof e?e:e.install)(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Wt)?[e]:[...e.querySelectorAll(Wt)].filter(e=>!e.matches(`:where(${Wt}) *`)),n.length||(n=[e]),t.walk??=Ht,t.dispose??=Lt;for(const i of n){const e=i.getAttribute("v-name"),n=new rn(i,t,!0);i.__ctx??=n.ctx,Te.scopes.has(i)||i.matches(Wt)||n.ctx.cleanups.push(Ae(i,n.ctx.scope,void 0,e||void 0)),r.push(n),Et(()=>s(r,n),i),n.ctx.cleanups.push(()=>delete i.__ctx)}return this},unmount(e){if(null==e)return r.forEach(e=>e.teardown()),r=[],t.effects.splice(0).forEach(Me),i.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Ie(t,{phase:"teardown",source:"plugin"})}}),o.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const s=[];for(const t of r){const e=t.template;n.contains(e)?t.teardown():s.push(t)}r=s}};return a},un=e=>{const t=I(e,{scheduler:()=>Fe(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Me(t),n}return()=>Me(t)},fn=document.currentScript;fn&&fn.hasAttribute("init")&&an().mount();export{ge as computed,an as createApp,Te as devtools,Ne as disableDevtools,Ke as nextTick,pe as reactive,cn as store,un as watchEffect};
|
package/dist/litevue.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVue={})}(this,function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,i=(e,t)=>o.call(e,t),c=Array.isArray,l=e=>"[object Map]"===h(e),a=e=>"[object Date]"===h(e),u=e=>"string"==typeof e,f=e=>"symbol"==typeof e,p=e=>null!==e&&"object"==typeof e,d=Object.prototype.toString,h=e=>d.call(e),m=e=>u(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},g=/-(\w)/g,y=v(e=>e.replace(g,(e,t)=>t?t.toUpperCase():"")),_=/\B([A-Z])/g,b=v(e=>e.replace(_,"-$1").toLowerCase()),w=v(e=>e.charAt(0).toUpperCase()+e.slice(1)),x=(v(e=>e?`on${w(e)}`:""),(e,t)=>!Object.is(e,t)),$=e=>{const t=u(e)?Number(e):NaN;return isNaN(t)?e:t};function k(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=u(s)?L(s):k(s);if(r)for(const e in r)t[e]=r[e]}return t}if(u(e)||p(e))return e}var O=/;(?![^(]*\))/g,S=/:([^]+)/,E=/\/\*[^]*?\*\//g;function L(e){const t={};return e.replace(E,"").split(O).forEach(e=>{if(e){const n=e.split(S);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function j(e){let t="";if(u(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=j(e[n]);s&&(t+=s+" ")}else if(p(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}var T;function A(e,t){if(e===t)return!0;let n=a(e),s=a(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=f(e),s=f(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=A(e[s],t[s]);return n}(e,t);if(n=p(e),s=p(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!A(e[n],t[n]))return!1}}return String(e)===String(t)}function N(e,t){return e.findIndex(e=>A(e,t))}function P(e,t=void 0){t&&t.active&&t.effects.push(e)}var R=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,P(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,K();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(I(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),F()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=z,t=T;try{return z=!0,T=this,this._runnings++,C(this),this.fn()}finally{M(this),this._runnings--,T=t,z=e}}stop(){this.active&&(C(this),M(this),this.onStop&&this.onStop(),this.active=!1)}};function I(e){return e.value}function C(e){e._trackId++,e._depsLength=0}function M(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)V(e.deps[t],e);e.deps.length=e._depsLength}}function V(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function W(e,t){e.effect instanceof R&&(e=e.effect.fn);const r=new R(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&P(r,t.scope)),t&&t.lazy||r.run();const o=r.run.bind(r);return o.effect=r,o}var z=!0,B=0,D=[];function K(){D.push(z),z=!1}function F(){const e=D.pop();z=void 0===e||e}function U(){B++}function q(){for(B--;!B&&Z.length;)Z.shift()()}function J(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&V(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var Z=[];function H(e,t,n){U();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&Z.push(s.scheduler)))}q()}var G=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},Q=new WeakMap,X=Symbol(""),Y=Symbol("");function ee(e,t,n){if(z&&T){let t=Q.get(e);t||Q.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=G(()=>t.delete(n))),J(T,s)}}function te(e,t,n,s,r,o){const i=Q.get(e);if(!i)return;let a=[];if("clear"===t)a=[...i.values()];else if("length"===n&&c(e)){const e=Number(s);i.forEach((t,n)=>{("length"===n||!f(n)&&n>=e)&&a.push(t)})}else switch(void 0!==n&&a.push(i.get(n)),t){case"add":c(e)?m(n)&&a.push(i.get("length")):(a.push(i.get(X)),l(e)&&a.push(i.get(Y)));break;case"delete":c(e)||(a.push(i.get(X)),l(e)&&a.push(i.get(Y)));break;case"set":l(e)&&a.push(i.get(X))}U();for(const c of a)c&&H(c,4);q()}var ne=t("__proto__,__v_isRef,__isVue"),se=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(f)),re=oe();function oe(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=be(this);for(let t=0,r=this.length;t<r;t++)ee(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(be)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){K(),U();const n=be(this)[t].apply(this,e);return q(),F(),n}}),e}function ie(e){f(e)||(e=String(e));const t=be(this);return ee(t,0,e),t.hasOwnProperty(e)}var ce=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?me:he:r?de:pe).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=c(e);if(!s){if(o&&i(re,t))return Reflect.get(re,t,n);if("hasOwnProperty"===t)return ie}const l=Reflect.get(e,t,n);return(f(t)?se.has(t):ne(t))?l:(s||ee(e,0,t),r?l:$e(l)?o&&m(t)?l:l.value:p(l)?s?function(e){return ye(e,!0,fe,null,he)}(l):ge(l):l)}},le=class extends ce{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=_e(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||_e(n)||(r=be(r),n=be(n)),!c(e)&&$e(r)&&!$e(n))return!t&&(r.value=n,!0)}const o=c(e)&&m(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===be(s)&&(o?x(n,r)&&te(e,"set",t,n):te(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&te(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return f(t)&&se.has(t)||ee(e,0,t),n}ownKeys(e){return ee(e,0,c(e)?"length":X),Reflect.ownKeys(e)}},ae=class extends ce{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ue=new le,fe=new ae,pe=new WeakMap,de=new WeakMap,he=new WeakMap,me=new WeakMap;function ve(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>h(e).slice(8,-1))(e))}function ge(e){return _e(e)?e:ye(e,!1,ue,null,pe)}function ye(e,t,n,s,r){if(!p(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=ve(e);if(0===i)return e;const c=new Proxy(e,2===i?s:n);return r.set(e,c),c}function _e(e){return!(!e||!e.__v_isReadonly)}function be(e){const t=e&&e.__v_raw;return t?be(t):e}var we=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R(()=>e(this._value),()=>xe(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=be(this);var t,n;return e._cacheable&&!e.effect.dirty||!x(e._value,e._value=e.effect.run())||xe(e,4),t=e,z&&T&&(t=be(t),J(T,null!=(n=t.dep)?n:t.dep=G(()=>t.dep=void 0,t instanceof we?t:void 0))),e.effect._dirtyLevel>=2&&xe(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}};function xe(e,t=4,n,s){const r=(e=be(e)).dep;r&&H(r,t)}function $e(e){return!(!e||!0!==e.__v_isRef)}var ke=new Map,Oe=new Map,Se=new Map,Ee=new Map,Le=new Set,je=[],Te=!1,Ae=()=>Te||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Ne={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},Pe=(e,...t)=>{Ne[e].forEach(e=>e(...t))},Re=()=>{},Ie=(e,t,n,s)=>Ae()?Re:(ke.set(e,t),n&&Oe.set(e,n),s&&Se.set(e,s),Pe("scope:mount",e,t),()=>{ke.delete(e)&&(Oe.delete(e),Se.delete(e),Pe("scope:unmount",e))}),Ce={scopes:ke,exps:Oe,names:Se,stores:Ee,components:Le,plugins:je,getScopeByName(e){for(const[t,n]of Se)if(n===e)return ke.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=ke.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Ne[e].add(t),()=>Ne[e].delete(t)),off(e,t){Ne[e].delete(t)}};"undefined"==typeof window||Ae()||(window.__LITE_VUE__=Ce);var Me,Ve=[],We=(e,t)=>{for(const s of[...Ve])try{s(e,t)}catch(n){}Ve.length||console.error(e)},ze=new WeakSet,Be=e=>{ze.add(e),e.effect&&function(e){e.effect.stop()}(e)},De=!1,Ke=[],Fe=Promise.resolve(),Ue=-1,qe=e=>Fe.then(e),Je=e=>{Ke.includes(e,Ue+1)||Ke.push(e),De||(De=!0,qe(Ze))},Ze=()=>{const e=new Map;for(Ue=0;Ue<Ke.length;Ue++){const n=Ke[Ue];if(ze.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)We(Error("update loop"),{phase:"effect"});else try{n()}catch(t){We(t,{phase:"effect"})}}Ke.length=0,Ue=-1,De=!1,Ne.flush.size&&!Ae()&&Pe("flush")},He=0,Ge=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++He}`)},Qe=e=>(t,n,s)=>{const r="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let o,i=!1;const c=e.effect(()=>{const e=r(),t=o;if(o=e,i?e!==t:s?.immediate){K();try{n(e,t)}finally{F()}}i=!0});return()=>Be(c)},Xe=/^(spellcheck|draggable|form|list|type)$/,Ye=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let o;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=y(s)),et(e,s,n,o);else{for(const t in n)et(e,t,n[t],o&&o[t]);for(const t in o)n&&t in n||et(e,t,null)}o="[object Object]"===h(n)?{...n}:n,s||(e.__bound=o)})},et=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",j(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=tt(n),o=tt(s);for(const e in r)st(t,e,r[e]);for(const e in o)null==r[e]&&st(t,e,"");t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Xe.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:null!=n?e.setAttribute(t,n):e.removeAttribute(t):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},tt=e=>u(e=k(e))?L(e):e||{},nt=/\s*!important$/,st=(e,t,n)=>{c(n)?n.forEach(n=>st(e,t,n)):t.startsWith("--")?e.setProperty(t,n):nt.test(n)?e.setProperty(b(t),n.replace(nt,""),"important"):e[t]=n},rt=Object.create(null),ot=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,it=["ctrl","shift","alt","meta"],ct={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)=>it.some(n=>e[`${n}Key`]&&!t[n])},lt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},at=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,ut=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const o=/\bawait\b/.test(n)?"async ":"";let i,c=ot.test(n)?t(`(e => ${n}(e))`):(e=>{const t=rt[e];if(void 0!==t)return t;try{return new Function(`return (${e})`),rt[e]=!0}catch{return rt[e]=!1}})(n)?t(`(${o}$event => (${n}))`):t(`(${o}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return qe(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(i),i=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!at.test(e)||e in lt);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=b(s.key);if(!n.some(t=>t===e||lt[t]===e))return}for(const e in r){const t=ct[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,r),()=>{clearTimeout(i),l.removeEventListener(a,c,r)}},ft=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=pt(t())})},pt=e=>null==e?"":p(e)?JSON.stringify(e,null,2):String(e),dt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},ht=e=>"_value"in e?e._value:e.value,mt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},vt=e=>{e.target.composing=!0},gt=e=>{const t=e.target;t.composing&&(t.composing=!1,yt(t,"input"))},yt=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},_t=Object.create(null),bt=0,wt=e=>e.replace(/^return\(([^]*)\)$/,"$1"),xt=(e,t,n,s)=>$t(e,`return(${t})`,n,s),$t=(e,t,n,s)=>{let r=_t[t];r||(++bt>1e3&&(_t=Object.create(null),bt=1),r=_t[t]=kt(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(o){We(o,{phase:"expression",expression:s?.expression??wt(t),source:s?.source,el:s?.el??n,scope:e})}},kt=(e,t,n)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(s){return We(s,{phase:"compile",expression:n?.expression??wt(e),source:n?.source,el:n?.el??t}),()=>{}}},Ot=new WeakMap,St=e=>{const t=Me;return Me=e,t},Et=(e,t=Me)=>{if(!t)return;const n=Ot.get(t);n?n.push(e):Ot.set(t,[e])},Lt=e=>{const t=Ot.get(e);if(t){Ot.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Lt(n),n=e}},jt={bind:Ye,on:ut,show:({el:e,get:t,effect:n})=>{const s="none"==e.style.display?"":e.style.display;n(()=>{e.style.display=t()?s:"none"})},text:ft,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const o=e.type,i=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===o,lazy:u,fill:f}=r||{},p=[],d=(t,n)=>p.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));if("SELECT"===e.tagName){const t=e;d("change",()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>a?$(ht(e)):ht(e));i(t.multiple?e:e[0])}),s(()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],o=ht(r);if(s)r.selected=c(e)&&N(e,o)>-1;else if(A(ht(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)})}else if("checkbox"===o)d("change",()=>{const t=n(),s=e.checked;if(c(t)){const n=ht(e),r=N(t,n),o=-1!==r;if(s&&!o)i(t.concat(n));else if(!s&&o){const e=[...t];e.splice(r,1),i(e)}}else i(mt(e,s))}),s(()=>{const t=n();c(t)?e.checked=N(t,ht(e))>-1:e.checked=A(t,mt(e,!0))});else if("radio"===o)d("change",()=>{i(ht(e))}),s(()=>{e.checked=A(n(),ht(e))});else{const t=e=>(l&&(e=e.trim()),a?$(e):e);let o,c=i;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;c=t=>{clearTimeout(o),o=setTimeout(i,e,t)},p.push(()=>clearTimeout(o))}}if(d("compositionstart",vt),d("compositionend",gt),d(u?"change":"input",()=>{e.composing||c(t(e.value))}),l&&d("change",()=>{e.value=e.value.trim()}),f){const s=n();null!=s&&""!==s||!e.value||i(t(e.value))}s(()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)})}return()=>p.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;return qe(()=>{if(!r)return;const o=St(e);try{s(()=>$t(t.scope,n,e,{source:"v-effect",el:e}))}finally{St(o)}}),()=>{r=!1}}},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,At=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Nt=/^\(|\)$/g,Pt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Rt=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,o=new Text("");e.replaceWith(o);const i=()=>o.parentNode;St(o);const l=s[2].trim();let a,u,f,d,h=s[1].trim().replace(Nt,"").trim(),m=!1,v="key",g=e.getAttribute(v)||e.getAttribute(v=":key")||e.getAttribute(v="v-bind:key");g&&(e.removeAttribute(v),"key"===v&&(g=JSON.stringify(g))),(d=h.match(At))&&(h=h.replace(At,"").trim(),u=d[1].trim(),d[2]&&(f=d[2].trim())),(d=h.match(Pt))&&(a=d[1].split(",").map(e=>e.trim()),m="["===h[0]);let y,_,b,w=!1;const x=(t,s,r,o)=>{const i={};a?a.forEach((e,t)=>i[e]=s[m?t:e]):i[h]=s,o?(u&&(i[u]=o),f&&(i[f]=r)):u&&(i[u]=r);const c=g?xt(Object.setPrototypeOf(i,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:i,key:c}},$=(t,s)=>{const r=new nn(e,en(n,t.data));return r.key=t.key,r.insert(i(),s),r};return n.effect(()=>{const t=xt(n.scope,l,e,{source:"v-for",el:e}),s=b;if([_,b]=(e=>{const t=new Map,n=[];if(c(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(p(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let s=0;s<y.length;s++)b.has(y[s].key)||y[s].remove();const e=[];let t,n,r=_.length;for(;r--;){const c=_[r],l=s.get(c.key);let a;null==l?a=$(c,t?t.el:o):(a=y[l],Object.assign(a.ctx.scope,c.data),l!==r&&(y[l+1]===t&&n!==t||(n=a,a.insert(i(),t?t.el:o)))),e[r]=t=a}y=e}else y=_.map(e=>$(e,o)),w=!0}),r},It=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Ct=["visible","idle","interaction"],Mt=["[v-scope]",...Ct.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],Wt=(e,t,n,s)=>{const r=Ct.find(t=>e.hasAttribute(`v-scope.${t}`));if(!r)return!1;const o=`v-scope.${r}`,i=((e,t,n)=>{let s=!1;const r=()=>{s||(s=!0,o(),n())};let o=()=>{};if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&r()});t.observe(e),o=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(r):setTimeout(r);o=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,r);o=()=>{for(const t of Vt)e.removeEventListener(t,r)}}return()=>{s=!0,o()}})(e,r,()=>{e.hasAttribute(o)&&(e.setAttribute("v-scope",e.getAttribute(o)),e.removeAttribute(o),n(e,t,s))});return t.cleanups.push(i),Et(i),!0},zt=/^(?:v-|:|@)/,Bt=/\.([\w-]+)/g,Dt=!1,Kt=(e,t,n)=>{e.cleanups.push(t),Et(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ft=(e,t,n)=>{const s=Dt;Dt=n;try{Ut(e,t)}finally{Dt=s}},Ut=(e,t)=>{const n=St(e);try{return qt(e,t)}finally{St(n)}},qt=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(n.hasAttribute("v-pre"))return;if(Wt(n,t,Ft,Dt))return;let s;if(dt(n,"v-cloak"),null!=(s=dt(n,"v-if")))return((e,t,n)=>{const s=new Comment("v-if");e.before(s);const r=[{exp:t.trim()||"0",el:e}];let o,i;for(;(o=e.nextElementSibling)&&(i=null,""===dt(o,"v-else")||(i=dt(o,"v-else-if")));)o.remove(),r.push({exp:i,el:o});const c=e.nextSibling;let l;e.remove(),St(s);let a=-1;const u=()=>{l&&(s.parentNode||l.el.before(s),l.remove(),l=void 0)};let f;const p=()=>Be(f);return f=n.effect(()=>{for(let e=0;e<r.length;e++){const{exp:t,el:o}=r[e];if(!t||xt(n.scope,t,o,{source:"v-if",el:o})){if(e!==a){u();const t=s.parentNode;l=new nn(o,n),l.insert(t,s),Et(p,l.el),l.el.parentNode===t&&s.remove(),a=e}return}}a=-1,u()}),Et(p,s),c})(n,s,t);if(s=dt(n,"v-for"))return Rt(n,s,t);const r=dt(n,"v-name");let o;if(s=dt(n,"v-teleport")){const e=Gt(s,n,"v-teleport");if(e){o=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Kt(t,()=>{Lt(n),n.remove()},s)}}if((s=dt(n,"v-scope"))||""===s){const e=(s?xt(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=en(t,e),n.__ctx=t,Kt(t,Ie(n,t.scope,s||void 0,r||void 0)),e.$template&&Qt(n,e.$template)}const i=Dt;null!=dt(n,"v-once")&&(Dt=!0),(s=dt(n,"ref"))&&Ht(n,It,`"${s}"`,t),Jt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])zt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Zt(n,e,l,t));for(const[e,l]of c)Zt(n,e,l,t);return Dt=i,o}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],o=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(o,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),o=s.index+s[0].length}o<n.length&&r.push(JSON.stringify(n.slice(o))),Ht(e,ft,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Jt(e,t)},Jt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ut(n,t)||n.nextSibling},Zt=(e,t,n,s)=>{let r,o,i;const c=t;if(":"===(t=t.replace(Bt,(e,t)=>((i||(i={}))[t]=!0,"")))[0])r=Ye,o=t.slice(1);else if("@"===t[0])r=ut,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=jt[n]||s.dirs[n],o=e>0?t.slice(e+1):void 0}r&&(r===Ye&&"ref"===o&&(r=It),Ht(e,r,n,s,o,i,c),e.removeAttribute(c))},Ht=(e,t,n,s,r,o,i,c)=>{const l={source:i,el:e,expression:c},a=t=>We(t,{phase:"handler",source:i,el:e,expression:n,scope:s.scope}),u=t=>{const r=xt(s.scope,t??n,e,l);return t&&"function"==typeof r?(...e)=>{try{const t=r(...e);return t instanceof Promise&&t.catch(a),t}catch(t){a(t)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:o})}catch(p){return void We(p,{phase:"directive",source:i,el:e,expression:n})}f&&Kt(s,f)},Gt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){We(s,{phase:"directive",source:n,el:t,expression:e})}},Qt=(e,t)=>{if("#"===t[0]){const n=Gt(t,e,"v-scope");if(!n)return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Xt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:ge({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt)return Je(e),e;const n=W(e,{scheduler:()=>Je(n)});return t.effects.push(n),Et(()=>{Be(n),r(t.effects,n)}),n}};return t},Yt=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),en=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),Yt(s,"$refs",Object.create(n.$refs));const r=ge(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return Yt(s,"$watch",Qe(o)),Yt(s,"$id",Ge()),tn(r),o},tn=e=>{for(const t of Object.keys(e)){const n=Object.getOwnPropertyDescriptor(e,t).value;"function"==typeof n&&(e[t]=n.bind(e))}},nn=class{template;ctx;key;parentCtx;isFragment;start;end;owned=!1;get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Xt(t),Ut(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,Et(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),n!==this.end);)n=t}else e.removeChild(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Be),this.ctx.cleanups.splice(0).forEach(e=>e())}},sn=ge(Object.create(null)),rn=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),on=e=>{const t=Xt();if("function"==typeof e&&(e=e()),e&&(t.scope=ge(e),tn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(rn(n)+"([^]+?)"+rn(s),"g")}t.scope.$s=pt,t.scope.$nextTick=qe,t.scope.$refs=Object.create(null),t.scope.$store=sn,t.scope.$watch=Qe(t),t.scope.$id=Ge(),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const r=[],o=new Set,i=[],c=[],l={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ae()||Le.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Ve.push(n),()=>{const e=Ve.indexOf(n);e>-1&&Ve.splice(e,1)});var n;return c.push(t),()=>{const e=c.indexOf(t);e>-1&&c.splice(e,1),t()}},use(e,t){if(!o.has(e)){o.add(e);const n=("function"==typeof e?e:e.install)(l,t);"function"==typeof n&&i.push(n)}return l},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Mt)?[e]:[...e.querySelectorAll(Mt)].filter(e=>!e.matches(`:where(${Mt}) *`)),n.length||(n=[e]),t.walk??=Ut,t.dispose??=Lt;for(const r of n){const e=r.getAttribute("v-name"),n=new nn(r,t,!0);r.__ctx??=n.ctx,Ce.scopes.has(r)||r.matches(Mt)||n.ctx.cleanups.push(Ie(r,n.ctx.scope,void 0,e||void 0)),s.push(n)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Be),r.splice(0).forEach(e=>e()),i.splice(0).forEach(e=>{try{e()}catch(t){We(t,{phase:"teardown",source:"plugin"})}}),o.clear(),void c.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const l=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():l.push(t)}s=l}};return l},cn=document.currentScript;cn&&cn.hasAttribute("init")&&on().mount(),e.computed=function(e,t,s=!1){let r,o;const i="function"==typeof e;return i?(r=e,o=n):(r=e.get,o=e.set),new we(r,o,i||!o,s)},e.createApp=on,e.devtools=Ce,e.disableDevtools=()=>{Te=!0,ke.clear(),Oe.clear(),Se.clear(),Ee.clear(),Le.clear(),je.length=0;for(const e in Ne)Ne[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ce&&delete window.__LITE_VUE__},e.nextTick=qe,e.reactive=ge,e.store=(e,t)=>(void 0!==t&&(sn[e]=t,"function"==typeof sn[e].init&&sn[e].init(),((e,t)=>{Ae()||(Ee.set(e,t),Pe("store:register",e,t))})(e,sn[e])),sn[e]),e.watchEffect=e=>{let t;return t=W(e,{scheduler:()=>Je(t)}),()=>Be(t)}});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVue={})}(this,function(e){function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var n=()=>{},s=Object.assign,r=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},o=Object.prototype.hasOwnProperty,i=(e,t)=>o.call(e,t),c=Array.isArray,l=e=>"[object Date]"===d(e),a=e=>"string"==typeof e,u=e=>"symbol"==typeof e,f=e=>null!==e&&"object"==typeof e,p=Object.prototype.toString,d=e=>p.call(e),h=e=>a(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,v=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},m=/-(\w)/g,g=v(e=>e.replace(m,(e,t)=>t?t.toUpperCase():"")),y=/\B([A-Z])/g,_=v(e=>e.replace(y,"-$1").toLowerCase()),b=(e,t)=>!Object.is(e,t);function w(e){if(c(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=a(s)?S(s):w(s);if(r)for(const e in r)t[e]=r[e]}return t}if(a(e)||f(e))return e}var x,$=/;(?![^(]*\))/g,k=/:([^]+)/,O=/\/\*[^]*?\*\//g;function S(e){const t={};return e.replace(O,"").split($).forEach(e=>{if(e){const n=e.split(k);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function E(e){let t="";if(a(e))t=e;else if(c(e))for(let n=0;n<e.length;n++){const s=E(e[n]);s&&(t+=s+" ")}else if(f(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function L(e,t){if(e===t)return!0;let n=l(e),s=l(t);if(n||s)return!(!n||!s)&&e.getTime()===t.getTime();if(n=u(e),s=u(t),n||s)return e===t;if(n=c(e),s=c(t),n||s)return!(!n||!s)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=L(e[s],t[s]);return n}(e,t);if(n=f(e),s=f(t),n||s){if(!n||!s)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const s=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(s&&!r||!s&&r||!L(e[n],t[n]))return!1}}return String(e)===String(t)}function j(e,t){return e.findIndex(e=>L(e,t))}function T(e,t=void 0){t&&t.active&&t.effects.push(e)}var A=class{constructor(e,t,n,s){this.fn=e,this.trigger=t,this.scheduler=n,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,T(this,s)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,z();for(let e=0;e<this._depsLength;e++){const t=this.deps[e];if(t.computed&&(N(t.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),B()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=M,t=x;try{return M=!0,x=this,this._runnings++,P(this),this.fn()}finally{R(this),this._runnings--,x=t,M=e}}stop(){this.active&&(P(this),R(this),this.onStop&&this.onStop(),this.active=!1)}};function N(e){return e.value}function P(e){e._trackId++,e._depsLength=0}function R(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t<e.deps.length;t++)I(e.deps[t],e);e.deps.length=e._depsLength}}function I(e,t){const n=e.get(t);void 0!==n&&t._trackId!==n&&(e.delete(t),0===e.size&&e.cleanup())}function C(e,t){e.effect instanceof A&&(e=e.effect.fn);const r=new A(e,n,()=>{r.dirty&&r.run()});t&&(s(r,t),t.scope&&T(r,t.scope)),t&&t.lazy||r.run();const o=r.run.bind(r);return o.effect=r,o}var M=!0,V=0,W=[];function z(){W.push(M),M=!1}function B(){const e=W.pop();M=void 0===e||e}function D(){V++}function K(){for(V--;!V&&q.length;)q.shift()()}function F(e,t,n){if(t.get(e)!==e._trackId){t.set(e,e._trackId);const n=e.deps[e._depsLength];n!==t?(n&&I(n,e),e.deps[e._depsLength++]=t):e._depsLength++}}var q=[];function U(e,t,n){D();for(const s of e.keys()){let n;s._dirtyLevel<t&&(null!=n?n:n=e.get(s)===s._trackId)&&(s._shouldSchedule||(s._shouldSchedule=0===s._dirtyLevel),s._dirtyLevel=t),s._shouldSchedule&&(null!=n?n:n=e.get(s)===s._trackId)&&(s.trigger(),s._runnings&&!s.allowRecurse||2===s._dirtyLevel||(s._shouldSchedule=!1,s.scheduler&&q.push(s.scheduler)))}K()}var H=(e,t)=>{const n=new Map;return n.cleanup=e,n.computed=t,n},J=new WeakMap,Z=Symbol("");function G(e,t,n){if(M&&x){let t=J.get(e);t||J.set(e,t=new Map);let s=t.get(n);s||t.set(n,s=H(()=>t.delete(n))),F(x,s)}}function Q(e,t,n,s,r,o){const i=J.get(e);if(!i)return;let l=[];if("length"===n&&c(e)){const e=Number(s);i.forEach((t,n)=>{("length"===n||!u(n)&&n>=e)&&l.push(t)})}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":c(e)?h(n)&&l.push(i.get("length")):l.push(i.get(Z));break;case"delete":c(e)||l.push(i.get(Z))}D();for(const c of l)c&&U(c,4);K()}var X=t("__proto__,__v_isRef,__isVue"),Y=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(u)),ee=te();function te(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...e){const n=me(this);for(let t=0,r=this.length;t<r;t++)G(n,0,t+"");const s=n[t](...e);return-1===s||!1===s?n[t](...e.map(me)):s}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...e){z(),D();const n=me(this)[t].apply(this,e);return K(),B(),n}}),e}function ne(e){u(e)||(e=String(e));const t=me(this);return G(t,0,e),t.hasOwnProperty(e)}var se=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const s=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!s;if("__v_isReadonly"===t)return s;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(s?r?fe:ue:r?ae:le).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=c(e);if(!s){if(o&&i(ee,t))return Reflect.get(ee,t,n);if("hasOwnProperty"===t)return ne}const l=Reflect.get(e,t,n);return(u(t)?Y.has(t):X(t))?l:(s||G(e,0,t),r?l:_e(l)?o&&h(t)?l:l.value:f(l)?s?function(e){return he(e,!0,ce,null,ue)}(l):de(l):l)}},re=class extends se{constructor(e=!1){super(!1,e)}set(e,t,n,s){let r=e[t];if(!this._isShallow){const t=ve(r);if(function(e){return!(!e||!e.__v_isShallow)}(n)||ve(n)||(r=me(r),n=me(n)),!c(e)&&_e(r)&&!_e(n))return!t&&(r.value=n,!0)}const o=c(e)&&h(t)?Number(t)<e.length:i(e,t),l=Reflect.set(e,t,n,s);return e===me(s)&&(o?b(n,r)&&Q(e,"set",t,n):Q(e,"add",t,n)),l}deleteProperty(e,t){const n=i(e,t),s=(e[t],Reflect.deleteProperty(e,t));return s&&n&&Q(e,"delete",t,void 0),s}has(e,t){const n=Reflect.has(e,t);return u(t)&&Y.has(t)||G(e,0,t),n}ownKeys(e){return G(e,0,c(e)?"length":Z),Reflect.ownKeys(e)}},oe=class extends se{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ie=new re,ce=new oe,le=new WeakMap,ae=new WeakMap,ue=new WeakMap,fe=new WeakMap;function pe(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;default:return 0}}((e=>d(e).slice(8,-1))(e))}function de(e){return ve(e)?e:he(e,!1,ie,null,le)}function he(e,t,n,s,r){if(!f(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=pe(e);if(0===i)return e;const c=new Proxy(e,2===i?s:n);return r.set(e,c),c}function ve(e){return!(!e||!e.__v_isReadonly)}function me(e){const t=e&&e.__v_raw;return t?me(t):e}var ge=class{constructor(e,t,n,s){this.getter=e,this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new A(()=>e(this._value),()=>ye(this,2===this.effect._dirtyLevel?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=n}get value(){const e=me(this);var t,n;return e._cacheable&&!e.effect.dirty||!b(e._value,e._value=e.effect.run())||ye(e,4),t=e,M&&x&&(t=me(t),F(x,null!=(n=t.dep)?n:t.dep=H(()=>t.dep=void 0,t instanceof ge?t:void 0))),e.effect._dirtyLevel>=2&&ye(e,2),e._value}set value(e){this._setter(e)}};function ye(e,t=4,n,s){const r=(e=me(e)).dep;r&&U(r,t)}function _e(e){return!(!e||!0!==e.__v_isRef)}var be=new Map,we=new Map,xe=new Map,$e=new Map,ke=new Set,Oe=[],Se=!1,Ee=()=>Se||"undefined"!=typeof window&&!1===window.__LITE_VUE_DEVTOOLS__,Le={"scope:mount":new Set,"scope:unmount":new Set,"store:register":new Set,"plugin:install":new Set,flush:new Set},je=(e,...t)=>{Le[e].forEach(e=>e(...t))},Te=(e,t,s,r)=>Ee()?n:(be.set(e,t),s&&we.set(e,s),r&&xe.set(e,r),je("scope:mount",e,t),()=>{be.delete(e)&&(we.delete(e),xe.delete(e),je("scope:unmount",e))}),Ae={scopes:be,exps:we,names:xe,stores:$e,components:ke,plugins:Oe,getScopeByName(e){for(const[t,n]of xe)if(n===e)return be.get(t)},getScope(e){let t=1===e.nodeType?e:e.parentElement;for(;t;){const e=be.get(t);if(e)return e;t=t.parentElement}},on:(e,t)=>(Le[e].add(t),()=>Le[e].delete(t)),off(e,t){Le[e].delete(t)}};"undefined"==typeof window||Ee()||(window.__LITE_VUE__=Ae);var Ne,Pe=[],Re=(e,t)=>{for(const s of[...Pe])try{s(e,t)}catch(n){}Pe.length||console.error(e)},Ie=new WeakSet,Ce=e=>{Ie.add(e),e.effect&&function(e){e.effect.stop()}(e)},Me=!1,Ve=0,We=new Set,ze=Promise.resolve(),Be=e=>ze.then(e),De=e=>(e.i=Ve++,e),Ke=e=>{e.i??De(e),We.add(e),Me||(Me=!0,Be(Fe))},Fe=()=>{const e=new Map;for(;We.size;)for(const n of[...We].sort((e,t)=>e.i-t.i)){if(We.delete(n),Ie.has(n))continue;const s=(e.get(n)||0)+1;if(e.set(n,s),s>100)Re(Error("update loop"),{phase:"effect"});else try{n()}catch(t){Re(t,{phase:"effect"})}}Me=!1,Le.flush.size&&!Ee()&&je("flush")},qe=0,Ue=()=>{const e=Object.create(null);return(t="id")=>e[t]||(e[t]=`${t}-${++qe}`)},He=e=>(t,n,s)=>{const o="function"==typeof t?t:()=>t.split(".").reduce((e,t)=>null==e?e:e[t],e.scope);let i,c=!1;const l=e.effect(()=>{const e=o(),t=i;if(i=e,c?b(e,t):s?.immediate){z();try{n(e,t)}finally{B()}}c=!0});return()=>{Ce(l),r(e.effects,l)}},Je=/^(spellcheck|draggable|translate|form|list|type)$/,Ze=/^(readonly|novalidate|formnovalidate|allowfullscreen|playsinline)$/,Ge=({el:e,get:t,effect:n,arg:s,modifiers:r})=>{let o;s&&"class"!==s||"_class"in e||(e._class=e.getAttribute("class")),n(()=>{let n=t();if(s)r?.camel&&(s=g(s)),Qe(e,s,n,o);else{for(const t in n)Qe(e,t,n[t],o&&o[t]);for(const t in o)n&&t in n||Qe(e,t,null,o[t])}o="[object Object]"===d(n)?{...n}:n,s||(e.__bound=o)})},Qe=(e,t,n,s)=>{if("class"===t)e.setAttribute("class",E(e._class?[e._class,n]:n)||"");else if("style"===t){const{style:t}=e,r=Xe(n),o=Xe(s);for(const e in r)et(t,e,r[e]);for(const e in o)null==r[e]&&et(t,e,"");"_vod"in e&&(("display"in r||"display"in o)&&(e._vod=t.display),e._vsh&&(t.display="none")),t.cssText||e.removeAttribute("style")}else e instanceof SVGElement||!(t in e)||Je.test(t)?"true-value"===t?e._trueValue=n:"false-value"===t?e._falseValue=n:(Ze.test(t)&&(n=n||""===n?"":null),null!=n?e.setAttribute(t,n):e.removeAttribute(t)):(e[t]=null==n&&"string"==typeof e[t]?"":n,null==n&&e.removeAttribute(t),"value"===t&&(e._value=n))},Xe=e=>a(e=w(e))?S(e):e||{},Ye=/\s*!important$/,et=(e,t,n)=>{c(n)?n.forEach(n=>et(e,t,n)):t.startsWith("--")?e.setProperty(t,n):Ye.test(n)?e.setProperty(_(t),n.replace(Ye,""),"important"):e[t]=n},tt=Object.create(null),nt=0,st=e=>e.replace(/^return\(([^]*)\)$/,"$1"),rt=(e,t,n,s)=>ot(e,`return(${t})`,n,s),ot=(e,t,n,s)=>{let r=tt[t];r||(++nt>1e3&&(tt=Object.create(null),nt=1),r=tt[t]=it(t,n,s));try{return r(e,n,n&&(e=>(t,n)=>e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0})))(n))}catch(o){Re(o,{phase:"expression",expression:s?.expression??st(t),source:s?.source,el:s?.el??n,scope:e})}},it=(e,t,s)=>{try{return new Function("$data","$el","$dispatch",`with($data){${e}}`)}catch(r){return Re(r,{phase:"compile",expression:s?.expression??st(e),source:s?.source,el:s?.el??t}),n}},ct=Object.create(null),lt=0,at=/^\s*(async\s*)?(\([^)]*?\)|[\w$]+)\s*=>|^\s*(async\s+)?function\b/,ut=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,ft=["ctrl","shift","alt","meta"],pt={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)=>ft.some(n=>e[`${n}Key`]&&!t[n])},dt={esc:"escape",space:" ",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",delete:"backspace"},ht=/^(stop|prevent|self|ctrl|shift|alt|meta|left|middle|right|exact|once|capture|passive|window|document|outside|debounce(-\d+)?|throttle(-\d+)?|prop-.+|name-.+)$/,vt=({el:e,get:t,exp:n,arg:s,modifiers:r})=>{if(!s)return;const o=/\bawait\b/.test(n)?"async ":"";let i,c=ut.test(n)||at.test(n)?t(`(e => (${n})(e))`):(e=>{const t=ct[e];if(void 0!==t)return t;++lt>1e3&&(ct=Object.create(null),lt=1);try{return new Function(`return (${e})`),ct[e]=!0}catch{return ct[e]=!1}})(n)?t(`(${o}$event => (${n}))`):t(`(${o}$event => { ${n} })`);if("mounted"===s||"vue:mounted"===s){let e=!0;return Be(()=>{e&&c()}),()=>{e=!1}}if("unmounted"===s||"vue:unmounted"===s)return()=>c();if(r){"click"===s&&(r.right&&(s="contextmenu"),r.middle&&(s="mouseup"));let t=c;for(const e in r){let n=/^debounce(?:-(\d+))?$/.exec(e);if(n){const e=t,s=n[1]?+n[1]:250;t=t=>{clearTimeout(i),i=setTimeout(e,s,t)};continue}if(n=/^throttle(?:-(\d+))?$/.exec(e),n){const e=t,s=n[1]?+n[1]:250;let r=0;t=t=>{const n=Date.now();n-r>=s&&(r=n,e(t))}}}const n=Object.keys(r).filter(e=>!ht.test(e)||e in dt);c=s=>{if(!r.outside||!e.contains(s.target)){if("key"in s&&n.length){const e=_(s.key);if(!n.some(t=>t===e||dt[t]===e))return}for(const e in r){const t=pt[e];if(t&&t(s,r))return;if(e.startsWith("prop-")&&"propertyName"in s&&s.propertyName!==e.slice(5))return;if(e.startsWith("name-")&&"animationName"in s&&s.animationName!==e.slice(5))return}return r.once&&l.removeEventListener(a,c,r),t(s)}}}const l=r?.window?window:r?.document||r?.outside?document:e,a=s;return l.addEventListener(a,c,{...r,once:!1}),()=>{clearTimeout(i),l.removeEventListener(a,c,r)}},mt=({el:e,get:t,effect:n})=>{n(()=>{e.textContent=gt(t())})},gt=e=>null==e?"":f(e)?JSON.stringify(e,null,2):String(e),yt=(e,t)=>{const n=e.getAttribute(t);return null!=n&&e.removeAttribute(t),n},_t=e=>"_value"in e?e._value:e.value,bt=(e,t)=>{const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t},wt=e=>{e.target.composing=!0},xt=e=>{const t=e.target;t.composing&&(t.composing=!1,$t(t,"input"))},$t=(e,t)=>{e.dispatchEvent(new Event(t,{bubbles:!0,cancelable:!0}))},kt=new WeakMap,Ot=e=>{const t=Ne;return Ne=e,t},St=(e,t=Ne)=>{if(!t)return;const n=kt.get(t);n?n.push(e):kt.set(t,[e])},Et=e=>{const t=kt.get(e);if(t){kt.delete(e);for(const e of t)e()}let n=e.firstChild;for(;n;){const e=n.nextSibling;Et(n),n=e}},Lt={bind:Ge,on:vt,show:({el:e,get:t,effect:n})=>{e._vod="none"==e.style.display?"":e.style.display,n(()=>{e._vsh=!t(),e.style.display=e._vsh?"none":e._vod})},text:mt,html:({el:e,get:t,effect:n})=>{n(()=>{e.innerHTML=t()??""})},model:({el:e,exp:t,get:n,effect:s,modifiers:r})=>{const o=e.type,i=n(`(val) => { ${t} = val }`),{trim:l,number:a="number"===o,lazy:u,fill:f}=r||{},p=e=>a?(e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e):e,d=[],h=(t,n)=>d.push(((e,t,n,s)=>(e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)))(e,t,n));let v,m,g=!1;if("SELECT"===e.tagName){const t=e;h("change",v=()=>{const e=Array.prototype.filter.call(t.options,e=>e.selected).map(e=>p(_t(e)));i(t.multiple?e:e[0])}),m=()=>{const e=n(),s=t.multiple;for(let n=0,r=t.options.length;n<r;n++){const r=t.options[n],o=_t(r);if(s)r.selected=c(e)&&j(e,o)>-1;else if(L(_t(r),e))return void(t.selectedIndex!==n&&(t.selectedIndex=n))}s||-1===t.selectedIndex||(t.selectedIndex=-1)}}else if("checkbox"===o)h("change",v=()=>{const t=n(),s=e.checked;if(c(t)){const n=_t(e),r=j(t,n),o=-1!==r;if(s&&!o)i(t.concat(n));else if(!s&&o){const e=[...t];e.splice(r,1),i(e)}}else i(bt(e,s))}),m=()=>{const t=n();c(t)?e.checked=j(t,_t(e))>-1:e.checked=L(t,bt(e,!0))};else if("radio"===o)h("change",v=()=>i(_t(e))),m=()=>{e.checked=L(n(),_t(e))};else{g=!0;const t=e=>p(l?e.trim():e);v=()=>i(t(e.value));let s,o=i;for(const e in r||{}){const t=/^debounce(?:-(\d+))?$/.exec(e);if(t){const e=t[1]?+t[1]:250;o=t=>{clearTimeout(s),s=setTimeout(i,e,t)},d.push(()=>clearTimeout(s))}}h("compositionstart",wt),h("compositionend",xt),h(u?"change":"input",()=>{e.composing||o(t(e.value))}),l&&h("change",()=>{e.value=e.value.trim()}),m=()=>{if(e.composing)return;const s=e.value,r=n()??"";document.activeElement===e&&t(s)===r||s!==r&&(e.value=r)}}if(f){const t=n();null!=t&&""!==t||!e.value||"radio"===o&&!e.checked||v()}const y=s(m);if(!g){const t=new MutationObserver(()=>y());t.observe(e,{attributes:!0,childList:!0,subtree:!0}),d.push(()=>t.disconnect())}return()=>d.forEach(e=>e())},effect:({el:e,ctx:t,exp:n,effect:s})=>{let r=!0;const o=Dt;return Be(()=>{if(!r)return;const i=Ot(e);try{Ft(o,()=>s(()=>ot(t.scope,n,e,{source:"v-effect",el:e})))}finally{Ot(i)}}),()=>{r=!1}}},jt=(e,t,n)=>{const s=new Comment("v-if");e.before(s);const o=[{exp:t.trim()||"0",el:e}];let i,c;for(;(i=e.nextElementSibling)&&(c=null,""===yt(i,"v-else")||null!=(c=yt(i,"v-else-if")));)i.remove(),o.push({exp:null==c?c:c.trim()||"0",el:i});const l=e.nextSibling;let a;e.remove(),Ot(s);let u=-1;const f=()=>{var e,t;a&&(s.parentNode||a.el.before(s),e=d,t=a.el,r(kt.get(t)||[],e),a.remove(),a=void 0)};let p;const d=()=>Ce(p);return p=n.effect(()=>{for(let e=0;e<o.length;e++){const{exp:t,el:r}=o[e];if(!t||rt(n.scope,t,r,{source:"v-if",el:r})){if(e!==u){f();const t=s.parentNode;a=new sn(r,n),a.insert(t,s),St(d,a.el),a.el.parentNode===t&&s.remove(),u=e}return}}u=-1,f()}),St(d,s),l},Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,At=/,([^,}\]]*)(?:,([^,}\]]*))?$/,Nt=/^\(|\)$/g,Pt=/^[{[]\s*((?:[\w_$]+\s*,?\s*)+)[\]}]$/,Rt=(e,t,n)=>{const s=t.match(Tt);if(!s)return;const r=e.nextSibling,o=new Text("");e.replaceWith(o);const i=()=>o.parentNode;Ot(o);const l=s[2].trim();let a,u,p,d,h=s[1].trim().replace(Nt,"").trim(),v=!1,m="key",g=e.getAttribute(m)||e.getAttribute(m=":key")||e.getAttribute(m="v-bind:key");g&&(e.removeAttribute(m),"key"===m&&(g=JSON.stringify(g))),(d=h.match(At))&&(h=h.replace(At,"").trim(),u=d[1].trim(),d[2]&&(p=d[2].trim())),(d=h.match(Pt))&&(a=d[1].split(",").map(e=>e.trim()),v="["===h[0]);let y,_,b,w=!1;const x=(t,s,r,o)=>{const i={};a?a.forEach((e,t)=>i[e]=s?.[v?t:e]):i[h]=s,o?(u&&(i[u]=o),p&&(i[p]=r)):u&&(i[u]=r);const c=g?rt(Object.setPrototypeOf(i,n.scope),g,e,{source:":key",el:e}):r;return t.set(c,r),{data:i,key:c}},$=(t,s)=>{const r=new sn(e,tn(n,t.data));return r.key=t.key,r.insert(i(),s),r};return n.effect(()=>{const t=rt(n.scope,l,e,{source:"v-for",el:e}),s=b;if([_,b]=(e=>{const t=new Map,n=[];if(c(e))for(let s=0;s<e.length;s++)n.push(x(t,e[s],s));else if("number"==typeof e)for(let s=0;s<e;s++)n.push(x(t,s+1,s));else if(f(e)){let s=0;for(const r in e)n.push(x(t,e[r],s++,r))}return[n,t]})(t),w){for(let r=0;r<y.length;r++){const e=y[r].key;b.has(e)&&s.get(e)===r||y[r].remove()}const e=[];let t,n=_.length;for(;n--;){const r=_[n],c=s.get(r.key);s.delete(r.key);const l=t?t.el:o;let a;null==c?a=$(r,l):(a=y[c],Object.assign(a.ctx.scope,r.data),c!==n&&(a.end||a.el).nextSibling!==l&&a.insert(i(),l)),e[n]=t=a}y=e}else y=_.map(e=>$(e,o)),w=!0}),r},It=({el:e,ctx:{scope:{$refs:t}},get:n,effect:s})=>{let r;return s(()=>{const s=n();t[s]=e,r&&s!==r&&delete t[r],r=s}),()=>{r&&delete t[r]}},Ct=["visible","idle","interaction"],Mt=["[v-scope]",...Ct.map(e=>`[v-scope\\.${e}]`)].join(","),Vt=["pointerdown","keydown","focusin"],Wt=(e,t,s,o)=>{const i=Ct.find(t=>e.hasAttribute(`v-scope.${t}`));if(!i)return!1;const c=`v-scope.${i}`,l=((e,t,s)=>{let r=!1;const o=()=>{r||(r=!0,i(),s())};let i=n;if("visible"===t&&"function"==typeof IntersectionObserver){const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()});t.observe(e),i=()=>t.disconnect()}else if("interaction"!==t){const e=window.requestIdleCallback,t=e?e(o):setTimeout(o);i=()=>e?window.cancelIdleCallback(t):clearTimeout(t)}else{for(const t of Vt)e.addEventListener(t,o);i=()=>{for(const t of Vt)e.removeEventListener(t,o)}}return()=>{r=!0,i()}})(e,i,()=>{e.hasAttribute(c)&&(e.setAttribute("v-scope",e.getAttribute(c)),e.removeAttribute(c),s(e,t,o))});return t.cleanups.push(l),St(()=>{r(t.cleanups,l),l()}),!0},zt=/^(?:v-|:|@)/,Bt=/\.([\w-]+)/g,Dt=!1,Kt=(e,t,n)=>{e.cleanups.push(t),St(()=>{const n=e.cleanups.indexOf(t);n>-1&&(e.cleanups.splice(n,1),t())},n)},Ft=(e,t)=>{const n=Dt;Dt=e;try{t()}finally{Dt=n}},qt=(e,t,n)=>Ft(n,()=>Ut(e,t)),Ut=(e,t)=>{const n=Ot(e);try{return Ht(e,t)}finally{Ot(n)}},Ht=(e,t)=>{const n=e.nodeType;if(1===n){const n=e;if(!n.hasAttributes())return Jt(n,t);if(n.hasAttribute("v-pre"))return;if(Wt(n,t,qt,Dt))return;let s;if(yt(n,"v-cloak"),null!=(s=yt(n,"v-if")))return jt(n,s,t);if(s=yt(n,"v-for"))return Rt(n,s,t);const r=yt(n,"v-name");let o;if(s=yt(n,"v-teleport")){const e=Qt(s,n,"v-teleport");if(e){o=n.nextSibling;const s=n.__marker=new Text("");n.before(s),e.appendChild(n),Kt(t,()=>{Et(n),n.remove()},s)}}if((s=yt(n,"v-scope"))||""===s){const e=(s?rt(t.scope,s,n,{source:"v-scope",el:n}):{})||{};t=tn(t,e),n.__ctx=t;const o=Te(n,t.scope,s||void 0,r||void 0);Kt(t,()=>{o(),delete n.__ctx}),e.$template&&Xt(n,e.$template)}const i=Dt;null!=yt(n,"v-once")&&(Dt=!0),(s=yt(n,"ref"))&&Gt(n,It,`"${s}"`,t),Jt(n,t);const c=[];for(const{name:e,value:l}of[...n.attributes])zt.test(e)&&"v-cloak"!==e&&("v-model"===e||e.startsWith("v-model.")?c.unshift([e,l]):"@"===e[0]||/^v-on\b/.test(e)?c.push([e,l]):Zt(n,e,l,t));for(const[e,l]of c)Zt(n,e,l,t);return Dt=i,o}if(3===n){const n=e.data;if(n.includes(t.delimiters[0])){let s,r=[],o=0;for(;s=t.delimitersRE.exec(n);){const e=n.slice(o,s.index);e&&r.push(JSON.stringify(e)),r.push(`$s(${s[1]})`),o=s.index+s[0].length}o<n.length&&r.push(JSON.stringify(n.slice(o))),Gt(e,mt,r.join("+"),t,void 0,void 0,"{{ }}",n.trim())}}else 11===n&&Jt(e,t)},Jt=(e,t)=>{let n=e.firstChild;for(;n;)n=Ut(n,t)||n.nextSibling},Zt=(e,t,n,s)=>{let r,o,i;const c=t;if(":"===(t=t.replace(Bt,(e,t)=>((i||(i={}))[t]=!0,"")))[0])r=Ge,o=t.slice(1);else if("@"===t[0])r=vt,o=t.slice(1);else{const e=t.indexOf(":"),n=e>0?t.slice(2,e):t.slice(2);r=Lt[n]||s.dirs[n],o=e>0?t.slice(e+1):void 0}r&&(r===Ge&&"ref"===o&&(r=It),Gt(e,r,n,s,o,i,c),e.removeAttribute(c))},Gt=(e,t,n,s,r,o,i,c)=>{const l={source:i,el:e,expression:c},a=t=>Re(t,{phase:"handler",source:i,el:e,expression:n,scope:s.scope}),u=t=>{const r=rt(s.scope,t??n,e,l);return t&&"function"==typeof r?(...t)=>{const n=Ot(e);try{const e=r(...t);return e instanceof Promise&&e.catch(a),e}catch(s){a(s)}finally{Ot(n)}}:r};let f;try{f=t({el:e,get:u,effect:s.effect,ctx:s,exp:n,arg:r,modifiers:o})}catch(p){return void Re(p,{phase:"directive",source:i,el:e,expression:n})}f&&Kt(s,f)},Qt=(e,t,n)=>{try{return document.querySelector(e)}catch(s){Re(s,{phase:"directive",source:n,el:t,expression:e})}},Xt=(e,t)=>{if("#"===t[0]){const n=Qt(t,e,"v-scope");if(!(n instanceof HTMLTemplateElement))return;return void e.appendChild(n.content.cloneNode(!0))}e.innerHTML=t},Yt=e=>{const t={delimiters:["{{","}}"],delimitersRE:/\{\{([^]+?)\}\}/g,...e,scope:e?e.scope:de({}),dirs:e?e.dirs:{},effects:[],blocks:[],cleanups:[],effect:e=>{if(Dt){const t=()=>Ft(!0,e);return Ke(t),t}const n=De(C(e,{scheduler:()=>Ke(n),lazy:!0}));return t.effects.push(n),St(()=>{Ce(n),r(t.effects,n)}),n(),n}};return t},en=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),tn=(e,t={})=>{const n=e.scope,s=Object.create(n);Object.defineProperties(s,Object.getOwnPropertyDescriptors(t)),en(s,"$refs",Object.create(n.$refs));const r=de(new Proxy(s,{set:(e,t,s,o)=>o!==r||i(e,t)?Reflect.set(e,t,s,o):Reflect.set(n,t,s)})),o={...e,scope:r};return en(s,"$watch",He(o)),en(s,"$id",Ue()),nn(r,s),o},nn=(e,t=e)=>{for(const n of Object.keys(t)){const s=Object.getOwnPropertyDescriptor(t,n).value;"function"==typeof s&&(e[n]=s.bind(e))}},sn=class{get el(){return this.start||this.template.__marker||this.template}constructor(e,t,n=!1){this.isFragment=e instanceof HTMLTemplateElement,n?this.template=e:this.isFragment?this.template=e.content.cloneNode(!0):this.template=e.cloneNode(!0),n||(this.parentCtx=t,t.blocks.push(this)),this.ctx=Yt(t),Ut(this.template,this.ctx)}insert(e,t=null){if(this.isFragment)if(this.start){let n,s=this.start;for(;s&&(n=s.nextSibling,e.insertBefore(s,t),s!==this.end);)s=n}else this.start=new Text(""),this.end=new Text(""),e.insertBefore(this.end,t),e.insertBefore(this.start,this.end),e.insertBefore(this.template,this.end);else e.insertBefore(this.el,t);this.owned||(this.owned=!0,St(()=>this.discard(),this.el))}remove(){this.parentCtx&&r(this.parentCtx.blocks,this);const e=()=>{const e=this.start?this.start.parentNode:this.template.parentNode;if(e)if(this.start){let t,n=this.start;for(;n&&(t=n.nextSibling,e.removeChild(n),Et(n),n!==this.end);)n=t}else e.removeChild(this.template),Et(this.template);this.template.__marker?.remove(),this.teardown()},t=[];let n=this.start||this.template;for(;n;){const e=n.__leave;if(e&&t.push(e()),!this.start||n===this.end)break;n=n.nextSibling}t.length?Promise.all(t).then(e):e()}discard(){this.parentCtx&&r(this.parentCtx.blocks,this),this.teardown()}teardown(){this.ctx.blocks.splice(0).forEach(e=>{e.teardown()}),this.ctx.effects.splice(0).forEach(Ce),this.ctx.cleanups.splice(0).forEach(e=>e())}},rn=de(Object.create(null)),on=e=>e.replace(/[-.*+?^${}()|[\]/\\]/g,"\\$&"),cn=e=>{const t=Yt();if("function"==typeof e&&(e=e()),e&&(t.scope=de(e),nn(t.scope),e.$delimiters)){const[n,s]=t.delimiters=e.$delimiters;t.delimitersRE=new RegExp(on(n)+"([^]+?)"+on(s),"g")}en(t.scope,"$s",gt),en(t.scope,"$nextTick",Be),en(t.scope,"$refs",Object.create(null)),en(t.scope,"$store",rn),en(t.scope,"$watch",He(t)),en(t.scope,"$id",Ue()),Object.defineProperty(t.scope,"$root",{value:t.scope,enumerable:!1});const n=Object.create(null);let s=[];const o=[],i=new Set,c=[],l=[],a={get scope(){return t.scope},directive(e,n){return n?(t.dirs[e]=n,this):t.dirs[e]},component(e,s){return s?(!(e in n)&&e in t.scope||(n[e]=s,(e=>{Ee()||ke.add(e)})(e),t.scope[e]=s),this):n[e]},onError(e){const t=(n=e,Pe.push(n),()=>{const e=Pe.indexOf(n);e>-1&&Pe.splice(e,1)});var n;return l.push(t),()=>{const e=l.indexOf(t);e>-1&&l.splice(e,1),t()}},use(e,t){if(!i.has(e)){i.add(e);const n=("function"==typeof e?e:e.install)(a,t);"function"==typeof n&&c.push(n)}return a},mount(e){if("string"==typeof e){const t=document.querySelector(e);if(!t)return;e=t}let n;n=(e=e||document.documentElement).matches(Mt)?[e]:[...e.querySelectorAll(Mt)].filter(e=>!e.matches(`:where(${Mt}) *`)),n.length||(n=[e]),t.walk??=Ut,t.dispose??=Et;for(const o of n){const e=o.getAttribute("v-name"),n=new sn(o,t,!0);o.__ctx??=n.ctx,Ae.scopes.has(o)||o.matches(Mt)||n.ctx.cleanups.push(Te(o,n.ctx.scope,void 0,e||void 0)),s.push(n),St(()=>r(s,n),o),n.ctx.cleanups.push(()=>delete o.__ctx)}return this},unmount(e){if(null==e)return s.forEach(e=>e.teardown()),s=[],t.effects.splice(0).forEach(Ce),o.splice(0).forEach(e=>e()),c.splice(0).forEach(e=>{try{e()}catch(t){Re(t,{phase:"teardown",source:"plugin"})}}),i.clear(),void l.splice(0).forEach(e=>e());const n="string"==typeof e?document.querySelector(e):e;if(!n)return;const r=[];for(const t of s){const e=t.template;n.contains(e)?t.teardown():r.push(t)}s=r}};return a},ln=document.currentScript;ln&&ln.hasAttribute("init")&&cn().mount(),e.computed=function(e,t,s=!1){let r,o;const i="function"==typeof e;return i?(r=e,o=n):(r=e.get,o=e.set),new ge(r,o,i||!o,s)},e.createApp=cn,e.devtools=Ae,e.disableDevtools=()=>{Se=!0,be.clear(),we.clear(),xe.clear(),$e.clear(),ke.clear(),Oe.length=0;for(const e in Le)Le[e].clear();"undefined"!=typeof window&&window.__LITE_VUE__===Ae&&delete window.__LITE_VUE__},e.nextTick=Be,e.reactive=de,e.store=(e,t)=>(void 0!==t&&(rn[e]=t,"function"==typeof rn[e].init&&rn[e].init(),((e,t)=>{Ee()||($e.set(e,t),je("store:register",e,t))})(e,rn[e])),rn[e]),e.watchEffect=e=>{const t=C(e,{scheduler:()=>Ke(t),lazy:!0});t.i=1/0;try{t()}catch(n){throw Ce(t),n}return()=>Ce(t)}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueFocus=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});return e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:
|
|
1
|
+
var LiteVueFocus=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));return e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let o=!0;return n(()=>{const n=!!t();Promise.resolve().then(()=>{o&&n&&(e.focus(),i?.select&&e.select&&e.select())})}),()=>{o=!1}}),e.directive("trap",({el:e,get:i,effect:o})=>{let r=!1,c=null;const s=()=>[...e.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(n),a=n=>{if("Tab"!==n.key||t.at(-1)!==a)return;const i=s();if(!i.length)return void n.preventDefault();const o=i[0],r=i[i.length-1],c=document.activeElement;e.contains(c)?!n.shiftKey||c!==o&&c!==e?n.shiftKey||c!==r||(n.preventDefault(),o.focus()):(n.preventDefault(),r.focus()):(n.preventDefault(),o.focus())},l=()=>{r=!1,t.splice(t.indexOf(a),1),document.removeEventListener("keydown",a,!0),c&&c.focus&&c.focus()};return o(()=>{const n=!!i();n&&!r?(r=!0,c=document.activeElement,t.push(a),document.addEventListener("keydown",a,!0),Promise.resolve().then(()=>{r&&(s()[0]||e).focus()})):!n&&r&&l()}),()=>{r&&l()}})},e}({});
|
package/dist/plugins/focus.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=e=>
|
|
1
|
+
var e=[],t=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name)),n=n=>{n.directive("focus",({el:e,get:t,effect:n,modifiers:i})=>{let r=!0;return n(()=>{const n=!!t();Promise.resolve().then(()=>{r&&n&&(e.focus(),i?.select&&e.select&&e.select())})}),()=>{r=!1}}),n.directive("trap",({el:n,get:i,effect:r})=>{let o=!1,c=null;const s=()=>[...n.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(t),a=t=>{if("Tab"!==t.key||e.at(-1)!==a)return;const i=s();if(!i.length)return void t.preventDefault();const r=i[0],o=i[i.length-1],c=document.activeElement;n.contains(c)?!t.shiftKey||c!==r&&c!==n?t.shiftKey||c!==o||(t.preventDefault(),r.focus()):(t.preventDefault(),o.focus()):(t.preventDefault(),r.focus())},l=()=>{o=!1,e.splice(e.indexOf(a),1),document.removeEventListener("keydown",a,!0),c&&c.focus&&c.focus()};return r(()=>{const t=!!i();t&&!o?(o=!0,c=document.activeElement,e.push(a),document.addEventListener("keydown",a,!0),Promise.resolve().then(()=>{o&&(s()[0]||n).focus()})):!t&&o&&l()}),()=>{o&&l()}})};export{n as focus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueFocus={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:o})=>{let i=!0;return n(()=>{const n=!!t();Promise.resolve().then(()=>{i&&n&&(e.focus(),o?.select&&e.select&&e.select())})}),()=>{i=!1}}),e.directive("trap",({el:e,get:
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueFocus={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t=[],n=(e,t,n)=>"radio"!==e.type||!e.name||e===(n.find(t=>"radio"===t.type&&t.name===e.name&&t.checked)||n.find(t=>"radio"===t.type&&t.name===e.name));e.focus=e=>{e.directive("focus",({el:e,get:t,effect:n,modifiers:o})=>{let i=!0;return n(()=>{const n=!!t();Promise.resolve().then(()=>{i&&n&&(e.focus(),o?.select&&e.select&&e.select())})}),()=>{i=!1}}),e.directive("trap",({el:e,get:o,effect:i})=>{let r=!1,c=null;const s=()=>[...e.querySelectorAll("a[href],area[href],button,input:not([type=hidden]),select,textarea,summary,iframe,audio[controls],video[controls],[contenteditable],[tabindex]")].filter(e=>e.tabIndex>=0&&!e.matches(":disabled,[inert] *")&&!1!==e.checkVisibility?.({visibilityProperty:!0})).filter(n),f=n=>{if("Tab"!==n.key||t.at(-1)!==f)return;const o=s();if(!o.length)return void n.preventDefault();const i=o[0],r=o[o.length-1],c=document.activeElement;e.contains(c)?!n.shiftKey||c!==i&&c!==e?n.shiftKey||c!==r||(n.preventDefault(),i.focus()):(n.preventDefault(),r.focus()):(n.preventDefault(),i.focus())},l=()=>{r=!1,t.splice(t.indexOf(f),1),document.removeEventListener("keydown",f,!0),c&&c.focus&&c.focus()};return i(()=>{const n=!!o();n&&!r?(r=!0,c=document.activeElement,t.push(f),document.addEventListener("keydown",f,!0),Promise.resolve().then(()=>{r&&(s()[0]||e).focus()})):!n&&r&&l()}),()=>{r&&l()}})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LiteVueMask=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let r="",
|
|
1
|
+
var LiteVueMask=function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let r="",l="",i=0;for(let a=0;a<n.length;a++){const o=t[n[a]];if(o){for(;i<e.length&&!o.test(e[i]);)i++;if(i>=e.length)break;r+=l+e[i++],l=""}else l+=n[a],e[i]===n[a]&&i++}return r};return e.mask=e=>{e.directive("mask",({el:e,exp:r})=>{const l=e,i=()=>{const{value:e,selectionStart:i}=l,a=n(e,r);if(a===e)return!1;if(l.value=a,null!=i&&document.activeElement===l){let o=n(e.slice(0,i),r).length;for(;o<a.length&&!t[r[o]];)o++;l.setSelectionRange(o,o)}return!0};e.addEventListener("input",i),i();let a=!0;return Promise.resolve().then(()=>{a&&i()&&e.dispatchEvent(new Event("input"))}),()=>{a=!1,e.removeEventListener("input",i)}})},e}({});
|
package/dist/plugins/mask.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},t=(t,n)=>{let r="",l="",i=0;for(let s=0;s<n.length;s++){const a=e[n[s]];if(a){for(;i<t.length&&!a.test(t[i]);)i++;if(i>=t.length)break;r+=l+t[i++],l=""}else l+=n[s],t[i]===n[s]&&i++}return r},n=
|
|
1
|
+
var e={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},t=(t,n)=>{let r="",l="",i=0;for(let s=0;s<n.length;s++){const a=e[n[s]];if(a){for(;i<t.length&&!a.test(t[i]);)i++;if(i>=t.length)break;r+=l+t[i++],l=""}else l+=n[s],t[i]===n[s]&&i++}return r},n=n=>{n.directive("mask",({el:n,exp:r})=>{const l=n,i=()=>{const{value:n,selectionStart:i}=l,s=t(n,r);if(s===n)return!1;if(l.value=s,null!=i&&document.activeElement===l){let a=t(n.slice(0,i),r).length;for(;a<s.length&&!e[r[a]];)a++;l.setSelectionRange(a,a)}return!0};n.addEventListener("input",i),i();let s=!0;return Promise.resolve().then(()=>{s&&i()&&n.dispatchEvent(new Event("input"))}),()=>{s=!1,n.removeEventListener("input",i)}})};export{n as mask};
|
package/dist/plugins/mask.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueMask={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let i="",o="",l=0;for(let r=0;r<n.length;r++){const s=t[n[r]];if(s){for(;l<e.length&&!s.test(e[l]);)l++;if(l>=e.length)break;i+=o+e[l++],o=""}else o+=n[r],e[l]===n[r]&&l++}return i};e.mask=e=>{e.directive("mask",({el:e,exp:
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).LiteVueMask={})}(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var t={9:/\d/,a:/[a-zA-Z]/,"*":/[a-zA-Z0-9]/},n=(e,n)=>{let i="",o="",l=0;for(let r=0;r<n.length;r++){const s=t[n[r]];if(s){for(;l<e.length&&!s.test(e[l]);)l++;if(l>=e.length)break;i+=o+e[l++],o=""}else o+=n[r],e[l]===n[r]&&l++}return i};e.mask=e=>{e.directive("mask",({el:e,exp:i})=>{const o=e,l=()=>{const{value:e,selectionStart:l}=o,r=n(e,i);if(r===e)return!1;if(o.value=r,null!=l&&document.activeElement===o){let s=n(e.slice(0,l),i).length;for(;s<r.length&&!t[i[s]];)s++;o.setSelectionRange(s,s)}return!0};e.addEventListener("input",l),l();let r=!0;return Promise.resolve().then(()=>{r&&l()&&e.dispatchEvent(new Event("input"))}),()=>{r=!1,e.removeEventListener("input",l)}})}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var LiteVueMedia = (function(exports, _aevantec_litevue) {
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
3
|
+
// src/plugins/media/index.ts
|
|
4
4
|
var DEFAULT_BREAKPOINTS = {
|
|
5
5
|
sm: 640,
|
|
6
6
|
md: 768,
|
|
@@ -110,7 +110,7 @@ var LiteVueMedia = (function(exports, _aevantec_litevue) {
|
|
|
110
110
|
if (typeof key === "number") return key;
|
|
111
111
|
if (key === "base") return 0;
|
|
112
112
|
if (NUMERIC.test(key)) return Number(key);
|
|
113
|
-
const alias = ALIASES[key];
|
|
113
|
+
const alias = scale[key] === void 0 ? ALIASES[key] : void 0;
|
|
114
114
|
if (alias !== void 0) return alias === "base" ? 0 : scale[alias];
|
|
115
115
|
return scale[key];
|
|
116
116
|
};
|
|
@@ -201,9 +201,9 @@ var LiteVueMedia = (function(exports, _aevantec_litevue) {
|
|
|
201
201
|
} }
|
|
202
202
|
});
|
|
203
203
|
/**
|
|
204
|
-
* Drops every live subscription; `activate()` rebuilds them on the next read
|
|
205
|
-
*
|
|
206
|
-
*
|
|
204
|
+
* Drops every live subscription; `activate()` rebuilds them on the next read.
|
|
205
|
+
* The scale is deliberately left alone — a page that configured one still
|
|
206
|
+
* wants it.
|
|
207
207
|
*/
|
|
208
208
|
var releaseSubscriptions = () => {
|
|
209
209
|
scaleSubs.forEach((s) => s.off());
|
|
@@ -243,9 +243,11 @@ var LiteVueMedia = (function(exports, _aevantec_litevue) {
|
|
|
243
243
|
enumerable: true,
|
|
244
244
|
configurable: true
|
|
245
245
|
});
|
|
246
|
-
return
|
|
246
|
+
return () => {
|
|
247
|
+
releaseSubscriptions();
|
|
248
|
+
state.tick++;
|
|
249
|
+
};
|
|
247
250
|
};
|
|
248
|
-
//#endregion
|
|
249
251
|
exports.defaultBreakpoints = defaultBreakpoints;
|
|
250
252
|
exports.media = media;
|
|
251
253
|
exports.mq = mq;
|