@devframes/hub-ui 0.9.18 → 0.9.20
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.
- package/dist/client/embedded.js +3327 -3294
- package/dist/client/standalone/assets/{DockStandalone-9hV4q-BV.js → DockStandalone-DIFLZoNP.js} +2 -2
- package/dist/client/standalone/assets/context-C_Mcy8_k.js +1 -0
- package/dist/client/standalone/assets/index-JnVg6JWi.js +9 -0
- package/dist/client/standalone/assets/{popup-BxQKEU7g.js → popup-C6onps3n.js} +3 -3
- package/dist/client/standalone/index.html +2 -20
- package/package.json +12 -12
- package/dist/client/standalone/assets/context-DqwXZ41X.js +0 -1
- package/dist/client/standalone/assets/index-DuHeA4a8.js +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,B as t,D as n,H as r,I as i,J as a,K as o,N as s,O as c,W as l,X as u,Y as d,a as f,et as p,i as m,it as h,k as g,n as ee,o as te,tt as _,y as v}from"./popup-C6onps3n.js";import{Ct as y,Dt as b,Et as x,M as S,St as C,Tt as ne,a as re,bt as ie,ct as w,dt as T,i as E,l as ae,n as oe,nt as D,o as se,pt as ce,r as O,rt as k,t as le,ut as A,wt as j,yt as ue}from"./index-JnVg6JWi.js";var M=new WeakMap;async function de(t,n,r,i){if(M.has(n))return M.get(n);let a=await n.sharedState.get(`devframe:commands`,{initialValue:[]}),o=E(a),s=A(new Map),l=E(r),u=S(()=>l.value.commandShortcuts??{}),d=T(!1),f=T(null),p=te(),m=()=>i?i():{clientType:t,dockOpen:!1,paletteOpen:d.value,dockSelectedId:``,popupOpen:p.value},h=S(()=>[...o.value,...Array.from(s.values())]),ee=S(()=>{let e=m();return c(h.value,e).filter(e=>e.showInPalette!==!1)});function _(e){let t=Array.isArray(e)?e:[e];for(let e of t)s.set(e.id,e);return()=>{for(let e of t)s.delete(e.id)}}function v(e){f.value=e??null,d.value=!0}async function y(t,...r){let i=g(h.value,t);if(!i)throw Error(`Command "${t}" not found`);if(i.when){let n=m();if(!e(i.when,n))throw Error(`Command "${t}" is not available in the current context`)}if(i.source===`server`)return n.call(`hub:commands:execute`,t,...r);if(i.action)return i.action(...r);throw Error(`Command "${t}" has no action`)}function b(e){let t=u.value[e];return t===void 0?g(h.value,e)?.keybindings??[]:t}typeof window<`u`&&fe(m,h,b,y);let x=A({commands:h,paletteCommands:ee,register:_,execute:y,getKeybindings:b,settings:w(r),paletteOpen:d,paletteScopeId:f,openPalette:v});return M.set(n,x),x}function fe(t,r,i,a){let o=o=>{let c=s(o);if(!c||c===`Mod`||c===`Shift`||c===`Alt`)return;let l=t(),u=n(r,i);for(let{id:t,keybinding:n}of u){if(n.key!==c)continue;let i=g(r.value,t);if(!i?.when||e(i.when,l)){o.preventDefault(),o.stopPropagation(),a(t).catch(console.error);return}}};window.addEventListener(`keydown`,o,{capture:!0}),D(f(),(e,t)=>{t&&t.removeEventListener(`keydown`,o,{capture:!0}),e&&e.addEventListener(`keydown`,o,{capture:!0})})}function pe(e){let t=[],n;async function r(){if(e.isTrusted===!0)return n===void 0&&(n=new Promise(async e=>{for(;t.length>0;)await t.shift()();e()})),n}async function i(n){return e.isTrusted===!0&&t.length!==0&&await r(),e.isTrusted===!0&&t.length===0?await n():new Promise(e=>{t.push(async()=>{e(await n())})})}e.events.on(`rpc:is-trusted:updated`,e=>{e&&t.length>0&&r()});let a={add(t){return i(async()=>{let n=await e.call(`hub:messages:add`,t);return{get entry(){return n},get id(){return n.id},async update(t){let r=await e.call(`hub:messages:update`,n.id,t);return r&&(n=r),r??void 0},async dismiss(){await e.call(`hub:messages:remove`,n.id)}}})},remove(t){return i(()=>e.call(`hub:messages:remove`,t))},clear(){return i(()=>e.call(`hub:messages:clear`))},info:(e,t)=>a.add({...t,message:e,level:`info`}),warn:(e,t)=>a.add({...t,message:e,level:`warn`}),error:(e,t)=>a.add({...t,message:e,level:`error`}),success:(e,t)=>a.add({...t,message:e,level:`success`}),debug:(e,t)=>a.add({...t,message:e,level:`debug`})};return a}function N(e){switch(e.type){case`action`:return e.action;case`custom-render`:return e.renderer;case`iframe`:return e.clientScript;default:return}}async function P(e,t){let n=N(e);if(!n?.importFrom)throw Error(`[@devframes/hub-ui] Dock entry "${e.id}" carries no client script to run`);let r=_(n.importFrom,{template:t.rpc.connectionMeta?.configs?.dock?.clientModuleResolution,metaBaseUrl:t.rpc.connection?.metaBaseUrl});try{let e=(await C(()=>import(r),[],import.meta.url))[n.importName??`default`];if(typeof e!=`function`)throw Error(`[@devframes/hub-ui] "${r}" exports no callable "${n.importName??`default`}"`);await e(t)}catch(e){throw console.error(`[@devframes/hub-ui] Error executing client script from ${r}${p(n.importFrom,r)}`,e),e}}var F=new Map;function me(e,t){if(e.type!==`action`&&F.has(e.id))return F.get(e.id);let n=P(e,t);return e.type!==`action`&&(F.set(e.id,n),n.catch(()=>{F.get(e.id)===n&&F.delete(e.id)})),n}var I=new WeakMap;async function L(e,n,s,c,f=T(!0)){if(I.has(n))return I.get(n);let{entries:p,initialSyncComplete:g}=await re(n),_={},C=await n.sharedState.get(x,{initialValue:_}),M=E(C),fe=se(C,_),N=A(new Map),P=S(()=>{let e=p.value,t;if(N.size===0)t=e;else{let n=new Set,r=[];for(let t of e)n.add(t.id),r.push(N.get(t.id)??t);for(let[e,t]of N)n.has(e)||r.push(t);t=r}return t.some(e=>e.id===d.id)?t:[...t,d]});c||=T(oe());let F={...c.value},L=T(F.open&&F.selectedDockId!=null),R=S({get:()=>c.value.selectedDockId,set:e=>{c.value.selectedDockId=e}}),he=S({get:()=>c.value.selectedDockRoute,set:e=>{c.value.selectedDockRoute=e}}),z=S(()=>L.value?null:P.value.find(e=>e.id===R.value)??a.find(e=>e.id===R.value)??null),B=A(new Map);k(()=>{for(let e of P.value){if(B.has(e.id)){B.get(e.id).entryMeta=e;continue}B.set(e.id,O(e,z))}});let V=(e,t=!1)=>{if(N.has(e.id)&&!t)throw Error(`[@devframes/hub-ui] a client dock "${e.id}" is already registered; pass force to overwrite`);return N.set(e.id,e),B.has(e.id)||B.set(e.id,O(e,z)),{update:t=>{if(t.id!=null&&t.id!==e.id)throw Error(`[@devframes/hub-ui] a client dock id is immutable ("${e.id}")`);let n=N.get(e.id);n&&N.set(e.id,{...n,...t})},dispose:()=>{N.delete(e.id)&&(B.delete(e.id),R.value===e.id&&(R.value=null))}}},ge=e=>{if(!N.has(e.id))throw Error(`[@devframes/hub-ui] no client dock "${e.id}" to update; register it first`);N.set(e.id,e)};s||=T(le());let H=y(),U,_e,W=w(await(async()=>(_e||=n.sharedState.get(`devframe:user-settings`,{initialValue:ne()}),_e))()),ve=E(W),G,ye=te(),K=()=>({clientType:e,dockOpen:c.value.open,paletteOpen:G?.paletteOpen??!1,dockSelectedId:R.value??``,popupOpen:ye.value}),be=new Map,xe=e=>{if(e.type===`group`)return o(P.value,e,c.value.groupLastChildIds?.[e.id],K())?.id??t(P.value,e.id)[0]?.id??!1;if(e.type===`iframe`&&e.subTabs){let t=e.frameId??e.id,n=be.get(t);if(n&&n!==e.id&&P.value.some(e=>e.id===n))return n}return null},Se=async e=>{if(!(e.type===`action`||e.type===`custom-render`||e.type===`iframe`&&e.clientScript))return;let t=pe(n);await me(e,A({...ce(U),current:B.get(e.id),messages:t}))},Ce=e=>{e.type===`iframe`&&e.frameId&&!e.subTabs&&be.set(e.frameId,e.id),e.type!==`action`&&e.groupId&&((c.value.groupLastChildIds??={})[e.groupId]=e.id),e.type!==`iframe`&&(c.value.selectedDockRoute=null)},q=async(t=null)=>{if(t==null)return L.value=!1,R.value=null,c.value.open=!1,c.value.selectedDockRoute=null,!0;if(t===`~client-auth-notice`)return L.value=!1,R.value=t,c.value.open=!0,!0;let n=P.value.find(e=>e.id===t);if(!n)return!1;let r=xe(n);return r===!1?!1:r===null?n.type===`action`&&await m(e,n.id)!=null?!1:(L.value=!1,R.value=n.id,c.value.open=!0,await Se(n),Ce(n),!0):q(r)},J=async e=>R.value===e?q(null):q(e),Y=new Map,X=new Map,we=(e,t)=>{let n=e.frameId??e.id,r=t=>{let r=Y.get(n);if(r){if(r.iframe===t)return;r.dispose(),Y.delete(n)}let i=ue({frameId:n,anchor:e,iframe:t,window:t.ownerDocument?.defaultView??globalThis,docks:{register:V,switchEntry:q,getStateById:e=>B.get(e)}});Y.set(n,{iframe:t,dispose:i.dispose})};t.domElements.iframe&&r(t.domElements.iframe),t.events.on(`dom:iframe:mounted`,r)};D(P,e=>{let t=new Set;for(let n of e){if(n.type!==`iframe`||!n.subTabs||(t.add(n.id),X.has(n.id)))continue;let e=B.get(n.id);e&&(X.set(n.id,n.frameId??n.id),we(n,e))}for(let[e,n]of[...X])t.has(e)||(X.delete(e),Y.get(n)?.dispose(),Y.delete(n))},{immediate:!0}),n.client.register({name:b.broadcast.docksActivate,type:`action`,handler:e=>{e?.dockId&&q(e.dockId)}});let Z=n.connectionMeta.configs?.ui?.dockPreferences?.categoryOrder,Te=S(()=>i(P.value,ve.value,{whenContext:K(),collapseGroups:!0,categoryOrderOverride:Z}));G=await de(e,n,W,K),G.register([{id:`devframes:toggle-palette`,source:`client`,title:`Toggle Command Palette`,icon:`ph:magnifying-glass-duotone`,showInPalette:!1,keybindings:[{key:`Mod+K`}],action:()=>{G.paletteOpen=!G.paletteOpen}},{id:`devframes:close-panel`,source:`client`,title:`Close Panel`,icon:`ph:x-circle-duotone`,when:`dockOpen && !paletteOpen`,keybindings:[{key:`Escape`}],action:()=>{c.value.open=!1,R.value=null}},{id:`devframes:open-settings`,source:`client`,title:`Open Settings`,icon:`ph:gear-duotone`,action:()=>{q(`~settings`)}},{id:`devframes:hide`,source:`client`,title:`Hide ${ae().value.productName}`,icon:`ph:eye-slash-duotone`,when:`clientType == embedded`,action:()=>{window.dispatchEvent(new CustomEvent(u))}},{id:`devframes:dock-mode`,source:`client`,title:`Dock Mode`,icon:`ph:layout-duotone`,when:e===`embedded`?`clientType == embedded && !popupOpen`:void 0,children:[{id:`devframes:dock-mode:float`,source:`client`,title:`Float Mode`,icon:`ph:cards-three-duotone`,when:`!popupOpen`,action:()=>{s.value.mode=`float`}},{id:`devframes:dock-mode:edge`,source:`client`,title:`Edge Mode`,icon:`ph:square-half-bottom-duotone`,when:`!popupOpen`,action:()=>{s.value.mode=`edge`}}]}]);let Ee;k(()=>{Ee?.();let e=e=>({id:v(e.id),source:`client`,title:e.title,icon:l(e.icon),action:()=>{J(e.id)}}),n=(e,t)=>{if(t){J(t);return}if(G.paletteOpen&&G.paletteScopeId===e){G.paletteOpen=!1;return}G.openPalette(e)},i=r(P.value),a=P.value.filter(e=>e.type!==`~builtin`).filter(e=>!(e.groupId&&i.has(e.groupId))).flatMap(r=>{if(r.type!==`group`)return[e(r)];let i=t(P.value,r.id,ve.value,{whenContext:K()}),a=o(P.value,r,c.value.groupLastChildIds?.[r.id],K())?.id;if(i.length===0&&!a)return[];let s=v(r.id);return[{...e(r),action:()=>n(s,a??(i.length===1?i[0].id:void 0)),children:i.map(e)}]});a.length>0&&(Ee=G.register({id:`devframes:docks`,source:`client`,title:`Docks`,icon:`ph:layout-duotone`,children:a}))});let Q=F.selectedDockId==null?null:F.selectedDockRoute;U=A({panel:{get state(){let e;e=f.value?c.value.open?`open`:`closed`:`hidden`;let t={state:e};return R.value!==null&&(t.selectedDockId=R.value),t},events:w(H),store:s,session:c,isDragging:!1,isResizing:!1,isVertical:S(()=>s.value.position===`left`||s.value.position===`right`),consumeBootRoute:e=>{if(Q!=null&&e===F.selectedDockId){let e=Q;return Q=null,e}return null}},docks:{selectedId:R,selectedRoute:he,selected:z,entries:P,entryToStateMap:w(B),groupedEntries:Te,categoryOrder:Z?{...j,...Z}:j,settings:W,getStateById:e=>B.get(e),switchEntry:q,toggleEntry:J,register:V,update:ge},commands:G,when:{get context(){return K()}},connection:{get status(){return n.status},get error(){return n.connectionError},events:n.events},renderers:w(ie({context:()=>U,manifest:()=>M.value})),rpc:w(n),clientType:e}),ee(e,async e=>{let t=P.value.find(t=>t.id===e);return!t||t.type!==`action`?!1:q(t.id)});let De=async()=>{n.isTrusted||await new Promise(e=>{let t=n.events.on(h.client.isTrustedUpdated,n=>{n&&(t(),e())})})},Oe=async()=>{let e=F.selectedDockId;if(F.open&&e!=null&&(await Promise.all([De(),g,fe]),L.value)){if(R.value!==e){L.value=!1;return}L.value=!1,await q(e)}},$=U.panel.state;return D([f,()=>c.value.open,R],()=>{let e=U.panel.state;(e.state!==$.state||e.selectedDockId!==$.selectedDockId)&&($=e,H.emit(b.client.docksPanelStateChanged,e))},{flush:`post`}),Oe(),I.set(n,U),U}export{L as createDocksContext};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./context-C_Mcy8_k.js","./popup-C6onps3n.js","./DockStandalone-DIFLZoNP.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),String.fromCharCode;var e=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,t=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,n=/^([/\\]\s*){2,}[^/\\]/,r=/\/$|\/\?|\/#/,i=/^\.?\//;function a(r,i={}){return typeof i==`boolean`&&(i={acceptRelative:i}),i.strict?e.test(r):t.test(r)||(i.acceptRelative?n.test(r):!1)}function o(e=``,t){return t?r.test(e):e.endsWith(`/`)}function s(e=``,t){if(!t)return(o(e)?e.slice(0,-1):e)||`/`;if(!o(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...s]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(s.length>0?`?${s.join(`?`)}`:``)+r}function c(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(o(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...s]=n.split(`?`);return a+`/`+(s.length>0?`?${s.join(`?`)}`:``)+r}function l(e,t){if(u(t)||a(e))return e;let n=s(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return f(n,e)}function u(e){return!e||e===`/`}function d(e){return e&&e!==`/`}function f(e,...t){let n=e||``;for(let e of t.filter(e=>d(e)))if(n){let t=e.replace(i,``);n=c(n)+t}else n=e;return n}function p(e,n){let r=e.match(t);return r||=e.match(/^\/{2,}/),r?n+e.slice(r[0].length):n+e}var m={bus:{docksEntryUpdated:`docks:entry:updated`,docksActivate:`docks:activate`,terminalsSessionUpdated:`terminals:session:updated`,messagesAdded:`messages:added`,messagesUpdated:`messages:updated`,messagesRemoved:`messages:removed`,messagesCleared:`messages:cleared`,commandsRegistered:`commands:registered`,commandsUnregistered:`commands:unregistered`},rpc:{docksActivate:`hub:docks:activate`,commandsExecute:`hub:commands:execute`,messagesAdd:`hub:messages:add`,messagesUpdate:`hub:messages:update`,messagesRemove:`hub:messages:remove`,messagesClear:`hub:messages:clear`,terminalsWrite:`hub:terminals:write`,terminalsResize:`hub:terminals:resize`,terminalsTerminate:`hub:terminals:terminate`,terminalsRestart:`hub:terminals:restart`,terminalsRemove:`hub:terminals:remove`},client:{docksPanelStateChanged:`panel:state:changed`},broadcast:{docksActivate:`devframe:docks:activate`,terminalsUpdated:`devframe:terminals:updated`,messagesUpdated:`devframe:messages:updated`},sharedState:{docks:`devframe:docks`,docksActive:`devframe:docks:active`,commands:`devframe:commands`,userSettings:`devframe:user-settings`,dockRenderers:`devframe:dock-renderers`},stream:{terminals:`devframe:terminals`},postMessage:{frameNav:`devframe:frame-nav`},broadcastChannel:{docksActivate:`devframe:docks:activate`}},h={framework:-100,default:0,app:100,ui:150,data:250,web:300,performance:350,advanced:400,docs:500,"~builtin":1e3},g=m.sharedState.dockRenderers,_=()=>({docksHidden:[],docksCategoriesHidden:[],docksPinned:[],docksCustomOrder:{},commandShortcuts:{}});function v(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 y={blue:v(34,39),cyan:v(36,39),gray:v(90,39),green:v(32,39),red:v(31,39),yellow:v(33,39),bold:v(1,22),dim:v(2,22),reset:v(0,0),underline:v(4,24)};function b(e,...t){return typeof e==`function`?e(...t):e}var x=Error.captureStackTrace,S=class e extends Error{name;code;docs;fix;sources;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.code=this.name=t.code,this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,x?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function C(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function w(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||C(r,i),s=(e={},n={})=>{let r=new S({code:i,why:b(a.why,e),fix:b(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);for(let e of t)e(r,n);return r};n[i]=s}return n}function T(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 E={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`,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`},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`}},ee=T(y);function te(e,{method:t=`warn`}={}){console[t](ee(e))}function ne(e){return w({...e,reporters:[te,...e.reporters??[]]})}function re(e){return typeof e==`string`?`'${e}'`:new oe().serialize(e)}var D=` _-,;:!?.'"()[]{}@*/\\&#%\`^+<=>|~$0123456789abcdefghijklmnopqrstuvwxyz`,ie=(function(){let e=new Uint8Array(128);for(let t=0;t<69;t++)e[D.charCodeAt(t)]=t+1;for(let t=65;t<=90;t++)e[t]=e[t+32];return e})();function ae(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&&ie[n]?ie[n]:n+128,s=a<128&&ie[a]?ie[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 oe=(function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?ae(e,t):n===`number`&&r===`number`?e-t:ae(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(ae),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})(),se=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],ce=[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],le=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,O=[],ue=class{_data=new de;_hash=new de([...se]);_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)O[n]=e[t+n]|0;else{let e=O[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=O[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;O[n]=t+O[n-7]+i+O[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+ce[n]+O[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=de.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 de(t,i)}},de=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(le.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 fe(e){return new ue().finalize(e).toBase64()}function pe(e){return fe(re(e))}function me(e){return pe(e)}function he(){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 ge=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function _e(e=21){let t=``,n=e;for(;n--;)t+=ge[Math.random()*64|0];return t}var ve=Symbol.for(`immer-nothing`),ye=Symbol.for(`immer-draftable`),k=Symbol.for(`immer-state`),be=[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 A(e,...t){{let n=be[e],r=Ue(n)?n.apply(null,t):n;throw Error(`[Immer] ${r}`)}}var j=Object,xe=j.getPrototypeOf,Se=`constructor`,Ce=`prototype`,we=`configurable`,Te=`enumerable`,Ee=`writable`,De=`value`,Oe=e=>!!e&&!!e[k];function ke(e){return e?Me(e)||ze(e)||!!e[ye]||!!e[Se]?.[ye]||Be(e)||Ve(e):!1}var Ae=j[Ce][Se].toString(),je=new WeakMap;function Me(e){if(!e||!He(e))return!1;let t=xe(e);if(t===null||t===j[Ce])return!0;let n=j.hasOwnProperty.call(t,Se)&&t[Se];if(n===Object)return!0;if(!Ue(n))return!1;let r=je.get(n);return r===void 0&&(r=Function.toString.call(n),je.set(n,r)),r===Ae}function Ne(e,t,n=!0){Pe(e)===0?(n?Reflect.ownKeys(e):j.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Pe(e){let t=e[k];return t?t.type_:ze(e)?1:Be(e)?2:Ve(e)?3:0}var Fe=(e,t,n=Pe(e))=>n===2?e.has(t):j[Ce].hasOwnProperty.call(e,t),Ie=(e,t,n=Pe(e))=>n===2?e.get(t):e[t],Le=(e,t,n,r=Pe(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Re(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var ze=Array.isArray,Be=e=>e instanceof Map,Ve=e=>e instanceof Set,He=e=>typeof e==`object`,Ue=e=>typeof e==`function`,We=e=>typeof e==`boolean`;function Ge(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var Ke=e=>He(e)?e?.[k]:null,qe=e=>e.copy_||e.base_,Je=e=>e.modified_?e.copy_:e.base_;function Ye(e,t){if(Be(e))return new Map(e);if(Ve(e))return new Set(e);if(ze(e))return Array[Ce].slice.call(e);let n=Me(e);if(t===!0||t===`class_only`&&!n){let t=j.getOwnPropertyDescriptors(e);delete t[k];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[Ee]===!1&&(a[Ee]=!0,a[we]=!0),(a.get||a.set)&&(t[i]={[we]:!0,[Ee]:!0,[Te]:a[Te],[De]:e[i]})}return j.create(xe(e),t)}{let t=xe(e);if(t!==null&&n)return{...e};let r=j.create(t);return j.assign(r,e)}}function Xe(e,t=!1){return $e(e)||Oe(e)||!ke(e)?e:(Pe(e)>1&&j.defineProperties(e,{set:Qe,add:Qe,clear:Qe,delete:Qe}),j.freeze(e),t&&Ne(e,(e,t)=>{Xe(t,!0)},!1),e)}function Ze(){A(2)}var Qe={[De]:Ze};function $e(e){return e===null||!He(e)||j.isFrozen(e)}var et=`MapSet`,tt=`Patches`,nt=`ArrayMethods`,rt={};function it(e){let t=rt[e];return t||A(0,e),t}var at=e=>!!rt[e];function ot(e,t){rt[e]||(rt[e]=t)}var st,ct=()=>st,lt=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:at(et)?it(et):void 0,arrayMethodsPlugin_:at(nt)?it(nt):void 0});function ut(e,t){t&&(e.patchPlugin_=it(tt),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function dt(e){ft(e),e.drafts_.forEach(mt),e.drafts_=null}function ft(e){e===st&&(st=e.parent_)}var pt=e=>st=lt(st,e);function mt(e){let t=e[k];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ht(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[k].modified_&&(dt(t),A(4)),ke(e)&&(e=gt(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[k].base_,e,t)}else e=gt(t,n);return _t(t,e,!0),dt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===ve?void 0:e}function gt(e,t){if($e(t))return t;let n=t[k];if(!n)return Tt(t,e.handledSet_,e);if(!yt(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);Ct(n,e)}return n.copy_}function _t(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Xe(t,n)}function vt(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var yt=(e,t)=>e.scope_===t,bt=[];function xt(e,t,n,r){let i=qe(e),a=e.type_;if(r!==void 0&&Ie(i,r,a)===t){Le(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;Ne(i,(e,n)=>{if(Oe(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??bt;for(let e of o)Le(i,e,n,a)}function St(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!yt(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=Je(i);xt(e,i.draft_??i,a,n),Ct(i,r)})}function Ct(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)}vt(e)}}function wt(e,t,n){let{scope_:r}=e;if(Oe(n)){let i=n[k];yt(i,r)&&i.callbacks_.push(function(){Pt(e),xt(e,n,Je(i),t)})}else ke(n)&&e.callbacks_.push(function(){let i=qe(e);e.type_===3?i.has(n)&&Tt(n,r.handledSet_,r):Ie(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Tt(Ie(e.copy_,t,e.type_),r.handledSet_,r)})}function Tt(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Oe(e)||t.has(e)||!ke(e)||$e(e)?e:(t.add(e),Ne(e,(r,i)=>{if(Oe(i)){let t=i[k];yt(t,n)&&(Le(e,r,Je(t),e.type_),vt(t))}else ke(i)&&Tt(i,t,n)}),e)}function Et(e,t){let n=ze(e),r={type_:+!!n,scope_:t?t.scope_:ct(),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=Dt;n&&(i=[r],a=Ot);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Dt={get(e,t){if(t===k)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=qe(e);if(!Fe(i,t,e.type_))return jt(e,i,t);let a=i[t];if(e.finalized_||!ke(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&Ge(t))return a;if(a===kt(e.base_,t)||At(e,t,a)){Pt(e);let n=e.type_===1?+t:t,r=It(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in qe(e)},ownKeys(e){return Reflect.ownKeys(qe(e))},set(e,t,n){let r=Mt(qe(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=kt(qe(e),t),i=r?.[k];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Re(n,r)&&(n!==void 0||Fe(e.base_,t,e.type_)))return!0;Pt(e),Nt(e)}return e.copy_[t]===n&&(n!==void 0||Fe(e.copy_,t,e.type_))||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),wt(e,t,n),!0)},deleteProperty(e,t){return Pt(e),kt(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Nt(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=qe(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[Ee]:!0,[we]:e.type_!==1||t!==`length`,[Te]:r[Te],[De]:n[t]}},defineProperty(){A(11)},getPrototypeOf(e){return xe(e.base_)},setPrototypeOf(){A(12)}},Ot={};for(let e in Dt){let t=Dt[e];Ot[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Ot.deleteProperty=function(e,t){return isNaN(parseInt(t))&&A(13),Ot.set.call(this,e,t,void 0)},Ot.set=function(e,t,n){return t!==`length`&&isNaN(parseInt(t))&&A(14),Dt.set.call(this,e[0],t,n,e[0])};function kt(e,t){let n=e[k];return(n?qe(n):e)[t]}function At(e,t,n){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ke(n)||n[k]?!1:e.baseRefs_.has(n)}function jt(e,t,n){let r=Mt(t,n);return r?De in r?r[De]:r.get?.call(e.draft_):void 0}function Mt(e,t){if(!(t in e))return;let n=xe(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=xe(n)}}function Nt(e){e.modified_||(e.modified_=!0,e.parent_&&Nt(e.parent_))}function Pt(e){e.copy_||=(e.assigned_=new Map,Ye(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ft=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(Ue(e)&&!Ue(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}Ue(t)||A(6),n!==void 0&&!Ue(n)&&A(7);let r;if(ke(e)){let i=pt(this),a=It(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?dt(i):ft(i)}return ut(i,n),ht(r,i)}if(!e||!He(e)){if(r=t(e),r===void 0&&(r=e),r===ve&&(r=void 0),this.autoFreeze_&&Xe(r,!0),n){let t=[],i=[];it(tt).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}A(1,e)},this.produceWithPatches=(e,t)=>{if(Ue(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]},We(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),We(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),We(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ke(e)||A(8),Oe(e)&&(e=Lt(e));let t=pt(this),n=It(t,e,void 0);return n[k].isManual_=!0,ft(t),n}finishDraft(e,t){let n=e&&e[k];(!n||!n.isManual_)&&A(9);let{scope_:r}=n;return ut(r,t),ht(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=it(tt).applyPatches_;return Oe(e)?r(e,t):this.produce(e,e=>r(e,t))}};function It(e,t,n,r){let[i,a]=Be(t)?it(et).proxyMap_(t,n):Ve(t)?it(et).proxySet_(t,n):Et(t,n);return(n?.scope_??ct()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?St(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 Lt(e){return Oe(e)||A(10,e),Rt(e)}function Rt(e){if(!ke(e)||$e(e))return e;let t=e[k],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ye(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Ye(e,!0);return Ne(n,(e,t)=>{Le(n,e,Rt(t))},r),t&&(t.finalized_=!1),n}function zt(){be.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=Ke(Ie(e,n.key_)),i=Ie(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&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||Fe(e,o)))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=Ie(n,r),!He(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?.[k];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;Ne(e.assigned_,(e,l)=>{let u=Ie(o,e,c),f=Ie(s,e,c),p=l?Fe(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===ve?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=Pe(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===Se)&&A(19),Ue(o)&&n===Ce&&A(19),o=Ie(o,n),(o===null||!He(o))&&A(18,i.join(`/`))}let s=Pe(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:A(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:A(17,a)}}),e}function u(e){if(!ke(e))return e;if(ze(e))return e.map(u);if(Be(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(Ve(e))return new Set(Array.from(e).map(u));let t=Object.create(xe(e));for(let n in e)t[n]=u(e[n]);return Fe(e,ye)&&(t[ye]=e[ye]),t}function d(e){return Oe(e)?u(e):e}ot(tt,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}globalThis.Iterator?.from;var Bt=new Ft,Vt=Bt.produce,Ht=Bt.produceWithPatches.bind(Bt),Ut=Bt.applyPatches.bind(Bt),Wt=1e3;function Gt(e,t){if(e.add(t),e.size>Wt){let t=e.values().next().value;t!==void 0&&e.delete(t)}}function Kt(e){let{enablePatches:t=!1}=e;t&&zt();let n=he(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=_e())=>{i.has(t)||(zt(),r=Ut(r,e),Gt(i,t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=_e())=>{if(!i.has(a)){if(Gt(i,a),t){let[t,i]=Ht(r,e);if(t===r)return;r=t,n.emit(`updated`,r,i,a)}else{let t=Vt(r,e);if(t===r)return;r=t,n.emit(`updated`,r,void 0,a)}}},syncIds:i}}var qt=typeof self==`object`?self:globalThis,Jt=new Set([`Error`,`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`,`AggregateError`]),Yt=new Set([`Boolean`,`Number`,`String`,`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float16Array`,`Float32Array`,`Float64Array`,`BigInt64Array`,`BigUint64Array`]);function Xt(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=Jt.has(e)?qt[e]:void 0;return n(new(r??qt.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`&&Yt.has(a))return n(new qt[a](o),i);throw TypeError(`unable to deserialize unsafe or unknown type: ${String(a)}`)};return r}function Zt(e){return Xt(new Map,e)(0)}var Qt=``,{toString:$t}={},{keys:en}=Object;function tn(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=$t.call(e).slice(8,-1);switch(n){case`Array`:return[1,Qt];case`Object`:return[2,Qt];case`Date`:return[3,Qt];case`RegExp`:return[4,Qt];case`Map`:return[5,Qt];case`Set`:return[6,Qt];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function nn([e,t]){return e===0&&(t===`function`||t===`symbol`)}function rn(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]=tn(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 en(r))(e||!nn(tn(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||!(nn(tn(n))||nn(tn(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!nn(tn(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function an(e,t={}){let n=[];return rn(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:on,stringify:sn}=JSON,cn={json:!0,lossy:!0};function ln(e){return Zt(on(e))}function un(e){return sn(an(e,cn))}function dn(e){return Zt(e)}function fn(e){return un(e)}function pn(e){return ln(e)}var mn=256,hn=class extends Error{name=`StreamClosedError`};function gn(e={}){let t=e.id??_e(),n=Math.max(0,e.replayWindow??0),r=he(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new hn(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&(a.length-n===1?a.shift():a.splice(0,a.length-n))),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=vn(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function _n(e={}){let t=e.id??_e(),n=Math.max(1,e.highWaterMark??mn),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function vn(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 yn=128;function bn(e){return e.replace(/[^\w-]+/g,`_`).slice(0,yn)}function xn(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Sn=Math.random.bind(Math),Cn=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function wn(e=21){let t=``,n=e;for(;n--;)t+=Cn[Sn()*64|0];return t}var Tn=6e4,En=e=>e,Dn=En,{clearTimeout:On,setTimeout:kn}=globalThis;function An(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=En,deserialize:s=Dn,resolver:c,bind:l=`rpc`,timeout:u=Tn,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}=xn(),_=wn();s.i=_;let v;async function y(n=s){return u>=0&&(v=kn(()=>{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{On(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&&(On(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}var jn=`__connection.json`,Mn=`__DEVFRAME_CONNECTION__`,Nn=`x-birpc-session`,Pn=`__rpc-dump/index.json`,Fn=`devframe:services`,In=`devframe_otp`,Ln=`devframe_auth_token`;E.postMessage.remoteAssetsError;var Rn=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>me(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()}},zn=ne({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 Bn(e){if(e.agent&&e.jsonSerializable===!1)throw zn.DF0019({name:e.name});e.agent&&!e.jsonSerializable&&(e.jsonSerializable=!0)}async function Vn(e,t){let n=e[`~standard`].validate(t);return n instanceof Promise?await n:n}function Hn(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 Un(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 Vn(i,n[r]);if(a.issues)throw zn.DF0043({name:e,index:r,issues:Hn(a.issues)})}return r}async function Wn(e,t,n){if(!t)return n;let r=await Vn(t,n);if(r.issues)throw zn.DF0044({name:e,issues:Hn(r.issues)});return n}async function Gn(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 Kn(e,t){let n=e.handler;if(!n){let r=await Gn(e,t);if(!r.handler)throw zn.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 Un(e.name,r,t),o=await a(...n);return await Wn(e.name,i,o)}}var qn=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 Kn(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 zn.DF0021({name:e.name});Bn(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 zn.DF0022({name:e.name});Bn(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 Kn(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw zn.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 Jn(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 Xn(t,`undefined`,r,e);return n}return i!==null&&Yn(i,r,e,t),n})}function Yn(e,t,n,r){if(typeof e==`bigint`)throw Xn(r,`BigInt`,t,n);if(typeof e!=`object`)return;if(e instanceof Map)throw Xn(r,`Map`,t,n);if(e instanceof Set)throw Xn(r,`Set`,t,n);if(e instanceof Date)throw Xn(r,`Date`,t,n);if(Array.isArray(e))return;let i=Object.getPrototypeOf(e);if(i!==null&&i!==Object.prototype)throw Xn(r,e.constructor?.name??`class instance`,t,n)}function Xn(e,t,n,r){let i=Zn(n,r);return zn.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Zn(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}var Qn=`__DEVFRAME_CONNECTION_META__`,$n=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function er(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 tr(){return er(Mn)}function nr(){return er(Qn)}function rr(e){if(e)return e;try{let e=localStorage.getItem($n);if(e)return e}catch{}return er($n)}function ir(e){globalThis[Mn]=e,globalThis[Qn]={...e.connectionMeta,baseUrl:e.metaBaseUrl},e.authToken&&ar(e.authToken)}function ar(e){try{localStorage.setItem($n,e)}catch{}globalThis[$n]=e;let t=tr();t&&(globalThis[Mn]={...t,authToken:e})}function or(e){let t=l(jn,e);try{return new URL(t,globalThis.location?.href).href}catch{return t}}function sr(e,t){return t&&t!==e.authToken?{...e,authToken:t}:e}function cr(){let e=tr();if(e)return sr(e,rr()??e.authToken??e.connectionMeta.authToken);let t=nr();if(t)return{connectionMeta:t,metaBaseUrl:t.baseUrl??or(`./`),authToken:rr(t.authToken)}}async function lr(e={}){if(e.connection){let t=sr(e.connection,rr(e.authToken??e.connection.authToken??e.connection.connectionMeta.authToken));return ir(t),t}let t=Array.isArray(e.baseURL)?e.baseURL:[e.baseURL??`./`];if(e.connectionMeta){let n={connectionMeta:e.connectionMeta,metaBaseUrl:or(t[0]??`./`),authToken:rr(e.authToken??e.connectionMeta.authToken)};return ir(n),n}let n=cr();if(n){let t=sr(n,rr(e.authToken??n.authToken??n.connectionMeta.authToken));return ir(t),t}let r=[];for(let n of t){let t=l(jn,n),i=or(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:rr(e.authToken??r.authToken)};return ir(o),o}catch(e){r.push(e)}}throw Error(`Failed to get connection meta from ${t.join(`, `)}`,{cause:r})}var ur=class extends Error{name=`DevframeConnectionError`;kind;constructor(e,t,n){super(t,n),this.kind=e}};function dr(e=In){try{let t=globalThis.location?.hash?.replace(/^#/,``)??``;return new URLSearchParams(t).get(e)||void 0}catch{return}}function fr(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 pr(e=In){let t=dr(e);return t&&fr(e),t}async function mr(e,t={}){let n=pr(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}function hr(e){let t={},n=new WeakMap,r,i=()=>(r??=e.sharedState.get(Fn,{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 gr(e){let t=new Map,n=new Map,r=new Map,i=new Set,a=e.connectionMeta.backend===`static`;function o(e,t){let n=r.get(e);return n&&typeof n==`object`&&!Array.isArray(n)&&typeof t==`object`&&!Array.isArray(t)?{...n,...t}:t}e.client.register({name:E.broadcast.clientStateUpdated,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.mutate(()=>o(e,n),r)}}),e.client.register({name:E.broadcast.clientStatePatch,type:`event`,handler:(e,n,r)=>{let i=t.get(e);i&&!i.syncIds.has(r)&&i.patch(n,r)}});function s(t,n){let r=[];return r.push(n.on(`updated`,(n,r,i)=>{a||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,i):e.callEvent(`devframe:rpc:server-state:set`,t,n,i))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return i.add(e),()=>{i.delete(e)}},delete(e){let i=n.get(e);n.delete(e);let a=t.delete(e);return r.delete(e),i?.(),a},get:async(c,l)=>{if(l?.initialValue!==void 0&&r.set(c,l.initialValue),t.has(c))return t.get(c);let u=Kt({initialValue:l?.initialValue,enablePatches:!1});async function d(){if(a||e.callEvent(`devframe:rpc:server-state:subscribe`,c),l?.initialValue!==void 0){t.set(c,u);for(let e of i)e(c);return e.call(`devframe:rpc:server-state:get`,c).then(e=>{e!==void 0&&u.mutate(()=>o(c,e))}).catch(e=>{console.error(`Error getting server state`,e)}),n.set(c,s(c,u)),u}{let r=await e.call(`devframe:rpc:server-state:get`,c);u.mutate(()=>o(c,r)),t.set(c,u);for(let e of i)e(c);return n.set(c,s(c,u)),u}}return new Promise(t=>{if(e.isTrusted)d().then(t);else{t(u);let n=!1;e.events.on(E.client.isTrustedUpdated,e=>{e&&!n&&(n=!0,d())})}})}}}var _r=new Map;function vr(e=_r){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?Jn(n,r??``):`s:${fn(n)}`},deserialize:e=>{let n=e.startsWith(`s:`)?pn(e.slice(2)):JSON.parse(e);return n.t===`q`&&n.i&&n.m&&t.set(n.i,n.m),n}}}function yr(){}function br(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 xr(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 Sr(e){let{onConnected:t=yr,onError:n=yr,onDisconnected:r=yr,definitions:i,fetch:a=globalThis.fetch.bind(globalThis)}=e,o=e.url;e.authToken&&(o=`${o}${o.includes(`?`)?`&`:`?`}${Ln}=${encodeURIComponent(e.authToken)}`);let s=vr(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){if(e===`session`){f(n),t();return}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=br(r);if(!e)break;r=e.rest;let{event:t,data:n}=xr(e.frame);n.length>0&&_(t,n.join(`
|
|
4
|
+
`))}}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`));return}try{let n=await a(o,{method:`POST`,headers:{"content-type":`text/plain; charset=utf-8`,[Nn]: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 Cr(e,t){let{channel:n,rpcOptions:r={}}=t;return An(e,{...n,timeout:-1,...r,proxify:!1})}function wr(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(E.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 ur(`connection`,`[devframe] Not connected to the devframe server`,{cause:u??void 0}):l===`unauthorized`?new ur(`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(E.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 ur(`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(E.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(E.client.connectionError,e),m(new ur(`connection`,`[devframe] Connection to the devframe server failed`,{cause:e}))},onDisconnected(){l!==`error`&&f(`disconnected`),m(new ur(`connection`,`[devframe] Disconnected from the devframe server`,{cause:u??void 0}))}}),y=Cr(a.functions,{channel:v,rpcOptions:o});a.register({name:E.broadcast.authRevoked,type:`event`,handler:()=>{c=!1;let e=new ur(`auth`,`[devframe] The devframe server revoked this client's trust`);f(`unauthorized`,e),i.emit(E.client.connectionError,e),m(e),i.emit(E.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 ur(`auth`,`[devframe] The devframe server refused this client's credentials`);f(`unauthorized`,e),i.emit(E.client.connectionError,e)}return i.emit(E.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(E.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(E.client.error,n,t),Promise.reject(n)):g(y.$call(...e),t)},callEvent:(...e)=>{let t=h();if(t){i.emit(E.client.error,t,String(e[0]));return}return y.$callEvent(...e)},callOptional:(...e)=>{let t=String(e[0]),n=h();return n?(i.emit(E.client.error,n,t),Promise.reject(n)):g(y.$callOptional(...e),t)},close:()=>{v.close()}}}function Tr(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 Er(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},sseOptions:s={},callTimeout:c=0}=e,l=Tr(n.sse,r??`./`,location);return wr({transport:`sse`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Sr({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 Dr(e){let{name:t,message:n,cause:r,...i}=e,a=r instanceof Error?r:Or(r)?Dr(r):r,o=a===void 0?Error(n):Error(n,{cause:a});return o.name=t,Object.assign(o,i),o}function Or(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}function kr(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Ar(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function jr(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Mr(e){if(e.error)throw Dr(e.error);return e.output}function Nr(e){return e.some(e=>e!=null)}function Pr(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Fr(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?dn(e):e}function a(e,t){return i(Pr(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 jr(r)?Mr(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(kr(r)){if(Nr(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Ar(r)){let e=me(n),i=r.records[e];if(i)return Mr(await s(i,r.serialization));if(r.fallback)return Mr(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Nr(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 Ir(e){let t=Fr(await e.fetchJsonFromBases(Pn),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 Lr=``;function Rr(e,t){return`${e}${Lr}${t}`}function zr(e){let t=new Map,n=new Map;e.client.register({name:E.broadcast.streamingChunk,type:`event`,handler(e,n,r,i){t.get(Rr(e,n))?._push(r,i)}}),e.client.register({name:E.broadcast.streamingEnd,type:`event`,handler(e,n,r){let i=Rr(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:E.broadcast.streamingUploadCancel,type:`event`,handler(e,t){let r=Rr(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(E.client.isTrustedUpdated,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Lr);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=Rr(n,r),o=t.get(a);if(o)return o;let s=_n({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(E.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=Rr(t,r),a=n.get(i);if(a)return a;let o=gn({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 Br(){}var Vr=new Map;function Hr(e){let t=e.url;e.authToken&&(t=`${t}?${Ln}=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=Br,onError:i=Br,onDisconnected:a=Br,definitions:o=Vr}=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=vr(o);return{close:()=>{n.close()},on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN){n.send(e);return}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);return}i(Error(`Devframe WebSocket is not open; message dropped`))},serialize:s.serialize,deserialize:s.deserialize}}function Ur(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 p(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,r);return o.protocol=i,o.href}function Wr(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={},callTimeout:c=0}=e,l=Ur(n.websocket,r??`./`,location);return wr({transport:`websocket`,authToken:t,connectionMeta:n,events:i,clientRpc:a,rpcOptions:o,callTimeout:c,createChannel:e=>Hr({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 Gr(e){return e.includes(`:`)}function Kr(e,t){return Gr(t)?t:`${e}:${t}`}function qr(e){return{async get(t){return(await e()).value()[t]},async set(t,n){(await e()).mutate(e=>{e[t]=n})},async delete(t){(await e()).mutate(e=>{delete e[t]})},async all(){return(await e()).value()},async onChange(t){return(await e()).on(`updated`,e=>t(e))}}}function Jr(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return qr(a)}function Yr(e,t){return{global:Jr(e,t,`global`),project:Jr(e,t,`project`)}}function Xr(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(Gr(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(Kr(t,n),...r)),callEvent:((n,...r)=>e.callEvent(Kr(t,n),...r)),callOptional:((n,...r)=>e.callOptional(Kr(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(Kr(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(Kr(t,n),r,i),upload:(n,r)=>e.streaming.upload(Kr(t,n),r)}},settings:Yr(e,t),scope:e.scope}}var Zr=Object.freeze({type:`object`,additionalProperties:!0});function Qr(e){let t=e[`~standard`];if(t.jsonSchema)try{return t.jsonSchema.input({target:`draft-2020-12`})}catch{return Zr}return Zr}function $r(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]=Qr(e[r]),n.push(i)}return{type:`object`,properties:t,required:n,additionalProperties:!1}}function ei(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 ti(e,t){return ei(e,t)??[e]}function ni(){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 ri(e,t={}){let n=t.modelContext??ni();if(!n)return()=>{};let r=n,i=new Map,a=new Map;function o(t,n){let o=bn(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=r.registerTool({name:o,description:n.description,inputSchema:$r(t.args),annotations:{title:n.title??t.name,readOnlyHint:ii(t,n)===`read`,destructiveHint:ii(t,n)===`destructive`},execute:n=>ai(t,e.context,n)},{signal:c.signal});l&&`then`in l&&l.then(()=>{},()=>{}),a.set(o,t.name),i.set(t.name,()=>{c.abort(),l&&`unregister`in l&&typeof l.unregister==`function`&&l.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()}}function ii(e,t){if(t.safety)return t.safety;let n=e.type??`query`;return n===`static`||n===`query`?`read`:`action`}async function ai(e,t,n){try{let r=ti(n,e.args?.length);return{content:[{type:`text`,text:oi(await(await Kn(e,t))(...r))}]}}catch(e){return{isError:!0,content:[{type:`text`,text:si(e)}]}}}function oi(e){return e===void 0?`undefined`:typeof e==`string`?e:JSON.stringify(e,null,2)}function si(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 ci(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 li(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=he(),a=Array.isArray(t)?t:[t],o=await lr(e),{connectionMeta:s,metaBaseUrl:c,authToken:u}=o,d=a[0]??`./`;try{d=new URL(`.`,c).href}catch{}let f=new Rn({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),p={rpc:void 0},m=new qn(p),h=e.webmcp===!1?void 0:ri(m);async function g(e){let t=[d,...a.filter(e=>e!==d)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(l(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 _={authToken:u,connectionMeta:s,metaBaseUrl:c,events:i,clientRpc:m,callTimeout:e.callTimeout,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&f?.validate(e.m)){if(f.has(e.m,e.a))return i(f.cached(e.m,e.a));let n=await t(e);f.apply(e,n)}else await t(e)}}},v=ci(e.transport??`auto`,s),y=v===`static`?await Ir({fetchJsonFromBases:g}):v===`sse`?Er({..._,sseOptions:e.sseOptions}):Wr({..._,wsOptions:e.wsOptions}),b;try{b=new BroadcastChannel(`devframe-auth`)}catch{}let x,S=!1;function C(e){return((...t)=>S||!x?e(...t):x.then(()=>e(...t)))}function w(){try{h?.()}finally{try{b?.close()}finally{y.close?.()}}}let T={events:i,get isTrusted(){return y.isTrusted},get status(){return y.status},get connectionError(){return y.connectionError},get transport(){return y.transport??v},get connection(){return o},connectionMeta:s,ensureTrusted:y.ensureTrusted,requestTrust:y.requestTrust,requestTrustWithToken:async e=>(ar(e),o={...o,authToken:e},y.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await y.requestTrustWithCode(e);if(!t)return!1;ar(t),o={...o,authToken:t};try{b?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},requestAuthCode:e=>y.requestAuthCode(e),call:C(y.call),callEvent:C(y.callEvent),callOptional:C(y.callOptional),client:m,sharedState:void 0,services:void 0,streaming:void 0,cacheManager:f,scope:void 0,close:w};T.sharedState=gr(T),T.streaming=zr(T),T.services=hr(T);let E=new Map;T.scope=(e=>{if(!e)return T;let t=E.get(e);return t||(t=Xr(T,e),E.set(e,t)),t}),p.rpc=T;function ee(){try{return typeof window<`u`&&window.self===window.top}catch{return!1}}async function te(){if(e.simpleAuth!==!1&&ee()&&typeof globalThis.prompt==`function`)for(await T.requestAuthCode().catch(()=>{});!T.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 T.requestTrustWithCode(t))return}}async function ne(){let t=await y.requestTrust(),n=e.otpParam??`devframe_otp`,r=n?await mr(T,{param:n}):!1;t||r||T.isTrusted||await te()}return x=ne().then(()=>{S=!0},()=>{S=!0}),b&&(b.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&T.requestTrustWithToken(e.data.authToken)}),T}var ui=`modulepreload`,di=function(e,t){return new URL(e,t).href},fi={},pi=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),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?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=di(t,n),t=s(t),t in fi)return;fi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ui,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).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)})},mi=`__DEVFRAME_HUB_CLIENT_CONTEXT__`;function hi(e){globalThis[mi]=e}function gi(e){let{iframe:t,onChange:n}=e,r=e.initial,i,a=!1;function o(){try{let e=t.contentWindow;return e&&typeof e.location.href==`string`?e:null}catch{return null}}function s(){let e=o()?.location.href;e&&e!==`about:blank`&&e!==r&&(r=e,n(e))}function c(){let e=o();if(!e)return;let t=[];e.addEventListener(`popstate`,s),e.addEventListener(`hashchange`,s),t.push(()=>{e.removeEventListener(`popstate`,s),e.removeEventListener(`hashchange`,s)});let{navigation:n,history:r}=e;if(n&&(n.addEventListener(`currententrychange`,s),t.push(()=>n.removeEventListener(`currententrychange`,s))),r){let e={pushState:r.pushState,replaceState:r.replaceState};for(let t of[`pushState`,`replaceState`])r[t]=function(...n){e[t].apply(this,n),s()};t.push(()=>{r.pushState=e.pushState,r.replaceState=e.replaceState})}i=()=>{for(let e of t)try{e()}catch{}}}function l(){a||(i?.(),i=void 0,c(),s())}return t.addEventListener(`load`,l),c(),s(),()=>{a||(a=!0,t.removeEventListener(`load`,l),i?.(),i=void 0)}}var _i=m.postMessage.frameNav;function vi(e){let{frameId:t,anchor:n,iframe:r,docks:i}=e,a=e.window??globalThis,o=e.origin??yi(n.url),s=e.handshakeTimeoutMs??n.subTabs?.handshakeTimeoutMs??3e3,c=new Map,l=!1,u=null,d=!1,f;function p(e){r.contentWindow?.postMessage({channel:_i,v:1,frameId:t,from:`host`,...e},o)}function m(e){if(d||o!==`*`&&e.origin!==o)return;let n=e.data;if(n&&n.channel===_i&&n.v===1&&n.frameId===t&&n.from===`frame`)switch(n.type){case`ready`:case`manifest`:h(),v(n.tabs??[],n.current);break;case`navigated`:b(n.tabId)}}function h(){l=!0,f!==void 0&&(clearTimeout(f),f=void 0)}function g(e){return`${t}:${e}`}function _(e){let r={id:g(e.id),type:`iframe`,title:e.title,icon:e.icon??n.icon,frameId:t,url:e.fallbackUrl??bi(n.url,e.navTarget),navTarget:e.navTarget};e.badge!==void 0&&(r.badge=e.badge),e.order!==void 0&&(r.defaultOrder=e.order),e.category!==void 0&&(r.category=e.category),e.when!==void 0&&(r.when=e.when);let i=e.groupId??n.groupId;return i!==void 0&&(r.groupId=i),r}function v(e,t){let n=new Set(e.map(e=>e.id));for(let t of e){let e=_(t),n=c.get(t.id);if(n)n.tab=t,n.handle.update(e);else{let n={tab:t,handle:i.register(e)};n.off=i.getStateById(e.id)?.events.on(`entry:activated`,()=>y(t.id)),c.set(t.id,n)}}for(let[e,t]of[...c])n.has(e)||(t.off?.(),t.handle.dispose(),c.delete(e),u===e&&(u=null));t!==void 0&&t!==u&&c.has(t)&&(u=t,i.switchEntry(g(t)))}function y(e){if(d||e===u)return;let t=c.get(e);t&&(u=e,l?p({type:`navigate`,tabId:e,navTarget:t.tab.navTarget}):x(t.tab))}function b(e){!d&&e&&c.has(e)&&e!==u&&(u=e,i.switchEntry(g(e)))}function x(e){r.src=e.fallbackUrl??bi(n.url,e.navTarget)}return a.addEventListener(`message`,m),p({type:`hello`}),f=setTimeout(()=>{f=void 0},s),{get ready(){return l},get currentTabId(){return u},dispose(){if(!d){d=!0,f!==void 0&&clearTimeout(f),a.removeEventListener(`message`,m);for(let e of c.values())e.off?.(),e.handle.dispose();c.clear()}}}}function yi(e){let t=globalThis.location?.href;try{return new URL(e).origin}catch{}if(t)try{return new URL(e,t).origin}catch{}return`*`}function bi(e,t){let n=globalThis.location?.href,r;try{r=new URL(e,n??`http://localhost`)}catch{return e}let i=t.path.startsWith(`#`)?t.path.slice(1):t.path,a=`#${i}`,o=t.query?xi(t.query):``;return o&&(a+=(i.includes(`?`)?`&`:`?`)+o),r.hash=a,r.toString()}function xi(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(typeof r==`string`)t.set(n,r);else for(let e of r)t.append(n,e);return t.toString()}function Si(e){let t=new Map;for(let[n,r]of Object.entries(e.local??{}))t.set(n,r);let n=new Map,r=t=>e.manifest?.()[t];async function i(e,t){let n=(await pi(()=>import(t.importFrom),[],import.meta.url))[t.importName??`default`];return typeof n==`function`?n:void 0}async function a(e){let a=t.get(e);if(a)return a;let o=r(e);if(!o)return;let s=n.get(e);s||(s=i(e,o),n.set(e,s),s.catch(()=>n.delete(e)));let c=await s;return c&&!t.has(e)&&t.set(e,c),c}return{register(e,n){return t.set(e,n),()=>{t.get(e)===n&&t.delete(e)}},get:e=>t.get(e),has:e=>t.has(e)||r(e)!==void 0,async mount(t,n){let r;try{r=await a(t.type)}catch(e){return console.error(`[@devframes/hub] failed to load the renderer module for dock type "${t.type}"`,e),{status:`load-error`,error:e}}if(!r)return console.warn(`[@devframes/hub] no renderer registered for dock type "${t.type}" (entry "${t.id}")`),{status:`missing-renderer`};let i;try{i=await r({entry:t,container:n,context:e.context()})}catch(e){return console.error(`[@devframes/hub] renderer for dock type "${t.type}" failed to mount (entry "${t.id}")`,e),{status:`load-error`,error:e}}let o=!1,s,c=()=>{o||(o=!0,s?.(),i.dispose?.())};return s=e.onMounted?.(c,t),{status:`mounted`,dispose:c}}}}m.sharedState.docks,m.sharedState.commands,m.sharedState.userSettings,m.broadcast.docksActivate;function Ci(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var M={},wi=[],Ti=()=>{},Ei=()=>!1,Di=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Oi=e=>e.startsWith(`onUpdate:`),N=Object.assign,ki=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},Ai=Object.prototype.hasOwnProperty,P=(e,t)=>Ai.call(e,t),F=Array.isArray,ji=e=>Li(e)===`[object Map]`,Mi=e=>Li(e)===`[object Set]`,Ni=e=>Li(e)===`[object Date]`,I=e=>typeof e==`function`,L=e=>typeof e==`string`,Pi=e=>typeof e==`symbol`,R=e=>typeof e==`object`&&!!e,Fi=e=>(R(e)||I(e))&&I(e.then)&&I(e.catch),Ii=Object.prototype.toString,Li=e=>Ii.call(e),Ri=e=>Li(e).slice(8,-1),zi=e=>Li(e)===`[object Object]`,Bi=e=>L(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,Vi=Ci(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),Hi=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Ui=/-\w/g,z=Hi(e=>e.replace(Ui,e=>e.slice(1).toUpperCase())),Wi=/\B([A-Z])/g,Gi=Hi(e=>e.replace(Wi,`-$1`).toLowerCase()),Ki=Hi(e=>e.charAt(0).toUpperCase()+e.slice(1)),qi=Hi(e=>e?`on${Ki(e)}`:``),Ji=(e,t)=>!Object.is(e,t),Yi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Xi=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Zi=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{let t=L(e)?Number(e):NaN;return isNaN(t)?e:t},$i,ea=()=>$i||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ta(e){if(F(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=L(r)?aa(r):ta(r);if(i)for(let e in i)t[e]=i[e]}return t}if(L(e)||R(e))return e}var na=/;(?![^(]*\))/g,ra=/:([^]+)/,ia=/\/\*[^]*?\*\//g;function aa(e){let t={};return e.replace(ia,``).split(na).forEach(e=>{if(e){let n=e.split(ra);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function oa(e){let t=``;if(L(e))t=e;else if(F(e))for(let n=0;n<e.length;n++){let r=oa(e[n]);r&&(t+=r+` `)}else if(R(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function sa(e){if(!e)return null;let{class:t,style:n}=e;return t&&!L(t)&&(e.class=oa(t)),n&&(e.style=ta(n)),e}var ca=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,la=Ci(ca);ca+``;function ua(e){return!!e||e===``}function da(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=pa(e[r],t[r]);return n}function fa(e,t){if(e.size!==t.size)return!1;let n=Array.from(t),r=new Uint8Array(n.length);for(let t of e){let e=-1;for(let i=0;i<n.length;i++)if(!r[i]&&pa(t,n[i])){e=i;break}if(e<0)return!1;r[e]=1}return!0}function pa(e,t){if(e===t)return!0;let n=Ni(e),r=Ni(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=Pi(e),r=Pi(t),n||r)return e===t;if(n=F(e),r=F(t),n||r)return n&&r?da(e,t):!1;if(n=R(e),r=R(t),n||r){if(!n||!r)return!1;if(n=ji(e),r=ji(t),n||r||(n=Mi(e),r=Mi(t),n||r))return n&&r?fa(e,t):!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!pa(e[n],t[n]))return!1}}return String(e)===String(t)}function ma(e,t){return e.findIndex(e=>pa(e,t))}var ha=e=>!!(e&&e.__v_isRef===!0),ga=e=>L(e)?e:e==null?``:F(e)||R(e)&&(e.toString===Ii||!I(e.toString))?ha(e)?ga(e.value):JSON.stringify(e,_a,2):String(e),_a=(e,t)=>ha(t)?_a(e,t.value):ji(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[va(t,r)+` =>`]=n,e),{})}:Mi(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>va(e))}:Pi(t)?va(t):R(t)&&!F(t)&&!zi(t)?String(t):t,va=(e,t=``)=>Pi(e)?`Symbol(${e.description??t})`:e,B,ya=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&&B&&(B.active?(this.parent=B,this.index=(B.scopes||(B.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=B;try{return B=this,e()}finally{B=t}}}on(){++this._on===1&&(this.prevScope=B,B=this)}off(){if(this._on>0&&--this._on===0){if(B===this)B=this.prevScope;else{let e=B;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 ba(){return B}function xa(e,t=!1){B&&B.cleanups.push(e)}var V,Sa=new WeakSet,Ca=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,B&&(B.active?B.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Sa.has(this)&&(Sa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Da(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ba(this),Aa(this);let e=V,t=Ia;V=this,Ia=!0;try{return this.fn()}finally{ja(this),V=e,Ia=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Pa(e);this.deps=this.depsTail=void 0,Ba(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Sa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ma(this)&&this.run()}get dirty(){return Ma(this)}},wa=0,Ta,Ea;function Da(e,t=!1){if(e.flags|=8,t){e.next=Ea,Ea=e;return}e.next=Ta,Ta=e}function Oa(){wa++}function ka(){if(--wa>0)return;if(Ea){let e=Ea;for(Ea=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ta;){let t=Ta;for(Ta=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 Aa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ja(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Pa(r),Fa(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ma(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Na(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Na(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Va)||(e.globalVersion=Va,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ma(e))))return;e.flags|=2;let t=e.dep,n=V,r=Ia;V=e,Ia=!0;try{Aa(e);let n=e.fn(e._value);(t.version===0||Ji(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{V=n,Ia=r,ja(e),e.flags&=-3}}function Pa(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)Pa(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fa(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ia=!0,La=[];function Ra(){La.push(Ia),Ia=!1}function za(){let e=La.pop();Ia=e===void 0||e}function Ba(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=V;V=void 0;try{t()}finally{V=e}}}var Va=0,Ha=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}},Ua=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(!V||!Ia||V===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==V)t=this.activeLink=new Ha(V,this),V.deps?(t.prevDep=V.depsTail,V.depsTail.nextDep=t,V.depsTail=t):V.deps=V.depsTail=t,Wa(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=V.depsTail,t.nextDep=void 0,V.depsTail.nextDep=t,V.depsTail=t,V.deps===t&&(V.deps=e)}return t}trigger(e){this.version++,Va++,this.notify(e)}notify(e){Oa();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ka()}}};function Wa(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)Wa(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ga=new WeakMap,Ka=Symbol(``),qa=Symbol(``),Ja=Symbol(``);function H(e,t,n){if(Ia&&V){let t=Ga.get(e);t||Ga.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ua),r.map=t,r.key=n),r.track()}}function Ya(e,t,n,r,i,a){let o=Ga.get(e);if(!o){Va++;return}let s=e=>{e&&e.trigger()};if(Oa(),t===`clear`)o.forEach(s);else{let i=F(e),a=i&&Bi(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Ja||!Pi(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Ja)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ka)),ji(e)&&s(o.get(qa)));break;case`delete`:i||(s(o.get(Ka)),ji(e)&&s(o.get(qa)));break;case`set`:ji(e)&&s(o.get(Ka))}}ka()}function Xa(e,t){let n=Ga.get(e);return n&&n.get(t)}function Za(e){let t=U(e);return t===e?t:(H(t,`iterate`,Ja),Bo(e)?t:t.map(Uo))}function Qa(e){return H(e=U(e),`iterate`,Ja),e}function $a(e,t){return zo(e)?Wo(Ro(e)?Uo(t):t):Uo(t)}var eo={__proto__:null,[Symbol.iterator](){return to(this,Symbol.iterator,e=>$a(this,e))},concat(...e){return Za(this).concat(...e.map(e=>F(e)?Za(e):e))},entries(){return to(this,`entries`,e=>(e[1]=$a(this,e[1]),e))},every(e,t){return ro(this,`every`,e,t,void 0,arguments)},filter(e,t){return ro(this,`filter`,e,t,e=>e.map(e=>$a(this,e)),arguments)},find(e,t){return ro(this,`find`,e,t,e=>$a(this,e),arguments)},findIndex(e,t){return ro(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ro(this,`findLast`,e,t,e=>$a(this,e),arguments)},findLastIndex(e,t){return ro(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ro(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ao(this,`includes`,e)},indexOf(...e){return ao(this,`indexOf`,e)},join(e){return Za(this).join(e)},lastIndexOf(...e){return ao(this,`lastIndexOf`,e)},map(e,t){return ro(this,`map`,e,t,void 0,arguments)},pop(){return oo(this,`pop`)},push(...e){return oo(this,`push`,e)},reduce(e,...t){return io(this,`reduce`,e,t)},reduceRight(e,...t){return io(this,`reduceRight`,e,t)},shift(){return oo(this,`shift`)},some(e,t){return ro(this,`some`,e,t,void 0,arguments)},splice(...e){return oo(this,`splice`,e)},toReversed(){return Za(this).toReversed()},toSorted(e){return Za(this).toSorted(e)},toSpliced(...e){return Za(this).toSpliced(...e)},unshift(...e){return oo(this,`unshift`,e)},values(){return to(this,`values`,e=>$a(this,e))}};function to(e,t,n){let r=Qa(e),i=r[t]();return r!==e&&!Bo(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var no=Array.prototype;function ro(e,t,n,r,i,a){let o=Qa(e),s=o!==e&&!Bo(e),c=o[t];if(c!==no[t]){let t=c.apply(e,a);return s?Uo(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,$a(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 io(e,t,n,r){let i=Qa(e),a=i!==e&&!Bo(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=$a(e,t)),n.call(this,t,$a(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?$a(e,c):c}function ao(e,t,n){let r=U(e);H(r,`iterate`,Ja);let i=r[t](...n);return(i===-1||i===!1)&&Vo(n[0])?(n[0]=U(n[0]),r[t](...n)):i}function oo(e,t,n=[]){Ra(),Oa();let r=U(e)[t].apply(e,n);return ka(),za(),r}var so=Ci(`__proto__,__v_isRef,__isVue`),co=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(Pi));function lo(e){Pi(e)||(e=String(e));let t=U(this);return H(t,`has`,e),t.hasOwnProperty(e)}var uo=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?jo:Ao:i?ko:Oo).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=F(e);if(!r){let e;if(a&&(e=eo[t]))return e;if(t===`hasOwnProperty`)return lo}let o=Reflect.get(e,t,W(e)?e:n);if((Pi(t)?co.has(t):so(t))||(r||H(e,`get`,t),i))return o;if(W(o)){let e=a&&Bi(t)?o:o.value;return r&&R(e)?Fo(e):e}return R(o)?r?Fo(o):No(o):o}},fo=class extends uo{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=F(e)&&Bi(t);if(!this._isShallow){let e=zo(i);if(!Bo(n)&&!zo(n)&&(i=U(i),n=U(n)),!a&&W(i)&&!W(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:P(e,t),s=Reflect.set(e,t,n,W(e)?e:r);return e===U(r)&&s&&(o?Ji(n,i)&&Ya(e,`set`,t,n,i):Ya(e,`add`,t,n)),s}deleteProperty(e,t){let n=P(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&Ya(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!Pi(t)||!co.has(t))&&H(e,`has`,t),n}ownKeys(e){return H(e,`iterate`,F(e)?`length`:Ka),Reflect.ownKeys(e)}},po=class extends uo{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},mo=new fo,ho=new po,go=new fo(!0),_o=new po(!0),vo=e=>e,yo=e=>Reflect.getPrototypeOf(e);function bo(e,t,n){return function(...r){let i=this.__v_raw,a=U(i),o=ji(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,l=i[e](...r),u=n?vo:t?Wo:Uo;return!t&&H(a,`iterate`,c?qa:Ka),N(Object.create(l),{next(){let{value:e,done:t}=l.next();return t?{value:e,done:t}:{value:s?[u(e[0]),u(e[1])]:u(e),done:t}}})}}function xo(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function So(e,t){let n={get(n){let r=this.__v_raw,i=U(r),a=U(n);e||(Ji(n,a)&&H(i,`get`,n),H(i,`get`,a));let{has:o}=yo(i),s=t?vo:e?Wo:Uo;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&&H(U(t),`iterate`,Ka),t.size},has(t){let n=this.__v_raw,r=U(n),i=U(t);return e||(Ji(t,i)&&H(r,`has`,t),H(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=U(a),s=t?vo:e?Wo:Uo;return!e&&H(o,`iterate`,Ka),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return N(n,e?{add:xo(`add`),set:xo(`set`),delete:xo(`delete`),clear:xo(`clear`)}:{add(e){let n=U(this),r=yo(n),i=U(e),a=!t&&!Bo(e)&&!zo(e)?i:e;return r.has.call(n,a)||Ji(e,a)&&r.has.call(n,e)||Ji(i,a)&&r.has.call(n,i)||(n.add(a),Ya(n,`add`,a,a)),this},set(e,n){!t&&!Bo(n)&&!zo(n)&&(n=U(n));let r=U(this),{has:i,get:a}=yo(r),o=i.call(r,e);o||=(e=U(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?Ji(n,s)&&Ya(r,`set`,e,n,s):Ya(r,`add`,e,n),this},delete(e){let t=U(this),{has:n,get:r}=yo(t),i=n.call(t,e);i||=(e=U(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Ya(t,`delete`,e,void 0,a),o},clear(){let e=U(this),t=e.size!==0,n=e.clear();return t&&Ya(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=bo(r,e,t)}),n}function Co(e,t){let n=So(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(P(n,r)&&r in t?n:t,r,i)}var wo={get:Co(!1,!1)},To={get:Co(!1,!0)},Eo={get:Co(!0,!1)},Do={get:Co(!0,!0)},Oo=new WeakMap,ko=new WeakMap,Ao=new WeakMap,jo=new WeakMap;function Mo(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function No(e){return zo(e)?e:Lo(e,!1,mo,wo,Oo)}function Po(e){return Lo(e,!1,go,To,ko)}function Fo(e){return Lo(e,!0,ho,Eo,Ao)}function Io(e){return Lo(e,!0,_o,Do,jo)}function Lo(e,t,n,r,i){if(!R(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=Mo(Ri(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Ro(e){return zo(e)?Ro(e.__v_raw):!!(e&&e.__v_isReactive)}function zo(e){return!!(e&&e.__v_isReadonly)}function Bo(e){return!!(e&&e.__v_isShallow)}function Vo(e){return e?!!e.__v_raw:!1}function U(e){let t=e&&e.__v_raw;return t?U(t):e}function Ho(e){return!P(e,`__v_skip`)&&Object.isExtensible(e)&&Xi(e,`__v_skip`,!0),e}var Uo=e=>R(e)?No(e):e,Wo=e=>R(e)?Fo(e):e;function W(e){return e?e.__v_isRef===!0:!1}function Go(e){return qo(e,!1)}function Ko(e){return qo(e,!0)}function qo(e,t){return W(e)?e:new Jo(e,t)}var Jo=class{constructor(e,t){this.dep=new Ua,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:U(e),this._value=t?e:Uo(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Bo(e)||zo(e);e=n?e:U(e),Ji(e,t)&&(this._rawValue=e,this._value=n?e:Uo(e),this.dep.trigger())}};function Yo(e){return W(e)?e.value:e}function G(e){return I(e)?e():Yo(e)}var Xo={get:(e,t,n)=>t===`__v_raw`?e:Yo(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return W(i)&&!W(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Zo(e){return Ro(e)?e:new Proxy(e,Xo)}var Qo=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new Ua,{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 $o(e){return new Qo(e)}function es(e){let t=F(e)?Array(e.length):{};for(let n in e)t[n]=is(e,n);return t}var ts=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=Pi(t)?t:String(t),this._raw=U(e);let r=!0,i=e;if(!F(e)||Pi(this._key)||!Bi(this._key))do r=!Vo(i)||Bo(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Yo(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&W(this._raw[this._key])){let t=this._object[this._key];if(W(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Xa(this._raw,this._key)}},ns=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 rs(e,t,n){return W(e)?e:I(e)?new ns(e):R(e)&&arguments.length>1?is(e,t,n):Go(e)}function is(e,t,n){return new ts(e,t,n)}var as=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ua(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Va-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&V!==this)return Da(this,!0),!0}get value(){let e=this.dep.track();return Na(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function os(e,t,n=!1){let r,i;return I(e)?r=e:(r=e.get,i=e.set),new as(r,i,n)}var ss={},cs=new WeakMap,ls=void 0;function us(e,t=!1,n=ls){if(n){let t=cs.get(n);t||cs.set(n,t=[]),t.push(e)}}function ds(e,t,n=M){let{immediate:r,deep:i,once:a,scheduler:o,augmentJob:s,call:c}=n,l=e=>i?e:Bo(e)||i===!1||i===0?fs(e,1):fs(e),u,d,f,p,m=!1,h=!1;if(W(e)?(d=()=>e.value,m=Bo(e)):Ro(e)?(d=()=>l(e),m=!0):F(e)?(h=!0,m=e.some(e=>Ro(e)||Bo(e)),d=()=>e.map(e=>{if(W(e))return e.value;if(Ro(e))return l(e);if(I(e))return c?c(e,2):e()})):d=I(e)?t?c?()=>c(e,2):e:()=>{if(f){Ra();try{f()}finally{za()}}let t=ls;ls=u;try{return c?c(e,3,[p]):e(p)}finally{ls=t}}:Ti,t&&i){let e=d,t=i===!0?1/0:i;d=()=>fs(e(),t)}let g=ba(),_=()=>{u.stop(),g&&g.active&&ki(g.effects,u)};if(a&&t){let e=t;t=(...t)=>{let n=e(...t);return _(),n}}let v=h?Array(e.length).fill(ss):ss,y=e=>{if(u.flags&1&&(u.dirty||e)){if(t){let n=u.run();if(e||i||m||(h?n.some((e,t)=>Ji(e,v[t])):Ji(n,v))){f&&f();let e=ls;ls=u;try{let e=[n,v===ss?void 0:h&&v[0]===ss?[]:v,p];v=n,c?c(t,3,e):t(...e)}finally{ls=e}}}else u.run()}};return s&&s(y),u=new Ca(d),u.scheduler=o?()=>o(y,!1):y,p=e=>us(e,!1,u),f=u.onStop=()=>{let e=cs.get(u);if(e){if(c)c(e,4);else for(let t of e)t();cs.delete(u)}},t?r?y(!0):v=u.run():o?o(y.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function fs(e,t=1/0,n){if(t<=0||!R(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,W(e))fs(e.value,t,n);else if(F(e))for(let r=0;r<e.length;r++)fs(e[r],t,n);else if(Mi(e)||ji(e))e.forEach(e=>{fs(e,t,n)});else if(zi(e)){for(let r in e)fs(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&fs(e[r],t,n)}return e}function ps(e,t,n,r){try{return r?e(...r):e()}catch(e){hs(e,t,n)}}function ms(e,t,n,r){if(I(e)){let i=ps(e,t,n,r);return i&&Fi(i)&&i.catch(e=>{hs(e,t,n)}),i}if(F(e)){let i=[];for(let a=0;a<e.length;a++)i.push(ms(e[a],t,n,r));return i}}function hs(e,t,n,r=!0){let i=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||M;if(t){let r=t.parent,i=t.proxy,o=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,o)===!1)return}r=r.parent}if(a){Ra(),ps(a,null,10,[e,i,o]),za();return}}gs(e,n,i,r,o)}function gs(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var K=[],_s=-1,vs=[],ys=null,bs=0,xs=Promise.resolve(),Ss=null;function Cs(e){let t=Ss||xs;return e?t.then(this?e.bind(this):e):t}function ws(e){let t=_s+1,n=K.length;for(;t<n;){let r=t+n>>>1,i=K[r],a=As(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function Ts(e){if(!(e.flags&1)){let t=As(e),n=K[K.length-1];!n||!(e.flags&2)&&t>=As(n)?K.push(e):K.splice(ws(t),0,e),e.flags|=1,Es()}}function Es(){Ss||=xs.then(js)}function Ds(e){if(!F(e))ys&&e.id===-1?ys.splice(bs+1,0,e):e.flags&1||(vs.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)vs.push(e[t]);Es()}function Os(e,t,n=_s+1){for(;n<K.length;n++){let t=K[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;K.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function ks(e){if(vs.length){let e=[...new Set(vs)].sort((e,t)=>As(e)-As(t));if(vs.length=0,ys){for(let t=0;t<e.length;t++)ys.push(e[t]);return}for(ys=e,bs=0;bs<ys.length;bs++){let e=ys[bs];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}ys=null,bs=0}}var As=e=>e.id==null?e.flags&2?-1:1/0:e.id;function js(e){try{for(_s=0;_s<K.length;_s++){let e=K[_s];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),ps(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;_s<K.length;_s++){let e=K[_s];e&&(e.flags&=-2)}_s=-1,K.length=0,ks(e),Ss=null,(K.length||vs.length)&&js(e)}}var q=null,Ms=null;function Ns(e){let t=q;return q=e,Ms=e&&e.type.__scopeId||null,t}function Ps(e){Ms=e}function Fs(){Ms=null}var Is=e=>Ls;function Ls(e,t=q,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&Nu(-1);let i=Ns(t),a=ku.length,o;try{o=e(...n)}finally{for(let e=ku.length;e>a;e--)ju();Ns(i),r._d&&Nu(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Rs(e,t){if(q===null)return e;let n=md(q),r=e.dirs||=[];for(let e=0;e<t.length;e++){let[i,a,o,s=M]=t[e];i&&(I(i)&&(i={mounted:i,updated:i}),i.deep&&fs(a),r.push({dir:i,instance:n,value:a,oldValue:void 0,arg:o,modifiers:s}))}return e}function zs(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(Ra(),ms(c,n,8,[e.el,s,e,t]),za())}}function Bs(e,t){if($){let n=$.provides,r=$.parent&&$.parent.provides;r===n&&(n=$.provides=Object.create(r)),n[e]=t}}function Vs(e,t,n=!1){let r=td();if(r||Tl){let i=Tl?Tl._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&&I(t)?t.call(r&&r.proxy):t}}function Hs(){return!!(td()||Tl)}var Us=Symbol.for(`v-scx`),Ws=()=>Vs(Us);function Gs(e,t){return Js(e,null,t)}function Ks(e,t){return Js(e,null,{flush:`post`})}function qs(e,t,n){return Js(e,t,n)}function Js(e,t,n=M){let{immediate:r,deep:i,flush:a,once:o}=n,s=N({},n),c=t&&r||!t&&a!==`post`,l;if(sd){if(a===`sync`){let e=Ws();l=e.__watcherHandles||=[]}else if(!c){let e=()=>{};return e.stop=Ti,e.resume=Ti,e.pause=Ti,e}}let u=$;s.call=(e,t,n)=>ms(e,u,t,n);let d=!1;a===`post`?s.scheduler=e=>{Y(e,u&&u.suspense)}:a!==`sync`&&(d=!0,s.scheduler=(e,t)=>{t?e():Ts(e)}),s.augmentJob=e=>{t&&(e.flags|=4),d&&(e.flags|=2,u&&(e.id=u.uid,e.i=u))};let f=ds(e,t,s);return sd&&(l?l.push(f):c&&f()),f}function Ys(e,t,n){let r=this.proxy,i=L(e)?e.includes(`.`)?Xs(r,e):()=>r[e]:e.bind(r,r),a;I(t)?a=t:(a=t.handler,n=t);let o=id(this),s=Js(i,a.bind(r),n);return o(),s}function Xs(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 Zs=new WeakMap,Qs=Symbol(`_vte`),$s=e=>e.__isTeleport,ec=e=>e&&(e.disabled||e.disabled===``),tc=e=>e&&(e.defer||e.defer===``),nc=e=>typeof SVGElement<`u`&&e instanceof SVGElement,rc=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,ic=(e,t)=>{let n=e&&e.to;return L(n)?t?t(n):null:n},ac={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=ec(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=ec(e.props),r=e.target=ic(e.props,m),a=uc(r,e,h,p);r&&(o!==`svg`&&nc(r)?o=`svg`:o!==`mathml`&&rc(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),lc(e,!1)))},S=e=>{let t=()=>{if(Zs.get(e)===t){if(Zs.delete(e),ec(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),lc(e,!0)}x(e)}};Zs.set(e,t),Y(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),tc(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),lc(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Zs.get(e);if(u){u.flags|=8,Zs.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=ec(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||nc(p)?o=`svg`:(o===`mathml`||rc(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),cu(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):oc(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=ic(t.props,m);e&&(t.target=e,oc(t,e,null,l,0))}else g&&oc(t,p,h,l,1);lc(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=ec(f),m=a||!p,h=Zs.get(e);if(h&&(h.flags|=8,Zs.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,m,!!i.dynamicChildren)}},move:oc,hydrate:sc};function oc(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!Zs.has(e)&&(!d||ec(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function sc(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=ic(t.props,c),h=ec(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||uc(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||uc(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),lc(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var cc=ac;function lc(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function uc(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Qs]=o,e&&(r(a,e,i),r(o,e,i)),o}var dc=Symbol(`_leaveCb`),fc=Symbol(`_enterCb`);function pc(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return zc(()=>{e.isMounted=!0}),Hc(()=>{e.isUnmounting=!0}),e}var mc=[Function,Array],hc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:mc,onEnter:mc,onAfterEnter:mc,onEnterCancelled:mc,onBeforeLeave:mc,onLeave:mc,onAfterLeave:mc,onLeaveCancelled:mc,onBeforeAppear:mc,onAppear:mc,onAfterAppear:mc,onAppearCancelled:mc};function gc(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Du){t=n;break}}return t}function _c(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function vc(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:m,onLeaveCancelled:h,onBeforeAppear:g,onAppear:_,onAfterAppear:v,onAppearCancelled:y}=t,b=String(e.key),x=_c(n,e),S=(e,t)=>{e&&ms(e,r,9,t)},C=(e,t)=>{let n=t[1];S(e,t),F(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted){if(a)r=g||c;else return}t[dc]&&t[dc](!0);let i=x[b];i&&Ru(e,i)&&i.el[dc]&&i.el[dc](),S(r,[t])},enter(t){if(x[b]===e)return;let r=l,i=u,o=d;if(!n.isMounted){if(a)r=_||l,i=v||u,o=y||d;else return}let s=!1;t[fc]=e=>{s||(s=!0,S(e?o:i,[t]),w.delayedLeave&&w.delayedLeave(),t[fc]=void 0)};let c=t[fc].bind(null,!1);r?C(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[fc]&&t[fc](!0),n.isUnmounting)return r();S(f,[t]);let a=!1;t[dc]=n=>{a||(a=!0,r(),S(n?h:m,[t]),t[dc]=void 0,x[i]===e&&delete x[i])};let o=t[dc].bind(null,!1);x[i]=e,p?C(p,[t,o]):o()},clone(e){let a=vc(e,t,n,r,i);return i&&i(a),a}};return w}function yc(e){if(!jc(e))return $s(e.type)&&e.children?gc(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&&I(n.default))return n.default()}}function bc(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;bc($s(n.type)&&yc(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function xc(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===X?(o.patchFlag&128&&i++,r=r.concat(xc(o.children,t,s))):(t||o.type!==Du)&&r.push(s==null?o:Wu(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function Sc(e,t){return I(e)?N({name:e.name},t,{setup:e}):e}function Cc(){let e=td();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+e.ids[1]++:``}function wc(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Tc(e){let t=td(),n=Ko(null);if(t){let r=t.refs===M?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function Ec(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Dc=new WeakMap;function Oc(e,t,n,r,i=!1){if(F(e)){e.forEach((e,a)=>Oc(e,t&&(F(t)?t[a]:t),n,r,i));return}if(Ac(r)&&!i){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Oc(e,t,n,r.component.subTree);return}let a=r.shapeFlag&4?md(r.component):r.el,o=i?null:a,{i:s,r:c}=e,l=t&&t.r,u=s.refs===M?s.refs={}:s.refs,d=s.setupState,f=U(d),p=d===M?Ei:e=>!Ec(u,e)&&P(f,e),m=(e,t)=>!(t&&Ec(u,t));if(l!=null&&l!==c){if(kc(t),L(l))u[l]=null,p(l)&&(d[l]=null);else if(W(l)){let e=t;m(l,e.k)&&(l.value=null),e.k&&(u[e.k]=null)}}if(I(c))ps(c,s,12,[o,u]);else{let t=L(c),r=W(c);if(t||r){let s=()=>{if(e.f){let n=t?p(c)?d[c]:u[c]:m(c)||!e.k?c.value:u[e.k];if(i)F(n)&&ki(n,a);else if(F(n))n.includes(a)||n.push(a);else if(t)u[c]=[a],p(c)&&(d[c]=u[c]);else{let t=[a];m(c,e.k)&&(c.value=t),e.k&&(u[e.k]=t)}}else t?(u[c]=o,p(c)&&(d[c]=o)):r&&(m(c,e.k)&&(c.value=o),e.k&&(u[e.k]=o))};if(o){let t=()=>{s(),Dc.delete(e)};t.id=-1,Dc.set(e,t),Y(t,n)}else kc(e),s()}}}function kc(e){let t=Dc.get(e);t&&(t.flags|=8,Dc.delete(e))}ea().requestIdleCallback,ea().cancelIdleCallback;var Ac=e=>!!e.type.__asyncLoader,jc=e=>e.type.__isKeepAlive;function Mc(e,t){Pc(e,`a`,t)}function Nc(e,t){Pc(e,`da`,t)}function Pc(e,t,n=$){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Ic(t,r,n),n){let e=n.parent;for(;e&&e.parent;)jc(e.parent.vnode)&&Fc(r,t,n,e),e=e.parent}}function Fc(e,t,n,r){let i=Ic(t,e,r,!0);Uc(()=>{ki(r[t],i)},n)}function Ic(e,t,n=$,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ra();let i=id(n),a=ms(t,n,e,r);return i(),za(),a};return r?i.unshift(a):i.push(a),a}}var Lc=e=>(t,n=$)=>{(!sd||e===`sp`)&&Ic(e,(...e)=>t(...e),n)},Rc=Lc(`bm`),zc=Lc(`m`),Bc=Lc(`bu`),Vc=Lc(`u`),Hc=Lc(`bum`),Uc=Lc(`um`),Wc=Lc(`sp`),Gc=Lc(`rtg`),Kc=Lc(`rtc`);function qc(e,t=$){Ic(`ec`,e,t)}var Jc=`components`;function Yc(e,t){return Qc(Jc,e,!0,t)||e}var Xc=Symbol.for(`v-ndc`);function Zc(e){return L(e)?Qc(Jc,e,!1)||e:e||Xc}function Qc(e,t,n=!0,r=!1){let i=q||$;if(i){let n=i.type;if(e===Jc){let e=hd(n,!1);if(e&&(e===t||e===z(t)||e===Ki(z(t))))return n}let a=$c(i[e]||n[e],t)||$c(i.appContext[e],t);return!a&&r?n:a}}function $c(e,t){return e&&(e[t]||e[z(t)]||e[Ki(z(t))])}function el(e,t,n,r){let i,a=n&&n[r],o=F(e);if(o||L(e)){let n=o&&Ro(e),r=!1,s=!1;n&&(r=!Bo(e),s=zo(e),e=Qa(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?Wo(Uo(e[n])):Uo(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(R(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 tl(e,t,n,r,i,a){if(n??={},q.ce||q.parent&&Ac(q.parent)&&q.parent.ce){let e=a!=null&&n.key==null?N({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),Au(),Iu(X,null,[Q(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=ku.length;Au();let c;try{let i=o&&nl(o(n)),s=n.key||a||i&&i.key;c=Iu(X,{key:(s&&!Pi(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=ku.length;e>s;e--)ju();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),c}function nl(e){return e.some(e=>!Lu(e)||!(e.type===Du||e.type===X&&!nl(e.children)))?e:null}var rl=e=>e?od(e)?md(e):rl(e.parent):null,il=N(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=>rl(e.parent),$root:e=>rl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pl(e),$forceUpdate:e=>e.f||=()=>{Ts(e.update)},$nextTick:e=>e.n||=Cs.bind(e.proxy),$watch:e=>Ys.bind(e)}),al=(e,t)=>e!==M&&!e.__isScriptSetup&&P(e,t),ol={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:r,data:i,props:a,accessCache:o,type:s,appContext:c}=e;if(t[0]!==`$`){let e=o[t];if(e!==void 0)switch(e){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return a[t]}else if(al(r,t))return o[t]=1,r[t];else if(i!==M&&P(i,t))return o[t]=2,i[t];else if(P(a,t))return o[t]=3,a[t];else if(n!==M&&P(n,t))return o[t]=4,n[t];else cl&&(o[t]=0)}let l=il[t],u,d;if(l)return t===`$attrs`&&H(e.attrs,`get`,``),l(e);if((u=s.__cssModules)&&(u=u[t]))return u;if(n!==M&&P(n,t))return o[t]=4,n[t];if(d=c.config.globalProperties,P(d,t))return d[t]},set({_:e},t,n){let{data:r,setupState:i,ctx:a}=e;return al(i,t)?(i[t]=n,!0):r!==M&&P(r,t)?(r[t]=n,!0):P(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,props:a,type:o}},s){let c;return!!(n[s]||e!==M&&s[0]!==`$`&&P(e,s)||al(t,s)||P(a,s)||P(r,s)||P(il,s)||P(i.config.globalProperties,s)||(c=o.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get==null?P(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function sl(e){return F(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var cl=!0;function ll(e){let t=pl(e),n=e.proxy,r=e.ctx;cl=!1,t.beforeCreate&&dl(t.beforeCreate,e,`bc`);let{data:i,computed:a,methods:o,watch:s,provide:c,inject:l,created:u,beforeMount:d,mounted:f,beforeUpdate:p,updated:m,activated:h,deactivated:g,beforeDestroy:_,beforeUnmount:v,destroyed:y,unmounted:b,render:x,renderTracked:S,renderTriggered:C,errorCaptured:w,serverPrefetch:T,expose:E,inheritAttrs:ee,components:te,directives:ne,filters:re}=t;if(l&&ul(l,r,null),o)for(let e in o){let t=o[e];I(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);R(t)&&(e.data=No(t))}if(cl=!0,a)for(let e in a){let t=a[e],i=_d({get:I(t)?t.bind(n,n):I(t.get)?t.get.bind(n,n):Ti,set:!I(t)&&I(t.set)?t.set.bind(n):Ti});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(s)for(let e in s)fl(s[e],r,n,e);if(c){let e=I(c)?c.call(n):c;Reflect.ownKeys(e).forEach(t=>{Bs(t,e[t])})}u&&dl(u,e,`c`);function D(e,t){F(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(D(Rc,d),D(zc,f),D(Bc,p),D(Vc,m),D(Mc,h),D(Nc,g),D(qc,w),D(Kc,S),D(Gc,C),D(Hc,v),D(Uc,b),D(Wc,T),F(E)){if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}x&&e.render===Ti&&(e.render=x),ee!=null&&(e.inheritAttrs=ee),te&&(e.components=te),ne&&(e.directives=ne),T&&wc(e)}function ul(e,t,n=Ti){F(e)&&(e=vl(e));for(let n in e){let r=e[n],i;i=R(r)?`default`in r?Vs(r.from||n,r.default,!0):Vs(r.from||n):Vs(r),W(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function dl(e,t,n){ms(F(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function fl(e,t,n,r){let i=r.includes(`.`)?Xs(n,r):()=>n[r];if(L(e)){let n=t[e];I(n)&&qs(i,n)}else if(I(e))qs(i,e.bind(n));else if(R(e)){if(F(e))e.forEach(e=>fl(e,t,n,r));else{let r=I(e.handler)?e.handler.bind(n):t[e.handler];I(r)&&qs(i,r,e)}}}function pl(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=>ml(c,e,o,!0)),ml(c,t,o)),R(t)&&a.set(t,c),c}function ml(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&ml(e,a,n,!0),i&&i.forEach(t=>ml(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=hl[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var hl={data:gl,props:bl,emits:bl,methods:yl,computed:yl,beforeCreate:J,created:J,beforeMount:J,mounted:J,beforeUpdate:J,updated:J,beforeDestroy:J,beforeUnmount:J,destroyed:J,unmounted:J,activated:J,deactivated:J,errorCaptured:J,serverPrefetch:J,components:yl,directives:yl,watch:xl,provide:gl,inject:_l};function gl(e,t){return t?e?function(){return N(I(e)?e.call(this,this):e,I(t)?t.call(this,this):t)}:t:e}function _l(e,t){return yl(vl(e),vl(t))}function vl(e){if(F(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function J(e,t){return e?[...new Set([].concat(e,t))]:t}function yl(e,t){return e?N(Object.create(null),e,t):t}function bl(e,t){return e?F(e)&&F(t)?[...new Set([...e,...t])]:N(Object.create(null),sl(e),sl(t??{})):t}function xl(e,t){if(!e)return t;if(!t)return e;let n=N(Object.create(null),e);for(let r in t)n[r]=J(e[r],t[r]);return n}function Sl(){return{app:null,config:{isNativeTag:Ei,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 Cl=0;function wl(e,t){return function(n,r=null){I(n)||(n=N({},n)),r!=null&&!R(r)&&(r=null);let i=Sl(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:Cl++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:yd,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&I(e.install)?(a.add(e),e.install(c,...t)):I(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||Q(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,md(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(ms(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Tl;Tl=c;try{return e()}finally{Tl=t}}};return c}}var Tl=null,El=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${z(t)}Modifiers`]||e[`${Gi(t)}Modifiers`];function Dl(e,t,...n){if(e.isUnmounted)return;let r=e.vnode.props||M,i=n,a=t.startsWith(`update:`),o=a&&El(r,t.slice(7));o&&(o.trim&&(i=n.map(e=>L(e)?e.trim():e)),o.number&&(i=i.map(Zi)));let s,c=r[s=qi(t)]||r[s=qi(z(t))];!c&&a&&(c=r[s=qi(Gi(t))]),c&&ms(c,e,6,i);let l=r[s+`Once`];if(l){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,ms(l,e,6,i)}}var Ol=new WeakMap;function kl(e,t,n=!1){let r=n?Ol:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!I(e)){let r=e=>{let n=kl(e,t,!0);n&&(s=!0,N(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(R(e)&&r.set(e,null),null):(F(a)?a.forEach(e=>o[e]=null):N(o,a),R(e)&&r.set(e,o),o)}function Al(e,t){return!e||!Di(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),P(e,t[0].toLowerCase()+t.slice(1))||P(e,Gi(t))||P(e,t))}function jl(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:c,render:l,renderCache:u,props:d,data:f,setupState:p,ctx:m,inheritAttrs:h}=e,g=Ns(e),_,v;try{if(n.shapeFlag&4){let e=i||r,t=e;_=qu(l.call(t,e,u,d,p,f,m)),v=s}else{let e=t;_=qu(e.length>1?e(d,{attrs:s,slots:o,emit:c}):e(d,null)),v=t.props?s:Nl(s)}}catch(t){ku.length=0,hs(t,e,1),_=Q(Du)}let y=_;if(v&&h!==!1){let e=Object.keys(v),{shapeFlag:t}=y;e.length&&t&7&&(a&&e.some(Oi)&&(v=Pl(v,a)),y=Wu(y,v,!1,!0))}return n.dirs&&(y=Wu(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&bc($s(y.type)&&yc(y)||y,n.transition),_=y,Ns(g),_}function Ml(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(Lu(r)){if(r.type!==Du||r.children===`v-if`){if(n)return;n=r}}else return}return n}var Nl=e=>{let t;for(let n in e)(n===`class`||n===`style`||Di(n))&&((t||={})[n]=e[n]);return t},Pl=(e,t)=>{let n={};for(let r in e)(!Oi(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Fl(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?Il(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(Ll(o,r,n)&&!Al(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?!o||Il(r,o,l):!!o;return!1}function Il(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(Ll(t,e,a)&&!Al(n,a))return!0}return!1}function Ll(e,t,n){let r=e[n],i=t[n];return n===`style`&&R(r)&&R(i)?!pa(r,i):r!==i}function Rl({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 zl={},Bl=()=>Object.create(zl),Vl=e=>Object.getPrototypeOf(e)===zl;function Hl(e,t,n,r=!1){let i={},a=Bl();e.propsDefaults=Object.create(null),Wl(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Po(i):e.type.props?i:a,e.attrs=a}function Ul(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=U(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(Al(e.emitsOptions,o))continue;let u=t[o];if(c){if(P(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=z(o);i[t]=Gl(c,s,t,u,e,!1)}}else u!==a[o]&&(a[o]=u,l=!0)}}}else{Wl(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!P(t,a)&&((r=Gi(a))===a||!P(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=Gl(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!P(t,e))&&(delete a[e],l=!0)}l&&Ya(e.attrs,`set`,``)}function Wl(e,t,n,r){let[i,a]=e.propsOptions,o=!1,s;if(t)for(let c in t){if(Vi(c))continue;let l=t[c],u;i&&P(i,u=z(c))?!a||!a.includes(u)?n[u]=l:(s||={})[u]=l:Al(e.emitsOptions,c)||(!(c in r)||l!==r[c])&&(r[c]=l,o=!0)}if(a){let t=U(n),r=s||M;for(let o=0;o<a.length;o++){let s=a[o];n[s]=Gl(i,t,s,r[s],e,!P(r,s))}}return o}function Gl(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=P(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&I(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=id(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===Gi(n))&&(r=!0))}return r}var Kl=new WeakMap;function ql(e,t,n=!1){let r=n?Kl:t.propsCache,i=r.get(e);if(i)return i;let a=e.props,o={},s=[],c=!1;if(!I(e)){let r=e=>{c=!0;let[n,r]=ql(e,t,!0);N(o,n),r&&s.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!a&&!c)return R(e)&&r.set(e,wi),wi;if(F(a))for(let e=0;e<a.length;e++){let t=z(a[e]);Jl(t)&&(o[t]=M)}else if(a)for(let e in a){let t=z(e);if(Jl(t)){let n=a[e],r=o[t]=F(n)||I(n)?{type:n}:N({},n),i=r.type,c=!1,l=!0;if(F(i))for(let e=0;e<i.length;++e){let t=i[e],n=I(t)&&t.name;if(n===`Boolean`){c=!0;break}n===`String`&&(l=!1)}else c=I(i)&&i.name===`Boolean`;r[0]=c,r[1]=l,(c||P(r,`default`))&&s.push(t)}}let l=[o,s];return R(e)&&r.set(e,l),l}function Jl(e){return e[0]!==`$`&&!Vi(e)}var Yl=e=>e===`_`||e===`_ctx`||e===`$stable`,Xl=e=>F(e)?e.map(qu):[qu(e)],Zl=(e,t,n)=>{if(t._n)return t;let r=Ls((...e)=>Xl(t(...e)),n);return r._c=!1,r},Ql=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Yl(n))continue;let i=e[n];if(I(i))t[n]=Zl(n,i,r);else if(i!=null){let e=Xl(i);t[n]=()=>e}}},$l=(e,t)=>{let n=Xl(t);e.slots.default=()=>n},eu=(e,t,n)=>{for(let r in t)(n||!Yl(r))&&(e[r]=t[r])},tu=(e,t,n)=>{let r=e.slots=Bl();if(e.vnode.shapeFlag&32){let e=t._;e?(eu(r,t,n),n&&Xi(r,`_`,e,!0)):Ql(t,r)}else t&&$l(e,t)},nu=(e,t,n)=>{let{vnode:r,slots:i}=e,a=!0,o=M;if(r.shapeFlag&32){let e=t._;e?n&&e===1?a=!1:eu(i,t,n):(a=!t.$stable,Ql(t,i)),o=t}else t&&($l(e,t),o={default:1});if(a)for(let e in i)!Yl(e)&&o[e]==null&&delete i[e]},Y=Cu;function ru(e){return iu(e)}function iu(e,t){let n=ea();n.__VUE__=!0;let{insert:r,remove:i,patchProp:a,createElement:o,createText:s,createComment:c,setText:l,setElementText:u,parentNode:d,nextSibling:f,setScopeId:p=Ti,insertStaticContent:m}=e,h=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ru(e,t)&&(r=me(e),O(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Eu:g(e,t,n,r);break;case Du:_(e,t,n,r);break;case Ou:e??v(t,n,r,o);break;case X:te(e,t,n,r,i,a,o,s,c);break;default:d&1?x(e,t,n,r,i,a,o,s,c):d&6?ne(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,_e)}u!=null&&i?Oc(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Oc(e.ref,null,a,e,!0)},g=(e,t,n,i)=>{if(e==null)r(t.el=s(t.children),n,i);else{let n=t.el=e.el;t.children!==e.children&&l(n,t.children)}},_=(e,t,n,i)=>{e==null?r(t.el=c(t.children||``),n,i):t.el=e.el},v=(e,t,n,r)=>{[e.el,e.anchor]=m(e.children,t,n,r,e.el,e.anchor)},y=({el:e,anchor:t},n,i)=>{let a;for(;e&&e!==t;)a=f(e),r(e,n,i),e=a;r(t,n,i)},b=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=f(e),i(e),e=n;i(t)},x=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)S(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),T(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},S=(e,t,n,i,s,c,l,d)=>{let f,p,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(f=e.el=o(e.type,c,m&&m.is,m),h&8?u(f,e.children):h&16&&w(e.children,f,null,i,s,au(e,c),l,d),_&&zs(e,null,i,`created`),C(f,e,e.scopeId,l,i),m){for(let e in m)e!==`value`&&!Vi(e)&&a(f,e,null,m[e],c,i);`value`in m&&a(f,`value`,null,m.value,c),(p=m.onVnodeBeforeMount)&&Zu(p,i,e)}_&&zs(e,null,i,`beforeMount`);let v=su(s,g);v&&g.beforeEnter(f),r(f,t,n),((p=m&&m.onVnodeMounted)||v||_)&&Y(()=>{try{p&&Zu(p,i,e),v&&g.enter(f),_&&zs(e,null,i,`mounted`)}finally{}},s)},C=(e,t,n,r,i)=>{if(n&&p(e,n),r)for(let t=0;t<r.length;t++)p(e,r[t]);if(i){let n=i.subTree;if(t===n||pu(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;C(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},w=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++){let c=e[l]=s?Ju(e[l]):qu(e[l]);h(null,c,t,n,r,i,a,o,s)}},T=(e,t,n,r,i,o,s)=>{let c=t.el=e.el,{patchFlag:l,dynamicChildren:d,dirs:f}=t;l|=e.patchFlag&16;let p=e.props||M,m=t.props||M,h;if(n&&ou(n,!1),(h=m.onVnodeBeforeUpdate)&&Zu(h,n,t,e),f&&zs(t,e,n,`beforeUpdate`),n&&ou(n,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(l=0,s=!1,d=null),(p.innerHTML&&m.innerHTML==null||p.textContent&&m.textContent==null)&&u(c,``),d?E(e.dynamicChildren,d,c,n,r,au(t,i),o):s||oe(e,t,c,null,n,r,au(t,i),o,!1),l>0){if(l&16)ee(c,p,m,n,i);else if(l&2&&p.class!==m.class&&a(c,`class`,null,m.class,i),l&4&&a(c,`style`,p.style,m.style,i),l&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],o=p[r],s=m[r];(s!==o||r===`value`)&&a(c,r,o,s,i,n)}}l&1&&e.children!==t.children&&u(c,t.children)}else!s&&d==null&&ee(c,p,m,n,i);((h=m.onVnodeUpdated)||f)&&Y(()=>{h&&Zu(h,n,t,e),f&&zs(t,e,n,`updated`)},r)},E=(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&&(c.type===X||!Ru(c,l)||c.shapeFlag&198)?d(c.el):n;h(c,l,u,null,r,i,a,o,!0)}},ee=(e,t,n,r,i)=>{if(t!==n){if(t!==M)for(let o in t)!Vi(o)&&!(o in n)&&a(e,o,t[o],null,i,r);for(let o in n){if(Vi(o))continue;let s=n[o],c=t[o];s!==c&&o!==`value`&&a(e,o,c,s,i,r)}`value`in n&&a(e,`value`,t.value,n.value,i)}},te=(e,t,n,i,a,o,c,l,u)=>{let d=t.el=e?e.el:s(``),f=t.anchor=e?e.anchor:s(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(l=l?l.concat(h):h),e==null?(r(d,n,i),r(f,n,i),w(t.children||[],n,f,a,o,c,l,u)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,a,o,c,l),(t.key!=null||a&&t===a.subTree)&&cu(e,t,!0)):oe(e,t,n,f,a,o,c,l,u)},ne=(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):re(t,n,r,i,a,o,c):D(e,t,c)},re=(e,t,n,r,i,a,o)=>{let s=e.component=ed(e,r,i);if(jc(e)&&(s.ctx.renderer=_e),cd(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ie,o),!e.el){let r=s.subTree=Q(Du);_(null,r,t,n),e.placeholder=r.el}}else ie(s,e,t,n,i,a,o)},D=(e,t,n)=>{let r=t.component=e.component;if(Fl(e,t,n)){if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},ie=(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=uu(e);if(n){t&&(t.el=c.el,ae(e,t,o)),n.asyncDep.then(()=>{Y(()=>{e.isUnmounted||l()},i)});return}}let u=t,f;ou(e,!1),t?(t.el=c.el,ae(e,t,o)):t=c,n&&Yi(n),(f=t.props&&t.props.onVnodeBeforeUpdate)&&Zu(f,s,t,c),ou(e,!0);let p=jl(e),m=e.subTree;e.subTree=p,h(m,p,d(m.el),me(m),e,i,a),t.el=p.el,u===null&&Rl(e,p.el),r&&Y(r,i),(f=t.props&&t.props.onVnodeUpdated)&&Y(()=>Zu(f,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Ac(t);if(ou(e,!1),l&&Yi(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Zu(o,d,t),ou(e,!0),s&&ye){let t=()=>{e.subTree=jl(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=jl(e);h(null,o,n,r,e,i,a),t.el=o.el}if(u&&Y(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Y(()=>Zu(o,d,e),i)}(t.shapeFlag&256||d&&Ac(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Y(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ca(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=()=>Ts(u),ou(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ul(e,t.props,r,n),nu(e,t.children,n),Ra(),Os(e),za()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,d=e?e.shapeFlag:0,f=t.children,{patchFlag:p,shapeFlag:m}=t;if(p>0){if(p&128){ce(l,f,n,r,i,a,o,s,c);return}if(p&256){se(l,f,n,r,i,a,o,s,c);return}}m&8?(d&16&&pe(l,i,a),f!==l&&u(n,f)):d&16?m&16?ce(l,f,n,r,i,a,o,s,c):pe(l,i,a,!0):(d&8&&u(n,``),m&16&&w(f,n,r,i,a,o,s,c))},se=(e,t,n,r,i,a,o,s,c)=>{e||=wi,t||=wi;let l=e.length,u=t.length,d=Math.min(l,u),f=0;for(;f<d;f++){let r=t[f]=c?Ju(t[f]):qu(t[f]);h(e[f],r,n,null,i,a,o,s,c)}l>u?pe(e,i,a,!0,!1,d):w(t,n,r,i,a,o,s,c,d)},ce=(e,t,n,r,i,a,o,s,c)=>{let l=0,u=t.length,d=e.length-1,f=u-1;for(;l<=d&&l<=f;){let r=e[l],u=t[l]=c?Ju(t[l]):qu(t[l]);if(Ru(r,u))h(r,u,n,null,i,a,o,s,c);else break;l++}for(;l<=d&&l<=f;){let r=e[d],l=t[f]=c?Ju(t[f]):qu(t[f]);if(Ru(r,l))h(r,l,n,null,i,a,o,s,c);else break;d--,f--}if(l>d){if(l<=f){let e=f+1,d=e<u?t[e].el:r;for(;l<=f;)h(null,t[l]=c?Ju(t[l]):qu(t[l]),n,d,i,a,o,s,c),l++}}else if(l>f)for(;l<=d;)O(e[l],i,a,!0),l++;else{let p=l,m=l,g=new Map;for(l=m;l<=f;l++){let e=t[l]=c?Ju(t[l]):qu(t[l]);e.key!=null&&g.set(e.key,l)}let _,v=0,y=f-m+1,b=!1,x=0,S=Array(y);for(l=0;l<y;l++)S[l]=0;for(l=p;l<=d;l++){let r=e[l];if(v>=y){O(r,i,a,!0);continue}let u;if(r.key!=null)u=g.get(r.key);else for(_=m;_<=f;_++)if(S[_-m]===0&&Ru(r,t[_])){u=_;break}u===void 0?O(r,i,a,!0):(S[u-m]=l+1,u>=x?x=u:b=!0,h(r,t[u],n,null,i,a,o,s,c),v++)}let C=b?lu(S):wi;for(_=C.length-1,l=y-1;l>=0;l--){let e=m+l,d=t[e],f=t[e+1],p=e+1<u?f.el||fu(f):r;S[l]===0?h(null,d,n,p,i,a,o,s,c):b&&(_<0||l!==C[_]?le(d,n,p,2):_--)}}},le=(e,t,n,a,o=null)=>{let{el:s,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,a);return}if(d&128){e.suspense.move(t,n,a);return}if(d&64){c.move(e,t,n,_e);return}if(c===X){r(s,t,n);for(let e=0;e<u.length;e++)le(u[e],t,n,a);r(e.anchor,t,n);return}if(c===Ou){y(e,t,n);return}if(a!==2&&d&1&&l){if(a===0)l.persisted&&!s[dc]?r(s,t,n):(l.beforeEnter(s),r(s,t,n),Y(()=>l.enter(s),o));else{let{leave:a,delayLeave:o,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?i(s):r(s,t,n)},d=()=>{let e=s._isLeaving||!!s[dc];s._isLeaving&&s[dc](!0),l.persisted&&!e?u():a(s,()=>{u(),c&&c()})};o?o(s,u,d):d()}}else r(s,t,n)},O=(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&&(i=!1),s!=null&&(Ra(),Oc(s,null,n,e,!0),za()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Ac(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Zu(_,t,e),u&6)fe(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&zs(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,_e,r):l&&!l.hasOnce&&(a!==X||d>0&&d&64)?pe(l,t,n,!1,!0):(a===X&&d&384||!i&&u&16)&&pe(c,t,n),r&&ue(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Y(()=>{_&&Zu(_,t,e),h&&zs(e,null,t,`unmounted`),v&&(e.el=null)},n)},ue=e=>{let{type:t,el:n,anchor:r,transition:a}=e;if(t===X){de(n,r);return}if(t===Ou){b(e);return}let o=()=>{i(n),a&&!a.persisted&&a.afterLeave&&a.afterLeave()};if(e.shapeFlag&1&&a&&!a.persisted){let{leave:t,delayLeave:r}=a,i=()=>t(n,o);r?r(e.el,o,i):i()}else o()},de=(e,t)=>{let n;for(;e!==t;)n=f(e),i(e),e=n;i(t)},fe=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;du(c),du(l),r&&Yi(r),i.stop(),a&&(a.flags|=8,O(o,e,t,n)),s&&Y(s,t),Y(()=>{e.isUnmounted=!0},t)},pe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)O(e[o],t,n,r,i)},me=e=>{if(e.shapeFlag&6)return me(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=f(e.anchor||e.el),n=t&&t[Qs];return n?f(n):t},he=!1,ge=(e,t,n)=>{let r;e==null?t._vnode&&(O(t._vnode,null,null,!0),r=t._vnode.component):h(t._vnode||null,e,t,null,null,null,n),t._vnode=e,he||=(he=!0,Os(r),ks(),!1)},_e={p:h,um:O,m:le,r:ue,mt:re,mc:w,pc:oe,pbc:E,n:me,o:e},ve,ye;return t&&([ve,ye]=t(_e)),{render:ge,hydrate:ve,createApp:wl(ge,ve)}}function au({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 ou({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function su(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function cu(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]=Ju(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&cu(t,a)),a.type===Eu&&(a.patchFlag===-1&&(a=i[e]=Ju(a)),a.el=t.el),a.type===Du&&!a.el&&(a.el=t.el)}}function lu(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 uu(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:uu(t)}function du(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function fu(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?fu(t.subTree):null}var pu=e=>e.__isSuspense,mu=0,hu={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)_u(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}vu(e,t,n,r,i,o,s,c,l)}},hydrate:bu,normalize:xu};function gu(e,t){let n=e.props&&e.props[t];I(n)&&n()}function _u(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=yu(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(gu(e,`onPending`),gu(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),wu(f,e.ssFallback)):f.resolve(!1,!0)}function vu(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,Ru(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&!_&&!d.isFallbackMountPending&&(c(m,p,n,r,i,null,a,o,s),wu(d,p))):(d.pendingId=mu++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():d.isFallbackMountPending||(c(m,p,n,r,i,null,a,o,s),wu(d,p))):m&&Ru(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&Ru(m,f))c(m,f,n,r,i,d,a,o,s),wu(d,f);else if(gu(t,`onPending`),d.pendingBranch=f,d.pendingId=f.shapeFlag&512?f.component.suspenseId:mu++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function yu(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=Tu(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?Qi(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:mu++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),Ds(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&Y(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,wu(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){for(let e=0;e<c.length;e++)y.effects.push(c[e]);S=!0;break}y=y.parent}!S&&!g&&Ds(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),gu(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;gu(t,`onFallback`);let o=m(n),l=()=>{if(x.isFallbackMountPending=!1,!x.isInFallback)return;let e=x.vnode.ssFallback;d(null,e,i,o,r,null,a,s,c),wu(x,e)},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{hs(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;ad(),e.asyncResolved=!0;let{vnode:s}=e;ud(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),Rl(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function bu(e,t,n,r,i,a,o,s,c){let l=t.suspense=yu(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function xu(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Su(r?n.default:n),e.ssFallback=r?Su(n.fallback):Q(Du)}function Su(e){let t;if(I(e)){let n=Mu&&e._c;n&&(e._d=!1,Au()),e=e(),n&&(e._d=!0,t=Z,ju())}return F(e)&&(e=Ml(e)),e=qu(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function Cu(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):Ds(e)}function wu(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,Rl(r,i))}function Tu(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var X=Symbol.for(`v-fgt`),Eu=Symbol.for(`v-txt`),Du=Symbol.for(`v-cmt`),Ou=Symbol.for(`v-stc`),ku=[],Z=null;function Au(e=!1){ku.push(Z=e?null:[])}function ju(){ku.pop(),Z=ku[ku.length-1]||null}var Mu=1;function Nu(e,t=!1){Mu+=e,e<0&&Z&&t&&(Z.hasOnce=!0)}function Pu(e){return e.dynamicChildren=Mu>0?Z||wi:null,ju(),Mu>0&&Z&&Z.push(e),e}function Fu(e,t,n,r,i,a){return Pu(Vu(e,t,n,r,i,a,!0))}function Iu(e,t,n,r,i){return Pu(Q(e,t,n,r,i,!0))}function Lu(e){return e?e.__v_isVNode===!0:!1}function Ru(e,t){return e.type===t.type&&e.key===t.key}var zu=({key:e})=>e??null,Bu=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:L(e)||W(e)||I(e)?{i:q,r:e,k:t,f:!!n}:e);function Vu(e,t=null,n=null,r=0,i=null,a=e===X?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zu(t),ref:t&&Bu(t),scopeId:Ms,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:q};return s?(Yu(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=L(n)?8:16),Mu>0&&!o&&Z&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Z.push(c),c}var Q=Hu;function Hu(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Xc)&&(e=Du),Lu(e)){let r=Wu(e,t,!0);return n&&Yu(r,n),Mu>0&&!a&&Z&&(r.shapeFlag&6?Z[Z.indexOf(e)]=r:Z.push(r)),r.patchFlag=-2,r}if(gd(e)&&(e=e.__vccOpts),t){t=Uu(t);let{class:e,style:n}=t;e&&!L(e)&&(t.class=oa(e)),R(n)&&(Vo(n)&&!F(n)&&(n=N({},n)),t.style=ta(n))}let o=L(e)?1:pu(e)?128:$s(e)?64:R(e)?4:I(e)?2:0;return Vu(e,t,n,r,i,o,a,!0)}function Uu(e){return e?Vo(e)||Vl(e)?N({},e):e:null}function Wu(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Xu(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&zu(l),ref:t&&t.ref?n&&a?F(a)?a.concat(Bu(t)):[a,Bu(t)]:Bu(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!==X?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&&Wu(e.ssContent),ssFallback:e.ssFallback&&Wu(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&bc(u,c.clone(u)),u}function Gu(e=` `,t=0){return Q(Eu,null,e,t)}function Ku(e=``,t=!1){return t?(Au(),Iu(Du,null,e)):Q(Du,null,e)}function qu(e){return e==null||typeof e==`boolean`?Q(Du):F(e)?Q(X,null,e.slice()):Lu(e)?Ju(e):Q(Eu,null,String(e))}function Ju(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Wu(e)}function Yu(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),Yu(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Vl(t)?t._ctx=q:r===3&&q&&(q.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(I(t)){if(r&65){Yu(e,{default:t});return}t={default:t,_ctx:q},n=32}else t=String(t),r&64?(n=16,t=[Gu(t)]):n=8;e.children=t,e.shapeFlag|=n}function Xu(...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=oa([t.class,r.class]));else if(e===`style`)t.style=ta([t.style,r.style]);else if(Di(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&&!Oi(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Zu(e,t,n,r=null){ms(e,t,7,[n,r])}var Qu=Sl(),$u=0;function ed(e,t,n){let r=e.type,i=(t?t.appContext:e.appContext)||Qu,a={uid:$u++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new ya(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ql(r,i),emitsOptions:kl(r,i),emit:null,emitted:null,propsDefaults:M,inheritAttrs:r.inheritAttrs,ctx:M,data:M,props:M,attrs:M,slots:M,refs:M,setupState:M,setupContext:null,suspense:n,suspenseId:n?n.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 a.ctx={_:a},a.root=t?t.root:a,a.emit=Dl.bind(null,a),e.ce&&e.ce(a),a}var $=null,td=()=>$||q,nd,rd;{let e=ea(),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)}};nd=t(`__VUE_INSTANCE_SETTERS__`,e=>$=e),rd=t(`__VUE_SSR_SETTERS__`,e=>sd=e)}var id=e=>{let t=$;return nd(e),e.scope.on(),()=>{e.scope.off(),nd(t)}},ad=()=>{$&&$.scope.off(),nd(null)};function od(e){return e.vnode.shapeFlag&4}var sd=!1;function cd(e,t=!1,n=!1){t&&rd(t);let{props:r,children:i}=e.vnode,a=od(e);Hl(e,r,a,t),tu(e,i,n||t);let o=a?ld(e,t):void 0;return t&&rd(!1),o}function ld(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ol);let{setup:r}=n;if(r){Ra();let n=e.setupContext=r.length>1?pd(e):null,i=id(e),a=ps(r,e,0,[e.props,n]),o=Fi(a);if(za(),i(),(o||e.sp)&&!Ac(e)&&wc(e),o){if(a.then(ad,ad),t)return a.then(n=>{rd(!0);try{ud(e,n,t)}finally{rd(!1)}}).catch(t=>{hs(t,e,0)});e.asyncDep=a}else ud(e,a,t)}else dd(e,t)}function ud(e,t,n){I(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:R(t)&&(e.setupState=Zo(t)),dd(e,n)}function dd(e,t,n){let r=e.type;e.render||=r.render||Ti;{let t=id(e);Ra();try{ll(e)}finally{za(),t()}}}var fd={get(e,t){return H(e,`get`,``),e[t]}};function pd(e){return{attrs:new Proxy(e.attrs,fd),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function md(e){return e.exposed?e.exposeProxy||=new Proxy(Zo(Ho(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in il)return il[n](e)},has(e,t){return t in e||t in il}}):e.proxy}function hd(e,t=!0){return I(e)?e.displayName||e.name:e.name||t&&e.__name}function gd(e){return I(e)&&`__vccOpts`in e}var _d=(e,t)=>os(e,t,sd);function vd(e,t,n){try{Nu(-1);let r=arguments.length;return r===2?R(t)&&!F(t)?Lu(t)?Q(e,null,[t]):Q(e,t):Q(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Lu(n)&&(n=[n]),Q(e,t,n))}finally{Nu(1)}}var yd=`3.5.42`,bd=void 0,xd=typeof window<`u`&&window.trustedTypes;if(xd)try{bd=xd.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Sd=bd?e=>bd.createHTML(e):e=>e,Cd=`http://www.w3.org/2000/svg`,wd=`http://www.w3.org/1998/Math/MathML`,Td=typeof document<`u`?document:null,Ed=Td&&Td.createElement(`template`),Dd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Td.createElementNS(Cd,e):t===`mathml`?Td.createElementNS(wd,e):n?Td.createElement(e,{is:n}):Td.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Td.createTextNode(e),createComment:e=>Td.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Td.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{Ed.innerHTML=Sd(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=Ed.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Od=`transition`,kd=`animation`,Ad=Symbol(`_vtc`),jd={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Md=N({},hc,jd),Nd=(e,t=[])=>{F(e)?e.forEach(e=>e(...t)):e&&e(...t)},Pd=e=>e?F(e)?e.some(e=>e.length>1):e.length>1:!1;function Fd(e){let t={};for(let n in e)n in jd||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,m=Id(i),h=m&&m[0],g=m&&m[1],{onBeforeEnter:_,onEnter:v,onEnterCancelled:y,onLeave:b,onLeaveCancelled:x,onBeforeAppear:S=_,onAppear:C=v,onAppearCancelled:w=y}=t,T=(e,t,n,r)=>{e._enterCancelled=r,zd(e,t?u:s),zd(e,t?l:o),n&&n()},E=(e,t)=>{e._isLeaving=!1,zd(e,d),zd(e,p),zd(e,f),t&&t()},ee=e=>(t,n)=>{let i=e?C:v,o=()=>T(t,e,n);Nd(i,[t,o]),Bd(()=>{zd(t,e?c:a),Rd(t,e?u:s),Pd(i)||Hd(t,r,h,o)})};return N(t,{onBeforeEnter(e){Nd(_,[e]),Rd(e,a),Rd(e,o)},onBeforeAppear(e){Nd(S,[e]),Rd(e,c),Rd(e,l)},onEnter:ee(!1),onAppear:ee(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);Rd(e,d),e._enterCancelled?(Rd(e,f),Kd(e)):(Kd(e),Rd(e,f)),Bd(()=>{e._isLeaving&&(zd(e,d),Rd(e,p),Pd(b)||Hd(e,r,g,n))}),Nd(b,[e,n])},onEnterCancelled(e){T(e,!1,void 0,!0),Nd(y,[e])},onAppearCancelled(e){T(e,!0,void 0,!0),Nd(w,[e])},onLeaveCancelled(e){E(e),Nd(x,[e])}})}function Id(e){if(e==null)return null;if(R(e))return[Ld(e.enter),Ld(e.leave)];{let t=Ld(e);return[t,t]}}function Ld(e){return Qi(e)}function Rd(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Ad]||(e[Ad]=new Set)).add(t)}function zd(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Ad];n&&(n.delete(t),n.size||(e[Ad]=void 0))}function Bd(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Vd=0;function Hd(e,t,n,r){let i=e._endId=++Vd,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Ud(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function Ud(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${Od}Delay`),a=r(`${Od}Duration`),o=Wd(i,a),s=r(`${kd}Delay`),c=r(`${kd}Duration`),l=Wd(s,c),u=null,d=0,f=0;t===Od?o>0&&(u=Od,d=o,f=a.length):t===kd?l>0&&(u=kd,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Od:kd:null,f=u?u===Od?a.length:c.length:0);let p=u===Od&&/\b(?:transform|all)(?:,|$)/.test(r(`${Od}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Wd(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>Gd(t)+Gd(e[n])))}function Gd(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Kd(e){return(e?e.ownerDocument:document).body.offsetHeight}function qd(e,t,n){let r=e[Ad];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Jd=Symbol(`_vod`),Yd=Symbol(`_vsh`),Xd={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Jd]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Zd(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Zd(e,!0),r.enter(e)):r.leave(e,()=>{Zd(e,!1)}):Zd(e,t))},beforeUnmount(e,{value:t}){Zd(e,t)}};function Zd(e,t){e.style.display=t?e[Jd]:`none`,e[Yd]=!t}var Qd=Symbol(``),$d=/(?:^|;)\s*display\s*:/;function ef(e,t,n){let r=e.style,i=L(n),a=!1;if(n&&!i){if(t){if(L(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??nf(r,t,``)}else for(let e in t)n[e]??nf(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?nf(r,i,``):sf(e,i,!L(t)&&t?t[i]:void 0,o)||nf(r,i,o)}}else if(i){if(t!==n){let e=r[Qd];e&&(n+=`;`+e),r.cssText=n,a=$d.test(n)}}else t&&e.removeAttribute(`style`);Jd in e&&(e[Jd]=a?r.display:``,e[Yd]&&(r.display=`none`))}var tf=/\s*!important$/;function nf(e,t,n){if(F(n))n.forEach(n=>nf(e,t,n));else if(n??=``,t.startsWith(`--`))tf.test(n)?e.setProperty(t,n.replace(tf,``),`important`):e.setProperty(t,n);else{let r=of(e,t);tf.test(n)?e.setProperty(Gi(r),n.replace(tf,``),`important`):e[r]=n}}var rf=[`Webkit`,`Moz`,`ms`],af={};function of(e,t){let n=af[t];if(n)return n;let r=z(t);if(r!==`filter`&&r in e)return af[t]=r;r=Ki(r);for(let n=0;n<rf.length;n++){let i=rf[n]+r;if(i in e)return af[t]=i}return t}function sf(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&L(r)&&n===r}var cf=`http://www.w3.org/1999/xlink`;function lf(e,t,n,r,i,a=la(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(cf,t.slice(6,t.length)):e.setAttributeNS(cf,t,n):n==null||a&&!ua(n)?e.removeAttribute(t):e.setAttribute(t,a?``:Pi(n)?String(n):n)}function uf(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?Sd(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=ua(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function df(e,t,n,r){e.addEventListener(t,n,r)}function ff(e,t,n,r){e.removeEventListener(t,n,r)}var pf=Symbol(`_vei`);function mf(e,t,n,r,i=null){let a=e[pf]||(e[pf]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=_f(t);r?df(e,n,a[t]=xf(r,i),s):o&&(ff(e,n,o,s),a[t]=void 0)}}var hf=/(Once|Passive|Capture)$/,gf=/^on:?(?:Once|Passive|Capture)$/;function _f(e){let t,n;for(;(n=e.match(hf))&&!gf.test(e);)t||={},e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===`:`?e.slice(3):Gi(e.slice(2)),t]}var vf=0,yf=Promise.resolve(),bf=()=>vf||=(yf.then(()=>vf=0),Date.now());function xf(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(F(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&ms(e,t,5,a)}}else ms(r,t,5,[e])};return n.value=e,n.attached=bf(),n}var Sf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Cf=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?qd(e,r,o):t===`style`?ef(e,n,r):Di(t)?Oi(t)||mf(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):wf(e,t,r,o))?(uf(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&lf(e,t,r,o,a,t!==`value`)):e._isVueCE&&(Tf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!L(r)))?uf(e,z(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),lf(e,t,r,o))};function wf(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Sf(t)&&I(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Sf(t)&&L(n)?!1:t in e}function Tf(e,t){let n=e._def.props;if(!n)return!1;let r=z(t);return Array.isArray(n)?n.some(e=>z(e)===r):Object.keys(n).some(e=>z(e)===r)}var Ef={};function Df(e,t,n){let r=Sc(e,t);zi(r)&&(r=N({},r,t));class i extends kf{constructor(e){super(r,e,n)}}return i.def=r,i}var Of=typeof HTMLElement<`u`?HTMLElement:class{},kf=class e extends Of{constructor(e,t={},n=op){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==op?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(N({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,Cs(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!F(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Qi(this._props[e])),(i||=Object.create(null))[z(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)P(this,e)||Object.defineProperty(this,e,{get:()=>Yo(t[e])})}_resolveProps(e){let{props:t}=e,n=F(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(z))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):Ef,r=z(e);t&&this._numberProps&&this._numberProps[r]&&(n=Qi(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===Ef?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(Gi(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(Gi(e),t+``):t||this.removeAttribute(Gi(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),ap(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=Q(this._def,N(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,zi(t[0])?N({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),Gi(e)!==e&&t(Gi(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}},Af=new WeakMap,jf=new WeakMap,Mf=Symbol(`_moveCb`),Nf=Symbol(`_enterCb`),Pf=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:N({},Md,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=td(),r=pc(),i,a;return Vc(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!zf(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Ff),i.forEach(If);let r=i.filter(Lf);Kd(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Rd(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Mf]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Mf]=null,zd(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=U(e),s=Fd(o),c=o.tag||X;if(i=[],a)for(let e=0;e<a.length;e++){let t=a[e];t.el&&t.el instanceof Element&&!t.el[Yd]&&(i.push(t),bc(t,vc(t,s,r,n)),Af.set(t,Rf(t.el)))}a=t.default?xc(t.default()):[];for(let e=0;e<a.length;e++){let t=a[e];t.key!=null&&bc(t,vc(t,s,r,n))}return Q(c,null,a)}}});function Ff(e){let t=e.el;t[Mf]&&t[Mf](),t[Nf]&&t[Nf]()}function If(e){jf.set(e,Rf(e.el))}function Lf(e){let t=Af.get(e),n=jf.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function Rf(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function zf(e,t,n){let r=e.cloneNode(),i=e[Ad];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Ud(r);return a.removeChild(r),o}var Bf=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return F(t)?e=>Yi(t,e):t};function Vf(e){e.target.composing=!0}function Hf(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Uf=Symbol(`_assign`),Wf=Symbol(`_initialValue`);function Gf(e,t,n){return t&&(e=e.trim()),n&&(e=Zi(e)),e}var Kf={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[Wf]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[Wf]=e.defaultValue.replace(/\r\n?/g,`
|
|
5
|
+
`))),e[Uf]=Bf(i);let a=r||i.props&&i.props.type===`number`;df(e,t?`change`:`input`,t=>{t.target.composing||e[Uf](Gf(e.value,n,a))}),(n||a)&&df(e,`change`,()=>{e.value=Gf(e.value,n,a)}),t||(df(e,`compositionstart`,Vf),df(e,`compositionend`,Hf),df(e,`change`,Hf))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Wf];delete e[Wf],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[Uf](Gf(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Uf]=Bf(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?Zi(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},qf={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,df(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Zi(Xf(e)):Xf(e)),r=e.multiple,i=r?Mi(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?F(i)?t.slice():t:i];try{e[Uf](i)}finally{Cs(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Uf]=Bf(r)},mounted(e,{value:t}){Yf(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Uf]=Bf(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Jf(t,n[1],n[0]))&&Yf(e,t)}};function Jf(e,t,n){if(!n||F(e))return pa(e,t);if(Mi(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function Yf(e,t){let n=e.multiple,r=F(t);if(!n||r||Mi(t)){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Xf(a);if(n){if(r){let e=typeof o;a.selected=e===`string`||e===`number`?t.some(e=>String(e)===String(o)):ma(t,o)>-1}else a.selected=t.has(o)}else if(pa(Xf(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Xf(e){return`_value`in e?e._value:e.value}var Zf=[`ctrl`,`shift`,`alt`,`meta`],Qf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Zf.some(n=>e[`${n}Key`]&&!t.includes(n))},$f=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Qf[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},ep={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},tp=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=Gi(n.key);if(t.some(e=>e===r||ep[e]===r))return e(n)}))},np=N({patchProp:Cf},Dd),rp;function ip(){return rp||=ru(np)}var ap=((...e)=>{ip().render(...e)}),op=((...e)=>{let t=ip().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=cp(e);if(!r)return;let i=t._component;!I(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,sp(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function sp(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function cp(e){return L(e)?document.querySelector(e):e}function lp(e,t){return ba()?(xa(e,t),!0):!1}var up=new WeakMap,dp=(...e)=>{let t=e[0],n=td()?.proxy??ba();if(n==null&&!Hs())throw Error(`injectLocal must be called in setup`);return n&&up.has(n)&&t in up.get(n)?up.get(n)[t]:Vs(...e)},fp=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var pp=Object.prototype.toString,mp=e=>pp.call(e)===`[object Object]`,hp=()=>{},gp=_p();function _p(){var e,t;return fp&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function vp(...e){if(e.length!==1)return rs(...e);let t=e[0];return typeof t==`function`?Fo($o(()=>({get:t,set:hp}))):Go(t)}function yp(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var bp=e=>e();function xp(e,t={}){let n,r,i=hp,a=hp,o=Ko(!1),s=e=>{clearTimeout(e),i(),i=hp},c;return Object.assign(l=>{let u=G(e),d=G(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=hp},flush:()=>{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=hp,a=hp,e(c())}},isPending:Io(o)})}function Sp(e=bp,t={}){let{initialState:n=`active`}=t,r=vp(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:Io(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function Cp(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function wp(e){return Array.isArray(e)?e:[e]}function Tp(e){return e||td()}function Ep(e,t=200,n={}){return yp(xp(t,n),e)}function Dp(e,t,n={}){let{eventFilter:r=bp,...i}=n;return qs(e,yp(r,t),i)}function Op(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=Sp(r,{initialState:i});return{stop:Dp(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function kp(e,t={}){if(!W(e))return es(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=$o(()=>({get(){return e.value[r]},set(n){if(G(t.replaceRef)??!0){if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}}else e.value[r]=n}}));return n}function Ap(e,t=!0,n){Tp(n)?zc(e,n):t?e():Cs(e)}function jp(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=Ko(!1);function s(){a&&=(clearInterval(a),null)}function c(){o.value=!1,s()}function l(){let n=G(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}return r&&fp&&l(),(W(t)||typeof t==`function`)&&lp(qs(t,()=>{o.value&&fp&&l()})),lp(c),{isActive:Io(o),pause:c,resume:l}}function Mp(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return Dp(e,t,{...a,eventFilter:xp(r,{maxWait:i})})}function Np(e,t,n){return qs(e,t,{...n,immediate:!0})}function Pp(e={}){let t=0,n=Go([]);function r(...r){let i=Po({key:t++,args:r,promise:void 0,resolve:()=>{},reject:()=>{},isResolving:!1,options:e});return n.value.push(i),i.promise=new Promise((e,t)=>{i.resolve=t=>(i.isResolving=!0,e(t)),i.reject=t}).finally(()=>{i.promise=void 0;let e=n.value.indexOf(i);e!==-1&&n.value.splice(e,1)}),i.promise}function i(...t){return e.singleton&&n.value.length>0?n.value[0].promise:r(...t)}let a=Sc((t,{slots:r})=>{let i=()=>n.value.map(e=>vd(X,{key:e.key},r.default?.call(r,e)));return e.transition?()=>vd(Pf,e.transition,i):i});return a.start=i,a}var Fp=fp?window:void 0;fp&&window.document,fp&&window.navigator,fp&&window.location;function Ip(e){let t=G(e);return t?.$el??t}function Lp(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=_d(()=>{let t=wp(G(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Np(()=>[n.value?.map(e=>Ip(e))??[Fp].filter(e=>e!=null),wp(G(n.value?e[1]:e[0])),wp(Yo(n.value?e[2]:e[1])),G(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=mp(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var Rp=!1;function zp(e,t,n={}){let{window:r=Fp,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:hp,cancel:hp,trigger:hp}:hp;if(gp&&!Rp){Rp=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,hp,e)),r.document.documentElement.addEventListener(`click`,hp,e)}let c=!0,l=e=>G(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=Ip(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=G(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=G(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=Ip(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&r&&r!==n.target&&!n.composedPath().includes(r)){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[Lp(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),Lp(r,`pointerdown`,t=>{let n=Ip(e);c=!l(t)&&!(!n||t.composedPath().includes(n))},{passive:!0}),o&&Lp(r,`blur`,n=>{setTimeout(()=>{let i=Ip(e),a=r.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),h=()=>m.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:h}function Bp(){let e=Ko(!1),t=td();return t&&zc(()=>{e.value=!0},t),e}function Vp(e){let t=Bp();return _d(()=>(t.value,!!e()))}function Hp(e,t={}){let{immediate:n=!0,fpsLimit:r=null,window:i=Fp,once:a=!1}=t,o=Ko(!1),s=_d(()=>{let e=G(r);return e?1e3/e:null}),c=0,l=null;function u(t){if(!o.value||!i)return;c||=t;let n=t-c;if(s.value&&n<s.value){l=i.requestAnimationFrame(u);return}if(c=t,e({delta:n,timestamp:t}),a){o.value=!1,l=null;return}l=i.requestAnimationFrame(u)}function d(){!o.value&&i&&(o.value=!0,c=0,l=i.requestAnimationFrame(u))}function f(){o.value=!1,l!=null&&i&&(i.cancelAnimationFrame(l),l=null)}return n&&d(),lp(f),{isActive:Io(o),pause:f,resume:d}}var Up=Symbol(`vueuse-ssr-width`);function Wp(){let e=Hs()?dp(Up,null):null;return typeof e==`number`?e:void 0}function Gp(e,t={}){let{window:n=Fp,ssrWidth:r=Wp()}=t,i=Vp(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),a=Ko(typeof r==`number`),o=Ko(),s=Ko(!1);return Gs(()=>{if(a.value){a.value=!i.value;let t=G(e).split(`,`);s.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=Cp(n[1])),i&&a&&(a=r<=Cp(i[1])),t?!a:a});return}i.value&&(o.value=n.matchMedia(G(e)),s.value=o.value.matches)}),Lp(o,`change`,e=>{s.value=e.matches},{passive:!0}),_d(()=>s.value)}var Kp=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},qp=`__vueuse_ssr_handlers__`,Jp=Yp();function Yp(){return qp in Kp||(Kp[qp]=Kp[qp]||{}),Kp[qp]}function Xp(e,t){return Jp[e]||t}function Zp(e){return Gp(`(prefers-color-scheme: dark)`,e)}function Qp(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var $p={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},em=`vueuse-storage`;function tm(e,t,n,r={}){let{flush:i=`pre`,deep:a=!0,listenToStorageChanges:o=!0,writeDefaults:s=!0,mergeDefaults:c=!1,shallow:l,window:u=Fp,eventFilter:d,onError:f=e=>{console.error(e)},initOnMounted:p}=r,m=(l?Ko:Go)(typeof t==`function`?t():t),h=_d(()=>G(e));if(!n)try{n=Xp(`getDefaultStorage`,()=>Fp?.localStorage)()}catch(e){f(e)}if(!n)return m;let g=G(t),_=Qp(g),v=r.serializer??$p[_],{pause:y,resume:b}=Op(m,e=>C(e),{flush:i,deep:a,eventFilter:d});qs(h,()=>T(),{flush:i});let x=!1;u&&o&&(n instanceof Storage?Lp(u,`storage`,e=>{(!p||x)&&T(e)},{passive:!0}):Lp(u,em,e=>{(!p||x)&&E(e)})),p?Ap(()=>{x=!0,T()}):T();function S(e,t){if(u){let r={key:h.value,oldValue:e,newValue:t,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(em,{detail:r}))}}function C(e){try{let t=n.getItem(h.value);if(e==null)S(t,null),n.removeItem(h.value);else{let r=v.write(e);t!==r&&(n.setItem(h.value,r),S(t,r))}}catch(e){f(e)}}function w(e){let t=e?e.newValue:n.getItem(h.value);if(t==null)return s&&g!=null&&n.setItem(h.value,v.write(g)),g;if(!e&&c){let e=v.read(t);return typeof c==`function`?c(e,g):_===`object`&&!Array.isArray(e)?{...g,...e}:e}return typeof t==`string`?v.read(t):t}function T(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){m.value=g;return}if(!(e&&e.key!==h.value)){y();try{let t=v.write(m.value);(e===void 0||e?.newValue!==t)&&(m.value=w(e))}catch(e){f(e)}finally{e?Cs(b):b()}}}}function E(e){T(e.detail)}return m}var nm={speed:2,margin:30,direction:`both`};function rm(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function im(e,t={}){let{pointerTypes:n,preventDefault:r,stopPropagation:i,exact:a,onMove:o,onEnd:s,onStart:c,initialValue:l,axis:u=`both`,draggingElement:d=Fp,containerElement:f,handle:p=e,buttons:m=[0],restrictInView:h,autoScroll:g=!1}=t,_=Go(G(l)??{x:0,y:0}),v=Go(),y=e=>!n||n.includes(e.pointerType),b=e=>{G(r)&&e.preventDefault(),G(i)&&e.stopPropagation()},x=G(g),S=typeof x==`object`?{speed:G(x.speed)??nm.speed,margin:G(x.margin)??nm.margin,direction:x.direction??nm.direction}:nm,C=e=>typeof e==`number`?[e,e]:[e.x,e.y],w=(e,t,n)=>{let{clientWidth:r,clientHeight:i,scrollLeft:a,scrollTop:o,scrollWidth:s,scrollHeight:c}=e,[l,u]=C(S.margin),[d,f]=C(S.speed),p=0,m=0;(S.direction===`x`||S.direction===`both`)&&(n.x<l&&a>0?p=-d:n.x+t.width>r-l&&a<s-r&&(p=d)),(S.direction===`y`||S.direction===`both`)&&(n.y<u&&o>0?m=-f:n.y+t.height>i-u&&o<c-i&&(m=f)),(p||m)&&e.scrollBy({left:p,top:m,behavior:`auto`})},T=null,E=()=>{let t=G(f);t&&!T&&(T=setInterval(()=>{let n=G(e).getBoundingClientRect(),{x:r,y:i}=_.value,a={x:r-t.scrollLeft,y:i-t.scrollTop};a.x>=0&&a.y>=0&&(w(t,n,a),a.x+=t.scrollLeft,a.y+=t.scrollTop,_.value=a)},1e3/60))},ee=()=>{T&&=(clearInterval(T),null)},te=(e,t,n,r)=>{let[i,a]=typeof n==`number`?[n,n]:[n.x,n.y],{clientWidth:o,clientHeight:s}=t;return e.x<i||e.x+r.width>o-i||e.y<a||e.y+r.height>s-a};G(g)&&qs(_,()=>{if(G(t.disabled)||!v.value)return;let n=G(f);if(!n)return;let r=G(e).getBoundingClientRect(),{x:i,y:a}=_.value,o={x:i-n.scrollLeft,y:a-n.scrollTop};te(o,n,S.margin,r)?E():ee()});let ne=n=>{var r;if(!G(m).includes(n.button)||G(t.disabled)||!y(n)||G(a)&&n.target!==G(e))return;let i=G(f),o=i==null||(r=i.getBoundingClientRect)==null?void 0:r.call(i),s=G(e).getBoundingClientRect(),l={x:n.clientX-(i?s.left-o.left+(g?0:i.scrollLeft):s.left),y:n.clientY-(i?s.top-o.top+(g?0:i.scrollTop):s.top)};c?.(l,n)!==!1&&(v.value=l,b(n))},re=n=>{if(G(t.disabled)||!y(n)||!v.value)return;let r=G(f);r instanceof HTMLElement&&rm(r);let i=G(e).getBoundingClientRect(),{x:a,y:s}=_.value;if((u===`x`||u===`both`)&&(a=n.clientX-v.value.x,r&&(a=Math.min(Math.max(0,a),r.scrollWidth-i.width))),(u===`y`||u===`both`)&&(s=n.clientY-v.value.y,r&&(s=Math.min(Math.max(0,s),r.scrollHeight-i.height))),G(g)&&r&&(T===null&&w(r,i,{x:a,y:s}),a+=r.scrollLeft,s+=r.scrollTop),r&&(h||g)){if(u!==`y`){let e=a-r.scrollLeft;e<0?a=r.scrollLeft:e>r.clientWidth-i.width&&(a=r.clientWidth-i.width+r.scrollLeft)}if(u!==`x`){let e=s-r.scrollTop;e<0?s=r.scrollTop:e>r.clientHeight-i.height&&(s=r.clientHeight-i.height+r.scrollTop)}}_.value={x:a,y:s},o?.(_.value,n),b(n)},D=e=>{!G(t.disabled)&&y(e)&&v.value&&(v.value=void 0,g&&ee(),s?.(_.value,e),b(e))};if(fp){let e=()=>({capture:t.capture??!0,passive:!G(r)});Lp(p,`pointerdown`,ne,e),Lp(d,`pointermove`,re,e),Lp(d,[`pointerup`,`pointercancel`],D,e)}return{...kp(_),position:_,isDragging:_d(()=>!!v.value),style:_d(()=>`
|
|
6
|
+
left: ${_.value.x}px;
|
|
7
|
+
top: ${_.value.y}px;
|
|
8
|
+
${g?`text-wrap: nowrap;`:``}
|
|
9
|
+
`)}}function am(e){if(`interval`in e||`immediate`in e){let{interval:t=`requestAnimationFrame`,immediate:n=!0}=e;return t===`requestAnimationFrame`?e=>Hp(e,{immediate:n}):n=>jp(n,t,e)}return Hp}function om(e={}){let{controls:t=!1,scheduler:n=am(e)}=e,r=Ko(new Date),i=n(()=>r.value=new Date);return t?{now:r,...i}:r}function sm(e,t,n={}){let{window:r=Fp}=n;return tm(e,t,r?.sessionStorage,n)}var cm=[{max:6e4,value:1e3,name:`second`},{max:276e4,value:6e4,name:`minute`},{max:72e6,value:36e5,name:`hour`},{max:5184e5,value:864e5,name:`day`},{max:24192e5,value:6048e5,name:`week`},{max:28512e6,value:2592e6,name:`month`},{max:1/0,value:31536e6,name:`year`}],lm={justNow:`just now`,past:e=>/\d/.test(e)?`${e} ago`:e,future:e=>/\d/.test(e)?`in ${e}`:e,month:(e,t)=>e===1?t?`last month`:`next month`:`${e} month${e>1?`s`:``}`,year:(e,t)=>e===1?t?`last year`:`next year`:`${e} year${e>1?`s`:``}`,day:(e,t)=>e===1?t?`yesterday`:`tomorrow`:`${e} day${e>1?`s`:``}`,week:(e,t)=>e===1?t?`last week`:`next week`:`${e} week${e>1?`s`:``}`,hour:e=>`${e} hour${e>1?`s`:``}`,minute:e=>`${e} minute${e>1?`s`:``}`,second:e=>`${e} second${e>1?`s`:``}`,invalid:``};function um(e){return e.toISOString().slice(0,10)}function dm(e){if(`updateInterval`in e){let{updateInterval:t=3e4}=e;return e=>jp(e,t)}return e=>jp(e,3e4)}function fm(e,t={}){let{controls:n=!1,scheduler:r=dm(t)}=t,{now:i,...a}=om({scheduler:r,controls:!0}),o=_d(()=>pm(new Date(G(e)),t,G(i)));return n?{timeAgo:o,...a}:o}function pm(e,t={},n=Date.now()){let{max:r,messages:i=lm,fullDateFormatter:a=um,units:o=cm,showSecond:s=!1,rounding:c=`round`}=t,l=typeof c==`number`?e=>+e.toFixed(c):Math[c],u=+n-e,d=Math.abs(u);function f(e,t){return l(Math.abs(e)/t.value)}function p(e,t){let n=f(e,t),r=e>0,i=m(t.name,n,r);return m(r?`past`:`future`,i,r)}function m(e,t,n){let r=i[e];return typeof r==`function`?r(t,n):r.replace(`{0}`,t.toString())}if(d<6e4&&!s)return i.justNow;if(typeof r==`number`&&d>r)return a(new Date(e));if(typeof r==`string`){let t=o.find(e=>e.name===r)?.max;if(t&&d>t)return a(new Date(e))}for(let[e,t]of o.entries()){if(f(u,t)<=0&&o[e-1])return p(u,o[e-1]);if(d<t.max)return p(u,t)}return i.invalid}var mm=tm(`devframes-color-scheme`,`auto`),hm=Zp(),gm=_d(()=>mm.value===`auto`?hm.value:mm.value===`dark`);function _m(e){mm.value=e}var vm=`Devframes`;function ym(e){let t=e.productName?.trim()||vm;return{productName:t,logo:e.logo,wordmark:e.wordmark,primaryColor:e.primaryColor,background:e.background,tagline:e.tagline,favicon:e.favicon,windowTitle:e.windowTitle?.trim()||t}}var bm=Go(ym({}));function xm(){return bm}function Sm(e){return bm.value=ym(e),bm.value}function Cm(e=e=>e.logo){return _d(()=>Em(e(bm.value),gm.value))}function wm(e){return _d(()=>{let t=bm.value.background;if(!Tm(t))return Em(t,gm.value);let n=t.standalone;return e===`iframe`&&(n=t.iframe??n),Em(n,gm.value)})}function Tm(e){return typeof e==`object`&&!!e&&`standalone`in e}function Em(e,t){if(e)return typeof e==`string`?e:t?e.dark??e.light:e.light}function Dm(e,t){t&&e.style.setProperty(`--devframe-primary`,t)}function Om(e,t,n){let r=e.head.querySelector(`meta[name="${t}"]`);r||(r=e.createElement(`meta`),r.setAttribute(`name`,t),e.head.appendChild(r)),r.setAttribute(`content`,n)}function km(e,t){let n=e.head.querySelector(`link[rel~="icon"]`);n||(n=e.createElement(`link`),n.setAttribute(`rel`,`icon`),e.head.appendChild(n)),n.setAttribute(`href`,t)}function Am(e,t){e.title=t.windowTitle,t.tagline&&Om(e,`description`,t.tagline),t.favicon&&km(e,t.favicon)}function jm(){return{mode:`float`,width:80,height:80,top:0,left:10,position:`bottom`,inactiveTimeout:3e3}}function Mm(){return{open:!1,selectedDockId:null,selectedDockRoute:null,recentDockId:null,groupLastChildIds:{}}}function Nm(e,t){let n=he(),r=No({entryMeta:e,get isActive(){return t.value?.id===e.id},domElements:{},events:Ho(n)});return qs(()=>t.value?.id,t=>{t===e.id?n.emit(`entry:activated`):n.emit(`entry:deactivated`)},{immediate:!0}),qs(()=>r.domElements.iframe,e=>{e&&n.emit(`dom:iframe:mounted`,e)},{immediate:!0}),qs(()=>r.domElements.panel,e=>{e&&n.emit(`dom:panel:mounted`,e)},{immediate:!0}),r}function Pm(e){let t=Ko(e.value());return e.on(`updated`,e=>{t.value=e}),t}function Fm(e,t){return e.value()===t?new Promise(t=>{let n=e.on(`updated`,()=>{n(),t()})}):Promise.resolve()}var Im=new WeakMap;async function Lm(e){if(Im.has(e))return Im.get(e);let t=[],n=await e.sharedState.get(`devframe:docks`,{initialValue:t}),r={entries:Pm(n),initialSyncComplete:Fm(n,t)};return Im.set(e,r),r}function Rm(e,t,n=(e,t)=>CSS.supports(e,t)){if(t===void 0||!n(`background`,t)){e.style.removeProperty(`--devframes-viewer-background`);return}e.style.setProperty(`--devframes-viewer-background`,t)}var zm=wm(window.self===window.top?`standalone`:`iframe`);Gs(()=>{let e=document.documentElement;e.classList.toggle(`dark`,gm.value),e.classList.toggle(`light`,!gm.value),Rm(e,zm.value)});async function Bm(){let e=import.meta.url,t=await li({baseURL:[`./`,new URL(`./`,e).href],simpleAuth:!1}),n=Sm(t.connectionMeta.configs?.ui?.branding||{});Am(document,n);let r=sm(`devframes-dock-session`,Mm(),{mergeDefaults:!0}),{createDocksContext:i}=await pi(async()=>{let{createDocksContext:e}=await import(`./context-C_Mcy8_k.js`);return{createDocksContext:e}},__vite__mapDeps([0,1]),import.meta.url),a=await i(`standalone`,t,void 0,r);hi(a);let{DockStandalone:o}=await pi(async()=>{let{DockStandalone:e}=await import(`./DockStandalone-DIFLZoNP.js`);return{DockStandalone:e}},__vite__mapDeps([2,1]),import.meta.url),s=new o({context:a});Dm(s,n.primaryColor),document.getElementById(`app`).appendChild(s)}Bm();export{Zc as $,hu as A,Uu as B,Df as C,he as Ct,tp as D,m as Dt,Xd as E,g as Et,Ku as F,Uc as G,Xu as H,Fu as I,Fs as J,Vc as K,Gu as L,_d as M,Vu as N,$f as O,Iu as P,Yc as Q,Q as R,op as S,pi as St,Kf as T,_ as Tt,Cs as U,vd as V,zc as W,el as X,Ps as Y,tl as Z,Lp as _,ta as _t,Lm as a,Ls as at,Mp as b,Si as bt,Dm as c,Ho as ct,mm as d,Go as dt,Cc as et,gm as f,Ko as ft,im as g,sa as gt,zp as h,oa as ht,Pm as i,Ks as it,cc as j,X as k,xm as l,xa as lt,Pp as m,Yo as mt,Mm as n,qs as nt,Fm as o,Rs as ot,_m as p,es as pt,Au as q,Nm as r,Gs as rt,Am as s,Is as st,jm as t,Tc as tt,Cm as u,No as ut,fm as v,ga as vt,qf as w,h as wt,Pf as x,gi as xt,Ep as y,vi as yt,Sc as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DockStandalone-
|
|
2
|
-
import{Ct as e,M as t,St as n,c as r,f as i,ft as a,i as o,l as s,nt as c,s as l,wt as u}from"./index-
|
|
3
|
-
`:t===`t`?` `:t,a+=2}else o+=e[a],a++;if(a>=e.length)throw Error(`Unterminated string literal at position ${n}`);a++,t.push({type:`string`,value:o}),n=a;continue}if(ae.test(r)){let r=n;for(;r<e.length&&oe.test(e[r]);)r++;let i=e.slice(n,r);i===`true`?t.push({type:`bool`,value:!0}):i===`false`?t.push({type:`bool`,value:!1}):t.push({type:`ident`,value:i}),n=r;continue}throw Error(`Unexpected character "${r}" at position ${n}`)}}return t.push({type:`eof`}),t}function le(e){let t=ce(e),n=0,r=()=>t[n],i=()=>t[n++],a=e=>{let t=r();return t.type===`op`&&t.value===e},o=()=>{let e=i();if(e.type!==`op`)throw Error(`internal: expected operator token, got ${y(e)}`);return e.value};function s(){let e=c();for(;a(`||`);)i(),e={type:`binary`,op:`||`,left:e,right:c()};return e}function c(){let e=l();for(;a(`&&`);)i(),e={type:`binary`,op:`&&`,left:e,right:l()};return e}function l(){let e=u();for(;a(`===`)||a(`!==`)||a(`==`)||a(`!=`);){let t=o(),n=t===`==`||t===`!=`?h():u();e={type:`binary`,op:t,left:e,right:n}}return e}function u(){let e=d();for(;a(`<=`)||a(`>=`)||a(`<`)||a(`>`);)e={type:`binary`,op:o(),left:e,right:d()};return e}function d(){let e=f();for(;a(`+`)||a(`-`);)e={type:`binary`,op:o(),left:e,right:f()};return e}function f(){let e=p();for(;a(`*`)||a(`/`)||a(`%`);)e={type:`binary`,op:o(),left:e,right:p()};return e}function p(){return a(`!`)||a(`-`)||a(`+`)?{type:`unary`,op:o(),operand:p()}:m()}function m(){let e=r();if(e.type===`number`||e.type===`string`||e.type===`bool`)return i(),{type:`literal`,value:e.value};if(e.type===`ident`)return i(),{type:`key`,key:e.value};if(e.type===`lparen`){i();let e=s(),t=r();if(t.type!==`rparen`)throw Error(`Expected ")" but got ${y(t)}`);return i(),e}throw Error(`Unexpected token: ${y(e)}`)}function h(){let e=r();if(e.type===`string`)return i(),{type:`literal`,value:e.value};if(e.type===`number`||e.type===`bool`)return i(),{type:`literal`,value:String(e.value)};if(e.type===`ident`)return i(),{type:`literal`,value:e.value};throw Error(`Expected value literal or identifier on right side of equality, got ${y(e)}`)}let ee=s(),g=r();if(g.type!==`eof`)throw Error(`Unexpected token: ${y(g)}`);return ee}function y(e){switch(e.type){case`eof`:return`end of expression`;case`lparen`:return`"("`;case`rparen`:return`")"`;case`op`:case`ident`:case`string`:return`"${e.value}"`;case`number`:case`bool`:return`"${String(e.value)}"`}}function ue(e,t,n={}){let{strict:r=!1}=n;return!!b(e,t,r)}function b(e,t,n){switch(e.type){case`literal`:return e.value;case`key`:return me(e.key,t,n);case`unary`:return de(e.op,b(e.operand,t,n));case`binary`:return fe(e,t,n)}}function de(e,t){switch(e){case`!`:return!t;case`-`:return-t;case`+`:return+t}}function fe(e,t,n){let{op:r}=e;if(r===`&&`)return b(e.left,t,n)&&b(e.right,t,n);if(r===`||`)return b(e.left,t,n)||b(e.right,t,n);let i=b(e.left,t,n),a=b(e.right,t,n);switch(r){case`==`:return String(i)===String(a);case`!=`:return String(i)!==String(a);case`===`:return i===a;case`!==`:return i!==a;case`<`:return i<a;case`>`:return i>a;case`<=`:return i<=a;case`>=`:return i>=a;case`+`:return i+a;case`-`:return i-a;case`*`:return i*a;case`/`:return i/a;case`%`:return i%a}}function pe(e,t,n){return ue(le(e),t,n)}function me(e,t,n){let{found:r,value:i}=he(e,t);if(!r&&n)throw Error(`Unknown context key: "${e}"`);return i}function he(e,t){if(e in t)return{found:!0,value:t[e]};let n=e.includes(`.`)?`.`:e.includes(`:`)?`:`:null;if(n){let r=e.split(n),i=t;for(let e of r){if(typeof i!=`object`||!i)return{found:!1,value:void 0};let t=i;if(!(e in t))return{found:!1,value:void 0};i=t[e]}return{found:!0,value:i}}return{found:!1,value:void 0}}function x(e,t,n){return pe(e,t,n)}var ge=`devframes:hub-ui:hide`,_e=`devframes_plugin_terminals`,ve=`devframes_plugin_messages`,ye=Object.freeze({type:`~builtin`,category:`~builtin`,id:`~client-auth-notice`,title:`Unauthorized`,icon:`ph:warning-duotone`}),S=Object.freeze({type:`~builtin`,category:`~builtin`,id:`~settings`,title:`Settings`,icon:`ph:gear-duotone`}),be=Object.freeze([ye,S]),C=Object.freeze({showIframeAddressBar:!1,closeOnOutsideClick:!1,autoCollapseEdgeToolbar:!0,showDevframeInspector:!1});function xe(e,t){return e?.[t]??C[t]}var w=new WeakMap;function Se(e){let n=w.get(e);if(!n){let r=o(e.docks.settings);n=t(()=>({...C,...r.value})),w.set(e,n)}return n}var T=`~pinned`,Ce=-1e5;function we(e,t){return e===T?Ce:t?.[e]??u[e]??0}function Te(e){return typeof e==`string`?e:e?.light??e?.dark}var Ee={default:`Default`,app:`App`,framework:`Framework`,web:`Web`,advanced:`Advanced`,"~builtin":`Built-in`,[T]:`Pinned`};function De(e){return e!==`~builtin`&&e!==T}function Oe(e){return Ee[e]??e}function ke(e){let t=new Set;for(let n of e)n.type===`group`&&t.add(n.id);return t}function Ae(e,t){if(!t||t.type===`group`||!t.groupId)return;let n=e.find(e=>e.id===t.groupId);return n?.type===`group`?n:void 0}function je(e,t,n,r){let i=e.filter(e=>e.type!==`group`&&e.groupId===t);if(!n)return i.length?[[`default`,i]]:[];let a=e.find(e=>e.type===`group`&&e.id===t);return O(i,n,{...r,ignoreCategoryHidden:!0,categoryOrderOverride:a?.categoryOrder})}function Me(e,t,n,r){return je(e,t,n,r).flatMap(([,e])=>e)}function E(e,t,n,r){if(!n)return;let i=e.find(e=>e.type!==`group`&&e.groupId===t&&e.id===n);if(i){if(i.when){if(r){if(!x(i.when,r))return}else if(i.when===`false`)return}return i}}function Ne(e,t,n,r){let i=E(e,t.id,n,r);return(i?.type===`action`?void 0:i)??E(e,t.id,t.defaultChildId,r)}function D(e,t){return e?t?!x(e,t):e===`false`:!1}function Pe(e,t,n){return D(e.when,n)||D(e.visibility,n)||e.id===`devframes_plugin_inspect`&&!xe(t,`showDevframeInspector`)?!0:t.docksHidden.includes(e.id)}function Fe(e){let t=new Map;for(let n of e)n.type===`group`&&t.set(n.id,n.category??`default`);return t}function Ie(e,t,n){let r=we(e,n),i=we(t,n);return i===r?t.localeCompare(e):r-i}function Le(e,t,n){let r=n[e.id]??0,i=n[t.id]??0;if(r!==i)return r-i;let a=e.defaultOrder??0,o=t.defaultOrder??0;return o===a?t.title.localeCompare(e.title):a-o}function Re(e,t,n){let r=t??e.category??`default`;return n.includes(e.id)&&t===void 0?T:r}function ze(e,t,n,r){let{docksCategoriesHidden:i,docksPinned:a}=n,{includeHidden:o,whenContext:s,collapseGroups:c,ignoreCategoryHidden:l}=r,u=new Map;for(let r of e){let e=r.type!==`group`&&r.groupId?t.get(r.groupId):void 0;if(c&&e!==void 0||!o&&Pe(r,n,s))continue;let d=Re(r,e,a);!o&&!l&&i.includes(d)||(u.has(d)||u.set(d,[]),u.get(d).push(r))}return u}function O(e,t,n){let{docksCustomOrder:r}=t,{includeHidden:i=!1,whenContext:a,collapseGroups:o=!1,ignoreCategoryHidden:s=!1,categoryOrderOverride:c}=n??{},l=ze(e,Fe(e),t,{includeHidden:i,whenContext:a,collapseGroups:o,ignoreCategoryHidden:s}),u=Array.from(l.entries()).sort(([e],[t])=>Ie(e,t,c));for(let[,e]of u)e.sort((e,t)=>Le(e,t,r));return u}function Be(e){let{availableHeight:t,reservedHeight:n,itemHeight:r,dividerHeight:i,moreButtonHeight:a,dividerCount:o,totalItems:s}=e;if(s<=0||r<=0)return 0;let c=t-n-Math.max(0,o)*i;if(Math.floor(c/r)>=s)return s;let l=Math.floor((c-a)/r);return Math.max(0,l)}function k(e,t){let n=[],r=[],i=t;for(let[t,a]of e)i<=0?r.push([t,a]):a.length>i?(n.push([t,a.slice(0,i)]),r.push([t,a.slice(i)]),i=0):(i-=a.length,n.push([t,a]));return{visible:n,overflow:r}}function Ve(e,t){return e.some(([,e])=>e.some(e=>e.id===t))}function He(e,t,n=null){let r=k(e,t);if(r.overflow.reduce((e,[,t])=>e+t.length,0)===1)return{visible:[...r.visible,...r.overflow],overflow:[],recent:null};if(!n||r.overflow.length===0||Ve(r.visible,n.id))return{...r,recent:null};let i=k(e,Math.max(t-1,0)),a=i.overflow.map(([e,t])=>[e,t.filter(e=>e.id!==n.id)]).filter(([,e])=>e.length>0);return{visible:i.visible,overflow:a,recent:n}}var A=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform??``);function Ue(e){return e.split(`+`).map(e=>e===`Mod`?A?`⌘`:`Ctrl`:e===`Shift`?A?`⇧`:`Shift`:e===`Alt`?A?`⌥`:`Alt`:e)}function We(e){let t=[];(A?e.metaKey:e.ctrlKey)&&t.push(`Mod`),(A?e.ctrlKey:e.metaKey)&&t.push(A?`Ctrl`:`Meta`),e.altKey&&t.push(`Alt`),e.shiftKey&&t.push(`Shift`);let n=e.key;return n.length===1&&(n=n.toUpperCase()),[`Control`,`Meta`,`Alt`,`Shift`].includes(n)||t.push(n),t.join(`+`)}function Ge(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e.key===r[t]?.key)}function Ke(e,t){return e!==void 0&&!Ge(e,t)}function j(e,t,n=[]){for(let r of e){let e=t(r,n);if(e===`stop`||!(e===`skip`||!r.children?.length)&&j(r.children,t,[...n,r])===`stop`)return`stop`}}function qe(e,t){let n;return j(e,e=>{if(e.id===t)return n=e,`stop`}),n}function Je(e,t){let n=e=>!e.when||x(e.when,t),r=e=>{let t=[];for(let i of e){if(!n(i))continue;if(!i.children){t.push(i);continue}let e=r(i.children);t.push({...i,children:e})}return t};return r(e)}function Ye(e,t){let n=[];return j(e.value,e=>{for(let r of t(e.id))n.push({id:e.id,keybinding:r})}),n}var Xe={"Mod+T":`Open new tab`,"Mod+W":`Close tab`,"Mod+N":`Open new window`,"Mod+L":`Focus address bar`,"Mod+D":`Bookmark page`,"Mod+Q":`Quit browser`,"Mod+Shift+T":`Reopen closed tab`,"Mod+Shift+N":`Open incognito window`,"Mod+Shift+W":`Close window`,"Mod+Shift+Q":`Quit browser (Chrome)`,"Alt+F4":`Close window (Windows)`,"Mod+R":`Reload page`,"Mod+Shift+R":`Hard reload page`,"Mod+F":`Find in page`},Ze=`devframes:docks`;function M(e){return`${Ze}:${e}`}function Qe(e){return e.at(-1)?.id??null}function N(e,t){return e.source===`client`&&!!e.action&&!!e.children?.length&&t.some(t=>t.type===`group`&&M(t.id)===e.id)}function $e(e,t){return N(e,t)?`execute`:e.children?.length?`drill`:`execute`}function et(e,t,n,r){return N(e,t)&&n&&r===e.id}function tt(e){let t=[];return j(e,(e,n)=>{if(e.showInPalette===!1)return`skip`;let r=n.at(-1)?.title;if(t.push({entry:e,...r?{parentTitle:r}:{},searchTitle:[...n.map(e=>e.title),e.title].join(` > `)}),e.showInPalette===`without-children`)return`skip`}),t}function P(e,t){if(!t)return[];let n=[];return j(e,(e,r)=>{if(e.id===t)return e.children?.length&&(n=[...r,e].filter(e=>e.children?.length).map(e=>({id:e.id,title:e.title,items:e.children}))),`stop`}),n}function nt(e,t,n){let r=n!=null&&t.some(e=>e.id===n),i=[],a=e;for(let e of t){let t=a.find(t=>t.id===e.id);if(!t?.children?.length)break;let n=t.children;i.push({id:t.id,title:t.title,items:n}),a=n}return r&&!i.some(e=>e.id===n)?P(e,n):i}var F=a(null),I=a(null),L=a(null),R=a(null);function rt(e){F.value=e}function it(){return F}function z(e){I.value=e}function at(){return I}function ot(e){L.value=e}function st(){return L}var B=a(null);function ct(e){B.value=e}function lt(){return B}function ut(e){R.value=e}function dt(){return R}var V=a(null);function ft(e){V.value=e}function pt(){return V}var H=20,U=100,mt=320,ht=240,W=`__DEVFRAMES_TRIGGER_DOCK_ACTION__`,G=`__DEVFRAME_CONNECTION_META__`,K=a(null),q=a(!1),J=e(),Y,X,Z,Q,gt=async()=>await n(()=>import(`./DockStandalone-9hV4q-BV.js`).then(e=>e.DockStandalone),__vite__mapDeps([0,1]),import.meta.url);J.on(`popup:open-requested`,e=>{At(e)});function _t(){if(!(typeof window>`u`))return window.documentPictureInPicture}function vt(){Y?.(),Y=void 0,X?.(),X=void 0}function yt(e){return c(i,t=>{e.document.documentElement?.style.setProperty(`color-scheme`,t?`dark`:`light`)},{immediate:!0})}function bt(){Z?.remove(),Z=void 0}function $(){vt(),bt(),K.value=null,q.value=!1;let e=Q;Q=void 0,e?.docks.switchEntry(null)}function xt(e,t,n){return Math.min(Math.max(e,t),n)}function St(e,t){window.innerWidth<=0||window.innerHeight<=0||(e.panel.store.width=xt(Math.round(t.innerWidth/window.innerWidth*100),H,U),e.panel.store.height=xt(Math.round(t.innerHeight/window.innerHeight*100),H,U))}async function Ct(e,t){let n=await gt(),i=t.document.createElement(`style`);i.textContent=[`html, body {`,` margin: 0;`,` padding: 0;`,` width: 100%;`,` height: 100%;`,` overflow: hidden;`,` background: transparent;`,`}`,`#devframes-popup-root {`,` width: 100vw;`,` height: 100vh;`,`}`,`#devframes-popup-root > devframes-dock-standalone {`,` display: block;`,` width: 100%;`,` height: 100%;`,`}`].join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DockStandalone-DIFLZoNP.js","./index-JnVg6JWi.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{Ct as e,M as t,St as n,c as r,f as i,ft as a,i as o,l as s,nt as c,s as l,wt as u}from"./index-JnVg6JWi.js";var d={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`,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`},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`}},f=`devframe-remote-connection`,p=d.postMessage.remoteAssetsError,m=/^[a-z][a-z\d+.-]*:/i;function h(e){let t=e.trim();return!!t&&!t.startsWith(`/`)&&!t.startsWith(`./`)&&!t.startsWith(`../`)&&!m.test(t)}function ee(e,t={}){if(!h(e))return e;let n=t.resolveClientModule?.(e);if(n)return n;if(!t.template)return e;let r=t.template.includes(`{specifier}`)?t.template.replaceAll(`{specifier}`,e):t.template+e;try{return new URL(r,t.metaBaseUrl).href}catch{return r}}function g(e,t){return h(e)?t===e?". The specifier is a bare npm specifier and this host advertises no client-module resolution (`ConnectionMeta.configs.dock.clientModuleResolution`). Serve the script as a self-contained bundle by URL, pass `resolveClientModule` to this client host, or run under a host that resolves bare specifiers (e.g. Vite: `/@id/{specifier}`).":`. The host resolved the bare specifier "${e}" to this URL but could not serve the module. Check the package is installed and resolvable from the host project's root (and built, if its exports point at build output).`:``}function _(e){let t=e.split(`&`),n=t.filter(e=>e.split(`=`)[0]!==f);return[n.join(`&`),n.length!==t.length]}function te(e){let t=e.indexOf(`?`);if(t===-1)return _(e);let n=e.slice(0,t),[r,i]=_(e.slice(t+1));return i?[r?`${n}?${r}`:n,!0]:[e,!1]}function ne(e){let t=e.indexOf(`?`);if(t===-1)return[e,!1];let n=e.slice(0,t),[r,i]=_(e.slice(t+1));return i?[r?`${n}?${r}`:n,!0]:[e,!1]}function re(e){let t=e.indexOf(`#`),n=t===-1?void 0:e.slice(t+1),r=t===-1?e:e.slice(0,t),[i,a]=n===void 0?[void 0,!1]:te(n),[o,s]=ne(r);return!a&&!s?e:i?`${o}#${i}`:o}var ie=[`===`,`!==`,`==`,`!=`,`<=`,`>=`,`&&`,`||`,`<`,`>`,`+`,`-`,`*`,`/`,`%`,`!`],ae=/[a-z_$]/i,oe=/[\w$.:]/,v=/\d/,se=/\s/;function ce(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(se.test(r)){n++;continue}if(r===`(`){t.push({type:`lparen`}),n++;continue}if(r===`)`){t.push({type:`rparen`}),n++;continue}let i=!1;for(let r of ie)if(e.startsWith(r,n)){t.push({type:`op`,value:r}),n+=r.length,i=!0;break}if(!i){if(v.test(r)){let r=n;for(;r<e.length&&v.test(e[r]);)r++;if(e[r]===`.`&&r+1<e.length&&v.test(e[r+1]))for(r++;r<e.length&&v.test(e[r]);)r++;t.push({type:`number`,value:Number(e.slice(n,r))}),n=r;continue}if(r===`"`||r===`'`){let i=r,a=n+1,o=``;for(;a<e.length&&e[a]!==i;)if(e[a]===`\\`&&a+1<e.length){let t=e[a+1];o+=t===`n`?`
|
|
3
|
+
`:t===`t`?` `:t,a+=2}else o+=e[a],a++;if(a>=e.length)throw Error(`Unterminated string literal at position ${n}`);a++,t.push({type:`string`,value:o}),n=a;continue}if(ae.test(r)){let r=n;for(;r<e.length&&oe.test(e[r]);)r++;let i=e.slice(n,r);i===`true`?t.push({type:`bool`,value:!0}):i===`false`?t.push({type:`bool`,value:!1}):t.push({type:`ident`,value:i}),n=r;continue}throw Error(`Unexpected character "${r}" at position ${n}`)}}return t.push({type:`eof`}),t}function le(e){let t=ce(e),n=0,r=()=>t[n],i=()=>t[n++],a=e=>{let t=r();return t.type===`op`&&t.value===e},o=()=>{let e=i();if(e.type!==`op`)throw Error(`internal: expected operator token, got ${y(e)}`);return e.value};function s(){let e=c();for(;a(`||`);)i(),e={type:`binary`,op:`||`,left:e,right:c()};return e}function c(){let e=l();for(;a(`&&`);)i(),e={type:`binary`,op:`&&`,left:e,right:l()};return e}function l(){let e=u();for(;a(`===`)||a(`!==`)||a(`==`)||a(`!=`);){let t=o(),n=t===`==`||t===`!=`?h():u();e={type:`binary`,op:t,left:e,right:n}}return e}function u(){let e=d();for(;a(`<=`)||a(`>=`)||a(`<`)||a(`>`);)e={type:`binary`,op:o(),left:e,right:d()};return e}function d(){let e=f();for(;a(`+`)||a(`-`);)e={type:`binary`,op:o(),left:e,right:f()};return e}function f(){let e=p();for(;a(`*`)||a(`/`)||a(`%`);)e={type:`binary`,op:o(),left:e,right:p()};return e}function p(){return a(`!`)||a(`-`)||a(`+`)?{type:`unary`,op:o(),operand:p()}:m()}function m(){let e=r();if(e.type===`number`||e.type===`string`||e.type===`bool`)return i(),{type:`literal`,value:e.value};if(e.type===`ident`)return i(),{type:`key`,key:e.value};if(e.type===`lparen`){i();let e=s(),t=r();if(t.type!==`rparen`)throw Error(`Expected ")" but got ${y(t)}`);return i(),e}throw Error(`Unexpected token: ${y(e)}`)}function h(){let e=r();if(e.type===`string`)return i(),{type:`literal`,value:e.value};if(e.type===`number`||e.type===`bool`)return i(),{type:`literal`,value:String(e.value)};if(e.type===`ident`)return i(),{type:`literal`,value:e.value};throw Error(`Expected value literal or identifier on right side of equality, got ${y(e)}`)}let ee=s(),g=r();if(g.type!==`eof`)throw Error(`Unexpected token: ${y(g)}`);return ee}function y(e){switch(e.type){case`eof`:return`end of expression`;case`lparen`:return`"("`;case`rparen`:return`")"`;case`op`:case`ident`:case`string`:return`"${e.value}"`;case`number`:case`bool`:return`"${String(e.value)}"`}}function ue(e,t,n={}){let{strict:r=!1}=n;return!!b(e,t,r)}function b(e,t,n){switch(e.type){case`literal`:return e.value;case`key`:return me(e.key,t,n);case`unary`:return de(e.op,b(e.operand,t,n));case`binary`:return fe(e,t,n)}}function de(e,t){switch(e){case`!`:return!t;case`-`:return-t;case`+`:return+t}}function fe(e,t,n){let{op:r}=e;if(r===`&&`)return b(e.left,t,n)&&b(e.right,t,n);if(r===`||`)return b(e.left,t,n)||b(e.right,t,n);let i=b(e.left,t,n),a=b(e.right,t,n);switch(r){case`==`:return String(i)===String(a);case`!=`:return String(i)!==String(a);case`===`:return i===a;case`!==`:return i!==a;case`<`:return i<a;case`>`:return i>a;case`<=`:return i<=a;case`>=`:return i>=a;case`+`:return i+a;case`-`:return i-a;case`*`:return i*a;case`/`:return i/a;case`%`:return i%a}}function pe(e,t,n){return ue(le(e),t,n)}function me(e,t,n){let{found:r,value:i}=he(e,t);if(!r&&n)throw Error(`Unknown context key: "${e}"`);return i}function he(e,t){if(e in t)return{found:!0,value:t[e]};let n=e.includes(`.`)?`.`:e.includes(`:`)?`:`:null;if(n){let r=e.split(n),i=t;for(let e of r){if(typeof i!=`object`||!i)return{found:!1,value:void 0};let t=i;if(!(e in t))return{found:!1,value:void 0};i=t[e]}return{found:!0,value:i}}return{found:!1,value:void 0}}function x(e,t,n){return pe(e,t,n)}var ge=`devframes:hub-ui:hide`,_e=`devframes_plugin_terminals`,ve=`devframes_plugin_messages`,ye=Object.freeze({type:`~builtin`,category:`~builtin`,id:`~client-auth-notice`,title:`Unauthorized`,icon:`ph:warning-duotone`}),S=Object.freeze({type:`~builtin`,category:`~builtin`,id:`~settings`,title:`Settings`,icon:`ph:gear-duotone`}),be=Object.freeze([ye,S]),C=Object.freeze({showIframeAddressBar:!1,closeOnOutsideClick:!1,autoCollapseEdgeToolbar:!0,showDevframeInspector:!1});function xe(e,t){return e?.[t]??C[t]}var w=new WeakMap;function Se(e){let n=w.get(e);if(!n){let r=o(e.docks.settings);n=t(()=>({...C,...r.value})),w.set(e,n)}return n}var T=`~pinned`,Ce=-1e5;function we(e,t){return e===T?Ce:t?.[e]??u[e]??0}function Te(e){return typeof e==`string`?e:e?.light??e?.dark}var Ee={default:`Default`,app:`App`,framework:`Framework`,web:`Web`,advanced:`Advanced`,"~builtin":`Built-in`,[T]:`Pinned`};function De(e){return e!==`~builtin`&&e!==T}function Oe(e){return Ee[e]??e}function ke(e){let t=new Set;for(let n of e)n.type===`group`&&t.add(n.id);return t}function Ae(e,t){if(!t||t.type===`group`||!t.groupId)return;let n=e.find(e=>e.id===t.groupId);return n?.type===`group`?n:void 0}function je(e,t,n,r){let i=e.filter(e=>e.type!==`group`&&e.groupId===t);if(!n)return i.length?[[`default`,i]]:[];let a=e.find(e=>e.type===`group`&&e.id===t);return O(i,n,{...r,ignoreCategoryHidden:!0,categoryOrderOverride:a?.categoryOrder})}function Me(e,t,n,r){return je(e,t,n,r).flatMap(([,e])=>e)}function E(e,t,n,r){if(!n)return;let i=e.find(e=>e.type!==`group`&&e.groupId===t&&e.id===n);if(i){if(i.when){if(r){if(!x(i.when,r))return}else if(i.when===`false`)return}return i}}function Ne(e,t,n,r){let i=E(e,t.id,n,r);return(i?.type===`action`?void 0:i)??E(e,t.id,t.defaultChildId,r)}function D(e,t){return e?t?!x(e,t):e===`false`:!1}function Pe(e,t,n){return D(e.when,n)||D(e.visibility,n)||e.id===`devframes_plugin_inspect`&&!xe(t,`showDevframeInspector`)?!0:t.docksHidden.includes(e.id)}function Fe(e){let t=new Map;for(let n of e)n.type===`group`&&t.set(n.id,n.category??`default`);return t}function Ie(e,t,n){let r=we(e,n),i=we(t,n);return i===r?t.localeCompare(e):r-i}function Le(e,t,n){let r=n[e.id]??0,i=n[t.id]??0;if(r!==i)return r-i;let a=e.defaultOrder??0,o=t.defaultOrder??0;return o===a?t.title.localeCompare(e.title):a-o}function Re(e,t,n){let r=t??e.category??`default`;return n.includes(e.id)&&t===void 0?T:r}function ze(e,t,n,r){let{docksCategoriesHidden:i,docksPinned:a}=n,{includeHidden:o,whenContext:s,collapseGroups:c,ignoreCategoryHidden:l}=r,u=new Map;for(let r of e){let e=r.type!==`group`&&r.groupId?t.get(r.groupId):void 0;if(c&&e!==void 0||!o&&Pe(r,n,s))continue;let d=Re(r,e,a);(o||l||!i.includes(d))&&(u.has(d)||u.set(d,[]),u.get(d).push(r))}return u}function O(e,t,n){let{docksCustomOrder:r}=t,{includeHidden:i=!1,whenContext:a,collapseGroups:o=!1,ignoreCategoryHidden:s=!1,categoryOrderOverride:c}=n??{},l=ze(e,Fe(e),t,{includeHidden:i,whenContext:a,collapseGroups:o,ignoreCategoryHidden:s}),u=Array.from(l.entries()).sort(([e],[t])=>Ie(e,t,c));for(let[,e]of u)e.sort((e,t)=>Le(e,t,r));return u}function Be(e){let{availableHeight:t,reservedHeight:n,itemHeight:r,dividerHeight:i,moreButtonHeight:a,dividerCount:o,totalItems:s}=e;if(s<=0||r<=0)return 0;let c=t-n-Math.max(0,o)*i;if(Math.floor(c/r)>=s)return s;let l=Math.floor((c-a)/r);return Math.max(0,l)}function k(e,t){let n=[],r=[],i=t;for(let[t,a]of e)i<=0?r.push([t,a]):a.length>i?(n.push([t,a.slice(0,i)]),r.push([t,a.slice(i)]),i=0):(i-=a.length,n.push([t,a]));return{visible:n,overflow:r}}function Ve(e,t){return e.some(([,e])=>e.some(e=>e.id===t))}function He(e,t,n=null){let r=k(e,t);if(r.overflow.reduce((e,[,t])=>e+t.length,0)===1)return{visible:[...r.visible,...r.overflow],overflow:[],recent:null};if(!n||r.overflow.length===0||Ve(r.visible,n.id))return{...r,recent:null};let i=k(e,Math.max(t-1,0)),a=i.overflow.map(([e,t])=>[e,t.filter(e=>e.id!==n.id)]).filter(([,e])=>e.length>0);return{visible:i.visible,overflow:a,recent:n}}var A=typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.platform??``);function Ue(e){return e.split(`+`).map(e=>e===`Mod`?A?`⌘`:`Ctrl`:e===`Shift`?A?`⇧`:`Shift`:e===`Alt`?A?`⌥`:`Alt`:e)}function We(e){let t=[];(A?e.metaKey:e.ctrlKey)&&t.push(`Mod`),(A?e.ctrlKey:e.metaKey)&&t.push(A?`Ctrl`:`Meta`),e.altKey&&t.push(`Alt`),e.shiftKey&&t.push(`Shift`);let n=e.key;return n.length===1&&(n=n.toUpperCase()),[`Control`,`Meta`,`Alt`,`Shift`].includes(n)||t.push(n),t.join(`+`)}function Ge(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e.key===r[t]?.key)}function Ke(e,t){return e!==void 0&&!Ge(e,t)}function j(e,t,n=[]){for(let r of e){let e=t(r,n);if(e===`stop`||e!==`skip`&&r.children?.length&&j(r.children,t,[...n,r])===`stop`)return`stop`}}function qe(e,t){let n;return j(e,e=>{if(e.id===t)return n=e,`stop`}),n}function Je(e,t){let n=e=>!e.when||x(e.when,t),r=e=>{let t=[];for(let i of e){if(!n(i))continue;if(!i.children){t.push(i);continue}let e=r(i.children);t.push({...i,children:e})}return t};return r(e)}function Ye(e,t){let n=[];return j(e.value,e=>{for(let r of t(e.id))n.push({id:e.id,keybinding:r})}),n}var Xe={"Mod+T":`Open new tab`,"Mod+W":`Close tab`,"Mod+N":`Open new window`,"Mod+L":`Focus address bar`,"Mod+D":`Bookmark page`,"Mod+Q":`Quit browser`,"Mod+Shift+T":`Reopen closed tab`,"Mod+Shift+N":`Open incognito window`,"Mod+Shift+W":`Close window`,"Mod+Shift+Q":`Quit browser (Chrome)`,"Alt+F4":`Close window (Windows)`,"Mod+R":`Reload page`,"Mod+Shift+R":`Hard reload page`,"Mod+F":`Find in page`},Ze=`devframes:docks`;function M(e){return`${Ze}:${e}`}function Qe(e){return e.at(-1)?.id??null}function N(e,t){return e.source===`client`&&!!e.action&&!!e.children?.length&&t.some(t=>t.type===`group`&&M(t.id)===e.id)}function $e(e,t){return N(e,t)?`execute`:e.children?.length?`drill`:`execute`}function et(e,t,n,r){return N(e,t)&&n&&r===e.id}function tt(e){let t=[];return j(e,(e,n)=>{if(e.showInPalette===!1)return`skip`;let r=n.at(-1)?.title;if(t.push({entry:e,...r?{parentTitle:r}:{},searchTitle:[...n.map(e=>e.title),e.title].join(` > `)}),e.showInPalette===`without-children`)return`skip`}),t}function P(e,t){if(!t)return[];let n=[];return j(e,(e,r)=>{if(e.id===t)return e.children?.length&&(n=[...r,e].filter(e=>e.children?.length).map(e=>({id:e.id,title:e.title,items:e.children}))),`stop`}),n}function nt(e,t,n){let r=n!=null&&t.some(e=>e.id===n),i=[],a=e;for(let e of t){let t=a.find(t=>t.id===e.id);if(!t?.children?.length)break;let n=t.children;i.push({id:t.id,title:t.title,items:n}),a=n}return r&&!i.some(e=>e.id===n)?P(e,n):i}var F=a(null),I=a(null),L=a(null),R=a(null);function rt(e){F.value=e}function it(){return F}function z(e){I.value=e}function at(){return I}function ot(e){L.value=e}function st(){return L}var B=a(null);function ct(e){B.value=e}function lt(){return B}function ut(e){R.value=e}function dt(){return R}var V=a(null);function ft(e){V.value=e}function pt(){return V}var H=20,U=100,mt=320,ht=240,W=`__DEVFRAMES_TRIGGER_DOCK_ACTION__`,G=`__DEVFRAME_CONNECTION_META__`,K=a(null),q=a(!1),J=e(),Y,X,Z,Q,gt=async()=>await n(()=>import(`./DockStandalone-DIFLZoNP.js`).then(e=>e.DockStandalone),__vite__mapDeps([0,1]),import.meta.url);J.on(`popup:open-requested`,e=>{At(e)});function _t(){if(!(typeof window>`u`))return window.documentPictureInPicture}function vt(){Y?.(),Y=void 0,X?.(),X=void 0}function yt(e){return c(i,t=>{e.document.documentElement?.style.setProperty(`color-scheme`,t?`dark`:`light`)},{immediate:!0})}function bt(){Z?.remove(),Z=void 0}function $(){vt(),bt(),K.value=null,q.value=!1;let e=Q;Q=void 0,e?.docks.switchEntry(null)}function xt(e,t,n){return Math.min(Math.max(e,t),n)}function St(e,t){window.innerWidth<=0||window.innerHeight<=0||(e.panel.store.width=xt(Math.round(t.innerWidth/window.innerWidth*100),H,U),e.panel.store.height=xt(Math.round(t.innerHeight/window.innerHeight*100),H,U))}async function Ct(e,t){let n=await gt(),i=t.document.createElement(`style`);i.textContent=[`html, body {`,` margin: 0;`,` padding: 0;`,` width: 100%;`,` height: 100%;`,` overflow: hidden;`,` background: transparent;`,`}`,`#devframes-popup-root {`,` width: 100vw;`,` height: 100vh;`,`}`,`#devframes-popup-root > devframes-dock-standalone {`,` display: block;`,` width: 100%;`,` height: 100%;`,`}`].join(`
|
|
4
4
|
`),l(t.document,s().value),t.document.head?.appendChild(i),t.document.body.textContent=``,t[G]=globalThis[G]??e.rpc.connectionMeta;let a=t.document.createElement(`div`);a.id=`devframes-popup-root`,t.document.body.appendChild(a);let o=new n({context:e});r(o,s().value.primaryColor),Z=o,a.appendChild(o)}function wt(){return!!_t()?.requestWindow}function Tt(e,t){typeof window>`u`||e!==`standalone`&&(window[W]=t)}async function Et(e,t){if(!(typeof window>`u`)&&e===`standalone`)try{let e=window.opener;if(!e||e.closed)return;let n=e[W];return typeof n==`function`?await n(t):void 0}catch{return}}function Dt(){return K}function Ot(){return q}function kt(e){J.emit(`popup:open-requested`,e)}async function At(e){z(null);let t=K.value;if(t?.closed)$();else if(t)return t.focus(),t;let n=_t();if(!n?.requestWindow)return null;let r;try{let t=r=await n.requestWindow({width:Math.max(mt,Math.round(window.innerWidth*e.panel.store.width/100)),height:Math.max(ht,Math.round(window.innerHeight*e.panel.store.height/100))});await Ct(e,t),X=yt(t);let i=()=>St(e,t),a=()=>{K.value===t&&$()};return t.addEventListener(`resize`,i),t.addEventListener(`pagehide`,a),Y=()=>{t.removeEventListener(`resize`,i),t.removeEventListener(`pagehide`,a)},Q=e,K.value=t,q.value=!0,t}catch{return r&&!r.closed&&r.close(),$(),null}}export{x as $,Ue as A,Me as B,Qe as C,Ye as D,Xe as E,Be as F,E as G,ke as H,O as I,be as J,Ne as K,He as L,A as M,We as N,Je as O,j as P,_e as Q,Oe as R,P as S,$e as T,De as U,je as V,Te as W,ge as X,S as Y,ve as Z,pt as _,Dt as a,tt as b,ct as c,ft as d,g as et,rt as f,st as g,at as h,Et as i,d as it,Ke as j,qe as k,z as l,lt as m,Tt as n,re as nt,Ot as o,dt as p,Se as q,kt as r,p as rt,ut as s,wt as t,ee as tt,ot as u,it as v,nt as w,et as x,M as y,Ae as z};
|