@sockethub/examples 1.0.0-alpha.22 → 1.0.0-alpha.24

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 (31) hide show
  1. package/build/_app/immutable/chunks/{D1Y6vir5.js → BBWhllcJ.js} +1 -1
  2. package/build/_app/immutable/chunks/{DM-HM6I1.js → C5qpDfpL.js} +1 -1
  3. package/build/_app/immutable/chunks/{D8LSvHGD.js → CluiWps8.js} +1 -1
  4. package/build/_app/immutable/chunks/{BJzWT4a_.js → Cql_8FxA.js} +1 -1
  5. package/build/_app/immutable/chunks/{ClXGuyPN.js → D-BRhX9k.js} +1 -1
  6. package/build/_app/immutable/chunks/DES_NVaV.js +1 -0
  7. package/build/_app/immutable/chunks/{DJkUObd4.js → DtLGjLnP.js} +1 -1
  8. package/build/_app/immutable/entry/{app.DFtHEDt4.js → app._k8f24KG.js} +2 -2
  9. package/build/_app/immutable/entry/start.AL1ku_EU.js +1 -0
  10. package/build/_app/immutable/nodes/{0.m3qGA7pa.js → 0.CIgA3-VU.js} +1 -1
  11. package/build/_app/immutable/nodes/{1.C9WfOSx0.js → 1.C7n4GBxp.js} +1 -1
  12. package/build/_app/immutable/nodes/{2.0BsUoT1J.js → 2.CcUlaCge.js} +1 -1
  13. package/build/_app/immutable/nodes/{3.BQPqD7QE.js → 3.CXZYDGj0.js} +1 -1
  14. package/build/_app/immutable/nodes/{4.BqgBlJlH.js → 4.CPgcqwJB.js} +1 -1
  15. package/build/_app/immutable/nodes/{5.u6f77lcO.js → 5.C5JcmYto.js} +1 -1
  16. package/build/_app/immutable/nodes/{6.CeMQ6TVQ.js → 6.nHKMDGo9.js} +1 -1
  17. package/build/_app/immutable/nodes/{7.IpDR0NHe.js → 7.BdFFHD3t.js} +1 -1
  18. package/build/_app/immutable/nodes/{8.CMc3hKqE.js → 8.Dfm8aOrv.js} +1 -1
  19. package/build/_app/immutable/nodes/{9.X8n5ZkeX.js → 9.CO3JNyJf.js} +1 -1
  20. package/build/_app/version.json +1 -1
  21. package/build/caldav.html +7 -7
  22. package/build/carddav.html +7 -7
  23. package/build/dummy.html +7 -7
  24. package/build/feeds.html +7 -7
  25. package/build/index.html +7 -7
  26. package/build/irc.html +7 -7
  27. package/build/metadata.html +7 -7
  28. package/build/xmpp.html +7 -7
  29. package/package.json +4 -4
  30. package/build/_app/immutable/chunks/CfO10NxU.js +0 -1
  31. package/build/_app/immutable/entry/start.D9VP5-bu.js +0 -1
