diff --git a/Dockerfile b/Dockerfile index aa47b07..174e6f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:latest RUN apk add --no-cache ca-certificates -COPY bin/evening_detective_linux_arm64 /usr/local/bin/evening_detective +COPY evening_detective_linux_arm64 /usr/local/bin/evening_detective RUN chmod +x /usr/local/bin/evening_detective CMD ["/usr/local/bin/evening_detective"] diff --git a/cmd/evening_detective/main.go b/cmd/evening_detective/main.go index b15abce..c5ca0d4 100644 --- a/cmd/evening_detective/main.go +++ b/cmd/evening_detective/main.go @@ -172,6 +172,7 @@ func cors(h http.Handler) http.Handler { w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE") w.Header().Set("Access-Control-Allow-Headers", "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, ResponseType, X-Id, X-Password") + w.Header().Set("Content-Security-Policy", "connect-src 'self' evening-detective.crabs-games.art evening-detective-admin.crabs-games.art;") if r.Method == "OPTIONS" { return } @@ -189,3 +190,4 @@ func loggingMiddleware(next http.Handler) http.Handler { next.ServeHTTP(w, r) }) } + diff --git a/cmd/evening_detective/static/admin/assets/index-r74wHSLo.js b/cmd/evening_detective/static/admin/assets/index-DvuAabsI.js similarity index 98% rename from cmd/evening_detective/static/admin/assets/index-r74wHSLo.js rename to cmd/evening_detective/static/admin/assets/index-DvuAabsI.js index c3f3a58..5b77e69 100644 --- a/cmd/evening_detective/static/admin/assets/index-r74wHSLo.js +++ b/cmd/evening_detective/static/admin/assets/index-DvuAabsI.js @@ -22,7 +22,7 @@ * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const os=typeof document<"u";function bz(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function uU(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&bz(r.default)}const Ne=Object.assign;function Wl(r,e){const t={};for(const i in e){const n=e[i];t[i]=Ir(n)?n.map(r):r(n)}return t}const Po=()=>{},Ir=Array.isArray,_z=/#/g,lU=/&/g,cU=/\//g,dU=/=/g,hU=/\?/g,wz=/\+/g,fU=/%5B/g,pU=/%5D/g,Ez=/%5E/g,vU=/%60/g,Sz=/%7B/g,gU=/%7C/g,Oz=/%7D/g,mU=/%20/g;function zw(r){return encodeURI(""+r).replace(gU,"|").replace(fU,"[").replace(pU,"]")}function yU(r){return zw(r).replace(Sz,"{").replace(Oz,"}").replace(Ez,"^")}function nw(r){return zw(r).replace(wz,"%2B").replace(mU,"+").replace(_z,"%23").replace(lU,"%26").replace(vU,"`").replace(Sz,"{").replace(Oz,"}").replace(Ez,"^")}function bU(r){return nw(r).replace(dU,"%3D")}function _U(r){return zw(r).replace(_z,"%23").replace(hU,"%3F")}function wU(r){return r==null?"":_U(r).replace(cU,"%2F")}function Uo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const EU=/\/$/,SU=r=>r.replace(EU,"");function Ul(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=$U(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Uo(o)}}function OU(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function BE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function IU(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&Ss(e.matched[i],t.matched[n])&&Iz(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function Ss(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function Iz(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!TU(r[t],e[t]))return!1;return!0}function TU(r,e){return Ir(r)?LE(r,e):Ir(e)?LE(e,r):r===e}function LE(r,e){return Ir(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function $U(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const _i={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Vo;(function(r){r.pop="pop",r.push="push"})(Vo||(Vo={}));var Ro;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Ro||(Ro={}));function PU(r){if(!r)if(os){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),SU(r)}const RU=/^[^#]+#/;function CU(r,e){return r.replace(RU,"#")+e}function xU(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Yu=()=>({left:window.scrollX,top:window.scrollY});function qU(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=xU(n,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function jE(r,e){return(history.state?history.state.position-e:-1)+r}const sw=new Map;function AU(r,e){sw.set(r,e)}function DU(r){const e=sw.get(r);return sw.delete(r),e}let MU=()=>location.protocol+"//"+location.host;function Tz(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),BE(u,"")}return BE(t,r)+i+n}function NU(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=Tz(r,location),p=t.value,v=e.value;let w=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}w=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:w,type:Vo.pop,direction:w?w>0?Ro.forward:Ro.back:Ro.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ne({},h.state,{scroll:Yu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function zE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Yu():null}}function FU(r){const{history:e,location:t}=window,i={value:Tz(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:MU()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ne({},e.state,zE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ne({},n.value,e.state,{forward:u,scroll:Yu()});s(c.current,c,!0);const d=Ne({},zE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function kU(r){r=PU(r);const e=FU(r),t=NU(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ne({location:"",base:r,go:i,createHref:CU.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function BU(r){return typeof r=="string"||r&&typeof r=="object"}function $z(r){return typeof r=="string"||typeof r=="symbol"}const Pz=Symbol("");var HE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(HE||(HE={}));function Os(r,e){return Ne(new Error,{type:r,[Pz]:!0},e)}function Kr(r,e){return r instanceof Error&&Pz in r&&(e==null||!!(r.type&e))}const WE="[^/]+?",LU={sensitive:!1,strict:!1,start:!0,end:!0},jU=/[.+*?^${}()[\]/\\]/g;function zU(r,e){const t=Ne({},LU,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function Rz(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const WU={type:0,value:""},UU=/[a-zA-Z0-9_]/;function VU(r){if(!r)return[[]];if(r==="/")return[[WU]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(S)}:Po}function o(d){if($z(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=JU(d,t);t.splice(h,0,d),d.record.name&&!GE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,w;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Os(1,{location:d});w=f.record.name,p=Ne(VE(h.params,f.keys.filter(S=>!S.optional).concat(f.parent?f.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),d.params&&VE(d.params,f.keys.map(S=>S.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(S=>S.re.test(v)),f&&(p=f.parse(v),w=f.record.name);else{if(f=h.name?i.get(h.name):t.find(S=>S.re.test(h.path)),!f)throw Os(1,{location:d,currentLocation:h});w=f.record.name,p=Ne({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:w,path:v,params:p,matched:m,meta:XU(m)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function VE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function KE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:YU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function YU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function GE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function XU(r){return r.reduce((e,t)=>Ne(e,t.meta),{})}function YE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function JU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;Rz(r,e[s])<0?i=s:t=s+1}const n=QU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function QU(r){let e=r;for(;e=e.parent;)if(Cz(e)&&Rz(r,e)===0)return e}function Cz({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function ZU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&nw(s)):[i&&nw(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function eV(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=Ir(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const tV=Symbol(""),JE=Symbol(""),Hw=Symbol(""),xz=Symbol(""),ow=Symbol("");function lo(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function Ii(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(Os(4,{from:t,to:e})):h instanceof Error?u(h):BU(h)?u(Os(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function Vl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(bz(u)){const c=(u.__vccOpts||u)[e];c&&s.push(Ii(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=uU(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Ii(f,t,i,o,a,n)()}))}}return s}function QE(r){const e=Zr(Hw),t=Zr(xz),i=Er(()=>{const u=cr(r.to);return e.resolve(u)}),n=Er(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(Ss.bind(null,c));if(h>-1)return h;const f=ZE(u[l-2]);return l>1&&ZE(c)===f&&d[d.length-1].path!==f?d.findIndex(Ss.bind(null,u[l-2])):h}),s=Er(()=>n.value>-1&&oV(t.params,i.value.params)),o=Er(()=>n.value>-1&&n.value===t.matched.length-1&&Iz(t.params,i.value.params));function a(u={}){if(sV(u)){const l=e[cr(r.replace)?"replace":"push"](cr(r.to)).catch(Po);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:Er(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function rV(r){return r.length===1?r[0]:r}const iV=fr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:QE,setup(r,{slots:e}){const t=ju(QE(r)),{options:i}=Zr(Hw),n=Er(()=>({[eS(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[eS(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&rV(e.default(t));return r.custom?s:Gu("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),nV=iV;function sV(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function oV(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!Ir(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function ZE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const eS=(r,e,t)=>r??e??t,aV=fr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Zr(ow),n=Er(()=>r.route||i.value),s=Zr(JE,0),o=Er(()=>{let l=cr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=Er(()=>n.value.matched[o.value]);uu(JE,Er(()=>o.value+1)),uu(tV,a),uu(ow,n);const u=rt();return lu(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!Ss(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return tS(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,w=Gu(h,Ne({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return tS(t.default,{Component:w,route:l})||w}}});function tS(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const qz=aV;function uV(r){const e=GU(r.routes,r),t=r.parseQuery||ZU,i=r.stringifyQuery||XE,n=r.history,s=lo(),o=lo(),a=lo(),u=fW(_i);let l=_i;os&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Wl.bind(null,D=>""+D),d=Wl.bind(null,wU),h=Wl.bind(null,Uo);function f(D,W){let X,ne;return $z(D)?(X=e.getRecordMatcher(D),ne=W):ne=D,e.addRoute(ne,X)}function p(D){const W=e.getRecordMatcher(D);W&&e.removeRoute(W)}function v(){return e.getRoutes().map(D=>D.record)}function w(D){return!!e.getRecordMatcher(D)}function m(D,W){if(W=Ne({},W||u.value),typeof D=="string"){const q=Ul(t,D,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ne(q,F,{params:h(F.params),hash:Uo(q.hash),redirectedFrom:void 0,href:k})}let X;if(D.path!=null)X=Ne({},D,{path:Ul(t,D.path,W.path).path});else{const q=Ne({},D.params);for(const F in q)q[F]==null&&delete q[F];X=Ne({},D,{params:d(q)}),W.params=d(W.params)}const ne=e.resolve(X,W),Pe=D.hash||"";ne.params=c(h(ne.params));const C=OU(i,Ne({},D,{hash:yU(Pe),path:ne.path})),x=n.createHref(C);return Ne({fullPath:C,hash:Pe,query:i===XE?eV(D.query):D.query||{}},ne,{redirectedFrom:void 0,href:x})}function g(D){return typeof D=="string"?Ul(t,D,u.value.path):Ne({},D)}function S(D,W){if(l!==D)return Os(8,{from:W,to:D})}function y(D){return T(D)}function I(D){return y(Ne(g(D),{replace:!0}))}function O(D){const W=D.matched[D.matched.length-1];if(W&&W.redirect){const{redirect:X}=W;let ne=typeof X=="function"?X(D):X;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=g(ne):{path:ne},ne.params={}),Ne({query:D.query,hash:D.hash,params:ne.path!=null?{}:D.params},ne)}}function T(D,W){const X=l=m(D),ne=u.value,Pe=D.state,C=D.force,x=D.replace===!0,q=O(X);if(q)return T(Ne(g(q),{state:typeof q=="object"?Ne({},Pe,q.state):Pe,force:C,replace:x}),W||X);const F=X;F.redirectedFrom=W;let k;return!C&&IU(i,ne,X)&&(k=Os(16,{to:F,from:ne}),re(ne,ne,!0,!1)),(k?Promise.resolve(k):E(F,ne)).catch(N=>Kr(N)?Kr(N,2)?N:we(N):te(N,F,ne)).then(N=>{if(N){if(Kr(N,2))return T(Ne({replace:x},g(N.to),{state:typeof N.to=="object"?Ne({},Pe,N.to.state):Pe,force:C}),W||F)}else N=P(F,ne,!0,x,Pe);return $(F,ne,N),N})}function _(D,W){const X=S(D,W);return X?Promise.reject(X):Promise.resolve()}function b(D){const W=Ae.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(D):D()}function E(D,W){let X;const[ne,Pe,C]=lV(D,W);X=Vl(ne.reverse(),"beforeRouteLeave",D,W);for(const q of ne)q.leaveGuards.forEach(F=>{X.push(Ii(F,D,W))});const x=_.bind(null,D,W);return X.push(x),_e(X).then(()=>{X=[];for(const q of s.list())X.push(Ii(q,D,W));return X.push(x),_e(X)}).then(()=>{X=Vl(Pe,"beforeRouteUpdate",D,W);for(const q of Pe)q.updateGuards.forEach(F=>{X.push(Ii(F,D,W))});return X.push(x),_e(X)}).then(()=>{X=[];for(const q of C)if(q.beforeEnter)if(Ir(q.beforeEnter))for(const F of q.beforeEnter)X.push(Ii(F,D,W));else X.push(Ii(q.beforeEnter,D,W));return X.push(x),_e(X)}).then(()=>(D.matched.forEach(q=>q.enterCallbacks={}),X=Vl(C,"beforeRouteEnter",D,W,b),X.push(x),_e(X))).then(()=>{X=[];for(const q of o.list())X.push(Ii(q,D,W));return X.push(x),_e(X)}).catch(q=>Kr(q,8)?q:Promise.reject(q))}function $(D,W,X){a.list().forEach(ne=>b(()=>ne(D,W,X)))}function P(D,W,X,ne,Pe){const C=S(D,W);if(C)return C;const x=W===_i,q=os?history.state:{};X&&(ne||x?n.replace(D.fullPath,Ne({scroll:x&&q&&q.scroll},Pe)):n.push(D.fullPath,Pe)),u.value=D,re(D,W,X,x),we()}let R;function A(){R||(R=n.listen((D,W,X)=>{if(!ct.listening)return;const ne=m(D),Pe=O(ne);if(Pe){T(Ne(Pe,{replace:!0,force:!0}),ne).catch(Po);return}l=ne;const C=u.value;os&&AU(jE(C.fullPath,X.delta),Yu()),E(ne,C).catch(x=>Kr(x,12)?x:Kr(x,2)?(T(Ne(g(x.to),{force:!0}),ne).then(q=>{Kr(q,20)&&!X.delta&&X.type===Vo.pop&&n.go(-1,!1)}).catch(Po),Promise.reject()):(X.delta&&n.go(-X.delta,!1),te(x,ne,C))).then(x=>{x=x||P(ne,C,!1),x&&(X.delta&&!Kr(x,8)?n.go(-X.delta,!1):X.type===Vo.pop&&Kr(x,20)&&n.go(-1,!1)),$(ne,C,x)}).catch(Po)}))}let B=lo(),Z=lo(),H;function te(D,W,X){we(D);const ne=Z.list();return ne.length?ne.forEach(Pe=>Pe(D,W,X)):console.error(D),Promise.reject(D)}function pe(){return H&&u.value!==_i?Promise.resolve():new Promise((D,W)=>{B.add([D,W])})}function we(D){return H||(H=!D,A(),B.list().forEach(([W,X])=>D?X(D):W()),B.reset()),D}function re(D,W,X,ne){const{scrollBehavior:Pe}=r;if(!os||!Pe)return Promise.resolve();const C=!X&&DU(jE(D.fullPath,0))||(ne||!X)&&history.state&&history.state.scroll||null;return xj().then(()=>Pe(D,W,C)).then(x=>x&&qU(x)).catch(x=>te(x,D,W))}const me=D=>n.go(D);let xe;const Ae=new Set,ct={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:w,getRoutes:v,resolve:m,options:r,push:y,replace:I,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(D){const W=this;D.component("RouterLink",nV),D.component("RouterView",qz),D.config.globalProperties.$router=W,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>cr(u)}),os&&!xe&&u.value===_i&&(xe=!0,y(n.location).catch(Pe=>{}));const X={};for(const Pe in _i)Object.defineProperty(X,Pe,{get:()=>u.value[Pe],enumerable:!0});D.provide(Hw,W),D.provide(xz,Ij(X)),D.provide(ow,u);const ne=D.unmount;Ae.add(D),D.unmount=function(){Ae.delete(D),Ae.size<1&&(l=_i,R&&R(),R=null,u.value=_i,xe=!1,H=!1),ne()}}};function _e(D){return D.reduce((W,X)=>W.then(()=>b(X)),Promise.resolve())}return ct}function lV(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;oSs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>Ss(l,u))||n.push(u))}return[t,i,n]}const cV=fr({__name:"App",setup(r){return(e,t)=>(Me(),ui(cr(qz)))}}),dV=rt({width:200,margin:1,color:{dark:"#000000",light:"ffffff"}}),hV=r=>{const e=fV(r);pV(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},fV=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},rS=async()=>{try{const r=await fetch(di("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},vV=async r=>{try{const e=await fetch(di("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},gV=async()=>{try{const r=await fetch(di("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},mV=async()=>{try{const r=await fetch(di("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},yV=async()=>{try{const r=await fetch(di("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},bV=async(r,e)=>{try{const t=await fetch(di("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},iS=async()=>{try{const r=await fetch(di("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();hV(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},_V=async()=>{try{const r=await fetch(di("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},Kl=async(r,e)=>{try{const t=await fetch(di("/graph/nodes"),{method:"PUT",body:JSON.stringify({code:r,node:e})});if(!t.ok)throw new Error(`http error status: ${t.status}`);return await t.json()}catch(t){throw console.error("[apiDownloadQrCodesFile] error:",t),t}};function di(r){return"http://"+window.location.host.split(":")[0]+":8090"+r}var es={},Gl,nS;function wV(){return nS||(nS=1,Gl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Gl}var Yl={},wi={},sS;function qn(){if(sS)return wi;sS=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return wi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},wi.getSymbolTotalCodewords=function(i){return e[i]},wi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},wi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},wi.isKanjiModeEnabled=function(){return typeof r<"u"},wi.toSJIS=function(i){return r(i)},wi}var Xl={},oS;function Ww(){return oS||(oS=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Xl)),Xl}var Jl,aS;function EV(){if(aS)return Jl;aS=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Jl=r,Jl}var Ql,uS;function SV(){if(uS)return Ql;uS=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},Ql=r,Ql}var Zl={},lS;function OV(){return lS||(lS=1,function(r){const e=qn().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},ic=e,ic}var nc={},sc={},oc={},gS;function Dz(){return gS||(gS=1,oc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),oc}var xr={},mS;function Mz(){if(mS)return xr;mS=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r + */const os=typeof document<"u";function bz(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function uU(r){return r.__esModule||r[Symbol.toStringTag]==="Module"||r.default&&bz(r.default)}const Ne=Object.assign;function Wl(r,e){const t={};for(const i in e){const n=e[i];t[i]=Ir(n)?n.map(r):r(n)}return t}const Po=()=>{},Ir=Array.isArray,_z=/#/g,lU=/&/g,cU=/\//g,dU=/=/g,hU=/\?/g,wz=/\+/g,fU=/%5B/g,pU=/%5D/g,Ez=/%5E/g,vU=/%60/g,Sz=/%7B/g,gU=/%7C/g,Oz=/%7D/g,mU=/%20/g;function zw(r){return encodeURI(""+r).replace(gU,"|").replace(fU,"[").replace(pU,"]")}function yU(r){return zw(r).replace(Sz,"{").replace(Oz,"}").replace(Ez,"^")}function nw(r){return zw(r).replace(wz,"%2B").replace(mU,"+").replace(_z,"%23").replace(lU,"%26").replace(vU,"`").replace(Sz,"{").replace(Oz,"}").replace(Ez,"^")}function bU(r){return nw(r).replace(dU,"%3D")}function _U(r){return zw(r).replace(_z,"%23").replace(hU,"%3F")}function wU(r){return r==null?"":_U(r).replace(cU,"%2F")}function Uo(r){try{return decodeURIComponent(""+r)}catch{}return""+r}const EU=/\/$/,SU=r=>r.replace(EU,"");function Ul(r,e,t="/"){let i,n={},s="",o="";const a=e.indexOf("#");let u=e.indexOf("?");return a=0&&(u=-1),u>-1&&(i=e.slice(0,u),s=e.slice(u+1,a>-1?a:e.length),n=r(s)),a>-1&&(i=i||e.slice(0,a),o=e.slice(a,e.length)),i=$U(i??e,t),{fullPath:i+(s&&"?")+s+o,path:i,query:n,hash:Uo(o)}}function OU(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function BE(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function IU(r,e,t){const i=e.matched.length-1,n=t.matched.length-1;return i>-1&&i===n&&Ss(e.matched[i],t.matched[n])&&Iz(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function Ss(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function Iz(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!TU(r[t],e[t]))return!1;return!0}function TU(r,e){return Ir(r)?LE(r,e):Ir(e)?LE(e,r):r===e}function LE(r,e){return Ir(e)?r.length===e.length&&r.every((t,i)=>t===e[i]):r.length===1&&r[0]===e}function $U(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),i=r.split("/"),n=i[i.length-1];(n===".."||n===".")&&i.push("");let s=t.length-1,o,a;for(o=0;o1&&s--;else break;return t.slice(0,s).join("/")+"/"+i.slice(o).join("/")}const _i={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Vo;(function(r){r.pop="pop",r.push="push"})(Vo||(Vo={}));var Ro;(function(r){r.back="back",r.forward="forward",r.unknown=""})(Ro||(Ro={}));function PU(r){if(!r)if(os){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),SU(r)}const RU=/^[^#]+#/;function CU(r,e){return r.replace(RU,"#")+e}function xU(r,e){const t=document.documentElement.getBoundingClientRect(),i=r.getBoundingClientRect();return{behavior:e.behavior,left:i.left-t.left-(e.left||0),top:i.top-t.top-(e.top||0)}}const Yu=()=>({left:window.scrollX,top:window.scrollY});function qU(r){let e;if("el"in r){const t=r.el,i=typeof t=="string"&&t.startsWith("#"),n=typeof t=="string"?i?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!n)return;e=xU(n,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function jE(r,e){return(history.state?history.state.position-e:-1)+r}const sw=new Map;function AU(r,e){sw.set(r,e)}function DU(r){const e=sw.get(r);return sw.delete(r),e}let MU=()=>location.protocol+"//"+location.host;function Tz(r,e){const{pathname:t,search:i,hash:n}=e,s=r.indexOf("#");if(s>-1){let a=n.includes(r.slice(s))?r.slice(s).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),BE(u,"")}return BE(t,r)+i+n}function NU(r,e,t,i){let n=[],s=[],o=null;const a=({state:h})=>{const f=Tz(r,location),p=t.value,v=e.value;let w=0;if(h){if(t.value=f,e.value=h,o&&o===p){o=null;return}w=v?h.position-v.position:0}else i(f);n.forEach(m=>{m(t.value,p,{delta:w,type:Vo.pop,direction:w?w>0?Ro.forward:Ro.back:Ro.unknown})})};function u(){o=t.value}function l(h){n.push(h);const f=()=>{const p=n.indexOf(h);p>-1&&n.splice(p,1)};return s.push(f),f}function c(){const{history:h}=window;h.state&&h.replaceState(Ne({},h.state,{scroll:Yu()}),"")}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:l,destroy:d}}function zE(r,e,t,i=!1,n=!1){return{back:r,current:e,forward:t,replaced:i,position:window.history.length,scroll:n?Yu():null}}function FU(r){const{history:e,location:t}=window,i={value:Tz(r,t)},n={value:e.state};n.value||s(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(u,l,c){const d=r.indexOf("#"),h=d>-1?(t.host&&document.querySelector("base")?r:r.slice(d))+u:MU()+r+u;try{e[c?"replaceState":"pushState"](l,"",h),n.value=l}catch(f){console.error(f),t[c?"replace":"assign"](h)}}function o(u,l){const c=Ne({},e.state,zE(n.value.back,u,n.value.forward,!0),l,{position:n.value.position});s(u,c,!0),i.value=u}function a(u,l){const c=Ne({},n.value,e.state,{forward:u,scroll:Yu()});s(c.current,c,!0);const d=Ne({},zE(i.value,u,null),{position:c.position+1},l);s(u,d,!1),i.value=u}return{location:i,state:n,push:a,replace:o}}function kU(r){r=PU(r);const e=FU(r),t=NU(r,e.state,e.location,e.replace);function i(s,o=!0){o||t.pauseListeners(),history.go(s)}const n=Ne({location:"",base:r,go:i,createHref:CU.bind(null,r)},e,t);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>e.state.value}),n}function BU(r){return typeof r=="string"||r&&typeof r=="object"}function $z(r){return typeof r=="string"||typeof r=="symbol"}const Pz=Symbol("");var HE;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(HE||(HE={}));function Os(r,e){return Ne(new Error,{type:r,[Pz]:!0},e)}function Kr(r,e){return r instanceof Error&&Pz in r&&(e==null||!!(r.type&e))}const WE="[^/]+?",LU={sensitive:!1,strict:!1,start:!0,end:!0},jU=/[.+*?^${}()[\]/\\]/g;function zU(r,e){const t=Ne({},LU,e),i=[];let n=t.start?"^":"";const s=[];for(const l of r){const c=l.length?[]:[90];t.strict&&!l.length&&(n+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function Rz(r,e){let t=0;const i=r.score,n=e.score;for(;t0&&e[e.length-1]<0}const WU={type:0,value:""},UU=/[a-zA-Z0-9_]/;function VU(r){if(!r)return[[]];if(r==="/")return[[WU]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,i=t;const n=[];let s;function o(){s&&n.push(s),s=[]}let a=0,u,l="",c="";function d(){l&&(t===0?s.push({type:0,value:l}):t===1||t===2||t===3?(s.length>1&&(u==="*"||u==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=u}for(;a{o(S)}:Po}function o(d){if($z(d)){const h=i.get(d);h&&(i.delete(d),t.splice(t.indexOf(h),1),h.children.forEach(o),h.alias.forEach(o))}else{const h=t.indexOf(d);h>-1&&(t.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return t}function u(d){const h=JU(d,t);t.splice(h,0,d),d.record.name&&!GE(d)&&i.set(d.record.name,d)}function l(d,h){let f,p={},v,w;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Os(1,{location:d});w=f.record.name,p=Ne(VE(h.params,f.keys.filter(S=>!S.optional).concat(f.parent?f.parent.keys.filter(S=>S.optional):[]).map(S=>S.name)),d.params&&VE(d.params,f.keys.map(S=>S.name))),v=f.stringify(p)}else if(d.path!=null)v=d.path,f=t.find(S=>S.re.test(v)),f&&(p=f.parse(v),w=f.record.name);else{if(f=h.name?i.get(h.name):t.find(S=>S.re.test(h.path)),!f)throw Os(1,{location:d,currentLocation:h});w=f.record.name,p=Ne({},h.params,d.params),v=f.stringify(p)}const m=[];let g=f;for(;g;)m.unshift(g.record),g=g.parent;return{name:w,path:v,params:p,matched:m,meta:XU(m)}}r.forEach(d=>s(d));function c(){t.length=0,i.clear()}return{addRoute:s,resolve:l,removeRoute:o,clearRoutes:c,getRoutes:a,getRecordMatcher:n}}function VE(r,e){const t={};for(const i of e)i in r&&(t[i]=r[i]);return t}function KE(r){const e={path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:r.aliasOf,beforeEnter:r.beforeEnter,props:YU(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function YU(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const i in r.components)e[i]=typeof t=="object"?t[i]:t;return e}function GE(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function XU(r){return r.reduce((e,t)=>Ne(e,t.meta),{})}function YE(r,e){const t={};for(const i in r)t[i]=i in e?e[i]:r[i];return t}function JU(r,e){let t=0,i=e.length;for(;t!==i;){const s=t+i>>1;Rz(r,e[s])<0?i=s:t=s+1}const n=QU(r);return n&&(i=e.lastIndexOf(n,i-1)),i}function QU(r){let e=r;for(;e=e.parent;)if(Cz(e)&&Rz(r,e)===0)return e}function Cz({record:r}){return!!(r.name||r.components&&Object.keys(r.components).length||r.redirect)}function ZU(r){const e={};if(r===""||r==="?")return e;const i=(r[0]==="?"?r.slice(1):r).split("&");for(let n=0;ns&&nw(s)):[i&&nw(i)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function eV(r){const e={};for(const t in r){const i=r[t];i!==void 0&&(e[t]=Ir(i)?i.map(n=>n==null?null:""+n):i==null?i:""+i)}return e}const tV=Symbol(""),JE=Symbol(""),Hw=Symbol(""),xz=Symbol(""),ow=Symbol("");function lo(){let r=[];function e(i){return r.push(i),()=>{const n=r.indexOf(i);n>-1&&r.splice(n,1)}}function t(){r=[]}return{add:e,list:()=>r.slice(),reset:t}}function Ii(r,e,t,i,n,s=o=>o()){const o=i&&(i.enterCallbacks[n]=i.enterCallbacks[n]||[]);return()=>new Promise((a,u)=>{const l=h=>{h===!1?u(Os(4,{from:t,to:e})):h instanceof Error?u(h):BU(h)?u(Os(2,{from:e,to:h})):(o&&i.enterCallbacks[n]===o&&typeof h=="function"&&o.push(h),a())},c=s(()=>r.call(i&&i.instances[n],e,t,l));let d=Promise.resolve(c);r.length<3&&(d=d.then(l)),d.catch(h=>u(h))})}function Vl(r,e,t,i,n=s=>s()){const s=[];for(const o of r)for(const a in o.components){let u=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(bz(u)){const c=(u.__vccOpts||u)[e];c&&s.push(Ii(c,t,i,o,a,n))}else{let l=u();s.push(()=>l.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=uU(c)?c.default:c;o.mods[a]=c,o.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Ii(f,t,i,o,a,n)()}))}}return s}function QE(r){const e=Zr(Hw),t=Zr(xz),i=Er(()=>{const u=cr(r.to);return e.resolve(u)}),n=Er(()=>{const{matched:u}=i.value,{length:l}=u,c=u[l-1],d=t.matched;if(!c||!d.length)return-1;const h=d.findIndex(Ss.bind(null,c));if(h>-1)return h;const f=ZE(u[l-2]);return l>1&&ZE(c)===f&&d[d.length-1].path!==f?d.findIndex(Ss.bind(null,u[l-2])):h}),s=Er(()=>n.value>-1&&oV(t.params,i.value.params)),o=Er(()=>n.value>-1&&n.value===t.matched.length-1&&Iz(t.params,i.value.params));function a(u={}){if(sV(u)){const l=e[cr(r.replace)?"replace":"push"](cr(r.to)).catch(Po);return r.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>l),l}return Promise.resolve()}return{route:i,href:Er(()=>i.value.href),isActive:s,isExactActive:o,navigate:a}}function rV(r){return r.length===1?r[0]:r}const iV=fr({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:QE,setup(r,{slots:e}){const t=ju(QE(r)),{options:i}=Zr(Hw),n=Er(()=>({[eS(r.activeClass,i.linkActiveClass,"router-link-active")]:t.isActive,[eS(r.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&rV(e.default(t));return r.custom?s:Gu("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:n.value},s)}}}),nV=iV;function sV(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function oV(r,e){for(const t in e){const i=e[t],n=r[t];if(typeof i=="string"){if(i!==n)return!1}else if(!Ir(n)||n.length!==i.length||i.some((s,o)=>s!==n[o]))return!1}return!0}function ZE(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const eS=(r,e,t)=>r??e??t,aV=fr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const i=Zr(ow),n=Er(()=>r.route||i.value),s=Zr(JE,0),o=Er(()=>{let l=cr(s);const{matched:c}=n.value;let d;for(;(d=c[l])&&!d.components;)l++;return l}),a=Er(()=>n.value.matched[o.value]);uu(JE,Er(()=>o.value+1)),uu(tV,a),uu(ow,n);const u=rt();return lu(()=>[u.value,a.value,r.name],([l,c,d],[h,f,p])=>{c&&(c.instances[d]=l,f&&f!==c&&l&&l===h&&(c.leaveGuards.size||(c.leaveGuards=f.leaveGuards),c.updateGuards.size||(c.updateGuards=f.updateGuards))),l&&c&&(!f||!Ss(c,f)||!h)&&(c.enterCallbacks[d]||[]).forEach(v=>v(l))},{flush:"post"}),()=>{const l=n.value,c=r.name,d=a.value,h=d&&d.components[c];if(!h)return tS(t.default,{Component:h,route:l});const f=d.props[c],p=f?f===!0?l.params:typeof f=="function"?f(l):f:null,w=Gu(h,Ne({},p,e,{onVnodeUnmounted:m=>{m.component.isUnmounted&&(d.instances[c]=null)},ref:u}));return tS(t.default,{Component:w,route:l})||w}}});function tS(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const qz=aV;function uV(r){const e=GU(r.routes,r),t=r.parseQuery||ZU,i=r.stringifyQuery||XE,n=r.history,s=lo(),o=lo(),a=lo(),u=fW(_i);let l=_i;os&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Wl.bind(null,D=>""+D),d=Wl.bind(null,wU),h=Wl.bind(null,Uo);function f(D,W){let X,ne;return $z(D)?(X=e.getRecordMatcher(D),ne=W):ne=D,e.addRoute(ne,X)}function p(D){const W=e.getRecordMatcher(D);W&&e.removeRoute(W)}function v(){return e.getRoutes().map(D=>D.record)}function w(D){return!!e.getRecordMatcher(D)}function m(D,W){if(W=Ne({},W||u.value),typeof D=="string"){const q=Ul(t,D,W.path),F=e.resolve({path:q.path},W),k=n.createHref(q.fullPath);return Ne(q,F,{params:h(F.params),hash:Uo(q.hash),redirectedFrom:void 0,href:k})}let X;if(D.path!=null)X=Ne({},D,{path:Ul(t,D.path,W.path).path});else{const q=Ne({},D.params);for(const F in q)q[F]==null&&delete q[F];X=Ne({},D,{params:d(q)}),W.params=d(W.params)}const ne=e.resolve(X,W),Pe=D.hash||"";ne.params=c(h(ne.params));const C=OU(i,Ne({},D,{hash:yU(Pe),path:ne.path})),x=n.createHref(C);return Ne({fullPath:C,hash:Pe,query:i===XE?eV(D.query):D.query||{}},ne,{redirectedFrom:void 0,href:x})}function g(D){return typeof D=="string"?Ul(t,D,u.value.path):Ne({},D)}function S(D,W){if(l!==D)return Os(8,{from:W,to:D})}function y(D){return T(D)}function I(D){return y(Ne(g(D),{replace:!0}))}function O(D){const W=D.matched[D.matched.length-1];if(W&&W.redirect){const{redirect:X}=W;let ne=typeof X=="function"?X(D):X;return typeof ne=="string"&&(ne=ne.includes("?")||ne.includes("#")?ne=g(ne):{path:ne},ne.params={}),Ne({query:D.query,hash:D.hash,params:ne.path!=null?{}:D.params},ne)}}function T(D,W){const X=l=m(D),ne=u.value,Pe=D.state,C=D.force,x=D.replace===!0,q=O(X);if(q)return T(Ne(g(q),{state:typeof q=="object"?Ne({},Pe,q.state):Pe,force:C,replace:x}),W||X);const F=X;F.redirectedFrom=W;let k;return!C&&IU(i,ne,X)&&(k=Os(16,{to:F,from:ne}),re(ne,ne,!0,!1)),(k?Promise.resolve(k):E(F,ne)).catch(N=>Kr(N)?Kr(N,2)?N:we(N):te(N,F,ne)).then(N=>{if(N){if(Kr(N,2))return T(Ne({replace:x},g(N.to),{state:typeof N.to=="object"?Ne({},Pe,N.to.state):Pe,force:C}),W||F)}else N=P(F,ne,!0,x,Pe);return $(F,ne,N),N})}function _(D,W){const X=S(D,W);return X?Promise.reject(X):Promise.resolve()}function b(D){const W=Ae.values().next().value;return W&&typeof W.runWithContext=="function"?W.runWithContext(D):D()}function E(D,W){let X;const[ne,Pe,C]=lV(D,W);X=Vl(ne.reverse(),"beforeRouteLeave",D,W);for(const q of ne)q.leaveGuards.forEach(F=>{X.push(Ii(F,D,W))});const x=_.bind(null,D,W);return X.push(x),_e(X).then(()=>{X=[];for(const q of s.list())X.push(Ii(q,D,W));return X.push(x),_e(X)}).then(()=>{X=Vl(Pe,"beforeRouteUpdate",D,W);for(const q of Pe)q.updateGuards.forEach(F=>{X.push(Ii(F,D,W))});return X.push(x),_e(X)}).then(()=>{X=[];for(const q of C)if(q.beforeEnter)if(Ir(q.beforeEnter))for(const F of q.beforeEnter)X.push(Ii(F,D,W));else X.push(Ii(q.beforeEnter,D,W));return X.push(x),_e(X)}).then(()=>(D.matched.forEach(q=>q.enterCallbacks={}),X=Vl(C,"beforeRouteEnter",D,W,b),X.push(x),_e(X))).then(()=>{X=[];for(const q of o.list())X.push(Ii(q,D,W));return X.push(x),_e(X)}).catch(q=>Kr(q,8)?q:Promise.reject(q))}function $(D,W,X){a.list().forEach(ne=>b(()=>ne(D,W,X)))}function P(D,W,X,ne,Pe){const C=S(D,W);if(C)return C;const x=W===_i,q=os?history.state:{};X&&(ne||x?n.replace(D.fullPath,Ne({scroll:x&&q&&q.scroll},Pe)):n.push(D.fullPath,Pe)),u.value=D,re(D,W,X,x),we()}let R;function A(){R||(R=n.listen((D,W,X)=>{if(!ct.listening)return;const ne=m(D),Pe=O(ne);if(Pe){T(Ne(Pe,{replace:!0,force:!0}),ne).catch(Po);return}l=ne;const C=u.value;os&&AU(jE(C.fullPath,X.delta),Yu()),E(ne,C).catch(x=>Kr(x,12)?x:Kr(x,2)?(T(Ne(g(x.to),{force:!0}),ne).then(q=>{Kr(q,20)&&!X.delta&&X.type===Vo.pop&&n.go(-1,!1)}).catch(Po),Promise.reject()):(X.delta&&n.go(-X.delta,!1),te(x,ne,C))).then(x=>{x=x||P(ne,C,!1),x&&(X.delta&&!Kr(x,8)?n.go(-X.delta,!1):X.type===Vo.pop&&Kr(x,20)&&n.go(-1,!1)),$(ne,C,x)}).catch(Po)}))}let B=lo(),Z=lo(),H;function te(D,W,X){we(D);const ne=Z.list();return ne.length?ne.forEach(Pe=>Pe(D,W,X)):console.error(D),Promise.reject(D)}function pe(){return H&&u.value!==_i?Promise.resolve():new Promise((D,W)=>{B.add([D,W])})}function we(D){return H||(H=!D,A(),B.list().forEach(([W,X])=>D?X(D):W()),B.reset()),D}function re(D,W,X,ne){const{scrollBehavior:Pe}=r;if(!os||!Pe)return Promise.resolve();const C=!X&&DU(jE(D.fullPath,0))||(ne||!X)&&history.state&&history.state.scroll||null;return xj().then(()=>Pe(D,W,C)).then(x=>x&&qU(x)).catch(x=>te(x,D,W))}const me=D=>n.go(D);let xe;const Ae=new Set,ct={currentRoute:u,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:w,getRoutes:v,resolve:m,options:r,push:y,replace:I,go:me,back:()=>me(-1),forward:()=>me(1),beforeEach:s.add,beforeResolve:o.add,afterEach:a.add,onError:Z.add,isReady:pe,install(D){const W=this;D.component("RouterLink",nV),D.component("RouterView",qz),D.config.globalProperties.$router=W,Object.defineProperty(D.config.globalProperties,"$route",{enumerable:!0,get:()=>cr(u)}),os&&!xe&&u.value===_i&&(xe=!0,y(n.location).catch(Pe=>{}));const X={};for(const Pe in _i)Object.defineProperty(X,Pe,{get:()=>u.value[Pe],enumerable:!0});D.provide(Hw,W),D.provide(xz,Ij(X)),D.provide(ow,u);const ne=D.unmount;Ae.add(D),D.unmount=function(){Ae.delete(D),Ae.size<1&&(l=_i,R&&R(),R=null,u.value=_i,xe=!1,H=!1),ne()}}};function _e(D){return D.reduce((W,X)=>W.then(()=>b(X)),Promise.resolve())}return ct}function lV(r,e){const t=[],i=[],n=[],s=Math.max(e.matched.length,r.matched.length);for(let o=0;oSs(l,a))?i.push(a):t.push(a));const u=r.matched[o];u&&(e.matched.find(l=>Ss(l,u))||n.push(u))}return[t,i,n]}const cV=fr({__name:"App",setup(r){return(e,t)=>(Me(),ui(cr(qz)))}}),dV=rt({width:200,margin:1,color:{dark:"#000000",light:"ffffff"}}),hV=r=>{const e=fV(r);pV(e,"teams_qr_code.pdf","application/pdf;teams_qr_code.pdf")},fV=r=>{const e=atob(r),t=new Uint8Array(e.length);for(let i=0;i{const i=new Blob([r],{type:t}),n=URL.createObjectURL(i),s=document.createElement("a");s.href=n,s.download=e,s.click(),URL.revokeObjectURL(n)},rS=async()=>{try{const r=await fetch(di("/teams"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetTeams] error:",r),r}},vV=async r=>{try{const e=await fetch(di("/teams"),{method:"POST",body:JSON.stringify({teams:[{name:r}]})});if(!e.ok)throw new Error(`http error status: ${e.status}`)}catch(e){throw console.error("[apiAddTeam] error:",e),e}},gV=async()=>{try{const r=await fetch(di("/game"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiGetGame] error:",r),r}},mV=async()=>{try{const r=await fetch(di("/game/start"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStartGame] error:",r),r}},yV=async()=>{try{const r=await fetch(di("/game/stop"),{method:"POST"});if(!r.ok)throw new Error(`http error status: ${r.status}`)}catch(r){throw console.error("[apiStopGame] error:",r),r}},bV=async(r,e)=>{try{const t=await fetch(di("/teams/"+r+"/applications"),{method:"POST",body:JSON.stringify({applications:[{id:e}]})});if(!t.ok)throw new Error(`http error status: ${t.status}`)}catch(t){throw console.error("[apiGaveApplication] error:",t),t}},iS=async()=>{try{const r=await fetch(di("/teams/pdf"));if(!r.ok)throw new Error(`http error status: ${r.status}`);const e=await r.json();hV(e.result)}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},_V=async()=>{try{const r=await fetch(di("/graph"));if(!r.ok)throw new Error(`http error status: ${r.status}`);return await r.json()}catch(r){throw console.error("[apiDownloadQrCodesFile] error:",r),r}},Kl=async(r,e)=>{try{const t=await fetch(di("/graph/nodes"),{method:"PUT",body:JSON.stringify({code:r,node:e})});if(!t.ok)throw new Error(`http error status: ${t.status}`);return await t.json()}catch(t){throw console.error("[apiDownloadQrCodesFile] error:",t),t}};function di(r){return"https://evening-detective-api.crabs-games.art"+r}var es={},Gl,nS;function wV(){return nS||(nS=1,Gl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Gl}var Yl={},wi={},sS;function qn(){if(sS)return wi;sS=1;let r;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return wi.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},wi.getSymbolTotalCodewords=function(i){return e[i]},wi.getBCHDigit=function(t){let i=0;for(;t!==0;)i++,t>>>=1;return i},wi.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');r=i},wi.isKanjiModeEnabled=function(){return typeof r<"u"},wi.toSJIS=function(i){return r(i)},wi}var Xl={},oS;function Ww(){return oS||(oS=1,function(r){r.L={bit:1},r.M={bit:0},r.Q={bit:3},r.H={bit:2};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return r.L;case"m":case"medium":return r.M;case"q":case"quartile":return r.Q;case"h":case"high":return r.H;default:throw new Error("Unknown EC Level: "+t)}}r.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},r.from=function(i,n){if(r.isValid(i))return i;try{return e(i)}catch{return n}}}(Xl)),Xl}var Jl,aS;function EV(){if(aS)return Jl;aS=1;function r(){this.buffer=[],this.length=0}return r.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},Jl=r,Jl}var Ql,uS;function SV(){if(uS)return Ql;uS=1;function r(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return r.prototype.set=function(e,t,i,n){const s=e*this.size+t;this.data[s]=i,n&&(this.reservedBit[s]=!0)},r.prototype.get=function(e,t){return this.data[e*this.size+t]},r.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i},r.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},Ql=r,Ql}var Zl={},lS;function OV(){return lS||(lS=1,function(r){const e=qn().getSymbolSize;r.getRowColCoords=function(i){if(i===1)return[];const n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7];for(let u=1;u=0&&n<=7},r.from=function(n){return r.isValid(n)?parseInt(n,10):void 0},r.getPenaltyN1=function(n){const s=n.size;let o=0,a=0,u=0,l=null,c=null;for(let d=0;d=5&&(o+=e.N1+(a-5)),l=f,a=1),f=n.get(h,d),f===c?u++:(u>=5&&(o+=e.N1+(u-5)),c=f,u=1)}a>=5&&(o+=e.N1+(a-5)),u>=5&&(o+=e.N1+(u-5))}return o},r.getPenaltyN2=function(n){const s=n.size;let o=0;for(let a=0;a=10&&(a===1488||a===93)&&o++,u=u<<1&2047|n.get(c,l),c>=10&&(u===1488||u===93)&&o++}return o*e.N3},r.getPenaltyN4=function(n){let s=0;const o=n.data.length;for(let u=0;u=0;){const o=s[0];for(let u=0;u0){const a=new Uint8Array(this.degree);return a.set(s,o),a}return s},ic=e,ic}var nc={},sc={},oc={},gS;function Dz(){return gS||(gS=1,oc.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),oc}var xr={},mS;function Mz(){if(mS)return xr;mS=1;const r="[0-9]+",e="[A-Z $%*+\\-./:]+";let t="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";t=t.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+t+`)(?:.|[\r ]))+`;xr.KANJI=new RegExp(t,"g"),xr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),xr.BYTE=new RegExp(i,"g"),xr.NUMERIC=new RegExp(r,"g"),xr.ALPHANUMERIC=new RegExp(e,"g");const n=new RegExp("^"+t+"$"),s=new RegExp("^"+r+"$"),o=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return xr.testKanji=function(u){return n.test(u)},xr.testNumeric=function(u){return s.test(u)},xr.testAlphanumeric=function(u){return o.test(u)},xr}var yS;function An(){return yS||(yS=1,function(r){const e=Dz(),t=Mz();r.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},r.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},r.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},r.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},r.MIXED={bit:-1},r.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},r.getBestModeForData=function(s){return t.testNumeric(s)?r.NUMERIC:t.testAlphanumeric(s)?r.ALPHANUMERIC:t.testKanji(s)?r.KANJI:r.BYTE},r.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},r.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return r.NUMERIC;case"alphanumeric":return r.ALPHANUMERIC;case"kanji":return r.KANJI;case"byte":return r.BYTE;default:throw new Error("Unknown mode: "+n)}}r.from=function(s,o){if(r.isValid(s))return s;try{return i(s)}catch{return o}}}(sc)),sc}var bS;function CV(){return bS||(bS=1,function(r){const e=qn(),t=Az(),i=Ww(),n=An(),s=Dz(),o=7973,a=e.getBCHDigit(o);function u(h,f,p){for(let v=1;v<=40;v++)if(f<=r.getCapacity(v,p,h))return v}function l(h,f){return n.getCharCountIndicator(h,f)+4}function c(h,f){let p=0;return h.forEach(function(v){const w=l(v.mode,f);p+=w+v.getBitsLength()}),p}function d(h,f){for(let p=1;p<=40;p++)if(c(h,p)<=r.getCapacity(p,f,n.MIXED))return p}r.from=function(f,p){return s.isValid(f)?parseInt(f,10):p},r.getCapacity=function(f,p,v){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof v>"u"&&(v=n.BYTE);const w=e.getSymbolTotalCodewords(f),m=t.getTotalCodewordsCount(f,p),g=(w-m)*8;if(v===n.MIXED)return g;const S=g-l(v,f);switch(v){case n.NUMERIC:return Math.floor(S/10*3);case n.ALPHANUMERIC:return Math.floor(S/11*2);case n.KANJI:return Math.floor(S/13);case n.BYTE:default:return Math.floor(S/8)}},r.getBestVersionForData=function(f,p){let v;const w=i.from(p,i.M);if(Array.isArray(f)){if(f.length>1)return d(f,w);if(f.length===0)return 1;v=f[0]}else v=f;return u(v.mode,v.getLength(),w)},r.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let p=f<<12;for(;e.getBCHDigit(p)-a>=0;)p^=o<=0;)u^=e<0&&(s=this.data.substr(n),o=parseInt(s,10),i.put(o,a*3+1))},lc=e,lc}var cc,ES;function AV(){if(ES)return cc;ES=1;const r=An(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function t(i){this.mode=r.ALPHANUMERIC,this.data=i}return t.getBitsLength=function(n){return 11*Math.floor(n/2)+6*(n%2)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){let s;for(s=0;s+2<=this.data.length;s+=2){let o=e.indexOf(this.data[s])*45;o+=e.indexOf(this.data[s+1]),n.put(o,11)}this.data.length%2&&n.put(e.indexOf(this.data[s]),6)},cc=t,cc}var dc,SS;function DV(){if(SS)return dc;SS=1;const r=An();function e(t){this.mode=r.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(t){for(let i=0,n=this.data.length;i=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[n]+` Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),i.put(s,13)}},hc=t,hc}var fc={exports:{}},IS;function NV(){return IS||(IS=1,function(r){var e={single_source_shortest_paths:function(t,i,n){var s={},o={};o[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var u,l,c,d,h,f,p,v,w;!a.empty();){u=a.pop(),l=u.value,d=u.cost,h=t[l]||{};for(c in h)h.hasOwnProperty(c)&&(f=h[c],p=d+f,v=o[c],w=typeof o[c]>"u",(w||v>p)&&(o[c]=p,a.push(c,p),s[c]=l))}if(typeof n<"u"&&typeof o[n]>"u"){var m=["Could not find a path from ",i," to ",n,"."].join("");throw new Error(m)}return s},extract_shortest_path_from_predecessor_list:function(t,i){for(var n=[],s=i;s;)n.push(s),t[s],s=t[s];return n.reverse(),n},find_path:function(t,i,n){var s=e.single_source_shortest_paths(t,i,n);return e.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(t){var i=e.PriorityQueue,n={},s;t=t||{};for(s in i)i.hasOwnProperty(s)&&(n[s]=i[s]);return n.queue=[],n.sorter=t.sorter||i.default_sorter,n},default_sorter:function(t,i){return t.cost-i.cost},push:function(t,i){var n={value:t,cost:i};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};r.exports=e}(fc)),fc.exports}var TS;function FV(){return TS||(TS=1,function(r){const e=An(),t=qV(),i=AV(),n=DV(),s=MV(),o=Mz(),a=qn(),u=NV();function l(m){return unescape(encodeURIComponent(m)).length}function c(m,g,S){const y=[];let I;for(;(I=m.exec(S))!==null;)y.push({data:I[0],index:I.index,mode:g,length:I[0].length});return y}function d(m){const g=c(o.NUMERIC,e.NUMERIC,m),S=c(o.ALPHANUMERIC,e.ALPHANUMERIC,m);let y,I;return a.isKanjiModeEnabled()?(y=c(o.BYTE,e.BYTE,m),I=c(o.KANJI,e.KANJI,m)):(y=c(o.BYTE_KANJI,e.BYTE,m),I=[]),g.concat(S,y,I).sort(function(T,_){return T.index-_.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function h(m,g){switch(g){case e.NUMERIC:return t.getBitsLength(m);case e.ALPHANUMERIC:return i.getBitsLength(m);case e.KANJI:return s.getBitsLength(m);case e.BYTE:return n.getBitsLength(m)}}function f(m){return m.reduce(function(g,S){const y=g.length-1>=0?g[g.length-1]:null;return y&&y.mode===S.mode?(g[g.length-1].data+=S.data,g):(g.push(S),g)},[])}function p(m){const g=[];for(let S=0;S=0&&R<=6&&(A===0||A===6)||A>=0&&A<=6&&(R===0||R===6)||R>=2&&R<=4&&A>=2&&A<=4?O.set($+R,P+A,!0,!0):O.set($+R,P+A,!1,!0))}}function p(O){const T=O.size;for(let _=8;_>R&1)===1,O.set(E,$,P,!0),O.set($,E,P,!0)}function m(O,T,_){const b=O.size,E=c.getEncodedBits(T,_);let $,P;for($=0;$<15;$++)P=(E>>$&1)===1,$<6?O.set($,8,P,!0):$<8?O.set($+1,8,P,!0):O.set(b-15+$,8,P,!0),$<8?O.set(8,b-$-1,P,!0):$<9?O.set(8,15-$-1+1,P,!0):O.set(8,15-$-1,P,!0);O.set(b-8,8,1,!0)}function g(O,T){const _=O.size;let b=-1,E=_-1,$=7,P=0;for(let R=_-1;R>0;R-=2)for(R===6&&R--;;){for(let A=0;A<2;A++)if(!O.isReserved(E,R-A)){let B=!1;P>>$&1)===1),O.set(E,R-A,B),$--,$===-1&&(P++,$=7)}if(E+=b,E<0||_<=E){E-=b,b=-b;break}}}function S(O,T,_){const b=new t;_.forEach(function(A){b.put(A.mode.bit,4),b.put(A.getLength(),d.getCharCountIndicator(A.mode,O)),A.write(b)});const E=r.getSymbolTotalCodewords(O),$=a.getTotalCodewordsCount(O,T),P=(E-$)*8;for(b.getLengthInBits()+4<=P&&b.put(0,4);b.getLengthInBits()%8!==0;)b.putBit(0);const R=(P-b.getLengthInBits())/8;for(let A=0;A