18 lines
105 KiB
JavaScript
18 lines
105 KiB
JavaScript
/**
|
|
* @vue/shared v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function _n(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ee={},wt=[],We=()=>{},Wr=()=>!1,hs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),yn=e=>e.startsWith("onUpdate:"),_e=Object.assign,wn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Xi=Object.prototype.hasOwnProperty,Q=(e,t)=>Xi.call(e,t),V=Array.isArray,xt=e=>ps(e)==="[object Map]",Kr=e=>ps(e)==="[object Set]",W=e=>typeof e=="function",ce=e=>typeof e=="string",ut=e=>typeof e=="symbol",ne=e=>e!==null&&typeof e=="object",Gr=e=>(ne(e)||W(e))&&W(e.then)&&W(e.catch),Jr=Object.prototype.toString,ps=e=>Jr.call(e),eo=e=>ps(e).slice(8,-1),Yr=e=>ps(e)==="[object Object]",xn=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,It=_n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},to=/-\w/g,lt=gs(e=>e.replace(to,t=>t.slice(1).toUpperCase())),so=/\B([A-Z])/g,vt=gs(e=>e.replace(so,"-$1").toLowerCase()),Zr=gs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Es=gs(e=>e?`on${Zr(e)}`:""),ot=(e,t)=>!Object.is(e,t),Xt=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},Qr=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},rn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Vn;const ms=()=>Vn||(Vn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Sn(e){if(V(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=ce(n)?oo(n):Sn(n);if(r)for(const i in r)t[i]=r[i]}return t}else if(ce(e)||ne(e))return e}const no=/;(?![^(]*\))/g,ro=/:([^]+)/,io=/\/\*[^]*?\*\//g;function oo(e){const t={};return e.replace(io,"").split(no).forEach(s=>{if(s){const n=s.split(ro);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function vs(e){let t="";if(ce(e))t=e;else if(V(e))for(let s=0;s<e.length;s++){const n=vs(e[s]);n&&(t+=n+" ")}else if(ne(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const lo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ao=_n(lo);function Xr(e){return!!e||e===""}const ei=e=>!!(e&&e.__v_isRef===!0),B=e=>ce(e)?e:e==null?"":V(e)||ne(e)&&(e.toString===Jr||!W(e.toString))?ei(e)?B(e.value):JSON.stringify(e,ti,2):String(e),ti=(e,t)=>ei(t)?ti(e,t.value):xt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],i)=>(s[Cs(n,i)+" =>"]=r,s),{})}:Kr(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Cs(s))}:ut(t)?Cs(t):ne(t)&&!V(t)&&!Yr(t)?String(t):t,Cs=(e,t="")=>{var s;return ut(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
|
|
* @vue/reactivity v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let Te;class co{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Te,!t&&Te&&(this.index=(Te.scopes||(Te.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Te;try{return Te=this,t()}finally{Te=s}}}on(){++this._on===1&&(this.prevScope=Te,Te=this)}off(){this._on>0&&--this._on===0&&(Te=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function uo(){return Te}let se;const Os=new WeakSet;class si{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Te&&Te.active&&Te.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Os.has(this)&&(Os.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ri(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bn(this),ii(this);const t=se,s=Ne;se=this,Ne=!0;try{return this.fn()}finally{oi(this),se=t,Ne=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)On(t);this.deps=this.depsTail=void 0,Bn(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Os.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){on(this)&&this.run()}get dirty(){return on(this)}}let ni=0,kt,Dt;function ri(e,t=!1){if(e.flags|=8,t){e.next=Dt,Dt=e;return}e.next=kt,kt=e}function En(){ni++}function Cn(){if(--ni>0)return;if(Dt){let t=Dt;for(Dt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;kt;){let t=kt;for(kt=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function ii(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function oi(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),On(n),fo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=s}function on(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(li(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function li(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!on(e))))return;e.flags|=2;const t=e.dep,s=se,n=Ne;se=e,Ne=!0;try{ii(e);const r=e.fn(e._value);(t.version===0||ot(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{se=s,Ne=n,oi(e),e.flags&=-3}}function On(e,t=!1){const{dep:s,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)On(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function fo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ne=!0;const ai=[];function et(){ai.push(Ne),Ne=!1}function tt(){const e=ai.pop();Ne=e===void 0?!0:e}function Bn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=se;se=void 0;try{t()}finally{se=s}}}let qt=0;class ho{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!se||!Ne||se===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==se)s=this.activeLink=new ho(se,this),se.deps?(s.prevDep=se.depsTail,se.depsTail.nextDep=s,se.depsTail=s):se.deps=se.depsTail=s,ci(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=se.depsTail,s.nextDep=void 0,se.depsTail.nextDep=s,se.depsTail=s,se.deps===s&&(se.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){En();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Cn()}}}function ci(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)ci(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const ln=new WeakMap,gt=Symbol(""),an=Symbol(""),Ht=Symbol("");function me(e,t,s){if(Ne&&se){let n=ln.get(e);n||ln.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new Rn),r.map=n,r.key=s),r.track()}}function Qe(e,t,s,n,r,i){const o=ln.get(e);if(!o){qt++;return}const l=a=>{a&&a.trigger()};if(En(),t==="clear")o.forEach(l);else{const a=V(e),h=a&&xn(s);if(a&&s==="length"){const f=Number(n);o.forEach((p,m)=>{(m==="length"||m===Ht||!ut(m)&&m>=f)&&l(p)})}else switch((s!==void 0||o.has(void 0))&&l(o.get(s)),h&&l(o.get(Ht)),t){case"add":a?h&&l(o.get("length")):(l(o.get(gt)),xt(e)&&l(o.get(an)));break;case"delete":a||(l(o.get(gt)),xt(e)&&l(o.get(an)));break;case"set":xt(e)&&l(o.get(gt));break}}Cn()}function bt(e){const t=Z(e);return t===e?t:(me(t,"iterate",Ht),ke(e)?t:t.map(ge))}function bs(e){return me(e=Z(e),"iterate",Ht),e}const po={__proto__:null,[Symbol.iterator](){return Rs(this,Symbol.iterator,ge)},concat(...e){return bt(this).concat(...e.map(t=>V(t)?bt(t):t))},entries(){return Rs(this,"entries",e=>(e[1]=ge(e[1]),e))},every(e,t){return Ye(this,"every",e,t,void 0,arguments)},filter(e,t){return Ye(this,"filter",e,t,s=>s.map(ge),arguments)},find(e,t){return Ye(this,"find",e,t,ge,arguments)},findIndex(e,t){return Ye(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ye(this,"findLast",e,t,ge,arguments)},findLastIndex(e,t){return Ye(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ye(this,"forEach",e,t,void 0,arguments)},includes(...e){return zs(this,"includes",e)},indexOf(...e){return zs(this,"indexOf",e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return zs(this,"lastIndexOf",e)},map(e,t){return Ye(this,"map",e,t,void 0,arguments)},pop(){return Pt(this,"pop")},push(...e){return Pt(this,"push",e)},reduce(e,...t){return Wn(this,"reduce",e,t)},reduceRight(e,...t){return Wn(this,"reduceRight",e,t)},shift(){return Pt(this,"shift")},some(e,t){return Ye(this,"some",e,t,void 0,arguments)},splice(...e){return Pt(this,"splice",e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return Pt(this,"unshift",e)},values(){return Rs(this,"values",ge)}};function Rs(e,t,s){const n=bs(e),r=n[t]();return n!==e&&!ke(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=s(i.value)),i}),r}const go=Array.prototype;function Ye(e,t,s,n,r,i){const o=bs(e),l=o!==e&&!ke(e),a=o[t];if(a!==go[t]){const p=a.apply(e,i);return l?ge(p):p}let h=s;o!==e&&(l?h=function(p,m){return s.call(this,ge(p),m,e)}:s.length>2&&(h=function(p,m){return s.call(this,p,m,e)}));const f=a.call(o,h,n);return l&&r?r(f):f}function Wn(e,t,s,n){const r=bs(e);let i=s;return r!==e&&(ke(e)?s.length>3&&(i=function(o,l,a){return s.call(this,o,l,a,e)}):i=function(o,l,a){return s.call(this,o,ge(l),a,e)}),r[t](i,...n)}function zs(e,t,s){const n=Z(e);me(n,"iterate",Ht);const r=n[t](...s);return(r===-1||r===!1)&&Pn(s[0])?(s[0]=Z(s[0]),n[t](...s)):r}function Pt(e,t,s=[]){et(),En();const n=Z(e)[t].apply(e,s);return Cn(),tt(),n}const mo=_n("__proto__,__v_isRef,__isVue"),ui=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ut));function vo(e){ut(e)||(e=String(e));const t=Z(this);return me(t,"has",e),t.hasOwnProperty(e)}class fi{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(r?i?Ro:gi:i?pi:hi).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const o=V(t);if(!r){let a;if(o&&(a=po[s]))return a;if(s==="hasOwnProperty")return vo}const l=Reflect.get(t,s,be(t)?t:n);if((ut(s)?ui.has(s):mo(s))||(r||me(t,"get",s),i))return l;if(be(l)){const a=o&&xn(s)?l:l.value;return r&&ne(a)?un(a):a}return ne(l)?r?un(l):Tn(l):l}}class di extends fi{constructor(t=!1){super(!1,t)}set(t,s,n,r){let i=t[s];if(!this._isShallow){const a=at(i);if(!ke(n)&&!at(n)&&(i=Z(i),n=Z(n)),!V(t)&&be(i)&&!be(n))return a||(i.value=n),!0}const o=V(t)&&xn(s)?Number(s)<t.length:Q(t,s),l=Reflect.set(t,s,n,be(t)?t:r);return t===Z(r)&&(o?ot(n,i)&&Qe(t,"set",s,n):Qe(t,"add",s,n)),l}deleteProperty(t,s){const n=Q(t,s);t[s];const r=Reflect.deleteProperty(t,s);return r&&n&&Qe(t,"delete",s,void 0),r}has(t,s){const n=Reflect.has(t,s);return(!ut(s)||!ui.has(s))&&me(t,"has",s),n}ownKeys(t){return me(t,"iterate",V(t)?"length":gt),Reflect.ownKeys(t)}}class bo extends fi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const _o=new di,yo=new bo,wo=new di(!0);const cn=e=>e,Yt=e=>Reflect.getPrototypeOf(e);function xo(e,t,s){return function(...n){const r=this.__v_raw,i=Z(r),o=xt(i),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,h=r[e](...n),f=s?cn:t?os:ge;return!t&&me(i,"iterate",a?an:gt),{next(){const{value:p,done:m}=h.next();return m?{value:p,done:m}:{value:l?[f(p[0]),f(p[1])]:f(p),done:m}},[Symbol.iterator](){return this}}}}function Zt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function So(e,t){const s={get(r){const i=this.__v_raw,o=Z(i),l=Z(r);e||(ot(r,l)&&me(o,"get",r),me(o,"get",l));const{has:a}=Yt(o),h=t?cn:e?os:ge;if(a.call(o,r))return h(i.get(r));if(a.call(o,l))return h(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&me(Z(r),"iterate",gt),r.size},has(r){const i=this.__v_raw,o=Z(i),l=Z(r);return e||(ot(r,l)&&me(o,"has",r),me(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,a=Z(l),h=t?cn:e?os:ge;return!e&&me(a,"iterate",gt),l.forEach((f,p)=>r.call(i,h(f),h(p),o))}};return _e(s,e?{add:Zt("add"),set:Zt("set"),delete:Zt("delete"),clear:Zt("clear")}:{add(r){!t&&!ke(r)&&!at(r)&&(r=Z(r));const i=Z(this);return Yt(i).has.call(i,r)||(i.add(r),Qe(i,"add",r,r)),this},set(r,i){!t&&!ke(i)&&!at(i)&&(i=Z(i));const o=Z(this),{has:l,get:a}=Yt(o);let h=l.call(o,r);h||(r=Z(r),h=l.call(o,r));const f=a.call(o,r);return o.set(r,i),h?ot(i,f)&&Qe(o,"set",r,i):Qe(o,"add",r,i),this},delete(r){const i=Z(this),{has:o,get:l}=Yt(i);let a=o.call(i,r);a||(r=Z(r),a=o.call(i,r)),l&&l.call(i,r);const h=i.delete(r);return a&&Qe(i,"delete",r,void 0),h},clear(){const r=Z(this),i=r.size!==0,o=r.clear();return i&&Qe(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=xo(r,e,t)}),s}function zn(e,t){const s=So(e,t);return(n,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(Q(s,r)&&r in n?s:n,r,i)}const Eo={get:zn(!1,!1)},Co={get:zn(!1,!0)},Oo={get:zn(!0,!1)};const hi=new WeakMap,pi=new WeakMap,gi=new WeakMap,Ro=new WeakMap;function zo(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function To(e){return e.__v_skip||!Object.isExtensible(e)?0:zo(eo(e))}function Tn(e){return at(e)?e:$n(e,!1,_o,Eo,hi)}function $o(e){return $n(e,!1,wo,Co,pi)}function un(e){return $n(e,!0,yo,Oo,gi)}function $n(e,t,s,n,r){if(!ne(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=To(e);if(i===0)return e;const o=r.get(e);if(o)return o;const l=new Proxy(e,i===2?n:s);return r.set(e,l),l}function St(e){return at(e)?St(e.__v_raw):!!(e&&e.__v_isReactive)}function at(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function Pn(e){return e?!!e.__v_raw:!1}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function Po(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&Qr(e,"__v_skip",!0),e}const ge=e=>ne(e)?Tn(e):e,os=e=>ne(e)?un(e):e;function be(e){return e?e.__v_isRef===!0:!1}function fe(e){return Ao(e,!1)}function Ao(e,t){return be(e)?e:new Lo(e,t)}class Lo{constructor(t,s){this.dep=new Rn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Z(t),this._value=s?t:ge(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||ke(t)||at(t);t=n?t:Z(t),ot(t,s)&&(this._rawValue=t,this._value=n?t:ge(t),this.dep.trigger())}}function Mo(e){return be(e)?e.value:e}const Io={get:(e,t,s)=>t==="__v_raw"?e:Mo(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const r=e[t];return be(r)&&!be(s)?(r.value=s,!0):Reflect.set(e,t,s,n)}};function mi(e){return St(e)?e:new Proxy(e,Io)}class ko{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Rn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&se!==this)return ri(this,!0),!0}get value(){const t=this.dep.track();return li(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Do(e,t,s=!1){let n,r;return W(e)?n=e:(n=e.get,r=e.set),new ko(n,r,s)}const Qt={},ls=new WeakMap;let pt;function No(e,t=!1,s=pt){if(s){let n=ls.get(s);n||ls.set(s,n=[]),n.push(e)}}function Fo(e,t,s=ee){const{immediate:n,deep:r,once:i,scheduler:o,augmentJob:l,call:a}=s,h=_=>r?_:ke(_)||r===!1||r===0?Xe(_,1):Xe(_);let f,p,m,y,j=!1,T=!1;if(be(e)?(p=()=>e.value,j=ke(e)):St(e)?(p=()=>h(e),j=!0):V(e)?(T=!0,j=e.some(_=>St(_)||ke(_)),p=()=>e.map(_=>{if(be(_))return _.value;if(St(_))return h(_);if(W(_))return a?a(_,2):_()})):W(e)?t?p=a?()=>a(e,2):e:p=()=>{if(m){et();try{m()}finally{tt()}}const _=pt;pt=f;try{return a?a(e,3,[y]):e(y)}finally{pt=_}}:p=We,t&&r){const _=p,H=r===!0?1/0:r;p=()=>Xe(_(),H)}const A=uo(),M=()=>{f.stop(),A&&A.active&&wn(A.effects,f)};if(i&&t){const _=t;t=(...H)=>{_(...H),M()}}let $=T?new Array(e.length).fill(Qt):Qt;const C=_=>{if(!(!(f.flags&1)||!f.dirty&&!_))if(t){const H=f.run();if(r||j||(T?H.some((re,he)=>ot(re,$[he])):ot(H,$))){m&&m();const re=pt;pt=f;try{const he=[H,$===Qt?void 0:T&&$[0]===Qt?[]:$,y];$=H,a?a(t,3,he):t(...he)}finally{pt=re}}}else f.run()};return l&&l(C),f=new si(p),f.scheduler=o?()=>o(C,!1):C,y=_=>No(_,!1,f),m=f.onStop=()=>{const _=ls.get(f);if(_){if(a)a(_,4);else for(const H of _)H();ls.delete(f)}},t?n?C(!0):$=f.run():o?o(C.bind(null,!0),!0):f.run(),M.pause=f.pause.bind(f),M.resume=f.resume.bind(f),M.stop=M,M}function Xe(e,t=1/0,s){if(t<=0||!ne(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,be(e))Xe(e.value,t,s);else if(V(e))for(let n=0;n<e.length;n++)Xe(e[n],t,s);else if(Kr(e)||xt(e))e.forEach(n=>{Xe(n,t,s)});else if(Yr(e)){for(const n in e)Xe(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Xe(e[n],t,s)}return e}/**
|
|
* @vue/runtime-core v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/function Kt(e,t,s,n){try{return n?e(...n):e()}catch(r){_s(r,t,s)}}function Ke(e,t,s,n){if(W(e)){const r=Kt(e,t,s,n);return r&&Gr(r)&&r.catch(i=>{_s(i,t,s)}),r}if(V(e)){const r=[];for(let i=0;i<e.length;i++)r.push(Ke(e[i],t,s,n));return r}}function _s(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ee;if(t){let l=t.parent;const a=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const f=l.ec;if(f){for(let p=0;p<f.length;p++)if(f[p](e,a,h)===!1)return}l=l.parent}if(i){et(),Kt(i,null,10,[e,a,h]),tt();return}}jo(e,s,r,n,o)}function jo(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const we=[];let Ve=-1;const Et=[];let rt=null,_t=0;const vi=Promise.resolve();let as=null;function es(e){const t=as||vi;return e?t.then(this?e.bind(this):e):t}function Uo(e){let t=Ve+1,s=we.length;for(;t<s;){const n=t+s>>>1,r=we[n],i=Vt(r);i<e||i===e&&r.flags&2?t=n+1:s=n}return t}function An(e){if(!(e.flags&1)){const t=Vt(e),s=we[we.length-1];!s||!(e.flags&2)&&t>=Vt(s)?we.push(e):we.splice(Uo(t),0,e),e.flags|=1,bi()}}function bi(){as||(as=vi.then(yi))}function qo(e){V(e)?Et.push(...e):rt&&e.id===-1?rt.splice(_t+1,0,e):e.flags&1||(Et.push(e),e.flags|=1),bi()}function Kn(e,t,s=Ve+1){for(;s<we.length;s++){const n=we[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;we.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function _i(e){if(Et.length){const t=[...new Set(Et)].sort((s,n)=>Vt(s)-Vt(n));if(Et.length=0,rt){rt.push(...t);return}for(rt=t,_t=0;_t<rt.length;_t++){const s=rt[_t];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}rt=null,_t=0}}const Vt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function yi(e){try{for(Ve=0;Ve<we.length;Ve++){const t=we[Ve];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Kt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ve<we.length;Ve++){const t=we[Ve];t&&(t.flags&=-2)}Ve=-1,we.length=0,_i(),as=null,(we.length||Et.length)&&yi()}}let Ie=null,wi=null;function cs(e){const t=Ie;return Ie=e,wi=e&&e.type.__scopeId||null,t}function Ho(e,t=Ie,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&nr(-1);const i=cs(t);let o;try{o=e(...r)}finally{cs(i),n._d&&nr(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function ts(e,t){if(Ie===null)return e;const s=Ss(Ie),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,a=ee]=t[r];i&&(W(i)&&(i={mounted:i,updated:i}),i.deep&&Xe(o),n.push({dir:i,instance:s,value:o,oldValue:void 0,arg:l,modifiers:a}))}return e}function dt(e,t,s,n){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let a=l.dir[n];a&&(et(),Ke(a,s,8,[e.el,l,e,t]),tt())}}const Vo=Symbol("_vte"),Bo=e=>e.__isTeleport,Wo=Symbol("_leaveCb");function Ln(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ln(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Gt(e,t){return W(e)?_e({name:e.name},t,{setup:e}):e}function xi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const us=new WeakMap;function Nt(e,t,s,n,r=!1){if(V(e)){e.forEach((j,T)=>Nt(j,t&&(V(t)?t[T]:t),s,n,r));return}if(Ft(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Nt(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Ss(n.component):n.el,o=r?null:i,{i:l,r:a}=e,h=t&&t.r,f=l.refs===ee?l.refs={}:l.refs,p=l.setupState,m=Z(p),y=p===ee?Wr:j=>Q(m,j);if(h!=null&&h!==a){if(Gn(t),ce(h))f[h]=null,y(h)&&(p[h]=null);else if(be(h)){h.value=null;const j=t;j.k&&(f[j.k]=null)}}if(W(a))Kt(a,l,12,[o,f]);else{const j=ce(a),T=be(a);if(j||T){const A=()=>{if(e.f){const M=j?y(a)?p[a]:f[a]:a.value;if(r)V(M)&&wn(M,i);else if(V(M))M.includes(i)||M.push(i);else if(j)f[a]=[i],y(a)&&(p[a]=f[a]);else{const $=[i];a.value=$,e.k&&(f[e.k]=$)}}else j?(f[a]=o,y(a)&&(p[a]=o)):T&&(a.value=o,e.k&&(f[e.k]=o))};if(o){const M=()=>{A(),us.delete(e)};M.id=-1,us.set(e,M),Ae(M,s)}else Gn(e),A()}}}function Gn(e){const t=us.get(e);t&&(t.flags|=8,us.delete(e))}ms().requestIdleCallback;ms().cancelIdleCallback;const Ft=e=>!!e.type.__asyncLoader,Si=e=>e.type.__isKeepAlive;function Ko(e,t){Ei(e,"a",t)}function Go(e,t){Ei(e,"da",t)}function Ei(e,t,s=xe){const n=e.__wdc||(e.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ys(t,n,s),s){let r=s.parent;for(;r&&r.parent;)Si(r.parent.vnode)&&Jo(n,t,s,r),r=r.parent}}function Jo(e,t,s,n){const r=ys(t,e,n,!0);Ci(()=>{wn(n[t],r)},s)}function ys(e,t,s=xe,n=!1){if(s){const r=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...o)=>{et();const l=Jt(s),a=Ke(t,s,e,o);return l(),tt(),a});return n?r.unshift(i):r.push(i),i}}const st=e=>(t,s=xe)=>{(!Wt||e==="sp")&&ys(e,(...n)=>t(...n),s)},Yo=st("bm"),Mn=st("m"),Zo=st("bu"),Qo=st("u"),Xo=st("bum"),Ci=st("um"),el=st("sp"),tl=st("rtg"),sl=st("rtc");function nl(e,t=xe){ys("ec",e,t)}const rl=Symbol.for("v-ndc");function zt(e,t,s,n){let r;const i=s,o=V(e);if(o||ce(e)){const l=o&&St(e);let a=!1,h=!1;l&&(a=!ke(e),h=at(e),e=bs(e)),r=new Array(e.length);for(let f=0,p=e.length;f<p;f++)r[f]=t(a?h?os(ge(e[f])):ge(e[f]):e[f],f,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,i)}else if(ne(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,h=l.length;a<h;a++){const f=l[a];r[a]=t(e[f],f,a,i)}}else r=[];return r}const fn=e=>e?Ki(e)?Ss(e):fn(e.parent):null,jt=_e(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fn(e.parent),$root:e=>fn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ri(e),$forceUpdate:e=>e.f||(e.f=()=>{An(e.update)}),$nextTick:e=>e.n||(e.n=es.bind(e.proxy)),$watch:e=>Ol.bind(e)}),Ts=(e,t)=>e!==ee&&!e.__isScriptSetup&&Q(e,t),il={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:o,type:l,appContext:a}=e;let h;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(Ts(n,t))return o[t]=1,n[t];if(r!==ee&&Q(r,t))return o[t]=2,r[t];if((h=e.propsOptions[0])&&Q(h,t))return o[t]=3,i[t];if(s!==ee&&Q(s,t))return o[t]=4,s[t];dn&&(o[t]=0)}}const f=jt[t];let p,m;if(f)return t==="$attrs"&&me(e.attrs,"get",""),f(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(s!==ee&&Q(s,t))return o[t]=4,s[t];if(m=a.config.globalProperties,Q(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:i}=e;return Ts(r,t)?(r[t]=s,!0):n!==ee&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,propsOptions:i,type:o}},l){let a,h;return!!(s[l]||e!==ee&&l[0]!=="$"&&Q(e,l)||Ts(t,l)||(a=i[0])&&Q(a,l)||Q(n,l)||Q(jt,l)||Q(r.config.globalProperties,l)||(h=o.__cssModules)&&h[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Q(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Jn(e){return V(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let dn=!0;function ol(e){const t=Ri(e),s=e.proxy,n=e.ctx;dn=!1,t.beforeCreate&&Yn(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:a,inject:h,created:f,beforeMount:p,mounted:m,beforeUpdate:y,updated:j,activated:T,deactivated:A,beforeDestroy:M,beforeUnmount:$,destroyed:C,unmounted:_,render:H,renderTracked:re,renderTriggered:he,errorCaptured:pe,serverPrefetch:Se,expose:Ee,inheritAttrs:Ce,components:Ge,directives:Je,filters:ft}=t;if(h&&ll(h,n,null),o)for(const Y in o){const K=o[Y];W(K)&&(n[Y]=K.bind(s))}if(r){const Y=r.call(s,s);ne(Y)&&(e.data=Tn(Y))}if(dn=!0,i)for(const Y in i){const K=i[Y],E=W(K)?K.bind(s,s):W(K.get)?K.get.bind(s,s):We,w=!W(K)&&W(K.set)?K.set.bind(s):We,P=Rt({get:E,set:w});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>P.value,set:U=>P.value=U})}if(l)for(const Y in l)Oi(l[Y],n,s,Y);if(a){const Y=W(a)?a.call(s):a;Reflect.ownKeys(Y).forEach(K=>{hl(K,Y[K])})}f&&Yn(f,e,"c");function oe(Y,K){V(K)?K.forEach(E=>Y(E.bind(s))):K&&Y(K.bind(s))}if(oe(Yo,p),oe(Mn,m),oe(Zo,y),oe(Qo,j),oe(Ko,T),oe(Go,A),oe(nl,pe),oe(sl,re),oe(tl,he),oe(Xo,$),oe(Ci,_),oe(el,Se),V(Ee))if(Ee.length){const Y=e.exposed||(e.exposed={});Ee.forEach(K=>{Object.defineProperty(Y,K,{get:()=>s[K],set:E=>s[K]=E,enumerable:!0})})}else e.exposed||(e.exposed={});H&&e.render===We&&(e.render=H),Ce!=null&&(e.inheritAttrs=Ce),Ge&&(e.components=Ge),Je&&(e.directives=Je),Se&&xi(e)}function ll(e,t,s=We){V(e)&&(e=hn(e));for(const n in e){const r=e[n];let i;ne(r)?"default"in r?i=ss(r.from||n,r.default,!0):i=ss(r.from||n):i=ss(r),be(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Yn(e,t,s){Ke(V(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Oi(e,t,s,n){let r=n.includes(".")?ji(s,n):()=>s[n];if(ce(e)){const i=t[e];W(i)&&Ot(r,i)}else if(W(e))Ot(r,e.bind(s));else if(ne(e))if(V(e))e.forEach(i=>Oi(i,t,s,n));else{const i=W(e.handler)?e.handler.bind(s):t[e.handler];W(i)&&Ot(r,i,e)}}function Ri(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let a;return l?a=l:!r.length&&!s&&!n?a=t:(a={},r.length&&r.forEach(h=>fs(a,h,o,!0)),fs(a,t,o)),ne(t)&&i.set(t,a),a}function fs(e,t,s,n=!1){const{mixins:r,extends:i}=t;i&&fs(e,i,s,!0),r&&r.forEach(o=>fs(e,o,s,!0));for(const o in t)if(!(n&&o==="expose")){const l=al[o]||s&&s[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const al={data:Zn,props:Qn,emits:Qn,methods:Mt,computed:Mt,beforeCreate:ye,created:ye,beforeMount:ye,mounted:ye,beforeUpdate:ye,updated:ye,beforeDestroy:ye,beforeUnmount:ye,destroyed:ye,unmounted:ye,activated:ye,deactivated:ye,errorCaptured:ye,serverPrefetch:ye,components:Mt,directives:Mt,watch:ul,provide:Zn,inject:cl};function Zn(e,t){return t?e?function(){return _e(W(e)?e.call(this,this):e,W(t)?t.call(this,this):t)}:t:e}function cl(e,t){return Mt(hn(e),hn(t))}function hn(e){if(V(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function ye(e,t){return e?[...new Set([].concat(e,t))]:t}function Mt(e,t){return e?_e(Object.create(null),e,t):t}function Qn(e,t){return e?V(e)&&V(t)?[...new Set([...e,...t])]:_e(Object.create(null),Jn(e),Jn(t??{})):t}function ul(e,t){if(!e)return t;if(!t)return e;const s=_e(Object.create(null),e);for(const n in t)s[n]=ye(e[n],t[n]);return s}function zi(){return{app:null,config:{isNativeTag:Wr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let fl=0;function dl(e,t){return function(n,r=null){W(n)||(n=_e({},n)),r!=null&&!ne(r)&&(r=null);const i=zi(),o=new WeakSet,l=[];let a=!1;const h=i.app={_uid:fl++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Gl,get config(){return i.config},set config(f){},use(f,...p){return o.has(f)||(f&&W(f.install)?(o.add(f),f.install(h,...p)):W(f)&&(o.add(f),f(h,...p))),h},mixin(f){return i.mixins.includes(f)||i.mixins.push(f),h},component(f,p){return p?(i.components[f]=p,h):i.components[f]},directive(f,p){return p?(i.directives[f]=p,h):i.directives[f]},mount(f,p,m){if(!a){const y=h._ceVNode||De(n,r);return y.appContext=i,m===!0?m="svg":m===!1&&(m=void 0),e(y,f,m),a=!0,h._container=f,f.__vue_app__=h,Ss(y.component)}},onUnmount(f){l.push(f)},unmount(){a&&(Ke(l,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(f,p){return i.provides[f]=p,h},runWithContext(f){const p=Ct;Ct=h;try{return f()}finally{Ct=p}}};return h}}let Ct=null;function hl(e,t){if(xe){let s=xe.provides;const n=xe.parent&&xe.parent.provides;n===s&&(s=xe.provides=Object.create(n)),s[e]=t}}function ss(e,t,s=!1){const n=ql();if(n||Ct){let r=Ct?Ct._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return s&&W(t)?t.call(n&&n.proxy):t}}const Ti={},$i=()=>Object.create(Ti),Pi=e=>Object.getPrototypeOf(e)===Ti;function pl(e,t,s,n=!1){const r={},i=$i();e.propsDefaults=Object.create(null),Ai(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);s?e.props=n?r:$o(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function gl(e,t,s,n){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=Z(r),[a]=e.propsOptions;let h=!1;if((n||o>0)&&!(o&16)){if(o&8){const f=e.vnode.dynamicProps;for(let p=0;p<f.length;p++){let m=f[p];if(ws(e.emitsOptions,m))continue;const y=t[m];if(a)if(Q(i,m))y!==i[m]&&(i[m]=y,h=!0);else{const j=lt(m);r[j]=pn(a,l,j,y,e,!1)}else y!==i[m]&&(i[m]=y,h=!0)}}}else{Ai(e,t,r,i)&&(h=!0);let f;for(const p in l)(!t||!Q(t,p)&&((f=vt(p))===p||!Q(t,f)))&&(a?s&&(s[p]!==void 0||s[f]!==void 0)&&(r[p]=pn(a,l,p,void 0,e,!0)):delete r[p]);if(i!==l)for(const p in i)(!t||!Q(t,p))&&(delete i[p],h=!0)}h&&Qe(e.attrs,"set","")}function Ai(e,t,s,n){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let a in t){if(It(a))continue;const h=t[a];let f;r&&Q(r,f=lt(a))?!i||!i.includes(f)?s[f]=h:(l||(l={}))[f]=h:ws(e.emitsOptions,a)||(!(a in n)||h!==n[a])&&(n[a]=h,o=!0)}if(i){const a=Z(s),h=l||ee;for(let f=0;f<i.length;f++){const p=i[f];s[p]=pn(r,a,p,h[p],e,!Q(h,p))}}return o}function pn(e,t,s,n,r,i){const o=e[s];if(o!=null){const l=Q(o,"default");if(l&&n===void 0){const a=o.default;if(o.type!==Function&&!o.skipFactory&&W(a)){const{propsDefaults:h}=r;if(s in h)n=h[s];else{const f=Jt(r);n=h[s]=a.call(null,t),f()}}else n=a;r.ce&&r.ce._setProp(s,n)}o[0]&&(i&&!l?n=!1:o[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const ml=new WeakMap;function Li(e,t,s=!1){const n=s?ml:t.propsCache,r=n.get(e);if(r)return r;const i=e.props,o={},l=[];let a=!1;if(!W(e)){const f=p=>{a=!0;const[m,y]=Li(p,t,!0);_e(o,m),y&&l.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!i&&!a)return ne(e)&&n.set(e,wt),wt;if(V(i))for(let f=0;f<i.length;f++){const p=lt(i[f]);Xn(p)&&(o[p]=ee)}else if(i)for(const f in i){const p=lt(f);if(Xn(p)){const m=i[f],y=o[p]=V(m)||W(m)?{type:m}:_e({},m),j=y.type;let T=!1,A=!0;if(V(j))for(let M=0;M<j.length;++M){const $=j[M],C=W($)&&$.name;if(C==="Boolean"){T=!0;break}else C==="String"&&(A=!1)}else T=W(j)&&j.name==="Boolean";y[0]=T,y[1]=A,(T||Q(y,"default"))&&l.push(p)}}const h=[o,l];return ne(e)&&n.set(e,h),h}function Xn(e){return e[0]!=="$"&&!It(e)}const In=e=>e==="_"||e==="_ctx"||e==="$stable",kn=e=>V(e)?e.map(Be):[Be(e)],vl=(e,t,s)=>{if(t._n)return t;const n=Ho((...r)=>kn(t(...r)),s);return n._c=!1,n},Mi=(e,t,s)=>{const n=e._ctx;for(const r in e){if(In(r))continue;const i=e[r];if(W(i))t[r]=vl(r,i,n);else if(i!=null){const o=kn(i);t[r]=()=>o}}},Ii=(e,t)=>{const s=kn(t);e.slots.default=()=>s},ki=(e,t,s)=>{for(const n in t)(s||!In(n))&&(e[n]=t[n])},bl=(e,t,s)=>{const n=e.slots=$i();if(e.vnode.shapeFlag&32){const r=t._;r?(ki(n,t,s),s&&Qr(n,"_",r,!0)):Mi(t,n)}else t&&Ii(e,t)},_l=(e,t,s)=>{const{vnode:n,slots:r}=e;let i=!0,o=ee;if(n.shapeFlag&32){const l=t._;l?s&&l===1?i=!1:ki(r,t,s):(i=!t.$stable,Mi(t,r)),o=t}else t&&(Ii(e,t),o={default:1});if(i)for(const l in r)!In(l)&&o[l]==null&&delete r[l]},Ae=Ml;function yl(e){return wl(e)}function wl(e,t){const s=ms();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:o,createText:l,createComment:a,setText:h,setElementText:f,parentNode:p,nextSibling:m,setScopeId:y=We,insertStaticContent:j}=e,T=(c,d,b,O=null,g=null,v=null,z=void 0,R=null,S=!!d.dynamicChildren)=>{if(c===d)return;c&&!At(c,d)&&(O=ue(c),U(c,g,v,!0),c=null),d.patchFlag===-2&&(S=!1,d.dynamicChildren=null);const{type:x,ref:N,shapeFlag:L}=d;switch(x){case xs:A(c,d,b,O);break;case ct:M(c,d,b,O);break;case Ps:c==null&&$(d,b,O,z);break;case ve:Ge(c,d,b,O,g,v,z,R,S);break;default:L&1?H(c,d,b,O,g,v,z,R,S):L&6?Je(c,d,b,O,g,v,z,R,S):(L&64||L&128)&&x.process(c,d,b,O,g,v,z,R,S,$e)}N!=null&&g?Nt(N,c&&c.ref,v,d||c,!d):N==null&&c&&c.ref!=null&&Nt(c.ref,null,v,c,!0)},A=(c,d,b,O)=>{if(c==null)n(d.el=l(d.children),b,O);else{const g=d.el=c.el;d.children!==c.children&&h(g,d.children)}},M=(c,d,b,O)=>{c==null?n(d.el=a(d.children||""),b,O):d.el=c.el},$=(c,d,b,O)=>{[c.el,c.anchor]=j(c.children,d,b,O,c.el,c.anchor)},C=({el:c,anchor:d},b,O)=>{let g;for(;c&&c!==d;)g=m(c),n(c,b,O),c=g;n(d,b,O)},_=({el:c,anchor:d})=>{let b;for(;c&&c!==d;)b=m(c),r(c),c=b;r(d)},H=(c,d,b,O,g,v,z,R,S)=>{d.type==="svg"?z="svg":d.type==="math"&&(z="mathml"),c==null?re(d,b,O,g,v,z,R,S):Se(c,d,g,v,z,R,S)},re=(c,d,b,O,g,v,z,R)=>{let S,x;const{props:N,shapeFlag:L,transition:F,dirs:q}=c;if(S=c.el=o(c.type,v,N&&N.is,N),L&8?f(S,c.children):L&16&&pe(c.children,S,null,O,g,$s(c,v),z,R),q&&dt(c,null,O,"created"),he(S,c,c.scopeId,z,O),N){for(const te in N)te!=="value"&&!It(te)&&i(S,te,null,N[te],v,O);"value"in N&&i(S,"value",null,N.value,v),(x=N.onVnodeBeforeMount)&&He(x,O,c)}q&&dt(c,null,O,"beforeMount");const G=xl(g,F);G&&F.beforeEnter(S),n(S,d,b),((x=N&&N.onVnodeMounted)||G||q)&&Ae(()=>{x&&He(x,O,c),G&&F.enter(S),q&&dt(c,null,O,"mounted")},g)},he=(c,d,b,O,g)=>{if(b&&y(c,b),O)for(let v=0;v<O.length;v++)y(c,O[v]);if(g){let v=g.subTree;if(d===v||qi(v.type)&&(v.ssContent===d||v.ssFallback===d)){const z=g.vnode;he(c,z,z.scopeId,z.slotScopeIds,g.parent)}}},pe=(c,d,b,O,g,v,z,R,S=0)=>{for(let x=S;x<c.length;x++){const N=c[x]=R?it(c[x]):Be(c[x]);T(null,N,d,b,O,g,v,z,R)}},Se=(c,d,b,O,g,v,z)=>{const R=d.el=c.el;let{patchFlag:S,dynamicChildren:x,dirs:N}=d;S|=c.patchFlag&16;const L=c.props||ee,F=d.props||ee;let q;if(b&&ht(b,!1),(q=F.onVnodeBeforeUpdate)&&He(q,b,d,c),N&&dt(d,c,b,"beforeUpdate"),b&&ht(b,!0),(L.innerHTML&&F.innerHTML==null||L.textContent&&F.textContent==null)&&f(R,""),x?Ee(c.dynamicChildren,x,R,b,O,$s(d,g),v):z||K(c,d,R,null,b,O,$s(d,g),v,!1),S>0){if(S&16)Ce(R,L,F,b,g);else if(S&2&&L.class!==F.class&&i(R,"class",null,F.class,g),S&4&&i(R,"style",L.style,F.style,g),S&8){const G=d.dynamicProps;for(let te=0;te<G.length;te++){const X=G[te],Re=L[X],ze=F[X];(ze!==Re||X==="value")&&i(R,X,Re,ze,g,b)}}S&1&&c.children!==d.children&&f(R,d.children)}else!z&&x==null&&Ce(R,L,F,b,g);((q=F.onVnodeUpdated)||N)&&Ae(()=>{q&&He(q,b,d,c),N&&dt(d,c,b,"updated")},O)},Ee=(c,d,b,O,g,v,z)=>{for(let R=0;R<d.length;R++){const S=c[R],x=d[R],N=S.el&&(S.type===ve||!At(S,x)||S.shapeFlag&198)?p(S.el):b;T(S,x,N,null,O,g,v,z,!0)}},Ce=(c,d,b,O,g)=>{if(d!==b){if(d!==ee)for(const v in d)!It(v)&&!(v in b)&&i(c,v,d[v],null,g,O);for(const v in b){if(It(v))continue;const z=b[v],R=d[v];z!==R&&v!=="value"&&i(c,v,R,z,g,O)}"value"in b&&i(c,"value",d.value,b.value,g)}},Ge=(c,d,b,O,g,v,z,R,S)=>{const x=d.el=c?c.el:l(""),N=d.anchor=c?c.anchor:l("");let{patchFlag:L,dynamicChildren:F,slotScopeIds:q}=d;q&&(R=R?R.concat(q):q),c==null?(n(x,b,O),n(N,b,O),pe(d.children||[],b,N,g,v,z,R,S)):L>0&&L&64&&F&&c.dynamicChildren?(Ee(c.dynamicChildren,F,b,g,v,z,R),(d.key!=null||g&&d===g.subTree)&&Di(c,d,!0)):K(c,d,b,N,g,v,z,R,S)},Je=(c,d,b,O,g,v,z,R,S)=>{d.slotScopeIds=R,c==null?d.shapeFlag&512?g.ctx.activate(d,b,O,z,S):ft(d,b,O,g,v,z,S):Oe(c,d,S)},ft=(c,d,b,O,g,v,z)=>{const R=c.component=Ul(c,O,g);if(Si(c)&&(R.ctx.renderer=$e),Hl(R,!1,z),R.asyncDep){if(g&&g.registerDep(R,oe,z),!c.el){const S=R.subTree=De(ct);M(null,S,d,b),c.placeholder=S.el}}else oe(R,c,d,b,g,v,z)},Oe=(c,d,b)=>{const O=d.component=c.component;if(Al(c,d,b))if(O.asyncDep&&!O.asyncResolved){Y(O,d,b);return}else O.next=d,O.update();else d.el=c.el,O.vnode=d},oe=(c,d,b,O,g,v,z)=>{const R=()=>{if(c.isMounted){let{next:L,bu:F,u:q,parent:G,vnode:te}=c;{const Ue=Ni(c);if(Ue){L&&(L.el=te.el,Y(c,L,z)),Ue.asyncDep.then(()=>{c.isUnmounted||R()});return}}let X=L,Re;ht(c,!1),L?(L.el=te.el,Y(c,L,z)):L=te,F&&Xt(F),(Re=L.props&&L.props.onVnodeBeforeUpdate)&&He(Re,G,L,te),ht(c,!0);const ze=tr(c),je=c.subTree;c.subTree=ze,T(je,ze,p(je.el),ue(je),c,g,v),L.el=ze.el,X===null&&Ll(c,ze.el),q&&Ae(q,g),(Re=L.props&&L.props.onVnodeUpdated)&&Ae(()=>He(Re,G,L,te),g)}else{let L;const{el:F,props:q}=d,{bm:G,m:te,parent:X,root:Re,type:ze}=c,je=Ft(d);ht(c,!1),G&&Xt(G),!je&&(L=q&&q.onVnodeBeforeMount)&&He(L,X,d),ht(c,!0);{Re.ce&&Re.ce._def.shadowRoot!==!1&&Re.ce._injectChildStyle(ze);const Ue=c.subTree=tr(c);T(null,Ue,b,O,c,g,v),d.el=Ue.el}if(te&&Ae(te,g),!je&&(L=q&&q.onVnodeMounted)){const Ue=d;Ae(()=>He(L,X,Ue),g)}(d.shapeFlag&256||X&&Ft(X.vnode)&&X.vnode.shapeFlag&256)&&c.a&&Ae(c.a,g),c.isMounted=!0,d=b=O=null}};c.scope.on();const S=c.effect=new si(R);c.scope.off();const x=c.update=S.run.bind(S),N=c.job=S.runIfDirty.bind(S);N.i=c,N.id=c.uid,S.scheduler=()=>An(N),ht(c,!0),x()},Y=(c,d,b)=>{d.component=c;const O=c.vnode.props;c.vnode=d,c.next=null,gl(c,d.props,O,b),_l(c,d.children,b),et(),Kn(c),tt()},K=(c,d,b,O,g,v,z,R,S=!1)=>{const x=c&&c.children,N=c?c.shapeFlag:0,L=d.children,{patchFlag:F,shapeFlag:q}=d;if(F>0){if(F&128){w(x,L,b,O,g,v,z,R,S);return}else if(F&256){E(x,L,b,O,g,v,z,R,S);return}}q&8?(N&16&&ie(x,g,v),L!==x&&f(b,L)):N&16?q&16?w(x,L,b,O,g,v,z,R,S):ie(x,g,v,!0):(N&8&&f(b,""),q&16&&pe(L,b,O,g,v,z,R,S))},E=(c,d,b,O,g,v,z,R,S)=>{c=c||wt,d=d||wt;const x=c.length,N=d.length,L=Math.min(x,N);let F;for(F=0;F<L;F++){const q=d[F]=S?it(d[F]):Be(d[F]);T(c[F],q,b,null,g,v,z,R,S)}x>N?ie(c,g,v,!0,!1,L):pe(d,b,O,g,v,z,R,S,L)},w=(c,d,b,O,g,v,z,R,S)=>{let x=0;const N=d.length;let L=c.length-1,F=N-1;for(;x<=L&&x<=F;){const q=c[x],G=d[x]=S?it(d[x]):Be(d[x]);if(At(q,G))T(q,G,b,null,g,v,z,R,S);else break;x++}for(;x<=L&&x<=F;){const q=c[L],G=d[F]=S?it(d[F]):Be(d[F]);if(At(q,G))T(q,G,b,null,g,v,z,R,S);else break;L--,F--}if(x>L){if(x<=F){const q=F+1,G=q<N?d[q].el:O;for(;x<=F;)T(null,d[x]=S?it(d[x]):Be(d[x]),b,G,g,v,z,R,S),x++}}else if(x>F)for(;x<=L;)U(c[x],g,v,!0),x++;else{const q=x,G=x,te=new Map;for(x=G;x<=F;x++){const Pe=d[x]=S?it(d[x]):Be(d[x]);Pe.key!=null&&te.set(Pe.key,x)}let X,Re=0;const ze=F-G+1;let je=!1,Ue=0;const $t=new Array(ze);for(x=0;x<ze;x++)$t[x]=0;for(x=q;x<=L;x++){const Pe=c[x];if(Re>=ze){U(Pe,g,v,!0);continue}let qe;if(Pe.key!=null)qe=te.get(Pe.key);else for(X=G;X<=F;X++)if($t[X-G]===0&&At(Pe,d[X])){qe=X;break}qe===void 0?U(Pe,g,v,!0):($t[qe-G]=x+1,qe>=Ue?Ue=qe:je=!0,T(Pe,d[qe],b,null,g,v,z,R,S),Re++)}const Un=je?Sl($t):wt;for(X=Un.length-1,x=ze-1;x>=0;x--){const Pe=G+x,qe=d[Pe],qn=d[Pe+1],Hn=Pe+1<N?qn.el||qn.placeholder:O;$t[x]===0?T(null,qe,b,Hn,g,v,z,R,S):je&&(X<0||x!==Un[X]?P(qe,b,Hn,2):X--)}}},P=(c,d,b,O,g=null)=>{const{el:v,type:z,transition:R,children:S,shapeFlag:x}=c;if(x&6){P(c.component.subTree,d,b,O);return}if(x&128){c.suspense.move(d,b,O);return}if(x&64){z.move(c,d,b,$e);return}if(z===ve){n(v,d,b);for(let L=0;L<S.length;L++)P(S[L],d,b,O);n(c.anchor,d,b);return}if(z===Ps){C(c,d,b);return}if(O!==2&&x&1&&R)if(O===0)R.beforeEnter(v),n(v,d,b),Ae(()=>R.enter(v),g);else{const{leave:L,delayLeave:F,afterLeave:q}=R,G=()=>{c.ctx.isUnmounted?r(v):n(v,d,b)},te=()=>{v._isLeaving&&v[Wo](!0),L(v,()=>{G(),q&&q()})};F?F(v,G,te):te()}else n(v,d,b)},U=(c,d,b,O=!1,g=!1)=>{const{type:v,props:z,ref:R,children:S,dynamicChildren:x,shapeFlag:N,patchFlag:L,dirs:F,cacheIndex:q}=c;if(L===-2&&(g=!1),R!=null&&(et(),Nt(R,null,b,c,!0),tt()),q!=null&&(d.renderCache[q]=void 0),N&256){d.ctx.deactivate(c);return}const G=N&1&&F,te=!Ft(c);let X;if(te&&(X=z&&z.onVnodeBeforeUnmount)&&He(X,d,c),N&6)de(c.component,b,O);else{if(N&128){c.suspense.unmount(b,O);return}G&&dt(c,null,d,"beforeUnmount"),N&64?c.type.remove(c,d,b,$e,O):x&&!x.hasOnce&&(v!==ve||L>0&&L&64)?ie(x,d,b,!1,!0):(v===ve&&L&384||!g&&N&16)&&ie(S,d,b),O&&D(c)}(te&&(X=z&&z.onVnodeUnmounted)||G)&&Ae(()=>{X&&He(X,d,c),G&&dt(c,null,d,"unmounted")},b)},D=c=>{const{type:d,el:b,anchor:O,transition:g}=c;if(d===ve){J(b,O);return}if(d===Ps){_(c);return}const v=()=>{r(b),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(c.shapeFlag&1&&g&&!g.persisted){const{leave:z,delayLeave:R}=g,S=()=>z(b,v);R?R(c.el,v,S):S()}else v()},J=(c,d)=>{let b;for(;c!==d;)b=m(c),r(c),c=b;r(d)},de=(c,d,b)=>{const{bum:O,scope:g,job:v,subTree:z,um:R,m:S,a:x}=c;er(S),er(x),O&&Xt(O),g.stop(),v&&(v.flags|=8,U(z,c,d,b)),R&&Ae(R,d),Ae(()=>{c.isUnmounted=!0},d)},ie=(c,d,b,O=!1,g=!1,v=0)=>{for(let z=v;z<c.length;z++)U(c[z],d,b,O,g)},ue=c=>{if(c.shapeFlag&6)return ue(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const d=m(c.anchor||c.el),b=d&&d[Vo];return b?m(b):d};let le=!1;const nt=(c,d,b)=>{c==null?d._vnode&&U(d._vnode,null,null,!0):T(d._vnode||null,c,d,null,null,null,b),d._vnode=c,le||(le=!0,Kn(),_i(),le=!1)},$e={p:T,um:U,m:P,r:D,mt:ft,mc:pe,pc:K,pbc:Ee,n:ue,o:e};return{render:nt,hydrate:void 0,createApp:dl(nt)}}function $s({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function ht({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function xl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Di(e,t,s=!1){const n=e.children,r=t.children;if(V(n)&&V(r))for(let i=0;i<n.length;i++){const o=n[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=it(r[i]),l.el=o.el),!s&&l.patchFlag!==-2&&Di(o,l)),l.type===xs&&l.patchFlag!==-1&&(l.el=o.el),l.type===ct&&!l.el&&(l.el=o.el)}}function Sl(e){const t=e.slice(),s=[0];let n,r,i,o,l;const a=e.length;for(n=0;n<a;n++){const h=e[n];if(h!==0){if(r=s[s.length-1],e[r]<h){t[n]=r,s.push(n);continue}for(i=0,o=s.length-1;i<o;)l=i+o>>1,e[s[l]]<h?i=l+1:o=l;h<e[s[i]]&&(i>0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,o=s[i-1];i-- >0;)s[i]=o,o=t[o];return s}function Ni(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ni(t)}function er(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const El=Symbol.for("v-scx"),Cl=()=>ss(El);function Ot(e,t,s){return Fi(e,t,s)}function Fi(e,t,s=ee){const{immediate:n,deep:r,flush:i,once:o}=s,l=_e({},s),a=t&&n||!t&&i!=="post";let h;if(Wt){if(i==="sync"){const y=Cl();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!a){const y=()=>{};return y.stop=We,y.resume=We,y.pause=We,y}}const f=xe;l.call=(y,j,T)=>Ke(y,f,j,T);let p=!1;i==="post"?l.scheduler=y=>{Ae(y,f&&f.suspense)}:i!=="sync"&&(p=!0,l.scheduler=(y,j)=>{j?y():An(y)}),l.augmentJob=y=>{t&&(y.flags|=4),p&&(y.flags|=2,f&&(y.id=f.uid,y.i=f))};const m=Fo(e,t,l);return Wt&&(h?h.push(m):a&&m()),m}function Ol(e,t,s){const n=this.proxy,r=ce(e)?e.includes(".")?ji(n,e):()=>n[e]:e.bind(n,n);let i;W(t)?i=t:(i=t.handler,s=t);const o=Jt(this),l=Fi(r,i.bind(n),s);return o(),l}function ji(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;r<s.length&&n;r++)n=n[s[r]];return n}}const Rl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function zl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ee;let r=s;const i=t.startsWith("update:"),o=i&&Rl(n,t.slice(7));o&&(o.trim&&(r=s.map(f=>ce(f)?f.trim():f)),o.number&&(r=s.map(rn)));let l,a=n[l=Es(t)]||n[l=Es(lt(t))];!a&&i&&(a=n[l=Es(vt(t))]),a&&Ke(a,e,6,r);const h=n[l+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ke(h,e,6,r)}}const Tl=new WeakMap;function Ui(e,t,s=!1){const n=s?Tl:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!W(e)){const a=h=>{const f=Ui(h,t,!0);f&&(l=!0,_e(o,f))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!i&&!l?(ne(e)&&n.set(e,null),null):(V(i)?i.forEach(a=>o[a]=null):_e(o,i),ne(e)&&n.set(e,o),o)}function ws(e,t){return!e||!hs(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,vt(t))||Q(e,t))}function tr(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:a,render:h,renderCache:f,props:p,data:m,setupState:y,ctx:j,inheritAttrs:T}=e,A=cs(e);let M,$;try{if(s.shapeFlag&4){const _=r||n,H=_;M=Be(h.call(H,_,f,p,y,m,j)),$=l}else{const _=t;M=Be(_.length>1?_(p,{attrs:l,slots:o,emit:a}):_(p,null)),$=t.props?l:$l(l)}}catch(_){Ut.length=0,_s(_,e,1),M=De(ct)}let C=M;if($&&T!==!1){const _=Object.keys($),{shapeFlag:H}=C;_.length&&H&7&&(i&&_.some(yn)&&($=Pl($,i)),C=Tt(C,$,!1,!0))}return s.dirs&&(C=Tt(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(s.dirs):s.dirs),s.transition&&Ln(C,s.transition),M=C,cs(A),M}const $l=e=>{let t;for(const s in e)(s==="class"||s==="style"||hs(s))&&((t||(t={}))[s]=e[s]);return t},Pl=(e,t)=>{const s={};for(const n in e)(!yn(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Al(e,t,s){const{props:n,children:r,component:i}=e,{props:o,children:l,patchFlag:a}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?sr(n,o,h):!!o;if(a&8){const f=t.dynamicProps;for(let p=0;p<f.length;p++){const m=f[p];if(o[m]!==n[m]&&!ws(h,m))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===o?!1:n?o?sr(n,o,h):!0:!!o;return!1}function sr(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let r=0;r<n.length;r++){const i=n[r];if(t[i]!==e[i]&&!ws(s,i))return!0}return!1}function Ll({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const qi=e=>e.__isSuspense;function Ml(e,t){t&&t.pendingBranch?V(e)?t.effects.push(...e):t.effects.push(e):qo(e)}const ve=Symbol.for("v-fgt"),xs=Symbol.for("v-txt"),ct=Symbol.for("v-cmt"),Ps=Symbol.for("v-stc"),Ut=[];let Me=null;function I(e=!1){Ut.push(Me=e?null:[])}function Il(){Ut.pop(),Me=Ut[Ut.length-1]||null}let Bt=1;function nr(e,t=!1){Bt+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function Hi(e){return e.dynamicChildren=Bt>0?Me||wt:null,Il(),Bt>0&&Me&&Me.push(e),e}function k(e,t,s,n,r,i){return Hi(u(e,t,s,n,r,i,!0))}function Vi(e,t,s,n,r){return Hi(De(e,t,s,n,r,!0))}function Bi(e){return e?e.__v_isVNode===!0:!1}function At(e,t){return e.type===t.type&&e.key===t.key}const Wi=({key:e})=>e??null,ns=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||be(e)||W(e)?{i:Ie,r:e,k:t,f:!!s}:e:null);function u(e,t=null,s=null,n=0,r=null,i=e===ve?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Wi(t),ref:t&&ns(t),scopeId:wi,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ie};return l?(Dn(a,s),i&128&&e.normalize(a)):s&&(a.shapeFlag|=ce(s)?8:16),Bt>0&&!o&&Me&&(a.patchFlag>0||i&6)&&a.patchFlag!==32&&Me.push(a),a}const De=kl;function kl(e,t=null,s=null,n=0,r=null,i=!1){if((!e||e===rl)&&(e=ct),Bi(e)){const l=Tt(e,t,!0);return s&&Dn(l,s),Bt>0&&!i&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(Kl(e)&&(e=e.__vccOpts),t){t=Dl(t);let{class:l,style:a}=t;l&&!ce(l)&&(t.class=vs(l)),ne(a)&&(Pn(a)&&!V(a)&&(a=_e({},a)),t.style=Sn(a))}const o=ce(e)?1:qi(e)?128:Bo(e)?64:ne(e)?4:W(e)?2:0;return u(e,t,s,n,r,o,i,!0)}function Dl(e){return e?Pn(e)||Pi(e)?_e({},e):e:null}function Tt(e,t,s=!1,n=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:a}=e,h=t?Nl(r||{},t):r,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Wi(h),ref:t&&t.ref?s&&i?V(i)?i.concat(ns(t)):[i,ns(t)]:ns(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Tt(e.ssContent),ssFallback:e.ssFallback&&Tt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&Ln(f,a.clone(f)),f}function Le(e=" ",t=0){return De(xs,null,e,t)}function ae(e="",t=!1){return t?(I(),Vi(ct,null,e)):De(ct,null,e)}function Be(e){return e==null||typeof e=="boolean"?De(ct):V(e)?De(ve,null,e.slice()):Bi(e)?it(e):De(xs,null,String(e))}function it(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Tt(e)}function Dn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(V(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),Dn(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Pi(t)?t._ctx=Ie:r===3&&Ie&&(Ie.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:Ie},s=32):(t=String(t),n&64?(s=16,t=[Le(t)]):s=8);e.children=t,e.shapeFlag|=s}function Nl(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const r in n)if(r==="class")t.class!==n.class&&(t.class=vs([t.class,n.class]));else if(r==="style")t.style=Sn([t.style,n.style]);else if(hs(r)){const i=t[r],o=n[r];o&&i!==o&&!(V(i)&&i.includes(o))&&(t[r]=i?[].concat(i,o):o)}else r!==""&&(t[r]=n[r])}return t}function He(e,t,s,n=null){Ke(e,t,7,[s,n])}const Fl=zi();let jl=0;function Ul(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||Fl,i={uid:jl++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new co(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Li(n,r),emitsOptions:Ui(n,r),emit:null,emitted:null,propsDefaults:ee,inheritAttrs:n.inheritAttrs,ctx:ee,data:ee,props:ee,attrs:ee,slots:ee,refs:ee,setupState:ee,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=zl.bind(null,i),e.ce&&e.ce(i),i}let xe=null;const ql=()=>xe||Ie;let ds,gn;{const e=ms(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};ds=t("__VUE_INSTANCE_SETTERS__",s=>xe=s),gn=t("__VUE_SSR_SETTERS__",s=>Wt=s)}const Jt=e=>{const t=xe;return ds(e),e.scope.on(),()=>{e.scope.off(),ds(t)}},rr=()=>{xe&&xe.scope.off(),ds(null)};function Ki(e){return e.vnode.shapeFlag&4}let Wt=!1;function Hl(e,t=!1,s=!1){t&&gn(t);const{props:n,children:r}=e.vnode,i=Ki(e);pl(e,n,i,t),bl(e,r,s||t);const o=i?Vl(e,t):void 0;return t&&gn(!1),o}function Vl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,il);const{setup:n}=s;if(n){et();const r=e.setupContext=n.length>1?Wl(e):null,i=Jt(e),o=Kt(n,e,0,[e.props,r]),l=Gr(o);if(tt(),i(),(l||e.sp)&&!Ft(e)&&xi(e),l){if(o.then(rr,rr),t)return o.then(a=>{ir(e,a)}).catch(a=>{_s(a,e,0)});e.asyncDep=o}else ir(e,o)}else Gi(e)}function ir(e,t,s){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ne(t)&&(e.setupState=mi(t)),Gi(e)}function Gi(e,t,s){const n=e.type;e.render||(e.render=n.render||We);{const r=Jt(e);et();try{ol(e)}finally{tt(),r()}}}const Bl={get(e,t){return me(e,"get",""),e[t]}};function Wl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Bl),slots:e.slots,emit:e.emit,expose:t}}function Ss(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(mi(Po(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in jt)return jt[s](e)},has(t,s){return s in t||s in jt}})):e.proxy}function Kl(e){return W(e)&&"__vccOpts"in e}const Rt=(e,t)=>Do(e,t,Wt),Gl="3.5.22";/**
|
|
* @vue/runtime-dom v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let mn;const or=typeof window<"u"&&window.trustedTypes;if(or)try{mn=or.createPolicy("vue",{createHTML:e=>e})}catch{}const Ji=mn?e=>mn.createHTML(e):e=>e,Jl="http://www.w3.org/2000/svg",Yl="http://www.w3.org/1998/Math/MathML",Ze=typeof document<"u"?document:null,lr=Ze&&Ze.createElement("template"),Zl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?Ze.createElementNS(Jl,e):t==="mathml"?Ze.createElementNS(Yl,e):s?Ze.createElement(e,{is:s}):Ze.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>Ze.createTextNode(e),createComment:e=>Ze.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ze.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const o=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{lr.innerHTML=Ji(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=lr.content;if(n==="svg"||n==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Ql=Symbol("_vtc");function Xl(e,t,s){const n=e[Ql];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const ar=Symbol("_vod"),ea=Symbol("_vsh"),ta=Symbol(""),sa=/(?:^|;)\s*display\s*:/;function na(e,t,s){const n=e.style,r=ce(s);let i=!1;if(s&&!r){if(t)if(ce(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&rs(n,l,"")}else for(const o in t)s[o]==null&&rs(n,o,"");for(const o in s)o==="display"&&(i=!0),rs(n,o,s[o])}else if(r){if(t!==s){const o=n[ta];o&&(s+=";"+o),n.cssText=s,i=sa.test(s)}}else t&&e.removeAttribute("style");ar in e&&(e[ar]=i?n.display:"",e[ea]&&(n.display="none"))}const cr=/\s*!important$/;function rs(e,t,s){if(V(s))s.forEach(n=>rs(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=ra(e,t);cr.test(s)?e.setProperty(vt(n),s.replace(cr,""),"important"):e[n]=s}}const ur=["Webkit","Moz","ms"],As={};function ra(e,t){const s=As[t];if(s)return s;let n=lt(t);if(n!=="filter"&&n in e)return As[t]=n;n=Zr(n);for(let r=0;r<ur.length;r++){const i=ur[r]+n;if(i in e)return As[t]=i}return t}const fr="http://www.w3.org/1999/xlink";function dr(e,t,s,n,r,i=ao(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(fr,t.slice(6,t.length)):e.setAttributeNS(fr,t,s):s==null||i&&!Xr(s)?e.removeAttribute(t):e.setAttribute(t,i?"":ut(s)?String(s):s)}function hr(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ji(s):s);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(l!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Xr(s):s==null&&l==="string"?(s="",o=!0):l==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(r||t)}function yt(e,t,s,n){e.addEventListener(t,s,n)}function ia(e,t,s,n){e.removeEventListener(t,s,n)}const pr=Symbol("_vei");function oa(e,t,s,n,r=null){const i=e[pr]||(e[pr]={}),o=i[t];if(n&&o)o.value=n;else{const[l,a]=la(t);if(n){const h=i[t]=ua(n,r);yt(e,l,h,a)}else o&&(ia(e,l,o,a),i[t]=void 0)}}const gr=/(?:Once|Passive|Capture)$/;function la(e){let t;if(gr.test(e)){t={};let n;for(;n=e.match(gr);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vt(e.slice(2)),t]}let Ls=0;const aa=Promise.resolve(),ca=()=>Ls||(aa.then(()=>Ls=0),Ls=Date.now());function ua(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ke(fa(n,s.value),t,5,[n])};return s.value=e,s.attached=ca(),s}function fa(e,t){if(V(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const mr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,da=(e,t,s,n,r,i)=>{const o=r==="svg";t==="class"?Xl(e,n,o):t==="style"?na(e,s,n):hs(t)?yn(t)||oa(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ha(e,t,n,o))?(hr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&dr(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ce(n))?hr(e,lt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),dr(e,t,n,o))};function ha(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&mr(t)&&W(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return mr(t)&&ce(s)?!1:t in e}const vr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return V(t)?s=>Xt(t,s):t};function pa(e){e.target.composing=!0}function br(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ms=Symbol("_assign"),is={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[Ms]=vr(r);const i=n||r.props&&r.props.type==="number";yt(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;s&&(l=l.trim()),i&&(l=rn(l)),e[Ms](l)}),s&&yt(e,"change",()=>{e.value=e.value.trim()}),t||(yt(e,"compositionstart",pa),yt(e,"compositionend",br),yt(e,"change",br))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:i}},o){if(e[Ms]=vr(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?rn(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===a)||(e.value=a))}},ga=["ctrl","shift","alt","meta"],ma={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&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>ga.some(s=>e[`${s}Key`]&&!t.includes(s))},vn=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((r,...i)=>{for(let o=0;o<t.length;o++){const l=ma[t[o]];if(l&&l(r,t))return}return e(r,...i)}))},va=_e({patchProp:da},Zl);let _r;function ba(){return _r||(_r=yl(va))}const _a=((...e)=>{const t=ba().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=wa(n);if(!r)return;const i=t._component;!W(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,ya(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function ya(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function wa(e){return ce(e)?document.querySelector(e):e}const xa={class:"card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow duration-300"},Sa={class:"card-body"},Ea={class:"flex items-start justify-between"},Ca={class:"flex-1"},Oa={class:"card-title text-lg font-bold"},Ra={class:"text-sm text-base-content/70 mb-2"},za={class:"flex items-center gap-2 mb-3"},Ta={class:"badge badge-primary badge-sm"},$a={class:"badge badge-ghost badge-sm"},Pa={key:0,class:"text-sm text-base-content/80 mb-4 line-clamp-2"},Aa={key:1,class:"flex flex-wrap gap-1 mb-4"},La={key:0,class:"badge badge-outline badge-xs"},Ma={class:"flex flex-col items-end gap-2"},Ia={class:"tooltip","data-tip":"View on Steam Workshop"},ka=["href"],Da={key:0,class:"mt-6"},Na={class:"divider"},Fa={class:"text-sm font-medium"},ja={class:"table table-xs"},Ua={key:0,class:"badge badge-success badge-xs"},qa={key:1,class:"text-base-content/50"},Ha={key:0,class:"badge badge-info badge-xs"},Va={key:1,class:"text-base-content/50"},Ba={key:0,class:"badge badge-warning badge-xs"},Wa={key:1,class:"text-base-content/50"},Ka={class:"flex items-center gap-1"},Ga={class:"badge badge-ghost badge-xs"},Ja=["data-tip"],Ya={key:1,class:"tooltip","data-tip":"Needs manual validation"},Za={key:1,class:"mt-6 text-center py-4 border-2 border-dashed border-base-300 rounded-lg"},Qa=Gt({__name:"PuzzleCard",props:{puzzle:{},responses:{}},setup(e){return(t,s)=>(I(),k("div",xa,[u("div",Sa,[u("div",Ea,[u("div",Ca,[u("h3",Oa,B(e.puzzle.title),1),u("p",Ra,"by "+B(e.puzzle.author_name),1),u("div",za,[u("div",Ta,B(e.puzzle.steam_item_id),1),u("div",$a,"Order: "+B(e.puzzle.order_index+1),1)]),e.puzzle.description?(I(),k("p",Pa,B(e.puzzle.description),1)):ae("",!0),e.puzzle.tags&&e.puzzle.tags.length>0?(I(),k("div",Aa,[(I(!0),k(ve,null,zt(e.puzzle.tags.slice(0,3),n=>(I(),k("span",{key:n,class:"badge badge-outline badge-xs"},B(n),1))),128)),e.puzzle.tags.length>3?(I(),k("span",La," +"+B(e.puzzle.tags.length-3)+" more ",1)):ae("",!0)])):ae("",!0)]),u("div",Ma,[u("div",Ia,[u("a",{href:`https://steamcommunity.com/workshop/filedetails/?id=${e.puzzle.steam_item_id}`,target:"_blank",class:"btn btn-ghost btn-sm btn-square"},[...s[0]||(s[0]=[u("i",{class:"mdi mdi-steam text-lg"},null,-1)])],8,ka)])])]),e.responses&&e.responses.length>0?(I(),k("div",Da,[u("div",Na,[u("span",Fa,"Solutions ("+B(e.responses.length)+")",1)]),u("div",null,[u("table",ja,[s[3]||(s[3]=u("thead",null,[u("tr",null,[u("th",null,"Cost"),u("th",null,"Cycles"),u("th",null,"Area"),u("th",null,"Files")])],-1)),u("tbody",null,[(I(!0),k(ve,null,zt(e.responses,n=>(I(),k("tr",{key:n.id,class:"hover"},[u("td",null,[n.final_cost||n.cost?(I(),k("span",Ua,B(n.final_cost||n.cost),1)):(I(),k("span",qa,"-"))]),u("td",null,[n.final_cycles||n.cycles?(I(),k("span",Ha,B(n.final_cycles||n.cycles),1)):(I(),k("span",Va,"-"))]),u("td",null,[n.final_area||n.area?(I(),k("span",Ba,B(n.final_area||n.area),1)):(I(),k("span",Wa,"-"))]),u("td",null,[u("div",Ka,[u("span",Ga,B(n.files?.length||0),1),n.files?.length?(I(),k("div",{key:0,class:"tooltip","data-tip":n.files.map(r=>r.original_filename||r.file?.name).join(", ")},[...s[1]||(s[1]=[u("i",{class:"mdi mdi-information-outline text-xs"},null,-1)])],8,Ja)):ae("",!0),n.needs_manual_validation?(I(),k("div",Ya,[...s[2]||(s[2]=[u("i",{class:"mdi mdi-alert-circle text-xs text-warning"},null,-1)])])):ae("",!0)])])]))),128))])])])])):(I(),k("div",Za,[...s[4]||(s[4]=[u("i",{class:"mdi mdi-upload text-2xl text-base-content/40"},null,-1),u("p",{class:"text-sm text-base-content/60 mt-2"},"No solutions yet",-1),u("p",{class:"text-xs text-base-content/40"},"Upload solutions using the submit button",-1)])]))])]))}}),Xa=(e,t)=>{const s=e.__vccOpts||e;for(const[n,r]of t)s[n]=r;return s},ec=Xa(Qa,[["__scopeId","data-v-d2f8e73f"]]);var Is={exports:{}},yr;function tc(){return yr||(yr=1,(function(e){var t=(function(s){var n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(E,w,P){E[w]=P.value},o,l=typeof Symbol=="function"?Symbol:{},a=l.iterator||"@@iterator",h=l.asyncIterator||"@@asyncIterator",f=l.toStringTag||"@@toStringTag";function p(E,w,P){return Object.defineProperty(E,w,{value:P,enumerable:!0,configurable:!0,writable:!0}),E[w]}try{p({},"")}catch{p=function(w,P,U){return w[P]=U}}function m(E,w,P,U){var D=w&&w.prototype instanceof C?w:C,J=Object.create(D.prototype),de=new oe(U||[]);return i(J,"_invoke",{value:Ge(E,P,de)}),J}s.wrap=m;function y(E,w,P){try{return{type:"normal",arg:E.call(w,P)}}catch(U){return{type:"throw",arg:U}}}var j="suspendedStart",T="suspendedYield",A="executing",M="completed",$={};function C(){}function _(){}function H(){}var re={};p(re,a,function(){return this});var he=Object.getPrototypeOf,pe=he&&he(he(Y([])));pe&&pe!==n&&r.call(pe,a)&&(re=pe);var Se=H.prototype=C.prototype=Object.create(re);_.prototype=H,i(Se,"constructor",{value:H,configurable:!0}),i(H,"constructor",{value:_,configurable:!0}),_.displayName=p(H,f,"GeneratorFunction");function Ee(E){["next","throw","return"].forEach(function(w){p(E,w,function(P){return this._invoke(w,P)})})}s.isGeneratorFunction=function(E){var w=typeof E=="function"&&E.constructor;return w?w===_||(w.displayName||w.name)==="GeneratorFunction":!1},s.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,H):(E.__proto__=H,p(E,f,"GeneratorFunction")),E.prototype=Object.create(Se),E},s.awrap=function(E){return{__await:E}};function Ce(E,w){function P(J,de,ie,ue){var le=y(E[J],E,de);if(le.type==="throw")ue(le.arg);else{var nt=le.arg,$e=nt.value;return $e&&typeof $e=="object"&&r.call($e,"__await")?w.resolve($e.__await).then(function(Fe){P("next",Fe,ie,ue)},function(Fe){P("throw",Fe,ie,ue)}):w.resolve($e).then(function(Fe){nt.value=Fe,ie(nt)},function(Fe){return P("throw",Fe,ie,ue)})}}var U;function D(J,de){function ie(){return new w(function(ue,le){P(J,de,ue,le)})}return U=U?U.then(ie,ie):ie()}i(this,"_invoke",{value:D})}Ee(Ce.prototype),p(Ce.prototype,h,function(){return this}),s.AsyncIterator=Ce,s.async=function(E,w,P,U,D){D===void 0&&(D=Promise);var J=new Ce(m(E,w,P,U),D);return s.isGeneratorFunction(w)?J:J.next().then(function(de){return de.done?de.value:J.next()})};function Ge(E,w,P){var U=j;return function(J,de){if(U===A)throw new Error("Generator is already running");if(U===M){if(J==="throw")throw de;return K()}for(P.method=J,P.arg=de;;){var ie=P.delegate;if(ie){var ue=Je(ie,P);if(ue){if(ue===$)continue;return ue}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(U===j)throw U=M,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);U=A;var le=y(E,w,P);if(le.type==="normal"){if(U=P.done?M:T,le.arg===$)continue;return{value:le.arg,done:P.done}}else le.type==="throw"&&(U=M,P.method="throw",P.arg=le.arg)}}}function Je(E,w){var P=w.method,U=E.iterator[P];if(U===o)return w.delegate=null,P==="throw"&&E.iterator.return&&(w.method="return",w.arg=o,Je(E,w),w.method==="throw")||P!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+P+"' method")),$;var D=y(U,E.iterator,w.arg);if(D.type==="throw")return w.method="throw",w.arg=D.arg,w.delegate=null,$;var J=D.arg;if(!J)return w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,$;if(J.done)w[E.resultName]=J.value,w.next=E.nextLoc,w.method!=="return"&&(w.method="next",w.arg=o);else return J;return w.delegate=null,$}Ee(Se),p(Se,f,"Generator"),p(Se,a,function(){return this}),p(Se,"toString",function(){return"[object Generator]"});function ft(E){var w={tryLoc:E[0]};1 in E&&(w.catchLoc=E[1]),2 in E&&(w.finallyLoc=E[2],w.afterLoc=E[3]),this.tryEntries.push(w)}function Oe(E){var w=E.completion||{};w.type="normal",delete w.arg,E.completion=w}function oe(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(ft,this),this.reset(!0)}s.keys=function(E){var w=Object(E),P=[];for(var U in w)P.push(U);return P.reverse(),function D(){for(;P.length;){var J=P.pop();if(J in w)return D.value=J,D.done=!1,D}return D.done=!0,D}};function Y(E){if(E){var w=E[a];if(w)return w.call(E);if(typeof E.next=="function")return E;if(!isNaN(E.length)){var P=-1,U=function D(){for(;++P<E.length;)if(r.call(E,P))return D.value=E[P],D.done=!1,D;return D.value=o,D.done=!0,D};return U.next=U}}return{next:K}}s.values=Y;function K(){return{value:o,done:!0}}return oe.prototype={constructor:oe,reset:function(E){if(this.prev=0,this.next=0,this.sent=this._sent=o,this.done=!1,this.delegate=null,this.method="next",this.arg=o,this.tryEntries.forEach(Oe),!E)for(var w in this)w.charAt(0)==="t"&&r.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=o)},stop:function(){this.done=!0;var E=this.tryEntries[0],w=E.completion;if(w.type==="throw")throw w.arg;return this.rval},dispatchException:function(E){if(this.done)throw E;var w=this;function P(ue,le){return J.type="throw",J.arg=E,w.next=ue,le&&(w.method="next",w.arg=o),!!le}for(var U=this.tryEntries.length-1;U>=0;--U){var D=this.tryEntries[U],J=D.completion;if(D.tryLoc==="root")return P("end");if(D.tryLoc<=this.prev){var de=r.call(D,"catchLoc"),ie=r.call(D,"finallyLoc");if(de&&ie){if(this.prev<D.catchLoc)return P(D.catchLoc,!0);if(this.prev<D.finallyLoc)return P(D.finallyLoc)}else if(de){if(this.prev<D.catchLoc)return P(D.catchLoc,!0)}else if(ie){if(this.prev<D.finallyLoc)return P(D.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(E,w){for(var P=this.tryEntries.length-1;P>=0;--P){var U=this.tryEntries[P];if(U.tryLoc<=this.prev&&r.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var D=U;break}}D&&(E==="break"||E==="continue")&&D.tryLoc<=w&&w<=D.finallyLoc&&(D=null);var J=D?D.completion:{};return J.type=E,J.arg=w,D?(this.method="next",this.next=D.finallyLoc,$):this.complete(J)},complete:function(E,w){if(E.type==="throw")throw E.arg;return E.type==="break"||E.type==="continue"?this.next=E.arg:E.type==="return"?(this.rval=this.arg=E.arg,this.method="return",this.next="end"):E.type==="normal"&&w&&(this.next=w),$},finish:function(E){for(var w=this.tryEntries.length-1;w>=0;--w){var P=this.tryEntries[w];if(P.finallyLoc===E)return this.complete(P.completion,P.afterLoc),Oe(P),$}},catch:function(E){for(var w=this.tryEntries.length-1;w>=0;--w){var P=this.tryEntries[w];if(P.tryLoc===E){var U=P.completion;if(U.type==="throw"){var D=U.arg;Oe(P)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(E,w,P){return this.delegate={iterator:Y(E),resultName:w,nextLoc:P},this.method==="next"&&(this.arg=o),$}},s})(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(Is)),Is.exports}var ks,wr;function Nn(){return wr||(wr=1,ks=(e,t)=>`${e}-${t}-${Math.random().toString(16).slice(3,8)}`),ks}var Ds,xr;function Yi(){if(xr)return Ds;xr=1;const e=Nn();let t=0;return Ds=({id:s,action:n,payload:r={}})=>{let i=s;return typeof i>"u"&&(i=e("Job",t),t+=1),{id:i,action:n,payload:r}},Ds}var Lt={},Sr;function Fn(){if(Sr)return Lt;Sr=1;let e=!1;return Lt.logging=e,Lt.setLogging=t=>{e=t},Lt.log=(...t)=>e?console.log.apply(this,t):null,Lt}var Ns,Er;function sc(){if(Er)return Ns;Er=1;const e=Yi(),{log:t}=Fn(),s=Nn();let n=0;return Ns=()=>{const r=s("Scheduler",n),i={},o={};let l=[];n+=1;const a=()=>l.length,h=()=>Object.keys(i).length,f=()=>{if(l.length!==0){const T=Object.keys(i);for(let A=0;A<T.length;A+=1)if(typeof o[T[A]]>"u"){l[0](i[T[A]]);break}}},p=(T,A)=>new Promise((M,$)=>{const C=e({action:T,payload:A});l.push(async _=>{l.shift(),o[_.id]=C;try{M(await _[T].apply(this,[...A,C.id]))}catch(H){$(H)}finally{delete o[_.id],f()}}),t(`[${r}]: Add ${C.id} to JobQueue`),t(`[${r}]: JobQueue length=${l.length}`),f()});return{addWorker:T=>(i[T.id]=T,t(`[${r}]: Add ${T.id}`),t(`[${r}]: Number of workers=${h()}`),f(),T.id),addJob:async(T,...A)=>{if(h()===0)throw Error(`[${r}]: You need to have at least one worker before adding jobs`);return p(T,A)},terminate:async()=>{Object.keys(i).forEach(async T=>{await i[T].terminate()}),l=[]},getQueueLen:a,getNumWorkers:h}},Ns}function nc(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Fs,Cr;function rc(){if(Cr)return Fs;Cr=1;function e(){return!!(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron||typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Electron")>=0)}return Fs=e,Fs}var js,Or;function ic(){if(Or)return js;Or=1;const e=rc();return js=t=>{const s={};return typeof WorkerGlobalScope<"u"?s.type="webworker":e()?s.type="electron":typeof document=="object"?s.type="browser":typeof process=="object"&&typeof nc=="function"&&(s.type="node"),typeof t>"u"?s:s[t]},js}var Us,Rr;function oc(){if(Rr)return Us;Rr=1;const t=ic()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return Us=s=>{const n={...s};return["corePath","workerPath","langPath"].forEach(r=>{s[r]&&(n[r]=t(n[r]))}),n},Us}var qs,zr;function lc(){return zr||(zr=1,qs=e=>{const t=[],s=[],n=[],r=[],i=[];return e.blocks&&e.blocks.forEach(o=>{o.paragraphs.forEach(l=>{l.lines.forEach(a=>{a.words.forEach(h=>{h.symbols.forEach(f=>{i.push({...f,page:e,block:o,paragraph:l,line:a,word:h})}),r.push({...h,page:e,block:o,paragraph:l,line:a})}),n.push({...a,page:e,block:o,paragraph:l})}),s.push({...l,page:e,block:o})}),t.push({...o,page:e})}),{...e,blocks:t,paragraphs:s,lines:n,words:r,symbols:i}}),qs}var Hs,Tr;function Zi(){return Tr||(Tr=1,Hs={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),Hs}const ac="5.1.1",cc={version:ac};var Vs,$r;function uc(){return $r||($r=1,Vs={workerBlobURL:!0,logger:()=>{}}),Vs}var Bs,Pr;function fc(){if(Pr)return Bs;Pr=1;const e=cc.version;return Bs={...uc(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${e}/dist/worker.min.js`},Bs}var Ws,Ar;function dc(){return Ar||(Ar=1,Ws=({workerPath:e,workerBlobURL:t})=>{let s;if(Blob&&URL&&t){const n=new Blob([`importScripts("${e}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(n))}else s=new Worker(e);return s}),Ws}var Ks,Lr;function hc(){return Lr||(Lr=1,Ks=e=>{e.terminate()}),Ks}var Gs,Mr;function pc(){return Mr||(Mr=1,Gs=(e,t)=>{e.onmessage=({data:s})=>{t(s)}}),Gs}var Js,Ir;function gc(){return Ir||(Ir=1,Js=async(e,t)=>{e.postMessage(t)}),Js}var Ys,kr;function mc(){if(kr)return Ys;kr=1;const e=s=>new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{n(i.result)},i.onerror=({target:{error:{code:o}}})=>{r(Error(`File could not be read! Code=${o}`))},i.readAsArrayBuffer(s)}),t=async s=>{let n=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?n=atob(s.split(",")[1]).split("").map(r=>r.charCodeAt(0)):n=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(n=await t(s.src)),s.tagName==="VIDEO"&&(n=await t(s.poster)),s.tagName==="CANVAS"&&await new Promise(r=>{s.toBlob(async i=>{n=await e(i),r()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const r=await s.convertToBlob();n=await e(r)}else(s instanceof File||s instanceof Blob)&&(n=await e(s));return new Uint8Array(n)};return Ys=t,Ys}var Zs,Dr;function vc(){if(Dr)return Zs;Dr=1;const e=fc(),t=dc(),s=hc(),n=pc(),r=gc(),i=mc();return Zs={defaultOptions:e,spawnWorker:t,terminateWorker:s,onMessage:n,send:r,loadImage:i},Zs}var Qs,Nr;function Qi(){if(Nr)return Qs;Nr=1;const e=oc(),t=lc(),s=Yi(),{log:n}=Fn(),r=Nn(),i=Zi(),{defaultOptions:o,spawnWorker:l,terminateWorker:a,onMessage:h,loadImage:f,send:p}=vc();let m=0;return Qs=async(y="eng",j=i.LSTM_ONLY,T={},A={})=>{const M=r("Worker",m),{logger:$,errorHandler:C,..._}=e({...o,...T}),H={},re={},he=typeof y=="string"?y.split("+"):y;let pe=j,Se=A;const Ee=[i.DEFAULT,i.LSTM_ONLY].includes(j)&&!_.legacyCore;let Ce,Ge;const Je=new Promise((g,v)=>{Ge=g,Ce=v}),ft=g=>{Ce(g.message)};let Oe=l(_);Oe.onerror=ft,m+=1;const oe=(g,v)=>{H[g]=v},Y=(g,v)=>{re[g]=v},K=({id:g,action:v,payload:z})=>new Promise((R,S)=>{n(`[${M}]: Start ${g}, action=${v}`);const x=`${v}-${g}`;oe(x,R),Y(x,S),p(Oe,{workerId:M,jobId:g,action:v,payload:z})}),E=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),w=g=>K(s({id:g,action:"load",payload:{options:{lstmOnly:Ee,corePath:_.corePath,logging:_.logging}}})),P=(g,v,z)=>K(s({id:z,action:"FS",payload:{method:"writeFile",args:[g,v]}})),U=(g,v)=>K(s({id:v,action:"FS",payload:{method:"readFile",args:[g,{encoding:"utf8"}]}})),D=(g,v)=>K(s({id:v,action:"FS",payload:{method:"unlink",args:[g]}})),J=(g,v,z)=>K(s({id:z,action:"FS",payload:{method:g,args:v}})),de=()=>console.warn("`loadLanguage` is depreciated and should be removed from code (workers now come with language pre-loaded)"),ie=(g,v)=>K(s({id:v,action:"loadLanguage",payload:{langs:g,options:{langPath:_.langPath,dataPath:_.dataPath,cachePath:_.cachePath,cacheMethod:_.cacheMethod,gzip:_.gzip,lstmOnly:[i.DEFAULT,i.LSTM_ONLY].includes(pe)&&!_.legacyLang}}})),ue=()=>console.warn("`initialize` is depreciated and should be removed from code (workers now come pre-initialized)"),le=(g,v,z,R)=>K(s({id:R,action:"initialize",payload:{langs:g,oem:v,config:z}})),nt=(g="eng",v,z,R)=>{if(Ee&&[i.TESSERACT_ONLY,i.TESSERACT_LSTM_COMBINED].includes(v))throw Error("Legacy model requested but code missing.");const S=v||pe;pe=S;const x=z||Se;Se=x;const L=(typeof g=="string"?g.split("+"):g).filter(F=>!he.includes(F));return he.push(...L),L.length>0?ie(L,R).then(()=>le(g,S,x,R)):le(g,S,x,R)},$e=(g={},v)=>K(s({id:v,action:"setParameters",payload:{params:g}})),Fe=async(g,v={},z={blocks:!0,text:!0,hocr:!0,tsv:!0},R)=>K(s({id:R,action:"recognize",payload:{image:await f(g),options:v,output:z}})),c=(g="Tesseract OCR Result",v=!1,z)=>(console.log("`getPDF` function is depreciated. `recognize` option `savePDF` should be used instead."),K(s({id:z,action:"getPDF",payload:{title:g,textonly:v}}))),d=async(g,v)=>{if(Ee)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return K(s({id:v,action:"detect",payload:{image:await f(g)}}))},b=async()=>(Oe!==null&&(a(Oe),Oe=null),Promise.resolve());h(Oe,({workerId:g,jobId:v,status:z,action:R,data:S})=>{const x=`${R}-${v}`;if(z==="resolve"){n(`[${g}]: Complete ${v}`);let N=S;R==="recognize"?N=t(S):R==="getPDF"&&(N=Array.from({...S,length:Object.keys(S).length})),H[x]({jobId:v,data:N})}else if(z==="reject")if(re[x](S),R==="load"&&Ce(S),C)C(S);else throw Error(S);else z==="progress"&&$({...S,userJobId:v})});const O={id:M,worker:Oe,setResolve:oe,setReject:Y,load:E,writeText:P,readText:U,removeFile:D,FS:J,loadLanguage:de,initialize:ue,reinitialize:nt,setParameters:$e,recognize:Fe,getPDF:c,detect:d,terminate:b};return w().then(()=>ie(y)).then(()=>le(y,j,A)).then(()=>Ge(O)).catch(()=>{}),Je},Qs}var Xs,Fr;function bc(){if(Fr)return Xs;Fr=1;const e=Qi();return Xs={recognize:async(n,r,i)=>{const o=await e(r,1,i);return o.recognize(n).finally(async()=>{await o.terminate()})},detect:async(n,r)=>{const i=await e("osd",0,r);return i.detect(n).finally(async()=>{await i.terminate()})}},Xs}var en,jr;function _c(){return jr||(jr=1,en={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),en}var tn,Ur;function yc(){return Ur||(Ur=1,tn={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),tn}var sn,qr;function wc(){if(qr)return sn;qr=1,tc();const e=sc(),t=Qi(),s=bc(),n=_c(),r=Zi(),i=yc(),{setLogging:o}=Fn();return sn={languages:n,OEM:r,PSM:i,createScheduler:e,createWorker:t,setLogging:o,...s},sn}var xc=wc();class jn{worker=null;availablePuzzleNames=[];regions={puzzle:{x:15,y:600,width:330,height:28},cost:{x:412,y:603,width:65,height:22},cycles:{x:577,y:603,width:65,height:22},area:{x:739,y:603,width:65,height:22}};async initialize(){this.worker||(this.worker=await xc.createWorker("eng"),await this.worker.setParameters({tessedit_ocr_engine_mode:"3",tessedit_pageseg_mode:7}))}setAvailablePuzzleNames(t){this.availablePuzzleNames=t}async extractOpusMagnumData(t){this.worker||await this.initialize();const s=URL.createObjectURL(t),n=new Image;return new Promise((r,i)=>{n.onload=async()=>{try{const o=document.createElement("canvas"),l=o.getContext("2d");o.width=n.width,o.height=n.height,l.drawImage(n,0,0);const a={};for(const[h,f]of Object.entries(this.regions)){const p=document.createElement("canvas"),m=p.getContext("2d");p.width=f.width,p.height=f.height,m.drawImage(o,f.x,f.y,f.width,f.height,0,0,f.width,f.height);const y=m.getImageData(0,0,f.width,f.height);this.preprocessImage(y),m.putImageData(y,0,0),h==="cost"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789G"}):h==="cycles"||h==="area"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789"}):h==="puzzle"?await this.worker.setParameters({tessedit_char_whitelist:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -"}):await this.worker.setParameters({tessedit_char_whitelist:""});const{data:{text:j}}=await this.worker.recognize(p);let T=j.trim();if(h==="cost"){if(T.endsWith("6")&&T.length>1){const A=T.slice(0,-1);/^\d+$/.test(A)&&(T=A)}T=T.replace(/G+$/g,""),T=T.replace(/[^0-9]/g,"")}else h==="cycles"||h==="area"?T=T.replace(/[^0-9]/g,""):h==="puzzle"&&(T=this.findBestPuzzleMatch(T));a[h]=T}URL.revokeObjectURL(s),r({puzzle:a.puzzle||"",cost:a.cost||"",cycles:a.cycles||"",area:a.area||""})}catch(o){URL.revokeObjectURL(s),i(o)}},n.onerror=()=>{URL.revokeObjectURL(s),i(new Error("Failed to load image"))},n.src=s})}preprocessImage(t){const s=t.data;for(let n=0;n<s.length;n+=4){const i=255-Math.round(.299*s[n]+.587*s[n+1]+.114*s[n+2]);s[n]=i,s[n+1]=i,s[n+2]=i}}levenshteinDistance(t,s){const n=Array(s.length+1).fill(null).map(()=>Array(t.length+1).fill(null));for(let r=0;r<=t.length;r++)n[0][r]=r;for(let r=0;r<=s.length;r++)n[r][0]=r;for(let r=1;r<=s.length;r++)for(let i=1;i<=t.length;i++){const o=t[i-1]===s[r-1]?0:1;n[r][i]=Math.min(n[r][i-1]+1,n[r-1][i]+1,n[r-1][i-1]+o)}return n[s.length][t.length]}findBestPuzzleMatch(t){if(!this.availablePuzzleNames.length)return t.trim();const s=t.trim(),n=this.availablePuzzleNames.find(o=>o.toLowerCase()===s.toLowerCase());if(n)return n;let r=s,i=1/0;for(const o of this.availablePuzzleNames){const l=this.levenshteinDistance(s.toLowerCase(),o.toLowerCase()),a=Math.max(s.length,o.length);1-l/a>.7&&l<i&&(i=l,r=o)}return r}async terminate(){this.worker&&(await this.worker.terminate(),this.worker=null)}static isValidOpusMagnumImage(t){return["image/jpeg","image/jpg","image/png","image/gif"].includes(t.type)}static drawDebugRegions(t){return new Promise((s,n)=>{const r=URL.createObjectURL(t),i=new Image;i.onload=()=>{const o=document.createElement("canvas"),l=o.getContext("2d");o.width=i.width,o.height=i.height,l.drawImage(i,0,0),l.strokeStyle="#00ff00",l.lineWidth=2;const a=new jn;Object.values(a.regions).forEach(h=>{l.strokeRect(h.x,h.y,h.width,h.height)}),URL.revokeObjectURL(r),s(o.toDataURL())},i.onerror=()=>{URL.revokeObjectURL(r),n(new Error("Failed to load image for debug"))},i.src=r})}}const nn=new jn,Sc={class:"form-control w-full"},Ec={key:0,class:"space-y-4"},Cc={key:1,class:"space-y-4"},Oc={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4"},Rc={class:"aspect-square rounded-lg overflow-hidden bg-base-200"},zc=["src","alt"],Tc={class:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity duration-200 rounded-lg flex items-center justify-center"},$c=["onClick"],Pc={class:"mt-2"},Ac={class:"text-xs font-medium truncate"},Lc={class:"text-xs text-base-content/60"},Mc={key:0,class:"mt-1 flex items-center gap-1"},Ic={key:1,class:"mt-1"},kc={class:"text-xs text-error"},Dc={key:2,class:"mt-1 space-y-1"},Nc={class:"text-xs flex items-center justify-between"},Fc=["onClick"],jc={class:"text-xs space-y-1 bg-base-200 p-2 rounded"},Uc={key:0},qc={key:1},Hc={key:2},Vc={key:3},Bc={key:3,class:"mt-1"},Wc=["onClick"],Kc={class:"flex justify-center"},Gc={key:0,class:"label"},Jc={class:"label-text-alt text-error"},Yc=Gt({__name:"FileUpload",props:{modelValue:{},puzzles:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,n=t,r=fe(),i=fe(!1),o=fe(""),l=fe([]);Ot(()=>s.modelValue,$=>{l.value=$},{immediate:!0}),Ot(l,$=>{n("update:modelValue",$)},{deep:!0}),Ot(()=>s.puzzles,$=>{if($&&$.length>0){const C=$.map(_=>_.title);nn.setAvailablePuzzleNames(C)}},{immediate:!0});const a=$=>{const C=$.target;C.files&&f(Array.from(C.files))},h=$=>{$.preventDefault(),i.value=!1,$.dataTransfer?.files&&f(Array.from($.dataTransfer.files))},f=async $=>{o.value="";for(const C of $)if(p(C))try{const _=await m(C),H=C.type.startsWith("image/gif")?"gif":"image",re={file:C,preview:_,type:H,ocrProcessing:!1,ocrError:void 0,ocrData:void 0};l.value.push(re),T(C)&&es(()=>{A(re)})}catch{o.value=`Failed to process ${C.name}`}},p=$=>$.type.startsWith("image/")?$.size>256*1024*1024?(o.value=`${$.name} is too large (max 256MB)`,!1):!0:(o.value=`${$.name} is not a valid image file`,!1),m=$=>new Promise((C,_)=>{const H=new FileReader;H.onload=re=>C(re.target?.result),H.onerror=_,H.readAsDataURL($)}),y=$=>{l.value.splice($,1)},j=$=>{if($===0)return"0 Bytes";const C=1024,_=["Bytes","KB","MB","GB"],H=Math.floor(Math.log($)/Math.log(C));return parseFloat(($/Math.pow(C,H)).toFixed(2))+" "+_[H]},T=$=>$.type.startsWith("image/")&&$.size>5e4,A=async $=>{const C=l.value.findIndex(_=>_.file===$.file);if(C!==-1){l.value[C].ocrProcessing=!0,l.value[C].ocrError=void 0,l.value[C].ocrData=void 0;try{console.log("Starting OCR processing for:",$.file.name),await nn.initialize();const _=await nn.extractOpusMagnumData($.file);console.log("OCR completed:",_),await es(),l.value[C].ocrData=_,await es()}catch(_){console.error("OCR processing failed:",_),l.value[C].ocrError="Failed to extract puzzle data"}finally{l.value[C].ocrProcessing=!1}}},M=$=>{A($)};return($,C)=>(I(),k("div",Sc,[C[17]||(C[17]=u("label",{class:"label"},[u("span",{class:"label-text font-medium"},"Upload Solution Files"),u("span",{class:"label-text-alt text-xs"},"Images or GIFs only")],-1)),u("div",{class:vs(["border-2 border-dashed border-base-300 rounded-lg p-6 text-center hover:border-primary transition-colors duration-300",{"border-primary bg-primary/5":i.value}]),onDrop:h,onDragover:C[2]||(C[2]=vn(_=>i.value=!0,["prevent"])),onDragleave:C[3]||(C[3]=_=>i.value=!1),onDragenter:C[4]||(C[4]=vn(()=>{},["prevent"]))},[u("input",{ref_key:"fileInput",ref:r,type:"file",multiple:"",accept:"image/*,.gif",class:"hidden",onChange:a},null,544),l.value.length===0?(I(),k("div",Ec,[C[6]||(C[6]=u("div",{class:"mx-auto w-12 h-12 text-base-content/40 flex items-center justify-center"},[u("i",{class:"mdi mdi-cloud-upload text-5xl"})],-1)),u("div",null,[C[5]||(C[5]=u("p",{class:"text-base-content/70 mb-2"},"Drop your files here or",-1)),u("button",{type:"button",onClick:C[0]||(C[0]=_=>r.value?.click()),class:"btn btn-primary btn-sm"}," Choose Files ")]),C[7]||(C[7]=u("p",{class:"text-xs text-base-content/50"}," Supported formats: JPG, PNG, GIF (max 256MB each) ",-1))])):(I(),k("div",Cc,[u("div",Oc,[(I(!0),k(ve,null,zt(l.value,(_,H)=>(I(),k("div",{key:H,class:"relative group"},[u("div",Rc,[u("img",{src:_.preview,alt:_.file.name,class:"w-full h-full object-cover"},null,8,zc)]),u("div",Tc,[u("button",{onClick:re=>y(H),class:"btn btn-error btn-sm btn-circle"},[...C[8]||(C[8]=[u("i",{class:"mdi mdi-close"},null,-1)])],8,$c)]),u("div",Pc,[u("p",Ac,B(_.file.name),1),u("p",Lc,B(j(_.file.size))+" • "+B(_.type.toUpperCase()),1),_.ocrProcessing?(I(),k("div",Mc,[...C[9]||(C[9]=[u("span",{class:"loading loading-spinner loading-xs"},null,-1),u("span",{class:"text-xs text-info"},"Extracting puzzle data...",-1)])])):_.ocrError?(I(),k("div",Ic,[u("p",kc,B(_.ocrError),1)])):_.ocrData?(I(),k("div",Dc,[u("div",Nc,[C[11]||(C[11]=u("span",{class:"font-medium text-success"},"✓ OCR Complete",-1)),u("button",{onClick:re=>M(_),class:"btn btn-xs btn-ghost",title:"Retry OCR"},[...C[10]||(C[10]=[u("i",{class:"mdi mdi-refresh"},null,-1)])],8,Fc)]),u("div",jc,[_.ocrData.puzzle?(I(),k("div",Uc,[C[12]||(C[12]=u("strong",null,"Puzzle:",-1)),Le(" "+B(_.ocrData.puzzle),1)])):ae("",!0),_.ocrData.cost?(I(),k("div",qc,[C[13]||(C[13]=u("strong",null,"Cost:",-1)),Le(" "+B(_.ocrData.cost),1)])):ae("",!0),_.ocrData.cycles?(I(),k("div",Hc,[C[14]||(C[14]=u("strong",null,"Cycles:",-1)),Le(" "+B(_.ocrData.cycles),1)])):ae("",!0),_.ocrData.area?(I(),k("div",Vc,[C[15]||(C[15]=u("strong",null,"Area:",-1)),Le(" "+B(_.ocrData.area),1)])):ae("",!0)])])):!_.ocrProcessing&&!_.ocrError&&!_.ocrData?(I(),k("div",Bc,[u("button",{onClick:re=>A(_),class:"btn btn-xs btn-outline"},[...C[16]||(C[16]=[u("i",{class:"mdi mdi-text-recognition"},null,-1),Le(" Extract Puzzle Data ",-1)])],8,Wc)])):ae("",!0)])]))),128))]),u("div",Kc,[u("button",{type:"button",onClick:C[1]||(C[1]=_=>r.value?.click()),class:"btn btn-outline btn-sm"}," Add More Files ")])]))],34),o.value?(I(),k("div",Gc,[u("span",Jc,B(o.value),1)])):ae("",!0)]))}}),Zc={class:"card bg-base-100 shadow-xl"},Qc={class:"card-body"},Xc={key:0,class:"alert alert-info"},eu={class:"flex-1"},tu={class:"font-bold"},su={class:"text-sm space-y-1 mt-1"},nu={class:"badge badge-ghost badge-sm"},ru={class:"form-control"},iu={class:"label"},ou={class:"label-text-alt"},lu={class:"card-actions justify-end"},au=["disabled"],cu={key:0,class:"loading loading-spinner loading-sm"},uu=Gt({__name:"SubmissionForm",props:{puzzles:{},findPuzzleByName:{type:Function}},emits:["submit"],setup(e,{emit:t}){const s=e,n=t,r=fe([]),i=fe(""),o=fe(!1),l=Rt(()=>i.value.length),a=Rt(()=>r.value.length>0&&!o.value),h=Rt(()=>{const p={};return r.value.forEach(m=>{if(m.ocrData?.puzzle){const y=m.ocrData.puzzle;p[y]||(p[y]={puzzle:s.findPuzzleByName(y),files:[]}),p[y].files.push(m)}}),p}),f=async()=>{if(a.value){o.value=!0;try{n("submit",{files:r.value,notes:i.value.trim()||void 0}),r.value=[],i.value=""}catch(p){console.error("Submission error:",p)}finally{o.value=!1}}};return(p,m)=>(I(),k("div",Zc,[u("div",Qc,[m[4]||(m[4]=u("h2",{class:"card-title text-xl mb-6"},[u("i",{class:"mdi mdi-check-circle text-2xl text-primary"}),Le(" Submit Solution ")],-1)),u("form",{onSubmit:vn(f,["prevent"]),class:"space-y-6"},[Object.keys(h.value).length>0?(I(),k("div",Xc,[m[2]||(m[2]=u("i",{class:"mdi mdi-information-outline text-xl"},null,-1)),u("div",eu,[u("h4",tu,"Detected Puzzles ("+B(Object.keys(h.value).length)+")",1),u("div",su,[(I(!0),k(ve,null,zt(h.value,(y,j)=>(I(),k("div",{key:j,class:"flex justify-between"},[u("span",null,B(j),1),u("span",nu,B(y.files.length)+" file(s)",1)]))),128))])])])):ae("",!0),De(Yc,{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=y=>r.value=y),puzzles:e.puzzles},null,8,["modelValue","puzzles"]),u("div",ru,[u("label",iu,[m[3]||(m[3]=u("span",{class:"label-text font-medium"},"Notes (Optional)",-1)),u("span",ou,B(l.value)+"/500",1)]),ts(u("textarea",{"onUpdate:modelValue":m[1]||(m[1]=y=>i.value=y),class:"textarea textarea-bordered h-24 resize-none",placeholder:"Add any notes about your solution, approach, or interesting findings...",maxlength:"500"},null,512),[[is,i.value]])]),u("div",lu,[u("button",{type:"submit",class:"btn btn-primary",disabled:o.value},[o.value?(I(),k("span",cu)):ae("",!0),Le(" "+B(o.value?"Submitting...":"Submit Solution"),1)],8,au)])],32)])]))}}),Hr="/api";class fu{async request(t,s={}){try{const n=await fetch(`${Hr}${t}`,{headers:{"Content-Type":"application/json",...s.headers},...s}),r=await n.json();return n.ok?{data:r,status:n.status}:{error:r.detail||`HTTP ${n.status}`,status:n.status}}catch(n){return{error:n instanceof Error?n.message:"Network error",status:0}}}async uploadRequest(t,s){try{const n=await fetch(`${Hr}${t}`,{method:"POST",body:s}),r=await n.json();return n.ok?{data:r,status:n.status}:{error:r.detail||`HTTP ${n.status}`,status:n.status}}catch(n){return{error:n instanceof Error?n.message:"Network error",status:0}}}async getPuzzles(){return this.request("/submissions/puzzles")}async getSubmissions(t=20,s=0){return this.request(`/submissions/submissions?limit=${t}&offset=${s}`)}async getSubmission(t){return this.request(`/submissions/submissions/${t}`)}async createSubmission(t,s){const n=new FormData;return n.append("data",JSON.stringify(t)),s.forEach(r=>{n.append("files",r)}),this.uploadRequest("/submissions/submissions",n)}async validateResponse(t,s){return this.request(`/submissions/responses/${t}/validate`,{method:"PUT",body:JSON.stringify(s)})}async getResponsesNeedingValidation(){return this.request("/submissions/responses/needs-validation")}async validateSubmission(t){return this.request(`/submissions/submissions/${t}/validate`,{method:"POST"})}async deleteSubmission(t){return this.request(`/submissions/submissions/${t}`,{method:"DELETE"})}async getStats(){return this.request("/submissions/stats")}async healthCheck(){return this.request("/health")}async getUserInfo(){return this.request("/user")}}const mt=new fu,bn={async loadPuzzles(){const e=await mt.getPuzzles();return e.error?(console.error("Failed to load puzzles:",e.error),[]):e.data||[]},findPuzzleByName(e,t){if(!t)return null;let s=e.find(n=>n.title.toLowerCase()===t.toLowerCase());return s||(s=e.find(n=>n.title.toLowerCase().includes(t.toLowerCase())||t.toLowerCase().includes(n.title.toLowerCase()))),s||null}},Vr={async createFromFiles(e,t,s){const n={};e.forEach(o=>{if(o.ocrData?.puzzle){const l=o.ocrData.puzzle;n[l]||(n[l]={puzzle:bn.findPuzzleByName(t,l),files:[]}),n[l].files.push(o)}});const r=Object.entries(n).filter(([o,l])=>l.puzzle).map(([o,l])=>{const a=l.files.find(f=>f.ocrData?.cost||f.ocrData?.cycles||f.ocrData?.area),h=!a?.ocrData||!a.ocrData.cost||!a.ocrData.cycles||!a.ocrData.area;return{puzzle_id:l.puzzle.id,puzzle_name:o,cost:a?.ocrData?.cost,cycles:a?.ocrData?.cycles,area:a?.ocrData?.area,needs_manual_validation:h,ocr_confidence_score:h?.5:.9}});if(r.length===0)return{error:"No valid puzzle responses found",status:400};const i=e.map(o=>o.file);return mt.createSubmission({notes:s,responses:r},i)},async loadSubmissions(e=20,t=0){const s=await mt.getSubmissions(e,t);return s.error?(console.error("Failed to load submissions:",s.error),[]):s.data?.items||[]}},Br={getErrorMessage(e){return typeof e=="string"?e:e instanceof Error?e.message:typeof e=="object"&&e!==null&&"detail"in e?String(e.detail):"An unknown error occurred"},isNetworkError(e){return typeof e=="string"&&e.includes("Network")},isValidationError(e){return e===400},isAuthError(e){return e===401||e===403}},du={class:"card bg-base-100 shadow-xl"},hu={class:"card-body"},pu={class:"stats stats-vertical lg:stats-horizontal shadow mb-6"},gu={class:"stat"},mu={class:"stat-value text-primary"},vu={class:"stat"},bu={class:"stat-value text-secondary"},_u={class:"stat"},yu={class:"stat-value text-warning"},wu={class:"stat"},xu={class:"stat-value text-success"},Su={key:0},Eu={class:"overflow-x-auto"},Cu={class:"table table-zebra"},Ou={class:"font-bold"},Ru={class:"text-sm opacity-50"},zu={class:"text-sm space-y-1"},Tu={class:"badge badge-warning badge-sm"},$u=["onClick"],Pu={key:1,class:"text-center py-8"},Au={key:0,class:"modal modal-open"},Lu={class:"modal-box"},Mu={key:0,class:"space-y-4"},Iu={class:"alert alert-info"},ku={class:"font-bold"},Du={class:"grid grid-cols-3 gap-4"},Nu={class:"form-control"},Fu=["placeholder"],ju={class:"form-control"},Uu=["placeholder"],qu={class:"form-control"},Hu=["placeholder"],Vu={class:"modal-action"},Bu=["disabled"],Wu={key:0,class:"loading loading-spinner loading-sm"},Ku=Gt({__name:"AdminPanel",setup(e,{expose:t}){const s=fe({total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}),n=fe([]),r=fe(!1),i=fe(!1),o=fe({show:!1,response:null,data:{validated_cost:"",validated_cycles:"",validated_area:""}}),l=async()=>{try{r.value=!0;try{const m=await mt.getStats();m.data&&(s.value=m.data)}catch(m){console.warn("Stats endpoint not available:",m),s.value={total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}}const p=await mt.getResponsesNeedingValidation();p.data&&(n.value=p.data)}catch(p){console.error("Failed to load admin data:",p)}finally{r.value=!1}},a=p=>{o.value.response=p,o.value.data={validated_cost:p.cost||"",validated_cycles:p.cycles||"",validated_area:p.area||""},o.value.show=!0},h=()=>{o.value.show=!1,o.value.response=null,o.value.data={validated_cost:"",validated_cycles:"",validated_area:""}},f=async()=>{if(o.value.response?.id)try{i.value=!0;const p=await mt.validateResponse(o.value.response.id,o.value.data);if(p.error){alert(`Validation failed: ${p.error}`);return}n.value=n.value.filter(m=>m.id!==o.value.response?.id),s.value.needs_validation=Math.max(0,s.value.needs_validation-1),h()}catch(p){console.error("Validation error:",p),alert("Validation failed")}finally{i.value=!1}};return Mn(()=>{l()}),t({refresh:l}),(p,m)=>(I(),k(ve,null,[u("div",du,[u("div",hu,[m[11]||(m[11]=u("h2",{class:"card-title"},[u("i",{class:"mdi mdi-shield-account text-2xl text-warning"}),Le(" Admin Panel ")],-1)),u("div",pu,[u("div",gu,[m[3]||(m[3]=u("div",{class:"stat-title"},"Total Submissions",-1)),u("div",mu,B(s.value.total_submissions),1)]),u("div",vu,[m[4]||(m[4]=u("div",{class:"stat-title"},"Total Responses",-1)),u("div",bu,B(s.value.total_responses),1)]),u("div",_u,[m[5]||(m[5]=u("div",{class:"stat-title"},"Need Validation",-1)),u("div",yu,B(s.value.needs_validation),1)]),u("div",wu,[m[6]||(m[6]=u("div",{class:"stat-title"},"Validation Rate",-1)),u("div",xu,B(Math.round(s.value.validation_rate*100))+"%",1)])]),n.value.length>0?(I(),k("div",Su,[m[9]||(m[9]=u("h3",{class:"text-lg font-bold mb-4"},"Responses Needing Validation",-1)),u("div",Eu,[u("table",Cu,[m[8]||(m[8]=u("thead",null,[u("tr",null,[u("th",null,"Puzzle"),u("th",null,"OCR Data"),u("th",null,"Confidence"),u("th",null,"Actions")])],-1)),u("tbody",null,[(I(!0),k(ve,null,zt(n.value,y=>(I(),k("tr",{key:y.id},[u("td",null,[u("div",Ou,B(y.puzzle_name),1),u("div",Ru,"ID: "+B(y.id),1)]),u("td",null,[u("div",zu,[u("div",null,"Cost: "+B(y.cost||"-"),1),u("div",null,"Cycles: "+B(y.cycles||"-"),1),u("div",null,"Area: "+B(y.area||"-"),1)])]),u("td",null,[u("div",Tu,B(y.ocr_confidence_score?Math.round(y.ocr_confidence_score*100)+"%":"Low"),1)]),u("td",null,[u("button",{onClick:j=>a(y),class:"btn btn-sm btn-primary"},[...m[7]||(m[7]=[u("i",{class:"mdi mdi-check-circle mr-1"},null,-1),Le(" Validate ",-1)])],8,$u)])]))),128))])])])])):(I(),k("div",Pu,[...m[10]||(m[10]=[u("i",{class:"mdi mdi-check-all text-6xl text-success opacity-50"},null,-1),u("p",{class:"text-lg font-medium mt-2"},"All responses validated!",-1),u("p",{class:"text-sm opacity-70"},"No responses currently need manual validation.",-1)])]))])]),o.value.show?(I(),k("div",Au,[u("div",Lu,[m[17]||(m[17]=u("h3",{class:"font-bold text-lg mb-4"},"Validate Response",-1)),o.value.response?(I(),k("div",Mu,[u("div",Iu,[m[13]||(m[13]=u("i",{class:"mdi mdi-information-outline"},null,-1)),u("div",null,[u("div",ku,B(o.value.response.puzzle_name),1),m[12]||(m[12]=u("div",{class:"text-sm"},"Review and correct the OCR data below",-1))])]),u("div",Du,[u("div",Nu,[m[14]||(m[14]=u("label",{class:"label"},[u("span",{class:"label-text"},"Cost")],-1)),ts(u("input",{"onUpdate:modelValue":m[0]||(m[0]=y=>o.value.data.validated_cost=y),type:"text",class:"input input-bordered input-sm",placeholder:o.value.response.cost||"Enter cost"},null,8,Fu),[[is,o.value.data.validated_cost]])]),u("div",ju,[m[15]||(m[15]=u("label",{class:"label"},[u("span",{class:"label-text"},"Cycles")],-1)),ts(u("input",{"onUpdate:modelValue":m[1]||(m[1]=y=>o.value.data.validated_cycles=y),type:"text",class:"input input-bordered input-sm",placeholder:o.value.response.cycles||"Enter cycles"},null,8,Uu),[[is,o.value.data.validated_cycles]])]),u("div",qu,[m[16]||(m[16]=u("label",{class:"label"},[u("span",{class:"label-text"},"Area")],-1)),ts(u("input",{"onUpdate:modelValue":m[2]||(m[2]=y=>o.value.data.validated_area=y),type:"text",class:"input input-bordered input-sm",placeholder:o.value.response.area||"Enter area"},null,8,Hu),[[is,o.value.data.validated_area]])])]),u("div",Vu,[u("button",{onClick:h,class:"btn btn-ghost"},"Cancel"),u("button",{onClick:f,class:"btn btn-primary",disabled:i.value},[i.value?(I(),k("span",Wu)):ae("",!0),Le(" "+B(i.value?"Validating...":"Validate"),1)],8,Bu)])])):ae("",!0)]),u("div",{class:"modal-backdrop",onClick:h})])):ae("",!0)],64))}}),Gu={class:"min-h-screen bg-base-200"},Ju={class:"navbar bg-base-100 shadow-lg"},Yu={class:"container mx-auto"},Zu={class:"flex-none"},Qu={key:0,class:"flex items-center gap-2"},Xu={class:"text-sm"},ef={class:"font-medium"},tf={key:0,class:"badge badge-warning badge-xs ml-1"},sf={key:1,class:"text-sm text-base-content/70"},nf={class:"container mx-auto px-4 py-8"},rf={key:0,class:"flex justify-center items-center min-h-[400px]"},of={key:1,class:"alert alert-error max-w-2xl mx-auto"},lf={class:"text-sm"},af={key:2,class:"space-y-8"},cf={key:0,class:"mb-8"},uf={class:"card bg-base-100 shadow-lg"},ff={class:"card-body"},df={class:"card-title text-2xl"},hf={class:"text-base-content/70"},pf={key:1},gf={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},mf={key:2,class:"text-center py-12"},vf={key:0,class:"modal modal-open"},bf={class:"modal-box max-w-4xl"},_f=Gt({__name:"App",setup(e){const t=fe([]),s=fe([]),n=fe([]),r=fe(null),i=fe(!0),o=fe(!1),l=fe(""),a=Rt(()=>r.value?.is_superuser||!1),h=Rt(()=>{const T={};return n.value.forEach(A=>{A.responses.forEach(M=>{const $=typeof M.puzzle=="number"?M.puzzle:M.puzzle.id;T[$]||(T[$]=[]),T[$].push(M)})}),T});Mn(async()=>{try{i.value=!0,l.value="",console.log("Starting data load..."),console.log("Loading user info...");const T=await mt.getUserInfo();T.data?(r.value=T.data,console.log("User info loaded:",T.data)):T.error&&console.warn("User info error:",T.error),console.log("Loading puzzles...");const A=await bn.loadPuzzles();s.value=A,console.log("Puzzles loaded:",A.length),A.length>0&&(t.value=[{id:1,steam_id:"3479142989",title:"PolyLAN 41",description:"Puzzle collection for PolyLAN 41 fil rouge",author_name:"Flame Legrems",total_items:A.length,unique_visitors:31,current_favorites:1,created_at:new Date().toISOString(),updated_at:new Date().toISOString()}],console.log("Collection created")),console.log("Loading submissions...");const M=await Vr.loadSubmissions();n.value=M,console.log("Submissions loaded:",M.length),console.log("Data load complete!")}catch(T){l.value=Br.getErrorMessage(T),console.error("Failed to load data:",T)}finally{i.value=!1,console.log("Loading state set to false")}});const f=async T=>{try{i.value=!0,l.value="";const A=await Vr.createFromFiles(T.files,s.value,T.notes);if(A.error){l.value=A.error,alert(`Submission failed: ${A.error}`);return}if(A.data){n.value.unshift(A.data);const M=A.data.responses.map($=>$.puzzle_name).join(", ");alert(`Solutions submitted successfully for puzzles: ${M}`),o.value=!1}}catch(A){const M=Br.getErrorMessage(A);l.value=M,alert(`Submission failed: ${M}`),console.error("Submission error:",A)}finally{i.value=!1}},p=()=>{o.value=!0},m=()=>{o.value=!1},y=T=>bn.findPuzzleByName(s.value,T),j=()=>{window.location.reload()};return(T,A)=>(I(),k("div",Gu,[u("div",Ju,[u("div",Yu,[A[0]||(A[0]=u("div",{class:"flex-1"},[u("h1",{class:"text-xl font-bold"},"Opus Magnum Puzzle Submitter")],-1)),u("div",Zu,[r.value?.is_authenticated?(I(),k("div",Qu,[u("div",Xu,[u("span",ef,B(r.value.username),1),r.value.is_superuser?(I(),k("span",tf,"Admin")):ae("",!0)])])):(I(),k("div",sf," Not logged in "))])])]),u("div",nf,[i.value?(I(),k("div",rf,[...A[1]||(A[1]=[u("div",{class:"text-center"},[u("span",{class:"loading loading-spinner loading-lg"}),u("p",{class:"mt-4 text-base-content/70"},"Loading puzzles...")],-1)])])):l.value?(I(),k("div",of,[A[4]||(A[4]=u("i",{class:"mdi mdi-alert-circle text-xl"},null,-1)),u("div",null,[A[2]||(A[2]=u("h3",{class:"font-bold"},"Error Loading Data",-1)),u("div",lf,B(l.value),1)]),u("button",{onClick:j,class:"btn btn-sm btn-outline"},[...A[3]||(A[3]=[u("i",{class:"mdi mdi-refresh mr-1"},null,-1),Le(" Retry ",-1)])])])):(I(),k("div",af,[t.value.length>0?(I(),k("div",cf,[u("div",uf,[u("div",ff,[u("h2",df,B(t.value[0].title),1),u("p",hf,B(t.value[0].description),1),u("div",{class:"flex flex-wrap gap-4 mt-4"},[u("button",{onClick:p,class:"btn btn-primary"},[...A[5]||(A[5]=[u("i",{class:"mdi mdi-plus mr-2"},null,-1),Le(" Submit Solution ",-1)])])])])])])):ae("",!0),a.value?(I(),k("div",pf,[De(Ku)])):ae("",!0),u("div",gf,[(I(!0),k(ve,null,zt(s.value,M=>(I(),Vi(ec,{key:M.id,puzzle:M,responses:h.value[M.id]||[]},null,8,["puzzle","responses"]))),128))]),s.value.length===0?(I(),k("div",mf,[...A[6]||(A[6]=[u("div",{class:"text-6xl mb-4"},"🧩",-1),u("h3",{class:"text-xl font-bold mb-2"},"No Puzzles Available",-1),u("p",{class:"text-base-content/70"},"Check back later for new puzzle collections!",-1)])])):ae("",!0)]))]),o.value?(I(),k("div",vf,[u("div",bf,[u("div",{class:"flex justify-between items-center mb-4"},[A[8]||(A[8]=u("h3",{class:"font-bold text-lg"},"Submit Solution",-1)),u("button",{onClick:m,class:"btn btn-sm btn-circle btn-ghost"},[...A[7]||(A[7]=[u("i",{class:"mdi mdi-close"},null,-1)])])]),De(uu,{puzzles:s.value,"find-puzzle-by-name":y,onSubmit:f},null,8,["puzzles"])]),u("div",{class:"modal-backdrop",onClick:m})])):ae("",!0)]))}});_a(_f).mount("#app");
|