18 lines
107 KiB
JavaScript
18 lines
107 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 te={},wt=[],We=()=>{},Wr=()=>!1,ps=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)},ei=Object.prototype.hasOwnProperty,Q=(e,t)=>ei.call(e,t),B=Array.isArray,xt=e=>gs(e)==="[object Map]",Kr=e=>gs(e)==="[object Set]",W=e=>typeof e=="function",ue=e=>typeof e=="string",ut=e=>typeof e=="symbol",ie=e=>e!==null&&typeof e=="object",Gr=e=>(ie(e)||W(e))&&W(e.then)&&W(e.catch),Jr=Object.prototype.toString,gs=e=>Jr.call(e),ti=e=>gs(e).slice(8,-1),Yr=e=>gs(e)==="[object Object]",xn=e=>ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dt=_n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ms=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},si=/-\w/g,lt=ms(e=>e.replace(si,t=>t.slice(1).toUpperCase())),ni=/\B([A-Z])/g,vt=ms(e=>e.replace(ni,"-$1").toLowerCase()),Zr=ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),Es=ms(e=>e?`on${Zr(e)}`:""),it=(e,t)=>!Object.is(e,t),es=(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 Hn;const vs=()=>Hn||(Hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Sn(e){if(B(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],r=ue(n)?li(n):Sn(n);if(r)for(const o in r)t[o]=r[o]}return t}else if(ue(e)||ie(e))return e}const ri=/;(?![^(]*\))/g,oi=/:([^]+)/,ii=/\/\*[^]*?\*\//g;function li(e){const t={};return e.replace(ii,"").split(ri).forEach(s=>{if(s){const n=s.split(oi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Vt(e){let t="";if(ue(e))t=e;else if(B(e))for(let s=0;s<e.length;s++){const n=Vt(e[s]);n&&(t+=n+" ")}else if(ie(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const ai="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ci=_n(ai);function Xr(e){return!!e||e===""}const eo=e=>!!(e&&e.__v_isRef===!0),q=e=>ue(e)?e:e==null?"":B(e)||ie(e)&&(e.toString===Jr||!W(e.toString))?eo(e)?q(e.value):JSON.stringify(e,to,2):String(e),to=(e,t)=>eo(t)?to(e,t.value):xt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,r],o)=>(s[Cs(n,o)+" =>"]=r,s),{})}:Kr(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Cs(s))}:ut(t)?Cs(t):ie(t)&&!B(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 $e;class ui{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=$e,!t&&$e&&(this.index=($e.scopes||($e.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=$e;try{return $e=this,t()}finally{$e=s}}}on(){++this._on===1&&(this.prevScope=$e,$e=this)}off(){this._on>0&&--this._on===0&&($e=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 fi(){return $e}let ne;const Os=new WeakSet;class so{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,$e&&$e.active&&$e.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||ro(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Bn(this),oo(this);const t=ne,s=Ne;ne=this,Ne=!0;try{return this.fn()}finally{io(this),ne=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 no=0,kt,It;function ro(e,t=!1){if(e.flags|=8,t){e.next=It,It=e;return}e.next=kt,kt=e}function En(){no++}function Cn(){if(--no>0)return;if(It){let t=It;for(It=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 oo(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function io(e){let t,s=e.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),On(n),di(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&&(lo(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function lo(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=ne,n=Ne;ne=e,Ne=!0;try{oo(e);const r=e.fn(e._value);(t.version===0||it(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ne=s,Ne=n,io(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 o=s.computed.deps;o;o=o.nextDep)On(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function di(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 ao=[];function et(){ao.push(Ne),Ne=!1}function tt(){const e=ao.pop();Ne=e===void 0?!0:e}function Bn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ne;ne=void 0;try{t()}finally{ne=s}}}let qt=0;class hi{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 zn{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(!ne||!Ne||ne===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ne)s=this.activeLink=new hi(ne,this),ne.deps?(s.prevDep=ne.depsTail,ne.depsTail.nextDep=s,ne.depsTail=s):ne.deps=ne.depsTail=s,co(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=ne.depsTail,s.nextDep=void 0,ne.depsTail.nextDep=s,ne.depsTail=s,ne.deps===s&&(ne.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 co(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)co(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&&ne){let n=ln.get(e);n||ln.set(e,n=new Map);let r=n.get(s);r||(n.set(s,r=new zn),r.map=n,r.key=s),r.track()}}function Qe(e,t,s,n,r,o){const i=ln.get(e);if(!i){qt++;return}const l=a=>{a&&a.trigger()};if(En(),t==="clear")i.forEach(l);else{const a=B(e),h=a&&xn(s);if(a&&s==="length"){const d=Number(n);i.forEach((g,p)=>{(p==="length"||p===Ht||!ut(p)&&p>=d)&&l(g)})}else switch((s!==void 0||i.has(void 0))&&l(i.get(s)),h&&l(i.get(Ht)),t){case"add":a?h&&l(i.get("length")):(l(i.get(gt)),xt(e)&&l(i.get(an)));break;case"delete":a||(l(i.get(gt)),xt(e)&&l(i.get(an)));break;case"set":xt(e)&&l(i.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 pi={__proto__:null,[Symbol.iterator](){return zs(this,Symbol.iterator,ge)},concat(...e){return bt(this).concat(...e.map(t=>B(t)?bt(t):t))},entries(){return zs(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 Rs(this,"includes",e)},indexOf(...e){return Rs(this,"indexOf",e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return Rs(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 zs(this,"values",ge)}};function zs(e,t,s){const n=bs(e),r=n[t]();return n!==e&&!ke(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=s(o.value)),o}),r}const gi=Array.prototype;function Ye(e,t,s,n,r,o){const i=bs(e),l=i!==e&&!ke(e),a=i[t];if(a!==gi[t]){const g=a.apply(e,o);return l?ge(g):g}let h=s;i!==e&&(l?h=function(g,p){return s.call(this,ge(g),p,e)}:s.length>2&&(h=function(g,p){return s.call(this,g,p,e)}));const d=a.call(i,h,n);return l&&r?r(d):d}function Wn(e,t,s,n){const r=bs(e);let o=s;return r!==e&&(ke(e)?s.length>3&&(o=function(i,l,a){return s.call(this,i,l,a,e)}):o=function(i,l,a){return s.call(this,i,ge(l),a,e)}),r[t](o,...n)}function Rs(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 mi=_n("__proto__,__v_isRef,__isVue"),uo=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ut));function vi(e){ut(e)||(e=String(e));const t=Z(this);return me(t,"has",e),t.hasOwnProperty(e)}class fo{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,o=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(r?o?zi:mo:o?go:po).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=B(t);if(!r){let a;if(i&&(a=pi[s]))return a;if(s==="hasOwnProperty")return vi}const l=Reflect.get(t,s,be(t)?t:n);if((ut(s)?uo.has(s):mi(s))||(r||me(t,"get",s),o))return l;if(be(l)){const a=i&&xn(s)?l:l.value;return r&&ie(a)?un(a):a}return ie(l)?r?un(l):$n(l):l}}class ho extends fo{constructor(t=!1){super(!1,t)}set(t,s,n,r){let o=t[s];if(!this._isShallow){const a=at(o);if(!ke(n)&&!at(n)&&(o=Z(o),n=Z(n)),!B(t)&&be(o)&&!be(n))return a||(o.value=n),!0}const i=B(t)&&xn(s)?Number(s)<t.length:Q(t,s),l=Reflect.set(t,s,n,be(t)?t:r);return t===Z(r)&&(i?it(n,o)&&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)||!uo.has(s))&&me(t,"has",s),n}ownKeys(t){return me(t,"iterate",B(t)?"length":gt),Reflect.ownKeys(t)}}class bi extends fo{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const _i=new ho,yi=new bi,wi=new ho(!0);const cn=e=>e,Zt=e=>Reflect.getPrototypeOf(e);function xi(e,t,s){return function(...n){const r=this.__v_raw,o=Z(r),i=xt(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,h=r[e](...n),d=s?cn:t?ls:ge;return!t&&me(o,"iterate",a?an:gt),{next(){const{value:g,done:p}=h.next();return p?{value:g,done:p}:{value:l?[d(g[0]),d(g[1])]:d(g),done:p}},[Symbol.iterator](){return this}}}}function Qt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Si(e,t){const s={get(r){const o=this.__v_raw,i=Z(o),l=Z(r);e||(it(r,l)&&me(i,"get",r),me(i,"get",l));const{has:a}=Zt(i),h=t?cn:e?ls:ge;if(a.call(i,r))return h(o.get(r));if(a.call(i,l))return h(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&me(Z(r),"iterate",gt),r.size},has(r){const o=this.__v_raw,i=Z(o),l=Z(r);return e||(it(r,l)&&me(i,"has",r),me(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=Z(l),h=t?cn:e?ls:ge;return!e&&me(a,"iterate",gt),l.forEach((d,g)=>r.call(o,h(d),h(g),i))}};return _e(s,e?{add:Qt("add"),set:Qt("set"),delete:Qt("delete"),clear:Qt("clear")}:{add(r){!t&&!ke(r)&&!at(r)&&(r=Z(r));const o=Z(this);return Zt(o).has.call(o,r)||(o.add(r),Qe(o,"add",r,r)),this},set(r,o){!t&&!ke(o)&&!at(o)&&(o=Z(o));const i=Z(this),{has:l,get:a}=Zt(i);let h=l.call(i,r);h||(r=Z(r),h=l.call(i,r));const d=a.call(i,r);return i.set(r,o),h?it(o,d)&&Qe(i,"set",r,o):Qe(i,"add",r,o),this},delete(r){const o=Z(this),{has:i,get:l}=Zt(o);let a=i.call(o,r);a||(r=Z(r),a=i.call(o,r)),l&&l.call(o,r);const h=o.delete(r);return a&&Qe(o,"delete",r,void 0),h},clear(){const r=Z(this),o=r.size!==0,i=r.clear();return o&&Qe(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=xi(r,e,t)}),s}function Rn(e,t){const s=Si(e,t);return(n,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(Q(s,r)&&r in n?s:n,r,o)}const Ei={get:Rn(!1,!1)},Ci={get:Rn(!1,!0)},Oi={get:Rn(!0,!1)};const po=new WeakMap,go=new WeakMap,mo=new WeakMap,zi=new WeakMap;function Ri(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $i(e){return e.__v_skip||!Object.isExtensible(e)?0:Ri(ti(e))}function $n(e){return at(e)?e:Tn(e,!1,_i,Ei,po)}function Ti(e){return Tn(e,!1,wi,Ci,go)}function un(e){return Tn(e,!0,yi,Oi,mo)}function Tn(e,t,s,n,r){if(!ie(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=$i(e);if(o===0)return e;const i=r.get(e);if(i)return i;const l=new Proxy(e,o===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 Pi(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&Qr(e,"__v_skip",!0),e}const ge=e=>ie(e)?$n(e):e,ls=e=>ie(e)?un(e):e;function be(e){return e?e.__v_isRef===!0:!1}function de(e){return Ai(e,!1)}function Ai(e,t){return be(e)?e:new Li(e,t)}class Li{constructor(t,s){this.dep=new zn,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),it(t,s)&&(this._rawValue=t,this._value=n?t:ge(t),this.dep.trigger())}}function Mi(e){return be(e)?e.value:e}const Di={get:(e,t,s)=>t==="__v_raw"?e:Mi(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 vo(e){return St(e)?e:new Proxy(e,Di)}class ki{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new zn(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)&&ne!==this)return ro(this,!0),!0}get value(){const t=this.dep.track();return lo(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ii(e,t,s=!1){let n,r;return W(e)?n=e:(n=e.get,r=e.set),new ki(n,r,s)}const Xt={},as=new WeakMap;let pt;function Ni(e,t=!1,s=pt){if(s){let n=as.get(s);n||as.set(s,n=[]),n.push(e)}}function Fi(e,t,s=te){const{immediate:n,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=s,h=b=>r?b:ke(b)||r===!1||r===0?Xe(b,1):Xe(b);let d,g,p,y,I=!1,P=!1;if(be(e)?(g=()=>e.value,I=ke(e)):St(e)?(g=()=>h(e),I=!0):B(e)?(P=!0,I=e.some(b=>St(b)||ke(b)),g=()=>e.map(b=>{if(be(b))return b.value;if(St(b))return h(b);if(W(b))return a?a(b,2):b()})):W(e)?t?g=a?()=>a(e,2):e:g=()=>{if(p){et();try{p()}finally{tt()}}const b=pt;pt=d;try{return a?a(e,3,[y]):e(y)}finally{pt=b}}:g=We,t&&r){const b=g,z=r===!0?1/0:r;g=()=>Xe(b(),z)}const A=fi(),D=()=>{d.stop(),A&&A.active&&wn(A.effects,d)};if(o&&t){const b=t;t=(...z)=>{b(...z),D()}}let V=P?new Array(e.length).fill(Xt):Xt;const $=b=>{if(!(!(d.flags&1)||!d.dirty&&!b))if(t){const z=d.run();if(r||I||(P?z.some((ee,oe)=>it(ee,V[oe])):it(z,V))){p&&p();const ee=pt;pt=d;try{const oe=[z,V===Xt?void 0:P&&V[0]===Xt?[]:V,y];V=z,a?a(t,3,oe):t(...oe)}finally{pt=ee}}}else d.run()};return l&&l($),d=new so(g),d.scheduler=i?()=>i($,!1):$,y=b=>Ni(b,!1,d),p=d.onStop=()=>{const b=as.get(d);if(b){if(a)a(b,4);else for(const z of b)z();as.delete(d)}},t?n?$(!0):V=d.run():i?i($.bind(null,!0),!0):d.run(),D.pause=d.pause.bind(d),D.resume=d.resume.bind(d),D.stop=D,D}function Xe(e,t=1/0,s){if(t<=0||!ie(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(B(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 Gt(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=Gt(e,t,s,n);return r&&Gr(r)&&r.catch(o=>{_s(o,t,s)}),r}if(B(e)){const r=[];for(let o=0;o<e.length;o++)r.push(Ke(e[o],t,s,n));return r}}function _s(e,t,s,n=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||te;if(t){let l=t.parent;const a=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const d=l.ec;if(d){for(let g=0;g<d.length;g++)if(d[g](e,a,h)===!1)return}l=l.parent}if(o){et(),Gt(o,null,10,[e,a,h]),tt();return}}ji(e,s,r,n,i)}function ji(e,t,s,n=!0,r=!1){if(r)throw e;console.error(e)}const we=[];let He=-1;const Et=[];let rt=null,_t=0;const bo=Promise.resolve();let cs=null;function ts(e){const t=cs||bo;return e?t.then(this?e.bind(this):e):t}function Ui(e){let t=He+1,s=we.length;for(;t<s;){const n=t+s>>>1,r=we[n],o=Bt(r);o<e||o===e&&r.flags&2?t=n+1:s=n}return t}function An(e){if(!(e.flags&1)){const t=Bt(e),s=we[we.length-1];!s||!(e.flags&2)&&t>=Bt(s)?we.push(e):we.splice(Ui(t),0,e),e.flags|=1,_o()}}function _o(){cs||(cs=bo.then(wo))}function Vi(e){B(e)?Et.push(...e):rt&&e.id===-1?rt.splice(_t+1,0,e):e.flags&1||(Et.push(e),e.flags|=1),_o()}function Kn(e,t,s=He+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 yo(e){if(Et.length){const t=[...new Set(Et)].sort((s,n)=>Bt(s)-Bt(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 Bt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function wo(e){try{for(He=0;He<we.length;He++){const t=we[He];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Gt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;He<we.length;He++){const t=we[He];t&&(t.flags&=-2)}He=-1,we.length=0,yo(),cs=null,(we.length||Et.length)&&wo()}}let De=null,xo=null;function us(e){const t=De;return De=e,xo=e&&e.type.__scopeId||null,t}function qi(e,t=De,s){if(!t||e._n)return e;const n=(...r)=>{n._d&&nr(-1);const o=us(t);let i;try{i=e(...r)}finally{us(o),n._d&&nr(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function ss(e,t){if(De===null)return e;const s=Ss(De),n=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=te]=t[r];o&&(W(o)&&(o={mounted:o,updated:o}),o.deep&&Xe(i),n.push({dir:o,instance:s,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function dt(e,t,s,n){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[n];a&&(et(),Ke(a,s,8,[e.el,l,e,t]),tt())}}const Hi=Symbol("_vte"),Bi=e=>e.__isTeleport,Wi=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 Jt(e,t){return W(e)?_e({name:e.name},t,{setup:e}):e}function So(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const fs=new WeakMap;function Nt(e,t,s,n,r=!1){if(B(e)){e.forEach((I,P)=>Nt(I,t&&(B(t)?t[P]: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 o=n.shapeFlag&4?Ss(n.component):n.el,i=r?null:o,{i:l,r:a}=e,h=t&&t.r,d=l.refs===te?l.refs={}:l.refs,g=l.setupState,p=Z(g),y=g===te?Wr:I=>Q(p,I);if(h!=null&&h!==a){if(Gn(t),ue(h))d[h]=null,y(h)&&(g[h]=null);else if(be(h)){h.value=null;const I=t;I.k&&(d[I.k]=null)}}if(W(a))Gt(a,l,12,[i,d]);else{const I=ue(a),P=be(a);if(I||P){const A=()=>{if(e.f){const D=I?y(a)?g[a]:d[a]:a.value;if(r)B(D)&&wn(D,o);else if(B(D))D.includes(o)||D.push(o);else if(I)d[a]=[o],y(a)&&(g[a]=d[a]);else{const V=[o];a.value=V,e.k&&(d[e.k]=V)}}else I?(d[a]=i,y(a)&&(g[a]=i)):P&&(a.value=i,e.k&&(d[e.k]=i))};if(i){const D=()=>{A(),fs.delete(e)};D.id=-1,fs.set(e,D),Ae(D,s)}else Gn(e),A()}}}function Gn(e){const t=fs.get(e);t&&(t.flags|=8,fs.delete(e))}vs().requestIdleCallback;vs().cancelIdleCallback;const Ft=e=>!!e.type.__asyncLoader,Eo=e=>e.type.__isKeepAlive;function Ki(e,t){Co(e,"a",t)}function Gi(e,t){Co(e,"da",t)}function Co(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;)Eo(r.parent.vnode)&&Ji(n,t,s,r),r=r.parent}}function Ji(e,t,s,n){const r=ys(t,e,n,!0);Oo(()=>{wn(n[t],r)},s)}function ys(e,t,s=xe,n=!1){if(s){const r=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...i)=>{et();const l=Yt(s),a=Ke(t,s,e,i);return l(),tt(),a});return n?r.unshift(o):r.push(o),o}}const st=e=>(t,s=xe)=>{(!Kt||e==="sp")&&ys(e,(...n)=>t(...n),s)},Yi=st("bm"),Mn=st("m"),Zi=st("bu"),Qi=st("u"),Xi=st("bum"),Oo=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 Rt(e,t,s,n){let r;const o=s,i=B(e);if(i||ue(e)){const l=i&&St(e);let a=!1,h=!1;l&&(a=!ke(e),h=at(e),e=bs(e)),r=new Array(e.length);for(let d=0,g=e.length;d<g;d++)r[d]=t(a?h?ls(ge(e[d])):ge(e[d]):e[d],d,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(ie(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,h=l.length;a<h;a++){const d=l[a];r[a]=t(e[d],d,a,o)}}else r=[];return r}const fn=e=>e?Go(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=>Ro(e),$forceUpdate:e=>e.f||(e.f=()=>{An(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>Ol.bind(e)}),$s=(e,t)=>e!==te&&!e.__isScriptSetup&&Q(e,t),ol={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:o,accessCache:i,type:l,appContext:a}=e;let h;if(t[0]!=="$"){const y=i[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 o[t]}else{if($s(n,t))return i[t]=1,n[t];if(r!==te&&Q(r,t))return i[t]=2,r[t];if((h=e.propsOptions[0])&&Q(h,t))return i[t]=3,o[t];if(s!==te&&Q(s,t))return i[t]=4,s[t];dn&&(i[t]=0)}}const d=jt[t];let g,p;if(d)return t==="$attrs"&&me(e.attrs,"get",""),d(e);if((g=l.__cssModules)&&(g=g[t]))return g;if(s!==te&&Q(s,t))return i[t]=4,s[t];if(p=a.config.globalProperties,Q(p,t))return p[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:o}=e;return $s(r,t)?(r[t]=s,!0):n!==te&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,propsOptions:o,type:i}},l){let a,h;return!!(s[l]||e!==te&&l[0]!=="$"&&Q(e,l)||$s(t,l)||(a=o[0])&&Q(a,l)||Q(n,l)||Q(jt,l)||Q(r.config.globalProperties,l)||(h=i.__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 B(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let dn=!0;function il(e){const t=Ro(e),s=e.proxy,n=e.ctx;dn=!1,t.beforeCreate&&Yn(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:h,created:d,beforeMount:g,mounted:p,beforeUpdate:y,updated:I,activated:P,deactivated:A,beforeDestroy:D,beforeUnmount:V,destroyed:$,unmounted:b,render:z,renderTracked:ee,renderTriggered:oe,errorCaptured:pe,serverPrefetch:Se,expose:Ee,inheritAttrs:Ce,components:Ge,directives:Je,filters:ft}=t;if(h&&ll(h,n,null),i)for(const Y in i){const K=i[Y];W(K)&&(n[Y]=K.bind(s))}if(r){const Y=r.call(s,s);ie(Y)&&(e.data=$n(Y))}if(dn=!0,o)for(const Y in o){const K=o[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,T=zt({get:E,set:w});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>T.value,set:U=>T.value=U})}if(l)for(const Y in l)zo(l[Y],n,s,Y);if(a){const Y=W(a)?a.call(s):a;Reflect.ownKeys(Y).forEach(K=>{hl(K,Y[K])})}d&&Yn(d,e,"c");function ae(Y,K){B(K)?K.forEach(E=>Y(E.bind(s))):K&&Y(K.bind(s))}if(ae(Yi,g),ae(Mn,p),ae(Zi,y),ae(Qi,I),ae(Ki,P),ae(Gi,A),ae(nl,pe),ae(sl,ee),ae(tl,oe),ae(Xi,V),ae(Oo,b),ae(el,Se),B(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={});z&&e.render===We&&(e.render=z),Ce!=null&&(e.inheritAttrs=Ce),Ge&&(e.components=Ge),Je&&(e.directives=Je),Se&&So(e)}function ll(e,t,s=We){B(e)&&(e=hn(e));for(const n in e){const r=e[n];let o;ie(r)?"default"in r?o=ns(r.from||n,r.default,!0):o=ns(r.from||n):o=ns(r),be(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[n]=o}}function Yn(e,t,s){Ke(B(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function zo(e,t,s,n){let r=n.includes(".")?Uo(s,n):()=>s[n];if(ue(e)){const o=t[e];W(o)&&Ot(r,o)}else if(W(e))Ot(r,e.bind(s));else if(ie(e))if(B(e))e.forEach(o=>zo(o,t,s,n));else{const o=W(e.handler)?e.handler.bind(s):t[e.handler];W(o)&&Ot(r,o,e)}}function Ro(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!s&&!n?a=t:(a={},r.length&&r.forEach(h=>ds(a,h,i,!0)),ds(a,t,i)),ie(t)&&o.set(t,a),a}function ds(e,t,s,n=!1){const{mixins:r,extends:o}=t;o&&ds(e,o,s,!0),r&&r.forEach(i=>ds(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const l=al[i]||s&&s[i];e[i]=l?l(e[i],t[i]):t[i]}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(B(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?B(e)&&B(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 $o(){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&&!ie(r)&&(r=null);const o=$o(),i=new WeakSet,l=[];let a=!1;const h=o.app={_uid:fl++,_component:n,_props:r,_container:null,_context:o,_instance:null,version:Gl,get config(){return o.config},set config(d){},use(d,...g){return i.has(d)||(d&&W(d.install)?(i.add(d),d.install(h,...g)):W(d)&&(i.add(d),d(h,...g))),h},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),h},component(d,g){return g?(o.components[d]=g,h):o.components[d]},directive(d,g){return g?(o.directives[d]=g,h):o.directives[d]},mount(d,g,p){if(!a){const y=h._ceVNode||Ie(n,r);return y.appContext=o,p===!0?p="svg":p===!1&&(p=void 0),e(y,d,p),a=!0,h._container=d,d.__vue_app__=h,Ss(y.component)}},onUnmount(d){l.push(d)},unmount(){a&&(Ke(l,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(d,g){return o.provides[d]=g,h},runWithContext(d){const g=Ct;Ct=h;try{return d()}finally{Ct=g}}};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 ns(e,t,s=!1){const n=Vl();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 To={},Po=()=>Object.create(To),Ao=e=>Object.getPrototypeOf(e)===To;function pl(e,t,s,n=!1){const r={},o=Po();e.propsDefaults=Object.create(null),Lo(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);s?e.props=n?r:Ti(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function gl(e,t,s,n){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=Z(r),[a]=e.propsOptions;let h=!1;if((n||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let g=0;g<d.length;g++){let p=d[g];if(ws(e.emitsOptions,p))continue;const y=t[p];if(a)if(Q(o,p))y!==o[p]&&(o[p]=y,h=!0);else{const I=lt(p);r[I]=pn(a,l,I,y,e,!1)}else y!==o[p]&&(o[p]=y,h=!0)}}}else{Lo(e,t,r,o)&&(h=!0);let d;for(const g in l)(!t||!Q(t,g)&&((d=vt(g))===g||!Q(t,d)))&&(a?s&&(s[g]!==void 0||s[d]!==void 0)&&(r[g]=pn(a,l,g,void 0,e,!0)):delete r[g]);if(o!==l)for(const g in o)(!t||!Q(t,g))&&(delete o[g],h=!0)}h&&Qe(e.attrs,"set","")}function Lo(e,t,s,n){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Dt(a))continue;const h=t[a];let d;r&&Q(r,d=lt(a))?!o||!o.includes(d)?s[d]=h:(l||(l={}))[d]=h:ws(e.emitsOptions,a)||(!(a in n)||h!==n[a])&&(n[a]=h,i=!0)}if(o){const a=Z(s),h=l||te;for(let d=0;d<o.length;d++){const g=o[d];s[g]=pn(r,a,g,h[g],e,!Q(h,g))}}return i}function pn(e,t,s,n,r,o){const i=e[s];if(i!=null){const l=Q(i,"default");if(l&&n===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&W(a)){const{propsDefaults:h}=r;if(s in h)n=h[s];else{const d=Yt(r);n=h[s]=a.call(null,t),d()}}else n=a;r.ce&&r.ce._setProp(s,n)}i[0]&&(o&&!l?n=!1:i[1]&&(n===""||n===vt(s))&&(n=!0))}return n}const ml=new WeakMap;function Mo(e,t,s=!1){const n=s?ml:t.propsCache,r=n.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!W(e)){const d=g=>{a=!0;const[p,y]=Mo(g,t,!0);_e(i,p),y&&l.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!a)return ie(e)&&n.set(e,wt),wt;if(B(o))for(let d=0;d<o.length;d++){const g=lt(o[d]);Xn(g)&&(i[g]=te)}else if(o)for(const d in o){const g=lt(d);if(Xn(g)){const p=o[d],y=i[g]=B(p)||W(p)?{type:p}:_e({},p),I=y.type;let P=!1,A=!0;if(B(I))for(let D=0;D<I.length;++D){const V=I[D],$=W(V)&&V.name;if($==="Boolean"){P=!0;break}else $==="String"&&(A=!1)}else P=W(I)&&I.name==="Boolean";y[0]=P,y[1]=A,(P||Q(y,"default"))&&l.push(g)}}const h=[i,l];return ie(e)&&n.set(e,h),h}function Xn(e){return e[0]!=="$"&&!Dt(e)}const Dn=e=>e==="_"||e==="_ctx"||e==="$stable",kn=e=>B(e)?e.map(Be):[Be(e)],vl=(e,t,s)=>{if(t._n)return t;const n=qi((...r)=>kn(t(...r)),s);return n._c=!1,n},Do=(e,t,s)=>{const n=e._ctx;for(const r in e){if(Dn(r))continue;const o=e[r];if(W(o))t[r]=vl(r,o,n);else if(o!=null){const i=kn(o);t[r]=()=>i}}},ko=(e,t)=>{const s=kn(t);e.slots.default=()=>s},Io=(e,t,s)=>{for(const n in t)(s||!Dn(n))&&(e[n]=t[n])},bl=(e,t,s)=>{const n=e.slots=Po();if(e.vnode.shapeFlag&32){const r=t._;r?(Io(n,t,s),s&&Qr(n,"_",r,!0)):Do(t,n)}else t&&ko(e,t)},_l=(e,t,s)=>{const{vnode:n,slots:r}=e;let o=!0,i=te;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:Io(r,t,s):(o=!t.$stable,Do(t,r)),i=t}else t&&(ko(e,t),i={default:1});if(o)for(const l in r)!Dn(l)&&i[l]==null&&delete r[l]},Ae=Ml;function yl(e){return wl(e)}function wl(e,t){const s=vs();s.__VUE__=!0;const{insert:n,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:h,setElementText:d,parentNode:g,nextSibling:p,setScopeId:y=We,insertStaticContent:I}=e,P=(c,f,_,C=null,m=null,v=null,R=void 0,O=null,S=!!f.dynamicChildren)=>{if(c===f)return;c&&!At(c,f)&&(C=fe(c),U(c,m,v,!0),c=null),f.patchFlag===-2&&(S=!1,f.dynamicChildren=null);const{type:x,ref:F,shapeFlag:L}=f;switch(x){case xs:A(c,f,_,C);break;case ct:D(c,f,_,C);break;case Ps:c==null&&V(f,_,C,R);break;case ve:Ge(c,f,_,C,m,v,R,O,S);break;default:L&1?z(c,f,_,C,m,v,R,O,S):L&6?Je(c,f,_,C,m,v,R,O,S):(L&64||L&128)&&x.process(c,f,_,C,m,v,R,O,S,Te)}F!=null&&m?Nt(F,c&&c.ref,v,f||c,!f):F==null&&c&&c.ref!=null&&Nt(c.ref,null,v,c,!0)},A=(c,f,_,C)=>{if(c==null)n(f.el=l(f.children),_,C);else{const m=f.el=c.el;f.children!==c.children&&h(m,f.children)}},D=(c,f,_,C)=>{c==null?n(f.el=a(f.children||""),_,C):f.el=c.el},V=(c,f,_,C)=>{[c.el,c.anchor]=I(c.children,f,_,C,c.el,c.anchor)},$=({el:c,anchor:f},_,C)=>{let m;for(;c&&c!==f;)m=p(c),n(c,_,C),c=m;n(f,_,C)},b=({el:c,anchor:f})=>{let _;for(;c&&c!==f;)_=p(c),r(c),c=_;r(f)},z=(c,f,_,C,m,v,R,O,S)=>{f.type==="svg"?R="svg":f.type==="math"&&(R="mathml"),c==null?ee(f,_,C,m,v,R,O,S):Se(c,f,m,v,R,O,S)},ee=(c,f,_,C,m,v,R,O)=>{let S,x;const{props:F,shapeFlag:L,transition:j,dirs:H}=c;if(S=c.el=i(c.type,v,F&&F.is,F),L&8?d(S,c.children):L&16&&pe(c.children,S,null,C,m,Ts(c,v),R,O),H&&dt(c,null,C,"created"),oe(S,c,c.scopeId,R,C),F){for(const se in F)se!=="value"&&!Dt(se)&&o(S,se,null,F[se],v,C);"value"in F&&o(S,"value",null,F.value,v),(x=F.onVnodeBeforeMount)&&qe(x,C,c)}H&&dt(c,null,C,"beforeMount");const G=xl(m,j);G&&j.beforeEnter(S),n(S,f,_),((x=F&&F.onVnodeMounted)||G||H)&&Ae(()=>{x&&qe(x,C,c),G&&j.enter(S),H&&dt(c,null,C,"mounted")},m)},oe=(c,f,_,C,m)=>{if(_&&y(c,_),C)for(let v=0;v<C.length;v++)y(c,C[v]);if(m){let v=m.subTree;if(f===v||qo(v.type)&&(v.ssContent===f||v.ssFallback===f)){const R=m.vnode;oe(c,R,R.scopeId,R.slotScopeIds,m.parent)}}},pe=(c,f,_,C,m,v,R,O,S=0)=>{for(let x=S;x<c.length;x++){const F=c[x]=O?ot(c[x]):Be(c[x]);P(null,F,f,_,C,m,v,R,O)}},Se=(c,f,_,C,m,v,R)=>{const O=f.el=c.el;let{patchFlag:S,dynamicChildren:x,dirs:F}=f;S|=c.patchFlag&16;const L=c.props||te,j=f.props||te;let H;if(_&&ht(_,!1),(H=j.onVnodeBeforeUpdate)&&qe(H,_,f,c),F&&dt(f,c,_,"beforeUpdate"),_&&ht(_,!0),(L.innerHTML&&j.innerHTML==null||L.textContent&&j.textContent==null)&&d(O,""),x?Ee(c.dynamicChildren,x,O,_,C,Ts(f,m),v):R||K(c,f,O,null,_,C,Ts(f,m),v,!1),S>0){if(S&16)Ce(O,L,j,_,m);else if(S&2&&L.class!==j.class&&o(O,"class",null,j.class,m),S&4&&o(O,"style",L.style,j.style,m),S&8){const G=f.dynamicProps;for(let se=0;se<G.length;se++){const X=G[se],ze=L[X],Re=j[X];(Re!==ze||X==="value")&&o(O,X,ze,Re,m,_)}}S&1&&c.children!==f.children&&d(O,f.children)}else!R&&x==null&&Ce(O,L,j,_,m);((H=j.onVnodeUpdated)||F)&&Ae(()=>{H&&qe(H,_,f,c),F&&dt(f,c,_,"updated")},C)},Ee=(c,f,_,C,m,v,R)=>{for(let O=0;O<f.length;O++){const S=c[O],x=f[O],F=S.el&&(S.type===ve||!At(S,x)||S.shapeFlag&198)?g(S.el):_;P(S,x,F,null,C,m,v,R,!0)}},Ce=(c,f,_,C,m)=>{if(f!==_){if(f!==te)for(const v in f)!Dt(v)&&!(v in _)&&o(c,v,f[v],null,m,C);for(const v in _){if(Dt(v))continue;const R=_[v],O=f[v];R!==O&&v!=="value"&&o(c,v,O,R,m,C)}"value"in _&&o(c,"value",f.value,_.value,m)}},Ge=(c,f,_,C,m,v,R,O,S)=>{const x=f.el=c?c.el:l(""),F=f.anchor=c?c.anchor:l("");let{patchFlag:L,dynamicChildren:j,slotScopeIds:H}=f;H&&(O=O?O.concat(H):H),c==null?(n(x,_,C),n(F,_,C),pe(f.children||[],_,F,m,v,R,O,S)):L>0&&L&64&&j&&c.dynamicChildren?(Ee(c.dynamicChildren,j,_,m,v,R,O),(f.key!=null||m&&f===m.subTree)&&No(c,f,!0)):K(c,f,_,F,m,v,R,O,S)},Je=(c,f,_,C,m,v,R,O,S)=>{f.slotScopeIds=O,c==null?f.shapeFlag&512?m.ctx.activate(f,_,C,R,S):ft(f,_,C,m,v,R,S):Oe(c,f,S)},ft=(c,f,_,C,m,v,R)=>{const O=c.component=Ul(c,C,m);if(Eo(c)&&(O.ctx.renderer=Te),ql(O,!1,R),O.asyncDep){if(m&&m.registerDep(O,ae,R),!c.el){const S=O.subTree=Ie(ct);D(null,S,f,_),c.placeholder=S.el}}else ae(O,c,f,_,m,v,R)},Oe=(c,f,_)=>{const C=f.component=c.component;if(Al(c,f,_))if(C.asyncDep&&!C.asyncResolved){Y(C,f,_);return}else C.next=f,C.update();else f.el=c.el,C.vnode=f},ae=(c,f,_,C,m,v,R)=>{const O=()=>{if(c.isMounted){let{next:L,bu:j,u:H,parent:G,vnode:se}=c;{const Ue=Fo(c);if(Ue){L&&(L.el=se.el,Y(c,L,R)),Ue.asyncDep.then(()=>{c.isUnmounted||O()});return}}let X=L,ze;ht(c,!1),L?(L.el=se.el,Y(c,L,R)):L=se,j&&es(j),(ze=L.props&&L.props.onVnodeBeforeUpdate)&&qe(ze,G,L,se),ht(c,!0);const Re=tr(c),je=c.subTree;c.subTree=Re,P(je,Re,g(je.el),fe(je),c,m,v),L.el=Re.el,X===null&&Ll(c,Re.el),H&&Ae(H,m),(ze=L.props&&L.props.onVnodeUpdated)&&Ae(()=>qe(ze,G,L,se),m)}else{let L;const{el:j,props:H}=f,{bm:G,m:se,parent:X,root:ze,type:Re}=c,je=Ft(f);ht(c,!1),G&&es(G),!je&&(L=H&&H.onVnodeBeforeMount)&&qe(L,X,f),ht(c,!0);{ze.ce&&ze.ce._def.shadowRoot!==!1&&ze.ce._injectChildStyle(Re);const Ue=c.subTree=tr(c);P(null,Ue,_,C,c,m,v),f.el=Ue.el}if(se&&Ae(se,m),!je&&(L=H&&H.onVnodeMounted)){const Ue=f;Ae(()=>qe(L,X,Ue),m)}(f.shapeFlag&256||X&&Ft(X.vnode)&&X.vnode.shapeFlag&256)&&c.a&&Ae(c.a,m),c.isMounted=!0,f=_=C=null}};c.scope.on();const S=c.effect=new so(O);c.scope.off();const x=c.update=S.run.bind(S),F=c.job=S.runIfDirty.bind(S);F.i=c,F.id=c.uid,S.scheduler=()=>An(F),ht(c,!0),x()},Y=(c,f,_)=>{f.component=c;const C=c.vnode.props;c.vnode=f,c.next=null,gl(c,f.props,C,_),_l(c,f.children,_),et(),Kn(c),tt()},K=(c,f,_,C,m,v,R,O,S=!1)=>{const x=c&&c.children,F=c?c.shapeFlag:0,L=f.children,{patchFlag:j,shapeFlag:H}=f;if(j>0){if(j&128){w(x,L,_,C,m,v,R,O,S);return}else if(j&256){E(x,L,_,C,m,v,R,O,S);return}}H&8?(F&16&&le(x,m,v),L!==x&&d(_,L)):F&16?H&16?w(x,L,_,C,m,v,R,O,S):le(x,m,v,!0):(F&8&&d(_,""),H&16&&pe(L,_,C,m,v,R,O,S))},E=(c,f,_,C,m,v,R,O,S)=>{c=c||wt,f=f||wt;const x=c.length,F=f.length,L=Math.min(x,F);let j;for(j=0;j<L;j++){const H=f[j]=S?ot(f[j]):Be(f[j]);P(c[j],H,_,null,m,v,R,O,S)}x>F?le(c,m,v,!0,!1,L):pe(f,_,C,m,v,R,O,S,L)},w=(c,f,_,C,m,v,R,O,S)=>{let x=0;const F=f.length;let L=c.length-1,j=F-1;for(;x<=L&&x<=j;){const H=c[x],G=f[x]=S?ot(f[x]):Be(f[x]);if(At(H,G))P(H,G,_,null,m,v,R,O,S);else break;x++}for(;x<=L&&x<=j;){const H=c[L],G=f[j]=S?ot(f[j]):Be(f[j]);if(At(H,G))P(H,G,_,null,m,v,R,O,S);else break;L--,j--}if(x>L){if(x<=j){const H=j+1,G=H<F?f[H].el:C;for(;x<=j;)P(null,f[x]=S?ot(f[x]):Be(f[x]),_,G,m,v,R,O,S),x++}}else if(x>j)for(;x<=L;)U(c[x],m,v,!0),x++;else{const H=x,G=x,se=new Map;for(x=G;x<=j;x++){const Pe=f[x]=S?ot(f[x]):Be(f[x]);Pe.key!=null&&se.set(Pe.key,x)}let X,ze=0;const Re=j-G+1;let je=!1,Ue=0;const Tt=new Array(Re);for(x=0;x<Re;x++)Tt[x]=0;for(x=H;x<=L;x++){const Pe=c[x];if(ze>=Re){U(Pe,m,v,!0);continue}let Ve;if(Pe.key!=null)Ve=se.get(Pe.key);else for(X=G;X<=j;X++)if(Tt[X-G]===0&&At(Pe,f[X])){Ve=X;break}Ve===void 0?U(Pe,m,v,!0):(Tt[Ve-G]=x+1,Ve>=Ue?Ue=Ve:je=!0,P(Pe,f[Ve],_,null,m,v,R,O,S),ze++)}const Un=je?Sl(Tt):wt;for(X=Un.length-1,x=Re-1;x>=0;x--){const Pe=G+x,Ve=f[Pe],Vn=f[Pe+1],qn=Pe+1<F?Vn.el||Vn.placeholder:C;Tt[x]===0?P(null,Ve,_,qn,m,v,R,O,S):je&&(X<0||x!==Un[X]?T(Ve,_,qn,2):X--)}}},T=(c,f,_,C,m=null)=>{const{el:v,type:R,transition:O,children:S,shapeFlag:x}=c;if(x&6){T(c.component.subTree,f,_,C);return}if(x&128){c.suspense.move(f,_,C);return}if(x&64){R.move(c,f,_,Te);return}if(R===ve){n(v,f,_);for(let L=0;L<S.length;L++)T(S[L],f,_,C);n(c.anchor,f,_);return}if(R===Ps){$(c,f,_);return}if(C!==2&&x&1&&O)if(C===0)O.beforeEnter(v),n(v,f,_),Ae(()=>O.enter(v),m);else{const{leave:L,delayLeave:j,afterLeave:H}=O,G=()=>{c.ctx.isUnmounted?r(v):n(v,f,_)},se=()=>{v._isLeaving&&v[Wi](!0),L(v,()=>{G(),H&&H()})};j?j(v,G,se):se()}else n(v,f,_)},U=(c,f,_,C=!1,m=!1)=>{const{type:v,props:R,ref:O,children:S,dynamicChildren:x,shapeFlag:F,patchFlag:L,dirs:j,cacheIndex:H}=c;if(L===-2&&(m=!1),O!=null&&(et(),Nt(O,null,_,c,!0),tt()),H!=null&&(f.renderCache[H]=void 0),F&256){f.ctx.deactivate(c);return}const G=F&1&&j,se=!Ft(c);let X;if(se&&(X=R&&R.onVnodeBeforeUnmount)&&qe(X,f,c),F&6)he(c.component,_,C);else{if(F&128){c.suspense.unmount(_,C);return}G&&dt(c,null,f,"beforeUnmount"),F&64?c.type.remove(c,f,_,Te,C):x&&!x.hasOnce&&(v!==ve||L>0&&L&64)?le(x,f,_,!1,!0):(v===ve&&L&384||!m&&F&16)&&le(S,f,_),C&&N(c)}(se&&(X=R&&R.onVnodeUnmounted)||G)&&Ae(()=>{X&&qe(X,f,c),G&&dt(c,null,f,"unmounted")},_)},N=c=>{const{type:f,el:_,anchor:C,transition:m}=c;if(f===ve){J(_,C);return}if(f===Ps){b(c);return}const v=()=>{r(_),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(c.shapeFlag&1&&m&&!m.persisted){const{leave:R,delayLeave:O}=m,S=()=>R(_,v);O?O(c.el,v,S):S()}else v()},J=(c,f)=>{let _;for(;c!==f;)_=p(c),r(c),c=_;r(f)},he=(c,f,_)=>{const{bum:C,scope:m,job:v,subTree:R,um:O,m:S,a:x}=c;er(S),er(x),C&&es(C),m.stop(),v&&(v.flags|=8,U(R,c,f,_)),O&&Ae(O,f),Ae(()=>{c.isUnmounted=!0},f)},le=(c,f,_,C=!1,m=!1,v=0)=>{for(let R=v;R<c.length;R++)U(c[R],f,_,C,m)},fe=c=>{if(c.shapeFlag&6)return fe(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const f=p(c.anchor||c.el),_=f&&f[Hi];return _?p(_):f};let ce=!1;const nt=(c,f,_)=>{c==null?f._vnode&&U(f._vnode,null,null,!0):P(f._vnode||null,c,f,null,null,null,_),f._vnode=c,ce||(ce=!0,Kn(),yo(),ce=!1)},Te={p:P,um:U,m:T,r:N,mt:ft,mc:pe,pc:K,pbc:Ee,n:fe,o:e};return{render:nt,hydrate:void 0,createApp:dl(nt)}}function Ts({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 No(e,t,s=!1){const n=e.children,r=t.children;if(B(n)&&B(r))for(let o=0;o<n.length;o++){const i=n[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=ot(r[o]),l.el=i.el),!s&&l.patchFlag!==-2&&No(i,l)),l.type===xs&&l.patchFlag!==-1&&(l.el=i.el),l.type===ct&&!l.el&&(l.el=i.el)}}function Sl(e){const t=e.slice(),s=[0];let n,r,o,i,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(o=0,i=s.length-1;o<i;)l=o+i>>1,e[s[l]]<h?o=l+1:i=l;h<e[s[o]]&&(o>0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,i=s[o-1];o-- >0;)s[o]=i,i=t[i];return s}function Fo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fo(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=()=>ns(El);function Ot(e,t,s){return jo(e,t,s)}function jo(e,t,s=te){const{immediate:n,deep:r,flush:o,once:i}=s,l=_e({},s),a=t&&n||!t&&o!=="post";let h;if(Kt){if(o==="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 d=xe;l.call=(y,I,P)=>Ke(y,d,I,P);let g=!1;o==="post"?l.scheduler=y=>{Ae(y,d&&d.suspense)}:o!=="sync"&&(g=!0,l.scheduler=(y,I)=>{I?y():An(y)}),l.augmentJob=y=>{t&&(y.flags|=4),g&&(y.flags|=2,d&&(y.id=d.uid,y.i=d))};const p=Fi(e,t,l);return Kt&&(h?h.push(p):a&&p()),p}function Ol(e,t,s){const n=this.proxy,r=ue(e)?e.includes(".")?Uo(n,e):()=>n[e]:e.bind(n,n);let o;W(t)?o=t:(o=t.handler,s=t);const i=Yt(this),l=jo(r,o.bind(n),s);return i(),l}function Uo(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 zl=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${lt(t)}Modifiers`]||e[`${vt(t)}Modifiers`];function Rl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||te;let r=s;const o=t.startsWith("update:"),i=o&&zl(n,t.slice(7));i&&(i.trim&&(r=s.map(d=>ue(d)?d.trim():d)),i.number&&(r=s.map(rn)));let l,a=n[l=Es(t)]||n[l=Es(lt(t))];!a&&o&&(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 $l=new WeakMap;function Vo(e,t,s=!1){const n=s?$l:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!W(e)){const a=h=>{const d=Vo(h,t,!0);d&&(l=!0,_e(i,d))};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(ie(e)&&n.set(e,null),null):(B(o)?o.forEach(a=>i[a]=null):_e(i,o),ie(e)&&n.set(e,i),i)}function ws(e,t){return!e||!ps(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:[o],slots:i,attrs:l,emit:a,render:h,renderCache:d,props:g,data:p,setupState:y,ctx:I,inheritAttrs:P}=e,A=us(e);let D,V;try{if(s.shapeFlag&4){const b=r||n,z=b;D=Be(h.call(z,b,d,g,y,p,I)),V=l}else{const b=t;D=Be(b.length>1?b(g,{attrs:l,slots:i,emit:a}):b(g,null)),V=t.props?l:Tl(l)}}catch(b){Ut.length=0,_s(b,e,1),D=Ie(ct)}let $=D;if(V&&P!==!1){const b=Object.keys(V),{shapeFlag:z}=$;b.length&&z&7&&(o&&b.some(yn)&&(V=Pl(V,o)),$=$t($,V,!1,!0))}return s.dirs&&($=$t($,null,!1,!0),$.dirs=$.dirs?$.dirs.concat(s.dirs):s.dirs),s.transition&&Ln($,s.transition),D=$,us(A),D}const Tl=e=>{let t;for(const s in e)(s==="class"||s==="style"||ps(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:o}=e,{props:i,children:l,patchFlag:a}=t,h=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&a>=0){if(a&1024)return!0;if(a&16)return n?sr(n,i,h):!!i;if(a&8){const d=t.dynamicProps;for(let g=0;g<d.length;g++){const p=d[g];if(i[p]!==n[p]&&!ws(h,p))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:n===i?!1:n?i?sr(n,i,h):!0:!!i;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 o=n[r];if(t[o]!==e[o]&&!ws(s,o))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 qo=e=>e.__isSuspense;function Ml(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):Vi(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 M(e=!1){Ut.push(Me=e?null:[])}function Dl(){Ut.pop(),Me=Ut[Ut.length-1]||null}let Wt=1;function nr(e,t=!1){Wt+=e,e<0&&Me&&t&&(Me.hasOnce=!0)}function Ho(e){return e.dynamicChildren=Wt>0?Me||wt:null,Dl(),Wt>0&&Me&&Me.push(e),e}function k(e,t,s,n,r,o){return Ho(u(e,t,s,n,r,o,!0))}function Bo(e,t,s,n,r){return Ho(Ie(e,t,s,n,r,!0))}function Wo(e){return e?e.__v_isVNode===!0:!1}function At(e,t){return e.type===t.type&&e.key===t.key}const Ko=({key:e})=>e??null,rs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ue(e)||be(e)||W(e)?{i:De,r:e,k:t,f:!!s}:e:null);function u(e,t=null,s=null,n=0,r=null,o=e===ve?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ko(t),ref:t&&rs(t),scopeId:xo,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:o,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:De};return l?(In(a,s),o&128&&e.normalize(a)):s&&(a.shapeFlag|=ue(s)?8:16),Wt>0&&!i&&Me&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&Me.push(a),a}const Ie=kl;function kl(e,t=null,s=null,n=0,r=null,o=!1){if((!e||e===rl)&&(e=ct),Wo(e)){const l=$t(e,t,!0);return s&&In(l,s),Wt>0&&!o&&Me&&(l.shapeFlag&6?Me[Me.indexOf(e)]=l:Me.push(l)),l.patchFlag=-2,l}if(Kl(e)&&(e=e.__vccOpts),t){t=Il(t);let{class:l,style:a}=t;l&&!ue(l)&&(t.class=Vt(l)),ie(a)&&(Pn(a)&&!B(a)&&(a=_e({},a)),t.style=Sn(a))}const i=ue(e)?1:qo(e)?128:Bi(e)?64:ie(e)?4:W(e)?2:0;return u(e,t,s,n,r,i,o,!0)}function Il(e){return e?Pn(e)||Ao(e)?_e({},e):e:null}function $t(e,t,s=!1,n=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,h=t?Nl(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&Ko(h),ref:t&&t.ref?s&&o?B(o)?o.concat(rs(t)):[o,rs(t)]:rs(t):o,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?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&$t(e.ssContent),ssFallback:e.ssFallback&&$t(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&n&&Ln(d,a.clone(d)),d}function Le(e=" ",t=0){return Ie(xs,null,e,t)}function re(e="",t=!1){return t?(M(),Bo(ct,null,e)):Ie(ct,null,e)}function Be(e){return e==null||typeof e=="boolean"?Ie(ct):B(e)?Ie(ve,null,e.slice()):Wo(e)?ot(e):Ie(xs,null,String(e))}function ot(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:$t(e)}function In(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(B(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),In(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Ao(t)?t._ctx=De:r===3&&De&&(De.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else W(t)?(t={default:t,_ctx:De},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=Vt([t.class,n.class]));else if(r==="style")t.style=Sn([t.style,n.style]);else if(ps(r)){const o=t[r],i=n[r];i&&o!==i&&!(B(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=n[r])}return t}function qe(e,t,s,n=null){Ke(e,t,7,[s,n])}const Fl=$o();let jl=0;function Ul(e,t,s){const n=e.type,r=(t?t.appContext:e.appContext)||Fl,o={uid:jl++,vnode:e,type:n,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ui(!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:Mo(n,r),emitsOptions:Vo(n,r),emit:null,emitted:null,propsDefaults:te,inheritAttrs:n.inheritAttrs,ctx:te,data:te,props:te,attrs:te,slots:te,refs:te,setupState:te,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Rl.bind(null,o),e.ce&&e.ce(o),o}let xe=null;const Vl=()=>xe||De;let hs,gn;{const e=vs(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};hs=t("__VUE_INSTANCE_SETTERS__",s=>xe=s),gn=t("__VUE_SSR_SETTERS__",s=>Kt=s)}const Yt=e=>{const t=xe;return hs(e),e.scope.on(),()=>{e.scope.off(),hs(t)}},rr=()=>{xe&&xe.scope.off(),hs(null)};function Go(e){return e.vnode.shapeFlag&4}let Kt=!1;function ql(e,t=!1,s=!1){t&&gn(t);const{props:n,children:r}=e.vnode,o=Go(e);pl(e,n,o,t),bl(e,r,s||t);const i=o?Hl(e,t):void 0;return t&&gn(!1),i}function Hl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ol);const{setup:n}=s;if(n){et();const r=e.setupContext=n.length>1?Wl(e):null,o=Yt(e),i=Gt(n,e,0,[e.props,r]),l=Gr(i);if(tt(),o(),(l||e.sp)&&!Ft(e)&&So(e),l){if(i.then(rr,rr),t)return i.then(a=>{or(e,a)}).catch(a=>{_s(a,e,0)});e.asyncDep=i}else or(e,i)}else Jo(e)}function or(e,t,s){W(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ie(t)&&(e.setupState=vo(t)),Jo(e)}function Jo(e,t,s){const n=e.type;e.render||(e.render=n.render||We);{const r=Yt(e);et();try{il(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(vo(Pi(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 zt=(e,t)=>Ii(e,t,Kt),Gl="3.5.22";/**
|
|
* @vue/runtime-dom v3.5.22
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/let mn;const ir=typeof window<"u"&&window.trustedTypes;if(ir)try{mn=ir.createPolicy("vue",{createHTML:e=>e})}catch{}const Yo=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,o){const i=s?s.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===o||!(r=r.nextSibling)););else{lr.innerHTML=Yo(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[i?i.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=ue(s);let o=!1;if(s&&!r){if(t)if(ue(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();s[l]==null&&os(n,l,"")}else for(const i in t)s[i]==null&&os(n,i,"");for(const i in s)i==="display"&&(o=!0),os(n,i,s[i])}else if(r){if(t!==s){const i=n[ta];i&&(s+=";"+i),n.cssText=s,o=sa.test(s)}}else t&&e.removeAttribute("style");ar in e&&(e[ar]=o?n.display:"",e[ea]&&(n.display="none"))}const cr=/\s*!important$/;function os(e,t,s){if(B(s))s.forEach(n=>os(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 o=ur[r]+n;if(o in e)return As[t]=o}return t}const fr="http://www.w3.org/1999/xlink";function dr(e,t,s,n,r,o=ci(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(fr,t.slice(6,t.length)):e.setAttributeNS(fr,t,s):s==null||o&&!Xr(s)?e.removeAttribute(t):e.setAttribute(t,o?"":ut(s)?String(s):s)}function hr(e,t,s,n,r){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Yo(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="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 i=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Xr(s):s==null&&l==="string"?(s="",i=!0):l==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(r||t)}function yt(e,t,s,n){e.addEventListener(t,s,n)}function oa(e,t,s,n){e.removeEventListener(t,s,n)}const pr=Symbol("_vei");function ia(e,t,s,n,r=null){const o=e[pr]||(e[pr]={}),i=o[t];if(n&&i)i.value=n;else{const[l,a]=la(t);if(n){const h=o[t]=ua(n,r);yt(e,l,h,a)}else i&&(oa(e,l,i,a),o[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(B(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,o)=>{const i=r==="svg";t==="class"?Xl(e,n,i):t==="style"?na(e,s,n):ps(t)?yn(t)||ia(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ha(e,t,n,i))?(hr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&dr(e,t,n,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ue(n))?hr(e,lt(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),dr(e,t,n,i))};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)&&ue(s)?!1:t in e}const vr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return B(t)?s=>es(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 o=n||r.props&&r.props.type==="number";yt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;s&&(l=l.trim()),o&&(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:o}},i){if(e[Ms]=vr(i),e.composing)return;const l=(o||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,...o)=>{for(let i=0;i<t.length;i++){const l=ma[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},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 o=t._component;!W(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=s(r,!1,ya(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function ya(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function wa(e){return ue(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"},za={class:"text-sm text-base-content/70 mb-2"},Ra={class:"flex items-center gap-2 mb-3"},$a={class:"badge badge-primary badge-sm"},Ta={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"},Da={class:"tooltip","data-tip":"View on Steam Workshop"},ka=["href"],Ia={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"},Va={key:1,class:"text-base-content/50"},qa={key:0,class:"badge badge-info badge-xs"},Ha={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=Jt({__name:"PuzzleCard",props:{puzzle:{},responses:{}},setup(e){return(t,s)=>(M(),k("div",xa,[u("div",Sa,[u("div",Ea,[u("div",Ca,[u("h3",Oa,q(e.puzzle.title),1),u("p",za,"by "+q(e.puzzle.author_name),1),u("div",Ra,[u("div",$a,q(e.puzzle.steam_item_id),1),u("div",Ta,"Order: "+q(e.puzzle.order_index+1),1)]),e.puzzle.description?(M(),k("p",Pa,q(e.puzzle.description),1)):re("",!0),e.puzzle.tags&&e.puzzle.tags.length>0?(M(),k("div",Aa,[(M(!0),k(ve,null,Rt(e.puzzle.tags.slice(0,3),n=>(M(),k("span",{key:n,class:"badge badge-outline badge-xs"},q(n),1))),128)),e.puzzle.tags.length>3?(M(),k("span",La," +"+q(e.puzzle.tags.length-3)+" more ",1)):re("",!0)])):re("",!0)]),u("div",Ma,[u("div",Da,[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?(M(),k("div",Ia,[u("div",Na,[u("span",Fa,"Solutions ("+q(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,[(M(!0),k(ve,null,Rt(e.responses,n=>(M(),k("tr",{key:n.id,class:"hover"},[u("td",null,[n.final_cost||n.cost?(M(),k("span",Ua,q(n.final_cost||n.cost),1)):(M(),k("span",Va,"-"))]),u("td",null,[n.final_cycles||n.cycles?(M(),k("span",qa,q(n.final_cycles||n.cycles),1)):(M(),k("span",Ha,"-"))]),u("td",null,[n.final_area||n.area?(M(),k("span",Ba,q(n.final_area||n.area),1)):(M(),k("span",Wa,"-"))]),u("td",null,[u("div",Ka,[u("span",Ga,q(n.files?.length||0),1),n.files?.length?(M(),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)):re("",!0),n.needs_manual_validation?(M(),k("div",Ya,[...s[2]||(s[2]=[u("i",{class:"mdi mdi-alert-circle text-xs text-warning"},null,-1)])])):re("",!0)])])]))),128))])])])])):(M(),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 Ds={exports:{}},yr;function tc(){return yr||(yr=1,(function(e){var t=(function(s){var n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(E,w,T){E[w]=T.value},i,l=typeof Symbol=="function"?Symbol:{},a=l.iterator||"@@iterator",h=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function g(E,w,T){return Object.defineProperty(E,w,{value:T,enumerable:!0,configurable:!0,writable:!0}),E[w]}try{g({},"")}catch{g=function(w,T,U){return w[T]=U}}function p(E,w,T,U){var N=w&&w.prototype instanceof $?w:$,J=Object.create(N.prototype),he=new ae(U||[]);return o(J,"_invoke",{value:Ge(E,T,he)}),J}s.wrap=p;function y(E,w,T){try{return{type:"normal",arg:E.call(w,T)}}catch(U){return{type:"throw",arg:U}}}var I="suspendedStart",P="suspendedYield",A="executing",D="completed",V={};function $(){}function b(){}function z(){}var ee={};g(ee,a,function(){return this});var oe=Object.getPrototypeOf,pe=oe&&oe(oe(Y([])));pe&&pe!==n&&r.call(pe,a)&&(ee=pe);var Se=z.prototype=$.prototype=Object.create(ee);b.prototype=z,o(Se,"constructor",{value:z,configurable:!0}),o(z,"constructor",{value:b,configurable:!0}),b.displayName=g(z,d,"GeneratorFunction");function Ee(E){["next","throw","return"].forEach(function(w){g(E,w,function(T){return this._invoke(w,T)})})}s.isGeneratorFunction=function(E){var w=typeof E=="function"&&E.constructor;return w?w===b||(w.displayName||w.name)==="GeneratorFunction":!1},s.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,z):(E.__proto__=z,g(E,d,"GeneratorFunction")),E.prototype=Object.create(Se),E},s.awrap=function(E){return{__await:E}};function Ce(E,w){function T(J,he,le,fe){var ce=y(E[J],E,he);if(ce.type==="throw")fe(ce.arg);else{var nt=ce.arg,Te=nt.value;return Te&&typeof Te=="object"&&r.call(Te,"__await")?w.resolve(Te.__await).then(function(Fe){T("next",Fe,le,fe)},function(Fe){T("throw",Fe,le,fe)}):w.resolve(Te).then(function(Fe){nt.value=Fe,le(nt)},function(Fe){return T("throw",Fe,le,fe)})}}var U;function N(J,he){function le(){return new w(function(fe,ce){T(J,he,fe,ce)})}return U=U?U.then(le,le):le()}o(this,"_invoke",{value:N})}Ee(Ce.prototype),g(Ce.prototype,h,function(){return this}),s.AsyncIterator=Ce,s.async=function(E,w,T,U,N){N===void 0&&(N=Promise);var J=new Ce(p(E,w,T,U),N);return s.isGeneratorFunction(w)?J:J.next().then(function(he){return he.done?he.value:J.next()})};function Ge(E,w,T){var U=I;return function(J,he){if(U===A)throw new Error("Generator is already running");if(U===D){if(J==="throw")throw he;return K()}for(T.method=J,T.arg=he;;){var le=T.delegate;if(le){var fe=Je(le,T);if(fe){if(fe===V)continue;return fe}}if(T.method==="next")T.sent=T._sent=T.arg;else if(T.method==="throw"){if(U===I)throw U=D,T.arg;T.dispatchException(T.arg)}else T.method==="return"&&T.abrupt("return",T.arg);U=A;var ce=y(E,w,T);if(ce.type==="normal"){if(U=T.done?D:P,ce.arg===V)continue;return{value:ce.arg,done:T.done}}else ce.type==="throw"&&(U=D,T.method="throw",T.arg=ce.arg)}}}function Je(E,w){var T=w.method,U=E.iterator[T];if(U===i)return w.delegate=null,T==="throw"&&E.iterator.return&&(w.method="return",w.arg=i,Je(E,w),w.method==="throw")||T!=="return"&&(w.method="throw",w.arg=new TypeError("The iterator does not provide a '"+T+"' method")),V;var N=y(U,E.iterator,w.arg);if(N.type==="throw")return w.method="throw",w.arg=N.arg,w.delegate=null,V;var J=N.arg;if(!J)return w.method="throw",w.arg=new TypeError("iterator result is not an object"),w.delegate=null,V;if(J.done)w[E.resultName]=J.value,w.next=E.nextLoc,w.method!=="return"&&(w.method="next",w.arg=i);else return J;return w.delegate=null,V}Ee(Se),g(Se,d,"Generator"),g(Se,a,function(){return this}),g(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 ae(E){this.tryEntries=[{tryLoc:"root"}],E.forEach(ft,this),this.reset(!0)}s.keys=function(E){var w=Object(E),T=[];for(var U in w)T.push(U);return T.reverse(),function N(){for(;T.length;){var J=T.pop();if(J in w)return N.value=J,N.done=!1,N}return N.done=!0,N}};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 T=-1,U=function N(){for(;++T<E.length;)if(r.call(E,T))return N.value=E[T],N.done=!1,N;return N.value=i,N.done=!0,N};return U.next=U}}return{next:K}}s.values=Y;function K(){return{value:i,done:!0}}return ae.prototype={constructor:ae,reset:function(E){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(Oe),!E)for(var w in this)w.charAt(0)==="t"&&r.call(this,w)&&!isNaN(+w.slice(1))&&(this[w]=i)},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 T(fe,ce){return J.type="throw",J.arg=E,w.next=fe,ce&&(w.method="next",w.arg=i),!!ce}for(var U=this.tryEntries.length-1;U>=0;--U){var N=this.tryEntries[U],J=N.completion;if(N.tryLoc==="root")return T("end");if(N.tryLoc<=this.prev){var he=r.call(N,"catchLoc"),le=r.call(N,"finallyLoc");if(he&&le){if(this.prev<N.catchLoc)return T(N.catchLoc,!0);if(this.prev<N.finallyLoc)return T(N.finallyLoc)}else if(he){if(this.prev<N.catchLoc)return T(N.catchLoc,!0)}else if(le){if(this.prev<N.finallyLoc)return T(N.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(E,w){for(var T=this.tryEntries.length-1;T>=0;--T){var U=this.tryEntries[T];if(U.tryLoc<=this.prev&&r.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var N=U;break}}N&&(E==="break"||E==="continue")&&N.tryLoc<=w&&w<=N.finallyLoc&&(N=null);var J=N?N.completion:{};return J.type=E,J.arg=w,N?(this.method="next",this.next=N.finallyLoc,V):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),V},finish:function(E){for(var w=this.tryEntries.length-1;w>=0;--w){var T=this.tryEntries[w];if(T.finallyLoc===E)return this.complete(T.completion,T.afterLoc),Oe(T),V}},catch:function(E){for(var w=this.tryEntries.length-1;w>=0;--w){var T=this.tryEntries[w];if(T.tryLoc===E){var U=T.completion;if(U.type==="throw"){var N=U.arg;Oe(T)}return N}}throw new Error("illegal catch attempt")},delegateYield:function(E,w,T){return this.delegate={iterator:Y(E),resultName:w,nextLoc:T},this.method==="next"&&(this.arg=i),V}},s})(e.exports);try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}})(Ds)),Ds.exports}var ks,wr;function Nn(){return wr||(wr=1,ks=(e,t)=>`${e}-${t}-${Math.random().toString(16).slice(3,8)}`),ks}var Is,xr;function Zo(){if(xr)return Is;xr=1;const e=Nn();let t=0;return Is=({id:s,action:n,payload:r={}})=>{let o=s;return typeof o>"u"&&(o=e("Job",t),t+=1),{id:o,action:n,payload:r}},Is}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=Zo(),{log:t}=Fn(),s=Nn();let n=0;return Ns=()=>{const r=s("Scheduler",n),o={},i={};let l=[];n+=1;const a=()=>l.length,h=()=>Object.keys(o).length,d=()=>{if(l.length!==0){const P=Object.keys(o);for(let A=0;A<P.length;A+=1)if(typeof i[P[A]]>"u"){l[0](o[P[A]]);break}}},g=(P,A)=>new Promise((D,V)=>{const $=e({action:P,payload:A});l.push(async b=>{l.shift(),i[b.id]=$;try{D(await b[P].apply(this,[...A,$.id]))}catch(z){V(z)}finally{delete i[b.id],d()}}),t(`[${r}]: Add ${$.id} to JobQueue`),t(`[${r}]: JobQueue length=${l.length}`),d()});return{addWorker:P=>(o[P.id]=P,t(`[${r}]: Add ${P.id}`),t(`[${r}]: Number of workers=${h()}`),d(),P.id),addJob:async(P,...A)=>{if(h()===0)throw Error(`[${r}]: You need to have at least one worker before adding jobs`);return g(P,A)},terminate:async()=>{Object.keys(o).forEach(async P=>{await o[P].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 oc(){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,zr;function ic(){if(zr)return Us;zr=1;const t=oc()("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 Vs,Rr;function lc(){return Rr||(Rr=1,Vs=e=>{const t=[],s=[],n=[],r=[],o=[];return e.blocks&&e.blocks.forEach(i=>{i.paragraphs.forEach(l=>{l.lines.forEach(a=>{a.words.forEach(h=>{h.symbols.forEach(d=>{o.push({...d,page:e,block:i,paragraph:l,line:a,word:h})}),r.push({...h,page:e,block:i,paragraph:l,line:a})}),n.push({...a,page:e,block:i,paragraph:l})}),s.push({...l,page:e,block:i})}),t.push({...i,page:e})}),{...e,blocks:t,paragraphs:s,lines:n,words:r,symbols:o}}),Vs}var qs,$r;function Qo(){return $r||($r=1,qs={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),qs}const ac="5.1.1",cc={version:ac};var Hs,Tr;function uc(){return Tr||(Tr=1,Hs={workerBlobURL:!0,logger:()=>{}}),Hs}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,Dr;function gc(){return Dr||(Dr=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 o=new FileReader;o.onload=()=>{n(o.result)},o.onerror=({target:{error:{code:i}}})=>{r(Error(`File could not be read! Code=${i}`))},o.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 o=>{n=await e(o),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,Ir;function vc(){if(Ir)return Zs;Ir=1;const e=fc(),t=dc(),s=hc(),n=pc(),r=gc(),o=mc();return Zs={defaultOptions:e,spawnWorker:t,terminateWorker:s,onMessage:n,send:r,loadImage:o},Zs}var Qs,Nr;function Xo(){if(Nr)return Qs;Nr=1;const e=ic(),t=lc(),s=Zo(),{log:n}=Fn(),r=Nn(),o=Qo(),{defaultOptions:i,spawnWorker:l,terminateWorker:a,onMessage:h,loadImage:d,send:g}=vc();let p=0;return Qs=async(y="eng",I=o.LSTM_ONLY,P={},A={})=>{const D=r("Worker",p),{logger:V,errorHandler:$,...b}=e({...i,...P}),z={},ee={},oe=typeof y=="string"?y.split("+"):y;let pe=I,Se=A;const Ee=[o.DEFAULT,o.LSTM_ONLY].includes(I)&&!b.legacyCore;let Ce,Ge;const Je=new Promise((m,v)=>{Ge=m,Ce=v}),ft=m=>{Ce(m.message)};let Oe=l(b);Oe.onerror=ft,p+=1;const ae=(m,v)=>{z[m]=v},Y=(m,v)=>{ee[m]=v},K=({id:m,action:v,payload:R})=>new Promise((O,S)=>{n(`[${D}]: Start ${m}, action=${v}`);const x=`${v}-${m}`;ae(x,O),Y(x,S),g(Oe,{workerId:D,jobId:m,action:v,payload:R})}),E=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),w=m=>K(s({id:m,action:"load",payload:{options:{lstmOnly:Ee,corePath:b.corePath,logging:b.logging}}})),T=(m,v,R)=>K(s({id:R,action:"FS",payload:{method:"writeFile",args:[m,v]}})),U=(m,v)=>K(s({id:v,action:"FS",payload:{method:"readFile",args:[m,{encoding:"utf8"}]}})),N=(m,v)=>K(s({id:v,action:"FS",payload:{method:"unlink",args:[m]}})),J=(m,v,R)=>K(s({id:R,action:"FS",payload:{method:m,args:v}})),he=()=>console.warn("`loadLanguage` is depreciated and should be removed from code (workers now come with language pre-loaded)"),le=(m,v)=>K(s({id:v,action:"loadLanguage",payload:{langs:m,options:{langPath:b.langPath,dataPath:b.dataPath,cachePath:b.cachePath,cacheMethod:b.cacheMethod,gzip:b.gzip,lstmOnly:[o.DEFAULT,o.LSTM_ONLY].includes(pe)&&!b.legacyLang}}})),fe=()=>console.warn("`initialize` is depreciated and should be removed from code (workers now come pre-initialized)"),ce=(m,v,R,O)=>K(s({id:O,action:"initialize",payload:{langs:m,oem:v,config:R}})),nt=(m="eng",v,R,O)=>{if(Ee&&[o.TESSERACT_ONLY,o.TESSERACT_LSTM_COMBINED].includes(v))throw Error("Legacy model requested but code missing.");const S=v||pe;pe=S;const x=R||Se;Se=x;const L=(typeof m=="string"?m.split("+"):m).filter(j=>!oe.includes(j));return oe.push(...L),L.length>0?le(L,O).then(()=>ce(m,S,x,O)):ce(m,S,x,O)},Te=(m={},v)=>K(s({id:v,action:"setParameters",payload:{params:m}})),Fe=async(m,v={},R={blocks:!0,text:!0,hocr:!0,tsv:!0},O)=>K(s({id:O,action:"recognize",payload:{image:await d(m),options:v,output:R}})),c=(m="Tesseract OCR Result",v=!1,R)=>(console.log("`getPDF` function is depreciated. `recognize` option `savePDF` should be used instead."),K(s({id:R,action:"getPDF",payload:{title:m,textonly:v}}))),f=async(m,v)=>{if(Ee)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return K(s({id:v,action:"detect",payload:{image:await d(m)}}))},_=async()=>(Oe!==null&&(a(Oe),Oe=null),Promise.resolve());h(Oe,({workerId:m,jobId:v,status:R,action:O,data:S})=>{const x=`${O}-${v}`;if(R==="resolve"){n(`[${m}]: Complete ${v}`);let F=S;O==="recognize"?F=t(S):O==="getPDF"&&(F=Array.from({...S,length:Object.keys(S).length})),z[x]({jobId:v,data:F})}else if(R==="reject")if(ee[x](S),O==="load"&&Ce(S),$)$(S);else throw Error(S);else R==="progress"&&V({...S,userJobId:v})});const C={id:D,worker:Oe,setResolve:ae,setReject:Y,load:E,writeText:T,readText:U,removeFile:N,FS:J,loadLanguage:he,initialize:fe,reinitialize:nt,setParameters:Te,recognize:Fe,getPDF:c,detect:f,terminate:_};return w().then(()=>le(y)).then(()=>ce(y,I,A)).then(()=>Ge(C)).catch(()=>{}),Je},Qs}var Xs,Fr;function bc(){if(Fr)return Xs;Fr=1;const e=Xo();return Xs={recognize:async(n,r,o)=>{const i=await e(r,1,o);return i.recognize(n).finally(async()=>{await i.terminate()})},detect:async(n,r)=>{const o=await e("osd",0,r);return o.detect(n).finally(async()=>{await o.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,Vr;function wc(){if(Vr)return sn;Vr=1,tc();const e=sc(),t=Xo(),s=bc(),n=_c(),r=Qo(),o=yc(),{setLogging:i}=Fn();return sn={languages:n,OEM:r,PSM:o,createScheduler:e,createWorker:t,setLogging:i,...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,o)=>{n.onload=async()=>{try{const i=document.createElement("canvas"),l=i.getContext("2d");i.width=n.width,i.height=n.height,l.drawImage(n,0,0);const a={},h={};for(const[p,y]of Object.entries(this.regions)){const I=document.createElement("canvas"),P=I.getContext("2d");I.width=y.width,I.height=y.height,P.drawImage(i,y.x,y.y,y.width,y.height,0,0,y.width,y.height);const A=P.getImageData(0,0,y.width,y.height);this.preprocessImage(A),P.putImageData(A,0,0),p==="cost"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789G"}):p==="cycles"||p==="area"?await this.worker.setParameters({tessedit_char_whitelist:"0123456789"}):p==="puzzle"?await this.worker.setParameters({tessedit_char_whitelist:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 -"}):await this.worker.setParameters({tessedit_char_whitelist:""});const{data:{text:D,confidence:V}}=await this.worker.recognize(I);let $=D.trim();if(h[p]=V/100,p==="cost"){if($.endsWith("6")&&$.length>1){const b=$.slice(0,-1);/^\d+$/.test(b)&&($=b)}$=$.replace(/G+$/g,""),$=$.replace(/[^0-9]/g,"")}else p==="cycles"||p==="area"?$=$.replace(/[^0-9]/g,""):p==="puzzle"&&($=this.findBestPuzzleMatch($));a[p]=$}URL.revokeObjectURL(s);const d=Object.values(h),g=d.length>0?d.reduce((p,y)=>p+y,0)/d.length:0;r({puzzle:a.puzzle||"",cost:a.cost||"",cycles:a.cycles||"",area:a.area||"",confidence:{puzzle:h.puzzle||0,cost:h.cost||0,cycles:h.cycles||0,area:h.area||0,overall:g}})}catch(i){URL.revokeObjectURL(s),o(i)}},n.onerror=()=>{URL.revokeObjectURL(s),o(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 o=255-Math.round(.299*s[n]+.587*s[n+1]+.114*s[n+2]);s[n]=o,s[n+1]=o,s[n+2]=o}}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 o=1;o<=t.length;o++){const i=t[o-1]===s[r-1]?0:1;n[r][o]=Math.min(n[r][o-1]+1,n[r-1][o]+1,n[r-1][o-1]+i)}return n[s.length][t.length]}findBestPuzzleMatch(t){if(!this.availablePuzzleNames.length)return t.trim();const s=t.trim(),n=this.availablePuzzleNames.find(i=>i.toLowerCase()===s.toLowerCase());if(n)return n;let r=s,o=1/0;for(const i of this.availablePuzzleNames){const l=this.levenshteinDistance(s.toLowerCase(),i.toLowerCase()),a=Math.max(s.length,i.length);1-l/a>.7&&l<o&&(o=l,r=i)}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),o=new Image;o.onload=()=>{const i=document.createElement("canvas"),l=i.getContext("2d");i.width=o.width,i.height=o.height,l.drawImage(o,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(i.toDataURL())},o.onerror=()=>{URL.revokeObjectURL(r),n(new Error("Failed to load image for debug"))},o.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"},zc={class:"aspect-square rounded-lg overflow-hidden bg-base-200"},Rc=["src","alt"],$c={class:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity duration-200 rounded-lg flex items-center justify-center"},Tc=["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"},Dc={key:1,class:"mt-1"},kc={class:"text-xs text-error"},Ic={key:2,class:"mt-1 space-y-1"},Nc={class:"text-xs flex items-center justify-between"},Fc={class:"flex items-center gap-2"},jc=["title"],Uc=["onClick"],Vc={class:"text-xs space-y-1 bg-base-200 p-2 rounded"},qc={key:0},Hc=["title"],Bc={key:1},Wc=["title"],Kc={key:2},Gc=["title"],Jc={key:3},Yc=["title"],Zc={key:3,class:"mt-1"},Qc=["onClick"],Xc={class:"flex justify-center"},eu={key:0,class:"label"},tu={class:"label-text-alt text-error"},su=Jt({__name:"FileUpload",props:{modelValue:{},puzzles:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,n=t,r=de(),o=de(!1),i=de(""),l=de([]);Ot(()=>s.modelValue,$=>{l.value=$},{immediate:!0}),Ot(l,$=>{n("update:modelValue",$)},{deep:!0}),Ot(()=>s.puzzles,$=>{if($&&$.length>0){const b=$.map(z=>z.title);nn.setAvailablePuzzleNames(b)}},{immediate:!0});const a=$=>{const b=$.target;b.files&&d(Array.from(b.files))},h=$=>{$.preventDefault(),o.value=!1,$.dataTransfer?.files&&d(Array.from($.dataTransfer.files))},d=async $=>{i.value="";for(const b of $)if(g(b))try{const z=await p(b),ee=b.type.startsWith("image/gif")?"gif":"image",oe={file:b,preview:z,type:ee,ocrProcessing:!1,ocrError:void 0,ocrData:void 0};l.value.push(oe),P(b)&&ts(()=>{A(oe)})}catch{i.value=`Failed to process ${b.name}`}},g=$=>$.type.startsWith("image/")?$.size>256*1024*1024?(i.value=`${$.name} is too large (max 256MB)`,!1):!0:(i.value=`${$.name} is not a valid image file`,!1),p=$=>new Promise((b,z)=>{const ee=new FileReader;ee.onload=oe=>b(oe.target?.result),ee.onerror=z,ee.readAsDataURL($)}),y=$=>{l.value.splice($,1)},I=$=>{if($===0)return"0 Bytes";const b=1024,z=["Bytes","KB","MB","GB"],ee=Math.floor(Math.log($)/Math.log(b));return parseFloat(($/Math.pow(b,ee)).toFixed(2))+" "+z[ee]},P=$=>$.type.startsWith("image/")&&$.size>5e4,A=async $=>{const b=l.value.findIndex(z=>z.file===$.file);if(b!==-1){l.value[b].ocrProcessing=!0,l.value[b].ocrError=void 0,l.value[b].ocrData=void 0;try{console.log("Starting OCR processing for:",$.file.name),await nn.initialize();const z=await nn.extractOpusMagnumData($.file);console.log("OCR completed:",z),await ts(),l.value[b].ocrData=z,await ts()}catch(z){console.error("OCR processing failed:",z),l.value[b].ocrError="Failed to extract puzzle data"}finally{l.value[b].ocrProcessing=!1}}},D=$=>{A($)},V=$=>$>=.8?"badge-success":$>=.6?"badge-warning":"badge-error";return($,b)=>(M(),k("div",Sc,[b[17]||(b[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:Vt(["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":o.value}]),onDrop:h,onDragover:b[2]||(b[2]=vn(z=>o.value=!0,["prevent"])),onDragleave:b[3]||(b[3]=z=>o.value=!1),onDragenter:b[4]||(b[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?(M(),k("div",Ec,[b[6]||(b[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,[b[5]||(b[5]=u("p",{class:"text-base-content/70 mb-2"},"Drop your files here or",-1)),u("button",{type:"button",onClick:b[0]||(b[0]=z=>r.value?.click()),class:"btn btn-primary btn-sm"}," Choose Files ")]),b[7]||(b[7]=u("p",{class:"text-xs text-base-content/50"}," Supported formats: JPG, PNG, GIF (max 256MB each) ",-1))])):(M(),k("div",Cc,[u("div",Oc,[(M(!0),k(ve,null,Rt(l.value,(z,ee)=>(M(),k("div",{key:ee,class:"relative group"},[u("div",zc,[u("img",{src:z.preview,alt:z.file.name,class:"w-full h-full object-cover"},null,8,Rc)]),u("div",$c,[u("button",{onClick:oe=>y(ee),class:"btn btn-error btn-sm btn-circle"},[...b[8]||(b[8]=[u("i",{class:"mdi mdi-close"},null,-1)])],8,Tc)]),u("div",Pc,[u("p",Ac,q(z.file.name),1),u("p",Lc,q(I(z.file.size))+" • "+q(z.type.toUpperCase()),1),z.ocrProcessing?(M(),k("div",Mc,[...b[9]||(b[9]=[u("span",{class:"loading loading-spinner loading-xs"},null,-1),u("span",{class:"text-xs text-info"},"Extracting puzzle data...",-1)])])):z.ocrError?(M(),k("div",Dc,[u("p",kc,q(z.ocrError),1)])):z.ocrData?(M(),k("div",Ic,[u("div",Nc,[u("div",Fc,[b[10]||(b[10]=u("span",{class:"font-medium text-success"},"✓ OCR Complete",-1)),z.ocrData.confidence?(M(),k("span",{key:0,class:Vt(["badge badge-xs",V(z.ocrData.confidence.overall)]),title:`Overall confidence: ${Math.round(z.ocrData.confidence.overall*100)}%`},q(Math.round(z.ocrData.confidence.overall*100))+"% ",11,jc)):re("",!0)]),u("button",{onClick:oe=>D(z),class:"btn btn-xs btn-ghost",title:"Retry OCR"},[...b[11]||(b[11]=[u("i",{class:"mdi mdi-refresh"},null,-1)])],8,Uc)]),u("div",Vc,[z.ocrData.puzzle?(M(),k("div",qc,[b[12]||(b[12]=u("strong",null,"Puzzle:",-1)),Le(" "+q(z.ocrData.puzzle)+" ",1),z.ocrData.confidence?.puzzle?(M(),k("span",{key:0,class:"ml-2 opacity-60",title:`Puzzle confidence: ${Math.round(z.ocrData.confidence.puzzle*100)}%`}," ("+q(Math.round(z.ocrData.confidence.puzzle*100))+"%) ",9,Hc)):re("",!0)])):re("",!0),z.ocrData.cost?(M(),k("div",Bc,[b[13]||(b[13]=u("strong",null,"Cost:",-1)),Le(" "+q(z.ocrData.cost)+" ",1),z.ocrData.confidence?.cost?(M(),k("span",{key:0,class:"ml-2 opacity-60",title:`Cost confidence: ${Math.round(z.ocrData.confidence.cost*100)}%`}," ("+q(Math.round(z.ocrData.confidence.cost*100))+"%) ",9,Wc)):re("",!0)])):re("",!0),z.ocrData.cycles?(M(),k("div",Kc,[b[14]||(b[14]=u("strong",null,"Cycles:",-1)),Le(" "+q(z.ocrData.cycles)+" ",1),z.ocrData.confidence?.cycles?(M(),k("span",{key:0,class:"ml-2 opacity-60",title:`Cycles confidence: ${Math.round(z.ocrData.confidence.cycles*100)}%`}," ("+q(Math.round(z.ocrData.confidence.cycles*100))+"%) ",9,Gc)):re("",!0)])):re("",!0),z.ocrData.area?(M(),k("div",Jc,[b[15]||(b[15]=u("strong",null,"Area:",-1)),Le(" "+q(z.ocrData.area)+" ",1),z.ocrData.confidence?.area?(M(),k("span",{key:0,class:"ml-2 opacity-60",title:`Area confidence: ${Math.round(z.ocrData.confidence.area*100)}%`}," ("+q(Math.round(z.ocrData.confidence.area*100))+"%) ",9,Yc)):re("",!0)])):re("",!0)])])):!z.ocrProcessing&&!z.ocrError&&!z.ocrData?(M(),k("div",Zc,[u("button",{onClick:oe=>A(z),class:"btn btn-xs btn-outline"},[...b[16]||(b[16]=[u("i",{class:"mdi mdi-text-recognition"},null,-1),Le(" Extract Puzzle Data ",-1)])],8,Qc)])):re("",!0)])]))),128))]),u("div",Xc,[u("button",{type:"button",onClick:b[1]||(b[1]=z=>r.value?.click()),class:"btn btn-outline btn-sm"}," Add More Files ")])]))],34),i.value?(M(),k("div",eu,[u("span",tu,q(i.value),1)])):re("",!0)]))}}),nu={class:"card bg-base-100 shadow-xl"},ru={class:"card-body"},ou={key:0,class:"alert alert-info"},iu={class:"flex-1"},lu={class:"font-bold"},au={class:"text-sm space-y-1 mt-1"},cu={class:"badge badge-ghost badge-sm ml-2"},uu={class:"form-control"},fu={class:"flex-1"},du={class:"flex label"},hu={class:"label-text-alt"},pu={class:"card-actions justify-end"},gu=["disabled"],mu={key:0,class:"loading loading-spinner loading-sm"},vu=Jt({__name:"SubmissionForm",props:{puzzles:{},findPuzzleByName:{type:Function}},emits:["submit"],setup(e,{emit:t}){const s=e,n=t,r=de([]),o=de(""),i=de(!1),l=zt(()=>o.value.length),a=zt(()=>r.value.length>0&&!i.value),h=zt(()=>{const g={};return r.value.forEach(p=>{if(p.ocrData?.puzzle){const y=p.ocrData.puzzle;g[y]||(g[y]={puzzle:s.findPuzzleByName(y),files:[]}),g[y].files.push(p)}}),g}),d=async()=>{if(a.value){i.value=!0;try{n("submit",{files:r.value,notes:o.value.trim()||void 0}),r.value=[],o.value=""}catch(g){console.error("Submission error:",g)}finally{i.value=!1}}};return(g,p)=>(M(),k("div",nu,[u("div",ru,[p[4]||(p[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(d,["prevent"]),class:"space-y-6"},[Object.keys(h.value).length>0?(M(),k("div",ou,[p[2]||(p[2]=u("i",{class:"mdi mdi-information-outline text-xl"},null,-1)),u("div",iu,[u("h4",lu,"Detected Puzzles ("+q(Object.keys(h.value).length)+")",1),u("div",au,[(M(!0),k(ve,null,Rt(h.value,(y,I)=>(M(),k("div",{key:I,class:"flex justify-between"},[u("span",null,q(I),1),u("span",cu,q(y.files.length)+" file(s)",1)]))),128))])])])):re("",!0),Ie(su,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=y=>r.value=y),puzzles:e.puzzles},null,8,["modelValue","puzzles"]),u("div",uu,[u("div",fu,[u("label",du,[p[3]||(p[3]=u("span",{class:"label-text font-medium"},"Notes (Optional)",-1)),u("span",hu,q(l.value)+"/500",1)]),ss(u("textarea",{"onUpdate:modelValue":p[1]||(p[1]=y=>o.value=y),class:"flex textarea textarea-bordered h-24 w-full resize-none",placeholder:"Add any notes about your solution, approach, or interesting findings...",maxlength:"500"},null,512),[[is,o.value]])])]),u("div",pu,[u("button",{type:"submit",class:"btn btn-primary",disabled:i.value},[i.value?(M(),k("span",mu)):re("",!0),Le(" "+q(i.value?"Submitting...":"Submit Solution"),1)],8,gu)])],32)])]))}}),qr="/api";class bu{async request(t,s={}){try{const n=await fetch(`${qr}${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(`${qr}${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 bu,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}},Hr={async createFromFiles(e,t,s){const n={};e.forEach(i=>{if(i.ocrData?.puzzle){const l=i.ocrData.puzzle;n[l]||(n[l]={puzzle:bn.findPuzzleByName(t,l),files:[]}),n[l].files.push(i)}});const r=Object.entries(n).filter(([i,l])=>l.puzzle).map(([i,l])=>{const a=l.files.find(d=>d.ocrData?.cost||d.ocrData?.cycles||d.ocrData?.area),h=!a?.ocrData||!a.ocrData.cost||!a.ocrData.cycles||!a.ocrData.area;return{puzzle_id:l.puzzle.id,puzzle_name:i,cost:a?.ocrData?.cost,cycles:a?.ocrData?.cycles,area:a?.ocrData?.area,needs_manual_validation:h,ocr_confidence_score:a?.ocrData?.confidence?.overall||0}});if(r.length===0)return{error:"No valid puzzle responses found",status:400};const o=e.map(i=>i.file);return mt.createSubmission({notes:s,responses:r},o)},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}},_u={class:"card bg-base-100 shadow-xl"},yu={class:"card-body"},wu={class:"stats stats-vertical lg:stats-horizontal shadow mb-6"},xu={class:"stat"},Su={class:"stat-value text-primary"},Eu={class:"stat"},Cu={class:"stat-value text-secondary"},Ou={class:"stat"},zu={class:"stat-value text-warning"},Ru={class:"stat"},$u={class:"stat-value text-success"},Tu={key:0},Pu={class:"overflow-x-auto"},Au={class:"table table-zebra"},Lu={class:"font-bold"},Mu={class:"text-sm opacity-50"},Du={class:"text-sm space-y-1"},ku={class:"badge badge-warning badge-sm"},Iu=["onClick"],Nu={key:1,class:"text-center py-8"},Fu={key:0,class:"modal modal-open"},ju={class:"modal-box"},Uu={key:0,class:"space-y-4"},Vu={class:"alert alert-info"},qu={class:"font-bold"},Hu={class:"grid grid-cols-3 gap-4"},Bu={class:"form-control"},Wu=["placeholder"],Ku={class:"form-control"},Gu=["placeholder"],Ju={class:"form-control"},Yu=["placeholder"],Zu={class:"modal-action"},Qu=["disabled"],Xu={key:0,class:"loading loading-spinner loading-sm"},ef=Jt({__name:"AdminPanel",setup(e,{expose:t}){const s=de({total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}),n=de([]),r=de(!1),o=de(!1),i=de({show:!1,response:null,data:{validated_cost:"",validated_cycles:"",validated_area:""}}),l=async()=>{try{r.value=!0;try{const p=await mt.getStats();p.data&&(s.value=p.data)}catch(p){console.warn("Stats endpoint not available:",p),s.value={total_submissions:0,total_responses:0,needs_validation:0,validated_submissions:0,validation_rate:0}}const g=await mt.getResponsesNeedingValidation();g.data&&(n.value=g.data)}catch(g){console.error("Failed to load admin data:",g)}finally{r.value=!1}},a=g=>{i.value.response=g,i.value.data={validated_cost:g.cost||"",validated_cycles:g.cycles||"",validated_area:g.area||""},i.value.show=!0},h=()=>{i.value.show=!1,i.value.response=null,i.value.data={validated_cost:"",validated_cycles:"",validated_area:""}},d=async()=>{if(i.value.response?.id)try{o.value=!0;const g=await mt.validateResponse(i.value.response.id,i.value.data);if(g.error){alert(`Validation failed: ${g.error}`);return}n.value=n.value.filter(p=>p.id!==i.value.response?.id),s.value.needs_validation=Math.max(0,s.value.needs_validation-1),h()}catch(g){console.error("Validation error:",g),alert("Validation failed")}finally{o.value=!1}};return Mn(()=>{l()}),t({refresh:l}),(g,p)=>(M(),k(ve,null,[u("div",_u,[u("div",yu,[p[11]||(p[11]=u("h2",{class:"card-title"},[u("i",{class:"mdi mdi-shield-account text-2xl text-warning"}),Le(" Admin Panel ")],-1)),u("div",wu,[u("div",xu,[p[3]||(p[3]=u("div",{class:"stat-title"},"Total Submissions",-1)),u("div",Su,q(s.value.total_submissions),1)]),u("div",Eu,[p[4]||(p[4]=u("div",{class:"stat-title"},"Total Responses",-1)),u("div",Cu,q(s.value.total_responses),1)]),u("div",Ou,[p[5]||(p[5]=u("div",{class:"stat-title"},"Need Validation",-1)),u("div",zu,q(s.value.needs_validation),1)]),u("div",Ru,[p[6]||(p[6]=u("div",{class:"stat-title"},"Validation Rate",-1)),u("div",$u,q(Math.round(s.value.validation_rate*100))+"%",1)])]),n.value.length>0?(M(),k("div",Tu,[p[9]||(p[9]=u("h3",{class:"text-lg font-bold mb-4"},"Responses Needing Validation",-1)),u("div",Pu,[u("table",Au,[p[8]||(p[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,[(M(!0),k(ve,null,Rt(n.value,y=>(M(),k("tr",{key:y.id},[u("td",null,[u("div",Lu,q(y.puzzle_name),1),u("div",Mu,"ID: "+q(y.id),1)]),u("td",null,[u("div",Du,[u("div",null,"Cost: "+q(y.cost||"-"),1),u("div",null,"Cycles: "+q(y.cycles||"-"),1),u("div",null,"Area: "+q(y.area||"-"),1)])]),u("td",null,[u("div",ku,q(y.ocr_confidence_score?Math.round(y.ocr_confidence_score*100)+"%":"Low"),1)]),u("td",null,[u("button",{onClick:I=>a(y),class:"btn btn-sm btn-primary"},[...p[7]||(p[7]=[u("i",{class:"mdi mdi-check-circle mr-1"},null,-1),Le(" Validate ",-1)])],8,Iu)])]))),128))])])])])):(M(),k("div",Nu,[...p[10]||(p[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)])]))])]),i.value.show?(M(),k("div",Fu,[u("div",ju,[p[17]||(p[17]=u("h3",{class:"font-bold text-lg mb-4"},"Validate Response",-1)),i.value.response?(M(),k("div",Uu,[u("div",Vu,[p[13]||(p[13]=u("i",{class:"mdi mdi-information-outline"},null,-1)),u("div",null,[u("div",qu,q(i.value.response.puzzle_name),1),p[12]||(p[12]=u("div",{class:"text-sm"},"Review and correct the OCR data below",-1))])]),u("div",Hu,[u("div",Bu,[p[14]||(p[14]=u("label",{class:"label"},[u("span",{class:"label-text"},"Cost")],-1)),ss(u("input",{"onUpdate:modelValue":p[0]||(p[0]=y=>i.value.data.validated_cost=y),type:"text",class:"input input-bordered input-sm",placeholder:i.value.response.cost||"Enter cost"},null,8,Wu),[[is,i.value.data.validated_cost]])]),u("div",Ku,[p[15]||(p[15]=u("label",{class:"label"},[u("span",{class:"label-text"},"Cycles")],-1)),ss(u("input",{"onUpdate:modelValue":p[1]||(p[1]=y=>i.value.data.validated_cycles=y),type:"text",class:"input input-bordered input-sm",placeholder:i.value.response.cycles||"Enter cycles"},null,8,Gu),[[is,i.value.data.validated_cycles]])]),u("div",Ju,[p[16]||(p[16]=u("label",{class:"label"},[u("span",{class:"label-text"},"Area")],-1)),ss(u("input",{"onUpdate:modelValue":p[2]||(p[2]=y=>i.value.data.validated_area=y),type:"text",class:"input input-bordered input-sm",placeholder:i.value.response.area||"Enter area"},null,8,Yu),[[is,i.value.data.validated_area]])])]),u("div",Zu,[u("button",{onClick:h,class:"btn btn-ghost"},"Cancel"),u("button",{onClick:d,class:"btn btn-primary",disabled:o.value},[o.value?(M(),k("span",Xu)):re("",!0),Le(" "+q(o.value?"Validating...":"Validate"),1)],8,Qu)])])):re("",!0)]),u("div",{class:"modal-backdrop",onClick:h})])):re("",!0)],64))}}),tf={class:"min-h-screen bg-base-200"},sf={class:"navbar bg-base-100 shadow-lg"},nf={class:"container mx-auto"},rf={class:"flex items-start justify-between"},of={key:0,class:"flex items-center gap-2"},lf={class:"text-sm"},af={class:"font-medium"},cf={key:0,class:"badge badge-warning badge-xs ml-1"},uf={key:1,class:"text-sm text-base-content/70"},ff={class:"container mx-auto px-4 py-8"},df={key:0,class:"flex justify-center items-center min-h-[400px]"},hf={key:1,class:"alert alert-error max-w-2xl mx-auto"},pf={class:"text-sm"},gf={key:2,class:"space-y-8"},mf={key:0,class:"mb-8"},vf={class:"card bg-base-100 shadow-lg"},bf={class:"card-body"},_f={class:"card-title text-2xl"},yf={class:"text-base-content/70"},wf={key:1},xf={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},Sf={key:2,class:"text-center py-12"},Ef={key:0,class:"modal modal-open"},Cf={class:"modal-box max-w-4xl"},Of=Jt({__name:"App",setup(e){const t=de([]),s=de([]),n=de([]),r=de(null),o=de(!0),i=de(!1),l=de(""),a=zt(()=>r.value?.is_superuser||!1),h=zt(()=>{const P={};return n.value.forEach(A=>{A.responses.forEach(D=>{const V=typeof D.puzzle=="number"?D.puzzle:D.puzzle.id;P[V]||(P[V]=[]),P[V].push(D)})}),P});Mn(async()=>{try{o.value=!0,l.value="",console.log("Starting data load..."),console.log("Loading user info...");const P=await mt.getUserInfo();P.data?(r.value=P.data,console.log("User info loaded:",P.data)):P.error&&console.warn("User info error:",P.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 D=await Hr.loadSubmissions();n.value=D,console.log("Submissions loaded:",D.length),console.log("Data load complete!")}catch(P){l.value=Br.getErrorMessage(P),console.error("Failed to load data:",P)}finally{o.value=!1,console.log("Loading state set to false")}});const d=async P=>{try{o.value=!0,l.value="";const A=await Hr.createFromFiles(P.files,s.value,P.notes);if(A.error){l.value=A.error,alert(`Submission failed: ${A.error}`);return}if(A.data){n.value.unshift(A.data);const D=A.data.responses.map(V=>V.puzzle_name).join(", ");alert(`Solutions submitted successfully for puzzles: ${D}`),i.value=!1}}catch(A){const D=Br.getErrorMessage(A);l.value=D,alert(`Submission failed: ${D}`),console.error("Submission error:",A)}finally{o.value=!1}},g=()=>{i.value=!0},p=()=>{i.value=!1},y=P=>bn.findPuzzleByName(s.value,P),I=()=>{window.location.reload()};return(P,A)=>(M(),k("div",tf,[u("div",sf,[u("div",nf,[A[1]||(A[1]=u("div",{class:"flex-1"},[u("h1",{class:"text-xl font-bold"},"Opus Magnum Puzzle Submitter")],-1)),u("div",rf,[r.value?.is_authenticated?(M(),k("div",of,[u("div",lf,[u("span",af,q(r.value.username),1),r.value.is_superuser?(M(),k("span",cf,"Admin")):re("",!0)])])):(M(),k("div",uf," Not logged in ")),A[0]||(A[0]=u("div",{class:"flex flex-col items-end gap-2"},[u("a",{href:"/admin",class:"btn btn-xs btn-warning"}," Admin django ")],-1))])])]),u("div",ff,[o.value?(M(),k("div",df,[...A[2]||(A[2]=[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?(M(),k("div",hf,[A[5]||(A[5]=u("i",{class:"mdi mdi-alert-circle text-xl"},null,-1)),u("div",null,[A[3]||(A[3]=u("h3",{class:"font-bold"},"Error Loading Data",-1)),u("div",pf,q(l.value),1)]),u("button",{onClick:I,class:"btn btn-sm btn-outline"},[...A[4]||(A[4]=[u("i",{class:"mdi mdi-refresh mr-1"},null,-1),Le(" Retry ",-1)])])])):(M(),k("div",gf,[t.value.length>0?(M(),k("div",mf,[u("div",vf,[u("div",bf,[u("h2",_f,q(t.value[0].title),1),u("p",yf,q(t.value[0].description),1),u("div",{class:"flex flex-wrap gap-4 mt-4"},[u("button",{onClick:g,class:"btn btn-primary"},[...A[6]||(A[6]=[u("i",{class:"mdi mdi-plus mr-2"},null,-1),Le(" Submit Solution ",-1)])])])])])])):re("",!0),a.value?(M(),k("div",wf,[Ie(ef)])):re("",!0),u("div",xf,[(M(!0),k(ve,null,Rt(s.value,D=>(M(),Bo(ec,{key:D.id,puzzle:D,responses:h.value[D.id]||[]},null,8,["puzzle","responses"]))),128))]),s.value.length===0?(M(),k("div",Sf,[...A[7]||(A[7]=[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)])])):re("",!0)]))]),i.value?(M(),k("div",Ef,[u("div",Cf,[u("div",{class:"flex justify-between items-center mb-4"},[A[9]||(A[9]=u("h3",{class:"font-bold text-lg"},"Submit Solution",-1)),u("button",{onClick:p,class:"btn btn-sm btn-circle btn-ghost"},[...A[8]||(A[8]=[u("i",{class:"mdi mdi-close"},null,-1)])])]),Ie(vu,{puzzles:s.value,"find-puzzle-by-name":y,onSubmit:d},null,8,["puzzles"])]),u("div",{class:"modal-backdrop",onClick:p})])):re("",!0)]))}});_a(Of).mount("#app");
|