@@ -1 +1 @@
1
- import{I as L,v as _,J as H,B as P,e as J,K as p,L as K,M as W,N as F,O as j,c as f,g,u as Q,r as u,t as E,f as M,G as z,s as y}from"./CD2k2u89.js";import{d as R,f as b,a as m,c as T,s as C}from"./Dm9HHmcs.js";import{a as U,s as X,c as D}from"./XtX2ckS1.js";import{i as N,a as Y,s as Z}from"./BYPKMD8u.js";import{f as $,L as ee}from"./DJkUObd4.js";import{I as ae}from"./M4yGBGmj.js";function ue(e,s,t=s){var d=new WeakSet;L(e,"input",async l=>{var o=l?e.defaultValue:e.value;if(o=A(e)?B(o):o,t(o),_!==null&&d.add(_),await H(),o!==(o=s())){var a=e.selectionStart,v=e.selectionEnd,n=e.value.length;if(e.value=o??"",v!==null){var r=e.value.length;a===v&&v===n&&r>n?(e.selectionStart=r,e.selectionEnd=r):(e.selectionStart=a,e.selectionEnd=Math.min(v,r))}}}),(P&&e.defaultValue!==e.value||J(s)==null&&e.value)&&(t(A(e)?B(e.value):e.value),_!==null&&d.add(_)),p(()=>{var l=s();if(e===document.activeElement){var o=K??_;if(d.has(o))return}A(e)&&l===B(e.value)||e.type==="date"&&!l&&!e.value||l!==e.value&&(e.value=l??"")})}const S=new Set;function me(e,s,t,d,l=d){var o=t.getAttribute("type")==="checkbox",a=e;let v=!1;if(s!==null)for(var n of s)a=a[n]??(a[n]=[]);a.push(t),L(t,"change",()=>{var r=t.__value;o&&(r=I(a,r,t.checked)),l(r)},()=>l(o?[]:null)),p(()=>{var r=d();if(P&&t.defaultChecked!==t.checked){v=!0;return}o?(r=r||[],t.checked=r.includes(t.__value)):t.checked=W(t.__value,r)}),F(()=>{var r=a.indexOf(t);r!==-1&&a.splice(r,1)}),S.has(a)||(S.add(a),j(()=>{a.sort((r,c)=>r.compareDocumentPosition(c)===4?-1:1),S.delete(a)})),j(()=>{if(v){var r;if(o)r=I(a,r,t.checked);else{var c=a.find(i=>i.checked);r=c==null?void 0:c.__value}l(r)}})}function I(e,s,t){for(var d=new Set,l=0;l<e.length;l+=1)e[l].checked&&d.add(e[l].__value);return t||d.delete(s),Array.from(d)}function A(e){var s=e.type;return s==="number"||s==="range"}function B(e){return e===""?null:+e}var re=b('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75A11.959 11.959 0 0112 2.704z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 15.75h.007v.008H12v-.008z"></path></svg> <span class="text-xs">Not Connected</span></div>'),te=b("<button><!></button>");function _e(e,s){const t=()=>Y($,"$connected",d),[d,l]=Z(),o=Q(()=>t()?!!s.disabled:!0);var a=te();a.__click=function(...c){var i;(i=s.buttonAction)==null||i.apply(this,c)};var v=f(a);{var n=c=>{var i=re();m(c,i)},r=c=>{var i=T(),h=M(i);D(h,()=>s.children??z),m(c,i)};N(v,c=>{!t()&&g(o)?c(n):c(r,!1)})}u(a),E(()=>{U(a,1,`inline-flex items-center justify-center px-6 py-3 text-sm font-semibold border border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed transition-all duration-200 ${g(o)&&!t()?"bg-red-100 text-red-700 border-red-200 hover:bg-red-100":g(o)?"bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100":"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}`),a.disabled=g(o),X(a,"title",t()?"":"Please connect to Sockethub first")}),m(e,a),l()}R(["click"]);var se=b('<p class="text-lg text-gray-600 leading-relaxed"> </p>'),oe=b("<title> </title> <!>",1),le=b('<!> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8"><div class="bg-white shadow-sm border border-gray-200 rounded-xl p-8"><div class="space-y-8"><!></div></div></div> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 mt-8"><!></div>',1);function be(e,s){var t=le(),d=M(t);ae(d,{get title(){return s.title},children:(c,i)=>{var h=oe(),x=M(h),O=f(x,!0);u(x);var V=y(x,2);{var q=k=>{var w=se(),G=f(w,!0);u(w),E(()=>C(G,s.description)),m(k,w)};N(V,k=>{s.description&&k(q)})}E(()=>C(O,s.title)),m(c,h)}});var l=y(d,2),o=f(l),a=f(o),v=f(a);D(v,()=>s.children??z),u(a),u(o),u(l);var n=y(l,2),r=f(n);ee(r,{}),u(n),m(e,t)}export{be as B,_e as S,me as a,ue as b};
1
+ import{I as L,v as _,J as H,B as P,e as J,K as p,L as K,M as W,N as F,O as j,c as f,g,u as Q,r as u,t as E,f as M,G as z,s as y}from"./CD2k2u89.js";import{d as R,f as b,a as m,c as T,s as C}from"./Dm9HHmcs.js";import{a as U,s as X,c as D}from"./XtX2ckS1.js";import{i as N,a as Y,s as Z}from"./BYPKMD8u.js";import{f as $,L as ee}from"./DtLGjLnP.js";import{I as ae}from"./M4yGBGmj.js";function ue(e,s,t=s){var d=new WeakSet;L(e,"input",async l=>{var o=l?e.defaultValue:e.value;if(o=A(e)?B(o):o,t(o),_!==null&&d.add(_),await H(),o!==(o=s())){var a=e.selectionStart,v=e.selectionEnd,n=e.value.length;if(e.value=o??"",v!==null){var r=e.value.length;a===v&&v===n&&r>n?(e.selectionStart=r,e.selectionEnd=r):(e.selectionStart=a,e.selectionEnd=Math.min(v,r))}}}),(P&&e.defaultValue!==e.value||J(s)==null&&e.value)&&(t(A(e)?B(e.value):e.value),_!==null&&d.add(_)),p(()=>{var l=s();if(e===document.activeElement){var o=K??_;if(d.has(o))return}A(e)&&l===B(e.value)||e.type==="date"&&!l&&!e.value||l!==e.value&&(e.value=l??"")})}const S=new Set;function me(e,s,t,d,l=d){var o=t.getAttribute("type")==="checkbox",a=e;let v=!1;if(s!==null)for(var n of s)a=a[n]??(a[n]=[]);a.push(t),L(t,"change",()=>{var r=t.__value;o&&(r=I(a,r,t.checked)),l(r)},()=>l(o?[]:null)),p(()=>{var r=d();if(P&&t.defaultChecked!==t.checked){v=!0;return}o?(r=r||[],t.checked=r.includes(t.__value)):t.checked=W(t.__value,r)}),F(()=>{var r=a.indexOf(t);r!==-1&&a.splice(r,1)}),S.has(a)||(S.add(a),j(()=>{a.sort((r,c)=>r.compareDocumentPosition(c)===4?-1:1),S.delete(a)})),j(()=>{if(v){var r;if(o)r=I(a,r,t.checked);else{var c=a.find(i=>i.checked);r=c==null?void 0:c.__value}l(r)}})}function I(e,s,t){for(var d=new Set,l=0;l<e.length;l+=1)e[l].checked&&d.add(e[l].__value);return t||d.delete(s),Array.from(d)}function A(e){var s=e.type;return s==="number"||s==="range"}function B(e){return e===""?null:+e}var re=b('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m0-10.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.75c0 5.592 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.57-.598-3.75A11.959 11.959 0 0112 2.704z"></path><path stroke-linecap="round" stroke-linejoin="round" d="M12 15.75h.007v.008H12v-.008z"></path></svg> <span class="text-xs">Not Connected</span></div>'),te=b("<button><!></button>");function _e(e,s){const t=()=>Y($,"$connected",d),[d,l]=Z(),o=Q(()=>t()?!!s.disabled:!0);var a=te();a.__click=function(...c){var i;(i=s.buttonAction)==null||i.apply(this,c)};var v=f(a);{var n=c=>{var i=re();m(c,i)},r=c=>{var i=T(),h=M(i);D(h,()=>s.children??z),m(c,i)};N(v,c=>{!t()&&g(o)?c(n):c(r,!1)})}u(a),E(()=>{U(a,1,`inline-flex items-center justify-center px-6 py-3 text-sm font-semibold border border-transparent rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed transition-all duration-200 ${g(o)&&!t()?"bg-red-100 text-red-700 border-red-200 hover:bg-red-100":g(o)?"bg-gray-100 text-gray-500 border-gray-200 hover:bg-gray-100":"text-white bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}`),a.disabled=g(o),X(a,"title",t()?"":"Please connect to Sockethub first")}),m(e,a),l()}R(["click"]);var se=b('<p class="text-lg text-gray-600 leading-relaxed"> </p>'),oe=b("<title> </title> <!>",1),le=b('<!> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 space-y-8"><div class="bg-white shadow-sm border border-gray-200 rounded-xl p-8"><div class="space-y-8"><!></div></div></div> <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 mt-8"><!></div>',1);function be(e,s){var t=le(),d=M(t);ae(d,{get title(){return s.title},children:(c,i)=>{var h=oe(),x=M(h),O=f(x,!0);u(x);var V=y(x,2);{var q=k=>{var w=se(),G=f(w,!0);u(w),E(()=>C(G,s.description)),m(k,w)};N(V,k=>{s.description&&k(q)})}E(()=>C(O,s.title)),m(c,h)}});var l=y(d,2),o=f(l),a=f(o),v=f(a);D(v,()=>s.children??z),u(a),u(o),u(l);var n=y(l,2),r=f(n);ee(r,{}),u(n),m(e,t)}export{be as B,_e as S,me as a,ue as b};
@@ -1,4 +1,4 @@
1
- import{f as k,a as g,t as z,s as D}from"./Dm9HHmcs.js";import{p as O,H as F,t as w,a as T,k as p,b as m,d as J,f as B,c as x,r as h,s as v,g as r,n as G,u as K,e as i}from"./CD2k2u89.js";import{p as C,i as M,a as Q,c as _,s as R}from"./BYPKMD8u.js";import{s as y,r as U}from"./XtX2ckS1.js";import{b as E,S as V}from"./D1Y6vir5.js";var W=k(`<textarea class="form-control block w-full px-3 py-1.5 text-base font-normal
1
+ import{f as k,a as g,t as z,s as D}from"./Dm9HHmcs.js";import{p as O,H as F,t as w,a as T,k as p,b as m,d as J,f as B,c as x,r as h,s as v,g as r,n as G,u as K,e as i}from"./CD2k2u89.js";import{p as C,i as M,a as Q,c as _,s as R}from"./BYPKMD8u.js";import{s as y,r as U}from"./XtX2ckS1.js";import{b as E,S as V}from"./BBWhllcJ.js";var W=k(`<textarea class="form-control block w-full px-3 py-1.5 text-base font-normal
2
2
  text-gray-700 bg-white bg-clip-padding border border-solid
3
3
  border-gray-300 rounded transition ease-in-out m-0 focus:text-gray-700
4
4
  focus:bg-white focus:border-blue-600 focus:outline-none" rows="5"></textarea>`);function X(l,t){O(t,!0);let e=C(t,"data",15);var o=W();F(o),w(()=>y(o,"id",`json-object-${t.title??""}`)),E(o,e),g(l,o),T()}var Y=k('<div class="w-full p-2"><label class="inline-block text-gray-900 font-bold w-32">Password</label> <input type="password" class="border-4"/></div>'),Z=k('<div class="w-full"><label class="form-label inline-block text-gray-900 font-bold mb-2"> </label> <!></div> <!> <div class="w-full text-right"><!></div>',1);function $(l,t){O(t,!0);let e=C(t,"buttonText",3,"Send"),o=J(""),S=K(()=>`secret-input-${t.title.toLowerCase().replace(/\s+/g,"-")}`),s=J("");p(()=>{m(o,typeof t.obj.password=="string"?t.obj.password:"",!0)}),p(()=>{const a={...t.obj};delete a.password,m(s,JSON.stringify(a,null,3),!0)});async function j(){let a;try{a=JSON.parse(r(s))}catch(n){const d=n instanceof Error?n.message:String(n);throw new Error(`Invalid JSON: ${d}`)}r(o).length>0&&(a.password=r(o)),t.submitData(JSON.stringify(a))}var u=Z(),f=B(u),c=x(f),b=x(c,!0);h(c);var P=v(c,2);X(P,{get title(){return t.title},get data(){return r(s)},set data(a){m(s,a,!0)}}),h(f);var I=v(f,2);{var H=a=>{var n=Y(),d=x(n),A=v(d,2);U(A),h(n),w(()=>{y(d,"for",r(S)),y(A,"id",r(S))}),E(A,()=>r(o),q=>m(o,q)),g(a,n)};M(I,a=>{typeof t.obj.password=="string"&&a(H)})}var N=v(I,2),L=x(N);V(L,{get disabled(){return t.disabled},buttonAction:j,children:(a,n)=>{G();var d=z();w(()=>D(d,e())),g(a,d)}}),h(N),w(()=>{y(c,"for",`json-object-${t.title??""}`),D(b,t.title)}),g(l,u),T()}var tt=k('<p class="text-sm text-gray-600 mb-2">Define the <code>actor</code> object for credentials and message events. Include <code>id</code>, <code>type</code>, and <code>name</code> on every outbound message.</p> <!>',1);function nt(l,t){O(t,!0);const e=()=>Q(t.sockethubState,"$sockethubState",o),[o,S]=R();let s=J(void 0);p(()=>{e().actorSet&&r(s)&&t.actor.id!==r(s)&&(_(t.sockethubState,i(e).actorSet=!1,i(e)),"credentialsSet"in e()&&_(t.sockethubState,i(e).credentialsSet=!1,i(e)),"connected"in e()&&_(t.sockethubState,i(e).connected=!1,i(e)),"joined"in e()&&_(t.sockethubState,i(e).joined=!1,i(e)))});function j(c){const b=JSON.parse(c);console.log("actor confirmed for this app session:",b),t.sockethubState.set({actorSet:!0,credentialsSet:!1,connected:!1,joined:!1}),m(s,typeof b.id=="string"?b.id:void 0,!0)}var u=tt(),f=v(B(u),2);$(f,{title:"Actor",get obj(){return t.actor},buttonText:"Confirm actor",submitData:j,get disabled(){return e().actorSet}}),g(l,u),T(),S()}export{nt as A,$ as T};
@@ -1 +1 @@
1
- import{d as v,f as _,s as y,a as g}from"./Dm9HHmcs.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./CD2k2u89.js";import{r as I,s as l,a as k}from"./XtX2ckS1.js";import{b as C}from"./D1Y6vir5.js";import{p as r}from"./BYPKMD8u.js";var j=_('<div class="w-full space-y-2"><label class="block text-sm font-semibold text-gray-700"> </label> <input/></div>');function E(n,e){h(e,!0);let c=r(e,"type",3,"text"),f=r(e,"placeholder",3,""),o=r(e,"value",15),m=r(e,"class",3,"");var s=j(),t=u(s),p=u(t,!0);d(t);var a=x(t,2);I(a),a.__input=function(...b){var i;(i=e.onInput?()=>e.onInput(o()):void 0)==null||i.apply(this,b)},d(s),w(()=>{l(t,"for",e.id),y(p,e.label),l(a,"id",e.id),l(a,"type",c()),l(a,"placeholder",f()),k(a,1,`w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 text-gray-900 placeholder-gray-500 ${m()??""}`)}),C(a,o),g(n,s),F()}v(["input"]);export{E as F};
1
+ import{d as v,f as _,s as y,a as g}from"./Dm9HHmcs.js";import{p as h,c as u,r as d,s as x,t as w,a as F}from"./CD2k2u89.js";import{r as I,s as l,a as k}from"./XtX2ckS1.js";import{b as C}from"./BBWhllcJ.js";import{p as r}from"./BYPKMD8u.js";var j=_('<div class="w-full space-y-2"><label class="block text-sm font-semibold text-gray-700"> </label> <input/></div>');function E(n,e){h(e,!0);let c=r(e,"type",3,"text"),f=r(e,"placeholder",3,""),o=r(e,"value",15),m=r(e,"class",3,"");var s=j(),t=u(s),p=u(t,!0);d(t);var a=x(t,2);I(a),a.__input=function(...b){var i;(i=e.onInput?()=>e.onInput(o()):void 0)==null||i.apply(this,b)},d(s),w(()=>{l(t,"for",e.id),y(p,e.label),l(a,"id",e.id),l(a,"type",c()),l(a,"placeholder",f()),k(a,1,`w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 text-gray-900 placeholder-gray-500 ${m()??""}`)}),C(a,o),g(n,s),F()}v(["input"]);export{E as F};
@@ -1 +1 @@
1
- var Ht=t=>{throw TypeError(t)};var Ue=(t,e,n)=>e.has(t)||Ht("Cannot "+n);var w=(t,e,n)=>(Ue(t,e,"read from private field"),n?n.call(t):e.get(t)),L=(t,e,n)=>e.has(t)?Ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{d as T,g as I,b as O,J as ht,bf as Te}from"./CD2k2u89.js";import{w as $t,o as Xt}from"./C7RIZnpe.js";import{a as Ie,b as U}from"./CfO10NxU.js";class jt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Nt{constructor(e,n){this.status=e,this.location=n}}class Dt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}new URL("sveltekit-internal://");function Oe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Pe(t){return t.split("%25").map(decodeURI).join("%25")}function Ce(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function xt({href:t}){return t.split("#")[0]}function $e(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function je(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}const Ne=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Vt(t)),Ne(t,e));const Y=new Map;function De(t,e){const n=Vt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&Y.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=je(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Ve(t,e,n){if(Y.size>0){const r=Vt(t,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(e,n)}function Vt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${$e(...a)}"]`}return r}const qe=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Be(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Me(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return At(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return At(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=qe.exec(c),[,u,y,f,h]=d;return e.push({name:f,matcher:h,optional:!!u,rest:!!y,chained:y?l===1&&o[0]==="":!1}),y?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return At(c)}).join("")}).join("")}/?$`),params:e}}function Ke(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Me(t){return t.slice(1).split("/").filter(Ke)}function Fe(t,e,n){const r={},a=t.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<e.length;i+=1){const c=e[i];let l=a[i-o];if(c.chained&&c.rest&&o&&(l=a.slice(i-o,i+1).filter(d=>d).join("/"),o=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&c.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return r}function At(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ge({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[c,l,d]])=>{const{pattern:u,params:y}=Be(i),f={id:i,exec:h=>{const _=u.exec(h);if(_)return Fe(_,y,r)},errors:[1,...d||[]].map(h=>t[h]),layouts:[0,...l||[]].map(o),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function o(i){return i===void 0?i:[a.has(i),t[i]]}}function ce(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const We="1787315755178",le="sveltekit:snapshot",fe="sveltekit:scroll",ue="sveltekit:states",Ye="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},qt=location.origin;function de(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function kt(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Zt={...D,"":D.hover};function he(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function pe(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=he(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||St(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===qt&&t.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function pt(t){let e=null,n=null,r=null,a=null,s=null,o=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=M(i,"preload-code")),a===null&&(a=M(i,"preload-data")),e===null&&(e=M(i,"keepfocus")),n===null&&(n=M(i,"noscroll")),s===null&&(s=M(i,"reload")),o===null&&(o=M(i,"replacestate")),i=he(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Zt[r??"off"],preload_data:Zt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(o)}}function te(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(o=>o)}function a(o){n=!1,e.set(o)}function s(o){let i;return e.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:r,set:a,subscribe:s}}const ge={v:()=>{}};function Je(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==We;return o&&(t(!0),ge.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function St(t,e,n){return t.origin!==qt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Rn(t){}const me=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...me];const ze=new Set([...me]);[...ze];function He(t){return t.filter(e=>e!=null)}function Bt(t){return t instanceof jt||t instanceof Dt?t.status:500}function Xe(t){return t instanceof Dt?t.text:"Internal Error"}let R,H,Lt;const Qe=Xt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Xt.toString());var et,nt,at,rt,ot,st,it,ct,oe,lt,se,ft,ie;Qe?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},Lt={current:!1}):(R=new(oe=class{constructor(){L(this,et,T({}));L(this,nt,T(null));L(this,at,T(null));L(this,rt,T({}));L(this,ot,T({id:null}));L(this,st,T({}));L(this,it,T(-1));L(this,ct,T(new URL("https://example.com")))}get data(){return I(w(this,et))}set data(e){O(w(this,et),e)}get form(){return I(w(this,nt))}set form(e){O(w(this,nt),e)}get error(){return I(w(this,at))}set error(e){O(w(this,at),e)}get params(){return I(w(this,rt))}set params(e){O(w(this,rt),e)}get route(){return I(w(this,ot))}set route(e){O(w(this,ot),e)}get state(){return I(w(this,st))}set state(e){O(w(this,st),e)}get status(){return I(w(this,it))}set status(e){O(w(this,it),e)}get url(){return I(w(this,ct))}set url(e){O(w(this,ct),e)}},et=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,oe),H=new(se=class{constructor(){L(this,lt,T(null))}get current(){return I(w(this,lt))}set current(e){O(w(this,lt),e)}},lt=new WeakMap,se),Lt=new(ie=class{constructor(){L(this,ft,T(!1))}get current(){return I(w(this,ft))}set current(e){O(w(this,ft),e)}},ft=new WeakMap,ie),ge.v=()=>Lt.current=!0);function Ze(t){Object.assign(R,t)}const tn=new Set(["icon","shortcut icon","apple-touch-icon"]),q=ce(fe)??{},X=ce(le)??{},N={url:te({}),page:te({}),navigating:$t(null),updated:Je()};function Kt(t){q[t]=kt()}function en(t,e){let n=t+1;for(;q[n];)delete q[n],n+=1;for(n=e+1;X[n];)delete X[n],n+=1}function Q(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ee(){}let Mt,It,gt,C,Ot,b;const mt=[],_t=[];let v=null;function Pt(){var t;(t=v==null?void 0:v.fork)==null||t.then(e=>e==null?void 0:e.discard()),v=null}const dt=new Map,we=new Set,nn=new Set,J=new Set;let m={branch:[],error:null,url:null},ve=!1,wt=!1,ne=!0,Z=!1,W=!1,ye=!1,Ft=!1,be,S,A,V;const vt=new Set,ae=new Map;async function Un(t,e,n){var s,o,i,c,l;(s=globalThis.__sveltekit_1b31kb6)!=null&&s.data&&globalThis.__sveltekit_1b31kb6.data,document.URL!==location.href&&(location.href=location.href),b=t,await((i=(o=t.hooks).init)==null?void 0:i.call(o)),Mt=Ge(t),C=document.documentElement,Ot=e,It=t.nodes[0],gt=t.nodes[1],It(),gt(),S=(c=history.state)==null?void 0:c[F],A=(l=history.state)==null?void 0:l[z],S||(S=A=Date.now(),history.replaceState({...history.state,[F]:S,[z]:A},""));const r=q[S];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await _n(Ot,n)):(await G({type:"enter",url:de(b.hash?yn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function an(){mt.length=0,Ft=!1}function ke(t){_t.some(e=>e==null?void 0:e.snapshot)&&(X[t]=_t.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=X[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=_t[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function re(){Kt(S),Qt(fe,q),ke(A),Qt(le,X)}async function rn(t,e,n,r){let a;e.invalidateAll&&Pt(),await G({type:"goto",url:de(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Ft=!0,a=[...ae.keys()]),e.invalidate&&e.invalidate.forEach(gn)}}),e.invalidateAll&&ht().then(ht).then(()=>{ae.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function on(t){if(t.id!==(v==null?void 0:v.id)){Pt();const e={};vt.add(e),v={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(vt.delete(e),n.type==="loaded"&&n.state.error&&Pt(),n)),fork:null}}return v.promise}async function Ut(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}async function Ee(t,e,n){var a;m=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),be=new b.root({target:e,props:{...t.props,stores:N,components:_t},hydrate:n,sync:!1}),await Promise.resolve(),Se(A),n){const s={from:null,to:{params:m.params,route:{id:((a=m.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(s))}wt=!0}function yt({url:t,params:e,branch:n,status:r,error:a,route:s,form:o}){let i="never";if(U&&(t.pathname===U||t.pathname===U+"/"))i="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=Oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:He(n).map(f=>f.node.component),page:zt(R)}};o!==void 0&&(c.props.form=o);let l={},d=!R,u=0;for(let f=0;f<Math.max(n.length,m.branch.length);f+=1){const h=n[f],_=m.branch[f];(h==null?void 0:h.data)!==(_==null?void 0:_.data)&&(d=!0),h&&(l={...l,...h.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!m.url||t.href!==m.url.href||m.error!==a||o!==void 0&&o!==R.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:d?l:R.data}),c}async function Gt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var l,d;let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:s,universal:(l=c.universal)!=null&&l.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((d=c.universal)==null?void 0:d.trailingSlash)??(s==null?void 0:s.slash)}}function sn(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=wt?Ve(r,a.href,e):De(r,e);return{resolved:a,promise:s}}function cn(t,e,n,r,a,s){if(Ft)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==m.params[o])return!0;for(const o of a.dependencies)if(mt.some(i=>i(new URL(o))))return!0;return!1}function Wt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function ln(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function fn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:zt(R),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((v==null?void 0:v.id)===t)return vt.delete(v.token),v.promise;const{errors:o,layouts:i,leaf:c}=a,l=[...i,c];o.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));const d=m.url?t!==bt(m.url):!1,u=m.route?a.id!==m.route.id:!1,y=ln(m.url,n);let f=!1;const h=l.map(async(g,p)=>{var $;if(!g)return;const k=m.branch[p];return g[1]===(k==null?void 0:k.loader)&&!cn(f,u,d,y,($=k.universal)==null?void 0:$.uses,r)?k:(f=!0,Gt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var ut;const P={};for(let B=0;B<p;B+=1)Object.assign(P,(ut=await h[B])==null?void 0:ut.data);return P},server_data_node:Wt(g[0]?{type:"skip"}:null,g[0]?k==null?void 0:k.server:void 0)}))});for(const g of h)g.catch(()=>{});const _=[];for(let g=0;g<l.length;g+=1)if(l[g])try{_.push(await h[g])}catch(p){if(p instanceof Nt)return{type:"redirect",location:p.location};if(vt.has(s))return fn({error:await tt(p,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Bt(p),x;if(p instanceof jt)x=p.body;else{if(await N.updated.check())return await _e(),await Q(n);x=await tt(p,{params:r,url:n,route:{id:a.id}})}const $=await un(g,_,o);return $?yt({url:n,params:r,branch:_.slice(0,$.idx).concat($.node),status:k,error:x,route:a}):await Ae(n,{id:a.id},x,k)}else _.push(void 0);return yt({url:n,params:r,branch:_,status:200,error:null,route:a,form:e?void 0:null})}async function un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Yt({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const o=await Gt({loader:It,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Wt(s)}),i={node:await gt(),loader:gt,universal:null,server:null,data:null};return yt({url:n,params:a,branch:[o,i],status:t,error:e,route:null})}catch(o){if(o instanceof Nt)return rn(new URL(o.location,location.href),{},0);throw o}}async function dn(t){const e=t.href;if(dt.has(e))return dt.get(e);let n;try{const r=(async()=>{let a=await b.hooks.reroute({url:new URL(t),fetch:async(s,o)=>sn(s,o,t).promise})??t;if(typeof a=="string"){const s=new URL(t);b.hash?s.hash=a:s.pathname=a,a=s}return a})();dt.set(e,r),n=await r}catch{dt.delete(e);return}return n}async function Et(t,e){if(t&&!St(t,U,b.hash)){const n=await dn(t);if(!n)return;const r=hn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ce(s),url:t}}}}function hn(t){return Pe(b.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function bt(t){return(b.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function xe({url:t,type:e,intent:n,delta:r,event:a}){let s=!1;const o=Jt(m,n,t,e);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Z||we.forEach(c=>c(i)),s?null:o}async function G({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=ee,block:d=ee,event:u}){var B;const y=V;V=c;const f=await Et(e,!1),h=t==="enter"?Jt(m,f,e,t):xe({url:e,type:t,delta:n==null?void 0:n.delta,intent:f,event:u});if(!h){d(),V===c&&(V=y);return}const _=S,g=A;l(),Z=!0,wt&&h.navigation.type!=="enter"&&N.navigating.set(H.current=h.navigation);let p=f&&await Re(f);if(!p){if(St(e,U,b.hash))return await Q(e,s);p=await Ae(e,{id:null},await tt(new Dt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(f==null?void 0:f.url)||e,V!==c)return h.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await G({type:t,url:new URL(p.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),h.fulfil(void 0);return}p=await Yt({status:500,error:await tt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else p.props.page.status>=400&&await N.updated.check()&&(await _e(),await Q(e,s));if(an(),Kt(_),ke(g),p.props.page.url.pathname!==e.pathname&&(e.pathname=p.props.page.url.pathname),o=n?n.state:o,!n){const E=s?0:1,K={[F]:S+=E,[z]:A+=E,[ue]:o};(s?history.replaceState:history.pushState).call(history,K,"",e),s||en(S,A)}const k=f&&(v==null?void 0:v.id)===f.id?v.fork:null;v=null,p.props.page.state=o;let x;if(wt){const E=(await Promise.all(Array.from(nn,j=>j(h.navigation)))).filter(j=>typeof j=="function");if(E.length>0){let j=function(){E.forEach(Rt=>{J.delete(Rt)})};E.push(j),E.forEach(Rt=>{J.add(Rt)})}m=p.state,p.props.page&&(p.props.page.url=e);const K=k&&await k;K?x=K.commit():(be.$set(p.props),Ze(p.props.page),x=(B=Te)==null?void 0:B()),ye=!0}else await Ee(p,Ot,!1);const{activeElement:$}=document;await x,await ht(),await ht();let P=n?n.scroll:a?kt():null;if(ne){const E=e.hash&&document.getElementById(Le(e));if(P)scrollTo(P.x,P.y);else if(E){E.scrollIntoView();const{top:K,left:j}=E.getBoundingClientRect();P={x:pageXOffset+j,y:pageYOffset+K}}else scrollTo(0,0)}const ut=document.activeElement!==$&&document.activeElement!==document.body;!r&&!ut&&vn(e,P),ne=!0,p.props.page&&Object.assign(R,p.props.page),Z=!1,t==="popstate"&&Se(A),h.fulfil(void 0),J.forEach(E=>E(h.navigation)),N.navigating.set(H.current=null)}async function Ae(t,e,n,r,a){return t.origin===qt&&t.pathname===location.pathname&&!ve?await Yt({status:r,error:n,url:t,route:e}):await Q(t,a)}function pn(){let t,e,n;C.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{s(c,D.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],D.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(Ut(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(i,c){const l=pe(i,C),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:y,download:f}=Tt(l,U,b.hash);if(y||f)return;const h=pt(l),_=u&&bt(m.url)===bt(u);if(!(h.reload||_))if(c<=h.preload_data){e=l,n=D.tap;const g=await Et(u,!1);if(!g)return;on(g)}else c<=h.preload_code&&(e=l,n=c,Ut(u))}function o(){a.disconnect();for(const i of C.querySelectorAll("a")){const{url:c,external:l,download:d}=Tt(i,U,b.hash);if(l||d)continue;const u=pt(i);u.reload||(u.preload_code===D.viewport&&a.observe(i),u.preload_code===D.eager&&Ut(c))}}J.add(o),o()}function tt(t,e){if(t instanceof jt)return t.body;const n=Bt(t),r=Xe(t);return b.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function gn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function mn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(re(),!Z){const a=Jt(m,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};we.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&re()}),(e=navigator.connection)!=null&&e.saveData||pn(),C.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pe(n.composedPath()[0],C);if(!r)return;const{url:a,external:s,target:o,download:i}=Tt(r,U,b.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(b.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===xt(location);if(s||c.reload&&(!y||!u)){xe({url:a,type:"link",event:n})?Z=!0:n.preventDefault();return}if(u!==void 0&&y){const[,f]=m.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=r.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(W=!0,Kt(S),t(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await G({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),C.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(St(i,U,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);i.search=new URLSearchParams(d).toString(),G({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ct){if((r=n.state)!=null&&r[F]){const a=n.state[F];if(V={},a===S)return;const s=q[a],o=n.state[ue]??{},i=new URL(n.state[Ye]??location.href),c=n.state[z],l=m.url?xt(location)===xt(m.url):!1;if(c===A&&(ye||l)){o!==R.state&&(R.state=o),t(i),q[S]=kt(),s&&scrollTo(s.x,s.y),S=a;return}const u=a-S;await G({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{S=a,A=c},block:()=>{history.go(-u)},nav_token:V,event:n})}else if(!W){const a=new URL(location.href);t(a),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[F]:++S,[z]:A},"",location.href))});for(const n of document.querySelectorAll("link"))tn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&N.navigating.set(H.current=null)});function t(n){m.url=R.url=n,N.page.set(zt(R)),N.page.notify()}}async function _n(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:c}){ve=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,y=!0;try{const f=r.map(async(_,g)=>{const p=i[g];return p!=null&&p.uses&&(p.uses=wn(p.uses)),Gt({loader:b.nodes[_],url:l,params:a,route:s,parent:async()=>{const k={};for(let x=0;x<g;x+=1)Object.assign(k,(await f[x]).data);return k},server_data_node:Wt(p)})}),h=await Promise.all(f);if(d){const _=d.layouts;for(let g=0;g<_.length;g++)_[g]||h.splice(g,0,void 0)}u=yt({url:l,params:a,branch:h,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Nt){await Q(new URL(f.location,location.href));return}u=await Yt({status:Bt(f),error:await tt(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",y=!1}u.props.page&&(u.props.page.state={}),await Ee(u,t,y)}function wn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Ct=!1;function vn(t,e=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Le(t);if(r&&document.getElementById(r)){const{x:s,y:o}=e??kt();setTimeout(()=>{const i=history.state;Ct=!0,location.replace(`#${r}`),b.hash&&location.replace(t.hash),history.replaceState(i,"",t.hash),scrollTo(s,o),Ct=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],c=a.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Jt(t,e,n,r){var c,l;let a,s;const o=new Promise((d,u)=>{a=d,s=u});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:o},fulfil:a,reject:s}}function zt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function yn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Le(t){let e;if(b.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Un as a,Rn as l,R as p,N as s};
1
+ var Ht=t=>{throw TypeError(t)};var Ue=(t,e,n)=>e.has(t)||Ht("Cannot "+n);var w=(t,e,n)=>(Ue(t,e,"read from private field"),n?n.call(t):e.get(t)),L=(t,e,n)=>e.has(t)?Ht("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{d as T,g as I,b as O,J as ht,bf as Te}from"./CD2k2u89.js";import{w as $t,o as Xt}from"./C7RIZnpe.js";import{a as Ie,b as U}from"./DES_NVaV.js";class jt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Nt{constructor(e,n){this.status=e,this.location=n}}class Dt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}new URL("sveltekit-internal://");function Oe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function Pe(t){return t.split("%25").map(decodeURI).join("%25")}function Ce(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function xt({href:t}){return t.split("#")[0]}function $e(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;new TextDecoder;function je(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}const Ne=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Vt(t)),Ne(t,e));const Y=new Map;function De(t,e){const n=Vt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&Y.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=je(a)),Promise.resolve(new Response(a,s))}return window.fetch(t,e)}function Ve(t,e,n){if(Y.size>0){const r=Vt(t,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(e,n)}function Vt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${$e(...a)}"]`}return r}const qe=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Be(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Me(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return At(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return At(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const d=qe.exec(c),[,u,y,f,h]=d;return e.push({name:f,matcher:h,optional:!!u,rest:!!y,chained:y?l===1&&o[0]==="":!1}),y?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return At(c)}).join("")}).join("")}/?$`),params:e}}function Ke(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Me(t){return t.slice(1).split("/").filter(Ke)}function Fe(t,e,n){const r={},a=t.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<e.length;i+=1){const c=e[i];let l=a[i-o];if(c.chained&&c.rest&&o&&(l=a.slice(i-o,i+1).filter(d=>d).join("/"),o=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const d=e[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&c.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(c.optional&&c.chained){o++;continue}return}if(!o)return r}function At(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ge({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[c,l,d]])=>{const{pattern:u,params:y}=Be(i),f={id:i,exec:h=>{const _=u.exec(h);if(_)return Fe(_,y,r)},errors:[1,...d||[]].map(h=>t[h]),layouts:[0,...l||[]].map(o),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function o(i){return i===void 0?i:[a.has(i),t[i]]}}function ce(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function Qt(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}const We="1788360958216",le="sveltekit:snapshot",fe="sveltekit:scroll",ue="sveltekit:states",Ye="sveltekit:pageurl",F="sveltekit:history",z="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},qt=location.origin;function de(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function kt(){return{x:pageXOffset,y:pageYOffset}}function M(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const Zt={...D,"":D.hover};function he(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function pe(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=he(t)}}function Tt(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,s=!r||!!a||St(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===qt&&t.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function pt(t){let e=null,n=null,r=null,a=null,s=null,o=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=M(i,"preload-code")),a===null&&(a=M(i,"preload-data")),e===null&&(e=M(i,"keepfocus")),n===null&&(n=M(i,"noscroll")),s===null&&(s=M(i,"reload")),o===null&&(o=M(i,"replacestate")),i=he(i);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Zt[r??"off"],preload_data:Zt[a??"off"],keepfocus:c(e),noscroll:c(n),reload:c(s),replace_state:c(o)}}function te(t){const e=$t(t);let n=!0;function r(){n=!0,e.update(o=>o)}function a(o){n=!1,e.set(o)}function s(o){let i;return e.subscribe(c=>{(i===void 0||n&&c!==i)&&o(i=c)})}return{notify:r,set:a,subscribe:s}}const ge={v:()=>{}};function Je(){const{set:t,subscribe:e}=$t(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Ie}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==We;return o&&(t(!0),ge.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:e,check:r}}function St(t,e,n){return t.origin!==qt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Rn(t){}const me=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...me];const ze=new Set([...me]);[...ze];function He(t){return t.filter(e=>e!=null)}function Bt(t){return t instanceof jt||t instanceof Dt?t.status:500}function Xe(t){return t instanceof Dt?t.text:"Internal Error"}let R,H,Lt;const Qe=Xt.toString().includes("$$")||/function \w+\(\) \{\}/.test(Xt.toString());var et,nt,at,rt,ot,st,it,ct,oe,lt,se,ft,ie;Qe?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},H={current:null},Lt={current:!1}):(R=new(oe=class{constructor(){L(this,et,T({}));L(this,nt,T(null));L(this,at,T(null));L(this,rt,T({}));L(this,ot,T({id:null}));L(this,st,T({}));L(this,it,T(-1));L(this,ct,T(new URL("https://example.com")))}get data(){return I(w(this,et))}set data(e){O(w(this,et),e)}get form(){return I(w(this,nt))}set form(e){O(w(this,nt),e)}get error(){return I(w(this,at))}set error(e){O(w(this,at),e)}get params(){return I(w(this,rt))}set params(e){O(w(this,rt),e)}get route(){return I(w(this,ot))}set route(e){O(w(this,ot),e)}get state(){return I(w(this,st))}set state(e){O(w(this,st),e)}get status(){return I(w(this,it))}set status(e){O(w(this,it),e)}get url(){return I(w(this,ct))}set url(e){O(w(this,ct),e)}},et=new WeakMap,nt=new WeakMap,at=new WeakMap,rt=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,ct=new WeakMap,oe),H=new(se=class{constructor(){L(this,lt,T(null))}get current(){return I(w(this,lt))}set current(e){O(w(this,lt),e)}},lt=new WeakMap,se),Lt=new(ie=class{constructor(){L(this,ft,T(!1))}get current(){return I(w(this,ft))}set current(e){O(w(this,ft),e)}},ft=new WeakMap,ie),ge.v=()=>Lt.current=!0);function Ze(t){Object.assign(R,t)}const tn=new Set(["icon","shortcut icon","apple-touch-icon"]),q=ce(fe)??{},X=ce(le)??{},N={url:te({}),page:te({}),navigating:$t(null),updated:Je()};function Kt(t){q[t]=kt()}function en(t,e){let n=t+1;for(;q[n];)delete q[n],n+=1;for(n=e+1;X[n];)delete X[n],n+=1}function Q(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function _e(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ee(){}let Mt,It,gt,C,Ot,b;const mt=[],_t=[];let v=null;function Pt(){var t;(t=v==null?void 0:v.fork)==null||t.then(e=>e==null?void 0:e.discard()),v=null}const dt=new Map,we=new Set,nn=new Set,J=new Set;let m={branch:[],error:null,url:null},ve=!1,wt=!1,ne=!0,Z=!1,W=!1,ye=!1,Ft=!1,be,S,A,V;const vt=new Set,ae=new Map;async function Un(t,e,n){var s,o,i,c,l;(s=globalThis.__sveltekit_1de5trr)!=null&&s.data&&globalThis.__sveltekit_1de5trr.data,document.URL!==location.href&&(location.href=location.href),b=t,await((i=(o=t.hooks).init)==null?void 0:i.call(o)),Mt=Ge(t),C=document.documentElement,Ot=e,It=t.nodes[0],gt=t.nodes[1],It(),gt(),S=(c=history.state)==null?void 0:c[F],A=(l=history.state)==null?void 0:l[z],S||(S=A=Date.now(),history.replaceState({...history.state,[F]:S,[z]:A},""));const r=q[S];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await _n(Ot,n)):(await G({type:"enter",url:de(b.hash?yn(new URL(location.href)):location.href),replace_state:!0}),a()),mn()}function an(){mt.length=0,Ft=!1}function ke(t){_t.some(e=>e==null?void 0:e.snapshot)&&(X[t]=_t.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Se(t){var e;(e=X[t])==null||e.forEach((n,r)=>{var a,s;(s=(a=_t[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function re(){Kt(S),Qt(fe,q),ke(A),Qt(le,X)}async function rn(t,e,n,r){let a;e.invalidateAll&&Pt(),await G({type:"goto",url:de(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{e.invalidateAll&&(Ft=!0,a=[...ae.keys()]),e.invalidate&&e.invalidate.forEach(gn)}}),e.invalidateAll&&ht().then(ht).then(()=>{ae.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function on(t){if(t.id!==(v==null?void 0:v.id)){Pt();const e={};vt.add(e),v={id:t.id,token:e,promise:Re({...t,preload:e}).then(n=>(vt.delete(e),n.type==="loaded"&&n.state.error&&Pt(),n)),fork:null}}return v.promise}async function Ut(t){var n;const e=(n=await Et(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].map(r=>r==null?void 0:r[1]()))}async function Ee(t,e,n){var a;m=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(R,t.props.page),be=new b.root({target:e,props:{...t.props,stores:N,components:_t},hydrate:n,sync:!1}),await Promise.resolve(),Se(A),n){const s={from:null,to:{params:m.params,route:{id:((a=m.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(s))}wt=!0}function yt({url:t,params:e,branch:n,status:r,error:a,route:s,form:o}){let i="never";if(U&&(t.pathname===U||t.pathname===U+"/"))i="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=Oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:a,route:s},props:{constructors:He(n).map(f=>f.node.component),page:zt(R)}};o!==void 0&&(c.props.form=o);let l={},d=!R,u=0;for(let f=0;f<Math.max(n.length,m.branch.length);f+=1){const h=n[f],_=m.branch[f];(h==null?void 0:h.data)!==(_==null?void 0:_.data)&&(d=!0),h&&(l={...l,...h.data},d&&(c.props[`data_${u}`]=l),u+=1)}return(!m.url||t.href!==m.url.href||m.error!==a||o!==void 0&&o!==R.form||d)&&(c.props.page={error:a,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:d?l:R.data}),c}async function Gt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:s}){var l,d;let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:s,universal:(l=c.universal)!=null&&l.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((d=c.universal)==null?void 0:d.trailingSlash)??(s==null?void 0:s.slash)}}function sn(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=wt?Ve(r,a.href,e):De(r,e);return{resolved:a,promise:s}}function cn(t,e,n,r,a,s){if(Ft)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==m.params[o])return!0;for(const o of a.dependencies)if(mt.some(i=>i(new URL(o))))return!0;return!1}function Wt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function ln(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),s=e.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function fn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:zt(R),constructors:[]}}}async function Re({id:t,invalidating:e,url:n,params:r,route:a,preload:s}){if((v==null?void 0:v.id)===t)return vt.delete(v.token),v.promise;const{errors:o,layouts:i,leaf:c}=a,l=[...i,c];o.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));const d=m.url?t!==bt(m.url):!1,u=m.route?a.id!==m.route.id:!1,y=ln(m.url,n);let f=!1;const h=l.map(async(g,p)=>{var $;if(!g)return;const k=m.branch[p];return g[1]===(k==null?void 0:k.loader)&&!cn(f,u,d,y,($=k.universal)==null?void 0:$.uses,r)?k:(f=!0,Gt({loader:g[1],url:n,params:r,route:a,parent:async()=>{var ut;const P={};for(let B=0;B<p;B+=1)Object.assign(P,(ut=await h[B])==null?void 0:ut.data);return P},server_data_node:Wt(g[0]?{type:"skip"}:null,g[0]?k==null?void 0:k.server:void 0)}))});for(const g of h)g.catch(()=>{});const _=[];for(let g=0;g<l.length;g+=1)if(l[g])try{_.push(await h[g])}catch(p){if(p instanceof Nt)return{type:"redirect",location:p.location};if(vt.has(s))return fn({error:await tt(p,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let k=Bt(p),x;if(p instanceof jt)x=p.body;else{if(await N.updated.check())return await _e(),await Q(n);x=await tt(p,{params:r,url:n,route:{id:a.id}})}const $=await un(g,_,o);return $?yt({url:n,params:r,branch:_.slice(0,$.idx).concat($.node),status:k,error:x,route:a}):await Ae(n,{id:a.id},x,k)}else _.push(void 0);return yt({url:n,params:r,branch:_,status:200,error:null,route:a,form:e?void 0:null})}async function un(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Yt({status:t,error:e,url:n,route:r}){const a={};let s=null;try{const o=await Gt({loader:It,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Wt(s)}),i={node:await gt(),loader:gt,universal:null,server:null,data:null};return yt({url:n,params:a,branch:[o,i],status:t,error:e,route:null})}catch(o){if(o instanceof Nt)return rn(new URL(o.location,location.href),{},0);throw o}}async function dn(t){const e=t.href;if(dt.has(e))return dt.get(e);let n;try{const r=(async()=>{let a=await b.hooks.reroute({url:new URL(t),fetch:async(s,o)=>sn(s,o,t).promise})??t;if(typeof a=="string"){const s=new URL(t);b.hash?s.hash=a:s.pathname=a,a=s}return a})();dt.set(e,r),n=await r}catch{dt.delete(e);return}return n}async function Et(t,e){if(t&&!St(t,U,b.hash)){const n=await dn(t);if(!n)return;const r=hn(n);for(const a of Mt){const s=a.exec(r);if(s)return{id:bt(t),invalidating:e,route:a,params:Ce(s),url:t}}}}function hn(t){return Pe(b.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function bt(t){return(b.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function xe({url:t,type:e,intent:n,delta:r,event:a}){let s=!1;const o=Jt(m,n,t,e);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const i={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Z||we.forEach(c=>c(i)),s?null:o}async function G({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:c={},accept:l=ee,block:d=ee,event:u}){var B;const y=V;V=c;const f=await Et(e,!1),h=t==="enter"?Jt(m,f,e,t):xe({url:e,type:t,delta:n==null?void 0:n.delta,intent:f,event:u});if(!h){d(),V===c&&(V=y);return}const _=S,g=A;l(),Z=!0,wt&&h.navigation.type!=="enter"&&N.navigating.set(H.current=h.navigation);let p=f&&await Re(f);if(!p){if(St(e,U,b.hash))return await Q(e,s);p=await Ae(e,{id:null},await tt(new Dt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(f==null?void 0:f.url)||e,V!==c)return h.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await G({type:t,url:new URL(p.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:c}),h.fulfil(void 0);return}p=await Yt({status:500,error:await tt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else p.props.page.status>=400&&await N.updated.check()&&(await _e(),await Q(e,s));if(an(),Kt(_),ke(g),p.props.page.url.pathname!==e.pathname&&(e.pathname=p.props.page.url.pathname),o=n?n.state:o,!n){const E=s?0:1,K={[F]:S+=E,[z]:A+=E,[ue]:o};(s?history.replaceState:history.pushState).call(history,K,"",e),s||en(S,A)}const k=f&&(v==null?void 0:v.id)===f.id?v.fork:null;v=null,p.props.page.state=o;let x;if(wt){const E=(await Promise.all(Array.from(nn,j=>j(h.navigation)))).filter(j=>typeof j=="function");if(E.length>0){let j=function(){E.forEach(Rt=>{J.delete(Rt)})};E.push(j),E.forEach(Rt=>{J.add(Rt)})}m=p.state,p.props.page&&(p.props.page.url=e);const K=k&&await k;K?x=K.commit():(be.$set(p.props),Ze(p.props.page),x=(B=Te)==null?void 0:B()),ye=!0}else await Ee(p,Ot,!1);const{activeElement:$}=document;await x,await ht(),await ht();let P=n?n.scroll:a?kt():null;if(ne){const E=e.hash&&document.getElementById(Le(e));if(P)scrollTo(P.x,P.y);else if(E){E.scrollIntoView();const{top:K,left:j}=E.getBoundingClientRect();P={x:pageXOffset+j,y:pageYOffset+K}}else scrollTo(0,0)}const ut=document.activeElement!==$&&document.activeElement!==document.body;!r&&!ut&&vn(e,P),ne=!0,p.props.page&&Object.assign(R,p.props.page),Z=!1,t==="popstate"&&Se(A),h.fulfil(void 0),J.forEach(E=>E(h.navigation)),N.navigating.set(H.current=null)}async function Ae(t,e,n,r,a){return t.origin===qt&&t.pathname===location.pathname&&!ve?await Yt({status:r,error:n,url:t,route:e}):await Q(t,a)}function pn(){let t,e,n;C.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{s(c,D.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],D.tap)}C.addEventListener("mousedown",r),C.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(Ut(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(i,c){const l=pe(i,C),d=l===e&&c>=n;if(!l||d)return;const{url:u,external:y,download:f}=Tt(l,U,b.hash);if(y||f)return;const h=pt(l),_=u&&bt(m.url)===bt(u);if(!(h.reload||_))if(c<=h.preload_data){e=l,n=D.tap;const g=await Et(u,!1);if(!g)return;on(g)}else c<=h.preload_code&&(e=l,n=c,Ut(u))}function o(){a.disconnect();for(const i of C.querySelectorAll("a")){const{url:c,external:l,download:d}=Tt(i,U,b.hash);if(l||d)continue;const u=pt(i);u.reload||(u.preload_code===D.viewport&&a.observe(i),u.preload_code===D.eager&&Ut(c))}}J.add(o),o()}function tt(t,e){if(t instanceof jt)return t.body;const n=Bt(t),r=Xe(t);return b.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function gn(t){if(typeof t=="function")mt.push(t);else{const{href:e}=new URL(t,location.href);mt.push(n=>n.href===e)}}function mn(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(re(),!Z){const a=Jt(m,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};we.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&re()}),(e=navigator.connection)!=null&&e.saveData||pn(),C.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pe(n.composedPath()[0],C);if(!r)return;const{url:a,external:s,target:o,download:i}=Tt(r,U,b.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const c=pt(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(b.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=d===xt(location);if(s||c.reload&&(!y||!u)){xe({url:a,type:"link",event:n})?Z=!0:n.preventDefault();return}if(u!==void 0&&y){const[,f]=m.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=r.ownerDocument.getElementById(decodeURIComponent(u));h&&(h.scrollIntoView(),h.focus())}return}if(W=!0,Kt(S),t(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await G({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href,event:n})}),C.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(St(i,U,!1))return;const c=n.target,l=pt(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(c,a);i.search=new URLSearchParams(d).toString(),G({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!Ct){if((r=n.state)!=null&&r[F]){const a=n.state[F];if(V={},a===S)return;const s=q[a],o=n.state[ue]??{},i=new URL(n.state[Ye]??location.href),c=n.state[z],l=m.url?xt(location)===xt(m.url):!1;if(c===A&&(ye||l)){o!==R.state&&(R.state=o),t(i),q[S]=kt(),s&&scrollTo(s.x,s.y),S=a;return}const u=a-S;await G({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{S=a,A=c},block:()=>{history.go(-u)},nav_token:V,event:n})}else if(!W){const a=new URL(location.href);t(a),b.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[F]:++S,[z]:A},"",location.href))});for(const n of document.querySelectorAll("link"))tn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&N.navigating.set(H.current=null)});function t(n){m.url=R.url=n,N.page.set(zt(R)),N.page.notify()}}async function _n(t,{status:e=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:c}){ve=!0;const l=new URL(location.href);let d;({params:a={},route:s={id:null}}=await Et(l,!1)||{}),d=Mt.find(({id:f})=>f===s.id);let u,y=!0;try{const f=r.map(async(_,g)=>{const p=i[g];return p!=null&&p.uses&&(p.uses=wn(p.uses)),Gt({loader:b.nodes[_],url:l,params:a,route:s,parent:async()=>{const k={};for(let x=0;x<g;x+=1)Object.assign(k,(await f[x]).data);return k},server_data_node:Wt(p)})}),h=await Promise.all(f);if(d){const _=d.layouts;for(let g=0;g<_.length;g++)_[g]||h.splice(g,0,void 0)}u=yt({url:l,params:a,branch:h,status:e,error:n,form:c,route:d??null})}catch(f){if(f instanceof Nt){await Q(new URL(f.location,location.href));return}u=await Yt({status:Bt(f),error:await tt(f,{url:l,params:a,route:s}),url:l,route:s}),t.textContent="",y=!1}u.props.page&&(u.props.page.state={}),await Ee(u,t,y)}function wn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Ct=!1;function vn(t,e=null){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Le(t);if(r&&document.getElementById(r)){const{x:s,y:o}=e??kt();setTimeout(()=>{const i=history.state;Ct=!0,location.replace(`#${r}`),b.hash&&location.replace(t.hash),history.replaceState(i,"",t.hash),scrollTo(s,o),Ct=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],c=a.getRangeAt(o);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}a.removeAllRanges()}})}}}function Jt(t,e,n,r){var c,l;let a,s;const o=new Promise((d,u)=>{a=d,s=u});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((l=e==null?void 0:e.route)==null?void 0:l.id)??null},url:n},willUnload:!e,type:r,complete:o},fulfil:a,reject:s}}function zt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function yn(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Le(t){let e;if(b.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Un as a,Rn as l,R as p,N as s};
@@ -1 +1 @@
1
- import{f as c,a as o,c as R,d as te}from"./Dm9HHmcs.js";import{p as L,s as j,c as h,r as p,t as se,a as D,g as r,u as V,e as _,f as J,k as ae,d as H,n as U,b as S}from"./CD2k2u89.js";import{r as X,a as oe,d as re}from"./XtX2ckS1.js";import{b as Y,S as G}from"./D1Y6vir5.js";import{p as I,s as O,c as F,a as q,i as T}from"./BYPKMD8u.js";import{T as ne}from"./DM-HM6I1.js";import{b as ie,a as K,c as Q,d as le,s as W}from"./DJkUObd4.js";var ce=c('<div class="pb-4"><label for="actor-id-input" class="pr-3">Actor ID</label> <input id="actor-id-input" type="text"/></div>');function Ae(w,e){L(e,!0);let t=I(e,"value",15),b=I(e,"class",3,"bg-white border border-solid border-gray-300 rounded");var d=ce(),s=j(h(d),2);X(s),p(d),se(()=>oe(s,1,re(b()))),Y(s,t),o(w,d),D()}function ze(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();async function s(a){await ie();const v={"@context":await Q(e.context),type:"credentials",actor:K(e.actor),object:JSON.parse(a)};return new Promise((x,m)=>{le.socket.emit("credentials",v,u=>{if(u!=null&&u.error){m(new Error(u.error));return}F(e.sockethubState,_(t).credentialsSet=!0,_(t)),x()})})}{let a=V(()=>!t().actorSet||t().credentialsSet||!1);ne(w,{title:"Credentials",get obj(){return e.credentials},buttonText:"Set Credentials",submitData:s,get disabled(){return r(a)}})}D(),d()}var de=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Connecting...</span></div>'),ve=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4 text-green-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Connected</span></div>'),ue=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"></path></svg> <span>Connect</span></div>'),me=c('<div class="w-full flex justify-end"><!></div>');function Be(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=I(e,"disabled",3,!1),a=V(()=>s()||!t().credentialsSet||t().connected||e.connecting);var v=me(),x=h(v);G(x,{get disabled(){return r(a)},buttonAction:async()=>{await e.onConnect()},children:(m,u)=>{var k=R(),y=J(k);{var M=i=>{var C=de();o(i,C)},n=i=>{var C=R(),B=J(C);{var A=g=>{var l=ve();o(g,l)},P=g=>{var l=ue();o(g,l)};T(B,g=>{t().connected?g(A):g(P,!1)},!0)}o(i,C)};T(y,i=>{e.connecting?i(M):i(n,!1)})}o(m,k)}}),p(v),o(w,v),D(),d()}var ge=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Joining...</span></div>'),fe=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Joined</span></div>'),he=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg> <span>Join Room</span></div>'),pe=c('<div class="bg-gradient-to-r from-indigo-50 to-purple-50 border border-indigo-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-indigo-900 mb-4 flex items-center"><span class="mr-2">🏠</span> Join Chat Room</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="room" class="block text-sm font-semibold text-gray-700">Room/Channel</label> <input id="room" class="w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="sockethub@irc.libera.chat, kosmos-random@kosmos.chat"/> <p class="text-gray-500 text-xs">💡 IRC: channel@server (e.g. sockethub@irc.libera.chat); include # in name when sending (e.g. #sockethub) | XMPP: room@server.com</p></div> <div class="flex justify-end"><!></div></div></div>');function Pe(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=I(e,"room",15),a=H(!1),v=H("");ae(()=>{s()!==r(v)&&F(e.sockethubState,_(t).joined=!1,_(t))});async function x(){return S(a,!0),await W({"@context":await Q(e.context),type:"join",actor:K(e.actor),target:{id:s(),name:s(),type:"room"}}).catch(()=>{F(e.sockethubState,_(t).joined=!1,_(t)),S(a,!1)}).then(()=>{S(v,s(),!0),F(e.sockethubState,_(t).joined=!0,_(t)),S(a,!1)})}var m=pe(),u=j(h(m),2),k=h(u),y=j(h(k),2);X(y),U(2),p(k);var M=j(k,2),n=h(M);{let i=V(()=>!t().connected||t().joined||r(a));G(n,{get disabled(){return r(i)},buttonAction:x,children:(C,B)=>{var A=R(),P=J(A);{var g=f=>{var E=ge();o(f,E)},l=f=>{var E=R(),Z=J(E);{var $=z=>{var N=fe();o(z,N)},ee=z=>{var N=he();o(z,N)};T(Z,z=>{t().joined?z($):z(ee,!1)},!0)}o(f,E)};T(P,f=>{r(a)?f(g):f(l,!1)})}o(C,A)}})}p(M),p(u),p(m),Y(y,s),o(w,m),D(),d()}var we=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span class="hidden sm:inline">Sending...</span></div>'),be=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"></path></svg> <span class="hidden sm:inline">Send</span></div>'),xe=c('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-green-900 mb-4 flex items-center"><span class="mr-2">💬</span> Send Message</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="sendMessage" class="block text-sm font-semibold text-gray-700">Your Message</label> <div class="flex space-x-3"><input id="sendMessage" class="flex-1 px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="Type your message here..."/> <!></div> <p class="text-gray-500 text-xs">💡 Press Enter to send quickly</p></div></div></div>');function Re(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=H(""),a=H(!1);async function v(){if(!r(s).trim())return;S(a,!0);const n=r(s).trim();console.log("send message: ",n);try{await W({"@context":await Q(e.context),type:"send",actor:K(e.actor),object:{type:"message",content:n},target:{id:e.room,name:e.room,type:"room"}}),S(s,"")}catch(i){console.error("Failed to send message:",i)}finally{S(a,!1)}}var x=xe(),m=j(h(x),2),u=h(m),k=j(h(u),2),y=h(k);X(y),y.__keydown=n=>{n.key==="Enter"&&!r(a)&&t().connected&&v()};var M=j(y,2);{let n=V(()=>!t().connected||r(a)||!r(s).trim());G(M,{get disabled(){return r(n)},buttonAction:v,children:(i,C)=>{var B=R(),A=J(B);{var P=l=>{var f=we();o(l,f)},g=l=>{var f=be();o(l,f)};T(A,l=>{r(a)?l(P):l(g,!1)})}o(i,B)}})}p(k),U(2),p(u),p(m),p(x),Y(y,()=>r(s),n=>S(s,n)),o(w,x),D(),d()}te(["keydown"]);export{Ae as A,ze as C,Be as P,Pe as R,Re as S};
1
+ import{f as c,a as o,c as R,d as te}from"./Dm9HHmcs.js";import{p as L,s as j,c as h,r as p,t as se,a as D,g as r,u as V,e as _,f as J,k as ae,d as H,n as U,b as S}from"./CD2k2u89.js";import{r as X,a as oe,d as re}from"./XtX2ckS1.js";import{b as Y,S as G}from"./BBWhllcJ.js";import{p as I,s as O,c as F,a as q,i as T}from"./BYPKMD8u.js";import{T as ne}from"./C5qpDfpL.js";import{b as ie,a as K,c as Q,d as le,s as W}from"./DtLGjLnP.js";var ce=c('<div class="pb-4"><label for="actor-id-input" class="pr-3">Actor ID</label> <input id="actor-id-input" type="text"/></div>');function Ae(w,e){L(e,!0);let t=I(e,"value",15),b=I(e,"class",3,"bg-white border border-solid border-gray-300 rounded");var d=ce(),s=j(h(d),2);X(s),p(d),se(()=>oe(s,1,re(b()))),Y(s,t),o(w,d),D()}function ze(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();async function s(a){await ie();const v={"@context":await Q(e.context),type:"credentials",actor:K(e.actor),object:JSON.parse(a)};return new Promise((x,m)=>{le.socket.emit("credentials",v,u=>{if(u!=null&&u.error){m(new Error(u.error));return}F(e.sockethubState,_(t).credentialsSet=!0,_(t)),x()})})}{let a=V(()=>!t().actorSet||t().credentialsSet||!1);ne(w,{title:"Credentials",get obj(){return e.credentials},buttonText:"Set Credentials",submitData:s,get disabled(){return r(a)}})}D(),d()}var de=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Connecting...</span></div>'),ve=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4 text-green-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Connected</span></div>'),ue=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244"></path></svg> <span>Connect</span></div>'),me=c('<div class="w-full flex justify-end"><!></div>');function Be(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=I(e,"disabled",3,!1),a=V(()=>s()||!t().credentialsSet||t().connected||e.connecting);var v=me(),x=h(v);G(x,{get disabled(){return r(a)},buttonAction:async()=>{await e.onConnect()},children:(m,u)=>{var k=R(),y=J(k);{var M=i=>{var C=de();o(i,C)},n=i=>{var C=R(),B=J(C);{var A=g=>{var l=ve();o(g,l)},P=g=>{var l=ue();o(g,l)};T(B,g=>{t().connected?g(A):g(P,!1)},!0)}o(i,C)};T(y,i=>{e.connecting?i(M):i(n,!1)})}o(m,k)}}),p(v),o(w,v),D(),d()}var ge=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span>Joining...</span></div>'),fe=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span>Joined</span></div>'),he=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"></path></svg> <span>Join Room</span></div>'),pe=c('<div class="bg-gradient-to-r from-indigo-50 to-purple-50 border border-indigo-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-indigo-900 mb-4 flex items-center"><span class="mr-2">🏠</span> Join Chat Room</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="room" class="block text-sm font-semibold text-gray-700">Room/Channel</label> <input id="room" class="w-full px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="sockethub@irc.libera.chat, kosmos-random@kosmos.chat"/> <p class="text-gray-500 text-xs">💡 IRC: channel@server (e.g. sockethub@irc.libera.chat); include # in name when sending (e.g. #sockethub) | XMPP: room@server.com</p></div> <div class="flex justify-end"><!></div></div></div>');function Pe(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=I(e,"room",15),a=H(!1),v=H("");ae(()=>{s()!==r(v)&&F(e.sockethubState,_(t).joined=!1,_(t))});async function x(){return S(a,!0),await W({"@context":await Q(e.context),type:"join",actor:K(e.actor),target:{id:s(),name:s(),type:"room"}}).catch(()=>{F(e.sockethubState,_(t).joined=!1,_(t)),S(a,!1)}).then(()=>{S(v,s(),!0),F(e.sockethubState,_(t).joined=!0,_(t)),S(a,!1)})}var m=pe(),u=j(h(m),2),k=h(u),y=j(h(k),2);X(y),U(2),p(k);var M=j(k,2),n=h(M);{let i=V(()=>!t().connected||t().joined||r(a));G(n,{get disabled(){return r(i)},buttonAction:x,children:(C,B)=>{var A=R(),P=J(A);{var g=f=>{var E=ge();o(f,E)},l=f=>{var E=R(),Z=J(E);{var $=z=>{var N=fe();o(z,N)},ee=z=>{var N=he();o(z,N)};T(Z,z=>{t().joined?z($):z(ee,!1)},!0)}o(f,E)};T(P,f=>{r(a)?f(g):f(l,!1)})}o(C,A)}})}p(M),p(u),p(m),Y(y,s),o(w,m),D(),d()}var we=c('<div class="flex items-center space-x-2"><svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="m4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> <span class="hidden sm:inline">Sending...</span></div>'),be=c('<div class="flex items-center space-x-2"><svg class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"></path></svg> <span class="hidden sm:inline">Send</span></div>'),xe=c('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-green-900 mb-4 flex items-center"><span class="mr-2">💬</span> Send Message</h4> <div class="space-y-4"><div class="w-full space-y-2"><label for="sendMessage" class="block text-sm font-semibold text-gray-700">Your Message</label> <div class="flex space-x-3"><input id="sendMessage" class="flex-1 px-4 py-3 border border-gray-300 rounded-lg shadow-sm focus:ring-2 focus:ring-green-500 focus:border-green-500 transition-colors duration-200 text-gray-900 placeholder-gray-500" placeholder="Type your message here..."/> <!></div> <p class="text-gray-500 text-xs">💡 Press Enter to send quickly</p></div></div></div>');function Re(w,e){L(e,!0);const t=()=>q(e.sockethubState,"$sockethubState",b),[b,d]=O();let s=H(""),a=H(!1);async function v(){if(!r(s).trim())return;S(a,!0);const n=r(s).trim();console.log("send message: ",n);try{await W({"@context":await Q(e.context),type:"send",actor:K(e.actor),object:{type:"message",content:n},target:{id:e.room,name:e.room,type:"room"}}),S(s,"")}catch(i){console.error("Failed to send message:",i)}finally{S(a,!1)}}var x=xe(),m=j(h(x),2),u=h(m),k=j(h(u),2),y=h(k);X(y),y.__keydown=n=>{n.key==="Enter"&&!r(a)&&t().connected&&v()};var M=j(y,2);{let n=V(()=>!t().connected||r(a)||!r(s).trim());G(M,{get disabled(){return r(n)},buttonAction:v,children:(i,C)=>{var B=R(),A=J(B);{var P=l=>{var f=we();o(l,f)},g=l=>{var f=be();o(l,f)};T(A,l=>{r(a)?l(P):l(g,!1)})}o(i,B)}})}p(k),U(2),p(u),p(m),p(x),Y(y,()=>r(s),n=>S(s,n)),o(w,x),D(),d()}te(["keydown"]);export{Ae as A,ze as C,Be as P,Pe as R,Re as S};
@@ -0,0 +1 @@
1
+ var s;const t=((s=globalThis.__sveltekit_1de5trr)==null?void 0:s.base)??"";var e;const a=((e=globalThis.__sveltekit_1de5trr)==null?void 0:e.assets)??t??"";export{a,t as b};