rssany 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/.env.example +52 -52
  2. package/README.md +156 -147
  3. package/app/plugins/builtin/email.rssany.js +84 -84
  4. package/app/plugins/builtin/rss.rssany.js +164 -164
  5. package/app/plugins/builtin/xiaohongshu.rssany.js +59 -2
  6. package/app/statics/README.md +7 -7
  7. package/app/webui/build/200.html +36 -36
  8. package/app/webui/build/_app/immutable/assets/0.BLOTwIuF.css +1 -0
  9. package/app/webui/build/_app/immutable/assets/10.CmGYYZFR.css +1 -0
  10. package/app/webui/build/_app/immutable/assets/11.Dkz3VS_N.css +1 -0
  11. package/app/webui/build/_app/immutable/assets/14.BCCBoMGj.css +1 -0
  12. package/app/webui/build/_app/immutable/assets/6.Cm_jpHOq.css +1 -0
  13. package/app/webui/build/_app/immutable/assets/7.CJ3BjogD.css +1 -0
  14. package/app/webui/build/_app/immutable/assets/9.CATKVZ-n.css +1 -0
  15. package/app/webui/build/_app/immutable/assets/{SourcesList.D5Lso0bo.css → SourcesList.ke66uOSi.css} +1 -1
  16. package/app/webui/build/_app/immutable/assets/chevron-down.CV-KWLNP.css +1 -0
  17. package/app/webui/build/_app/immutable/chunks/{CGCMIfh3.js → 4TuV_psf.js} +1 -1
  18. package/app/webui/build/_app/immutable/chunks/{DAdOEnFb.js → B0czyjwj.js} +1 -1
  19. package/app/webui/build/_app/immutable/chunks/{CFwxUBGi.js → B553hBXT.js} +1 -1
  20. package/app/webui/build/_app/immutable/chunks/B8StT3Do.js +6 -0
  21. package/app/webui/build/_app/immutable/chunks/BI_ale1m.js +1 -0
  22. package/app/webui/build/_app/immutable/chunks/BK0ygNWX.js +2 -0
  23. package/app/webui/build/_app/immutable/chunks/BKm6QCwp.js +1 -0
  24. package/app/webui/build/_app/immutable/chunks/BT6b4LcZ.js +36 -0
  25. package/app/webui/build/_app/immutable/chunks/BZY5aksi.js +36 -0
  26. package/app/webui/build/_app/immutable/chunks/{C8umpVpB.js → BnqaikL8.js} +1 -1
  27. package/app/webui/build/_app/immutable/chunks/BsQ08Wq_.js +1 -0
  28. package/app/webui/build/_app/immutable/chunks/C9wTDiHH.js +1 -0
  29. package/app/webui/build/_app/immutable/chunks/{B-CeeY89.js → CAKuIoAf.js} +1 -1
  30. package/app/webui/build/_app/immutable/chunks/CEWi_rGa.js +1 -0
  31. package/app/webui/build/_app/immutable/chunks/{ChUctqXA.js → Cc7aBSsN.js} +1 -1
  32. package/app/webui/build/_app/immutable/chunks/{BAJAS8BI.js → D8G961Hm.js} +1 -1
  33. package/app/webui/build/_app/immutable/chunks/{CS53ooo0.js → DIeahUKq.js} +1 -1
  34. package/app/webui/build/_app/immutable/chunks/DO5OXNYS.js +1 -0
  35. package/app/webui/build/_app/immutable/chunks/Dg_D3pjF.js +1 -0
  36. package/app/webui/build/_app/immutable/chunks/{Dyvi1wBH.js → DptdhtA1.js} +1 -1
  37. package/app/webui/build/_app/immutable/chunks/{ClknbeNl.js → FDS7fbwH.js} +1 -1
  38. package/app/webui/build/_app/immutable/chunks/{CqYSO3Dx.js → GeNMTUn1.js} +1 -1
  39. package/app/webui/build/_app/immutable/chunks/{DCEayuDt.js → IhDlsCxD.js} +1 -1
  40. package/app/webui/build/_app/immutable/chunks/Nd0ktDhd.js +1 -0
  41. package/app/webui/build/_app/immutable/chunks/{D6kzEN_P.js → SvdgnirT.js} +1 -1
  42. package/app/webui/build/_app/immutable/chunks/WW6La7Nt.js +2 -0
  43. package/app/webui/build/_app/immutable/chunks/{DsxvjlCC.js → pd_p3yYy.js} +5 -5
  44. package/app/webui/build/_app/immutable/chunks/rNwPv4DZ.js +1 -0
  45. package/app/webui/build/_app/immutable/entry/app.BKLBG-4w.js +2 -0
  46. package/app/webui/build/_app/immutable/entry/start.D-X6pVtx.js +1 -0
  47. package/app/webui/build/_app/immutable/nodes/{0.DK_mcVDm.js → 0.CJDC_3s9.js} +3 -3
  48. package/app/webui/build/_app/immutable/nodes/1.DsKocFSb.js +1 -0
  49. package/app/webui/build/_app/immutable/nodes/10.BeejAn8z.js +1 -0
  50. package/app/webui/build/_app/immutable/nodes/11.D--uwkk0.js +3 -0
  51. package/app/webui/build/_app/immutable/nodes/12.BLyQ6rUu.js +1 -0
  52. package/app/webui/build/_app/immutable/nodes/13.Cl0WQK13.js +1 -0
  53. package/app/webui/build/_app/immutable/nodes/14.T9l5Rh19.js +1 -0
  54. package/app/webui/build/_app/immutable/nodes/15.DHfwIlBx.js +1 -0
  55. package/app/webui/build/_app/immutable/nodes/{16.zfSe93Ab.js → 16.BKDfR-KV.js} +2 -2
  56. package/app/webui/build/_app/immutable/nodes/17.DofB8HQB.js +1 -0
  57. package/app/webui/build/_app/immutable/nodes/2.BOYqXdCa.js +1 -0
  58. package/app/webui/build/_app/immutable/nodes/3.B9ucbp_W.js +1 -0
  59. package/app/webui/build/_app/immutable/nodes/5.9zgwFV6I.js +2 -0
  60. package/app/webui/build/_app/immutable/nodes/6.Bs32Ieii.js +2 -0
  61. package/app/webui/build/_app/immutable/nodes/7.Cigxrk0v.js +1 -0
  62. package/app/webui/build/_app/immutable/nodes/8.pG10rCF0.js +1 -0
  63. package/app/webui/build/_app/immutable/nodes/9.Bzqb3xHY.js +1 -0
  64. package/app/webui/build/_app/version.json +1 -1
  65. package/bin/rssany.js +55 -3
  66. package/dist/index.js +361 -99
  67. package/dist/index.js.map +1 -1
  68. package/package.json +107 -103
  69. package/scripts/dev.mjs +5 -1
  70. package/scripts/postinstall.mjs +44 -0
  71. package/scripts/reset.mjs +137 -135
  72. package/scripts/user-dir.mjs +52 -0
  73. package/app/webui/build/_app/immutable/assets/0.DsKls1SN.css +0 -1
  74. package/app/webui/build/_app/immutable/assets/10.Dj8_pmut.css +0 -1
  75. package/app/webui/build/_app/immutable/assets/13.Qu_tY6H9.css +0 -1
  76. package/app/webui/build/_app/immutable/assets/5.B-dPiwB7.css +0 -1
  77. package/app/webui/build/_app/immutable/assets/6.B27N7pdA.css +0 -1
  78. package/app/webui/build/_app/immutable/assets/8.Cgji2b15.css +0 -1
  79. package/app/webui/build/_app/immutable/assets/9.BsCIAvn3.css +0 -1
  80. package/app/webui/build/_app/immutable/chunks/6prdYIKP.js +0 -1
  81. package/app/webui/build/_app/immutable/chunks/B2cyTHdf.js +0 -2
  82. package/app/webui/build/_app/immutable/chunks/B6WG2Sd3.js +0 -1
  83. package/app/webui/build/_app/immutable/chunks/BA4Gucnq.js +0 -1
  84. package/app/webui/build/_app/immutable/chunks/BkD3yAYe.js +0 -1
  85. package/app/webui/build/_app/immutable/chunks/C4uF_YIK.js +0 -1
  86. package/app/webui/build/_app/immutable/chunks/CBY2biv-.js +0 -1
  87. package/app/webui/build/_app/immutable/chunks/CVW0ymE1.js +0 -1
  88. package/app/webui/build/_app/immutable/chunks/DJ2e04vK.js +0 -36
  89. package/app/webui/build/_app/immutable/chunks/DL3Q5sfb.js +0 -1
  90. package/app/webui/build/_app/immutable/chunks/DVa8Y-mQ.js +0 -1
  91. package/app/webui/build/_app/immutable/chunks/DkamXS6W.js +0 -36
  92. package/app/webui/build/_app/immutable/chunks/DoRPmqLn.js +0 -2
  93. package/app/webui/build/_app/immutable/chunks/_qj9U-za.js +0 -1
  94. package/app/webui/build/_app/immutable/chunks/vtBo8kBV.js +0 -1
  95. package/app/webui/build/_app/immutable/entry/app.RFfWi3_i.js +0 -2
  96. package/app/webui/build/_app/immutable/entry/start.DU_kyeGS.js +0 -1
  97. package/app/webui/build/_app/immutable/nodes/1.0PRrU2uQ.js +0 -1
  98. package/app/webui/build/_app/immutable/nodes/10.CsxzlUER.js +0 -1
  99. package/app/webui/build/_app/immutable/nodes/11.D-PkhIRW.js +0 -1
  100. package/app/webui/build/_app/immutable/nodes/12.GGf-JLUY.js +0 -1
  101. package/app/webui/build/_app/immutable/nodes/13.DWWcH27k.js +0 -6
  102. package/app/webui/build/_app/immutable/nodes/14.COwSLwDN.js +0 -1
  103. package/app/webui/build/_app/immutable/nodes/15.nDN_AHrs.js +0 -1
  104. package/app/webui/build/_app/immutable/nodes/2.AJd2163d.js +0 -1
  105. package/app/webui/build/_app/immutable/nodes/3.CEVEHuaH.js +0 -1
  106. package/app/webui/build/_app/immutable/nodes/4.BT_N8pCh.js +0 -2
  107. package/app/webui/build/_app/immutable/nodes/5.BZScQ2CH.js +0 -2
  108. package/app/webui/build/_app/immutable/nodes/6.CkFk8X--.js +0 -1
  109. package/app/webui/build/_app/immutable/nodes/7.CuQJk7te.js +0 -1
  110. package/app/webui/build/_app/immutable/nodes/8.DIavWJnU.js +0 -1
  111. package/app/webui/build/_app/immutable/nodes/9.Db30M8x0.js +0 -1
  112. /package/app/webui/build/_app/immutable/assets/{11.qYZMiTb0.css → 12.qYZMiTb0.css} +0 -0
  113. /package/app/webui/build/_app/immutable/assets/{12.DfJcfUWl.css → 13.DfJcfUWl.css} +0 -0
  114. /package/app/webui/build/_app/immutable/assets/{14.DfMfOrS3.css → 15.DfMfOrS3.css} +0 -0
  115. /package/app/webui/build/_app/immutable/assets/{15.nNGjXhCQ.css → 17.nNGjXhCQ.css} +0 -0
  116. /package/app/webui/build/_app/immutable/assets/{4.Di6rvlY-.css → 5.Di6rvlY-.css} +0 -0
  117. /package/app/webui/build/_app/immutable/assets/{7.CrNxmd8B.css → 8.CrNxmd8B.css} +0 -0
  118. /package/app/webui/build/_app/immutable/nodes/{17.BtYZF6FM.js → 18.BtYZF6FM.js} +0 -0
  119. /package/app/webui/build/_app/immutable/nodes/{18.BIzqhTqv.js → 4.BIzqhTqv.js} +0 -0
