@sockethub/examples 1.0.0-beta.2 → 1.0.0-beta.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 (40) hide show
  1. package/build/_app/immutable/chunks/{Cy27bMkS.js → BHzw4I4G.js} +1 -1
  2. package/build/_app/immutable/chunks/{DbhdhNIA.js → BPju5WGe.js} +1 -1
  3. package/build/_app/immutable/chunks/{DmYLKglP.js → Bfx7qmE-.js} +1 -1
  4. package/build/_app/immutable/chunks/{CT5jku5V.js → Bige9f4F.js} +1 -1
  5. package/build/_app/immutable/chunks/{BoJm-rJp.js → BqL0wH9S.js} +1 -1
  6. package/build/_app/immutable/chunks/{Cdx-st7a.js → BqVGmFmc.js} +1 -1
  7. package/build/_app/immutable/chunks/{BbNltU0J.js → CmN_Lgkn.js} +1 -1
  8. package/build/_app/immutable/chunks/D4JoyovE.js +1 -0
  9. package/build/_app/immutable/chunks/{CUkP7wPG.js → DpVTR4Ke.js} +1 -1
  10. package/build/_app/immutable/chunks/{CDWD0DpS.js → peuwRZld.js} +1 -1
  11. package/build/_app/immutable/entry/{app.9VcJfFEV.js → app.CdcIotKP.js} +2 -2
  12. package/build/_app/immutable/entry/start.VoXZusO8.js +1 -0
  13. package/build/_app/immutable/nodes/{0.CxDeLLNM.js → 0.CvrK3N84.js} +1 -1
  14. package/build/_app/immutable/nodes/{1.vrN-G10-.js → 1.BLx3kTa4.js} +1 -1
  15. package/build/_app/immutable/nodes/{10.CkEG6ShK.js → 10.CoN6yO4L.js} +1 -1
  16. package/build/_app/immutable/nodes/{11.Dr5oRP_F.js → 11.vC6KIt-V.js} +1 -1
  17. package/build/_app/immutable/nodes/{12.Dhj1Bcc5.js → 12.ClWnp5sH.js} +1 -1
  18. package/build/_app/immutable/nodes/{2.CtT9BzdB.js → 2.BtsGnuO2.js} +1 -1
  19. package/build/_app/immutable/nodes/{3.DvLQTmd4.js → 3.CbjWQhCK.js} +1 -1
  20. package/build/_app/immutable/nodes/{4.Cy-sRRDt.js → 4.BixPYKg0.js} +1 -1
  21. package/build/_app/immutable/nodes/{5.CC9kaqH_.js → 5.CCO3cm2J.js} +1 -1
  22. package/build/_app/immutable/nodes/{6.ChLUpcIN.js → 6.Cgvwdlyd.js} +1 -1
  23. package/build/_app/immutable/nodes/{7.Dp-S3Ioq.js → 7.Bwm4uyL1.js} +1 -1
  24. package/build/_app/immutable/nodes/{8.f8bTdAen.js → 8.CMrlNz8n.js} +1 -1
  25. package/build/_app/immutable/nodes/{9.BfkSU2iC.js → 9.Dalef57T.js} +1 -1
  26. package/build/_app/version.json +1 -1
  27. package/build/caldav.html +7 -7
  28. package/build/carddav.html +7 -7
  29. package/build/dummy.html +7 -7
  30. package/build/email.html +7 -7
  31. package/build/feeds.html +7 -7
  32. package/build/index.html +7 -7
  33. package/build/instagram.html +7 -7
  34. package/build/irc.html +7 -7
  35. package/build/messenger.html +7 -7
  36. package/build/metadata.html +7 -7
  37. package/build/xmpp.html +7 -7
  38. package/package.json +4 -4
  39. package/build/_app/immutable/chunks/Cl-XOB7Z.js +0 -1
  40. package/build/_app/immutable/entry/start.CjxPNHHO.js +0 -1
