const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/triggers-DmTul50L.js","assets/tokens-B88hhxTg.js","assets/tokens-Cu-GtAcU.css","assets/macroFocus-CSABIDK-.js","assets/MacrosPage-BoOQ0M3P.css"])))=>i.map(i=>d[i]); var Bu=Object.defineProperty;var Gu=(e,t,r)=>t in e?Bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var qe=(e,t,r)=>Gu(e,typeof t!="symbol"?t+"":t,r);import{R as Vt}from"./tokens-B88hhxTg.js";/** * @vue/shared v3.5.46 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function ri(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}const Re={},rr=[],kt=()=>{},sl=()=>!1,Vs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Us=e=>e.startsWith("onUpdate:"),Fe=Object.assign,ni=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},Ju=Object.prototype.hasOwnProperty,$e=(e,t)=>Ju.call(e,t),ue=Array.isArray,Ht=e=>Nr(e)==="[object Map]",Ss=e=>Nr(e)==="[object Set]",Ni=e=>Nr(e)==="[object Date]",pe=e=>typeof e=="function",Ie=e=>typeof e=="string",Rt=e=>typeof e=="symbol",ke=e=>e!==null&&typeof e=="object",ol=e=>(ke(e)||pe(e))&&pe(e.then)&&pe(e.catch),il=Object.prototype.toString,Nr=e=>il.call(e),Yu=e=>Nr(e).slice(8,-1),al=e=>Nr(e)==="[object Object]",si=e=>Ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qr=ri(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Xu=1e4,Ks=e=>{let t=Object.create(null),r=0;return(n=>{const s=t[n];return s!==void 0?s:(++r>Xu&&(t=Object.create(null),r=1),t[n]=e(n))})},Qu=/-\w/g,ht=Ks(e=>e.replace(Qu,t=>t.slice(1).toUpperCase())),Zu=/\B([A-Z])/g,Jt=Ks(e=>e.replace(Zu,"-$1").toLowerCase()),cl=Ks(e=>e.charAt(0).toUpperCase()+e.slice(1)),co=Ks(e=>e?`on${cl(e)}`:""),Ct=(e,t)=>!Object.is(e,t),gs=(e,...t)=>{for(let r=0;r{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},oi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Oi;const zs=()=>Oi||(Oi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function dr(e){if(ue(e)){const t={};for(let r=0;rr.startsWith("/*")?"":r).split(ed).forEach(r=>{if(r){const n=r.split(td);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ke(e){let t="";if(Ie(e))t=e;else if(ue(e))for(let r=0;r!!(e&&e.__v_isRef===!0),le=e=>Ie(e)?e:e==null?"":ue(e)||ke(e)&&(e.toString===il||!pe(e.toString))?dl(e)?le(e.value):JSON.stringify(e,fl,2):String(e),fl=(e,t)=>dl(t)?fl(e,t.value):Ht(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],o)=>(r[lo(n,o)+" =>"]=s,r),{})}:Ss(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>lo(r))}:Rt(t)?lo(t):ke(t)&&!ue(t)&&!al(t)?String(t):t,lo=(e,t="")=>{var r;return Rt(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};/** * @vue/reactivity v3.5.46 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let De;class cd{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&&De&&(De.active?(this.parent=De,this.index=(De.scopes||(De.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,r;if(this.scopes){const n=this.scopes.slice();for(t=0,r=n.length;t0&&--this._on===0){if(De===this)De=this.prevScope;else{let t=De;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 r,n;for(r=0,n=this.effects.length;r0)return;if(Ur){let t=Ur;for(Ur=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Vr;){let t=Vr;for(Vr=void 0;t;){const r=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=r}}if(e)throw e}function gl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function yl(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ci(n),dd(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Lo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(vl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function vl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Zr)||(e.globalVersion=Zr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Lo(e))))return;e.flags|=2;const t=e.dep,r=Oe,n=mt;Oe=e,mt=!0;try{gl(e);const s=e.fn(e._value);(t.version===0||Ct(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{Oe=r,mt=n,yl(e),e.flags&=-3}}function ci(e,t=!1){const{dep:r,prevSub:n,nextSub:s}=e;if(n&&(n.nextSub=s,e.prevSub=void 0),s&&(s.prevSub=n,e.nextSub=void 0),r.subs===e&&(r.subs=n,!n&&r.computed)){r.computed.flags&=-5;for(let o=r.computed.deps;o;o=o.nextDep)ci(o,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function dd(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}let mt=!0;const _l=[];function Nt(){_l.push(mt),mt=!1}function Ot(){const e=_l.pop();mt=e===void 0?!0:e}function Mi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=Oe;Oe=void 0;try{t()}finally{Oe=r}}}let Zr=0;class fd{constructor(t,r){this.sub=t,this.dep=r,this.version=r.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class li{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(!Oe||!mt||Oe===this.computed)return;let r=this.activeLink;if(r===void 0||r.sub!==Oe)r=this.activeLink=new fd(Oe,this),Oe.deps?(r.prevDep=Oe.depsTail,Oe.depsTail.nextDep=r,Oe.depsTail=r):Oe.deps=Oe.depsTail=r,$l(r);else if(r.version===-1&&(r.version=this.version,r.nextDep)){const n=r.nextDep;n.prevDep=r.prevDep,r.prevDep&&(r.prevDep.nextDep=n),r.prevDep=Oe.depsTail,r.nextDep=void 0,Oe.depsTail.nextDep=r,Oe.depsTail=r,Oe.deps===r&&(Oe.deps=n)}return r}trigger(t){this.version++,Zr++,this.notify(t)}notify(t){ii();try{for(let r=this.subs;r;r=r.prevSub)r.sub.notify()&&r.sub.dep.notify()}finally{ai()}}}function $l(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)$l(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}const Fo=new WeakMap,ir=Symbol(""),qo=Symbol(""),en=Symbol("");function We(e,t,r){if(mt&&Oe){let n=Fo.get(e);n||Fo.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new li),s.map=n,s.key=r),s.track()}}function Ft(e,t,r,n,s,o){const i=Fo.get(e);if(!i){Zr++;return}const a=c=>{c&&c.trigger()};if(ii(),t==="clear")i.forEach(a);else{const c=ue(e),l=c&&si(r);if(c&&r==="length"){const u=Number(n);i.forEach((m,v)=>{(v==="length"||v===en||!Rt(v)&&v>=u)&&a(m)})}else switch((r!==void 0||i.has(void 0))&&a(i.get(r)),l&&a(i.get(en)),t){case"add":c?l&&a(i.get("length")):(a(i.get(ir)),Ht(e)&&a(i.get(qo)));break;case"delete":c||(a(i.get(ir)),Ht(e)&&a(i.get(qo)));break;case"set":Ht(e)&&a(i.get(ir));break}}ai()}function pr(e){const t=we(e);return t===e||(We(t,"iterate",en),lt(e))?t:At(e)?Wt(e)?t.map(r=>Bt(dt(r))):t.map(Bt):t.map(dt)}function Ws(e){return We(e=we(e),"iterate",en),e}function Pt(e,t){return At(e)?Bt(Wt(e)?dt(t):t):dt(t)}const pd={__proto__:null,[Symbol.iterator](){return fo(this,Symbol.iterator,e=>Pt(this,e))},concat(...e){return pr(this).concat(...e.map(t=>ue(t)?pr(t):t))},entries(){return fo(this,"entries",e=>(e[1]=Pt(this,e[1]),e))},every(e,t){return Tt(this,"every",e,t,void 0,arguments)},filter(e,t){return Tt(this,"filter",e,t,r=>r.map(n=>Pt(this,n)),arguments)},find(e,t){return Tt(this,"find",e,t,r=>Pt(this,r),arguments)},findIndex(e,t){return Tt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Tt(this,"findLast",e,t,r=>Pt(this,r),arguments)},findLastIndex(e,t){return Tt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Tt(this,"forEach",e,t,void 0,arguments)},includes(...e){return po(this,"includes",e)},indexOf(...e){return po(this,"indexOf",e)},join(e){return pr(this).join(e)},lastIndexOf(...e){return po(this,"lastIndexOf",e)},map(e,t){return Tt(this,"map",e,t,void 0,arguments)},pop(){return xr(this,"pop")},push(...e){return xr(this,"push",e)},reduce(e,...t){return ji(this,"reduce",e,t)},reduceRight(e,...t){return ji(this,"reduceRight",e,t)},shift(){return xr(this,"shift")},some(e,t){return Tt(this,"some",e,t,void 0,arguments)},splice(...e){return xr(this,"splice",e)},toReversed(){return pr(this).toReversed()},toSorted(e){return pr(this).toSorted(e)},toSpliced(...e){return pr(this).toSpliced(...e)},unshift(...e){return xr(this,"unshift",e)},values(){return fo(this,"values",e=>Pt(this,e))}};function fo(e,t,r){const n=Ws(e),s=n[t],o=s.call(n);if(n!==e&&!lt(e)){if(o[Symbol.toStringTag]==="Array Iterator"){const i=Object.create(Object.getPrototypeOf(o));return i.next=()=>Ii(o.next(),r),s!==bl[t]&&Object.defineProperties(i,{return:{get(){const a=o.return;return typeof a=="function"?a.bind(o):a}},throw:{get(){const a=o.throw;return typeof a=="function"?a.bind(o):a}}}),i}o._next=o.next,o.next=()=>Ii(o._next(),r)}return o}function Ii(e,t){return e.done||(e.value=t(e.value)),e}const bl=Array.prototype;function Tt(e,t,r,n,s,o){const i=Ws(e),a=i!==e&&!lt(e),c=i[t];if(c!==bl[t]){const m=c.apply(e,o);return a?dt(m):m}let l=r;i!==e&&(a?l=function(m,v){return r.call(this,Pt(e,m),v,e)}:r.length>2&&(l=function(m,v){return r.call(this,m,v,e)}));const u=c.call(i,l,n);return a&&s?s(u):u}function ji(e,t,r,n){const s=Ws(e),o=s!==e&&!lt(e);let i=r,a=!1;s!==e&&(o?(a=n.length===0,i=function(l,u,m){return a&&(a=!1,l=Pt(e,l)),r.call(this,l,Pt(e,u),m,e)}):r.length>3&&(i=function(l,u,m){return r.call(this,l,u,m,e)}));const c=s[t](i,...n);return a?Pt(e,c):c}function po(e,t,r){const n=we(e);We(n,"iterate",en);const s=n[t](...r);return(s===-1||s===!1)&&fi(r[0])?(r[0]=we(r[0]),n[t](...r)):s}function xr(e,t,r=[]){Nt(),ii();const n=we(e)[t].apply(e,r);return ai(),Ot(),n}const hd=ri("__proto__,__v_isRef,__isVue"),wl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rt));function md(e){Rt(e)||(e=String(e));const t=we(this);return We(t,"has",e),t.hasOwnProperty(e)}class Pl{constructor(t=!1,r=!1){this._isReadonly=t,this._isShallow=r}get(t,r,n){if(r==="__v_skip")return t.__v_skip;const s=this._isReadonly,o=this._isShallow;if(r==="__v_isReactive")return!s;if(r==="__v_isReadonly")return s;if(r==="__v_isShallow")return o;if(r==="__v_raw")return n===(s?o?Ed:kl:o?Cl:El).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=ue(t);if(!s){let c;if(i&&(c=pd[r]))return c;if(r==="hasOwnProperty")return md}const a=Reflect.get(t,r,Je(t)?t:n);if((Rt(r)?wl.has(r):hd(r))||(s||We(t,"get",r),o))return a;if(Je(a)){const c=i&&si(r)?a:a.value;return s&&ke(c)?Uo(c):c}return ke(a)?s?Uo(a):fr(a):a}}class Sl extends Pl{constructor(t=!1){super(!1,t)}set(t,r,n,s){let o=t[r];const i=ue(t)&&si(r);if(!this._isShallow){const l=At(o);if(!lt(n)&&!At(n)&&(o=we(o),n=we(n)),!i&&Je(o)&&!Je(n))return l||(o.value=n),!0}const a=i?Number(r)e,pn=e=>Reflect.getPrototypeOf(e);function $d(e,t,r){return function(...n){const s=this.__v_raw,o=we(s),i=Ht(o),a=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,l=s[e](...n),u=r?Vo:t?Bt:dt;return!t&&We(o,"iterate",c?qo:ir),Fe(Object.create(l),{next(){const{value:m,done:v}=l.next();return v?{value:m,done:v}:{value:a?[u(m[0]),u(m[1])]:u(m),done:v}}})}}function hn(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function bd(e,t){const r={get(s){const o=this.__v_raw,i=we(o),a=we(s);e||(Ct(s,a)&&We(i,"get",s),We(i,"get",a));const{has:c}=pn(i),l=t?Vo:e?Bt:dt;if(c.call(i,s))return l(o.get(s));if(c.call(i,a))return l(o.get(a));o!==i&&o.get(s)},get size(){const s=this.__v_raw;return!e&&We(we(s),"iterate",ir),s.size},has(s){const o=this.__v_raw,i=we(o),a=we(s);return e||(Ct(s,a)&&We(i,"has",s),We(i,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const i=this,a=i.__v_raw,c=we(a),l=t?Vo:e?Bt:dt;return!e&&We(c,"iterate",ir),a.forEach((u,m)=>s.call(o,l(u),l(m),i))}};return Fe(r,e?{add:hn("add"),set:hn("set"),delete:hn("delete"),clear:hn("clear")}:{add(s){const o=we(this),i=pn(o),a=we(s),c=!t&&!lt(s)&&!At(s)?a:s;return i.has.call(o,c)||Ct(s,c)&&i.has.call(o,s)||Ct(a,c)&&i.has.call(o,a)||(o.add(c),Ft(o,"add",c,c)),this},set(s,o){!t&&!lt(o)&&!At(o)&&(o=we(o));const i=we(this),{has:a,get:c}=pn(i);let l=a.call(i,s);l||(s=we(s),l=a.call(i,s));const u=c.call(i,s);return i.set(s,o),l?Ct(o,u)&&Ft(i,"set",s,o):Ft(i,"add",s,o),this},delete(s){const o=we(this),{has:i,get:a}=pn(o);let c=i.call(o,s);c||(s=we(s),c=i.call(o,s)),a&&a.call(o,s);const l=o.delete(s);return c&&Ft(o,"delete",s,void 0),l},clear(){const s=we(this),o=s.size!==0,i=s.clear();return o&&Ft(s,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(s=>{r[s]=$d(s,e,t)}),r}function ui(e,t){const r=bd(e,t);return(n,s,o)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_isShallow"?t:s==="__v_raw"?n:Reflect.get($e(r,s)&&s in n?r:n,s,o)}const wd={get:ui(!1,!1)},Pd={get:ui(!1,!0)},Sd={get:ui(!0,!1)};const El=new WeakMap,Cl=new WeakMap,kl=new WeakMap,Ed=new WeakMap;function Cd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function fr(e){return At(e)?e:di(e,!1,yd,wd,El)}function kd(e){return di(e,!1,_d,Pd,Cl)}function Uo(e){return di(e,!0,vd,Sd,kl)}function di(e,t,r,n,s){if(!ke(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=s.get(e);if(o)return o;const i=Cd(Yu(e));if(i===0)return e;const a=new Proxy(e,i===2?n:r);return s.set(e,a),a}function Wt(e){return At(e)?Wt(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function fi(e){return e?!!e.__v_raw:!1}function we(e){const t=e&&e.__v_raw;return t?we(t):e}function Rd(e){return!$e(e,"__v_skip")&&Object.isExtensible(e)&&ll(e,"__v_skip",!0),e}const dt=e=>ke(e)?fr(e):e,Bt=e=>ke(e)?Uo(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function Se(e){return Rl(e,!1)}function Nd(e){return Rl(e,!0)}function Rl(e,t){return Je(e)?e:new Od(e,t)}class Od{constructor(t,r){this.dep=new li,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=r?t:we(t),this._value=r?t:dt(t),this.__v_isShallow=r}get value(){return this.dep.track(),this._value}set value(t){const r=this._rawValue,n=this.__v_isShallow||lt(t)||At(t);t=n?t:we(t),Ct(t,r)&&(this._rawValue=t,this._value=n?t:dt(t),this.dep.trigger())}}function te(e){return Je(e)?e.value:e}const Ad={get:(e,t,r)=>t==="__v_raw"?e:te(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return Je(s)&&!Je(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Nl(e){return Wt(e)?e:new Proxy(e,Ad)}class xd{constructor(t,r,n){this.fn=t,this.setter=r,this._value=void 0,this.dep=new li(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Zr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!r,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Oe!==this)return ml(this,!0),!0}get value(){const t=this.dep.track();return vl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Td(e,t,r=!1){let n,s;return pe(e)?n=e:(n=e.get,s=e.set),new xd(n,s,r)}const mn={},Es=new WeakMap;let tr;function Md(e,t=!1,r=tr){if(r){let n=Es.get(r);n||Es.set(r,n=[]),n.push(e)}}function Id(e,t,r=Re){const{immediate:n,deep:s,once:o,scheduler:i,augmentJob:a,call:c}=r,l=k=>s?k:lt(k)||s===!1||s===0?qt(k,1):qt(k);let u,m,v,w,R=!1,C=!1;if(Je(e)?(m=()=>e.value,R=lt(e)):Wt(e)?(m=()=>l(e),R=!0):ue(e)?(C=!0,R=e.some(k=>Wt(k)||lt(k)),m=()=>e.map(k=>{if(Je(k))return k.value;if(Wt(k))return l(k);if(pe(k))return c?c(k,2):k()})):pe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(v){Nt();try{v()}finally{Ot()}}const k=tr;tr=u;try{return c?c(e,3,[w]):e(w)}finally{tr=k}}:m=kt,t&&s){const k=m,y=s===!0?1/0:s;m=()=>qt(k(),y)}const _=ld(),P=()=>{u.stop(),_&&_.active&&ni(_.effects,u)};if(o&&t){const k=t;t=(...y)=>{try{return k(...y)}finally{P()}}}let g=C?new Array(e.length).fill(mn):mn;const S=k=>{if(!(!(u.flags&1)||!u.dirty&&!k))if(t){const y=u.run();if(k||s||R||(C?y.some((b,O)=>Ct(b,g[O])):Ct(y,g))){const b=tr;Nt();try{v&&v(),tr=u;const O=[y,g===mn?void 0:C&&g[0]===mn?[]:g,w];g=y,c?c(t,3,O):t(...O)}finally{tr=b,Ot()}}}else u.run()};return a&&a(S),u=new pl(m),u.scheduler=i?()=>i(S,!1):S,w=k=>Md(k,!1,u),v=u.onStop=()=>{const k=Es.get(u);if(k){if(c)c(k,4);else for(const y of k)y();Es.delete(u)}},t?n?S(!0):g=u.run():i?i(S.bind(null,!0),!0):u.run(),P.pause=u.pause.bind(u),P.resume=u.resume.bind(u),P.stop=P,P}function qt(e,t=1/0,r){if(t<=0||!ke(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,Je(e))qt(e.value,t,r);else if(ue(e))for(let n=0;n{qt(n,t,r)});else if(al(e)){for(const n in e)qt(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&qt(e[n],t,r)}return e}/** * @vue/runtime-core v3.5.46 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function ln(e,t,r,n){try{return n?e(...n):e()}catch(s){un(s,t,r)}}function gt(e,t,r,n){if(pe(e)){const s=ln(e,t,r,n);return s&&ol(s)&&s.catch(o=>{un(o,t,r,void 0,!0)}),s}if(ue(e)){const s=[];for(let o=0;o>>1,s=nt[n],o=tn(s);o=tn(r)?nt.push(e):nt.splice(Ld(t),0,e),e.flags|=1,Al()}}function Al(){Cs||(Cs=Ol.then(Ml))}function Fd(e){if(!ue(e))zt&&e.id===-1?zt.splice(vr+1,0,e):e.flags&1||(St.push(e),e.flags|=1);else for(let t=0;t=t))continue;nt.splice(n,1),n=e?n-1:pt,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Tl(e,t,r=0){if(St.length){let n=St,s=0;if(t){n=[];for(let i=0;itn(i)-tn(a));if(St.length=s,zt){for(let i=0;ie.id==null?e.flags&2?-1:1/0:e.id;function Ml(e){try{for(pt=0;pt{n._d&&Ji(-1);const o=ks(t),i=ar.length;let a;try{a=e(...s)}finally{for(let c=ar.length;c>i;c--)nu();ks(o),n._d&&Ji(1)}return a};return n._n=!0,n._c=!0,n._d=!0,n}function Di(e,t){if(ct===null)return e;const r=Zs(ct),n=e.dirs||(e.dirs=[]);for(let s=0;s1)return r&&pe(t)?t.call(n&&n.proxy):t}}const Kd=Symbol.for("v-scx"),zd=()=>ys(Kd);function vs(e,t,r){return jl(e,t,r)}function jl(e,t,r=Re){const{immediate:n,deep:s,flush:o,once:i}=r,a=Fe({},r),c=t&&n||!t&&o!=="post";let l;if(kr){if(o==="sync"){const w=zd();l=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=kt,w.resume=kt,w.pause=kt,w}}const u=Be;a.call=(w,R,C)=>gt(w,u,R,C);let m=!1;o==="post"?a.scheduler=w=>{w.i=u,et(w,u&&u.suspense)}:o!=="sync"&&(m=!0,a.scheduler=(w,R)=>{R?w():pi(w)}),a.augmentJob=w=>{t&&(w.flags|=4),m&&(w.flags|=2,u&&(w.id=u.uid,w.i=u))};const v=Id(e,t,a);return kr&&(l?l.push(v):c&&v()),v}function Hd(e,t,r){const n=this.proxy,s=Ie(e)?e.includes(".")?Dl(n,e):()=>n[e]:e.bind(n,n);let o;pe(t)?o=t:(o=t.handler,r=t);const i=dn(this),a=jl(s,o.bind(n),r);return i(),a}function Dl(e,t){const r=t.split(".");return()=>{let n=e;for(let s=0;se.__isTeleport,mo=Symbol("_leaveCb");function Bd(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==yt){t=r;break}}return t}function Ll(e){if(!Gs(e))return Bs(e.type)&&e.children?Bd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:r}=e;if(r){if(t&16)return r[0];if(t&32&&pe(r.default))return r.default()}}function Kr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const r=e.component.subTree;Kr(Bs(r.type)&&Ll(r)||r,t)}else if(e.shapeFlag&128){const r=e.suspense;if(r){const n=r.isHydrating?r.pendingBranch:r.activeBranch;n&&Kr(n,t.clone(n))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===Ae&&ue(e.children)){const r=zl(e.children,!1);r&&Kr(r,t)}}function Ko(e){if(e.component)return Ko(e.component.subTree);if(e.type===Ae){const t=ue(e.children)&&zl(e.children,!1);return t?Ko(t):void 0}if(e.type!==yt)return e}function Ye(e,t){return pe(e)?Fe({name:e.name},t,{setup:e}):e}function hi(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Li(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}const Rs=new WeakMap;function zr(e,t,r,n,s=!1){if(ue(e)){e.forEach((C,_)=>zr(C,t&&(ue(t)?t[_]:t),r,n,s));return}if(Hr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&zr(e,t,r,n.component.subTree);return}const o=n.shapeFlag&4?Zs(n.component):n.el,i=s?null:o,{i:a,r:c}=e,l=t&&t.r,u=a.refs===Re?a.refs={}:a.refs,m=a.setupState,v=we(m),w=m===Re?sl:C=>Li(u,C)?!1:$e(v,C),R=(C,_)=>!(_&&Li(u,_));if(l!=null&&l!==c){if(Fi(t),Ie(l))u[l]=null,w(l)&&(m[l]=null);else if(Je(l)){const C=t;R(l,C.k)&&(l.value=null),C.k&&(u[C.k]=null)}}if(pe(c))ln(c,a,12,[i,u]);else{const C=Ie(c),_=Je(c);if(C||_){const P=()=>{if(e.f){const g=C?w(c)?m[c]:u[c]:R()||!e.k?c.value:u[e.k];if(s)ue(g)&&ni(g,o);else if(ue(g))g.includes(o)||g.push(o);else if(C)u[c]=[o],w(c)&&(m[c]=u[c]);else{const S=[o];R(c,e.k)&&(c.value=S),e.k&&(u[e.k]=S)}}else C?(u[c]=i,w(c)&&(m[c]=i)):_&&(R(c,e.k)&&(c.value=i),e.k&&(u[e.k]=i))};if(i){const g=()=>{P(),Rs.delete(e)};g.id=-1,Rs.set(e,g),et(g,r)}else Fi(e),P()}}}function Fi(e){const t=Rs.get(e);t&&(t.flags|=8,Rs.delete(e))}const qi=e=>e.nodeType===8;zs().requestIdleCallback;zs().cancelIdleCallback;function Gd(e,t){if(qi(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(qi(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}const Hr=e=>!!e.type.__asyncLoader;function go(e){pe(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:o,timeout:i,suspensible:a=!0,onError:c}=e;let l=null,u,m=0;const v=()=>(m++,l=null,w()),w=()=>{let R;return l||(R=l=t().catch(C=>{if(C=C instanceof Error?C:new Error(String(C)),c)return new Promise((_,P)=>{c(C,()=>_(v()),()=>P(C),m+1)});throw C}).then(C=>R!==l&&l?l:(C&&(C.__esModule||C[Symbol.toStringTag]==="Module")&&(C=C.default),u=C,C)))};return Ye({name:"AsyncComponentWrapper",__asyncLoader:w,__asyncHydrate(R,C,_){const P=R.isConnected;let g=!1;(C.bu||(C.bu=[])).push(()=>g=!0);const S=()=>{g||!R.parentNode||P&&!R.isConnected||_()},k=o?()=>{const y=o(S,b=>Gd(R,b));y&&(C.bum||(C.bum=[])).push(y)}:S;u?k():w().then(()=>!C.isUnmounted&&k())},get __asyncResolved(){return u},setup(){const R=Be;if(hi(R),u)return()=>gn(u,R);const C=y=>{l=null,un(y,R,13,!n,!0)};if(a&&R.suspense||kr)return w().then(y=>()=>gn(y,R)).catch(y=>(C(y),()=>n?ve(n,{error:y}):null));const _=Se(!1),P=Se(),g=Se(!!s);let S,k;return ud(()=>{S!=null&&clearTimeout(S),k!=null&&clearTimeout(k)}),s&&(k=setTimeout(()=>{R.isUnmounted||(g.value=!1)},s)),i!=null&&(S=setTimeout(()=>{if(!R.isUnmounted&&!_.value&&!P.value){const y=new Error(`Async component timed out after ${i}ms.`);C(y),P.value=y}},i)),w().then(()=>{R.isUnmounted||(_.value=!0,R.parent&&Gs(R.parent.vnode)&&R.parent.update())}).catch(y=>{if(R.isUnmounted){l=null;return}C(y),P.value=y}),()=>{if(_.value&&u)return gn(u,R);if(P.value&&n)return ve(n,{error:P.value});if(r&&!g.value)return gn(r,R)}}})}function gn(e,t){const{ref:r,props:n,children:s,ce:o}=t.vnode,i=ve(e,n,s);return i.ref=r,i.ce=o,delete t.vnode.ce,i}const Gs=e=>e.type.__isKeepAlive;function Jd(e,t){Fl(e,"a",t)}function Yd(e,t){Fl(e,"da",t)}function Fl(e,t,r=Be){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(rn(t,n,r),r){let s=r.parent;for(;s&&s.parent;)Gs(s.parent.vnode)&&Xd(n,t,r,s),s=s.parent}}function Xd(e,t,r,n){const s=rn(t,e,n,!0),o=rn("um",()=>ni(n[t],s),r);o.flags=16}function rn(e,t,r=Be,n=!1){if(r){const s=r[e]||(r[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Nt();const a=dn(r),c=gt(t,r,e,i);return a(),Ot(),c});return n?s.unshift(o):s.push(o),o}}const Ut=e=>(t,r=Be)=>{(!kr||e==="sp")&&rn(e,(...n)=>t(...n),r)},Qd=Ut("bm"),Js=Ut("m"),Zd=Ut("bu"),ef=Ut("u"),Ys=Ut("bum"),tf=Ut("um"),rf=Ut("sp"),nf=Ut("rtg"),sf=Ut("rtc");function of(e,t=Be){rn("ec",e,t)}const af=Symbol.for("v-ndc");function ut(e,t,r,n){let s;const o=r,i=ue(e);if(i||Ie(e)){const a=i&&Wt(e);let c=!1,l=!1;a&&(c=!lt(e),l=At(e),e=Ws(e)),s=new Array(e.length);for(let u=0,m=e.length;ut(a,c,void 0,o));else{const a=Object.keys(e);s=new Array(a.length);for(let c=0,l=a.length;ce?cu(e)?Zs(e):zo(e.parent):null,Wr=Fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zo(e.parent),$root:e=>zo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vl(e),$forceUpdate:e=>e.f||(e.f=()=>{pi(e.update)}),$nextTick:e=>e.n||(e.n=Dd.bind(e.proxy)),$watch:e=>Hd.bind(e)}),yo=(e,t)=>e!==Re&&!e.__isScriptSetup&&$e(e,t),cf={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:r,setupState:n,data:s,props:o,accessCache:i,type:a,appContext:c}=e;if(t[0]!=="$"){const v=i[t];if(v!==void 0)switch(v){case 1:return n[t];case 2:return s[t];case 4:return r[t];case 3:return o[t]}else{if(yo(n,t))return i[t]=1,n[t];if(s!==Re&&$e(s,t))return i[t]=2,s[t];if($e(o,t))return i[t]=3,o[t];if(r!==Re&&$e(r,t))return i[t]=4,r[t];Ho&&(i[t]=0)}}const l=Wr[t];let u,m;if(l)return t==="$attrs"&&We(e.attrs,"get",""),l(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(r!==Re&&$e(r,t))return i[t]=4,r[t];if(m=c.config.globalProperties,$e(m,t))return m[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:o}=e;return yo(s,t)?(s[t]=r,!0):n!==Re&&$e(n,t)?(n[t]=r,!0):$e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:n,appContext:s,props:o,type:i}},a){let c;return!!(r[a]||e!==Re&&a[0]!=="$"&&$e(e,a)||yo(t,a)||$e(o,a)||$e(n,a)||$e(Wr,a)||$e(s.config.globalProperties,a)||(c=i.__cssModules)&&c[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:$e(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}};function Vi(e){return ue(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}let Ho=!0;function lf(e){const t=Vl(e),r=e.proxy,n=e.ctx;Ho=!1,t.beforeCreate&&Ui(t.beforeCreate,e,"bc");const{data:s,computed:o,methods:i,watch:a,provide:c,inject:l,created:u,beforeMount:m,mounted:v,beforeUpdate:w,updated:R,activated:C,deactivated:_,beforeDestroy:P,beforeUnmount:g,destroyed:S,unmounted:k,render:y,renderTracked:b,renderTriggered:O,errorCaptured:L,serverPrefetch:U,expose:z,inheritAttrs:re,components:Y,directives:V,filters:oe}=t;if(l&&uf(l,n,null),i)for(const fe in i){const ie=i[fe];pe(ie)&&(n[fe]=ie.bind(r))}if(s){const fe=s.call(r,r);ke(fe)&&(e.data=fr(fe))}if(Ho=!0,o)for(const fe in o){const ie=o[fe],Ne=pe(ie)?ie.bind(r,r):pe(ie.get)?ie.get.bind(r,r):kt,J=!pe(ie)&&pe(ie.set)?ie.set.bind(r):kt,$=Le({get:Ne,set:J});Object.defineProperty(n,fe,{enumerable:!0,configurable:!0,get:()=>$.value,set:x=>$.value=x})}if(a)for(const fe in a)ql(a[fe],n,r,fe);if(c){const fe=pe(c)?c.call(r):c;Reflect.ownKeys(fe).forEach(ie=>{Ud(ie,fe[ie])})}u&&Ui(u,e,"c");function de(fe,ie){ue(ie)?ie.forEach(Ne=>fe(Ne.bind(r))):ie&&fe(ie.bind(r))}if(de(Qd,m),de(Js,v),de(Zd,w),de(ef,R),de(Jd,C),de(Yd,_),de(of,L),de(sf,b),de(nf,O),de(Ys,g),de(tf,k),de(rf,U),ue(z))if(z.length){const fe=e.exposed||(e.exposed={});z.forEach(ie=>{Object.defineProperty(fe,ie,{get:()=>r[ie],set:Ne=>r[ie]=Ne,enumerable:!0})})}else e.exposed||(e.exposed={});y&&e.render===kt&&(e.render=y),re!=null&&(e.inheritAttrs=re),Y&&(e.components=Y),V&&(e.directives=V),U&&hi(e)}function uf(e,t,r=kt){ue(e)&&(e=Wo(e));for(const n in e){const s=e[n];let o;ke(s)?"default"in s?o=ys(s.from||n,s.default,!0):o=ys(s.from||n):o=ys(s),Je(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[n]=o}}function Ui(e,t,r){gt(ue(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function ql(e,t,r,n){let s=n.includes(".")?Dl(r,n):()=>r[n];if(Ie(e)){const o=t[e];pe(o)&&vs(s,o)}else if(pe(e))vs(s,e.bind(r));else if(ke(e))if(ue(e))e.forEach(o=>ql(o,t,r,n));else{const o=pe(e.handler)?e.handler.bind(r):t[e.handler];pe(o)&&vs(s,o,e)}}function Vl(e){const t=e.type,{mixins:r,extends:n}=t,{mixins:s,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,a=o.get(t);let c;return a?c=a:!s.length&&!r&&!n?c=t:(c={},s.length&&s.forEach(l=>Ns(c,l,i,!0)),Ns(c,t,i)),ke(t)&&o.set(t,c),c}function Ns(e,t,r,n=!1){const{mixins:s,extends:o}=t;o&&Ns(e,o,r,!0),s&&s.forEach(i=>Ns(e,i,r,!0));for(const i in t)if(!(n&&i==="expose")){const a=df[i]||r&&r[i];e[i]=a?a(e[i],t[i]):t[i]}return e}const df={data:Ki,props:zi,emits:zi,methods:Dr,computed:Dr,beforeCreate:Ze,created:Ze,beforeMount:Ze,mounted:Ze,beforeUpdate:Ze,updated:Ze,beforeDestroy:Ze,beforeUnmount:Ze,destroyed:Ze,unmounted:Ze,activated:Ze,deactivated:Ze,errorCaptured:Ze,serverPrefetch:Ze,components:Dr,directives:Dr,watch:pf,provide:Ki,inject:ff};function Ki(e,t){return t?e?function(){return Fe(pe(e)?e.call(this,this):e,pe(t)?t.call(this,this):t)}:t:e}function ff(e,t){return Dr(Wo(e),Wo(t))}function Wo(e){if(ue(e)){const t={};for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function yf(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Re;let s=r;const o=t.startsWith("update:"),i=o&&gf(n,t.slice(7));i&&(i.trim&&(s=r.map(u=>Ie(u)?u.trim():u)),i.number&&(s=s.map(oi)));let a,c=n[a=co(t)]||n[a=co(ht(t))];!c&&o&&(c=n[a=co(Jt(t))]),c&>(c,e,6,s);const l=n[a+"Once"];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,gt(l,e,6,s)}}const vf=new WeakMap;function Kl(e,t,r=!1){const n=r?vf:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const o=e.emits;let i={},a=!1;if(!pe(e)){const c=l=>{const u=Kl(l,t,!0);u&&(a=!0,Fe(i,u))};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!a?(ke(e)&&n.set(e,null),null):(ue(o)?o.forEach(c=>i[c]=null):Fe(i,o),ke(e)&&n.set(e,i),i)}function Xs(e,t){return!e||!Vs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),$e(e,t[0].toLowerCase()+t.slice(1))||$e(e,Jt(t))||$e(e,t))}function Hi(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[o],slots:i,attrs:a,emit:c,render:l,renderCache:u,props:m,data:v,setupState:w,ctx:R,inheritAttrs:C}=e,_=ks(e);let P,g;try{if(r.shapeFlag&4){const k=s||n,y=k;P=Et(l.call(y,k,u,m,w,v,R)),g=a}else{const k=t;P=Et(k.length>1?k(m,{attrs:a,slots:i,emit:c}):k(m,null)),g=t.props?a:_f(a)}}catch(k){ar.length=0,un(k,e,1),P=ve(yt)}let S=P;if(g&&C!==!1){const k=Object.keys(g),{shapeFlag:y}=S;k.length&&y&7&&(o&&k.some(Us)&&(g=$f(g,o)),S=Cr(S,g,!1,!0))}if(r.dirs&&(S=Cr(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(r.dirs):r.dirs),r.transition){const k=Bs(S.type)&&Ll(S)||S;Kr(k,r.transition)}return P=S,ks(_),P}function zl(e,t=!0){let r;for(let n=0;n{let t;for(const r in e)(r==="class"||r==="style"||Vs(r))&&((t||(t={}))[r]=e[r]);return t},$f=(e,t)=>{const r={};for(const n in e)(!Us(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function bf(e,t,r){const{props:n,children:s,component:o}=e,{props:i,children:a,patchFlag:c}=t,l=o.emitsOptions;if(t.dirs||t.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return n?Wi(n,i,l):!!i;if(c&8){const u=t.dynamicProps;for(let m=0;mObject.create(Wl),Gl=e=>Object.getPrototypeOf(e)===Wl;function Pf(e,t,r,n=!1){const s={},o=Bl();e.propsDefaults=Object.create(null),Jl(e,t,s,o);for(const i in e.propsOptions[0])i in s||(s[i]=void 0);r?e.props=n?s:kd(s):e.type.props?e.props=s:e.props=o,e.attrs=o}function Sf(e,t,r,n){const{props:s,attrs:o,vnode:{patchFlag:i}}=e,a=we(s),[c]=e.propsOptions;let l=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let m=0;m{c=!0;const[v,w]=Yl(m,t,!0);Fe(i,v),w&&a.push(...w)};!r&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!c)return ke(e)&&n.set(e,rr),rr;if(ue(o))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",gi=e=>ue(e)?e.map(Et):[Et(e)],Cf=(e,t,r)=>{if(t._n)return t;const n=Vd((...s)=>gi(t(...s)),r);return n._c=!1,n},Xl=(e,t,r)=>{const n=e._ctx;for(const s in e){if(mi(s))continue;const o=e[s];if(pe(o))t[s]=Cf(s,o,n);else if(o!=null){const i=gi(o);t[s]=()=>i}}},Ql=(e,t)=>{const r=gi(t);e.slots.default=()=>r},Zl=(e,t,r)=>{for(const n in t)(r||!mi(n))&&(e[n]=t[n])},kf=(e,t,r)=>{const n=e.slots=Bl();if(e.vnode.shapeFlag&32){const s=t._;s?(Zl(n,t,r),r&&ll(n,"_",s,!0)):Xl(t,n)}else t&&Ql(e,t)},Rf=(e,t,r)=>{const{vnode:n,slots:s}=e;let o=!0,i=Re;if(n.shapeFlag&32){const a=t._;a?r&&a===1?o=!1:Zl(s,t,r):(o=!t.$stable,Xl(t,s)),i=t}else t&&(Ql(e,t),i={default:1});if(o)for(const a in s)!mi(a)&&i[a]==null&&delete s[a]},et=Mf;function Nf(e){return Of(e)}function Of(e,t){const r=zs();r.__VUE__=!0;const{insert:n,remove:s,patchProp:o,createElement:i,createText:a,createComment:c,setText:l,setElementText:u,parentNode:m,nextSibling:v,setScopeId:w=kt,insertStaticContent:R}=e,C=(d,h,N,T=null,M=null,F=null,B=void 0,H=null,G=!!h.dynamicChildren)=>{if(d===h)return;d&&!Tr(d,h)&&(T=D(d),x(d,M,F,!0),d=null),h.patchFlag===-2&&(G=!1,h.dynamicChildren=null),h.dynamicChildren&&d&&d.dynamicChildren&&d.dynamicChildren.hasOnce&&(h.dynamicChildren===rr&&(h.dynamicChildren=[]),h.dynamicChildren.hasOnce=!0);const{type:q,ref:Q,shapeFlag:Z}=h;switch(q){case Qs:_(d,h,N,T);break;case yt:P(d,h,N,T);break;case _s:d==null&&g(h,N,T,B);break;case Ae:Y(d,h,N,T,M,F,B,H,G);break;default:Z&1?y(d,h,N,T,M,F,B,H,G):Z&6?V(d,h,N,T,M,F,B,H,G):(Z&64||Z&128)&&q.process(d,h,N,T,M,F,B,H,G,W)}Q!=null&&M?zr(Q,d&&d.ref,F,h||d,!h):Q==null&&d&&d.ref!=null&&zr(d.ref,null,F,d,!0)},_=(d,h,N,T)=>{if(d==null)n(h.el=a(h.children),N,T);else{const M=h.el=d.el;h.children!==d.children&&l(M,h.children)}},P=(d,h,N,T)=>{d==null?n(h.el=c(h.children||""),N,T):h.el=d.el},g=(d,h,N,T)=>{[d.el,d.anchor]=R(d.children,h,N,T,d.el,d.anchor)},S=({el:d,anchor:h},N,T)=>{let M;for(;d&&d!==h;)M=v(d),n(d,N,T),d=M;n(h,N,T)},k=({el:d,anchor:h})=>{let N;for(;d&&d!==h;)N=v(d),s(d),d=N;s(h)},y=(d,h,N,T,M,F,B,H,G)=>{if(h.type==="svg"?B="svg":h.type==="math"&&(B="mathml"),d==null)b(h,N,T,M,F,B,H,G);else{const q=d.el&&d.el._isVueCE?d.el:null;try{q&&q._beginPatch(),U(d,h,M,F,B,H,G)}finally{q&&q._endPatch()}}},b=(d,h,N,T,M,F,B,H)=>{let G,q;const{props:Q,shapeFlag:Z,transition:ne,dirs:ae}=d;if(G=d.el=i(d.type,F,Q&&Q.is,Q),Z&8?u(G,d.children):Z&16&&L(d.children,G,null,T,M,vo(d,F),B,H),ae&&Yt(d,null,T,"created"),O(G,d,d.scopeId,B,T),Q){for(const _e in Q)_e!=="value"&&!qr(_e)&&o(G,_e,null,Q[_e],F,T);"value"in Q&&o(G,"value",null,Q.value,F),(q=Q.onVnodeBeforeMount)&&wt(q,T,d)}ae&&Yt(d,null,T,"beforeMount");const me=Af(M,ne);me?ne.beforeEnter(G):ne&&!ne.persisted&&(G[Tf]=!0),n(G,h,N),((q=Q&&Q.onVnodeMounted)||me||ae)&&et(()=>{try{q&&wt(q,T,d),me&&ne.enter(G),ae&&Yt(d,null,T,"mounted")}finally{}},M)},O=(d,h,N,T,M)=>{if(N&&w(d,N),T)for(let F=0;F{for(let q=G;q{const H=h.el=d.el;let{patchFlag:G,dynamicChildren:q,dirs:Q}=h;G|=d.patchFlag&16;const Z=d.props||Re,ne=h.props||Re;let ae;if(N&&Xt(N,!1),(ae=ne.onVnodeBeforeUpdate)&&wt(ae,N,h,d),Q&&Yt(h,d,N,"beforeUpdate"),N&&Xt(N,!0),q&&(!d.dynamicChildren||d.dynamicChildren.length!==q.length)&&(G=0,B=!1,q=null),(Z.innerHTML&&ne.innerHTML==null||Z.textContent&&ne.textContent==null)&&u(H,""),q?z(d.dynamicChildren,q,H,N,T,vo(h,M),F):B||ie(d,h,H,null,N,T,vo(h,M),F,!1),G>0){if(G&16)re(H,Z,ne,N,M);else if(G&2&&Z.class!==ne.class&&o(H,"class",null,ne.class,M),G&4&&o(H,"style",Z.style,ne.style,M),G&8){const me=h.dynamicProps;for(let _e=0;_e{ae&&wt(ae,N,h,d),Q&&Yt(h,d,N,"updated")},T)},z=(d,h,N,T,M,F,B)=>{for(let H=0;H{if(h!==N){if(h!==Re)for(const F in h)!qr(F)&&!(F in N)&&o(d,F,h[F],null,M,T);for(const F in N){if(qr(F))continue;const B=N[F],H=h[F];B!==H&&F!=="value"&&o(d,F,H,B,M,T)}"value"in N&&o(d,"value",h.value,N.value,M)}},Y=(d,h,N,T,M,F,B,H,G)=>{const q=h.el=d?d.el:a(""),Q=h.anchor=d?d.anchor:a("");let{patchFlag:Z,dynamicChildren:ne,slotScopeIds:ae}=h;ae&&(H=H?H.concat(ae):ae),d==null?(n(q,N,T),n(Q,N,T),L(h.children||[],N,Q,M,F,B,H,G)):Z>0&&Z&64&&ne&&d.dynamicChildren&&d.dynamicChildren.length===ne.length?(z(d.dynamicChildren,ne,N,M,F,B,H),(h.key!=null||M&&h===M.subTree)&&eu(d,h,!0)):ie(d,h,N,Q,M,F,B,H,G)},V=(d,h,N,T,M,F,B,H,G)=>{h.slotScopeIds=H,d==null?h.shapeFlag&512?M.ctx.activate(h,N,T,B,G):oe(h,N,T,M,F,B,G):ce(d,h,G)},oe=(d,h,N,T,M,F,B)=>{const H=d.component=qf(d,T,M);if(Gs(d)&&(H.ctx.renderer=W),Uf(H,!1,B),H.asyncDep){if(M&&M.registerDep(H,de,B,F),!d.el){const G=H.subTree=ve(yt);P(null,G,h,N),d.placeholder=G.el}}else de(H,d,h,N,M,F,B)},ce=(d,h,N)=>{const T=h.component=d.component;if(bf(d,h,N))if(T.asyncDep&&!T.asyncResolved){h.el=d.el,h.placeholder=d.placeholder,fe(T,h,N);return}else T.next=h,T.update();else h.el=d.el,h.placeholder=d.placeholder,T.vnode=h},de=(d,h,N,T,M,F,B)=>{const H=()=>{if(d.isMounted){let{next:Z,bu:ne,u:ae,parent:me,vnode:_e}=d;{const $t=tu(d);if($t){Z&&(Z.el=_e.el,fe(d,Z,B)),$t.asyncDep.then(()=>{const xt=()=>{d.job.flags&8||(M&&M.pendingBranch?et(xt,M):q())};xt.flags=48,et(xt,M)});return}}let be=Z,Te;Xt(d,!1),Z?(Z.el=_e.el,fe(d,Z,B)):Z=_e,ne&&gs(ne),(Te=Z.props&&Z.props.onVnodeBeforeUpdate)&&wt(Te,me,Z,_e),Xt(d,!0);const je=Hi(d),st=d.subTree;d.subTree=je,C(st,je,m(st.el||Br(st)),D(st),d,M,F),Z.el=je.el,be===null&&wf(d,je.el),ae&&et(ae,M),(Te=Z.props&&Z.props.onVnodeUpdated)&&et(()=>wt(Te,me,Z,_e),M)}else{let Z;const{el:ne,props:ae}=h,{bm:me,m:_e,parent:be,root:Te,type:je}=d,st=Hr(h);Xt(d,!1),me&&gs(me),!st&&(Z=ae&&ae.onVnodeBeforeMount)&&wt(Z,be,h),Xt(d,!0);{Te.ce&&Te.ce._hasShadowRoot()&&Te.ce._injectChildStyle(je,d.parent?d.parent.type:void 0);const $t=d.subTree=Hi(d);C(null,$t,N,T,d,M,F),h.el=$t.el}if(_e&&et(_e,M),!st&&(Z=ae&&ae.onVnodeMounted)){const $t=h;et(()=>wt(Z,be,$t),M)}(h.shapeFlag&256||be&&Hr(be.vnode)&&be.vnode.shapeFlag&256)&&d.a&&et(d.a,M),d.isMounted=!0,h=N=T=null}};d.scope.on();const G=d.effect=new pl(H);d.scope.off();const q=d.update=G.run.bind(G),Q=d.job=G.runIfDirty.bind(G);Q.i=d,Q.id=d.uid,G.scheduler=()=>pi(Q),Xt(d,!0),q()},fe=(d,h,N)=>{h.component=d;const T=d.vnode.props;d.vnode=h,d.next=null,Sf(d,h.props,T,N),Rf(d,h.children,N),Nt(),xl(d),Ot()},ie=(d,h,N,T,M,F,B,H,G=!1)=>{const q=d&&d.children,Q=d?d.shapeFlag:0,Z=h.children,{patchFlag:ne,shapeFlag:ae}=h;if(ne>0){if(ne&128){J(q,Z,N,T,M,F,B,H,G);return}else if(ne&256){Ne(q,Z,N,T,M,F,B,H,G);return}}ae&8?(Q&16&&A(q,M,F),Z!==q&&u(N,Z)):Q&16?ae&16?J(q,Z,N,T,M,F,B,H,G):A(q,M,F,!0):(Q&8&&u(N,""),ae&16&&L(Z,N,T,M,F,B,H,G))},Ne=(d,h,N,T,M,F,B,H,G)=>{d=d||rr,h=h||rr;const q=d.length,Q=h.length,Z=Math.min(q,Q);let ne;for(ne=0;neQ?A(d,M,F,!0,!1,Z):L(h,N,T,M,F,B,H,G,Z)},J=(d,h,N,T,M,F,B,H,G)=>{let q=0;const Q=h.length;let Z=d.length-1,ne=Q-1;for(;q<=Z&&q<=ne;){const ae=d[q],me=h[q]=G?Lt(h[q]):Et(h[q]);if(Tr(ae,me))C(ae,me,N,null,M,F,B,H,G);else break;q++}for(;q<=Z&&q<=ne;){const ae=d[Z],me=h[ne]=G?Lt(h[ne]):Et(h[ne]);if(Tr(ae,me))C(ae,me,N,null,M,F,B,H,G);else break;Z--,ne--}if(q>Z){if(q<=ne){const ae=ne+1,me=aene)for(;q<=Z;)x(d[q],M,F,!0),q++;else{const ae=q,me=q,_e=new Map;for(q=me;q<=ne;q++){const ot=h[q]=G?Lt(h[q]):Et(h[q]);ot.key!=null&&_e.set(ot.key,q)}let be,Te=0;const je=ne-me+1;let st=!1,$t=0;const xt=new Array(je);for(q=0;q=je){x(ot,M,F,!0);continue}let bt;if(ot.key!=null)bt=_e.get(ot.key);else for(be=me;be<=ne;be++)if(xt[be-me]===0&&Tr(ot,h[be])){bt=be;break}bt===void 0?x(ot,M,F,!0):(xt[bt-me]=q+1,bt>=$t?$t=bt:st=!0,C(ot,h[bt],N,null,M,F,B,H,G),Te++)}const Ci=st?xf(xt):rr;for(be=Ci.length-1,q=je-1;q>=0;q--){const ot=me+q,bt=h[ot],ki=h[ot+1],Ri=ot+1{const{el:F,type:B,transition:H,children:G,shapeFlag:q}=d;if(q&6){$(d.component.subTree,h,N,T);return}if(q&128){d.suspense.move(h,N,T);return}if(q&64){B.move(d,h,N,W);return}if(B===Ae){n(F,h,N);for(let Z=0;ZH.enter(F),M));else{const{leave:Z,delayLeave:ne,afterLeave:ae}=H,me=()=>{d.ctx.isUnmounted?s(F):n(F,h,N)},_e=()=>{const be=F._isLeaving||!!F[mo];F._isLeaving&&F[mo](!0),H.persisted&&!be?me():Z(F,()=>{me(),ae&&ae()})};ne?ne(F,me,_e):_e()}else n(F,h,N)},x=(d,h,N,T=!1,M=!1)=>{const{type:F,props:B,ref:H,children:G,dynamicChildren:q,shapeFlag:Q,patchFlag:Z,dirs:ne,cacheIndex:ae,memo:me}=d;if((Z===-2||q&&q.hasOnce)&&(M=!1),H!=null&&(Nt(),zr(H,null,N,d,!0),Ot()),ae!=null&&(!d.ctx||d.ctx===h)&&(h.renderCache[ae]=void 0),Q&256&&h.ctx.deactivate(d))return;const _e=Q&1&&ne,be=!Hr(d);let Te;if(be&&(Te=B&&B.onVnodeBeforeUnmount)&&wt(Te,h,d),Q&6)p(d.component,N,T);else{if(Q&128){d.suspense.unmount(N,T);return}_e&&Yt(d,null,h,"beforeUnmount"),Q&64?d.type.remove(d,h,N,W,T):q&&!q.hasOnce&&(F!==Ae||Z>0&&Z&64)?A(q,h,N,!1,!0):(F===Ae&&Z&384||!M&&Q&16)&&A(G,h,N),T&&E(d)}const je=me!=null&&ae==null;(be&&(Te=B&&B.onVnodeUnmounted)||_e||je)&&et(()=>{Te&&wt(Te,h,d),_e&&Yt(d,null,h,"unmounted"),je&&(d.el=null)},N)},E=d=>{const{type:h,el:N,anchor:T,transition:M}=d,F=h===Ae;if(F&&!M){f(N,T);return}if(h===_s){k(d),M&&!M.persisted&&M.afterLeave&&M.afterLeave();return}const B=F?Ko(d):d,H=()=>{F?m(N)&&f(N,T):s(N),M&&!M.persisted&&M.afterLeave&&M.afterLeave()};if(B&&B.shapeFlag&1&&M&&!M.persisted){const{leave:G,delayLeave:q}=M,Q=B.el,Z=()=>G(Q,H);q?q(Q,H,Z):Z()}else H()},f=(d,h)=>{let N;for(;d!==h;)N=v(d),s(d),d=N;s(h)},p=(d,h,N)=>{const{bum:T,scope:M,job:F,subTree:B,um:H,m:G,a:q}=d;Gi(G),Gi(q),T&&gs(T),M.stop(),F?(F.flags|=8,x(B,d,h,N)):B&&(B.transition=d.vnode.transition,x(B,d,h,N)),H&&et(H,h);const Q=()=>{d.isUnmounted=!0};Q.flags=16,et(Q,h)},A=(d,h,N,T=!1,M=!1,F=0)=>{for(let B=F;B{if(d.shapeFlag&6)return D(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=v(d.anchor||d.el),N=h&&h[Wd];return N?v(N):h},j=(d,h,N)=>{const T=d&&h._vnode?void 0:d&&d.component?d.component.uid:Ff();qd(()=>{d==null?h._vnode&&x(h._vnode,null,null,!0):C(h._vnode||null,d,h,null,null,null,N),h._vnode=d},T)},W={p:C,um:x,m:$,r:E,mt:oe,mc:L,pc:ie,pbc:z,n:D,o:e};return{render:j,hydrate:void 0,createApp:mf(j)}}function vo({type:e,props:t},r){return r==="svg"&&e==="foreignObject"||r==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:r}function Xt({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Af(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function eu(e,t,r=!1){const n=e.children,s=t.children;if(ue(n)&&ue(s))for(let o=0;o>1,e[r[a]]0&&(t[n]=r[o-1]),r[o]=n)}}for(o=r.length,i=r[o-1];o-- >0;)r[o]=i,i=t[i];return r}function tu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:tu(t)}function Gi(e){if(e)for(let t=0;te.__isSuspense,Tf=Symbol("_deferredEnter");function Mf(e,t){t&&t.pendingBranch?ue(e)?t.effects.push(...e):t.effects.push(e):Fd(e)}const Ae=Symbol.for("v-fgt"),Qs=Symbol.for("v-txt"),yt=Symbol.for("v-cmt"),_s=Symbol.for("v-stc"),ar=[];let at=null;function ee(e=!1){ar.push(at=e?null:[])}function nu(){ar.pop(),at=ar[ar.length-1]||null}let nn=1;function Ji(e,t=!1){nn+=e,e<0&&at&&t&&(at.hasOnce=!0)}function su(e){return e.dynamicChildren=nn>0?at||rr:null,nu(),nn>0&&at&&at.push(e),e}function se(e,t,r,n,s,o){return su(I(e,t,r,n,s,o,!0))}function tt(e,t,r,n,s){return su(ve(e,t,r,n,s,!0))}function yi(e){return e?e.__v_isVNode===!0:!1}function Tr(e,t){return e.type===t.type&&e.key===t.key}const ou=({key:e})=>e??null,$s=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?Ie(e)||Je(e)||pe(e)?{i:ct,r:e,k:t,f:!!r}:e:null);function I(e,t=null,r=null,n=0,s=null,o=e===Ae?0:1,i=!1,a=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ou(t),ref:t&&$s(t),scopeId:Il,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:ct};return a?(Os(c,r),o&128&&e.normalize(c)):r&&(c.shapeFlag|=Ie(r)?8:16),nn>0&&!i&&at&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&at.push(c),c}const ve=If;function If(e,t=null,r=null,n=0,s=null,o=!1){if((!e||e===af)&&(e=yt),yi(e)){const a=Cr(e,t,!0);return r&&Os(a,r),nn>0&&!o&&at&&(a.shapeFlag&6?at[at.indexOf(e)]=a:at.push(a)),a.patchFlag=-2,a}if(Wf(e)&&(e=e.__vccOpts),t){t=jf(t);let{class:a,style:c}=t;a&&!Ie(a)&&(t.class=Ke(a)),ke(c)&&(fi(c)&&!ue(c)&&(c=Fe({},c)),t.style=dr(c))}const i=Ie(e)?1:ru(e)?128:Bs(e)?64:ke(e)?4:pe(e)?2:0;return I(e,t,r,n,s,i,o,!0)}function jf(e){return e?fi(e)?Fe({},e):Gl(e)?Fe({},e[uu]||e):e:null}function Cr(e,t,r=!1,n=!1){const{props:s,ref:o,patchFlag:i,children:a,transition:c}=e,l=t?Df(s||{},t):s,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ou(l),ref:t&&t.ref?r&&o?ue(o)?o.concat($s(t)):[o,$s(t)]:$s(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ae?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Cr(e.ssContent),ssFallback:e.ssFallback&&Cr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&n&&Kr(u,c.clone(u)),u}function Me(e=" ",t=0){return ve(Qs,null,e,t)}function iu(e,t){const r=ve(_s,null,e);return r.staticCount=t,r}function Ce(e="",t=!1){return t?(ee(),tt(yt,null,e)):ve(yt,null,e)}function Et(e){return e==null||typeof e=="boolean"?ve(yt):ue(e)?ve(Ae,null,e.slice()):yi(e)?Lt(e):ve(Qs,null,String(e))}function Lt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Cr(e)}function Os(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(ue(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),Os(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Gl(t)?t._ctx=ct:s===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(pe(t)){if(n&65){Os(e,{default:t});return}t={default:t,_ctx:ct},r=32}else t=String(t),n&64?(r=16,t=[Me(t)]):r=8;e.children=t,e.shapeFlag|=r}function Df(...e){const t={};for(let r=0;rBe||ct;let As,sn;{const e=zs(),t=(r,n)=>{let s;return(s=e[r])||(s=e[r]=[]),s.push(n),o=>{s.length>1?s.forEach(i=>i(o)):s[0](o)}};As=t("__VUE_INSTANCE_SETTERS__",r=>Be=r),sn=t("__VUE_SSR_SETTERS__",r=>kr=r)}const dn=e=>{const t=Be;return As(e),e.scope.on(),()=>{e.scope.off(),As(t)}},Yi=()=>{Be&&Be.scope.off(),As(null)};function cu(e){return e.vnode.shapeFlag&4}let kr=!1;function Uf(e,t=!1,r=!1){t&&sn(t);const{props:n,children:s}=e.vnode,o=cu(e);Pf(e,n,o,t),kf(e,s,r||t);const i=o?Kf(e,t):void 0;return t&&sn(!1),i}function Kf(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,cf);const{setup:n}=r;if(n){Nt();const s=e.setupContext=n.length>1?Hf(e):null,o=dn(e),i=ln(n,e,0,[e.props,s]),a=ol(i);if(Ot(),o(),(a||e.sp)&&!Hr(e)&&hi(e),a){if(i.then(Yi,Yi),t)return i.then(c=>{sn(!0);try{Xi(e,c,t)}finally{sn(!1)}}).catch(c=>{un(c,e,0,void 0,!0),e.ssrRender=(l,u)=>u("")});e.asyncDep=i}else Xi(e,i)}else lu(e)}function Xi(e,t,r){pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ke(t)&&(e.setupState=Nl(t)),lu(e)}function lu(e,t,r){const n=e.type;e.render||(e.render=n.render||kt);{const s=dn(e);Nt();try{lf(e)}finally{Ot(),s()}}}const uu=Symbol(),zf={get(e,t){return We(e,"get",""),t===uu?e:e[t]}};function Hf(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,zf),slots:e.slots,emit:e.emit,expose:t}}function Zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Nl(Rd(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in Wr)return Wr[r](e)},has(t,r){return r in t||r in Wr}})):e.proxy}function Wf(e){return pe(e)&&"__vccOpts"in e}const Le=(e,t)=>Td(e,t,kr),Bf="3.5.46";/** * @vue/runtime-dom v3.5.46 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let Go;const Qi=typeof window<"u"&&window.trustedTypes;if(Qi)try{Go=Qi.createPolicy("vue",{createHTML:e=>e})}catch{}const du=Go?e=>Go.createHTML(e):e=>e,Gf="http://www.w3.org/2000/svg",Jf="http://www.w3.org/1998/Math/MathML",Dt=typeof document<"u"?document:null,Zi=Dt&&Dt.createElement("template"),Yf={insert:(e,t,r)=>{t.insertBefore(e,r||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,r,n)=>{const s=t==="svg"?Dt.createElementNS(Gf,e):t==="mathml"?Dt.createElementNS(Jf,e):r?Dt.createElement(e,{is:r}):Dt.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,r,n,s,o){const i=r?r.previousSibling:t.lastChild;if(s&&(s===o||s.nextSibling))for(;t.insertBefore(s.cloneNode(!0),r),!(s===o||!(s=s.nextSibling)););else{Zi.innerHTML=du(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const a=Zi.content;if(n==="svg"||n==="mathml"){const c=a.firstChild;for(;c.firstChild;)a.appendChild(c.firstChild);a.removeChild(c)}t.insertBefore(a,r)}return[i?i.nextSibling:t.firstChild,r?r.previousSibling:t.lastChild]}},Xf=Symbol("_vtc");function Qf(e,t,r){const n=e[Xf];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}const ea=Symbol("_vod"),Zf=Symbol("_vsh"),ep=Symbol(""),tp=/(?:^|;)\s*display\s*:/;function rp(e,t,r){const n=e.style,s=Ie(r);let o=!1;if(r&&!s){if(t)if(Ie(t))for(const i of t.split(";")){const a=i.slice(0,i.indexOf(":")).trim();r[a]==null&&Lr(n,a,"")}else for(const i in t)r[i]==null&&Lr(n,i,"");for(const i in r){i==="display"&&(o=!0);const a=r[i];a!=null?sp(e,i,!Ie(t)&&t?t[i]:void 0,a)||Lr(n,i,a):Lr(n,i,"")}}else if(s){if(t!==r){const i=n[ep];i&&(r+=";"+i),n.cssText=r,o=tp.test(r)}}else t&&e.removeAttribute("style");ea in e&&((!s||t!==r)&&(e[ea]=o?n.display:""),e[Zf]&&(n.display="none"))}const yn=/\s*!important$/;function Lr(e,t,r){if(ue(r))r.forEach(n=>Lr(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))yn.test(r)?e.setProperty(t,r.replace(yn,""),"important"):e.setProperty(t,r);else{const n=np(e,t);yn.test(r)?e.setProperty(Jt(n),r.replace(yn,""),"important"):e[n]=r}}const ta=["Webkit","Moz","ms"],_o={};function np(e,t){const r=_o[t];if(r)return r;let n=ht(t);if(n!=="filter"&&n in e)return _o[t]=n;n=cl(n);for(let s=0;s$o||(up.then(()=>$o=0),$o=Date.now());function fp(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;const s=r.value;if(ue(s)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const i=s.slice(),a=[n];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,pp=(e,t,r,n,s,o)=>{const i=s==="svg";t==="class"?Qf(e,n,i):t==="style"?rp(e,r,n):Vs(t)?Us(t)||ip(e,t,r,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):hp(e,t,n,i))?(sa(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&na(e,t,n,i,o,t!=="value")):e._isVueCE&&(mp(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ie(n)))?sa(e,ht(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),na(e,t,n,i))};function hp(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&ia(t)&&pe(r));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const s=e.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return ia(t)&&Ie(r)?!1:t in e}function mp(e,t){const r=e._def.props;if(!r)return!1;const n=ht(t);return Array.isArray(r)?r.some(s=>ht(s)===n):Object.keys(r).some(s=>ht(s)===n)}const aa=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ue(t)?r=>gs(t,r):t};function gp(e){e.target.composing=!0}function ca(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vn=Symbol("_assign"),_n=Symbol("_initialValue");function bo(e,t,r){return t&&(e=e.trim()),r&&(e=oi(e)),e}const la={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e.parentNode&&(e.type==="text"?e[_n]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[_n]=e.defaultValue.replace(/\r\n?/g,` `))),e[vn]=aa(s);const o=n||s.props&&s.props.type==="number";_r(e,t?"change":"input",i=>{i.target.composing||e[vn](bo(e.value,r,o))}),(r||o)&&_r(e,"change",()=>{e.value=bo(e.value,r,o)}),t||(_r(e,"compositionstart",gp),_r(e,"compositionend",ca),_r(e,"change",ca))},mounted(e,{value:t,modifiers:{trim:r,number:n}}){const s=t??"",o=e[_n];delete e[_n],o!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==o?e[vn](bo(e.value,r,n)):e.value=s},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:o}},i){if(e[vn]=aa(i),e.composing)return;const a=(o||e.type==="number")&&!/^0\d/.test(e.value)?oi(e.value):e.value,c=t??"";if(a===c)return;const l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!=="range"&&(n&&t===r||s&&e.value.trim()===c)||(e.value=c)}},yp=["ctrl","shift","alt","meta"],vp={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>yp.some(r=>e[`${r}Key`]&&!t.includes(r))},bs=(e,t)=>{if(!e)return e;const r=e._withMods||(e._withMods={}),n=t.join(".");return r[n]||(r[n]=((s,...o)=>{for(let i=0;i{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const o=Jt(s.key);if(t.some(i=>i===o||_p[i]===o))return e(s)}))},$p=Fe({patchProp:pp},Yf);let ua;function bp(){return ua||(ua=Nf($p))}const wp=((...e)=>{const t=bp().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=Sp(n);if(!s)return;const o=t._component;!pe(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const i=r(s,!1,Pp(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),i},t});function Pp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sp(e){return Ie(e)?document.querySelector(e):e}const Ep="modulepreload",Cp=function(e){return"/"+e},da={},wo=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){let i=function(l){return Promise.all(l.map(u=>Promise.resolve(u).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));s=i(r.map(l=>{if(l=Cp(l),l in da)return;da[l]=!0;const u=l.endsWith(".css"),m=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${m}`))return;const v=document.createElement("link");if(v.rel=u?"stylesheet":Ep,u||(v.as="script"),v.crossOrigin="",v.href=l,c&&v.setAttribute("nonce",c),document.head.appendChild(v),u)return new Promise((w,R)=>{v.addEventListener("load",w),v.addEventListener("error",()=>R(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},kp={plug:'',lib:'',kb:'',zap:'',sun:'',layers:'',chip:'',undo:'',redo:'',search:'',rec:'',play:'',stop:'',plus:'',check:'',alert:'',info:'',x:'',usb:'',upload:'',download:'',key:'',clock:'',eye:'',eyeoff:'',grip:'',chev:'',copy:'',bulb:'',edit:'',trash:'',shield:'',link:'',globe:'',cable:'',refresh:'',msg:'',home:''},Rp=["innerHTML"],Ge=Ye({__name:"Ic",props:{name:{},size:{}},setup(e){return(t,r)=>(ee(),se("svg",{class:Ke(["i",e.size??""]),viewBox:"0 0 24 24","aria-hidden":"true",innerHTML:te(kp)[e.name]},null,10,Rp))}}),Pr=typeof matchMedia=="function"?matchMedia("(prefers-reduced-motion: reduce)"):null,on=()=>!!(Pr!=null&&Pr.matches)||/(?:^|[?&])motion=reduce(?:&|$)/.test(location.search);function Np(){const e=()=>document.documentElement.classList.toggle("rm",on());e(),Pr==null||Pr.addEventListener("change",e)}function __(){const e=navigator.userAgent;return/Mac OS X/.test(e)&&!/iPhone|iPad|iPod/.test(e)?"打开路径:系统设置 → 辅助功能 → 显示 → 减弱动态效果。":/Windows NT/.test(e)?"打开路径:设置 → 辅助功能 → 视觉效果 → 动画效果。":"在系统的辅助功能设置中关闭「减少动态效果」或同类选项。"}const fu="og-rm-hint",$_=()=>{try{return localStorage.getItem(fu)==="1"}catch{return!1}},b_=()=>{try{localStorage.setItem(fu,"1")}catch{}},Op=["id"],Ap=["onPointerenter","onPointerleave"],xp=["x","y","fill"],Tp=["x","y"],Mp=["stroke"],Ip={class:"mark-accent-slot"},jp=["fill"],Dp={key:0,class:"mark-catch",x:"32.6",y:"-0.4",width:"15.8",height:"15.8"},Lp=.9,Fp=.74,pu=Ye({__name:"BrandMark",props:{id:{},mono:{},solid:{type:Boolean},live:{type:Boolean},pressable:{type:Boolean}},setup(e){const t=e,r=t.id??"og-mark",n=[5,19,33].flatMap(b=>[3,17,31].filter(O=>!(O===31&&b===5)).map(O=>({x:O,y:b}))),s=t.mono??(t.solid?"#3D50F0":`url(#${r})`),o=!!t.pressable&&!on()&&typeof matchMedia=="function"&&matchMedia("(hover: hover) and (pointer: fine)").matches,i=[],a=[];let c=-1,l=0,u=!1,m=0,v=!1,w=0;function R(b){return O=>{O instanceof SVGGElement&&(i[b]=O)}}function C(b){for(;a.length<=b;)a.push({sx:1,sy:1,vx:0,vy:0,tx:1,ty:1});return a[b]}function _(b,O,L,U){const z=(L-b)*240-O*14;return O+=z*U,b+=O*U,[b,O]}function P(b){const O=i[b],L=a[b];if(!O||!L)return;const U=Math.abs(L.sx-1)<.004&&Math.abs(L.sy-1)<.004;O.style.transform=U?"":`scale(${L.sx.toFixed(3)}, ${L.sy.toFixed(3)})`}function g(b){if(!u)return;const O=Math.min(.032,m?(b-m)/1e3:.016);m=b;let L=!1;for(let U=0;U.004||Math.abs(z.sy-z.ty)>.004||Math.abs(z.vx)>.02||Math.abs(z.vy)>.02)&&(L=!0)}L?l=requestAnimationFrame(g):u=!1}function S(){u||(u=!0,m=0,l=requestAnimationFrame(g))}function k(b){if(v){c=b,i.forEach((O,L)=>{var U;return(U=O.parentElement)==null?void 0:U.classList.toggle("is-held",L===b)});for(let O=0;O{o&&(w=window.setTimeout(()=>{v=!0},1550))}),Ys(()=>{window.clearTimeout(w),u=!1,cancelAnimationFrame(l)}),(b,O)=>(ee(),se("svg",{viewBox:"0 0 48 48","aria-hidden":"true",class:Ke({"mark-live":e.live,"mark-pressable":te(o)})},[I("defs",null,[I("linearGradient",{id:te(r),x1:"0",y1:"0",x2:"1",y2:"1"},[...O[2]||(O[2]=[I("stop",{offset:"0","stop-color":"#3D5AFE"},null,-1),I("stop",{offset:"1","stop-color":"#8B5CF6"},null,-1)])],8,Op)]),(ee(!0),se(Ae,null,ut(te(n),(L,U)=>(ee(),se("g",{key:`${L.x}-${L.y}`,class:"mark-hit",onPointerenter:z=>k(U),onPointerleave:z=>y(U)},[I("g",{ref_for:!0,ref:R(U),class:"mark-squish"},[I("rect",{class:"mark-key",style:dr({"--i":U}),x:L.x,y:L.y,width:"10",height:"10",rx:"2.75",fill:e.mono??"#151A2D"},null,12,xp)],512),te(o)?(ee(),se("rect",{key:0,class:"mark-catch",x:L.x-1.2,y:L.y-1.2,width:"12.4",height:"12.4"},null,8,Tp)):Ce("",!0)],40,Ap))),128)),e.solid?Ce("",!0):(ee(),se("path",{key:0,d:"M28 11.5h3.6M28 8h3.6",stroke:e.mono??"#8B5CF6","stroke-width":"2.15","stroke-linecap":"round",opacity:".7"},null,8,Mp)),I("g",{class:"mark-hit",onPointerenter:O[0]||(O[0]=L=>k(te(n).length)),onPointerleave:O[1]||(O[1]=L=>y(te(n).length))},[I("g",{ref:R(te(n).length),class:"mark-squish"},[I("g",Ip,[I("rect",{class:"mark-accent",x:"34",y:"1",width:"13",height:"13",rx:"3.5",fill:te(s)},null,8,jp)])],512),te(o)?(ee(),se("rect",Dp)):Ce("",!0)],32)],2))}}),Jo={name:"OneGrid",usb:"OneGrid"},qp="OG-24A19C";function Yo(e){var r;if(e.conn!=="ready"||e.mode==null)return{ok:!1,reason:"disconnected"};if(e.mode!=="real")return{ok:!1,reason:"sim"};const t=((r=e.serial)==null?void 0:r.trim())??"";return!t||t.toLowerCase()===qp.toLowerCase()||t.toLowerCase().startsWith("og-sim")?{ok:!1,reason:"unread"}:{ok:!0,serial:t}}function fn(e){return Yo(e).ok}function Vp(e){if(!e||e.hostname!=="localhost"&&e.hostname!=="127.0.0.1")return null;const t=new URLSearchParams(e.search).get("shot");return t==="success"||t==="wait"?t:null}function Up(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},Po={},Mt={},Qt={},So={},Eo={},Co={},fa;function xs(){return fa||(fa=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(g){if(super(),!e.IDENTIFIER.test(g))throw new Error("CodeGen: name must be a valid identifier");this.str=g}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(g){super(),this._items=typeof g=="string"?[g]:g}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const g=this._items[0];return g===""||g==='""'}get str(){var g;return(g=this._str)!==null&&g!==void 0?g:this._str=this._items.reduce((S,k)=>`${S}${k}`,"")}get names(){var g;return(g=this._names)!==null&&g!==void 0?g:this._names=this._items.reduce((S,k)=>(k instanceof r&&(S[k.str]=(S[k.str]||0)+1),S),{})}}e._Code=n,e.nil=new n("");function s(P,...g){const S=[P[0]];let k=0;for(;k{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${l}${m.scopePath}`})}scopeCode(l=this._values,u,m){return this._reduceValues(l,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},u,m)}_reduceValues(l,u,m={},v){let w=t.nil;for(const R in l){const C=l[R];if(!C)continue;const _=m[R]=m[R]||new Map;C.forEach(P=>{if(_.has(P))return;_.set(P,n.Started);let g=u(P);if(g){const S=this.opts.es5?e.varKinds.var:e.varKinds.const;w=(0,t._)`${w}${S} ${P} = ${g};${this.opts._n}`}else if(g=v==null?void 0:v(P))w=(0,t._)`${w}${g}${this.opts._n}`;else throw new r(P);_.set(P,n.Completed)})}return w}}e.ValueScope=a})(ko)),ko}var ma;function he(){return ma||(ma=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=xs(),r=ha();var n=xs();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var s=ha();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class o{optimizeNodes(){return this}optimizeNames(f,p){return this}}class i extends o{constructor(f,p,A){super(),this.varKind=f,this.name=p,this.rhs=A}render({es5:f,_n:p}){const A=f?r.varKinds.var:this.varKind,D=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${D};`+p}optimizeNames(f,p){if(f[this.name.str])return this.rhs&&(this.rhs=oe(this.rhs,f,p)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends o{constructor(f,p,A){super(),this.lhs=f,this.rhs=p,this.sideEffects=A}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,p){if(!(this.lhs instanceof t.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=oe(this.rhs,f,p),this}get names(){const f=this.lhs instanceof t.Name?{}:{...this.lhs.names};return V(f,this.rhs)}}class c extends a{constructor(f,p,A,D){super(f,A,D),this.op=p}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class l extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class u extends o{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class m extends o{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class v extends o{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(f,p){return this.code=oe(this.code,f,p),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class w extends o{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce((p,A)=>p+A.render(f),"")}optimizeNodes(){const{nodes:f}=this;let p=f.length;for(;p--;){const A=f[p].optimizeNodes();Array.isArray(A)?f.splice(p,1,...A):A?f[p]=A:f.splice(p,1)}return f.length>0?this:void 0}optimizeNames(f,p){const{nodes:A}=this;let D=A.length;for(;D--;){const j=A[D];j.optimizeNames(f,p)||(ce(f,j.names),A.splice(D,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((f,p)=>Y(f,p.names),{})}}class R extends w{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class C extends w{}class _ extends R{}_.kind="else";class P extends R{constructor(f,p){super(p),this.condition=f}render(f){let p=`if(${this.condition})`+super.render(f);return this.else&&(p+="else "+this.else.render(f)),p}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let p=this.else;if(p){const A=p.optimizeNodes();p=this.else=Array.isArray(A)?new _(A):A}if(p)return f===!1?p instanceof P?p:p.nodes:this.nodes.length?this:new P(de(f),p instanceof P?[p]:p.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,p){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(f,p),!!(super.optimizeNames(f,p)||this.else))return this.condition=oe(this.condition,f,p),this}get names(){const f=super.names;return V(f,this.condition),this.else&&Y(f,this.else.names),f}}P.kind="if";class g extends R{}g.kind="for";class S extends g{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,p){if(super.optimizeNames(f,p))return this.iteration=oe(this.iteration,f,p),this}get names(){return Y(super.names,this.iteration.names)}}class k extends g{constructor(f,p,A,D){super(),this.varKind=f,this.name=p,this.from=A,this.to=D}render(f){const p=f.es5?r.varKinds.var:this.varKind,{name:A,from:D,to:j}=this;return`for(${p} ${A}=${D}; ${A}<${j}; ${A}++)`+super.render(f)}get names(){const f=V(super.names,this.from);return V(f,this.to)}}class y extends g{constructor(f,p,A,D){super(),this.loop=f,this.varKind=p,this.name=A,this.iterable=D}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,p){if(super.optimizeNames(f,p))return this.iterable=oe(this.iterable,f,p),this}get names(){return Y(super.names,this.iterable.names)}}class b extends R{constructor(f,p,A){super(),this.name=f,this.args=p,this.async=A}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}b.kind="func";class O extends w{render(f){return"return "+super.render(f)}}O.kind="return";class L extends R{render(f){let p="try"+super.render(f);return this.catch&&(p+=this.catch.render(f)),this.finally&&(p+=this.finally.render(f)),p}optimizeNodes(){var f,p;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),(p=this.finally)===null||p===void 0||p.optimizeNodes(),this}optimizeNames(f,p){var A,D;return super.optimizeNames(f,p),(A=this.catch)===null||A===void 0||A.optimizeNames(f,p),(D=this.finally)===null||D===void 0||D.optimizeNames(f,p),this}get names(){const f=super.names;return this.catch&&Y(f,this.catch.names),this.finally&&Y(f,this.finally.names),f}}class U extends R{constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}U.kind="catch";class z extends R{render(f){return"finally"+super.render(f)}}z.kind="finally";class re{constructor(f,p={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...p,_n:p.lines?` `:""},this._extScope=f,this._scope=new r.Scope({parent:f}),this._nodes=[new C]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,p){const A=this._extScope.value(f,p);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(f,p){return this._extScope.getValue(f,p)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,p,A,D){const j=this._scope.toName(p);return A!==void 0&&D&&(this._constants[j.str]=A),this._leafNode(new i(f,j,A)),j}const(f,p,A){return this._def(r.varKinds.const,f,p,A)}let(f,p,A){return this._def(r.varKinds.let,f,p,A)}var(f,p,A){return this._def(r.varKinds.var,f,p,A)}assign(f,p,A){return this._leafNode(new a(f,p,A))}add(f,p){return this._leafNode(new c(f,e.operators.ADD,p))}code(f){return typeof f=="function"?f():f!==t.nil&&this._leafNode(new v(f)),this}object(...f){const p=["{"];for(const[A,D]of f)p.length>1&&p.push(","),p.push(A),(A!==D||this.opts.es5)&&(p.push(":"),(0,t.addCodeArg)(p,D));return p.push("}"),new t._Code(p)}if(f,p,A){if(this._blockNode(new P(f)),p&&A)this.code(p).else().code(A).endIf();else if(p)this.code(p).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new P(f))}else(){return this._elseNode(new _)}endIf(){return this._endBlockNode(P,_)}_for(f,p){return this._blockNode(f),p&&this.code(p).endFor(),this}for(f,p){return this._for(new S(f),p)}forRange(f,p,A,D,j=this.opts.es5?r.varKinds.var:r.varKinds.let){const W=this._scope.toName(f);return this._for(new k(j,W,p,A),()=>D(W))}forOf(f,p,A,D=r.varKinds.const){const j=this._scope.toName(f);if(this.opts.es5){const W=p instanceof t.Name?p:this.var("_arr",p);return this.forRange("_i",0,(0,t._)`${W}.length`,X=>{this.var(j,(0,t._)`${W}[${X}]`),A(j)})}return this._for(new y("of",D,j,p),()=>A(j))}forIn(f,p,A,D=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,t._)`Object.keys(${p})`,A);const j=this._scope.toName(f);return this._for(new y("in",D,j,p),()=>A(j))}endFor(){return this._endBlockNode(g)}label(f){return this._leafNode(new l(f))}break(f){return this._leafNode(new u(f))}return(f){const p=new O;if(this._blockNode(p),this.code(f),p.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(O)}try(f,p,A){if(!p&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const D=new L;if(this._blockNode(D),this.code(f),p){const j=this.name("e");this._currNode=D.catch=new U(j),p(j)}return A&&(this._currNode=D.finally=new z,this.code(A)),this._endBlockNode(U,z)}throw(f){return this._leafNode(new m(f))}block(f,p){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock(p),this}endBlock(f){const p=this._blockStarts.pop();if(p===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-p;if(A<0||f!==void 0&&A!==f)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${f} expected`);return this._nodes.length=p,this}func(f,p=t.nil,A,D){return this._blockNode(new b(f,p,A)),D&&this.code(D).endFunc(),this}endFunc(){return this._endBlockNode(b)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,p){const A=this._currNode;if(A instanceof f||p&&A instanceof p)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${p?`${f.kind}/${p.kind}`:f.kind}"`)}_elseNode(f){const p=this._currNode;if(!(p instanceof P))throw new Error('CodeGen: "else" without "if"');return this._currNode=p.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const p=this._nodes;p[p.length-1]=f}}e.CodeGen=re;function Y(E,f){for(const p in f)E[p]=(E[p]||0)+(f[p]||0);return E}function V(E,f){return f instanceof t._CodeOrName?Y(E,f.names):E}function oe(E,f,p){if(E instanceof t.Name)return A(E);if(!D(E))return E;return new t._Code(E._items.reduce((j,W)=>(W instanceof t.Name&&(W=A(W)),W instanceof t._Code?j.push(...W._items):j.push(W),j),[]));function A(j){const W=p[j.str];return W===void 0||f[j.str]!==1?j:(delete f[j.str],W)}function D(j){return j instanceof t._Code&&j._items.some(W=>W instanceof t.Name&&f[W.str]===1&&p[W.str]!==void 0)}}function ce(E,f){for(const p in f)E[p]=(E[p]||0)-(f[p]||0)}function de(E){return typeof E=="boolean"||typeof E=="number"||E===null?!E:(0,t._)`!${x(E)}`}e.not=de;const fe=$(e.operators.AND);function ie(...E){return E.reduce(fe)}e.and=ie;const Ne=$(e.operators.OR);function J(...E){return E.reduce(Ne)}e.or=J;function $(E){return(f,p)=>f===t.nil?p:p===t.nil?f:(0,t._)`${x(f)} ${E} ${x(p)}`}function x(E){return E instanceof t.Name?E:(0,t._)`(${E})`}})(Eo)),Eo}var ge={},ga;function ye(){if(ga)return ge;ga=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.checkStrictMode=ge.getErrorPath=ge.Type=ge.useFunc=ge.setEvaluated=ge.evaluatedPropsToName=ge.mergeEvaluated=ge.eachItem=ge.unescapeJsonPointer=ge.escapeJsonPointer=ge.escapeFragment=ge.unescapeFragment=ge.schemaRefOrVal=ge.schemaHasRulesButRef=ge.schemaHasRules=ge.checkUnknownRules=ge.alwaysValidSchema=ge.toHash=void 0;const e=he(),t=xs();function r(y){const b={};for(const O of y)b[O]=!0;return b}ge.toHash=r;function n(y,b){return typeof b=="boolean"?b:Object.keys(b).length===0?!0:(s(y,b),!o(b,y.self.RULES.all))}ge.alwaysValidSchema=n;function s(y,b=y.schema){const{opts:O,self:L}=y;if(!O.strictSchema||typeof b=="boolean")return;const U=L.RULES.keywords;for(const z in b)U[z]||k(y,`unknown keyword: "${z}"`)}ge.checkUnknownRules=s;function o(y,b){if(typeof y=="boolean")return!y;for(const O in y)if(b[O])return!0;return!1}ge.schemaHasRules=o;function i(y,b){if(typeof y=="boolean")return!y;for(const O in y)if(O!=="$ref"&&b.all[O])return!0;return!1}ge.schemaHasRulesButRef=i;function a({topSchemaRef:y,schemaPath:b},O,L,U){if(!U){if(typeof O=="number"||typeof O=="boolean")return O;if(typeof O=="string")return(0,e._)`${O}`}return(0,e._)`${y}${b}${(0,e.getProperty)(L)}`}ge.schemaRefOrVal=a;function c(y){return m(decodeURIComponent(y))}ge.unescapeFragment=c;function l(y){return encodeURIComponent(u(y))}ge.escapeFragment=l;function u(y){return typeof y=="number"?`${y}`:y.replace(/~/g,"~0").replace(/\//g,"~1")}ge.escapeJsonPointer=u;function m(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")}ge.unescapeJsonPointer=m;function v(y,b){if(Array.isArray(y))for(const O of y)b(O);else b(y)}ge.eachItem=v;function w({mergeNames:y,mergeToName:b,mergeValues:O,resultToName:L}){return(U,z,re,Y)=>{const V=re===void 0?z:re instanceof e.Name?(z instanceof e.Name?y(U,z,re):b(U,z,re),re):z instanceof e.Name?(b(U,re,z),z):O(z,re);return Y===e.Name&&!(V instanceof e.Name)?L(U,V):V}}ge.mergeEvaluated={props:w({mergeNames:(y,b,O)=>y.if((0,e._)`${O} !== true && ${b} !== undefined`,()=>{y.if((0,e._)`${b} === true`,()=>y.assign(O,!0),()=>y.assign(O,(0,e._)`${O} || {}`).code((0,e._)`Object.assign(${O}, ${b})`))}),mergeToName:(y,b,O)=>y.if((0,e._)`${O} !== true`,()=>{b===!0?y.assign(O,!0):(y.assign(O,(0,e._)`${O} || {}`),C(y,O,b))}),mergeValues:(y,b)=>y===!0?!0:{...y,...b},resultToName:R}),items:w({mergeNames:(y,b,O)=>y.if((0,e._)`${O} !== true && ${b} !== undefined`,()=>y.assign(O,(0,e._)`${b} === true ? true : ${O} > ${b} ? ${O} : ${b}`)),mergeToName:(y,b,O)=>y.if((0,e._)`${O} !== true`,()=>y.assign(O,b===!0?!0:(0,e._)`${O} > ${b} ? ${O} : ${b}`)),mergeValues:(y,b)=>y===!0?!0:Math.max(y,b),resultToName:(y,b)=>y.var("items",b)})};function R(y,b){if(b===!0)return y.var("props",!0);const O=y.var("props",(0,e._)`{}`);return b!==void 0&&C(y,O,b),O}ge.evaluatedPropsToName=R;function C(y,b,O){Object.keys(O).forEach(L=>y.assign((0,e._)`${b}${(0,e.getProperty)(L)}`,!0))}ge.setEvaluated=C;const _={};function P(y,b){return y.scopeValue("func",{ref:b,code:_[b.code]||(_[b.code]=new t._Code(b.code))})}ge.useFunc=P;var g;(function(y){y[y.Num=0]="Num",y[y.Str=1]="Str"})(g||(ge.Type=g={}));function S(y,b,O){if(y instanceof e.Name){const L=b===g.Num;return O?L?(0,e._)`"[" + ${y} + "]"`:(0,e._)`"['" + ${y} + "']"`:L?(0,e._)`"/" + ${y}`:(0,e._)`"/" + ${y}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return O?(0,e.getProperty)(y).toString():"/"+u(y)}ge.getErrorPath=S;function k(y,b,O=y.opts.strictSchema){if(O){if(b=`strict mode: ${b}`,O===!0)throw new Error(b);y.self.logger.warn(b)}}return ge.checkStrictMode=k,ge}var bn={},ya;function vt(){if(ya)return bn;ya=1,Object.defineProperty(bn,"__esModule",{value:!0});const e=he(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return bn.default=t,bn}var va;function eo(){return va||(va=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=he(),r=ye(),n=vt();e.keywordError={message:({keyword:_})=>(0,t.str)`must pass "${_}" keyword validation`},e.keyword$DataError={message:({keyword:_,schemaType:P})=>P?(0,t.str)`"${_}" keyword must be ${P} ($data)`:(0,t.str)`"${_}" keyword is invalid ($data)`};function s(_,P=e.keywordError,g,S){const{it:k}=_,{gen:y,compositeRule:b,allErrors:O}=k,L=m(_,P,g);S??(b||O)?c(y,L):l(k,(0,t._)`[${L}]`)}e.reportError=s;function o(_,P=e.keywordError,g){const{it:S}=_,{gen:k,compositeRule:y,allErrors:b}=S,O=m(_,P,g);c(k,O),y||b||l(S,n.default.vErrors)}e.reportExtraError=o;function i(_,P){_.assign(n.default.errors,P),_.if((0,t._)`${n.default.vErrors} !== null`,()=>_.if(P,()=>_.assign((0,t._)`${n.default.vErrors}.length`,P),()=>_.assign(n.default.vErrors,null)))}e.resetErrorsCount=i;function a({gen:_,keyword:P,schemaValue:g,data:S,errsCount:k,it:y}){if(k===void 0)throw new Error("ajv implementation error");const b=_.name("err");_.forRange("i",k,n.default.errors,O=>{_.const(b,(0,t._)`${n.default.vErrors}[${O}]`),_.if((0,t._)`${b}.instancePath === undefined`,()=>_.assign((0,t._)`${b}.instancePath`,(0,t.strConcat)(n.default.instancePath,y.errorPath))),_.assign((0,t._)`${b}.schemaPath`,(0,t.str)`${y.errSchemaPath}/${P}`),y.opts.verbose&&(_.assign((0,t._)`${b}.schema`,g),_.assign((0,t._)`${b}.data`,S))})}e.extendErrors=a;function c(_,P){const g=_.const("err",P);_.if((0,t._)`${n.default.vErrors} === null`,()=>_.assign(n.default.vErrors,(0,t._)`[${g}]`),(0,t._)`${n.default.vErrors}.push(${g})`),_.code((0,t._)`${n.default.errors}++`)}function l(_,P){const{gen:g,validateName:S,schemaEnv:k}=_;k.$async?g.throw((0,t._)`new ${_.ValidationError}(${P})`):(g.assign((0,t._)`${S}.errors`,P),g.return(!1))}const u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(_,P,g){const{createErrors:S}=_.it;return S===!1?(0,t._)`{}`:v(_,P,g)}function v(_,P,g={}){const{gen:S,it:k}=_,y=[w(k,g),R(_,g)];return C(_,P,y),S.object(...y)}function w({errorPath:_},{instancePath:P}){const g=P?(0,t.str)`${_}${(0,r.getErrorPath)(P,r.Type.Str)}`:_;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,g)]}function R({keyword:_,it:{errSchemaPath:P}},{schemaPath:g,parentSchema:S}){let k=S?P:(0,t.str)`${P}/${_}`;return g&&(k=(0,t.str)`${k}${(0,r.getErrorPath)(g,r.Type.Str)}`),[u.schemaPath,k]}function C(_,{params:P,message:g},S){const{keyword:k,data:y,schemaValue:b,it:O}=_,{opts:L,propertyName:U,topSchemaRef:z,schemaPath:re}=O;S.push([u.keyword,k],[u.params,typeof P=="function"?P(_):P||(0,t._)`{}`]),L.messages&&S.push([u.message,typeof g=="function"?g(_):g]),L.verbose&&S.push([u.schema,b],[u.parentSchema,(0,t._)`${z}${re}`],[n.default.data,y]),U&&S.push([u.propertyName,U])}})(So)),So}var _a;function Kp(){if(_a)return Qt;_a=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.boolOrEmptySchema=Qt.topBoolOrEmptySchema=void 0;const e=eo(),t=he(),r=vt(),n={message:"boolean schema is false"};function s(a){const{gen:c,schema:l,validateName:u}=a;l===!1?i(a,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}Qt.topBoolOrEmptySchema=s;function o(a,c){const{gen:l,schema:u}=a;u===!1?(l.var(c,!1),i(a)):l.var(c,!0)}Qt.boolOrEmptySchema=o;function i(a,c){const{gen:l,data:u}=a,m={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(m,n,void 0,c)}return Qt}var Ue={},Zt={},$a;function hu(){if($a)return Zt;$a=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.getRules=Zt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(s){return typeof s=="string"&&t.has(s)}Zt.isJSONType=r;function n(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return Zt.getRules=n,Zt}var It={},ba;function mu(){if(ba)return It;ba=1,Object.defineProperty(It,"__esModule",{value:!0}),It.shouldUseRule=It.shouldUseGroup=It.schemaHasRulesForType=void 0;function e({schema:n,self:s},o){const i=s.RULES.types[o];return i&&i!==!0&&t(n,i)}It.schemaHasRulesForType=e;function t(n,s){return s.rules.some(o=>r(n,o))}It.shouldUseGroup=t;function r(n,s){var o;return n[s.keyword]!==void 0||((o=s.definition.implements)===null||o===void 0?void 0:o.some(i=>n[i]!==void 0))}return It.shouldUseRule=r,It}var wa;function Ts(){if(wa)return Ue;wa=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.reportTypeError=Ue.checkDataTypes=Ue.checkDataType=Ue.coerceAndCheckDataType=Ue.getJSONTypes=Ue.getSchemaTypes=Ue.DataType=void 0;const e=hu(),t=mu(),r=eo(),n=he(),s=ye();var o;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(o||(Ue.DataType=o={}));function i(g){const S=a(g.type);if(S.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!S.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&S.push("null")}return S}Ue.getSchemaTypes=i;function a(g){const S=Array.isArray(g)?g:g?[g]:[];if(S.every(e.isJSONType))return S;throw new Error("type must be JSONType or JSONType[]: "+S.join(","))}Ue.getJSONTypes=a;function c(g,S){const{gen:k,data:y,opts:b}=g,O=u(S,b.coerceTypes),L=S.length>0&&!(O.length===0&&S.length===1&&(0,t.schemaHasRulesForType)(g,S[0]));if(L){const U=R(S,y,b.strictNumbers,o.Wrong);k.if(U,()=>{O.length?m(g,S,O):_(g)})}return L}Ue.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(g,S){return S?g.filter(k=>l.has(k)||S==="array"&&k==="array"):[]}function m(g,S,k){const{gen:y,data:b,opts:O}=g,L=y.let("dataType",(0,n._)`typeof ${b}`),U=y.let("coerced",(0,n._)`undefined`);O.coerceTypes==="array"&&y.if((0,n._)`${L} == 'object' && Array.isArray(${b}) && ${b}.length == 1`,()=>y.assign(b,(0,n._)`${b}[0]`).assign(L,(0,n._)`typeof ${b}`).if(R(S,b,O.strictNumbers),()=>y.assign(U,b))),y.if((0,n._)`${U} !== undefined`);for(const re of k)(l.has(re)||re==="array"&&O.coerceTypes==="array")&&z(re);y.else(),_(g),y.endIf(),y.if((0,n._)`${U} !== undefined`,()=>{y.assign(b,U),v(g,U)});function z(re){switch(re){case"string":y.elseIf((0,n._)`${L} == "number" || ${L} == "boolean"`).assign(U,(0,n._)`"" + ${b}`).elseIf((0,n._)`${b} === null`).assign(U,(0,n._)`""`);return;case"number":y.elseIf((0,n._)`${L} == "boolean" || ${b} === null || (${L} == "string" && ${b} && ${b} == +${b})`).assign(U,(0,n._)`+${b}`);return;case"integer":y.elseIf((0,n._)`${L} === "boolean" || ${b} === null || (${L} === "string" && ${b} && ${b} == +${b} && !(${b} % 1))`).assign(U,(0,n._)`+${b}`);return;case"boolean":y.elseIf((0,n._)`${b} === "false" || ${b} === 0 || ${b} === null`).assign(U,!1).elseIf((0,n._)`${b} === "true" || ${b} === 1`).assign(U,!0);return;case"null":y.elseIf((0,n._)`${b} === "" || ${b} === 0 || ${b} === false`),y.assign(U,null);return;case"array":y.elseIf((0,n._)`${L} === "string" || ${L} === "number" || ${L} === "boolean" || ${b} === null`).assign(U,(0,n._)`[${b}]`)}}}function v({gen:g,parentData:S,parentDataProperty:k},y){g.if((0,n._)`${S} !== undefined`,()=>g.assign((0,n._)`${S}[${k}]`,y))}function w(g,S,k,y=o.Correct){const b=y===o.Correct?n.operators.EQ:n.operators.NEQ;let O;switch(g){case"null":return(0,n._)`${S} ${b} null`;case"array":O=(0,n._)`Array.isArray(${S})`;break;case"object":O=(0,n._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":O=L((0,n._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":O=L();break;default:return(0,n._)`typeof ${S} ${b} ${g}`}return y===o.Correct?O:(0,n.not)(O);function L(U=n.nil){return(0,n.and)((0,n._)`typeof ${S} == "number"`,U,k?(0,n._)`isFinite(${S})`:n.nil)}}Ue.checkDataType=w;function R(g,S,k,y){if(g.length===1)return w(g[0],S,k,y);let b;const O=(0,s.toHash)(g);if(O.array&&O.object){const L=(0,n._)`typeof ${S} != "object"`;b=O.null?L:(0,n._)`!${S} || ${L}`,delete O.null,delete O.array,delete O.object}else b=n.nil;O.number&&delete O.integer;for(const L in O)b=(0,n.and)(b,w(L,S,k,y));return b}Ue.checkDataTypes=R;const C={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:S})=>typeof g=="string"?(0,n._)`{type: ${g}}`:(0,n._)`{type: ${S}}`};function _(g){const S=P(g);(0,r.reportError)(S,C)}Ue.reportTypeError=_;function P(g){const{gen:S,data:k,schema:y}=g,b=(0,s.schemaRefOrVal)(g,y,"type");return{gen:S,keyword:"type",data:k,schema:y.type,schemaCode:b,schemaValue:b,parentSchema:y,params:{},it:g}}return Ue}var Mr={},Pa;function zp(){if(Pa)return Mr;Pa=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.assignDefaults=void 0;const e=he(),t=ye();function r(s,o){const{properties:i,items:a}=s.schema;if(o==="object"&&i)for(const c in i)n(s,c,i[c].default);else o==="array"&&Array.isArray(a)&&a.forEach((c,l)=>n(s,l,c.default))}Mr.assignDefaults=r;function n(s,o,i){const{gen:a,compositeRule:c,data:l,opts:u}=s;if(i===void 0)return;const m=(0,e._)`${l}${(0,e.getProperty)(o)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${m}`);return}let v=(0,e._)`${m} === undefined`;u.useDefaults==="empty"&&(v=(0,e._)`${v} || ${m} === null || ${m} === ""`),a.if(v,(0,e._)`${m} = ${(0,e.stringify)(i)}`)}return Mr}var ft={},Pe={},Sa;function _t(){if(Sa)return Pe;Sa=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.validateUnion=Pe.validateArray=Pe.usePattern=Pe.callValidateCode=Pe.schemaProperties=Pe.allSchemaProperties=Pe.noPropertyInData=Pe.propertyInData=Pe.isOwnProperty=Pe.hasPropFunc=Pe.reportMissingProp=Pe.checkMissingProp=Pe.checkReportMissingProp=void 0;const e=he(),t=ye(),r=vt(),n=ye();function s(g,S){const{gen:k,data:y,it:b}=g;k.if(u(k,y,S,b.opts.ownProperties),()=>{g.setParams({missingProperty:(0,e._)`${S}`},!0),g.error()})}Pe.checkReportMissingProp=s;function o({gen:g,data:S,it:{opts:k}},y,b){return(0,e.or)(...y.map(O=>(0,e.and)(u(g,S,O,k.ownProperties),(0,e._)`${b} = ${O}`)))}Pe.checkMissingProp=o;function i(g,S){g.setParams({missingProperty:S},!0),g.error()}Pe.reportMissingProp=i;function a(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Pe.hasPropFunc=a;function c(g,S,k){return(0,e._)`${a(g)}.call(${S}, ${k})`}Pe.isOwnProperty=c;function l(g,S,k,y){const b=(0,e._)`${S}${(0,e.getProperty)(k)} !== undefined`;return y?(0,e._)`${b} && ${c(g,S,k)}`:b}Pe.propertyInData=l;function u(g,S,k,y){const b=(0,e._)`${S}${(0,e.getProperty)(k)} === undefined`;return y?(0,e.or)(b,(0,e.not)(c(g,S,k))):b}Pe.noPropertyInData=u;function m(g){return g?Object.keys(g).filter(S=>S!=="__proto__"):[]}Pe.allSchemaProperties=m;function v(g,S){return m(S).filter(k=>!(0,t.alwaysValidSchema)(g,S[k]))}Pe.schemaProperties=v;function w({schemaCode:g,data:S,it:{gen:k,topSchemaRef:y,schemaPath:b,errorPath:O},it:L},U,z,re){const Y=re?(0,e._)`${g}, ${S}, ${y}${b}`:S,V=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,O)],[r.default.parentData,L.parentData],[r.default.parentDataProperty,L.parentDataProperty],[r.default.rootData,r.default.rootData]];L.opts.dynamicRef&&V.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const oe=(0,e._)`${Y}, ${k.object(...V)}`;return z!==e.nil?(0,e._)`${U}.call(${z}, ${oe})`:(0,e._)`${U}(${oe})`}Pe.callValidateCode=w;const R=(0,e._)`new RegExp`;function C({gen:g,it:{opts:S}},k){const y=S.unicodeRegExp?"u":"",{regExp:b}=S.code,O=b(k,y);return g.scopeValue("pattern",{key:O.toString(),ref:O,code:(0,e._)`${b.code==="new RegExp"?R:(0,n.useFunc)(g,b)}(${k}, ${y})`})}Pe.usePattern=C;function _(g){const{gen:S,data:k,keyword:y,it:b}=g,O=S.name("valid");if(b.allErrors){const U=S.let("valid",!0);return L(()=>S.assign(U,!1)),U}return S.var(O,!0),L(()=>S.break()),O;function L(U){const z=S.const("len",(0,e._)`${k}.length`);S.forRange("i",0,z,re=>{g.subschema({keyword:y,dataProp:re,dataPropType:t.Type.Num},O),S.if((0,e.not)(O),U)})}}Pe.validateArray=_;function P(g){const{gen:S,schema:k,keyword:y,it:b}=g;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(z=>(0,t.alwaysValidSchema)(b,z))&&!b.opts.unevaluated)return;const L=S.let("valid",!1),U=S.name("_valid");S.block(()=>k.forEach((z,re)=>{const Y=g.subschema({keyword:y,schemaProp:re,compositeRule:!0},U);S.assign(L,(0,e._)`${L} || ${U}`),g.mergeValidEvaluated(Y,U)||S.if((0,e.not)(L))})),g.result(L,()=>g.reset(),()=>g.error(!0))}return Pe.validateUnion=P,Pe}var Ea;function Hp(){if(Ea)return ft;Ea=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.validateKeywordUsage=ft.validSchemaType=ft.funcKeywordCode=ft.macroKeywordCode=void 0;const e=he(),t=vt(),r=_t(),n=eo();function s(v,w){const{gen:R,keyword:C,schema:_,parentSchema:P,it:g}=v,S=w.macro.call(g.self,_,P,g),k=l(R,C,S);g.opts.validateSchema!==!1&&g.self.validateSchema(S,!0);const y=R.name("valid");v.subschema({schema:S,schemaPath:e.nil,errSchemaPath:`${g.errSchemaPath}/${C}`,topSchemaRef:k,compositeRule:!0},y),v.pass(y,()=>v.error(!0))}ft.macroKeywordCode=s;function o(v,w){var R;const{gen:C,keyword:_,schema:P,parentSchema:g,$data:S,it:k}=v;c(k,w);const y=!S&&w.compile?w.compile.call(k.self,P,g,k):w.validate,b=l(C,_,y),O=C.let("valid");v.block$data(O,L),v.ok((R=w.valid)!==null&&R!==void 0?R:O);function L(){if(w.errors===!1)re(),w.modifying&&i(v),Y(()=>v.error());else{const V=w.async?U():z();w.modifying&&i(v),Y(()=>a(v,V))}}function U(){const V=C.let("ruleErrs",null);return C.try(()=>re((0,e._)`await `),oe=>C.assign(O,!1).if((0,e._)`${oe} instanceof ${k.ValidationError}`,()=>C.assign(V,(0,e._)`${oe}.errors`),()=>C.throw(oe))),V}function z(){const V=(0,e._)`${b}.errors`;return C.assign(V,null),re(e.nil),V}function re(V=w.async?(0,e._)`await `:e.nil){const oe=k.opts.passContext?t.default.this:t.default.self,ce=!("compile"in w&&!S||w.schema===!1);C.assign(O,(0,e._)`${V}${(0,r.callValidateCode)(v,b,oe,ce)}`,w.modifying)}function Y(V){var oe;C.if((0,e.not)((oe=w.valid)!==null&&oe!==void 0?oe:O),V)}}ft.funcKeywordCode=o;function i(v){const{gen:w,data:R,it:C}=v;w.if(C.parentData,()=>w.assign(R,(0,e._)`${C.parentData}[${C.parentDataProperty}]`))}function a(v,w){const{gen:R}=v;R.if((0,e._)`Array.isArray(${w})`,()=>{R.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${w} : ${t.default.vErrors}.concat(${w})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(v)},()=>v.error())}function c({schemaEnv:v},w){if(w.async&&!v.$async)throw new Error("async keyword in sync schema")}function l(v,w,R){if(R===void 0)throw new Error(`keyword "${w}" failed to compile`);return v.scopeValue("keyword",typeof R=="function"?{ref:R}:{ref:R,code:(0,e.stringify)(R)})}function u(v,w,R=!1){return!w.length||w.some(C=>C==="array"?Array.isArray(v):C==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==C||R&&typeof v>"u")}ft.validSchemaType=u;function m({schema:v,opts:w,self:R,errSchemaPath:C},_,P){if(Array.isArray(_.keyword)?!_.keyword.includes(P):_.keyword!==P)throw new Error("ajv implementation error");const g=_.dependencies;if(g!=null&&g.some(S=>!Object.prototype.hasOwnProperty.call(v,S)))throw new Error(`parent schema must have dependencies of ${P}: ${g.join(",")}`);if(_.validateSchema&&!_.validateSchema(v[P])){const k=`keyword "${P}" value is invalid at path "${C}": `+R.errorsText(_.validateSchema.errors);if(w.validateSchema==="log")R.logger.error(k);else throw new Error(k)}}return ft.validateKeywordUsage=m,ft}var jt={},Ca;function Wp(){if(Ca)return jt;Ca=1,Object.defineProperty(jt,"__esModule",{value:!0}),jt.extendSubschemaMode=jt.extendSubschemaData=jt.getSubschema=void 0;const e=he(),t=ye();function r(o,{keyword:i,schemaProp:a,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:m}){if(i!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(i!==void 0){const v=o.schema[i];return a===void 0?{schema:v,schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(i)}`,errSchemaPath:`${o.errSchemaPath}/${i}`}:{schema:v[a],schemaPath:(0,e._)`${o.schemaPath}${(0,e.getProperty)(i)}${(0,e.getProperty)(a)}`,errSchemaPath:`${o.errSchemaPath}/${i}/${(0,t.escapeFragment)(a)}`}}if(c!==void 0){if(l===void 0||u===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:m,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}jt.getSubschema=r;function n(o,i,{dataProp:a,dataPropType:c,data:l,dataTypes:u,propertyName:m}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=i;if(a!==void 0){const{errorPath:R,dataPathArr:C,opts:_}=i,P=v.let("data",(0,e._)`${i.data}${(0,e.getProperty)(a)}`,!0);w(P),o.errorPath=(0,e.str)`${R}${(0,t.getErrorPath)(a,c,_.jsPropertySyntax)}`,o.parentDataProperty=(0,e._)`${a}`,o.dataPathArr=[...C,o.parentDataProperty]}if(l!==void 0){const R=l instanceof e.Name?l:v.let("data",l,!0);w(R),m!==void 0&&(o.propertyName=m)}u&&(o.dataTypes=u);function w(R){o.data=R,o.dataLevel=i.dataLevel+1,o.dataTypes=[],i.definedProperties=new Set,o.parentData=i.data,o.dataNames=[...i.dataNames,R]}}jt.extendSubschemaData=n;function s(o,{jtdDiscriminator:i,jtdMetadata:a,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(o.compositeRule=c),l!==void 0&&(o.createErrors=l),u!==void 0&&(o.allErrors=u),o.jtdDiscriminator=i,o.jtdMetadata=a}return jt.extendSubschemaMode=s,jt}var Xe={},Ro,ka;function gu(){return ka||(ka=1,Ro=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,s,o;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(s=n;s--!==0;)if(!e(t[s],r[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(o=Object.keys(t),n=o.length,n!==Object.keys(r).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[s]))return!1;for(s=n;s--!==0;){var i=o[s];if(!e(t[i],r[i]))return!1}return!0}return t!==t&&r!==r}),Ro}var No={exports:{}},Ra;function Bp(){if(Ra)return No.exports;Ra=1;var e=No.exports=function(n,s,o){typeof s=="function"&&(o=s,s={}),o=s.cb||o;var i=typeof o=="function"?o:o.pre||function(){},a=o.post||function(){};t(s,i,a,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,s,o,i,a,c,l,u,m,v){if(i&&typeof i=="object"&&!Array.isArray(i)){s(i,a,c,l,u,m,v);for(var w in i){var R=i[w];if(Array.isArray(R)){if(w in e.arrayKeywords)for(var C=0;C_+=a(g)),_===1/0))return 1/0}return _}function c(C,_="",P){P!==!1&&(_=m(_));const g=C.parse(_);return l(C,g)}Xe.getFullPath=c;function l(C,_){return C.serialize(_).split("#")[0]+"#"}Xe._getFullPath=l;const u=/#\/?$/;function m(C){return C?C.replace(u,""):""}Xe.normalizeId=m;function v(C,_,P){return P=m(P),C.resolve(_,P)}Xe.resolveUrl=v;const w=/^[a-z_][-a-z0-9._]*$/i;function R(C,_){if(typeof C=="boolean")return{};const{schemaId:P,uriResolver:g}=this.opts,S=m(C[P]||_),k={"":S},y=c(g,S,!1),b={},O=new Set;return r(C,{allKeys:!0},(z,re,Y,V)=>{if(V===void 0)return;const oe=y+re;let ce=k[V];typeof z[P]=="string"&&(ce=de.call(this,z[P])),fe.call(this,z.$anchor),fe.call(this,z.$dynamicAnchor),k[re]=ce;function de(ie){const Ne=this.opts.uriResolver.resolve;if(ie=m(ce?Ne(ce,ie):ie),O.has(ie))throw U(ie);O.add(ie);let J=this.refs[ie];return typeof J=="string"&&(J=this.refs[J]),typeof J=="object"?L(z,J.schema,ie):ie!==m(oe)&&(ie[0]==="#"?(L(z,b[ie],ie),b[ie]=z):this.refs[ie]=oe),ie}function fe(ie){if(typeof ie=="string"){if(!w.test(ie))throw new Error(`invalid anchor "${ie}"`);de.call(this,`#${ie}`)}}}),b;function L(z,re,Y){if(re!==void 0&&!t(z,re))throw U(Y)}function U(z){return new Error(`reference "${z}" resolves to more than one schema`)}}return Xe.getSchemaRefs=R,Xe}var Oa;function ro(){if(Oa)return Mt;Oa=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.getData=Mt.KeywordCxt=Mt.validateFunctionCode=void 0;const e=Kp(),t=Ts(),r=mu(),n=Ts(),s=zp(),o=Hp(),i=Wp(),a=he(),c=vt(),l=to(),u=ye(),m=eo();function v(d){if(y(d)&&(O(d),k(d))){_(d);return}w(d,()=>(0,e.topBoolOrEmptySchema)(d))}Mt.validateFunctionCode=v;function w({gen:d,validateName:h,schema:N,schemaEnv:T,opts:M},F){M.code.es5?d.func(h,(0,a._)`${c.default.data}, ${c.default.valCxt}`,T.$async,()=>{d.code((0,a._)`"use strict"; ${g(N,M)}`),C(d,M),d.code(F)}):d.func(h,(0,a._)`${c.default.data}, ${R(M)}`,T.$async,()=>d.code(g(N,M)).code(F))}function R(d){return(0,a._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${d.dynamicRef?(0,a._)`, ${c.default.dynamicAnchors}={}`:a.nil}}={}`}function C(d,h){d.if(c.default.valCxt,()=>{d.var(c.default.instancePath,(0,a._)`${c.default.valCxt}.${c.default.instancePath}`),d.var(c.default.parentData,(0,a._)`${c.default.valCxt}.${c.default.parentData}`),d.var(c.default.parentDataProperty,(0,a._)`${c.default.valCxt}.${c.default.parentDataProperty}`),d.var(c.default.rootData,(0,a._)`${c.default.valCxt}.${c.default.rootData}`),h.dynamicRef&&d.var(c.default.dynamicAnchors,(0,a._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{d.var(c.default.instancePath,(0,a._)`""`),d.var(c.default.parentData,(0,a._)`undefined`),d.var(c.default.parentDataProperty,(0,a._)`undefined`),d.var(c.default.rootData,c.default.data),h.dynamicRef&&d.var(c.default.dynamicAnchors,(0,a._)`{}`)})}function _(d){const{schema:h,opts:N,gen:T}=d;w(d,()=>{N.$comment&&h.$comment&&V(d),z(d),T.let(c.default.vErrors,null),T.let(c.default.errors,0),N.unevaluated&&P(d),L(d),oe(d)})}function P(d){const{gen:h,validateName:N}=d;d.evaluated=h.const("evaluated",(0,a._)`${N}.evaluated`),h.if((0,a._)`${d.evaluated}.dynamicProps`,()=>h.assign((0,a._)`${d.evaluated}.props`,(0,a._)`undefined`)),h.if((0,a._)`${d.evaluated}.dynamicItems`,()=>h.assign((0,a._)`${d.evaluated}.items`,(0,a._)`undefined`))}function g(d,h){const N=typeof d=="object"&&d[h.schemaId];return N&&(h.code.source||h.code.process)?(0,a._)`/*# sourceURL=${N} */`:a.nil}function S(d,h){if(y(d)&&(O(d),k(d))){b(d,h);return}(0,e.boolOrEmptySchema)(d,h)}function k({schema:d,self:h}){if(typeof d=="boolean")return!d;for(const N in d)if(h.RULES.all[N])return!0;return!1}function y(d){return typeof d.schema!="boolean"}function b(d,h){const{schema:N,gen:T,opts:M}=d;M.$comment&&N.$comment&&V(d),re(d),Y(d);const F=T.const("_errs",c.default.errors);L(d,F),T.var(h,(0,a._)`${F} === ${c.default.errors}`)}function O(d){(0,u.checkUnknownRules)(d),U(d)}function L(d,h){if(d.opts.jtd)return de(d,[],!1,h);const N=(0,t.getSchemaTypes)(d.schema),T=(0,t.coerceAndCheckDataType)(d,N);de(d,N,!T,h)}function U(d){const{schema:h,errSchemaPath:N,opts:T,self:M}=d;h.$ref&&T.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(h,M.RULES)&&M.logger.warn(`$ref: keywords ignored in schema at path "${N}"`)}function z(d){const{schema:h,opts:N}=d;h.default!==void 0&&N.useDefaults&&N.strictSchema&&(0,u.checkStrictMode)(d,"default is ignored in the schema root")}function re(d){const h=d.schema[d.opts.schemaId];h&&(d.baseId=(0,l.resolveUrl)(d.opts.uriResolver,d.baseId,h))}function Y(d){if(d.schema.$async&&!d.schemaEnv.$async)throw new Error("async schema in sync schema")}function V({gen:d,schemaEnv:h,schema:N,errSchemaPath:T,opts:M}){const F=N.$comment;if(M.$comment===!0)d.code((0,a._)`${c.default.self}.logger.log(${F})`);else if(typeof M.$comment=="function"){const B=(0,a.str)`${T}/$comment`,H=d.scopeValue("root",{ref:h.root});d.code((0,a._)`${c.default.self}.opts.$comment(${F}, ${B}, ${H}.schema)`)}}function oe(d){const{gen:h,schemaEnv:N,validateName:T,ValidationError:M,opts:F}=d;N.$async?h.if((0,a._)`${c.default.errors} === 0`,()=>h.return(c.default.data),()=>h.throw((0,a._)`new ${M}(${c.default.vErrors})`)):(h.assign((0,a._)`${T}.errors`,c.default.vErrors),F.unevaluated&&ce(d),h.return((0,a._)`${c.default.errors} === 0`))}function ce({gen:d,evaluated:h,props:N,items:T}){N instanceof a.Name&&d.assign((0,a._)`${h}.props`,N),T instanceof a.Name&&d.assign((0,a._)`${h}.items`,T)}function de(d,h,N,T){const{gen:M,schema:F,data:B,allErrors:H,opts:G,self:q}=d,{RULES:Q}=q;if(F.$ref&&(G.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(F,Q))){M.block(()=>D(d,"$ref",Q.all.$ref.definition));return}G.jtd||ie(d,h),M.block(()=>{for(const ne of Q.rules)Z(ne);Z(Q.post)});function Z(ne){(0,r.shouldUseGroup)(F,ne)&&(ne.type?(M.if((0,n.checkDataType)(ne.type,B,G.strictNumbers)),fe(d,ne),h.length===1&&h[0]===ne.type&&N&&(M.else(),(0,n.reportTypeError)(d)),M.endIf()):fe(d,ne),H||M.if((0,a._)`${c.default.errors} === ${T||0}`))}}function fe(d,h){const{gen:N,schema:T,opts:{useDefaults:M}}=d;M&&(0,s.assignDefaults)(d,h.type),N.block(()=>{for(const F of h.rules)(0,r.shouldUseRule)(T,F)&&D(d,F.keyword,F.definition,h.type)})}function ie(d,h){d.schemaEnv.meta||!d.opts.strictTypes||(Ne(d,h),d.opts.allowUnionTypes||J(d,h),$(d,d.dataTypes))}function Ne(d,h){if(h.length){if(!d.dataTypes.length){d.dataTypes=h;return}h.forEach(N=>{E(d.dataTypes,N)||p(d,`type "${N}" not allowed by context "${d.dataTypes.join(",")}"`)}),f(d,h)}}function J(d,h){h.length>1&&!(h.length===2&&h.includes("null"))&&p(d,"use allowUnionTypes to allow union type keyword")}function $(d,h){const N=d.self.RULES.all;for(const T in N){const M=N[T];if(typeof M=="object"&&(0,r.shouldUseRule)(d.schema,M)){const{type:F}=M.definition;F.length&&!F.some(B=>x(h,B))&&p(d,`missing type "${F.join(",")}" for keyword "${T}"`)}}}function x(d,h){return d.includes(h)||h==="number"&&d.includes("integer")}function E(d,h){return d.includes(h)||h==="integer"&&d.includes("number")}function f(d,h){const N=[];for(const T of d.dataTypes)E(h,T)?N.push(T):h.includes("integer")&&T==="number"&&N.push("integer");d.dataTypes=N}function p(d,h){const N=d.schemaEnv.baseId+d.errSchemaPath;h+=` at "${N}" (strictTypes)`,(0,u.checkStrictMode)(d,h,d.opts.strictTypes)}class A{constructor(h,N,T){if((0,o.validateKeywordUsage)(h,N,T),this.gen=h.gen,this.allErrors=h.allErrors,this.keyword=T,this.data=h.data,this.schema=h.schema[T],this.$data=N.$data&&h.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(h,this.schema,T,this.$data),this.schemaType=N.schemaType,this.parentSchema=h.schema,this.params={},this.it=h,this.def=N,this.$data)this.schemaCode=h.gen.const("vSchema",X(this.$data,h));else if(this.schemaCode=this.schemaValue,!(0,o.validSchemaType)(this.schema,N.schemaType,N.allowUndefined))throw new Error(`${T} value must be ${JSON.stringify(N.schemaType)}`);("code"in N?N.trackErrors:N.errors!==!1)&&(this.errsCount=h.gen.const("_errs",c.default.errors))}result(h,N,T){this.failResult((0,a.not)(h),N,T)}failResult(h,N,T){this.gen.if(h),T?T():this.error(),N?(this.gen.else(),N(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(h,N){this.failResult((0,a.not)(h),void 0,N)}fail(h){if(h===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(h),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(h){if(!this.$data)return this.fail(h);const{schemaCode:N}=this;this.fail((0,a._)`${N} !== undefined && (${(0,a.or)(this.invalid$data(),h)})`)}error(h,N,T){if(N){this.setParams(N),this._error(h,T),this.setParams({});return}this._error(h,T)}_error(h,N){(h?m.reportExtraError:m.reportError)(this,this.def.error,N)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(h){this.allErrors||this.gen.if(h)}setParams(h,N){N?Object.assign(this.params,h):this.params=h}block$data(h,N,T=a.nil){this.gen.block(()=>{this.check$data(h,T),N()})}check$data(h=a.nil,N=a.nil){if(!this.$data)return;const{gen:T,schemaCode:M,schemaType:F,def:B}=this;T.if((0,a.or)((0,a._)`${M} === undefined`,N)),h!==a.nil&&T.assign(h,!0),(F.length||B.validateSchema)&&(T.elseIf(this.invalid$data()),this.$dataError(),h!==a.nil&&T.assign(h,!1)),T.else()}invalid$data(){const{gen:h,schemaCode:N,schemaType:T,def:M,it:F}=this;return(0,a.or)(B(),H());function B(){if(T.length){if(!(N instanceof a.Name))throw new Error("ajv implementation error");const G=Array.isArray(T)?T:[T];return(0,a._)`${(0,n.checkDataTypes)(G,N,F.opts.strictNumbers,n.DataType.Wrong)}`}return a.nil}function H(){if(M.validateSchema){const G=h.scopeValue("validate$data",{ref:M.validateSchema});return(0,a._)`!${G}(${N})`}return a.nil}}subschema(h,N){const T=(0,i.getSubschema)(this.it,h);(0,i.extendSubschemaData)(T,this.it,h),(0,i.extendSubschemaMode)(T,h);const M={...this.it,...T,items:void 0,props:void 0};return S(M,N),M}mergeEvaluated(h,N){const{it:T,gen:M}=this;T.opts.unevaluated&&(T.props!==!0&&h.props!==void 0&&(T.props=u.mergeEvaluated.props(M,h.props,T.props,N)),T.items!==!0&&h.items!==void 0&&(T.items=u.mergeEvaluated.items(M,h.items,T.items,N)))}mergeValidEvaluated(h,N){const{it:T,gen:M}=this;if(T.opts.unevaluated&&(T.props!==!0||T.items!==!0))return M.if(N,()=>this.mergeEvaluated(h,a.Name)),!0}}Mt.KeywordCxt=A;function D(d,h,N,T){const M=new A(d,N,h);"code"in N?N.code(M,T):M.$data&&N.validate?(0,o.funcKeywordCode)(M,N):"macro"in N?(0,o.macroKeywordCode)(M,N):(N.compile||N.validate)&&(0,o.funcKeywordCode)(M,N)}const j=/^\/(?:[^~]|~0|~1)*$/,W=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function X(d,{dataLevel:h,dataNames:N,dataPathArr:T}){let M,F;if(d==="")return c.default.rootData;if(d[0]==="/"){if(!j.test(d))throw new Error(`Invalid JSON-pointer: ${d}`);M=d,F=c.default.rootData}else{const q=W.exec(d);if(!q)throw new Error(`Invalid JSON-pointer: ${d}`);const Q=+q[1];if(M=q[2],M==="#"){if(Q>=h)throw new Error(G("property/index",Q));return T[h-Q]}if(Q>h)throw new Error(G("data",Q));if(F=N[h-Q],!M)return F}let B=F;const H=M.split("/");for(const q of H)q&&(F=(0,a._)`${F}${(0,a.getProperty)((0,u.unescapeJsonPointer)(q))}`,B=(0,a._)`${B} && ${F}`);return B;function G(q,Q){return`Cannot access ${q} ${Q} levels up, current level is ${h}`}}return Mt.getData=X,Mt}var wn={},Aa;function vi(){if(Aa)return wn;Aa=1,Object.defineProperty(wn,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return wn.default=e,wn}var Pn={},xa;function no(){if(xa)return Pn;xa=1,Object.defineProperty(Pn,"__esModule",{value:!0});const e=to();class t extends Error{constructor(n,s,o,i){super(i||`can't resolve reference ${o} from id ${s}`),this.missingRef=(0,e.resolveUrl)(n,s,o),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Pn.default=t,Pn}var it={},Ta;function so(){if(Ta)return it;Ta=1,Object.defineProperty(it,"__esModule",{value:!0}),it.resolveSchema=it.getCompilingSchema=it.resolveRef=it.compileSchema=it.SchemaEnv=void 0;const e=he(),t=vi(),r=vt(),n=to(),s=ye(),o=ro();class i{constructor(P){var g;this.refs={},this.dynamicAnchors={};let S;typeof P.schema=="object"&&(S=P.schema),this.schema=P.schema,this.schemaId=P.schemaId,this.root=P.root||this,this.baseId=(g=P.baseId)!==null&&g!==void 0?g:(0,n.normalizeId)(S==null?void 0:S[P.schemaId||"$id"]),this.schemaPath=P.schemaPath,this.localRefs=P.localRefs,this.meta=P.meta,this.$async=S==null?void 0:S.$async,this.refs={}}}it.SchemaEnv=i;function a(_){const P=u.call(this,_);if(P)return P;const g=(0,n.getFullPath)(this.opts.uriResolver,_.root.baseId),{es5:S,lines:k}=this.opts.code,{ownProperties:y}=this.opts,b=new e.CodeGen(this.scope,{es5:S,lines:k,ownProperties:y});let O;_.$async&&(O=b.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const L=b.scopeName("validate");_.validateName=L;const U={gen:b,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:b.scopeValue("schema",this.opts.code.source===!0?{ref:_.schema,code:(0,e.stringify)(_.schema)}:{ref:_.schema}),validateName:L,ValidationError:O,schema:_.schema,schemaEnv:_,rootId:g,baseId:_.baseId||g,schemaPath:e.nil,errSchemaPath:_.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let z;try{this._compilations.add(_),(0,o.validateFunctionCode)(U),b.optimize(this.opts.code.optimize);const re=b.toString();z=`${b.scopeRefs(r.default.scope)}return ${re}`,this.opts.code.process&&(z=this.opts.code.process(z,_));const V=new Function(`${r.default.self}`,`${r.default.scope}`,z)(this,this.scope.get());if(this.scope.value(L,{ref:V}),V.errors=null,V.schema=_.schema,V.schemaEnv=_,_.$async&&(V.$async=!0),this.opts.code.source===!0&&(V.source={validateName:L,validateCode:re,scopeValues:b._values}),this.opts.unevaluated){const{props:oe,items:ce}=U;V.evaluated={props:oe instanceof e.Name?void 0:oe,items:ce instanceof e.Name?void 0:ce,dynamicProps:oe instanceof e.Name,dynamicItems:ce instanceof e.Name},V.source&&(V.source.evaluated=(0,e.stringify)(V.evaluated))}return _.validate=V,_}catch(re){throw delete _.validate,delete _.validateName,z&&this.logger.error("Error compiling schema, function code:",z),re}finally{this._compilations.delete(_)}}it.compileSchema=a;function c(_,P,g){var S;g=(0,n.resolveUrl)(this.opts.uriResolver,P,g);const k=_.refs[g];if(k)return k;let y=v.call(this,_,g);if(y===void 0){const b=(S=_.localRefs)===null||S===void 0?void 0:S[g],{schemaId:O}=this.opts;b&&(y=new i({schema:b,schemaId:O,root:_,baseId:P}))}if(y!==void 0)return _.refs[g]=l.call(this,y)}it.resolveRef=c;function l(_){return(0,n.inlineRef)(_.schema,this.opts.inlineRefs)?_.schema:_.validate?_:a.call(this,_)}function u(_){for(const P of this._compilations)if(m(P,_))return P}it.getCompilingSchema=u;function m(_,P){return _.schema===P.schema&&_.root===P.root&&_.baseId===P.baseId}function v(_,P){let g;for(;typeof(g=this.refs[P])=="string";)P=g;return g||this.schemas[P]||w.call(this,_,P)}function w(_,P){const g=this.opts.uriResolver.parse(P),S=(0,n._getFullPath)(this.opts.uriResolver,g);let k=(0,n.getFullPath)(this.opts.uriResolver,_.baseId,void 0);if(Object.keys(_.schema).length>0&&S===k)return C.call(this,g,_);const y=(0,n.normalizeId)(S),b=this.refs[y]||this.schemas[y];if(typeof b=="string"){const O=w.call(this,_,b);return typeof(O==null?void 0:O.schema)!="object"?void 0:C.call(this,g,O)}if(typeof(b==null?void 0:b.schema)=="object"){if(b.validate||a.call(this,b),y===(0,n.normalizeId)(P)){const{schema:O}=b,{schemaId:L}=this.opts,U=O[L];return U&&(k=(0,n.resolveUrl)(this.opts.uriResolver,k,U)),new i({schema:O,schemaId:L,root:_,baseId:k})}return C.call(this,g,b)}}it.resolveSchema=w;const R=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function C(_,{baseId:P,schema:g,root:S}){var k;if(((k=_.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(const O of _.fragment.slice(1).split("/")){if(typeof g=="boolean")return;const L=g[(0,s.unescapeFragment)(O)];if(L===void 0)return;g=L;const U=typeof g=="object"&&g[this.opts.schemaId];!R.has(O)&&U&&(P=(0,n.resolveUrl)(this.opts.uriResolver,P,U))}let y;if(typeof g!="boolean"&&g.$ref&&!(0,s.schemaHasRulesButRef)(g,this.RULES)){const O=(0,n.resolveUrl)(this.opts.uriResolver,P,g.$ref);y=w.call(this,S,O)}const{schemaId:b}=this.opts;if(y=y||new i({schema:g,schemaId:b,root:S,baseId:P}),y.schema!==y.root.schema)return y}return it}const Gp="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Jp="Meta-schema for $data reference (JSON AnySchema extension proposal)",Yp="object",Xp=["$data"],Qp={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Zp=!1,eh={$id:Gp,description:Jp,type:Yp,required:Xp,properties:Qp,additionalProperties:Zp};var Sn={},Ir={exports:{}},Oo,Ma;function yu(){if(Ma)return Oo;Ma=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u),r=RegExp.prototype.test.bind(/^\d*$/u),n=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),s=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),o=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),i=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),a=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),c=new Array(256);{const $="0123456789ABCDEF";for(let x=0;x<256;x++)c[x]="%"+$[x>>4]+$[x&15]}function l($){return $<2048?c[192|$>>6]+c[128|$&63]:$<65536?c[224|$>>12]+c[128|$>>6&63]+c[128|$&63]:c[240|$>>18]+c[128|$>>12&63]+c[128|$>>6&63]+c[128|$&63]}function u($){let x="",E=0,f=0;for(f=0;f<$.length;f++)if(E=$[f].charCodeAt(0),E!==48){if(!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";x+=$[f];break}for(f+=1;f<$.length;f++){if(E=$[f].charCodeAt(0),!(E>=48&&E<=57||E>=65&&E<=70||E>=97&&E<=102))return"";x+=$[f]}return x}const m=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),v=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),w=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),R=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function C($){if($.length===0)return!1;for(let x=0;x<$.length;x++)if(!w($[x])){if($[x]==="%"&&x+2<$.length&&n($.slice(x+1,x+3))){x+=2;continue}return!1}return!0}function _($){let x=-1,E=0,f=-1,p=0;for(let j=0;j<$.length;j++)$[j]==="0"?(f===-1&&(f=j),p++,p>E&&(E=p,x=f)):(f=-1,p=0);if(E<2)return $.join(":");const A=$.slice(0,x).join(":"),D=$.slice(x+E).join(":");return A+"::"+D}function P($){const x=$.indexOf("::");if(x!==-1&&$.indexOf("::",x+1)!==-1)return;const E=x===-1?$.split(":"):$.slice(0,x).split(":"),f=x===-1?[]:$.slice(x+2).split(":");x!==-1&&(E.length===1&&E[0]===""&&(E.length=0),f.length===1&&f[0]===""&&(f.length=0));const p=E.concat(f);let A=0;for(let j=0;j=8)return;const D=p.slice(0,E.length);for(let j=A;j<8;j++)D.push("0");for(let j=E.length;jb[f])}function z($,x=!1){if($.indexOf("%")===-1)return $;let E="";for(let f=0;f<$.length;f++){if($[f]==="%"&&f+2<$.length){const p=$.slice(f+1,f+3);if(n(p)){const A=p.toUpperCase(),D=String.fromCharCode(parseInt(A,16));x&&s(D)?E+=D:E+="%"+A,f+=2;continue}}E+=$[f]}return E}function re($){let x="";for(let E=0;E<$.length;E++){const f=$[E];if(f==="%"&&E+2<$.length){const p=$.slice(E+1,E+3);if(n(p)){const A=p.toUpperCase(),D=String.fromCharCode(parseInt(A,16));D!=="."&&s(D)?x+=D:x+="%"+A,E+=2;continue}}if(o(f))x+=f;else{const p=$.charCodeAt(E);if(p<128)x+=fe(p)?f:c[p];else if(p<55296||p>57343)x+=l(p);else if(p<=56319&&E+1<$.length){const A=$.charCodeAt(E+1);A>=56320&&A<=57343?(x+=l(65536+(p-55296<<10)+(A-56320)),E++):x+=l(65533)}else x+=l(65533)}}return x}function Y($,x=!1){let E="",f=x&&$[0]!=="/";for(let p=0;p<$.length;p++){const A=$[p];if(A==="%"&&p+2<$.length){const D=$.slice(p+1,p+3);if(n(D)){E+="%"+D.toUpperCase(),p+=2;continue}}if(A==="/"&&(f=!1),o(A)&&(A!==":"||!f))E+=A;else{const D=$.charCodeAt(p);if(D<128)E+=c[D];else if(D<55296||D>57343)E+=l(D);else if(D<=56319&&p+1<$.length){const j=$.charCodeAt(p+1);j>=56320&&j<=57343?(E+=l(65536+(D-55296<<10)+(j-56320)),p++):E+=l(65533)}else E+=l(65533)}}return E}function V($,x){let E="";for(let f=0;f<$.length;f++){const p=$[f];if(p==="%"&&f+2<$.length){const A=$.slice(f+1,f+3);if(n(A)){E+="%"+A.toUpperCase(),f+=2;continue}}if(x(p))E+=p;else{const A=$.charCodeAt(f);if(A<128)E+=c[A];else if(A<55296||A>57343)E+=l(A);else if(A<=56319&&f+1<$.length){const D=$.charCodeAt(f+1);D>=56320&&D<=57343?(E+=l(65536+(A-55296<<10)+(D-56320)),f++):E+=l(65533)}else E+=l(65533)}}return E}function oe($){return V($,a)}function ce($){return V($,i)}function de($){return V($,i)}function fe($){return $>=48&&$<=57||$>=65&&$<=90||$>=97&&$<=122||$===42||$===43||$===45||$===46||$===47||$===64||$===95}function ie($){let x="";for(let E=0;E<$.length;E++){const f=$[E];if(f==="%"&&E+2<$.length){const p=$.slice(E+1,E+3);if(n(p)){const A=p.toUpperCase(),D=String.fromCharCode(parseInt(A,16));s(D)?x+=D:x+="%"+A,E+=2;continue}}if(i(f))x+=f;else{const p=$.charCodeAt(E);if(p<128)x+=fe(p)?f:c[p];else if(p<55296||p>57343)x+=l(p);else if(p<=56319&&E+1<$.length){const A=$.charCodeAt(E+1);A>=56320&&A<=57343?(x+=l(65536+(p-55296<<10)+(A-56320)),E++):x+=l(65533)}else x+=l(65533)}}return x}function Ne($){let x="";for(let E=0;E<$.length;E++){if($[E]==="%"&&E+2<$.length){const f=$.slice(E+1,E+3);if(n(f)){x+="%"+f.toUpperCase(),E+=2;continue}}x+=escape($[E])}return x}function J($){const x=[];if($.userinfo!==void 0&&(x.push(oe($.userinfo)),x.push("@")),$.host!==void 0){let E=$.host;if(!t(E)){let f=g(E);f.isIPV6!==!0&&f.isIPVFuture!==!0&&(E=z(E,!0),f=g(E)),f.isIPV6===!0||f.isIPVFuture===!0?E=`[${f.escapedHost}]`:E=U(E,!1)}x.push(E)}if(typeof $.port=="number"||typeof $.port=="string"){const E=String($.port);if(!r(E))throw new TypeError("URI port is malformed.");x.push(":"),x.push(E)}return x.length?x.join(""):void 0}return Oo={nonSimpleDomain:R,recomposeAuthority:J,reescapeHostDelimiters:U,normalizePercentEncoding:z,normalizePathEncoding:re,serializePathEncoding:Y,normalizeQueryFragmentEncoding:ie,encodeUserinfo:oe,encodeQuery:ce,encodeFragment:de,escapePreservingEscapes:Ne,removeDotSegments:k,removeDotSegmentsRelative:y,isIPv4:t,isUUID:e,normalizeIPv6:g,stringArrayToHexStripped:u},Oo}var Ao,Ia;function th(){if(Ia)return Ao;Ia=1;const{isUUID:e}=yu(),t=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(y){return r.indexOf(y)!==-1}function s(y){return y.secure===!0?!0:y.secure===!1?!1:y.scheme?y.scheme.length===3&&(y.scheme[0]==="w"||y.scheme[0]==="W")&&(y.scheme[1]==="s"||y.scheme[1]==="S")&&(y.scheme[2]==="s"||y.scheme[2]==="S"):!1}function o(y){return y.host||(y.error=y.error||"HTTP URIs must have a host."),y}function i(y){const b=String(y.scheme).toLowerCase()==="https";return(y.port===(b?443:80)||y.port==="")&&(y.port=void 0),y.path||(y.path="/"),y}function a(y){return y.secure=s(y),y.resourceName=(y.path||"/")+(y.query?"?"+y.query:""),y.path=void 0,y.query=void 0,y}function c(y){if((y.port===(s(y)?443:80)||y.port==="")&&(y.port=void 0),typeof y.secure=="boolean"&&(y.scheme=y.secure?"wss":"ws",y.secure=void 0),y.resourceName){const b=y.resourceName.indexOf("?"),O=b===-1?y.resourceName:y.resourceName.slice(0,b);y.path=O&&O!=="/"?O:void 0,y.query=b===-1?void 0:y.resourceName.slice(b+1),y.resourceName=void 0}return y.fragment=void 0,y}function l(y,b){if(!y.path)return y.error="URN can not be parsed",y;const O=y.path.match(t);if(O&&O[0]===y.path){const L=b.scheme||y.scheme||"urn";y.nid=O[1].toLowerCase(),y.nss=O[2];const U=`${L}:${b.nid||y.nid}`,z=k(U);y.path=void 0,z&&(y=z.parse(y,b))}else y.error=y.error||"URN can not be parsed.";return y}function u(y,b){if(y.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=b.scheme||y.scheme||"urn",L=y.nid.toLowerCase(),U=`${O}:${b.nid||L}`,z=k(U);z&&(y=z.serialize(y,b));const re=y,Y=y.nss;return re.path=`${L||b.nid}:${Y}`,b.skipEscape=!0,re}function m(y,b){const O=y;return O.uuid=O.nss,O.nss=void 0,!b.tolerant&&(!O.uuid||!e(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function v(y){const b=y;return b.nss=(y.uuid||"").toLowerCase(),b}const w={scheme:"http",domainHost:!0,parse:o,serialize:i},R={scheme:"https",domainHost:w.domainHost,parse:o,serialize:i},C={scheme:"ws",domainHost:!0,parse:a,serialize:c},_={scheme:"wss",domainHost:C.domainHost,parse:C.parse,serialize:C.serialize},S={http:w,https:R,ws:C,wss:_,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:m,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(S,null);function k(y){return y&&(S[y]||S[y.toLowerCase()])||void 0}return Ao={wsIsSecure:s,SCHEMES:S,isValidSchemeName:n,getSchemeHandler:k},Ao}var ja;function rh(){if(ja)return Ir.exports;ja=1;const{normalizeIPv6:e,removeDotSegments:t,removeDotSegmentsRelative:r,recomposeAuthority:n,normalizePercentEncoding:s,normalizePathEncoding:o,serializePathEncoding:i,normalizeQueryFragmentEncoding:a,encodeQuery:c,encodeFragment:l,reescapeHostDelimiters:u,isIPv4:m,nonSimpleDomain:v}=yu(),{SCHEMES:w,getSchemeHandler:R}=th(),C=/^[A-Za-z][A-Za-z0-9+.-]*$/u,_="URI scheme is malformed.",P="URI host is malformed.",g=/[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;function S(p){const A=String(p);if(!C.test(A))throw new TypeError(_);return A}function k(p,A){return typeof p=="string"?p=$(p,A):typeof p=="object"&&(p=J(L(p,A),A)),p}function y(p,A,D){const j=D?Object.assign({scheme:"null"},D):{scheme:"null"},{parsed:W,malformedAuthorityOrPort:X,malformedPercentEncoding:d,malformedSchemeSpecific:h,malformedHost:N,malformedScheme:T}=Ne(p,j),{parsed:M,malformedAuthorityOrPort:F,malformedPercentEncoding:B,malformedSchemeSpecific:H,malformedHost:G,malformedScheme:q}=Ne(A,j);if(X||F||d||B||h||H||N||G||T||q)throw new Error(W.error||M.error||"URI is malformed.");const Q=b(W,M,j,!0),Z=R(D&&D.scheme||Q.scheme),ne=Q.host,ae=ne!==void 0&&ne!==""&&(m(ne)||e(ne).isIPV6);if(fe(Q,D||{},Z,ae))throw new Error(P);de(Q,D||{},Z,ae);const me=ne&&ne.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(ne);if(Q.error&&!me)throw new Error(Q.error);return j.skipEscape=!0,L(Q,j)}function b(p,A,D,j){const W={};if(j||(p=J(L(p,D),D),A=J(L(A,D),D)),D=D||{},!D.tolerant&&A.scheme)W.scheme=A.scheme,W.userinfo=A.userinfo,W.host=A.host,W.port=A.port,W.path=t(A.path||""),W.query=A.query;else{if(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0)W.userinfo=A.userinfo,W.host=A.host,W.port=A.port,W.path=t(A.path||""),W.query=A.query;else{if(!A.path)W.path=p.path,A.query!==void 0?W.query=A.query:W.query=p.query;else{if(A.path[0]==="/")W.path=t(A.path);else{const X=p.userinfo!==void 0||p.host!==void 0||p.port!==void 0;X&&!p.path?W.path="/"+A.path:p.path?W.path=p.path.slice(0,p.path.lastIndexOf("/")+1)+A.path:W.path=A.path,W.path=p.scheme===void 0&&!X&&W.path[0]!=="/"?r(W.path):t(W.path)}W.query=A.query}W.userinfo=p.userinfo,W.host=p.host,W.port=p.port}W.scheme=p.scheme}return W.fragment=A.fragment,W}function O(p,A,D){const j=E(p,D),W=E(A,D);return j!==void 0&&W!==void 0&&j===W}function L(p,A){const D={host:p.host,scheme:p.scheme,userinfo:p.userinfo,port:p.port,path:p.path,query:p.query,nid:p.nid,nss:p.nss,uuid:p.uuid,fragment:p.fragment,reference:p.reference,resourceName:p.resourceName,secure:p.secure,error:""},j=Object.assign({},A),W=[];D.scheme&&(D.scheme=S(D.scheme));const X=R(j.scheme||D.scheme);X&&X.serialize&&X.serialize(D,j);const d=D.userinfo!==void 0||D.host!==void 0||D.port!==void 0,h=(D.scheme===void 0||j.reference==="suffix")&&!d,N=!j.skipEscape&&h;D.path!==void 0&&(j.skipEscape?D.path=s(D.path):D.path=i(D.path,N)),j.reference!=="suffix"&&D.scheme&&(D.scheme=S(D.scheme),W.push(D.scheme,":"));const T=n(D);if(T!==void 0&&(j.reference!=="suffix"&&W.push("//"),W.push(T),D.path&&D.path[0]!=="/"&&W.push("/")),D.path!==void 0){let M=D.path;!j.absolutePath&&(!X||!X.absolutePath)&&(M=h&&M[0]!=="/"?r(M):t(M)),h&&(M=i(M,!0)),T===void 0&&M[0]==="/"&&M[1]==="/"&&(M="/%2F"+M.slice(2)),W.push(M)}return D.query!==void 0&&W.push("?",c(D.query)),D.fragment!==void 0&&W.push("#",l(D.fragment)),W.join("")}const U=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,z=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,re=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function Y(p,A){if(A[2]!==void 0&&p.path&&p.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof p.port=="number"&&(p.port<0||p.port>65535))return"URI port is malformed."}function V(p){if(p===void 0)return!1;let A=p.indexOf("%");for(;A!==-1;){if(A+2>=p.length||!/^[\da-f]{2}$/iu.test(p.slice(A+1,A+3)))return!0;A=p.indexOf("%",A+3)}return!1}function oe(p){return p[0]==="["&&p[p.length-1]==="]"}function ce(p){const A=p[4];return V(p[3])||A!==void 0&&!oe(A)&&V(A)||V(p[6])||V(p[7])||V(p[8])}function de(p,A,D,j){if(fe(p,A,D,j))return p.error=p.error||P,!0;if(!A.unicodeSupport&&(!D||!D.unicodeSupport)&&p.host&&!oe(p.host)&&(A.domainHost||D&&D.domainHost)&&j===!1&&v(p.host)){let W;try{W=new URL("http://"+p.host)}catch(X){return p.error=p.error||"Host's domain name can not be converted to ASCII: "+X,!0}if(!ie(W))return p.error=p.error||P,!0;p.host=W.hostname}return!1}function fe(p,A,D,j){return!!(p.host&&j===!1&&!oe(p.host)&&(A.domainHost||D&&D.domainHost)&&g.test(p.host))}function ie(p){return p.username===""&&p.password===""&&p.port===""&&p.pathname==="/"&&p.search===""&&p.hash===""&&p.hostname!==""}function Ne(p,A){const D=Object.assign({},A),j={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let W=!1,X=!1,d=!1,h=!1,N=!1,T=!1,M=!1;D.reference==="suffix"&&(D.scheme?p=D.scheme+":"+p:p="//"+p);const F=p.match(z);F!==null&&F[1].indexOf("\\")!==-1&&(j.error="URI authority must not contain a literal backslash.",W=!0);const B=p.match(re);if(B!==null){const G=B[1],q=G.replace(/[\t\n\r]/g,"");q.length>=2&&(q.slice(0,2)!=="//"?(j.error=j.error||"URI authority must not contain a literal backslash.",W=!0):G.length!==q.length&&(j.error=j.error||"URI authority introducer must not contain whitespace.",W=!0))}const H=p.match(U);if(H){j.scheme=H[1],j.userinfo=H[3],j.host=H[4],j.port=parseInt(H[5],10),j.path=H[6]||"",j.query=H[7],j.fragment=H[8],j.scheme!==void 0&&(C.test(j.scheme)?j.scheme=j.scheme.toLowerCase():(j.error=j.error||_,T=!0)),X=ce(H),X&&(j.error=j.error||"URI contains malformed percent-encoding."),isNaN(j.port)&&(j.port=H[5]);const G=Y(j,H);if(G!==void 0&&(j.error=j.error||G,W=!0),j.host)if(m(j.host)===!1){const Z=oe(j.host),ne=j.host.indexOf("[")!==-1||j.host.indexOf("]")!==-1,ae=e(j.host);M=ae.isIPV6||ae.isIPVFuture===!0,N=ne&&(!Z||ae.error===!0),j.host=M?ae.host:ae.host.toLowerCase(),N&&(j.error=j.error||P,W=!0)}else M=!0;j.scheme===void 0&&j.userinfo===void 0&&j.host===void 0&&j.port===void 0&&j.query===void 0&&!j.path?j.reference="same-document":j.scheme===void 0?j.reference="relative":j.fragment===void 0?j.reference="absolute":j.reference="uri",D.reference&&D.reference!=="suffix"&&D.reference!==j.reference&&(j.error=j.error||"URI is not a "+D.reference+" reference.");const q=R(D.scheme||j.scheme);if(N||(h=de(j,D,q,M)),p.indexOf("%")!==-1&&j.host!==void 0&&!N){let Q=M?j.host:s(j.host,!0);M||(Q=s(Q.toLowerCase())),j.host=M||D.scheme!=="null"?u(Q,M):Q}(!q||q&&!q.skipNormalize)&&(j.path&&(j.path=o(j.path)),j.query&&(j.query=a(j.query)),j.fragment&&(j.fragment=a(j.fragment))),q&&q.parse&&(q.parse(j,D),q===w.urn&&j.nid===void 0&&(d=!0))}else j.error=j.error||"URI can not be parsed.";return{parsed:j,malformedAuthorityOrPort:W,malformedPercentEncoding:X,malformedSchemeSpecific:d,malformedHost:h,malformedScheme:T}}function J(p,A){return Ne(p,A).parsed}function $(p,A){return x(p,A).normalized}function x(p,A){const{parsed:D,malformedAuthorityOrPort:j,malformedPercentEncoding:W,malformedSchemeSpecific:X,malformedHost:d,malformedScheme:h}=Ne(p,A);return{normalized:j||W||X||d||h?p:L(D,A),malformedAuthorityOrPort:j,malformedPercentEncoding:W,malformedSchemeSpecific:X,malformedHost:d,malformedScheme:h}}function E(p,A){if(typeof p!="string"&&typeof p!="object")return;let D;try{D=typeof p=="string"?p:L(p,A)}catch{return}const{normalized:j,malformedAuthorityOrPort:W,malformedPercentEncoding:X,malformedSchemeSpecific:d,malformedHost:h,malformedScheme:N}=x(D,A);return W||X||d||h||N?void 0:j}const f={SCHEMES:w,normalize:k,resolve:y,resolveComponent:b,equal:O,serialize:L,parse:J};return Ir.exports=f,Ir.exports.default=f,Ir.exports.fastUri=f,Ir.exports}var Da;function nh(){if(Da)return Sn;Da=1,Object.defineProperty(Sn,"__esModule",{value:!0});const e=rh();return e.code='require("ajv/dist/runtime/uri").default',Sn.default=e,Sn}var La;function sh(){return La||(La=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ro();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=he();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=vi(),s=no(),o=hu(),i=so(),a=he(),c=to(),l=Ts(),u=ye(),m=eh,v=nh(),w=(J,$)=>new RegExp(J,$);w.code="new RegExp";const R=["removeAdditional","useDefaults","coerceTypes"],C=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),_={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},P={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g=200;function S(J){var $,x,E,f,p,A,D,j,W,X,d,h,N,T,M,F,B,H,G,q,Q,Z,ne,ae,me;const _e=J.strict,be=($=J.code)===null||$===void 0?void 0:$.optimize,Te=be===!0||be===void 0?1:be||0,je=(E=(x=J.code)===null||x===void 0?void 0:x.regExp)!==null&&E!==void 0?E:w,st=(f=J.uriResolver)!==null&&f!==void 0?f:v.default;return{strictSchema:(A=(p=J.strictSchema)!==null&&p!==void 0?p:_e)!==null&&A!==void 0?A:!0,strictNumbers:(j=(D=J.strictNumbers)!==null&&D!==void 0?D:_e)!==null&&j!==void 0?j:!0,strictTypes:(X=(W=J.strictTypes)!==null&&W!==void 0?W:_e)!==null&&X!==void 0?X:"log",strictTuples:(h=(d=J.strictTuples)!==null&&d!==void 0?d:_e)!==null&&h!==void 0?h:"log",strictRequired:(T=(N=J.strictRequired)!==null&&N!==void 0?N:_e)!==null&&T!==void 0?T:!1,code:J.code?{...J.code,optimize:Te,regExp:je}:{optimize:Te,regExp:je},loopRequired:(M=J.loopRequired)!==null&&M!==void 0?M:g,loopEnum:(F=J.loopEnum)!==null&&F!==void 0?F:g,meta:(B=J.meta)!==null&&B!==void 0?B:!0,messages:(H=J.messages)!==null&&H!==void 0?H:!0,inlineRefs:(G=J.inlineRefs)!==null&&G!==void 0?G:!0,schemaId:(q=J.schemaId)!==null&&q!==void 0?q:"$id",addUsedSchema:(Q=J.addUsedSchema)!==null&&Q!==void 0?Q:!0,validateSchema:(Z=J.validateSchema)!==null&&Z!==void 0?Z:!0,validateFormats:(ne=J.validateFormats)!==null&&ne!==void 0?ne:!0,unicodeRegExp:(ae=J.unicodeRegExp)!==null&&ae!==void 0?ae:!0,int32range:(me=J.int32range)!==null&&me!==void 0?me:!0,uriResolver:st}}class k{constructor($={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,$=this.opts={...$,...S($)};const{es5:x,lines:E}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:C,es5:x,lines:E}),this.logger=Y($.logger);const f=$.validateFormats;$.validateFormats=!1,this.RULES=(0,o.getRules)(),y.call(this,_,$,"NOT SUPPORTED"),y.call(this,P,$,"DEPRECATED","warn"),this._metaOpts=z.call(this),$.formats&&L.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),$.keywords&&U.call(this,$.keywords),typeof $.meta=="object"&&this.addMetaSchema($.meta),O.call(this),$.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:$,meta:x,schemaId:E}=this.opts;let f=m;E==="id"&&(f={...m},f.id=f.$id,delete f.$id),x&&$&&this.addMetaSchema(f,f[E],!1)}defaultMeta(){const{meta:$,schemaId:x}=this.opts;return this.opts.defaultMeta=typeof $=="object"?$[x]||$:void 0}validate($,x){let E;if(typeof $=="string"){if(E=this.getSchema($),!E)throw new Error(`no schema with key or ref "${$}"`)}else E=this.compile($);const f=E(x);return"$async"in E||(this.errors=E.errors),f}compile($,x){const E=this._addSchema($,x);return E.validate||this._compileSchemaEnv(E)}compileAsync($,x){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:E}=this.opts;return f.call(this,$,x);async function f(X,d){await p.call(this,X.$schema);const h=this._addSchema(X,d);return h.validate||A.call(this,h)}async function p(X){X&&!this.getSchema(X)&&await f.call(this,{$ref:X},!0)}async function A(X){try{return this._compileSchemaEnv(X)}catch(d){if(!(d instanceof s.default))throw d;return D.call(this,d),await j.call(this,d.missingSchema),A.call(this,X)}}function D({missingSchema:X,missingRef:d}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${d} cannot be resolved`)}async function j(X){const d=await W.call(this,X);this.refs[X]||await p.call(this,d.$schema),this.refs[X]||this.addSchema(d,X,x)}async function W(X){const d=this._loading[X];if(d)return d;try{return await(this._loading[X]=E(X))}finally{delete this._loading[X]}}}addSchema($,x,E,f=this.opts.validateSchema){if(Array.isArray($)){for(const A of $)this.addSchema(A,void 0,E,f);return this}let p;if(typeof $=="object"){const{schemaId:A}=this.opts;if(p=$[A],p!==void 0&&typeof p!="string")throw new Error(`schema ${A} must be string`)}return x=(0,c.normalizeId)(x||p),this._checkUnique(x),this.schemas[x]=this._addSchema($,E,x,f,!0),this}addMetaSchema($,x,E=this.opts.validateSchema){return this.addSchema($,x,!0,E),this}validateSchema($,x){if(typeof $=="boolean")return!0;let E;if(E=$.$schema,E!==void 0&&typeof E!="string")throw new Error("$schema must be a string");if(E=E||this.opts.defaultMeta||this.defaultMeta(),!E)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(E,$);if(!f&&x){const p="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(p);else throw new Error(p)}return f}getSchema($){let x;for(;typeof(x=b.call(this,$))=="string";)$=x;if(x===void 0){const{schemaId:E}=this.opts,f=new i.SchemaEnv({schema:{},schemaId:E});if(x=i.resolveSchema.call(this,f,$),!x)return;this.refs[$]=x}return x.validate||this._compileSchemaEnv(x)}removeSchema($){if($ instanceof RegExp)return this._removeAllSchemas(this.schemas,$),this._removeAllSchemas(this.refs,$),this;switch(typeof $){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const x=b.call(this,$);return typeof x=="object"&&this._cache.delete(x.schema),delete this.schemas[$],delete this.refs[$],this}case"object":{const x=$;this._cache.delete(x);let E=$[this.opts.schemaId];return E&&(E=(0,c.normalizeId)(E),delete this.schemas[E],delete this.refs[E]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary($){for(const x of $)this.addKeyword(x);return this}addKeyword($,x){let E;if(typeof $=="string")E=$,typeof x=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),x.keyword=E);else if(typeof $=="object"&&x===void 0){if(x=$,E=x.keyword,Array.isArray(E)&&!E.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(oe.call(this,E,x),!x)return(0,u.eachItem)(E,p=>ce.call(this,p)),this;fe.call(this,x);const f={...x,type:(0,l.getJSONTypes)(x.type),schemaType:(0,l.getJSONTypes)(x.schemaType)};return(0,u.eachItem)(E,f.type.length===0?p=>ce.call(this,p,f):p=>f.type.forEach(A=>ce.call(this,p,f,A))),this}getKeyword($){const x=this.RULES.all[$];return typeof x=="object"?x.definition:!!x}removeKeyword($){const{RULES:x}=this;delete x.keywords[$],delete x.all[$];for(const E of x.rules){const f=E.rules.findIndex(p=>p.keyword===$);f>=0&&E.rules.splice(f,1)}return this}addFormat($,x){return typeof x=="string"&&(x=new RegExp(x)),this.formats[$]=x,this}errorsText($=this.errors,{separator:x=", ",dataVar:E="data"}={}){return!$||$.length===0?"No errors":$.map(f=>`${E}${f.instancePath} ${f.message}`).reduce((f,p)=>f+x+p)}$dataMetaSchema($,x){const E=this.RULES.all;$=JSON.parse(JSON.stringify($));for(const f of x){const p=f.split("/").slice(1);let A=$;for(const D of p)A=A[D];for(const D in E){const j=E[D];if(typeof j!="object")continue;const{$data:W}=j.definition,X=A[D];W&&X&&(A[D]=Ne(X))}}return $}_removeAllSchemas($,x){for(const E in $){const f=$[E];(!x||x.test(E))&&(typeof f=="string"?delete $[E]:f&&!f.meta&&(this._cache.delete(f.schema),delete $[E]))}}_addSchema($,x,E,f=this.opts.validateSchema,p=this.opts.addUsedSchema){let A;const{schemaId:D}=this.opts;if(typeof $=="object")A=$[D];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof $!="boolean")throw new Error("schema must be object or boolean")}let j=this._cache.get($);if(j!==void 0)return j;E=(0,c.normalizeId)(A||E);const W=c.getSchemaRefs.call(this,$,E);return j=new i.SchemaEnv({schema:$,schemaId:D,meta:x,baseId:E,localRefs:W}),this._cache.set(j.schema,j),p&&!E.startsWith("#")&&(E&&this._checkUnique(E),this.refs[E]=j),f&&this.validateSchema($,!0),j}_checkUnique($){if(this.schemas[$]||this.refs[$])throw new Error(`schema with key or id "${$}" already exists`)}_compileSchemaEnv($){if($.meta?this._compileMetaSchema($):i.compileSchema.call(this,$),!$.validate)throw new Error("ajv implementation error");return $.validate}_compileMetaSchema($){const x=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,$)}finally{this.opts=x}}}k.ValidationError=n.default,k.MissingRefError=s.default,e.default=k;function y(J,$,x,E="error"){for(const f in J){const p=f;p in $&&this.logger[E](`${x}: option ${f}. ${J[p]}`)}}function b(J){return J=(0,c.normalizeId)(J),this.schemas[J]||this.refs[J]}function O(){const J=this.opts.schemas;if(J)if(Array.isArray(J))this.addSchema(J);else for(const $ in J)this.addSchema(J[$],$)}function L(){for(const J in this.opts.formats){const $=this.opts.formats[J];$&&this.addFormat(J,$)}}function U(J){if(Array.isArray(J)){this.addVocabulary(J);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const $ in J){const x=J[$];x.keyword||(x.keyword=$),this.addKeyword(x)}}function z(){const J={...this.opts};for(const $ of R)delete J[$];return J}const re={log(){},warn(){},error(){}};function Y(J){if(J===!1)return re;if(J===void 0)return console;if(J.log&&J.warn&&J.error)return J;throw new Error("logger must implement log, warn and error methods")}const V=/^[a-z_$][a-z0-9_$:-]*$/i;function oe(J,$){const{RULES:x}=this;if((0,u.eachItem)(J,E=>{if(x.keywords[E])throw new Error(`Keyword ${E} is already defined`);if(!V.test(E))throw new Error(`Keyword ${E} has invalid name`)}),!!$&&$.$data&&!("code"in $||"validate"in $))throw new Error('$data keyword must have "code" or "validate" function')}function ce(J,$,x){var E;const f=$==null?void 0:$.post;if(x&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:p}=this;let A=f?p.post:p.rules.find(({type:j})=>j===x);if(A||(A={type:x,rules:[]},p.rules.push(A)),p.keywords[J]=!0,!$)return;const D={keyword:J,definition:{...$,type:(0,l.getJSONTypes)($.type),schemaType:(0,l.getJSONTypes)($.schemaType)}};$.before?de.call(this,A,D,$.before):A.rules.push(D),p.all[J]=D,(E=$.implements)===null||E===void 0||E.forEach(j=>this.addKeyword(j))}function de(J,$,x){const E=J.rules.findIndex(f=>f.keyword===x);E>=0?J.rules.splice(E,0,$):(J.rules.push($),this.logger.warn(`rule ${x} is not defined`))}function fe(J){let{metaSchema:$}=J;$!==void 0&&(J.$data&&this.opts.$data&&($=Ne($)),J.validateSchema=this.compile($,!0))}const ie={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ne(J){return{anyOf:[J,ie]}}})(Po)),Po}var En={},Cn={},kn={},Fa;function oh(){if(Fa)return kn;Fa=1,Object.defineProperty(kn,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return kn.default=e,kn}var Kt={},qa;function _i(){if(qa)return Kt;qa=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.callRef=Kt.getValidate=void 0;const e=no(),t=_t(),r=he(),n=vt(),s=so(),o=ye(),i={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:m,it:v}=l,{baseId:w,schemaEnv:R,validateName:C,opts:_,self:P}=v,{root:g}=R;if((m==="#"||m==="#/")&&w===g.baseId)return k();const S=s.resolveRef.call(P,g,w,m);if(S===void 0)throw new e.default(v.opts.uriResolver,w,m);if(S instanceof s.SchemaEnv)return y(S);return b(S);function k(){if(R===g)return c(l,C,R,R.$async);const O=u.scopeValue("root",{ref:g});return c(l,(0,r._)`${O}.validate`,g,g.$async)}function y(O){const L=a(l,O);c(l,L,O,O.$async)}function b(O){const L=u.scopeValue("schema",_.code.source===!0?{ref:O,code:(0,r.stringify)(O)}:{ref:O}),U=u.name("valid"),z=l.subschema({schema:O,dataTypes:[],schemaPath:r.nil,topSchemaRef:L,errSchemaPath:m},U);l.mergeEvaluated(z),l.ok(U)}}};function a(l,u){const{gen:m}=l;return u.validate?m.scopeValue("validate",{ref:u.validate}):(0,r._)`${m.scopeValue("wrapper",{ref:u})}.validate`}Kt.getValidate=a;function c(l,u,m,v){const{gen:w,it:R}=l,{allErrors:C,schemaEnv:_,opts:P}=R,g=P.passContext?n.default.this:r.nil;v?S():k();function S(){if(!_.$async)throw new Error("async schema referenced by sync schema");const O=w.let("valid");w.try(()=>{w.code((0,r._)`await ${(0,t.callValidateCode)(l,u,g)}`),b(u),C||w.assign(O,!0)},L=>{w.if((0,r._)`!(${L} instanceof ${R.ValidationError})`,()=>w.throw(L)),y(L),C||w.assign(O,!1)}),l.ok(O)}function k(){l.result((0,t.callValidateCode)(l,u,g),()=>b(u),()=>y(u))}function y(O){const L=(0,r._)`${O}.errors`;w.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${L} : ${n.default.vErrors}.concat(${L})`),w.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function b(O){var L;if(!R.opts.unevaluated)return;const U=(L=m==null?void 0:m.validate)===null||L===void 0?void 0:L.evaluated;if(R.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&(R.props=o.mergeEvaluated.props(w,U.props,R.props));else{const z=w.var("props",(0,r._)`${O}.evaluated.props`);R.props=o.mergeEvaluated.props(w,z,R.props,r.Name)}if(R.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&(R.items=o.mergeEvaluated.items(w,U.items,R.items));else{const z=w.var("items",(0,r._)`${O}.evaluated.items`);R.items=o.mergeEvaluated.items(w,z,R.items,r.Name)}}}return Kt.callRef=c,Kt.default=i,Kt}var Va;function ih(){if(Va)return Cn;Va=1,Object.defineProperty(Cn,"__esModule",{value:!0});const e=oh(),t=_i(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Cn.default=r,Cn}var Rn={},Nn={},Ua;function ah(){if(Ua)return Nn;Ua=1,Object.defineProperty(Nn,"__esModule",{value:!0});const e=he(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:o,schemaCode:i})=>(0,e.str)`must be ${r[o].okStr} ${i}`,params:({keyword:o,schemaCode:i})=>(0,e._)`{comparison: ${r[o].okStr}, limit: ${i}}`},s={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(o){const{keyword:i,data:a,schemaCode:c}=o;o.fail$data((0,e._)`${a} ${r[i].fail} ${c} || isNaN(${a})`)}};return Nn.default=s,Nn}var On={},Ka;function ch(){if(Ka)return On;Ka=1,Object.defineProperty(On,"__esModule",{value:!0});const e=he(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:s,data:o,schemaCode:i,it:a}=n,c=a.opts.multipleOfPrecision,l=s.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${i} === 0 || (${l} = ${o}/${i}, ${u}))`)}};return On.default=r,On}var An={},xn={},za;function lh(){if(za)return xn;za=1,Object.defineProperty(xn,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,s=0,o;for(;s=55296&&o<=56319&&s(0,e._)`{limit: ${o}}`},code(o){const{keyword:i,data:a,schemaCode:c,it:l}=o,u=i==="maxLength"?e.operators.GT:e.operators.LT,m=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,t.useFunc)(o.gen,r.default)}(${a})`;o.fail$data((0,e._)`${m} ${u} ${c}`)}};return An.default=s,An}var Tn={},Wa;function dh(){if(Wa)return Tn;Wa=1,Object.defineProperty(Tn,"__esModule",{value:!0});const e=_t(),t=ye(),r=he(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,r.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,r._)`{pattern: ${o}}`},code(o){const{gen:i,data:a,$data:c,schema:l,schemaCode:u,it:m}=o,v=m.opts.unicodeRegExp?"u":"";if(c){const{regExp:w}=m.opts.code,R=w.code==="new RegExp"?(0,r._)`new RegExp`:(0,t.useFunc)(i,w),C=i.let("valid");i.try(()=>i.assign(C,(0,r._)`${R}(${u}, ${v}).test(${a})`),()=>i.assign(C,!1)),o.fail$data((0,r._)`!${C}`)}else{const w=(0,e.usePattern)(o,l);o.fail$data((0,r._)`!${w}.test(${a})`)}}};return Tn.default=s,Tn}var Mn={},Ba;function fh(){if(Ba)return Mn;Ba=1,Object.defineProperty(Mn,"__esModule",{value:!0});const e=he(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:i}=n,a=s==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${o}).length ${a} ${i}`)}};return Mn.default=r,Mn}var In={},Ga;function ph(){if(Ga)return In;Ga=1,Object.defineProperty(In,"__esModule",{value:!0});const e=_t(),t=he(),r=ye(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,t.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,t._)`{missingProperty: ${o}}`},code(o){const{gen:i,schema:a,schemaCode:c,data:l,$data:u,it:m}=o,{opts:v}=m;if(!u&&a.length===0)return;const w=a.length>=v.loopRequired;if(m.allErrors?R():C(),v.strictRequired){const g=o.parentSchema.properties,{definedProperties:S}=o.it;for(const k of a)if((g==null?void 0:g[k])===void 0&&!S.has(k)){const y=m.schemaEnv.baseId+m.errSchemaPath,b=`required property "${k}" is not defined at "${y}" (strictRequired)`;(0,r.checkStrictMode)(m,b,m.opts.strictRequired)}}function R(){if(w||u)o.block$data(t.nil,_);else for(const g of a)(0,e.checkReportMissingProp)(o,g)}function C(){const g=i.let("missing");if(w||u){const S=i.let("valid",!0);o.block$data(S,()=>P(g,S)),o.ok(S)}else i.if((0,e.checkMissingProp)(o,a,g)),(0,e.reportMissingProp)(o,g),i.else()}function _(){i.forOf("prop",c,g=>{o.setParams({missingProperty:g}),i.if((0,e.noPropertyInData)(i,l,g,v.ownProperties),()=>o.error())})}function P(g,S){o.setParams({missingProperty:g}),i.forOf(g,c,()=>{i.assign(S,(0,e.propertyInData)(i,l,g,v.ownProperties)),i.if((0,t.not)(S),()=>{o.error(),i.break()})},t.nil)}}};return In.default=s,In}var jn={},Ja;function hh(){if(Ja)return jn;Ja=1,Object.defineProperty(jn,"__esModule",{value:!0});const e=he(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:s}){const o=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${s} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:s,data:o,schemaCode:i}=n,a=s==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${o}.length ${a} ${i}`)}};return jn.default=r,jn}var Dn={},Ln={},Ya;function $i(){if(Ya)return Ln;Ya=1,Object.defineProperty(Ln,"__esModule",{value:!0});const e=gu();return e.code='require("ajv/dist/runtime/equal").default',Ln.default=e,Ln}var Xa;function mh(){if(Xa)return Dn;Xa=1,Object.defineProperty(Dn,"__esModule",{value:!0});const e=Ts(),t=he(),r=ye(),n=$i(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i,j:a}})=>(0,t.str)`must NOT have duplicate items (items ## ${a} and ${i} are identical)`,params:({params:{i,j:a}})=>(0,t._)`{i: ${i}, j: ${a}}`},code(i){const{gen:a,data:c,$data:l,schema:u,parentSchema:m,schemaCode:v,it:w}=i;if(!l&&!u)return;const R=a.let("valid"),C=m.items?(0,e.getSchemaTypes)(m.items):[];i.block$data(R,_,(0,t._)`${v} === false`),i.ok(R);function _(){const k=a.let("i",(0,t._)`${c}.length`),y=a.let("j");i.setParams({i:k,j:y}),a.assign(R,!0),a.if((0,t._)`${k} > 1`,()=>(P()?g:S)(k,y))}function P(){return C.length>0&&!C.some(k=>k==="object"||k==="array")}function g(k,y){const b=a.name("item"),O=(0,e.checkDataTypes)(C,b,w.opts.strictNumbers,e.DataType.Wrong),L=a.const("indices",(0,t._)`{}`);a.for((0,t._)`;${k}--;`,()=>{a.let(b,(0,t._)`${c}[${k}]`),a.if(O,(0,t._)`continue`),C.length>1&&a.if((0,t._)`typeof ${b} == "string"`,(0,t._)`${b} += "_"`),a.if((0,t._)`typeof ${L}[${b}] == "number"`,()=>{a.assign(y,(0,t._)`${L}[${b}]`),i.error(),a.assign(R,!1).break()}).code((0,t._)`${L}[${b}] = ${k}`)})}function S(k,y){const b=(0,r.useFunc)(a,n.default),O=a.name("outer");a.label(O).for((0,t._)`;${k}--;`,()=>a.for((0,t._)`${y} = ${k}; ${y}--;`,()=>a.if((0,t._)`${b}(${c}[${k}], ${c}[${y}])`,()=>{i.error(),a.assign(R,!1).break(O)})))}}};return Dn.default=o,Dn}var Fn={},Qa;function gh(){if(Qa)return Fn;Qa=1,Object.defineProperty(Fn,"__esModule",{value:!0});const e=he(),t=ye(),r=$i(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,e._)`{allowedValue: ${o}}`},code(o){const{gen:i,data:a,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,e._)`!${(0,t.useFunc)(i,r.default)}(${a}, ${l})`):o.fail((0,e._)`${u} !== ${a}`)}};return Fn.default=s,Fn}var qn={},Za;function yh(){if(Za)return qn;Za=1,Object.defineProperty(qn,"__esModule",{value:!0});const e=he(),t=ye(),r=$i(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,e._)`{allowedValues: ${o}}`},code(o){const{gen:i,data:a,$data:c,schema:l,schemaCode:u,it:m}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const v=l.length>=m.opts.loopEnum;let w;const R=()=>w??(w=(0,t.useFunc)(i,r.default));let C;if(v||c)C=i.let("valid"),o.block$data(C,_);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const g=i.const("vSchema",u);C=(0,e.or)(...l.map((S,k)=>P(g,k)))}o.pass(C);function _(){i.assign(C,!1),i.forOf("v",u,g=>i.if((0,e._)`${R()}(${a}, ${g})`,()=>i.assign(C,!0).break()))}function P(g,S){const k=l[S];return typeof k=="object"&&k!==null?(0,e._)`${R()}(${a}, ${g}[${S}])`:(0,e._)`${a} === ${k}`}}};return qn.default=s,qn}var ec;function vh(){if(ec)return Rn;ec=1,Object.defineProperty(Rn,"__esModule",{value:!0});const e=ah(),t=ch(),r=uh(),n=dh(),s=fh(),o=ph(),i=hh(),a=mh(),c=gh(),l=yh(),u=[e.default,t.default,r.default,n.default,s.default,o.default,i.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return Rn.default=u,Rn}var Vn={},hr={},tc;function vu(){if(tc)return hr;tc=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.validateAdditionalItems=void 0;const e=he(),t=ye(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,e.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,e._)`{limit: ${o}}`},code(o){const{parentSchema:i,it:a}=o,{items:c}=i;if(!Array.isArray(c)){(0,t.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(o,c)}};function s(o,i){const{gen:a,schema:c,data:l,keyword:u,it:m}=o;m.items=!0;const v=a.const("len",(0,e._)`${l}.length`);if(c===!1)o.setParams({len:i.length}),o.pass((0,e._)`${v} <= ${i.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(m,c)){const R=a.var("valid",(0,e._)`${v} <= ${i.length}`);a.if((0,e.not)(R),()=>w(R)),o.ok(R)}function w(R){a.forRange("i",i.length,v,C=>{o.subschema({keyword:u,dataProp:C,dataPropType:t.Type.Num},R),m.allErrors||a.if((0,e.not)(R),()=>a.break())})}}return hr.validateAdditionalItems=s,hr.default=n,hr}var Un={},mr={},rc;function _u(){if(rc)return mr;rc=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.validateTuple=void 0;const e=he(),t=ye(),r=_t(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(o){const{schema:i,it:a}=o;if(Array.isArray(i))return s(o,"additionalItems",i);a.items=!0,!(0,t.alwaysValidSchema)(a,i)&&o.ok((0,r.validateArray)(o))}};function s(o,i,a=o.schema){const{gen:c,parentSchema:l,data:u,keyword:m,it:v}=o;C(l),v.opts.unevaluated&&a.length&&v.items!==!0&&(v.items=t.mergeEvaluated.items(c,a.length,v.items));const w=c.name("valid"),R=c.const("len",(0,e._)`${u}.length`);a.forEach((_,P)=>{(0,t.alwaysValidSchema)(v,_)||(c.if((0,e._)`${R} > ${P}`,()=>o.subschema({keyword:m,schemaProp:P,dataProp:P},w)),o.ok(w))});function C(_){const{opts:P,errSchemaPath:g}=v,S=a.length,k=S===_.minItems&&(S===_.maxItems||_[i]===!1);if(P.strictTuples&&!k){const y=`"${m}" is ${S}-tuple, but minItems or maxItems/${i} are not specified or different at path "${g}"`;(0,t.checkStrictMode)(v,y,P.strictTuples)}}}return mr.validateTuple=s,mr.default=n,mr}var nc;function _h(){if(nc)return Un;nc=1,Object.defineProperty(Un,"__esModule",{value:!0});const e=_u(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Un.default=t,Un}var Kn={},sc;function $h(){if(sc)return Kn;sc=1,Object.defineProperty(Kn,"__esModule",{value:!0});const e=he(),t=ye(),r=_t(),n=vu(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{schema:a,parentSchema:c,it:l}=i,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,a)&&(u?(0,n.validateAdditionalItems)(i,u):i.ok((0,r.validateArray)(i)))}};return Kn.default=o,Kn}var zn={},oc;function bh(){if(oc)return zn;oc=1,Object.defineProperty(zn,"__esModule",{value:!0});const e=he(),t=ye(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:o}})=>o===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${o} valid item(s)`,params:({params:{min:s,max:o}})=>o===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${o}}`},code(s){const{gen:o,schema:i,parentSchema:a,data:c,it:l}=s;let u,m;const{minContains:v,maxContains:w}=a;l.opts.next?(u=v===void 0?1:v,m=w):u=1;const R=o.const("len",(0,e._)`${c}.length`);if(s.setParams({min:u,max:m}),m===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&u>m){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(l,i)){let S=(0,e._)`${R} >= ${u}`;m!==void 0&&(S=(0,e._)`${S} && ${R} <= ${m}`),s.pass(S);return}l.items=!0;const C=o.name("valid");m===void 0&&u===1?P(C,()=>o.if(C,()=>o.break())):u===0?(o.let(C,!0),m!==void 0&&o.if((0,e._)`${c}.length > 0`,_)):(o.let(C,!1),_()),s.result(C,()=>s.reset());function _(){const S=o.name("_valid"),k=o.let("count",0);P(S,()=>o.if(S,()=>g(k)))}function P(S,k){o.forRange("i",0,R,y=>{s.subschema({keyword:"contains",dataProp:y,dataPropType:t.Type.Num,compositeRule:!0},S),k()})}function g(S){o.code((0,e._)`${S}++`),m===void 0?o.if((0,e._)`${S} >= ${u}`,()=>o.assign(C,!0).break()):(o.if((0,e._)`${S} > ${m}`,()=>o.assign(C,!1).break()),u===1?o.assign(C,!0):o.if((0,e._)`${S} >= ${u}`,()=>o.assign(C,!0)))}}};return zn.default=n,zn}var xo={},ic;function bi(){return ic||(ic=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=he(),r=ye(),n=_t();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const m=l===1?"property":"properties";return(0,t.str)`must have ${m} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:m}})=>(0,t._)`{property: ${c}, missingProperty: ${m}, depsCount: ${l}, deps: ${u}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=o(c);i(c,l),a(c,u)}};function o({schema:c}){const l={},u={};for(const m in c){if(m==="__proto__")continue;const v=Array.isArray(c[m])?l:u;v[m]=c[m]}return[l,u]}function i(c,l=c.schema){const{gen:u,data:m,it:v}=c;if(Object.keys(l).length===0)return;const w=u.let("missing");for(const R in l){const C=l[R];if(C.length===0)continue;const _=(0,n.propertyInData)(u,m,R,v.opts.ownProperties);c.setParams({property:R,depsCount:C.length,deps:C.join(", ")}),v.allErrors?u.if(_,()=>{for(const P of C)(0,n.checkReportMissingProp)(c,P)}):(u.if((0,t._)`${_} && (${(0,n.checkMissingProp)(c,C,w)})`),(0,n.reportMissingProp)(c,w),u.else())}}e.validatePropertyDeps=i;function a(c,l=c.schema){const{gen:u,data:m,keyword:v,it:w}=c,R=u.name("valid");for(const C in l)(0,r.alwaysValidSchema)(w,l[C])||(u.if((0,n.propertyInData)(u,m,C,w.opts.ownProperties),()=>{const _=c.subschema({keyword:v,schemaProp:C},R);c.mergeValidEvaluated(_,R)},()=>u.var(R,!0)),c.ok(R))}e.validateSchemaDeps=a,e.default=s})(xo)),xo}var Hn={},ac;function wh(){if(ac)return Hn;ac=1,Object.defineProperty(Hn,"__esModule",{value:!0});const e=he(),t=ye(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:o,schema:i,data:a,it:c}=s;if((0,t.alwaysValidSchema)(c,i))return;const l=o.name("valid");o.forIn("key",a,u=>{s.setParams({propertyName:u}),s.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,e.not)(l),()=>{s.error(!0),c.allErrors||o.break()})}),s.ok(l)}};return Hn.default=n,Hn}var Wn={},cc;function $u(){if(cc)return Wn;cc=1,Object.defineProperty(Wn,"__esModule",{value:!0});const e=_t(),t=he(),r=vt(),n=ye(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:i})=>(0,t._)`{additionalProperty: ${i.additionalProperty}}`},code(i){const{gen:a,schema:c,parentSchema:l,data:u,errsCount:m,it:v}=i;if(!m)throw new Error("ajv implementation error");const{allErrors:w,opts:R}=v;if(v.props=!0,R.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(v,c))return;const C=(0,e.allSchemaProperties)(l.properties),_=(0,e.allSchemaProperties)(l.patternProperties);P(),i.ok((0,t._)`${m} === ${r.default.errors}`);function P(){a.forIn("key",u,b=>{!C.length&&!_.length?k(b):a.if(g(b),()=>k(b))})}function g(b){let O;if(C.length>8){const L=(0,n.schemaRefOrVal)(v,l.properties,"properties");O=(0,e.isOwnProperty)(a,L,b)}else C.length?O=(0,t.or)(...C.map(L=>(0,t._)`${b} === ${L}`)):O=t.nil;return _.length&&(O=(0,t.or)(O,..._.map(L=>(0,t._)`${(0,e.usePattern)(i,L)}.test(${b})`))),(0,t.not)(O)}function S(b){a.code((0,t._)`delete ${u}[${b}]`)}function k(b){if(R.removeAdditional==="all"||R.removeAdditional&&c===!1){S(b);return}if(c===!1){i.setParams({additionalProperty:b}),i.error(),w||a.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(v,c)){const O=a.name("valid");R.removeAdditional==="failing"?(y(b,O,!1),a.if((0,t.not)(O),()=>{i.reset(),S(b)})):(y(b,O),w||a.if((0,t.not)(O),()=>a.break()))}}function y(b,O,L){const U={keyword:"additionalProperties",dataProp:b,dataPropType:n.Type.Str};L===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),i.subschema(U,O)}}};return Wn.default=o,Wn}var Bn={},lc;function Ph(){if(lc)return Bn;lc=1,Object.defineProperty(Bn,"__esModule",{value:!0});const e=ro(),t=_t(),r=ye(),n=$u(),s={keyword:"properties",type:"object",schemaType:"object",code(o){const{gen:i,schema:a,parentSchema:c,data:l,it:u}=o;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(a);for(const _ of m)u.definedProperties.add(_);u.opts.unevaluated&&m.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(i,(0,r.toHash)(m),u.props));const v=m.filter(_=>!(0,r.alwaysValidSchema)(u,a[_]));if(v.length===0)return;const w=i.name("valid");for(const _ of v)R(_)?C(_):(i.if((0,t.propertyInData)(i,l,_,u.opts.ownProperties)),C(_),u.allErrors||i.else().var(w,!0),i.endIf()),o.it.definedProperties.add(_),o.ok(w);function R(_){return u.opts.useDefaults&&!u.compositeRule&&a[_].default!==void 0}function C(_){o.subschema({keyword:"properties",schemaProp:_,dataProp:_},w)}}};return Bn.default=s,Bn}var Gn={},uc;function Sh(){if(uc)return Gn;uc=1,Object.defineProperty(Gn,"__esModule",{value:!0});const e=_t(),t=he(),r=ye(),n=ye(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(o){const{gen:i,schema:a,data:c,parentSchema:l,it:u}=o,{opts:m}=u,v=(0,e.allSchemaProperties)(a),w=v.filter(k=>(0,r.alwaysValidSchema)(u,a[k]));if(v.length===0||w.length===v.length&&(!u.opts.unevaluated||u.props===!0))return;const R=m.strictSchema&&!m.allowMatchingProperties&&l.properties,C=i.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(i,u.props));const{props:_}=u;P();function P(){for(const k of v)R&&g(k),u.allErrors?S(k):(i.var(C,!0),S(k),i.if(C))}function g(k){for(const y in R)new RegExp(k).test(y)&&(0,r.checkStrictMode)(u,`property ${y} matches pattern ${k} (use allowMatchingProperties)`)}function S(k){i.forIn("key",c,y=>{i.if((0,t._)`${(0,e.usePattern)(o,k)}.test(${y})`,()=>{const b=w.includes(k);b||o.subschema({keyword:"patternProperties",schemaProp:k,dataProp:y,dataPropType:n.Type.Str},C),u.opts.unevaluated&&_!==!0?i.assign((0,t._)`${_}[${y}]`,!0):!b&&!u.allErrors&&i.if((0,t.not)(C),()=>i.break())})})}}};return Gn.default=s,Gn}var Jn={},dc;function Eh(){if(dc)return Jn;dc=1,Object.defineProperty(Jn,"__esModule",{value:!0});const e=ye(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:s,it:o}=r;if((0,e.alwaysValidSchema)(o,s)){r.fail();return}const i=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),r.failResult(i,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return Jn.default=t,Jn}var Yn={},fc;function Ch(){if(fc)return Yn;fc=1,Object.defineProperty(Yn,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_t().validateUnion,error:{message:"must match a schema in anyOf"}};return Yn.default=t,Yn}var Xn={},pc;function kh(){if(pc)return Xn;pc=1,Object.defineProperty(Xn,"__esModule",{value:!0});const e=he(),t=ye(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:o,schema:i,parentSchema:a,it:c}=s;if(!Array.isArray(i))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;const l=i,u=o.let("valid",!1),m=o.let("passing",null),v=o.name("_valid");s.setParams({passing:m}),o.block(w),s.result(u,()=>s.reset(),()=>s.error(!0));function w(){l.forEach((R,C)=>{let _;(0,t.alwaysValidSchema)(c,R)?o.var(v,!0):_=s.subschema({keyword:"oneOf",schemaProp:C,compositeRule:!0},v),C>0&&o.if((0,e._)`${v} && ${u}`).assign(u,!1).assign(m,(0,e._)`[${m}, ${C}]`).else(),o.if(v,()=>{o.assign(u,!0),o.assign(m,C),_&&s.mergeEvaluated(_,e.Name)})})}}};return Xn.default=n,Xn}var Qn={},hc;function Rh(){if(hc)return Qn;hc=1,Object.defineProperty(Qn,"__esModule",{value:!0});const e=ye(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:s,it:o}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");const i=n.name("valid");s.forEach((a,c)=>{if((0,e.alwaysValidSchema)(o,a))return;const l=r.subschema({keyword:"allOf",schemaProp:c},i);r.ok(i),r.mergeEvaluated(l)})}};return Qn.default=t,Qn}var Zn={},mc;function Nh(){if(mc)return Zn;mc=1,Object.defineProperty(Zn,"__esModule",{value:!0});const e=he(),t=ye(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,e.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,e._)`{failingKeyword: ${o.ifClause}}`},code(o){const{gen:i,parentSchema:a,it:c}=o;a.then===void 0&&a.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=s(c,"then"),u=s(c,"else");if(!l&&!u)return;const m=i.let("valid",!0),v=i.name("_valid");if(w(),o.reset(),l&&u){const C=i.let("ifClause");o.setParams({ifClause:C}),i.if(v,R("then",C),R("else",C))}else l?i.if(v,R("then")):i.if((0,e.not)(v),R("else"));o.pass(m,()=>o.error(!0));function w(){const C=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);o.mergeEvaluated(C)}function R(C,_){return()=>{const P=o.subschema({keyword:C},v);i.assign(m,v),o.mergeValidEvaluated(P,m),_?i.assign(_,(0,e._)`${C}`):o.setParams({ifClause:C})}}}};function s(o,i){const a=o.schema[i];return a!==void 0&&!(0,t.alwaysValidSchema)(o,a)}return Zn.default=n,Zn}var es={},gc;function Oh(){if(gc)return es;gc=1,Object.defineProperty(es,"__esModule",{value:!0});const e=ye(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:s}){n.if===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "if" is ignored`)}};return es.default=t,es}var yc;function Ah(){if(yc)return Vn;yc=1,Object.defineProperty(Vn,"__esModule",{value:!0});const e=vu(),t=_h(),r=_u(),n=$h(),s=bh(),o=bi(),i=wh(),a=$u(),c=Ph(),l=Sh(),u=Eh(),m=Ch(),v=kh(),w=Rh(),R=Nh(),C=Oh();function _(P=!1){const g=[u.default,m.default,v.default,w.default,R.default,C.default,i.default,a.default,o.default,c.default,l.default];return P?g.push(t.default,n.default):g.push(e.default,r.default),g.push(s.default),g}return Vn.default=_,Vn}var ts={},gr={},vc;function bu(){if(vc)return gr;vc=1,Object.defineProperty(gr,"__esModule",{value:!0}),gr.dynamicAnchor=void 0;const e=he(),t=vt(),r=so(),n=_i(),s={keyword:"$dynamicAnchor",schemaType:"string",code:a=>o(a,a.schema)};function o(a,c){const{gen:l,it:u}=a;u.schemaEnv.root.dynamicAnchors[c]=!0;const m=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,v=u.errSchemaPath==="#"?u.validateName:i(a);l.if((0,e._)`!${m}`,()=>l.assign(m,v))}gr.dynamicAnchor=o;function i(a){const{schemaEnv:c,schema:l,self:u}=a.it,{root:m,baseId:v,localRefs:w,meta:R}=c.root,{schemaId:C}=u.opts,_=new r.SchemaEnv({schema:l,schemaId:C,root:m,baseId:v,localRefs:w,meta:R});return r.compileSchema.call(u,_),(0,n.getValidate)(a,_)}return gr.default=s,gr}var yr={},_c;function wu(){if(_c)return yr;_c=1,Object.defineProperty(yr,"__esModule",{value:!0}),yr.dynamicRef=void 0;const e=he(),t=vt(),r=_i(),n={keyword:"$dynamicRef",schemaType:"string",code:o=>s(o,o.schema)};function s(o,i){const{gen:a,keyword:c,it:l}=o;if(i[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const u=i.slice(1);if(l.allErrors)m();else{const w=a.let("valid",!1);m(w),o.ok(w)}function m(w){if(l.schemaEnv.root.dynamicAnchors[u]){const R=a.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(u)}`);a.if(R,v(R,w),v(l.validateName,w))}else v(l.validateName,w)()}function v(w,R){return R?()=>a.block(()=>{(0,r.callRef)(o,w),a.let(R,!0)}):()=>(0,r.callRef)(o,w)}}return yr.dynamicRef=s,yr.default=n,yr}var rs={},$c;function xh(){if($c)return rs;$c=1,Object.defineProperty(rs,"__esModule",{value:!0});const e=bu(),t=ye(),r={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,e.dynamicAnchor)(n,""):(0,t.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};return rs.default=r,rs}var ns={},bc;function Th(){if(bc)return ns;bc=1,Object.defineProperty(ns,"__esModule",{value:!0});const e=wu(),t={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,e.dynamicRef)(r,r.schema)};return ns.default=t,ns}var wc;function Mh(){if(wc)return ts;wc=1,Object.defineProperty(ts,"__esModule",{value:!0});const e=bu(),t=wu(),r=xh(),n=Th(),s=[e.default,t.default,r.default,n.default];return ts.default=s,ts}var ss={},os={},Pc;function Ih(){if(Pc)return os;Pc=1,Object.defineProperty(os,"__esModule",{value:!0});const e=bi(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:r=>(0,e.validatePropertyDeps)(r)};return os.default=t,os}var is={},Sc;function jh(){if(Sc)return is;Sc=1,Object.defineProperty(is,"__esModule",{value:!0});const e=bi(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,e.validateSchemaDeps)(r)};return is.default=t,is}var as={},Ec;function Dh(){if(Ec)return as;Ec=1,Object.defineProperty(as,"__esModule",{value:!0});const e=ye(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:n,it:s}){n.contains===void 0&&(0,e.checkStrictMode)(s,`"${r}" without "contains" is ignored`)}};return as.default=t,as}var Cc;function Lh(){if(Cc)return ss;Cc=1,Object.defineProperty(ss,"__esModule",{value:!0});const e=Ih(),t=jh(),r=Dh(),n=[e.default,t.default,r.default];return ss.default=n,ss}var cs={},ls={},kc;function Fh(){if(kc)return ls;kc=1,Object.defineProperty(ls,"__esModule",{value:!0});const e=he(),t=ye(),r=vt(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,e._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){const{gen:i,schema:a,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");const{allErrors:m,props:v}=u;v instanceof e.Name?i.if((0,e._)`${v} !== true`,()=>i.forIn("key",c,_=>i.if(R(v,_),()=>w(_)))):v!==!0&&i.forIn("key",c,_=>v===void 0?w(_):i.if(C(v,_),()=>w(_))),u.props=!0,o.ok((0,e._)`${l} === ${r.default.errors}`);function w(_){if(a===!1){o.setParams({unevaluatedProperty:_}),o.error(),m||i.break();return}if(!(0,t.alwaysValidSchema)(u,a)){const P=i.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:_,dataPropType:t.Type.Str},P),m||i.if((0,e.not)(P),()=>i.break())}}function R(_,P){return(0,e._)`!${_} || !${_}[${P}]`}function C(_,P){const g=[];for(const S in _)_[S]===!0&&g.push((0,e._)`${P} !== ${S}`);return(0,e.and)(...g)}}};return ls.default=s,ls}var us={},Rc;function qh(){if(Rc)return us;Rc=1,Object.defineProperty(us,"__esModule",{value:!0});const e=he(),t=ye(),n={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:o,schema:i,data:a,it:c}=s,l=c.items||0;if(l===!0)return;const u=o.const("len",(0,e._)`${a}.length`);if(i===!1)s.setParams({len:l}),s.fail((0,e._)`${u} > ${l}`);else if(typeof i=="object"&&!(0,t.alwaysValidSchema)(c,i)){const v=o.var("valid",(0,e._)`${u} <= ${l}`);o.if((0,e.not)(v),()=>m(v,l)),s.ok(v)}c.items=!0;function m(v,w){o.forRange("i",w,u,R=>{s.subschema({keyword:"unevaluatedItems",dataProp:R,dataPropType:t.Type.Num},v),c.allErrors||o.if((0,e.not)(v),()=>o.break())})}}};return us.default=n,us}var Nc;function Vh(){if(Nc)return cs;Nc=1,Object.defineProperty(cs,"__esModule",{value:!0});const e=Fh(),t=qh(),r=[e.default,t.default];return cs.default=r,cs}var ds={},fs={},Oc;function Uh(){if(Oc)return fs;Oc=1,Object.defineProperty(fs,"__esModule",{value:!0});const e=he(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,s){const{gen:o,data:i,$data:a,schema:c,schemaCode:l,it:u}=n,{opts:m,errSchemaPath:v,schemaEnv:w,self:R}=u;if(!m.validateFormats)return;a?C():_();function C(){const P=o.scopeValue("formats",{ref:R.formats,code:m.code.formats}),g=o.const("fDef",(0,e._)`${P}[${l}]`),S=o.let("fType"),k=o.let("format");o.if((0,e._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>o.assign(S,(0,e._)`${g}.type || "string"`).assign(k,(0,e._)`${g}.validate`),()=>o.assign(S,(0,e._)`"string"`).assign(k,g)),n.fail$data((0,e.or)(y(),b()));function y(){return m.strictSchema===!1?e.nil:(0,e._)`${l} && !${k}`}function b(){const O=w.$async?(0,e._)`(${g}.async ? await ${k}(${i}) : ${k}(${i}))`:(0,e._)`${k}(${i})`,L=(0,e._)`(typeof ${k} == "function" ? ${O} : ${k}.test(${i}))`;return(0,e._)`${k} && ${k} !== true && ${S} === ${s} && !${L}`}}function _(){const P=R.formats[c];if(!P){y();return}if(P===!0)return;const[g,S,k]=b(P);g===s&&n.pass(O());function y(){if(m.strictSchema===!1){R.logger.warn(L());return}throw new Error(L());function L(){return`unknown format "${c}" ignored in schema at path "${v}"`}}function b(L){const U=L instanceof RegExp?(0,e.regexpCode)(L):m.code.formats?(0,e._)`${m.code.formats}${(0,e.getProperty)(c)}`:void 0,z=o.scopeValue("formats",{key:c,ref:L,code:U});return typeof L=="object"&&!(L instanceof RegExp)?[L.type||"string",L.validate,(0,e._)`${z}.validate`]:["string",L,z]}function O(){if(typeof P=="object"&&!(P instanceof RegExp)&&P.async){if(!w.$async)throw new Error("async format in sync schema");return(0,e._)`await ${k}(${i})`}return typeof S=="function"?(0,e._)`${k}(${i})`:(0,e._)`${k}.test(${i})`}}}};return fs.default=r,fs}var Ac;function Kh(){if(Ac)return ds;Ac=1,Object.defineProperty(ds,"__esModule",{value:!0});const t=[Uh().default];return ds.default=t,ds}var er={},xc;function zh(){return xc||(xc=1,Object.defineProperty(er,"__esModule",{value:!0}),er.contentVocabulary=er.metadataVocabulary=void 0,er.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],er.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),er}var Tc;function Hh(){if(Tc)return En;Tc=1,Object.defineProperty(En,"__esModule",{value:!0});const e=ih(),t=vh(),r=Ah(),n=Mh(),s=Lh(),o=Vh(),i=Kh(),a=zh(),c=[n.default,e.default,t.default,(0,r.default)(!0),i.default,a.metadataVocabulary,a.contentVocabulary,s.default,o.default];return En.default=c,En}var ps={},jr={},Mc;function Wh(){if(Mc)return jr;Mc=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(jr.DiscrError=e={})),jr}var Ic;function Bh(){if(Ic)return ps;Ic=1,Object.defineProperty(ps,"__esModule",{value:!0});const e=he(),t=Wh(),r=so(),n=no(),s=ye(),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${c}}`},code(a){const{gen:c,data:l,schema:u,parentSchema:m,it:v}=a,{oneOf:w}=m;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const R=u.propertyName;if(typeof R!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!w)throw new Error("discriminator: requires oneOf keyword");const C=c.let("valid",!1),_=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(R)}`);c.if((0,e._)`typeof ${_} == "string"`,()=>P(),()=>a.error(!1,{discrError:t.DiscrError.Tag,tag:_,tagName:R})),a.ok(C);function P(){const k=S();c.if(!1);for(const y in k)c.elseIf((0,e._)`${_} === ${y}`),c.assign(C,g(k[y]));c.else(),a.error(!1,{discrError:t.DiscrError.Mapping,tag:_,tagName:R}),c.endIf()}function g(k){const y=c.name("valid"),b=a.subschema({keyword:"oneOf",schemaProp:k},y);return a.mergeEvaluated(b,e.Name),y}function S(){var k;const y={},b=L(m);let O=!0;for(let re=0;rethis.addMetaSchema(v,void 0,!1)),this;function m(v,w){return u?v.$dataMetaSchema(w,c):w}}return hs.default=l,hs}var Dc;function ug(){return Dc||(Dc=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const r=sh(),n=Hh(),s=Bh(),o=lg(),i="https://json-schema.org/draft/2020-12/schema";class a extends r.default{constructor(w={}){super({...w,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),n.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:w,meta:R}=this.opts;R&&(o.default.call(this,w),this.refs["http://json-schema.org/schema"]=i)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(i)?i:void 0)}}t.Ajv2020=a,e.exports=t=a,e.exports.Ajv2020=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var c=ro();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=he();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var u=vi();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return u.default}});var m=no();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})($n,$n.exports)),$n.exports}var dg=ug();const fg=Up(dg),pg="https://json-schema.org/draft/2020-12/schema",hg="https://onegrid.local/schema/config/0.1.0",mg="OneGrid device configuration",gg="Single source of truth for the OneGrid config format (W1, red line 3). Version 0.1.0 is a DRAFT pending review with the firmware owner (F6/F7). Capacity limits: layers <= 16, macros <= 64, steps per macro <= 128 (CONFIG-UX-PLAN §1). Display fields (label, icon) are stored on the device so every configurator shows the same caps.",yg="object",vg=!1,_g=["schemaVersion","layers","macros","settings"],$g={schemaVersion:{const:"0.1.0",description:"Schema version this config was written for. Major bump = breaking (needs migration, raises the on-device config version); minor = additive (PLAN D-S1)."},layers:{type:"array",minItems:1,maxItems:16,items:{$ref:"#/$defs/layer"}},macros:{type:"array",maxItems:64,items:{$ref:"#/$defs/macro"}},settings:{$ref:"#/$defs/settings"}},bg=JSON.parse(`{"keyName":{"enum":["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","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","F13","F14","F15","F16","F17","F18","F19","F20","F21","F22","F23","F24","ENTER","ESC","BACKSPACE","TAB","SPACE","MINUS","EQUAL","LBRACKET","RBRACKET","BACKSLASH","SEMICOLON","QUOTE","GRAVE","COMMA","DOT","SLASH","CAPS_LOCK","NUM_LOCK","SCROLL_LOCK","PRINT_SCREEN","PAUSE","INSERT","DELETE","HOME","END","PAGE_UP","PAGE_DOWN","RIGHT","LEFT","DOWN","UP","APPLICATION","KP_0","KP_1","KP_2","KP_3","KP_4","KP_5","KP_6","KP_7","KP_8","KP_9","KP_DOT","KP_ENTER","KP_PLUS","KP_MINUS","KP_ASTERISK","KP_SLASH","KP_EQUAL","INTL1","INTL2","INTL3","INTL4","INTL5","LANG1","LANG2","LANG3","LANG4","LANG5","LCTRL","LSHIFT","LALT","LGUI","RCTRL","RSHIFT","RALT","RGUI"],"description":"Keyboard page key names (HID usage table, US layout)."},"mediaName":{"enum":["PLAY_PAUSE","STOP","NEXT_TRACK","PREV_TRACK","FAST_FORWARD","REWIND","EJECT","MUTE","VOLUME_UP","VOLUME_DOWN","BRIGHTNESS_UP","BRIGHTNESS_DOWN","WWW_HOME","WWW_BACK","WWW_FORWARD","WWW_REFRESH","WWW_STOP","WWW_SEARCH","WWW_FAVORITES","MAIL","CALCULATOR","MY_COMPUTER","MEDIA_SELECT","CONTROL_PANEL","SYSTEM_POWER","SYSTEM_SLEEP","SYSTEM_WAKE"]},"mods":{"type":"array","items":{"enum":["ctrl","shift","alt","gui","rctrl","rshift","ralt","rgui"]},"uniqueItems":true,"maxItems":8},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","description":"Commanded 8-bit sRGB colour sent to the LED, #RRGGBB."},"macroId":{"type":"string","pattern":"^m[0-9]{1,3}$"},"label":{"type":"string","minLength":1,"maxLength":12,"description":"Display name on the cap. The configurator enforces 12 width units (CJK/emoji = 2, Latin = 1) and the allowed character set; the schema caps code points."},"icon":{"type":"string","minLength":1,"maxLength":16,"description":"One decorative grapheme (emoji or symbol) shown on the cap."},"action":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"type":{"const":"none"}},"required":["type"],"description":"Nothing bound."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"hotkey"},"key":{"$ref":"#/$defs/keyName"},"mods":{"$ref":"#/$defs/mods"}},"required":["type","key"],"description":"单键 / 组合键: one key with optional modifiers."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"media"},"usage":{"$ref":"#/$defs/mediaName"}},"required":["type","usage"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"macro"},"macro":{"$ref":"#/$defs/macroId"}},"required":["type","macro"],"description":"Reference to a macro in the library (macros are objects referenced by keys)."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"layer"},"op":{"enum":["to","next","prev","hold"]},"layer":{"type":"integer","minimum":1,"maximum":16}},"required":["type","op"],"description":"翻页: layer operation; 'to' and 'hold' need layer.","if":{"properties":{"op":{"enum":["to","hold"]}}},"then":{"required":["layer"]}},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"lightControl"},"op":{"enum":["toggle","nextEffect","brighter","dimmer"]}},"required":["type","op"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"alternate"},"a":{"$ref":"#/$defs/simpleAction"},"b":{"$ref":"#/$defs/simpleAction"}},"required":["type","a","b"],"description":"L2-34: each press alternates between A and B."}]},"simpleAction":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"type":{"const":"hotkey"},"key":{"$ref":"#/$defs/keyName"},"mods":{"$ref":"#/$defs/mods"}},"required":["type","key"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"media"},"usage":{"$ref":"#/$defs/mediaName"}},"required":["type","usage"]},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"macro"},"macro":{"$ref":"#/$defs/macroId"}},"required":["type","macro"]}]},"triggers":{"type":"object","additionalProperties":false,"properties":{"tap":{"$ref":"#/$defs/action","description":"L3-03 点按 (default)."},"hold":{"type":"object","additionalProperties":false,"properties":{"action":{"$ref":"#/$defs/action"},"ms":{"type":"integer","minimum":150,"maximum":2000,"default":400}},"required":["action"],"description":"L3-04 长按, threshold adjustable per key."},"double":{"type":"object","additionalProperties":false,"properties":{"action":{"$ref":"#/$defs/action"},"windowMs":{"type":"integer","minimum":120,"maximum":900,"default":320}},"required":["action"],"description":"L3-05 双击. Draft amendment under schema 0.1.0: default 320, maximum 900, matching firmware. The version is not bumped, so stored 0.1.0 configs still validate."},"release":{"$ref":"#/$defs/action","description":"L3-02 松开触发."},"split":{"type":"object","additionalProperties":false,"properties":{"down":{"$ref":"#/$defs/action"},"up":{"$ref":"#/$defs/action"}},"required":["down","up"],"description":"L2-05 按下/抬起分离."},"repeat":{"type":"object","additionalProperties":false,"properties":{"action":{"$ref":"#/$defs/action"},"intervalMs":{"type":"integer","minimum":30,"maximum":2000,"default":100},"maxSeconds":{"type":"integer","minimum":1,"maximum":600,"default":600}},"required":["action"],"description":"连发 while held. No official scheme uses it (red line 7); capped at 600 s."}},"required":[],"description":"Phase-1 triggers only (D-N1): tap, hold, double, release, press/release split, repeat. Combo / Tap Dance / Mod-Tap are v1.1 and need a schema bump.","minProperties":0},"key":{"type":"object","additionalProperties":false,"properties":{"label":{"$ref":"#/$defs/label"},"icon":{"$ref":"#/$defs/icon"},"color":{"type":"object","additionalProperties":false,"properties":{"idle":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","description":"Commanded 8-bit sRGB colour sent to the LED, #RRGGBB."},"press":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","description":"Commanded 8-bit sRGB colour sent to the LED, #RRGGBB."}},"required":["idle"],"description":"Per-key colour in this layer: 常亮色 and optional 按下色 (otherwise derived)."},"triggers":{"$ref":"#/$defs/triggers"}},"required":["color","triggers"]},"lighting":{"type":"object","additionalProperties":false,"properties":{"ring":{"type":"object","additionalProperties":false,"properties":{"effect":{"enum":["static","breathe","flow","rainbow","react","off"]},"palette":{"enum":["brand","warm","ice","mint","peach","violet"]},"speed":{"type":"integer","minimum":0,"maximum":100},"brightness":{"type":"integer","minimum":0,"maximum":100}},"required":["effect","palette","speed","brightness"],"description":"边框灯 (WS2812B-4020 chain)."},"keys":{"type":"object","additionalProperties":false,"properties":{"effect":{"enum":["static","breathe","wave","rainbow"]},"brightness":{"type":"integer","minimum":0,"maximum":100}},"required":["effect","brightness"],"description":"按键灯 (SK6812MINI-E chain)."}},"required":["ring","keys"]},"layer":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":12},"keys":{"type":"array","minItems":9,"maxItems":9,"items":{"$ref":"#/$defs/key"},"description":"Keys 1-9, row-major from top-left (top view)."},"lighting":{"$ref":"#/$defs/lighting"}},"required":["name","keys","lighting"]},"step":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"type":{"const":"tap"},"key":{"$ref":"#/$defs/keyName"},"mods":{"$ref":"#/$defs/mods"}},"required":["type","key"],"description":"L1-01/04/05/06/07/08/09/10: press and release one key, optionally with modifiers in the same frame."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"down"},"key":{"$ref":"#/$defs/keyName"}},"required":["type","key"],"description":"L1-02: key down without release. The firmware releases all keys when a macro ends or is aborted."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"up"},"key":{"$ref":"#/$defs/keyName"}},"required":["type","key"],"description":"L1-03: key release."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"media"},"usage":{"$ref":"#/$defs/mediaName"}},"required":["type","usage"],"description":"L1-11..16: system / consumer usages."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"text"},"text":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[\\\\n\\\\t\\\\x20-\\\\x7E]*$"}},"required":["type","text"],"description":"L1-17 / L2-31: printable ASCII text (multi-line allowed). Chinese / non-ASCII text cannot be sent over HID in phase 1 and is rejected here (red line 6)."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"mouseMove"},"dx":{"type":"integer","minimum":-2048,"maximum":2048},"dy":{"type":"integer","minimum":-2048,"maximum":2048}},"required":["type","dx","dy"],"description":"L1-19: relative mouse move in pixels-ish HID units."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"mouseButton"},"button":{"type":"integer","minimum":1,"maximum":8},"action":{"enum":["click","down","up"]}},"required":["type","button","action"],"description":"L1-21: mouse buttons 1-8."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"scroll"},"vertical":{"type":"integer","minimum":-127,"maximum":127},"horizontal":{"type":"integer","minimum":-127,"maximum":127}},"required":["type"],"description":"L1-22 / L1-23: vertical and horizontal wheel."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"delay"},"ms":{"type":"integer","minimum":0,"maximum":60000}},"required":["type","ms"],"description":"L2-01: fixed delay."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"call"},"macro":{"$ref":"#/$defs/macroId"}},"required":["type","macro"],"description":"L2-04: run another macro, then continue. Firmware limits nesting depth; cycles are rejected by the configurator."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"led"},"key":{"oneOf":[{"type":"integer","minimum":1,"maximum":9},{"const":"all"}]},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$","description":"Commanded 8-bit sRGB colour sent to the LED, #RRGGBB."}},"required":["type","key","color"],"description":"L1-30 / L2-32: set one key colour (or all) as a macro step."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"lightControl"},"op":{"enum":["toggle","nextEffect","brighter","dimmer"]}},"required":["type","op"],"description":"L1-31: lighting control step."},{"type":"object","additionalProperties":false,"properties":{"type":{"const":"layer"},"op":{"enum":["to","next","prev"]},"layer":{"type":"integer","minimum":1,"maximum":16}},"required":["type","op"],"description":"L2-32: switch layer as a step. 'to' needs layer.","if":{"properties":{"op":{"const":"to"}}},"then":{"required":["layer"]}}]},"run":{"type":"object","additionalProperties":false,"properties":{"mode":{"enum":["once","count","hold","toggle"],"description":"L2-10 once, L2-07 count, L2-09 while held, L2-08 toggle until pressed again."},"count":{"type":"integer","minimum":1,"maximum":99},"maxSeconds":{"type":"integer","minimum":1,"maximum":600,"default":600,"description":"Hard cap for hold / toggle loops (PLAN D-C6). No field may raise it above 600 s; the firmware enforces it on the device."}},"required":["mode"],"allOf":[{"if":{"properties":{"mode":{"const":"count"}}},"then":{"required":["count"]}}]},"macro":{"oneOf":[{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/$defs/macroId"},"name":{"type":"string","minLength":1,"maxLength":24},"defaultDelayMs":{"type":"integer","minimum":0,"maximum":1000,"default":20,"description":"L2-02 delay inserted between steps."},"run":{"$ref":"#/$defs/run"},"steps":{"type":"array","minItems":1,"maxItems":128,"items":{"$ref":"#/$defs/step"}}},"required":["id","name","steps"],"description":"User macro (never locked)."},{"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"#/$defs/macroId"},"name":{"type":"string","minLength":1,"maxLength":24},"protected":{"const":true},"preset":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"stepCount":{"type":"integer","minimum":1,"maximum":128},"sealed":{"type":"string","contentEncoding":"base64","maxLength":8192,"description":"Encrypted, device-bound execution layer (CONFIG-UX-PLAN §6). Absent in read-back: the device returns only display fields."}},"required":["id","name","protected","preset","stepCount"],"description":"Official preset macro: execution layer sealed; read-back is redacted."}]},"settings":{"type":"object","additionalProperties":false,"properties":{"deviceName":{"type":"string","minLength":1,"maxLength":24,"default":"OneGrid"},"debounceMs":{"type":"integer","minimum":1,"maximum":50,"default":5},"startLayer":{"type":"integer","minimum":1,"maximum":16,"default":1},"systemMode":{"description":"Reserved and unused in 0.1.0 (draft). Intended host operating system (Windows or Mac) for modifier and key names. Hidden in the UI; not required; existing configs omit it and stay valid.","type":"string","enum":["windows","mac"]}},"required":["deviceName","debounceMs"]}}`),Pu={$schema:pg,$id:hg,title:mg,description:gg,"x-schemaVersion":"0.1.0",type:yg,additionalProperties:vg,required:_g,properties:$g,$defs:bg},wi=1024,Su="这段文字超出可保存长度。再缩短一些后保存。",Eu="调用目标排在后面。改为调用排在前面的一组,或删除这一步。";function Pi(e){return JSON.stringify(e).length-2}function Cu(e){return Pi(e)<=wi}function w_(e){if(Cu(e))return e;const t=[...e];let r=0,n=t.length;for(;r[r.id,n]));for(const r of e){const n=t.get(r.id)??-1;for(const s of r.steps??[]){if(s.type!=="call"||!s.macro)continue;const o=t.get(s.macro);if(o!==void 0&&o>n)return{caller:r.id,callee:s.macro}}}return null}class Ms extends Error{constructor(t){super(t.join(";")),this.problems=t}}const ku=new fg({allErrors:!0,strict:!0,strictRequired:!1});ku.addKeyword("x-schemaVersion");const Lc=ku.compile(Pu);function Pg(e){const t=[];return e.layers.forEach((r,n)=>r.keys.forEach((s,o)=>{var c,l,u,m,v;const i=`第 ${n+1} 页 键 ${o+1}`,a=s.triggers;for(const w of[a.tap,a.release,(c=a.hold)==null?void 0:c.action,(l=a.double)==null?void 0:l.action,(u=a.split)==null?void 0:u.down,(m=a.split)==null?void 0:m.up,(v=a.repeat)==null?void 0:v.action])w&&(t.push({where:i,a:w}),w.type==="alternate"&&t.push({where:i,a:w.a},{where:i,a:w.b}))})),t}const Fc=e=>"steps"in e?e.steps.flatMap(t=>t.type==="call"?[t.macro]:[]):[];function Sg(e){const t=[],r=new Set;for(const c of e.macros)r.has(c.id)&&t.push(`自动操作编号重复:${c.id}`),r.add(c.id);const n=c=>c===void 0||c<=e.layers.length;for(const{where:c,a:l}of Pg(e))l.type==="macro"&&!r.has(l.macro)&&t.push(`${c} 引用的自动操作 ${l.macro} 不存在`),l.type==="layer"&&!n(l.layer)&&t.push(`${c} 跳到第 ${l.layer} 页,但只有 ${e.layers.length} 页`);for(const c of e.macros){for(const l of Fc(c))r.has(l)||t.push(`自动操作 ${c.id} 调用的 ${l} 不存在`);if("steps"in c)for(const l of c.steps)l.type==="layer"&&!n(l.layer)&&t.push(`自动操作 ${c.id} 跳到第 ${l.layer} 页,但只有 ${e.layers.length} 页`)}const s=new Map(e.macros.map(c=>[c.id,c])),o=new Map,i=c=>{if(o.get(c)===2)return!1;if(o.get(c)===1)return!0;o.set(c,1);const l=s.get(c),u=l?Fc(l).some(i):!1;return o.set(c,2),u};[...r].some(i)&&t.push("自动操作之间存在循环调用"),wg(e.macros)&&t.push(Eu);for(const c of e.macros)if("steps"in c)for(const l of c.steps)l.type==="text"&&Pi(l.text)>wi&&t.push(Su);return t}function Is(e){if(!Lc(e))throw new Ms((Lc.errors??[]).map(r=>`${r.instancePath||"/"} ${r.message??""}`));const t=Sg(e);if(t.length)throw new Ms(t);return e}function Eg(e){return{...e,macros:e.macros.map(t=>{if(!("protected"in t))return t;const{sealed:r,...n}=t;return n})}}function Ru(e){let t=65535;for(const r of e){t^=r<<8;for(let n=0;n<8;n++)t=t&32768?(t<<1^4129)&65535:t<<1&65535}return t}const Cg=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let n=0;n<8;n++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r>>>0}return e})();function js(e){let t=4294967295;for(const r of e)t=(Cg[(t^r)&255]??0)^t>>>8;return(t^4294967295)>>>0}const Ds=64,Ls=4,cr=62,Xo=cr-Ls;class Gr extends Error{}function kg(e){if(e.payload.length>Xo)throw new Gr(`payload ${e.payload.length} > ${Xo}`);const t=new Uint8Array(Ds);t[0]=e.cmd&255,t[1]=e.seq&255,t[2]=e.flags&255,t[3]=e.payload.length,t.set(e.payload,Ls);const r=Ru(t.subarray(0,cr));return t[cr]=r&255,t[cr+1]=r>>8,t}function Rg(e){if(e.length!==Ds)throw new Gr(`report size ${e.length}`);const t=(e[cr]??0)|(e[cr+1]??0)<<8;if(Ru(e.subarray(0,cr))!==t)throw new Gr("CRC mismatch");const r=e[3]??0;if(r>Xo)throw new Gr(`length ${r}`);return{cmd:e[0]??0,seq:e[1]??0,flags:e[2]??0,payload:e.slice(Ls,Ls+r)}}const $r=e=>Uint8Array.of(e&255,e>>>8&255,e>>>16&255,e>>>24&255),nr=(e,t)=>((e[t]??0)|(e[t+1]??0)<<8|(e[t+2]??0)<<16|(e[t+3]??0)<<24)>>>0,Qo=(...e)=>{const t=new Uint8Array(e.reduce((n,s)=>n+s.length,0));let r=0;for(const n of e)t.set(n,r),r+=n.length;return t},Nu=[79,71,67,49],Ou=Pu["x-schemaVersion"],[Zo,Au,Ng]=Ou.split(".").map(Number);class Fr extends Error{constructor(t,r="format"){super(t),this.kind=r}}function an(e){return JSON.stringify(e,(t,r)=>r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).sort(([n],[s])=>ns?1:0)):r)}function Og(e){const t=new TextEncoder().encode(an(e));return Qo(Uint8Array.from([...Nu,Zo,Au,Ng,0]),$r(t.length),$r(js(t)),t)}function Ag(e){if(e.length<16||Nu.some((n,s)=>e[s]!==n))throw new Fr("不是 OneGrid 配置");if(e[4]!==Zo)throw new Fr(`配置版本不兼容(设备 ${e[4]}.${e[5]},本页 ${Zo}.${Au})`,"version");const t=nr(e,8),r=e.subarray(16);if(r.length!==t)throw new Fr("配置长度不一致");if(js(r)!==nr(e,12))throw new Fr("配置校验失败");return JSON.parse(new TextDecoder().decode(r))}function Gt(e){return JSON.parse(JSON.stringify(e))}const Or=(e,t)=>an(e)===an(t);function xu(e,t,r){const n=e.layers[r],s=t.layers[r];return n?s?n.keys.flatMap((o,i)=>Or(o,s.keys[i])?[]:[i+1]):n.keys.map((o,i)=>i+1):[]}const xg=(e,t)=>e.layers.reduce((r,n,s)=>r+xu(e,t,s).length,0);function Tg(e,t){const r=new Map(t.macros.map(s=>[s.id,s])),n=new Set(e.macros.map(s=>s.id));return[...e.macros.filter(s=>!Or(s,r.get(s.id))).map(s=>s.id),...t.macros.filter(s=>!n.has(s.id)).map(s=>s.id)]}function Mg(e,t){const r=Tg(e,t),n=r.length===0&&!Or(e.macros,t.macros)?1:0;return xg(e,t)+r.length+n}const Ig=[{id:"L1-01",name:{zh:"单击某个键",en:"Key tap"},category:"按键",channel:"direct",maps:"step.tap",params:[{key:"key",type:"key"}],aliases:["点按","按一下","单键","adyx","tap"],description:"按下再松开一个键。"},{id:"L1-02",name:{zh:"按住某个键",en:"Key down"},category:"按键",channel:"direct",maps:"step.down",params:[{key:"key",type:"key"}],aliases:["按住","不松开","azmgj","keydown"],description:"按下一个键先不松开,配合「松开某个键」使用。"},{id:"L1-03",name:{zh:"松开某个键",en:"Key up"},category:"按键",channel:"direct",maps:"step.up",params:[{key:"key",type:"key"}],aliases:["松开","释放","skmgj","keyup"],description:"松开之前按住的键。"},{id:"L1-04",name:{zh:"组合键",en:"Shortcut"},category:"按键",channel:"direct",maps:"action.hotkey",params:[{key:"mods",type:"mods"},{key:"key",type:"key"}],aliases:["快捷键","组合","zhj","hotkey","shortcut"],description:"同时按下修饰键和一个键,例如 Ctrl + C。"},{id:"L1-06",name:{zh:"功能键 F1–F24",en:"Function keys"},category:"按键",channel:"direct",maps:"step.tap",params:[{key:"key",type:"key",options:["F1","F24"]}],aliases:["F键","功能键","gnj","f13"],description:"发送 F1 到 F24,F13 以后的键常用作软件的专用快捷键。"},{id:"L1-12",name:{zh:"播放和切歌",en:"Media transport"},category:"媒体",channel:"direct",maps:"action.media",params:[{key:"usage",type:"media"}],aliases:["播放","暂停","下一首","bf","media"],description:"播放、暂停、上一首、下一首。"},{id:"L1-13",name:{zh:"音量",en:"Volume"},category:"媒体",channel:"direct",maps:"action.media",params:[{key:"usage",type:"media"}],aliases:["静音","音量加","音量减","yl","volume"],description:"静音、调大或调小音量。"},{id:"L1-17",name:{zh:"输入一段英文",en:"ASCII text"},category:"文字",channel:"direct",maps:"step.text",params:[{key:"text",type:"text",max:1024}],aliases:["打字","文本","srywwz","text","string"],description:"输入一段英文、数字和符号。中文暂不支持直接输入。"},{id:"L1-19",name:{zh:"移动鼠标",en:"Mouse move"},category:"鼠标",channel:"direct",maps:"step.mouseMove",params:[{key:"dx",type:"int",min:-2048,max:2048,default:0},{key:"dy",type:"int",min:-2048,max:2048,default:0}],aliases:["鼠标","移动","ydsb","mouse"],description:"把鼠标向某个方向移动一段距离。"},{id:"L1-21",name:{zh:"鼠标按键",en:"Mouse button"},category:"鼠标",channel:"direct",maps:"step.mouseButton",params:[{key:"button",type:"int",min:1,max:8,default:1},{key:"action",type:"enum",options:["click","down","up"],default:"click"}],aliases:["左键","右键","点击","sbaj","click"],description:"按下、松开或点击鼠标按键 1 到 8。"},{id:"L1-22",name:{zh:"上下滚动",en:"Vertical scroll"},category:"鼠标",channel:"direct",maps:"step.scroll",params:[{key:"vertical",type:"int",min:-127,max:127,default:-3}],aliases:["滚轮","滚动","sxgd","scroll"],description:"让页面向上或向下滚动。"},{id:"L1-23",name:{zh:"左右滚动",en:"Horizontal scroll"},category:"鼠标",channel:"direct",maps:"step.scroll",params:[{key:"horizontal",type:"int",min:-127,max:127,default:3}],aliases:["横向滚动","左右","zygd","hscroll"],description:"让表格或时间线向左或向右滚动。"},{id:"L1-30",name:{zh:"某个键亮指定颜色",en:"Key colour"},category:"灯光",channel:"direct",maps:"step.led",params:[{key:"key",type:"int",min:1,max:9},{key:"color",type:"color"}],aliases:["亮灯","颜色","mgjl","led"],description:"让某个键(或全部键)亮成指定颜色。"},{id:"L1-31",name:{zh:"调整灯光",en:"Lighting control"},category:"灯光",channel:"direct",maps:"action.lightControl",params:[{key:"op",type:"enum",options:["toggle","nextEffect","brighter","dimmer"]}],aliases:["开关灯","亮度","tzdg","rgb"],description:"开关灯光、切换灯效、调亮或调暗。"},{id:"L2-01",name:{zh:"延时",en:"Delay"},category:"节奏",channel:"direct",maps:"step.delay",params:[{key:"ms",type:"int",min:0,max:6e4,default:100}],aliases:["等待","dyhe","delay"],description:"延时指定的毫秒数,再做下一步。"},{id:"L2-04",name:{zh:"做另一组自动操作",en:"Call macro"},category:"节奏",channel:"direct",maps:"step.call",params:[{key:"macro",type:"macro"}],aliases:["子宏","调用","zlyzzd","call"],description:"在当前自动操作中先做另一组,做完再继续。"},{id:"L2-07",name:{zh:"重复几次",en:"Repeat N times"},category:"运行方式",channel:"direct",maps:"run.count",params:[{key:"count",type:"int",min:1,max:99,default:2}],aliases:["循环","重复","cfjc","repeat"],description:"把这组自动操作连续做指定次数。"},{id:"L2-08",name:{zh:"循环到再按一次",en:"Toggle loop"},category:"运行方式",channel:"direct",maps:"run.toggle",params:[{key:"maxSeconds",type:"int",min:1,max:600,default:600}],aliases:["循环","再按停止","xhdzay","loop"],description:"一直循环,再按一次停止;连续运行满 10 分钟自动停止。"},{id:"L2-09",name:{zh:"按住时重复",en:"Repeat while held"},category:"运行方式",channel:"direct",maps:"run.hold",params:[{key:"maxSeconds",type:"int",min:1,max:600,default:600}],aliases:["按住重复","连续","azscf","hold"],description:"按住键时一直重复,松开就停;最长 10 分钟。"},{id:"L2-10",name:{zh:"只做一次",en:"Play once"},category:"运行方式",channel:"direct",maps:"run.once",params:[],aliases:["单次","一次","zzyc","once"],description:"按一次键,自动操作做一遍。"},{id:"L3-01",name:{zh:"单击",en:"Tap"},category:"触发方式",channel:"direct",maps:"trigger.tap",params:[],aliases:["点按","按一下","da","tap"],description:"单击后就执行。"},{id:"L3-04",name:{zh:"长按",en:"Hold"},category:"触发方式",channel:"direct",maps:"trigger.hold",params:[{key:"ms",type:"int",min:150,max:2e3,default:400}],aliases:["按久一点","ca","hold"],description:"按住超过设定时间才执行。"},{id:"L3-05",name:{zh:"双击",en:"Double tap"},category:"触发方式",channel:"direct",maps:"trigger.double",params:[{key:"windowMs",type:"int",min:120,max:900,default:320}],aliases:["连按两下","sj","double"],description:"快速按两下才执行。"},{id:"L3-02",name:{zh:"松开时执行",en:"On release"},category:"触发方式",channel:"direct",maps:"trigger.release",params:[],aliases:["抬起","松开","sksz","release"],description:"按下时不执行,松开时才执行。"},{id:"L2-05",name:{zh:"按下和松开分别执行",en:"Press / release split"},category:"触发方式",channel:"direct",maps:"trigger.split",params:[],aliases:["按下松开","分开","axhskfbzx","split"],description:"按下时做一件事,松开时做另一件事。"},{id:"L3-09",name:{zh:"按住连发",en:"Repeat while held"},category:"触发方式",channel:"direct",maps:"trigger.repeat",params:[{key:"intervalMs",type:"int",min:30,max:2e3,default:100}],aliases:["连发","按住重复","azlf","repeat"],description:"按住时按固定间隔重复执行;不用于游戏,最长 10 分钟。"},{id:"L4-01",name:{zh:"打开网址",en:"Open URL"},category:"电脑端助手",channel:"assistant",maps:"assistant",params:[{key:"url",type:"text"}],aliases:["网址","网页","dkwz","url"],description:"需电脑端助手,二期提供。"}],jg={entries:Ig},Tu={PLAY_PAUSE:"播放暂停",STOP:"停止",NEXT_TRACK:"下一首",PREV_TRACK:"上一首",FAST_FORWARD:"快进",REWIND:"快退",EJECT:"弹出",MUTE:"静音",VOLUME_UP:"音量加",VOLUME_DOWN:"音量减",BRIGHTNESS_UP:"调亮屏幕",BRIGHTNESS_DOWN:"调暗屏幕",WWW_HOME:"浏览器主页",WWW_BACK:"后退",WWW_FORWARD:"前进",WWW_REFRESH:"刷新",WWW_STOP:"停止加载",WWW_SEARCH:"搜索",WWW_FAVORITES:"收藏",MAIL:"邮件",CALCULATOR:"计算器",MY_COMPUTER:"此电脑",MEDIA_SELECT:"媒体",CONTROL_PANEL:"控制面板",SYSTEM_POWER:"关机",SYSTEM_SLEEP:"睡眠",SYSTEM_WAKE:"唤醒"},Mu={ctrl:"Ctrl",shift:"Shift",alt:"Alt",gui:"Win",rctrl:"右 Ctrl",rshift:"右 Shift",ralt:"右 Alt",rgui:"右 Win"},Iu=e=>/^D\d$/.test(e)?e.slice(1):e.replace(/_/g," "),ju={toggle:"开关灯光",nextEffect:"切换灯效",brighter:"调亮",dimmer:"调暗"};function Dg(e,t){var r;if(!e)return"未设置";switch(e.type){case"none":return"未设置";case"hotkey":return[...(e.mods??[]).map(n=>Mu[n]??n),Iu(e.key)].join(" + ");case"media":return Tu[e.usage]??e.usage;case"macro":return((r=t.macros.find(n=>n.id===e.macro))==null?void 0:r.name)??"自动操作";case"layer":return e.op==="next"?"下一页":e.op==="prev"?"上一页":e.op==="hold"?e.layer?`按住第 ${e.layer} 页`:"按住翻页":e.layer?`第 ${e.layer} 页`:"翻页";case"lightControl":return ju[e.op]??"灯光";case"alternate":return"交替"}}const Lg=(e,t)=>{var r;return e.label??Dg(e.triggers.tap??e.triggers.release??((r=e.triggers.hold)==null?void 0:r.action),t)},Sr=600,qc=128,ei=64,Fg="中文还不能直接输入。这一期只能输入英文、数字和英文符号。",qg=/^[\n\t\x20-\x7E]+$/,Vc=jg.entries,cn=e=>"steps"in e;function Vg(e){return e?qg.test(e)?e.length>1024||!Cu(e)?Su:null:Fg:"请输入要打出的文字"}const Uc=(e,t,r,n)=>{const s=Math.round(Number(e));return Number.isFinite(s)?Math.min(r,Math.max(t,s)):n};function ms(e,t){return e==="once"?{mode:"once"}:e==="count"?{mode:"count",count:Uc((t==null?void 0:t.count)??2,1,99,2)}:{mode:e,maxSeconds:Uc((t==null?void 0:t.maxSeconds)??Sr,1,Sr,Sr)}}function Ug(e){const t=new Set(e.macros.map(r=>r.id));for(let r=1;r<=999;r++){const n=`m${r}`;if(!t.has(n))return n}return null}function P_(e,t,r,n={mode:"once"}){const s=Ug(e);return!s||e.macros.length>=ei?null:{id:s,name:t,defaultDelayMs:20,run:n,steps:r}}const S_=[{type:"delay",ms:100}];function Kg(e){return cn(e)?e.steps.flatMap(t=>t.type==="call"?[t.macro]:[]):[]}function Du(e,t){var s,o,i,a,c;const r=e.triggers;return[r.tap,r.release,(s=r.hold)==null?void 0:s.action,(o=r.double)==null?void 0:o.action,(i=r.split)==null?void 0:i.down,(a=r.split)==null?void 0:a.up,(c=r.repeat)==null?void 0:c.action].some(l=>l?l.type==="macro"?l.macro===t:l.type==="alternate"?l.a.type==="macro"&&l.a.macro===t||l.b.type==="macro"&&l.b.macro===t:!1:!1)}function zg(e){const t=[];e.macros.length>ei&&t.push({message:`自动操作最多 ${ei} 组`});const r=new Set;for(const o of e.macros)r.has(o.id)&&t.push({macroId:o.id,message:`自动操作编号重复:${o.id}`}),r.add(o.id);for(const o of e.macros){if(!cn(o))continue;o.name.trim()||t.push({macroId:o.id,message:"请给这组自动操作起个名字"}),o.steps.length<1&&t.push({macroId:o.id,message:"至少要有一步"}),o.steps.length>qc&&t.push({macroId:o.id,message:`一组自动操作最多 ${qc} 步`});const i=o.run;(i==null?void 0:i.mode)==="count"&&(i.count==null||i.count<1||i.count>99)&&t.push({macroId:o.id,message:"重复次数要在 1 到 99 之间"}),i&&(i.mode==="toggle"||i.mode==="hold")&&(i.maxSeconds==null?t.push({macroId:o.id,message:"循环必须在 10 分钟内停下"}):i.maxSeconds>Sr&&t.push({macroId:o.id,message:"循环最长 10 分钟,不能再加长"})),o.steps.forEach((a,c)=>{const l=c+1;if(a.type==="text"){const u=Vg(a.text);u&&t.push({macroId:o.id,step:l,message:`第 ${l} 步:${u}`})}if(a.type==="call"&&!r.has(a.macro)&&t.push({macroId:o.id,step:l,message:`第 ${l} 步要去做的自动操作不存在`}),a.type==="call"&&r.has(a.macro)){const u=e.macros.findIndex(v=>v.id===o.id);e.macros.findIndex(v=>v.id===a.macro)>u&&t.push({macroId:o.id,step:l,message:Eu})}a.type==="layer"&&a.op==="to"&&(a.layer==null||a.layer<1||a.layer>e.layers.length)&&t.push({macroId:o.id,step:l,message:`第 ${l} 步要翻到的页不存在`})})}const n=new Map,s=o=>{if(n.get(o)===2)return!1;if(n.get(o)===1)return!0;n.set(o,1);const i=e.macros.find(c=>c.id===o),a=i?Kg(i).some(s):!1;return n.set(o,2),a};return[...r].some(s)&&t.push({message:"这几组自动操作会互相调用,没有停下的地方"}),e.layers.forEach((o,i)=>o.keys.forEach((a,c)=>{var m,v,w,R,C;const l=a.triggers,u=[l.tap,l.release,(m=l.hold)==null?void 0:m.action,(v=l.double)==null?void 0:v.action,(w=l.split)==null?void 0:w.down,(R=l.split)==null?void 0:R.up,(C=l.repeat)==null?void 0:C.action];for(const _ of u)(_==null?void 0:_.type)==="macro"&&!r.has(_.macro)&&t.push({message:`第 ${i+1} 页键 ${c+1} 引用的自动操作不存在`})})),t}const Hg=e=>{var t;return((t=zg(e)[0])==null?void 0:t.message)??null};function E_(e,t){const r=[];e.layers.forEach((n,s)=>n.keys.forEach((o,i)=>{Du(o,t)&&r.push(`第 ${s+1} 页键 ${i+1}`)}));for(const n of e.macros)n.id===t||!cn(n)||n.steps.some(s=>s.type==="call"&&s.macro===t)&&r.push(`「${n.name}」`);return r}function C_(e,t){for(const r of e.layers)for(let n=0;nr.name.zh.toLowerCase().includes(t)||r.name.en.toLowerCase().includes(t)||r.category.toLowerCase().includes(t)||r.description.toLowerCase().includes(t)||r.aliases.some(n=>n.toLowerCase().includes(t))):Vc}const R_=e=>e==="assistant"?"需电脑助手":"直接发送";function N_(e,t,r){if(e.channel==="assistant"||e.maps==="assistant")return{kind:"assistant"};if(e.maps.startsWith("trigger."))return{kind:"trigger"};if(e.maps==="run.once")return{kind:"run",run:ms("once")};if(e.maps==="run.count")return{kind:"run",run:ms("count",{count:2})};if(e.maps==="run.hold")return{kind:"run",run:ms("hold")};if(e.maps==="run.toggle")return{kind:"run",run:ms("toggle")};if(e.maps==="step.call"||e.id==="L2-04"){const s=t.macros.findIndex(a=>a.id===r);let o;return t.macros.forEach((a,c)=>{ca.id!==r&&cn(a))?{kind:"call-order"}:{kind:"need-other"}}const n=Wg(e);return n?{kind:"step",step:n}:{kind:"trigger"}}function Wg(e){switch(e.id){case"L1-01":return{type:"tap",key:"A"};case"L1-02":return{type:"down",key:"A"};case"L1-03":return{type:"up",key:"A"};case"L1-04":return{type:"tap",key:"C",mods:["ctrl"]};case"L1-06":return{type:"tap",key:"F2"};case"L1-12":return{type:"media",usage:"PLAY_PAUSE"};case"L1-13":return{type:"media",usage:"VOLUME_UP"};case"L1-17":return{type:"text",text:"Hello"};case"L1-19":return{type:"mouseMove",dx:0,dy:-20};case"L1-21":return{type:"mouseButton",button:1,action:"click"};case"L1-22":return{type:"scroll",vertical:-3};case"L1-23":return{type:"scroll",horizontal:3};case"L1-30":return{type:"led",key:1,color:"#4C6FFF"};case"L1-31":return{type:"lightControl",op:"toggle"};case"L2-01":return{type:"delay",ms:100};default:return null}}const Bg=(e,t)=>[...(t??[]).map(r=>Mu[r]??r),Iu(e)].join(" + ");function O_(e){return e.name.zh}function A_(e){return e.description}function x_(e){var t;switch(e.type){case"tap":return(t=e.mods)!=null&&t.length?"组合键":"单击";case"down":return"按住";case"up":return"松开";case"media":return"媒体控制";case"text":return"输入文字";case"mouseMove":return"移动鼠标";case"mouseButton":return e.action==="click"?"点击当前位置":"鼠标按键";case"scroll":return e.horizontal&&!e.vertical?"左右滚动":"上下滚动";case"delay":return"延时";case"call":return"做另一组";case"led":return"按键灯";case"lightControl":return"调整灯光";case"layer":return"翻页"}}function T_(e,t){var r;switch(e.type){case"tap":case"down":case"up":return Bg(e.key,e.type==="tap"?e.mods:void 0);case"media":return Tu[e.usage]??e.usage;case"text":return e.text.replace(/\n/g,"↵");case"mouseMove":return`横 ${e.dx},纵 ${e.dy}`;case"mouseButton":return`${e.action==="click"?"点击":e.action==="down"?"按下":"松开"}键 ${e.button}`;case"scroll":return[e.vertical?`纵 ${e.vertical}`:"",e.horizontal?`横 ${e.horizontal}`:""].filter(Boolean).join(" ")||"0";case"delay":return`${e.ms} 毫秒`;case"call":return((r=t.macros.find(n=>n.id===e.macro))==null?void 0:r.name)??"不存在";case"led":return`${e.key==="all"?"全部":`键 ${e.key}`} ${e.color}`;case"lightControl":return ju[e.op]??e.op;case"layer":return e.op==="next"?"下一页":e.op==="prev"?"上一页":e.layer?`第 ${e.layer} 页`:"指定页"}}function M_(e){switch(e.type){case"text":return"edit";case"delay":return"clock";case"media":return"play";case"call":return"zap";case"led":case"lightControl":return"sun";case"layer":return"layers";default:return"key"}}function I_(e,t){var o,i,a;const r=e.steps.filter((c,l)=>!t[l]),n=[];r.some(c=>c.type==="text"&&c.text.length>=24)&&n.push("有一段较长的文字");const s=(o=e.run)==null?void 0:o.mode;return s==="toggle"?n.push("会循环到再按一次,最长 10 分钟"):s==="hold"?n.push("按住时会一直重复,最长 10 分钟"):s==="count"&&(((i=e.run)==null?void 0:i.count)??1)>1&&n.push(`会连续做 ${((a=e.run)==null?void 0:a.count)??1} 次`),n.length?n.join(","):null}function j_(e,t){return`${e?"演示模式下,试跑只在本页逐步演示,不会在真实设备上执行。":"试跑会在设备上实际执行一遍。"}${t}。确认后才开始。`}function D_(e){return e.type==="delay"?Math.min(Math.max(e.ms,40),700):e.type==="text"?Math.min(180+e.text.length*20,700):240}function L_(e,t,r){if(t===r||t<0||r<0||t>=e.length||r>=e.length)return e.slice();const n=e.slice(),[s]=n.splice(t,1);return n.splice(r,0,s),n}function Gg(e=40){return{past:[],future:[],limit:e}}function Jg(e,t){e.past.push(t),e.past.length>e.limit&&e.past.splice(0,e.past.length-e.limit),e.future=[]}function Yg(e,t){const r=e.past.pop();return r===void 0?null:(e.future.push(t),r)}function Xg(e,t){const r=e.future.pop();return r===void 0?null:(e.past.push(t),r)}function Qg(e){e.past=[],e.future=[]}const Ee={writing:"正在写入设备",kept:"写入未完成。设备仍保留原先的配置。检查连接后重新保存。",silent:"设备没有响应。确认仍已连接后重试。",rejected:"设备没有接受这次配置。设备上的内容没有改动。",firmware:"这块设备的固件版本,当前网页还不能配置。",pick:"请在列表里选择 OneGrid",permission:"系统尚未允许此页面使用这台设备。按说明添加设备权限后,拔出再插入。",uncertain:"设备没有响应。重新连接后读取设备上的配置。",inUse:"这台设备正由其他页面占用。关闭占用它的页面后重试。",unplugged:"设备已断开。重新插入后自动连接。",reconnected:"已重新连接",readFailed:"设备上的配置无法读取。重新连接后再试。",readback:"核对未通过。本页与设备上的配置不一致。重新连接后从设备读取。",tooLarge:"配置超出设备容量。减少内容后再保存。",generic:"设备没有完成这次操作。检查连接后重试。",badCrc:"数据校验失败。检查连接后重新保存。",badCmd:"设备不支持这项操作。",badLen:"设备没有接受这次数据。检查连接后重试。",badState:"设备当前无法完成这项操作。检查连接后重试。",unsavable:"这份配置无法保存。修改后再保存。"},Qe={GetInfo:1,ReadBegin:16,ReadChunk:17,WriteBegin:32,WriteChunk:33,WriteCommit:34,RunMacro:48,AbortMacro:49,LedPreview:64,EnterBootloader:80,FactoryReset:81,EvtKey:128,EvtLayer:129,EvtMacro:130},Kc={Error:2,Event:4},xe={Ok:0,BadCrc:1,BadCmd:2,BadLen:3,BadState:4,ImageCrc:5,ImageSchema:6,Busy:7,TooLarge:8},Zg=54,ey=53,ty=256*1024,ry={[xe.BadCrc]:Ee.badCrc,[xe.BadCmd]:Ee.badCmd,[xe.BadLen]:Ee.badLen,[xe.BadState]:Ee.badState,[xe.ImageCrc]:Ee.kept,[xe.ImageSchema]:Ee.rejected,[xe.Busy]:Ee.kept,[xe.TooLarge]:Ee.tooLarge};class rt extends Error{constructor(r,n=new Uint8Array){super(ry[r]??Ee.generic);qe(this,"body");this.status=r,this.body=typeof n=="string"?new Uint8Array:n}}class lr extends Error{constructor(){super(Ee.unplugged)}}class oo extends Error{constructor(){super(Ee.silent)}}class Jr extends Error{constructor(){super(Ee.readback)}}class br extends Error{constructor(){super(Ee.kept)}}class Fs extends Error{constructor(){super(Ee.rejected)}}class Yr extends Error{constructor(){super(Ee.uncertain)}}class Er extends Error{constructor(){super(Ee.readFailed)}}class Ar extends Error{constructor(){super(Ee.firmware)}}function ny(e){const t=Number(Ou.split(".")[0]),r=Number(e.schemaVersion.split(".")[0]);if(!Number.isFinite(r)||r!==t)throw new Ar}const zc=3,sy=e=>new Promise(t=>{setTimeout(t,e)});class oy{constructor(t,r={}){qe(this,"seq",0);qe(this,"waiting",null);qe(this,"eventCb",()=>{});qe(this,"closeCb",()=>{});qe(this,"closed",!0);this.link=t,this.timing=r,t.onReport(n=>this.receive(n)),t.onClose(()=>{var n;this.closed=!0,(n=this.waiting)==null||n.resolve("closed"),this.waiting=null,this.closeCb()})}onEvent(t){this.eventCb=t}onClose(t){this.closeCb=t}async open(){await this.link.open(),this.closed=!1}async close(){await this.link.close(),this.closed=!0}get timeoutMs(){return this.timing.timeoutMs??1e3}get busyBackoffMs(){return this.timing.busyBackoffMs??20}get busyLimitMs(){return this.timing.busyLimitMs??2e3}sleep(t){return(this.timing.sleep??sy)(t)}receive(t){let r;try{r=Rg(t)}catch(n){n instanceof Gr&&this.waiting&&this.waiting.resolve("crc");return}if(r.flags&Kc.Event){this.eventCb(r);return}this.waiting&&r.seq===this.waiting.seq&&this.waiting.resolve(r)}async request(t,r=new Uint8Array,n={}){const s=n.timeoutRetries??1;let o=0,i=0,a=0;for(;;){if(this.closed)throw new lr;this.seq=this.seq%255+1;const c=this.seq,l=new Promise(w=>{const R=setTimeout(()=>w("timeout"),this.timeoutMs);this.waiting={seq:c,resolve:C=>{clearTimeout(R),w(C)}}});await this.link.send(kg({cmd:t,seq:c,flags:0,payload:r}));const u=await l;if(this.waiting=null,u==="closed")throw new lr;if(u==="timeout"){if(izc)throw new rt(xe.BadCrc);continue}const m=u.payload[0]??xe.BadLen,v=u.payload.subarray(1);if(m===xe.BadCrc){if(++o>zc)throw new rt(xe.BadCrc);continue}if(m===xe.Busy){if(a>=this.busyLimitMs)throw new rt(xe.Busy,v);const w=Math.min(this.busyBackoffMs,this.busyLimitMs-a);await this.sleep(w),a+=w;continue}if(u.flags&Kc.Error||m!==xe.Ok)throw new rt(m,v);return v}}}class iy{constructor(t){qe(this,"buf");qe(this,"got");qe(this,"filled",0);this.size=t,this.buf=new Uint8Array(t),this.got=new Uint8Array(t)}put(t,r){if(t<0||t+r.length>this.size)throw new RangeError(`chunk ${t}+${r.length} outside ${this.size}`);this.buf.set(r,t);for(let n=t;nnew TextDecoder().decode(e).replace(/\0+$/,""),ay=e=>{const t=parseInt(e.slice(1),16);return[t>>16&255,t>>8&255,t&255]};function cy(e){const t={model:Hc(e.subarray(0,8)),firmware:`${e[8]??0}.${e[9]??0}.${e[10]??0}`,serial:Hc(e.subarray(11,23)),flashKB:(e[23]??0)|(e[24]??0)<<8,configRevision:nr(e,25),schemaVersion:`${e[29]??0}.${e[30]??0}.${e[31]??0}`};return e.length>32&&(t.caps=e[32]??0),t}function ly(e){return e instanceof lr||e instanceof Fs||e instanceof br||e instanceof Yr||e instanceof Jr||e instanceof Ar||e instanceof Er||e instanceof rt&&e.status===xe.TooLarge}class uy{constructor(t,r,n){qe(this,"client");qe(this,"listeners",{key:new Set,layer:new Set,macro:new Set,disconnect:new Set});this.kind=t,this.client=new oy(r,n),this.client.onClose(()=>this.emit("disconnect",{})),this.client.onEvent(s=>{const o=s.payload;s.cmd===Qe.EvtKey?this.emit("key",{key:o[0]??0,down:o[1]===1,layer:o[2]??1}):s.cmd===Qe.EvtLayer?this.emit("layer",{layer:o[0]??1}):s.cmd===Qe.EvtMacro&&this.emit("macro",{state:["running","done","aborted"][o[0]??1]??"done"})})}on(t,r){return this.listeners[t].add(r),()=>this.listeners[t].delete(r)}emit(t,r){for(const n of this.listeners[t])n(r)}connect(){return this.client.open()}disconnect(){return this.client.close()}readDeviceInfo(){return this.client.request(Qe.GetInfo).then(cy)}async readConfig(){const t=await this.client.request(Qe.ReadBegin),r=nr(t,0),n=nr(t,4),s=new iy(r);for(let i=0;ity)throw new rt(xe.TooLarge);let s=!1;try{await this.client.request(Qe.WriteBegin,Qo($r(n.length),$r(js(n))),{timeoutRetries:1}),await this.writeChunks(n),s=await this.commit(r)}catch(o){throw ly(o)||s?o:new br}}async writeChunks(t){let r=0,n=0;for(;rt.length+2)throw new rt(xe.BadState);const s=Math.min(t.length,r+Zg),o=t.subarray(r,s);try{await this.client.request(Qe.WriteChunk,Qo($r(r),o),{timeoutRetries:1}),r=s}catch(i){if(i instanceof rt&&i.status===xe.BadState&&i.body.length>=4){const a=nr(i.body,0);if(a>r&&a<=t.length){r=a;continue}}throw i}}}async commit(t){try{await this.client.request(Qe.WriteCommit,new Uint8Array,{timeoutRetries:0})}catch(r){if(r instanceof rt&&r.status===xe.ImageSchema)throw new Fs;if(r instanceof rt&&r.status===xe.ImageCrc)throw new br;if(!(r instanceof oo))throw r;return this.recoverCommit(t)}return await this.verifyAfterAck(t),!0}async recoverCommit(t){try{await this.client.request(Qe.WriteCommit,new Uint8Array,{timeoutRetries:0})}catch(r){if(r instanceof rt&&r.status===xe.ImageSchema)throw new Fs;if(r instanceof rt&&r.status===xe.ImageCrc)throw new br;if(r instanceof rt&&r.status===xe.BadState)try{return await this.verify(t),!0}catch(n){throw n instanceof Jr?new br:new Yr}throw r instanceof lr?r:new Yr}return await this.verifyAfterAck(t),!0}async verifyAfterAck(t){try{await this.verify(t)}catch(r){throw r instanceof Jr?r:new Yr}}async verify(t){const r=await this.readConfig();if(an(r)!==an(Eg(t)))throw new Jr}async runMacro(t){await this.client.request(Qe.RunMacro,new TextEncoder().encode(t),{timeoutRetries:0})}async abortMacro(){await this.client.request(Qe.AbortMacro)}async previewLED(t){const r=t.target==="all"?255:t.target;await this.client.request(Qe.LedPreview,Uint8Array.of(r,...ay(t.color),t.durationMs&255,t.durationMs>>8&255))}async enterBootloader(){await this.client.request(Qe.EnterBootloader,new Uint8Array,{timeoutRetries:0})}async factoryReset(){await this.client.request(Qe.FactoryReset,new Uint8Array,{timeoutRetries:0})}}const Lu=65280,dy={usagePage:Lu},fy="OneGrid",ur=()=>typeof navigator<"u"&&"hid"in navigator;class Xr extends Error{constructor(){super(""),this.name="PickerCancelledError"}}class Fu extends Error{constructor(){super(Ee.pick),this.name="NotOneGridError"}}class qu extends Error{constructor(){super(Ee.inUse),this.name="DeviceInUseError"}}class Vu extends Error{constructor(){super(Ee.permission),this.name="DevicePermissionError"}}class py extends Error{constructor(){super("无法打开这台设备。确认仍已连接后重试。"),this.name="DeviceOpenError"}}const hy=e=>{var t;return((t=e.collections)==null?void 0:t.some(r=>r.usagePage===Lu))??!1};function Wc(e){return hy(e)&&(e.productName??"").trim()===fy}function my(e){return e instanceof DOMException&&(e.name==="NotFoundError"||e.name==="AbortError")}function gy(e){if(e instanceof DOMException){const t=e.message.toLowerCase();if(e.name==="InvalidStateError"||e.name==="NetworkError"||t.includes("already"))return new qu;if(e.name==="NotAllowedError"||e.name==="SecurityError")return new Vu}return new py}function Bc(){if(!ur())return!1;const e=navigator.userAgent||"";return!(/iPhone|iPad|iPod|Android/i.test(e)||typeof matchMedia=="function"&&matchMedia("(hover: none) and (pointer: coarse)").matches)}class yy{constructor(t,r){qe(this,"dev",null);qe(this,"hid",null);qe(this,"reportCb",()=>{});qe(this,"closeCb",()=>{});qe(this,"onInput",t=>{t.reportId!==0||t.data.byteLength!==Ds||this.reportCb(new Uint8Array(t.data.buffer.slice(t.data.byteOffset,t.data.byteOffset+Ds)))});qe(this,"onDisconnect",t=>{t.device===this.dev&&(this.detach(),this.closeCb())});this.hidOf=t,this.allowPicker=r}async open(){const t=this.hidOf();if(!t)throw new Error("当前浏览器不支持 USB 连接");let n=(await t.getDevices()).find(Wc);if(!n){if(!this.allowPicker)throw new Xr;try{n=(await t.requestDevice({filters:[dy]}))[0]}catch(s){throw my(s)?new Xr:s}}if(!n)throw new Xr;if(!Wc(n))throw new Fu;if(!n.opened)try{await n.open()}catch(s){throw gy(s)}n.addEventListener("inputreport",this.onInput),t.addEventListener("disconnect",this.onDisconnect),this.hid=t,this.dev=n}detach(){var t,r;(t=this.dev)==null||t.removeEventListener("inputreport",this.onInput),(r=this.hid)==null||r.removeEventListener("disconnect",this.onDisconnect),this.dev=null}async close(){const t=this.dev;this.detach();try{await(t==null?void 0:t.close())}catch{}}async send(t){if(!this.dev)throw new lr;await this.dev.sendReport(0,t)}onReport(t){this.reportCb=t}onClose(t){this.closeCb=t}}const vy=(e={})=>new uy("webhid",new yy(()=>e.hid??(ur()?navigator.hid:null),e.picker!==!1)),ti=/[\u4e00-\u9fff]/;function _y(e){return e instanceof lr?Ee.kept:e instanceof Ms?ti.test(e.message)?e.message:Ee.unsavable:e instanceof br||e instanceof Fs||e instanceof Yr||e instanceof Jr||e instanceof oo||e instanceof Ar||e instanceof Er||e instanceof rt||e instanceof Error&&ti.test(e.message)&&!/\b(Busy|CRC|JSON|schema|opcode|udev)\b/i.test(e.message)?e.message:Ee.kept}function $y(e){return e instanceof Xr?"":e instanceof Fu||e instanceof Vu||e instanceof qu||e instanceof Ar||e instanceof oo||e instanceof lr||e instanceof Er||e instanceof rt||e instanceof Error&&ti.test(e.message)&&!/\b(Busy|CRC|JSON|schema|opcode|udev)\b/i.test(e.message)?e.message:Ee.silent}const ws=fr([]);let by=0;function ze(e,t="ok",r=2600){const n=++by;ws.push({id:n,msg:e,kind:t}),setTimeout(()=>{const s=ws.findIndex(o=>o.id===n);s>=0&&ws.splice(s,1)},r)}const Ve=fr({active:!1,name:"",keyNo:null,elapsed:0,startedAt:0});let sr=null;function wy(e,t,r){const n=e?`键 ${e}「${t}」`:`「${t}」`,s=String(Math.floor(r/60)).padStart(2,"0"),o=String(r%60).padStart(2,"0");return`${n}正在循环 · ${s}:${o} / 10:00`}function Py(e,t){return`${e?`键 ${e}「${t}」`:`「${t}」`}循环已自动停止:连续运行满 10 分钟`}function Sy(){Ve.active&&(Ve.elapsed=Math.min(Sr,Math.floor((Date.now()-Ve.startedAt)/1e3)),Ve.elapsed>=Sr&&Uu("auto"))}function F_(e){sr&&(clearInterval(sr),sr=null),Ve.active=!0,Ve.name=e.name,Ve.keyNo=e.keyNo,Ve.elapsed=0,Ve.startedAt=Date.now(),sr=setInterval(Sy,1e3)}function Uu(e="user"){const t=Ve.active,r=Ve.name,n=Ve.keyNo;Ve.active=!1,Ve.elapsed=0,sr&&(clearInterval(sr),sr=null),e==="auto"&&t&&ze(Py(n,r),"warn")}const Ey=["home","device","library","keys","macro","light","layers","firmware","rules","feedback","contact","catalog"],K=fr({page:"home",conn:ur()?"none":"nosupport",mode:null,info:null,config:null,saved:null,saving:!1,connNote:"",selectedKey:1,layer:1,down:[],feed:[]}),or=Nd(null);let Gc=[],Ps=!1,Qr=!1,Jc=!1;function Cy(){ur()&&navigator.hid.addEventListener("connect",()=>{!Qr||K.conn!=="none"||Ps||Ku("real",{picker:!1,quiet:!0})})}Cy();function Si(){var e;return fn({conn:K.conn,mode:K.mode,serial:((e=K.info)==null?void 0:e.serial)??null})}function He(e){K.page=e,location.hash!==`#${e}`&&history.replaceState(null,"",`#${e}`)}function ky(e){Gc.forEach(t=>t()),Gc=[e.on("key",t=>{var r,n;if(K.layer=t.layer,t.down){K.down.includes(t.key)||K.down.push(t.key);const s=(n=(r=K.config)==null?void 0:r.layers[t.layer-1])==null?void 0:n.keys[t.key-1];s&&K.config&&(K.feed=[{n:t.key,label:Lg(s,K.config),color:s.color.idle,at:new Date},...K.feed].slice(0,4))}else K.down=K.down.filter(s=>s!==t.key)}),e.on("layer",t=>{K.layer=t.layer}),e.on("disconnect",()=>{const t=K.mode==="real",r=Jc;if(Jc=!1,K.conn=ur()?"none":"nosupport",K.mode=null,K.down=[],r){Qr=!1,ze("设备已断开","warn");return}if(!t){Qr=!1;return}Qr=!0,K.connNote=Ee.unplugged,ze(Ee.unplugged,"warn",6e3)})]}async function Ku(e="real",t={}){var s,o;if(Ps||K.saving)return;const r=K.conn;Ps=!0,K.connNote="";let n=null;try{n=vy({picker:t.picker!==!1}),await n.connect(),K.conn="reading",or.value=n;const i=await n.readDeviceInfo();if(ny(i),!fn({conn:"ready",mode:"real",serial:i.serial})){or.value=null,await n.disconnect(),K.info=null,K.mode=null,K.conn=ur()?"none":"nosupport",K.connNote="这台设备不能打开配置",ze(K.connNote,"warn",6e3);return}ky(n),K.info=i;const a=await n.readConfig();Qr=!1,K.config&&K.saved&&!Or(K.config,K.saved)?(K.saved=Gt(a),ze("未保存的修改仍在本页")):(zu(a),K.layer=((s=K.config)==null?void 0:s.settings.startLayer)??1,t.quiet&&ze(Ee.reconnected)),K.mode="real",K.feed=[],K.conn="ready",He("device")}catch(i){try{await((o=or.value??n)==null?void 0:o.disconnect())}catch{}if(or.value=null,K.info=null,K.mode=null,K.conn=r==="nosupport"||!ur()?"nosupport":"none",i instanceof Xr)return;if(i instanceof Ar){K.connNote=i.message,ze(i.message,"warn",6e3);return}const a=$y(i);if(!a)return;K.connNote=a,ze(a,"warn",6e3)}finally{Ps=!1}}async function q_(e){const t=or.value;!t||!Si()||await t.runMacro(e)}async function V_(){var e;Si()&&await((e=or.value)==null?void 0:e.abortMacro())}function zu(e){K.config=Gt(e),K.saved=Gt(e),Ny()}function Ry(){return!!(K.config&&K.saved&&!Or(K.config,K.saved))}function U_(e){return!K.config||!K.saved?[]:xu(K.config,K.saved,e-1)}function To(){return!K.config||!K.saved?0:Mg(K.config,K.saved)}const Rr=Gg(40),qs=fr({undo:0,redo:0});function io(){qs.undo=Rr.past.length,qs.redo=Rr.future.length}function Ny(){Qg(Rr),io()}function Oy(e){if(!K.config)return!1;const t=Gt(K.config);try{e(t)}catch(n){return ze(n instanceof Error?n.message:"这项修改无效","warn"),!1}if(Or(t,K.config))return!0;const r=Hg(t);if(r)return ze(r,"warn"),!1;try{const n=Is(t);return Jg(Rr,Gt(K.config)),K.config=n,io(),!0}catch(n){return ze(n instanceof Error?n.message:"这项修改无效","warn"),!1}}function Yc(){if(!K.config)return;const e=Yg(Rr,Gt(K.config));e&&(K.config=e,io())}function Xc(){if(!K.config)return;const e=Xg(Rr,Gt(K.config));e&&(K.config=e,io())}function K_(e,t,r){return Oy(n=>{const s=n.layers[e-1];if(!s||!s.keys[t-1])throw new Error("没有这个键");s.keys[t-1]=r})}async function Qc(){const e=or.value;if(!(!e||!K.config||K.saving||!Si())){if(!Ry()){ze("没有需要保存的修改");return}K.saving=!0;try{const t=Is(Gt(K.config));await e.writeConfig(t),zu(t);try{K.info=await e.readDeviceInfo()}catch{}ze("已保存到设备")}catch(t){ze(_y(t),"warn",6e3)}finally{K.saving=!1}}}function z_(e,t){t?K.down.includes(e)||K.down.push(e):K.down=K.down.filter(r=>r!==e)}const Ay={class:"side","data-testid":"side"},xy={class:"brand"},Ty=["aria-expanded"],My={class:"nav-label"},Iy={class:"nav-list"},jy=["data-go","onClick"],Dy={class:"side-foot"},Ly={class:"mini"},Fy={class:"row",style:{gap:"5px"}},qy={style:{color:"var(--text-3)"}},Vy=Ye({__name:"SideNav",setup(e){const t=Le(()=>{var a;return fn({conn:K.conn,mode:K.mode,serial:((a=K.info)==null?void 0:a.serial)??null})}),r=Le(()=>{const a=[["catalog","基础模板","lib"],["rules","使用规则","shield"],["contact","联系团队","msg"]];return t.value?[{label:"",items:[["home","首页","home"],["device","设备","plug"]]},{label:"配置",items:[["keys","改键","kb"],["macro","自动操作","zap"]]},{label:"暂未开放",items:[["light","灯效","sun"],["layers","按键页","layers"],["library","方案库","lib"],["firmware","固件更新","chip"]]},{label:"说明",items:[["feedback","反馈","msg"],...a]}]:[{label:"",items:[["home","首页","home"],...a]}]}),n=Le(()=>t.value?["已连接","var(--ok)"]:K.conn==="reading"?["读取中","var(--accent-500)"]:K.conn==="nosupport"?["无法连接","var(--danger)"]:["未连接","var(--ink-300)"]),s=Se(!1);function o(){He(t.value?"device":"home")}function i(a){s.value=!1,He(a)}return(a,c)=>(ee(),se("aside",Ay,[I("div",xy,[ve(pu,{id:"og-side"}),I("div",null,[I("b",null,le(te(Jo).name),1)])]),t.value?Ce("",!0):(ee(),se("button",{key:0,type:"button",class:"nav-toggle","data-testid":"nav-toggle","aria-expanded":s.value,"aria-controls":"public-nav",onClick:c[0]||(c[0]=l=>s.value=!s.value)},le(s.value?"关闭":"菜单"),9,Ty)),I("div",{id:"public-nav",class:Ke(["nav-groups",{open:s.value}])},[(ee(!0),se(Ae,null,ut(r.value,l=>(ee(),se("div",{key:l.label,class:"nav-group"},[I("div",My,le(l.label),1),I("div",Iy,[(ee(!0),se(Ae,null,ut(l.items,([u,m,v])=>(ee(),se("button",{key:u,class:Ke(["nav",{on:te(K).page===u}]),"data-go":u,onClick:w=>i(u)},[ve(Ge,{name:v},null,8,["name"]),I("span",null,le(m),1)],10,jy))),128))])]))),128))],2),I("div",Dy,[I("div",{class:Ke(["devcard",{off:!t.value}]),onClick:o},[I("div",Ly,[(ee(),se(Ae,null,ut(9,l=>I("i",{key:l,class:Ke({on:te(K).down.includes(l)})},null,2)),64))]),I("div",null,[I("b",null,le(te(Jo).name),1),I("span",Fy,[I("span",{class:Ke(["dot",{pulse:t.value||te(K).conn==="reading"}]),style:dr({color:n.value[1]})},null,6),I("span",qy,le(n.value[0]),1)])])],2)])]))}}),Uy={class:"top"},Ky={key:0,class:"loopchip","data-testid":"loop-chip"},zy=["disabled"],Hy=["disabled"],Wy=["disabled"],By={key:0,class:"badge","data-testid":"unsaved-count"},Gy={key:5,class:"chip acc"},Jy=Ye({__name:"TopBar",setup(e){const t={home:"首页",device:"设备",library:"方案库",keys:"改键",macro:"自动操作",light:"灯效",layers:"按键页",firmware:"固件更新",rules:"使用规则",feedback:"反馈",contact:"联系团队",catalog:"基础模板"},r=Le(()=>{var n;return fn({conn:K.conn,mode:K.mode,serial:((n=K.info)==null?void 0:n.serial)??null})});return(n,s)=>(ee(),se("header",Uy,[I("h1",null,le(t[te(K).page]),1),s[14]||(s[14]=I("span",{class:"sp"},null,-1)),I("button",{type:"button",class:"btn sm ghost","data-testid":"feedback-entry",onClick:s[0]||(s[0]=o=>te(He)("feedback"))},[ve(Ge,{name:"msg",size:"s"}),s[7]||(s[7]=Me("反馈",-1))]),te(Ve).active?(ee(),se("span",Ky,[s[8]||(s[8]=I("i",{class:"lp"},null,-1)),I("b",null,le(te(wy)(te(Ve).keyNo,te(Ve).name,te(Ve).elapsed)),1),I("button",{type:"button","data-testid":"loop-stop","aria-label":"停止",onClick:s[1]||(s[1]=o=>te(Uu)("user"))},[ve(Ge,{name:"stop",size:"s"})])])):Ce("",!0),r.value?(ee(),se("button",{key:1,type:"button",class:"btn sm ghost","data-testid":"undo",title:"撤销",disabled:te(qs).undo===0,onClick:s[2]||(s[2]=(...o)=>te(Yc)&&te(Yc)(...o))},[ve(Ge,{name:"undo",size:"s"}),s[9]||(s[9]=Me("撤销",-1))],8,zy)):Ce("",!0),r.value?(ee(),se("button",{key:2,type:"button",class:"btn sm ghost","data-testid":"redo",title:"重做",disabled:te(qs).redo===0,onClick:s[3]||(s[3]=(...o)=>te(Xc)&&te(Xc)(...o))},[ve(Ge,{name:"redo",size:"s"}),s[10]||(s[10]=Me("重做",-1))],8,Hy)):Ce("",!0),r.value?(ee(),se("button",{key:3,type:"button",class:"btn pri sm","data-testid":"save-device",disabled:te(K).saving||te(To)()===0,onClick:s[4]||(s[4]=(...o)=>te(Qc)&&te(Qc)(...o))},[Me(le(te(K).saving?te(Ee).writing:"保存到设备"),1),te(To)()>0?(ee(),se("span",By,le(te(To)()),1)):Ce("",!0)],8,Wy)):Ce("",!0),r.value?(ee(),se("span",{key:4,class:"chip ok btnlike","data-testid":"mode-chip",onClick:s[5]||(s[5]=o=>te(He)("device"))},[...s[11]||(s[11]=[I("span",{class:"dot pulse"},null,-1),Me("已连接",-1)])])):te(K).conn==="reading"?(ee(),se("span",Gy,[...s[12]||(s[12]=[I("span",{class:"dot pulse"},null,-1),Me("读取中",-1)])])):(ee(),se("span",{key:6,class:"chip btnlike","data-testid":"mode-chip",onClick:s[6]||(s[6]=o=>te(He)("home"))},[...s[13]||(s[13]=[I("span",{class:"dot",style:{color:"var(--ink-300)"}},null,-1),Me("未连接",-1)])]))]))}}),Yy={class:"modal on",role:"dialog","aria-modal":"true","aria-labelledby":"gate-title","data-testid":"rules-gate"},Xy={class:"gate"},Qy={class:"row",style:{gap:"var(--s-4)"}},Zy={class:"gate-ic"},ev={class:"muted",style:{"font-size":"13px","margin-top":"2px"}},tv={class:"gate-list"},rv={class:"row",style:{"justify-content":"space-between"}},nv=Ye({__name:"RulesGate",emits:["agree","full"],setup(e,{emit:t}){const r=t;return(n,s)=>(ee(),se(Ae,null,[s[4]||(s[4]=I("div",{class:"scrim on"},null,-1)),I("div",Yy,[I("div",Xy,[I("div",Qy,[I("div",Zy,[ve(Ge,{name:"shield",size:"l"})]),I("div",null,[s[2]||(s[2]=I("div",{id:"gate-title",style:{"font-size":"var(--fs-h3)","font-weight":"700","letter-spacing":"-0.01em"}},"使用规则",-1)),I("div",ev,"版本 "+le(te(Vt).version.replace("rules-v",""))+" · 使用前确认",1)])]),I("ol",tv,[(ee(!0),se(Ae,null,ut(te(Vt).points,(o,i)=>(ee(),se("li",{key:i,style:dr({"--i":i})},[I("span",null,le(i+1),1),Me(le(o),1)],4))),128))]),I("div",rv,[I("button",{class:"btn ghost",onClick:s[0]||(s[0]=o=>r("full"))},[ve(Ge,{name:"chev",size:"s"}),s[3]||(s[3]=Me("查看完整规则",-1))]),I("button",{class:"btn pri lg","data-testid":"agree",onClick:s[1]||(s[1]=o=>r("agree"))},[ve(Ge,{name:"check",size:"s"}),Me(le(te(Vt).agree),1)])])])])],64))}}),sv={class:"connect-cluster"},ov={key:0,"data-testid":"connect-title"},iv={class:"row",style:{gap:"var(--s-3)","flex-wrap":"wrap"}},av=["disabled"],cv={key:1,class:"conn-note","data-testid":"conn-note"},ao=Ye({__name:"ConnectCluster",props:{quiet:{type:Boolean,default:!1}},setup(e){const t=Le(()=>K.conn==="nosupport"),r=Le(()=>K.conn==="reading");async function n(){try{await navigator.clipboard.writeText(location.href),ze("已复制页面链接")}catch{ze("复制失败:手动复制地址栏中的链接","warn")}}return(s,o)=>(ee(),se("div",sv,[t.value||!e.quiet?(ee(),se("p",ov,le(t.value?"当前浏览器不支持 USB 连接":"用 USB 线接上设备,再点击「连接设备」"),1)):Ce("",!0),I("div",iv,[t.value?(ee(),se("button",{key:0,type:"button",class:"btn pri lg","data-testid":"copy-link",onClick:n},[ve(Ge,{name:"link",size:"s"}),o[1]||(o[1]=Me("复制页面链接",-1))])):(ee(),se("button",{key:1,type:"button",class:"btn pri lg","data-testid":"connect-real",disabled:r.value,onClick:o[0]||(o[0]=i=>te(Ku)("real"))},le(r.value?"读取中…":"连接设备"),9,av))]),te(K).connNote?(ee(),se("p",cv,le(te(K).connNote),1)):Ce("",!0)]))}}),Hu=[{id:"copy-paste",group:"common",groupName:"通用",name:"复制后粘贴",purpose:"先复制,再粘贴",shortcut:"Ctrl+C,然后 Ctrl+V"},{id:"print",group:"common",groupName:"通用",name:"打印",purpose:"打开打印窗口。",shortcut:"Ctrl+P"},{id:"goto-start",group:"excel",groupName:"Excel(WPS 表格共用)",name:"回到开头",purpose:"回到表格的第一个格子",shortcut:"Ctrl+Home"},{id:"autosum",group:"excel",groupName:"Excel(WPS 表格共用)",name:"自动求和",purpose:"点数据下方或右侧的空格后使用。",shortcut:"Alt+=,然后 Enter"},{id:"fill-down",group:"excel",groupName:"Excel(WPS 表格共用)",name:"向下填充",purpose:"先框选已有公式的格子和下面要填充的格子。",shortcut:"Ctrl+D"},{id:"fill-right",group:"excel",groupName:"Excel(WPS 表格共用)",name:"向右填充",purpose:"先框选已有内容的格子和右边要填充的格子。",shortcut:"Ctrl+R"},{id:"insert-date",group:"excel",groupName:"Excel(WPS 表格共用)",name:"插入日期",purpose:"先点要写入的格子,再按设备上的键。",shortcut:"Ctrl+;"},{id:"insert-time",group:"excel",groupName:"Excel(WPS 表格共用)",name:"插入时间",purpose:"先点要写入的格子,再按设备上的键。",shortcut:"Ctrl+Shift+;"},{id:"lock-ref",group:"excel",groupName:"Excel(WPS 表格共用)",name:"锁定引用",purpose:"编辑公式时把光标放在引用上再按;不在公式中则重复上一次操作。",shortcut:"F4"},{id:"make-table",group:"excel",groupName:"Excel(WPS 表格共用)",name:"建表",purpose:"先框选要变成表格的数据,表头放在第一行。",shortcut:"Ctrl+T"},{id:"excel-filter",group:"excel",groupName:"Excel(WPS 表格共用)",name:"筛选开关",purpose:"先点进数据区域,再按设备上的键。",shortcut:"Ctrl+Shift+L"},{id:"thousands",group:"excel",groupName:"Excel(WPS 表格共用)",name:"千分位",purpose:"先选中数字格子,再按设备上的键。",shortcut:"Ctrl+Shift+1"},{id:"currency",group:"excel",groupName:"Excel(WPS 表格共用)",name:"货币",purpose:"先选中数字格子,再按设备上的键。",shortcut:"Ctrl+Shift+4"},{id:"percent",group:"excel",groupName:"Excel(WPS 表格共用)",name:"百分比",purpose:"先选中数字格子,再按设备上的键。",shortcut:"Ctrl+Shift+5"},{id:"date-format",group:"excel",groupName:"Excel(WPS 表格共用)",name:"日期格式",purpose:"先选中格子。这是日期数字格式,不是插入当天日期。",shortcut:"Ctrl+Shift+3"},{id:"show-formulas",group:"excel",groupName:"Excel(WPS 表格共用)",name:"显示公式",purpose:"在表格中切换显示公式或计算结果。",shortcut:"Ctrl+`"},{id:"recalc-all",group:"excel",groupName:"Excel(WPS 表格共用)",name:"重算全部",purpose:"重算已经打开的工作簿。",shortcut:"F9"},{id:"recalc-sheet",group:"excel",groupName:"Excel(WPS 表格共用)",name:"重算当前表",purpose:"只重算当前这张表。",shortcut:"Shift+F9"},{id:"function-wizard",group:"excel",groupName:"Excel(WPS 表格共用)",name:"插入函数向导",purpose:"先点进要写公式的格子,再按设备上的键。",shortcut:"Shift+F3"},{id:"same-entry",group:"excel",groupName:"Excel(WPS 表格共用)",name:"整选区同输",purpose:"先框选格子并输入内容,再按设备上的键,整片写入同一内容。",shortcut:"Ctrl+Enter"},{id:"trace-prec",group:"excel",groupName:"Excel(WPS 表格共用)",name:"追踪引用",purpose:"先选中带公式的格子,再按设备上的键。",shortcut:"Ctrl+["},{id:"trace-dep",group:"excel",groupName:"Excel(WPS 表格共用)",name:"追踪从属",purpose:"先选中格子,再按设备上的键。",shortcut:"Ctrl+]"},{id:"trace-back",group:"excel",groupName:"Excel(WPS 表格共用)",name:"返回出发点",purpose:"顺着追踪跳走之后,回到刚才的格子。",shortcut:"F5,然后 Enter"},{id:"refresh-pivot",group:"excel",groupName:"Excel(WPS 表格共用)",name:"刷新当前透视",purpose:"先点进要刷新的透视表,再按设备上的键。",shortcut:"Alt+F5"},{id:"refresh-pivots",group:"excel",groupName:"Excel(WPS 表格共用)",name:"刷新全部透视",purpose:"刷新当前工作簿中的全部透视表。",shortcut:"Ctrl+Alt+F5"},{id:"print-preview",group:"excel",groupName:"Excel(WPS 表格共用)",name:"打印预览",purpose:"打开打印预览。",shortcut:"Ctrl+F2"},{id:"cell-format",group:"excel",groupName:"Excel(WPS 表格共用)",name:"单元格格式",purpose:"先选中格子,再按设备上的键。",shortcut:"Ctrl+1"},{id:"edit-cell",group:"excel",groupName:"Excel(WPS 表格共用)",name:"编辑格子",purpose:"先点一个格子,再按设备上的键。",shortcut:"F2"},{id:"goto",group:"excel",groupName:"Excel(WPS 表格共用)",name:"打开定位",purpose:"在表格中打开定位框,可跳到名称或指定格子。",shortcut:"Ctrl+G"},{id:"paste-special",group:"excel",groupName:"Excel(WPS 表格共用)",name:"打开选择性粘贴",purpose:"先复制,再点好落点,然后按设备上的键。",shortcut:"Ctrl+Alt+V"},{id:"copy-format",group:"word",groupName:"Word",name:"复制格式",purpose:"在 Word 中先选好带格式的文字,再按设备上的键。",shortcut:"Ctrl+Shift+C"},{id:"paste-format",group:"word",groupName:"Word",name:"粘贴格式",purpose:"在 Word 中使用;Excel 里 Ctrl+Shift+V 可能是粘贴值。",shortcut:"Ctrl+Shift+V"},{id:"heading-1",group:"word",groupName:"Word",name:"标题 1",purpose:"在 Word 中先点进段落,再按设备上的键。",shortcut:"Ctrl+Alt+1"},{id:"heading-2",group:"word",groupName:"Word",name:"标题 2",purpose:"在 Word 中先点进段落,再按设备上的键。",shortcut:"Ctrl+Alt+2"},{id:"heading-3",group:"word",groupName:"Word",name:"标题 3",purpose:"在 Word 中先点进段落,再按设备上的键。",shortcut:"Ctrl+Alt+3"},{id:"body-text",group:"word",groupName:"Word",name:"正文",purpose:"在 Word 中先点进段落,再按设备上的键。",shortcut:"Ctrl+Shift+N"},{id:"toggle-case",group:"word",groupName:"Word",name:"大小写切换",purpose:"在 Word 中先选中文字,再按设备上的键。",shortcut:"Shift+F3"},{id:"clear-char",group:"word",groupName:"Word",name:"清除字符格式",purpose:"在 Word 中先选中文字,再按设备上的键。",shortcut:"Ctrl+空格"},{id:"page-break",group:"word",groupName:"Word",name:"插入分页符",purpose:"在 Word 中先点好插入位置,再按设备上的键。",shortcut:"Ctrl+Enter"},{id:"footnote",group:"word",groupName:"Word",name:"插入脚注",purpose:"在 Word 中先点好插入位置,再按设备上的键。",shortcut:"Ctrl+Alt+F"},{id:"track-changes",group:"word",groupName:"Word",name:"修订开关",purpose:"在 Word 中开关修订。",shortcut:"Ctrl+Shift+E"},{id:"find-replace",group:"word",groupName:"Word",name:"查找替换",purpose:"在 Word 中打开查找和替换。",shortcut:"Ctrl+H"},{id:"new-slide",group:"powerpoint",groupName:"PowerPoint",name:"新建页",purpose:"在 PowerPoint 中新建一页。",shortcut:"Ctrl+M"},{id:"duplicate",group:"powerpoint",groupName:"PowerPoint",name:"复制页或对象",purpose:"在 PowerPoint 中先选中幻灯片或对象,再按设备上的键。",shortcut:"Ctrl+D"},{id:"group-objects",group:"powerpoint",groupName:"PowerPoint",name:"组合",purpose:"在 PowerPoint 中先选中多个对象,再按设备上的键。",shortcut:"Ctrl+G"},{id:"copy-anim",group:"powerpoint",groupName:"PowerPoint",name:"复制动画",purpose:"在 PowerPoint 中先选中已设动画的对象,再按设备上的键。",shortcut:"Alt+Shift+C"},{id:"paste-anim",group:"powerpoint",groupName:"PowerPoint",name:"粘贴动画",purpose:"在 PowerPoint 中先选中要套用动画的对象,再按设备上的键。",shortcut:"Alt+Shift+V"},{id:"show-start",group:"powerpoint",groupName:"PowerPoint",name:"从头放映",purpose:"从第一页开始放映。",shortcut:"F5"},{id:"show-current",group:"powerpoint",groupName:"PowerPoint",name:"从当前页放映",purpose:"从当前页开始放映。",shortcut:"Shift+F5"},{id:"black-screen",group:"powerpoint",groupName:"PowerPoint",name:"放映中黑屏",purpose:"放映时使用,再按一次恢复。",shortcut:"B"},{id:"white-screen",group:"powerpoint",groupName:"PowerPoint",name:"放映中白屏",purpose:"放映时使用,再按一次恢复。",shortcut:"W"},{id:"pen",group:"powerpoint",groupName:"PowerPoint",name:"笔",purpose:"放映时把指针改成笔。",shortcut:"Ctrl+P"},{id:"laser",group:"powerpoint",groupName:"PowerPoint",name:"激光笔",purpose:"放映时把指针改成激光笔。",shortcut:"Ctrl+L"},{id:"next-slide",group:"powerpoint",groupName:"PowerPoint",name:"下一页",purpose:"放映时翻到下一页。",shortcut:"PAGE DOWN"},{id:"prev-slide",group:"powerpoint",groupName:"PowerPoint",name:"上一页",purpose:"放映时回到上一页。",shortcut:"PAGE UP"},{id:"end-show",group:"powerpoint",groupName:"PowerPoint",name:"结束放映",purpose:"放映时结束放映。",shortcut:"Esc"},{id:"code-palette",group:"vscode",groupName:"VS Code",name:"命令面板",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+P"},{id:"code-quick-open",group:"vscode",groupName:"VS Code",name:"快速打开",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+P"},{id:"code-search",group:"vscode",groupName:"VS Code",name:"全局搜索",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+F"},{id:"code-replace",group:"vscode",groupName:"VS Code",name:"全局替换",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+H"},{id:"code-terminal",group:"vscode",groupName:"VS Code",name:"终端开关",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+`"},{id:"code-terminal-new",group:"vscode",groupName:"VS Code",name:"新建终端",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+`"},{id:"code-format",group:"vscode",groupName:"VS Code",name:"格式化文档",purpose:"在 VS Code 中使用。",shortcut:"Shift+Alt+F"},{id:"code-save-all",group:"vscode",groupName:"VS Code",name:"保存全部",purpose:"在 VS Code 中使用。先按下 Ctrl+K,再按 S。",shortcut:"Ctrl+K,然后 S"},{id:"code-run",group:"vscode",groupName:"VS Code",name:"运行调试",purpose:"在 VS Code 中使用。",shortcut:"F5"},{id:"code-stop",group:"vscode",groupName:"VS Code",name:"停止调试",purpose:"在 VS Code 中使用。",shortcut:"Shift+F5"},{id:"code-restart",group:"vscode",groupName:"VS Code",name:"重启调试",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+F5"},{id:"code-run-nodebug",group:"vscode",groupName:"VS Code",name:"无调试运行",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+F5"},{id:"code-breakpoint",group:"vscode",groupName:"VS Code",name:"断点",purpose:"在 VS Code 中使用。先把光标放在该行,再按设备上的键。",shortcut:"F9"},{id:"code-step-over",group:"vscode",groupName:"VS Code",name:"单步跳过",purpose:"在 VS Code 中使用。",shortcut:"F10"},{id:"code-step-into",group:"vscode",groupName:"VS Code",name:"单步进入",purpose:"在 VS Code 中使用。",shortcut:"F11"},{id:"code-step-out",group:"vscode",groupName:"VS Code",name:"单步跳出",purpose:"在 VS Code 中使用。",shortcut:"Shift+F11"},{id:"code-definition",group:"vscode",groupName:"VS Code",name:"转到定义",purpose:"在 VS Code 中使用。先把光标放在符号上,再按设备上的键。",shortcut:"F12"},{id:"code-references",group:"vscode",groupName:"VS Code",name:"转到引用",purpose:"在 VS Code 中使用。先把光标放在符号上,再按设备上的键。",shortcut:"Shift+F12"},{id:"code-rename",group:"vscode",groupName:"VS Code",name:"重命名符号",purpose:"在 VS Code 中使用。先把光标放在符号上,再按设备上的键。",shortcut:"F2"},{id:"code-quick-fix",group:"vscode",groupName:"VS Code",name:"快速修复",purpose:"在 VS Code 中使用。先把光标放在提示处,再按设备上的键。",shortcut:"Ctrl+DOT"},{id:"code-scm",group:"vscode",groupName:"VS Code",name:"源代码管理",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+G"},{id:"code-explorer",group:"vscode",groupName:"VS Code",name:"资源管理器",purpose:"在 VS Code 中使用。",shortcut:"Ctrl+Shift+E"},{id:"ps-brush",group:"photoshop",groupName:"Photoshop",name:"画笔",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"B"},{id:"ps-eraser",group:"photoshop",groupName:"Photoshop",name:"橡皮",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"E"},{id:"ps-heal",group:"photoshop",groupName:"Photoshop",name:"修复画笔",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"J"},{id:"ps-clone",group:"photoshop",groupName:"Photoshop",name:"仿制图章",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"S"},{id:"ps-lasso",group:"photoshop",groupName:"Photoshop",name:"套索",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"L"},{id:"ps-eyedropper",group:"photoshop",groupName:"Photoshop",name:"吸管",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"I"},{id:"ps-undo",group:"photoshop",groupName:"Photoshop",name:"撤销上一步",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"Ctrl+Z"},{id:"ps-redo",group:"photoshop",groupName:"Photoshop",name:"重做上一步",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"Ctrl+Shift+Z"},{id:"ps-swap-colors",group:"photoshop",groupName:"Photoshop",name:"切换颜色",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"X"},{id:"ps-default-colors",group:"photoshop",groupName:"Photoshop",name:"默认颜色",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"D"},{id:"ps-new-layer",group:"photoshop",groupName:"Photoshop",name:"新建图层",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"Ctrl+Shift+N"},{id:"ps-dup-layer",group:"photoshop",groupName:"Photoshop",name:"复制图层",purpose:"在 Photoshop 中使用。CSP 的键位不同。先选中图层,再按设备上的键。",shortcut:"Ctrl+J"},{id:"ps-merge",group:"photoshop",groupName:"Photoshop",name:"合并图层",purpose:"在 Photoshop 中使用。CSP 的键位不同。先选中要合并的图层,再按设备上的键。",shortcut:"Ctrl+E"},{id:"ps-transform",group:"photoshop",groupName:"Photoshop",name:"自由变换",purpose:"在 Photoshop 中使用。CSP 的键位不同。先选中对象,再按设备上的键。",shortcut:"Ctrl+T"},{id:"ps-brush-smaller",group:"photoshop",groupName:"Photoshop",name:"画笔变小",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"["},{id:"ps-brush-larger",group:"photoshop",groupName:"Photoshop",name:"画笔变大",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"]"},{id:"ps-hard-less",group:"photoshop",groupName:"Photoshop",name:"硬度降低",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"Shift+["},{id:"ps-hard-more",group:"photoshop",groupName:"Photoshop",name:"硬度提高",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"Shift+]"},{id:"ps-quick-select",group:"photoshop",groupName:"Photoshop",name:"快速选择",purpose:"在 Photoshop 中使用。CSP 的键位不同。",shortcut:"W"},{id:"pr-cut",group:"premiere",groupName:"Premiere Pro",name:"Premiere 切割",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+K"},{id:"pr-ripple",group:"premiere",groupName:"Premiere Pro",name:"Premiere 波纹删除",purpose:"这是 Premiere Pro 的默认键。先设好入出点或选中片段,再按设备上的键。",shortcut:"Shift+Delete"},{id:"pr-reverse",group:"premiere",groupName:"Premiere Pro",name:"Premiere 反向",purpose:"这是 Premiere Pro 的默认键。",shortcut:"J"},{id:"pr-stop",group:"premiere",groupName:"Premiere Pro",name:"Premiere 停止",purpose:"这是 Premiere Pro 的默认键。",shortcut:"K"},{id:"pr-forward",group:"premiere",groupName:"Premiere Pro",name:"Premiere 正向",purpose:"这是 Premiere Pro 的默认键。",shortcut:"L"},{id:"pr-in",group:"premiere",groupName:"Premiere Pro",name:"Premiere 入点",purpose:"这是 Premiere Pro 的默认键。",shortcut:"I"},{id:"pr-out",group:"premiere",groupName:"Premiere Pro",name:"Premiere 出点",purpose:"这是 Premiere Pro 的默认键。",shortcut:"O"},{id:"pr-mark",group:"premiere",groupName:"Premiere Pro",name:"Premiere 标记",purpose:"这是 Premiere Pro 的默认键。",shortcut:"M"},{id:"pr-export",group:"premiere",groupName:"Premiere Pro",name:"Premiere 导出",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+E"},{id:"pr-play",group:"premiere",groupName:"Premiere Pro",name:"Premiere 播放暂停",purpose:"这是 Premiere Pro 的默认键。",shortcut:"空格"},{id:"pr-trim-start",group:"premiere",groupName:"Premiere Pro",name:"Premiere 删头",purpose:"这是 Premiere Pro 的默认键。波纹修剪到播放头起点。",shortcut:"Q"},{id:"pr-trim-end",group:"premiere",groupName:"Premiere Pro",name:"Premiere 删尾",purpose:"这是 Premiere Pro 的默认键。波纹修剪到播放头终点。",shortcut:"W"},{id:"pr-cut-all",group:"premiere",groupName:"Premiere Pro",name:"Premiere 全轨切割",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+Shift+K"},{id:"pr-transition",group:"premiere",groupName:"Premiere Pro",name:"Premiere 默认转场",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+D"},{id:"pr-match",group:"premiere",groupName:"Premiere Pro",name:"Premiere 匹配帧",purpose:"这是 Premiere Pro 的默认键。",shortcut:"F"},{id:"pr-undo",group:"premiere",groupName:"Premiere Pro",name:"Premiere 撤销",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+Z"},{id:"pr-save",group:"premiere",groupName:"Premiere Pro",name:"Premiere 保存",purpose:"这是 Premiere Pro 的默认键。",shortcut:"Ctrl+S"},{id:"dv-cut",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇切割",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"Ctrl+B"},{id:"dv-reverse",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇反向",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"J"},{id:"dv-stop",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇停止",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"K"},{id:"dv-forward",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇正向",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"L"},{id:"dv-in",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇入点",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"I"},{id:"dv-out",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇出点",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"O"},{id:"dv-ripple",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇波纹删除",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。先设好入出点或选中片段,再按设备上的键。",shortcut:"Shift+Delete"},{id:"dv-play",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇播放暂停",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"空格"},{id:"dv-blade",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇刀片",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。切换刀片工具,不是 Ctrl+B 切割。",shortcut:"B"},{id:"dv-snap",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇吸附",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"N"},{id:"dv-insert",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇插入",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"F9"},{id:"dv-overwrite",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇覆盖",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"F10"},{id:"dv-replace",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇替换",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。",shortcut:"F11"},{id:"dv-trim",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇动态修剪",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。这是动态修剪模式,不是 Premiere 或剪映的 W。",shortcut:"W"},{id:"dv-deliver",group:"resolve",groupName:"DaVinci Resolve",name:"达芬奇交付",purpose:"这是达芬奇 Resolve 的默认键,与 Premiere 不同。切到交付页。",shortcut:"Shift+8"},{id:"jy-cut",group:"capcut",groupName:"剪映",name:"剪映分割",purpose:"这是剪映的默认键。分割是 Ctrl+B,不是 Ctrl+K。",shortcut:"Ctrl+B"},{id:"jy-trim-start",group:"capcut",groupName:"剪映",name:"剪映删头",purpose:"这是剪映的默认键。向播放头修剪开头。",shortcut:"Q"},{id:"jy-trim-end",group:"capcut",groupName:"剪映",name:"剪映删尾",purpose:"这是剪映的默认键。向播放头修剪结尾。",shortcut:"W"},{id:"jy-in",group:"capcut",groupName:"剪映",name:"剪映入点",purpose:"这是剪映的默认键。",shortcut:"I"},{id:"jy-out",group:"capcut",groupName:"剪映",name:"剪映出点",purpose:"这是剪映的默认键。",shortcut:"O"},{id:"jy-mark",group:"capcut",groupName:"剪映",name:"剪映标记",purpose:"这是剪映的默认键。踩点标记,不是 Premiere 的 M。",shortcut:"Ctrl+J"},{id:"jy-export",group:"capcut",groupName:"剪映",name:"剪映导出",purpose:"这是剪映的默认键。",shortcut:"Ctrl+E"},{id:"jy-play",group:"capcut",groupName:"剪映",name:"剪映播放暂停",purpose:"这是剪映的默认键。",shortcut:"空格"},{id:"jy-reverse",group:"capcut",groupName:"剪映",name:"剪映反向",purpose:"这是剪映的默认键。",shortcut:"J"},{id:"jy-stop",group:"capcut",groupName:"剪映",name:"剪映停止",purpose:"这是剪映的默认键。",shortcut:"K"},{id:"jy-forward",group:"capcut",groupName:"剪映",name:"剪映正向",purpose:"这是剪映的默认键。",shortcut:"L"},{id:"jy-snap",group:"capcut",groupName:"剪映",name:"剪映吸附",purpose:"这是剪映的默认键。",shortcut:"N"},{id:"web-new-tab",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"新建标签",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+T"},{id:"web-close-tab",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"关闭标签",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+W"},{id:"web-reopen-tab",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"恢复标签",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+Shift+T"},{id:"web-address",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"聚焦地址栏",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+L"},{id:"web-reload",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"重新加载",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+R"},{id:"web-next-tab",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"下一个标签",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+Tab"},{id:"web-prev-tab",group:"browser",groupName:"浏览器(Chrome / Edge)",name:"上一个标签",purpose:"在 Chrome 或 Edge 中使用。",shortcut:"Ctrl+Shift+Tab"}],lv=24,uv="少一点重复,多一点专注。",dv=[{id:"sheet",label:"表格",glyph:"表",ids:["autosum","fill-down","fill-right","insert-date","lock-ref","make-table","recalc-all","edit-cell","goto"]},{id:"edit",label:"剪辑",glyph:"剪",ids:["jy-cut","jy-trim-start","jy-trim-end","jy-in","jy-out","jy-mark","jy-export","jy-play","jy-snap"]},{id:"meet",label:"会议",glyph:"会",ids:["new-slide","show-start","show-current","laser","pen","next-slide","prev-slide","end-show","group-objects"]}];function fv(e){return e.map(t=>{const r=Hu.find(n=>n.id===t);if(!r)throw new Error(`homepage scene is missing a public template: ${t}`);return r})}const Mo=dv.map(e=>({id:e.id,label:e.label,glyph:e.glyph,keys:fv(e.ids)}));function Zc(e){return e.name.replace(/^剪映/,"")}function el(e){return e.shortcut.split(",")[0]??e.shortcut}function pv(){const e=globalThis,t=e.AudioContext??e.webkitAudioContext;return t?(Io||(Io=new t),Io):null}let Io=null;function hv(e){try{const t=e??pv();if(!t)return;t.state==="suspended"&&t.resume();const r=t.currentTime,n=t.createOscillator(),s=t.createGain();n.type="sine",n.frequency.setValueAtTime(210,r),n.frequency.exponentialRampToValueAtTime(78,r+.05),s.gain.setValueAtTime(1e-4,r),s.gain.exponentialRampToValueAtTime(.07,r+.004),s.gain.exponentialRampToValueAtTime(1e-4,r+.07),n.connect(s),s.connect(t.destination),n.start(r),n.stop(r+.08);const o=Math.max(1,Math.floor(t.sampleRate*.012)),i=t.createBuffer(1,o,t.sampleRate),a=i.getChannelData(0);for(let m=0;mu(r.value));let v=0,w=0,R=0,C=0,_=0,P=0,g=!1,S=0,k=jo,y=Do,b=0,O=0,L=0,U=0,z=jo,re=Do,Y=0,V=null;function oe(){return i||document.visibilityState==="hidden"}function ce(){if(oe()){n.value=-1;return}const X=t[_%t.length]??-1;_+=1,n.value=X,window.clearTimeout(R),R=window.setTimeout(()=>{n.value===X&&(n.value=-1)},280)}function de(){oe()||(n.value=-1,r.value=(r.value+1)%Mo.length)}function fe(X,d,h,N){const T=(h-X)*90-d*12;return d+=T*N,X+=d*N,[X,d]}function ie(X){if(!g)return;const d=Math.min(.032,S?(X-S)/1e3:.016);S=X;const h=X/1e3;a||(z=jo+Math.sin(h*.7)*1.5,re=Do+Math.cos(h*.5)*2),Y=Math.sin(h*.85)*4,[k,O]=fe(k,O,z,d),[y,L]=fe(y,L,re,d),[b,U]=fe(b,U,Y,d);const N=l.value;if(N){const T=M=>Math.max(-14,Math.min(14,M));N.style.transform=`rotateX(${T(k).toFixed(2)}deg) rotateY(${T(y).toFixed(2)}deg) translateY(${b.toFixed(2)}px)`}P=requestAnimationFrame(ie)}function Ne(){g||i||!c.value||(g=!0,S=0,P=requestAnimationFrame(ie))}function J(X){g=!1,cancelAnimationFrame(P),X&&l.value&&(l.value.style.transform="")}function $(){c.value=!!(V!=null&&V.matches)&&!i,c.value&&document.visibilityState!=="hidden"?Ne():J(!0)}function x(X){if(X.pointerType!=="mouse"||!c.value||document.visibilityState==="hidden")return;const d=l.value;if(!d)return;const h=d.getBoundingClientRect();if(h.width<1||h.height<1)return;const N=X.clientX-(h.left+h.width/2),T=X.clientY-(h.top+h.height/2),M=Math.max(window.innerWidth*.42,280),F=Math.max(window.innerHeight*.42,220),B=H=>Math.max(-12,Math.min(12,H));re=B(N/M*12),z=B(-T/F*12),a=!0}function E(X){X.relatedTarget||(a=!1)}function f(X,d){X.pointerType!=="mouse"||i||(s.value=d)}function p(X){s.value===X&&(s.value=-1)}function A(X){window.clearTimeout(C),o.value=X,n.value=-1,hv(),C=window.setTimeout(()=>{o.value===X&&(o.value=-1)},i?180:480)}function D(X,d){X.button===0&&(X.preventDefault(),A(d))}function j(X,d){X.preventDefault(),X.detail===0&&A(d)}function W(){if(document.visibilityState==="hidden"){n.value=-1,a=!1,J(!1);return}c.value&&Ne()}return Js(()=>{V=matchMedia(tl),$(),V.addEventListener("change",$),!i&&(document.addEventListener("visibilitychange",W),window.addEventListener("pointermove",x),window.addEventListener("pointerout",E),v=window.setInterval(ce,1500),w=window.setInterval(de,9e3))}),Ys(()=>{window.clearInterval(v),window.clearInterval(w),window.clearTimeout(R),window.clearTimeout(C),V==null||V.removeEventListener("change",$),document.removeEventListener("visibilitychange",W),window.removeEventListener("pointermove",x),window.removeEventListener("pointerout",E),J(!0)}),(X,d)=>(ee(),se("div",{class:Ke(["home-pad",{"is-still":te(i)}]),"data-testid":"home-pad"},[I("div",{ref_key:"tiltEl",ref:l,class:"home-deck-tilt"},[I("div",mv,[(ee(!0),se(Ae,null,ut(m.value.keys,(h,N)=>(ee(),se("button",{key:h.id,type:"button",class:Ke(["cap",{run:n.value===N,lift:s.value===N&&o.value!==N,tap:o.value===N}]),"data-testid":"home-key","aria-label":`${te(Zc)(h)} ${te(el)(h)}`,onPointerenter:T=>f(T,N),onPointerleave:T=>p(N),onPointerdown:T=>D(T,N),onClick:T=>j(T,N)},[(ee(),se("span",{key:m.value.id+h.id,class:"cap-copy"},[I("b",null,le(te(Zc)(h)),1),I("small",null,le(te(el)(h)),1)]))],42,gv))),128))])],512)],2))}}),vv={class:"public-page home","data-testid":"home-page"},_v={class:"home-cluster"},$v={class:"home-stage"},bv={class:"hero-mark","aria-hidden":"true"},wv={class:"lede"},Pv={key:0,class:"hero-actions"},Sv={key:0,class:"home-links","data-testid":"home-links","aria-label":"导航"},rl="(min-width: 761px)",Ev=Ye({__name:"HomePage",setup(e){const t=Se(null),r=Se(null),n=Se(typeof matchMedia=="function"&&matchMedia(rl).matches),s=Se(n.value&&Bc());let o=null;function i(){n.value=!!(o!=null&&o.matches),s.value=n.value&&Bc()}function a(u,m){const v=r.value;v&&(v.style.setProperty("--rx",`${u.toFixed(2)}deg`),v.style.setProperty("--ry",`${m.toFixed(2)}deg`))}function c(u){const m=r.value;if(!m||on()){a(0,0);return}const v=m.getBoundingClientRect(),w=(u.clientX-(v.left+v.width/2))/170,R=(u.clientY-(v.top+v.height/2))/170;if(Math.hypot(w,R)>1.15){a(0,0);return}const C=_=>Math.max(-6,Math.min(6,_));a(C(-R*6),C(w*6))}function l(){a(0,0)}return Js(()=>{o=matchMedia(rl),i(),o.addEventListener("change",i);const u=t.value;!u||on()||matchMedia("(hover: hover) and (pointer: fine)").matches&&(u.addEventListener("pointermove",c),u.addEventListener("pointerleave",l))}),Ys(()=>{var u,m;o==null||o.removeEventListener("change",i),(u=t.value)==null||u.removeEventListener("pointermove",c),(m=t.value)==null||m.removeEventListener("pointerleave",l)}),(u,m)=>(ee(),se("div",vv,[I("div",_v,[I("div",$v,[I("section",{ref_key:"hero",ref:t,class:"hero"},[I("div",bv,[m[3]||(m[3]=I("div",{class:"hero-glow"},null,-1)),I("div",{ref_key:"tilt",ref:r,class:"hero-tilt"},[ve(pu,{id:"og-hero",solid:"",live:"",pressable:""})],512)]),m[4]||(m[4]=I("h2",null,"OneGrid",-1)),I("p",wv,le(te(uv)),1),s.value?(ee(),se("div",Pv,[ve(ao,{quiet:""})])):Ce("",!0)],512),n.value?(ee(),tt(yv,{key:0})):Ce("",!0)])]),n.value?Ce("",!0):(ee(),se("nav",Sv,[I("a",{href:"#catalog","data-testid":"home-catalog",onClick:m[0]||(m[0]=bs(v=>te(He)("catalog"),["prevent"]))},"基础模板"),m[5]||(m[5]=I("span",{"aria-hidden":"true"},"·",-1)),I("a",{href:"#contact","data-testid":"home-contact",onClick:m[1]||(m[1]=bs(v=>te(He)("contact"),["prevent"]))},"联系团队"),m[6]||(m[6]=I("span",{"aria-hidden":"true"},"·",-1)),I("a",{href:"#rules","data-testid":"home-rules",onClick:m[2]||(m[2]=bs(v=>te(He)("rules"),["prevent"]))},"使用规则")]))]))}}),Cv=[{id:"common",name:"通用"},{id:"excel",name:"Excel(WPS 表格共用)"},{id:"word",name:"Word"},{id:"powerpoint",name:"PowerPoint"},{id:"vscode",name:"VS Code"},{id:"photoshop",name:"Photoshop"},{id:"premiere",name:"Premiere Pro"},{id:"resolve",name:"DaVinci Resolve"},{id:"capcut",name:"剪映"},{id:"browser",name:"浏览器(Chrome / Edge)"},{id:"autocad",name:"AutoCAD"}],kv={class:"public-page","data-testid":"catalog-page"},Rv={class:"doc-lead"},Nv={class:"catalog-tools"},Ov={class:"input"},Av=["value"],xv={key:0,class:"note","data-testid":"catalog-empty"},Tv=["data-testid"],Mv=["data-testid"],Iv={class:"kbd"},jv={class:"hero-actions"},Dv=Ye({__name:"CatalogPage",setup(e){const t=Se(""),r=Le(()=>{const s=t.value.trim().toLowerCase();return Cv.map(o=>({...o,items:Hu.filter(i=>i.group===o.id&&(!s||`${i.name} ${i.purpose} ${i.shortcut} ${i.groupName}`.toLowerCase().includes(s)))})).filter(o=>o.items.length>0)});function n(s){return`catalog-${s.id}`}return(s,o)=>(ee(),se("div",kv,[I("header",Rv,[o[3]||(o[3]=I("h2",null,"基础模板",-1)),I("p",null,"名称、软件和快捷键。不能从这里写到设备。进阶模板还有 "+le(te(lv))+" 个,步骤不在此页。",1)]),I("div",Nv,[I("label",Ov,[ve(Ge,{name:"search",size:"s"}),I("input",{"data-testid":"catalog-filter",value:t.value,placeholder:"筛选名称或快捷键",spellcheck:"false",onInput:o[0]||(o[0]=i=>t.value=i.target.value)},null,40,Av)]),ve(ao,{quiet:""})]),r.value.length===0?(ee(),se("p",xv,"没有匹配的基础模板")):Ce("",!0),(ee(!0),se(Ae,null,ut(r.value,i=>(ee(),se("section",{key:i.id,class:"catalog-group","data-testid":"catalog-group-"+i.id},[I("h3",null,le(i.name),1),I("ul",null,[(ee(!0),se(Ae,null,ut(i.items,a=>(ee(),se("li",{key:a.id,class:"catalog-row","data-testid":n(a)},[I("b",null,le(a.name),1),I("span",null,le(a.purpose),1),I("span",Iv,le(a.shortcut),1)],8,Mv))),128))])],8,Tv))),128)),I("div",jv,[I("button",{type:"button",class:"quiet-link","data-testid":"catalog-rules",onClick:o[1]||(o[1]=i=>te(He)("rules"))},"使用规则"),I("button",{type:"button",class:"quiet-link","data-testid":"catalog-contact",onClick:o[2]||(o[2]=i=>te(He)("contact"))},"联系团队")])]))}}),Lv={class:"public-page","data-testid":"contact-page"},Fv={class:"doc-block"},qv={class:"doc-block"},Vv={class:"hero-actions"},Uv=Ye({__name:"ContactPage",setup(e){return(t,r)=>(ee(),se("div",Lv,[r[6]||(r[6]=I("header",{class:"doc-lead"},[I("h2",null,"联系团队"),I("p",null,"报告问题、提出建议或附上文件,需要先连接一台真实的 OneGrid。未连接时不能发送,这个页面也没有上传入口。")],-1)),I("div",Fv,[r[3]||(r[3]=iu('
  1. 1接上设备在弹窗中选择 OneGrid
  2. 2打开反馈问题、建议、纠错或新需求
  3. 3提交只进入内部队列,不会公开
',1)),ve(ao,{quiet:""}),I("button",{type:"button",class:"btn","data-testid":"contact-feedback",onClick:r[0]||(r[0]=n=>te(He)("feedback"))},"打开反馈页")]),I("div",qv,[r[4]||(r[4]=I("h3",null,"不会公开",-1)),r[5]||(r[5]=I("ul",{class:"plain-list"},[I("li",null,"反馈正文和附件"),I("li",null,"设备上录下的自动操作"),I("li",null,"任何人分享的宏")],-1)),I("div",Vv,[I("button",{type:"button",class:"quiet-link",onClick:r[1]||(r[1]=n=>te(He)("rules"))},"使用规则"),I("button",{type:"button",class:"quiet-link",onClick:r[2]||(r[2]=n=>te(He)("catalog"))},"基础模板")])])]))}}),Kv={class:"public-page","data-testid":"gated-page"},zv={class:"doc-lead"},Hv={"data-testid":"gated-title"},Wv={class:"doc-block"},Bv={class:"hero-actions"},Gv=Ye({__name:"GatedPage",props:{page:{}},setup(e){const t=e,r=Le(()=>t.page==="keys"?{title:"改键",body:"改键需要这台设备上的配置。未连接时不打开编辑器,也不加载演示配置。"}:t.page==="macro"?{title:"自动操作",body:"从零开始、录制和完整步骤只在连接真实设备后可用。进阶模板的步骤列表不在这里展示。"}:{title:"设备",body:"设备名称、序列号、固件信息和按键记录只在连接真实的 OneGrid 后显示。"});return(n,s)=>(ee(),se("div",Kv,[I("header",zv,[I("h2",Hv,le(r.value.title),1),I("p",null,le(r.value.body),1)]),I("div",Wv,[ve(ao,{quiet:""}),I("div",Bv,[I("button",{type:"button",class:"quiet-link",onClick:s[0]||(s[0]=o=>te(He)("home"))},"返回首页"),e.page==="macro"||e.page==="keys"?(ee(),se("button",{key:0,type:"button",class:"quiet-link",onClick:s[1]||(s[1]=o=>te(He)("catalog"))},"查看基础模板")):Ce("",!0)])])]))}}),Ei="og.rules";function Jv(e,t){return(e.getItem(Ei)??"").split("|")[0]===t}function Yv(e){const t=(e.getItem(Ei)??"").split("|")[1];return t?new Date(t):null}function Xv(e,t,r){e.setItem(Ei,`${t}|${r.toISOString()}`)}const Qv={class:"grid12 quiet-doc","data-testid":"rules-page"},Zv={class:"c8 card",style:{display:"flex","flex-direction":"column","min-height":"0"}},e0={class:"card-h"},t0={class:"card-b rules-body"},r0={class:"rn"},n0={class:"rules-log"},s0={class:"rl-h"},o0={class:"c4 col"},i0={class:"card"},a0={class:"card-b",style:{display:"flex","flex-direction":"column",gap:"var(--s-3)"}},c0={class:"row"},l0={class:"muted",style:{"font-size":"12.5px"}},u0={class:"card",style:{flex:"1"}},d0={class:"card-b",style:{display:"flex","flex-direction":"column",gap:"var(--s-3)"}},f0={class:"cp-note cs"},p0={class:"cp-note live"},h0=Ye({__name:"RulesPage",emits:["reopen"],setup(e,{emit:t}){const r=t,n=Le(()=>Yv(localStorage)),s=o=>`${o.getFullYear()}-${String(o.getMonth()+1).padStart(2,"0")}-${String(o.getDate()).padStart(2,"0")} ${o.toTimeString().slice(0,5)}`;return(o,i)=>(ee(),se("div",Qv,[I("div",Zv,[I("div",e0,le(te(Jo).name)+" 使用规则",1),I("div",t0,[(ee(!0),se(Ae,null,ut(te(Vt).sections,(a,c)=>(ee(),se("section",{key:a.title,class:Ke(["rule",{key:c===4}])},[I("span",r0,le(c+1),1),I("div",null,[I("h3",null,le(a.title),1),I("p",null,[Me(le(a.text),1),a.items.length?(ee(),se(Ae,{key:0},[Me(le(a.items.join(";"))+"。",1)],64)):Ce("",!0)])])],2))),128))]),I("div",n0,[I("span",s0,[ve(Ge,{name:"clock",size:"s"}),Me("版本 "+le(te(Vt).version.replace("rules-v","")),1)]),i[1]||(i[1]=I("span",{class:"rl muted"},"规则更新后需重新确认",-1))])]),I("div",o0,[I("div",i0,[i[3]||(i[3]=I("div",{class:"card-h"},"确认状态",-1)),I("div",a0,[I("div",c0,[I("span",{class:Ke(["chip",n.value?"ok":"warn"])},[ve(Ge,{name:n.value?"check":"alert",size:"s"},null,8,["name"]),Me(le(n.value?"已同意":"未同意"),1)],2),I("span",l0,le(n.value?s(n.value):""),1)]),I("button",{class:"btn",onClick:i[0]||(i[0]=a=>r("reopen"))},[ve(Ge,{name:"shield",size:"s"}),i[2]||(i[2]=Me("查看确认要点",-1))])])]),I("div",u0,[i[6]||(i[6]=I("div",{class:"card-h"},"敏感方案提醒",-1)),I("div",d0,[I("div",f0,[i[4]||(i[4]=I("b",null,"电商客服类",-1)),Me(le(te(Vt).comply.cs),1)]),I("div",p0,[i[5]||(i[5]=I("b",null,"直播类",-1)),Me(le(te(Vt).comply.live),1)])])])])]))}}),m0={class:"grid12","data-testid":"later-page"},g0={class:"c8 card",style:{"align-self":"start"}},y0={class:"card-h"},v0={class:"card-b",style:{display:"flex","flex-direction":"column",gap:"var(--s-3)"}},_0={class:"row",style:{gap:"var(--s-3)"}},$0={class:"muted"},b0=Ye({__name:"LaterPage",props:{page:{}},setup(e){const t=e,r={library:["方案库","按软件和用途挑选现成方案。用户之间的分享不开放"],light:["灯效","分别调整边框灯和按键灯的效果、颜色和亮度"],layers:["按键页","新建、复制、改名和清空按键页"],firmware:["固件更新","查看新版本,进入固件更新模式并核对版本"]},[n,s]=r[t.page]??["",""];return(o,i)=>(ee(),se("div",m0,[I("div",g0,[I("div",y0,le(te(n)),1),I("div",v0,[I("div",_0,[i[0]||(i[0]=I("span",{class:"tag acc"},"暂未开放",-1)),I("span",$0,le(te(s)),1)])])]),i[1]||(i[1]=iu('
这一项

还没有做。连接设备也不会打开它。

已经可以做的是:连接真实设备后改键和自动操作。使用规则、基础模板和联系团队无需设备。

',1))]))}}),nl="提交没有成功,请稍后再试。";function w0(){const e="https://onegrid-feedback.laowang763.workers.dev";return e.trim()?e.trim().replace(/\/$/,""):""}function Wu(e){return`${w0()}${e}`}async function P0(e,t){const r=await e.json().catch(()=>null);return r&&typeof r.message=="string"?r.message.slice(0,200):t}async function S0(e){try{const t=await fetch(Wu("/api/feedback/quota"),{method:"POST",credentials:"omit",referrerPolicy:"no-referrer",headers:{"content-type":"application/json","x-onegrid-feedback":"1"},body:JSON.stringify({deviceSerial:e})});if(!t.ok)return{ok:!1,message:await P0(t,"暂时无法查询提交次数,仍可尝试提交。")};const r=await t.json();return typeof r.retryAfterSeconds!="number"||typeof r.message!="string"?{ok:!1,message:"暂时无法查询提交次数,仍可尝试提交。"}:{ok:!0,quota:{limit:r.limit??10,used:r.used??0,windowHours:r.windowHours??6,retryAfterSeconds:r.retryAfterSeconds,message:r.message}}}catch{return{ok:!1,message:"暂时无法查询提交次数,仍可尝试提交。"}}}async function E0(e){const t=new FormData;t.set("category",e.category),t.set("title",e.title),t.set("description",e.description),t.set("deviceSerial",e.serial);for(const r of e.images)t.append("image",r);e.macro&&t.set("macro",e.macro);try{const r=await fetch(Wu("/api/feedback"),{method:"POST",credentials:"omit",referrerPolicy:"no-referrer",headers:{"x-onegrid-feedback":"1"},body:t}),n=await r.json().catch(()=>null),s=n&&typeof n.message=="string"?n.message.slice(0,200):nl;if(!r.ok)return{ok:!1,message:s};const o=n&&typeof n.shortId=="string"?n.shortId:"";return o?{ok:!0,shortId:o,message:s}:{ok:!1,message:nl}}catch{return{ok:!1,message:"网络没有连上,提交没有发出。请稍后再试。"}}}function C0(e){return e.length>=8&&e[0]===137&&e[1]===80&&e[2]===78&&e[3]===71?"png":e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255?"jpeg":e.length>=12&&e[0]===82&&e[1]===73&&e[2]===70&&e[3]===70&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80?"webp":null}const k0=5*1024*1024,R0=3,N0=1024*1024,O0={class:"fb-scroll","data-testid":"feedback-page"},A0={key:0,class:"grid12"},x0={class:"c8 card",style:{"align-self":"start"}},T0={class:"card-b fb-ok","data-testid":"feedback-success"},M0={class:"fb-note"},I0={class:"c8 col",style:{"align-self":"start"}},j0={class:"card"},D0={class:"card-b fb-types"},L0={class:"seg full",role:"tablist","data-testid":"feedback-types"},F0=["data-testid","onClick"],q0={class:"fb-hint"},V0={class:"card"},U0={class:"card-b",style:{display:"flex","flex-direction":"column",gap:"12px"}},K0={class:"field"},z0={class:"field"},H0={class:"card"},W0={class:"card-b"},B0={class:"row",style:{gap:"8px","margin-top":"12px","flex-wrap":"wrap"}},G0=["disabled"],J0={key:0,class:"fb-files"},Y0=["onClick"],X0={key:0,class:"fb-file"},Q0={class:"c4 col",style:{"align-self":"start"}},Z0={class:"card"},e_={class:"card-b fb-side"},t_={key:0,class:"fb-note","data-testid":"feedback-reminder"},r_={key:1,class:"fb-note"},n_={key:2,class:"fb-note"},s_={class:"mono fb-serial"},o_={key:3,class:"fb-note","data-testid":"feedback-wait"},i_={key:4,class:"fb-note"},a_={key:5,class:"fb-note"},c_={key:6,class:"fb-err",role:"alert","data-testid":"feedback-error"},l_=["disabled"],u_=Ye({__name:"FeedbackPage",setup(e){const t=[{id:"problem",label:"问题",hint:"使用时遇到的故障。"},{id:"suggestion",label:"建议",hint:"对现有功能的改进。"},{id:"correction",label:"纠错",hint:"文案、按键或方案里不对的地方。"},{id:"request",label:"新需求",hint:"说说你想要的效果。"}],r=Vp(typeof location>"u"?null:location),n=Se("problem"),s=Se(""),o=Se(""),i=Se([]),a=Se(null),c=Se(""),l=Se(!1),u=Se(""),m=Se(r==="success"?{shortId:"A1B2C3D4",message:"已收到。编号 A1B2C3D4。我们会查看这条反馈。它不会公开,也不会自动写到设备上。"}:null),v=Se(r==="wait"?{limit:10,used:10,windowHours:6,retryAfterSeconds:18720,message:"这台设备在 6 小时内已提交 10 次。请在 5 小时 12 分钟后再提交。"}:null),w=Se(""),R=Se(null),C=Se(null),_=Le(()=>{var Y;return Yo({conn:K.conn,mode:K.mode,serial:((Y=K.info)==null?void 0:Y.serial)??null})}),P=Le(()=>!_.value.ok&&_.value.reason==="sim"),g=Le(()=>_.value.ok?_.value.serial:""),S=Le(()=>t.find(Y=>Y.id===n.value)??t[0]),k=Le(()=>{var Y;return(((Y=v.value)==null?void 0:Y.retryAfterSeconds)??0)>0||r==="wait"}),y=Le(()=>_.value.ok&&!k.value&&o.value.trim().length>0&&!l.value&&r==null);function b(Y){return Y<1024?`${Y} B`:Y<1024*1024?`${Math.ceil(Y/1024)} KB`:`${(Y/1024/1024).toFixed(1)} MB`}async function O(){if(w.value="",r)return;if(!_.value.ok){v.value=null;return}const Y=await S0(_.value.serial);Y.ok?v.value=Y.quota:w.value=Y.message}vs(()=>{var Y;return[K.conn,K.mode,(Y=K.info)==null?void 0:Y.serial]},()=>{O()},{immediate:!0});async function L(Y){if(u.value="",!(Y!=null&&Y.length))return;const V=[...i.value];for(const oe of Y){if(V.length>=R0){u.value="最多上传 3 张图片。";break}if(oe.size>k0){u.value="这张图片不能上传。请使用 JPG、PNG 或 WebP,且每张不超过 5 MB。";continue}const ce=new Uint8Array(await oe.arrayBuffer());if(!C0(ce)){u.value="这张图片不能上传。请使用 JPG、PNG 或 WebP,且每张不超过 5 MB。";continue}V.push({file:oe,label:oe.name||"图片"})}i.value=V}async function U(Y){if(u.value="",!Y)return;if(!Y.name.toLowerCase().endsWith(".json")||Y.size>N0){u.value="这份 JSON 不是 OneGrid 0.1.0 的配置或自动操作步骤,已拒绝。";return}const V=await Y.text();if(V.includes("\0")){u.value="这份 JSON 不是 OneGrid 0.1.0 的配置或自动操作步骤,已拒绝。";return}try{const oe=JSON.parse(V);if(typeof oe!="object"||oe===null)throw new Error("shape")}catch{u.value="这份 JSON 不是 OneGrid 0.1.0 的配置或自动操作步骤,已拒绝。";return}a.value=Y,c.value=Y.name}function z(){if(!K.config)return;const Y=JSON.stringify(K.config);a.value=new File([Y],"onegrid-config.json",{type:"application/json"}),c.value="当前配置",u.value=""}async function re(){var oe;if(u.value="",r)return;const Y=Yo({conn:K.conn,mode:K.mode,serial:((oe=K.info)==null?void 0:oe.serial)??null});if(!Y.ok||k.value||!o.value.trim())return;l.value=!0;const V=await E0({serial:Y.serial,category:n.value,title:s.value,description:o.value,images:i.value.map(ce=>ce.file),macro:a.value});if(l.value=!1,!V.ok){u.value=V.message,V.message.includes("已提交 10 次")&&O();return}m.value={shortId:V.shortId,message:V.message}}return(Y,V)=>{var oe;return ee(),se("div",O0,[m.value?(ee(),se("div",A0,[I("div",x0,[I("div",T0,[V[8]||(V[8]=I("h2",null,"已收到",-1)),I("p",M0,le(m.value.message),1),I("button",{type:"button",class:"btn",onClick:V[0]||(V[0]=ce=>m.value=null)},"再写一条")])])])):(ee(),se("form",{key:1,class:"grid12",onSubmit:bs(re,["prevent"])},[I("div",I0,[I("div",j0,[V[9]||(V[9]=I("div",{class:"card-h"},"反馈类型",-1)),I("div",D0,[I("div",L0,[(ee(),se(Ae,null,ut(t,ce=>I("button",{key:ce.id,type:"button",class:Ke({on:n.value===ce.id}),"data-testid":"feedback-type-"+ce.id,onClick:de=>n.value=ce.id},le(ce.label),11,F0)),64))]),I("p",q0,le((oe=S.value)==null?void 0:oe.hint),1)])]),I("div",V0,[V[12]||(V[12]=I("div",{class:"card-h"},"内容",-1)),I("div",U0,[I("label",K0,[V[10]||(V[10]=I("b",null,"标题",-1)),Di(I("input",{"onUpdate:modelValue":V[1]||(V[1]=ce=>s.value=ce),class:"fb-title",type:"text",maxlength:"80",autocomplete:"off",placeholder:"一句话,可选","data-testid":"feedback-title"},null,512),[[la,s.value]])]),I("label",z0,[V[11]||(V[11]=I("b",null,"具体说明",-1)),Di(I("textarea",{"onUpdate:modelValue":V[2]||(V[2]=ce=>o.value=ce),class:"fb-area",maxlength:"4000",placeholder:"发生了什么,或者你希望按键做到什么。请不要填写密码。","data-testid":"feedback-description"},null,512),[[la,o.value]])])])]),I("div",H0,[V[16]||(V[16]=I("div",{class:"card-h"},[Me("附件"),I("span",{class:"sub"},"可选")],-1)),I("div",W0,[V[15]||(V[15]=I("p",{class:"fb-note"},"图片用 JPG、PNG 或 WebP,最多 3 张,每张不超过 5 MB。配置文件只作查阅,不会运行,也不会写到设备。",-1)),I("div",B0,[I("button",{type:"button",class:"btn sm",onClick:V[3]||(V[3]=ce=>{var de;return(de=R.value)==null?void 0:de.click()})},[ve(Ge,{name:"upload",size:"s"}),V[13]||(V[13]=Me("添加图片",-1))]),I("button",{type:"button",class:"btn sm",disabled:!te(K).config,onClick:z},[ve(Ge,{name:"copy",size:"s"}),V[14]||(V[14]=Me("附上当前配置",-1))],8,G0),I("button",{type:"button",class:"btn sm ghost",onClick:V[4]||(V[4]=ce=>{var de;return(de=C.value)==null?void 0:de.click()})},"选择 JSON")]),I("input",{ref_key:"imgInput",ref:R,hidden:"",type:"file",accept:"image/png,image/jpeg,image/webp,.png,.jpg,.jpeg,.webp",multiple:"","data-testid":"feedback-images",onChange:V[5]||(V[5]=ce=>{L(ce.target.files),ce.target.value=""})},null,544),I("input",{ref_key:"macroInput",ref:C,hidden:"",type:"file",accept:"application/json,.json","data-testid":"feedback-macro",onChange:V[6]||(V[6]=ce=>{var de;U(((de=ce.target.files)==null?void 0:de[0])??null),ce.target.value=""})},null,544),i.value.length||a.value?(ee(),se("div",J0,[(ee(!0),se(Ae,null,ut(i.value,(ce,de)=>(ee(),se("div",{key:ce.label+de,class:"fb-file"},[I("b",null,le(ce.label),1),I("span",null,le(b(ce.file.size)),1),I("button",{type:"button",class:"btn sm ghost",onClick:fe=>i.value.splice(de,1)},"移除",8,Y0)]))),128)),a.value?(ee(),se("div",X0,[I("b",null,le(c.value),1),I("span",null,le(b(a.value.size)),1),I("button",{type:"button",class:"btn sm ghost",onClick:V[7]||(V[7]=ce=>a.value=null)},"移除")])):Ce("",!0)])):Ce("",!0)])])]),I("div",Q0,[I("div",Z0,[V[18]||(V[18]=I("div",{class:"card-h"},"提交",-1)),I("div",e_,[_.value.ok?Ce("",!0):(ee(),se("p",t_,"请先接入设备后再提交")),P.value?(ee(),se("p",r_,"演示模式不能提交。")):g.value?(ee(),se("p",n_,[V[17]||(V[17]=Me("序列号已从这台设备读出,不能手填。",-1)),I("span",s_,le(g.value),1)])):Ce("",!0),k.value&&v.value?(ee(),se("p",o_,le(v.value.message),1)):v.value?(ee(),se("p",i_,le(v.value.message),1)):Ce("",!0),w.value?(ee(),se("p",a_,le(w.value),1)):Ce("",!0),u.value?(ee(),se("div",c_,le(u.value),1)):Ce("",!0),I("button",{type:"submit",class:"btn pri","data-testid":"feedback-submit",disabled:!y.value},le(l.value?"提交中…":"提交反馈"),9,l_)])]),V[19]||(V[19]=I("div",{class:"card"},[I("div",{class:"card-h"},"会怎样处理"),I("div",{class:"card-b"},[I("p",{class:"fb-note"},"这里不是方案库。内容只进入内部队列,供 OneGrid 查看。不会公开,不会执行附件,也不会自动改键。")])],-1))])],32))])}}});function d_(e,t){return e==="home"||e==="rules"||e==="contact"||e==="catalog"?e:e==="feedback"?"feedback":e==="library"||e==="light"||e==="layers"||e==="firmware"?"later":e==="device"||e==="keys"||e==="macro"?t?e:"gated":"home"}const f_=["inert","aria-hidden"],p_={class:"main"},h_={class:"toasts"},m_=Ye({__name:"App",setup(e){const t=go(()=>wo(()=>import("./DevicePage-CpHJcfhu.js"),__vite__mapDeps([0,1,2]))),r=go(()=>wo(()=>import("./KeysPage-DFphAArT.js"),__vite__mapDeps([0,3,1,2]))),n=go(()=>wo(()=>import("./MacrosPage-Czkgahnl.js"),__vite__mapDeps([3,1,2,4]))),s=()=>{const v=location.hash.slice(1);Ey.includes(v)&&(K.page=v)};s(),window.addEventListener("hashchange",s);const o=Le(()=>{var v;return fn({conn:K.conn,mode:K.mode,serial:((v=K.info)==null?void 0:v.serial)??null})}),i=Le(()=>d_(K.page,o.value)),a=Le(()=>i.value!=="home"&&(i.value==="catalog"||i.value==="contact"||i.value==="gated"||i.value==="rules"||i.value==="feedback")),c=Se(!Jv(localStorage,Vt.version));function l(){Xv(localStorage,Vt.version,new Date),c.value=!1,ze("已同意使用规则")}function u(){c.value=!1,He("rules")}function m(){c.value=!0}return(v,w)=>(ee(),se(Ae,null,[I("div",{class:Ke(["app",{"is-public":!o.value}]),inert:c.value||void 0,"aria-hidden":c.value||void 0},[o.value?(ee(),tt(Vy,{key:0})):Ce("",!0),o.value?(ee(),tt(Jy,{key:1})):Ce("",!0),I("main",p_,[(ee(),se("div",{key:te(K).page,class:Ke(["view",{"view-scroll":a.value,"view-bare":!o.value&&i.value==="home"}])},[i.value==="home"?(ee(),tt(Ev,{key:0})):i.value==="catalog"?(ee(),tt(Dv,{key:1})):i.value==="contact"?(ee(),tt(Uv,{key:2})):i.value==="rules"?(ee(),tt(h0,{key:3,onReopen:m})):i.value==="feedback"?(ee(),tt(u_,{key:4})):i.value==="later"?(ee(),tt(b0,{key:5,page:te(K).page},null,8,["page"])):i.value==="gated"?(ee(),tt(Gv,{key:6,page:te(K).page},null,8,["page"])):i.value==="device"?(ee(),tt(te(t),{key:7})):i.value==="keys"?(ee(),tt(te(r),{key:8})):i.value==="macro"?(ee(),tt(te(n),{key:9})):Ce("",!0)],2))])],10,f_),c.value?(ee(),tt(nv,{key:0,onAgree:l,onFull:u})):Ce("",!0),I("div",h_,[(ee(!0),se(Ae,null,ut(te(ws),R=>(ee(),se("div",{key:R.id,class:"toast"},[I("i",{style:dr(R.kind==="warn"?"background:var(--amber-500)":"")},[ve(Ge,{name:R.kind==="warn"?"alert":"check"},null,8,["name"])],4),I("span",null,le(R.msg),1)]))),128))])],64))}});Np();wp(m_).mount("#root");export{k_ as $,tt as A,U_ as B,ze as C,Gt as D,K_ as E,Ae as F,pu as G,v_ as H,bs as I,Lg as J,V_ as K,ju as L,Tu as M,Ve as N,Js as O,tf as P,Uu as Q,M_ as R,x_ as S,T_ as T,Sr as U,Iu as V,O_ as W,A_ as X,R_ as Y,cn as Z,Ge as _,I as a,Tg as a0,wi as a1,Pi as a2,S_ as a3,Cv as a4,E_ as a5,Oy as a6,ms as a7,Vg as a8,w_ as a9,Su as aa,Eu as ab,N_ as ac,qc as ad,L_ as ae,I_ as af,j_ as ag,F_ as ah,C_ as ai,q_ as aj,D_ as ak,zg as al,P_ as am,Pu as an,Mu as ao,fr as ap,Me as b,se as c,Ye as d,Se as e,on as f,iu as g,ve as h,__ as i,b_ as j,Ce as k,He as l,$_ as m,dr as n,ee as o,z_ as p,Le as q,ut as r,K as s,le as t,te as u,fn as v,vs as w,Ku as x,Ke as y,Dg as z};