@@ -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"./CS53ooo0.js";import"./BA4Gucnq.js";import{be as Jn,b as fn,E as dn,h as M,a as He,g as Te,bl as Qn,aF as $n,bm as tr,N as er,n as nr,e as Xe,c as Se,Y as rr,ah as ir,at as ut,au as ct,aq as St,U as kt,av as sr,f as z,aw as or,ax as ar,i as T,aA as ye,aB as ur,b7 as ot,a4 as cr,a5 as k,bn as Ye,A as lr,aN as At,bo as fr,bp as Ze,bq as dr,am as hr,an as we,T as pr,aj as wt,br,bs as mr}from"./vtBo8kBV.js";import{e as vr,i as gr}from"./CFwxUBGi.js";import{s as yr}from"./ChUctqXA.js";import{g as wr,f as Er,o as R,m as Tr,u as Sr}from"./B2cyTHdf.js";import{B as hn,i as Ar}from"./BkD3yAYe.js";import{d as Je,f as Ae}from"./DoRPmqLn.js";import{i as Cr}from"./DVa8Y-mQ.js";import{l as Qe,p as w}from"./BAJAS8BI.js";import{k as xr}from"./DCEayuDt.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&&Te.nodeType===Qn&&(u=Te,He());var f=M?Te: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):Se(A)),r(u,A)}rr.nodes.end=u,g.before(u)}M&&Se(g)}),()=>{}},dn),ir(()=>{}),o&&(Xe(!0),Se(f))}/**
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 Nr=Zn("<svg><!><!></svg>");function Ss(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,Tt)=>!!d&&Tt.indexOf(d)===C).join(" ");Cr();var h=Nr();Je(h,(m,d)=>({...kr,...r,width:o(),height:o(),stroke:a(),"stroke-width":m,class:d}),[()=>(St(f()),St(u()),St(o()),kt(()=>f()?Number(u())*24/Number(o()):u())),()=>(St(i()),St(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(T(d),2));let Tt=()=>T(C)[0],jn=()=>T(C)[1];var ze=G(),Gn=z(ze);Or(Gn,Tt,!0,(zn,ls)=>{Je(zn,()=>({...jn()}))}),L(m,ze)});var A=or(g);yr(A,t,"default",{}),ar(h),L(n,h),ct()}function Rr(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 T(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:Rr(n)?y(n):mn(n)}function mn(n){let t=ot(cr(n));return{[Qt]:!0,[pn]:!0,get current(){return T(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),Tt=m({type:jr,property:nn(d[0].replace($e,J)),value:C?nn(C[0].replace($e,J)):J});return f(Br),Tt}}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(`
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 T(s(this,F)),!1;return T(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{T(s(this,F));return}return T(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 T(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 T(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(){T(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,_))T(i)};let Ie=We;var lt,Nt;class ai{constructor(t={}){c(this,lt);c(this,Nt);const{window:e=si,document:r=e==null?void 0:e.document}=t;e!==void 0&&(p(this,lt,r),p(this,Nt,Er(i=>{const a=R(e,"focusin",i),o=R(e,"focusout",i);return()=>{a(),o()}})))}get current(){var t;return(t=s(this,Nt))==null||t.call(this),s(this,lt)?oi(s(this,lt)):null}}lt=new WeakMap,Nt=new WeakMap;new ai;var Rt,W;class ui{constructor(t){c(this,Rt);c(this,W);p(this,Rt,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,Rt)}" 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)}}Rt=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 Tn{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 T(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 Ns(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 Ti(n){const t=new Ei(n);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Rs="ArrowDown",Ps="ArrowUp",_s="End",Fs="Enter",Si="Escape",Ds="Home",Ls="PageDown",Ms="PageUp",Bs=" ",Ws="Tab",Sn=typeof document<"u",rn=Ai();function Ai(){var n,t;return Sn&&((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 T(s(this,$))}}D=new WeakMap,Ft=new WeakMap,Dt=new WeakMap,$=new WeakMap;function N(){}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 Ni(null,{});return Oi.getOr(n).opts}class Ni{constructor(t,e){E(this,"opts");const r=Ri(t,e);this.opts={defaultPortalTo:r(i=>i.defaultPortalTo),defaultLocale:r(i=>i.defaultLocale)}}}function Ri(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(!Sn||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&&(Sr(o),o=null)}Y([()=>T(i),()=>t.disabled],([h,g])=>{if(!h||g){u();return}return o=Tr(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}/*!
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};
@@ -0,0 +1 @@
1
+ var C=Object.defineProperty;var w=a=>{throw TypeError(a)};var D=(a,e,s)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var x=(a,e,s)=>D(a,typeof e!="symbol"?e+"":e,s),A=(a,e,s)=>e.has(a)||w("Cannot "+s);var t=(a,e,s)=>(A(a,e,"read from private field"),s?s.call(a):e.get(a)),u=(a,e,s)=>e.has(a)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,s),E=(a,e,s,i)=>(A(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);import{K as N,Q as g,L as P,p as F,v as M,i as R,h as k,g as B,P as S,x as I,b as K,a as L,E as Q,r as j,s as q,c as z,e as T}from"./BsQ08Wq_.js";var d,l,c,p,v,m,b;class G{constructor(e,s=!0){x(this,"anchor");u(this,d,new Map);u(this,l,new Map);u(this,c,new Map);u(this,p,new Set);u(this,v,!0);u(this,m,e=>{if(t(this,d).has(e)){var s=t(this,d).get(e),i=t(this,l).get(s);if(i)N(i),t(this,p).delete(s);else{var n=t(this,c).get(s);n&&(t(this,l).set(s,n.effect),t(this,c).delete(s),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(const[f,h]of t(this,d)){if(t(this,d).delete(f),f===e)break;const r=t(this,c).get(h);r&&(g(r.effect),t(this,c).delete(h))}for(const[f,h]of t(this,l)){if(f===s||t(this,p).has(f))continue;const r=()=>{if(Array.from(t(this,d).values()).includes(f)){var _=document.createDocumentFragment();S(h,_),_.append(F()),t(this,c).set(f,{effect:h,fragment:_})}else g(h);t(this,p).delete(f),t(this,l).delete(f)};t(this,v)||!i?(t(this,p).add(f),P(h,r,!1)):r()}}});u(this,b,e=>{t(this,d).delete(e);const s=Array.from(t(this,d).values());for(const[i,n]of t(this,c))s.includes(i)||(g(n.effect),t(this,c).delete(i))});this.anchor=e,E(this,v,s)}ensure(e,s){var i=R,n=I();if(s&&!t(this,l).has(e)&&!t(this,c).has(e))if(n){var f=document.createDocumentFragment(),h=F();f.append(h),t(this,c).set(e,{effect:M(()=>s(h)),fragment:f})}else t(this,l).set(e,M(()=>s(this.anchor)));if(t(this,d).set(i,e),n){for(const[r,o]of t(this,l))r===e?i.unskip_effect(o):i.skip_effect(o);for(const[r,o]of t(this,c))r===e?i.unskip_effect(o.effect):i.skip_effect(o.effect);i.oncommit(t(this,m)),i.ondiscard(t(this,b))}else k&&(this.anchor=B),t(this,m).call(this,i)}}d=new WeakMap,l=new WeakMap,c=new WeakMap,p=new WeakMap,v=new WeakMap,m=new WeakMap,b=new WeakMap;function O(a,e,s=!1){var i;k&&(i=B,L());var n=new G(a),f=s?Q:0;function h(r,o){if(k){var _=j(i);if(r!==parseInt(_.substring(1))){var y=q();z(y),n.anchor=y,T(!1),n.ensure(r,o),T(!0);return}}n.ensure(r,o)}K(()=>{var r=!1;e((o,_=0)=>{r=!0,h(_,o)}),r||h(-1,null)},f)}export{G as B,O as i};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.CJDC_3s9.js","../chunks/DIeahUKq.js","../chunks/BsQ08Wq_.js","../chunks/CEWi_rGa.js","../chunks/BI_ale1m.js","../chunks/FDS7fbwH.js","../chunks/BK0ygNWX.js","../chunks/rNwPv4DZ.js","../chunks/Cc7aBSsN.js","../chunks/WW6La7Nt.js","../chunks/Nd0ktDhd.js","../chunks/GeNMTUn1.js","../chunks/BKm6QCwp.js","../chunks/BUApaBEI.js","../chunks/DptdhtA1.js","../chunks/4TuV_psf.js","../chunks/BZY5aksi.js","../chunks/B553hBXT.js","../chunks/C9wTDiHH.js","../chunks/D8G961Hm.js","../chunks/pd_p3yYy.js","../chunks/IhDlsCxD.js","../chunks/B0czyjwj.js","../assets/homeFeedPanelStore.CE6xTfsa.css","../assets/0.BLOTwIuF.css","../nodes/1.DsKocFSb.js","../nodes/2.BOYqXdCa.js","../nodes/3.B9ucbp_W.js","../chunks/DO5OXNYS.js","../chunks/BT6b4LcZ.js","../chunks/BnqaikL8.js","../chunks/SvdgnirT.js","../chunks/B8StT3Do.js","../assets/chevron-down.CV-KWLNP.css","../assets/SourcesList.ke66uOSi.css","../nodes/4.BIzqhTqv.js","../chunks/hp4PFHFv.js","../nodes/5.9zgwFV6I.js","../assets/5.Di6rvlY-.css","../nodes/6.Bs32Ieii.js","../chunks/Dg_D3pjF.js","../assets/BackToParentRoute.DGk-X5ow.css","../assets/6.Cm_jpHOq.css","../nodes/7.Cigxrk0v.js","../assets/7.CJ3BjogD.css","../nodes/8.pG10rCF0.js","../assets/8.CrNxmd8B.css","../nodes/9.Bzqb3xHY.js","../chunks/Bfc47y5P.js","../assets/9.CATKVZ-n.css","../nodes/10.BeejAn8z.js","../assets/10.CmGYYZFR.css","../nodes/11.D--uwkk0.js","../assets/11.Dkz3VS_N.css","../nodes/12.BLyQ6rUu.js","../assets/12.qYZMiTb0.css","../nodes/13.Cl0WQK13.js","../assets/13.DfJcfUWl.css","../nodes/14.T9l5Rh19.js","../assets/14.BCCBoMGj.css","../nodes/15.DHfwIlBx.js","../assets/15.DfMfOrS3.css","../nodes/16.BKDfR-KV.js","../chunks/CAKuIoAf.js","../assets/16.Cw9oSkcO.css","../nodes/17.DofB8HQB.js","../assets/17.nNGjXhCQ.css","../nodes/18.BtYZF6FM.js"])))=>i.map(i=>d[i]);
2
+ var Z=r=>{throw TypeError(r)};var M=(r,t,e)=>t.has(r)||Z("Cannot "+e);var l=(r,t,e)=>(M(r,t,"read from private field"),e?e.call(r):t.get(r)),Y=(r,t,e)=>t.has(r)?Z("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),H=(r,t,e,i)=>(M(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);import{a5 as U,af as it,k as v,b7 as mt,ai as ut,F as ct,at as lt,am as _t,an as dt,t as ft,f as A,aw as vt,au as ht,b8 as J,av as gt,ax as Et,aA as k,az as Pt}from"../chunks/BsQ08Wq_.js";import{h as pt,m as Rt,u as yt,s as Ot}from"../chunks/BK0ygNWX.js";import{a as E,c as I,f as $,t as bt}from"../chunks/DIeahUKq.js";import{o as Lt}from"../chunks/DptdhtA1.js";import{i as B}from"../chunks/rNwPv4DZ.js";import{c as x}from"../chunks/C9wTDiHH.js";import{b as S}from"../chunks/CAKuIoAf.js";import{p as q}from"../chunks/D8G961Hm.js";function At(r){return class extends Tt{constructor(t){super({component:r,...t})}}}var P,_;class Tt{constructor(t){Y(this,P);Y(this,_);var p;var e=new Map,i=(o,a)=>{var m=ct(a,!1,!1);return e.set(o,m),m};const u=new Proxy({...t.props||{},$$events:{}},{get(o,a){return v(e.get(a)??i(a,Reflect.get(o,a)))},has(o,a){return a===it?!0:(v(e.get(a)??i(a,Reflect.get(o,a))),Reflect.has(o,a))},set(o,a,m){return U(e.get(a)??i(a,m),m),Reflect.set(o,a,m)}});H(this,_,(t.hydrate?pt:Rt)(t.component,{target:t.target,anchor:t.anchor,props:u,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((p=t==null?void 0:t.props)!=null&&p.$$host)||t.sync===!1)&&mt(),H(this,P,u.$$events);for(const o of Object.keys(l(this,_)))o==="$set"||o==="$destroy"||o==="$on"||ut(this,o,{get(){return l(this,_)[o]},set(a){l(this,_)[o]=a},enumerable:!0});l(this,_).$set=o=>{Object.assign(u,o)},l(this,_).$destroy=()=>{yt(l(this,_))}}$set(t){l(this,_).$set(t)}$on(t,e){l(this,P)[t]=l(this,P)[t]||[];const i=(...u)=>e.call(this,...u);return l(this,P)[t].push(i),()=>{l(this,P)[t]=l(this,P)[t].filter(u=>u!==i)}}$destroy(){l(this,_).$destroy()}}P=new WeakMap,_=new WeakMap;const Dt="modulepreload",It=function(r,t){return new URL(r,t).href},N={},s=function(t,e,i){let u=Promise.resolve();if(e&&e.length>0){let o=function(c){return Promise.all(c.map(h=>Promise.resolve(h).then(R=>({status:"fulfilled",value:R}),R=>({status:"rejected",reason:R}))))};const a=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),j=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));u=o(e.map(c=>{if(c=It(c,i),c in N)return;N[c]=!0;const h=c.endsWith(".css"),R=h?'[rel="stylesheet"]':"";if(!!i)for(let y=a.length-1;y>=0;y--){const n=a[y];if(n.href===c&&(!h||n.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${R}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Dt,h||(g.as="script"),g.crossOrigin="",g.href=c,j&&g.setAttribute("nonce",j),document.head.appendChild(g),h)return new Promise((y,n)=>{g.addEventListener("load",y),g.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${c}`)))})}))}function p(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return u.then(o=>{for(const a of o||[])a.status==="rejected"&&p(a.reason);return t().catch(p)})},Ht={};var Vt=$('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),wt=$("<!> <!>",1);function kt(r,t){lt(t,!0);let e=q(t,"components",23,()=>[]),i=q(t,"data_0",3,null),u=q(t,"data_1",3,null),p=q(t,"data_2",3,null);_t(()=>t.stores.page.set(t.page)),dt(()=>{t.stores,t.page,t.constructors,e(),t.form,i(),u(),p(),t.stores.page.notify()});let o=J(!1),a=J(!1),m=J(null);Lt(()=>{const n=t.stores.page.subscribe(()=>{v(o)&&(U(a,!0),ft().then(()=>{U(m,document.title||"untitled page",!0)}))});return U(o,!0),n});const j=k(()=>t.constructors[2]);var c=wt(),h=A(c);{var R=n=>{const O=k(()=>t.constructors[0]);var b=I(),V=A(b);x(V,()=>v(O),(L,T)=>{S(T(L,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(d,St)=>{var Q=I(),et=A(Q);{var rt=D=>{const z=k(()=>t.constructors[1]);var w=I(),F=A(w);x(F,()=>v(z),(G,W)=>{S(W(G,{get data(){return u()},get form(){return t.form},get params(){return t.page.params},children:(f,jt)=>{var X=I(),ot=A(X);x(ot,()=>v(j),(st,nt)=>{S(nt(st,{get data(){return p()},get form(){return t.form},get params(){return t.page.params}}),C=>e()[2]=C,()=>{var C;return(C=e())==null?void 0:C[2]})}),E(f,X)},$$slots:{default:!0}}),f=>e()[1]=f,()=>{var f;return(f=e())==null?void 0:f[1]})}),E(D,w)},at=D=>{const z=k(()=>t.constructors[1]);var w=I(),F=A(w);x(F,()=>v(z),(G,W)=>{S(W(G,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),f=>e()[1]=f,()=>{var f;return(f=e())==null?void 0:f[1]})}),E(D,w)};B(et,D=>{t.constructors[2]?D(rt):D(at,-1)})}E(d,Q)},$$slots:{default:!0}}),d=>e()[0]=d,()=>{var d;return(d=e())==null?void 0:d[0]})}),E(n,b)},K=n=>{const O=k(()=>t.constructors[0]);var b=I(),V=A(b);x(V,()=>v(O),(L,T)=>{S(T(L,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),d=>e()[0]=d,()=>{var d;return(d=e())==null?void 0:d[0]})}),E(n,b)};B(h,n=>{t.constructors[1]?n(R):n(K,-1)})}var g=vt(h,2);{var y=n=>{var O=Vt(),b=gt(O);{var V=L=>{var T=bt();Pt(()=>Ot(T,v(m))),E(L,T)};B(b,L=>{v(a)&&L(V)})}Et(O),E(n,O)};B(g,n=>{v(o)&&n(y)})}E(r,c),ht()}const Jt=At(kt),Kt=[()=>s(()=>import("../nodes/0.CJDC_3s9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>s(()=>import("../nodes/1.DsKocFSb.js"),__vite__mapDeps([25,1,2,3,6,10,12,5,13,14]),import.meta.url),()=>s(()=>import("../nodes/2.BOYqXdCa.js"),__vite__mapDeps([26,1,2,3,8]),import.meta.url),()=>s(()=>import("../nodes/3.B9ucbp_W.js"),__vite__mapDeps([27,1,2,3,28,29,14,6,4,5,7,17,9,30,10,11,12,13,15,16,18,19,20,8,21,22,23,31,32,33,34]),import.meta.url),()=>s(()=>import("../nodes/4.BIzqhTqv.js"),__vite__mapDeps([35,36,13]),import.meta.url),()=>s(()=>import("../nodes/5.9zgwFV6I.js"),__vite__mapDeps([37,1,2,3,14,6,7,17,28,9,10,38]),import.meta.url),()=>s(()=>import("../nodes/6.Bs32Ieii.js"),__vite__mapDeps([39,1,2,3,14,6,7,28,9,30,10,40,4,5,11,12,13,41,15,42]),import.meta.url),()=>s(()=>import("../nodes/7.Cigxrk0v.js"),__vite__mapDeps([43,1,2,3,14,6,7,28,9,30,10,40,4,5,11,12,13,41,15,44]),import.meta.url),()=>s(()=>import("../nodes/8.pG10rCF0.js"),__vite__mapDeps([45,1,2,3,14,4,5,10,12,13,11,46]),import.meta.url),()=>s(()=>import("../nodes/9.Bzqb3xHY.js"),__vite__mapDeps([47,1,2,3,14,6,7,17,28,9,30,48,10,40,4,5,11,12,13,41,32,20,8,19,21,18,33,49]),import.meta.url),()=>s(()=>import("../nodes/10.BeejAn8z.js"),__vite__mapDeps([50,1,2,3,14,6,7,17,28,9,10,40,4,5,11,12,13,41,15,51]),import.meta.url),()=>s(()=>import("../nodes/11.D--uwkk0.js"),__vite__mapDeps([52,1,2,3,14,6,7,17,28,30,10,9,40,4,5,11,12,13,41,15,32,20,8,19,21,18,33,53]),import.meta.url),()=>s(()=>import("../nodes/12.BLyQ6rUu.js"),__vite__mapDeps([54,1,2,3,28,29,14,6,4,5,7,17,9,30,10,11,12,13,15,16,18,19,20,8,21,22,23,31,32,33,34,40,41,55]),import.meta.url),()=>s(()=>import("../nodes/13.Cl0WQK13.js"),__vite__mapDeps([56,1,2,3,14,6,7,17,28,9,30,48,10,40,4,5,11,12,13,41,15,57]),import.meta.url),()=>s(()=>import("../nodes/14.T9l5Rh19.js"),__vite__mapDeps([58,1,2,3,14,6,7,17,28,9,30,10,15,5,32,20,8,19,4,21,18,33,59]),import.meta.url),()=>s(()=>import("../nodes/15.DHfwIlBx.js"),__vite__mapDeps([60,1,2,3,14,6,5,7,17,28,9,30,10,11,12,13,15,31,8,19,4,20,21,22,61]),import.meta.url),()=>s(()=>import("../nodes/16.BKDfR-KV.js"),__vite__mapDeps([62,1,2,3,4,5,6,7,21,28,10,9,11,12,13,14,15,63,19,40,41,64]),import.meta.url),()=>s(()=>import("../nodes/17.DofB8HQB.js"),__vite__mapDeps([65,1,2,3,14,28,10,12,5,13,66]),import.meta.url),()=>s(()=>import("../nodes/18.BtYZF6FM.js"),__vite__mapDeps([67,36,13]),import.meta.url)],Qt=[],Xt={"/":[3],"/admin":[5,[2]],"/admin/deliver":[6,[2]],"/admin/llm":[7,[2]],"/admin/logs":[8,[2]],"/admin/parse":[9,[2]],"/admin/pipeline":[10,[2]],"/admin/proxy":[11,[2]],"/admin/sources":[12,[2]],"/admin/tags":[13,[2]],"/logs":[14],"/plugins":[15],"/plugins/new":[17],"/plugins/[id]":[16],"/tags":[18],"/[sub]":[4]},tt={handleError:(({error:r})=>{console.error(r)}),reroute:(()=>{}),transport:{}},xt=Object.fromEntries(Object.entries(tt.transport).map(([r,t])=>[r,t.decode])),Zt=Object.fromEntries(Object.entries(tt.transport).map(([r,t])=>[r,t.encode])),Mt=!1,Nt=(r,t)=>xt[r](t);export{Nt as decode,xt as decoders,Xt as dictionary,Zt as encoders,Mt as hash,tt as hooks,Ht as matchers,Kt as nodes,Jt as root,Qt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/BKm6QCwp.js";export{o as load_css,r as start};
@@ -1,11 +1,11 @@
1
- import{c as U,a as $,f as V}from"../chunks/CS53ooo0.js";import"../chunks/BA4Gucnq.js";import{f as S,at as la,au as ra,av as t,ax as s,az as ia,aC as P,aD as Ga,a5 as O,i as a,aw as h,aq as Ra,U as m,z as W,u as _}from"../chunks/vtBo8kBV.js";import{s as oa,a as T}from"../chunks/B6WG2Sd3.js";import{s as na}from"../chunks/B2cyTHdf.js";import{i as va}from"../chunks/BkD3yAYe.js";import{s as B}from"../chunks/ChUctqXA.js";import{a as g,s as I,G as Ca,P as ta}from"../chunks/DoRPmqLn.js";import{i as ca}from"../chunks/DVa8Y-mQ.js";import{p as Fa}from"../chunks/CqYSO3Dx.js";import{t as Na}from"../chunks/CGCMIfh3.js";import{R as Oa,P as Wa,h as w,S as Ia}from"../chunks/DJ2e04vK.js";import{l as ua,s as da}from"../chunks/BAJAS8BI.js";import{I as ha}from"../chunks/DsxvjlCC.js";const Ta=!1,Ua=!1,ce=Object.freeze(Object.defineProperty({__proto__:null,prerender:Ua,ssr:Ta},Symbol.toStringTag,{value:"Module"})),Va='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>',Ba='</title><path d="',Da='"/></svg>',sa={title:"GitHub",slug:"github",get svg(){return Va+"GitHub"+Ba+this.path+Da},path:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",source:"https://github.com/logos",hex:"181717",guidelines:"https://github.com/logos"};function La(f,o){const n=ua(o,["children","$$slots","$$events","$$legacy"]);/**
1
+ import{c as V,a as $,f as B}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{f as S,at as la,au as ra,av as t,ax as s,az as ia,aC as P,aD as Fa,a5 as O,k as a,aw as h,aq as Ga,u as m,F as W,y as _}from"../chunks/BsQ08Wq_.js";import{s as oa,a as T}from"../chunks/BI_ale1m.js";import{s as na}from"../chunks/BK0ygNWX.js";import{i as va}from"../chunks/rNwPv4DZ.js";import{s as D}from"../chunks/Cc7aBSsN.js";import{b as g,s as I,G as Ra,P as ta}from"../chunks/WW6La7Nt.js";import{i as ca}from"../chunks/Nd0ktDhd.js";import{p as Ca}from"../chunks/GeNMTUn1.js";import{t as Na}from"../chunks/4TuV_psf.js";import{R as Oa,P as Wa,h as w,S as Ia}from"../chunks/BZY5aksi.js";import{l as ua,s as da}from"../chunks/D8G961Hm.js";import{I as ha}from"../chunks/pd_p3yYy.js";const Ta=!1,Va=!1,ce=Object.freeze(Object.defineProperty({__proto__:null,prerender:Va,ssr:Ta},Symbol.toStringTag,{value:"Module"})),Ba='<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>',Da='</title><path d="',La='"/></svg>',sa={title:"GitHub",slug:"github",get svg(){return Ba+"GitHub"+Da+this.path+La},path:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",source:"https://github.com/logos",hex:"181717",guidelines:"https://github.com/logos"};function Ua(f,o){const n=ua(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.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const l=[["path",{d:"M15 12h-5"}],["path",{d:"M15 8h-5"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"}]];ha(f,da({name:"scroll-text"},()=>n,{get iconNode(){return l},children:(u,p)=>{var e=U(),d=S(e);B(d,o,"default",{}),$(u,e)},$$slots:{default:!0}}))}function ja(f,o){const n=ua(o,["children","$$slots","$$events","$$legacy"]);/**
6
+ */const l=[["path",{d:"M15 12h-5"}],["path",{d:"M15 8h-5"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3"}]];ha(f,da({name:"scroll-text"},()=>n,{get iconNode(){return l},children:(u,p)=>{var e=V(),d=S(e);D(d,o,"default",{}),$(u,e)},$$slots:{default:!0}}))}function ja(f,o){const n=ua(o,["children","$$slots","$$events","$$legacy"]);/**
7
7
  * @license lucide-svelte v0.460.1 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const l=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];ha(f,da({name:"settings"},()=>n,{get iconNode(){return l},children:(u,p)=>{var e=U(),d=S(e);B(d,o,"default",{}),$(u,e)},$$slots:{default:!0}}))}var Aa=V("<div> </div>");function Ea(f,o){la(o,!1);const n=()=>T(Na,"$toast",l),[l,u]=oa();ca();var p=U(),e=S(p);{var d=v=>{var c=Aa(),H=t(c,!0);s(c),ia(()=>{g(c,1,`toast ${n().type??""}`,"svelte-zemmny"),na(H,n().msg)}),$(v,c)};va(e,v=>{n().msg&&v(d)})}$(f,p),ra(),u()}var Ja=V('<div class="layout-feed-rail layout-feed-rail--home svelte-12qhfyh"><!></div>'),Ka=V('<div class="layout-outer svelte-12qhfyh"><div class="layout-app svelte-12qhfyh"><div id="layout-inner-scroll" class="layout-merged-cluster svelte-12qhfyh"><aside class="layout-nav-rail svelte-12qhfyh" aria-label="主导航"><nav class="nav-rail-links svelte-12qhfyh"><div class="nav-rail-cluster svelte-12qhfyh"><a href="/" title="信源" aria-label="信源"><!></a> <a href="/logs" title="日志" aria-label="日志"><!></a> <a href="/plugins" title="插件" aria-label="插件"><!></a> <a href="/admin" title="设置" aria-label="设置"><!></a></div></nav> <div class="nav-rail-footer svelte-12qhfyh"><a class="nav-rail-github svelte-12qhfyh" target="_blank" rel="noopener noreferrer" aria-label="在 GitHub 打开源码仓库" title="GitHub"><svg class="nav-rail-github-icon svelte-12qhfyh" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill="currentColor"></path></svg></a> <a class="nav-rail-brand svelte-12qhfyh" href="/" aria-label="返回信源首页"> </a></div></aside> <div><main><!></main></div> <!></div></div></div> <!>',1);function ue(f,o){la(o,!1);const n=()=>T(Fa,"$page",u),l=()=>T(w,"$homeFeedPanelSource",u),[u,p]=oa(),e=W(),d=W(),v=W(),c=18;function H(i){return!!(i==="/"||i==="/admin"||i==="/admin/sources"||i==="/admin/tags"||i==="/plugins"||i==="/logs"||i.startsWith("/plugins/")||i.startsWith("/logs/"))}P(()=>n(),()=>{O(e,n().url.pathname)}),P(()=>a(e),()=>{O(d,H(a(e)))}),P(()=>(a(e),w),()=>{a(e)!=="/"&&w.set(null)}),P(()=>a(e),()=>{O(v,{sources:a(e)==="/"||a(e)==="/admin/sources",logs:a(e)==="/logs"||a(e).startsWith("/logs/"),plugins:a(e).startsWith("/plugins"),settings:a(e)==="/admin"||a(e).startsWith("/admin/")})}),Ga(),ca();var D=Ka(),M=S(D),L=t(M),j=t(L),k=t(j),G=t(k),A=t(G),y=t(A);let E;var fa=t(y);Oa(fa,{size:c}),s(y);var b=h(y,2);let J;var ga=t(b);La(ga,{size:c}),s(b);var q=h(b,2);let K;var pa=t(q);Wa(pa,{size:c}),s(q);var R=h(q,2);let Q;var ma=t(R);ja(ma,{size:c}),s(R),s(A),s(G);var X=h(G,2),x=t(X),Y=t(x),_a=t(Y);s(Y),s(x);var C=h(x,2),$a=t(C,!0);s(C),s(X),s(k);var z=h(k,2);let Z;var F=t(z);let aa;var ya=t(F);B(ya,o,"default",{}),s(F),s(z);var ba=h(z,2);{var qa=i=>{var N=Ja(),za=t(N);{let Pa=_(()=>l()!=null),wa=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.ref)??""}))),Sa=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.displayLabel)??""}))),Ha=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.description)??""}))),Ma=_(()=>(l(),m(()=>{var r,ea;return((ea=(r=l())==null?void 0:r.proxy)==null?void 0:ea.trim())??""}))),ka=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.parseHint)??null})));Ia(za,{variant:"inline",get open(){return a(Pa)},get sourceRef(){return a(wa)},get sourceLabel(){return a(Sa)},get sourceDescription(){return a(Ha)},get sourceProxy(){return a(Ma)},get sourceParseHint(){return a(ka)},onOpenChange:r=>{r||w.set(null)}})}s(N),$(i,N)};va(ba,i=>{a(e)==="/"&&i(qa)})}s(j),s(L),s(M);var xa=h(M,2);Ea(xa,{}),ia(()=>{E=g(y,1,"nav-rail-link svelte-12qhfyh",null,E,{active:a(v).sources}),J=g(b,1,"nav-rail-link svelte-12qhfyh",null,J,{active:a(v).logs}),K=g(q,1,"nav-rail-link svelte-12qhfyh",null,K,{active:a(v).plugins}),Q=g(R,1,"nav-rail-link svelte-12qhfyh",null,Q,{active:a(v).settings}),I(x,"href",Ca),I(_a,"d",(Ra(sa),m(()=>sa.path))),I(C,"title",ta),na($a,ta),Z=g(z,1,"shell-frame svelte-12qhfyh",null,Z,{"shell-frame--with-feed-rail":a(e)==="/"}),aa=g(F,1,"main shell svelte-12qhfyh",null,aa,{"main-fill":a(d)})}),$(f,D),ra(),p()}export{ue as component,ce as universal};