@@ -1 +1 @@
1
- import{d as Zt,f as y,t as _e,s as h,a as m,c as er}from"../chunks/BrzeKAzG.js";import{p as tr,s as g,a as ft,b as rr,c as o,f as Ue,d,e as t,g as e,n as he,t as b,u as K,r as i}from"../chunks/k-cRz8DS.js";import{i as w}from"../chunks/Dn5i8FcP.js";import{b as gt,e as Ve,a as ar,c as oe,s as or,d as se,i as sr,f as Oe}from"../chunks/DbhdhNIA.js";import{B as nr,S as ye}from"../chunks/CT5jku5V.js";import{F}from"../chunks/CDWD0DpS.js";var lr=y('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),ir=y('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),dr=y("<option> </option>"),cr=y('<p class="text-sm text-gray-600"> </p>'),vr=y('<label for="carddav-address-book" class="block text-sm font-semibold text-gray-700">Address book</label> <select id="carddav-address-book" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"></select> <!>',1),ur=y('<span class="font-normal text-gray-500"> </span>'),pr=y('<p class="text-sm text-gray-600"> </p>'),mr=y('<p class="text-sm text-gray-600"> </p>'),fr=y('<p class="text-sm text-gray-600"> </p>'),gr=y('<p class="text-sm text-gray-600"> </p>'),_r=y('<p class="text-sm text-gray-600 break-all"> </p>'),hr=y('<p class="text-sm text-gray-600"> </p>'),yr=y('<p class="text-sm text-gray-600 whitespace-pre-wrap"> </p>'),br=y('<li class="flex flex-col gap-3 p-4 md:flex-row md:items-start md:justify-between"><div class="min-w-0 space-y-1"><h3 class="font-semibold text-gray-900"> <!></h3> <!> <!> <!> <!> <!> <!> <!> <p class="truncate text-xs text-gray-400"> </p></div> <div class="flex shrink-0 gap-2"><button type="button" class="rounded-lg border border-gray-300 px-3 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50">Edit</button> <button type="button" class="rounded-lg border border-red-200 px-3 py-2 text-sm font-semibold text-red-700 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50">Delete</button></div></li>'),xr=y('<ul class="divide-y divide-gray-200 rounded-lg border border-gray-200"></ul>'),wr=y('<p class="text-sm text-gray-600">The update sends the full contact back with its stored <code>etag</code>. Fields not shown here are kept as they are.</p>'),$r=y('<button type="button" class="rounded-lg border border-gray-300 px-6 py-3 text-sm font-semibold text-gray-700 hover:bg-gray-50">Cancel</button>'),kr=y('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Cr=y('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),Ar=y(`<div class="bg-teal-50 border-l-4 border-teal-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-teal-800 mb-2">👤 How the CardDAV Platform Works</h3> <p class="text-teal-700 text-sm mb-3">Sockethub talks WebDAV and vCard to your contacts server so your app only has to send ActivityStreams.</p> <div class="text-teal-700 text-sm space-y-1"><div><strong>1. 🔐 Credentials:</strong> Sent once per session over the <code>credentials</code> event, never in an activity</div> <div><strong>2. 📚 fetch:</strong> Discovers the account's address books from the service URL</div> <div><strong>3. 🔍 query:</strong> Lists every contact, or runs a server-side search across name, email, telephone, or organization</div> <div><strong>4. ✏️ create / update / delete:</strong> Each contact carries an <code>etag</code>; updates and deletes are refused with <code>carddav:conflict</code> if another client changed the card first</div></div></div> <section class="space-y-4"><h2 class="text-xl font-semibold text-gray-900">1. Set credentials</h2> <p class="text-sm text-gray-600">Use an app password when your contacts provider supports one. Credentials stay in this Sockethub session.</p> <!> <!> <!> <!> <div class="flex justify-end"><!></div> <!> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">2. Choose an address book</h2> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">3. Browse contacts</h2> <p class="text-sm text-gray-600">Leave the search empty to list every contact, or type text to search on the server.</p> <div class="grid gap-4 md:grid-cols-[1fr_auto]"><!> <div class="w-full space-y-2 md:w-48"><label for="carddav-search-field" class="block text-sm font-semibold text-gray-700">Search in</label> <select id="carddav-search-field" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"><option>All fields</option><option>Name</option><option>Email</option><option>Telephone</option><option>Organization</option></select></div></div> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900"> </h2> <!> <!> <div class="grid gap-4 md:grid-cols-2"><!> <!></div> <div class="grid gap-4 md:grid-cols-2"><!> <!></div> <!> <!> <div class="flex justify-end gap-2"><!> <!></div></section> <!> <!>`,1);function zr(_t,ht){tr(ht,!0);const be=100;let ne=g("carddav:alice"),le=g(""),ie=g(""),de=g(""),C=g(!1),q=g(ft([])),O=g(""),ce=g(""),ve=g("all"),E=g(ft([])),A=g(null),L=g(""),G=g(""),Q=g(""),X=g(""),Z=g(""),W=g(""),H=g(""),x=g(!1),j=g(null),N=g(null),ee=g(null),te=g(null),$=0,z=0;const D=K(()=>e(q).find(a=>a.id===e(O))),yt=K(()=>!!(e(C)&&e(D)&&e(L).trim()));function M(){return{id:e(ne),type:"person"}}function ue(a){return{id:a,type:"addressBook"}}function re(a){const c=a instanceof Error?a.message:String(a);return c==="carddav:conflict"?"carddav:conflict — another client changed this contact. Refresh the list and try again with the current version.":c}function U(){t(A,null),t(L,""),t(G,""),t(Q,""),t(X,""),t(Z,""),t(W,""),t(H,"")}function pe(){$+=1,z+=1,t(C,!1),t(q,[],!0),t(O,""),t(E,[],!0),U(),t(ee,null),t(te,null)}function bt(){z+=1,t(E,[],!0),U(),t(j,null),t(N,null)}function xt(a){var c,u,p,f;t(A,a,!0),t(L,a.name,!0),t(G,a.givenName??"",!0),t(Q,a.familyName??"",!0),t(X,((u=(c=a.emails)==null?void 0:c[0])==null?void 0:u.value)??"",!0),t(Z,((f=(p=a.telephones)==null?void 0:p[0])==null?void 0:f.value)??"",!0),t(W,a.organization??"",!0),t(H,a.note??"",!0),t(j,null),t(N,null)}async function wt(){const a=$;t(ee,null),t(te,null),t(x,!0);try{await ar();const c={"@context":await oe("carddav"),type:"credentials",actor:M(),object:{type:"credentials",url:e(le),username:e(ie),password:e(de)}};await new Promise((u,p)=>{or.socket.emit("credentials",c,f=>{if(f!=null&&f.error){p(new Error(f.error));return}u()})}),a===$&&(t(C,!0),t(te,"Credentials set for this Sockethub session."))}catch(c){a===$&&t(ee,re(c),!0)}finally{t(x,!1)}}async function $t(){var c;if(!e(C))return;const a=$;t(j,null),t(N,null),t(E,[],!0),U(),t(x,!0);try{const u=await se({"@context":await oe("carddav"),type:"fetch",actor:M()});if(a!==$||!e(C))return;t(q,(u.items??[]).filter(p=>p.type==="addressBook"&&typeof p.id=="string"&&typeof p.name=="string"),!0),t(O,((c=e(q)[0])==null?void 0:c.id)??"",!0),t(N,`Found ${e(q).length} address book${e(q).length===1?"":"s"}.`)}catch(u){a===$&&t(j,re(u),!0)}finally{t(x,!1)}}async function Ge(a=""){if(!e(C)||!e(D))return;const c=$,u=++z,p=e(D).id,f=e(ce).trim();t(j,null),t(N,null),t(x,!0);try{const I=await se({"@context":await oe("carddav"),type:"query",actor:M(),target:ue(p),object:{type:"contactQuery",...f?{text:f}:{},...f&&e(ve)!=="all"?{fields:[e(ve)]}:{},limit:be}});if(c!==$||u!==z||e(O)!==p||!e(C))return;if(t(E,(I.items??[]).filter(R=>R.type==="person"&&typeof R.id=="string"&&typeof R.name=="string"),!0),e(A)){const R=e(E).find(me=>{var J;return me.id===((J=e(A))==null?void 0:J.id)});R?t(A,R,!0):U()}const Y=`${e(E).length} contact${e(E).length===1?"":"s"}`,ae=e(E).length>=be?` Only the first ${be} are shown; narrow the search to see the rest.`:"";t(N,a+(f?`Found ${Y} matching “${f}”.`:`Listed ${Y}.`)+ae)}catch(I){c===$&&u===z&&t(j,re(I),!0)}finally{t(x,!1)}}function Qe(a,c){const u=(a==null?void 0:a.slice(1))??[],p=c?[{...(a==null?void 0:a[0])??{},value:c},...u]:u;return p.length?p:void 0}function We(a){const c=Qe(a==null?void 0:a.emails,e(X).trim()),u=Qe(a==null?void 0:a.telephones,e(Z).trim());return{name:e(L).trim(),...e(G).trim()?{givenName:e(G).trim()}:{},...e(Q).trim()?{familyName:e(Q).trim()}:{},...c?{emails:c}:{},...u?{telephones:u}:{},...e(W).trim()?{organization:e(W).trim()}:{},...e(H).trim()?{note:e(H).trim()}:{}}}async function kt(){if(!e(C)||!e(D)||!e(L).trim()||e(A)&&!e(A).etag)return;const a=$,c=z,u=e(D).id,p=e(A);t(j,null),t(N,null),t(x,!0);try{const f=await oe("carddav");if(p){const{emails:I,telephones:Y,givenName:ae,familyName:R,organization:me,note:J,...xe}=p;await se({"@context":f,type:"update",actor:M(),target:ue(u),object:{...xe,...We(p)}})}else await se({"@context":f,type:"create",actor:M(),target:ue(u),object:{type:"person",...We()}});if(a!==$||c!==z||!e(C))return;U(),await Ge(p?"Contact updated. ":"Contact created. ")}catch(f){a===$&&c===z&&t(j,re(f),!0)}finally{t(x,!1)}}async function Ct(a){var f;if(!e(C)||!e(D)||!a.etag)return;const c=$,u=z,p=e(D).id;t(j,null),t(N,null),t(x,!0);try{if(await se({"@context":await oe("carddav"),type:"delete",actor:M(),target:ue(p),object:{id:a.id,type:"person",etag:a.etag}}),c!==$||u!==z||!e(C))return;((f=e(A))==null?void 0:f.id)===a.id&&U(),t(E,e(E).filter(I=>I.id!==a.id),!0),t(N,`Deleted ${a.name}.`)}catch(I){c===$&&u===z&&t(j,re(I),!0)}finally{t(x,!1)}}function He(a){return[a.street,a.locality,a.region,a.postalCode,a.country].filter(Boolean).join(", ")}function Me(a){const c=[...a.preferred?["preferred"]:[],...a.types??[]];return c.length?`${a.value} (${c.join(", ")})`:a.value}nr(_t,{title:"CardDAV Platform Example",description:"Discover the address books in a CardDAV account, then list, search, add, edit, and delete contacts.",children:(a,c)=>{var u=Ar(),p=o(Ue(u),2),f=o(d(p),4);F(f,{label:"Actor ID",id:"carddav-actor",placeholder:"carddav:alice",onInput:pe,get value(){return e(ne)},set value(r){t(ne,r,!0)}});var I=o(f,2);F(I,{label:"CardDAV URL",id:"carddav-url",type:"url",placeholder:"https://contacts.example/dav/",onInput:pe,get value(){return e(le)},set value(r){t(le,r,!0)}});var Y=o(I,2);F(Y,{label:"Username",id:"carddav-username",onInput:pe,get value(){return e(ie)},set value(r){t(ie,r,!0)}});var ae=o(Y,2);F(ae,{label:"Password",id:"carddav-password",type:"password",onInput:pe,get value(){return e(de)},set value(r){t(de,r,!0)}});var R=o(ae,2),me=d(R);{let r=K(()=>e(C)||e(x)||!e(ne)||!e(le)||!e(ie)||!e(de));ye(me,{buttonAction:wt,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(()=>h(s,e(C)?"Credentials Set":e(x)?"Setting Credentials…":"Set Credentials")),m(l,s)}})}i(R);var J=o(R,2);{var xe=r=>{var l=lr(),_=d(l,!0);i(l),b(()=>h(_,e(ee))),m(r,l)};w(J,r=>{e(ee)&&r(xe)})}var At=o(J,2);{var Bt=r=>{var l=ir(),_=d(l,!0);i(l),b(()=>h(_,e(te))),m(r,l)};w(At,r=>{e(te)&&r(Bt)})}i(p);var we=o(p,2),$e=o(d(we),2),St=d($e);{let r=K(()=>e(x)||!e(C));ye(St,{buttonAction:$t,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e("Fetch Address Books");m(l,s)}})}i($e);var Et=o($e,2);{var jt=r=>{var l=vr(),_=o(Ue(l),2);_.__change=bt,Ve(_,21,()=>e(q),S=>S.id,(S,B)=>{var P=dr(),Te=d(P,!0);i(P);var fe={};b(()=>{h(Te,e(B).name),fe!==(fe=e(B).id)&&(P.value=(P.__value=e(B).id)??"")}),m(S,P)}),i(_);var s=o(_,2);{var V=S=>{var B=cr(),P=d(B,!0);i(B),b(()=>h(P,e(D).description)),m(S,B)};w(s,S=>{var B;(B=e(D))!=null&&B.description&&S(V)})}gt(_,()=>e(O),S=>t(O,S)),m(r,l)};w(Et,r=>{e(q).length>0&&r(jt)})}i(we);var ke=o(we,2),Ce=o(d(ke),4),Ye=d(Ce);F(Ye,{label:"Search text (optional)",id:"carddav-search-text",placeholder:"Bob",get value(){return e(ce)},set value(r){t(ce,r,!0)}});var Je=o(Ye,2),Ae=o(d(Je),2),Be=d(Ae);Be.value=Be.__value="all";var Se=o(Be);Se.value=Se.__value="name";var Ee=o(Se);Ee.value=Ee.__value="email";var je=o(Ee);je.value=je.__value="telephone";var Ke=o(je);Ke.value=Ke.__value="organization",i(Ae),i(Je),i(Ce);var Fe=o(Ce,2),Ft=d(Fe);{let r=K(()=>e(x)||!e(C)||!e(D));ye(Ft,{buttonAction:Ge,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(V=>h(s,V),[()=>e(ce).trim()?"Search Contacts":"List Contacts"]),m(l,s)}})}i(Fe);var Nt=o(Fe,2);{var zt=r=>{var l=xr();Ve(l,21,()=>e(E),_=>_.id,(_,s)=>{var V=br(),S=d(V),B=d(S),P=d(B),Te=o(P);{var fe=v=>{var n=ur(),k=d(n);i(n),b(()=>h(k,`“${e(s).nickname??""}”`)),m(v,n)};w(Te,v=>{e(s).nickname&&v(fe)})}i(B);var lt=o(B,2);{var Ot=v=>{var n=pr(),k=d(n,!0);i(n),b(T=>h(k,T),[()=>[e(s).title,e(s).organization].filter(Boolean).join(" · ")]),m(v,n)};w(lt,v=>{(e(s).title||e(s).organization)&&v(Ot)})}var it=o(lt,2);{var Gt=v=>{var n=mr(),k=d(n);i(n),b(T=>h(k,`✉️ ${T??""}`),[()=>e(s).emails.map(Me).join(", ")]),m(v,n)};w(it,v=>{var n;(n=e(s).emails)!=null&&n.length&&v(Gt)})}var dt=o(it,2);{var Qt=v=>{var n=fr(),k=d(n);i(n),b(T=>h(k,`📞 ${T??""}`),[()=>e(s).telephones.map(Me).join(", ")]),m(v,n)};w(dt,v=>{var n;(n=e(s).telephones)!=null&&n.length&&v(Qt)})}var ct=o(dt,2);Ve(ct,17,()=>e(s).addresses??[],sr,(v,n)=>{var k=er(),T=Ue(k);{var Jt=qe=>{var Le=gr(),Kt=d(Le);i(Le),b(Xt=>h(Kt,`📍 ${Xt??""}`),[()=>He(e(n))]),m(qe,Le)};w(T,qe=>{He(e(n))&&qe(Jt)})}m(v,k)});var vt=o(ct,2);{var Wt=v=>{var n=_r(),k=d(n);i(n),b(T=>h(k,`🔗 ${T??""}`),[()=>e(s).urls.map(T=>T.value).join(", ")]),m(v,n)};w(vt,v=>{var n;(n=e(s).urls)!=null&&n.length&&v(Wt)})}var ut=o(vt,2);{var Ht=v=>{var n=hr(),k=d(n);i(n),b(()=>h(k,`🎂 ${e(s).birthday??""}`)),m(v,n)};w(ut,v=>{e(s).birthday&&v(Ht)})}var pt=o(ut,2);{var Mt=v=>{var n=yr(),k=d(n,!0);i(n),b(()=>h(k,e(s).note)),m(v,n)};w(pt,v=>{e(s).note&&v(Mt)})}var De=o(pt,2),Yt=d(De);i(De),i(S);var mt=o(S,2),ge=d(mt);ge.__click=()=>xt(e(s));var Pe=o(ge,2);Pe.__click=()=>Ct(e(s)),i(mt),i(V),b(()=>{h(P,`${e(s).name??""} `),Oe(De,"title",e(s).id),h(Yt,`uid ${e(s).uid??""}${e(s).etag?` · etag ${e(s).etag}`:""}`),ge.disabled=e(x)||!e(s).etag,Oe(ge,"title",e(s).etag?"":"This contact has no ETag, so it cannot be updated safely"),Pe.disabled=e(x)||!e(s).etag,Oe(Pe,"title",e(s).etag?"":"This contact has no ETag, so it cannot be deleted safely")}),m(_,V)}),i(l),m(r,l)};w(Nt,r=>{e(E).length>0&&r(zt)})}i(ke);var Ne=o(ke,2),ze=d(Ne),It=d(ze);i(ze);var Xe=o(ze,2);{var Rt=r=>{var l=wr();m(r,l)};w(Xe,r=>{e(A)&&r(Rt)})}var Ze=o(Xe,2);F(Ze,{label:"Full name",id:"carddav-contact-name",placeholder:"Bob Example",get value(){return e(L)},set value(r){t(L,r,!0)}});var Ie=o(Ze,2),et=d(Ie);F(et,{label:"Given name",id:"carddav-contact-given",placeholder:"Bob",get value(){return e(G)},set value(r){t(G,r,!0)}});var Tt=o(et,2);F(Tt,{label:"Family name",id:"carddav-contact-family",placeholder:"Example",get value(){return e(Q)},set value(r){t(Q,r,!0)}}),i(Ie);var Re=o(Ie,2),tt=d(Re);F(tt,{label:"Email",id:"carddav-contact-email",type:"email",placeholder:"bob@example.com",get value(){return e(X)},set value(r){t(X,r,!0)}});var Dt=o(tt,2);F(Dt,{label:"Telephone",id:"carddav-contact-telephone",type:"tel",placeholder:"+1 555 0100",get value(){return e(Z)},set value(r){t(Z,r,!0)}}),i(Re);var rt=o(Re,2);F(rt,{label:"Organization",id:"carddav-contact-organization",get value(){return e(W)},set value(r){t(W,r,!0)}});var at=o(rt,2);F(at,{label:"Note",id:"carddav-contact-note",get value(){return e(H)},set value(r){t(H,r,!0)}});var ot=o(at,2),st=d(ot);{var Pt=r=>{var l=$r();l.__click=U,m(r,l)};w(st,r=>{e(A)&&r(Pt)})}var qt=o(st,2);{let r=K(()=>e(x)||!e(yt));ye(qt,{buttonAction:kt,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(()=>h(s,e(A)?"Save Changes":"Add Contact")),m(l,s)}})}i(ot),i(Ne);var nt=o(Ne,2);{var Lt=r=>{var l=kr(),_=d(l,!0);i(l),b(()=>h(_,e(j))),m(r,l)};w(nt,r=>{e(j)&&r(Lt)})}var Ut=o(nt,2);{var Vt=r=>{var l=Cr(),_=d(l,!0);i(l),b(()=>h(_,e(N))),m(r,l)};w(Ut,r=>{e(N)&&r(Vt)})}b(()=>h(It,`4. ${e(A)?`Edit ${e(A).name}`:"Add a contact"}`)),gt(Ae,()=>e(ve),r=>t(ve,r)),m(a,u)}}),rr()}Zt(["change","click"]);export{zr as component};
1
+ import{d as Zt,f as y,t as _e,s as h,a as m,c as er}from"../chunks/BrzeKAzG.js";import{p as tr,s as g,a as ft,b as rr,c as o,f as Ue,d,e as t,g as e,n as he,t as b,u as K,r as i}from"../chunks/k-cRz8DS.js";import{i as w}from"../chunks/Dn5i8FcP.js";import{b as gt,e as Ve,a as ar,c as oe,s as or,d as se,i as sr,f as Oe}from"../chunks/BPju5WGe.js";import{B as nr,S as ye}from"../chunks/Bige9f4F.js";import{F}from"../chunks/peuwRZld.js";var lr=y('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),ir=y('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),dr=y("<option> </option>"),cr=y('<p class="text-sm text-gray-600"> </p>'),vr=y('<label for="carddav-address-book" class="block text-sm font-semibold text-gray-700">Address book</label> <select id="carddav-address-book" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"></select> <!>',1),ur=y('<span class="font-normal text-gray-500"> </span>'),pr=y('<p class="text-sm text-gray-600"> </p>'),mr=y('<p class="text-sm text-gray-600"> </p>'),fr=y('<p class="text-sm text-gray-600"> </p>'),gr=y('<p class="text-sm text-gray-600"> </p>'),_r=y('<p class="text-sm text-gray-600 break-all"> </p>'),hr=y('<p class="text-sm text-gray-600"> </p>'),yr=y('<p class="text-sm text-gray-600 whitespace-pre-wrap"> </p>'),br=y('<li class="flex flex-col gap-3 p-4 md:flex-row md:items-start md:justify-between"><div class="min-w-0 space-y-1"><h3 class="font-semibold text-gray-900"> <!></h3> <!> <!> <!> <!> <!> <!> <!> <p class="truncate text-xs text-gray-400"> </p></div> <div class="flex shrink-0 gap-2"><button type="button" class="rounded-lg border border-gray-300 px-3 py-2 text-sm font-semibold text-gray-700 hover:bg-gray-50 disabled:cursor-not-allowed disabled:opacity-50">Edit</button> <button type="button" class="rounded-lg border border-red-200 px-3 py-2 text-sm font-semibold text-red-700 hover:bg-red-50 disabled:cursor-not-allowed disabled:opacity-50">Delete</button></div></li>'),xr=y('<ul class="divide-y divide-gray-200 rounded-lg border border-gray-200"></ul>'),wr=y('<p class="text-sm text-gray-600">The update sends the full contact back with its stored <code>etag</code>. Fields not shown here are kept as they are.</p>'),$r=y('<button type="button" class="rounded-lg border border-gray-300 px-6 py-3 text-sm font-semibold text-gray-700 hover:bg-gray-50">Cancel</button>'),kr=y('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Cr=y('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),Ar=y(`<div class="bg-teal-50 border-l-4 border-teal-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-teal-800 mb-2">👤 How the CardDAV Platform Works</h3> <p class="text-teal-700 text-sm mb-3">Sockethub talks WebDAV and vCard to your contacts server so your app only has to send ActivityStreams.</p> <div class="text-teal-700 text-sm space-y-1"><div><strong>1. 🔐 Credentials:</strong> Sent once per session over the <code>credentials</code> event, never in an activity</div> <div><strong>2. 📚 fetch:</strong> Discovers the account's address books from the service URL</div> <div><strong>3. 🔍 query:</strong> Lists every contact, or runs a server-side search across name, email, telephone, or organization</div> <div><strong>4. ✏️ create / update / delete:</strong> Each contact carries an <code>etag</code>; updates and deletes are refused with <code>carddav:conflict</code> if another client changed the card first</div></div></div> <section class="space-y-4"><h2 class="text-xl font-semibold text-gray-900">1. Set credentials</h2> <p class="text-sm text-gray-600">Use an app password when your contacts provider supports one. Credentials stay in this Sockethub session.</p> <!> <!> <!> <!> <div class="flex justify-end"><!></div> <!> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">2. Choose an address book</h2> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">3. Browse contacts</h2> <p class="text-sm text-gray-600">Leave the search empty to list every contact, or type text to search on the server.</p> <div class="grid gap-4 md:grid-cols-[1fr_auto]"><!> <div class="w-full space-y-2 md:w-48"><label for="carddav-search-field" class="block text-sm font-semibold text-gray-700">Search in</label> <select id="carddav-search-field" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"><option>All fields</option><option>Name</option><option>Email</option><option>Telephone</option><option>Organization</option></select></div></div> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900"> </h2> <!> <!> <div class="grid gap-4 md:grid-cols-2"><!> <!></div> <div class="grid gap-4 md:grid-cols-2"><!> <!></div> <!> <!> <div class="flex justify-end gap-2"><!> <!></div></section> <!> <!>`,1);function zr(_t,ht){tr(ht,!0);const be=100;let ne=g("carddav:alice"),le=g(""),ie=g(""),de=g(""),C=g(!1),q=g(ft([])),O=g(""),ce=g(""),ve=g("all"),E=g(ft([])),A=g(null),L=g(""),G=g(""),Q=g(""),X=g(""),Z=g(""),W=g(""),H=g(""),x=g(!1),j=g(null),N=g(null),ee=g(null),te=g(null),$=0,z=0;const D=K(()=>e(q).find(a=>a.id===e(O))),yt=K(()=>!!(e(C)&&e(D)&&e(L).trim()));function M(){return{id:e(ne),type:"person"}}function ue(a){return{id:a,type:"addressBook"}}function re(a){const c=a instanceof Error?a.message:String(a);return c==="carddav:conflict"?"carddav:conflict — another client changed this contact. Refresh the list and try again with the current version.":c}function U(){t(A,null),t(L,""),t(G,""),t(Q,""),t(X,""),t(Z,""),t(W,""),t(H,"")}function pe(){$+=1,z+=1,t(C,!1),t(q,[],!0),t(O,""),t(E,[],!0),U(),t(ee,null),t(te,null)}function bt(){z+=1,t(E,[],!0),U(),t(j,null),t(N,null)}function xt(a){var c,u,p,f;t(A,a,!0),t(L,a.name,!0),t(G,a.givenName??"",!0),t(Q,a.familyName??"",!0),t(X,((u=(c=a.emails)==null?void 0:c[0])==null?void 0:u.value)??"",!0),t(Z,((f=(p=a.telephones)==null?void 0:p[0])==null?void 0:f.value)??"",!0),t(W,a.organization??"",!0),t(H,a.note??"",!0),t(j,null),t(N,null)}async function wt(){const a=$;t(ee,null),t(te,null),t(x,!0);try{await ar();const c={"@context":await oe("carddav"),type:"credentials",actor:M(),object:{type:"credentials",url:e(le),username:e(ie),password:e(de)}};await new Promise((u,p)=>{or.socket.emit("credentials",c,f=>{if(f!=null&&f.error){p(new Error(f.error));return}u()})}),a===$&&(t(C,!0),t(te,"Credentials set for this Sockethub session."))}catch(c){a===$&&t(ee,re(c),!0)}finally{t(x,!1)}}async function $t(){var c;if(!e(C))return;const a=$;t(j,null),t(N,null),t(E,[],!0),U(),t(x,!0);try{const u=await se({"@context":await oe("carddav"),type:"fetch",actor:M()});if(a!==$||!e(C))return;t(q,(u.items??[]).filter(p=>p.type==="addressBook"&&typeof p.id=="string"&&typeof p.name=="string"),!0),t(O,((c=e(q)[0])==null?void 0:c.id)??"",!0),t(N,`Found ${e(q).length} address book${e(q).length===1?"":"s"}.`)}catch(u){a===$&&t(j,re(u),!0)}finally{t(x,!1)}}async function Ge(a=""){if(!e(C)||!e(D))return;const c=$,u=++z,p=e(D).id,f=e(ce).trim();t(j,null),t(N,null),t(x,!0);try{const I=await se({"@context":await oe("carddav"),type:"query",actor:M(),target:ue(p),object:{type:"contactQuery",...f?{text:f}:{},...f&&e(ve)!=="all"?{fields:[e(ve)]}:{},limit:be}});if(c!==$||u!==z||e(O)!==p||!e(C))return;if(t(E,(I.items??[]).filter(R=>R.type==="person"&&typeof R.id=="string"&&typeof R.name=="string"),!0),e(A)){const R=e(E).find(me=>{var J;return me.id===((J=e(A))==null?void 0:J.id)});R?t(A,R,!0):U()}const Y=`${e(E).length} contact${e(E).length===1?"":"s"}`,ae=e(E).length>=be?` Only the first ${be} are shown; narrow the search to see the rest.`:"";t(N,a+(f?`Found ${Y} matching “${f}”.`:`Listed ${Y}.`)+ae)}catch(I){c===$&&u===z&&t(j,re(I),!0)}finally{t(x,!1)}}function Qe(a,c){const u=(a==null?void 0:a.slice(1))??[],p=c?[{...(a==null?void 0:a[0])??{},value:c},...u]:u;return p.length?p:void 0}function We(a){const c=Qe(a==null?void 0:a.emails,e(X).trim()),u=Qe(a==null?void 0:a.telephones,e(Z).trim());return{name:e(L).trim(),...e(G).trim()?{givenName:e(G).trim()}:{},...e(Q).trim()?{familyName:e(Q).trim()}:{},...c?{emails:c}:{},...u?{telephones:u}:{},...e(W).trim()?{organization:e(W).trim()}:{},...e(H).trim()?{note:e(H).trim()}:{}}}async function kt(){if(!e(C)||!e(D)||!e(L).trim()||e(A)&&!e(A).etag)return;const a=$,c=z,u=e(D).id,p=e(A);t(j,null),t(N,null),t(x,!0);try{const f=await oe("carddav");if(p){const{emails:I,telephones:Y,givenName:ae,familyName:R,organization:me,note:J,...xe}=p;await se({"@context":f,type:"update",actor:M(),target:ue(u),object:{...xe,...We(p)}})}else await se({"@context":f,type:"create",actor:M(),target:ue(u),object:{type:"person",...We()}});if(a!==$||c!==z||!e(C))return;U(),await Ge(p?"Contact updated. ":"Contact created. ")}catch(f){a===$&&c===z&&t(j,re(f),!0)}finally{t(x,!1)}}async function Ct(a){var f;if(!e(C)||!e(D)||!a.etag)return;const c=$,u=z,p=e(D).id;t(j,null),t(N,null),t(x,!0);try{if(await se({"@context":await oe("carddav"),type:"delete",actor:M(),target:ue(p),object:{id:a.id,type:"person",etag:a.etag}}),c!==$||u!==z||!e(C))return;((f=e(A))==null?void 0:f.id)===a.id&&U(),t(E,e(E).filter(I=>I.id!==a.id),!0),t(N,`Deleted ${a.name}.`)}catch(I){c===$&&u===z&&t(j,re(I),!0)}finally{t(x,!1)}}function He(a){return[a.street,a.locality,a.region,a.postalCode,a.country].filter(Boolean).join(", ")}function Me(a){const c=[...a.preferred?["preferred"]:[],...a.types??[]];return c.length?`${a.value} (${c.join(", ")})`:a.value}nr(_t,{title:"CardDAV Platform Example",description:"Discover the address books in a CardDAV account, then list, search, add, edit, and delete contacts.",children:(a,c)=>{var u=Ar(),p=o(Ue(u),2),f=o(d(p),4);F(f,{label:"Actor ID",id:"carddav-actor",placeholder:"carddav:alice",onInput:pe,get value(){return e(ne)},set value(r){t(ne,r,!0)}});var I=o(f,2);F(I,{label:"CardDAV URL",id:"carddav-url",type:"url",placeholder:"https://contacts.example/dav/",onInput:pe,get value(){return e(le)},set value(r){t(le,r,!0)}});var Y=o(I,2);F(Y,{label:"Username",id:"carddav-username",onInput:pe,get value(){return e(ie)},set value(r){t(ie,r,!0)}});var ae=o(Y,2);F(ae,{label:"Password",id:"carddav-password",type:"password",onInput:pe,get value(){return e(de)},set value(r){t(de,r,!0)}});var R=o(ae,2),me=d(R);{let r=K(()=>e(C)||e(x)||!e(ne)||!e(le)||!e(ie)||!e(de));ye(me,{buttonAction:wt,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(()=>h(s,e(C)?"Credentials Set":e(x)?"Setting Credentials…":"Set Credentials")),m(l,s)}})}i(R);var J=o(R,2);{var xe=r=>{var l=lr(),_=d(l,!0);i(l),b(()=>h(_,e(ee))),m(r,l)};w(J,r=>{e(ee)&&r(xe)})}var At=o(J,2);{var Bt=r=>{var l=ir(),_=d(l,!0);i(l),b(()=>h(_,e(te))),m(r,l)};w(At,r=>{e(te)&&r(Bt)})}i(p);var we=o(p,2),$e=o(d(we),2),St=d($e);{let r=K(()=>e(x)||!e(C));ye(St,{buttonAction:$t,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e("Fetch Address Books");m(l,s)}})}i($e);var Et=o($e,2);{var jt=r=>{var l=vr(),_=o(Ue(l),2);_.__change=bt,Ve(_,21,()=>e(q),S=>S.id,(S,B)=>{var P=dr(),Te=d(P,!0);i(P);var fe={};b(()=>{h(Te,e(B).name),fe!==(fe=e(B).id)&&(P.value=(P.__value=e(B).id)??"")}),m(S,P)}),i(_);var s=o(_,2);{var V=S=>{var B=cr(),P=d(B,!0);i(B),b(()=>h(P,e(D).description)),m(S,B)};w(s,S=>{var B;(B=e(D))!=null&&B.description&&S(V)})}gt(_,()=>e(O),S=>t(O,S)),m(r,l)};w(Et,r=>{e(q).length>0&&r(jt)})}i(we);var ke=o(we,2),Ce=o(d(ke),4),Ye=d(Ce);F(Ye,{label:"Search text (optional)",id:"carddav-search-text",placeholder:"Bob",get value(){return e(ce)},set value(r){t(ce,r,!0)}});var Je=o(Ye,2),Ae=o(d(Je),2),Be=d(Ae);Be.value=Be.__value="all";var Se=o(Be);Se.value=Se.__value="name";var Ee=o(Se);Ee.value=Ee.__value="email";var je=o(Ee);je.value=je.__value="telephone";var Ke=o(je);Ke.value=Ke.__value="organization",i(Ae),i(Je),i(Ce);var Fe=o(Ce,2),Ft=d(Fe);{let r=K(()=>e(x)||!e(C)||!e(D));ye(Ft,{buttonAction:Ge,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(V=>h(s,V),[()=>e(ce).trim()?"Search Contacts":"List Contacts"]),m(l,s)}})}i(Fe);var Nt=o(Fe,2);{var zt=r=>{var l=xr();Ve(l,21,()=>e(E),_=>_.id,(_,s)=>{var V=br(),S=d(V),B=d(S),P=d(B),Te=o(P);{var fe=v=>{var n=ur(),k=d(n);i(n),b(()=>h(k,`“${e(s).nickname??""}”`)),m(v,n)};w(Te,v=>{e(s).nickname&&v(fe)})}i(B);var lt=o(B,2);{var Ot=v=>{var n=pr(),k=d(n,!0);i(n),b(T=>h(k,T),[()=>[e(s).title,e(s).organization].filter(Boolean).join(" · ")]),m(v,n)};w(lt,v=>{(e(s).title||e(s).organization)&&v(Ot)})}var it=o(lt,2);{var Gt=v=>{var n=mr(),k=d(n);i(n),b(T=>h(k,`✉️ ${T??""}`),[()=>e(s).emails.map(Me).join(", ")]),m(v,n)};w(it,v=>{var n;(n=e(s).emails)!=null&&n.length&&v(Gt)})}var dt=o(it,2);{var Qt=v=>{var n=fr(),k=d(n);i(n),b(T=>h(k,`📞 ${T??""}`),[()=>e(s).telephones.map(Me).join(", ")]),m(v,n)};w(dt,v=>{var n;(n=e(s).telephones)!=null&&n.length&&v(Qt)})}var ct=o(dt,2);Ve(ct,17,()=>e(s).addresses??[],sr,(v,n)=>{var k=er(),T=Ue(k);{var Jt=qe=>{var Le=gr(),Kt=d(Le);i(Le),b(Xt=>h(Kt,`📍 ${Xt??""}`),[()=>He(e(n))]),m(qe,Le)};w(T,qe=>{He(e(n))&&qe(Jt)})}m(v,k)});var vt=o(ct,2);{var Wt=v=>{var n=_r(),k=d(n);i(n),b(T=>h(k,`🔗 ${T??""}`),[()=>e(s).urls.map(T=>T.value).join(", ")]),m(v,n)};w(vt,v=>{var n;(n=e(s).urls)!=null&&n.length&&v(Wt)})}var ut=o(vt,2);{var Ht=v=>{var n=hr(),k=d(n);i(n),b(()=>h(k,`🎂 ${e(s).birthday??""}`)),m(v,n)};w(ut,v=>{e(s).birthday&&v(Ht)})}var pt=o(ut,2);{var Mt=v=>{var n=yr(),k=d(n,!0);i(n),b(()=>h(k,e(s).note)),m(v,n)};w(pt,v=>{e(s).note&&v(Mt)})}var De=o(pt,2),Yt=d(De);i(De),i(S);var mt=o(S,2),ge=d(mt);ge.__click=()=>xt(e(s));var Pe=o(ge,2);Pe.__click=()=>Ct(e(s)),i(mt),i(V),b(()=>{h(P,`${e(s).name??""} `),Oe(De,"title",e(s).id),h(Yt,`uid ${e(s).uid??""}${e(s).etag?` · etag ${e(s).etag}`:""}`),ge.disabled=e(x)||!e(s).etag,Oe(ge,"title",e(s).etag?"":"This contact has no ETag, so it cannot be updated safely"),Pe.disabled=e(x)||!e(s).etag,Oe(Pe,"title",e(s).etag?"":"This contact has no ETag, so it cannot be deleted safely")}),m(_,V)}),i(l),m(r,l)};w(Nt,r=>{e(E).length>0&&r(zt)})}i(ke);var Ne=o(ke,2),ze=d(Ne),It=d(ze);i(ze);var Xe=o(ze,2);{var Rt=r=>{var l=wr();m(r,l)};w(Xe,r=>{e(A)&&r(Rt)})}var Ze=o(Xe,2);F(Ze,{label:"Full name",id:"carddav-contact-name",placeholder:"Bob Example",get value(){return e(L)},set value(r){t(L,r,!0)}});var Ie=o(Ze,2),et=d(Ie);F(et,{label:"Given name",id:"carddav-contact-given",placeholder:"Bob",get value(){return e(G)},set value(r){t(G,r,!0)}});var Tt=o(et,2);F(Tt,{label:"Family name",id:"carddav-contact-family",placeholder:"Example",get value(){return e(Q)},set value(r){t(Q,r,!0)}}),i(Ie);var Re=o(Ie,2),tt=d(Re);F(tt,{label:"Email",id:"carddav-contact-email",type:"email",placeholder:"bob@example.com",get value(){return e(X)},set value(r){t(X,r,!0)}});var Dt=o(tt,2);F(Dt,{label:"Telephone",id:"carddav-contact-telephone",type:"tel",placeholder:"+1 555 0100",get value(){return e(Z)},set value(r){t(Z,r,!0)}}),i(Re);var rt=o(Re,2);F(rt,{label:"Organization",id:"carddav-contact-organization",get value(){return e(W)},set value(r){t(W,r,!0)}});var at=o(rt,2);F(at,{label:"Note",id:"carddav-contact-note",get value(){return e(H)},set value(r){t(H,r,!0)}});var ot=o(at,2),st=d(ot);{var Pt=r=>{var l=$r();l.__click=U,m(r,l)};w(st,r=>{e(A)&&r(Pt)})}var qt=o(st,2);{let r=K(()=>e(x)||!e(yt));ye(qt,{buttonAction:kt,get disabled(){return e(r)},children:(l,_)=>{he();var s=_e();b(()=>h(s,e(A)?"Save Changes":"Add Contact")),m(l,s)}})}i(ot),i(Ne);var nt=o(Ne,2);{var Lt=r=>{var l=kr(),_=d(l,!0);i(l),b(()=>h(_,e(j))),m(r,l)};w(nt,r=>{e(j)&&r(Lt)})}var Ut=o(nt,2);{var Vt=r=>{var l=Cr(),_=d(l,!0);i(l),b(()=>h(_,e(N))),m(r,l)};w(Ut,r=>{e(N)&&r(Vt)})}b(()=>h(It,`4. ${e(A)?`Edit ${e(A).name}`:"Add a contact"}`)),gt(Ae,()=>e(ve),r=>t(ve,r)),m(a,u)}}),rr()}Zt(["change","click"]);export{zr as component};
@@ -1,2 +1,2 @@
1
- import{f,t as H,a as s,c as C,s as D}from"../chunks/BrzeKAzG.js";import{p as G,b as J,c as o,f as $,d as p,e as d,s as b,g as e,w as N,u as P,n as q,r as v,t as z}from"../chunks/k-cRz8DS.js";import{s as I,i as E,a as K}from"../chunks/Dn5i8FcP.js";import{A as Q}from"../chunks/BoJm-rJp.js";import{B as V,S as X}from"../chunks/CT5jku5V.js";import{F as Y}from"../chunks/CDWD0DpS.js";import{M as Z,d as tt,g as et,c as at,h as rt}from"../chunks/DbhdhNIA.js";var st=f(`<div class="space-y-2"><h3 class="text-lg font-semibold text-gray-800">Preview</h3> <p class="text-gray-600 text-sm">How a chat client would render the fetched metadata. The raw
1
+ import{f,t as H,a as s,c as C,s as D}from"../chunks/BrzeKAzG.js";import{p as G,b as J,c as o,f as $,d as p,e as d,s as b,g as e,w as N,u as P,n as q,r as v,t as z}from"../chunks/k-cRz8DS.js";import{s as I,i as E,a as K}from"../chunks/Dn5i8FcP.js";import{A as Q}from"../chunks/BqL0wH9S.js";import{B as V,S as X}from"../chunks/Bige9f4F.js";import{F as Y}from"../chunks/peuwRZld.js";import{M as Z,d as tt,g as et,c as at,h as rt}from"../chunks/BPju5WGe.js";var st=f(`<div class="space-y-2"><h3 class="text-lg font-semibold text-gray-800">Preview</h3> <p class="text-gray-600 text-sm">How a chat client would render the fetched metadata. The raw
2
2
  response is in the activity log below.</p> <!></div>`),ot=f('<div class="p-3 bg-red-50 border border-red-200 rounded-lg text-sm text-red-700"> </div>'),dt=f('<div class="bg-purple-50 border-l-4 border-purple-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-purple-800 mb-2">🔍 How Metadata Extraction Works</h3> <p class="text-purple-700 text-sm mb-3">This example shows how Sockethub can extract structured metadata from any web page.</p> <div class="text-purple-700 text-sm space-y-1"><div><strong>🌐 Fetching:</strong> Sockethub downloads the web page content</div> <div><strong>🔍 Scanning:</strong> Searches for Open Graph, Twitter Cards, JSON-LD, and meta tags</div> <div><strong>📊 Extracting:</strong> Pulls out titles, descriptions, images, and other metadata</div> <div><strong>📋 Returning:</strong> Provides structured data about the page</div></div></div> <div class="space-y-4"><!> <p class="text-gray-600 text-sm">The page URL is the actor <code>id</code> with <code>type: "website"</code>.</p> <!> <div class="bg-blue-50 border border-blue-200 p-3 rounded-lg"><p class="text-blue-700 text-sm"><strong>💡 What happens when you click Fetch:</strong><br/> Sockethub sends a <code>fetch</code> activity with the page URL as the actor and returns extracted metadata.</p></div> <div class="w-full text-right"><!></div> <!></div>',1);function mt(F,L){G(L,!0);const R=()=>K(x,"$sockethubState",A),[A,M]=I(),x=N({actorSet:!1});let i=b("https://sockethub.org"),c=b(void 0),n=b("");const w=P(()=>({id:e(i),type:"website",name:e(i)}));async function U(){d(c,void 0),d(n,"");try{const a=await tt({"@context":await at("metadata"),type:"fetch",actor:et(e(w))});rt(a.object)&&d(c,a.object,!0)}catch(a){throw d(n,a instanceof Error?a.message:String(a),!0),a}}V(F,{title:"Metadata Platform Example",description:"Sockethub's metadata platform takes a URL, fetches and parses it for any metadata.",children:(a,it)=>{var _=dt(),y=o($(_),2),S=p(y);Y(S,{label:"Website URL",id:"URL",placeholder:"https://example.com",get value(){return e(i)},set value(t){d(i,t,!0)}});var k=o(S,4);Q(k,{get actor(){return e(w)},get sockethubState(){return x}});var u=o(k,4),j=p(u);{let t=P(()=>!R().actorSet);X(j,{buttonAction:U,get disabled(){return e(t)},children:(r,l)=>{q();var h=H("Extract Metadata");s(r,h)}})}v(u);var O=o(u,2);{var T=t=>{var r=st(),l=o(p(r),4);Z(l,{get page(){return e(c)}}),v(r),s(t,r)},B=t=>{var r=C(),l=$(r);{var h=m=>{var g=ot(),W=p(g,!0);v(g),z(()=>D(W,e(n))),s(m,g)};E(l,m=>{e(n)&&m(h)},!0)}s(t,r)};E(O,t=>{e(c)?t(T):t(B,!1)})}v(y),s(a,_)}}),J(),M()}export{mt as component};
@@ -1 +1 @@
1
- import{f as m,t as j,s as p,a as u}from"../chunks/BrzeKAzG.js";import{p as ft,s as d,a as Re,b as gt,f as ae,c as n,d as i,e as a,g as e,n as I,t as f,u as U,r as o}from"../chunks/k-cRz8DS.js";import{i as x}from"../chunks/Dn5i8FcP.js";import{r as fe,e as Oe,b as mt,a as _t,c as re,s as bt,d as ge}from"../chunks/DbhdhNIA.js";import{B as yt,S as le,b as Le,a as xt}from"../chunks/CT5jku5V.js";import{F as S}from"../chunks/CDWD0DpS.js";var ht=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),wt=m('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),St=m("<option> </option>"),$t=m('<label for="caldav-calendar" class="block text-sm font-semibold text-gray-700">Calendar</label> <select id="caldav-calendar" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"></select>',1),Ct=m("<!> <!>",1),kt=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Et=m('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),It=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Tt=m('<li class="flex flex-col gap-1 px-4 py-3 text-sm"><span class="font-medium text-gray-900"> </span> <span class="text-gray-600"> <!> <!></span></li>'),At=m('<h3 class="text-sm font-semibold text-gray-700"> </h3> <ul class="divide-y divide-gray-200 rounded-lg border border-gray-200 bg-white"></ul>',1),Dt=m('<section class="space-y-4"><h2 class="text-xl font-semibold text-gray-900">1. Set credentials</h2> <p class="text-sm text-gray-600">Use an app password when your calendar provider supports one. Credentials stay in this Sockethub session.</p> <!> <!> <!> <!> <div class="flex justify-end"><!></div> <!> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">2. Choose a calendar</h2> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">3. Add an item</h2> <div class="flex gap-6"><label class="flex items-center gap-2"><input type="radio"/> Event</label> <label class="flex items-center gap-2"><input type="radio"/> To-do</label></div> <!> <!> <div class="flex justify-end"><!></div></section> <!> <!> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">Read a published iCalendar feed</h2> <p class="text-sm text-gray-600">Public .ics and webcal:// links need no credentials. Sockethub fetches the feed and lists its items.</p> <!> <label class="flex items-center gap-2 text-sm text-gray-700"><input type="checkbox"/> Upcoming items only</label> <div class="flex justify-end"><!></div> <!> <!></section>',1);function Ot(Ve,Ne){ft(Ne,!0);const me=[];let B=d("caldav:alice"),K=d(""),M=d(""),Q=d(""),T=d(!1),$=d(Re([])),R=d(""),_=d("event"),A=d(""),O=d(""),L=d(""),V=d(""),b=d(!1),D=d(null),F=d(null),N=d(null),W=d(null),X=d(""),ne=d(!0),_e=d(""),q=d(Re([])),Y=d(!1),Z=d(null);const k=U(()=>e($).find(l=>l.id===e(R))),We=U(()=>{var l;return((l=e(k))==null?void 0:l.components.includes(e(_)))??!1});function ee(){return{id:e(B),type:"person"}}function te(){e(T)&&(a(T,!1),a($,[],!0),a(R,""),a(N,null),a(W,null))}async function qe(){a(N,null),a(W,null),a(b,!0);try{await _t();const l={"@context":await re("caldav"),type:"credentials",actor:ee(),object:{type:"credentials",url:e(K),username:e(M),password:e(Q)}};await new Promise((v,h)=>{bt.socket.emit("credentials",l,C=>{if(C!=null&&C.error){h(new Error(C.error));return}v()})}),a(T,!0),a(W,"Credentials set for this Sockethub session.")}catch(l){a(N,l instanceof Error?l.message:String(l),!0)}finally{a(b,!1)}}async function ze(){var l;a(D,null),a(F,null),a(b,!0);try{const v=await ge({"@context":await re("caldav"),type:"fetch",actor:ee()});a($,(v.items??[]).filter(h=>h.type==="calendar"&&typeof h.id=="string"&&typeof h.name=="string"&&Array.isArray(h.components)),!0),a(R,((l=e($)[0])==null?void 0:l.id)??"",!0),a(F,`Found ${e($).length} calendar${e($).length===1?"":"s"}.`)}catch(v){a(D,v instanceof Error?v.message:String(v),!0)}finally{a(b,!1)}}async function Ge(){a(Z,null),a(Y,!0);try{const l=await ge({"@context":await re("caldav"),type:"read",actor:ee(),target:{id:e(X),type:"feed"},...e(ne)?{object:{startTime:new Date().toISOString()}}:{}});a(_e,typeof l.summary=="string"?l.summary:"",!0),a(q,(l.items??[]).filter(v=>(v.type==="event"||v.type==="task")&&typeof v.name=="string"),!0)}catch(l){a(q,[],!0),a(Z,l instanceof Error?l.message:String(l),!0)}finally{a(Y,!1)}}function be(l){const v=l.startTime??l.due;return v?l.allDay||!v.includes("T")?v:new Date(v).toLocaleString():""}async function He(){if(e(k)){a(D,null),a(F,null),a(b,!0);try{const l=e(_)==="event"?{type:"event",name:e(A),startTime:new Date(e(O)).toISOString(),...e(L)?{endTime:new Date(e(L)).toISOString()}:{}}:{type:"task",name:e(A),...e(V)?{due:new Date(e(V)).toISOString()}:{}};await ge({"@context":await re("caldav"),type:"create",actor:ee(),target:{id:e(k).id,type:"calendar"},object:l}),a(F,`${e(_)==="event"?"Event":"To-do"} created.`),a(A,""),a(O,""),a(L,""),a(V,"")}catch(l){a(D,l instanceof Error?l.message:String(l),!0)}finally{a(b,!1)}}}yt(Ve,{title:"CalDAV Platform Example",description:"Discover the calendars in a CalDAV account and add an event or to-do, or list the events in a published .ics feed.",children:(l,v)=>{var h=Dt(),C=ae(h),ye=n(i(C),4);S(ye,{label:"Actor ID",id:"caldav-actor",placeholder:"caldav:alice",onInput:te,get value(){return e(B)},set value(t){a(B,t,!0)}});var xe=n(ye,2);S(xe,{label:"CalDAV URL",id:"caldav-url",type:"url",placeholder:"https://calendar.example/dav/",onInput:te,get value(){return e(K)},set value(t){a(K,t,!0)}});var he=n(xe,2);S(he,{label:"Username",id:"caldav-username",onInput:te,get value(){return e(M)},set value(t){a(M,t,!0)}});var we=n(he,2);S(we,{label:"Password",id:"caldav-password",type:"password",onInput:te,get value(){return e(Q)},set value(t){a(Q,t,!0)}});var se=n(we,2),Je=i(se);{let t=U(()=>e(T)||e(b)||!e(B)||!e(K)||!e(M)||!e(Q));le(Je,{buttonAction:qe,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,e(T)?"Credentials Set":e(b)?"Setting Credentials…":"Set Credentials")),u(r,c)}})}o(se);var Se=n(se,2);{var Ke=t=>{var r=ht(),s=i(r,!0);o(r),f(()=>p(s,e(N))),u(t,r)};x(Se,t=>{e(N)&&t(Ke)})}var Me=n(Se,2);{var Qe=t=>{var r=wt(),s=i(r,!0);o(r),f(()=>p(s,e(W))),u(t,r)};x(Me,t=>{e(W)&&t(Qe)})}o(C);var oe=n(C,2),de=n(i(oe),2),Xe=i(de);{let t=U(()=>e(b)||!e(T));le(Xe,{buttonAction:ze,get disabled(){return e(t)},children:(r,s)=>{I();var c=j("Fetch Calendars");u(r,c)}})}o(de);var Ye=n(de,2);{var Ze=t=>{var r=$t(),s=n(ae(r),2);Oe(s,21,()=>e($),c=>c.id,(c,g)=>{var w=St(),y=i(w);o(w);var P={};f(H=>{p(y,`${e(g).name??""} (${H??""})`),P!==(P=e(g).id)&&(w.value=(w.__value=e(g).id)??"")},[()=>e(g).components.join(", ")]),u(c,w)}),o(s),mt(s,()=>e(R),c=>a(R,c)),u(t,r)};x(Ye,t=>{e($).length>0&&t(Ze)})}o(oe);var ie=n(oe,2),ce=n(i(ie),2),ve=i(ce),z=i(ve);fe(z),z.value=z.__value="event",I(),o(ve);var $e=n(ve,2),G=i($e);fe(G),G.value=G.__value="task",I(),o($e),o(ce);var Ce=n(ce,2);S(Ce,{label:"Name",id:"caldav-item-name",get value(){return e(A)},set value(t){a(A,t,!0)}});var ke=n(Ce,2);{var et=t=>{var r=Ct(),s=ae(r);S(s,{label:"Starts",id:"caldav-start",type:"datetime-local",get value(){return e(O)},set value(g){a(O,g,!0)}});var c=n(s,2);S(c,{label:"Ends (optional)",id:"caldav-end",type:"datetime-local",get value(){return e(L)},set value(g){a(L,g,!0)}}),u(t,r)},tt=t=>{S(t,{label:"Due (optional)",id:"caldav-due",type:"datetime-local",get value(){return e(V)},set value(r){a(V,r,!0)}})};x(ke,t=>{e(_)==="event"?t(et):t(tt,!1)})}var Ee=n(ke,2),at=i(Ee);{let t=U(()=>e(b)||!e(We)||!e(A)||e(_)==="event"&&!e(O));le(at,{buttonAction:He,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,`Add ${e(_)==="event"?"Event":"To-do"}`)),u(r,c)}})}o(Ee),o(ie);var Ie=n(ie,2);{var rt=t=>{var r=kt(),s=i(r,!0);o(r),f(()=>p(s,e(D))),u(t,r)};x(Ie,t=>{e(D)&&t(rt)})}var Te=n(Ie,2);{var lt=t=>{var r=Et(),s=i(r,!0);o(r),f(()=>p(s,e(F))),u(t,r)};x(Te,t=>{e(F)&&t(lt)})}var Ae=n(Te,2),De=n(i(Ae),4);S(De,{label:"Feed URL",id:"caldav-feed-url",type:"url",placeholder:"https://example.org/holidays.ics",get value(){return e(X)},set value(t){a(X,t,!0)}});var ue=n(De,2),Fe=i(ue);fe(Fe),I(),o(ue);var pe=n(ue,2),nt=i(pe);{let t=U(()=>e(Y)||!e(B)||!e(X));le(nt,{buttonAction:Ge,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,e(Y)?"Reading…":"Read Feed")),u(r,c)}})}o(pe);var Pe=n(pe,2);{var st=t=>{var r=It(),s=i(r,!0);o(r),f(()=>p(s,e(Z))),u(t,r)};x(Pe,t=>{e(Z)&&t(st)})}var ot=n(Pe,2);{var dt=t=>{var r=At(),s=ae(r),c=i(s);o(s);var g=n(s,2);Oe(g,23,()=>e(q),(w,y)=>`${y}:${w.id}`,(w,y)=>{var P=Tt(),H=i(P),it=i(H,!0);o(H);var je=n(H,2),Ue=i(je),Be=n(Ue);{var ct=E=>{var J=j();f(pt=>p(J,`· ${pt??""}`),[()=>be(e(y))]),u(E,J)};x(Be,E=>{be(e(y))&&E(ct)})}var vt=n(Be,2);{var ut=E=>{var J=j();f(()=>p(J,`· ${e(y).location??""}`)),u(E,J)};x(vt,E=>{e(y).location&&E(ut)})}o(je),o(P),f(()=>{p(it,e(y).name),p(Ue,`${e(y).type==="task"?"To-do":"Event"} `)}),u(w,P)}),o(g),f(()=>p(c,`${e(_e)||"Feed"} (${e(q).length??""})`)),u(t,r)};x(ot,t=>{e(q).length>0&&t(dt)})}o(Ae),f((t,r)=>{z.disabled=t,G.disabled=r},[()=>!!(e(k)&&!e(k).components.includes("event")),()=>!!(e(k)&&!e(k).components.includes("task"))]),Le(me,[],z,()=>e(_),t=>a(_,t)),Le(me,[],G,()=>e(_),t=>a(_,t)),xt(Fe,()=>e(ne),t=>a(ne,t)),u(l,h)}}),gt()}export{Ot as component};
1
+ import{f as m,t as j,s as p,a as u}from"../chunks/BrzeKAzG.js";import{p as ft,s as d,a as Re,b as gt,f as ae,c as n,d as i,e as a,g as e,n as I,t as f,u as U,r as o}from"../chunks/k-cRz8DS.js";import{i as x}from"../chunks/Dn5i8FcP.js";import{r as fe,e as Oe,b as mt,a as _t,c as re,s as bt,d as ge}from"../chunks/BPju5WGe.js";import{B as yt,S as le,b as Le,a as xt}from"../chunks/Bige9f4F.js";import{F as S}from"../chunks/peuwRZld.js";var ht=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),wt=m('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),St=m("<option> </option>"),$t=m('<label for="caldav-calendar" class="block text-sm font-semibold text-gray-700">Calendar</label> <select id="caldav-calendar" class="w-full rounded-lg border border-gray-300 bg-white px-4 py-3"></select>',1),Ct=m("<!> <!>",1),kt=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Et=m('<div class="rounded-lg border border-green-200 bg-green-50 p-4 text-sm text-green-800" role="status"> </div>'),It=m('<div class="rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800" role="alert"> </div>'),Tt=m('<li class="flex flex-col gap-1 px-4 py-3 text-sm"><span class="font-medium text-gray-900"> </span> <span class="text-gray-600"> <!> <!></span></li>'),At=m('<h3 class="text-sm font-semibold text-gray-700"> </h3> <ul class="divide-y divide-gray-200 rounded-lg border border-gray-200 bg-white"></ul>',1),Dt=m('<section class="space-y-4"><h2 class="text-xl font-semibold text-gray-900">1. Set credentials</h2> <p class="text-sm text-gray-600">Use an app password when your calendar provider supports one. Credentials stay in this Sockethub session.</p> <!> <!> <!> <!> <div class="flex justify-end"><!></div> <!> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">2. Choose a calendar</h2> <div class="flex justify-end"><!></div> <!></section> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">3. Add an item</h2> <div class="flex gap-6"><label class="flex items-center gap-2"><input type="radio"/> Event</label> <label class="flex items-center gap-2"><input type="radio"/> To-do</label></div> <!> <!> <div class="flex justify-end"><!></div></section> <!> <!> <section class="space-y-4 border-t border-gray-200 pt-6"><h2 class="text-xl font-semibold text-gray-900">Read a published iCalendar feed</h2> <p class="text-sm text-gray-600">Public .ics and webcal:// links need no credentials. Sockethub fetches the feed and lists its items.</p> <!> <label class="flex items-center gap-2 text-sm text-gray-700"><input type="checkbox"/> Upcoming items only</label> <div class="flex justify-end"><!></div> <!> <!></section>',1);function Ot(Ve,Ne){ft(Ne,!0);const me=[];let B=d("caldav:alice"),K=d(""),M=d(""),Q=d(""),T=d(!1),$=d(Re([])),R=d(""),_=d("event"),A=d(""),O=d(""),L=d(""),V=d(""),b=d(!1),D=d(null),F=d(null),N=d(null),W=d(null),X=d(""),ne=d(!0),_e=d(""),q=d(Re([])),Y=d(!1),Z=d(null);const k=U(()=>e($).find(l=>l.id===e(R))),We=U(()=>{var l;return((l=e(k))==null?void 0:l.components.includes(e(_)))??!1});function ee(){return{id:e(B),type:"person"}}function te(){e(T)&&(a(T,!1),a($,[],!0),a(R,""),a(N,null),a(W,null))}async function qe(){a(N,null),a(W,null),a(b,!0);try{await _t();const l={"@context":await re("caldav"),type:"credentials",actor:ee(),object:{type:"credentials",url:e(K),username:e(M),password:e(Q)}};await new Promise((v,h)=>{bt.socket.emit("credentials",l,C=>{if(C!=null&&C.error){h(new Error(C.error));return}v()})}),a(T,!0),a(W,"Credentials set for this Sockethub session.")}catch(l){a(N,l instanceof Error?l.message:String(l),!0)}finally{a(b,!1)}}async function ze(){var l;a(D,null),a(F,null),a(b,!0);try{const v=await ge({"@context":await re("caldav"),type:"fetch",actor:ee()});a($,(v.items??[]).filter(h=>h.type==="calendar"&&typeof h.id=="string"&&typeof h.name=="string"&&Array.isArray(h.components)),!0),a(R,((l=e($)[0])==null?void 0:l.id)??"",!0),a(F,`Found ${e($).length} calendar${e($).length===1?"":"s"}.`)}catch(v){a(D,v instanceof Error?v.message:String(v),!0)}finally{a(b,!1)}}async function Ge(){a(Z,null),a(Y,!0);try{const l=await ge({"@context":await re("caldav"),type:"read",actor:ee(),target:{id:e(X),type:"feed"},...e(ne)?{object:{startTime:new Date().toISOString()}}:{}});a(_e,typeof l.summary=="string"?l.summary:"",!0),a(q,(l.items??[]).filter(v=>(v.type==="event"||v.type==="task")&&typeof v.name=="string"),!0)}catch(l){a(q,[],!0),a(Z,l instanceof Error?l.message:String(l),!0)}finally{a(Y,!1)}}function be(l){const v=l.startTime??l.due;return v?l.allDay||!v.includes("T")?v:new Date(v).toLocaleString():""}async function He(){if(e(k)){a(D,null),a(F,null),a(b,!0);try{const l=e(_)==="event"?{type:"event",name:e(A),startTime:new Date(e(O)).toISOString(),...e(L)?{endTime:new Date(e(L)).toISOString()}:{}}:{type:"task",name:e(A),...e(V)?{due:new Date(e(V)).toISOString()}:{}};await ge({"@context":await re("caldav"),type:"create",actor:ee(),target:{id:e(k).id,type:"calendar"},object:l}),a(F,`${e(_)==="event"?"Event":"To-do"} created.`),a(A,""),a(O,""),a(L,""),a(V,"")}catch(l){a(D,l instanceof Error?l.message:String(l),!0)}finally{a(b,!1)}}}yt(Ve,{title:"CalDAV Platform Example",description:"Discover the calendars in a CalDAV account and add an event or to-do, or list the events in a published .ics feed.",children:(l,v)=>{var h=Dt(),C=ae(h),ye=n(i(C),4);S(ye,{label:"Actor ID",id:"caldav-actor",placeholder:"caldav:alice",onInput:te,get value(){return e(B)},set value(t){a(B,t,!0)}});var xe=n(ye,2);S(xe,{label:"CalDAV URL",id:"caldav-url",type:"url",placeholder:"https://calendar.example/dav/",onInput:te,get value(){return e(K)},set value(t){a(K,t,!0)}});var he=n(xe,2);S(he,{label:"Username",id:"caldav-username",onInput:te,get value(){return e(M)},set value(t){a(M,t,!0)}});var we=n(he,2);S(we,{label:"Password",id:"caldav-password",type:"password",onInput:te,get value(){return e(Q)},set value(t){a(Q,t,!0)}});var se=n(we,2),Je=i(se);{let t=U(()=>e(T)||e(b)||!e(B)||!e(K)||!e(M)||!e(Q));le(Je,{buttonAction:qe,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,e(T)?"Credentials Set":e(b)?"Setting Credentials…":"Set Credentials")),u(r,c)}})}o(se);var Se=n(se,2);{var Ke=t=>{var r=ht(),s=i(r,!0);o(r),f(()=>p(s,e(N))),u(t,r)};x(Se,t=>{e(N)&&t(Ke)})}var Me=n(Se,2);{var Qe=t=>{var r=wt(),s=i(r,!0);o(r),f(()=>p(s,e(W))),u(t,r)};x(Me,t=>{e(W)&&t(Qe)})}o(C);var oe=n(C,2),de=n(i(oe),2),Xe=i(de);{let t=U(()=>e(b)||!e(T));le(Xe,{buttonAction:ze,get disabled(){return e(t)},children:(r,s)=>{I();var c=j("Fetch Calendars");u(r,c)}})}o(de);var Ye=n(de,2);{var Ze=t=>{var r=$t(),s=n(ae(r),2);Oe(s,21,()=>e($),c=>c.id,(c,g)=>{var w=St(),y=i(w);o(w);var P={};f(H=>{p(y,`${e(g).name??""} (${H??""})`),P!==(P=e(g).id)&&(w.value=(w.__value=e(g).id)??"")},[()=>e(g).components.join(", ")]),u(c,w)}),o(s),mt(s,()=>e(R),c=>a(R,c)),u(t,r)};x(Ye,t=>{e($).length>0&&t(Ze)})}o(oe);var ie=n(oe,2),ce=n(i(ie),2),ve=i(ce),z=i(ve);fe(z),z.value=z.__value="event",I(),o(ve);var $e=n(ve,2),G=i($e);fe(G),G.value=G.__value="task",I(),o($e),o(ce);var Ce=n(ce,2);S(Ce,{label:"Name",id:"caldav-item-name",get value(){return e(A)},set value(t){a(A,t,!0)}});var ke=n(Ce,2);{var et=t=>{var r=Ct(),s=ae(r);S(s,{label:"Starts",id:"caldav-start",type:"datetime-local",get value(){return e(O)},set value(g){a(O,g,!0)}});var c=n(s,2);S(c,{label:"Ends (optional)",id:"caldav-end",type:"datetime-local",get value(){return e(L)},set value(g){a(L,g,!0)}}),u(t,r)},tt=t=>{S(t,{label:"Due (optional)",id:"caldav-due",type:"datetime-local",get value(){return e(V)},set value(r){a(V,r,!0)}})};x(ke,t=>{e(_)==="event"?t(et):t(tt,!1)})}var Ee=n(ke,2),at=i(Ee);{let t=U(()=>e(b)||!e(We)||!e(A)||e(_)==="event"&&!e(O));le(at,{buttonAction:He,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,`Add ${e(_)==="event"?"Event":"To-do"}`)),u(r,c)}})}o(Ee),o(ie);var Ie=n(ie,2);{var rt=t=>{var r=kt(),s=i(r,!0);o(r),f(()=>p(s,e(D))),u(t,r)};x(Ie,t=>{e(D)&&t(rt)})}var Te=n(Ie,2);{var lt=t=>{var r=Et(),s=i(r,!0);o(r),f(()=>p(s,e(F))),u(t,r)};x(Te,t=>{e(F)&&t(lt)})}var Ae=n(Te,2),De=n(i(Ae),4);S(De,{label:"Feed URL",id:"caldav-feed-url",type:"url",placeholder:"https://example.org/holidays.ics",get value(){return e(X)},set value(t){a(X,t,!0)}});var ue=n(De,2),Fe=i(ue);fe(Fe),I(),o(ue);var pe=n(ue,2),nt=i(pe);{let t=U(()=>e(Y)||!e(B)||!e(X));le(nt,{buttonAction:Ge,get disabled(){return e(t)},children:(r,s)=>{I();var c=j();f(()=>p(c,e(Y)?"Reading…":"Read Feed")),u(r,c)}})}o(pe);var Pe=n(pe,2);{var st=t=>{var r=It(),s=i(r,!0);o(r),f(()=>p(s,e(Z))),u(t,r)};x(Pe,t=>{e(Z)&&t(st)})}var ot=n(Pe,2);{var dt=t=>{var r=At(),s=ae(r),c=i(s);o(s);var g=n(s,2);Oe(g,23,()=>e(q),(w,y)=>`${y}:${w.id}`,(w,y)=>{var P=Tt(),H=i(P),it=i(H,!0);o(H);var je=n(H,2),Ue=i(je),Be=n(Ue);{var ct=E=>{var J=j();f(pt=>p(J,`· ${pt??""}`),[()=>be(e(y))]),u(E,J)};x(Be,E=>{be(e(y))&&E(ct)})}var vt=n(Be,2);{var ut=E=>{var J=j();f(()=>p(J,`· ${e(y).location??""}`)),u(E,J)};x(vt,E=>{e(y).location&&E(ut)})}o(je),o(P),f(()=>{p(it,e(y).name),p(Ue,`${e(y).type==="task"?"To-do":"Event"} `)}),u(w,P)}),o(g),f(()=>p(c,`${e(_e)||"Feed"} (${e(q).length??""})`)),u(t,r)};x(ot,t=>{e(q).length>0&&t(dt)})}o(Ae),f((t,r)=>{z.disabled=t,G.disabled=r},[()=>!!(e(k)&&!e(k).components.includes("event")),()=>!!(e(k)&&!e(k).components.includes("task"))]),Le(me,[],z,()=>e(_),t=>a(_,t)),Le(me,[],G,()=>e(_),t=>a(_,t)),xt(Fe,()=>e(ne),t=>a(ne,t)),u(l,h)}}),gt()}export{Ot as component};
@@ -1,2 +1,2 @@
1
- import{f as k,a as y}from"../chunks/BrzeKAzG.js";import{p as Q,b as T,c as t,f as U,d as n,w as J,g as e,u as P,r as d,n as W,s as S,t as Z,e as p,h as c}from"../chunks/k-cRz8DS.js";import{s as ee,b as te,m as re,a as R,i as se,c as _}from"../chunks/Dn5i8FcP.js";import{r as oe,I as ae,d as ne,c as de}from"../chunks/DbhdhNIA.js";import{B as ce,c as ie}from"../chunks/CT5jku5V.js";import{A as le}from"../chunks/BoJm-rJp.js";import{A as pe,C as me,P as ge,R as ue,S as be}from"../chunks/CUkP7wPG.js";var ve=k('<div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 4 & 5: Join Room and Chat</h4> <div class="space-y-4"><!> <!> <!></div></div>'),he=k('<div class="bg-gray-50 border border-gray-200 rounded-lg p-4 text-center"><p class="text-gray-500">Connect to the XMPP server to access chat features</p></div>'),fe=k(`<div class="bg-indigo-50 border-l-4 border-indigo-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-indigo-800 mb-2">📨 XMPP Connection Process</h3> <p class="text-indigo-700 text-sm mb-3">XMPP (Extensible Messaging and Presence Protocol) is a real-time communication protocol used by services like Jabber.</p> <div class="text-indigo-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Your XMPP login secret, sent through the password field</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to XMPP server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a multi-user chat room</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users in real-time</div></div></div> <div class="space-y-6"><div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 1: Set Your XMPP Address</h4> <!> <p class="text-gray-600 text-sm mt-2">💡 Format: username@server.com (e.g., user@jabber.org, alice@conversations.im)</p> <!></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 2: Set Your Credentials</h4> <label class="block text-sm font-medium text-gray-700 mb-1" for="xmpp-password-input">Password</label> <input id="xmpp-password-input" type="password" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm mb-3" placeholder="your XMPP password or compatible bearer token"/> <p class="text-gray-600 text-xs mb-3">💡 If your deployment accepts a bearer-style token in the SASL PLAIN password
1
+ import{f as k,a as y}from"../chunks/BrzeKAzG.js";import{p as Q,b as T,c as t,f as U,d as n,w as J,g as e,u as P,r as d,n as W,s as S,t as Z,e as p,h as c}from"../chunks/k-cRz8DS.js";import{s as ee,b as te,m as re,a as R,i as se,c as _}from"../chunks/Dn5i8FcP.js";import{r as oe,I as ae,d as ne,c as de}from"../chunks/BPju5WGe.js";import{B as ce,c as ie}from"../chunks/Bige9f4F.js";import{A as le}from"../chunks/BqL0wH9S.js";import{A as pe,C as me,P as ge,R as ue,S as be}from"../chunks/DpVTR4Ke.js";var ve=k('<div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 4 & 5: Join Room and Chat</h4> <div class="space-y-4"><!> <!> <!></div></div>'),he=k('<div class="bg-gray-50 border border-gray-200 rounded-lg p-4 text-center"><p class="text-gray-500">Connect to the XMPP server to access chat features</p></div>'),fe=k(`<div class="bg-indigo-50 border-l-4 border-indigo-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-indigo-800 mb-2">📨 XMPP Connection Process</h3> <p class="text-indigo-700 text-sm mb-3">XMPP (Extensible Messaging and Presence Protocol) is a real-time communication protocol used by services like Jabber.</p> <div class="text-indigo-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Your XMPP login secret, sent through the password field</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to XMPP server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a multi-user chat room</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users in real-time</div></div></div> <div class="space-y-6"><div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 1: Set Your XMPP Address</h4> <!> <p class="text-gray-600 text-sm mt-2">💡 Format: username@server.com (e.g., user@jabber.org, alice@conversations.im)</p> <!></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 2: Set Your Credentials</h4> <label class="block text-sm font-medium text-gray-700 mb-1" for="xmpp-password-input">Password</label> <input id="xmpp-password-input" type="password" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm mb-3" placeholder="your XMPP password or compatible bearer token"/> <p class="text-gray-600 text-xs mb-3">💡 If your deployment accepts a bearer-style token in the SASL PLAIN password
2
2
  slot, enter that token here. Sockethub's XMPP platform still submits it as <code>password</code>.</p> <!> <p class="text-gray-600 text-sm mt-2">🔐 Sockethub's XMPP platform accepts a single <code>password</code> field.</p></div> <div class="bg-white border border-gray-200 rounded-lg p-4"><h4 class="font-semibold text-gray-800 mb-3">Step 3: Connect to XMPP Server</h4> <!></div> <!></div>`,1);function Xe(F,Y){Q(Y,!0);const m=()=>R(M,"$actorIdStore",w),o=()=>R(s,"$sockethubState",w),[w,B]=ee(),M=J("user@jabber.org");let g=S(!1),u=S("123456"),X=P(()=>`${m()}/SockethubExample`),b=S("kosmos-random@kosmos.chat");const s=J({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let a=P(()=>({id:e(X),type:"person",name:e(X)})),L=P(()=>({type:"credentials",userAddress:m(),resource:"SockethubExample",password:e(u)}));async function N(){p(g,!0);try{await ne({"@context":await de("xmpp"),type:"connect",actor:{id:e(a).id,type:e(a).type,name:e(a).name}}),_(s,c(o).connected=!0,c(o))}catch(v){console.error(v),_(s,c(o).connected=!1,c(o)),_(s,c(o).joined=!1,c(o))}finally{p(g,!1)}}ce(F,{title:"XMPP Platform Example",description:"Connect to XMPP servers (Jabber), join multi-user chats, and exchange messages using Sockethub's XMPP platform.",children:(v,xe)=>{var C=fe(),A=t(U(C),2),h=n(A),I=t(n(h),2);pe(I,{get value(){return re(),m()},set value(r){te(M,r)}});var O=t(I,4);le(O,{get actor(){return e(a)},get sockethubState(){return s}}),d(h);var f=t(h,2),l=t(n(f),4);oe(l);var V=t(l,4);me(V,{context:"xmpp",get credentials(){return e(L)},get actor(){return e(a)},get sockethubState(){return s}}),W(2),d(f);var x=t(f,2),q=t(n(x),2);ge(q,{get sockethubState(){return s},get connecting(){return e(g)},onConnect:N}),d(x);var z=t(x,2);{var D=r=>{var i=ve(),$=t(n(i),2),E=n($);ue(E,{get actor(){return e(a)},get sockethubState(){return s},context:"xmpp",get room(){return e(b)},set room(K){p(b,K,!0)}});var j=t(E,2);ae(j,{});var H=t(j,2);be(H,{context:"xmpp",get actor(){return e(a)},get sockethubState(){return s},get room(){return e(b)}}),d($),d(i),y(r,i)},G=r=>{var i=he();y(r,i)};se(z,r=>{o().connected?r(D):r(G,!1)})}d(A),Z(()=>l.disabled=o().credentialsSet),ie(l,()=>e(u),r=>p(u,r)),y(v,C)}}),T(),B()}export{Xe as component};
@@ -1 +1 @@
1
- import"../chunks/BrzeKAzG.js";import"../chunks/BJctjvPM.js";import{M as t}from"../chunks/DmYLKglP.js";function r(o){t(o,{platform:"instagram"})}export{r as component};
1
+ import"../chunks/BrzeKAzG.js";import"../chunks/BJctjvPM.js";import{M as t}from"../chunks/Bfx7qmE-.js";function r(o){t(o,{platform:"instagram"})}export{r as component};
@@ -1 +1 @@
1
- import{f as w,a as C}from"../chunks/BrzeKAzG.js";import{p as ee,w as B,b as te,c as t,f as re,d as o,g as e,u as q,r as a,e as v,s as u,h as i}from"../chunks/k-cRz8DS.js";import{s as se,b as oe,m as ae,a as z,i as ne,c as S}from"../chunks/Dn5i8FcP.js";import{A as de}from"../chunks/BoJm-rJp.js";import{A as ce,C as ie,P as le,R as ve,S as me}from"../chunks/CUkP7wPG.js";import{B as ue}from"../chunks/CT5jku5V.js";import{F as N}from"../chunks/CDWD0DpS.js";import{I as ge,d as pe,c as be}from"../chunks/DbhdhNIA.js";var fe=w('<div class="bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-emerald-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-emerald-600 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span> Join Channel and Chat</h4> <div class="space-y-6"><!> <!> <!></div></div>'),he=w('<div class="bg-gradient-to-r from-gray-50 to-slate-50 border border-gray-200 rounded-xl p-6 text-center shadow-sm"><div class="flex items-center justify-center mb-3"><span class="w-8 h-8 bg-gray-400 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span></div> <p class="text-gray-600 font-medium">Connect to the IRC server to access chat features</p> <p class="text-gray-500 text-sm mt-1">Complete steps 1-3 above to unlock this section</p></div>'),xe=w('<div class="bg-orange-50 border-l-4 border-orange-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-orange-800 mb-2">💬 IRC Connection Process</h3> <p class="text-orange-700 text-sm mb-3">IRC (Internet Relay Chat) requires several steps to get connected and chatting.</p> <div class="text-orange-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Provide server connection details</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to IRC server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a channel to start chatting</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users</div></div></div> <div class="space-y-6"><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-3 w-8 h-8 bg-green-600 text-white rounded-full flex items-center justify-center text-sm font-bold">1</span> Confirm your actor</h4> <div class="space-y-4"><!> <!></div></div> <div class="bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-blue-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold">2</span> Configure Server Connection</h4> <div class="space-y-4"><div class="grid md:grid-cols-2 gap-4"><!> <!></div> <div class="bg-blue-100 border border-blue-200 rounded-lg p-3"><p class="text-blue-800 text-sm">💡 <strong>Popular IRC networks:</strong> irc.libera.chat, irc.oftc.net, irc.rizon.net</p></div> <!></div></div> <div class="bg-gradient-to-r from-purple-50 to-violet-50 border border-purple-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-purple-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold">3</span> Connect to Server</h4> <!></div> <!></div>',1);function je(O,D){ee(D,!0);const m=()=>z(k,"$actorIdStore",I),n=()=>z(s,"$sockethubState",I),[I,G]=se(),k=B(`sh-${(Math.random()+1).toString(36).substring(7)}`);let c=u("irc.libera.chat"),g=u(6697),p=u("#sh-random"),b=u(!1);const s=B({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let d=q(()=>({id:`${m()}@${e(c)}`,type:"person",name:m()})),H=q(()=>({type:"credentials",nick:m(),server:e(c),port:e(g),secure:!0}));async function K(){v(b,!0);try{await pe({"@context":await be("irc"),type:"connect",actor:{id:e(d).id,type:e(d).type,name:e(d).name}}),S(s,i(n).connected=!0,i(n))}catch(f){console.error(f),S(s,i(n).connected=!1,i(n)),S(s,i(n).joined=!1,i(n))}finally{v(b,!1)}}ue(O,{title:"IRC Platform Example",description:"Connect to IRC servers, join channels, and send messages using Sockethub's IRC platform.",children:(f,_e)=>{var R=xe(),$=t(re(R),2),h=o($),j=t(o(h),2),P=o(j);ce(P,{get value(){return ae(),m()},set value(r){oe(k,r)}});var L=t(P,2);de(L,{get actor(){return e(d)},get sockethubState(){return s}}),a(j),a(h);var x=t(h,2),A=t(o(x),2),_=o(A),F=o(_);N(F,{label:"IRC Server",id:"server",placeholder:"irc.libera.chat",get value(){return e(c)},set value(r){v(c,r,!0)}});var Q=t(F,2);N(Q,{label:"Port",id:"port",type:"number",placeholder:"6697",get value(){return e(g)},set value(r){v(g,r,!0)}}),a(_);var T=t(_,4);ie(T,{context:"irc",get credentials(){return e(H)},get actor(){return e(d)},get sockethubState(){return s}}),a(A),a(x);var y=t(x,2),U=t(o(y),2);le(U,{get sockethubState(){return s},get connecting(){return e(b)},onConnect:K}),a(y);var V=t(y,2);{var W=r=>{var l=fe(),E=t(o(l),2),M=o(E);ve(M,{get actor(){return e(d)},get sockethubState(){return s},context:"irc",get server(){return e(c)},get room(){return e(p)},set room(Z){v(p,Z,!0)}});var J=t(M,2);ge(J,{});var Y=t(J,2);me(Y,{context:"irc",get actor(){return e(d)},get sockethubState(){return s},get room(){return e(p)},get server(){return e(c)}}),a(E),a(l),C(r,l)},X=r=>{var l=he();C(r,l)};ne(V,r=>{n().connected?r(W):r(X,!1)})}a($),C(f,R)}}),te(),G()}export{je as component};
1
+ import{f as w,a as C}from"../chunks/BrzeKAzG.js";import{p as ee,w as B,b as te,c as t,f as re,d as o,g as e,u as q,r as a,e as v,s as u,h as i}from"../chunks/k-cRz8DS.js";import{s as se,b as oe,m as ae,a as z,i as ne,c as S}from"../chunks/Dn5i8FcP.js";import{A as de}from"../chunks/BqL0wH9S.js";import{A as ce,C as ie,P as le,R as ve,S as me}from"../chunks/DpVTR4Ke.js";import{B as ue}from"../chunks/Bige9f4F.js";import{F as N}from"../chunks/peuwRZld.js";import{I as ge,d as pe,c as be}from"../chunks/BPju5WGe.js";var fe=w('<div class="bg-gradient-to-r from-emerald-50 to-green-50 border border-emerald-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-emerald-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-emerald-600 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span> Join Channel and Chat</h4> <div class="space-y-6"><!> <!> <!></div></div>'),he=w('<div class="bg-gradient-to-r from-gray-50 to-slate-50 border border-gray-200 rounded-xl p-6 text-center shadow-sm"><div class="flex items-center justify-center mb-3"><span class="w-8 h-8 bg-gray-400 text-white rounded-full flex items-center justify-center text-sm font-bold">4</span></div> <p class="text-gray-600 font-medium">Connect to the IRC server to access chat features</p> <p class="text-gray-500 text-sm mt-1">Complete steps 1-3 above to unlock this section</p></div>'),xe=w('<div class="bg-orange-50 border-l-4 border-orange-400 p-4 rounded-r-lg mb-6"><h3 class="text-lg font-semibold text-orange-800 mb-2">💬 IRC Connection Process</h3> <p class="text-orange-700 text-sm mb-3">IRC (Internet Relay Chat) requires several steps to get connected and chatting.</p> <div class="text-orange-700 text-sm space-y-1"><div><strong>1. 🎭 Actor:</strong> JSON object with <code>id</code>, <code>type</code>, and <code>name</code></div> <div><strong>2. 🔐 Set Credentials:</strong> Provide server connection details</div> <div><strong>3. 🔌 Connect:</strong> Establish connection to IRC server</div> <div><strong>4. 🏠 Join Room:</strong> Enter a channel to start chatting</div> <div><strong>5. 💬 Send Messages:</strong> Chat with other users</div></div></div> <div class="space-y-6"><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-3 w-8 h-8 bg-green-600 text-white rounded-full flex items-center justify-center text-sm font-bold">1</span> Confirm your actor</h4> <div class="space-y-4"><!> <!></div></div> <div class="bg-gradient-to-r from-blue-50 to-sky-50 border border-blue-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-blue-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-blue-600 text-white rounded-full flex items-center justify-center text-sm font-bold">2</span> Configure Server Connection</h4> <div class="space-y-4"><div class="grid md:grid-cols-2 gap-4"><!> <!></div> <div class="bg-blue-100 border border-blue-200 rounded-lg p-3"><p class="text-blue-800 text-sm">💡 <strong>Popular IRC networks:</strong> irc.libera.chat, irc.oftc.net, irc.rizon.net</p></div> <!></div></div> <div class="bg-gradient-to-r from-purple-50 to-violet-50 border border-purple-200 rounded-xl p-6 shadow-sm"><h4 class="text-lg font-bold text-purple-900 mb-4 flex items-center"><span class="mr-3 w-8 h-8 bg-purple-600 text-white rounded-full flex items-center justify-center text-sm font-bold">3</span> Connect to Server</h4> <!></div> <!></div>',1);function je(O,D){ee(D,!0);const m=()=>z(k,"$actorIdStore",I),n=()=>z(s,"$sockethubState",I),[I,G]=se(),k=B(`sh-${(Math.random()+1).toString(36).substring(7)}`);let c=u("irc.libera.chat"),g=u(6697),p=u("#sh-random"),b=u(!1);const s=B({actorSet:!1,credentialsSet:!1,connected:!1,joined:!1});let d=q(()=>({id:`${m()}@${e(c)}`,type:"person",name:m()})),H=q(()=>({type:"credentials",nick:m(),server:e(c),port:e(g),secure:!0}));async function K(){v(b,!0);try{await pe({"@context":await be("irc"),type:"connect",actor:{id:e(d).id,type:e(d).type,name:e(d).name}}),S(s,i(n).connected=!0,i(n))}catch(f){console.error(f),S(s,i(n).connected=!1,i(n)),S(s,i(n).joined=!1,i(n))}finally{v(b,!1)}}ue(O,{title:"IRC Platform Example",description:"Connect to IRC servers, join channels, and send messages using Sockethub's IRC platform.",children:(f,_e)=>{var R=xe(),$=t(re(R),2),h=o($),j=t(o(h),2),P=o(j);ce(P,{get value(){return ae(),m()},set value(r){oe(k,r)}});var L=t(P,2);de(L,{get actor(){return e(d)},get sockethubState(){return s}}),a(j),a(h);var x=t(h,2),A=t(o(x),2),_=o(A),F=o(_);N(F,{label:"IRC Server",id:"server",placeholder:"irc.libera.chat",get value(){return e(c)},set value(r){v(c,r,!0)}});var Q=t(F,2);N(Q,{label:"Port",id:"port",type:"number",placeholder:"6697",get value(){return e(g)},set value(r){v(g,r,!0)}}),a(_);var T=t(_,4);ie(T,{context:"irc",get credentials(){return e(H)},get actor(){return e(d)},get sockethubState(){return s}}),a(A),a(x);var y=t(x,2),U=t(o(y),2);le(U,{get sockethubState(){return s},get connecting(){return e(b)},onConnect:K}),a(y);var V=t(y,2);{var W=r=>{var l=fe(),E=t(o(l),2),M=o(E);ve(M,{get actor(){return e(d)},get sockethubState(){return s},context:"irc",get server(){return e(c)},get room(){return e(p)},set room(Z){v(p,Z,!0)}});var J=t(M,2);ge(J,{});var Y=t(J,2);me(Y,{context:"irc",get actor(){return e(d)},get sockethubState(){return s},get room(){return e(p)},get server(){return e(c)}}),a(E),a(l),C(r,l)},X=r=>{var l=he();C(r,l)};ne(V,r=>{n().connected?r(W):r(X,!1)})}a($),C(f,R)}}),te(),G()}export{je as component};
@@ -1 +1 @@
1
- {"version":"1793976722476"}
1
+ {"version":"1794082289171"}
package/build/caldav.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
package/build/dummy.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
package/build/email.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
package/build/feeds.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
package/build/index.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="/examples/_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="/examples/_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="/examples/_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="/examples/_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="/examples/_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="/examples/_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="/examples/_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="/examples/_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="/examples/_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="/examples/_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="/examples/_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: "/examples",
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("/examples/_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("/examples/_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("/examples/_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("/examples/_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
package/build/irc.html CHANGED
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });
@@ -8,11 +8,11 @@
8
8
  <link rel="alternate icon" href="/favicon.ico" type="image/x-icon" />
9
9
  <meta name="viewport" content="width=device-width" />
10
10
 
11
- <link rel="modulepreload" href="./_app/immutable/entry/start.CjxPNHHO.js">
12
- <link rel="modulepreload" href="./_app/immutable/chunks/Cdx-st7a.js">
11
+ <link rel="modulepreload" href="./_app/immutable/entry/start.VoXZusO8.js">
12
+ <link rel="modulepreload" href="./_app/immutable/chunks/BqVGmFmc.js">
13
13
  <link rel="modulepreload" href="./_app/immutable/chunks/k-cRz8DS.js">
14
- <link rel="modulepreload" href="./_app/immutable/chunks/Cl-XOB7Z.js">
15
- <link rel="modulepreload" href="./_app/immutable/entry/app.9VcJfFEV.js">
14
+ <link rel="modulepreload" href="./_app/immutable/chunks/D4JoyovE.js">
15
+ <link rel="modulepreload" href="./_app/immutable/entry/app.CdcIotKP.js">
16
16
  <link rel="modulepreload" href="./_app/immutable/chunks/Dn5i8FcP.js">
17
17
  <link rel="modulepreload" href="./_app/immutable/chunks/BrzeKAzG.js">
18
18
  </head>
@@ -20,7 +20,7 @@
20
20
  <div class="container mx-auto pl-2 pr-2 pt-2">
21
21
  <script>
22
22
  {
23
- __sveltekit_b0qjcj = {
23
+ __sveltekit_hn9xps = {
24
24
  base: new URL(".", location).pathname.slice(0, -1),
25
25
  assets: "/examples"
26
26
  };
@@ -28,8 +28,8 @@
28
28
  const element = document.currentScript.parentElement;
29
29
 
30
30
  Promise.all([
31
- import("./_app/immutable/entry/start.CjxPNHHO.js"),
32
- import("./_app/immutable/entry/app.9VcJfFEV.js")
31
+ import("./_app/immutable/entry/start.VoXZusO8.js"),
32
+ import("./_app/immutable/entry/app.CdcIotKP.js")
33
33
  ]).then(([kit, app]) => {
34
34
  kit.start(app, element);
35
35
  });