import{H as m,h as P,I as x,X as D,ag as K,K as q,U as F,S as $,a4 as R,ah as z,D as C,i as N,F as G,ai as E,ab as T,aj as H,l as g,ak as X,al as L,am as Z,an as y,ao as J,ap as Q,o as V,aq as W,ar as k,G as ee,as as re,at as ne,ae as se,au as te,av as ae,aw as ie,ax as ue,ay as B,az as p}from"./zXDdy2c_.js";import{B as U}from"./DUdVct7e.js";import{s as fe,g as le}from"./8ZaN1sxc.js";function ve(e,r,s=!1){P&&x();var n=new U(e),t=s?D:0;function a(f,u){if(P){const v=K(e)===q;if(f===v){var l=F();$(l),n.anchor=l,R(!1),n.ensure(f,u),R(!0);return}}n.ensure(f,u)}m(()=>{var f=!1;r((u,l=!0)=>{f=!0,a(l,u)}),f||a(!1,null)},t)}function he(e,r,s){P&&x();var n=new U(e);m(()=>{var t=r()??null;n.ensure(t,t&&(a=>s(a,t)))},D)}function A(e,r){return e===r||e?.[E]===r}function ge(e={},r,s,n){return z(()=>{var t,a;return C(()=>{t=a,a=[],N(()=>{e!==s(...a)&&(r(e,...a),t&&A(s(...t),e)&&r(null,...t))})}),()=>{G(()=>{a&&A(s(...a),e)&&r(null,...a)})}}),e}let b=!1,w=Symbol();function Se(e,r,s){const n=s[r]??={store:null,source:H(void 0),unsubscribe:T};if(n.store!==e&&!(w in s))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=T;else{var t=!0;n.unsubscribe=fe(e,a=>{t?n.source.v=a:L(n.source,a)}),t=!1}return e&&w in s?le(e):g(n.source)}function Pe(e,r){return e.set(r),r}function ye(){const e={};function r(){X(()=>{for(var s in e)e[s].unsubscribe();Z(e,w,{enumerable:!1,value:!0})})}return[e,r]}function we(){b=!0}function oe(e){var r=b;try{return b=!1,[e(),b]}finally{b=r}}const ce={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Ee(e,r,s){return new Proxy({props:e,exclude:r},ce)}const de={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let t=e.props[n];p(t)&&(t=t());const a=y(t,r);if(a&&a.set)return a.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const t=y(n,r);return t&&!t.configurable&&(t.configurable=!0),t}}},has(e,r){if(r===E||r===B)return!1;for(let s of e.props)if(p(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(p(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Oe(...e){return new Proxy({props:e},de)}function Ie(e,r,s,n){var t=!se||(s&te)!==0,a=(s&ne)!==0,f=(s&ie)!==0,u=n,l=!0,v=()=>(l&&(l=!1,u=f?N(n):n),u),c;if(a){var M=E in e||B in e;c=y(e,r)?.set??(M&&r in e?i=>e[r]=i:void 0)}var d,O=!1;a?[d,O]=oe(()=>e[r]):d=e[r],d===void 0&&n!==void 0&&(d=v(),c&&(t&&J(),c(d)));var o;if(t?o=()=>{var i=e[r];return i===void 0?v():(l=!0,i)}:o=()=>{var i=e[r];return i!==void 0&&(u=void 0),i===void 0?u:i},t&&(s&Q)===0)return o;if(c){var Y=e.$$legacy;return(function(i,h){return arguments.length>0?((!t||!h||Y||O)&&c(h?o():i),i):o()})}var S=!1,_=((s&ae)!==0?V:W)(()=>(S=!1,o()));a&&g(_);var j=ee;return(function(i,h){if(arguments.length>0){const I=h?g(_):t&&a?k(i):i;return L(_,I),S=!0,u!==void 0&&(u=I),i}return ue&&S||(j.f&re)!==0?_.v:g(_)})}export{Se as a,ge as b,he as c,Pe as d,Oe as e,ve as i,we as m,Ie as p,Ee as r,ye as s};