11
+ */const l=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];ha(f,da({name:"settings"},()=>n,{get iconNode(){return l},children:(u,p)=>{var e=V(),d=S(e);D(d,o,"default",{}),$(u,e)},$$slots:{default:!0}}))}var Aa=B("<div> </div>");function Ea(f,o){la(o,!1);const n=()=>T(Na,"$toast",l),[l,u]=oa();ca();var p=V(),e=S(p);{var d=v=>{var c=Aa(),H=t(c,!0);s(c),ia(()=>{g(c,1,`toast ${n().type??""}`,"svelte-zemmny"),na(H,n().msg)}),$(v,c)};va(e,v=>{n().msg&&v(d)})}$(f,p),ra(),u()}var Ja=B('<div class="layout-feed-rail layout-feed-rail--home svelte-12qhfyh"><!></div>'),Ka=B('<div class="layout-outer svelte-12qhfyh"><div class="layout-app svelte-12qhfyh"><div id="layout-inner-scroll" class="layout-merged-cluster svelte-12qhfyh"><aside class="layout-nav-rail svelte-12qhfyh" aria-label="主导航"><nav class="nav-rail-links svelte-12qhfyh"><div class="nav-rail-cluster svelte-12qhfyh"><a href="/" title="信源" aria-label="信源"><!></a> <a href="/logs" title="日志" aria-label="日志"><!></a> <a href="/plugins" title="插件" aria-label="插件"><!></a> <a href="/admin" title="设置" aria-label="设置"><!></a></div></nav> <div class="nav-rail-footer svelte-12qhfyh"><a class="nav-rail-github svelte-12qhfyh" target="_blank" rel="noopener noreferrer" aria-label="在 GitHub 打开源码仓库" title="GitHub"><svg class="nav-rail-github-icon svelte-12qhfyh" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill="currentColor"></path></svg></a> <a class="nav-rail-brand svelte-12qhfyh" href="/" aria-label="返回信源首页"> </a></div></aside> <div><main><!></main></div> <!></div></div></div> <!>',1);function ue(f,o){la(o,!1);const n=()=>T(Ca,"$page",u),l=()=>T(w,"$homeFeedPanelSource",u),[u,p]=oa(),e=W(),d=W(),v=W(),c=18;function H(i){return!!(i==="/"||i==="/admin"||i==="/admin/sources"||i==="/admin/tags"||i==="/plugins"||i==="/logs"||i.startsWith("/plugins/")||i.startsWith("/logs/"))}P(()=>n(),()=>{O(e,n().url.pathname)}),P(()=>a(e),()=>{O(d,H(a(e)))}),P(()=>(a(e),w),()=>{a(e)!=="/"&&w.set(null)}),P(()=>a(e),()=>{O(v,{sources:a(e)==="/"||a(e)==="/admin/sources",logs:a(e)==="/logs"||a(e).startsWith("/logs/"),plugins:a(e).startsWith("/plugins"),settings:a(e)==="/admin"||a(e).startsWith("/admin/")})}),Fa(),ca();var L=Ka(),k=S(L),U=t(k),j=t(U),M=t(j),F=t(M),A=t(F),y=t(A);let E;var fa=t(y);Oa(fa,{size:c}),s(y);var b=h(y,2);let J;var ga=t(b);Ua(ga,{size:c}),s(b);var q=h(b,2);let K;var pa=t(q);Wa(pa,{size:c}),s(q);var G=h(q,2);let Q;var ma=t(G);ja(ma,{size:c}),s(G),s(A),s(F);var X=h(F,2),x=t(X),Y=t(x),_a=t(Y);s(Y),s(x);var R=h(x,2),$a=t(R,!0);s(R),s(X),s(M);var z=h(M,2);let Z;var C=t(z);let aa;var ya=t(C);D(ya,o,"default",{}),s(C),s(z);var ba=h(z,2);{var qa=i=>{var N=Ja(),za=t(N);{let Pa=_(()=>l()!=null),wa=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.ref)??""}))),Sa=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.displayLabel)??""}))),Ha=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.description)??""}))),ka=_(()=>(l(),m(()=>{var r,ea;return((ea=(r=l())==null?void 0:r.proxy)==null?void 0:ea.trim())??""}))),Ma=_(()=>(l(),m(()=>{var r;return((r=l())==null?void 0:r.parseHint)??null})));Ia(za,{variant:"inline",get open(){return a(Pa)},get sourceRef(){return a(wa)},get sourceLabel(){return a(Sa)},get sourceDescription(){return a(Ha)},get sourceProxy(){return a(ka)},get sourceParseHint(){return a(Ma)},onOpenChange:r=>{r||w.set(null)}})}s(N),$(i,N)};va(ba,i=>{a(e)==="/"&&i(qa)})}s(j),s(U),s(k);var xa=h(k,2);Ea(xa,{}),ia(()=>{E=g(y,1,"nav-rail-link svelte-12qhfyh",null,E,{active:a(v).sources}),J=g(b,1,"nav-rail-link svelte-12qhfyh",null,J,{active:a(v).logs}),K=g(q,1,"nav-rail-link svelte-12qhfyh",null,K,{active:a(v).plugins}),Q=g(G,1,"nav-rail-link svelte-12qhfyh",null,Q,{active:a(v).settings}),I(x,"href",Ra),I(_a,"d",(Ga(sa),m(()=>sa.path))),I(R,"title",ta),na($a,ta),Z=g(z,1,"shell-frame svelte-12qhfyh",null,Z,{"shell-frame--with-feed-rail":a(e)==="/"}),aa=g(C,1,"main shell svelte-12qhfyh",null,aa,{"main-fill":a(d)})}),$(f,L),ra(),p()}export{ue as component,ce as universal};
@@ -0,0 +1 @@
1
+ import{a as h,f as g}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{at as v,f as l,az as d,au as x,av as e,ax as o,aw as _}from"../chunks/BsQ08Wq_.js";import{s as p}from"../chunks/BK0ygNWX.js";import{i as $}from"../chunks/Nd0ktDhd.js";import{s as k,p as m}from"../chunks/BKm6QCwp.js";const b={get error(){return m.error},get status(){return m.status}};k.updated.check;const i=b;var w=g("<h1> </h1> <p> </p>",1);function B(f,n){v(n,!1),$();var t=w(),r=l(t),c=e(r,!0);o(r);var a=_(r,2),u=e(a,!0);o(a),d(()=>{var s;p(c,i.status),p(u,(s=i.error)==null?void 0:s.message)}),h(f,t),x()}export{B as component};
@@ -0,0 +1 @@
1
+ import{a as u,f as b}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as se}from"../chunks/DptdhtA1.js";import{at as te,au as re,d as le,av as o,$ as ie,ay as B,ax as i,aw as c,k as a,a5 as r,F as g,az as S,aA as oe}from"../chunks/BsQ08Wq_.js";import{s as F,e as f}from"../chunks/BK0ygNWX.js";import{i as I}from"../chunks/rNwPv4DZ.js";import{e as ne,i as de}from"../chunks/B553hBXT.js";import{h as ve}from"../chunks/DO5OXNYS.js";import{P as ce,c as O,r as fe,b as pe,d as me}from"../chunks/WW6La7Nt.js";import{i as ue}from"../chunks/Nd0ktDhd.js";import{B as ge}from"../chunks/Dg_D3pjF.js";import{s as $}from"../chunks/4TuV_psf.js";var be=b('<div class="state svelte-jqd85f">加载中…</div>'),_e=b('<div role="listitem" draggable="true"><span class="drag-handle svelte-jqd85f" title="拖拽排序">⋮⋮</span> <label class="toggle-wrap svelte-jqd85f"><input type="checkbox" class="svelte-jqd85f"/> <span class="toggle-slider svelte-jqd85f"></span></label> <span class="step-label svelte-jqd85f"> </span></div>'),he=b('<button type="button" class="btn-add svelte-jqd85f">+ 添加步骤</button>'),je=b('<div class="body svelte-jqd85f"><section class="pipeline-section svelte-jqd85f"><h3 class="section-title svelte-jqd85f">Pipeline(入库前)</h3> <p class="hint svelte-jqd85f">对每条新入库条目执行,顺序由上到下。</p> <div class="step-list svelte-jqd85f" role="list"></div> <!></section> <div class="save-row svelte-jqd85f"><button type="button" class="btn btn-primary svelte-jqd85f"> </button></div></div>'),qe=b('<div class="feed-wrap svelte-jqd85f"><div class="feed-col svelte-jqd85f"><div class="feed-header svelte-jqd85f"><!> <h2 class="svelte-jqd85f">Pipeline</h2> <p class="page-desc svelte-jqd85f">入库前处理(打标签、翻译),可调整顺序与开关。</p></div> <!></div></div>');function Ie(C,J){te(J,!1);const L={qualityFilter:"质量过滤",tagger:"打标签",translator:"翻译"};let t=g([]),_=g([]),q=g(!0),p=g(!1),m=g(null);async function M(){r(q,!0);try{const e=await O("/api/pipeline");r(t,(e==null?void 0:e.steps)??[]),r(_,(e==null?void 0:e.availableIds)??[])}catch{r(t,[]),r(_,[])}finally{r(q,!1)}}async function N(){r(p,!0);try{const e=await O("/api/pipeline",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({steps:a(t)})});if(!(e!=null&&e.ok))throw new Error((e==null?void 0:e.message)??"保存失败");r(t,(e==null?void 0:e.steps)??a(t)),$("已保存","success")}catch(e){$("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{r(p,!1)}}function R(e){r(t,a(t).map((s,l)=>l===e?{...s,enabled:!s.enabled}:s))}function U(e){r(m,e)}function z(e){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move")}function G(e){if(a(m)==null)return;const s=[...a(t)],[l]=s.splice(a(m),1);s.splice(e,0,l),r(t,s),r(m,null)}function H(){const e=new Set(a(t).map(l=>l.id)),s=a(_).find(l=>!e.has(l));s&&r(t,[...a(t),{id:s,enabled:!1}])}se(M),ue();var y=qe();ve("jqd85f",e=>{le(()=>{ie.title=`Pipeline - ${ce}`})});var T=o(y),w=o(T),K=o(w);ge(K,{}),B(4),i(w);var Q=c(w,2);{var V=e=>{var s=be();u(e,s)},W=e=>{var s=je(),l=o(s),x=c(o(l),4);ne(x,5,()=>a(t),de,(d,n,j)=>{var v=_e();let D;var k=c(o(v),2),P=o(k);fe(P),B(2),i(k);var A=c(k,2),ae=o(A,!0);i(A),i(v),S(()=>{D=pe(v,1,"step-row svelte-jqd85f",null,D,{dragging:a(m)===j}),me(P,a(n).enabled),F(ae,L[a(n).id]??a(n).id)}),f("change",P,()=>R(j)),f("dragstart",v,()=>U(j)),f("dragover",v,z),f("drop",v,()=>G(j)),u(d,v)}),i(x);var X=c(x,2);{var Y=d=>{var n=he();S(()=>n.disabled=a(p)),f("click",n,H),u(d,n)},Z=oe(()=>a(_).some(d=>!a(t).some(n=>n.id===d)));I(X,d=>{a(Z)&&d(Y)})}i(l);var E=c(l,2),h=o(E),ee=o(h,!0);i(h),i(E),i(s),S(()=>{h.disabled=a(p),F(ee,a(p)?"保存中…":"保存")}),f("click",h,N),u(e,s)};I(Q,e=>{a(q)?e(V):e(W,-1)})}i(T),i(y),u(C,y),re()}export{Ie as component};
@@ -0,0 +1,3 @@
1
+ import{a as o,f as p,c as pe,t as de}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as me}from"../chunks/DptdhtA1.js";import{at as ue,aC as j,aD as _e,az as A,au as ye,k as t,d as he,F as l,av as i,a5 as s,$ as ge,aw as v,ax as n,f as g,aE as xe,ay as O,u as E}from"../chunks/BsQ08Wq_.js";import{d as be,a as Pe,s as R}from"../chunks/BK0ygNWX.js";import{i as X}from"../chunks/rNwPv4DZ.js";import{e as $e}from"../chunks/B553hBXT.js";import{h as je}from"../chunks/DO5OXNYS.js";import{b as ze}from"../chunks/BnqaikL8.js";import{i as we}from"../chunks/Nd0ktDhd.js";import{c as Y,P as Te}from"../chunks/WW6La7Nt.js";import{B as Le}from"../chunks/Dg_D3pjF.js";import{s as V}from"../chunks/4TuV_psf.js";import{S as Se,a as ke,C as Ce,b as Ae,c as Oe,d as Ee}from"../chunks/B8StT3Do.js";import{P as Re}from"../chunks/pd_p3yYy.js";var He=p('<p class="hint svelte-1f24zj">加载中…</p>'),Ne=p('<textarea class="text-input svelte-1f24zj" rows="5" placeholder="http://127.0.0.1:7890 http://user:pass@host:port" autocomplete="off" spellcheck="false"></textarea> <p class="hint svelte-1f24zj">一行一个代理,支持带账号:<code>http://user:pass@host:port</code></p>',1),Be=p('<p class="hint svelte-1f24zj">加载中…</p>'),De=p("<span> </span> <!>",1),Fe=p("<!> <!>",1),Ge=p('<!> <p class="hint svelte-1f24zj">全局代理作为信源未指定代理时的默认值。</p>',1),Ie=p('<div class="feed-wrap svelte-1f24zj"><div class="feed-col svelte-1f24zj"><div class="body svelte-1f24zj"><!> <p class="intro svelte-1f24zj">写入 <code class="svelte-1f24zj">.rssany/config.json</code> 的 <code class="svelte-1f24zj">proxyList</code> 与 <code class="svelte-1f24zj">globalProxy</code>。信源可从代理列表中选择单源代理;未指定单源代理时使用全局代理;未填写时仍可使用环境变量 <code class="svelte-1f24zj">HTTP_PROXY</code> / <code class="svelte-1f24zj">HTTPS_PROXY</code>。</p> <section class="form-section svelte-1f24zj"><h3 class="section-title svelte-1f24zj">代理列表</h3> <!></section> <section class="form-section svelte-1f24zj"><h3 class="section-title svelte-1f24zj">全局 HTTP(S) 代理</h3> <!></section> <div class="btn-row svelte-1f24zj"><button type="button" class="btn btn-primary svelte-1f24zj"> </button></div></div></div></div>');function ot(q,K){ue(K,!1);const d=l(),z=l(),u=l(),H=l();let a=l(""),c=l(""),_=l(!0),x=l(!1);function Q(e){const r=new Set,f=[];for(const y of e.split(/\r?\n/)){const h=y.trim();!h||r.has(h)||(r.add(h),f.push(h))}return f}function W(e){s(a,e)}async function Z(){s(_,!0);try{const e=await Y("/api/proxy");s(a,typeof(e==null?void 0:e.globalProxy)=="string"?e.globalProxy:""),s(c,Array.isArray(e==null?void 0:e.proxyList)?e.proxyList.join(`
2
+ `):"")}catch{s(a,""),s(c,"")}finally{s(_,!1)}}async function ee(){s(x,!0);try{const e=await Y("/api/proxy",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({globalProxy:t(a).trim(),proxyList:t(d)})});if(!(e!=null&&e.ok))throw new Error("保存失败");s(a,typeof e.globalProxy=="string"?e.globalProxy:""),s(c,Array.isArray(e.proxyList)?e.proxyList.join(`
3
+ `):""),V("已保存","success")}catch(e){V("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{s(x,!1)}}me(Z),j(()=>t(c),()=>{s(d,Q(t(c)))}),j(()=>(t(a),t(d)),()=>{s(z,t(a).trim()&&!t(d).includes(t(a).trim()))}),j(()=>(t(z),t(a),t(d)),()=>{s(u,[{value:"",label:"不设置全局代理"},...t(z)?[{value:t(a),label:`${t(a)}(当前配置,未在列表中)`}]:[],...t(d).map(e=>({value:e,label:e}))])}),j(()=>(t(u),t(a)),()=>{var e;s(H,((e=t(u).find(r=>r.value===t(a)))==null?void 0:e.label)??"不设置全局代理")}),_e(),we();var w=Ie();je("1f24zj",e=>{he(()=>{ge.title=`代理 - ${Te}`})});var N=i(w),B=i(N),D=i(B);Le(D,{});var T=v(D,4),te=v(i(T),2);{var se=e=>{var r=He();o(e,r)},ae=e=>{var r=Ne(),f=g(r);xe(f),O(2),ze(f,()=>t(c),y=>s(c,y)),o(e,r)};X(te,e=>{t(_)?e(se):e(ae,-1)})}n(T);var L=v(T,2),re=v(i(L),2);{var oe=e=>{var r=Be();o(e,r)},le=e=>{var r=Ge(),f=g(r);Se(f,{type:"single",get value(){return t(a)},onValueChange:W,get items(){return t(u)},children:(y,h)=>{var G=Fe(),I=g(G);ke(I,{class:"proxy-select-trigger","aria-label":"全局代理",children:(S,ce)=>{var P=De(),$=g(P),k=i($,!0);n($);var J=v($,2);Ce(J,{size:14,"aria-hidden":"true"}),A(()=>R(k,t(H))),o(S,P)},$$slots:{default:!0}});var ne=v(I,2);Re(ne,{children:(S,ce)=>{Ae(S,{class:"proxy-select-content",sideOffset:4,children:(P,$)=>{Oe(P,{class:"proxy-select-viewport",children:(k,J)=>{var M=pe(),fe=g(M);$e(fe,1,()=>t(u),C=>C.value,(C,m)=>{Ee(C,{class:"proxy-select-item",get value(){return t(m),E(()=>t(m).value)},get label(){return t(m),E(()=>t(m).label)},children:(ve,Je)=>{O();var U=de();A(()=>R(U,(t(m),E(()=>t(m).label)))),o(ve,U)},$$slots:{default:!0}})}),o(k,M)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),o(y,G)},$$slots:{default:!0}}),O(2),o(e,r)};X(re,e=>{t(_)?e(oe):e(le,-1)})}n(L);var F=v(L,2),b=i(F),ie=i(b,!0);n(b),n(F),n(B),n(N),n(w),A(()=>{b.disabled=t(_)||t(x),R(ie,t(x)?"保存中…":"保存")}),Pe("click",b,ee),o(q,w),ye()}be(["click"]);export{ot as component};
@@ -0,0 +1 @@
1
+ import{a as s,f as m}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{f as i,d as c,av as f,aw as d,$ as n,ax as p}from"../chunks/BsQ08Wq_.js";import{h as v}from"../chunks/DO5OXNYS.js";import{S as l}from"../chunks/BT6b4LcZ.js";import{B as _}from"../chunks/Dg_D3pjF.js";import{P as h}from"../chunks/WW6La7Nt.js";var u=m('<div class="admin-sources-back svelte-8cr5m9"><!></div> <!>',1);function R(o){var r=u();v("8cr5m9",$=>{c(()=>{n.title=`Sources — ${h}`})});var a=i(r),e=f(a);_(e,{}),p(a);var t=d(a,2);l(t,{}),s(o,r)}export{R as component};
@@ -0,0 +1 @@
1
+ import{a as u,f as d}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as ke}from"../chunks/DptdhtA1.js";import{z as we,at as Ce,f as Te,az as E,k as s,au as Le,d as Ee,av as n,a5 as a,F as w,aw as i,$ as $e,ax as r,y as Me}from"../chunks/BsQ08Wq_.js";import{e as f,s as S}from"../chunks/BK0ygNWX.js";import{i as F}from"../chunks/rNwPv4DZ.js";import{e as se,i as ae}from"../chunks/B553hBXT.js";import{h as Pe}from"../chunks/DO5OXNYS.js";import{P as Se,r as Fe,c as X,e as Oe,s as re}from"../chunks/WW6La7Nt.js";import{b as Je}from"../chunks/BnqaikL8.js";import{s as Y}from"../chunks/Bfc47y5P.js";import{i as Ne}from"../chunks/Nd0ktDhd.js";import{B as je}from"../chunks/Dg_D3pjF.js";import{s as O}from"../chunks/4TuV_psf.js";function ze(z,$){var C;var o=(C=z.$$events)==null?void 0:C[$.type],p=we(o)?o.slice():o==null?[]:[o];for(var m of p)m.call(this,$)}var Be=d('<div class="state svelte-1s5glru">加载中…</div>'),De=d('<p class="empty-hint svelte-1s5glru">暂无标签。添加后,pipeline 会对新入库条目自动打标签。</p>'),Ie=d('<span class="tag-meta svelte-1s5glru"> </span>'),Re=d('<div class="tag-badge svelte-1s5glru" role="button" tabindex="0"><span class="tag-name svelte-1s5glru"> </span> <!> <button type="button" class="tag-remove svelte-1s5glru" title="从系统标签中删除">×</button></div>'),Ue=d('<div class="tag-list svelte-1s5glru"></div>'),qe=d('<div class="tag-badge suggested svelte-1s5glru" role="button" tabindex="0"><span class="tag-name svelte-1s5glru"> </span> <span class="tag-meta svelte-1s5glru"> </span> <button type="button" class="tag-add svelte-1s5glru" title="添加到系统标签">+</button></div>'),Ae=d('<div class="suggested-section svelte-1s5glru"><h3 class="section-title svelte-1s5glru">建议添加(文章中出现但未在系统标签库中)</h3> <div class="tag-list svelte-1s5glru"></div></div>'),Xe=d('<div class="body svelte-1s5glru"><div class="tags-section svelte-1s5glru"><h3 class="section-title svelte-1s5glru"> </h3> <!></div> <!></div>'),Ye=d('<div class="context-menu svelte-1s5glru" role="menu" tabindex="-1"><button type="button" class="context-menu-item svelte-1s5glru">从所有文章中移除该标签</button></div>'),Ge=d('<div class="feed-wrap svelte-1s5glru"><div class="feed-col svelte-1s5glru"><div class="feed-toolbar-block svelte-1s5glru"><!> <div class="admin-feed-header"><div class="admin-feed-header__left"><h2>系统标签</h2> <p class="admin-feed-header__desc">系统标签库,新入库条目会由 LLM 自动匹配打标签。</p></div> <div class="admin-feed-header__actions"><input type="text" class="admin-toolbar-input" placeholder="输入新标签,回车添加"/> <button type="button" class="admin-toolbar-btn admin-toolbar-btn--primary">添加</button></div></div></div> <div class="feed-body-scroll"><!></div></div></div> <!>',1);function lt(z,$){Ce($,!1);let o=w([]),p=[],m=w([]),C=w(!0),_=w(!1),M=w(""),b=w(null),J=w(!1);async function oe(){a(C,!0);try{const t=await X("/api/tags");a(o,(t==null?void 0:t.tags)??[]),p=(t==null?void 0:t.stats)??[],a(m,(t==null?void 0:t.suggestedTags)??[])}catch{a(o,[]),p=[],a(m,[])}finally{a(C,!1)}}function ne(t){return p.find(e=>e.name.toLowerCase()===t.toLowerCase())}async function B(t){a(_,!0);try{const e=await X("/api/tags",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t})});if(!(e!=null&&e.ok))throw new Error((e==null?void 0:e.message)??"保存失败");a(o,(e==null?void 0:e.tags)??t),p=(e==null?void 0:e.stats)??[],a(m,(e==null?void 0:e.suggestedTags)??[]),O("已保存","success")}catch(e){O("保存失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{a(_,!1)}}function G(){const t=s(M).trim();if(!(!t||s(_))){if(s(o).some(e=>e.toLowerCase()===t.toLowerCase())){O("标签已存在","error");return}a(M,""),B([...s(o),t])}}function ie(t){s(_)||B(s(o).filter(e=>e!==t))}function le(t){s(_)||s(o).some(e=>e.toLowerCase()===t.toLowerCase())||B([...s(o),t])}function H(t,e){t.preventDefault(),t.stopPropagation(),a(b,{x:t.clientX,y:t.clientY,tag:e})}function D(){a(b,null)}async function ve(t){if(!s(J)){a(J,!0),a(b,null);try{const e=await X("/api/tags/remove-from-items",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tag:t})});if(!(e!=null&&e.ok))throw new Error((e==null?void 0:e.message)??"操作失败");a(o,(e==null?void 0:e.tags)??s(o)),p=(e==null?void 0:e.stats)??p,a(m,(e==null?void 0:e.suggestedTags)??s(m)),O(`已从 ${(e==null?void 0:e.removedCount)??0} 篇文章中移除该标签`,"success")}catch(e){O("操作失败: "+(e instanceof Error?e.message:String(e)),"error")}finally{a(J,!1)}}}ke(()=>{oe();const t=()=>D(),e=()=>D();return document.addEventListener("click",t),document.addEventListener("contextmenu",e),()=>{document.removeEventListener("click",t),document.removeEventListener("contextmenu",e)}}),Ne();var K=Ge();Pe("1s5glru",t=>{Ee(()=>{$e.title=`标签 - ${Se}`})});var I=Te(K),Q=n(I),R=n(Q),V=n(R);je(V,{});var W=i(V,2),Z=i(n(W),2),N=n(Z);Fe(N);var ee=i(N,2);r(Z),r(W),r(R);var te=i(R,2),ce=n(te);{var ue=t=>{var e=Be();u(t,e)},de=t=>{var e=Xe(),T=n(e),h=n(T),fe=n(h);r(h);var pe=i(h,2);{var _e=v=>{var g=De();u(v,g)},be=v=>{var g=Ue();se(g,5,()=>s(o),ae,(j,y)=>{const c=Me(()=>ne(s(y)));var l=Re(),x=n(l),U=n(x,!0);r(x);var L=i(x,2);{var q=k=>{var A=Ie(),xe=n(A);r(A),E(()=>S(xe,`${s(c).count??""} 篇 · 热度 ${s(c).hotness??""}`)),u(k,A)};F(L,k=>{s(c)&&k(q)})}var P=i(L,2);r(l),E(()=>{re(l,"aria-label",`标签 ${s(y)},右键打开菜单`),S(U,s(y)),P.disabled=s(_)}),f("click",P,Y(()=>ie(s(y)))),f("contextmenu",l,k=>H(k,s(y))),u(j,l)}),r(g),u(v,g)};F(pe,v=>{s(o).length===0?v(_e):v(be,-1)})}r(T);var he=i(T,2);{var ye=v=>{var g=Ae(),j=i(n(g),2);se(j,5,()=>s(m),ae,(y,c)=>{var l=qe(),x=n(l),U=n(x,!0);r(x);var L=i(x,2),q=n(L);r(L);var P=i(L,2);r(l),E(()=>{re(l,"aria-label",`建议标签 ${s(c).name},右键打开菜单`),S(U,s(c).name),S(q,`${s(c).count??""} 篇 · 热度 ${s(c).hotness??""}`),P.disabled=s(_)}),f("click",P,Y(()=>le(s(c).name))),f("contextmenu",l,k=>H(k,s(c).name)),u(y,l)}),r(j),r(g),u(v,g)};F(he,v=>{s(m).length>0&&v(ye)})}r(e),E(()=>S(fe,`当前标签 (${s(o).length??""})`)),u(t,e)};F(ce,t=>{s(C)?t(ue):t(de,-1)})}r(te),r(Q),r(I);var me=i(I,2);{var ge=t=>{var e=Ye(),T=n(e);r(e),E(()=>{Oe(e,`left: ${s(b).x??""}px; top: ${s(b).y??""}px`),T.disabled=s(J)}),f("click",T,()=>ve(s(b).tag)),f("click",e,Y(function(h){ze.call(this,$,h)})),f("keydown",e,h=>h.key==="Escape"&&D()),u(t,e)};F(me,t=>{s(b)&&t(ge)})}E(t=>ee.disabled=t,[()=>!s(M).trim()||s(_)]),Je(N,()=>s(M),t=>a(M,t)),f("keydown",N,t=>t.key==="Enter"&&G()),f("click",ee,G),u(z,K),Le()}export{lt as component};
@@ -0,0 +1 @@
1
+ import{a as f,c as Ut,f as m,t as Vt}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as zt,a as Jt}from"../chunks/DptdhtA1.js";import{at as Rt,aC as jt,aD as At,az as $,k as t,au as Ht,d as Bt,av as l,aw as v,f as R,a5 as o,F as p,$ as Gt,ax as a,ay as Zt,u as d}from"../chunks/BsQ08Wq_.js";import{e as T,s as _}from"../chunks/BK0ygNWX.js";import{i as ct}from"../chunks/rNwPv4DZ.js";import{e as ft}from"../chunks/B553hBXT.js";import{h as qt}from"../chunks/DO5OXNYS.js";import{a as pt,P as Kt,r as Qt,b as Wt}from"../chunks/WW6La7Nt.js";import{b as Xt}from"../chunks/BnqaikL8.js";import{i as Yt}from"../chunks/Nd0ktDhd.js";import{s as Y}from"../chunks/4TuV_psf.js";import{S as te,a as ee,C as se,b as ae,c as le,d as re}from"../chunks/B8StT3Do.js";import{P as oe}from"../chunks/pd_p3yYy.js";var ie=m('<span class="log-level-label svelte-1lsf4ps"> </span> <!>',1),ne=m("<!> <!>",1),ve=m('<div class="state err svelte-1lsf4ps"> </div>'),de=m('<div class="state svelte-1lsf4ps">加载中…</div>'),ce=m('<div class="state svelte-1lsf4ps">暂无日志</div>'),fe=m('<tr class="payload-row svelte-1lsf4ps"><td colspan="4" class="svelte-1lsf4ps"><pre class="payload-content svelte-1lsf4ps"> </pre></td></tr>'),pe=m('<tr class="log-row svelte-1lsf4ps" role="button" tabindex="0"><td class="td-time svelte-1lsf4ps"> </td><td class="td-level svelte-1lsf4ps"><span> </span></td><td class="td-cat svelte-1lsf4ps"> </td><td class="td-msg svelte-1lsf4ps"> </td></tr> <!>',1),ue=m('<div class="log-has-data svelte-1lsf4ps"><div class="log-table-scroll svelte-1lsf4ps"><div class="table-wrap svelte-1lsf4ps"><table class="svelte-1lsf4ps"><thead class="svelte-1lsf4ps"><tr><th class="th-time svelte-1lsf4ps">时间</th><th class="th-level svelte-1lsf4ps">级别</th><th class="th-cat svelte-1lsf4ps">分类</th><th class="th-msg svelte-1lsf4ps">消息</th></tr></thead><tbody class="svelte-1lsf4ps"></tbody></table></div></div> <div class="log-toolbar svelte-1lsf4ps"><span class="pagination-info svelte-1lsf4ps"> </span> <div class="pagination-btns svelte-1lsf4ps"><button class="btn btn-secondary btn-sm svelte-1lsf4ps">上一页</button> <button class="btn btn-secondary btn-sm svelte-1lsf4ps">下一页</button></div></div></div>'),_e=m('<div class="feed-wrap svelte-1lsf4ps"><div class="feed-col svelte-1lsf4ps"><div class="feed-toolbar-block svelte-1lsf4ps"><div class="admin-feed-header"><div class="admin-feed-header__left"><h2>日志</h2> <p class="admin-feed-header__desc">查看运行日志、筛选分类与级别</p></div> <div class="admin-feed-header__actions"><input type="search" class="admin-toolbar-input log-filter-input svelte-1lsf4ps" placeholder="过滤…" autocomplete="off" spellcheck="false" aria-label="分类"/> <!> <button class="admin-toolbar-btn admin-toolbar-btn--danger" type="button" title="清空全部日志">清空</button></div></div></div> <div class="log-body-scroll svelte-1lsf4ps"><!></div></div></div>');function De(ut,_t){Rt(_t,!1);const tt=p(),j=[{value:"",label:"全部"},...["error","warn","info","debug"].map(e=>({value:e,label:e}))],mt=350;let c=p([]),w=p(0),h=p(!1),F=p(""),x=p(""),A=p(""),C=null,i=p(0),D=p(null),H=p(!1);const B=100;function G(){C&&(clearTimeout(C),C=null)}function ht(){G(),C=setTimeout(()=>{C=null,o(i,0),S()},mt)}function bt(e){o(x,e),o(i,0),S()}zt(()=>{S()}),Jt(()=>{G()});function gt(){const e=new URLSearchParams;e.set("limit",String(B)),e.set("offset",String(t(i))),t(x)&&e.set("level",t(x));const s=t(A).trim();return s&&e.set("category",s),"/api/logs?"+e.toString()}async function S(){o(h,!0),o(F,"");try{const e=await pt(gt());if(!e.ok)throw new Error(await e.text().catch(()=>`HTTP ${e.status}`));const s=await e.json();o(c,s.items??[]),o(w,s.total??0)}catch(e){o(F,e instanceof Error?e.message:String(e)),o(c,[]),o(w,0)}finally{o(h,!1)}}async function yt(){if(confirm("确定清空全部日志?此操作不可恢复。")){o(H,!0),G();try{const e=await pt("/api/logs",{method:"DELETE"}),s=await e.text();let n={};try{n=s?JSON.parse(s):{}}catch{n={}}if(!e.ok){Y(n.error||s||`HTTP ${e.status}`,"error");return}n.ok&&(Y(n.deleted!=null?`已清空 ${n.deleted} 条`:"已清空日志","success"),o(i,0),o(D,null),await S())}catch(e){Y(e instanceof Error?e.message:String(e),"error")}finally{o(H,!1)}}}function $t(){t(i)<=0||(o(i,Math.max(0,t(i)-B)),S())}function wt(){t(i)+t(c).length>=t(w)||(o(i,t(i)+B),S())}function et(e){o(D,t(D)===e?null:e)}function xt(e){try{return new Date(e).toLocaleString("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return e}}function St(e){if(!e)return"";try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}jt(()=>t(x),()=>{var e;o(tt,((e=j.find(s=>s.value===t(x)))==null?void 0:e.label)??"全部")}),At(),Yt();var Z=_e();qt("1lsf4ps",e=>{Bt(()=>{Gt.title=`日志 - ${Kt}`})});var st=l(Z),q=l(st),at=l(q),lt=v(l(at),2),M=l(lt);Qt(M);var rt=v(M,2);te(rt,{type:"single",get value(){return t(x)},onValueChange:bt,get items(){return j},children:(e,s)=>{var n=ne(),O=R(n);ee(O,{class:"log-level-trigger","aria-label":"级别",children:(E,V)=>{var b=ie(),P=R(b),L=l(P,!0);a(P);var k=v(P,2);se(k,{size:14,"aria-hidden":"true"}),$(()=>_(L,t(tt))),f(E,b)},$$slots:{default:!0}});var U=v(O,2);oe(U,{children:(E,V)=>{ae(E,{class:"log-level-content",sideOffset:4,children:(b,P)=>{le(b,{class:"log-level-viewport",children:(L,k)=>{var I=Ut(),N=R(I);ft(N,1,()=>j,r=>r.value,(r,u)=>{re(r,{class:"log-level-item",get value(){return t(u),d(()=>t(u).value)},get label(){return t(u),d(()=>t(u).label)},children:(g,z)=>{Zt();var J=Vt();$(()=>_(J,(t(u),d(()=>t(u).label)))),f(g,J)},$$slots:{default:!0}})}),f(L,I)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),f(e,n)},$$slots:{default:!0}});var ot=v(rt,2);a(lt),a(at),a(q);var it=v(q,2),Et=l(it);{var Pt=e=>{var s=ve(),n=l(s,!0);a(s),$(()=>_(n,t(F))),f(e,s)},Lt=e=>{var s=de();f(e,s)},kt=e=>{var s=ce();f(e,s)},Tt=e=>{var s=ue(),n=l(s),O=l(n),U=l(O),E=v(l(U));ft(E,5,()=>t(c),N=>N.id,(N,r)=>{var u=pe(),g=R(u),z=l(g),J=l(z,!0);a(z);var K=v(z),Q=l(K),Ct=l(Q,!0);a(Q),a(K);var W=v(K),Dt=l(W,!0);a(W);var nt=v(W),Ot=l(nt,!0);a(nt),a(g);var It=v(g,2);{var Nt=y=>{var X=fe(),vt=l(X),dt=l(vt),Ft=l(dt,!0);a(dt),a(vt),a(X),$(Mt=>_(Ft,Mt),[()=>(t(r),d(()=>St(t(r).payload)))]),f(y,X)};ct(It,y=>{t(D),t(r),d(()=>t(D)===t(r).id&&t(r).payload)&&y(Nt)})}$(y=>{_(J,y),Wt(Q,1,`badge level-${t(r),d(()=>t(r).level)??""}`,"svelte-1lsf4ps"),_(Ct,(t(r),d(()=>t(r).level))),_(Dt,(t(r),d(()=>t(r).category))),_(Ot,(t(r),d(()=>t(r).message)))},[()=>(t(r),d(()=>xt(t(r).created_at)))]),T("click",g,()=>et(t(r).id)),T("keydown",g,y=>y.key==="Enter"&&et(t(r).id)),f(N,u)}),a(E),a(U),a(O),a(n);var V=v(n,2),b=l(V),P=l(b);a(b);var L=v(b,2),k=l(L),I=v(k,2);a(L),a(V),a(s),$(()=>{_(P,`共 ${t(w)??""} 条,当前 ${t(c),t(i),d(()=>t(c).length?`${t(i)+1}–${t(i)+t(c).length}`:"—")??""}`),k.disabled=t(i)<=0||t(h),I.disabled=(t(i),t(c),t(w),t(h),d(()=>t(i)+t(c).length>=t(w)||t(h)))}),T("click",k,$t),T("click",I,wt),f(e,s)};ct(Et,e=>{t(F)?e(Pt):(t(h),t(c),d(()=>t(h)&&t(c).length===0)?e(Lt,1):(t(c),d(()=>t(c).length===0)?e(kt,2):e(Tt,-1)))})}a(it),a(st),a(Z),$(()=>ot.disabled=t(h)||t(H)),Xt(M,()=>t(A),e=>o(A,e)),T("input",M,ht),T("click",ot,yt),f(ut,Z),Ht()}export{De as component};
@@ -0,0 +1 @@
1
+ import{a as u,t as st,f as p}from"../chunks/DIeahUKq.js";import"../chunks/CEWi_rGa.js";import{o as Tt}from"../chunks/DptdhtA1.js";import{at as Et,aC as ht,aD as Lt,f as rt,k as t,au as Ot,d as Nt,av as l,az as lt,a5 as o,aw as c,F as h,$ as zt,ax as s,u as b,ay as K}from"../chunks/BsQ08Wq_.js";import{d as Ft,a as D,e as Jt,s as Q}from"../chunks/BK0ygNWX.js";import{g as Mt}from"../chunks/FDS7fbwH.js";import{i as q}from"../chunks/rNwPv4DZ.js";import{e as Bt}from"../chunks/B553hBXT.js";import{h as Ht}from"../chunks/DO5OXNYS.js";import{s as O,P as Kt,r as ot,a as G}from"../chunks/WW6La7Nt.js";import{b as it}from"../chunks/BnqaikL8.js";import{i as Qt}from"../chunks/Nd0ktDhd.js";import{p as qt}from"../chunks/GeNMTUn1.js";import{g as nt}from"../chunks/BKm6QCwp.js";import{s as m}from"../chunks/4TuV_psf.js";import{P as Gt}from"../chunks/SvdgnirT.js";import{D as Vt,a as Wt,b as Xt,c as Yt,d as bt}from"../chunks/B0czyjwj.js";import{P as Zt}from"../chunks/pd_p3yYy.js";var te=p('<div class="state svelte-1nj0iur">加载中…</div>'),ee=p('<div class="state error svelte-1nj0iur"> </div>'),ae=p('<div class="state svelte-1nj0iur">暂无已加载插件。可 <button type="button" class="link-btn svelte-1nj0iur">添加插件</button> 从模板创建,或在 <code>app/plugins/builtin/</code>、<code>.rssany/plugins/</code> 放置 *.rssany.js / *.rssany.ts</div>'),se=p('<div class="state svelte-1nj0iur">无匹配结果</div>'),re=p('<span class="kind-badge svelte-1nj0iur">Source</span>'),le=p('<button type="button" class="cell-btn cell-btn--primary svelte-1nj0iur">登录</button>'),oe=p('<span class="cell-dash svelte-1nj0iur" title="未声明站点登录">—</span>'),ie=p('<button type="button" class="cell-btn cell-btn--secondary svelte-1nj0iur">检查登录</button>'),ne=p('<span class="cell-dash svelte-1nj0iur" title="未声明站点登录">—</span>'),de=p('<tr class="plugin-row svelte-1nj0iur" tabindex="0"><td class="td-name svelte-1nj0iur"><div class="name-cell svelte-1nj0iur"><span class="plugin-id-text svelte-1nj0iur"> </span> <!></div></td><td class="td-pattern svelte-1nj0iur"><span class="pattern-text svelte-1nj0iur"> </span></td><td class="td-login svelte-1nj0iur"><!></td><td class="td-check svelte-1nj0iur"><!></td></tr>'),ce=p('<div class="plugin-table-wrap svelte-1nj0iur"><table class="plugin-table svelte-1nj0iur"><thead class="svelte-1nj0iur"><tr><th class="th-name svelte-1nj0iur" scope="col">插件名</th><th class="th-pattern svelte-1nj0iur" scope="col">匹配规则</th><th class="th-login svelte-1nj0iur" scope="col">登录</th><th class="th-check svelte-1nj0iur" scope="col">检查登录</th></tr></thead><tbody class="svelte-1nj0iur"></tbody></table></div>'),ve=p('<div class="modal-header svelte-1nj0iur"><!> <!></div> <form class="modal-body svelte-1nj0iur"><p class="add-hint svelte-1nj0iur">对于不支持RSS的站点,添加插件可以覆盖特定站点的解析规则</p> <div class="field svelte-1nj0iur"><span class="field-label svelte-1nj0iur">站点匹配规则</span> <input class="field-input svelte-1nj0iur" type="text" name="listUrlPattern" placeholder="例如 https://www.example.com/* 或 https://example.com/list/{segment}" autocomplete="off"/></div> <div class="field svelte-1nj0iur"><span class="field-label svelte-1nj0iur">插件 id</span> <input class="field-input svelte-1nj0iur" type="text" name="pluginId" placeholder="例如 my-site" autocomplete="off"/></div> <div class="modal-footer svelte-1nj0iur"><div class="modal-footer-right svelte-1nj0iur"><!> <button type="submit" class="btn-save svelte-1nj0iur"> </button></div></div></form>',1),ue=p("<!> <!>",1),pe=p('<div class="feed-wrap svelte-1nj0iur"><div class="feed-col svelte-1nj0iur"><div class="plugins-toolbar-block svelte-1nj0iur"><div class="admin-feed-header"><div class="admin-feed-header__left"><h2>插件</h2> <p class="admin-feed-header__desc">管理站点解析插件与登录检查</p></div> <div class="admin-feed-header__actions"><input class="admin-toolbar-input" type="search" placeholder="过滤…" autocomplete="off"/> <button type="button" class="btn-add svelte-1nj0iur" title="添加插件" aria-label="添加插件"><!></button></div></div></div> <div class="plugins-body-scroll svelte-1nj0iur"><!></div></div></div> <!>',1);function Ie(gt,jt){Et(jt,!1);const C=h(),N=h();let $=h([]),z=h(""),V=h(!0),S=h(!1),j=h(""),y=h(""),U=h(!1),F=h("");function dt(){o(j,""),o(y,""),o(S,!0)}function yt(e){o(S,e),e||(o(j,""),o(y,""))}async function wt(e){e.preventDefault();const a=t(j).trim(),i=t(y).trim();if(!a){m("请填写插件 id","error");return}if(!i){m("请填写支持的站点(URL 或匹配规则)","error");return}o(U,!0);try{const n=await G("/api/plugins",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:a,listUrlPattern:i})}),_=await n.text();let r={};try{r=_?JSON.parse(_):{}}catch{r={}}if(!n.ok){m(r.error||_||`HTTP ${n.status}`,"error");return}r.ok&&(m("已创建插件文件","success"),o(S,!1),o(j,""),o(y,""),await ct(),await nt("/plugins/"+encodeURIComponent(a)))}catch(n){m("请求失败: "+(n instanceof Error?n.message:String(n)),"error")}finally{o(U,!1)}}async function ct(){o(V,!0),o(z,"");try{const a=await(await G("/api/plugins")).json();o($,[...a].sort((i,n)=>(n.hasAuth?1:0)-(i.hasAuth?1:0)))}catch(e){o(z,"加载失败: "+(e instanceof Error?e.message:String(e)))}finally{o(V,!1)}}async function Pt(e,a){a.preventDefault(),a.stopPropagation();try{const n=await(await G(`/auth/check?siteId=${encodeURIComponent(e.id)}`)).json();n.ok?m(`${e.id}:${n.authenticated?"✓ 已登录":"✗ 未登录"}`,n.authenticated?"success":"error"):m(n.message||"检查失败","error")}catch(i){m("请求失败: "+(i instanceof Error?i.message:String(i)),"error")}}function vt(e){nt("/plugins/"+encodeURIComponent(e.id))}function kt(e,a){(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),vt(e))}async function $t(e,a){a.preventDefault(),a.stopPropagation();try{const n=await(await G(`/auth/open?siteId=${encodeURIComponent(e.id)}`,{method:"POST"})).json();n.ok?m(n.message||"已打开登录页面","success"):m(n.message||"打开失败","error")}catch(i){m("请求失败: "+(i instanceof Error?i.message:String(i)),"error")}}Tt(()=>{ct(),Mt(qt).url.searchParams.get("openAdd")==="1"&&(o(j,""),o(y,""),o(S,!0),nt("/plugins",{replaceState:!0}))}),ht(()=>t(F),()=>{o(C,t(F).trim().toLowerCase())}),ht(()=>(t(C),t($)),()=>{o(N,t(C)?t($).filter(e=>e.id.toLowerCase().includes(t(C))||e.listUrlPattern.toLowerCase().includes(t(C))):t($))}),Lt(),Qt();var ut=pe();Ht("1nj0iur",e=>{Nt(()=>{zt.title=`插件 - ${Kt}`})});var W=rt(ut),pt=l(W),X=l(pt),ft=l(X),mt=c(l(ft),2),J=l(mt);ot(J),O(J,"spellcheck",!1);var Y=c(J,2),xt=l(Y);Gt(xt,{size:16,"aria-hidden":"true"}),s(Y),s(mt),s(ft),s(X);var _t=c(X,2),Dt=l(_t);{var Ct=e=>{var a=te();u(e,a)},St=e=>{var a=ee(),i=l(a,!0);s(a),lt(()=>Q(i,t(z))),u(e,a)},Ut=e=>{var a=ae(),i=c(l(a));K(5),s(a),D("click",i,dt),u(e,a)},At=e=>{var a=se();u(e,a)},It=e=>{var a=ce(),i=l(a),n=c(l(i));Bt(n,5,()=>t(N),_=>_.id,(_,r)=>{var g=de(),A=l(g),Z=l(A),x=l(Z),I=l(x,!0);s(x);var M=c(x,2);{var tt=d=>{var v=re();u(d,v)};q(M,d=>{t(r),b(()=>t(r).kind==="source")&&d(tt)})}s(Z),s(A);var w=c(A),P=l(w),R=l(P,!0);s(P),s(w);var k=c(w),T=l(k);{var B=d=>{var v=le();D("click",v,at=>$t(t(r),at)),u(d,v)},H=d=>{var v=oe();u(d,v)};q(T,d=>{t(r),b(()=>t(r).hasAuth)?d(B):d(H,-1)})}s(k);var E=c(k),L=l(E);{var et=d=>{var v=ie();D("click",v,at=>Pt(t(r),at)),u(d,v)},f=d=>{var v=ne();u(d,v)};q(L,d=>{t(r),b(()=>t(r).hasAuth)?d(et):d(f,-1)})}s(E),s(g),lt(()=>{O(g,"aria-label",`打开插件 ${t(r),b(()=>t(r).id)??""}`),Q(I,(t(r),b(()=>t(r).id))),O(P,"title",(t(r),b(()=>t(r).listUrlPattern))),Q(R,(t(r),b(()=>t(r).listUrlPattern)))}),D("click",g,()=>vt(t(r))),D("keydown",g,d=>kt(t(r),d)),u(_,g)}),s(n),s(i),s(a),u(e,a)};q(Dt,e=>{t(V)?e(Ct):t(z)?e(St,1):(t($),b(()=>t($).length===0)?e(Ut,2):(t(N),b(()=>t(N).length===0)?e(At,3):e(It,-1)))})}s(_t),s(pt),s(W);var Rt=c(W,2);Vt(Rt,{get open(){return t(S)},onOpenChange:yt,children:(e,a)=>{Zt(e,{children:(i,n)=>{var _=ue(),r=rt(_);Wt(r,{class:"modal-overlay"});var g=c(r,2);Xt(g,{class:"modal","aria-describedby":void 0,children:(A,Z)=>{var x=ve(),I=rt(x),M=l(I);Yt(M,{class:"modal-title",children:(f,d)=>{K();var v=st("添加插件");u(f,v)},$$slots:{default:!0}});var tt=c(M,2);bt(tt,{class:"modal-close","aria-label":"关闭",children:(f,d)=>{K();var v=st("✕");u(f,v)},$$slots:{default:!0}}),s(I);var w=c(I,2),P=c(l(w),2),R=c(l(P),2);ot(R),O(R,"spellcheck",!1),s(P);var k=c(P,2),T=c(l(k),2);ot(T),O(T,"spellcheck",!1),s(k);var B=c(k,2),H=l(B),E=l(H);bt(E,{class:"btn-cancel",get disabled(){return t(U)},type:"button",children:(f,d)=>{K();var v=st("取消");u(f,v)},$$slots:{default:!0}});var L=c(E,2),et=l(L,!0);s(L),s(H),s(B),s(w),lt(()=>{L.disabled=t(U),Q(et,t(U)?"创建中…":"创建并打开编辑")}),Jt("submit",w,wt),it(R,()=>t(y),f=>o(y,f)),it(T,()=>t(j),f=>o(j,f)),u(A,x)},$$slots:{default:!0}}),u(i,_)},$$slots:{default:!0}})},$$slots:{default:!0}}),it(J,()=>t(F),e=>o(F,e)),D("click",Y,dt),u(gt,ut),Ot()}Ft(["click","keydown"]);export{Ie as component};