mirror of
https://github.com/pockethost/pockethost.git
synced 2025-06-11 16:46:40 +00:00
2 lines
2.7 KiB
JavaScript
2 lines
2.7 KiB
JavaScript
import{s as P,a as C,f as h,D as j,d as u,c as I,g as _,h as k,x as L,j as m,i as E,y as p,z as S,C as g,l as z,m as M,n as T,G as Y}from"../chunks/scheduler.de195056.js";import{S as G,i as N,t as V,c as B,a as q,g as F,f as A}from"../chunks/index.c6f2ad36.js";import{p as J}from"../chunks/stores.6150b2da.js";import{s as H}from"../chunks/index.3f7c9ec2.js";import{e as K}from"../chunks/database.5ddaa35e.js";function O(d){let e,r='<span class="visually-hidden">Loading...</span>';return{c(){e=h("div"),e.innerHTML=r,this.h()},l(a){e=_(a,"DIV",{class:!0,role:!0,"data-svelte-h":!0}),L(e)!=="svelte-qqqp01"&&(e.innerHTML=r),this.h()},h(){m(e,"class","spinner-border mx-auto"),m(e,"role","status")},m(a,s){E(a,e,s)},p:g,i:g,o:g,d(a){a&&u(e)}}}function Q(d){let e,r,a,s,i,c,o;return{c(){e=h("div"),r=h("i"),a=C(),s=h("span"),i=z(d[0]),this.h()},l(t){e=_(t,"DIV",{class:!0});var n=k(e);r=_(n,"I",{class:!0}),k(r).forEach(u),a=I(n),s=_(n,"SPAN",{});var x=k(s);i=M(x,d[0]),x.forEach(u),n.forEach(u),this.h()},h(){m(r,"class","fa-solid fa-circle-exclamation"),m(e,"class","alert alert-error mb-5")},m(t,n){E(t,e,n),p(e,r),p(e,a),p(e,s),p(s,i),o=!0},p(t,n){(!o||n&1)&&T(i,t[0])},i(t){o||(t&&Y(()=>{o&&(c||(c=A(e,H,{},!0)),c.run(1))}),o=!0)},o(t){t&&(c||(c=A(e,H,{},!1)),c.run(0)),o=!1},d(t){t&&u(e),t&&c&&c.end()}}}function R(d){let e,r,a,s,i,c="Confirming Your Account",o,t,n;const x=[Q,O],f=[];function w(l,v){return l[0]?0:1}return t=w(d),n=f[t]=x[t](d),{c(){e=C(),r=h("div"),a=h("div"),s=h("div"),i=h("h2"),i.textContent=c,o=C(),n.c(),this.h()},l(l){j("svelte-1vfovme",document.head).forEach(u),e=I(l),r=_(l,"DIV",{class:!0});var b=k(r);a=_(b,"DIV",{class:!0});var D=k(a);s=_(D,"DIV",{class:!0});var y=k(s);i=_(y,"H2",{class:!0,"data-svelte-h":!0}),L(i)!=="svelte-7s58jf"&&(i.textContent=c),o=I(y),n.l(y),y.forEach(u),D.forEach(u),b.forEach(u),this.h()},h(){document.title="Confirming Your Account - PocketHost",m(i,"class","mb-4"),m(s,"class","card-body text-center"),m(a,"class","card w-96 bg-zinc-900 mx-auto shadow-xl overflow-hidden"),m(r,"class","min-h-screen flex items-center justify-center")},m(l,v){E(l,e,v),E(l,r,v),p(r,a),p(a,s),p(s,i),p(s,o),f[t].m(s,null)},p(l,[v]){let b=t;t=w(l),t===b?f[t].p(l,v):(F(),V(f[b],1,1,()=>{f[b]=null}),B(),n=f[t],n?n.p(l,v):(n=f[t]=x[t](l),n.c()),q(n,1),n.m(s,null))},i(l){q(n)},o(l){V(n)},d(l){l&&(u(e),u(r)),f[t].d()}}}function U(d,e,r){let a;S(d,J,o=>r(2,a=o));let s="",i="";const c=async()=>{if(!s)throw new Error("Expected valid token here");await K(s,o=>{r(0,i=o)})};return d.$$.update=()=>{var o,t;d.$$.dirty&6&&(r(1,s=(t=(o=a==null?void 0:a.url)==null?void 0:o.searchParams)==null?void 0:t.get("token")),s?c():r(0,i="Invalid link"))},[i,s,a]}class te extends G{constructor(e){super(),N(this,e,U,R,P,{})}}export{te as component};
|