Add Web App settings to the API Server panel

Mirror the PocketBase settings card with a superadmin-only Web App
section: it edits the Web App base URL (the address /api/status already
probed) and the CORS allowed origins, applying both at runtime and
persisting them to .env so they survive a restart.

The CORS middleware previously built its allow-list once, when Handler()
was constructed, so an edited origin list would not have taken effect
until a restart — which would have made the new field quietly lie. Move
the lookup into a per-request originAllowed helper reading under the
existing lock. Verified behaviour is unchanged: an allowed origin still
gets the headers plus Vary: Origin, an unknown origin gets none, and
preflight still returns 204.

PUT rejects an empty origin list rather than silently keeping the old
one, since an empty list would lock out every browser client.

The authenticated round trip (loading and saving real settings) is not
verified here — it needs a superadmin login.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 4.8 committed 2026-07-17 12:09:52 +02:00
1 parent 21c99ad762
commit 98acd7d121
8 files changed
+309 -42

No files matched your search

+4 -2
View File
@@ -19,10 +19,12 @@ POCKETBASE_ADMIN_EMAIL=
POCKETBASE_ADMIN_PASSWORD=
# CORS allowed origins for browser clients (comma separated, or * for any).
# Native mobile apps are not subject to CORS.
# Native mobile apps are not subject to CORS. Editable at runtime from the panel
# (Web App section), which writes the change back into this file.
CORS_ALLOW_ORIGINS=http://localhost:5173
# Web App address, probed by GET /api/status and shown on the panel.
# Web App address, probed by GET /api/status and shown on the panel. Editable at
# runtime from the panel (Web App section).
WEBAPP_URL=http://localhost:5173
# PocketBase auth collection holding app users (default: users).
-17
View File
@@ -1,17 +0,0 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function on(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const J={},xt=[],He=()=>{},ui=()=>!1,xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),de=Object.assign,rn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},wo=Object.prototype.hasOwnProperty,W=(e,t)=>wo.call(e,t),U=Array.isArray,wt=e=>Zt(e)==="[object Map]",At=e=>Zt(e)==="[object Set]",$n=e=>Zt(e)==="[object Date]",H=e=>typeof e=="function",ee=e=>typeof e=="string",Ve=e=>typeof e=="symbol",z=e=>e!==null&&typeof e=="object",fi=e=>(z(e)||H(e))&&H(e.then)&&H(e.catch),di=Object.prototype.toString,Zt=e=>di.call(e),So=e=>Zt(e).slice(8,-1),pi=e=>Zt(e)==="[object Object]",ln=e=>ee(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=on(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ss=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},To=/-\w/g,Ce=Ss(e=>e.replace(To,t=>t.slice(1).toUpperCase())),Co=/\B([A-Z])/g,rt=Ss(e=>e.replace(Co,"-$1").toLowerCase()),hi=Ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=Ss(e=>e?`on${hi(e)}`:""),Ne=(e,t)=>!Object.is(e,t),us=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},gi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let An;const Cs=()=>An||(An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function an(e){if(U(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=ee(n)?$o(n):an(n);if(i)for(const o in i)t[o]=i[o]}return t}else if(ee(e)||z(e))return e}const Eo=/;(?![^(]*\))/g,ko=/:([^]+)/,Po=/\/\*[^]*?\*\//g;function $o(e){const t={};return e.replace(Po,"").split(Eo).forEach(s=>{if(s){const n=s.split(ko);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function je(e){let t="";if(ee(e))t=e;else if(U(e))for(let s=0;s<e.length;s++){const n=je(e[s]);n&&(t+=n+" ")}else if(z(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ao="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Oo=on(Ao);function mi(e){return!!e||e===""}function Mo(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=nt(e[n],t[n]);return s}function nt(e,t){if(e===t)return!0;let s=$n(e),n=$n(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Ve(e),n=Ve(t),s||n)return e===t;if(s=U(e),n=U(t),s||n)return s&&n?Mo(e,t):!1;if(s=z(e),n=z(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const r in e){const l=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(l&&!a||!l&&a||!nt(e[r],t[r]))return!1}}return String(e)===String(t)}function cn(e,t){return e.findIndex(s=>nt(s,t))}const bi=e=>!!(e&&e.__v_isRef===!0),D=e=>ee(e)?e:e==null?"":U(e)||z(e)&&(e.toString===di||!H(e.toString))?bi(e)?D(e.value):JSON.stringify(e,vi,2):String(e),vi=(e,t)=>bi(t)?vi(e,t.value):wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ds(n,o)+" =>"]=i,s),{})}:At(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ds(s))}:Ve(t)?Ds(t):z(t)&&!U(t)&&!pi(t)?String(t):t,Ds=(e,t="")=>{var s;return Ve(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let re;class Ro{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&re&&(re.active?(this.parent=re,this.index=(re.scopes||(re.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!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=re;try{return re=this,t()}finally{re=s}}}on(){++this._on===1&&(this.prevScope=re,re=this)}off(){if(this._on>0&&--this._on===0){if(re===this)re=this.prevScope;else{let t=re;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.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 i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Io(){return re}let X;const Fs=new WeakSet;class _i{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,re&&(re.active?re.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fs.has(this)&&(Fs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,On(this),wi(this);const t=X,s=Ee;X=this,Ee=!0;try{return this.fn()}finally{Si(this),X=t,Ee=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,On(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let yi=0,Ht,Vt;function xi(e,t=!1){if(e.flags|=8,t){e.next=Vt,Vt=e;return}e.next=Ht,Ht=e}function un(){yi++}function fn(){if(--yi>0)return;if(Vt){let t=Vt;for(Vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ht;){let t=Ht;for(Ht=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 wi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Si(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),dn(n),Do(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ti(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ti(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gt)||(e.globalVersion=Gt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=X,n=Ee;X=e,Ee=!0;try{wi(e);const i=e.fn(e._value);(t.version===0||Ne(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{X=s,Ee=n,Si(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.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)dn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Do(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ee=!0;const Ci=[];function Be(){Ci.push(Ee),Ee=!1}function Ke(){const e=Ci.pop();Ee=e===void 0?!0:e}function On(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=X;X=void 0;try{t()}finally{X=s}}}let Gt=0;class Fo{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 pn{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(!X||!Ee||X===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==X)s=this.activeLink=new Fo(X,this),X.deps?(s.prevDep=X.depsTail,X.depsTail.nextDep=s,X.depsTail=s):X.deps=X.depsTail=s,Ei(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=X.depsTail,s.nextDep=void 0,X.depsTail.nextDep=s,X.depsTail=s,X.deps===s&&(X.deps=n)}return s}trigger(t){this.version++,Gt++,this.notify(t)}Line truncated
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Qt(e,t,s,n){try{return n?e(...n):e()}catch(i){ks(i,t,s)}}function Pe(e,t,s,n){if(H(e)){const i=Qt(e,t,s,n);return i&&fi(i)&&i.catch(o=>{ks(o,t,s)}),i}if(U(e)){const i=[];for(let o=0;o<e.length;o++)i.push(Pe(e[o],t,s,n));return i}}function ks(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||J;if(t){let l=t.parent;const a=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const u=l.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,a,p)===!1)return}l=l.parent}if(o){Be(),Qt(o,null,10,[e,a,p]),Ke();return}}lr(e,s,i,n,r)}function lr(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const ge=[];let Fe=-1;const St=[];let st=null,yt=0;const Ii=Promise.resolve();let hs=null;function Di(e){const t=hs||Ii;return e?t.then(this?e.bind(this):e):t}function ar(e){let t=Fe+1,s=ge.length;for(;t<s;){const n=t+s>>>1,i=ge[n],o=Jt(i);o<e||o===e&&i.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=Jt(e),s=ge[ge.length-1];!s||!(e.flags&2)&&t>=Jt(s)?ge.push(e):ge.splice(ar(t),0,e),e.flags|=1,Fi()}}function Fi(){hs||(hs=Ii.then(Ui))}function cr(e){U(e)?St.push(...e):st&&e.id===-1?st.splice(yt+1,0,e):e.flags&1||(St.push(e),e.flags|=1),Fi()}function Rn(e,t,s=Fe+1){for(;s<ge.length;s++){const n=ge[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;ge.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Li(e){if(St.length){const t=[...new Set(St)].sort((s,n)=>Jt(s)-Jt(n));if(St.length=0,st){st.push(...t);return}for(st=t,yt=0;yt<st.length;yt++){const s=st[yt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}st=null,yt=0}}const Jt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ui(e){try{for(Fe=0;Fe<ge.length;Fe++){const t=ge[Fe];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Fe<ge.length;Fe++){const t=ge[Fe];t&&(t.flags&=-2)}Fe=-1,ge.length=0,Li(),hs=null,(ge.length||St.length)&&Ui()}}let xe=null,Ni=null;function gs(e){const t=xe;return xe=e,Ni=e&&e.type.__scopeId||null,t}function ur(e,t=xe,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&Kn(-1);const o=gs(t);let r;try{r=e(...i)}finally{gs(o),n._d&&Kn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function ue(e,t){if(xe===null)return e;const s=Os(xe),n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,r,l,a=J]=t[i];o&&(H(o)&&(o={mounted:o,updated:o}),o.deep&&Je(r),n.push({dir:o,instance:s,value:r,oldValue:void 0,arg:l,modifiers:a}))}return e}function ut(e,t,s,n){const i=e.dirs,o=t&&t.dirs;for(let r=0;r<i.length;r++){const l=i[r];o&&(l.oldValue=o[r].value);let a=l.dir[n];a&&(Be(),Pe(a,s,8,[e.el,l,e,t]),Ke())}}function fr(e,t){if(me){let s=me.provides;const n=me.parent&&me.parent.provides;n===s&&(s=me.provides=Object.create(n)),s[e]=t}}function fs(e,t,s=!1){const n=al();if(n||Tt){let i=Tt?Tt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&H(t)?t.call(n&&n.proxy):t}}const dr=Symbol.for("v-scx"),pr=()=>fs(dr);function Ns(e,t,s){return Hi(e,t,s)}function Hi(e,t,s=J){const{immediate:n,deep:i,flush:o,once:r}=s,l=de({},s),a=t&&n||!t&&o!=="post";let p;if(Xt){if(o==="sync"){const $=pr();p=$.__watcherHandles||($.__watcherHandles=[])}else if(!a){const $=()=>{};return $.stop=He,$.resume=He,$.pause=He,$}}const u=me;l.call=($,F,y)=>Pe($,u,F,y);let h=!1;o==="post"?l.scheduler=$=>{be($,u&&u.suspense)}:o!=="sync"&&(h=!0,l.scheduler=($,F)=>{F?$():bn($)}),l.augmentJob=$=>{t&&($.flags|=4),h&&($.flags|=2,u&&($.id=u.uid,$.i=u))};const T=rr(e,t,l);return Xt&&(p?p.push(T):a&&T()),T}function hr(e,t,s){const n=this.proxy,i=ee(e)?e.includes(".")?Vi(n,e):()=>n[e]:e.bind(n,n);let o;H(t)?o=t:(o=t.handler,s=t);const r=es(this),l=Hi(i,o.bind(n),s);return r(),l}function Vi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const gr=Symbol("_vte"),mr=e=>e.__isTeleport,Hs=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(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 ji(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function In(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ms=new WeakMap;function jt(e,t,s,n,i=!1){if(U(e)){e.forEach((y,S)=>jt(y,t&&(U(t)?t[S]:t),s,n,i));return}if(Bt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&jt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Os(n.component):n.el,r=i?null:o,{i:l,r:a}=e,p=t&&t.r,u=l.refs===J?l.refs={}:l.refs,h=l.setupState,T=K(h),$=h===J?ui:y=>In(u,y)?!1:W(T,y),F=(y,S)=>!(S&&In(u,S));if(p!=null&&p!==a){if(Dn(t),ee(p))u[p]=null,$(p)&&(h[p]=null);else if(fe(p)){const y=t;F(p,y.k)&&(p.value=null),y.k&&(u[y.k]=null)}}if(H(a)){Be();try{Qt(a,l,12,[r,u])}finally{Ke()}}else{const y=ee(a),S=fe(a);if(y||S){const x=()=>{if(e.f){con Line truncated
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let sn;const zn=typeof window<"u"&&window.trustedTypes;if(zn)try{sn=zn.createPolicy("vue",{createHTML:e=>e})}catch{}const ho=sn?e=>sn.createHTML(e):e=>e,gl="http://www.w3.org/2000/svg",ml="http://www.w3.org/1998/Math/MathML",Ge=typeof document<"u"?document:null,qn=Ge&&Ge.createElement("template"),bl={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 i=t==="svg"?Ge.createElementNS(gl,e):t==="mathml"?Ge.createElementNS(ml,e):s?Ge.createElement(e,{is:s}):Ge.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Ge.createTextNode(e),createComment:e=>Ge.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ge.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{qn.innerHTML=ho(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=qn.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[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vl=Symbol("_vtc");function _l(e,t,s){const n=e[vl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Jn=Symbol("_vod"),yl=Symbol("_vsh"),xl=Symbol(""),wl=/(?:^|;)\s*display\s*:/;function Sl(e,t,s){const n=e.style,i=ee(s);let o=!1;if(s&&!i){if(t)if(ee(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&Ut(n,l,"")}else for(const r in t)s[r]==null&&Ut(n,r,"");for(const r in s){r==="display"&&(o=!0);const l=s[r];l!=null?Cl(e,r,!ee(t)&&t?t[r]:void 0,l)||Ut(n,r,l):Ut(n,r,"")}}else if(i){if(t!==s){const r=n[xl];r&&(s+=";"+r),n.cssText=s,o=wl.test(s)}}else t&&e.removeAttribute("style");Jn in e&&(e[Jn]=o?n.display:"",e[yl]&&(n.display="none"))}const Yn=/\s*!important$/;function Ut(e,t,s){if(U(s))s.forEach(n=>Ut(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tl(e,t);Yn.test(s)?e.setProperty(rt(n),s.replace(Yn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],Ks={};function Tl(e,t){const s=Ks[t];if(s)return s;let n=Ce(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=hi(n);for(let i=0;i<Xn.length;i++){const o=Xn[i]+n;if(o in e)return Ks[t]=o}return t}function Cl(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ee(n)&&s===n}const Zn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,i,o=Oo(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zn,t.slice(6,t.length)):e.setAttributeNS(Zn,t,s):s==null||o&&!mi(s)?e.removeAttribute(t):e.setAttribute(t,o?"":Ve(s)?String(s):s)}function ei(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?ho(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 r=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=mi(s):s==null&&l==="string"?(s="",r=!0):l==="number"&&(s=0,r=!0)}try{e[t]=s}catch{}r&&e.removeAttribute(i||t)}function Ye(e,t,s,n){e.addEventListener(t,s,n)}function El(e,t,s,n){e.removeEventListener(t,s,n)}const ti=Symbol("_vei");function kl(e,t,s,n,i=null){const o=e[ti]||(e[ti]={}),r=o[t];if(n&&r)r.value=n;else{const[l,a]=Al(t);if(n){const p=o[t]=Rl(n,i);Ye(e,l,p,a)}else r&&(El(e,l,r,a),o[t]=void 0)}}const Pl=/(Once|Passive|Capture)$/,$l=/^on:?(?:Once|Passive|Capture)$/;function Al(e){let t,s;for(;(s=e.match(Pl))&&!$l.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):rt(e.slice(2)),t]}let Ws=0;const Ol=Promise.resolve(),Ml=()=>Ws||(Ol.then(()=>Ws=0),Ws=Date.now());function Rl(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(U(i)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const r=i.slice(),l=[n];for(let a=0;a<r.length&&!n._stopped;a++){const p=r[a];p&&Pe(p,t,5,l)}}else Pe(i,t,5,[n])};return s.value=e,s.attached=Ml(),s}const si=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Il=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?_l(e,n,r):t==="style"?Sl(e,s,n):xs(t)?ws(t)||kl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dl(e,t,n,r))?(ei(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,r,o,t!=="value")):e._isVueCE&&(Fl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ee(n)))?ei(e,Ce(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._fals Line truncated
+17
View File
@@ -0,0 +1,17 @@
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function s(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(i){if(i.ep)return;i.ep=!0;const l=s(i);fetch(i.href,l)}})();/**
* @vue/shared v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ln(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const J={},xt=[],He=()=>{},ui=()=>!1,xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),pe=Object.assign,on=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},xl=Object.prototype.hasOwnProperty,W=(e,t)=>xl.call(e,t),U=Array.isArray,wt=e=>Zt(e)==="[object Map]",At=e=>Zt(e)==="[object Set]",Pn=e=>Zt(e)==="[object Date]",V=e=>typeof e=="function",te=e=>typeof e=="string",Be=e=>typeof e=="symbol",z=e=>e!==null&&typeof e=="object",fi=e=>(z(e)||V(e))&&V(e.then)&&V(e.catch),di=Object.prototype.toString,Zt=e=>di.call(e),wl=e=>Zt(e).slice(8,-1),pi=e=>Zt(e)==="[object Object]",rn=e=>te(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=ln(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ss=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},Sl=/-\w/g,Ee=Ss(e=>e.replace(Sl,t=>t.slice(1).toUpperCase())),Tl=/\B([A-Z])/g,rt=Ss(e=>e.replace(Tl,"-$1").toLowerCase()),hi=Ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),Is=Ss(e=>e?`on${hi(e)}`:""),Ve=(e,t)=>!Object.is(e,t),us=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},gi=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Ts=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let An;const Cs=()=>An||(An=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function an(e){if(U(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],i=te(n)?$l(n):an(n);if(i)for(const l in i)t[l]=i[l]}return t}else if(te(e)||z(e))return e}const Cl=/;(?![^(]*\))/g,El=/:([^]+)/,kl=/\/\*[^]*?\*\//g;function $l(e){const t={};return e.replace(kl,"").split(Cl).forEach(s=>{if(s){const n=s.split(El);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function $e(e){let t="";if(te(e))t=e;else if(U(e))for(let s=0;s<e.length;s++){const n=$e(e[s]);n&&(t+=n+" ")}else if(z(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Pl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Al=ln(Pl);function mi(e){return!!e||e===""}function Ol(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=it(e[n],t[n]);return s}function it(e,t){if(e===t)return!0;let s=Pn(e),n=Pn(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=Be(e),n=Be(t),s||n)return e===t;if(s=U(e),n=U(t),s||n)return s&&n?Ol(e,t):!1;if(s=z(e),n=z(t),s||n){if(!s||!n)return!1;const i=Object.keys(e).length,l=Object.keys(t).length;if(i!==l)return!1;for(const o in e){const r=e.hasOwnProperty(o),a=t.hasOwnProperty(o);if(r&&!a||!r&&a||!it(e[o],t[o]))return!1}}return String(e)===String(t)}function cn(e,t){return e.findIndex(s=>it(s,t))}const bi=e=>!!(e&&e.__v_isRef===!0),I=e=>te(e)?e:e==null?"":U(e)||z(e)&&(e.toString===di||!V(e.toString))?bi(e)?I(e.value):JSON.stringify(e,vi,2):String(e),vi=(e,t)=>bi(t)?vi(e,t.value):wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],l)=>(s[Ds(n,l)+" =>"]=i,s),{})}:At(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ds(s))}:Be(t)?Ds(t):z(t)&&!U(t)&&!pi(t)?String(t):t,Ds=(e,t="")=>{var s;return Be(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/**
* @vue/reactivity v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let re;class Rl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&re&&(re.active?(this.parent=re,this.index=(re.scopes||(re.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!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=re;try{return re=this,t()}finally{re=s}}}on(){++this._on===1&&(this.prevScope=re,re=this)}off(){if(this._on>0&&--this._on===0){if(re===this)re=this.prevScope;else{let t=re;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.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 i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Ml(){return re}let X;const Fs=new WeakSet;class _i{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,re&&(re.active?re.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Fs.has(this)&&(Fs.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,On(this),wi(this);const t=X,s=ke;X=this,ke=!0;try{return this.fn()}finally{Si(this),X=t,ke=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)dn(t);this.deps=this.depsTail=void 0,On(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Fs.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Gs(this)&&this.run()}get dirty(){return Gs(this)}}let yi=0,jt,Vt;function xi(e,t=!1){if(e.flags|=8,t){e.next=Vt,Vt=e;return}e.next=jt,jt=e}function un(){yi++}function fn(){if(--yi>0)return;if(Vt){let t=Vt;for(Vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;jt;){let t=jt;for(jt=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 wi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Si(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),dn(n),Il(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ti(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ti(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gt)||(e.globalVersion=Gt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=X,n=ke;X=e,ke=!0;try{wi(e);const i=e.fn(e._value);(t.version===0||Ve(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{X=s,ke=n,Si(e),e.flags&=-3}}function dn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let l=s.computed.deps;l;l=l.nextDep)dn(l,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Il(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ke=!0;const Ci=[];function Ke(){Ci.push(ke),ke=!1}function We(){const e=Ci.pop();ke=e===void 0?!0:e}function On(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=X;X=void 0;try{t()}finally{X=s}}}let Gt=0;class Dl{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 pn{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(!X||!ke||X===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==X)s=this.activeLink=new Dl(X,this),X.deps?(s.prevDep=X.depsTail,X.depsTail.nextDep=s,X.depsTail=s):X.deps=X.depsTail=s,Ei(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=X.depsTail,s.nextDep=void 0,X.depsTail.nextDep=s,X.depsTail=s,X.deps===s&&(X.deps=n)}return s}trigger(t){this.version++,Gt++,this.notify(t)}Line truncated
* @vue/runtime-core v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Qt(e,t,s,n){try{return n?e(...n):e()}catch(i){ks(i,t,s)}}function Ae(e,t,s,n){if(V(e)){const i=Qt(e,t,s,n);return i&&fi(i)&&i.catch(l=>{ks(l,t,s)}),i}if(U(e)){const i=[];for(let l=0;l<e.length;l++)i.push(Ae(e[l],t,s,n));return i}}function ks(e,t,s,n=!0){const i=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||J;if(t){let r=t.parent;const a=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const u=r.ec;if(u){for(let h=0;h<u.length;h++)if(u[h](e,a,p)===!1)return}r=r.parent}if(l){Ke(),Qt(l,null,10,[e,a,p]),We();return}}oo(e,s,i,n,o)}function oo(e,t,s,n=!0,i=!1){if(i)throw e;console.error(e)}const me=[];let Ue=-1;const St=[];let nt=null,yt=0;const Ii=Promise.resolve();let hs=null;function Di(e){const t=hs||Ii;return e?t.then(this?e.bind(this):e):t}function ro(e){let t=Ue+1,s=me.length;for(;t<s;){const n=t+s>>>1,i=me[n],l=Jt(i);l<e||l===e&&i.flags&2?t=n+1:s=n}return t}function bn(e){if(!(e.flags&1)){const t=Jt(e),s=me[me.length-1];!s||!(e.flags&2)&&t>=Jt(s)?me.push(e):me.splice(ro(t),0,e),e.flags|=1,Fi()}}function Fi(){hs||(hs=Ii.then(Ui))}function ao(e){U(e)?St.push(...e):nt&&e.id===-1?nt.splice(yt+1,0,e):e.flags&1||(St.push(e),e.flags|=1),Fi()}function Mn(e,t,s=Ue+1){for(;s<me.length;s++){const n=me[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;me.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Li(e){if(St.length){const t=[...new Set(St)].sort((s,n)=>Jt(s)-Jt(n));if(St.length=0,nt){nt.push(...t);return}for(nt=t,yt=0;yt<nt.length;yt++){const s=nt[yt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}nt=null,yt=0}}const Jt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Ui(e){try{for(Ue=0;Ue<me.length;Ue++){const t=me[Ue];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Qt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ue<me.length;Ue++){const t=me[Ue];t&&(t.flags&=-2)}Ue=-1,me.length=0,Li(),hs=null,(me.length||St.length)&&Ui()}}let xe=null,Ni=null;function gs(e){const t=xe;return xe=e,Ni=e&&e.type.__scopeId||null,t}function co(e,t=xe,s){if(!t||e._n)return e;const n=(...i)=>{n._d&&Kn(-1);const l=gs(t);let o;try{o=e(...i)}finally{gs(l),n._d&&Kn(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(xe===null)return e;const s=Os(xe),n=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[l,o,r,a=J]=t[i];l&&(V(l)&&(l={mounted:l,updated:l}),l.deep&&Ye(o),n.push({dir:l,instance:s,value:o,oldValue:void 0,arg:r,modifiers:a}))}return e}function dt(e,t,s,n){const i=e.dirs,l=t&&t.dirs;for(let o=0;o<i.length;o++){const r=i[o];l&&(r.oldValue=l[o].value);let a=r.dir[n];a&&(Ke(),Ae(a,s,8,[e.el,r,e,t]),We())}}function uo(e,t){if(be){let s=be.provides;const n=be.parent&&be.parent.provides;n===s&&(s=be.provides=Object.create(n)),s[e]=t}}function fs(e,t,s=!1){const n=ar();if(n||Tt){let i=Tt?Tt._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&V(t)?t.call(n&&n.proxy):t}}const fo=Symbol.for("v-scx"),po=()=>fs(fo);function Ns(e,t,s){return ji(e,t,s)}function ji(e,t,s=J){const{immediate:n,deep:i,flush:l,once:o}=s,r=pe({},s),a=t&&n||!t&&l!=="post";let p;if(Xt){if(l==="sync"){const x=po();p=x.__watcherHandles||(x.__watcherHandles=[])}else if(!a){const x=()=>{};return x.stop=He,x.resume=He,x.pause=He,x}}const u=be;r.call=(x,D,S)=>Ae(x,u,D,S);let h=!1;l==="post"?r.scheduler=x=>{ve(x,u&&u.suspense)}:l!=="sync"&&(h=!0,r.scheduler=(x,D)=>{D?x():bn(x)}),r.augmentJob=x=>{t&&(x.flags|=4),h&&(x.flags|=2,u&&(x.id=u.uid,x.i=u))};const b=lo(e,t,r);return Xt&&(p?p.push(b):a&&b()),b}function ho(e,t,s){const n=this.proxy,i=te(e)?e.includes(".")?Vi(n,e):()=>n[e]:e.bind(n,n);let l;V(t)?l=t:(l=t.handler,s=t);const o=es(this),r=ji(i,l.bind(n),s);return o(),r}function Vi(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;i<s.length&&n;i++)n=n[s[i]];return n}}const go=Symbol("_vte"),mo=e=>e.__isTeleport,js=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(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 Hi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function In(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ms=new WeakMap;function Ht(e,t,s,n,i=!1){if(U(e)){e.forEach((S,C)=>Ht(S,t&&(U(t)?t[C]:t),s,n,i));return}if(Bt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ht(e,t,s,n.component.subTree);return}const l=n.shapeFlag&4?Os(n.component):n.el,o=i?null:l,{i:r,r:a}=e,p=t&&t.r,u=r.refs===J?r.refs={}:r.refs,h=r.setupState,b=K(h),x=h===J?ui:S=>In(u,S)?!1:W(b,S),D=(S,C)=>!(C&&In(u,C));if(p!=null&&p!==a){if(Dn(t),te(p))u[p]=null,x(p)&&(h[p]=null);else if(fe(p)){const S=t;D(p,S.k)&&(p.value=null),S.k&&(u[S.k]=null)}}if(V(a)){Ke();try{Qt(a,r,12,[o,u])}finally{We()}}else{const S=te(a),C=fe(a);if(S||C){const T=()=>{if(e.f){con Line truncated
* @vue/runtime-dom v3.5.39
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let sn;const zn=typeof window<"u"&&window.trustedTypes;if(zn)try{sn=zn.createPolicy("vue",{createHTML:e=>e})}catch{}const pl=sn?e=>sn.createHTML(e):e=>e,gr="http://www.w3.org/2000/svg",mr="http://www.w3.org/1998/Math/MathML",ze=typeof document<"u"?document:null,qn=ze&&ze.createElement("template"),br={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 i=t==="svg"?ze.createElementNS(gr,e):t==="mathml"?ze.createElementNS(mr,e):s?ze.createElement(e,{is:s}):ze.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},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,i,l){const o=s?s.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===l||!(i=i.nextSibling)););else{qn.innerHTML=pl(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const r=qn.content;if(n==="svg"||n==="mathml"){const a=r.firstChild;for(;a.firstChild;)r.appendChild(a.firstChild);r.removeChild(a)}t.insertBefore(r,s)}return[o?o.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},vr=Symbol("_vtc");function _r(e,t,s){const n=e[vr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Jn=Symbol("_vod"),yr=Symbol("_vsh"),xr=Symbol(""),wr=/(?:^|;)\s*display\s*:/;function Sr(e,t,s){const n=e.style,i=te(s);let l=!1;if(s&&!i){if(t)if(te(t))for(const o of t.split(";")){const r=o.slice(0,o.indexOf(":")).trim();s[r]==null&&Ut(n,r,"")}else for(const o in t)s[o]==null&&Ut(n,o,"");for(const o in s){o==="display"&&(l=!0);const r=s[o];r!=null?Cr(e,o,!te(t)&&t?t[o]:void 0,r)||Ut(n,o,r):Ut(n,o,"")}}else if(i){if(t!==s){const o=n[xr];o&&(s+=";"+o),n.cssText=s,l=wr.test(s)}}else t&&e.removeAttribute("style");Jn in e&&(e[Jn]=l?n.display:"",e[yr]&&(n.display="none"))}const Yn=/\s*!important$/;function Ut(e,t,s){if(U(s))s.forEach(n=>Ut(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Tr(e,t);Yn.test(s)?e.setProperty(rt(n),s.replace(Yn,""),"important"):e[n]=s}}const Xn=["Webkit","Moz","ms"],Ks={};function Tr(e,t){const s=Ks[t];if(s)return s;let n=Ee(t);if(n!=="filter"&&n in e)return Ks[t]=n;n=hi(n);for(let i=0;i<Xn.length;i++){const l=Xn[i]+n;if(l in e)return Ks[t]=l}return t}function Cr(e,t,s,n){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&te(n)&&s===n}const Zn="http://www.w3.org/1999/xlink";function Qn(e,t,s,n,i,l=Al(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Zn,t.slice(6,t.length)):e.setAttributeNS(Zn,t,s):s==null||l&&!mi(s)?e.removeAttribute(t):e.setAttribute(t,l?"":Be(s)?String(s):s)}function ei(e,t,s,n,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?pl(s):s);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const r=l==="OPTION"?e.getAttribute("value")||"":e.value,a=s==null?e.type==="checkbox"?"on":"":String(s);(r!==a||!("_value"in e))&&(e.value=a),s==null&&e.removeAttribute(t),e._value=s;return}let o=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=mi(s):s==null&&r==="string"?(s="",o=!0):r==="number"&&(s=0,o=!0)}try{e[t]=s}catch{}o&&e.removeAttribute(i||t)}function Xe(e,t,s,n){e.addEventListener(t,s,n)}function Er(e,t,s,n){e.removeEventListener(t,s,n)}const ti=Symbol("_vei");function kr(e,t,s,n,i=null){const l=e[ti]||(e[ti]={}),o=l[t];if(n&&o)o.value=n;else{const[r,a]=Ar(t);if(n){const p=l[t]=Mr(n,i);Xe(e,r,p,a)}else o&&(Er(e,r,o,a),l[t]=void 0)}}const $r=/(Once|Passive|Capture)$/,Pr=/^on:?(?:Once|Passive|Capture)$/;function Ar(e){let t,s;for(;(s=e.match($r))&&!Pr.test(e);)t||(t={}),e=e.slice(0,e.length-s[1].length),t[s[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):rt(e.slice(2)),t]}let Ws=0;const Or=Promise.resolve(),Rr=()=>Ws||(Or.then(()=>Ws=0),Ws=Date.now());function Mr(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(U(i)){const l=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{l.call(n),n._stopped=!0};const o=i.slice(),r=[n];for(let a=0;a<o.length&&!n._stopped;a++){const p=o[a];p&&Ae(p,t,5,r)}}else Ae(i,t,5,[n])};return s.value=e,s.attached=Rr(),s}const si=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ir=(e,t,s,n,i,l)=>{const o=i==="svg";t==="class"?_r(e,n,o):t==="style"?Sr(e,s,n):xs(t)?ws(t)||kr(e,t,s,n,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dr(e,t,n,o))?(ei(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qn(e,t,n,o,l,t!=="value")):e._isVueCE&&(Fr(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!te(n)))?ei(e,Ee(t),n,l,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._fals Line truncated
+1 -1
View File
@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#2563eb" />
<title>DriverVault · API Server</title>
<script type="module" crossorigin src="/assets/index-DKHgRvVM.js"></script>
<script type="module" crossorigin src="/assets/index-OENR1RVj.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-i1JZk1ZM.css">
</head>
<body>
+49 -14
View File
@@ -37,6 +37,8 @@
// # superadmin
// GET /api/admin/pb-config PUT /api/admin/pb-config
// POST /api/admin/pb-config/test
// GET /api/admin/webapp-config PUT /api/admin/webapp-config
// POST /api/admin/webapp-config/test
// GET /api/admin/plugins POST /api/admin/plugins
// GET /api/admin/plugins/{name} PUT /api/admin/plugins/{name}
// DELETE /api/admin/plugins/{name} POST /api/admin/plugins/{name}/health
@@ -157,6 +159,22 @@ func (s *Server) webAppURL() string {
return s.cfg.WebAppURL
}
// webAppSettings snapshots the Web App settings for the settings endpoints.
func (s *Server) webAppSettings() (url string, allowOrigins []string) {
s.mu.RLock()
defer s.mu.RUnlock()
return s.cfg.WebAppURL, append([]string(nil), s.cfg.AllowOrigins...)
}
// setWebAppConfig applies new Web App settings at runtime. The CORS middleware
// reads the origin list per request, so the new list is live immediately.
func (s *Server) setWebAppConfig(url string, allowOrigins []string) {
s.mu.Lock()
defer s.mu.Unlock()
s.cfg.WebAppURL = url
s.cfg.AllowOrigins = append([]string(nil), allowOrigins...)
}
// pbSettings snapshots the PocketBase connection for the settings endpoints.
func (s *Server) pbSettings() (url, adminEmail, adminPassword string) {
s.mu.RLock()
@@ -234,6 +252,12 @@ func (s *Server) Handler() http.Handler {
mux.HandleFunc("POST /api/admin/pb-config/test", s.requireSuperadminAuth(s.handleTestPBConfig))
mux.HandleFunc("PUT /api/admin/pb-config", s.requireSuperadminAuth(s.handleUpdatePBConfig))
// Web App settings — superadmin only. Where the Web App lives (probed by
// /api/status) and which browser origins CORS admits.
mux.HandleFunc("GET /api/admin/webapp-config", s.requireSuperadminAuth(s.handleGetWebAppConfig))
mux.HandleFunc("POST /api/admin/webapp-config/test", s.requireSuperadminAuth(s.handleTestWebAppConfig))
mux.HandleFunc("PUT /api/admin/webapp-config", s.requireSuperadminAuth(s.handleUpdateWebAppConfig))
// Plugins — external-service integrations, managed by a superadmin.
mux.HandleFunc("GET /api/admin/plugins", s.requireSuperadminAuth(s.handleListPlugins))
mux.HandleFunc("POST /api/admin/plugins", s.requireSuperadminAuth(s.handleRegisterPlugin))
@@ -351,26 +375,37 @@ func (s *Server) recoverer(next http.Handler) http.Handler {
})
}
func (s *Server) cors(next http.Handler) http.Handler {
allowed := map[string]bool{}
wildcard := false
// originAllowed reports whether origin may call this server, and whether it was
// the wildcard that allowed it. The allow-list is consulted per request rather
// than captured once, so editing it from the panel takes effect without a
// restart.
func (s *Server) originAllowed(origin string) (allowed, wildcard bool) {
s.mu.RLock()
defer s.mu.RUnlock()
for _, o := range s.cfg.AllowOrigins {
if o == "*" {
wildcard = true
return true, true
}
if o == origin {
allowed = true
}
allowed[o] = true
}
return allowed, false
}
func (s *Server) cors(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
origin := r.Header.Get("Origin")
if origin != "" && (wildcard || allowed[origin]) {
if wildcard {
w.Header().Set("Access-Control-Allow-Origin", "*")
} else {
w.Header().Set("Access-Control-Allow-Origin", origin)
w.Header().Add("Vary", "Origin")
if origin := r.Header.Get("Origin"); origin != "" {
if allowed, wildcard := s.originAllowed(origin); allowed {
if wildcard {
w.Header().Set("Access-Control-Allow-Origin", "*")
} else {
w.Header().Set("Access-Control-Allow-Origin", origin)
w.Header().Add("Vary", "Origin")
}
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PATCH, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type")
}
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PATCH, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Authorization, Content-Type")
}
if r.Method == http.MethodOptions {
w.WriteHeader(http.StatusNoContent)
+104 -4
View File
@@ -55,8 +55,8 @@ func probePB(ctx context.Context, url, email, password string) pbProbe {
return p
}
// normalizePBURL trims, defaults the scheme to http, and drops a trailing slash.
func normalizePBURL(u string) string {
// normalizeURL trims, defaults the scheme to http, and drops a trailing slash.
func normalizeURL(u string) string {
u = strings.TrimSpace(u)
if u == "" {
return ""
@@ -95,7 +95,7 @@ type pbConfigBody struct {
// keep-current semantics for blank fields.
func (s *Server) resolve(b pbConfigBody) (url, email, password string) {
curURL, curEmail, curPassword := s.pbSettings()
url = normalizePBURL(b.URL)
url = normalizeURL(b.URL)
if url == "" {
url = curURL
}
@@ -130,7 +130,7 @@ func (s *Server) handleUpdatePBConfig(w http.ResponseWriter, r *http.Request) {
writeError(w, http.StatusBadRequest, "invalid json")
return
}
if normalizePBURL(b.URL) == "" {
if normalizeURL(b.URL) == "" {
writeError(w, http.StatusBadRequest, "a PocketBase URL is required")
return
}
@@ -157,3 +157,103 @@ func (s *Server) handleUpdatePBConfig(w http.ResponseWriter, r *http.Request) {
"config": viewFor(r.Context(), url, email, password),
})
}
// webAppConfigView is the Web App shape returned to the panel: where the Web App
// lives (the address /api/status probes) and which browser origins CORS lets
// call this server.
type webAppConfigView struct {
URL string `json:"url"`
AllowOrigins []string `json:"allowOrigins"`
Probe svcHealth `json:"probe"`
}
// webAppViewFor builds the panel's Web App view, including a live probe.
func webAppViewFor(ctx context.Context, url string, origins []string) webAppConfigView {
return webAppConfigView{
URL: url,
AllowOrigins: origins,
Probe: probe(ctx, url+"/healthz"),
}
}
// GET /api/admin/webapp-config — current Web App settings + a live probe.
func (s *Server) handleGetWebAppConfig(w http.ResponseWriter, r *http.Request) {
url, origins := s.webAppSettings()
writeJSON(w, http.StatusOK, webAppViewFor(r.Context(), url, origins))
}
// webAppConfigBody is the editable Web App payload. A blank url means "keep the
// current one"; allowOrigins is taken as sent (it is a complete list, not a
// patch), so it may only be omitted, never emptied.
type webAppConfigBody struct {
URL string `json:"url"`
AllowOrigins []string `json:"allowOrigins"`
}
// POST /api/admin/webapp-config/test — probe a candidate Web App address WITHOUT
// applying it. CORS origins are not probeable, so this only checks the URL.
func (s *Server) handleTestWebAppConfig(w http.ResponseWriter, r *http.Request) {
var b webAppConfigBody
if err := json.NewDecoder(r.Body).Decode(&b); err != nil {
writeError(w, http.StatusBadRequest, "invalid json")
return
}
url := normalizeURL(b.URL)
if url == "" {
url, _ = s.webAppSettings()
}
writeJSON(w, http.StatusOK, probe(r.Context(), url+"/healthz"))
}
// PUT /api/admin/webapp-config — apply new Web App settings at runtime and
// persist them to .env. The CORS middleware re-reads the origin list on every
// request, so a change here takes effect without a restart.
func (s *Server) handleUpdateWebAppConfig(w http.ResponseWriter, r *http.Request) {
var b webAppConfigBody
if err := json.NewDecoder(r.Body).Decode(&b); err != nil {
writeError(w, http.StatusBadRequest, "invalid json")
return
}
url := normalizeURL(b.URL)
if url == "" {
writeError(w, http.StatusBadRequest, "a Web App URL is required")
return
}
origins := cleanOrigins(b.AllowOrigins)
if len(origins) == 0 {
writeError(w, http.StatusBadRequest, "at least one allowed origin is required (use * for any)")
return
}
// Apply at runtime, then persist so the change survives a restart.
s.setWebAppConfig(url, origins)
if err := config.UpdateEnvFile(config.EnvFile, map[string]string{
"WEBAPP_URL": url,
"CORS_ALLOW_ORIGINS": strings.Join(origins, ","),
}); err != nil {
// The runtime change already took effect; report that persistence failed.
log.Printf("webapp-config: persist to %s failed: %v", config.EnvFile, err)
writeJSON(w, http.StatusOK, map[string]any{
"config": webAppViewFor(r.Context(), url, origins),
"warning": "applied for this session, but could not be saved to .env: " + err.Error(),
})
return
}
log.Printf("webapp-config: Web App updated to %s, origins %s (by superadmin)", url, strings.Join(origins, ","))
writeJSON(w, http.StatusOK, map[string]any{
"config": webAppViewFor(r.Context(), url, origins),
})
}
// cleanOrigins trims each origin and drops the blanks, so a trailing comma or a
// stray space in the panel's text field can't register an unmatchable origin.
func cleanOrigins(in []string) []string {
out := make([]string, 0, len(in))
for _, o := range in {
if o = strings.TrimSpace(o); o != "" {
out = append(out, o)
}
}
return out
}
+13 -4
View File
@@ -5,6 +5,7 @@ import { me, token, restore, logout, isManager, isSuperadmin } from "./api";
import LoginView from "./components/LoginView.vue";
import StatusCard from "./components/StatusCard.vue";
import PocketBaseCard from "./components/PocketBaseCard.vue";
import WebAppCard from "./components/WebAppCard.vue";
import PluginsCard from "./components/PluginsCard.vue";
import UsersCard from "./components/UsersCard.vue";
import OrgsCard from "./components/OrgsCard.vue";
@@ -18,16 +19,20 @@ onMounted(async () => {
booting.value = false;
});
// Cards are gated by role: management needs a manager, PocketBase + plugins need
// a superadmin. The server enforces the same rules — this only hides what the
// caller could not use anyway.
// Cards are gated by role: management needs a manager, PocketBase, Web App +
// plugins need a superadmin. The server enforces the same rules — this only
// hides what the caller could not use anyway.
const sections = computed(() => {
const out = [{ id: "overview", label: "Overview" }];
if (isManager.value) {
out.push({ id: "users", label: "Users" }, { id: "orgs", label: "Organizations" });
}
if (isSuperadmin.value) {
out.push({ id: "pocketbase", label: "PocketBase" }, { id: "plugins", label: "Plugins" });
out.push(
{ id: "pocketbase", label: "PocketBase" },
{ id: "webapp", label: "Web App" },
{ id: "plugins", label: "Plugins" },
);
}
out.push({ id: "api", label: "API" });
return out;
@@ -118,6 +123,9 @@ const superadminApi = [
{ method: "GET", path: "/api/admin/pb-config", desc: "PocketBase connection + live probe" },
{ method: "POST", path: "/api/admin/pb-config/test", desc: "Probe a candidate connection" },
{ method: "PUT", path: "/api/admin/pb-config", desc: "Apply + persist a connection" },
{ method: "GET", path: "/api/admin/webapp-config", desc: "Web App URL + CORS origins, with a live probe" },
{ method: "POST", path: "/api/admin/webapp-config/test", desc: "Probe a candidate Web App address" },
{ method: "PUT", path: "/api/admin/webapp-config", desc: "Apply + persist Web App settings" },
{ method: "GET", path: "/api/admin/plugins", desc: "List plugins (secrets masked)" },
{ method: "POST", path: "/api/admin/plugins", desc: "Register an external plugin" },
{ method: "GET", path: "/api/admin/plugins/{name}", desc: "Fetch one plugin" },
@@ -207,6 +215,7 @@ const superadminApi = [
<UsersCard v-else-if="section === 'users'" />
<OrgsCard v-else-if="section === 'orgs'" />
<PocketBaseCard v-else-if="section === 'pocketbase'" />
<WebAppCard v-else-if="section === 'webapp'" />
<PluginsCard v-else-if="section === 'plugins'" />
<template v-else-if="section === 'api'">
@@ -0,0 +1,121 @@
<script setup>
import { ref, onMounted } from "vue";
import { request } from "../api";
// Superadmin-only: where the Web App lives (the address /api/status probes) and
// which browser origins CORS admits. Like the PocketBase card, the change is
// applied at runtime AND persisted to the server's .env, so it survives a
// restart. Origins are edited as a comma-separated list.
const cfg = ref(null);
const form = ref({ url: "", origins: "" });
const probe = ref(null);
const error = ref("");
const notice = ref("");
const busy = ref(false);
// The panel sends the origin list as an array; the field edits it as CSV.
const splitOrigins = (s) => s.split(",").map((o) => o.trim()).filter(Boolean);
function apply(view) {
cfg.value = view;
form.value = { url: view.url, origins: (view.allowOrigins || []).join(", ") };
probe.value = view.probe;
}
async function load() {
try {
apply(await request("/api/admin/webapp-config"));
} catch (e) {
error.value = e.message;
}
}
onMounted(load);
async function test() {
error.value = "";
notice.value = "";
busy.value = true;
try {
probe.value = await request("/api/admin/webapp-config/test", {
method: "POST",
body: { url: form.value.url },
});
notice.value =
probe.value.status === "ok"
? "Web App is reachable."
: "Web App did not answer its health check at that address.";
} catch (e) {
error.value = e.message;
} finally {
busy.value = false;
}
}
async function save() {
error.value = "";
notice.value = "";
busy.value = true;
try {
const out = await request("/api/admin/webapp-config", {
method: "PUT",
body: { url: form.value.url, allowOrigins: splitOrigins(form.value.origins) },
});
apply(out.config);
notice.value = out.warning || "Saved. New origins apply to the next request.";
} catch (e) {
error.value = e.message;
} finally {
busy.value = false;
}
}
</script>
<template>
<div class="dh-card overflow-hidden">
<div class="flex items-center justify-between border-b border-subtle px-5 py-4">
<div>
<div class="text-base font-bold tracking-[-0.02em] text-strong">Web App</div>
<p class="mt-0.5 text-xs text-muted">Address probed by the status check, and who may call this API from a browser</p>
</div>
<span
v-if="probe"
class="dh-pill"
:class="probe.status === 'ok' ? 'bg-success-soft text-success' : 'bg-danger-soft text-danger'"
>
<span class="h-1.5 w-1.5 rounded-full bg-current"></span>
{{ probe.status === "ok" ? "reachable" : "unreachable" }}
</span>
</div>
<div class="flex flex-col gap-4 px-5 py-4">
<div>
<label class="dh-label" for="web-url">Base URL</label>
<input id="web-url" v-model="form.url" class="dh-input" placeholder="http://localhost:5173" />
</div>
<div>
<label class="dh-label" for="web-origins">Allowed origins</label>
<input
id="web-origins"
v-model="form.origins"
class="dh-input"
placeholder="http://localhost:5173, https://app.example.com"
/>
<p class="mt-1 text-xs text-muted">
Comma separated, or <span class="data">*</span> for any. Native mobile apps are not subject to CORS.
</p>
</div>
<p v-if="probe?.error" class="data text-xs text-muted">{{ probe.error }}</p>
<p v-if="notice" class="rounded-control bg-info-soft px-3 py-2 text-xs text-info">{{ notice }}</p>
<p v-if="error" class="rounded-control bg-danger-soft px-3 py-2 text-xs text-danger">{{ error }}</p>
<div class="flex items-center gap-2">
<button class="dh-btn" :disabled="busy" @click="save">Save &amp; apply</button>
<button class="dh-btn-ghost" :disabled="busy" @click="test">Test connection</button>
<span class="flex-1"></span>
<span class="eyebrow">persisted to .env</span>
</div>
</div>
</div>
</template>