rssany 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +52 -52
- package/README.md +156 -147
- package/app/plugins/builtin/email.rssany.js +84 -84
- package/app/plugins/builtin/rss.rssany.js +164 -164
- package/app/statics/README.md +7 -7
- package/app/webui/build/200.html +36 -36
- package/app/webui/build/_app/immutable/assets/10.CmGYYZFR.css +1 -0
- package/app/webui/build/_app/immutable/assets/11.Dkz3VS_N.css +1 -0
- package/app/webui/build/_app/immutable/assets/14.BCCBoMGj.css +1 -0
- package/app/webui/build/_app/immutable/assets/6.Cm_jpHOq.css +1 -0
- package/app/webui/build/_app/immutable/assets/7.CJ3BjogD.css +1 -0
- package/app/webui/build/_app/immutable/assets/9.CATKVZ-n.css +1 -0
- package/app/webui/build/_app/immutable/assets/{SourcesList.D5Lso0bo.css → SourcesList.ke66uOSi.css} +1 -1
- package/app/webui/build/_app/immutable/assets/chevron-down.CV-KWLNP.css +1 -0
- package/app/webui/build/_app/immutable/chunks/{CGCMIfh3.js → 4TuV_psf.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{DAdOEnFb.js → B0czyjwj.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{CFwxUBGi.js → B553hBXT.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/B8StT3Do.js +6 -0
- package/app/webui/build/_app/immutable/chunks/BI_ale1m.js +1 -0
- package/app/webui/build/_app/immutable/chunks/BK0ygNWX.js +2 -0
- package/app/webui/build/_app/immutable/chunks/{Brun6sCr.js → BZY5aksi.js} +2 -2
- package/app/webui/build/_app/immutable/chunks/{C8umpVpB.js → BnqaikL8.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/BsQ08Wq_.js +1 -0
- package/app/webui/build/_app/immutable/chunks/C9wTDiHH.js +1 -0
- package/app/webui/build/_app/immutable/chunks/{B-CeeY89.js → CAKuIoAf.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/CEWi_rGa.js +1 -0
- package/app/webui/build/_app/immutable/chunks/CIsxbQ9B.js +1 -0
- package/app/webui/build/_app/immutable/chunks/{ChUctqXA.js → Cc7aBSsN.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{DXDBlEGf.js → Czo-EcYU.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{BAJAS8BI.js → D8G961Hm.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{CS53ooo0.js → DIeahUKq.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/DO5OXNYS.js +1 -0
- package/app/webui/build/_app/immutable/chunks/{Dr67pd7v.js → DhZZHWov.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{Dyvi1wBH.js → DptdhtA1.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{ClknbeNl.js → FDS7fbwH.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/{DCEayuDt.js → IhDlsCxD.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/Nd0ktDhd.js +1 -0
- package/app/webui/build/_app/immutable/chunks/{D6kzEN_P.js → SvdgnirT.js} +1 -1
- package/app/webui/build/_app/immutable/chunks/WW6La7Nt.js +2 -0
- package/app/webui/build/_app/immutable/chunks/{DsxvjlCC.js → pd_p3yYy.js} +5 -5
- package/app/webui/build/_app/immutable/chunks/qwlQuQWi.js +36 -0
- package/app/webui/build/_app/immutable/chunks/rNwPv4DZ.js +1 -0
- package/app/webui/build/_app/immutable/entry/app.CsaNbZ85.js +2 -0
- package/app/webui/build/_app/immutable/entry/start.BZt_oICN.js +1 -0
- package/app/webui/build/_app/immutable/nodes/{0.CQDkqUeN.js → 0.zuqEMBQT.js} +3 -3
- package/app/webui/build/_app/immutable/nodes/1.DzLFxso0.js +1 -0
- package/app/webui/build/_app/immutable/nodes/10.BC-1FXeC.js +1 -0
- package/app/webui/build/_app/immutable/nodes/11.CePwEHqu.js +3 -0
- package/app/webui/build/_app/immutable/nodes/12.eeQ9B6bg.js +1 -0
- package/app/webui/build/_app/immutable/nodes/13.BLKI9iZo.js +1 -0
- package/app/webui/build/_app/immutable/nodes/14.T9l5Rh19.js +1 -0
- package/app/webui/build/_app/immutable/nodes/15.39GHtAg1.js +1 -0
- package/app/webui/build/_app/immutable/nodes/{16.p6WfP435.js → 16.BO-9BBQ5.js} +2 -2
- package/app/webui/build/_app/immutable/nodes/17.BWRgFCUw.js +1 -0
- package/app/webui/build/_app/immutable/nodes/2.BOYqXdCa.js +1 -0
- package/app/webui/build/_app/immutable/nodes/3.CJw5Nx2o.js +1 -0
- package/app/webui/build/_app/immutable/nodes/5.9zgwFV6I.js +2 -0
- package/app/webui/build/_app/immutable/nodes/6.trFT-trT.js +2 -0
- package/app/webui/build/_app/immutable/nodes/7.DCqiDq6O.js +1 -0
- package/app/webui/build/_app/immutable/nodes/8.DG_T-wWN.js +1 -0
- package/app/webui/build/_app/immutable/nodes/9.FiPTezQy.js +1 -0
- package/app/webui/build/_app/version.json +1 -1
- package/bin/rssany.js +55 -3
- package/dist/index.js +314 -96
- package/dist/index.js.map +1 -1
- package/package.json +107 -103
- package/scripts/postinstall.mjs +44 -0
- package/scripts/reset.mjs +137 -135
- package/scripts/user-dir.mjs +52 -0
- package/app/webui/build/_app/immutable/assets/10.Dj8_pmut.css +0 -1
- package/app/webui/build/_app/immutable/assets/13.Qu_tY6H9.css +0 -1
- package/app/webui/build/_app/immutable/assets/5.B-dPiwB7.css +0 -1
- package/app/webui/build/_app/immutable/assets/6.B27N7pdA.css +0 -1
- package/app/webui/build/_app/immutable/assets/8.Cgji2b15.css +0 -1
- package/app/webui/build/_app/immutable/assets/9.BsCIAvn3.css +0 -1
- package/app/webui/build/_app/immutable/chunks/6prdYIKP.js +0 -1
- package/app/webui/build/_app/immutable/chunks/B2cyTHdf.js +0 -2
- package/app/webui/build/_app/immutable/chunks/B6WG2Sd3.js +0 -1
- package/app/webui/build/_app/immutable/chunks/BA4Gucnq.js +0 -1
- package/app/webui/build/_app/immutable/chunks/BXTsojX2.js +0 -36
- package/app/webui/build/_app/immutable/chunks/BkD3yAYe.js +0 -1
- package/app/webui/build/_app/immutable/chunks/C4uF_YIK.js +0 -1
- package/app/webui/build/_app/immutable/chunks/CBY2biv-.js +0 -1
- package/app/webui/build/_app/immutable/chunks/DAV9bzjw.js +0 -1
- package/app/webui/build/_app/immutable/chunks/DL3Q5sfb.js +0 -1
- package/app/webui/build/_app/immutable/chunks/DVa8Y-mQ.js +0 -1
- package/app/webui/build/_app/immutable/chunks/DoRPmqLn.js +0 -2
- package/app/webui/build/_app/immutable/chunks/vtBo8kBV.js +0 -1
- package/app/webui/build/_app/immutable/entry/app.dq7-6soi.js +0 -2
- package/app/webui/build/_app/immutable/entry/start.BnoTfBrB.js +0 -1
- package/app/webui/build/_app/immutable/nodes/1.BUa24rXB.js +0 -1
- package/app/webui/build/_app/immutable/nodes/10.MZgVhpGF.js +0 -1
- package/app/webui/build/_app/immutable/nodes/11.B39IbrZ0.js +0 -1
- package/app/webui/build/_app/immutable/nodes/12.B5B81dLQ.js +0 -1
- package/app/webui/build/_app/immutable/nodes/13.DWWcH27k.js +0 -6
- package/app/webui/build/_app/immutable/nodes/14.Db6eOPqq.js +0 -1
- package/app/webui/build/_app/immutable/nodes/15.B2jiP2VJ.js +0 -1
- package/app/webui/build/_app/immutable/nodes/2.AJd2163d.js +0 -1
- package/app/webui/build/_app/immutable/nodes/3.BZQeL-vz.js +0 -1
- package/app/webui/build/_app/immutable/nodes/4.BT_N8pCh.js +0 -2
- package/app/webui/build/_app/immutable/nodes/5.Bo_ftyqW.js +0 -2
- package/app/webui/build/_app/immutable/nodes/6.vOowdQUr.js +0 -1
- package/app/webui/build/_app/immutable/nodes/7.BfVbBKZu.js +0 -1
- package/app/webui/build/_app/immutable/nodes/8.BslYG5f2.js +0 -1
- package/app/webui/build/_app/immutable/nodes/9.DAgT-df2.js +0 -1
- /package/app/webui/build/_app/immutable/assets/{11.qYZMiTb0.css → 12.qYZMiTb0.css} +0 -0
- /package/app/webui/build/_app/immutable/assets/{12.DfJcfUWl.css → 13.DfJcfUWl.css} +0 -0
- /package/app/webui/build/_app/immutable/assets/{14.DfMfOrS3.css → 15.DfMfOrS3.css} +0 -0
- /package/app/webui/build/_app/immutable/assets/{15.nNGjXhCQ.css → 17.nNGjXhCQ.css} +0 -0
- /package/app/webui/build/_app/immutable/assets/{4.Di6rvlY-.css → 5.Di6rvlY-.css} +0 -0
- /package/app/webui/build/_app/immutable/assets/{7.CrNxmd8B.css → 8.CrNxmd8B.css} +0 -0
- /package/app/webui/build/_app/immutable/nodes/{17.BtYZF6FM.js → 18.BtYZF6FM.js} +0 -0
- /package/app/webui/build/_app/immutable/nodes/{18.BIzqhTqv.js → 4.BIzqhTqv.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var v=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),A=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b7 as P,i as T,a5 as I,T as gt,bt as De}from"./vtBo8kBV.js";import{w as Dt}from"./ClknbeNl.js";import{b as qe,H as qt,S as Vt,R as zt}from"./BUApaBEI.js";import{o as te}from"./Dyvi1wBH.js";new URL("sveltekit-internal://");function Ve(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ze(t){return t.split("%25").map(decodeURI).join("%25")}function Be(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function At({href:t}){return t.split("#")[0]}function Ke(t,e,n,a=!1){const r=new URL(t);Object.defineProperty(r,"searchParams",{value:new Proxy(r.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return(c,...p)=>(n(c),i[o](c,...p));e();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];a&&s.push("hash");for(const i of s)Object.defineProperty(r,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return r}function Fe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let a=n.length;for(;a;)e=e*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)e=e*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Bt(t)),Ge(t,e));const Y=new Map;function He(t,e){const n=Bt(t,e),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&Y.set(n,{body:r,init:s,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=qe(r)),Promise.resolve(new Response(r,s))}return window.fetch(t,e)}function Me(t,e,n){if(Y.size>0){const a=Bt(t,n),r=Y.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);Y.delete(a)}}return window.fetch(e,n)}function Bt(t,e){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const r=[];e.headers&&r.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&r.push(e.body),a+=`[data-hash="${Fe(...r)}"]`}return a}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ye(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Xe(t).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return e.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Pt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Pt(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const p=We.exec(l),[,h,_,g,d]=p;return e.push({name:g,matcher:d,optional:!!h,rest:!!_,chained:_?c===1&&i[0]==="":!1}),_?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Pt(l)}).join("")}).join("")}/?$`),params:e}}function Je(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Xe(t){return t.slice(1).split("/").filter(Je)}function Qe(t,e,n){const a={},r=t.slice(1),s=r.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const l=e[o];let c=r[o-i];if(l.chained&&l.rest&&i&&(c=r.slice(o-i,o+1).filter(p=>p).join("/"),i=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const p=e[o+1],h=r[o+1];p&&!p.rest&&p.optional&&h&&l.chained&&(i=0),!p&&!h&&Object.keys(a).length===s.length&&(i=0);continue}if(l.optional&&l.chained){i++;continue}return}if(!i)return a}function Pt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:a}){const r=new Set(e);return Object.entries(n).map(([o,[l,c,p]])=>{const{pattern:h,params:_}=Ye(o),g={id:o,exec:d=>{const f=h.exec(d);if(f)return Qe(f,_,a)},errors:[1,...p||[]].map(d=>t[d]),layouts:[0,...c||[]].map(i),leaf:s(l)};return g.errors.length=g.layouts.length=Math.max(g.errors.length,g.layouts.length),g});function s(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function i(o){return o===void 0?o:[r.has(o),t[o]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ee(t,e,n=JSON.stringify){const a=n(e);try{sessionStorage[t]=a}catch{}}var fe;const U=((fe=globalThis.__sveltekit_dhz4pi)==null?void 0:fe.base)??"";var ue;const tn=((ue=globalThis.__sveltekit_dhz4pi)==null?void 0:ue.assets)??U??"",en="1780571209371",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",nn="sveltekit:pageurl",K="sveltekit:history",X="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Et=location.origin;function Kt(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function V(){return{x:pageXOffset,y:pageYOffset}}function B(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ne={...D,"":D.hover};function ve(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function ye(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ve(t)}}function Ot(t,e,n){let a;try{if(a=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=t instanceof SVGAElement?t.target.baseVal:t.target,s=!a||!!r||St(a,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(a==null?void 0:a.origin)===Et&&t.hasAttribute("download");return{url:a,external:s,target:r,download:i}}function mt(t){let e=null,n=null,a=null,r=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)a===null&&(a=B(o,"preload-code")),r===null&&(r=B(o,"preload-data")),e===null&&(e=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=ve(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ne[a??"off"],preload_data:ne[r??"off"],keepfocus:l(e),noscroll:l(n),reload:l(s),replace_state:l(i)}}function re(t){const e=Dt(t);let n=!0;function a(){n=!0,e.update(i=>i)}function r(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:a,set:r,subscribe:s}}const be={v:()=>{}};function rn(){const{set:t,subscribe:e}=Dt(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${tn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==en;return i&&(t(!0),be.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:a}}function St(t,e,n){return t.origin!==Et||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Cn(t){}const ke=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ke];const an=new Set([...ke]);[...an];function on(t){return t.filter(e=>e!=null)}function Ft(t){return t instanceof qt||t instanceof Vt?t.status:500}function sn(t){return t instanceof Vt?t.text:"Internal Error"}let S,Q,Tt;const ln=te.toString().includes("$$")||/function \w+\(\) \{\}/.test(te.toString()),ae="a:";var rt,at,ot,it,st,lt,ct,ft,de,ut,he,dt,pe;ln?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ae)},Q={current:null},Tt={current:!1}):(S=new(de=class{constructor(){A(this,rt,P({}));A(this,at,P(null));A(this,ot,P(null));A(this,it,P({}));A(this,st,P({id:null}));A(this,lt,P({}));A(this,ct,P(-1));A(this,ft,P(new URL(ae)))}get data(){return T(v(this,rt))}set data(e){I(v(this,rt),e)}get form(){return T(v(this,at))}set form(e){I(v(this,at),e)}get error(){return T(v(this,ot))}set error(e){I(v(this,ot),e)}get params(){return T(v(this,it))}set params(e){I(v(this,it),e)}get route(){return T(v(this,st))}set route(e){I(v(this,st),e)}get state(){return T(v(this,lt))}set state(e){I(v(this,lt),e)}get status(){return T(v(this,ct))}set status(e){I(v(this,ct),e)}get url(){return T(v(this,ft))}set url(e){I(v(this,ft),e)}},rt=new WeakMap,at=new WeakMap,ot=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,de),Q=new(he=class{constructor(){A(this,ut,P(null))}get current(){return T(v(this,ut))}set current(e){I(v(this,ut),e)}},ut=new WeakMap,he),Tt=new(pe=class{constructor(){A(this,dt,P(!1))}get current(){return T(v(this,dt))}set current(e){I(v(this,dt),e)}},dt=new WeakMap,pe),be.v=()=>Tt.current=!0);function cn(t){Object.assign(S,t)}const oe={spanContext(){return fn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},fn={traceId:"",spanId:"",traceFlags:0},un=new Set(["icon","shortcut icon","apple-touch-icon"]);let M=null;const j=ge(_e)??{},Z=ge(me)??{},$={url:re({}),page:re({}),navigating:Dt(null),updated:rn()};function Gt(t){j[t]=V()}function dn(t,e){let n=t+1;for(;j[n];)delete j[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function tt(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Re(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ie(){}let Ht,Ct,_t,O,$t,k;const wt=[],vt=[];let b=null;function jt(){var t;(t=b==null?void 0:b.fork)==null||t.then(e=>e==null?void 0:e.discard()),b=null}const pt=new Map,Ee=new Set,hn=new Set,J=new Set;let w={branch:[],error:null,url:null},Se=!1,yt=!1,se=!0,et=!1,W=!1,xe=!1,Mt=!1,Le,R,L,q;const bt=new Set,le=new Map;async function Dn(t,e,n){var s,i,o,l,c;(s=globalThis.__sveltekit_dhz4pi)!=null&&s.data&&globalThis.__sveltekit_dhz4pi.data,document.URL!==location.href&&(location.href=location.href),k=t,await((o=(i=t.hooks).init)==null?void 0:o.call(i)),Ht=Ze(t),O=document.documentElement,$t=e,Ct=t.nodes[0],_t=t.nodes[1],Ct(),_t(),R=(l=history.state)==null?void 0:l[K],L=(c=history.state)==null?void 0:c[X],R||(R=L=Date.now(),history.replaceState({...history.state,[K]:R,[X]:L},""));const a=j[R];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Sn($t,n)):(await F({type:"enter",url:Kt(k.hash?Un(new URL(location.href)):location.href),replace_state:!0}),r()),En()}function pn(){wt.length=0,Mt=!1}function Ue(t){vt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=vt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ae(t){var e;(e=Z[t])==null||e.forEach((n,a)=>{var r,s;(s=(r=vt[a])==null?void 0:r.snapshot)==null||s.restore(n)})}function ce(){Gt(R),ee(_e,j),Ue(L),ee(me,Z)}async function Pe(t,e,n,a){let r;e.invalidateAll&&jt(),await F({type:"goto",url:Kt(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:a,accept:()=>{e.invalidateAll&&(Mt=!0,r=[...le.keys()]),e.invalidate&&e.invalidate.forEach(Rn)}}),e.invalidateAll&>().then(gt).then(()=>{le.forEach(({resource:s},i)=>{var o;r!=null&&r.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function gn(t){if(t.id!==(b==null?void 0:b.id)){jt();const e={};bt.add(e),b={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(bt.delete(e),n.type==="loaded"&&n.state.error&&jt(),n)),fork:null}}return b.promise}async function It(t){var n;const e=(n=await xt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(a=>a[1]()))}async function Te(t,e,n){var s;const a={params:w.params,route:{id:((s=w.route)==null?void 0:s.id)??null},url:new URL(location.href)};w={...t.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,t.props.page),Le=new k.root({target:e,props:{...t.props,stores:$,components:vt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ae(L),n){const i={from:null,to:{...a,scroll:j[R]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(i))}yt=!0}async function kt({url:t,params:e,branch:n,errors:a,status:r,error:s,route:i,form:o}){let l="never";if(U&&(t.pathname===U||t.pathname===U+"/"))l="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(l=d.slash);t.pathname=Ve(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:s,route:i},props:{constructors:on(n).map(d=>d.node.component),page:Qt(S)}};o!==void 0&&(c.props.form=o);let p={},h=!S,_=0;for(let d=0;d<Math.max(n.length,w.branch.length);d+=1){const f=n[d],u=w.branch[d];(f==null?void 0:f.data)!==(u==null?void 0:u.data)&&(h=!0),f&&(p={...p,...f.data},h&&(c.props[`data_${_}`]=p),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==s||o!==void 0&&o!==S.form||h)&&(c.props.page={error:s,params:e,route:{id:(i==null?void 0:i.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:h?p:S.data}),c}async function Wt({loader:t,parent:e,url:n,params:a,route:r,server_data_node:s}){var p,h,_;let i=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((p=c.universal)!=null&&p.load){let g=function(...f){for(const u of f){const{href:m}=new URL(u,n);l.dependencies.add(m)}};const d={tracing:{enabled:!1,root:oe,current:oe},route:new Proxy(r,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(a,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:(s==null?void 0:s.data)??null,url:Ke(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},k.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:m,promise:y}=Ie(f,u,n);return o&&g(m.href),y},setHeaders:()=>{},depends:g,parent(){return o&&(l.parent=!0),e()},untrack(f){o=!1;try{return f()}finally{o=!0}}};i=await c.universal.load.call(null,d)??null}return{node:c,loader:t,server:s,universal:(h=c.universal)!=null&&h.load?{type:"data",data:i,uses:l}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=c.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let a=t instanceof Request?t.url:t;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=yt?Me(a,r.href,e):He(a,e);return{resolved:r,promise:s}}function mn(t,e,n,a,r,s){if(Mt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&e||r.url&&n)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(s[i]!==w.params[i])return!0;for(const i of r.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function Yt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const a of n){const r=t.searchParams.getAll(a),s=e.searchParams.getAll(a);r.every(i=>s.includes(i))&&s.every(i=>r.includes(i))&&n.delete(a)}return n}function wn({error:t,url:e,route:n,params:a}){return{type:"loaded",state:{error:t,url:e,route:n,params:a,branch:[]},props:{page:Qt(S),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:a,route:r,preload:s}){if((b==null?void 0:b.id)===t)return bt.delete(b.token),b.promise;const{errors:i,layouts:o,leaf:l}=r,c=[...o,l];i.forEach(u=>u==null?void 0:u().catch(()=>{})),c.forEach(u=>u==null?void 0:u[1]().catch(()=>{}));const p=w.url?t!==Rt(w.url):!1,h=w.route?r.id!==w.route.id:!1,_=_n(w.url,n);let g=!1;const d=c.map(async(u,m)=>{var C;if(!u)return;const y=w.branch[m];return u[1]===(y==null?void 0:y.loader)&&!mn(g,h,p,_,(C=y.universal)==null?void 0:C.uses,a)?y:(g=!0,Wt({loader:u[1],url:n,params:a,route:r,parent:async()=>{var ht;const N={};for(let z=0;z<m;z+=1)Object.assign(N,(ht=await d[z])==null?void 0:ht.data);return N},server_data_node:Yt(u[0]?{type:"skip"}:null,u[0]?y==null?void 0:y.server:void 0)}))});for(const u of d)u.catch(()=>{});const f=[];for(let u=0;u<c.length;u+=1)if(c[u])try{f.push(await d[u])}catch(m){if(m instanceof zt)return{type:"redirect",location:m.location};if(bt.has(s))return wn({error:await nt(m,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let y=Ft(m),x;if(m instanceof qt)x=m.body;else{if(await $.updated.check())return await Re(),await tt(n);x=await nt(m,{params:a,url:n,route:{id:r.id}})}const C=await vn(u,f,i);return C?kt({url:n,params:a,branch:f.slice(0,C.idx).concat(C.node),errors:i,status:y,error:x,route:r}):await $e(n,{id:r.id},x,y)}else f.push(void 0);return kt({url:n,params:a,branch:f,errors:i,status:200,error:null,route:r,form:e?void 0:null})}async function vn(t,e,n){for(;t--;)if(n[t]){let a=t;for(;!e[a];)a-=1;try{return{idx:a+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Jt({status:t,error:e,url:n,route:a}){const r={};let s=null;try{const i=await Wt({loader:Ct,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Yt(s)}),o={node:await _t(),loader:_t,universal:null,server:null,data:null};return kt({url:n,params:r,branch:[i,o],status:t,error:e,errors:[],route:null})}catch(i){if(i instanceof zt)return Pe(new URL(i.location,location.href),{},0);throw i}}async function yn(t){const e=t.href;if(pt.has(e))return pt.get(e);let n;try{const a=(async()=>{let r=await k.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof r=="string"){const s=new URL(t);k.hash?s.hash=r:s.pathname=r,r=s}return r})();pt.set(e,a),n=await a}catch{pt.delete(e);return}return n}async function xt(t,e){if(t&&!St(t,U,k.hash)){const n=await yn(t);if(!n)return;const a=bn(n);for(const r of Ht){const s=r.exec(a);if(s)return{id:Rt(t),invalidating:e,route:r,params:Be(s),url:t}}}}function bn(t){return ze(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function Rt(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ce({url:t,type:e,intent:n,delta:a,event:r,scroll:s}){let i=!1;const o=Xt(w,n,t,e,s??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{i=!0,o.reject(new Error("navigation cancelled"))}};return et||Ee.forEach(c=>c(l)),i?null:o}async function F({type:t,url:e,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:c=ie,block:p=ie,event:h}){var z;const _=q;q=l;const g=await xt(e,!1),d=t==="enter"?Xt(w,g,e,t):Ce({url:e,type:t,delta:n==null?void 0:n.delta,intent:g,scroll:n==null?void 0:n.scroll,event:h});if(!d){p(),q===l&&(q=_);return}const f=R,u=L;c(),et=!0,yt&&d.navigation.type!=="enter"&&$.navigating.set(Q.current=d.navigation);let m=g&&await Oe(g);if(!m){if(St(e,U,k.hash))return await tt(e,s);m=await $e(e,{id:null},await nt(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(g==null?void 0:g.url)||e,q!==l)return d.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await F({type:t,url:new URL(m.location,e),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i,redirect_count:o+1,nav_token:l}),d.fulfil(void 0);return}m=await Jt({status:500,error:await nt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else m.props.page.status>=400&&await $.updated.check()&&(await Re(),await tt(e,s));if(pn(),Gt(f),Ue(u),m.props.page.url.pathname!==e.pathname&&(e.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const E=s?0:1,G={[K]:R+=E,[X]:L+=E,[we]:i};(s?history.replaceState:history.pushState).call(history,G,"",e),s||dn(R,L)}const y=g&&(b==null?void 0:b.id)===g.id?b.fork:null;b=null,m.props.page.state=i;let x;if(yt){const E=(await Promise.all(Array.from(hn,H=>H(d.navigation)))).filter(H=>typeof H=="function");if(E.length>0){let H=function(){E.forEach(Ut=>{J.delete(Ut)})};E.push(H),E.forEach(Ut=>{J.add(Ut)})}const G=d.navigation.to;w={...m.state,nav:{params:G.params,route:G.route,url:G.url}},m.props.page&&(m.props.page.url=e);const Lt=y&&await y;Lt?x=Lt.commit():(M=null,Le.$set(m.props),M&&Object.assign(m.props.page,M),cn(m.props.page),x=(z=De)==null?void 0:z()),xe=!0}else await Te(m,$t,!1);const{activeElement:C}=document;await x,await gt(),await gt();let N=null;if(se){const E=n?n.scroll:r?V():null;E?scrollTo(E.x,E.y):(N=e.hash&&document.getElementById(je(e)))?N.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==C&&document.activeElement!==document.body;!a&&!ht&&Ln(e,!N),se=!0,m.props.page&&(M&&Object.assign(m.props.page,M),Object.assign(S,m.props.page)),et=!1,t==="popstate"&&Ae(L),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=V()),J.forEach(E=>E(d.navigation)),$.navigating.set(Q.current=null)}async function $e(t,e,n,a,r){return t.origin===Et&&t.pathname===location.pathname&&!Se?await Jt({status:a,error:n,url:t,route:e}):await tt(t,r)}function kn(){let t,e={element:void 0,href:void 0},n;O.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{s(l,D.hover)},20)});function a(o){o.defaultPrevented||s(o.composedPath()[0],D.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(It(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function s(o,l){const c=ye(o,O),p=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||p)return;const{url:h,external:_,download:g}=Ot(c,U,k.hash);if(_||g)return;const d=mt(c),f=h&&Rt(w.url)===Rt(h);if(!(d.reload||f))if(l<=d.preload_data){e={element:c,href:c.href},n=D.tap;const u=await xt(h,!1);if(!u)return;gn(u)}else l<=d.preload_code&&(e={element:c,href:c.href},n=l,It(h))}function i(){r.disconnect();for(const o of O.querySelectorAll("a")){const{url:l,external:c,download:p}=Ot(o,U,k.hash);if(c||p)continue;const h=mt(o);h.reload||(h.preload_code===D.viewport&&r.observe(o),h.preload_code===D.eager&&It(l))}}J.add(i),i()}function nt(t,e){if(t instanceof qt)return t.body;const n=Ft(t),a=sn(t);return k.hooks.handleError({error:t,event:e,status:n,message:a})??{message:a}}function qn(t,e={}){return t=new URL(Kt(t)),t.origin!==Et?Promise.reject(new Error("goto: invalid URL")):Pe(t,e,0)}function Rn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function En(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(ce(),!et){const r=Xt(w,void 0,null,"leave"),s={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Ee.forEach(i=>i(s))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ce()}),(e=navigator.connection)!=null&&e.saveData||kn(),O.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=ye(n.composedPath()[0],O);if(!a)return;const{url:r,external:s,target:i,download:o}=Ot(a,U,k.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const l=mt(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[p,h]=(k.hash?r.hash.replace(/^#/,""):r.href).split("#"),_=p===At(location);if(s||l.reload&&(!_||!h)){Ce({url:r,type:"link",event:n})?et=!0:n.preventDefault();return}if(h!==void 0&&_){const[,g]=w.url.href.split("#");if(g===h){if(n.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=a.ownerDocument.getElementById(decodeURIComponent(h));d&&(d.scrollIntoView(),d.focus())}return}if(W=!0,Gt(R),t(r),!l.replace_state)return;W=!1}n.preventDefault(),await new Promise(g=>{requestAnimationFrame(()=>{setTimeout(g,0)}),setTimeout(g,100)}),await F({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),O.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(St(o,U,!1))return;const l=n.target,c=mt(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const p=new FormData(l,r);o.search=new URLSearchParams(p).toString(),F({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Nt){if((a=n.state)!=null&&a[K]){const r=n.state[K];if(q={},r===R)return;const s=j[r],i=n.state[we]??{},o=new URL(n.state[nn]??location.href),l=n.state[X],c=w.url?At(location)===At(w.url):!1;if(l===L&&(xe||c)){i!==S.state&&(S.state=i),t(o),j[R]=V(),s&&scrollTo(s.x,s.y),R=r;return}const h=r-R;await F({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{R=r,L=l},block:()=>{history.go(-h)},nav_token:q,event:n})}else if(!W){const r=new URL(location.href);t(r),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[K]:++R,[X]:L},"",location.href))});for(const n of document.querySelectorAll("link"))un.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Q.current=null)});function t(n){w.url=S.url=n,$.page.set(Qt(S)),$.page.notify()}}async function Sn(t,{status:e=200,error:n,node_ids:a,params:r,route:s,server_route:i,data:o,form:l}){Se=!0;const c=new URL(location.href);let p;({params:r={},route:s={id:null}}=await xt(c,!1)||{}),p=Ht.find(({id:g})=>g===s.id);let h,_=!0;try{const g=a.map(async(f,u)=>{const m=o[u];return m!=null&&m.uses&&(m.uses=xn(m.uses)),Wt({loader:k.nodes[f],url:c,params:r,route:s,parent:async()=>{const y={};for(let x=0;x<u;x+=1)Object.assign(y,(await g[x]).data);return y},server_data_node:Yt(m)})}),d=await Promise.all(g);if(p){const f=p.layouts;for(let u=0;u<f.length;u++)f[u]||d.splice(u,0,void 0)}h=await kt({url:c,params:r,branch:d,status:e,error:n,errors:p==null?void 0:p.errors,form:l,route:p??null})}catch(g){if(g instanceof zt){await tt(new URL(g.location,location.href));return}h=await Jt({status:Ft(g),error:await nt(g,{url:c,params:r,route:s}),url:c,route:s}),t.textContent="",_=!1}h.props.page&&(h.props.page.state={}),await Te(h,t,_)}function xn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Nt=!1;function Ln(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=je(t);if(a&&document.getElementById(a)){const{x:s,y:i}=V();setTimeout(()=>{const o=history.state;Nt=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",t),e&&scrollTo(s,i),Nt=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let i=0;i<r.rangeCount;i+=1)s.push(r.getRangeAt(i));setTimeout(()=>{if(r.rangeCount===s.length){for(let i=0;i<r.rangeCount;i+=1){const o=s[i],l=r.getRangeAt(i);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}r.removeAllRanges()}})}}}function Xt(t,e,n,a,r=null){var c,p;let s,i;const o=new Promise((h,_)=>{s=h,i=_});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:V()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((p=e==null?void 0:e.route)==null?void 0:p.id)??null},url:n,scroll:r},willUnload:!e,type:a,complete:o},fulfil:s,reject:i}}function Qt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Un(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function je(t){let e;if(k.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Dn as a,qn as g,Cn as l,S as p,$ as s};
|
|
1
|
+
var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var v=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),A=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b8 as P,k as T,a5 as I,t as gt,bu as De}from"./BsQ08Wq_.js";import{w as Dt}from"./FDS7fbwH.js";import{b as qe,H as qt,S as Vt,R as zt}from"./BUApaBEI.js";import{o as te}from"./DptdhtA1.js";new URL("sveltekit-internal://");function Ve(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ze(t){return t.split("%25").map(decodeURI).join("%25")}function Be(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function At({href:t}){return t.split("#")[0]}function Ke(t,e,n,a=!1){const r=new URL(t);Object.defineProperty(r,"searchParams",{value:new Proxy(r.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return(c,...p)=>(n(c),i[o](c,...p));e();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];a&&s.push("hash");for(const i of s)Object.defineProperty(r,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return r}function Fe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let a=n.length;for(;a;)e=e*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)e=e*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Bt(t)),Ge(t,e));const Y=new Map;function He(t,e){const n=Bt(t,e),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&Y.set(n,{body:r,init:s,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=qe(r)),Promise.resolve(new Response(r,s))}return window.fetch(t,e)}function Me(t,e,n){if(Y.size>0){const a=Bt(t,n),r=Y.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);Y.delete(a)}}return window.fetch(e,n)}function Bt(t,e){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const r=[];e.headers&&r.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&r.push(e.body),a+=`[data-hash="${Fe(...r)}"]`}return a}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ye(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Xe(t).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return e.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Pt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Pt(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const p=We.exec(l),[,h,_,g,d]=p;return e.push({name:g,matcher:d,optional:!!h,rest:!!_,chained:_?c===1&&i[0]==="":!1}),_?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Pt(l)}).join("")}).join("")}/?$`),params:e}}function Je(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Xe(t){return t.slice(1).split("/").filter(Je)}function Qe(t,e,n){const a={},r=t.slice(1),s=r.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const l=e[o];let c=r[o-i];if(l.chained&&l.rest&&i&&(c=r.slice(o-i,o+1).filter(p=>p).join("/"),i=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const p=e[o+1],h=r[o+1];p&&!p.rest&&p.optional&&h&&l.chained&&(i=0),!p&&!h&&Object.keys(a).length===s.length&&(i=0);continue}if(l.optional&&l.chained){i++;continue}return}if(!i)return a}function Pt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:a}){const r=new Set(e);return Object.entries(n).map(([o,[l,c,p]])=>{const{pattern:h,params:_}=Ye(o),g={id:o,exec:d=>{const f=h.exec(d);if(f)return Qe(f,_,a)},errors:[1,...p||[]].map(d=>t[d]),layouts:[0,...c||[]].map(i),leaf:s(l)};return g.errors.length=g.layouts.length=Math.max(g.errors.length,g.layouts.length),g});function s(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function i(o){return o===void 0?o:[r.has(o),t[o]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ee(t,e,n=JSON.stringify){const a=n(e);try{sessionStorage[t]=a}catch{}}var fe;const U=((fe=globalThis.__sveltekit_c0lzti)==null?void 0:fe.base)??"";var ue;const tn=((ue=globalThis.__sveltekit_c0lzti)==null?void 0:ue.assets)??U??"",en="1781605764291",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",nn="sveltekit:pageurl",K="sveltekit:history",X="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Et=location.origin;function Kt(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function V(){return{x:pageXOffset,y:pageYOffset}}function B(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ne={...D,"":D.hover};function ve(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function ye(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ve(t)}}function Ot(t,e,n){let a;try{if(a=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=t instanceof SVGAElement?t.target.baseVal:t.target,s=!a||!!r||St(a,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(a==null?void 0:a.origin)===Et&&t.hasAttribute("download");return{url:a,external:s,target:r,download:i}}function mt(t){let e=null,n=null,a=null,r=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)a===null&&(a=B(o,"preload-code")),r===null&&(r=B(o,"preload-data")),e===null&&(e=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=ve(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ne[a??"off"],preload_data:ne[r??"off"],keepfocus:l(e),noscroll:l(n),reload:l(s),replace_state:l(i)}}function re(t){const e=Dt(t);let n=!0;function a(){n=!0,e.update(i=>i)}function r(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:a,set:r,subscribe:s}}const be={v:()=>{}};function rn(){const{set:t,subscribe:e}=Dt(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${tn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==en;return i&&(t(!0),be.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:a}}function St(t,e,n){return t.origin!==Et||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Cn(t){}const ke=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ke];const an=new Set([...ke]);[...an];function on(t){return t.filter(e=>e!=null)}function Ft(t){return t instanceof qt||t instanceof Vt?t.status:500}function sn(t){return t instanceof Vt?t.text:"Internal Error"}let S,Q,Tt;const ln=te.toString().includes("$$")||/function \w+\(\) \{\}/.test(te.toString()),ae="a:";var rt,at,ot,it,st,lt,ct,ft,de,ut,he,dt,pe;ln?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ae)},Q={current:null},Tt={current:!1}):(S=new(de=class{constructor(){A(this,rt,P({}));A(this,at,P(null));A(this,ot,P(null));A(this,it,P({}));A(this,st,P({id:null}));A(this,lt,P({}));A(this,ct,P(-1));A(this,ft,P(new URL(ae)))}get data(){return T(v(this,rt))}set data(e){I(v(this,rt),e)}get form(){return T(v(this,at))}set form(e){I(v(this,at),e)}get error(){return T(v(this,ot))}set error(e){I(v(this,ot),e)}get params(){return T(v(this,it))}set params(e){I(v(this,it),e)}get route(){return T(v(this,st))}set route(e){I(v(this,st),e)}get state(){return T(v(this,lt))}set state(e){I(v(this,lt),e)}get status(){return T(v(this,ct))}set status(e){I(v(this,ct),e)}get url(){return T(v(this,ft))}set url(e){I(v(this,ft),e)}},rt=new WeakMap,at=new WeakMap,ot=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,de),Q=new(he=class{constructor(){A(this,ut,P(null))}get current(){return T(v(this,ut))}set current(e){I(v(this,ut),e)}},ut=new WeakMap,he),Tt=new(pe=class{constructor(){A(this,dt,P(!1))}get current(){return T(v(this,dt))}set current(e){I(v(this,dt),e)}},dt=new WeakMap,pe),be.v=()=>Tt.current=!0);function cn(t){Object.assign(S,t)}const oe={spanContext(){return fn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},fn={traceId:"",spanId:"",traceFlags:0},un=new Set(["icon","shortcut icon","apple-touch-icon"]);let M=null;const j=ge(_e)??{},Z=ge(me)??{},$={url:re({}),page:re({}),navigating:Dt(null),updated:rn()};function Gt(t){j[t]=V()}function dn(t,e){let n=t+1;for(;j[n];)delete j[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function tt(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Re(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ie(){}let Ht,Ct,_t,O,$t,k;const wt=[],vt=[];let b=null;function jt(){var t;(t=b==null?void 0:b.fork)==null||t.then(e=>e==null?void 0:e.discard()),b=null}const pt=new Map,Ee=new Set,hn=new Set,J=new Set;let w={branch:[],error:null,url:null},Se=!1,yt=!1,se=!0,et=!1,W=!1,xe=!1,Mt=!1,Le,R,L,q;const bt=new Set,le=new Map;async function Dn(t,e,n){var s,i,o,l,c;(s=globalThis.__sveltekit_c0lzti)!=null&&s.data&&globalThis.__sveltekit_c0lzti.data,document.URL!==location.href&&(location.href=location.href),k=t,await((o=(i=t.hooks).init)==null?void 0:o.call(i)),Ht=Ze(t),O=document.documentElement,$t=e,Ct=t.nodes[0],_t=t.nodes[1],Ct(),_t(),R=(l=history.state)==null?void 0:l[K],L=(c=history.state)==null?void 0:c[X],R||(R=L=Date.now(),history.replaceState({...history.state,[K]:R,[X]:L},""));const a=j[R];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Sn($t,n)):(await F({type:"enter",url:Kt(k.hash?Un(new URL(location.href)):location.href),replace_state:!0}),r()),En()}function pn(){wt.length=0,Mt=!1}function Ue(t){vt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=vt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ae(t){var e;(e=Z[t])==null||e.forEach((n,a)=>{var r,s;(s=(r=vt[a])==null?void 0:r.snapshot)==null||s.restore(n)})}function ce(){Gt(R),ee(_e,j),Ue(L),ee(me,Z)}async function Pe(t,e,n,a){let r;e.invalidateAll&&jt(),await F({type:"goto",url:Kt(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:a,accept:()=>{e.invalidateAll&&(Mt=!0,r=[...le.keys()]),e.invalidate&&e.invalidate.forEach(Rn)}}),e.invalidateAll&>().then(gt).then(()=>{le.forEach(({resource:s},i)=>{var o;r!=null&&r.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function gn(t){if(t.id!==(b==null?void 0:b.id)){jt();const e={};bt.add(e),b={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(bt.delete(e),n.type==="loaded"&&n.state.error&&jt(),n)),fork:null}}return b.promise}async function It(t){var n;const e=(n=await xt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(a=>a[1]()))}async function Te(t,e,n){var s;const a={params:w.params,route:{id:((s=w.route)==null?void 0:s.id)??null},url:new URL(location.href)};w={...t.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,t.props.page),Le=new k.root({target:e,props:{...t.props,stores:$,components:vt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ae(L),n){const i={from:null,to:{...a,scroll:j[R]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(i))}yt=!0}async function kt({url:t,params:e,branch:n,errors:a,status:r,error:s,route:i,form:o}){let l="never";if(U&&(t.pathname===U||t.pathname===U+"/"))l="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(l=d.slash);t.pathname=Ve(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:s,route:i},props:{constructors:on(n).map(d=>d.node.component),page:Qt(S)}};o!==void 0&&(c.props.form=o);let p={},h=!S,_=0;for(let d=0;d<Math.max(n.length,w.branch.length);d+=1){const f=n[d],u=w.branch[d];(f==null?void 0:f.data)!==(u==null?void 0:u.data)&&(h=!0),f&&(p={...p,...f.data},h&&(c.props[`data_${_}`]=p),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==s||o!==void 0&&o!==S.form||h)&&(c.props.page={error:s,params:e,route:{id:(i==null?void 0:i.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:h?p:S.data}),c}async function Wt({loader:t,parent:e,url:n,params:a,route:r,server_data_node:s}){var p,h,_;let i=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((p=c.universal)!=null&&p.load){let g=function(...f){for(const u of f){const{href:m}=new URL(u,n);l.dependencies.add(m)}};const d={tracing:{enabled:!1,root:oe,current:oe},route:new Proxy(r,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(a,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:(s==null?void 0:s.data)??null,url:Ke(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},k.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:m,promise:y}=Ie(f,u,n);return o&&g(m.href),y},setHeaders:()=>{},depends:g,parent(){return o&&(l.parent=!0),e()},untrack(f){o=!1;try{return f()}finally{o=!0}}};i=await c.universal.load.call(null,d)??null}return{node:c,loader:t,server:s,universal:(h=c.universal)!=null&&h.load?{type:"data",data:i,uses:l}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=c.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let a=t instanceof Request?t.url:t;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=yt?Me(a,r.href,e):He(a,e);return{resolved:r,promise:s}}function mn(t,e,n,a,r,s){if(Mt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&e||r.url&&n)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(s[i]!==w.params[i])return!0;for(const i of r.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function Yt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const a of n){const r=t.searchParams.getAll(a),s=e.searchParams.getAll(a);r.every(i=>s.includes(i))&&s.every(i=>r.includes(i))&&n.delete(a)}return n}function wn({error:t,url:e,route:n,params:a}){return{type:"loaded",state:{error:t,url:e,route:n,params:a,branch:[]},props:{page:Qt(S),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:a,route:r,preload:s}){if((b==null?void 0:b.id)===t)return bt.delete(b.token),b.promise;const{errors:i,layouts:o,leaf:l}=r,c=[...o,l];i.forEach(u=>u==null?void 0:u().catch(()=>{})),c.forEach(u=>u==null?void 0:u[1]().catch(()=>{}));const p=w.url?t!==Rt(w.url):!1,h=w.route?r.id!==w.route.id:!1,_=_n(w.url,n);let g=!1;const d=c.map(async(u,m)=>{var C;if(!u)return;const y=w.branch[m];return u[1]===(y==null?void 0:y.loader)&&!mn(g,h,p,_,(C=y.universal)==null?void 0:C.uses,a)?y:(g=!0,Wt({loader:u[1],url:n,params:a,route:r,parent:async()=>{var ht;const N={};for(let z=0;z<m;z+=1)Object.assign(N,(ht=await d[z])==null?void 0:ht.data);return N},server_data_node:Yt(u[0]?{type:"skip"}:null,u[0]?y==null?void 0:y.server:void 0)}))});for(const u of d)u.catch(()=>{});const f=[];for(let u=0;u<c.length;u+=1)if(c[u])try{f.push(await d[u])}catch(m){if(m instanceof zt)return{type:"redirect",location:m.location};if(bt.has(s))return wn({error:await nt(m,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let y=Ft(m),x;if(m instanceof qt)x=m.body;else{if(await $.updated.check())return await Re(),await tt(n);x=await nt(m,{params:a,url:n,route:{id:r.id}})}const C=await vn(u,f,i);return C?kt({url:n,params:a,branch:f.slice(0,C.idx).concat(C.node),errors:i,status:y,error:x,route:r}):await $e(n,{id:r.id},x,y)}else f.push(void 0);return kt({url:n,params:a,branch:f,errors:i,status:200,error:null,route:r,form:e?void 0:null})}async function vn(t,e,n){for(;t--;)if(n[t]){let a=t;for(;!e[a];)a-=1;try{return{idx:a+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Jt({status:t,error:e,url:n,route:a}){const r={};let s=null;try{const i=await Wt({loader:Ct,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Yt(s)}),o={node:await _t(),loader:_t,universal:null,server:null,data:null};return kt({url:n,params:r,branch:[i,o],status:t,error:e,errors:[],route:null})}catch(i){if(i instanceof zt)return Pe(new URL(i.location,location.href),{},0);throw i}}async function yn(t){const e=t.href;if(pt.has(e))return pt.get(e);let n;try{const a=(async()=>{let r=await k.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof r=="string"){const s=new URL(t);k.hash?s.hash=r:s.pathname=r,r=s}return r})();pt.set(e,a),n=await a}catch{pt.delete(e);return}return n}async function xt(t,e){if(t&&!St(t,U,k.hash)){const n=await yn(t);if(!n)return;const a=bn(n);for(const r of Ht){const s=r.exec(a);if(s)return{id:Rt(t),invalidating:e,route:r,params:Be(s),url:t}}}}function bn(t){return ze(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function Rt(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ce({url:t,type:e,intent:n,delta:a,event:r,scroll:s}){let i=!1;const o=Xt(w,n,t,e,s??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{i=!0,o.reject(new Error("navigation cancelled"))}};return et||Ee.forEach(c=>c(l)),i?null:o}async function F({type:t,url:e,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:c=ie,block:p=ie,event:h}){var z;const _=q;q=l;const g=await xt(e,!1),d=t==="enter"?Xt(w,g,e,t):Ce({url:e,type:t,delta:n==null?void 0:n.delta,intent:g,scroll:n==null?void 0:n.scroll,event:h});if(!d){p(),q===l&&(q=_);return}const f=R,u=L;c(),et=!0,yt&&d.navigation.type!=="enter"&&$.navigating.set(Q.current=d.navigation);let m=g&&await Oe(g);if(!m){if(St(e,U,k.hash))return await tt(e,s);m=await $e(e,{id:null},await nt(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(g==null?void 0:g.url)||e,q!==l)return d.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await F({type:t,url:new URL(m.location,e),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i,redirect_count:o+1,nav_token:l}),d.fulfil(void 0);return}m=await Jt({status:500,error:await nt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else m.props.page.status>=400&&await $.updated.check()&&(await Re(),await tt(e,s));if(pn(),Gt(f),Ue(u),m.props.page.url.pathname!==e.pathname&&(e.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const E=s?0:1,G={[K]:R+=E,[X]:L+=E,[we]:i};(s?history.replaceState:history.pushState).call(history,G,"",e),s||dn(R,L)}const y=g&&(b==null?void 0:b.id)===g.id?b.fork:null;b=null,m.props.page.state=i;let x;if(yt){const E=(await Promise.all(Array.from(hn,H=>H(d.navigation)))).filter(H=>typeof H=="function");if(E.length>0){let H=function(){E.forEach(Ut=>{J.delete(Ut)})};E.push(H),E.forEach(Ut=>{J.add(Ut)})}const G=d.navigation.to;w={...m.state,nav:{params:G.params,route:G.route,url:G.url}},m.props.page&&(m.props.page.url=e);const Lt=y&&await y;Lt?x=Lt.commit():(M=null,Le.$set(m.props),M&&Object.assign(m.props.page,M),cn(m.props.page),x=(z=De)==null?void 0:z()),xe=!0}else await Te(m,$t,!1);const{activeElement:C}=document;await x,await gt(),await gt();let N=null;if(se){const E=n?n.scroll:r?V():null;E?scrollTo(E.x,E.y):(N=e.hash&&document.getElementById(je(e)))?N.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==C&&document.activeElement!==document.body;!a&&!ht&&Ln(e,!N),se=!0,m.props.page&&(M&&Object.assign(m.props.page,M),Object.assign(S,m.props.page)),et=!1,t==="popstate"&&Ae(L),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=V()),J.forEach(E=>E(d.navigation)),$.navigating.set(Q.current=null)}async function $e(t,e,n,a,r){return t.origin===Et&&t.pathname===location.pathname&&!Se?await Jt({status:a,error:n,url:t,route:e}):await tt(t,r)}function kn(){let t,e={element:void 0,href:void 0},n;O.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{s(l,D.hover)},20)});function a(o){o.defaultPrevented||s(o.composedPath()[0],D.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(It(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function s(o,l){const c=ye(o,O),p=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||p)return;const{url:h,external:_,download:g}=Ot(c,U,k.hash);if(_||g)return;const d=mt(c),f=h&&Rt(w.url)===Rt(h);if(!(d.reload||f))if(l<=d.preload_data){e={element:c,href:c.href},n=D.tap;const u=await xt(h,!1);if(!u)return;gn(u)}else l<=d.preload_code&&(e={element:c,href:c.href},n=l,It(h))}function i(){r.disconnect();for(const o of O.querySelectorAll("a")){const{url:l,external:c,download:p}=Ot(o,U,k.hash);if(c||p)continue;const h=mt(o);h.reload||(h.preload_code===D.viewport&&r.observe(o),h.preload_code===D.eager&&It(l))}}J.add(i),i()}function nt(t,e){if(t instanceof qt)return t.body;const n=Ft(t),a=sn(t);return k.hooks.handleError({error:t,event:e,status:n,message:a})??{message:a}}function qn(t,e={}){return t=new URL(Kt(t)),t.origin!==Et?Promise.reject(new Error("goto: invalid URL")):Pe(t,e,0)}function Rn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function En(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(ce(),!et){const r=Xt(w,void 0,null,"leave"),s={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Ee.forEach(i=>i(s))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ce()}),(e=navigator.connection)!=null&&e.saveData||kn(),O.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=ye(n.composedPath()[0],O);if(!a)return;const{url:r,external:s,target:i,download:o}=Ot(a,U,k.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const l=mt(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[p,h]=(k.hash?r.hash.replace(/^#/,""):r.href).split("#"),_=p===At(location);if(s||l.reload&&(!_||!h)){Ce({url:r,type:"link",event:n})?et=!0:n.preventDefault();return}if(h!==void 0&&_){const[,g]=w.url.href.split("#");if(g===h){if(n.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=a.ownerDocument.getElementById(decodeURIComponent(h));d&&(d.scrollIntoView(),d.focus())}return}if(W=!0,Gt(R),t(r),!l.replace_state)return;W=!1}n.preventDefault(),await new Promise(g=>{requestAnimationFrame(()=>{setTimeout(g,0)}),setTimeout(g,100)}),await F({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),O.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(St(o,U,!1))return;const l=n.target,c=mt(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const p=new FormData(l,r);o.search=new URLSearchParams(p).toString(),F({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Nt){if((a=n.state)!=null&&a[K]){const r=n.state[K];if(q={},r===R)return;const s=j[r],i=n.state[we]??{},o=new URL(n.state[nn]??location.href),l=n.state[X],c=w.url?At(location)===At(w.url):!1;if(l===L&&(xe||c)){i!==S.state&&(S.state=i),t(o),j[R]=V(),s&&scrollTo(s.x,s.y),R=r;return}const h=r-R;await F({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{R=r,L=l},block:()=>{history.go(-h)},nav_token:q,event:n})}else if(!W){const r=new URL(location.href);t(r),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[K]:++R,[X]:L},"",location.href))});for(const n of document.querySelectorAll("link"))un.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Q.current=null)});function t(n){w.url=S.url=n,$.page.set(Qt(S)),$.page.notify()}}async function Sn(t,{status:e=200,error:n,node_ids:a,params:r,route:s,server_route:i,data:o,form:l}){Se=!0;const c=new URL(location.href);let p;({params:r={},route:s={id:null}}=await xt(c,!1)||{}),p=Ht.find(({id:g})=>g===s.id);let h,_=!0;try{const g=a.map(async(f,u)=>{const m=o[u];return m!=null&&m.uses&&(m.uses=xn(m.uses)),Wt({loader:k.nodes[f],url:c,params:r,route:s,parent:async()=>{const y={};for(let x=0;x<u;x+=1)Object.assign(y,(await g[x]).data);return y},server_data_node:Yt(m)})}),d=await Promise.all(g);if(p){const f=p.layouts;for(let u=0;u<f.length;u++)f[u]||d.splice(u,0,void 0)}h=await kt({url:c,params:r,branch:d,status:e,error:n,errors:p==null?void 0:p.errors,form:l,route:p??null})}catch(g){if(g instanceof zt){await tt(new URL(g.location,location.href));return}h=await Jt({status:Ft(g),error:await nt(g,{url:c,params:r,route:s}),url:c,route:s}),t.textContent="",_=!1}h.props.page&&(h.props.page.state={}),await Te(h,t,_)}function xn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Nt=!1;function Ln(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=je(t);if(a&&document.getElementById(a)){const{x:s,y:i}=V();setTimeout(()=>{const o=history.state;Nt=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",t),e&&scrollTo(s,i),Nt=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let i=0;i<r.rangeCount;i+=1)s.push(r.getRangeAt(i));setTimeout(()=>{if(r.rangeCount===s.length){for(let i=0;i<r.rangeCount;i+=1){const o=s[i],l=r.getRangeAt(i);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}r.removeAllRanges()}})}}}function Xt(t,e,n,a,r=null){var c,p;let s,i;const o=new Promise((h,_)=>{s=h,i=_});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:V()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((p=e==null?void 0:e.route)==null?void 0:p.id)??null},url:n,scroll:r},willUnload:!e,type:a,complete:o},fulfil:s,reject:i}}function Qt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Un(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function je(t){let e;if(k.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Dn as a,qn as g,Cn as l,S as p,$ as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ar as t,an as u,W as o,aa as c,
|
|
1
|
+
import{ar as t,an as u,W as o,aa as c,u as e}from"./BsQ08Wq_.js";function l(n){o===null&&t(),c&&o.l!==null?s(o).m.push(n):u(()=>{const a=e(n);if(typeof a=="function")return a})}function i(n){o===null&&t(),l(()=>()=>e(n))}function s(n){var a=n.l;return a.u??(a.u={a:[],b:[],m:[]})}export{i as a,l as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aj as o,
|
|
1
|
+
import{aj as o,u as a,aF as d}from"./BsQ08Wq_.js";function p(s,u,e){if(s==null)return u(void 0),o;const t=a(()=>s.subscribe(u,e));return t.unsubscribe?()=>t.unsubscribe():t}const i=[];function _(s,u=o){let e=null;const t=new Set;function c(r){if(d(s,r)&&(s=r,e)){const b=!i.length;for(const n of t)n[1](),i.push(n,s);if(b){for(let n=0;n<i.length;n+=2)i[n][0](i[n+1]);i.length=0}}}function f(r){c(r(s))}function l(r,b=o){const n=[r,b];return t.add(n),t.size===1&&(e=u(c,f)||o),r(s),()=>{t.delete(n),t.size===0&&e&&(e(),e=null)}}return{set:c,update:f,subscribe:l}}function h(s){let u;return p(s,e=>u=e)(),u}export{h as g,p as s,_ as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,a as i,a0 as c,b as f}from"./
|
|
1
|
+
import{h as t,a as i,a0 as c,b as f}from"./BsQ08Wq_.js";import{B as y}from"./rNwPv4DZ.js";const b=Symbol("NaN");function m(r,e,n){t&&i();var o=new y(r),s=!c();f(()=>{var a=e();a!==a&&(a=b),s&&a!==null&&typeof a=="object"&&(a={}),o.ensure(a,n)})}export{m as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{W as d,am as m,an as i,u as g,ao as l,ap as b,k as p,aq as k,ad as v}from"./BsQ08Wq_.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>k(s.s);if(n){let a=0,t={};const _=v(()=>{let c=!1;const r=s.s;for(const o in r)r[o]!==t[o]&&(t[o]=r[o],c=!0);return c&&a++,a});f=()=>p(_)}e.b.length&&m(()=>{u(s,f),l(e.b)}),i(()=>{const a=g(()=>e.m.map(b));return()=>{for(const t of a)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,f),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as n,a as i}from"./
|
|
1
|
+
import{c as n,a as i}from"./DIeahUKq.js";import"./CEWi_rGa.js";import{f as m}from"./BsQ08Wq_.js";import{s as l}from"./Cc7aBSsN.js";import{l as c,s as d}from"./D8G961Hm.js";import{I as f}from"./pd_p3yYy.js";function y(t,o){const r=c(o,["children","$$slots","$$events","$$legacy"]);/**
|
|
2
2
|
* @license lucide-svelte v0.460.1 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b9 as F,Q as M,v as K,X as Y,h as w,z as W,ba as m,bb as x,ah as rr,bc as tr,bd as ir,be as fr,k as sr,bf as er,bg as ar,bh as P,e as R,bi as ur,bj as or,S as cr,bk as nr,bl as lr}from"./BsQ08Wq_.js";import{i as vr,a as dr,d as br,c as hr,n as gr,b as Ar}from"./BK0ygNWX.js";function _r(r,i){var t=void 0,f;F(()=>{t!==(t=i())&&(f&&(M(f),f=null),t&&(f=K(()=>{Y(()=>t(r))})))})}function z(r){var i,t,f="";if(typeof r=="string"||typeof r=="number")f+=r;else if(typeof r=="object")if(Array.isArray(r)){var s=r.length;for(i=0;i<s;i++)r[i]&&(t=z(r[i]))&&(f&&(f+=" "),f+=t)}else for(t in r)r[t]&&(f&&(f+=" "),f+=t);return f}function Tr(){for(var r,i,t=0,f="",s=arguments.length;t<s;t++)(r=arguments[t])&&(i=z(r))&&(f&&(f+=" "),f+=i);return f}function wr(r){return typeof r=="object"?Tr(r):r??""}const H=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Er(r,i,t){var f=r==null?"":""+r;if(i&&(f=f?f+" "+i:i),t){for(var s of Object.keys(t))if(t[s])f=f?f+" "+s:s;else if(f.length)for(var e=s.length,u=0;(u=f.indexOf(s,u))>=0;){var n=u+e;(u===0||H.includes(f[u-1]))&&(n===f.length||H.includes(f[n]))?f=(u===0?"":f.substring(0,u))+f.substring(n+1):u=n}}return f===""?null:f}function V(r,i=!1){var t=i?" !important;":";",f="";for(var s of Object.keys(r)){var e=r[s];e!=null&&e!==""&&(f+=" "+s+": "+e+t)}return f}function k(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Nr(r,i){if(i){var t="",f,s;if(Array.isArray(i)?(f=i[0],s=i[1]):f=i,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var e=!1,u=0,n=!1,d=[];f&&d.push(...Object.keys(f).map(k)),s&&d.push(...Object.keys(s).map(k));var l=0,g=-1;const N=r.length;for(var v=0;v<N;v++){var a=r[v];if(n?a==="/"&&r[v-1]==="*"&&(n=!1):e?e===a&&(e=!1):a==="/"&&r[v+1]==="*"?n=!0:a==='"'||a==="'"?e=a:a==="("?u++:a===")"&&u--,!n&&e===!1&&u===0){if(a===":"&&g===-1)g=v;else if(a===";"||v===N-1){if(g!==-1){var E=k(r.substring(l,g).trim());if(!d.includes(E)){a!==";"&&v++;var T=r.substring(l,v).trim();t+=" "+T+";"}}l=v+1,g=-1}}}}return f&&(t+=V(f)),s&&(t+=V(s,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function Sr(r,i,t,f,s,e){var u=r.__className;if(w||u!==t||u===void 0){var n=Er(t,f,e);(!w||n!==r.getAttribute("class"))&&(n==null?r.removeAttribute("class"):i?r.className=n:r.setAttribute("class",n)),r.__className=t}else if(e&&s!==e)for(var d in e){var l=!!e[d];(s==null||l!==!!s[d])&&r.classList.toggle(d,l)}return e}function C(r,i={},t,f){for(var s in t){var e=t[s];i[s]!==e&&(t[s]==null?r.style.removeProperty(s):r.style.setProperty(s,e,f))}}function Ir(r,i,t,f){var s=r.__style;if(w||s!==i){var e=Nr(i,f);(!w||e!==r.getAttribute("style"))&&(e==null?r.removeAttribute("style"):r.style.cssText=e),r.__style=i}else f&&(Array.isArray(f)?(C(r,t==null?void 0:t[0],f[0]),C(r,t==null?void 0:t[1],f[1],"important")):C(r,t,f));return f}function $(r,i,t=!1){if(r.multiple){if(i==null)return;if(!W(i))return m();for(var f of r.options)f.selected=i.includes(B(f));return}for(f of r.options){var s=B(f);if(x(s,i)){f.selected=!0;return}}(!t||i!==void 0)&&(r.selectedIndex=-1)}function pr(r){var i=new MutationObserver(()=>{$(r,r.__value)});i.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),rr(()=>{i.disconnect()})}function B(r){return"__value"in r?r.__value:r.value}const p=Symbol("class"),O=Symbol("style"),J=Symbol("is custom element"),X=Symbol("is html"),Or=P?"link":"LINK",Lr=P?"input":"INPUT",Pr=P?"option":"OPTION",kr=P?"select":"SELECT";function Cr(r){if(w){var i=!1,t=()=>{if(!i){if(i=!0,r.hasAttribute("value")){var f=r.value;L(r,"value",null),r.value=f}if(r.hasAttribute("checked")){var s=r.checked;L(r,"checked",null),r.checked=s}}};r.__on_r=t,cr(t),nr()}}function Ur(r,i){var t=j(r);t.checked!==(t.checked=i??void 0)&&(r.checked=i)}function Mr(r,i){i?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function L(r,i,t,f){var s=j(r);w&&(s[i]=r.getAttribute(i),i==="src"||i==="srcset"||i==="href"&&r.nodeName===Or)||s[i]!==(s[i]=t)&&(i==="loading"&&(r[lr]=t),t==null?r.removeAttribute(i):typeof t!="string"&&q(r).includes(i)?r[i]=t:r.setAttribute(i,t))}function $r(r,i,t,f,s=!1,e=!1){if(w&&s&&r.nodeName===Lr){var u=r,n=u.type==="checkbox"?"defaultChecked":"defaultValue";n in t||Cr(u)}var d=j(r),l=d[J],g=!d[X];let v=w&&l;v&&R(!1);var a=i||{},E=r.nodeName===Pr;for(var T in i)T in t||(t[T]=null);t.class?t.class=wr(t.class):t[p]&&(t.class=null),t[O]&&(t.style??(t.style=null));var N=q(r);for(const o in t){let c=t[o];if(E&&o==="value"&&c==null){r.value=r.__value="",a[o]=c;continue}if(o==="class"){var I=r.namespaceURI==="http://www.w3.org/1999/xhtml";Sr(r,I,c,f,i==null?void 0:i[p],t[p]),a[o]=c,a[p]=t[p];continue}if(o==="style"){Ir(r,c,i==null?void 0:i[O],t[O]),a[o]=c,a[O]=t[O];continue}var A=a[o];if(!(c===A&&!(c===void 0&&r.hasAttribute(o)))){a[o]=c;var y=o[0]+o[1];if(y!=="$$")if(y==="on"){const _={},S="$$"+o;let h=o.slice(2);var U=Ar(h);if(vr(h)&&(h=h.slice(0,-7),_.capture=!0),!U&&A){if(c!=null)continue;r.removeEventListener(h,a[S],_),a[S]=null}if(U)dr(h,r,c),br([h]);else if(c!=null){let Q=function(Z){a[o].call(this,Z)};a[S]=hr(h,r,Q,_)}}else if(o==="style")L(r,o,c);else if(o==="autofocus")ur(r,!!c);else if(!l&&(o==="__value"||o==="value"&&c!=null))r.value=r.__value=c;else if(o==="selected"&&E)Mr(r,c);else{var b=o;g||(b=gr(b));var G=b==="defaultValue"||b==="defaultChecked";if(c==null&&!l&&!G)if(d[o]=null,b==="value"||b==="checked"){let _=r;const S=i===void 0;if(b==="value"){let h=_.defaultValue;_.removeAttribute(b),_.defaultValue=h,_.value=_.__value=S?h:null}else{let h=_.defaultChecked;_.removeAttribute(b),_.defaultChecked=h,_.checked=S?h:!1}}else r.removeAttribute(o);else G||N.includes(b)&&(l||typeof c!="string")?(r[b]=c,b in d&&(d[b]=or)):typeof c!="function"&&L(r,b,c)}}}return v&&R(!0),a}function Gr(r,i,t=[],f=[],s=[],e,u=!1,n=!1){tr(s,t,f,d=>{var l=void 0,g={},v=r.nodeName===kr,a=!1;if(F(()=>{var T=i(...d.map(sr)),N=$r(r,l,T,e,u,n);a&&v&&"value"in T&&$(r,T.value);for(let A of Object.getOwnPropertySymbols(g))T[A]||M(g[A]);for(let A of Object.getOwnPropertySymbols(T)){var I=T[A];A.description===er&&(!l||I!==l[A])&&(g[A]&&M(g[A]),g[A]=K(()=>_r(r,()=>I))),N[A]=I}l=N}),v){var E=r;Y(()=>{$(E,l.value,!0),pr(E)})}a=!0})}function j(r){return r.__attributes??(r.__attributes={[J]:r.nodeName.includes("-"),[X]:r.namespaceURI===ir})}var D=new Map;function q(r){var i=r.getAttribute("is")||r.nodeName,t=D.get(i);if(t)return t;D.set(i,t=[]);for(var f,s=r,e=Element.prototype;e!==s;){f=ar(s);for(var u in f)f[u].set&&t.push(u);s=fr(s)}return t}const Rr="rssany",Hr="https://github.com/joohw/rssany";function Vr(r,i){return fetch(r,i)}async function Br(r,i){const t=await fetch(r,i),s=(await t.text()).trim();if(!t.ok){const e=s.length>100?s.slice(0,100)+"…":s;throw new Error(`请求失败 ${t.status} ${t.statusText}${e?`:${e}`:""}`)}if(!s)throw new Error("API 返回空内容");try{const e=JSON.parse(s);if(e===null&&s==="null")throw new Error("API 返回 null");return e}catch(e){if(e instanceof Error&&e.message==="API 返回 null")throw e;const u=e instanceof SyntaxError?e.message:String(e),n=s.length>80?s.slice(0,80)+"…":s;throw new Error(`API 返回格式异常: ${u}。响应预览: ${n}`)}}export{Hr as G,Rr as P,Vr as a,Sr as b,Br as c,Ur as d,Ir as e,Gr as f,Tr as g,Cr as r,L as s};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var Kn=Object.defineProperty;var qn=Object.getPrototypeOf;var Hn=Reflect.get;var Ke=n=>{throw TypeError(n)};var Xn=(n,t,e)=>t in n?Kn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var E=(n,t,e)=>Xn(n,typeof t!="symbol"?t+"":t,e),Ee=(n,t,e)=>t.has(n)||Ke("Cannot "+e);var s=(n,t,e)=>(Ee(n,t,"read from private field"),e?e.call(n):t.get(n)),c=(n,t,e)=>t.has(n)?Ke("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),p=(n,t,e,r)=>(Ee(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),v=(n,t,e)=>(Ee(n,t,"access private method"),e);var qe=(n,t,e)=>Hn(qn(n),e,t);import{b as Yn,a as L,d as Zn,c as G}from"./
|
|
1
|
+
var Kn=Object.defineProperty;var qn=Object.getPrototypeOf;var Hn=Reflect.get;var Ke=n=>{throw TypeError(n)};var Xn=(n,t,e)=>t in n?Kn(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var E=(n,t,e)=>Xn(n,typeof t!="symbol"?t+"":t,e),Ee=(n,t,e)=>t.has(n)||Ke("Cannot "+e);var s=(n,t,e)=>(Ee(n,t,"read from private field"),e?e.call(n):t.get(n)),c=(n,t,e)=>t.has(n)?Ke("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),p=(n,t,e,r)=>(Ee(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),v=(n,t,e)=>(Ee(n,t,"access private method"),e);var qe=(n,t,e)=>Hn(qn(n),e,t);import{b as Yn,a as L,d as Zn,c as G}from"./DIeahUKq.js";import"./CEWi_rGa.js";import{bf as Jn,b as fn,E as dn,h as M,a as He,g as Se,bm as Qn,aG as $n,bn as tr,R as er,p as nr,e as Xe,c as Te,Y as rr,ah as ir,at as ut,au as ct,aq as Tt,u as kt,av as sr,f as z,aw as or,ax as ar,k as S,aA as ye,aB as ur,b8 as ot,a4 as cr,a5 as k,bo as Ye,G as lr,aO as At,bp as fr,bq as Ze,br as dr,am as hr,an as we,t as pr,aj as wt,bs as br,bt as mr}from"./BsQ08Wq_.js";import{e as vr,i as gr}from"./B553hBXT.js";import{s as yr}from"./Cc7aBSsN.js";import{g as wr,f as Er,o as N,m as Sr,u as Tr}from"./BK0ygNWX.js";import{B as hn,i as Ar}from"./rNwPv4DZ.js";import{f as Je,g as Ae}from"./WW6La7Nt.js";import{i as Cr}from"./Nd0ktDhd.js";import{l as Qe,p as w}from"./D8G961Hm.js";import{k as xr}from"./IhDlsCxD.js";function Ir(){return Symbol(Jn)}function Et(n,t,...e){var r=new hn(n);fn(()=>{const i=t()??null;r.ensure(i,i&&(a=>i(a,...e)))},dn)}function Or(n,t,e,r,i,a){let o=M;M&&He();var u=null;M&&Se.nodeType===Qn&&(u=Se,He());var f=M?Se:n,l=new hn(f,!1);fn(()=>{const b=t()||null;var h=tr;if(b===null){l.ensure(null,null);return}return l.ensure(b,g=>{if(b){if(u=M?u:$n(b,h),Yn(u,u),r){M&&wr(b)&&u.append(document.createComment(""));var A=M?er(u):u.appendChild(nr());M&&(A===null?Xe(!1):Te(A)),r(u,A)}rr.nodes.end=u,g.before(u)}M&&Te(g)}),()=>{}},dn),ir(()=>{}),o&&(Xe(!0),Te(f))}/**
|
|
2
2
|
* @license lucide-svelte v0.460.1 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const kr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var
|
|
7
|
-
`,tn="/",en="*",J="",Ur="comment",jr="declaration";function Gr(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function i(m){var d=m.match(_r);d&&(e+=d.length);var C=m.lastIndexOf(Vr);r=~C?m.length-C:r+m.length}function a(){var m={line:e,column:r};return function(d){return d.position=new o(m),l(),d}}function o(m){this.start=m,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;function u(m){var d=new Error(t.source+":"+e+":"+r+": "+m);if(d.reason=m,d.filename=t.source,d.line=e,d.column=r,d.source=n,!t.silent)throw d}function f(m){var d=m.exec(n);if(d){var C=d[0];return i(C),n=n.slice(C.length),d}}function l(){f(Fr)}function b(m){var d;for(m=m||[];d=h();)d!==!1&&m.push(d);return m}function h(){var m=a();if(!(tn!=n.charAt(0)||en!=n.charAt(1))){for(var d=2;J!=n.charAt(d)&&(en!=n.charAt(d)||tn!=n.charAt(d+1));)++d;if(d+=2,J===n.charAt(d-1))return u("End of comment missing");var C=n.slice(2,d-2);return r+=2,i(C),n=n.slice(d),r+=2,m({type:Ur,comment:C})}}function g(){var m=a(),d=f(Dr);if(d){if(h(),!f(Lr))return u("property missing ':'");var C=f(Mr),
|
|
6
|
+
*/const kr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var Rr=Zn("<svg><!><!></svg>");function Ts(n,t){const e=Qe(t,["children","$$slots","$$events","$$legacy"]),r=Qe(e,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);ut(t,!1);let i=w(t,"name",8,void 0),a=w(t,"color",8,"currentColor"),o=w(t,"size",8,24),u=w(t,"strokeWidth",8,2),f=w(t,"absoluteStrokeWidth",8,!1),l=w(t,"iconNode",24,()=>[]);const b=(...m)=>m.filter((d,C,St)=>!!d&&St.indexOf(d)===C).join(" ");Cr();var h=Rr();Je(h,(m,d)=>({...kr,...r,width:o(),height:o(),stroke:a(),"stroke-width":m,class:d}),[()=>(Tt(f()),Tt(u()),Tt(o()),kt(()=>f()?Number(u())*24/Number(o()):u())),()=>(Tt(i()),Tt(e),kt(()=>b("lucide-icon","lucide",i()?`lucide-${i()}`:"",e.class)))]);var g=sr(h);vr(g,1,l,gr,(m,d)=>{var C=ye(()=>ur(S(d),2));let St=()=>S(C)[0],jn=()=>S(C)[1];var ze=G(),Gn=z(ze);Or(Gn,St,!0,(zn,ls)=>{Je(zn,()=>({...jn()}))}),L(m,ze)});var A=or(g);yr(A,t,"default",{}),ar(h),L(n,h),ct()}function Nr(n){return typeof n=="function"}function Gt(n){return n!==null&&typeof n=="object"}const Pr=["string","number","bigint","boolean"];function xe(n){return n==null||Pr.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>xe(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const Qt=Symbol("box"),pn=Symbol("is-writable");function y(n,t){const e=ye(n);return t?{[Qt]:!0,[pn]:!0,get current(){return S(e)},set current(r){t(r)}}:{[Qt]:!0,get current(){return n()}}}function bn(n){return Gt(n)&&Qt in n}function As(n){return bn(n)?n:Nr(n)?y(n):mn(n)}function mn(n){let t=ot(cr(n));return{[Qt]:!0,[pn]:!0,get current(){return S(t)},set current(e){k(t,e,!0)}}}function vn(...n){return function(t){var e;for(const r of n)if(r){if(t.defaultPrevented)return;typeof r=="function"?r.call(this,t):(e=r.current)==null||e.call(this,t)}}}var $e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,_r=/\n/g,Fr=/^\s*/,Dr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Lr=/^:\s*/,Mr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Br=/^[;\s]*/,Wr=/^\s+|\s+$/g,Vr=`
|
|
7
|
+
`,tn="/",en="*",J="",Ur="comment",jr="declaration";function Gr(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function i(m){var d=m.match(_r);d&&(e+=d.length);var C=m.lastIndexOf(Vr);r=~C?m.length-C:r+m.length}function a(){var m={line:e,column:r};return function(d){return d.position=new o(m),l(),d}}function o(m){this.start=m,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;function u(m){var d=new Error(t.source+":"+e+":"+r+": "+m);if(d.reason=m,d.filename=t.source,d.line=e,d.column=r,d.source=n,!t.silent)throw d}function f(m){var d=m.exec(n);if(d){var C=d[0];return i(C),n=n.slice(C.length),d}}function l(){f(Fr)}function b(m){var d;for(m=m||[];d=h();)d!==!1&&m.push(d);return m}function h(){var m=a();if(!(tn!=n.charAt(0)||en!=n.charAt(1))){for(var d=2;J!=n.charAt(d)&&(en!=n.charAt(d)||tn!=n.charAt(d+1));)++d;if(d+=2,J===n.charAt(d-1))return u("End of comment missing");var C=n.slice(2,d-2);return r+=2,i(C),n=n.slice(d),r+=2,m({type:Ur,comment:C})}}function g(){var m=a(),d=f(Dr);if(d){if(h(),!f(Lr))return u("property missing ':'");var C=f(Mr),St=m({type:jr,property:nn(d[0].replace($e,J)),value:C?nn(C[0].replace($e,J)):J});return f(Br),St}}function A(){var m=[];b(m);for(var d;d=g();)d!==!1&&(m.push(d),b(m));return m}return l(),A()}function nn(n){return n?n.replace(Wr,J):J}function zr(n,t){let e=null;if(!n||typeof n!="string")return e;const r=Gr(n),i=typeof t=="function";return r.forEach(a=>{if(a.type!=="declaration")return;const{property:o,value:u}=a;i?t(o,u,a):u&&(e=e||{},e[o]=u)}),e}const Kr=/\d/,qr=["-","_","/","."];function Hr(n=""){if(!Kr.test(n))return n!==n.toLowerCase()}function Xr(n){const t=[];let e="",r,i;for(const a of n){const o=qr.includes(a);if(o===!0){t.push(e),e="",r=void 0;continue}const u=Hr(a);if(i===!1){if(r===!1&&u===!0){t.push(e),e=a,r=u;continue}if(r===!0&&u===!1&&e.length>1){const f=e.at(-1);t.push(e.slice(0,Math.max(0,e.length-1))),e=f+a,r=u;continue}}e+=a,r=u,i=o}return t.push(e),t}function gn(n){return n?Xr(n).map(t=>Zr(t)).join(""):""}function Yr(n){return Jr(gn(n||""))}function Zr(n){return n?n[0].toUpperCase()+n.slice(1):""}function Jr(n){return n?n[0].toLowerCase()+n.slice(1):""}function Kt(n){if(!n)return{};const t={};function e(r,i){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[gn(r)]=i;return}if(r.startsWith("--")){t[r]=i;return}t[Yr(r)]=i}return zr(n,e),t}function Ot(...n){return(...t)=>{for(const e of n)typeof e=="function"&&e(...t)}}function Qr(n,t){const e=RegExp(n,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(e)?r.replace(e,t):r}}const $r=Qr(/[A-Z]/,n=>`-${n.toLowerCase()}`);function ti(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${$r(t)}: ${n[t]};`).join(`
|
|
8
8
|
`)}function ei(n={}){return ti(n).replace(`
|
|
9
9
|
`," ")}const ni=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],ri=new Set(ni);function ii(n){return ri.has(n)}function Cs(...n){const t={...n[0]};for(let e=1;e<n.length;e++){const r=n[e];if(r){for(const i of Object.keys(r)){const a=t[i],o=r[i],u=typeof a=="function",f=typeof o=="function";if(u&&ii(i)){const l=a,b=o;t[i]=vn(l,b)}else if(u&&f)t[i]=Ot(a,o);else if(i==="class"){const l=xe(a),b=xe(o);l&&b?t[i]=Ae(a,o):l?t[i]=Ae(a):b&&(t[i]=Ae(o))}else if(i==="style"){const l=typeof a=="object",b=typeof o=="object",h=typeof a=="string",g=typeof o=="string";if(l&&b)t[i]={...a,...o};else if(l&&g){const A=Kt(o);t[i]={...a,...A}}else if(h&&b){const A=Kt(a);t[i]={...A,...o}}else if(h&&g){const A=Kt(a),m=Kt(o);t[i]={...A,...m}}else l?t[i]=a:b?t[i]=o:h?t[i]=a:g&&(t[i]=o)}else t[i]=o!==void 0?o:a}for(const i of Object.getOwnPropertySymbols(r)){const a=t[i],o=r[i];t[i]=o!==void 0?o:a}}}return typeof t.style=="object"&&(t.style=ei(t.style).replaceAll(`
|
|
10
|
-
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const si=typeof window<"u"?window:void 0;function oi(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var _,F,B,ie,P,It,Xt;const We=class We extends Map{constructor(e){super();c(this,P);c(this,_,new Map);c(this,F,ot(0));c(this,B,ot(0));c(this,ie,Ye||-1);if(e){for(var[r,i]of e)super.set(r,i);s(this,B).v=super.size}}has(e){var r=s(this,_),i=r.get(e);if(i===void 0)if(super.has(e))i=v(this,P,It).call(this,0),r.set(e,i);else return
|
|
10
|
+
`," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const si=typeof window<"u"?window:void 0;function oi(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var _,F,B,ie,P,It,Xt;const We=class We extends Map{constructor(e){super();c(this,P);c(this,_,new Map);c(this,F,ot(0));c(this,B,ot(0));c(this,ie,Ye||-1);if(e){for(var[r,i]of e)super.set(r,i);s(this,B).v=super.size}}has(e){var r=s(this,_),i=r.get(e);if(i===void 0)if(super.has(e))i=v(this,P,It).call(this,0),r.set(e,i);else return S(s(this,F)),!1;return S(i),!0}forEach(e,r){v(this,P,Xt).call(this),super.forEach(e,r)}get(e){var r=s(this,_),i=r.get(e);if(i===void 0)if(super.has(e))i=v(this,P,It).call(this,0),r.set(e,i);else{S(s(this,F));return}return S(i),super.get(e)}set(e,r){var h;var i=s(this,_),a=i.get(e),o=super.get(e),u=super.set(e,r),f=s(this,F);if(a===void 0)a=v(this,P,It).call(this,0),i.set(e,a),k(s(this,B),super.size),At(f);else if(o!==r){At(a);var l=f.reactions===null?null:new Set(f.reactions),b=l===null||!((h=a.reactions)!=null&&h.every(g=>l.has(g)));b&&At(f)}return u}delete(e){var r=s(this,_),i=r.get(e),a=super.delete(e);return i!==void 0&&(r.delete(e),k(i,-1)),a&&(k(s(this,B),super.size),At(s(this,F))),a}clear(){if(super.size!==0){super.clear();var e=s(this,_);k(s(this,B),0);for(var r of e.values())k(r,-1);At(s(this,F)),e.clear()}}keys(){return S(s(this,F)),super.keys()}values(){return v(this,P,Xt).call(this),super.values()}entries(){return v(this,P,Xt).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return S(s(this,B)),super.size}};_=new WeakMap,F=new WeakMap,B=new WeakMap,ie=new WeakMap,P=new WeakSet,It=function(e){return Ye===s(this,ie)?ot(e):lr(e)},Xt=function(){S(s(this,F));var e=s(this,_);if(s(this,B).v!==e.size){for(var r of qe(We.prototype,this,"keys").call(this))if(!e.has(r)){var i=v(this,P,It).call(this,0);e.set(r,i)}}for([,i]of s(this,_))S(i)};let Ie=We;var lt,Rt;class ai{constructor(t={}){c(this,lt);c(this,Rt);const{window:e=si,document:r=e==null?void 0:e.document}=t;e!==void 0&&(p(this,lt,r),p(this,Rt,Er(i=>{const a=N(e,"focusin",i),o=N(e,"focusout",i);return()=>{a(),o()}})))}get current(){var t;return(t=s(this,Rt))==null||t.call(this),s(this,lt)?oi(s(this,lt)):null}}lt=new WeakMap,Rt=new WeakMap;new ai;var Nt,W;class ui{constructor(t){c(this,Nt);c(this,W);p(this,Nt,t),p(this,W,Symbol(t))}get key(){return s(this,W)}exists(){return fr(s(this,W))}get(){const t=Ze(s(this,W));if(t===void 0)throw new Error(`Context "${s(this,Nt)}" not found`);return t}getOr(t){const e=Ze(s(this,W));return e===void 0?t:e}set(t){return dr(s(this,W),t)}}Nt=new WeakMap,W=new WeakMap;function ci(n,t){switch(n){case"post":we(t);break;case"pre":hr(t);break}}function yn(n,t,e,r={}){const{lazy:i=!1}=r;let a=!i,o=Array.isArray(n)?[]:void 0;ci(t,()=>{const u=Array.isArray(n)?n.map(l=>l()):n();if(!a){a=!0,o=u;return}const f=kt(()=>e(u,o));return o=u,f})}function Y(n,t,e){yn(n,"post",t,e)}function li(n,t,e){yn(n,"pre",t,e)}Y.pre=li;function zt(n){we(()=>()=>{n()})}function fi(n,t){return setTimeout(t,n)}function Be(n){pr().then(n)}const di=1,hi=9,pi=11;function Oe(n){return Gt(n)&&n.nodeType===di&&typeof n.nodeName=="string"}function wn(n){return Gt(n)&&n.nodeType===hi}function bi(n){var t;return Gt(n)&&((t=n.constructor)==null?void 0:t.name)==="VisualViewport"}function mi(n){return Gt(n)&&n.nodeType!==void 0}function En(n){return mi(n)&&n.nodeType===pi&&"host"in n}function vi(n,t){var r;if(!n||!t||!Oe(n)||!Oe(t))return!1;const e=(r=t.getRootNode)==null?void 0:r.call(t);if(n===t||n.contains(t))return!0;if(e&&En(e)){let i=t;for(;i;){if(n===i)return!0;i=i.parentNode||i.host}}return!1}function gi(n){return wn(n)?n:bi(n)?n.document:(n==null?void 0:n.ownerDocument)??document}function yi(n){var t;return En(n)?yi(n.host):wn(n)?n.defaultView??window:Oe(n)?((t=n.ownerDocument)==null?void 0:t.defaultView)??window:window}function wi(n){let t=n.activeElement;for(;t!=null&&t.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Pt;class Sn{constructor(t){E(this,"element");c(this,Pt,ye(()=>this.element.current?this.element.current.getRootNode()??document:document));E(this,"getDocument",()=>gi(this.root));E(this,"getWindow",()=>this.getDocument().defaultView??window);E(this,"getActiveElement",()=>wi(this.root));E(this,"isActiveElement",t=>t===this.getActiveElement());E(this,"querySelector",t=>this.root?this.root.querySelector(t):null);E(this,"querySelectorAll",t=>this.root?this.root.querySelectorAll(t):[]);E(this,"setTimeout",(t,e)=>this.getWindow().setTimeout(t,e));E(this,"clearTimeout",t=>this.getWindow().clearTimeout(t));typeof t=="function"?this.element=y(t):this.element=t}get root(){return S(s(this,Pt))}set root(t){k(s(this,Pt),t)}getElementById(t){return this.root.getElementById(t)}}Pt=new WeakMap;function xs(n,t){return{[Ir()]:e=>bn(n)?(n.current=e,kt(()=>t==null?void 0:t(e)),()=>{"isConnected"in e&&e.isConnected||(n.current=null,t==null||t(null))}):(n(e),kt(()=>t==null?void 0:t(e)),()=>{"isConnected"in e&&e.isConnected||(n(null),t==null||t(null))})}}function Is(n){return n?"true":"false"}function Os(n){return n?"":void 0}function ks(n){return n?!0:void 0}function Rs(n){return n?"open":"closed"}var ft,_t;class Ei{constructor(t){c(this,ft);c(this,_t);E(this,"attrs");p(this,ft,t.getVariant?t.getVariant():null),p(this,_t,s(this,ft)?`data-${s(this,ft)}-`:`data-${t.component}-`),this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(e=>[e,this.getAttr(e)]))}getAttr(t,e){return e?`data-${e}-${t}`:`${s(this,_t)}${t}`}selector(t,e){return`[${this.getAttr(t,e)}]`}}ft=new WeakMap,_t=new WeakMap;function Si(n){const t=new Ei(n);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Ns="ArrowDown",Ps="ArrowUp",_s="End",Fs="Enter",Ti="Escape",Ds="Home",Ls="PageDown",Ms="PageUp",Bs=" ",Ws="Tab",Tn=typeof document<"u",rn=Ai();function Ai(){var n,t;return Tn&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function sn(n){return n instanceof HTMLElement}function Vs(n){return n instanceof Element}function Ci(n){return n instanceof Element||n instanceof SVGElement}function Us(n){return n.pointerType==="touch"}function js(n){return n!==null}var dt,Q,j,ke,Yt;class xi{constructor(t){c(this,j);c(this,dt);c(this,Q,null);p(this,dt,t),zt(()=>v(this,j,ke).call(this))}run(t){v(this,j,ke).call(this);const e=s(this,dt).ref.current;if(e){if(typeof e.getAnimations!="function"){v(this,j,Yt).call(this,t);return}p(this,Q,window.requestAnimationFrame(()=>{const r=e.getAnimations();if(r.length===0){v(this,j,Yt).call(this,t);return}Promise.allSettled(r.map(i=>i.finished)).then(()=>{v(this,j,Yt).call(this,t)})}))}}}dt=new WeakMap,Q=new WeakMap,j=new WeakSet,ke=function(){s(this,Q)&&(window.cancelAnimationFrame(s(this,Q)),p(this,Q,null))},Yt=function(t){const e=()=>{t()};s(this,dt).afterTick?Be(e):e()};var D,Ft,Dt,$;class Gs{constructor(t){c(this,D);c(this,Ft);c(this,Dt);c(this,$,ot(!1));p(this,D,t),k(s(this,$),t.open.current,!0),p(this,Ft,t.enabled??!0),p(this,Dt,new xi({ref:s(this,D).ref,afterTick:s(this,D).open})),Y(()=>s(this,D).open.current,e=>{e&&k(s(this,$),!0),s(this,Ft)&&s(this,Dt).run(()=>{var r,i;e===s(this,D).open.current&&(s(this,D).open.current||k(s(this,$),!1),(i=(r=s(this,D)).onComplete)==null||i.call(r))})})}get shouldRender(){return S(s(this,$))}}D=new WeakMap,Ft=new WeakMap,Dt=new WeakMap,$=new WeakMap;function R(){}function zs(n,t){return`bits-${n}`}function Ii(n,t){var e=G(),r=z(e);xr(r,()=>t.children,i=>{var a=G(),o=z(a);Et(o,()=>t.children??wt),L(i,a)}),L(n,e)}const Oi=new ui("BitsConfig");function ki(){const n=new Ri(null,{});return Oi.getOr(n).opts}class Ri{constructor(t,e){E(this,"opts");const r=Ni(t,e);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function Ni(n,t){return e=>y(()=>{var a,o;const i=(a=e(t))==null?void 0:a.current;if(i!==void 0)return i;if(n!==null)return(o=e(n.opts))==null?void 0:o.current})}function Pi(n,t){return e=>{const r=ki();return y(()=>{const i=e();if(i!==void 0)return i;const a=n(r).current;return a!==void 0?a:t})}}const _i=Pi(n=>n.defaultPortalTo,"body");function Ks(n,t){ut(t,!0);const e=_i(()=>t.to),r=br();let i=ye(a);function a(){if(!Tn||t.disabled)return null;let h=null;return typeof e.current=="string"?h=document.querySelector(e.current):h=e.current,h}let o;function u(){o&&(Tr(o),o=null)}Y([()=>S(i),()=>t.disabled],([h,g])=>{if(!h||g){u();return}return o=Sr(Ii,{target:h,props:{children:t.children},context:r}),()=>{u()}});var f=G(),l=z(f);{var b=h=>{var g=G(),A=z(g);Et(A,()=>t.children??wt),L(h,g)};Ar(l,h=>{t.disabled&&h(b)})}L(n,f),ct()}function on(n,t=500){let e=null;const r=(...i)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...i)},t)};return r.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},r}function An(n,t){return n===t||n.contains(t)}function Cn(n){return(n==null?void 0:n.ownerDocument)??document}function Fi(n,t){const{clientX:e,clientY:r}=n,i=t.getBoundingClientRect();return e<i.left||e>i.right||r<i.top||r>i.bottom}/*!
|
|
11
11
|
* tabbable 6.4.0
|
|
12
12
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
13
|
-
*/var xn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$t=xn.join(","),In=typeof Element>"u",at=In?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,te=!In&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},ee=function(t,e){var r;e===void 0&&(e=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ee(t.parentNode));return o},Di=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},On=function(t,e,r){if(ee(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll($t));return e&&at.call(t,$t)&&i.unshift(t),i=i.filter(r),i},ne=function(t,e,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!ee(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),f=u.length?u:o.children,l=ne(f,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var b=at.call(o,$t);b&&r.filter(o)&&(e||!t.includes(o))&&i.push(o);var h=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!ee(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(h&&g){var A=ne(h===!0?o.children:h.children,!0,r);r.flatten?i.push.apply(i,A):i.push({scopeParent:o,candidates:A})}else a.unshift.apply(a,o.children)}}return i},kn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Nn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Di(t))&&!kn(t)?0:t.tabIndex},Li=function(t,e){var r=Nn(t);return r<0&&e&&!kn(t)?0:r},Mi=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Rn=function(t){return t.tagName==="INPUT"},Bi=function(t){return Rn(t)&&t.type==="hidden"},Wi=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Vi=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},Ui=function(t){if(!t.name)return!0;var e=t.form||te(t),r=function(u){return e.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=Vi(i,t.form);return!a||a===t},ji=function(t){return Rn(t)&&t.type==="radio"},Gi=function(t){return ji(t)&&!Ui(t)},zi=function(t){var e,r=t&&te(t),i=(e=r)===null||e===void 0?void 0:e.host,a=!1;if(r&&r!==t){var o,u,f;for(a=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&i;){var l,b,h;r=te(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((b=i)!==null&&b!==void 0&&(h=b.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return a},an=function(t){var e=t.getBoundingClientRect(),r=e.width,i=e.height;return r===0&&i===0},Ki=function(t,e){var r=e.displayCheck,i=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var o=at.call(t,"details>summary:first-of-type"),u=o?t.parentElement:t;if(at.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var f=t;t;){var l=t.parentElement,b=te(t);if(l&&!l.shadowRoot&&i(l)===!0)return an(t);t.assignedSlot?t=t.assignedSlot:!l&&b!==t.ownerDocument?t=b.host:t=l}t=f}if(zi(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return an(t);return!1},qi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var i=e.children.item(r);if(i.tagName==="LEGEND")return at.call(e,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}e=e.parentElement}return!1},re=function(t,e){return!(e.disabled||Bi(e)||Ki(e,t)||Wi(e)||qi(e))},Ne=function(t,e){return!(Gi(e)||Nn(e)<0||!re(t,e))},Hi=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Pn=function(t){var e=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,u=o?i.scopeParent:i,f=Li(u,o),l=o?Pn(i.candidates):u;f===0?o?e.push.apply(e,l):e.push(u):r.push({documentOrder:a,tabIndex:f,item:i,isScope:o,content:l})}),r.sort(Mi).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(e)},Xi=function(t,e){e=e||{};var r;return e.getShadowRoot?r=ne([t],e.includeContainer,{filter:Ne.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Hi}):r=On(t,e.includeContainer,Ne.bind(null,e)),Pn(r)},Yi=function(t,e){e=e||{};var r;return e.getShadowRoot?r=ne([t],e.includeContainer,{filter:re.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=On(t,e.includeContainer,re.bind(null,e)),r},qs=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return at.call(t,$t)===!1?!1:Ne(e,t)},Zi=xn.concat("iframe:not([inert]):not([inert] *)").join(","),Ji=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return at.call(t,Zi)===!1?!1:re(e,t)};const Qi="data-context-menu-trigger",$i="data-context-menu-content";Ti({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var ht,tt,K,pt,bt,q,Lt,V,se,yt,_n,oe,mt,ae,ue,ce,le,Mt,Fn,fe,de;const Ve=class Ve{constructor(t){c(this,yt);E(this,"opts");c(this,ht);c(this,tt);c(this,K,{pointerdown:!1});c(this,pt,!1);c(this,bt,!1);c(this,q);c(this,Lt);c(this,V,N);c(this,se,t=>{t.defaultPrevented||this.opts.ref.current&&Be(()=>{var e,r;!this.opts.ref.current||s(this,le).call(this,t.target)||t.target&&!s(this,bt)&&((r=(e=s(this,Lt)).current)==null||r.call(e,t))})});c(this,oe,t=>{let e=t;e.defaultPrevented&&(e=un(t)),s(this,ht).current(t)});c(this,mt,on(t=>{if(!this.opts.ref.current){s(this,V).call(this);return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||ns(t,this.opts.ref.current);if(!s(this,pt)||v(this,yt,Fn).call(this)||!e){s(this,V).call(this);return}let r=t;if(r.defaultPrevented&&(r=un(r)),s(this,tt).current!=="close"&&s(this,tt).current!=="defer-otherwise-close"){s(this,V).call(this);return}t.pointerType==="touch"?(s(this,V).call(this),p(this,V,R(s(this,q),"click",s(this,oe),{once:!0}))):s(this,ht).current(r)},10));c(this,ae,t=>{s(this,K)[t.type]=!0});c(this,ue,t=>{s(this,K)[t.type]=!1});c(this,ce,()=>{this.opts.ref.current&&p(this,pt,es(this.opts.ref.current))});c(this,le,t=>this.opts.ref.current?An(this.opts.ref.current,t):!1);c(this,Mt,on(()=>{for(const t in s(this,K))s(this,K)[t]=!1;p(this,pt,!1)},20));c(this,fe,()=>{p(this,bt,!0)});c(this,de,()=>{p(this,bt,!1)});E(this,"props",{onfocuscapture:s(this,fe),onblurcapture:s(this,de)});this.opts=t,p(this,tt,t.interactOutsideBehavior),p(this,ht,t.onInteractOutside),p(this,Lt,t.onFocusOutside),we(()=>{p(this,q,Cn(this.opts.ref.current))});let e=N;const r=()=>{s(this,Mt).call(this),globalThis.bitsDismissableLayers.delete(this),s(this,mt).destroy(),e()};Y([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return fi(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,s(this,tt)),e(),e=v(this,yt,_n).call(this))}),r}),zt(()=>{s(this,Mt).destroy(),globalThis.bitsDismissableLayers.delete(this),s(this,mt).destroy(),s(this,V).call(this),e()})}static create(t){return new Ve(t)}};ht=new WeakMap,tt=new WeakMap,K=new WeakMap,pt=new WeakMap,bt=new WeakMap,q=new WeakMap,Lt=new WeakMap,V=new WeakMap,se=new WeakMap,yt=new WeakSet,_n=function(){return Ot(R(s(this,q),"pointerdown",Ot(s(this,ae),s(this,ce)),{capture:!0}),R(s(this,q),"pointerdown",Ot(s(this,ue),s(this,mt))),R(s(this,q),"focusin",s(this,se)))},oe=new WeakMap,mt=new WeakMap,ae=new WeakMap,ue=new WeakMap,ce=new WeakMap,le=new WeakMap,Mt=new WeakMap,Fn=function(){return Object.values(s(this,K)).some(Boolean)},fe=new WeakMap,de=new WeakMap;let Re=Ve;function ts(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function es(n){const t=[...globalThis.bitsDismissableLayers],e=ts(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function ns(n,t){const e=n.target;if(!Ci(e))return!1;const r=!!e.closest(`[${Qi}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const i=!!t.closest(`[${$i}]`);return r&&i?!1:Cn(e).documentElement.contains(e)&&!An(t,e)&&Fi(n,t)}function un(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let i=!1;return new Proxy(r,{get:(o,u)=>u==="currentTarget"?t:u==="target"?e:u==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:u==="defaultPrevented"?i:u in o?o[u]:n[u]})}function Hs(n,t){ut(t,!0);let e=w(t,"interactOutsideBehavior",3,"close"),r=w(t,"onInteractOutside",3,N),i=w(t,"onFocusOutside",3,N),a=w(t,"isValidEvent",3,()=>!1);const o=Re.create({id:y(()=>t.id),interactOutsideBehavior:y(()=>e()),onInteractOutside:y(()=>r()),enabled:y(()=>t.enabled),onFocusOutside:y(()=>i()),isValidEvent:y(()=>a()),ref:t.ref});var u=G(),f=z(u);Et(f,()=>t.children??wt,()=>({props:o.props})),L(n,u),ct()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var he,pe;const Ue=class Ue{constructor(t){E(this,"opts");E(this,"domContext");c(this,he,()=>R(this.domContext.getDocument(),"keydown",s(this,pe),{passive:!1}));c(this,pe,t=>{if(t.key!==Si||!rs(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)});this.opts=t,this.domContext=new Tn(this.opts.ref);let e=N;Y(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=s(this,he).call(this)),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}static create(t){return new Ue(t)}};he=new WeakMap,pe=new WeakMap;let Pe=Ue;function rs(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([i,{current:a}])=>a==="close"||a==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function Xs(n,t){ut(t,!0);let e=w(t,"escapeKeydownBehavior",3,"close"),r=w(t,"onEscapeKeydown",3,N);Pe.create({escapeKeydownBehavior:y(()=>e()),onEscapeKeydown:y(()=>r()),enabled:y(()=>t.enabled),ref:t.ref});var i=G(),a=z(i);Et(a,()=>t.children??wt),L(n,i),ct()}var U,Bt,et;const be=class be{constructor(){c(this,U,mn([]));c(this,Bt,new WeakMap);c(this,et,new WeakMap)}static getInstance(){return this.instance||(this.instance=new be),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&s(this,et).set(t,r),s(this,U).current=s(this,U).current.filter(i=>i!==t),s(this,U).current.unshift(t)}unregister(t){s(this,U).current=s(this,U).current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return s(this,U).current[0]}setFocusMemory(t,e){s(this,Bt).set(t,e)}getFocusMemory(t){return s(this,Bt).get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){s(this,et).set(t,e)}getPreFocusMemory(t){return s(this,et).get(t)}clearPreFocusMemory(t){s(this,et).delete(t)}};U=new WeakMap,Bt=new WeakMap,et=new WeakMap,E(be,"instance");let _e=be;var H,x,I,nt,X,S,Dn,Ln,Mn,Bn,De,Zt,Le;const je=class je{constructor(t){c(this,S);c(this,H,!1);c(this,x,null);c(this,I,_e.getInstance());c(this,nt,[]);c(this,X);p(this,X,t)}get paused(){return s(this,H)}pause(){p(this,H,!0)}resume(){p(this,H,!1)}mount(t){s(this,x)&&this.unmount(),p(this,x,t),s(this,I).register(this),v(this,S,Bn).call(this),v(this,S,Ln).call(this)}unmount(){s(this,x)&&(v(this,S,Dn).call(this),v(this,S,Mn).call(this),s(this,I).unregister(this),s(this,I).clearPreFocusMemory(this),p(this,x,null))}static use(t){let e=null;return Y([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(e||(e=new je(t)),e.mount(r)):e&&(e.unmount(),e=null)}),zt(()=>{e==null||e.unmount()}),{get props(){return{tabindex:-1}}}}};H=new WeakMap,x=new WeakMap,I=new WeakMap,nt=new WeakMap,X=new WeakMap,S=new WeakSet,Dn=function(){for(const t of s(this,nt))t();p(this,nt,[])},Ln=function(){if(!s(this,x))return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});s(this,X).onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!s(this,x))return;const e=v(this,S,Zt).call(this);e?(e.focus(),s(this,I).setFocusMemory(this,e)):s(this,x).focus()})},Mn=function(){var e,r;const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if((r=(e=s(this,X).onCloseAutoFocus).current)==null||r.call(e,t),!t.defaultPrevented){const i=s(this,I).getPreFocusMemory(this);if(i&&document.contains(i))try{i.focus()}catch{document.body.focus()}}},Bn=function(){if(!s(this,x)||!s(this,X).trap.current)return;const t=s(this,x),e=t.ownerDocument,r=o=>{if(s(this,H)||!s(this,I).isActiveScope(this))return;const u=o.target;if(!u)return;if(t.contains(u))s(this,I).setFocusMemory(this,u);else{const l=s(this,I).getFocusMemory(this);if(l&&t.contains(l)&&Ji(l))o.preventDefault(),l.focus();else{const b=v(this,S,Zt).call(this),h=v(this,S,Le).call(this)[0];(b||h||t).focus()}}},i=o=>{if(!s(this,X).loop||s(this,H)||o.key!=="Tab"||!s(this,I).isActiveScope(this))return;const u=v(this,S,De).call(this);if(u.length===0)return;const f=u[0],l=u[u.length-1];!o.shiftKey&&e.activeElement===l?(o.preventDefault(),f.focus()):o.shiftKey&&e.activeElement===f&&(o.preventDefault(),l.focus())};s(this,nt).push(R(e,"focusin",r,{capture:!0}),R(t,"keydown",i));const a=new MutationObserver(()=>{const o=s(this,I).getFocusMemory(this);if(o&&!t.contains(o)){const u=v(this,S,Zt).call(this),f=v(this,S,Le).call(this)[0],l=u||f;l?(l.focus(),s(this,I).setFocusMemory(this,l)):t.focus()}});a.observe(t,{childList:!0,subtree:!0}),s(this,nt).push(()=>a.disconnect())},De=function(){return s(this,x)?Xi(s(this,x),{includeContainer:!1,getShadowRoot:!0}):[]},Zt=function(){return v(this,S,De).call(this)[0]||null},Le=function(){return s(this,x)?Yi(s(this,x),{includeContainer:!1,getShadowRoot:!0}):[]};let Fe=je;function Ys(n,t){ut(t,!0);let e=w(t,"enabled",3,!1),r=w(t,"trapFocus",3,!1),i=w(t,"loop",3,!1),a=w(t,"onCloseAutoFocus",3,N),o=w(t,"onOpenAutoFocus",3,N);const u=Fe.use({enabled:y(()=>e()),trap:y(()=>r()),loop:i(),onCloseAutoFocus:y(()=>a()),onOpenAutoFocus:y(()=>o()),ref:t.ref});var f=G(),l=z(f);Et(l,()=>t.focusScope??wt,()=>({props:u.props})),L(n,f),ct()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var vt,me,Wn,ve,Wt;const Ge=class Ge{constructor(t){c(this,me);E(this,"opts");E(this,"domContext");c(this,vt,N);c(this,ve,t=>{const e=this.opts.ref.current,r=t.target;!sn(e)||!sn(r)||!this.opts.enabled.current||!ss(this)||!vi(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&p(this,vt,is(e,this.domContext.getDocument().body)))});c(this,Wt,()=>{s(this,vt).call(this),p(this,vt,N)});this.opts=t,this.domContext=new Tn(t.ref);let e=N;Y(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=v(this,me,Wn).call(this)),()=>{e(),s(this,Wt).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}static create(t){return new Ge(t)}};vt=new WeakMap,me=new WeakSet,Wn=function(){return Ot(R(this.domContext.getDocument(),"pointerdown",s(this,ve)),R(this.domContext.getDocument(),"pointerup",vn(s(this,Wt),this.opts.onPointerUp.current)))},ve=new WeakMap,Wt=new WeakMap;let Me=Ge;const cn=n=>n.style.userSelect||n.style.webkitUserSelect;function is(n,t){const e=cn(t),r=cn(n);return qt(t,"none"),qt(n,"text"),()=>{qt(t,e),qt(n,r)}}function qt(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function ss(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function Zs(n,t){ut(t,!0);let e=w(t,"preventOverflowTextSelection",3,!0),r=w(t,"onPointerDown",3,N),i=w(t,"onPointerUp",3,N);Me.create({id:y(()=>t.id),onPointerDown:y(()=>r()),onPointerUp:y(()=>i()),enabled:y(()=>t.enabled&&e()),ref:t.ref});var a=G(),o=z(a);Et(o,()=>t.children??wt),L(n,a),ct()}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function os(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}var Vt,gt,rt,it,ge,Vn;class as{constructor(t){c(this,ge);c(this,Vt);c(this,gt,0);c(this,rt,ot());c(this,it);p(this,Vt,t)}get(...t){return p(this,gt,s(this,gt)+1),T(s(this,rt))===void 0&&p(this,it,mr(()=>{k(s(this,rt),s(this,Vt).call(this,...t),!0)})),we(()=>()=>{v(this,ge,Vn).call(this)}),T(s(this,rt))}}Vt=new WeakMap,gt=new WeakMap,rt=new WeakMap,it=new WeakMap,ge=new WeakSet,Vn=function(){p(this,gt,s(this,gt)-1),s(this,it)&&s(this,gt)<=0&&(s(this,it).call(this),k(s(this,rt),void 0),p(this,it,void 0))};const Jt=new Ie;let Ht=ot(null),Z=null,Ct=null,xt=!1;const ln=y(()=>{for(const n of Jt.values())if(n)return!0;return!1});let Ce=null;const us=new as(()=>{function n(){document.body.setAttribute("style",T(Ht)??""),document.body.style.removeProperty("--scrollbar-width"),rn&&(Z==null||Z()),k(Ht,null)}function t(){Ct!==null&&(window.clearTimeout(Ct),Ct=null)}function e(i,a){t(),xt=!0,Ce=Date.now();const o=Ce,u=()=>{Ct=null,Ce===o&&(Un(Jt)?xt=!1:(xt=!1,a()))},f=i===null?24:i;Ct=window.setTimeout(u,f)}function r(){T(Ht)===null&&Jt.size===0&&!xt&&k(Ht,document.body.getAttribute("style"),!0)}return Y(()=>ln.current,()=>{var b,h;if(!ln.current)return;r(),xt=!1;const i=getComputedStyle(document.documentElement),a=getComputedStyle(document.body),o=((b=i.scrollbarGutter)==null?void 0:b.includes("stable"))||((h=a.scrollbarGutter)==null?void 0:h.includes("stable")),u=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(a.paddingRight??"0",10)+u,margin:Number.parseInt(a.marginRight??"0",10)};u>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${u}px`)),document.body.style.overflow="hidden",rn&&(Z=R(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),Be(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),zt(()=>()=>{Z==null||Z()}),{get lockMap(){return Jt},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});var st,Ut,jt,O;class cs{constructor(t,e=()=>null){c(this,st,os());c(this,Ut);c(this,jt,()=>null);c(this,O);E(this,"locked");p(this,Ut,t),p(this,jt,e),p(this,O,us.get()),s(this,O)&&(s(this,O).cancelPendingCleanup(),s(this,O).ensureInitialStyleCaptured(),s(this,O).lockMap.set(s(this,st),s(this,Ut)??!1),this.locked=y(()=>s(this,O).lockMap.get(s(this,st))??!1,r=>s(this,O).lockMap.set(s(this,st),r)),zt(()=>{if(s(this,O).lockMap.delete(s(this,st)),Un(s(this,O).lockMap))return;const r=s(this,jt).call(this);s(this,O).scheduleCleanupIfNoNewLocks(r,()=>{s(this,O).resetBodyStyle()})}))}}st=new WeakMap,Ut=new WeakMap,jt=new WeakMap,O=new WeakMap;function Un(n){for(const[t,e]of n)if(e)return!0;return!1}function Js(n,t){ut(t,!0);let e=w(t,"preventScroll",3,!0),r=w(t,"restoreScrollDelay",3,null);e()&&new cs(e(),()=>r()),ct()}export{ei as A,yi as B,ui as C,Hs as D,Fs as E,Ys as F,Be as G,Ps as H,Ss as I,Rs as J,Ws as K,Ms as L,Ds as M,Ls as N,_s as O,Ks as P,rn as Q,ks as R,Bs as S,Zs as T,Gs as a,y as b,Ti as c,xs as d,Os as e,zs as f,Ns as g,Xs as h,Js as i,gi as j,Vs as k,Tn as l,Cs as m,N as n,zt as o,Us as p,Is as q,qs as r,Et as s,si as t,mn as u,As as v,Y as w,os as x,Kt as y,js as z};
|
|
13
|
+
*/var xn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$t=xn.join(","),In=typeof Element>"u",at=In?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,te=!In&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n==null?void 0:n.ownerDocument},ee=function(t,e){var r;e===void 0&&(e=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ee(t.parentNode));return o},Di=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},On=function(t,e,r){if(ee(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll($t));return e&&at.call(t,$t)&&i.unshift(t),i=i.filter(r),i},ne=function(t,e,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!ee(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),f=u.length?u:o.children,l=ne(f,!0,r);r.flatten?i.push.apply(i,l):i.push({scopeParent:o,candidates:l})}else{var b=at.call(o,$t);b&&r.filter(o)&&(e||!t.includes(o))&&i.push(o);var h=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),g=!ee(h,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(h&&g){var A=ne(h===!0?o.children:h.children,!0,r);r.flatten?i.push.apply(i,A):i.push({scopeParent:o,candidates:A})}else a.unshift.apply(a,o.children)}}return i},kn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Rn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Di(t))&&!kn(t)?0:t.tabIndex},Li=function(t,e){var r=Rn(t);return r<0&&e&&!kn(t)?0:r},Mi=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Nn=function(t){return t.tagName==="INPUT"},Bi=function(t){return Nn(t)&&t.type==="hidden"},Wi=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Vi=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},Ui=function(t){if(!t.name)return!0;var e=t.form||te(t),r=function(u){return e.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=Vi(i,t.form);return!a||a===t},ji=function(t){return Nn(t)&&t.type==="radio"},Gi=function(t){return ji(t)&&!Ui(t)},zi=function(t){var e,r=t&&te(t),i=(e=r)===null||e===void 0?void 0:e.host,a=!1;if(r&&r!==t){var o,u,f;for(a=!!((o=i)!==null&&o!==void 0&&(u=o.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&i;){var l,b,h;r=te(i),i=(l=r)===null||l===void 0?void 0:l.host,a=!!((b=i)!==null&&b!==void 0&&(h=b.ownerDocument)!==null&&h!==void 0&&h.contains(i))}}return a},an=function(t){var e=t.getBoundingClientRect(),r=e.width,i=e.height;return r===0&&i===0},Ki=function(t,e){var r=e.displayCheck,i=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var o=at.call(t,"details>summary:first-of-type"),u=o?t.parentElement:t;if(at.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var f=t;t;){var l=t.parentElement,b=te(t);if(l&&!l.shadowRoot&&i(l)===!0)return an(t);t.assignedSlot?t=t.assignedSlot:!l&&b!==t.ownerDocument?t=b.host:t=l}t=f}if(zi(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return an(t);return!1},qi=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var i=e.children.item(r);if(i.tagName==="LEGEND")return at.call(e,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}e=e.parentElement}return!1},re=function(t,e){return!(e.disabled||Bi(e)||Ki(e,t)||Wi(e)||qi(e))},Re=function(t,e){return!(Gi(e)||Rn(e)<0||!re(t,e))},Hi=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Pn=function(t){var e=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,u=o?i.scopeParent:i,f=Li(u,o),l=o?Pn(i.candidates):u;f===0?o?e.push.apply(e,l):e.push(u):r.push({documentOrder:a,tabIndex:f,item:i,isScope:o,content:l})}),r.sort(Mi).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(e)},Xi=function(t,e){e=e||{};var r;return e.getShadowRoot?r=ne([t],e.includeContainer,{filter:Re.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Hi}):r=On(t,e.includeContainer,Re.bind(null,e)),Pn(r)},Yi=function(t,e){e=e||{};var r;return e.getShadowRoot?r=ne([t],e.includeContainer,{filter:re.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=On(t,e.includeContainer,re.bind(null,e)),r},qs=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return at.call(t,$t)===!1?!1:Re(e,t)},Zi=xn.concat("iframe:not([inert]):not([inert] *)").join(","),Ji=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return at.call(t,Zi)===!1?!1:re(e,t)};const Qi="data-context-menu-trigger",$i="data-context-menu-content";Si({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var ht,tt,K,pt,bt,q,Lt,V,se,yt,_n,oe,mt,ae,ue,ce,le,Mt,Fn,fe,de;const Ve=class Ve{constructor(t){c(this,yt);E(this,"opts");c(this,ht);c(this,tt);c(this,K,{pointerdown:!1});c(this,pt,!1);c(this,bt,!1);c(this,q);c(this,Lt);c(this,V,R);c(this,se,t=>{t.defaultPrevented||this.opts.ref.current&&Be(()=>{var e,r;!this.opts.ref.current||s(this,le).call(this,t.target)||t.target&&!s(this,bt)&&((r=(e=s(this,Lt)).current)==null||r.call(e,t))})});c(this,oe,t=>{let e=t;e.defaultPrevented&&(e=un(t)),s(this,ht).current(t)});c(this,mt,on(t=>{if(!this.opts.ref.current){s(this,V).call(this);return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||ns(t,this.opts.ref.current);if(!s(this,pt)||v(this,yt,Fn).call(this)||!e){s(this,V).call(this);return}let r=t;if(r.defaultPrevented&&(r=un(r)),s(this,tt).current!=="close"&&s(this,tt).current!=="defer-otherwise-close"){s(this,V).call(this);return}t.pointerType==="touch"?(s(this,V).call(this),p(this,V,N(s(this,q),"click",s(this,oe),{once:!0}))):s(this,ht).current(r)},10));c(this,ae,t=>{s(this,K)[t.type]=!0});c(this,ue,t=>{s(this,K)[t.type]=!1});c(this,ce,()=>{this.opts.ref.current&&p(this,pt,es(this.opts.ref.current))});c(this,le,t=>this.opts.ref.current?An(this.opts.ref.current,t):!1);c(this,Mt,on(()=>{for(const t in s(this,K))s(this,K)[t]=!1;p(this,pt,!1)},20));c(this,fe,()=>{p(this,bt,!0)});c(this,de,()=>{p(this,bt,!1)});E(this,"props",{onfocuscapture:s(this,fe),onblurcapture:s(this,de)});this.opts=t,p(this,tt,t.interactOutsideBehavior),p(this,ht,t.onInteractOutside),p(this,Lt,t.onFocusOutside),we(()=>{p(this,q,Cn(this.opts.ref.current))});let e=R;const r=()=>{s(this,Mt).call(this),globalThis.bitsDismissableLayers.delete(this),s(this,mt).destroy(),e()};Y([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return fi(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,s(this,tt)),e(),e=v(this,yt,_n).call(this))}),r}),zt(()=>{s(this,Mt).destroy(),globalThis.bitsDismissableLayers.delete(this),s(this,mt).destroy(),s(this,V).call(this),e()})}static create(t){return new Ve(t)}};ht=new WeakMap,tt=new WeakMap,K=new WeakMap,pt=new WeakMap,bt=new WeakMap,q=new WeakMap,Lt=new WeakMap,V=new WeakMap,se=new WeakMap,yt=new WeakSet,_n=function(){return Ot(N(s(this,q),"pointerdown",Ot(s(this,ae),s(this,ce)),{capture:!0}),N(s(this,q),"pointerdown",Ot(s(this,ue),s(this,mt))),N(s(this,q),"focusin",s(this,se)))},oe=new WeakMap,mt=new WeakMap,ae=new WeakMap,ue=new WeakMap,ce=new WeakMap,le=new WeakMap,Mt=new WeakMap,Fn=function(){return Object.values(s(this,K)).some(Boolean)},fe=new WeakMap,de=new WeakMap;let Ne=Ve;function ts(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function es(n){const t=[...globalThis.bitsDismissableLayers],e=ts(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function ns(n,t){const e=n.target;if(!Ci(e))return!1;const r=!!e.closest(`[${Qi}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const i=!!t.closest(`[${$i}]`);return r&&i?!1:Cn(e).documentElement.contains(e)&&!An(t,e)&&Fi(n,t)}function un(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let i=!1;return new Proxy(r,{get:(o,u)=>u==="currentTarget"?t:u==="target"?e:u==="preventDefault"?()=>{i=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:u==="defaultPrevented"?i:u in o?o[u]:n[u]})}function Hs(n,t){ut(t,!0);let e=w(t,"interactOutsideBehavior",3,"close"),r=w(t,"onInteractOutside",3,R),i=w(t,"onFocusOutside",3,R),a=w(t,"isValidEvent",3,()=>!1);const o=Ne.create({id:y(()=>t.id),interactOutsideBehavior:y(()=>e()),onInteractOutside:y(()=>r()),enabled:y(()=>t.enabled),onFocusOutside:y(()=>i()),isValidEvent:y(()=>a()),ref:t.ref});var u=G(),f=z(u);Et(f,()=>t.children??wt,()=>({props:o.props})),L(n,u),ct()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var he,pe;const Ue=class Ue{constructor(t){E(this,"opts");E(this,"domContext");c(this,he,()=>N(this.domContext.getDocument(),"keydown",s(this,pe),{passive:!1}));c(this,pe,t=>{if(t.key!==Ti||!rs(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)});this.opts=t,this.domContext=new Sn(this.opts.ref);let e=R;Y(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=s(this,he).call(this)),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}static create(t){return new Ue(t)}};he=new WeakMap,pe=new WeakMap;let Pe=Ue;function rs(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([i,{current:a}])=>a==="close"||a==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function Xs(n,t){ut(t,!0);let e=w(t,"escapeKeydownBehavior",3,"close"),r=w(t,"onEscapeKeydown",3,R);Pe.create({escapeKeydownBehavior:y(()=>e()),onEscapeKeydown:y(()=>r()),enabled:y(()=>t.enabled),ref:t.ref});var i=G(),a=z(i);Et(a,()=>t.children??wt),L(n,i),ct()}var U,Bt,et;const be=class be{constructor(){c(this,U,mn([]));c(this,Bt,new WeakMap);c(this,et,new WeakMap)}static getInstance(){return this.instance||(this.instance=new be),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&s(this,et).set(t,r),s(this,U).current=s(this,U).current.filter(i=>i!==t),s(this,U).current.unshift(t)}unregister(t){s(this,U).current=s(this,U).current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return s(this,U).current[0]}setFocusMemory(t,e){s(this,Bt).set(t,e)}getFocusMemory(t){return s(this,Bt).get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){s(this,et).set(t,e)}getPreFocusMemory(t){return s(this,et).get(t)}clearPreFocusMemory(t){s(this,et).delete(t)}};U=new WeakMap,Bt=new WeakMap,et=new WeakMap,E(be,"instance");let _e=be;var H,x,I,nt,X,T,Dn,Ln,Mn,Bn,De,Zt,Le;const je=class je{constructor(t){c(this,T);c(this,H,!1);c(this,x,null);c(this,I,_e.getInstance());c(this,nt,[]);c(this,X);p(this,X,t)}get paused(){return s(this,H)}pause(){p(this,H,!0)}resume(){p(this,H,!1)}mount(t){s(this,x)&&this.unmount(),p(this,x,t),s(this,I).register(this),v(this,T,Bn).call(this),v(this,T,Ln).call(this)}unmount(){s(this,x)&&(v(this,T,Dn).call(this),v(this,T,Mn).call(this),s(this,I).unregister(this),s(this,I).clearPreFocusMemory(this),p(this,x,null))}static use(t){let e=null;return Y([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(e||(e=new je(t)),e.mount(r)):e&&(e.unmount(),e=null)}),zt(()=>{e==null||e.unmount()}),{get props(){return{tabindex:-1}}}}};H=new WeakMap,x=new WeakMap,I=new WeakMap,nt=new WeakMap,X=new WeakMap,T=new WeakSet,Dn=function(){for(const t of s(this,nt))t();p(this,nt,[])},Ln=function(){if(!s(this,x))return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});s(this,X).onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!s(this,x))return;const e=v(this,T,Zt).call(this);e?(e.focus(),s(this,I).setFocusMemory(this,e)):s(this,x).focus()})},Mn=function(){var e,r;const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if((r=(e=s(this,X).onCloseAutoFocus).current)==null||r.call(e,t),!t.defaultPrevented){const i=s(this,I).getPreFocusMemory(this);if(i&&document.contains(i))try{i.focus()}catch{document.body.focus()}}},Bn=function(){if(!s(this,x)||!s(this,X).trap.current)return;const t=s(this,x),e=t.ownerDocument,r=o=>{if(s(this,H)||!s(this,I).isActiveScope(this))return;const u=o.target;if(!u)return;if(t.contains(u))s(this,I).setFocusMemory(this,u);else{const l=s(this,I).getFocusMemory(this);if(l&&t.contains(l)&&Ji(l))o.preventDefault(),l.focus();else{const b=v(this,T,Zt).call(this),h=v(this,T,Le).call(this)[0];(b||h||t).focus()}}},i=o=>{if(!s(this,X).loop||s(this,H)||o.key!=="Tab"||!s(this,I).isActiveScope(this))return;const u=v(this,T,De).call(this);if(u.length===0)return;const f=u[0],l=u[u.length-1];!o.shiftKey&&e.activeElement===l?(o.preventDefault(),f.focus()):o.shiftKey&&e.activeElement===f&&(o.preventDefault(),l.focus())};s(this,nt).push(N(e,"focusin",r,{capture:!0}),N(t,"keydown",i));const a=new MutationObserver(()=>{const o=s(this,I).getFocusMemory(this);if(o&&!t.contains(o)){const u=v(this,T,Zt).call(this),f=v(this,T,Le).call(this)[0],l=u||f;l?(l.focus(),s(this,I).setFocusMemory(this,l)):t.focus()}});a.observe(t,{childList:!0,subtree:!0}),s(this,nt).push(()=>a.disconnect())},De=function(){return s(this,x)?Xi(s(this,x),{includeContainer:!1,getShadowRoot:!0}):[]},Zt=function(){return v(this,T,De).call(this)[0]||null},Le=function(){return s(this,x)?Yi(s(this,x),{includeContainer:!1,getShadowRoot:!0}):[]};let Fe=je;function Ys(n,t){ut(t,!0);let e=w(t,"enabled",3,!1),r=w(t,"trapFocus",3,!1),i=w(t,"loop",3,!1),a=w(t,"onCloseAutoFocus",3,R),o=w(t,"onOpenAutoFocus",3,R);const u=Fe.use({enabled:y(()=>e()),trap:y(()=>r()),loop:i(),onCloseAutoFocus:y(()=>a()),onOpenAutoFocus:y(()=>o()),ref:t.ref});var f=G(),l=z(f);Et(l,()=>t.focusScope??wt,()=>({props:u.props})),L(n,f),ct()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var vt,me,Wn,ve,Wt;const Ge=class Ge{constructor(t){c(this,me);E(this,"opts");E(this,"domContext");c(this,vt,R);c(this,ve,t=>{const e=this.opts.ref.current,r=t.target;!sn(e)||!sn(r)||!this.opts.enabled.current||!ss(this)||!vi(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&p(this,vt,is(e,this.domContext.getDocument().body)))});c(this,Wt,()=>{s(this,vt).call(this),p(this,vt,R)});this.opts=t,this.domContext=new Sn(t.ref);let e=R;Y(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=v(this,me,Wn).call(this)),()=>{e(),s(this,Wt).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}static create(t){return new Ge(t)}};vt=new WeakMap,me=new WeakSet,Wn=function(){return Ot(N(this.domContext.getDocument(),"pointerdown",s(this,ve)),N(this.domContext.getDocument(),"pointerup",vn(s(this,Wt),this.opts.onPointerUp.current)))},ve=new WeakMap,Wt=new WeakMap;let Me=Ge;const cn=n=>n.style.userSelect||n.style.webkitUserSelect;function is(n,t){const e=cn(t),r=cn(n);return qt(t,"none"),qt(n,"text"),()=>{qt(t,e),qt(n,r)}}function qt(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function ss(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function Zs(n,t){ut(t,!0);let e=w(t,"preventOverflowTextSelection",3,!0),r=w(t,"onPointerDown",3,R),i=w(t,"onPointerUp",3,R);Me.create({id:y(()=>t.id),onPointerDown:y(()=>r()),onPointerUp:y(()=>i()),enabled:y(()=>t.enabled&&e()),ref:t.ref});var a=G(),o=z(a);Et(o,()=>t.children??wt),L(n,a),ct()}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function os(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}var Vt,gt,rt,it,ge,Vn;class as{constructor(t){c(this,ge);c(this,Vt);c(this,gt,0);c(this,rt,ot());c(this,it);p(this,Vt,t)}get(...t){return p(this,gt,s(this,gt)+1),S(s(this,rt))===void 0&&p(this,it,mr(()=>{k(s(this,rt),s(this,Vt).call(this,...t),!0)})),we(()=>()=>{v(this,ge,Vn).call(this)}),S(s(this,rt))}}Vt=new WeakMap,gt=new WeakMap,rt=new WeakMap,it=new WeakMap,ge=new WeakSet,Vn=function(){p(this,gt,s(this,gt)-1),s(this,it)&&s(this,gt)<=0&&(s(this,it).call(this),k(s(this,rt),void 0),p(this,it,void 0))};const Jt=new Ie;let Ht=ot(null),Z=null,Ct=null,xt=!1;const ln=y(()=>{for(const n of Jt.values())if(n)return!0;return!1});let Ce=null;const us=new as(()=>{function n(){document.body.setAttribute("style",S(Ht)??""),document.body.style.removeProperty("--scrollbar-width"),rn&&(Z==null||Z()),k(Ht,null)}function t(){Ct!==null&&(window.clearTimeout(Ct),Ct=null)}function e(i,a){t(),xt=!0,Ce=Date.now();const o=Ce,u=()=>{Ct=null,Ce===o&&(Un(Jt)?xt=!1:(xt=!1,a()))},f=i===null?24:i;Ct=window.setTimeout(u,f)}function r(){S(Ht)===null&&Jt.size===0&&!xt&&k(Ht,document.body.getAttribute("style"),!0)}return Y(()=>ln.current,()=>{var b,h;if(!ln.current)return;r(),xt=!1;const i=getComputedStyle(document.documentElement),a=getComputedStyle(document.body),o=((b=i.scrollbarGutter)==null?void 0:b.includes("stable"))||((h=a.scrollbarGutter)==null?void 0:h.includes("stable")),u=window.innerWidth-document.documentElement.clientWidth,l={padding:Number.parseInt(a.paddingRight??"0",10)+u,margin:Number.parseInt(a.marginRight??"0",10)};u>0&&!o&&(document.body.style.paddingRight=`${l.padding}px`,document.body.style.marginRight=`${l.margin}px`,document.body.style.setProperty("--scrollbar-width",`${u}px`)),document.body.style.overflow="hidden",rn&&(Z=N(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),Be(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),zt(()=>()=>{Z==null||Z()}),{get lockMap(){return Jt},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});var st,Ut,jt,O;class cs{constructor(t,e=()=>null){c(this,st,os());c(this,Ut);c(this,jt,()=>null);c(this,O);E(this,"locked");p(this,Ut,t),p(this,jt,e),p(this,O,us.get()),s(this,O)&&(s(this,O).cancelPendingCleanup(),s(this,O).ensureInitialStyleCaptured(),s(this,O).lockMap.set(s(this,st),s(this,Ut)??!1),this.locked=y(()=>s(this,O).lockMap.get(s(this,st))??!1,r=>s(this,O).lockMap.set(s(this,st),r)),zt(()=>{if(s(this,O).lockMap.delete(s(this,st)),Un(s(this,O).lockMap))return;const r=s(this,jt).call(this);s(this,O).scheduleCleanupIfNoNewLocks(r,()=>{s(this,O).resetBodyStyle()})}))}}st=new WeakMap,Ut=new WeakMap,jt=new WeakMap,O=new WeakMap;function Un(n){for(const[t,e]of n)if(e)return!0;return!1}function Js(n,t){ut(t,!0);let e=w(t,"preventScroll",3,!0),r=w(t,"restoreScrollDelay",3,null);e()&&new cs(e(),()=>r()),ct()}export{js as A,yi as B,ui as C,Hs as D,Fs as E,Ys as F,Be as G,Ps as H,Ts as I,Ns as J,Ws as K,Ms as L,Ds as M,Ls as N,_s as O,Ks as P,rn as Q,ks as R,Bs as S,Zs as T,Gs as a,y as b,Si as c,xs as d,Os as e,zs as f,Rs as g,Xs as h,Js as i,gi as j,Vs as k,Sn as l,Cs as m,R as n,zt as o,Us as p,Is as q,qs as r,Et as s,ei as t,si as u,mn as v,Y as w,As as x,os as y,Kt as z};
|