vite-plugin-vue-devtools 9.0.0-rc.3 → 9.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/client/assets/{Checkbox-CsgLgOjf.js → Checkbox-BcOsupnb.js} +1 -1
  2. package/client/assets/InspectorState-CxoxiYJv.js +1 -0
  3. package/client/assets/InspectorTree-B5ZtDinH.js +1 -0
  4. package/client/assets/InspectorTree-qN67Pdkz.css +1 -0
  5. package/client/assets/{RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi-By717ouR.js → RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi-Ko5HVMry.js} +1 -1
  6. package/client/assets/_plugin-vue_export-helper-7VP3XblN.js +5 -0
  7. package/client/assets/components-BzDcdL_G.js +3 -0
  8. package/client/assets/{custom-inspector-DikTGJYk.js → custom-inspector-DsCNPUv8.js} +1 -1
  9. package/client/assets/{graph-DT4Zl2Ge.js → graph-B6uUU3Mu.js} +1 -1
  10. package/client/assets/index-DppbHKeW.js +3 -0
  11. package/client/assets/{overview-CBnqLe5W.js → overview-nbXAZw6F.js} +1 -1
  12. package/client/assets/{pages-BnEiKDB1.js → pages-M10glbio.js} +1 -1
  13. package/client/assets/{plugins-D7N7tBMP.js → plugins-sTXXC8HU.js} +1 -1
  14. package/client/assets/{settings-DVRsqvUy.js → settings-B6GCd_60.js} +1 -1
  15. package/client/assets/{splitpanes.esm-Cr-PYWE3.js → splitpanes.esm-8w8po8hd.js} +1 -1
  16. package/client/assets/{timeline-DemFeH2V.js → timeline-Bw29uBP-.js} +1 -1
  17. package/client/index.html +2 -2
  18. package/dist/client.d.mts +1 -1
  19. package/dist/client.mjs +1 -1
  20. package/dist/index.mjs +3 -3
  21. package/package.json +7 -7
  22. package/client/assets/InspectorState-CXPxKmUf.js +0 -1
  23. package/client/assets/InspectorTree-BgcS7_BF.js +0 -1
  24. package/client/assets/InspectorTree-CyiZHbQn.css +0 -1
  25. package/client/assets/_plugin-vue_export-helper-CdLdzBIA.js +0 -5
  26. package/client/assets/components--Uqqnist.js +0 -3
  27. package/client/assets/index-Ctr1uf78.js +0 -3
@@ -0,0 +1,5 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./browser-agent-rpc-CS80Sphv-UZooJqNf.js","./nanoid-Cya-tyvy.js"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./nanoid-Cya-tyvy.js";function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>S(e)===`[object Map]`,m=e=>S(e)===`[object Set]`,h=e=>S(e)===`[object Date]`,g=e=>typeof e==`function`,_=e=>typeof e==`string`,v=e=>typeof e==`symbol`,y=e=>typeof e==`object`&&!!e,b=e=>(y(e)||g(e))&&g(e.then)&&g(e.catch),x=Object.prototype.toString,S=e=>x.call(e),C=e=>S(e).slice(8,-1),w=e=>S(e)===`[object Object]`,T=e=>_(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,E=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),D=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},O=/-\w/g,k=D(e=>e.replace(O,e=>e.slice(1).toUpperCase())),A=/\B([A-Z])/g,j=D(e=>e.replace(A,`-$1`).toLowerCase()),ee=D(e=>e.charAt(0).toUpperCase()+e.slice(1)),te=D(e=>e?`on${ee(e)}`:``),M=(e,t)=>!Object.is(e,t),N=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ne=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},re=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ie,ae=()=>ie||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function oe(e){if(f(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=_(r)?ue(r):oe(r);if(i)for(let e in i)t[e]=i[e]}return t}if(_(e)||y(e))return e}var se=/;(?![^(]*\))/g,ce=/:([^]+)/,le=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function ue(e){let t={};return e.replace(le,e=>e.startsWith(`/*`)?``:e).split(se).forEach(e=>{if(e){let n=e.split(ce);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function de(e){let t=``;if(_(e))t=e;else if(f(e))for(let n=0;n<e.length;n++){let r=de(e[n]);r&&(t+=r+` `)}else if(y(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function fe(e){if(!e)return null;let{class:t,style:n}=e;return t&&!_(t)&&(e.class=de(t)),n&&(e.style=oe(n)),e}var pe=t(`itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`);function me(e){return!!e||e===``}function he(e,t,n){if(e.length!==t.length)return!1;let r=!0;for(let i=0;r&&i<e.length;i++)r=ye(e[i],t[i],n);return r}function ge(e,t,n){if(e.size!==t.size)return!1;let r=Array.from(t),i=new Uint8Array(r.length);for(let t of e){let e=-1;for(let a=0;a<r.length;a++)if(!i[a]&&ye(t,r[a],n)){e=a;break}if(e<0)return!1;i[e]=1}return!0}function _e(e,t,n){let r=p(e),i=p(t);if(r||i||(r=m(e),i=m(t),r||i))return r&&i?ge(e,t,n):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e){let i=e.hasOwnProperty(r),a=t.hasOwnProperty(r);if(i&&!a||!i&&a||!ye(e[r],t[r],n))return!1}return String(e)===String(t)}function ve(e,t,n,r){n||=[new Map,new Map];let[i,a]=n;if(i.has(e)||a.has(t))return i.get(e)===t&&a.get(t)===e;i.set(e,t),a.set(t,e);let o=r(e,t,n);return i.delete(e),a.delete(t),o}function ye(e,t,n){if(e===t)return!0;let r=h(e),i=h(t);return r||i?r&&i?e.getTime()===t.getTime():!1:(r=v(e),i=v(t),r||i?e===t:(r=f(e),i=f(t),r||i?r&&i?ve(e,t,n,he):!1:(r=y(e),i=y(t),r||i?!r||!i?!1:ve(e,t,n,_e):String(e)===String(t))))}function be(e,t){return e.findIndex(e=>ye(e,t))}var xe=e=>!!(e&&e.__v_isRef===!0),Se=e=>_(e)?e:e==null?``:f(e)||y(e)&&(e.toString===x||!g(e.toString))?xe(e)?Se(e.value):JSON.stringify(e,Ce,2):String(e),Ce=(e,t)=>xe(t)?Ce(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[we(t,r)+` =>`]=n,e),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>we(e))}:v(t)?we(t):y(t)&&!f(t)&&!w(t)?String(t):t,we=(e,t=``)=>v(e)?`Symbol(${e.description??t})`:e,P,Te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&P&&(P.active?(this.parent=P,this.index=(P.scopes||(P.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].pause()}for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}let n=this.effects.slice();for(e=0,t=n.length;e<t;e++)n[e].resume()}}run(e){if(this._active){let t=P;try{return P=this,e()}finally{P=t}}}on(){++this._on===1&&(this.prevScope=P,P=this)}off(){if(this._on>0&&--this._on===0){if(P===this)P=this.prevScope;else{let e=P;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){let e=this.scopes.slice();for(t=0,n=e.length;t<n;t++)e[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ee(){return P}var F,De=new WeakSet,Oe=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,P&&(P.active?P.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,De.has(this)&&(De.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Me(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ge(this),Fe(this);let e=F,t=Ve;F=this,Ve=!0;try{return this.fn()}finally{Ie(this),F=e,Ve=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ze(e);this.deps=this.depsTail=void 0,Ge(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?De.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Le(this)&&this.run()}get dirty(){return Le(this)}},ke=0,Ae,je;function Me(e,t=!1){e.flags|=8,t?(e.next=je,je=e):(e.next=Ae,Ae=e)}function Ne(){ke++}function Pe(){if(--ke>0)return;if(je){let e=je;for(je=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ae;){let t=Ae;for(Ae=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Fe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ie(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),ze(r),Be(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Le(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Re(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Re(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ke)||(e.globalVersion=Ke,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Le(e))))return;e.flags|=2;let t=e.dep,n=F,r=Ve;F=e,Ve=!0;try{Fe(e);let n=e.fn(e._value);(t.version===0||M(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{F=n,Ve=r,Ie(e),e.flags&=-3}}function ze(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)ze(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Be(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ve=!0,He=[];function Ue(){He.push(Ve),Ve=!1}function We(){let e=He.pop();Ve=e===void 0||e}function Ge(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=F;F=void 0;try{t()}finally{F=e}}}var Ke=0,qe=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Je=class{constructor(e){this.computed=e,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(e){if(!F||!Ve||F===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==F)t=this.activeLink=new qe(F,this),F.deps?(t.prevDep=F.depsTail,F.depsTail.nextDep=t,F.depsTail=t):F.deps=F.depsTail=t,Ye(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=F.depsTail,t.nextDep=void 0,F.depsTail.nextDep=t,F.depsTail=t,F.deps===t&&(F.deps=e)}return t}trigger(e){this.version++,Ke++,this.notify(e)}notify(e){Ne();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Pe()}}};function Ye(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ye(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Xe=new WeakMap,Ze=Symbol(``),Qe=Symbol(``),$e=Symbol(``);function I(e,t,n){if(Ve&&F){let t=Xe.get(e);t||Xe.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Je),r.map=t,r.key=n),r.track()}}function et(e,t,n,r,i,a){let o=Xe.get(e);if(!o){Ke++;return}let s=e=>{e&&e.trigger()};if(Ne(),t===`clear`)o.forEach(s);else{let i=f(e),a=i&&T(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===$e||!v(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get($e)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ze)),p(e)&&s(o.get(Qe)));break;case`delete`:i||(s(o.get(Ze)),p(e)&&s(o.get(Qe)));break;case`set`:p(e)&&s(o.get(Ze))}}Pe()}function tt(e,t){let n=Xe.get(e);return n&&n.get(t)}function nt(e){let t=L(e);return t===e||(I(t,`iterate`,$e),Ht(e))?t:Vt(e)?Bt(e)?t.map(e=>Kt(Gt(e))):t.map(Kt):t.map(Gt)}function rt(e){return I(e=L(e),`iterate`,$e),e}function it(e,t){return Vt(e)?Kt(Bt(e)?Gt(t):t):Gt(t)}var at={__proto__:null,[Symbol.iterator](){return ot(this,Symbol.iterator,e=>it(this,e))},concat(...e){return nt(this).concat(...e.map(e=>f(e)?nt(e):e))},entries(){return ot(this,`entries`,e=>(e[1]=it(this,e[1]),e))},every(e,t){return lt(this,`every`,e,t,void 0,arguments)},filter(e,t){return lt(this,`filter`,e,t,e=>e.map(e=>it(this,e)),arguments)},find(e,t){return lt(this,`find`,e,t,e=>it(this,e),arguments)},findIndex(e,t){return lt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return lt(this,`findLast`,e,t,e=>it(this,e),arguments)},findLastIndex(e,t){return lt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return lt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return dt(this,`includes`,e)},indexOf(...e){return dt(this,`indexOf`,e)},join(e){return nt(this).join(e)},lastIndexOf(...e){return dt(this,`lastIndexOf`,e)},map(e,t){return lt(this,`map`,e,t,void 0,arguments)},pop(){return ft(this,`pop`)},push(...e){return ft(this,`push`,e)},reduce(e,...t){return ut(this,`reduce`,e,t)},reduceRight(e,...t){return ut(this,`reduceRight`,e,t)},shift(){return ft(this,`shift`)},some(e,t){return lt(this,`some`,e,t,void 0,arguments)},splice(...e){return ft(this,`splice`,e)},toReversed(){return nt(this).toReversed()},toSorted(e){return nt(this).toSorted(e)},toSpliced(...e){return nt(this).toSpliced(...e)},unshift(...e){return ft(this,`unshift`,e)},values(){return ot(this,`values`,e=>it(this,e))}};function ot(e,t,n){let r=rt(e),i=r[t],a=i.call(r);if(r!==e&&!Ht(e)){if(a[Symbol.toStringTag]===`Array Iterator`){let e=Object.create(Object.getPrototypeOf(a));return e.next=()=>st(a.next(),n),i!==ct[t]&&Object.defineProperties(e,{return:{get(){let e=a.return;return typeof e==`function`?e.bind(a):e}},throw:{get(){let e=a.throw;return typeof e==`function`?e.bind(a):e}}}),e}a._next=a.next,a.next=()=>st(a._next(),n)}return a}function st(e,t){return e.done||(e.value=t(e.value)),e}var ct=Array.prototype;function lt(e,t,n,r,i,a){let o=rt(e),s=o!==e&&!Ht(e),c=o[t];if(c!==ct[t]){let t=c.apply(e,a);return s?Gt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,it(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function ut(e,t,n,r){let i=rt(e),a=i!==e&&!Ht(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=it(e,t)),n.call(this,t,it(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?it(e,c):c}function dt(e,t,n){let r=L(e);I(r,`iterate`,$e);let i=r[t](...n);return(i===-1||i===!1)&&Ut(n[0])?(n[0]=L(n[0]),r[t](...n)):i}function ft(e,t,n=[]){Ue(),Ne();let r=L(e)[t].apply(e,n);return Pe(),We(),r}var pt=t(`__proto__,__v_isRef,__isVue`),mt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(v));function ht(e){v(e)||(e=String(e));let t=L(this);return I(t,`has`,e),t.hasOwnProperty(e)}var gt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Pt:Nt:i?Mt:jt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=f(e);if(!r){let e;if(a&&(e=at[t]))return e;if(t===`hasOwnProperty`)return ht}let o=Reflect.get(e,t,R(e)?e:n);if((v(t)?mt.has(t):pt(t))||(r||I(e,`get`,t),i))return o;if(R(o)){let e=a&&T(t)?o:o.value;return r&&y(e)?Rt(e):e}return y(o)?r?Rt(o):It(o):o}},_t=class extends gt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=f(e)&&T(t);if(!this._isShallow){let e=Vt(i);if(!Ht(n)&&!Vt(n)&&(i=L(i),n=L(n)),!a&&R(i)&&!R(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:d(e,t),s=Reflect.set(e,t,n,R(e)?e:r);return e===L(r)&&s&&(o?M(n,i)&&et(e,`set`,t,n,i):et(e,`add`,t,n)),s}deleteProperty(e,t){let n=d(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&et(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return v(t)&&mt.has(t)||I(e,`has`,t),n}ownKeys(e){return I(e,`iterate`,f(e)?`length`:Ze),Reflect.ownKeys(e)}},vt=class extends gt{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},yt=new _t,bt=new vt,xt=new _t(!0),St=e=>e,Ct=e=>Reflect.getPrototypeOf(e);function wt(e,t,n){return function(...r){let i=this.__v_raw,a=L(i),o=p(a),s=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?St:t?Kt:Gt;return!t&&I(a,`iterate`,l?Qe:Ze),c(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Tt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Et(e,t){let n={get(n){let r=this.__v_raw,i=L(r),a=L(n);e||(M(n,a)&&I(i,`get`,n),I(i,`get`,a));let{has:o}=Ct(i),s=t?St:e?Kt:Gt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&I(L(t),`iterate`,Ze),t.size},has(t){let n=this.__v_raw,r=L(n),i=L(t);return e||(M(t,i)&&I(r,`has`,t),I(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=L(a),s=t?St:e?Kt:Gt;return!e&&I(o,`iterate`,Ze),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return c(n,e?{add:Tt(`add`),set:Tt(`set`),delete:Tt(`delete`),clear:Tt(`clear`)}:{add(e){let n=L(this),r=Ct(n),i=L(e),a=!t&&!Ht(e)&&!Vt(e)?i:e;return r.has.call(n,a)||M(e,a)&&r.has.call(n,e)||M(i,a)&&r.has.call(n,i)||(n.add(a),et(n,`add`,a,a)),this},set(e,n){t||Ht(n)||Vt(n)||(n=L(n));let r=L(this),{has:i,get:a}=Ct(r),o=i.call(r,e);o||=(e=L(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?M(n,s)&&et(r,`set`,e,n,s):et(r,`add`,e,n),this},delete(e){let t=L(this),{has:n,get:r}=Ct(t),i=n.call(t,e);i||=(e=L(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&et(t,`delete`,e,void 0,a),o},clear(){let e=L(this),t=e.size!==0,n=e.clear();return t&&et(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=wt(r,e,t)}),n}function Dt(e,t){let n=Et(e,t);return(r,i,a)=>i===`__v_isReactive`?!e:i===`__v_isReadonly`?e:i===`__v_isShallow`?t:i===`__v_raw`?r:Reflect.get(d(n,i)&&i in r?n:r,i,a)}var Ot={get:Dt(!1,!1)},kt={get:Dt(!1,!0)},At={get:Dt(!0,!1)},jt=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap;function Ft(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function It(e){return Vt(e)?e:zt(e,!1,yt,Ot,jt)}function Lt(e){return zt(e,!1,xt,kt,Mt)}function Rt(e){return zt(e,!0,bt,At,Nt)}function zt(e,t,n,r,i){if(!y(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Ft(C(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Bt(e){return Vt(e)?Bt(e.__v_raw):!!(e&&e.__v_isReactive)}function Vt(e){return!!(e&&e.__v_isReadonly)}function Ht(e){return!!(e&&e.__v_isShallow)}function Ut(e){return e?!!e.__v_raw:!1}function L(e){let t=e&&e.__v_raw;return t?L(t):e}function Wt(e){return!d(e,`__v_skip`)&&Object.isExtensible(e)&&ne(e,`__v_skip`,!0),e}var Gt=e=>y(e)?It(e):e,Kt=e=>y(e)?Rt(e):e;function R(e){return e?e.__v_isRef===!0:!1}function z(e){return Jt(e,!1)}function qt(e){return Jt(e,!0)}function Jt(e,t){return R(e)?e:new Yt(e,t)}var Yt=class{constructor(e,t){this.dep=new Je,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:L(e),this._value=t?e:Gt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Ht(e)||Vt(e);e=n?e:L(e),M(e,t)&&(this._rawValue=e,this._value=n?e:Gt(e),this.dep.trigger())}};function Xt(e){return R(e)?e.value:e}function Zt(e){return g(e)?e():Xt(e)}var Qt={get:(e,t,n)=>t===`__v_raw`?e:Xt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return R(i)&&!R(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function $t(e){return Bt(e)?e:new Proxy(e,Qt)}var en=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new Je,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function tn(e){return new en(e)}function nn(e){let t=f(e)?Array(e.length):{};for(let n in e)t[n]=sn(e,n);return t}var rn=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=v(t)?t:String(t),this._raw=L(e);let r=!0,i=e;if(!f(e)||v(this._key)||!T(this._key))do r=!Ut(i)||Ht(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Xt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&R(this._raw[this._key])){let t=this._object[this._key];if(R(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tt(this._raw,this._key)}},an=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function on(e,t,n){return R(e)?e:g(e)?new an(e):y(e)&&arguments.length>1?sn(e,t,n):z(e)}function sn(e,t,n){return new rn(e,t,n)}var cn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Je(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ke-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&F!==this)return Me(this,!0),!0}get value(){let e=this.dep.track();return Re(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function ln(e,t,n=!1){let r,i;return g(e)?r=e:(r=e.get,i=e.set),new cn(r,i,n)}var un={},dn=new WeakMap,fn=void 0;function pn(e,t=!1,n=fn){if(n){let t=dn.get(n);t||dn.set(n,t=[]),t.push(e)}}function mn(e,t,r=n){let{immediate:a,deep:o,once:s,scheduler:c,augmentJob:u,call:d}=r,p=e=>o?e:Ht(e)||o===!1||o===0?hn(e,1):hn(e),m,h,_,v,y=!1,b=!1;if(R(e)?(h=()=>e.value,y=Ht(e)):Bt(e)?(h=()=>p(e),y=!0):f(e)?(b=!0,y=e.some(e=>Bt(e)||Ht(e)),h=()=>e.map(e=>{if(R(e))return e.value;if(Bt(e))return p(e);if(g(e))return d?d(e,2):e()})):h=g(e)?t?d?()=>d(e,2):e:()=>{if(_){Ue();try{_()}finally{We()}}let t=fn;fn=m;try{return d?d(e,3,[v]):e(v)}finally{fn=t}}:i,t&&o){let e=h,t=o===!0?1/0:o;h=()=>hn(e(),t)}let x=Ee(),S=()=>{m.stop(),x&&x.active&&l(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{try{return e(...t)}finally{S()}}}let C=b?Array(e.length).fill(un):un,w=e=>{if(m.flags&1&&(m.dirty||e)){if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>M(e,C[t])):M(n,C))){let e=fn;Ue();try{_&&_(),fn=m;let e=[n,C===un?void 0:b&&C[0]===un?[]:C,v];C=n,d?d(t,3,e):t(...e)}finally{fn=e,We()}}}else m.run()}};return u&&u(w),m=new Oe(h),m.scheduler=c?()=>c(w,!1):w,v=e=>pn(e,!1,m),_=m.onStop=()=>{let e=dn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();dn.delete(m)}},t?a?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function hn(e,t=1/0,n){if(t<=0||!y(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,R(e))hn(e.value,t,n);else if(f(e))for(let r=0;r<e.length;r++)hn(e[r],t,n);else if(m(e)||p(e))e.forEach(e=>{hn(e,t,n)});else if(w(e)){for(let r in e)hn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&hn(e[r],t,n)}return e}function gn(e,t,n,r){try{return r?e(...r):e()}catch(e){vn(e,t,n)}}function _n(e,t,n,r){if(g(e)){let i=gn(e,t,n,r);return i&&b(i)&&i.catch(e=>{vn(e,t,n,void 0,!0)}),i}if(f(e)){let i=[];for(let a=0;a<e.length;a++)i.push(_n(e[a],t,n,r));return i}}function vn(e,t,r,i=!0,a=!1){let o=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||n;if(t){let n=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${r}`;for(;n;){let t=n.ec;if(t&&!n.isUnmounted&&(!a||n.scope.active)){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}n=n.parent}if(s){Ue(),gn(s,null,10,[e,i,o]),We();return}}yn(e,r,o,i,c)}function yn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var B=[],bn=-1,xn=[],Sn=null,Cn=0,wn=Promise.resolve(),Tn=null;function En(e){let t=Tn||wn;return e?t.then(this?e.bind(this):e):t}function Dn(e){let t=bn+1,n=B.length;for(;t<n;){let r=t+n>>>1,i=B[r],a=Fn(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function On(e){if(!(e.flags&1)){let t=Fn(e),n=B[B.length-1];!n||!(e.flags&2)&&t>=Fn(n)?B.push(e):B.splice(Dn(t),0,e),e.flags|=1,kn()}}function kn(){Tn||=wn.then(In)}function An(e){if(!f(e))Sn&&e.id===-1?Sn.splice(Cn+1,0,e):e.flags&1||(xn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)xn.push(e[t]);kn()}function jn(e,t,n,r=bn+1){for(;r<B.length;r++){let n=B[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;B.splice(r,1),r=e?r-1:bn,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Mn(e,t,n=0){if(xn.length){let e=xn,r=0;if(t){e=[];for(let i=0;i<xn.length;i++){let a=xn[i];(a.i===void 0?t.has(a):!a.i||a.i.uid<n)?xn[r++]=a:e.push(a)}}let i=[...new Set(e)].sort((e,t)=>Fn(e)-Fn(t));if(xn.length=r,Sn){for(let e=0;e<i.length;e++)Sn.push(i[e]);return}for(Sn=i,Cn=0;Cn<Sn.length;Cn++){let e=Sn[Cn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Sn=null,Cn=0}}var Nn=!1;function Pn(e,t){if(Nn){e();return}let n=t===void 0?void 0:new Set(xn);e(),Nn=!0;try{jn(void 0,t),Mn(void 0,n,t)}finally{Nn=!1}}var Fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function In(e){try{for(bn=0;bn<B.length;bn++){let e=B[bn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),gn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;bn<B.length;bn++){let e=B[bn];e&&(e.flags&=-2)}bn=-1,B.length=0,Mn(e),Tn=null,(B.length||xn.length)&&In(e)}}var V=null,Ln=null;function Rn(e){let t=V;return V=e,Ln=e&&e.type.__scopeId||null,t}function zn(e){Ln=e}function Bn(){Ln=null}var Vn=e=>Hn;function Hn(e,t=V,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&_a(-1);let i=Rn(t),a=fa.length,o;try{o=e(...n)}finally{for(let e=fa.length;e>a;e--)ha();Rn(i),r._d&&_a(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Un(e,t){if(V===null)return e;let r=to(V),i=e.dirs||=[];for(let e=0;e<t.length;e++){let[a,o,s,c=n]=t[e];a&&(g(a)&&(a={mounted:a,updated:a}),a.deep&&hn(o),i.push({dir:a,instance:r,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function Wn(e,t,n,r){let i=e;if(r===`beforeMount`)e._mount=e;else if(r===`beforeUpdate`){let n=t&&t._mount;n&&(n._latest=e,e._mount=n)}else if(r===`mounted`){let t=e._latest;e._mount=e._latest=void 0,t&&(i=t,t._mount=void 0)}let a=i.dirs,o=t&&t.dirs;for(let s=0;s<a.length;s++){let l=a[s];o?l.oldValue=o[s].value:r===`mounted`&&l.oldValue!==void 0&&(l=c({},l,{oldValue:void 0}));let u=l.dir[r];u&&(Ue(),_n(u,n,8,[e.el,l,i,t]),We())}}function Gn(e,t){if(K){let n=K.provides,r=K.parent&&K.parent.provides;r===n&&(n=K.provides=Object.create(r)),n[e]=t}}function Kn(e,t,n=!1){let r=Va();if(r||_i){let i=_i?_i._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&g(t)?t.call(r&&r.proxy):t}}var qn=Symbol.for(`v-scx`),Jn=()=>Kn(qn);function Yn(e,t){return Qn(e,null,t)}function Xn(e,t){return Qn(e,null,{flush:`sync`})}function Zn(e,t,n){return Qn(e,t,n)}function Qn(e,t,r=n){let{immediate:a,deep:o,flush:s,once:l}=r,u=c({},r),d=t&&a||!t&&s!==`post`,f;if(qa){if(s===`sync`){let e=Jn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}}let p=K;u.call=(e,t,n)=>_n(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{e.i=p,U(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():On(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=mn(e,t,u);return qa&&(f?f.push(h):d&&h()),h}function $n(e,t,n){let r=this.proxy,i=_(e)?e.includes(`.`)?er(r,e):()=>r[e]:e.bind(r,r),a;g(t)?a=t:(a=t.handler,n=t);let o=Wa(this),s=Qn(i,a.bind(r),n);return o(),s}function er(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var tr=Symbol(`_vte`),nr=e=>e.__isTeleport,rr=Symbol(`_leaveCb`);function ir(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ua){t=n;break}}return t}function ar(e){if(!gr(e))return nr(e.type)&&e.children?ir(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&g(n.default))return n.default()}}function or(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;or(nr(n.type)&&ar(n)||n,t)}else if(e.shapeFlag&128){let n=e.suspense;if(n){let e=n.isHydrating?n.pendingBranch:n.activeBranch;e&&or(e,t.clone(e))}else e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)}else if(e.transition=t,e.type===W&&f(e.children)){let n=Ti(e.children,!1);n&&or(n,t)}}function sr(e){if(e.component)return sr(e.component.subTree);if(e.type===W){let t=f(e.children)&&Ti(e.children,!1);return t?sr(t):void 0}if(e.type!==ua)return e}function cr(e,t){return g(e)?c({name:e.name},t,{setup:e}):e}function lr(){let e=Va();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+e.ids[1]++:``}function ur(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function dr(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var fr=new WeakMap;function pr(e,t,r,i,o=!1){if(f(e)){e.forEach((e,n)=>pr(e,t&&(f(t)?t[n]:t),r,i,o));return}if(hr(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&pr(e,t,r,i.component.subTree);return}let s=i.shapeFlag&4?to(i.component):i.el,c=o?null:s,{i:u,r:p}=e,m=t&&t.r,h=u.refs===n?u.refs={}:u.refs,v=u.setupState,y=L(v),b=v===n?a:e=>!dr(h,e)&&d(y,e),x=(e,t)=>!(t&&dr(h,t));if(m!=null&&m!==p){if(mr(t),_(m))h[m]=null,b(m)&&(v[m]=null);else if(R(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(g(p))gn(p,u,12,[c,h]);else{let t=_(p),n=R(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:h[p]:x(p)||!e.k?p.value:h[e.k];if(o)f(n)&&l(n,s);else if(f(n))n.includes(s)||n.push(s);else if(t)h[p]=[s],b(p)&&(v[p]=h[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(h[e.k]=t)}}else t?(h[p]=c,b(p)&&(v[p]=c)):n&&(x(p,e.k)&&(p.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),fr.delete(e)};t.id=-1,fr.set(e,t),U(t,r)}else mr(e),i()}}}function mr(e){let t=fr.get(e);t&&(t.flags|=8,fr.delete(e))}ae().requestIdleCallback,ae().cancelIdleCallback;var hr=e=>!!e.type.__asyncLoader,gr=e=>e.type.__isKeepAlive;function _r(e,t){yr(e,`a`,t)}function vr(e,t){yr(e,`da`,t)}function yr(e,t,n=K){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(xr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)gr(e.parent.vnode)&&br(r,t,n,e),e=e.parent}}function br(e,t,n,r){let i=xr(t,e,r,!0),a=xr(`um`,()=>l(r[t],i),n);a.flags=16}function xr(e,t,n=K,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ue();let i=Wa(n),a=_n(t,n,e,r);return i(),We(),a};return r?i.unshift(a):i.push(a),a}}var Sr=e=>(t,n=K)=>{qa&&e!==`sp`||xr(e,(...e)=>t(...e),n)},Cr=Sr(`bm`),wr=Sr(`m`),Tr=Sr(`bu`),Er=Sr(`u`),Dr=Sr(`bum`),Or=Sr(`um`),kr=Sr(`sp`),Ar=Sr(`rtg`),jr=Sr(`rtc`);function Mr(e,t=K){xr(`ec`,e,t)}var Nr=`components`,Pr=`directives`;function Fr(e,t){return zr(Nr,e,!0,t)||e}var Ir=Symbol.for(`v-ndc`);function Lr(e){return _(e)?zr(Nr,e,!1)||e:e||Ir}function Rr(e){return zr(Pr,e)}function zr(e,t,n=!0,r=!1){let i=V||K;if(i){let n=i.type;if(e===Nr){let e=no(n,!1);if(e&&(e===t||e===k(t)||e===ee(k(t))))return n}let a=Br(i[e]||n[e],t)||Br(i.appContext[e],t);return!a&&r?n:a}}function Br(e,t){return e&&(e[t]||e[k(t)]||e[ee(k(t))])}function Vr(e,t,n,r){let i,a=n&&n[r],o=f(e);if(o||_(e)){let n=o&&Bt(e),r=!1,s=!1;n&&(r=!Ht(e),s=Vt(e),e=rt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Kt(Gt(e[n])):Gt(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){if(!Number.isInteger(e)||e<0)i=[];else{i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}}else if(y(e)){if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}}else i=[];return n&&(n[r]=i),i}function Hr(e,t,n,r,i,a){if(n??={},V.ce||V.parent&&hr(V.parent)&&V.parent.ce){let e=a!=null&&n.key==null?c({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),ma(),ba(W,null,[G(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=fa.length;ma();let l;try{let i=o&&Ur(o(n)),s=n.key||a||i&&i.key;l=ba(W,{key:(s&&!v(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=fa.length;e>s;e--)ha();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function Ur(e){return e.some(e=>!xa(e)||!(e.type===ua||e.type===W&&!Ur(e.children)))?e:null}function Wr(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:te(r)]=e[r];return n}var Gr=e=>e?Ka(e)?to(e):Gr(e.parent):null,Kr=c(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=>Gr(e.parent),$root:e=>Gr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ai(e),$forceUpdate:e=>e.f||=()=>{On(e.update)},$nextTick:e=>e.n||=En.bind(e.proxy),$watch:e=>$n.bind(e)}),qr=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),Jr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return o[t]}else if(qr(i,t))return s[t]=1,i[t];else if(a!==n&&d(a,t))return s[t]=2,a[t];else if(d(o,t))return s[t]=3,o[t];else if(r!==n&&d(r,t))return s[t]=4,r[t];else ei&&(s[t]=0)}let u=Kr[t],f,p;if(u)return t===`$attrs`&&I(e.attrs,`get`,``),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(r!==n&&d(r,t))return s[t]=4,r[t];if(p=l.config.globalProperties,d(p,t))return p[t]},set({_:e},t,r){let{data:i,setupState:a,ctx:o}=e;return qr(a,t)?(a[t]=r,!0):i!==n&&d(i,t)?(i[t]=r,!0):d(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==n&&c[0]!==`$`&&d(e,c)||qr(t,c)||d(o,c)||d(i,c)||d(Kr,c)||d(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?d(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Yr(){return Zr(`useSlots`).slots}function Xr(){return Zr(`useAttrs`).attrs}function Zr(e){let t=Va();return t.setupContext||=eo(t)}function Qr(e){return f(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function $r(e,t){return!e||!t?e||t:f(e)&&f(t)?e.concat(t):c({},Qr(e),Qr(t))}var ei=!0;function ti(e){let t=ai(e),n=e.proxy,r=e.ctx;ei=!1,t.beforeCreate&&ri(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:h,updated:_,activated:v,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:ee,directives:te,filters:M}=t;if(u&&ni(u,r,null),s)for(let e in s){let t=s[e];g(t)&&(r[e]=t.bind(n))}if(a){let t=a.call(n,n);y(t)&&(e.data=It(t))}if(ei=!0,o)for(let e in o){let t=o[e],a=io({get:g(t)?t.bind(n,n):g(t.get)?t.get.bind(n,n):i,set:!g(t)&&g(t.set)?t.set.bind(n):i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)ii(c[e],r,n,e);if(l){let e=g(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Gn(t,e[t])})}d&&ri(d,e,`c`);function N(e,t){f(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(N(Cr,p),N(wr,m),N(Tr,h),N(Er,_),N(_r,v),N(vr,b),N(Mr,O),N(jr,E),N(Ar,D),N(Dr,S),N(Or,w),N(kr,k),f(A)){if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}T&&e.render===i&&(e.render=T),j!=null&&(e.inheritAttrs=j),ee&&(e.components=ee),te&&(e.directives=te),k&&ur(e)}function ni(e,t,n=i){f(e)&&(e=ui(e));for(let n in e){let r=e[n],i;i=y(r)?`default`in r?Kn(r.from||n,r.default,!0):Kn(r.from||n):Kn(r),R(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function ri(e,t,n){_n(f(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function ii(e,t,n,r){let i=r.includes(`.`)?er(n,r):()=>n[r];if(_(e)){let n=t[e];g(n)&&Zn(i,n)}else if(g(e))Zn(i,e.bind(n));else if(y(e)){if(f(e))e.forEach(e=>ii(e,t,n,r));else{let r=g(e.handler)?e.handler.bind(n):t[e.handler];g(r)&&Zn(i,r,e)}}}function ai(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>oi(c,e,o,!0)),oi(c,t,o)),y(t)&&a.set(t,c),c}function oi(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&oi(e,a,n,!0),i&&i.forEach(t=>oi(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=si[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var si={data:ci,props:fi,emits:fi,methods:di,computed:di,beforeCreate:H,created:H,beforeMount:H,mounted:H,beforeUpdate:H,updated:H,beforeDestroy:H,beforeUnmount:H,destroyed:H,unmounted:H,activated:H,deactivated:H,errorCaptured:H,serverPrefetch:H,components:di,directives:di,watch:pi,provide:ci,inject:li};function ci(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function li(e,t){return di(ui(e),ui(t))}function ui(e){if(f(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function H(e,t){return e?[...new Set([].concat(e,t))]:t}function di(e,t){return e?c(Object.create(null),e,t):t}function fi(e,t){return e?f(e)&&f(t)?[...new Set([...e,...t])]:c(Object.create(null),Qr(e),Qr(t??{})):t}function pi(e,t){if(!e)return t;if(!t)return e;let n=c(Object.create(null),e);for(let r in t)n[r]=H(e[r],t[r]);return n}function mi(){return{app:null,config:{isNativeTag:a,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var hi=0;function gi(e,t){return function(n,r=null){g(n)||(n=c({},n)),r!=null&&!y(r)&&(r=null);let i=mi(),a=new WeakSet,o=[],s=!1,l=i.app={_uid:hi++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:oo,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&g(e.install)?(a.add(e),e.install(l,...t)):g(e)&&(a.add(e),e(l,...t))),l},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),l},component(e,t){return t?(i.components[e]=t,l):i.components[e]},directive(e,t){return t?(i.directives[e]=t,l):i.directives[e]},mount(a,o,c){if(!s){let u=l._ceVNode||G(n,r);return u.appContext=i,c===!0?c=`svg`:c===!1&&(c=void 0),o&&t?t(u,a):e(u,a,c),s=!0,l._container=a,a.__vue_app__=l,to(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(_n(o,l._instance,16),e(null,l._container),delete l._container.__vue_app__)},provide(e,t){return i.provides[e]=t,l},runWithContext(e){let t=_i;_i=l;try{return e()}finally{_i=t}}};return l}}var _i=null;function vi(e,t,r=n){let i=Va(),a=k(t),o=j(t),s=yi(e,a),c=tn((s,c)=>{let l,u=n,d;return Xn(()=>{let t=e[a];M(l,t)&&(l=t,c())}),{get(){return s(),r.get?r.get(l):l},set(e){let s=r.set?r.set(e):e;if(!M(s,l)&&!(u!==n&&M(e,u)))return;let f=i.vnode.props,p=!!(f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f));p||(l=e,c()),i.emit(`update:${t}`,s),M(e,u)&&(M(e,s)&&!M(s,d)||p&&u!==n&&!M(s,l))&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||n:c,done:!1}:{done:!0}}}},c}var yi=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${j(t)}Modifiers`];function bi(e,t,...r){if(e.isUnmounted)return;let i=e.vnode.props||n,a=r,o=t.startsWith(`update:`),s=o&&yi(i,t.slice(7));s&&(s.trim&&(a=r.map(e=>_(e)?e.trim():e)),s.number&&(a=a.map(re)));let c,l=i[c=te(t)]||i[c=te(k(t))];!l&&o&&(l=i[c=te(j(t))]),l&&_n(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,_n(u,e,6,a)}}var xi=new WeakMap;function Si(e,t,n=!1){let r=n?xi:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!g(e)){let r=e=>{let n=Si(e,t,!0);n&&(s=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(y(e)&&r.set(e,null),null):(f(a)?a.forEach(e=>o[e]=null):c(o,a),y(e)&&r.set(e,o),o)}function Ci(e,t){return!e||!o(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),d(e,t[0].toLowerCase()+t.slice(1))||d(e,j(t))||d(e,t))}function wi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Rn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ma(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ma(e.length>1?e(f,{attrs:c,slots:o,emit:l}):e(f,null)),y=t.props?c:Ei(c)}}catch(t){fa.length=0,vn(t,e,1),v=G(ua)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(s)&&(y=Di(y,a)),b=Oa(b,y,!1,!0))}return n.dirs&&(b=Oa(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&or(nr(b.type)&&ar(b)||b,n.transition),v=b,Rn(_),v}function Ti(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(xa(r)){if(r.type!==ua||r.children===`v-if`){if(n)return;n=r}}else return}return n}var Ei=e=>{let t;for(let n in e)(n===`class`||n===`style`||o(n))&&((t||={})[n]=e[n]);return t},Di=(e,t)=>{let n={};for(let r in e)s(r)&&r.slice(9)in t||(n[r]=e[r]);return n};function Oi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?ki(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ai(o,r,n)&&!Ci(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||ki(r,o,l):!!o;return!1}function ki(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(!d(e,a)||Ai(t,e,a)&&!Ci(n,a))return!0}return!1}function Ai(e,t,n){let r=e[n],i=t[n];return n===`style`&&y(r)&&y(i)?!ye(r,i):r!==i}function ji({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var Mi={},Ni=()=>Object.create(Mi),Pi=e=>Object.getPrototypeOf(e)===Mi;function Fi(e,t,n,r=!1){let i={},a=Ni();e.propsDefaults=Object.create(null),Li(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Lt(i):e.type.props?i:a,e.attrs=a}function Ii(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=L(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(Ci(e.emitsOptions,o))continue;let u=t[o];if(c){if(d(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=k(o);i[t]=Ri(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Li(e,t,i,a)&&(l=!0);let r;for(let a in s)t&&(d(t,a)||(r=j(a))!==a&&d(t,r))||(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Ri(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)t&&d(t,e)||(delete a[e],l=!0)}l&&et(e.attrs,`set`,``)}function Li(e,t,r,i){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let n in t){if(E(n))continue;let l=t[n],u;a&&d(a,u=k(n))?!o||!o.includes(u)?r[u]=l:(c||={})[u]=l:Ci(e.emitsOptions,n)||n in i&&l===i[n]||(i[n]=l,s=!0)}if(o){let t=L(r),i=c||n;for(let n=0;n<o.length;n++){let s=o[n];r[s]=Ri(a,t,s,i[s],e,!d(i,s))}}return s}function Ri(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=d(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&g(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=Wa(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===j(n))&&(r=!0))}return r}var zi=new WeakMap;function Bi(e,t,i=!1){let a=i?zi:t.propsCache,o=a.get(e);if(o)return o;let s=e.props,l={},u=[],p=!1;if(!g(e)){let n=e=>{p=!0;let[n,r]=Bi(e,t,!0);c(l,n),r&&u.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!p)return y(e)&&a.set(e,r),r;if(f(s))for(let e=0;e<s.length;e++){let t=k(s[e]);Vi(t)&&(l[t]=n)}else if(s)for(let e in s){let t=k(e);if(Vi(t)){let n=s[e],r=l[t]=f(n)||g(n)?{type:n}:c({},n),i=r.type,a=!1,o=!0;if(f(i))for(let e=0;e<i.length;++e){let t=i[e],n=g(t)&&t.name;if(n===`Boolean`){a=!0;break}n===`String`&&(o=!1)}else a=g(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||d(r,`default`))&&u.push(t)}}let m=[l,u];return y(e)&&a.set(e,m),m}function Vi(e){return e[0]!==`$`&&!E(e)}var Hi=e=>e===`_`||e===`_ctx`||e===`$stable`,Ui=e=>f(e)?e.map(Ma):[Ma(e)],Wi=(e,t,n)=>{if(t._n)return t;let r=Hn((...e)=>Ui(t(...e)),n);return r._c=!1,r},Gi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Hi(n))continue;let i=e[n];if(g(i))t[n]=Wi(n,i,r);else if(i!=null){let e=Ui(i);t[n]=()=>e}}},Ki=(e,t)=>{let n=Ui(t);e.slots.default=()=>n},qi=(e,t,n)=>{for(let r in t)(n||!Hi(r))&&(e[r]=t[r])},Ji=(e,t,n)=>{let r=e.slots=Ni();if(e.vnode.shapeFlag&32){let e=t._;e?(qi(r,t,n),n&&ne(r,`_`,e,!0)):Gi(t,r)}else t&&Ki(e,t)},Yi=(e,t,r)=>{let{vnode:i,slots:a}=e,o=!0,s=n;if(i.shapeFlag&32){let e=t._;e?r&&e===1?o=!1:qi(a,t,r):(o=!t.$stable,Gi(t,a)),s=t}else t&&(Ki(e,t),s={default:1});if(o)for(let e in a)!Hi(e)&&s[e]==null&&delete a[e]},U=ca;function Xi(e){return Zi(e)}function Zi(e,t){let a=ae();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=i,insertStaticContent:_}=e,v=(e,t,n,i=null,a=null,o=null,s=void 0,c=null,l=!!t.dynamicChildren)=>{if(e===t)return;e&&!Sa(e,t)&&(i=he(e),ue(e,a,o,!0),e=null),t.patchFlag===-2&&(l=!1,t.dynamicChildren=null),t.dynamicChildren&&e&&e.dynamicChildren&&e.dynamicChildren.hasOnce&&(t.dynamicChildren===r&&(t.dynamicChildren=[]),t.dynamicChildren.hasOnce=!0);let{type:u,ref:d,shapeFlag:f}=t;switch(u){case la:y(e,t,n,i);break;case ua:b(e,t,n,i);break;case da:e??x(t,n,i,s);break;case W:ee(e,t,n,i,a,o,s,c,l);break;default:f&1?w(e,t,n,i,a,o,s,c,l):f&6?te(e,t,n,i,a,o,s,c,l):(f&64||f&128)&&u.process(e,t,n,i,a,o,s,c,l,_e)}d!=null&&a?pr(d,e&&e.ref,o,t||e,!t):d==null&&e&&e.ref!=null&&pr(e.ref,null,o,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,Qi(e,a),s,u),_&&Wn(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!E(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Ia(f,r,e)}_&&Wn(e,null,r,`beforeMount`);let v=ea(i,g);v?g.beforeEnter(d):g&&!g.persisted&&(d[sa]=!0),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&U(()=>{try{f&&Ia(f,r,e),v&&g.enter(d),_&&Wn(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||oa(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;D(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},O=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Na(e[l]):Ma(e[l]);v(null,c,t,n,r,i,a,o,s)}},k=(e,t,r,i,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||n,h=t.props||n,g;if(r&&$i(r,!1),(g=h.onVnodeBeforeUpdate)&&Ia(g,r,t,e),f&&Wn(t,e,r,`beforeUpdate`),r&&$i(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,Qi(t,a),o):s||oe(e,t,l,null,r,i,Qi(t,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t],i=m[n],o=h[n];(o!==i||n===`value`)&&c(l,n,i,o,a,r)}}u&1&&e.children!==t.children&&p(l,t.children)}else!s&&d==null&&j(l,m,h,r,a);((g=h.onVnodeUpdated)||f)&&U(()=>{g&&Ia(g,r,t,e),f&&Wn(t,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s],u=c.el||aa(c),d=u&&(c.type===W||!Sa(c,l)||c.shapeFlag&198)?m(u):n;v(c,l,d,null,r,i,a,o,!0)}},j=(e,t,r,i,a)=>{if(t!==r){if(t!==n)for(let n in t)!E(n)&&!(n in r)&&c(e,n,t[n],null,a,i);for(let n in r){if(E(n))continue;let o=r[n],s=t[n];o!==s&&n!==`value`&&c(e,n,s,o,a,i)}`value`in r&&c(e,`value`,t.value,r.value,a)}},ee=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&ta(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},te=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):M(t,n,r,i,a,o,c):ne(e,t,c)},M=(e,t,n,r,i,a,o)=>{let s=e.component=Ba(e,r,i);if(gr(e)&&(s.ctx.renderer=_e),Ja(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,re,o,a),!e.el){let r=s.subTree=G(ua);b(null,r,t,n),e.placeholder=r.el}}else re(s,e,t,n,i,a,o)},ne=(e,t,n)=>{let r=t.component=e.component;if(Oi(e,t,n)){if(r.asyncDep&&!r.asyncResolved){t.el=e.el,t.placeholder=e.placeholder,ie(r,t,n);return}r.next=t,r.update()}else t.el=e.el,t.placeholder=e.placeholder,r.vnode=t},re=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=ra(e);if(n){t&&(t.el=c.el,ie(e,t,o)),n.asyncDep.then(()=>{let t=()=>{e.job.flags&8||(i&&i.pendingBranch?U(t,i):l())};t.flags=48,U(t,i)});return}}let u=t,d;$i(e,!1),t?(t.el=c.el,ie(e,t,o)):t=c,n&&N(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Ia(d,s,t,c),$i(e,!0);let f=wi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el||aa(p)),he(p),e,i,a),t.el=f.el,u===null&&ji(e,f.el),r&&U(r,i),(d=t.props&&t.props.onVnodeUpdated)&&U(()=>Ia(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=hr(t);if($i(e,!1),l&&N(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Ia(o,d,t),$i(e,!0),s&&ye){let t=()=>{e.subTree=wi(e),ye(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=wi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&U(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;U(()=>Ia(o,d,e),i)}(t.shapeFlag&256||d&&hr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&U(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Oe(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>On(u),$i(e,!0),l()},ie=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ii(e,t.props,r,n),Yi(e,t.children,n),Ue(),jn(e),We()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}if(f&256){se(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&me(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):me(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},se=(e,t,n,i,a,o,s,c,l)=>{e||=r,t||=r;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;p<f;p++){let r=t[p]=l?Na(t[p]):Ma(t[p]);v(e[p],r,n,null,a,o,s,c,l)}u>d?me(e,a,o,!0,!1,f):O(t,n,i,a,o,s,c,l,f)},ce=(e,t,n,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?Na(t[u]):Ma(t[u]);if(Sa(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?Na(t[p]):Ma(t[p]);if(Sa(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,r=e<d?t[e].el:i;for(;u<=p;)v(null,t[u]=l?Na(t[u]):Ma(t[u]),n,r,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)ue(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Na(t[u]):Ma(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){ue(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Sa(r,t[_])){i=_;break}i===void 0?ue(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?na(C):r;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,r=t[e],f=t[e+1],p=e+1<d?f.el||aa(f):i;C[u]===0?v(null,r,n,p,a,o,s,c,l):x&&(_<0||u!==w[_]?le(r,n,p,2):_--)}}},le=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6)le(e.component.subTree,t,n,r);else if(d&128)e.suspense.move(t,n,r);else if(d&64)c.move(e,t,n,_e);else if(c===W){o(a,t,n);for(let e=0;e<u.length;e++)le(u[e],t,n,r);o(e.anchor,t,n)}else if(c===da)S(e,t,n);else if(r!==2&&d&1&&l){if(r===0)l.persisted&&!a[rr]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),U(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[rr];a._isLeaving&&a[rr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},ue=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if((d===-2||l&&l.hasOnce)&&(i=!1),s!=null&&(Ue(),pr(s,null,n,e,!0),We()),p==null||e.ctx&&e.ctx!==t||(t.renderCache[p]=void 0),u&256&&t.ctx.deactivate(e))return;let h=u&1&&f,g=!hr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Ia(_,t,e),u&6)pe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Wn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,_e,r):l&&!l.hasOnce&&(a!==W||d>0&&d&64)?me(l,t,n,!1,!0):(a===W&&d&384||!i&&u&16)&&me(c,t,n),r&&de(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&U(()=>{_&&Ia(_,t,e),h&&Wn(e,null,t,`unmounted`),v&&(e.el=null)},n)},de=e=>{let{type:t,el:n,anchor:r,transition:i}=e,a=t===W;if(a&&!i){fe(n,r);return}if(t===da){C(e),i&&!i.persisted&&i.afterLeave&&i.afterLeave();return}let o=a?sr(e):e,c=()=>{a?m(n)&&fe(n,r):s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(o&&o.shapeFlag&1&&i&&!i.persisted){let{leave:e,delayLeave:t}=i,n=o.el,r=()=>e(n,c);t?t(n,c,r):r()}else c()},fe=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},pe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;ia(c),ia(l),r&&N(r),i.stop(),a?(a.flags|=8,ue(o,e,t,n)):o&&(o.transition=e.vnode.transition,ue(o,e,t,n)),s&&U(s,t);let u=()=>{e.isUnmounted=!0};u.flags=16,U(u,t)},me=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)ue(e[o],t,n,r,i)},he=e=>{if(e.shapeFlag&6)return he(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[tr];return n?h(n):t},ge=(e,t,n)=>{Pn(()=>{e==null?t._vnode&&ue(t._vnode,null,null,!0):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e},e&&t._vnode?void 0:e&&e.component?e.component.uid:za())},_e={p:v,um:ue,m:le,r:de,mt:M,mc:O,pc:oe,pbc:A,n:he,o:e},ve,ye;return t&&([ve,ye]=t(_e)),{render:ge,hydrate:ve,createApp:gi(ge,ve)}}function Qi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function $i({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ea(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ta(e,t,n=!1){let r=e.children,i=t.children;if(f(r)&&f(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=Na(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&ta(t,a)),a.type===la&&(a.patchFlag===-1&&(a=i[e]=Na(a)),a.el=t.el),a.type===ua&&!a.el&&(a.el=t.el)}}function na(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function ra(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ra(t)}function ia(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function aa(e){if(e.placeholder)return e.placeholder;let t=e.component;if(t)return aa(t.subTree);let n=e.suspense;return n&&n.activeBranch?aa(n.activeBranch):null}var oa=e=>e.__isSuspense,sa=Symbol(`_deferredEnter`);function ca(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):An(e)}var W=Symbol.for(`v-fgt`),la=Symbol.for(`v-txt`),ua=Symbol.for(`v-cmt`),da=Symbol.for(`v-stc`),fa=[],pa=null;function ma(e=!1){fa.push(pa=e?null:[])}function ha(){fa.pop(),pa=fa[fa.length-1]||null}var ga=1;function _a(e,t=!1){ga+=e,e<0&&pa&&t&&(pa.hasOnce=!0)}function va(e){return e.dynamicChildren=ga>0?pa||r:null,ha(),ga>0&&pa&&pa.push(e),e}function ya(e,t,n,r,i,a){return va(Ta(e,t,n,r,i,a,!0))}function ba(e,t,n,r,i){return va(G(e,t,n,r,i,!0))}function xa(e){return e?e.__v_isVNode===!0:!1}function Sa(e,t){return e.type===t.type&&e.key===t.key}var Ca=({key:e})=>e??null,wa=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:_(e)||R(e)||g(e)?{i:V,r:e,k:t,f:!!n}:e);function Ta(e,t=null,n=null,r=0,i=null,a=e===W?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ca(t),ref:t&&wa(t),scopeId:Ln,slotScopeIds:null,children:n,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:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:V};return s?(Pa(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=_(n)?8:16),ga>0&&!o&&pa&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&pa.push(c),c}var G=Ea;function Ea(e,t=null,n=null,r=0,i=null,a=!1){if(e&&e!==Ir||(e=ua),xa(e)){let r=Oa(e,t,!0);return n&&Pa(r,n),ga>0&&!a&&pa&&(r.shapeFlag&6?pa[pa.indexOf(e)]=r:pa.push(r)),r.patchFlag=-2,r}if(ro(e)&&(e=e.__vccOpts),t){t=Da(t);let{class:e,style:n}=t;e&&!_(e)&&(t.class=de(e)),y(n)&&(Ut(n)&&!f(n)&&(n=c({},n)),t.style=oe(n))}let o=_(e)?1:oa(e)?128:nr(e)?64:y(e)?4:g(e)?2:0;return Ta(e,t,n,r,i,o,a,!0)}function Da(e){return e?Ut(e)?c({},e):Pi(e)?c({},e[Qa]||e):e:null}function Oa(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Fa(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Ca(l),ref:t&&t.ref?n&&a?f(a)?a.concat(wa(t)):[a,wa(t)]:wa(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==W?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Oa(e.ssContent),ssFallback:e.ssFallback&&Oa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return c&&r&&or(u,c.clone(u)),u}function ka(e=` `,t=0){return G(la,null,e,t)}function Aa(e,t){let n=G(da,null,e);return n.staticCount=t,n}function ja(e=``,t=!1){return t?(ma(),ba(ua,null,e)):G(ua,null,e)}function Ma(e){return e==null||typeof e==`boolean`?G(ua):f(e)?G(W,null,e.slice()):xa(e)?Na(e):G(la,null,String(e))}function Na(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Oa(e)}function Pa(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(f(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Pa(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Pi(t)?t._ctx=V:r===3&&V&&(V.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(g(t)){if(r&65){Pa(e,{default:t});return}t={default:t,_ctx:V},n=32}else t=String(t),r&64?(n=16,t=[ka(t)]):n=8;e.children=t,e.shapeFlag|=n}function Fa(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=de([t.class,r.class]));else if(e===`style`)t.style=oe([t.style,r.style]);else if(o(e)){let n=t[e],i=r[e];i&&n!==i&&!(f(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!s(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Ia(e,t,n,r=null){_n(e,t,7,[n,r])}var La=mi(),Ra=0;function za(){return Ra}function Ba(e,t,r){let i=e.type,a=(t?t.appContext:e.appContext)||La,o={uid:Ra++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Te(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Bi(i,a),emitsOptions:Si(i,a),emit:null,emitted:null,propsDefaults:n,inheritAttrs:i.inheritAttrs,ctx:n,data:n,props:n,attrs:n,slots:n,refs:n,setupState:n,setupContext:null,suspense:r,suspenseId:r?r.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=bi.bind(null,o),e.ce&&e.ce(o),o}var K=null,Va=()=>K||V,Ha,Ua;{let e=ae(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ha=t(`__VUE_INSTANCE_SETTERS__`,e=>K=e),Ua=t(`__VUE_SSR_SETTERS__`,e=>qa=e)}var Wa=e=>{let t=K;return Ha(e),e.scope.on(),()=>{e.scope.off(),Ha(t)}},Ga=()=>{K&&K.scope.off(),Ha(null)};function Ka(e){return e.vnode.shapeFlag&4}var qa=!1;function Ja(e,t=!1,n=!1){t&&Ua(t);let{props:r,children:i}=e.vnode,a=Ka(e);Fi(e,r,a,t),Ji(e,i,n||t);let o=a?Ya(e,t):void 0;return t&&Ua(!1),o}function Ya(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Jr);let{setup:r}=n;if(r){Ue();let n=e.setupContext=r.length>1?eo(e):null,i=Wa(e),a=gn(r,e,0,[e.props,n]),o=b(a);if(We(),i(),(o||e.sp)&&!hr(e)&&ur(e),o){if(a.then(Ga,Ga),t)return a.then(n=>{Ua(!0);try{Xa(e,n,t)}finally{Ua(!1)}}).catch(t=>{vn(t,e,0,void 0,!0),e.ssrRender=(e,t)=>t(`<!---->`)});e.asyncDep=a}else Xa(e,a,t)}else Za(e,t)}function Xa(e,t,n){g(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:y(t)&&(e.setupState=$t(t)),Za(e,n)}function Za(e,t,n){let r=e.type;e.render||=r.render||i;{let t=Wa(e);Ue();try{ti(e)}finally{We(),t()}}}var Qa=Symbol(),$a={get(e,t){return I(e,`get`,``),t===Qa?e:e[t]}};function eo(e){return{attrs:new Proxy(e.attrs,$a),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function to(e){return e.exposed?e.exposeProxy||=new Proxy($t(Wt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Kr)return Kr[n](e)},has(e,t){return t in e||t in Kr}}):e.proxy}function no(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}function ro(e){return g(e)&&`__vccOpts`in e}var io=(e,t)=>ln(e,t,qa);function ao(e,t,n){try{_a(-1);let r=arguments.length;return r===2?y(t)&&!f(t)?xa(t)?G(e,null,[t]):G(e,t):G(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&xa(n)&&(n=[n]),G(e,t,n))}finally{_a(1)}}var oo=`3.5.45`;function so(e,...t){return typeof e==`function`?e(...t):e}var co=Error.captureStackTrace,lo=class e extends Error{get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.docs=t.docs,this.fix=t.fix,this.sources=t.sources,this.data=t.data,co?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function uo(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}var fo=e=>t=>t instanceof lo&&e in t;function po(e){let t=e.reporters??[],n=Symbol(),r=Object.defineProperty({},"is",{value:fo(n)}),{docsBase:i}=e;for(let a of Object.keys(e.codes)){let o=e.codes[a],s=o.docs===!1?void 0:o.docs||uo(i,a),c=(e={},r={})=>{let i=new lo({code:a,why:so(o.why,e),fix:so(o.fix,e),docs:s,cause:e.cause,sources:e.sources,data:so(o.data,e)},c);i[n]=1;for(let e of t)e(i,r);return i};c.is=e=>r.is(e)&&e.code===a,r[a]=c}return r}var mo=`devtools:query`,ho=`devtools:command`,go=`devtools:event`;function _o(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var vo={blue:_o(34,39),cyan:_o(36,39),gray:_o(90,39),green:_o(32,39),red:_o(31,39),yellow:_o(33,39),bold:_o(1,22),dim:_o(2,22),reset:_o(0,0),underline:_o(4,24)};function yo(e,...t){return typeof e==`function`?e(...t):e}var bo=Error.captureStackTrace,xo=class e extends Error{get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.docs=t.docs,this.fix=t.fix,this.sources=t.sources,this.data=t.data,bo?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,data:this.data,stack:this.stack}}};function So(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}var Co=e=>t=>t instanceof xo&&e in t;function wo(e){let t=e.reporters??[],n=Symbol(),r=Object.defineProperty({},"is",{value:Co(n)}),{docsBase:i}=e;for(let a of Object.keys(e.codes)){let o=e.codes[a],s=o.docs===!1?void 0:o.docs||So(i,a),c=(e={},r={})=>{let i=new xo({code:a,why:yo(o.why,e),fix:yo(o.fix,e),docs:s,cause:e.cause,sources:e.sources,data:yo(o.data,e)},c);i[n]=1;for(let e of t)e(i,r);return i};c.is=e=>r.is(e)&&e.code===a,r[a]=c}return r}function To(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
3
+ `)}}var Eo={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},sharedState:{tracingChannels:`devframe:tracing:channels`},stream:{tracing:`devframe:tracing`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},Do=To(vo);function Oo(e,{method:t=`warn`}={}){console[t](Do(e))}function ko(e){return wo({...e,reporters:[Oo,...e.reporters??[]]})}function Ao(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var jo=Math.random.bind(Math);function Mo(e=21){let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[jo()*64|0];return t}var No=e=>e,Po=No,{clearTimeout:Fo,setTimeout:Io}=globalThis;function Lo(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=No,deserialize:s=Po,resolver:c,bind:l=`rpc`,timeout:u=6e4,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Ao(),_=Mo();s.i=_;let v;async function y(n=s){return u>=0&&(v=Io(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{Fo(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(Fo(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function Ro(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var zo=Object.freeze({type:`object`,additionalProperties:!0});function Bo(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return zo}return zo}function Vo(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=Bo(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function Ho(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function Uo(e,t){return Ho(e,t)??[e]}var Wo=Symbol.for(`devframe:browser-agent-registry`),{tools:Go,listeners:Ko}=globalThis[Wo]??={tools:new Map,listeners:new Set};function qo(){for(let e of Ko)e()}function Jo(e){let t=Symbol(e.id);return Go.set(t,e),qo(),()=>{Go.delete(t)&&qo()}}function Yo(e=21){let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[Math.random()*64|0];return t}function Xo(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Zo=Symbol.for(`immer-nothing`),Qo=Symbol.for(`immer-draftable`),q=Symbol.for(`immer-state`),$o=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function J(e,...t){{let n=$o[e],r=Cs(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var es=Object,ts=es.getPrototypeOf,ns=`constructor`,rs=`prototype`,is=`configurable`,as=`enumerable`,os=`writable`,ss=`value`,cs=e=>!!e&&!!e[q];function ls(e){return e?fs(e)||ys(e)||!!e[Qo]||!!e[ns]?.[Qo]||bs(e)||xs(e):!1}var us=es[rs][ns].toString(),ds=new WeakMap;function fs(e){if(!e||!Ss(e))return!1;let t=ts(e);if(t===null||t===es[rs])return!0;let n=es.hasOwnProperty.call(t,ns)&&t[ns];if(n===Object)return!0;if(!Cs(n))return!1;let r=ds.get(n);return r===void 0&&(r=Function.toString.call(n),ds.set(n,r)),r===us}function ps(e,t,n=!0){ms(e)===0?(n?Reflect.ownKeys(e):es.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ms(e){let t=e[q];return t?t.type_:ys(e)?1:bs(e)?2:xs(e)?3:0}var hs=(e,t,n=ms(e))=>n===2?e.has(t):es[rs].hasOwnProperty.call(e,t),gs=(e,t,n=ms(e))=>n===2?e.get(t):e[t],_s=(e,t,n,r=ms(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function vs(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var ys=Array.isArray,bs=e=>e instanceof Map,xs=e=>e instanceof Set,Ss=e=>typeof e==`object`,Cs=e=>typeof e==`function`,ws=e=>typeof e==`boolean`;function Ts(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Es=e=>Ss(e)?e?.[q]:null,Ds=e=>e.copy_||e.base_,Os=e=>e.modified_?e.copy_:e.base_;function ks(e,t){if(bs(e))return new Map(e);if(xs(e))return new Set(e);if(ys(e))return Array[rs].slice.call(e);let n=fs(e);if(t===!0||t===`class_only`&&!n){let t=es.getOwnPropertyDescriptors(e);delete t[q];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[os]===!1&&(a[os]=!0,a[is]=!0),(a.get||a.set)&&(t[i]={[is]:!0,[os]:!0,[as]:a[as],[ss]:e[i]})}return es.create(ts(e),t)}{let t=ts(e);if(t!==null&&n)return{...e};let r=es.create(t);return es.assign(r,e)}}function As(e,t=!1){return Ns(e)||cs(e)||!ls(e)||(ms(e)>1&&es.defineProperties(e,{set:Ms,add:Ms,clear:Ms,delete:Ms}),es.freeze(e),t&&ps(e,(e,t)=>{As(t,!0)},!1)),e}function js(){J(2)}var Ms={[ss]:js};function Ns(e){return e===null||!Ss(e)||es.isFrozen(e)}var Ps=`MapSet`,Fs=`Patches`,Is=`ArrayMethods`,Ls={};function Rs(e){let t=Ls[e];return t||J(0,e),t}var zs=e=>!!Ls[e];function Bs(e,t){Ls[e]||(Ls[e]=t)}var Vs,Hs=()=>Vs,Us=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:zs(Ps)?Rs(Ps):void 0,arrayMethodsPlugin_:zs(Is)?Rs(Is):void 0});function Ws(e,t){t&&(e.patchPlugin_=Rs(Fs),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Gs(e){Ks(e),e.drafts_.forEach(Js),e.drafts_=null}function Ks(e){e===Vs&&(Vs=e.parent_)}var qs=e=>Vs=Us(Vs,e);function Js(e){let t=e[q];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ys(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[q].modified_&&(Gs(t),J(4)),ls(e)&&(e=Xs(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[q].base_,e,t)}else e=Xs(t,n);return Zs(t,e,!0),Gs(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Zo?void 0:e}function Xs(e,t){if(Ns(t))return t;let n=t[q];if(!n)return ac(t,e.handledSet_,e);if(!$s(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);rc(n,e)}return n.copy_}function Zs(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&As(t,n)}function Qs(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var $s=(e,t)=>e.scope_===t,ec=[];function tc(e,t,n,r){let i=Ds(e),a=e.type_;if(r!==void 0&&gs(i,r,a)===t){_s(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ps(i,(e,n)=>{if(cs(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??ec;for(let e of o)_s(i,e,n,a)}function nc(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!$s(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Os(i);tc(e,i.draft_??i,a,n),rc(i,r)})}function rc(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Qs(e)}}function ic(e,t,n){let{scope_:r}=e;if(cs(n)){let i=n[q];$s(i,r)&&i.callbacks_.push(function(){mc(e),tc(e,n,Os(i),t)})}else ls(n)&&e.callbacks_.push(function(){let i=Ds(e);e.type_===3?i.has(n)&&ac(n,r.handledSet_,r):gs(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ac(gs(e.copy_,t,e.type_),r.handledSet_,r)})}function ac(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||cs(e)||t.has(e)||!ls(e)||Ns(e)||(t.add(e),ps(e,(r,i)=>{if(cs(i)){let t=i[q];$s(t,n)&&(_s(e,r,Os(t),e.type_),Qs(t))}else ls(i)&&ac(i,t,n)})),e}function oc(e,t){let n=ys(e),r={type_:+!!n,scope_:t?t.scope_:Hs(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=sc;n&&(i=[r],a=cc);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var sc={get(e,t){if(t===q)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=Ds(e);if(!hs(i,t,e.type_))return dc(e,i,t);let a=i[t];if(e.finalized_||!ls(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ts(t))return a;if(a===lc(e.base_,t)||uc(e,t,a)){mc(e);let n=e.type_===1?+t:t,r=gc(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in Ds(e)},ownKeys(e){return Reflect.ownKeys(Ds(e))},set(e,t,n){let r=fc(Ds(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=lc(Ds(e),t),i=r?.[q];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(vs(n,r)&&(n!==void 0||hs(e.base_,t,e.type_)))return!0;mc(e),pc(e)}return e.copy_[t]===n&&(n!==void 0||hs(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),ic(e,t,n)),!0},deleteProperty(e,t){return mc(e),lc(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),pc(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ds(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[os]:!0,[is]:e.type_!==1||t!==`length`,[as]:r[as],[ss]:n[t]}},defineProperty(){J(11)},getPrototypeOf(e){return ts(e.base_)},setPrototypeOf(){J(12)}},cc={};for(let e in sc){let t=sc[e];cc[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}cc.deleteProperty=function(e,t){return isNaN(parseInt(t))&&J(13),cc.set.call(this,e,t,void 0)},cc.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&J(14),sc.set.call(this,e[0],t,n,e[0])};function lc(e,t){let n=e[q];return(n?Ds(n):e)[t]}function uc(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!ls(n)||n[q]?!1:e.baseRefs_.has(n)}function dc(e,t,n){let r=fc(t,n);return r?ss in r?r[ss]:r.get?.call(e.draft_):void 0}function fc(e,t){if(!(t in e))return;let n=ts(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=ts(n)}}function pc(e){e.modified_||(e.modified_=!0,e.parent_&&pc(e.parent_))}function mc(e){e.copy_||=(e.assigned_=new Map,ks(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hc=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Cs(e)&&!Cs(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Cs(t)||J(6),n!==void 0&&!Cs(n)&&J(7);let r;if(ls(e)){let i=qs(this),a=gc(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Gs(i):Ks(i)}return Ws(i,n),Ys(r,i)}if(!e||!Ss(e)){if(r=t(e),r===void 0&&(r=e),r===Zo&&(r=void 0),this.autoFreeze_&&As(r,!0),n){let t=[],i=[];Rs(Fs).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}J(1,e)},this.produceWithPatches=(e,t)=>{if(Cs(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ws(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);let t=e?.useStrictShallowCopy;(ws(t)||t===`class_only`)&&this.setUseStrictShallowCopy(t),ws(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ls(e)||J(8),cs(e)&&(e=_c(e));let t=qs(this),n=gc(t,e,void 0);return n[q].isManual_=!0,Ks(t),n}finishDraft(e,t){let n=e&&e[q];n&&n.isManual_||J(9);let{scope_:r}=n;return Ws(r,t),Ys(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=Rs(Fs).applyPatches_;return cs(e)?r(e,t):this.produce(e,e=>r(e,t))}};function gc(e,t,n,r){let[i,a]=bs(t)?Rs(Ps).proxyMap_(t,n):xs(t)?Rs(Ps).proxySet_(t,n):oc(t,n);return(n?.scope_??Hs()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?nc(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function _c(e){return cs(e)||J(10,e),vc(e)}function vc(e){if(!ls(e)||Ns(e))return e;let t=e[q],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=ks(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=ks(e,!0);let i=n;return xs(n)&&(n=new Set),ps(i,(e,t)=>{_s(n,e,vc(t))},r),t&&(t.finalized_=!1),n}function yc(){$o.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=Es(gs(e,n.key_)),i=gs(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||hs(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=gs(n,r),!Ss(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[q];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;ps(e.assigned_,(e,l)=>{let u=gs(o,e,c),f=gs(s,e,c),p=l?hs(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Zo?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=ms(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),t!==0&&t!==1||n!==`__proto__`&&n!==ns||J(19),Cs(o)&&n===rs&&J(19),o=gs(o,n),o!==null&&Ss(o)||J(18,i.join(`/`))}let s=ms(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:J(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:J(17,a)}}),e}function u(e){if(!ls(e))return e;if(ys(e))return e.map(u);if(bs(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(xs(e))return new Set(Array.from(e).map(u));let t=Object.create(ts(e));for(let n in e)t[n]=u(e[n]);return hs(e,Qo)&&(t[Qo]=e[Qo]),t}function d(e){return cs(e)?u(e):e}Bs(Fs,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var bc=new hc,xc=bc.produce,Sc=bc.produceWithPatches.bind(bc),Cc=bc.applyPatches.bind(bc);function wc(e,t){if(e.add(t),e.size>1e3){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Tc(e){let{enablePatches:t=!1}=e;t&&yc();let n=Xo(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=Yo())=>{i.has(t)||(yc(),r=Cc(r,e),wc(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=Yo())=>{if(!i.has(a)){if(wc(i,a),t){let[t,i]=Sc(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=xc(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var Ec=ko({docsBase:`https://devfra.me/errors`,codes:{DF0077:{why:e=>`In-page channel function "${e.name}" is not registered on this endpoint.`,fix:"Declare the function in this endpoint's `functions` option."},DF0080:{why:e=>`In-page channel function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it channel-only."}}}),Dc=Eo.postMessage.inPageChannel;function Oc(e){return!!e&&typeof e==`object`&&`__dfIpc`in e}function kc(e){if(!e||typeof e!=`object`)return!1;let t=e;return t.channel===Dc&&typeof t.name==`string`&&typeof t.panelId==`string`&&(t.kind===`hello`||t.kind===`grant`)}function Ac(e,t){if(e?.length)return e;let n=t?.location?.origin;return n&&n!==`null`?[n]:[`*`]}function jc(e){let t=[];try{let n=e;for(;n.parent&&n.parent!==n;)t.push(n.parent),n=n.parent}catch{}for(let n of[e,...t])try{let r=n.opener;r&&r!==e&&!t.includes(r)&&t.push(r)}catch{}return t}var Mc={intervalMs:5e3,timeoutMs:12e3};function Nc(e){return e===!1?void 0:{...Mc,...e}}var Pc=class extends Error{code;name=`InPageChannelError`;constructor(e,t,n){super(t,n),this.code=e}},Fc=new Set;function Ic(e){Fc.has(e)||(Fc.add(e),console.warn(`[devframe] ${e}`))}function Lc(e,t,n){for(let r=0;r<e.length;r++){let i=zc(e[r],`${t}[${r}]`,n);if(i)return i}}function Rc(e,t,n){let r=Object.getPrototypeOf(e);if(r!==Object.prototype&&r!==null)return`${t} is an instance of ${e.constructor?.name??`an exotic class`}`;for(let[r,i]of Object.entries(e)){let e=zc(i,`${t}.${r}`,n);if(e)return e}}function zc(e,t,n){if(e!==null&&typeof e!=`boolean`&&typeof e!=`string`)return typeof e==`number`?Number.isFinite(e)?void 0:`${t} is ${e}`:typeof e==`object`?n.has(e)?`${t} is circular`:(n.add(e),Array.isArray(e)?Lc(e,t,n):Rc(e,t,n)):`${t} is ${e===void 0?"`undefined`":`a ${typeof e}`}`}function Bc(e,t,n){let r=zc(e,t,new Set);if(r)throw new Pc(`not-serializable`,`in-page function "${n}" is declared jsonSerializable, but ${r}`)}function Vc(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function Hc(e,t,n){for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await i[`~standard`].validate(n[r]);if(a.issues)throw new Pc(`invalid-args`,`in-page function "${e}" rejected argument ${r}: ${Vc(a.issues)}`)}}function Uc(e,t){return e.serialize?t.map(e.serialize):t}function Wc(e,t){return e.deserialize&&t!==void 0?e.deserialize(t):t}function Gc(e,t){return`devframe:in-page:${e===`event`?`event`:`function`}:${t}`}var Kc=Gc(`function`,``);function qc(e){let t=new Map,n=new Map;return{definitions:t,register(e){if(`agent`in e&&e.agent){if(e.jsonSerializable===!1)throw Ec.DF0080({name:e.name});e.jsonSerializable=!0}t.set(Gc(e.type,e.name),e)},registerInternal(e,n){t.set(e,{name:e,handler:n})},on(e,t){let r=Gc(`event`,e),i=n.get(r);return i||(i=new Set,n.set(r,i)),i.add(t),()=>{i.delete(t),i.size===0&&n.delete(r)}},resolve(r){let i=t.get(r),a=n.get(r);if(i||a?.size)return async(...t)=>{let a=e.deserialize?t.map(e.deserialize):t;i?.jsonSerializable&&Bc(a,`its arguments`,i.name),i?.args?.length&&await Hc(i.name,i.args,a);let o=await i?.handler?.(...a);for(let e of[...n.get(r)??[]])e(...a);if(i?.type!==`event`)return i?.jsonSerializable&&o!==void 0&&Bc(o,`its return value`,i.name),e.serialize&&o!==void 0?e.serialize(o):o}}}}function Jc(e,t){for(let n of t){let t=n(e);if(t)return t}if(e.startsWith(Kc))return()=>{throw Ec.DF0077({name:e.slice(Kc.length)})}}function Yc(e,t){let n=[];for(let r of t.definitions.values()){if(r.type===`event`||!(`agent`in r)||!r.agent)continue;let i=r.agent;n.push(Jo({id:`${e}:${r.name}`,title:i.title??r.name,description:i.description,safety:Ro(r.type,i),tags:i.tags,inputSchema:Vo(r.args),invoke:e=>{let n=Uo(e,r.args?.length);return t.resolve(Gc(r.type,r.name))(...n)}}))}return()=>n.forEach(e=>e())}function Xc(e){return e instanceof DOMException&&e.name===`DataCloneError`?new Pc(`not-cloneable`,`a payload could not be structured-cloned across the in-page channel: ${e.message}. Strip non-cloneable values (functions, DOM nodes, framework reactivity proxies) before sending: declare the function \`jsonSerializable: true\` for a precise error, or provide a \`serialize\` hook.`,{cause:e}):e}function Zc(e,t){let n,r=!1,i={rpc:Lo({},{post:t=>{try{e.postMessage(t)}catch(e){throw Xc(e)}},on:e=>{n=e},off:()=>{n=void 0},timeout:-1,proxify:!1,resolver:(e,n)=>n??t.resolveLocal(e)}),lastActivity:Date.now(),postControl(t){try{e.postMessage({__dfIpc:t})}catch{}},dispose(t){if(r)return;r=!0,t?.bye&&i.postControl(`bye`);let n=new Pc(`closed`,`in-page channel call dropped: ${t?.reason??`the in-page channel port was closed`}`);i.rpc.$rejectPendingCalls(({reject:e})=>e(n)),i.rpc.$close(),e.removeEventListener(`message`,a),e.removeEventListener(`close`,o);try{e.close()}catch{}}};function a(e){i.lastActivity=Date.now();let r=e.data;Oc(r)?r.__dfIpc===`bye`?t.onPeerClosed():t.onControl(r.__dfIpc):n?.(r)}function o(){t.onPeerClosed()}return e.addEventListener(`message`,a),e.addEventListener(`close`,o),e.start?.(),i}function Qc(e,t,n){return t<=0?e:new Promise((r,i)=>{let a=setTimeout(()=>i(new Pc(`timeout`,n())),t);e.then(e=>{clearTimeout(a),r(e)},e=>{clearTimeout(a),i(e)})})}var $c={subscribe:`devframe:in-page:page-state:subscribe`,set:`devframe:in-page:page-state:set`,patch:`devframe:in-page:page-state:patch`};function el(e){let t=new Map,n=new Set,r=new Map,i=new Set;function a(e){n.add(e);let t=r.get(e);if(t){r.delete(e);for(let e of t)e()}}function o(e,n){let r=t.get(e);if(r&&n!==void 0){let e=Yo();i.add(e),r.mutate(()=>n,e)}a(e)}function s(t){e.call($c.subscribe,[t]).then(e=>o(t,e)).catch(e=>{console.warn(`[devframe] in-page shared state "${t}": subscribe failed`,e)})}return{handlers:{[Eo.inPageChannel.panelStateUpdated]:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>n,r),a(e)},[Eo.inPageChannel.panelStatePatch]:(e,n,r)=>{t.get(e)?.patch(n,r),a(e)}},resubscribe(){for(let e of t.keys())s(e)},get:(a,o)=>{let c=t.get(a);if(c)return Promise.resolve(c);let l=Tc({initialValue:o?.initialValue,enablePatches:!0});return t.set(a,l),l.on(`updated`,(t,n,r)=>{i.delete(r)||e.isConnected()&&(n?e.callEvent($c.patch,[a,n,r]):e.callEvent($c.set,[a,t,r]))}),e.isConnected()&&s(a),o?.initialValue===void 0?new Promise(e=>{if(n.has(a)){e(l);return}let t=r.get(a)??[];t.push(()=>e(l)),r.set(a,t)}):Promise.resolve(l)}}}function tl(e){let{name:t}=e,n=e.callTimeoutMs??15e3,r=e.eventBufferLimit??64,i=e.window===!1?void 0:e.window??(typeof window>`u`?void 0:window),a=Ac(e.allowedOrigins,i),o=Nc(e.heartbeat),s={serialize:e.serialize,deserialize:e.deserialize},c=Yo(),l=e.targets??(i?jc(i):[]),u=!!i&&l.length>0,d=Xo(),f=qc(s);for(let[t,n]of Object.entries(e.functions))f.register({...n,name:t});for(let[t,n]of Object.entries(e.events??{}))f.register({...n,name:t,type:`event`});let p=Yc(t,f),m=`connecting`,h,g,_,v,y=!1,b=[],x=[],S=[];function C(e){m!==e&&(m=e,d.emit(`status:updated`,e))}let w=el({isConnected:()=>m===`connected`,callEvent:(e,t)=>D(e,Uc(s,t)),call:(e,t)=>O(e,Uc(s,t))}),T=qc(s);for(let[e,t]of Object.entries(w.handlers))T.registerInternal(e,t);function E(e,t){h?.rpc.$callRaw({method:e,args:t,event:!0,optional:!0}).catch(()=>{})}function D(e,n){m!==`closed`&&(m===`connected`&&h?E(e,n):(x.length>=r&&(x.shift(),y||(y=!0,console.warn(`[devframe] in-page channel "${t}": event buffer overflowed while connecting, so the oldest events are being dropped (limit ${r})`))),x.push({method:e,args:n})))}function O(e,r){return m===`closed`?Promise.reject(new Pc(`closed`,`in-page channel "${t}": call "${e}" rejected because the channel is closed`)):Qc(new Promise((t,n)=>{let i=()=>{h.rpc.$call(e,...r).then(e=>t(Wc(s,e)),n)};m===`connected`&&h?i():b.push({run:i,reject:n})}),n,()=>`in-page channel "${t}": call "${e}" timed out after ${n}ms (status: ${m}${m===`connecting`?`; is the page script loaded?`:``})`)}function k(e,t){h?.dispose({bye:!0,reason:`the panel adopted a newer port`}),h=Zc(e,{resolveLocal:e=>Jc(e,[T.resolve,f.resolve]),onControl:e=>{e===`ping`&&h?.postControl(`pong`)},onPeerClosed:()=>j(`the page script went away`)}),g=t,A(),C(`connected`),o&&(v=setInterval(()=>{h&&(Date.now()-h.lastActivity>o.timeoutMs?j(`the page script went silent (heartbeat timeout)`):h.postControl(`ping`))},o.intervalMs));for(let e of b.splice(0))e.run();for(let{method:e,args:t}of x.splice(0))E(e,t);w.resubscribe();for(let e of S.splice(0))e.resolve()}function A(){_&&=(clearTimeout(_),void 0),v&&=(clearInterval(v),void 0)}function j(e){m!==`closed`&&(h?.dispose({reason:e}),h=void 0,g=void 0,A(),C(`connecting`),u?ee():Ic(`in-page channel "${t}": transport lost (${e}) and the panel has no handshake targets, so it stays disconnected`))}function ee(){if(_||!u||m!==`connecting`)return;let n=e.helloIntervalMs??300,r=()=>{let i={channel:Dc,v:2,kind:`hello`,name:t,panelId:c,instanceId:e.instanceId};for(let e of l)for(let t of a)try{e.postMessage(i,t)}catch{}n=Math.min(n*1.5,3e3),_=setTimeout(r,n)};r()}let te=n=>{if(m===`closed`)return;let r=n.data;if(!kc(r)||r.kind!==`grant`||r.name!==t||r.panelId!==c)return;if(r.v!==2){Ic(`in-page channel "${t}": ignoring a grant with protocol version ${r.v} (this side speaks 2); align the devframe versions of the page script and the panel`);return}if(!a.includes(`*`)&&!a.includes(n.origin)){Ic(`in-page channel "${t}": ignoring a grant from disallowed origin "${n.origin}"`);return}if(e.instanceId&&r.instanceId!==e.instanceId)return;let i=n.ports?.[0];i&&k(i,{instanceId:r.instanceId})};return i?.addEventListener(`message`,te),e.transport?k(e.transport):u?ee():Ic(`in-page channel "${t}": the panel has no handshake targets (not embedded, no opener) and no transport, so calls will buffer until a transport appears or the channel is closed`),{name:t,get status(){return m},get pageScript(){return g},events:{on:d.on,once:d.once},whenConnected:e=>m===`connected`?Promise.resolve():m===`closed`?Promise.reject(new Pc(`closed`,`in-page channel "${t}" is closed`)):new Promise((n,r)=>{let i={resolve:n,reject:r};S.push(i),e!==void 0&&e>0&&setTimeout(()=>{let n=S.indexOf(i);n>=0&&(S.splice(n,1),r(new Pc(`timeout`,`in-page channel "${t}": no page script answered within ${e}ms; it may not be loaded in this context (render a fallback state)`)))},e)}),call:(e,...t)=>O(Gc(`function`,e),Uc(s,t)),emit:(e,...t)=>D(Gc(`event`,e),Uc(s,t)),on:(e,t)=>f.on(e,t),sharedState:w,close:()=>{if(m===`closed`)return;C(`closed`),p(),A(),i?.removeEventListener(`message`,te),h?.dispose({bye:!0,reason:`the panel closed the channel`}),h=void 0,g=void 0;let e=new Pc(`closed`,`in-page channel "${t}" was closed`);for(let t of b.splice(0))t.reject(e);x.length=0;for(let t of S.splice(0))t.reject(e)}}}function nl(e={}){let t=e.window??al();if(!t)throw Error(`Devtools iframe RPC requires a browser window`);let n=tl({name:e.channelId??`vue-devtools`,window:t,targets:e.targetWindow?[e.targetWindow]:void 0,allowedOrigins:e.targetOrigin?[e.targetOrigin]:void 0,functions:{}}),r=e=>n.call(mo,e);return{query:r,queryCustom:r,command:e=>n.call(ho,e),commandCustom:e=>n.call(ho,e),onEvent:e=>n.on(go,e),onConnectionChanged:e=>n.events.on(`status:updated`,e),dispose:()=>n.close()}}function rl(e={}){return{kind:`iframe`,available(){return il(e)},connect(){return nl(e)}}}function il(e={}){let t=e.window??al();if(!t)return!1;let n=e.targetWindow??t.parent;return!!n&&n!==t}function al(){return typeof window>`u`?void 0:window}function ol(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var sl=Math.random.bind(Math);function cl(e=21){let t=``,n=e;for(;n--;)t+=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`[sl()*64|0];return t}var ll=e=>e,ul=ll,{clearTimeout:dl,setTimeout:fl}=globalThis;function pl(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=ll,deserialize:s=ul,resolver:c,bind:l=`rpc`,timeout:u=6e4,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=ol(),_=cl();s.i=_;let v;async function y(n=s){return u>=0&&(v=fl(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{dl(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(dl(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function ml(e,t){let{channel:n,rpcOptions:r={}}=t;return pl(e,{...n,timeout:-1,...r,proxify:!1})}function hl(e){let t=new Set,n=ml({[go](e){t.forEach(t=>t(e))}},{channel:e.channel}),r=e=>n.$call(mo,e),i=e=>n.$call(ho,e);return{query:r,command:i,queryCustom:r,commandCustom:i,onEvent(e){return t.add(e),()=>{t.delete(e)}},dispose(){t.clear(),n.$close(),e.disposeChannel?.()}}}var gl=`vue-devtools`;function _l(e,t){let n={source:gl,version:1,role:e};return typeof t==`number`&&(n.tabId=t),JSON.stringify(n)}var vl=`vue-devtools:frame-control`;function yl(e){return typeof e==`object`&&!!e&&e.source===`vue-devtools:frame-control`&&typeof e.type==`string`}function bl(e){let t=new WeakMap;return{post(t){e.postMessage(t)},on(n){let r=e=>{yl(e)||n(e)};t.set(n,r),e.onMessage.addListener(r)},off(n){let r=t.get(n);r&&(e.onMessage.removeListener(r),t.delete(n))}}}function xl(e={}){let t=e.chrome??Tl(),n=t?.runtime;if(!n)throw Error(`Vue Devtools extension RPC requires chrome.runtime`);let r=e.tabId??t?.devtools?.inspectedWindow?.tabId;if(!Number.isInteger(r))throw Error(`Vue Devtools extension RPC requires chrome.devtools.inspectedWindow.tabId`);let i=n.connect({name:e.name??_l(`panel`,r)}),a=Sl(i),o=!1,s;return s=Object.assign(hl({channel:bl(i),disposeChannel:()=>{o||(o=!0,a.dispose(),i.disconnect())}}),{frames:a.controller}),i.onDisconnect.addListener(()=>{o||(o=!0,a.dispose(),s.dispose())}),s}function Sl(e){let t=[],n,r=new Set,i=new Set,a=e=>{yl(e)&&(e.type===`frames:changed`?(t=e.frames,n=e.activeFrameId,r.forEach(e=>e(t,n))):e.type===`frames:activated`&&(n=e.frame.frameId,i.forEach(t=>t(e.frame,e.reason))))};return e.onMessage.addListener(a),{controller:{getFrames(){return t},getActiveFrameId(){return n},selectFrame(t){let n={source:vl,type:`frames:select`,frameId:t};try{e.postMessage(n)}catch{}},onFramesChanged(e){return r.add(e),()=>{r.delete(e)}},onFrameActivated(e){return i.add(e),()=>{i.delete(e)}}},dispose(){e.onMessage.removeListener(a),r.clear(),i.clear()}}}function Cl(e={}){return{kind:`extension`,available(){return wl(e)},connect(){return xl(e)}}}function wl(e={}){let t=e.chrome??Tl(),n=e.tabId??t?.devtools?.inspectedWindow?.tabId;return!!t?.runtime?.connect&&Number.isInteger(n)}function Tl(){return globalThis.chrome}function El(e={}){let t=e.hosts??Dl(e),n=[];for(let e of t)if(!e.available())n.push(e.kind);else return e.connect();throw Error(`No available Vue Devtools client host${n.length?`: ${n.join(`, `)}`:``}`)}function Dl(e={}){return[Cl(e.extension),rl(e.iframe)]}function Ol(e){switch(e.kind){case`string`:return JSON.stringify(e.value);case`number`:case`bigint`:case`boolean`:return String(e.value);case`null`:case`undefined`:return e.kind;case`date`:case`regexp`:return e.value;default:return``}}function kl(e,t){let n=t.trim();switch(e.kind){case`string`:return Al(n);case`number`:return jl(n);case`bigint`:return Ml(n);case`boolean`:return Nl(n);case`null`:if(n!==`null`)throw Error(`Expected null`);return null;case`undefined`:if(n!==`undefined`)throw Error(`Expected undefined`);return;case`date`:return Pl(Al(n));case`regexp`:return Fl(Al(n));default:return JSON.parse(n)}}function Al(e){return e?e.startsWith(`"`)?JSON.parse(e):e:``}function jl(e){if(e===`NaN`)return NaN;if(e===`Infinity`)return 1/0;if(e===`-Infinity`)return-1/0;if(!e)throw Error(`Invalid number`);let t=Number(e);if(Number.isNaN(t))throw Error(`Invalid number`);return t}function Ml(e){try{return BigInt(e.replace(/n$/,``))}catch{throw Error(`Invalid bigint`)}}function Nl(e){if(e===`true`)return!0;if(e===`false`)return!1;throw Error(`Expected true or false`)}function Pl(e){let t=new Date(e);if(Number.isNaN(t.getTime()))throw Error(`Invalid date`);return t}function Fl(e){let t=/^\/(.*)\/([dgimsuvy]*)$/.exec(e);if(!t)throw Error(`Expected /pattern/flags`);return new RegExp(t[1],t[2])}var Il=Date.now();Il-1e6,Il-Ll();function Ll(){return typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now()}function Rl(e){let t=zl(e);return t?Bl(t,[3,6,0])>=0:!1}function zl(e){let t=e?.trim().match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);if(t)return[Number(t[1]),Number(t[2]??0),Number(t[3]??0)]}function Bl(e,t){for(let n=0;n<t.length;n++){let r=e[n]-t[n];if(r!==0)return r}return 0}Object.freeze({"component-hooks":1,"custom-actions":1,"custom-inspector":1,settings:1,timeline:1});var Vl=new WeakMap;function Hl(e,t){if(!t.length)return e;if(t.every(e=>e.op===`update`&&!(`parentId`in e.changes)&&!(`id`in e.changes))){let n=Vl.get(e);n||(n=new Map(e.map((e,t)=>[e.id,t])),Vl.set(e,n));let r;for(let i of t){if(i.op!==`update`)continue;let t=n.get(i.id);t!=null&&(r??=e.slice(),r[t]={...r[t],...i.changes})}return r?(Vl.set(r,n),r):e}let n=new Map(e.map(e=>[e.id,e])),r=new Map;function i(e){let t=e.parentId,n=r.get(t)??new Set;n.add(e.id),r.set(t,n)}for(let t of e)i(t);for(let e of t)switch(e.op){case`insert`:case`update`:{let t=e.op===`insert`?e.node.id:e.id,a=n.get(t);if(e.op===`update`&&!a)break;let o=e.op===`insert`?e.node:{...a,...e.changes};a&&r.get(a.parentId)?.delete(t),n.set(t,o),i(o);break}case`remove`:{let t=[e.id];for(let e of t){for(let n of r.get(e)??[])t.push(n);let i=n.get(e);i&&r.get(i.parentId)?.delete(e),r.delete(e),n.delete(e)}break}case`reorder`:Ul(n,e.children)}return Wl([...n.values()])}function Ul(e,t){let n=new Set(t),r=new Map(e);e.clear();let i=!1;for(let[a,o]of r)if(!n.has(a))e.set(a,o);else if(!i){i=!0;for(let n of t){let t=r.get(n);t&&e.set(n,t)}}}function Wl(e){let t=new Map(e.map(e=>[e.id,e])),n=new Map;for(let r of e){let e=r.parentId&&t.has(r.parentId)?r.parentId:void 0,i=n.get(e)??[];i.push(r),n.set(e,i)}let r=[],i=new Set,a=[...n.get(void 0)??[]].reverse();for(;a.length;){let e=a.pop();if(i.has(e.id))continue;i.add(e.id),r.push(e);let t=n.get(e.id)??[];for(let e=t.length-1;e>=0;e--)a.push(t[e])}for(let t of e)i.has(t.id)||r.push(t);return r}var Gl=/^[\w+.-]{2,}:\/\//;function Kl(e){return e.endsWith(`/`)?e:`${e}/`}function ql(e){return(e.endsWith(`/`)?e.slice(0,-1):e)||`/`}function Jl(e,...t){let n=e;for(let e of t)e&&e!==`/`&&(n=n?Kl(n)+e.replace(/^\.?\//,``):e);return n}function Yl(e,t){if(!t||t===`/`||Gl.test(e))return e;let n=ql(t);return e.startsWith(n)?e:Jl(n,e)}function Xl(e,t){let n=e.match(Gl);return t+(n?e.slice(n[0].length):e)}function Zl(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var Ql={blue:Zl(34,39),cyan:Zl(36,39),gray:Zl(90,39),green:Zl(32,39),red:Zl(31,39),yellow:Zl(33,39),bold:Zl(1,22),dim:Zl(2,22),reset:Zl(0,0),underline:Zl(4,24)};function $l(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
4
+ `)}}var Y={bus:{agentManifestChanged:`agent:manifest:changed`,agentToolRegistered:`agent:tool:registered`,agentToolUnregistered:`agent:tool:unregistered`,agentResourceRegistered:`agent:resource:registered`,agentResourceUnregistered:`agent:resource:unregistered`},client:{isTrustedUpdated:`rpc:is-trusted:updated`,error:`rpc:error`,connectionStatus:`connection:status`,connectionError:`connection:error`},broadcast:{authRevoked:`devframe:auth:revoked`,cacheInvalidate:`devframe:rpc:cache:invalidate`,clientStateUpdated:`devframe:rpc:client-state:updated`,clientStatePatch:`devframe:rpc:client-state:patch`,streamingChunk:`devframe:streaming:chunk`,streamingEnd:`devframe:streaming:end`,streamingUploadCancel:`devframe:streaming:upload-cancel`},sharedState:{tracingChannels:`devframe:tracing:channels`},stream:{tracing:`devframe:tracing`},inPageChannel:{panelStateUpdated:`devframe:in-page:panel-state:updated`,panelStatePatch:`devframe:in-page:panel-state:patch`},postMessage:{remoteAssetsError:`devframe:remote-assets-error`,inPageChannel:`devframe:in-page-channel`}},eu=$l(Ql);function tu(e,{method:t=`warn`}={}){console[t](eu(e))}function nu(e){return po({...e,reporters:[tu,...e.reporters??[]]})}function ru(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var iu=Math.random.bind(Math),au=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ou(e=21){let t=``,n=e;for(;n--;)t+=au[iu()*64|0];return t}var su=6e4,cu=e=>e,lu=cu,{clearTimeout:uu,setTimeout:du}=globalThis;function fu(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=cu,deserialize:s=lu,resolver:c,bind:l=`rpc`,timeout:u=su,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:`q`};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=ru(),_=ou();s.i=_;let v;async function y(n=s){return u>=0&&(v=du(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{uu(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.hasOwn(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===`q`){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:`s`,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:`s`,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(uu(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function pu(e,t){return t.safety?t.safety:e===`static`||e===`query`||e==null?`read`:`action`}var mu=Object.freeze({type:`object`,additionalProperties:!0});function hu(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return mu}return mu}function gu(e){if(!e||e.length===0)return{type:`object`,properties:{}};let t={},n=[];for(let r=0;r<e.length;r++){let i=`arg${r}`;t[i]=hu(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function _u(e,t){if(Array.isArray(e))return e;if(e==null)return[];if(typeof e!=`object`)return;let n=e;if(t!=null)return Array.from({length:t},(e,t)=>n[`arg${t}`]);if(`arg0`in n){let e=[];for(;`arg${e.length}`in n;)e.push(n[`arg${e.length}`]);return e}return Object.keys(n).length===0?[]:void 0}function vu(e,t){return _u(e,t)??[e]}function yu(e){return typeof e==`string`?`'${e}'`:new Cu().serialize(e)}var bu=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,xu=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[bu.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function Su(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length),r=0;for(let i=0;i<n;i++){let n=e.charCodeAt(i),a=t.charCodeAt(i);if(n===a)continue;let o=n<128&&xu[n]?xu[n]:n+128,s=a<128&&xu[a]?xu[a]:a+128;if(o!==s)return o<s?-1:1;r===0&&(r=n>a?-1:1)}return e.length===t.length?r:e.length<t.length?-1:1}var Cu=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?Su(e,t):n===`number`&&r===`number`?e-t:Su(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(`toJSON`in e&&typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}let i=Object.keys(e).sort(Su),a=`${r}{`;for(let t=0;t<i.length;t++){let n=i[t];a+=`${n}:${this.serialize(e[n])}`,t<i.length-1&&(a+=`,`)}return a+`}`}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e})(),wu=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Tu=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],Eu=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,Du=[],Ou=class{_data=new ku;_hash=new ku([...wu]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)Du[n]=e[t+n]|0;else{let e=Du[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=Du[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;Du[n]=t+Du[n-7]+i+Du[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+Tu[n]+Du[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=ku.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new ku(t,i)}},ku=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(Eu.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function Au(e){return new Ou().finalize(e).toBase64()}function ju(e){return Au(yu(e))}function Mu(e){return ju(e)}function Nu(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}var Pu=Symbol.for(`immer-nothing`),Fu=Symbol.for(`immer-draftable`),X=Symbol.for(`immer-state`),Iu=[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},`This object has been frozen and should not be mutated`,function(e){return`Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? `+e},`An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.`,`Immer forbids circular references`,"The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},`Object.defineProperty() cannot be used on an Immer draft`,`Object.setPrototypeOf() cannot be used on an Immer draft`,`Immer only supports deleting array indices`,`Immer only supports setting array indices and the 'length' property`,function(e){return`'original' expects a draft, got: ${e}`}];function Z(e,...t){{let n=Iu[e],r=od(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var Lu=Object,Ru=Lu.getPrototypeOf,zu=`constructor`,Bu=`prototype`,Vu=`configurable`,Hu=`enumerable`,Uu=`writable`,Wu=`value`,Gu=e=>!!e&&!!e[X];function Ku(e){return e?Yu(e)||nd(e)||!!e[Fu]||!!e[zu]?.[Fu]||rd(e)||id(e):!1}var qu=Lu[Bu][zu].toString(),Ju=new WeakMap;function Yu(e){if(!e||!ad(e))return!1;let t=Ru(e);if(t===null||t===Lu[Bu])return!0;let n=Lu.hasOwnProperty.call(t,zu)&&t[zu];if(n===Object)return!0;if(!od(n))return!1;let r=Ju.get(n);return r===void 0&&(r=Function.toString.call(n),Ju.set(n,r)),r===qu}function Xu(e,t,n=!0){Zu(e)===0?(n?Reflect.ownKeys(e):Lu.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zu(e){let t=e[X];return t?t.type_:nd(e)?1:rd(e)?2:id(e)?3:0}var Qu=(e,t,n=Zu(e))=>n===2?e.has(t):Lu[Bu].hasOwnProperty.call(e,t),$u=(e,t,n=Zu(e))=>n===2?e.get(t):e[t],ed=(e,t,n,r=Zu(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function td(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var nd=Array.isArray,rd=e=>e instanceof Map,id=e=>e instanceof Set,ad=e=>typeof e==`object`,od=e=>typeof e==`function`,sd=e=>typeof e==`boolean`;function cd(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ld=e=>ad(e)?e?.[X]:null,ud=e=>e.copy_||e.base_,dd=e=>e.modified_?e.copy_:e.base_;function fd(e,t){if(rd(e))return new Map(e);if(id(e))return new Set(e);if(nd(e))return Array[Bu].slice.call(e);let n=Yu(e);if(t===!0||t===`class_only`&&!n){let t=Lu.getOwnPropertyDescriptors(e);delete t[X];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Uu]===!1&&(a[Uu]=!0,a[Vu]=!0),(a.get||a.set)&&(t[i]={[Vu]:!0,[Uu]:!0,[Hu]:a[Hu],[Wu]:e[i]})}return Lu.create(Ru(e),t)}{let t=Ru(e);if(t!==null&&n)return{...e};let r=Lu.create(t);return Lu.assign(r,e)}}function pd(e,t=!1){return gd(e)||Gu(e)||!Ku(e)||(Zu(e)>1&&Lu.defineProperties(e,{set:hd,add:hd,clear:hd,delete:hd}),Lu.freeze(e),t&&Xu(e,(e,t)=>{pd(t,!0)},!1)),e}function md(){Z(2)}var hd={[Wu]:md};function gd(e){return e===null||!ad(e)||Lu.isFrozen(e)}var _d=`MapSet`,vd=`Patches`,yd=`ArrayMethods`,bd={};function xd(e){let t=bd[e];return t||Z(0,e),t}var Sd=e=>!!bd[e];function Cd(e,t){bd[e]||(bd[e]=t)}var wd,Td=()=>wd,Ed=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Sd(_d)?xd(_d):void 0,arrayMethodsPlugin_:Sd(yd)?xd(yd):void 0});function Dd(e,t){t&&(e.patchPlugin_=xd(vd),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Od(e){kd(e),e.drafts_.forEach(jd),e.drafts_=null}function kd(e){e===wd&&(wd=e.parent_)}var Ad=e=>wd=Ed(wd,e);function jd(e){let t=e[X];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Md(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[X].modified_&&(Od(t),Z(4)),Ku(e)&&(e=Nd(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[X].base_,e,t)}else e=Nd(t,n);return Pd(t,e,!0),Od(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===Pu?void 0:e}function Nd(e,t){if(gd(t))return t;let n=t[X];if(!n)return Hd(t,e.handledSet_,e);if(!Id(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Bd(n,e)}return n.copy_}function Pd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pd(t,n)}function Fd(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Id=(e,t)=>e.scope_===t,Ld=[];function Rd(e,t,n,r){let i=ud(e),a=e.type_;if(r!==void 0&&$u(i,r,a)===t){ed(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Xu(i,(e,n)=>{if(Gu(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Ld;for(let e of o)ed(i,e,n,a)}function zd(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Id(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=dd(i);Rd(e,i.draft_??i,a,n),Bd(i,r)})}function Bd(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Fd(e)}}function Vd(e,t,n){let{scope_:r}=e;if(Gu(n)){let i=n[X];Id(i,r)&&i.callbacks_.push(function(){Zd(e),Rd(e,n,dd(i),t)})}else Ku(n)&&e.callbacks_.push(function(){let i=ud(e);e.type_===3?i.has(n)&&Hd(n,r.handledSet_,r):$u(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Hd($u(e.copy_,t,e.type_),r.handledSet_,r)})}function Hd(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Gu(e)||t.has(e)||!Ku(e)||gd(e)||(t.add(e),Xu(e,(r,i)=>{if(Gu(i)){let t=i[X];Id(t,n)&&(ed(e,r,dd(t),e.type_),Fd(t))}else Ku(i)&&Hd(i,t,n)})),e}function Ud(e,t){let n=nd(e),r={type_:+!!n,scope_:t?t.scope_:Td(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Wd;n&&(i=[r],a=Gd);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Wd={get(e,t){if(t===X)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=ud(e);if(!Qu(i,t,e.type_))return Jd(e,i,t);let a=i[t];if(e.finalized_||!Ku(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&cd(t))return a;if(a===Kd(e.base_,t)||qd(e,t,a)){Zd(e);let n=e.type_===1?+t:t,r=$d(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in ud(e)},ownKeys(e){return Reflect.ownKeys(ud(e))},set(e,t,n){let r=Yd(ud(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Kd(ud(e),t),i=r?.[X];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.delete(t),!0;if(td(n,r)&&(n!==void 0||Qu(e.base_,t,e.type_)))return!0;Zd(e),Xd(e)}return e.copy_[t]===n&&(n!==void 0||Qu(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Vd(e,t,n)),!0},deleteProperty(e,t){return Zd(e),Kd(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Xd(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ud(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Uu]:!0,[Vu]:e.type_!==1||t!==`length`,[Hu]:r[Hu],[Wu]:n[t]}},defineProperty(){Z(11)},getPrototypeOf(e){return Ru(e.base_)},setPrototypeOf(){Z(12)}},Gd={};for(let e in Wd){let t=Wd[e];Gd[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Gd.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Z(13),Gd.set.call(this,e,t,void 0)},Gd.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&Z(14),Wd.set.call(this,e[0],t,n,e[0])};function Kd(e,t){let n=e[X];return(n?ud(n):e)[t]}function qd(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||!Ku(n)||n[X]?!1:e.baseRefs_.has(n)}function Jd(e,t,n){let r=Yd(t,n);return r?Wu in r?r[Wu]:r.get?.call(e.draft_):void 0}function Yd(e,t){if(!(t in e))return;let n=Ru(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Ru(n)}}function Xd(e){e.modified_||(e.modified_=!0,e.parent_&&Xd(e.parent_))}function Zd(e){e.copy_||=(e.assigned_=new Map,fd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Qd=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(od(e)&&!od(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}od(t)||Z(6),n!==void 0&&!od(n)&&Z(7);let r;if(Ku(e)){let i=Ad(this),a=$d(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?Od(i):kd(i)}return Dd(i,n),Md(r,i)}if(!e||!ad(e)){if(r=t(e),r===void 0&&(r=e),r===Pu&&(r=void 0),this.autoFreeze_&&pd(r,!0),n){let t=[],i=[];xd(vd).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}Z(1,e)},this.produceWithPatches=(e,t)=>{if(od(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},sd(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze);let t=e?.useStrictShallowCopy;(sd(t)||t===`class_only`)&&this.setUseStrictShallowCopy(t),sd(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ku(e)||Z(8),Gu(e)&&(e=ef(e));let t=Ad(this),n=$d(t,e,void 0);return n[X].isManual_=!0,kd(t),n}finishDraft(e,t){let n=e&&e[X];n&&n.isManual_||Z(9);let{scope_:r}=n;return Dd(r,t),Md(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=xd(vd).applyPatches_;return Gu(e)?r(e,t):this.produce(e,e=>r(e,t))}};function $d(e,t,n,r){let[i,a]=rd(t)?xd(_d).proxyMap_(t,n):id(t)?xd(_d).proxySet_(t,n):Ud(t,n);return(n?.scope_??Td()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?zd(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function ef(e){return Gu(e)||Z(10,e),tf(e)}function tf(e){if(!Ku(e)||gd(e))return e;let t=e[X],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=fd(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=fd(e,!0);let i=n;return id(n)&&(n=new Set),Xu(i,(e,t)=>{ed(n,e,tf(t))},r),t&&(t.finalized_=!1),n}function nf(){Iu.push(`Sets cannot have "replace" patches.`,function(e){return`Unsupported patch operation: `+e},function(e){return`Cannot apply patch, path doesn't resolve: `+e},`Patching reserved attributes like __proto__, prototype and constructor is not allowed`);function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=ld($u(e,n.key_)),i=$u(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||Qu(e,o))||n.parent_.type_===1&&n.parent_.allIndicesReassigned_)return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=$u(n,r),!ad(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[X];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;Xu(e.assigned_,(e,l)=>{let u=$u(o,e,c),f=$u(s,e,c),p=l?Qu(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===Pu?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=Zu(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),t!==0&&t!==1||n!==`__proto__`&&n!==zu||Z(19),od(o)&&n===Bu&&Z(19),o=$u(o,n),o!==null&&ad(o)||Z(18,i.join(`/`))}let s=Zu(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:Z(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:Z(17,a)}}),e}function u(e){if(!Ku(e))return e;if(nd(e))return e.map(u);if(rd(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(id(e))return new Set(Array.from(e).map(u));let t=Object.create(Ru(e));for(let n in e)t[n]=u(e[n]);return Qu(e,Fu)&&(t[Fu]=e[Fu]),t}function d(e){return Gu(e)?u(e):e}Cd(vd,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var rf=new Qd,af=rf.produce,of=rf.produceWithPatches.bind(rf),sf=rf.applyPatches.bind(rf),cf=1e3;function lf(e,t){if(e.add(t),e.size>cf){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function uf(t){let{enablePatches:n=!1}=t;n&&nf();let r=Nu(),i=t.initialValue,a=new Set;return{on:r.on,value:()=>i,patch:(t,n=e())=>{a.has(n)||(nf(),i=sf(i,t),lf(a,n),r.emit(`updated`,i,void 0,n))},mutate:(t,o=e())=>{if(!a.has(o)){if(lf(a,o),n){let[e,n]=of(i,t);if(e===i)return;i=e,r.emit(`updated`,i,n,o)}else{let e=af(i,t);if(e===i)return;i=e,r.emit(`updated`,i,void 0,o)}}},syncIds:a}}var df=typeof self==`object`?self:globalThis,ff=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),pf=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function mf(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o,r=ff.has(e)?df[e]:void 0;return n(new(r??df.Error)(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}if(typeof a==`string`&&pf.has(a))return n(new df[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function hf(e){return mf(new Map,e)(0)}var gf=``,{toString:_f}={},{keys:vf}=Object;function yf(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=_f.call(e).slice(8,-1);switch(n){case`Array`:return[1,gf];case`Object`:return[2,gf];case`Date`:return[3,gf];case`RegExp`:return[4,gf];case`Map`:return[5,gf];case`Set`:return[6,gf];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function bf([e,t]){return e===0&&(t===`function`||t===`symbol`)}function xf(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=yf(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of vf(r))(e||!bf(yf(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(bf(yf(n))||bf(yf(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!bf(yf(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Sf(e,t={}){let n=[];return xf(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Cf,stringify:wf}=JSON,Tf={json:!0,lossy:!0};function Ef(e){return hf(Cf(e))}function Df(e){return wf(Sf(e,Tf))}function Of(e){return hf(e)}function kf(e){return Df(e)}function Af(e){return Ef(e)}var jf=256,Mf=class extends Error{name=`StreamClosedError`};function Nf(t={}){let n=t.id??e(),r=Math.max(0,t.replayWindow??0),i=Nu(),a=new AbortController,o=[],s=!1,c=0;function l(e){if(s)throw new Mf(`Cannot write to a closed stream "${n}"`);c+=1,r>0&&(o.push({seq:c,chunk:e}),o.length>r&&(o.length-r===1?o.shift():o.splice(0,o.length-r))),i.emit(`chunk`,c,e)}function u(e){if(s)return;s=!0;let t=Ff(e);a.abort(e),i.emit(`end`,t)}function d(){s||(s=!0,a.signal.aborted||a.abort(`stream closed`),i.emit(`end`,void 0))}function f(e){s||a.signal.aborted||a.abort(e??`aborted`)}let p=new WritableStream({write(e){l(e)},close(){d()},abort(e){u(e)}});return{id:n,signal:a.signal,get closed(){return s},get lastSeq(){return c},write:l,error:u,close:d,abort:f,writable:p,events:i,buffer:o}}function Pf(t={}){let n=t.id??e(),r=Math.max(1,t.highWaterMark??jf),i=[],a=0,o=!1,s=!1,c,l,u,d;function f(){if(l){if(i.length>0){let e=i.shift(),t=l;l=void 0,t.resolve({value:e,done:!1})}else if(o){let e=l;if(l=void 0,c){let t=Error(c.message);t.name=c.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function p(){if(u){for(;i.length>0;){let e=i.shift();try{u.enqueue(e)}catch{break}}if(o&&u){try{if(c){let e=Error(c.message);e.name=c.name,u.error(e)}else u.close()}catch{}u=void 0}}}function m(e,n){if(!(o||s)&&!(e<=a)){if(a=e,i.push(n),i.length>r){let e=i.length-r;i.splice(0,e),t.onOverflow?.(e)}f(),d&&p()}}function h(e){o||(o=!0,c=e,f(),d&&p())}function g(){s||o||(s=!0,t.onCancel?.(),h(void 0))}function _(){return d||(d=new ReadableStream({start(e){u=e,p()},cancel(){g()}}),d)}return{id:n,get cancelled(){return s},get done(){return o},get lastSeenSeq(){return a},get readable(){return _()},cancel:g,_push:m,_end:h,[Symbol.asyncIterator](){return{next(){if(i.length>0)return Promise.resolve({value:i.shift(),done:!1});if(o){if(c){let e=Error(c.message);return e.name=c.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{l={resolve:e,reject:t}})},return(){return g(),Promise.resolve({value:void 0,done:!0})}}}}}function Ff(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var If=128;function Lf(e){return e.replace(/[^\w-]+/g,`_`).slice(0,If)}var Rf=`modulepreload`,zf=function(e,t){return new URL(e,t).href},Bf={},Vf=function(e){return e.pathname.endsWith(`.css`)},Hf=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Uf=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=zf(t,n);let r=s(t),i=Vf(r);return Hf(Bf,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Rf,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Wf=`__connection.json`,Gf=`__DEVFRAME_CONNECTION__`,Kf=`x-birpc-session`,qf=`__rpc-dump/index.json`,Jf=`devframe:services`,Yf=`devframe_otp`,Xf=`devframe_auth_token`;Y.postMessage.remoteAssetsError;var Zf=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>Mu(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}has(e,t){return this.cacheMap.get(e)?.has(this.keySerializer(t))??!1}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},Qf=nu({docsBase:`https://devfra.me/errors`,codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is \`false\`; MCP requires JSON-serializable data.`,fix:"Remove `jsonSerializable: false`, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."},DF0043:{why:e=>`RPC function "${e.name}" received an invalid argument at position ${e.index}: ${e.issues}`,fix:"Pass a value that satisfies the `args` schema declared for this function."},DF0044:{why:e=>`RPC function "${e.name}" returned a value that failed its \`returns\` schema: ${e.issues}`,fix:"Make the handler return a value that satisfies the `returns` schema, or relax the schema."}}});function $f(e){if(e.agent&&e.jsonSerializable===!1)throw Qf.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function ep(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function tp(e){return e.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `)}async function np(e,t,n){let r=n.slice();if(!t||t.length===0)return r;for(let r=0;r<t.length;r++){let i=t[r];if(!i)continue;let a=await ep(i,n[r]);if(a.issues)throw Qf.DF0043({name:e,index:r,issues:tp(a.issues)})}return r}async function rp(e,t,n){if(!t)return n;let r=await ep(t,n);if(r.issues)throw Qf.DF0044({name:e,issues:tp(r.issues)});return n}async function ip(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache,r=n.get(t);return r||(r=Promise.resolve(e.setup(t)),r.catch(()=>{n.get(t)===r&&n.delete(t)}),n.set(t,r)),await r}if(!e.__promise){let n=Promise.resolve(e.setup(t));n.catch(()=>{e.__promise===n&&(e.__promise=void 0)}),e.__promise=n}return await e.__promise}async function ap(e,t){let n=e.handler;if(!n){let r=await ip(e,t);if(!r.handler)throw Qf.DF0024({name:e.name});n=r.handler}let r=e.args,i=e.returns;if(!r&&!i)return n;let a=n;return async(...t)=>{let n=await np(e.name,r,t),o=await a(...n);return await rp(e.name,i,o)}}var op=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return ap(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw Qf.DF0021({name:e.name});$f(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw Qf.DF0022({name:e.name});$f(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await ap(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw Qf.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function sp(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw lp(t,`undefined`,r,e);return n}return i!==null&&cp(i,r,e,t),n})}function cp(e,t,n,r){if(typeof e==`bigint`)throw lp(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw lp(r,`Map`,t,n);if(e instanceof Set)throw lp(r,`Set`,t,n);if(e instanceof Date)throw lp(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw lp(r,e.constructor?.name??`class instance`,t,n)}function lp(e,t,n,r){let i=up(n,r);return Qf.DF0020({name:e||`<anonymous>`,type:t,path:i})}function up(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var dp=`__DEVFRAME_CONNECTION_META__`,fp=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function pp(e){let t=[()=>window?.[e],()=>globalThis?.[e],()=>parent.window?.[e]];for(let e of t)try{let t=e();if(t)return t}catch{}}function mp(){return pp(Gf)}function hp(){return pp(dp)}function gp(e){if(e)return e;try{let e=localStorage.getItem(fp);if(e)return e}catch{}return pp(fp)}function _p(e){globalThis[Gf]=e,globalThis[dp]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&vp(e.authToken)}function vp(e){try{localStorage.setItem(fp,e)}catch{}globalThis[fp]=e;let t=mp();t&&(globalThis[Gf]={...t,authToken:e})}function yp(e){let t=Yl(Wf,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function bp(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function xp(){let e=mp();if(e)return bp(e,gp()??e.authToken??e.connectionMeta.authToken);let t=hp();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??yp(`./`),authToken:gp(t.authToken)}}async function Sp(e={}){if(e.connection){let t=bp(e.connection,gp(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return _p(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:yp(t[0]??`./`),authToken:gp(e.authToken??e.connectionMeta.authToken)};return _p(n),n}let n=xp();if(n){let t=bp(n,gp(e.authToken??n.authToken??n.connectionMeta.authToken));return _p(t),t}let r=[];for(let n of t){let t=Yl(Wf,n),i=yp(n);try{let n=await fetch(t);if(!n.ok)throw Error(`Failed to fetch connection meta from ${i}: ${n.status}`);let r=await n.json(),a=n.url||i,o={connectionMeta:r,metaBaseUrl:r.baseUrl?new URL(r.baseUrl,a).href:a,authToken:gp(e.authToken??r.authToken)};return _p(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var Cp=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function wp(e=Yf){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function Tp(e){try{let t=new URL(globalThis.location.href),n=new URLSearchParams(t.hash.replace(/^#/,``));if(!n.has(e))return;n.delete(e),t.hash=n.toString(),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function Ep(e=Yf){let t=wp(e);return t&&Tp(e),t}async function Dp(e,t={}){let n=Ep(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function Op(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Jf,{initialValue:{}}).then(e=>(t=e.value(),e.on(`updated`,e=>{t=e}),e)),r);return i(),{state:i,has:e=>e in t,keys:()=>Object.keys(t),get:r=>{let i=t[r];if(!i)return;let a=n.get(i);return a||(a={...i,rpc:e.scope(i.scope).rpc},n.set(i,a)),a}}}function kp(t){let n=new Map,r=new Map,i=new Map,a=new Set,o=t.connectionMeta.backend===`static`;function s(e,t){let n=i.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}t.client.register({name:Y.broadcast.clientStateUpdated,type:`event`,handler:(e,t,r)=>{let i=n.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>s(e,t),r)}}),t.client.register({name:Y.broadcast.clientStatePatch,type:`event`,handler:(e,t,r)=>{let i=n.get(e);i&&!i.syncIds.has(r)&&i.patch(t,r)}});function c(e,n,r){let i=[];return i.push(n.on(`updated`,(n,i,a)=>{o||a===r||(i?t.callEvent(`devframe:rpc:server-state:patch`,e,i,a):t.callEvent(`devframe:rpc:server-state:set`,e,n,a))})),()=>{for(let e of i)e()}}return{keys:()=>Array.from(n.keys()),onKeyAdded(e){return a.add(e),()=>{a.delete(e)}},delete(e){let t=r.get(e);r.delete(e);let a=n.delete(e);return i.delete(e),t?.(),a},get:async(l,u)=>{if(u?.initialValue!==void 0&&i.set(l,u.initialValue),n.has(l))return n.get(l);let d=uf({initialValue:u?.initialValue,enablePatches:!1});async function f(){if(o||t.callEvent(`devframe:rpc:server-state:subscribe`,l),u?.initialValue!==void 0){n.set(l,d);for(let e of a)e(l);let i=!1,o=d.on(`updated`,()=>{i=!0}),u=e();return t.call(`devframe:rpc:server-state:get`,l).then(e=>{e!==void 0&&n.get(l)===d&&!i&&d.mutate(()=>s(l,e),u)}).catch(e=>{console.error(`Error getting server state`,e)}).finally(o),r.set(l,c(l,d,u)),d}{let e=await t.call(`devframe:rpc:server-state:get`,l);d.mutate(()=>s(l,e)),n.set(l,d);for(let e of a)e(l);return r.set(l,c(l,d)),d}}return new Promise((e,n)=>{if(t.isTrusted)f().then(e,n);else{e(d);let n=!1;t.events.on(Y.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,f())})}})}}}var Ap=new Map;function jp(e=Ap){let t=new Map;return{serialize:n=>{let r;return n.t===`q`?r=n.m:(r=t.get(n.i),t.delete(n.i)),!(n.t===`s`&&`e`in n)&&r&&e.get(r)?.jsonSerializable===!0?sp(n,r??``):`s:${kf(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?Af(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function Mp(){}function Np(e){let t=e.search(/\n\n|\r\n\r\n/);if(!(t<0))return{frame:e.slice(0,t),rest:e.slice(t+(e[t]===`\r`?4:2))}}function Pp(e){let t=`message`,n=[];for(let r of e.split(/\r?\n/))r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trimStart():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));return{event:t,data:n}}function Fp(e){let{onConnected:t=Mp,onError:n=Mp,onDisconnected:r=Mp,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Xf}=${encodeURIComponent(e.authToken)}`);let s=jp(i),c=new AbortController,l=!1,u,d,f,p,m=new Promise((e,t)=>{f=e,p=t});m.catch(()=>{});function h(e){l||(l=!0,p(e),n(e),r())}function g(){l||(l=!0,p(Error(`Devframe SSE stream closed`)),r())}function _(e,n){e===`session`?(f(n),t()):u?.(n)}async function v(e){let t=e.getReader();d=t;let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;for(r+=n.decode(i,{stream:!0});;){let e=Np(r);if(!e)break;r=e.rest;let{event:t,data:n}=Pp(e.frame);n.length>0&&_(t,n.join(`
5
+ `))}}g()}return(async()=>{try{let e=await a(o,{headers:{accept:`text/event-stream`},signal:c.signal});if(!e.ok||!e.body)throw Error(`Devframe SSE stream request failed: ${e.status}`);await v(e.body)}catch(e){if(c.signal.aborted){g();return}h(e instanceof Error?e:Error(String(e)))}})(),{close:()=>{l=!0,c.abort(),d?.cancel().catch(()=>{})},on:e=>{u=e},post:async e=>{let t;try{t=await m}catch{return}if(l)n(Error(`Devframe SSE channel is closed; message dropped`));else try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[Kf]:t},body:e});if(n.status===200){let e=await n.text();e&&u?.(e);return}if(!n.ok)throw Error(`Devframe SSE POST failed: ${n.status}`)}catch(e){n(e instanceof Error?e:Error(String(e)))}},serialize:s.serialize,deserialize:s.deserialize}}function Ip(e,t){let{channel:n,rpcOptions:r={}}=t;return fu(e,{...n,timeout:-1,...r,proxify:!1})}function Lp(e){let{transport:t,authToken:n,connectionMeta:r,events:i,clientRpc:a,rpcOptions:o={},callTimeout:s=0}=e,c=!1,l=`connecting`,u=null,d=Promise.withResolvers();function f(e,t=null){if(t?u=t:e===`connected`&&(u=null),e===l)return;let n=l;l=e,i.emit(Y.client.connectionStatus,e,n)}let p=new Set;function m(e){for(let t of[...p])t.reject(e)}function h(){return l===`disconnected`||l===`error`?new Cp(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new Cp(`auth`,`[devframe] Not authorized by the devframe server`,{cause:u??void 0}):null}function g(e,t){return new Promise((n,r)=>{let a=!1,o,c={reject(e){a||(l(),i.emit(Y.client.error,e,t),r(e))}};function l(){a=!0,p.delete(c),o&&clearTimeout(o)}p.add(c),s>0&&(o=setTimeout(()=>{c.reject(new Cp(`timeout`,`[devframe] RPC call "${t}" timed out after ${s}ms`))},s)),e.then(e=>{a||(l(),n(e))},e=>{if(a)return;l();let n=e instanceof Error?e:Error(String(e));i.emit(Y.client.error,n,t),r(n)})})}let _=new Map;for(let e of r.jsonSerializableMethods??[])_.set(e,{jsonSerializable:!0});let v=e.createChannel({definitions:_,onError(e){f(`error`,e),i.emit(Y.client.connectionError,e),m(new Cp(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new Cp(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Ip(a.functions,{channel:v,rpcOptions:o});a.register({name:Y.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new Cp(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(Y.client.connectionError,e),m(e),i.emit(Y.client.isTrustedUpdated,!1)}});let b=n;async function x(e){b=e;let t=await y.$call(`anonymous:devframe:auth`,{authToken:e,ua:navigator.userAgent,origin:location.origin});if(c=t.isTrusted,c)d.resolve(!0),f(`connected`);else{let e=new Cp(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(Y.client.connectionError,e)}return i.emit(Y.client.isTrustedUpdated,c),t.isTrusted}async function S(e){let t=(await y.$call(`anonymous:devframe:auth:exchange`,{code:e,ua:navigator.userAgent,origin:location.origin}))?.authToken??null;return t&&(b=t,c=!0,d.resolve(!0),f(`connected`),i.emit(Y.client.isTrustedUpdated,!0)),t}async function C(e={}){await y.$call(`anonymous:devframe:auth:request-code`,{ua:navigator.userAgent,origin:location.origin,...e.reissue?{reissue:!0}:{}})}async function w(){return c?!0:x(b??``)}async function T(e=6e4){if(c&&d.resolve(!0),e<=0)return d.promise;let t;try{return await Promise.race([d.promise,new Promise((n,r)=>{t=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e)})]),c}finally{clearTimeout(t)}}return{transport:t,get isTrusted(){return c},get status(){return l},get connectionError(){return u},requestTrust:w,requestTrustWithToken:x,requestTrustWithCode:S,requestAuthCode:C,ensureTrusted:T,call:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Y.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t)i.emit(Y.client.error,t,String(e[0]));else return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(Y.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function Rp(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`;return new URL(e.path??`/`,`${r.protocol}//${t}`).href}return new URL(e.path??``,r).href}let i=e??``;return/^https?:\/\//i.test(i)?i:new URL(i,r).href}function zp(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Rp(n.sse,r??`./`,location);return Lp({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Fp({url:l,authToken:t,definitions:e.definitions,...s,onConnected(){s.onConnected?.()},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(){e.onDisconnected(),s.onDisconnected?.()}})})}function Bp(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:Vp(r)?Bp(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function Vp(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function Hp(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Up(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Wp(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Gp(e){if(e.error)throw Bp(e.error);return e.output}function Kp(e){return e.some(e=>e!=null)}function qp(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Jp(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Of(e):e}function a(e,t){return i(qp(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Wp(r)?Gp(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(Hp(r)){if(Kp(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Up(r)){let e=Mu(n),i=r.records[e];if(i)return Gp(await s(i,r.serialization));if(r.fallback)return Gp(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Kp(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Yp(e){let t=Jp(await e.fetchJsonFromBases(qf),e.fetchJsonFromBases);return{transport:`static`,isTrusted:!0,status:`connected`,connectionError:null,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,requestAuthCode:async()=>{},ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1)),close:()=>{}}}var Xp=``;function Zp(e,t){return`${e}${Xp}${t}`}function Qp(e){let t=new Map,n=new Map;e.client.register({name:Y.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Zp(e,n))?._push(r,i)}}),e.client.register({name:Y.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Zp(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:Y.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Zp(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(Y.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Xp);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=Zp(n,r),o=t.get(a);if(o)return o;let s=Pf({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(Y.client.isTrustedUpdated,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=Zp(t,r),a=n.get(i);if(a)return a;let o=Nf({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}function $p(){}var em=new Map;function tm(e){let t=e.url;e.authToken&&(t=`${t}?${Xf}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=$p,onError:i=$p,onDisconnected:a=$p,definitions:o=em}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{let t=e instanceof Error?e:Error(e.type);i(t)}),n.addEventListener(`close`,e=>{a(e)});let s=jp(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else if(n.readyState===WebSocket.CONNECTING){let t=()=>{i(),n.readyState===WebSocket.OPEN&&n.send(e)},r=()=>i();function i(){n.removeEventListener(`open`,t),n.removeEventListener(`close`,r)}n.addEventListener(`open`,t),n.addEventListener(`close`,r)}else i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function nm(e,t,n){let r=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})(),i=r.protocol===`https:`?`wss:`:`ws:`;if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${r.hostname}:${e.port}`,n=new URL(e.path??`/`,`${i}//${t}`);return n.protocol=i,n.href}let t=new URL(e.path??``,r);return t.protocol=i,t.href}if(typeof e==`number`)return`${i}//${r.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Xl(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function rm(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=nm(n.websocket,r??`./`,location);return Lp({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>tm({url:l,authToken:t,definitions:e.definitions,...s,onConnected(e){s.onConnected?.(e)},onError(t){e.onError(t),s.onError?.(t)},onDisconnected(t){e.onDisconnected(),s.onDisconnected?.(t)}})})}function im(e){return e.includes(`:`)}function am(e,t){return im(t)?t:`${e}:${t}`}function om(e){return{async get(t){return(await e()).value()?.[t]},async set(t,n){(await e()).mutate(e=>{if(e===void 0)return{[t]:n};e[t]=n})},async delete(t){(await e()).mutate(e=>{e!==void 0&&delete e[t]})},async all(){return(await e()).value()??{}},async onChange(t){return(await e()).on(`updated`,e=>t(e??{}))}}}function sm(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=(async()=>(await e.ensureTrusted(),e.sharedState.get(r)))().catch(e=>{throw i=void 0,e}),i}return om(a)}function cm(e,t){return{global:sm(e,t,`global`),project:sm(e,t,`project`)}}function lm(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(im(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(am(t,n),...r)),callEvent:((n,...r)=>e.callEvent(am(t,n),...r)),callOptional:((n,...r)=>e.callOptional(am(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(am(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(am(t,n),r,i),upload:(n,r)=>e.streaming.upload(am(t,n),r)}},settings:cm(e,t),scope:e.scope}}function um(){if(typeof document<`u`){let e=document.modelContext;if(e)return e}if(typeof navigator<`u`){let e=navigator.modelContext;if(e)return e}}function dm(e,t={}){let n=t.modelContext??um();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=Lf(t.name),s=a.get(o);if(s&&s!==t.name){console.warn(`[devframe] WebMCP tool name "${o}" (from "${t.name}") collides with "${s}"; keeping the first registration.`);return}let c=new AbortController,l=pu(t.type,n),u=n.title??t.name,d=r.registerTool({name:o,title:u,description:n.description,inputSchema:gu(t.args),annotations:{title:u,readOnlyHint:l===`read`,consequentialHint:l===`destructive`,debugging:!0,destructiveHint:l===`destructive`},execute:(n,r)=>fm(t,e.context,n,r?.signal)},{signal:c.signal});d&&`then`in d&&d.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),d&&`unregister`in d&&typeof d.unregister==`function`&&d.unregister(),a.delete(o)})}function s(t){let n=t?[t]:[...e.definitions.keys()];for(let t of n){i.get(t)?.(),i.delete(t);let n=e.definitions.get(t),r=n?.agent;n&&r&&o(n,r)}}s();let c=e.onChanged(e=>s(e));return()=>{c();for(let e of i.values())e();i.clear()}}async function fm(e,t,n,r){r?.throwIfAborted();try{let i=vu(n,e.args?.length),a=await ap(e,t);return{content:[{type:`text`,text:mm(await pm(Promise.resolve(a(...i)),r))}]}}catch(e){if(r?.aborted&&e===r.reason)throw e;return{isError:!0,content:[{type:`text`,text:hm(e)}]}}}function pm(e,t){return t?t.aborted?Promise.reject(t.reason):new Promise((n,r)=>{let i=()=>r(t.reason);t.addEventListener(`abort`,i,{once:!0}),e.then(n,r).finally(()=>t.removeEventListener(`abort`,i))}):e}function mm(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function hm(e){if(!(e instanceof Error))return String(e);let t=e.cause instanceof Error?` (cause: ${e.cause.message})`:``;return`${e.name}: ${e.message}${t}`}function gm(e,t){if(t.backend===`static`)return`static`;let n=t.websocket!==void 0,r=t.sse!==void 0;if(e===`websocket`){if(!n)throw Error(`[devframe] transport: 'websocket' was requested, but this server does not advertise a WebSocket endpoint`);return`websocket`}if(e===`sse`){if(!r)throw Error(`[devframe] transport: 'sse' was requested, but this server does not advertise an SSE endpoint`);return`sse`}if(t.backend===`sse`&&r)return`sse`;if(n)return`websocket`;if(r)return`sse`;throw Error(`[devframe] This server advertises no RPC transport (backend "none"), so there is nothing to connect to. Enable the WebSocket or SSE endpoint on the server, or use its static/MCP surfaces instead.`)}async function _m(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=Nu(),a=Array.isArray(t)?t:[t],o=await Sp(e),{connectionMeta:s,metaBaseUrl:c,authToken:l}=o,u=a[0]??`./`;try{u=new URL(`.`,c).href}catch{}let d=new Zf({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),f={rpc:void 0},p=new op(f),m=e.webmcp===!1?void 0:dm(p),h,g=!1,_=0,v;function y(){_++,v=void 0,d.clear(),r===!0&&d.updateOptions({functions:[]})}r&&(p.register({name:Y.broadcast.cacheInvalidate,type:`event`,handler:y}),i.on(Y.client.connectionStatus,y),i.on(Y.client.isTrustedUpdated,y));async function b(e){let t=[u,...a.filter(e=>e!==u)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Yl(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let x=e.callTimeout??0,S=x>0?x:1/0,C,w={authToken:l,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:p,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){let a=performance.now()+S;if(await n.onRequest?.call(this,e,t,i),r===!0&&e.i&&C.isTrusted&&!e.m.startsWith(`anonymous:`)&&e.m!==`devframe:rpc:cacheable-functions`){function t(){if(performance.now()>=a)throw new Cp(`timeout`,`[devframe] RPC call "${e.m}" timed out after ${x}ms`)}for(;!v&&(t(),!(g||C.status!==`connected`));){let e=_;v=C.callOptional(`devframe:rpc:cacheable-functions`).then(t=>{e===_&&d.updateOptions({functions:t??[]})}).catch(t=>{throw e===_&&(v=void 0),t}),await v}await v,t()}let o=_;if(r&&e.i&&!g&&C.isTrusted&&d.validate(e.m)){if(d.has(e.m,e.a))return i(d.cached(e.m,e.a));let n=await t(e);o===_&&!g&&d.apply(e,n)}else await t(e)}}},T=gm(e.transport??`auto`,s);C=T===`static`?await Yp({fetchJsonFromBases:b}):T===`sse`?zp({...w,sseOptions:e.sseOptions}):rm({...w,wsOptions:e.wsOptions});let E;try{E=new BroadcastChannel(`devframe-auth`)}catch{}let D,O=!1;function k(e){return((...t)=>O||!D?e(...t):D.then(()=>e(...t)))}function A(){g=!0,y();try{h?.(),m?.()}finally{try{E?.close()}finally{C.close?.()}}}let j={events:i,get isTrusted(){return C.isTrusted},get status(){return C.status},get connectionError(){return C.connectionError},get transport(){return C.transport??T},get connection(){return o},connectionMeta:s,ensureTrusted:C.ensureTrusted,requestTrust:C.requestTrust,requestTrustWithToken:async e=>(vp(e),o={...o,authToken:e},C.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await C.requestTrustWithCode(e);if(!t)return!1;vp(t),o={...o,authToken:t};try{E?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>C.requestAuthCode(e),call:k(C.call),callEvent:k(C.callEvent),callOptional:k(C.callOptional),client:p,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:d,scope:void 0,close:A};j.sharedState=kp(j),j.streaming=Qp(j),j.services=Op(j);let ee=new Map;j.scope=(e=>{if(!e)return j;let t=ee.get(e);return t||(t=lm(j,e),ee.set(e,t)),t}),f.rpc=j;function te(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function M(){if(e.simpleAuth!==!1&&te()&&typeof globalThis.prompt==`function`)for(await j.requestAuthCode().catch(()=>{});!j.isTrusted;){let e=globalThis.prompt(`devframe: enter the authentication code shown in your terminal`);if(e==null)return;let t=e.trim();if(t&&await j.requestTrustWithCode(t))return}}async function N(){let t=await C.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await Dp(j,{param:n}):!1;t||r||j.isTrusted||await M()}return D=N().then(()=>{O=!0},()=>{O=!0}),s.mcp&&Uf(async()=>{let{setupBrowserAgentRpcBridge:e}=await import(`./browser-agent-rpc-CS80Sphv-UZooJqNf.js`);return{setupBrowserAgentRpcBridge:e}},__vite__mapDeps([0,1]),import.meta.url).then(({setupBrowserAgentRpcBridge:e})=>{g||(h=e(j))}).catch(()=>{}),E&&(E.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&j.requestTrustWithToken(e.data.authToken)}),j}function vm(e={}){return _m({...e,simpleAuth:!1})}var ym=5e3,bm=1e3;function xm(e){let t,n,r,i=[],a,o,s,c,l=!1,u=0,d=z(!1),f=z(),p=qt([]),m=z();function h(){if(s)return s;try{if(s=El(),g(s),s.onConnectionChanged){let n=!1;t=s.onConnectionChanged(t=>{t===`connected`?(n&&(e.onRuntimeChanged(),e.refresh()),n=!0):n&&(d.value=!1,e.onDisconnect())})}return s}catch{return}}function g(t){let n=t.frames;n&&(r=n,p.value=n.getFrames(),m.value=n.getActiveFrameId(),i.push(n.onFramesChanged((e,t)=>{p.value=e,m.value=t}),n.onFrameActivated((t,n)=>{m.value=t.frameId,n!==`initial`&&(u++,e.onRuntimeChanged(),e.refresh())})))}function _(){i.forEach(e=>e()),i=[],r=void 0,p.value=[],m.value=void 0}function v(e){e!==m.value&&r?.selectFrame(e)}function y(){return c??=vm().catch(e=>{throw c=void 0,e}),c}function b(){l&&!a&&(a=setTimeout(()=>{a=void 0,e.refresh()},bm))}function x(){!l||o||s?.onConnectionChanged||(o=setTimeout(()=>{o=void 0,S()},ym))}async function S(){let e=u,t=h();if(!t)b();else try{let n=await t.query({type:`runtime:health`});if(!l||e!==u)return;d.value=n.status===`ready`,f.value=void 0,x()}catch(t){if(!l||e!==u)return;d.value=!1,f.value=t instanceof Error?t.message:String(t),C(),b()}}function C(){u++,d.value=!1,e.onDisconnect(),n?.(),n=void 0,_(),t?.(),t=void 0,s?.dispose(),s=void 0,T()}function w(){a&&=(clearTimeout(a),void 0)}function T(){o&&=(clearTimeout(o),void 0)}function E(){w(),T()}function D(e,t){n??=e.onEvent(t)}function O(){l||(l=!0,e.refresh())}function k(){l=!1,C(),c=void 0,E()}return{connected:d,error:f,frames:p,activeFrameId:m,getRpcClient:h,getViteRpcClient:y,selectFrame:v,scheduleConnectionRetry:b,scheduleConnectionHealthCheck:x,disconnectRpcClient:C,clearConnectionRetryTimer:w,listenRuntimeEvents:D,start:O,stop:k}}var Sm=250,Cm=5e3,wm=5e3,Tm=`vue-devtools-next:timeline-settings`;function Em(e){let t=ee(),n=qt([]),r=qt([]),i=z(t.recording),a=z(new Set(t.disabledLayerIds)),o=z(t.selectedLayerId),s=0,c=0,l=!1,u=[],d=0,f=0,p=0;Zn([i,a,o],()=>{te({recording:i.value,disabledLayerIds:[...a.value],selectedLayerId:o.value})},{deep:!0});function m(e){e.type===`timeline:layerAdded`&&e.layerId&&S({id:e.layerId,label:e.label??C(e.layerId),appId:e.appId,pluginId:e.pluginId,color:e.color}),(e.type===`timeline:eventAdded`||e.type===`timeline:eventsLimited`)&&e.layerId&&i.value&&O(e.layerId)&&g(e)}function h(){n.value=[],r.value=[],s=0,b()}function g(e){if(f===wm){let t=u[d];p+=t?.type===`timeline:eventsLimited`?t.dropped??0:1,u[d]=e,d=(d+1)%wm}else u[(d+f)%wm]=e,f++;_()}function _(){if(l)return;l=!0;let e=c;y(()=>{e===c&&i.value&&(l=!1,v())})}function v(){let e=[];for(p&&=(e.push({type:`timeline:eventsLimited`,time:Date.now(),layerId:`timeline`,dropped:p,subtitle:`Client pending queue limit reached`}),0);f&&e.length<Sm;)e.push(u[d]),u[d]=void 0,d=(d+1)%wm,f--;if(!e.length)return;for(let t of e){let e=t.layerId;e&&O(e)&&S({id:e,label:C(e),appId:t.appId,pluginId:t.pluginId})}let t=e.flatMap(e=>{let t=e.layerId;if(!t||!O(t))return[];let n=e.type===`timeline:eventsLimited`,r=e.dropped??0,i=e.coalesced??0;return[{id:s++,type:e.type,time:e.time??Date.now(),label:n?x(r,i):e.title??e.type.replaceAll(`:`,` `),appId:e.appId,pluginId:e.pluginId,layerId:t,title:n?x(r,i):e.title,subtitle:n?e.subtitle??`Runtime event limit reached`:e.subtitle,data:e.data,meta:e.meta,groupId:e.groupId,logType:n?`warning`:e.logType,all:e.all,dropped:r,coalesced:i}]}),r=[...n.value,...t];if(r.length>Cm){let e=r.length-Cm+1,t=r[0]?.layerId??`timeline`;n.value=[...r.slice(-4999),{id:s++,type:`timeline:eventsLimited`,time:Date.now(),label:x(e,0),layerId:t,title:x(e,0),subtitle:`Client history limit reached`,logType:`warning`,dropped:e,coalesced:0}]}else n.value=r;f&&_()}function y(e){typeof requestAnimationFrame==`function`?requestAnimationFrame(()=>e()):setTimeout(e,0)}function b(){u.splice(0,u.length),d=0,f=0,p=0,c+=1,l=!1}function x(e,t){return e&&t?`Events dropped and coalesced`:e?`Events dropped`:t?`Events coalesced`:`Timeline events limited`}function S(e){let t=r.value.findIndex(t=>t.id===e.id);t===-1?r.value=[...r.value,e]:r.value=r.value.map((n,r)=>r===t?{...n,...e,label:e.label||n.label,color:e.color??n.color}:n)}function C(e){return e.split(/[-:]/g).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(` `)}function w(){b(),n.value=[],s=0,e()?.command({type:`timeline:clear`}).catch(()=>{})}function T(){i.value=!i.value,i.value||b(),A()}async function E(t){t.pluginId&&await e()?.command({type:`timeline:inspectEvent`,appId:t.appId,payload:{pluginId:t.pluginId,layerId:t.layerId,event:{time:t.time,title:t.title??t.label,subtitle:t.subtitle,data:t.data,meta:t.meta,groupId:t.groupId,logType:t.logType,all:t.all}}}).catch(()=>{})}function D(e){let t=new Set(a.value);t.has(e)?t.delete(e):t.add(e),a.value=t,A()}function O(e){return!a.value.has(e)}function k(e){o.value=e}async function A(t=e()){await t?.command({type:`timeline:setRecording`,payload:{recording:i.value,disabledLayerIds:[...a.value]}}).catch(()=>{})}function j(e){return e?new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).format(e):`-`}function ee(){let e={recording:!0,disabledLayerIds:[],selectedLayerId:``};if(typeof window>`u`)return e;try{let t=window.localStorage.getItem(Tm);if(!t)return e;let n=JSON.parse(t);if(!n||typeof n!=`object`)return e;let r=n;return{recording:typeof r.recording==`boolean`?r.recording:e.recording,disabledLayerIds:Array.isArray(r.disabledLayerIds)?r.disabledLayerIds.filter(e=>typeof e==`string`):e.disabledLayerIds,selectedLayerId:typeof r.selectedLayerId==`string`?r.selectedLayerId:e.selectedLayerId}}catch{return e}}function te(e){if(typeof window<`u`)try{window.localStorage.setItem(Tm,JSON.stringify(e))}catch{}}return{timeline:n,timelineLayers:r,timelineRecording:i,disabledTimelineLayerIds:a,selectedTimelineLayerId:o,clearTimelineEvents:w,toggleTimelineRecording:T,inspectTimelineEvent:E,toggleTimelineLayerEnabled:D,isTimelineLayerEnabled:O,selectTimelineLayer:k,syncTimelineSettings:A,formatTime:j,discardPendingTimelineEvents:b,handleTimelineEvent:m,resetTimeline:h}}var Dm=30;function Om(e){let{getRpcClient:t,runtimeVersion:n,selectedAppId:r,selectedComponentId:i,error:a,assertCommandSucceeded:o}=e,s=z(),c=z(!1),l=z(),u=z({}),d=z({}),f=0,p=0,m=0,h,g=new Map;Zn([n,r,i],v,{flush:`sync`}),Zn(i,e=>{e&&y(e)});function _(e){return`${m}:${r.value}:${e}`}function v(){m++,p++,h=void 0,g.clear(),s.value=void 0,l.value=void 0,c.value=!1,ae()}async function y(e,n=0){let o=t();if(!o)return;let u=r.value,d=_(e),f=g.get(d);if(f){f.refresh=!0,f.minimumVersion=Math.max(f.minimumVersion,n);return}if(n&&s.value?.componentId===e&&s.value.version>=n)return;if(h?.key===d&&h.maxEntries===l.value)return h.minimumVersion=Math.max(h.minimumVersion,n),h.promise;let m=++p;c.value=!0;let v={key:d,maxEntries:l.value,minimumVersion:n,promise:Promise.resolve()};return h=v,v.promise=y(),v.promise;async function y(){try{for(;;){let t=v.minimumVersion,n=await o.query({type:`components:stateSnapshot`,appId:u,payload:{componentId:e,maxEntries:v.maxEntries}});if(m!==p||d!==_(e)||e!==i.value)return;if(!(n&&n.version<v.minimumVersion&&v.minimumVersion>t)){ae(),s.value=n;return}}}catch(e){m===p&&(a.value=e instanceof Error?e.message:String(e))}finally{h===v&&(h=void 0),m===p&&(c.value=!1)}}}async function b(e,n,r){let a=t();if(!a)return;let s=_(e),l=g.get(s)??{pending:0,refresh:!1,minimumVersion:0};h?.key===s&&(l.refresh=!0,l.minimumVersion=Math.max(l.minimumVersion,h.minimumVersion),p++,h=void 0,c.value=!1),l.pending++,g.set(s,l);try{o(await a.command(n),r),l.refresh=!0}finally{l.pending--,l.pending||(g.delete(s),l.refresh&&s===_(e)&&e===i.value&&(ae(),await y(e,l.minimumVersion)))}}async function x(e,n){let i=t();if(i&&n)return await i.query({type:`inspectors:stateSnapshot`,appId:r.value,payload:{inspectorId:e,nodeId:n}})}async function S(e,n){await t()?.command({type:`inspectors:selectNode`,appId:r.value,payload:{inspectorId:e,nodeId:n}}).catch(()=>{})}async function C(){let e=i.value;if(!e)return;let t=Math.max(0,...s.value?.sections.map(e=>e.entries.length)??[]);l.value=(l.value??t)+Dm,await y(e)}async function w(e,n){let i=N(e),a=ne(re(i)),o=t();if(!a||!o)return;let s=M(e),c=f,l=await o.query({type:`values:expand`,appId:r.value,payload:{handle:a,maxEntries:n}});l&&`value`in l&&c===f&&M(e)===s&&(u.value={...u.value,[s]:ie(i,l.value)})}async function T(e){let n=t();if(!n)return;let a=N(e),o=ne(re(a)),s=se(e),c=i.value,l;if(o)l={handle:o};else if(!s&&c&&e.path.length>=1){let[t,...n]=e.path;l={componentId:c,sectionId:t,path:n}}else{let e=le(a)?.handle;e&&(l={handle:e})}if(l)return(await n.query({type:`values:storeAsGlobal`,appId:r.value,payload:l}))?.varName}function E(e){return se(e)||e.path.length!==2?!1:e.meta?.stateType===`computed`||e.path[0]===`computed`}async function D(e){let n=t(),a=i.value;if(!n||!a||!E(e))return;let[o,...s]=e.path,c=await n.command({type:`values:recompute`,appId:r.value,payload:{componentId:a,sectionId:o,path:s}});if(c.status!==1)throw Error(typeof c.error==`string`?c.error:`Unable to recompute computed value`);ae(),await y(a)}async function O(e,n){let a=se(e);if(a)return ee(e,n,a);let o=t(),s=i.value;if(!o||!s)return;let[c,...l]=e.path;await b(s,{type:`components:editState`,appId:r.value,payload:{componentId:s,sectionId:c,path:l,stateType:typeof e.meta?.stateType==`string`?e.meta.stateType:void 0,value:n}},`Unable to edit state entry`)}async function k(e){let n=se(e);if(n)return te(e,n);let a=t(),o=i.value;if(!a||!o)return;let[s,...c]=e.path;await b(o,{type:`components:editState`,appId:r.value,payload:{componentId:o,sectionId:s,path:c,remove:!0}},`Unable to delete state entry`)}async function A(e){if(se(e))throw Error(`Adding inspector state entries is not supported`);let n=t(),a=i.value;if(!n||!a)return;let[o,...s]=e.path;await b(a,{type:`components:addState`,appId:r.value,payload:{componentId:a,sectionId:o,path:s,value:void 0}},`Unable to add state entry`)}async function j(e,n){let a=t();if(!a)return;let s=le(N(e))?.handle;if(!s)return;let c=await a.command({type:`values:customAction`,appId:r.value,payload:{handle:s,actionIndex:n}});o(c,`Unable to run custom state action`);let l=se(e);l?oe(l.inspectorId,`state`,l.nodeId):i.value&&await y(i.value)}async function ee(e,n,i){let a=t();if(!a)return;let[s,...c]=e.path,l=await a.command({type:`inspectors:editState`,appId:r.value,payload:{inspectorId:i.inspectorId,nodeId:i.nodeId,sectionId:s,path:c,value:n}});o(l,`Unable to edit inspector state`),ae(),oe(i.inspectorId,`state`,i.nodeId)}async function te(e,n){let i=t();if(!i)return;let[a,...s]=e.path,c=await i.command({type:`inspectors:editState`,appId:r.value,payload:{inspectorId:n.inspectorId,nodeId:n.nodeId,sectionId:a,path:s,remove:!0}});o(c,`Unable to delete inspector state`),ae(),oe(n.inspectorId,`state`,n.nodeId)}function M(e){let t=se(e),a=t?[`inspector`,t.inspectorId,t.nodeId]:i.value?[`component`,i.value]:[`state`];return JSON.stringify([n.value,r.value,...a,e.path])}function N(e){return u.value[M(e)]??e.value}function ne(e){return`handle`in e?e.handle:void 0}function re(e){let t=le(e);return t?re(t.value):e}function ie(e,t){let n=le(e);return n?{...n,value:ie(n.value,t)}:t}function ae(){f++,u.value={}}function oe(e,t,n){let r=d.value[e]??{tree:0,state:0};d.value={...d.value,[e]:{...r,[t]:r[t]+1,...t===`state`?{nodeId:n}:{}}}}function se(e){let t=e.meta?.inspectorId,n=e.meta?.nodeId;return typeof t==`string`&&typeof n==`string`?{inspectorId:t,nodeId:n}:void 0}function ce(e){if(!e||typeof e!=`object`)return`SerializationError`;let t=le(e);if(t)return t.display??(t.value&&typeof t.value==`object`?ce(t.value):`SerializationError`);switch(e.kind){case`null`:case`undefined`:return e.kind;case`boolean`:case`bigint`:return String(e.value);case`number`:return String(e.value);case`string`:return e.truncated?`"${e.value}"...`:`"${e.value}"`;case`symbol`:return`Symbol(${e.description})`;case`function`:return`ƒ ${e.name??`anonymous`}()`;case`array`:return`Array(${e.length})`;case`object`:return e.name;case`map`:return`Map(${e.size})`;case`set`:return`Set(${e.size})`;case`component`:return`<${e.name}>`;case`dom`:return`<${e.tag}${e.id?`#${e.id}`:``}>`;case`date`:case`regexp`:return e.value;case`error`:return`${e.name}: ${e.message}`;case`circular`:return`[Circular ${e.handle}]`}return``}function le(e){if(typeof e==`object`&&e&&e.kind===`custom`)return e}return{componentState:s,componentStateLoading:c,expandedValues:u,inspectorInvalidations:d,fetchComponentState:y,resetComponentStateRequests:v,fetchInspectorState:x,selectInspectorNode:S,showMoreComponentStateEntries:C,expandEntryValue:w,storeStateEntryAsGlobal:T,isComputedStateEntry:E,recomputeStateEntry:D,editComponentState:O,deleteComponentState:k,addComponentStateEntry:A,executeCustomStateAction:j,getEntryKey:M,getEntryValue:N,clearExpandedValues:ae,touchInspectorInvalidation:oe,formatValue:ce}}var km=`__VUE_DEVTOOLS_CLIENT_SETTINGS__`;function Am(){return{tabSettings:{hiddenTabCategories:[],hiddenTabs:[],pinnedTabs:[]},scale:1,expandSidebar:!1,scrollableSidebar:!0,reduceMotion:!1,highlightUpdates:!1}}var jm=It(Am());Pm(Fm()),Zn(jm,()=>{if(typeof window<`u`)try{window.localStorage.setItem(km,JSON.stringify(jm))}catch{}},{deep:!0});function Mm(){return{settings:jm,resetDevtoolsSettings:Nm}}function Nm(){Pm(Am())}function Pm(e){jm.scale=e.scale,jm.expandSidebar=e.expandSidebar,jm.scrollableSidebar=e.scrollableSidebar,jm.reduceMotion=e.reduceMotion,jm.highlightUpdates=e.highlightUpdates,jm.tabSettings.hiddenTabCategories=e.tabSettings.hiddenTabCategories,jm.tabSettings.hiddenTabs=e.tabSettings.hiddenTabs,jm.tabSettings.pinnedTabs=e.tabSettings.pinnedTabs}function Fm(){if(typeof window>`u`)return Am();try{let e=window.localStorage.getItem(km);return e?Im(JSON.parse(e)):Am()}catch{return Am()}}function Im(e){let t=Am();if(!Lm(e))return t;let n=Lm(e.tabSettings)?e.tabSettings:{};return{tabSettings:{hiddenTabCategories:Rm(n.hiddenTabCategories),hiddenTabs:Rm(n.hiddenTabs),pinnedTabs:Rm(n.pinnedTabs)},scale:Bm(e.scale,t.scale),expandSidebar:zm(e.expandSidebar,t.expandSidebar),scrollableSidebar:zm(e.scrollableSidebar,t.scrollableSidebar),reduceMotion:zm(e.reduceMotion,t.reduceMotion),highlightUpdates:zm(e.highlightUpdates,t.highlightUpdates)}}function Lm(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function Rm(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function zm(e,t){return typeof e==`boolean`?e:t}function Bm(e,t){return typeof e==`number`&&Number.isFinite(e)?e:t}function Vm(e){let t=new Map;function n(n){for(let[r,i]of t){if(n){let t=r,i=new Set;for(;t&&t!==n&&!i.has(t);)i.add(t),t=e.getParentId?.(t);if(t!==n)continue}i.cancelled=!0,t.delete(r)}}function r(e){for(let n of t.values())n.events.push(...e)}function i(n){let r=t.get(n);if(r?.promise)return r.promise;let i=e.getClient(),a=e.getAppId();if(!i||!a)return Promise.resolve();let o={cancelled:!1,events:[]};return t.set(n,o),o.promise=s(),o.promise;async function s(){let r;try{do{o.events=[];let t=await i.query({type:`components:treeChildren`,appId:a,payload:{componentId:n,cursor:r}});if(r=t.cursor,o.cancelled||e.getAppId()!==a||e.getClient()!==i)break;e.apply([...t.nodes.map(e=>({op:`insert`,parentId:e.parentId,node:e})),...o.events]),r&&await Hm()}while(r&&!o.cancelled)}catch(t){o.cancelled||e.onError(t)}finally{t.get(n)===o&&t.delete(n),r&&await i.command({type:`components:cancelTreeChildren`,appId:a,payload:{cursor:r}}).catch(()=>{})}}}return{expand:i,cancel:n,observe:r}}async function Hm(){let e=globalThis.scheduler;return e?.yield?e.yield():new Promise(e=>setTimeout(e,0))}var Um={routes:[]},Wm=qt([]),Gm=qt([]),Km=z(!1),qm=qt([]),Jm=qt([]),Ym=z(Um),Q=z(),Xm=z(),Zm=z(!1),Qm=z(0),$m=0,eh=z(),th=z({openInEditor:!1}),nh=io(()=>Wm.value.find(e=>e.id===Q.value)??Wm.value[0]),rh=io(()=>Gm.value.find(e=>e.id===Xm.value)),ih=io(()=>Wm.value.length?Math.max(Ym.value.routes.length,1):0),ah=io(()=>Rl(nh.value?.version)),oh=io(()=>Wm.value.reduce((e,t)=>e+t.componentCount,0)),sh=io(()=>th.value.openInEditor),ch=!1,lh=!1,uh=new Map,dh=xm({refresh:mg,onRuntimeChanged:bg,onDisconnect(){ch=!1,lh=!1,uh.clear(),pg(),Ih(),th.value={openInEditor:!1}}}),{connected:fh,error:ph,frames:mh,activeFrameId:hh,getRpcClient:$,getViteRpcClient:gh,selectFrame:_h,scheduleConnectionRetry:vh,scheduleConnectionHealthCheck:yh,disconnectRpcClient:bh,clearConnectionRetryTimer:xh,listenRuntimeEvents:Sh}=dh,{timeline:Ch,timelineLayers:wh,timelineRecording:Th,disabledTimelineLayerIds:Eh,selectedTimelineLayerId:Dh,clearTimelineEvents:Oh,toggleTimelineRecording:kh,inspectTimelineEvent:Ah,toggleTimelineLayerEnabled:jh,isTimelineLayerEnabled:Mh,selectTimelineLayer:Nh,syncTimelineSettings:Ph,formatTime:Fh,discardPendingTimelineEvents:Ih,handleTimelineEvent:Lh,resetTimeline:Rh}=Em($),zh=z(!1),Bh=Vm({getClient:$,getAppId:()=>Q.value,getParentId:e=>Gm.value.find(t=>t.id===e)?.parentId,apply:Sg,onError:e=>{ph.value=zg(e,`Unable to expand component tree node`)}});Zn([Q,Qm],()=>Bh.cancel(),{flush:`sync`});var{componentState:Vh,componentStateLoading:Hh,expandedValues:Uh,inspectorInvalidations:Wh,fetchComponentState:Gh,resetComponentStateRequests:Kh,fetchInspectorState:qh,selectInspectorNode:Jh,showMoreComponentStateEntries:Yh,expandEntryValue:Xh,storeStateEntryAsGlobal:Zh,isComputedStateEntry:Qh,recomputeStateEntry:$h,editComponentState:eg,deleteComponentState:tg,addComponentStateEntry:ng,executeCustomStateAction:rg,getEntryKey:ig,getEntryValue:ag,clearExpandedValues:og,touchInspectorInvalidation:sg,formatValue:cg}=Om({getRpcClient:$,runtimeVersion:Qm,selectedAppId:Q,selectedComponentId:Xm,error:ph,assertCommandSucceeded:Rg});Zn(nh,e=>{e&&e.id!==Q.value&&(Q.value=e.id)},{immediate:!0}),Zn(Gm,e=>{e.some(e=>e.id===Xm.value)||(Xm.value=e[0]?.id)});var{settings:lg}=Mm();Zn([fh,()=>lg.highlightUpdates],([e,t])=>{e&&$()?.command({type:`components:setHighlightUpdates`,payload:{enabled:t}}).catch(()=>{})});function ug(){return{apps:Wm,components:Gm,componentTreeTruncated:Km,componentState:Vh,componentStateLoading:Hh,componentInspecting:zh,connected:fh,addComponentStateEntry:ng,deleteComponentState:tg,error:ph,expandedValues:Uh,frames:mh,activeFrameId:hh,inspectors:qm,inspectorInvalidations:Wh,lastUpdatedAt:eh,loading:Zm,plugins:Jm,pageCount:ih,reactivityGraphEnabled:ah,routerSnapshot:Ym,runtimeVersion:Qm,selectedApp:nh,selectedAppId:Q,selectedComponent:rh,selectedComponentId:Xm,selectedTimelineLayerId:Dh,timeline:Ch,disabledTimelineLayerIds:Eh,timelineLayers:wh,timelineRecording:Th,totalComponents:oh,callInspectorAction:Eg,callInspectorNodeAction:Dg,openInEditorAvailable:sh,clearExpandedValues:og,editComponentState:eg,expandComponentTreeNode:Hg,cancelComponentTreeExpansion:Bh.cancel,expandEntryValue:Xh,fetchInspectorState:qh,fetchInspectorTree:wg,formatTime:Fh,formatValue:cg,getMatchedRoutes:gg,getEntryKey:ig,getEntryValue:ag,getSelectedComponentRenderCode:Ng,highlightComponent:kg,inspectSelectedComponentDom:Mg,openSelectedComponentInEditor:Pg,openFileInEditor:Fg,navigateRoute:yg,updatePluginSetting:Tg,executeCustomStateAction:rg,cancelComponentInspection:Ig,clearTimelineEvents:Oh,refreshData:mg,inspectComponentInPage:Og,inspectTimelineEvent:Ah,isTimelineLayerEnabled:Mh,scrollToSelectedComponent:jg,selectApp:Vg,selectComponent:Bg,selectFrame:_h,selectInspectorNode:Jh,selectTimelineLayer:Nh,showMoreComponentStateEntries:Yh,storeStateEntryAsGlobal:Zh,isComputedStateEntry:Qh,recomputeStateEntry:$h,toggleTimelineLayerEnabled:jh,toggleTimelineRecording:kh,unhighlightComponent:Ag}}function dg(){dh.start()}function fg(){dh.stop()}function pg(){$m++,Zm.value=!1,fh.value=!1,Qm.value++}async function mg(){Bh.cancel();let e=++$m,t=Q.value,n=()=>e===$m&&t===Q.value,r=$();if(!r)fh.value=!1,Wm.value=[],Gm.value=[],Km.value=!1,qm.value=[],Jm.value=[],Ym.value=Um,Kh(),ph.value=`Waiting for host runtime`,Zm.value=!1,vh();else{xg(r),Zm.value=!0;try{let[e,i,a]=await Promise.all([r.query({type:`apps:snapshot`}),r.query({type:`devtools:capabilities`}).catch(()=>({openInEditor:!1})),r.query({type:`plugins:snapshot`})]);if(!n())return;let o=e.apps.some(e=>e.id===t)?t:e.apps[0]?.id,[s,c,l]=await Promise.all([r.query({type:`components:treeSnapshot`,appId:o}),hg(r,o),Cg(r,o)]);if(!n())return;Wm.value=e.apps,Q.value=o,Gm.value=s.nodes,Km.value=s.truncated===!0,th.value=i,Ym.value=c,Jm.value=a.plugins,qm.value=l.inspectors,fh.value=!0,ph.value=void 0,eh.value=Date.now(),ch=!0;for(let e of uh.values())Lh(e);uh.clear(),lh&&(lh=!1,queueMicrotask(()=>{ch&&$()===r&&mg()})),Ph(r),xh(),yh(),Xm.value&&Gh(Xm.value)}catch(e){if(!n())return;ph.value=e instanceof Error?e.message:String(e),bh(),vh()}finally{e===$m&&(Zm.value=!1)}}}async function hg(e,t){try{return await e.query({type:`router:snapshot`,appId:t})}catch{return{...Um,appId:t}}}async function gg(e){let t=$();if(!t)return[];try{return(await t.query({type:`router:matchedRoutes`,appId:Q.value,payload:{path:e}})).routes??[]}catch{return[]}}var _g=0;async function vg(e){let t=++_g,n=$m,r=Q.value,i=await hg(e,r);t===_g&&n===$m&&r===Q.value&&(Ym.value=i)}async function yg(e){let t=$();if(!t)return;let n=Q.value,r=$m,i=()=>r===$m&&n===Q.value,a=await t.command({type:`router:navigate`,appId:n,payload:{path:e}});i()&&(Rg(a,`Unable to navigate route`),await vg(t))}function bg(){ch=!1,lh=!1,uh.clear(),pg(),Wm.value=[],Gm.value=[],Km.value=!1,qm.value=[],Wh.value={},Jm.value=[],Ym.value=Um,Q.value=void 0,Xm.value=void 0,Rh()}function xg(e){Sh(e,t=>{if(!ch)(t.type===`apps:changed`||t.type===`plugin:setup`||t.type===`inspectors:changed`)&&(lh=!0),t.type===`timeline:layerAdded`&&t.layerId&&uh.set(t.layerId,t);else if(Lh(t),t.type===`components:treePatched`){if(!t.appId||t.appId!==Q.value)return;Bh.observe(t.patches??[]),Sg(t.patches??[]),eh.value=Date.now()}else if(t.type===`components:stateInvalidated`){let e=t.componentId;e&&e===Xm.value&&t.appId===Q.value&&Gh(e,t.version)}else t.type===`apps:changed`||t.type===`plugin:setup`||t.type===`inspectors:changed`?mg():t.appId&&t.appId!==Q.value||(t.type===`inspectors:treeInvalidated`&&t.inspectorId&&(sg(t.inspectorId,`tree`),t.inspectorId.startsWith(`router-inspector:`)&&vg(e)),t.type===`inspectors:stateInvalidated`&&t.inspectorId&&sg(t.inspectorId,`state`,t.nodeId))})}function Sg(e){Gm.value=Hl(Gm.value,e)}async function Cg(e,t){try{return await e.query({type:`inspectors:list`,appId:t})}catch{return{inspectors:[]}}}async function wg(e,t=``){let n=$();return n?(await n.query({type:`inspectors:treeSnapshot`,appId:Q.value,payload:{inspectorId:e,filter:t}})).rootNodes??[]:[]}async function Tg(e,t,n){let r=$();r&&(Rg(await r.command({type:`plugins:updateSetting`,payload:{pluginId:e,key:t,value:n}}),`Unable to update plugin setting`),Jm.value=Jm.value.map(r=>r.id===e?{...r,settingValues:{...r.settingValues,[t]:n}}:r))}async function Eg(e,t){let n=$();n&&Rg(await n.command({type:`inspectors:callAction`,appId:Q.value,payload:{inspectorId:e,actionIndex:t}}),`Unable to run inspector action`)}async function Dg(e,t,n){let r=$();r&&t&&Rg(await r.command({type:`inspectors:callNodeAction`,appId:Q.value,payload:{inspectorId:e,nodeId:t,actionIndex:n}}),`Unable to run inspector node action`)}async function Og(){let e=$();if(e){zh.value=!0;try{let t=await e.query({type:`components:inspect`});return t?(t.appId!==Q.value&&(Q.value=t.appId,Vh.value=void 0,og(),await mg()),t.nodes&&Sg(t.nodes.map(e=>({op:`insert`,parentId:e.parentId,node:e}))),Xm.value=t.componentId,t):void 0}catch(e){ph.value=e instanceof Error?e.message:String(e)}finally{zh.value=!1}}}async function kg(e){let t=$();t&&await t.command({type:`components:highlight`,appId:Q.value,payload:{componentId:e}}).catch(()=>{})}async function Ag(){await $()?.command({type:`components:unhighlight`}).catch(()=>{})}async function jg(){let e=$(),t=Xm.value;e&&t&&Rg(await e.command({type:`components:scrollTo`,appId:Q.value,payload:{componentId:t}}),`Unable to scroll to component`)}async function Mg(){let e=$(),t=Xm.value;e&&t&&Rg(await e.command({type:`components:inspectDom`,appId:Q.value,payload:{componentId:t}}),`Unable to inspect DOM`)}async function Ng(){let e=$(),t=Xm.value;if(!e||!t)return;let n=await e.query({type:`components:getRenderCode`,appId:Q.value,payload:{componentId:t}});if(!n)ph.value=`No render code available for this component`;else return n}async function Pg(){let e=rh.value?.file;e?await Fg(e):ph.value=`No source file available for this component`}async function Fg(e){sh.value&&await Lg(await gh(),`vite:core:open-in-editor`,e)}async function Ig(){let e=$();zh.value=!1,await e?.command({type:`components:cancelInspect`})}function Lg(e,t,...n){return e.call(t,...n)}function Rg(e,t){if(e.status===1)return;let n=zg(e.error,t);throw ph.value=n,Error(n)}function zg(e,t){if(e==null)return t;if(e instanceof Error)return e.message;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return t}}function Bg(e){Xm.value=e}function Vg(e){Q.value=e,Xm.value=void 0,Gm.value=[],Km.value=!1,qm.value=[],Ym.value=Um,Oh(),mg()}async function Hg(e){if(th.value.pagedComponentTree)return Bh.expand(e);let t=$();t&&Q.value&&Rg(await t.command({type:`components:expandTreeNode`,appId:Q.value,payload:{componentId:e}}),`Unable to expand component tree node`)}var Ug=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{It as $,wr as A,Lr as B,ao as C,re as Ct,En as D,Se as Dt,Fa as E,oe as Et,zn as F,Yr as G,Xr as H,Vr as I,Hn as J,Zn as K,Hr as L,ma as M,Bn as N,_r as O,Gn as P,Wt as Q,Fr as R,Da as S,be as St,$r as T,fe as Tt,lr as U,Wr as V,vi as W,Vn as X,Un as Y,R as Z,Aa as _,m as _t,Mm as a,Zt as at,cr as b,v as bt,kl as c,ee as ct,io as d,me as dt,z as et,Ta as f,N as ft,Xi as g,o as gt,ya as h,s as ht,ug as i,nn as it,Or as j,Dr as k,W as l,c as lt,ja as m,g as mt,dg as n,qt as nt,Uf as o,Xt as ot,ba as p,f as pt,Yn as q,fg as r,on as rt,Ol as s,k as st,Ug as t,Lt as tt,_n as u,j as ut,ka as v,pe as vt,Kn as w,de as wt,Va as x,ye as xt,G as y,_ as yt,Rr as z};
@@ -0,0 +1,3 @@
1
+ import{A as e,D as t,Dt as n,I as r,J as i,K as a,M as o,Y as s,a as c,b as l,d as u,et as d,f,h as p,i as ee,j as te,l as m,m as h,nt as g,o as _,ot as v,p as y,t as b,wt as x,y as S,z as C}from"./_plugin-vue_export-helper-7VP3XblN.js";import{n as ne}from"./RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi-Ko5HVMry.js";import{t as re}from"./InspectorState-CxoxiYJv.js";import{t as ie}from"./InspectorTree-B5ZtDinH.js";import{n as ae,t as w}from"./splitpanes.esm-8w8po8hd.js";import{n as T,t as oe}from"./component-tree-C3C12cZe.js";var E={class:`absolute inset-0 z-10 min-h-0 flex flex-col bg-base p-2`},D={class:`h-10 shrink-0 flex items-center justify-between border-b border-base px-2`},O={class:`m-0 min-h-0 flex-1 overflow-auto p-3 text-3.25 leading-5`},k={class:`render-code`},se=b(l({__name:`RenderCode`,props:{code:{}},emits:[`close`],setup(t,{emit:i}){let a=t,c=i,l=g();e(async()=>{try{l.value=(await _(async()=>{let{parseRow:e}=await import(`./nue-glow-CTWFs9wv.js`);return{parseRow:e}},[],import.meta.url)).parseRow}catch{}});let d=u(()=>{let e=l.value;return e?a.code.split(`
2
+ `).flatMap((t,n)=>{let r=[];n&&r.push({text:`
3
+ `,tag:``});let i=0;for(let n of e(t,`js`))n.start<i||n.end<=n.start||(r.push({text:t.slice(i,n.start),tag:``}),r.push({text:t.slice(n.start,n.end),tag:n.tag}),i=n.end);return r.push({text:t.slice(i),tag:``}),r.filter(e=>e.text)}):[{text:a.code,tag:``}]});return(e,t)=>{let i=C(`tooltip`);return o(),p(`div`,E,[f(`div`,D,[t[2]||=f(`span`,{class:`font-500 text-3.5`},`Render Code`,-1),s((o(),p(`button`,{class:`h-7 w-7 rounded-1 border-0 bg-transparent color-muted flex items-center justify-center hover:bg-active hover:color-base`,type:`button`,"aria-label":`Close render code`,onClick:t[0]||=e=>c(`close`)},[...t[1]||=[f(`span`,{class:`i-carbon-close text-4`,"aria-hidden":`true`},null,-1)]])),[[i,`Close render code`,void 0,{bottom:!0}]])]),f(`pre`,O,[f(`code`,k,[(o(!0),p(m,null,r(d.value,(e,t)=>(o(),p(`span`,{key:t,class:x(e.tag&&`syntax-${e.tag}`)},n(e.text),3))),128))])])])}}}),[[`__scopeId`,`data-v-829b14bf`]]),A=`vue-devtools-next:component-tree-preferences`;function ce(e,t){return M().selections[j(e,t)]}function le(e,t,n){let r=M();r.selections[j(e,t)]=T(n),N(r)}function ue(e){return new Set(M().favorites[e]??[])}function de(e,t){let n=M(),r=new Set(n.favorites[e]??[]),i=T(t);return r.has(i)?r.delete(i):r.add(i),r.size?n.favorites[e]=[...r]:delete n.favorites[e],N(n),r}function fe(e,t){return e.find(e=>T(e)===t)}function j(e,t){return JSON.stringify([e,t])}function M(){let e={favorites:{},selections:{}};if(typeof window>`u`)return e;try{let t=window.localStorage.getItem(A);if(!t)return e;let n=JSON.parse(t);return I(n)?{favorites:F(n.favorites),selections:P(n.selections)}:e}catch{return e}}function N(e){if(typeof window<`u`)try{window.localStorage.setItem(A,JSON.stringify(e))}catch{}}function P(e){return I(e)?Object.fromEntries(Object.entries(e).filter(e=>typeof e[1]==`string`)):{}}function F(e){return I(e)?Object.fromEntries(Object.entries(e).flatMap(([e,t])=>Array.isArray(t)?[[e,t.filter(e=>typeof e==`string`)]]:[])):{}}function I(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}var L=l({__name:`components`,setup(n){let{apps:r,cancelComponentInspection:s,cancelComponentTreeExpansion:l,components:f,componentTreeTruncated:m,componentInspecting:g,componentState:_,componentStateLoading:b,error:x,expandComponentTreeNode:C,getSelectedComponentRenderCode:T,highlightComponent:E,inspectComponentInPage:D,inspectSelectedComponentDom:O,openSelectedComponentInEditor:k,openInEditorAvailable:A,scrollToSelectedComponent:j,selectComponent:M,selectedComponent:N,selectedComponentId:P,selectedApp:F,routerSnapshot:I,showMoreComponentStateEntries:L,unhighlightComponent:R}=ee(),{settings:pe}=c(),z=d(),B=d(!1),V=d(``),H=d(``),U=d(``),W=d(!1),G=d(new Set),K,q=``,J=u(()=>I.value.currentRoute?.path??I.value.currentRoute?.fullPath??`/`),me=u(()=>`${F.value?.id??`default`}:${F.value?.name??`app`}:${J.value}`),he=u(()=>oe(f.value,V.value,G.value,pe.highlightUpdates)),ge=u(()=>N.value?{id:N.value.id,label:N.value.name}:void 0),Y=u(()=>[{icon:V.value.trim()===`is:favorite`?`i-carbon-star-filled`:`i-carbon-star`,tooltip:V.value.trim()===`is:favorite`?`Show all components`:`Show favorite components`,ariaLabel:`Toggle favorite components filter`,active:V.value.trim()===`is:favorite`,pressed:V.value.trim()===`is:favorite`,rounded:`full`,run:_e},{icon:`i-carbon-select-window`,tooltip:g.value?`Cancel selecting component`:`Select component in the page`,ariaLabel:`Select component in the page`,active:g.value,pressed:g.value,rounded:`full`,run:Q}]);a([F,J,f],([e,t,n])=>{if(!e||!n.length)return;let r=`${e.id}:${e.name}`,i=`${r}:${t}`,a=n.some(e=>e.id===P.value);if(i===q&&a)return;G.value=ue(r);let o=fe(n,ce(r,t));q=i,o&&o.id!==P.value&&M(o.id)},{immediate:!0});let X=u(()=>{let e=N.value;if(!e)return[];let t=[{icon:`i-carbon-view`,tooltip:`Scroll to component`,ariaLabel:`Scroll to component`,run:be},{icon:`i-carbon-code`,tooltip:`Show render code`,ariaLabel:`Show render code`,run:Ce}];return e.file&&A.value&&t.push({icon:`i-carbon-launch`,tooltip:`Open in Editor`,ariaLabel:`Open component source in editor`,run:Se}),t.push({icon:`i-carbon-debug`,tooltip:`Inspect DOM`,ariaLabel:`Inspect DOM`,run:xe}),t});a(P,()=>{U.value=``,W.value=!1});async function Z(e){ye(e),M(e),await t()}async function Q(){if(g.value){await s();return}let e=await D();e&&(V.value=``,await Z(e.componentId))}function _e(){V.value=V.value.trim()===`is:favorite`?``:`is:favorite`}function ve(e){let t=F.value,n=f.value.find(t=>t.id===e);t&&n&&(G.value=de(`${t.id}:${t.name}`,n))}function ye(e){let t=F.value,n=f.value.find(t=>t.id===e);t&&n&&le(`${t.id}:${t.name}`,J.value,n)}async function be(){await $(j)}async function xe(){await $(O)}async function Se(){await $(k)}async function Ce(){await $(async()=>{let e=await T();e&&(U.value=e,W.value=!0)})}async function $(e){try{await e()}catch{}}function we(e){Y.value[e]?.run()}function Te(e){X.value[e]?.run()}function Ee(e){De(e.target)||(e.key.toLowerCase()===`s`&&(e.ctrlKey||e.metaKey)?(e.preventDefault(),Q()):e.key===`Escape`&&g.value&&(e.preventDefault(),s()))}function De(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||e.isContentEditable}return e(()=>{K=new ResizeObserver(([e])=>{B.value=e.contentRect.width<700}),z.value&&K.observe(z.value),window.addEventListener(`keydown`,Ee)}),te(()=>{l(),K?.disconnect(),window.removeEventListener(`keydown`,Ee),g.value&&s(),R()}),(e,t)=>(o(),p(`section`,{ref_key:`container`,ref:z,class:`h-full min-h-0`},[S(v(ae),{class:`h-full min-h-0 overflow-hidden`,horizontal:B.value},{default:i(()=>[v(r).length>1?(o(),y(v(w),{key:0,class:`h-full min-h-0`,"min-size":`12`,size:`18`},{default:i(()=>[S(ne)]),_:1})):h(``,!0),S(v(w),{class:`h-full min-h-0`,"min-size":`18`,size:`25`},{default:i(()=>[S(ie,{filter:V.value,"onUpdate:filter":t[0]||=e=>V.value=e,actions:Y.value,"component-labels":``,"collapse-unloaded":v(m),"default-expand-depth":2,"empty-text":v(x)??`No components`,nodes:he.value,"no-matching-text":`No matching components`,placeholder:`Find components...`,"selected-node-id":v(P),"state-key":me.value,"refresh-visible":!1,onAction:we,onExpand:t[1]||=e=>void v(C)(e),onCollapse:v(l),onHover:t[2]||=e=>void v(E)(e),onLeave:t[3]||=()=>void v(R)(),onSelect:t[4]||=e=>void Z(e),onToggleFavorite:ve},null,8,[`filter`,`actions`,`collapse-unloaded`,`empty-text`,`nodes`,`selected-node-id`,`state-key`,`onCollapse`])]),_:1}),S(v(w),{class:`h-full min-h-0`,"min-size":`28`},{default:i(()=>[S(re,{filter:H.value,"onUpdate:filter":t[6]||=e=>H.value=e,"empty-text":`No state entries`,"filter-placeholder":`Filter State...`,loading:v(b),"loading-text":`Loading state`,"node-actions":X.value,"no-matching-text":`No matching state entries`,"no-selection-text":`No component selected`,"select-prompt":`Select a component`,"selected-label-mode":`component`,"selected-node":ge.value,"selected-node-id":v(P),"show-more-text":`Show more`,state:v(_),onNodeAction:Te,onShowMore:t[7]||=()=>void v(L)()},{default:i(()=>[W.value&&U.value?(o(),y(se,{key:0,code:U.value,onClose:t[5]||=e=>W.value=!1},null,8,[`code`])):h(``,!0)]),_:1},8,[`filter`,`loading`,`node-actions`,`selected-node`,`selected-node-id`,`state`])]),_:1})]),_:1},8,[`horizontal`])],512))}});export{L as default};
@@ -1 +1 @@
1
- import{A as e,J as t,K as n,M as r,b as i,d as a,et as o,h as s,i as c,j as l,m as u,ot as d,p as f,y as p}from"./_plugin-vue_export-helper-CdLdzBIA.js";import{n as m}from"./RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi-By717ouR.js";import{t as h}from"./InspectorState-CXPxKmUf.js";import{t as g}from"./InspectorTree-BgcS7_BF.js";import{n as _,t as v}from"./splitpanes.esm-Cr-PYWE3.js";import{o as y,s as b}from"./index-Ctr1uf78.js";var x=`vue-devtools-next:custom-inspector:selected-nodes`,S=i({__name:`CustomInspectorPanel`,props:{inspector:{}},setup(i){let y=i,{apps:b,callInspectorAction:S,callInspectorNodeAction:C,clearExpandedValues:w,connected:T,error:E,fetchInspectorState:D,fetchInspectorTree:O,inspectorInvalidations:k,selectInspectorNode:ee,selectedAppId:A,runtimeVersion:j}=c(),M=o(),N=o(!1),P=o(``),F=o(``),I=o(``),L=o([]),R=o(),z=o(!1),B=o(!1),V,H=0,U=0,W=a(()=>y.inspector.id),G=a(()=>X(L.value).find(e=>e.id===I.value)),K=a(()=>{let e=W.value;return e?k.value[e]:void 0});n([W,A,j,T],()=>{re(),q()},{immediate:!0,flush:`sync`}),n(P,()=>void q(),{flush:`sync`}),n(I,e=>{U++,F.value=``,R.value=void 0,B.value=!1,w(),e&&J(e)},{flush:`sync`}),n(()=>K.value?.tree,(e,t)=>{e!==void 0&&e!==t&&q()}),n(()=>K.value?.state,(e,t)=>{if(e===void 0||e===t)return;let n=K.value?.nodeId;n&&n!==I.value||J(I.value)});async function q(){let e=W.value;if(!e||!T.value)return;let t=++H;z.value=!0;try{let n=await O(e,P.value);if(t!==H)return;L.value=n;let r=X(L.value),i=ie(e),a=r.some(e=>e.id===I.value)?I.value:i&&r.some(e=>e.id===i)?i:r[0]?.id??``;I.value===a?a&&J(a):I.value=a,Z(e,I.value)}catch(e){if(t!==H)return;L.value=[],R.value=void 0,I.value=``,E.value=e instanceof Error?e.message:String(e)}finally{t===H&&(z.value=!1)}}async function J(e){let t=W.value;if(!t||!e||!T.value)return;let n=++U;B.value=!0;try{let r=await D(t,e);if(n!==U)return;w(),R.value=r}catch(e){if(n!==U)return;R.value=void 0,E.value=e instanceof Error?e.message:String(e)}finally{n===U&&(B.value=!1)}}async function Y(e){let t=W.value;t&&T.value&&(I.value=e,Z(t,e),await ee(t,e))}async function te(e){let t=W.value;t&&T.value&&(await S(t,e),await q())}async function ne(e){let t=W.value,n=I.value;t&&n&&T.value&&(await C(t,n,e),await J(n))}function re(){H++,U++,z.value=!1,B.value=!1,w(),L.value=[],R.value=void 0,I.value=``}function X(e){return e.flatMap(e=>[e,...X(e.children??[])])}function ie(e){return $()[Q(e)]}function Z(e,t){let n=$(),r=Q(e);t?n[r]=t:delete n[r],ae(n)}function Q(e){return`${A.value??`default`}:${e}`}function $(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(x);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:Object.fromEntries(Object.entries(t).filter(e=>typeof e[0]==`string`&&typeof e[1]==`string`))}catch{return{}}}function ae(e){if(typeof window<`u`)try{window.localStorage.setItem(x,JSON.stringify(e))}catch{}}return e(()=>{V=new ResizeObserver(([e])=>{N.value=e.contentRect.width<760}),M.value&&V.observe(M.value)}),l(()=>{H++,U++,V?.disconnect()}),(e,n)=>(r(),s(`section`,{ref_key:`container`,ref:M,class:`h-full min-h-0`},[p(d(_),{class:`h-full min-h-0 overflow-hidden`,horizontal:N.value},{default:t(()=>[d(b).length>1?(r(),f(d(v),{key:0,class:`h-full min-h-0`,"min-size":`12`,size:`18`},{default:t(()=>[p(m)]),_:1})):u(``,!0),p(d(v),{class:`h-full min-h-0`,"min-size":`22`,size:d(b).length>1?34:40},{default:t(()=>[p(g,{filter:P.value,"onUpdate:filter":n[0]||=e=>P.value=e,actions:i.inspector.actions,loading:z.value,nodes:L.value,placeholder:i.inspector.treeFilterPlaceholder??`Search tree...`,"selected-node-id":I.value,"state-key":`${d(A)??`default`}:${W.value??`inspector`}`,onAction:n[1]||=e=>void te(e),onRefresh:n[2]||=()=>void q(),onSelect:n[3]||=e=>void Y(e)},null,8,[`filter`,`actions`,`loading`,`nodes`,`placeholder`,`selected-node-id`,`state-key`])]),_:1},8,[`size`]),p(d(v),{class:`h-full min-h-0`,"min-size":`30`},{default:t(()=>[p(h,{filter:F.value,"onUpdate:filter":n[4]||=e=>F.value=e,"filter-placeholder":i.inspector.stateFilterPlaceholder??`Filter state...`,loading:B.value,"node-actions":i.inspector.nodeActions,"no-selection-text":i.inspector.noSelectionText??`No node selected`,"select-prompt":`Select a node`,"selected-node":G.value,"selected-node-id":I.value,state:R.value,onNodeAction:n[5]||=e=>void ne(e)},null,8,[`filter`,`filter-placeholder`,`loading`,`node-actions`,`no-selection-text`,`selected-node`,`selected-node-id`,`state`])]),_:1})]),_:1},8,[`horizontal`])],512))}}),C=i({__name:`custom-inspector`,setup(e){let t=y(),i=b(),{connected:o,inspectors:s,loading:l}=c(),d=a(()=>{let e=t.params.inspectorId;return typeof e==`string`?e:``}),p=a(()=>s.value.find(e=>e.id===d.value)),m=a(()=>o.value&&!l.value&&!!d.value&&!p.value);return n(m,e=>{e&&i.replace(`/components`)},{immediate:!0}),(e,t)=>p.value?(r(),f(S,{key:0,inspector:p.value},null,8,[`inspector`])):u(``,!0)}});export{C as default};
1
+ import{A as e,J as t,K as n,M as r,b as i,d as a,et as o,h as s,i as c,j as l,m as u,ot as d,p as f,y as p}from"./_plugin-vue_export-helper-7VP3XblN.js";import{n as m}from"./RecycleScroller.vue_vue_type_script_setup_true_lang-C7mZBLYi-Ko5HVMry.js";import{t as h}from"./InspectorState-CxoxiYJv.js";import{t as g}from"./InspectorTree-B5ZtDinH.js";import{n as _,t as v}from"./splitpanes.esm-8w8po8hd.js";import{o as y,s as b}from"./index-DppbHKeW.js";var x=`vue-devtools-next:custom-inspector:selected-nodes`,S=i({__name:`CustomInspectorPanel`,props:{inspector:{}},setup(i){let y=i,{apps:b,callInspectorAction:S,callInspectorNodeAction:C,clearExpandedValues:w,connected:T,error:E,fetchInspectorState:D,fetchInspectorTree:O,inspectorInvalidations:k,selectInspectorNode:ee,selectedAppId:A,runtimeVersion:j}=c(),M=o(),N=o(!1),P=o(``),F=o(``),I=o(``),L=o([]),R=o(),z=o(!1),B=o(!1),V,H=0,U=0,W=a(()=>y.inspector.id),G=a(()=>X(L.value).find(e=>e.id===I.value)),K=a(()=>{let e=W.value;return e?k.value[e]:void 0});n([W,A,j,T],()=>{re(),q()},{immediate:!0,flush:`sync`}),n(P,()=>void q(),{flush:`sync`}),n(I,e=>{U++,F.value=``,R.value=void 0,B.value=!1,w(),e&&J(e)},{flush:`sync`}),n(()=>K.value?.tree,(e,t)=>{e!==void 0&&e!==t&&q()}),n(()=>K.value?.state,(e,t)=>{if(e===void 0||e===t)return;let n=K.value?.nodeId;n&&n!==I.value||J(I.value)});async function q(){let e=W.value;if(!e||!T.value)return;let t=++H;z.value=!0;try{let n=await O(e,P.value);if(t!==H)return;L.value=n;let r=X(L.value),i=ie(e),a=r.some(e=>e.id===I.value)?I.value:i&&r.some(e=>e.id===i)?i:r[0]?.id??``;I.value===a?a&&J(a):I.value=a,Z(e,I.value)}catch(e){if(t!==H)return;L.value=[],R.value=void 0,I.value=``,E.value=e instanceof Error?e.message:String(e)}finally{t===H&&(z.value=!1)}}async function J(e){let t=W.value;if(!t||!e||!T.value)return;let n=++U;B.value=!0;try{let r=await D(t,e);if(n!==U)return;w(),R.value=r}catch(e){if(n!==U)return;R.value=void 0,E.value=e instanceof Error?e.message:String(e)}finally{n===U&&(B.value=!1)}}async function Y(e){let t=W.value;t&&T.value&&(I.value=e,Z(t,e),await ee(t,e))}async function te(e){let t=W.value;t&&T.value&&(await S(t,e),await q())}async function ne(e){let t=W.value,n=I.value;t&&n&&T.value&&(await C(t,n,e),await J(n))}function re(){H++,U++,z.value=!1,B.value=!1,w(),L.value=[],R.value=void 0,I.value=``}function X(e){return e.flatMap(e=>[e,...X(e.children??[])])}function ie(e){return $()[Q(e)]}function Z(e,t){let n=$(),r=Q(e);t?n[r]=t:delete n[r],ae(n)}function Q(e){return`${A.value??`default`}:${e}`}function $(){if(typeof window>`u`)return{};try{let e=window.localStorage.getItem(x);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:Object.fromEntries(Object.entries(t).filter(e=>typeof e[0]==`string`&&typeof e[1]==`string`))}catch{return{}}}function ae(e){if(typeof window<`u`)try{window.localStorage.setItem(x,JSON.stringify(e))}catch{}}return e(()=>{V=new ResizeObserver(([e])=>{N.value=e.contentRect.width<760}),M.value&&V.observe(M.value)}),l(()=>{H++,U++,V?.disconnect()}),(e,n)=>(r(),s(`section`,{ref_key:`container`,ref:M,class:`h-full min-h-0`},[p(d(_),{class:`h-full min-h-0 overflow-hidden`,horizontal:N.value},{default:t(()=>[d(b).length>1?(r(),f(d(v),{key:0,class:`h-full min-h-0`,"min-size":`12`,size:`18`},{default:t(()=>[p(m)]),_:1})):u(``,!0),p(d(v),{class:`h-full min-h-0`,"min-size":`22`,size:d(b).length>1?34:40},{default:t(()=>[p(g,{filter:P.value,"onUpdate:filter":n[0]||=e=>P.value=e,actions:i.inspector.actions,loading:z.value,nodes:L.value,placeholder:i.inspector.treeFilterPlaceholder??`Search tree...`,"selected-node-id":I.value,"state-key":`${d(A)??`default`}:${W.value??`inspector`}`,onAction:n[1]||=e=>void te(e),onRefresh:n[2]||=()=>void q(),onSelect:n[3]||=e=>void Y(e)},null,8,[`filter`,`actions`,`loading`,`nodes`,`placeholder`,`selected-node-id`,`state-key`])]),_:1},8,[`size`]),p(d(v),{class:`h-full min-h-0`,"min-size":`30`},{default:t(()=>[p(h,{filter:F.value,"onUpdate:filter":n[4]||=e=>F.value=e,"filter-placeholder":i.inspector.stateFilterPlaceholder??`Filter state...`,loading:B.value,"node-actions":i.inspector.nodeActions,"no-selection-text":i.inspector.noSelectionText??`No node selected`,"select-prompt":`Select a node`,"selected-node":G.value,"selected-node-id":I.value,state:R.value,onNodeAction:n[5]||=e=>void ne(e)},null,8,[`filter`,`filter-placeholder`,`loading`,`node-actions`,`no-selection-text`,`selected-node`,`selected-node-id`,`state`])]),_:1})]),_:1},8,[`horizontal`])],512))}}),C=i({__name:`custom-inspector`,setup(e){let t=y(),i=b(),{connected:o,inspectors:s,loading:l}=c(),d=a(()=>{let e=t.params.inspectorId;return typeof e==`string`?e:``}),p=a(()=>s.value.find(e=>e.id===d.value)),m=a(()=>o.value&&!l.value&&!!d.value&&!p.value);return n(m,e=>{e&&i.replace(`/components`)},{immediate:!0}),(e,t)=>p.value?(r(),f(S,{key:0,inspector:p.value},null,8,[`inspector`])):u(``,!0)}});export{C as default};