@edge-base/server 0.2.1 → 0.2.2

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 (63) hide show
  1. package/admin-build/_app/immutable/chunks/{BY07qVPA.js → 4vlsb8ej.js} +1 -1
  2. package/admin-build/_app/immutable/chunks/{D755Tqat.js → 5PDcRlfX.js} +1 -1
  3. package/admin-build/_app/immutable/chunks/{BFs_qStz.js → B8DT4fss.js} +1 -1
  4. package/admin-build/_app/immutable/chunks/{DnLqc9L1.js → BEYYl662.js} +1 -1
  5. package/admin-build/_app/immutable/chunks/{Dqk2TGNU.js → BKXmgPq4.js} +1 -1
  6. package/admin-build/_app/immutable/chunks/{DjOEv9M9.js → BWyDPAjM.js} +1 -1
  7. package/admin-build/_app/immutable/chunks/{BcIUK2sk.js → BaCHY17I.js} +1 -1
  8. package/admin-build/_app/immutable/chunks/{B0QyxC2M.js → C-DsDCNG.js} +3 -3
  9. package/admin-build/_app/immutable/chunks/{k0CIJkw4.js → C85dMlzL.js} +1 -1
  10. package/admin-build/_app/immutable/chunks/{BsFiK_FJ.js → CPdXvRUb.js} +1 -1
  11. package/admin-build/_app/immutable/chunks/{BCKr7yKd.js → CTngeX8H.js} +1 -1
  12. package/admin-build/_app/immutable/chunks/{D-x55wdW.js → DzXaj-Ja.js} +1 -1
  13. package/admin-build/_app/immutable/chunks/{BTJcQFEp.js → c5iKSdWY.js} +1 -1
  14. package/admin-build/_app/immutable/chunks/{CqUxCvs_.js → g3ZZdY-r.js} +1 -1
  15. package/admin-build/_app/immutable/chunks/{CSGrwS7E.js → kiJ6KthZ.js} +1 -1
  16. package/admin-build/_app/immutable/chunks/{m9QZTyVV.js → qiZXAKh-.js} +1 -1
  17. package/admin-build/_app/immutable/entry/{app.BTsq3_xq.js → app.BZxfavhF.js} +2 -2
  18. package/admin-build/_app/immutable/entry/start.Mr9mmopc.js +1 -0
  19. package/admin-build/_app/immutable/nodes/{0.BZ00WDYH.js → 0.DlsaydXO.js} +1 -1
  20. package/admin-build/_app/immutable/nodes/{1.RzSJ3yyr.js → 1.D2NWN5eG.js} +1 -1
  21. package/admin-build/_app/immutable/nodes/{10.D-rsiquF.js → 10.EMDaN3nw.js} +1 -1
  22. package/admin-build/_app/immutable/nodes/{11.l7-bgtFD.js → 11.BasqQ_o9.js} +1 -1
  23. package/admin-build/_app/immutable/nodes/{12.Dkq0H7B5.js → 12.DO31Ljs7.js} +1 -1
  24. package/admin-build/_app/immutable/nodes/{13.DtK_4oRz.js → 13.DhyAy-GZ.js} +1 -1
  25. package/admin-build/_app/immutable/nodes/{14.BKo7-AMx.js → 14.CLecGWc4.js} +1 -1
  26. package/admin-build/_app/immutable/nodes/{15.CQAj_6lq.js → 15.B9kp3W4e.js} +1 -1
  27. package/admin-build/_app/immutable/nodes/{16.XVIG-Ffr.js → 16.Pu_8T3RI.js} +1 -1
  28. package/admin-build/_app/immutable/nodes/{17.g6raZLCM.js → 17.DX4z43t6.js} +1 -1
  29. package/admin-build/_app/immutable/nodes/{18.IQz6a3T6.js → 18.BKsSaxrr.js} +1 -1
  30. package/admin-build/_app/immutable/nodes/{19.CAAZ8i8h.js → 19.DXNF1htN.js} +1 -1
  31. package/admin-build/_app/immutable/nodes/{20.BPcX3KPj.js → 20.VRVb0wee.js} +1 -1
  32. package/admin-build/_app/immutable/nodes/21.Ck3_0D2f.js +1 -0
  33. package/admin-build/_app/immutable/nodes/{22.Br5AG_5Z.js → 22.DqZf4CtH.js} +1 -1
  34. package/admin-build/_app/immutable/nodes/{23.KjbrdXoE.js → 23.DtyxMiQG.js} +1 -1
  35. package/admin-build/_app/immutable/nodes/{24.C3n2-hgw.js → 24.CloWNmTd.js} +1 -1
  36. package/admin-build/_app/immutable/nodes/{25.SFDSBzHd.js → 25.CnZWMq7_.js} +1 -1
  37. package/admin-build/_app/immutable/nodes/{26.D95vui6E.js → 26.DrV7XOmf.js} +1 -1
  38. package/admin-build/_app/immutable/nodes/{27.FgLgdjwB.js → 27.DV8L32OF.js} +1 -1
  39. package/admin-build/_app/immutable/nodes/{28.B9sYYm1F.js → 28.Stil2D4u.js} +1 -1
  40. package/admin-build/_app/immutable/nodes/{29.DyqZ_wbN.js → 29.Zsm1e5Dc.js} +1 -1
  41. package/admin-build/_app/immutable/nodes/{3.Bzo2yVIO.js → 3.CKoj2vNz.js} +1 -1
  42. package/admin-build/_app/immutable/nodes/{30.c1CiNwiS.js → 30.Ni0k5bER.js} +1 -1
  43. package/admin-build/_app/immutable/nodes/{31.CXty66Vh.js → 31.mnqj9EbV.js} +1 -1
  44. package/admin-build/_app/immutable/nodes/{4.BgQaXZ27.js → 4.B_-z9AzT.js} +1 -1
  45. package/admin-build/_app/immutable/nodes/{5.BuJrHvxH.js → 5.yiZ72j4k.js} +1 -1
  46. package/admin-build/_app/immutable/nodes/{6.CkBBC94k.js → 6.BqykybBG.js} +1 -1
  47. package/admin-build/_app/immutable/nodes/{7.D2YBvNFM.js → 7.BDAHlhsF.js} +1 -1
  48. package/admin-build/_app/immutable/nodes/{8.D8qQWo_z.js → 8.D8Xvy0lH.js} +1 -1
  49. package/admin-build/_app/immutable/nodes/{9.BLDLX5hV.js → 9.Dddmd7_F.js} +1 -1
  50. package/admin-build/_app/version.json +1 -1
  51. package/admin-build/index.html +7 -7
  52. package/package.json +3 -2
  53. package/src/__tests__/functions-context.test.ts +5 -5
  54. package/src/__tests__/meta-export-coverage.test.ts +1 -0
  55. package/src/lib/functions.ts +204 -397
  56. package/src/lib/internal-transport.ts +316 -0
  57. package/src/lib/plugin-migrations.ts +2 -2
  58. package/src/routes/admin.ts +7 -1
  59. package/src/routes/auth.ts +6 -12
  60. package/src/routes/storage.ts +6 -12
  61. package/src/types.ts +2 -0
  62. package/admin-build/_app/immutable/entry/start.zXCirpgY.js +0 -1
  63. package/admin-build/_app/immutable/nodes/21.DoPabrY_.js +0 -1
@@ -1 +1 @@
1
- import"./CWj6FrbW.js";import{p as xe,t as J,a as qe,s as n,c as s,r,g as e,u as U,ae as pe,af as Me,f as ge,w as Se,b as t,d as b}from"./BdTBlfLy.js";import{d as we,s as ee,a as ye}from"./DtZk82gG.js";import{a as c,f as p,t as be}from"./DEELgv7K.js";import{i as h}from"./Y22E1hJM.js";import{e as Ae,i as Le}from"./CqUxCvs_.js";import{s as Ie,b as Ne,a as Ce}from"./CoI6jjbg.js";import{p as N}from"./F9_4wRrd.js";import{B as he}from"./C72lTcG0.js";import{B as ie}from"./B0HRJ657.js";import{M as Te}from"./Dt4vL4Df.js";import{I as F}from"./_teD5ji5.js";import{T as je}from"./Z41NK6i6.js";const De=["string","text","number","boolean","datetime","json"],Ee=["id","createdAt","updatedAt"],ke={TABLE_NAME_MAX:63,FIELD_NAME_MAX:63};var Fe=p('<span class="column-list__cell column-list__cell--actions svelte-poj89q">Actions</span>'),Be=p('<button class="action-btn svelte-poj89q" title="Edit"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M10.5 1.5L12.5 3.5L4 12H2V10L10.5 1.5Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"></path></svg></button> <button class="action-btn action-btn--danger svelte-poj89q" title="Delete"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M4 4L10 10M10 4L4 10" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"></path></svg></button>',1),Pe=p('<span class="auto-hint svelte-poj89q">auto-managed</span>'),Oe=p('<span class="column-list__cell column-list__cell--actions svelte-poj89q"><!></span>'),Ve=p('<div><span class="column-list__cell column-list__cell--name svelte-poj89q"><code class="svelte-poj89q"> </code> <!></span> <span class="column-list__cell column-list__cell--type svelte-poj89q"><code class="type-badge svelte-poj89q"> </code></span> <span class="column-list__cell column-list__cell--attrs svelte-poj89q"><!> <!> <!> <!></span> <!></div>'),Xe=p('<div class="column-list svelte-poj89q"><div class="column-list__header svelte-poj89q"><span class="column-list__title svelte-poj89q"> </span> <!></div> <div class="column-list__table svelte-poj89q"><div class="column-list__row column-list__row--header svelte-poj89q"><span class="column-list__cell column-list__cell--name svelte-poj89q">Name</span> <span class="column-list__cell column-list__cell--type svelte-poj89q">Type</span> <span class="column-list__cell column-list__cell--attrs svelte-poj89q">Attributes</span> <!></div> <!></div></div>');function dt(te,i){xe(i,!0);let w=N(i,"fields",19,()=>({})),A=N(i,"readonly",3,!1),B=U(()=>Object.entries(w()));function d(u){return Ee.includes(u)}var P=Xe(),o=s(P),_=s(o),x=s(_);r(_);var g=n(_,2);{var q=u=>{he(u,{variant:"secondary",size:"sm",get onclick(){return i.onaddclick},children:(m,K)=>{pe();var C=be("Add Column");c(m,C)},$$slots:{default:!0}})};h(g,u=>{A()||u(q)})}r(o);var y=n(o,2),L=s(y),O=n(s(L),6);{var V=u=>{var m=Fe();c(u,m)};h(O,u=>{A()||u(V)})}r(L);var X=n(L,2);Ae(X,17,()=>e(B),([u,m])=>u,(u,m)=>{var K=U(()=>Me(e(m),2));let C=()=>e(K)[0],T=()=>e(K)[1];var v=Ve();let z;var j=s(v),R=s(j),D=s(R,!0);r(R);var Y=n(R,2);{var Z=a=>{ie(a,{variant:"default",text:"auto"})},H=U(()=>d(C()));h(Y,a=>{e(H)&&a(Z)})}r(j);var E=n(j,2),G=s(E),ne=s(G,!0);r(G),r(E);var ae=n(E,2),Q=s(ae);{var oe=a=>{ie(a,{variant:"warning",text:"required"})};h(Q,a=>{T().required&&a(oe)})}var de=n(Q,2);{var le=a=>{ie(a,{variant:"primary",text:"unique"})};h(de,a=>{T().unique&&a(le)})}var ue=n(de,2);{var ve=a=>{ie(a,{variant:"default",text:"default"})};h(ue,a=>{T().default!==void 0&&a(ve)})}var me=n(ue,2);{var ce=a=>{ie(a,{variant:"success",text:"FK"})};h(me,a=>{T().references&&a(ce)})}r(ae);var _e=n(ae,2);{var re=a=>{var W=Oe(),fe=s(W);{var l=M=>{var S=Be(),$=ge(S),I=n($,2);ye("click",$,()=>{var se;return(se=i.oneditclick)==null?void 0:se.call(i,C(),T())}),ye("click",I,()=>{var se;return(se=i.ondeleteclick)==null?void 0:se.call(i,C())}),c(M,S)},f=U(()=>!d(C())),k=M=>{var S=Pe();c(M,S)};h(fe,M=>{e(f)?M(l):M(k,!1)})}r(W),c(a,W)};h(_e,a=>{A()||a(re)})}r(v),J(a=>{z=Ie(v,1,"column-list__row svelte-poj89q",null,z,a),ee(D,C()),ee(ne,T().type)},[()=>({"column-list__row--auto":d(C())})]),c(u,v)}),r(y),r(P),J(()=>ee(x,`Columns (${e(B).length??""})`)),c(te,P),qe()}we(["click"]);var ze=p("<option> </option>"),Re=p('<select class="field-type-select svelte-15q97oo"></select>');function Ze(te,i){xe(i,!0);let w=N(i,"value",15,"string"),A=N(i,"disabled",3,!1);const B=`field-type-${Math.random().toString(36).slice(2,9)}`;let d=U(()=>i.id??B);const P={string:"Short text (VARCHAR)",text:"Long text (TEXT)",number:"Numeric value",boolean:"True/False",datetime:"Date and time (ISO 8601)",json:"JSON object/array"};var o=Re();Ae(o,21,()=>De,Le,(_,x)=>{var g=ze(),q=s(g);r(g);var y={};J(()=>{ee(q,`${e(x)??""} — ${P[e(x)]??""}`),y!==(y=e(x))&&(g.value=(g.__value=e(x))??"")}),c(_,g)}),r(o),J(()=>{Ce(o,"id",e(d)),o.disabled=A()}),Ne(o,w),c(te,o),qe()}var He=p("<!> <!>",1),Ue=p('<div class="editor-error svelte-7mious"> </div>'),Je=p('<div class="editor-row svelte-7mious"><div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div></div>'),Ke=p('<div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div>',1),Ye=p('<div class="editor-form svelte-7mious"><!> <div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><label class="editor-label svelte-7mious">Type</label> <!></div> <div class="editor-row svelte-7mious"><!> <!></div> <div class="editor-field svelte-7mious"><!></div> <!> <!> <div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div></div>');function ut(te,i){xe(i,!0);let w=N(i,"open",15,!1),A=N(i,"mode",3,"create"),B=N(i,"columnName",3,""),d=N(i,"field",19,()=>({type:"string"})),P=N(i,"existingColumns",19,()=>[]),o=b(""),_=b("string"),x=b(!1),g=b(!1),q=b(""),y=b(""),L=b(""),O=b(""),V=b(""),X=b(""),u=b(""),m=b("");const K=`schema-field-type-${Math.random().toString(36).slice(2,9)}`;Se(()=>{w()&&(t(o,B()),t(_,d().type||"string",!0),t(x,d().required??!1,!0),t(g,d().unique??!1,!0),t(q,d().default!==void 0?String(d().default):"",!0),t(y,d().min!==void 0?String(d().min):"",!0),t(L,d().max!==void 0?String(d().max):"",!0),t(O,d().pattern??"",!0),t(V,d().enum?d().enum.join(", "):"",!0),t(X,typeof d().references=="string"?d().references:"",!0),t(u,d().check??"",!0),t(m,""))});function C(){return e(o).trim()?e(o).length>ke.FIELD_NAME_MAX?(t(m,`Column name must be ${ke.FIELD_NAME_MAX} chars or less.`),!1):Ee.includes(e(o))?(t(m,`"${e(o)}" is an auto-managed field and cannot be created manually.`),!1):A()==="create"&&P().includes(e(o))?(t(m,`Column "${e(o)}" already exists.`),!1):/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e(o))?!0:(t(m,"Column name must start with a letter or underscore and contain only alphanumeric characters."),!1):(t(m,"Column name is required."),!1)}function T(){var z;if(!C())return;const v={type:e(_)};e(x)&&(v.required=!0),e(g)&&(v.unique=!0),e(q)&&(e(_)==="number"?v.default=Number(e(q)):e(_)==="boolean"?v.default=e(q)==="true":v.default=e(q)),e(y)&&(v.min=Number(e(y))),e(L)&&(v.max=Number(e(L))),e(O)&&(v.pattern=e(O)),e(V).trim()&&(v.enum=e(V).split(",").map(j=>j.trim()).filter(Boolean)),e(X)&&(v.references=e(X)),e(u)&&(v.check=e(u)),(z=i.onsave)==null||z.call(i,e(o),v),w(!1)}{const v=j=>{var R=He(),D=ge(R);he(D,{variant:"secondary",onclick:()=>w(!1),children:(Z,H)=>{pe();var E=be("Cancel");c(Z,E)},$$slots:{default:!0}});var Y=n(D,2);he(Y,{variant:"primary",onclick:T,children:(Z,H)=>{pe();var E=be();J(()=>ee(E,A()==="create"?"Add Column":"Save")),c(Z,E)},$$slots:{default:!0}}),c(j,R)};let z=U(()=>A()==="create"?"Add Column":`Edit Column: ${B()}`);Te(te,{get title(){return e(z)},get open(){return w()},set open(j){w(j)},footer:v,children:(j,R)=>{var D=Ye(),Y=s(D);{var Z=l=>{var f=Ue(),k=s(f,!0);r(f),J(()=>ee(k,e(m))),c(l,f)};h(Y,l=>{e(m)&&l(Z)})}var H=n(Y,2),E=s(H);{let l=U(()=>A()==="edit");F(E,{label:"Column Name",placeholder:"column_name",get disabled(){return e(l)},get value(){return e(o)},set value(f){t(o,f,!0)}})}r(H);var G=n(H,2),ne=s(G),ae=n(ne,2);Ze(ae,{get id(){return K},get value(){return e(_)},set value(l){t(_,l,!0)}}),r(G);var Q=n(G,2),oe=s(Q);je(oe,{label:"Required",get checked(){return e(x)},set checked(l){t(x,l,!0)}});var de=n(oe,2);je(de,{label:"Unique",get checked(){return e(g)},set checked(l){t(g,l,!0)}}),r(Q);var le=n(Q,2),ue=s(le);F(ue,{label:"Default Value",placeholder:"Optional default",get value(){return e(q)},set value(l){t(q,l,!0)}}),r(le);var ve=n(le,2);{var me=l=>{var f=Je(),k=s(f),M=s(k);F(M,{label:"Min",type:"number",placeholder:"—",get value(){return e(y)},set value(I){t(y,I,!0)}}),r(k);var S=n(k,2),$=s(S);F($,{label:"Max",type:"number",placeholder:"—",get value(){return e(L)},set value(I){t(L,I,!0)}}),r(S),r(f),c(l,f)};h(ve,l=>{e(_)==="number"&&l(me)})}var ce=n(ve,2);{var _e=l=>{var f=Ke(),k=ge(f),M=s(k);F(M,{label:"Pattern (regex)",placeholder:"^[a-z]+$",get value(){return e(O)},set value(I){t(O,I,!0)}}),r(k);var S=n(k,2),$=s(S);F($,{label:"Enum (comma-separated)",placeholder:"active, inactive, pending",get value(){return e(V)},set value(I){t(V,I,!0)}}),r(S),c(l,f)};h(ce,l=>{e(_)==="string"&&l(_e)})}var re=n(ce,2),a=s(re);F(a,{label:"References (table.column)",placeholder:"users.id",get value(){return e(X)},set value(l){t(X,l,!0)}}),r(re);var W=n(re,2),fe=s(W);F(fe,{label:"Check Expression",placeholder:"value > 0",get value(){return e(u)},set value(l){t(u,l,!0)}}),r(W),r(D),J(()=>Ce(ne,"for",K)),c(j,D)},$$slots:{footer:!0,default:!0}})}qe()}export{Ee as A,dt as C,ke as L,ut as S};
1
+ import"./CWj6FrbW.js";import{p as xe,t as J,a as qe,s as n,c as s,r,g as e,u as U,ae as pe,af as Me,f as ge,w as Se,b as t,d as b}from"./BdTBlfLy.js";import{d as we,s as ee,a as ye}from"./DtZk82gG.js";import{a as c,f as p,t as be}from"./DEELgv7K.js";import{i as h}from"./Y22E1hJM.js";import{e as Ae,i as Le}from"./g3ZZdY-r.js";import{s as Ie,b as Ne,a as Ce}from"./CoI6jjbg.js";import{p as N}from"./F9_4wRrd.js";import{B as he}from"./C72lTcG0.js";import{B as ie}from"./B0HRJ657.js";import{M as Te}from"./Dt4vL4Df.js";import{I as F}from"./_teD5ji5.js";import{T as je}from"./Z41NK6i6.js";const De=["string","text","number","boolean","datetime","json"],Ee=["id","createdAt","updatedAt"],ke={TABLE_NAME_MAX:63,FIELD_NAME_MAX:63};var Fe=p('<span class="column-list__cell column-list__cell--actions svelte-poj89q">Actions</span>'),Be=p('<button class="action-btn svelte-poj89q" title="Edit"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M10.5 1.5L12.5 3.5L4 12H2V10L10.5 1.5Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"></path></svg></button> <button class="action-btn action-btn--danger svelte-poj89q" title="Delete"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M4 4L10 10M10 4L4 10" stroke="currentColor" stroke-width="1.2" stroke-linecap="round"></path></svg></button>',1),Pe=p('<span class="auto-hint svelte-poj89q">auto-managed</span>'),Oe=p('<span class="column-list__cell column-list__cell--actions svelte-poj89q"><!></span>'),Ve=p('<div><span class="column-list__cell column-list__cell--name svelte-poj89q"><code class="svelte-poj89q"> </code> <!></span> <span class="column-list__cell column-list__cell--type svelte-poj89q"><code class="type-badge svelte-poj89q"> </code></span> <span class="column-list__cell column-list__cell--attrs svelte-poj89q"><!> <!> <!> <!></span> <!></div>'),Xe=p('<div class="column-list svelte-poj89q"><div class="column-list__header svelte-poj89q"><span class="column-list__title svelte-poj89q"> </span> <!></div> <div class="column-list__table svelte-poj89q"><div class="column-list__row column-list__row--header svelte-poj89q"><span class="column-list__cell column-list__cell--name svelte-poj89q">Name</span> <span class="column-list__cell column-list__cell--type svelte-poj89q">Type</span> <span class="column-list__cell column-list__cell--attrs svelte-poj89q">Attributes</span> <!></div> <!></div></div>');function dt(te,i){xe(i,!0);let w=N(i,"fields",19,()=>({})),A=N(i,"readonly",3,!1),B=U(()=>Object.entries(w()));function d(u){return Ee.includes(u)}var P=Xe(),o=s(P),_=s(o),x=s(_);r(_);var g=n(_,2);{var q=u=>{he(u,{variant:"secondary",size:"sm",get onclick(){return i.onaddclick},children:(m,K)=>{pe();var C=be("Add Column");c(m,C)},$$slots:{default:!0}})};h(g,u=>{A()||u(q)})}r(o);var y=n(o,2),L=s(y),O=n(s(L),6);{var V=u=>{var m=Fe();c(u,m)};h(O,u=>{A()||u(V)})}r(L);var X=n(L,2);Ae(X,17,()=>e(B),([u,m])=>u,(u,m)=>{var K=U(()=>Me(e(m),2));let C=()=>e(K)[0],T=()=>e(K)[1];var v=Ve();let z;var j=s(v),R=s(j),D=s(R,!0);r(R);var Y=n(R,2);{var Z=a=>{ie(a,{variant:"default",text:"auto"})},H=U(()=>d(C()));h(Y,a=>{e(H)&&a(Z)})}r(j);var E=n(j,2),G=s(E),ne=s(G,!0);r(G),r(E);var ae=n(E,2),Q=s(ae);{var oe=a=>{ie(a,{variant:"warning",text:"required"})};h(Q,a=>{T().required&&a(oe)})}var de=n(Q,2);{var le=a=>{ie(a,{variant:"primary",text:"unique"})};h(de,a=>{T().unique&&a(le)})}var ue=n(de,2);{var ve=a=>{ie(a,{variant:"default",text:"default"})};h(ue,a=>{T().default!==void 0&&a(ve)})}var me=n(ue,2);{var ce=a=>{ie(a,{variant:"success",text:"FK"})};h(me,a=>{T().references&&a(ce)})}r(ae);var _e=n(ae,2);{var re=a=>{var W=Oe(),fe=s(W);{var l=M=>{var S=Be(),$=ge(S),I=n($,2);ye("click",$,()=>{var se;return(se=i.oneditclick)==null?void 0:se.call(i,C(),T())}),ye("click",I,()=>{var se;return(se=i.ondeleteclick)==null?void 0:se.call(i,C())}),c(M,S)},f=U(()=>!d(C())),k=M=>{var S=Pe();c(M,S)};h(fe,M=>{e(f)?M(l):M(k,!1)})}r(W),c(a,W)};h(_e,a=>{A()||a(re)})}r(v),J(a=>{z=Ie(v,1,"column-list__row svelte-poj89q",null,z,a),ee(D,C()),ee(ne,T().type)},[()=>({"column-list__row--auto":d(C())})]),c(u,v)}),r(y),r(P),J(()=>ee(x,`Columns (${e(B).length??""})`)),c(te,P),qe()}we(["click"]);var ze=p("<option> </option>"),Re=p('<select class="field-type-select svelte-15q97oo"></select>');function Ze(te,i){xe(i,!0);let w=N(i,"value",15,"string"),A=N(i,"disabled",3,!1);const B=`field-type-${Math.random().toString(36).slice(2,9)}`;let d=U(()=>i.id??B);const P={string:"Short text (VARCHAR)",text:"Long text (TEXT)",number:"Numeric value",boolean:"True/False",datetime:"Date and time (ISO 8601)",json:"JSON object/array"};var o=Re();Ae(o,21,()=>De,Le,(_,x)=>{var g=ze(),q=s(g);r(g);var y={};J(()=>{ee(q,`${e(x)??""} — ${P[e(x)]??""}`),y!==(y=e(x))&&(g.value=(g.__value=e(x))??"")}),c(_,g)}),r(o),J(()=>{Ce(o,"id",e(d)),o.disabled=A()}),Ne(o,w),c(te,o),qe()}var He=p("<!> <!>",1),Ue=p('<div class="editor-error svelte-7mious"> </div>'),Je=p('<div class="editor-row svelte-7mious"><div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div></div>'),Ke=p('<div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div>',1),Ye=p('<div class="editor-form svelte-7mious"><!> <div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><label class="editor-label svelte-7mious">Type</label> <!></div> <div class="editor-row svelte-7mious"><!> <!></div> <div class="editor-field svelte-7mious"><!></div> <!> <!> <div class="editor-field svelte-7mious"><!></div> <div class="editor-field svelte-7mious"><!></div></div>');function ut(te,i){xe(i,!0);let w=N(i,"open",15,!1),A=N(i,"mode",3,"create"),B=N(i,"columnName",3,""),d=N(i,"field",19,()=>({type:"string"})),P=N(i,"existingColumns",19,()=>[]),o=b(""),_=b("string"),x=b(!1),g=b(!1),q=b(""),y=b(""),L=b(""),O=b(""),V=b(""),X=b(""),u=b(""),m=b("");const K=`schema-field-type-${Math.random().toString(36).slice(2,9)}`;Se(()=>{w()&&(t(o,B()),t(_,d().type||"string",!0),t(x,d().required??!1,!0),t(g,d().unique??!1,!0),t(q,d().default!==void 0?String(d().default):"",!0),t(y,d().min!==void 0?String(d().min):"",!0),t(L,d().max!==void 0?String(d().max):"",!0),t(O,d().pattern??"",!0),t(V,d().enum?d().enum.join(", "):"",!0),t(X,typeof d().references=="string"?d().references:"",!0),t(u,d().check??"",!0),t(m,""))});function C(){return e(o).trim()?e(o).length>ke.FIELD_NAME_MAX?(t(m,`Column name must be ${ke.FIELD_NAME_MAX} chars or less.`),!1):Ee.includes(e(o))?(t(m,`"${e(o)}" is an auto-managed field and cannot be created manually.`),!1):A()==="create"&&P().includes(e(o))?(t(m,`Column "${e(o)}" already exists.`),!1):/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(e(o))?!0:(t(m,"Column name must start with a letter or underscore and contain only alphanumeric characters."),!1):(t(m,"Column name is required."),!1)}function T(){var z;if(!C())return;const v={type:e(_)};e(x)&&(v.required=!0),e(g)&&(v.unique=!0),e(q)&&(e(_)==="number"?v.default=Number(e(q)):e(_)==="boolean"?v.default=e(q)==="true":v.default=e(q)),e(y)&&(v.min=Number(e(y))),e(L)&&(v.max=Number(e(L))),e(O)&&(v.pattern=e(O)),e(V).trim()&&(v.enum=e(V).split(",").map(j=>j.trim()).filter(Boolean)),e(X)&&(v.references=e(X)),e(u)&&(v.check=e(u)),(z=i.onsave)==null||z.call(i,e(o),v),w(!1)}{const v=j=>{var R=He(),D=ge(R);he(D,{variant:"secondary",onclick:()=>w(!1),children:(Z,H)=>{pe();var E=be("Cancel");c(Z,E)},$$slots:{default:!0}});var Y=n(D,2);he(Y,{variant:"primary",onclick:T,children:(Z,H)=>{pe();var E=be();J(()=>ee(E,A()==="create"?"Add Column":"Save")),c(Z,E)},$$slots:{default:!0}}),c(j,R)};let z=U(()=>A()==="create"?"Add Column":`Edit Column: ${B()}`);Te(te,{get title(){return e(z)},get open(){return w()},set open(j){w(j)},footer:v,children:(j,R)=>{var D=Ye(),Y=s(D);{var Z=l=>{var f=Ue(),k=s(f,!0);r(f),J(()=>ee(k,e(m))),c(l,f)};h(Y,l=>{e(m)&&l(Z)})}var H=n(Y,2),E=s(H);{let l=U(()=>A()==="edit");F(E,{label:"Column Name",placeholder:"column_name",get disabled(){return e(l)},get value(){return e(o)},set value(f){t(o,f,!0)}})}r(H);var G=n(H,2),ne=s(G),ae=n(ne,2);Ze(ae,{get id(){return K},get value(){return e(_)},set value(l){t(_,l,!0)}}),r(G);var Q=n(G,2),oe=s(Q);je(oe,{label:"Required",get checked(){return e(x)},set checked(l){t(x,l,!0)}});var de=n(oe,2);je(de,{label:"Unique",get checked(){return e(g)},set checked(l){t(g,l,!0)}}),r(Q);var le=n(Q,2),ue=s(le);F(ue,{label:"Default Value",placeholder:"Optional default",get value(){return e(q)},set value(l){t(q,l,!0)}}),r(le);var ve=n(le,2);{var me=l=>{var f=Je(),k=s(f),M=s(k);F(M,{label:"Min",type:"number",placeholder:"—",get value(){return e(y)},set value(I){t(y,I,!0)}}),r(k);var S=n(k,2),$=s(S);F($,{label:"Max",type:"number",placeholder:"—",get value(){return e(L)},set value(I){t(L,I,!0)}}),r(S),r(f),c(l,f)};h(ve,l=>{e(_)==="number"&&l(me)})}var ce=n(ve,2);{var _e=l=>{var f=Ke(),k=ge(f),M=s(k);F(M,{label:"Pattern (regex)",placeholder:"^[a-z]+$",get value(){return e(O)},set value(I){t(O,I,!0)}}),r(k);var S=n(k,2),$=s(S);F($,{label:"Enum (comma-separated)",placeholder:"active, inactive, pending",get value(){return e(V)},set value(I){t(V,I,!0)}}),r(S),c(l,f)};h(ce,l=>{e(_)==="string"&&l(_e)})}var re=n(ce,2),a=s(re);F(a,{label:"References (table.column)",placeholder:"users.id",get value(){return e(X)},set value(l){t(X,l,!0)}}),r(re);var W=n(re,2),fe=s(W);F(fe,{label:"Check Expression",placeholder:"value > 0",get value(){return e(u)},set value(l){t(u,l,!0)}}),r(W),r(D),J(()=>Ce(ne,"for",K)),c(j,D)},$$slots:{footer:!0,default:!0}})}qe()}export{Ee as A,dt as C,ke as L,ut as S};
@@ -1 +1 @@
1
- var ge=Object.defineProperty;var _e=(e,n,r)=>n in e?ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var F=(e,n,r)=>_e(e,typeof n!="symbol"?n+"":n,r);import{a2 as q,x as me,au as he,h as k,n as L,v as Ee,e as we,g as oe,y as Te,A as Ae,B as ie,D as V,k as U,C as ye,av as Ie,aw as fe,_ as Ne,ax as w,a3 as G,ay as xe,a5 as Se,X as Ce,az as Re,aA as J,aB as ke,aC as De,a7 as Oe,aD as ue,aE as He,$ as ve,a1 as pe,aF as X,I as Me,aG as be,aH as Fe,aI as Ue,a0 as ze,l as $e,M as Z}from"./BdTBlfLy.js";import{g as K}from"./Bn2NtlTj.js";import{g as Be,a as Y}from"./BcIUK2sk.js";import{l as qe,d as ce}from"./Dqk2TGNU.js";function an(e,n){return n}function Le(e,n,r){for(var f=[],u=n.length,i,c=n.length,v=0;v<u;v++){let m=n[v];pe(m,()=>{if(i){if(i.pending.delete(m),i.done.add(m),i.pending.size===0){var l=e.outrogroups;P(J(i.done)),l.delete(i),l.size===0&&(e.outrogroups=null)}}else c-=1},!1)}if(c===0){var o=f.length===0&&r!==null;if(o){var d=r,t=d.parentNode;Ue(t),t.append(d),e.items.clear()}P(n,!o)}else i={pending:new Set(n),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function P(e,n=!0){for(var r=0;r<e.length;r++)ze(e[r],n)}var le;function tn(e,n,r,f,u,i=null){var c=e,v=new Map,o=(n&he)!==0;if(o){var d=e;c=k?L(Ee(d)):d.appendChild(q())}k&&we();var t=null,m=Ce(()=>{var s=r();return Re(s)?s:s==null?[]:J(s)}),l,h=!0;function A(){a.fallback=t,Ve(a,l,c,n,f),t!==null&&(l.length===0?(t.f&w)===0?ve(t):(t.f^=w,H(t,null,c)):pe(t,()=>{t=null}))}var N=me(()=>{l=oe(m);var s=l.length;let x=!1;if(k){var S=Te(c)===Ae;S!==(s===0)&&(c=ie(),L(c),V(!1),x=!0)}for(var g=new Set,y=Ne,C=Se(),p=0;p<s;p+=1){k&&U.nodeType===ye&&U.data===Ie&&(c=U,x=!0,V(!1));var I=l[p],R=f(I,p),_=h?null:v.get(R);_?(_.v&&fe(_.v,I),_.i&&fe(_.i,p),C&&y.unskip_effect(_.e)):(_=Xe(v,h?c:le??(le=q()),I,R,p,u,n,r),h||(_.e.f|=w),v.set(R,_)),g.add(R)}if(s===0&&i&&!t&&(h?t=G(()=>i(c)):(t=G(()=>i(le??(le=q()))),t.f|=w)),s>g.size&&xe(),k&&s>0&&L(ie()),!h)if(C){for(const[M,b]of v)g.has(M)||y.skip_effect(b.e);y.oncommit(A),y.ondiscard(()=>{})}else A();x&&V(!0),oe(m)}),a={effect:N,items:v,outrogroups:null,fallback:t};h=!1,k&&(c=U)}function O(e){for(;e!==null&&(e.f&be)===0;)e=e.next;return e}function Ve(e,n,r,f,u){var _,M,b,j,ee,ne,re,ae,te;var i=(f&Fe)!==0,c=n.length,v=e.items,o=O(e.effect.first),d,t=null,m,l=[],h=[],A,N,a,s;if(i)for(s=0;s<c;s+=1)A=n[s],N=u(A,s),a=v.get(N).e,(a.f&w)===0&&((M=(_=a.nodes)==null?void 0:_.a)==null||M.measure(),(m??(m=new Set)).add(a));for(s=0;s<c;s+=1){if(A=n[s],N=u(A,s),a=v.get(N).e,e.outrogroups!==null)for(const E of e.outrogroups)E.pending.delete(a),E.done.delete(a);if((a.f&w)!==0)if(a.f^=w,a===o)H(a,null,r);else{var x=t?t.next:o;a===e.effect.last&&(e.effect.last=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),T(e,t,a),T(e,a,x),H(a,x,r),t=a,l=[],h=[],o=O(t.next);continue}if((a.f&X)!==0&&(ve(a),i&&((j=(b=a.nodes)==null?void 0:b.a)==null||j.unfix(),(m??(m=new Set)).delete(a))),a!==o){if(d!==void 0&&d.has(a)){if(l.length<h.length){var S=h[0],g;t=S.prev;var y=l[0],C=l[l.length-1];for(g=0;g<l.length;g+=1)H(l[g],S,r);for(g=0;g<h.length;g+=1)d.delete(h[g]);T(e,y.prev,C.next),T(e,t,y),T(e,C,S),o=S,t=C,s-=1,l=[],h=[]}else d.delete(a),H(a,o,r),T(e,a.prev,a.next),T(e,a,t===null?e.effect.first:t.next),T(e,t,a),t=a;continue}for(l=[],h=[];o!==null&&o!==a;)(d??(d=new Set)).add(o),h.push(o),o=O(o.next);if(o===null)continue}(a.f&w)===0&&l.push(a),t=a,o=O(a.next)}if(e.outrogroups!==null){for(const E of e.outrogroups)E.pending.size===0&&(P(J(E.done)),(ee=e.outrogroups)==null||ee.delete(E));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||d!==void 0){var p=[];if(d!==void 0)for(a of d)(a.f&X)===0&&p.push(a);for(;o!==null;)(o.f&X)===0&&o!==e.fallback&&p.push(o),o=O(o.next);var I=p.length;if(I>0){var R=(f&he)!==0&&c===0?r:null;if(i){for(s=0;s<I;s+=1)(re=(ne=p[s].nodes)==null?void 0:ne.a)==null||re.measure();for(s=0;s<I;s+=1)(te=(ae=p[s].nodes)==null?void 0:ae.a)==null||te.fix()}Le(e,p,R)}}i&&Me(()=>{var E,se;if(m!==void 0)for(a of m)(se=(E=a.nodes)==null?void 0:E.a)==null||se.apply()})}function Xe(e,n,r,f,u,i,c,v){var o=(c&ke)!==0?(c&De)===0?Oe(r,!1,!1):ue(r):null,d=(c&He)!==0?ue(u):null;return{v:o,i:d,e:G(()=>(i(n,o??r,d??u,v),()=>{e.delete(f)}))}}function H(e,n,r){if(e.nodes)for(var f=e.nodes.start,u=e.nodes.end,i=n&&(n.f&w)===0?n.nodes.start:r;f!==null;){var c=$e(f);if(i.before(f),f===u)return;f=c}}function T(e,n,r){n===null?e.effect.first=r:n.next=r,r===null?e.effect.last=n:r.prev=n}const Ye={success:3e3,error:5e3,info:4e3,warning:4e3},de=50;let Ge=1,W=Z([]),z=Z([]);const $=Z({count:0});function sn(){return $.count}function B(e){const n=Ge++,r={id:n,...e};W.push(r),z.unshift({...r,timestamp:Date.now()}),z.length>de&&(z.length=de),$.count++;const f=Ye[e.type];return setTimeout(()=>{Ke(n)},f),n}function Ke(e){const n=W.findIndex(r=>r.id===e);n!==-1&&W.splice(n,1)}function on(){$.count=0}function fn(){z.length=0,$.count=0}function un(e){return B({type:"success",message:e})}function cn(e){return B({type:"error",message:e})}function ln(e){return B({type:"info",message:e})}class D extends Error{constructor(r,f,u,i){super(u);F(this,"code");F(this,"status");F(this,"data");this.name="ApiError",this.status=r,this.code=f,this.data=i}}async function Pe(e){try{const n=await e.json();return{code:n.code??"UNKNOWN",message:n.message??e.statusText,data:n.data}}catch{return{code:"UNKNOWN",message:e.statusText}}}async function Q(e,n={}){const r=K(Y),f={"Content-Type":"application/json",...n.headers};r.accessToken&&(f.Authorization=`Bearer ${r.accessToken}`);const u=await fetch(e,{method:n.method??"GET",headers:f,body:n.body!==void 0?JSON.stringify(n.body):void 0});if(u.status===401&&!n._skipRefresh){if(await Y.refresh())return Q(e,{...n,_skipRefresh:!0});throw Y.logout(),new D(401,"UNAUTHORIZED","Session expired")}if(!u.ok){const i=await Pe(u);throw new D(u.status,i.code,i.message,i.data)}if(u.status!==204)return u.json()}async function We(e,n={}){const r=Be(e);return Q(r,n)}async function Je(e,n={}){let r=K(ce);if(r.loaded||(await qe(),r=K(ce)),!r.devMode||r.sidecarPort===null)throw new D(0,"NOT_DEV_MODE","Schema mutations require dev mode with sidecar");const f=`http://localhost:${r.sidecarPort}/${e}`;try{return await Q(f,n)}catch(u){throw u instanceof D&&u.status===404?new D(404,u.code,"This dashboard action is not available on the current dev sidecar yet. Restart `pnpm dev` and try again."):u}}async function Ze(e,n){try{return await e()}catch(r){const f=r instanceof D||r instanceof Error?r.message:"Unknown error";return B({type:"error",message:n?`${n}: ${f}`:f}),null}}const dn={fetch:We,schemaMutation:Je,safeFetch:Ze};export{D as A,dn as a,un as b,B as c,ln as d,tn as e,z as f,sn as g,fn as h,an as i,W as j,on as m,Ke as r,cn as t};
1
+ var ge=Object.defineProperty;var _e=(e,n,r)=>n in e?ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var F=(e,n,r)=>_e(e,typeof n!="symbol"?n+"":n,r);import{a2 as q,x as me,au as he,h as k,n as L,v as Ee,e as we,g as oe,y as Te,A as Ae,B as ie,D as V,k as U,C as ye,av as Ie,aw as fe,_ as Ne,ax as w,a3 as G,ay as xe,a5 as Se,X as Ce,az as Re,aA as J,aB as ke,aC as De,a7 as Oe,aD as ue,aE as He,$ as ve,a1 as pe,aF as X,I as Me,aG as be,aH as Fe,aI as Ue,a0 as ze,l as $e,M as Z}from"./BdTBlfLy.js";import{g as K}from"./Bn2NtlTj.js";import{g as Be,a as Y}from"./BaCHY17I.js";import{l as qe,d as ce}from"./BKXmgPq4.js";function an(e,n){return n}function Le(e,n,r){for(var f=[],u=n.length,i,c=n.length,v=0;v<u;v++){let m=n[v];pe(m,()=>{if(i){if(i.pending.delete(m),i.done.add(m),i.pending.size===0){var l=e.outrogroups;P(J(i.done)),l.delete(i),l.size===0&&(e.outrogroups=null)}}else c-=1},!1)}if(c===0){var o=f.length===0&&r!==null;if(o){var d=r,t=d.parentNode;Ue(t),t.append(d),e.items.clear()}P(n,!o)}else i={pending:new Set(n),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function P(e,n=!0){for(var r=0;r<e.length;r++)ze(e[r],n)}var le;function tn(e,n,r,f,u,i=null){var c=e,v=new Map,o=(n&he)!==0;if(o){var d=e;c=k?L(Ee(d)):d.appendChild(q())}k&&we();var t=null,m=Ce(()=>{var s=r();return Re(s)?s:s==null?[]:J(s)}),l,h=!0;function A(){a.fallback=t,Ve(a,l,c,n,f),t!==null&&(l.length===0?(t.f&w)===0?ve(t):(t.f^=w,H(t,null,c)):pe(t,()=>{t=null}))}var N=me(()=>{l=oe(m);var s=l.length;let x=!1;if(k){var S=Te(c)===Ae;S!==(s===0)&&(c=ie(),L(c),V(!1),x=!0)}for(var g=new Set,y=Ne,C=Se(),p=0;p<s;p+=1){k&&U.nodeType===ye&&U.data===Ie&&(c=U,x=!0,V(!1));var I=l[p],R=f(I,p),_=h?null:v.get(R);_?(_.v&&fe(_.v,I),_.i&&fe(_.i,p),C&&y.unskip_effect(_.e)):(_=Xe(v,h?c:le??(le=q()),I,R,p,u,n,r),h||(_.e.f|=w),v.set(R,_)),g.add(R)}if(s===0&&i&&!t&&(h?t=G(()=>i(c)):(t=G(()=>i(le??(le=q()))),t.f|=w)),s>g.size&&xe(),k&&s>0&&L(ie()),!h)if(C){for(const[M,b]of v)g.has(M)||y.skip_effect(b.e);y.oncommit(A),y.ondiscard(()=>{})}else A();x&&V(!0),oe(m)}),a={effect:N,items:v,outrogroups:null,fallback:t};h=!1,k&&(c=U)}function O(e){for(;e!==null&&(e.f&be)===0;)e=e.next;return e}function Ve(e,n,r,f,u){var _,M,b,j,ee,ne,re,ae,te;var i=(f&Fe)!==0,c=n.length,v=e.items,o=O(e.effect.first),d,t=null,m,l=[],h=[],A,N,a,s;if(i)for(s=0;s<c;s+=1)A=n[s],N=u(A,s),a=v.get(N).e,(a.f&w)===0&&((M=(_=a.nodes)==null?void 0:_.a)==null||M.measure(),(m??(m=new Set)).add(a));for(s=0;s<c;s+=1){if(A=n[s],N=u(A,s),a=v.get(N).e,e.outrogroups!==null)for(const E of e.outrogroups)E.pending.delete(a),E.done.delete(a);if((a.f&w)!==0)if(a.f^=w,a===o)H(a,null,r);else{var x=t?t.next:o;a===e.effect.last&&(e.effect.last=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),T(e,t,a),T(e,a,x),H(a,x,r),t=a,l=[],h=[],o=O(t.next);continue}if((a.f&X)!==0&&(ve(a),i&&((j=(b=a.nodes)==null?void 0:b.a)==null||j.unfix(),(m??(m=new Set)).delete(a))),a!==o){if(d!==void 0&&d.has(a)){if(l.length<h.length){var S=h[0],g;t=S.prev;var y=l[0],C=l[l.length-1];for(g=0;g<l.length;g+=1)H(l[g],S,r);for(g=0;g<h.length;g+=1)d.delete(h[g]);T(e,y.prev,C.next),T(e,t,y),T(e,C,S),o=S,t=C,s-=1,l=[],h=[]}else d.delete(a),H(a,o,r),T(e,a.prev,a.next),T(e,a,t===null?e.effect.first:t.next),T(e,t,a),t=a;continue}for(l=[],h=[];o!==null&&o!==a;)(d??(d=new Set)).add(o),h.push(o),o=O(o.next);if(o===null)continue}(a.f&w)===0&&l.push(a),t=a,o=O(a.next)}if(e.outrogroups!==null){for(const E of e.outrogroups)E.pending.size===0&&(P(J(E.done)),(ee=e.outrogroups)==null||ee.delete(E));e.outrogroups.size===0&&(e.outrogroups=null)}if(o!==null||d!==void 0){var p=[];if(d!==void 0)for(a of d)(a.f&X)===0&&p.push(a);for(;o!==null;)(o.f&X)===0&&o!==e.fallback&&p.push(o),o=O(o.next);var I=p.length;if(I>0){var R=(f&he)!==0&&c===0?r:null;if(i){for(s=0;s<I;s+=1)(re=(ne=p[s].nodes)==null?void 0:ne.a)==null||re.measure();for(s=0;s<I;s+=1)(te=(ae=p[s].nodes)==null?void 0:ae.a)==null||te.fix()}Le(e,p,R)}}i&&Me(()=>{var E,se;if(m!==void 0)for(a of m)(se=(E=a.nodes)==null?void 0:E.a)==null||se.apply()})}function Xe(e,n,r,f,u,i,c,v){var o=(c&ke)!==0?(c&De)===0?Oe(r,!1,!1):ue(r):null,d=(c&He)!==0?ue(u):null;return{v:o,i:d,e:G(()=>(i(n,o??r,d??u,v),()=>{e.delete(f)}))}}function H(e,n,r){if(e.nodes)for(var f=e.nodes.start,u=e.nodes.end,i=n&&(n.f&w)===0?n.nodes.start:r;f!==null;){var c=$e(f);if(i.before(f),f===u)return;f=c}}function T(e,n,r){n===null?e.effect.first=r:n.next=r,r===null?e.effect.last=n:r.prev=n}const Ye={success:3e3,error:5e3,info:4e3,warning:4e3},de=50;let Ge=1,W=Z([]),z=Z([]);const $=Z({count:0});function sn(){return $.count}function B(e){const n=Ge++,r={id:n,...e};W.push(r),z.unshift({...r,timestamp:Date.now()}),z.length>de&&(z.length=de),$.count++;const f=Ye[e.type];return setTimeout(()=>{Ke(n)},f),n}function Ke(e){const n=W.findIndex(r=>r.id===e);n!==-1&&W.splice(n,1)}function on(){$.count=0}function fn(){z.length=0,$.count=0}function un(e){return B({type:"success",message:e})}function cn(e){return B({type:"error",message:e})}function ln(e){return B({type:"info",message:e})}class D extends Error{constructor(r,f,u,i){super(u);F(this,"code");F(this,"status");F(this,"data");this.name="ApiError",this.status=r,this.code=f,this.data=i}}async function Pe(e){try{const n=await e.json();return{code:n.code??"UNKNOWN",message:n.message??e.statusText,data:n.data}}catch{return{code:"UNKNOWN",message:e.statusText}}}async function Q(e,n={}){const r=K(Y),f={"Content-Type":"application/json",...n.headers};r.accessToken&&(f.Authorization=`Bearer ${r.accessToken}`);const u=await fetch(e,{method:n.method??"GET",headers:f,body:n.body!==void 0?JSON.stringify(n.body):void 0});if(u.status===401&&!n._skipRefresh){if(await Y.refresh())return Q(e,{...n,_skipRefresh:!0});throw Y.logout(),new D(401,"UNAUTHORIZED","Session expired")}if(!u.ok){const i=await Pe(u);throw new D(u.status,i.code,i.message,i.data)}if(u.status!==204)return u.json()}async function We(e,n={}){const r=Be(e);return Q(r,n)}async function Je(e,n={}){let r=K(ce);if(r.loaded||(await qe(),r=K(ce)),!r.devMode||r.sidecarPort===null)throw new D(0,"NOT_DEV_MODE","Schema mutations require dev mode with sidecar");const f=`http://localhost:${r.sidecarPort}/${e}`;try{return await Q(f,n)}catch(u){throw u instanceof D&&u.status===404?new D(404,u.code,"This dashboard action is not available on the current dev sidecar yet. Restart `pnpm dev` and try again."):u}}async function Ze(e,n){try{return await e()}catch(r){const f=r instanceof D||r instanceof Error?r.message:"Unknown error";return B({type:"error",message:n?`${n}: ${f}`:f}),null}}const dn={fetch:We,schemaMutation:Je,safeFetch:Ze};export{D as A,dn as a,un as b,B as c,ln as d,tn as e,z as f,sn as g,fn as h,an as i,W as j,on as m,Ke as r,cn as t};
@@ -1 +1 @@
1
- import{s as e}from"./m9QZTyVV.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
1
+ import{s as e}from"./qiZXAKh-.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -1 +1 @@
1
- import{ab as J,bm as ee}from"./BdTBlfLy.js";import{w as ae}from"./Bn2NtlTj.js";import{H as N,N as M,r as gt,o as $t,i as _t,b as L,s as C,p as x,n as ft,f as Nt,g as ut,a as X,c as it,S as Dt,P as ne,d as re,e as oe,h as se,j as Pt,k as q,l as ie,m as qt,q as ce,t as le,u as Kt,v as fe}from"./D755Tqat.js";class wt{constructor(a,e){this.status=a,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${a}`}}toString(){return JSON.stringify(this.body)}}class vt{constructor(a,e){this.status=a,this.location=e}}class yt extends Error{constructor(a,e,r){super(r),this.status=a,this.text=e}}const ue=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function he(t){const a=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${pe(t).map(r=>{const n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(n)return a.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(o)return a.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return ct(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return ct(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const h=ue.exec(c),[,u,w,f,d]=h;return a.push({name:f,matcher:d,optional:!!u,rest:!!w,chained:w?l===1&&s[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return ct(c)}).join("")}).join("")}/?$`),params:a}}function de(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function pe(t){return t.slice(1).split("/").filter(de)}function me(t,a,e){const r={},n=t.slice(1),o=n.filter(i=>i!==void 0);let s=0;for(let i=0;i<a.length;i+=1){const c=a[i];let l=n[i-s];if(c.chained&&c.rest&&s&&(l=n.slice(i-s,i+1).filter(h=>h).join("/"),s=0),l===void 0)if(c.rest)l="";else continue;if(!c.matcher||e[c.matcher](l)){r[c.name]=l;const h=a[i+1],u=n[i+1];h&&!h.rest&&h.optional&&u&&c.chained&&(s=0),!h&&!u&&Object.keys(r).length===o.length&&(s=0);continue}if(c.optional&&c.chained){s++;continue}return}if(!s)return r}function ct(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function ge({nodes:t,server_loads:a,dictionary:e,matchers:r}){const n=new Set(a);return Object.entries(e).map(([i,[c,l,h]])=>{const{pattern:u,params:w}=he(i),f={id:i,exec:d=>{const _=u.exec(d);if(_)return me(_,w,r)},errors:[1,...h||[]].map(d=>t[d]),layouts:[0,...l||[]].map(s),leaf:o(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function o(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function s(i){return i===void 0?i:[n.has(i),t[i]]}}function Ft(t,a=JSON.parse){try{return a(sessionStorage[t])}catch{}}function It(t,a,e=JSON.stringify){const r=e(a);try{sessionStorage[t]=r}catch{}}function _e(t){return t.filter(a=>a!=null)}function bt(t){return t instanceof wt||t instanceof yt?t.status:500}function we(t){return t instanceof yt?t.text:"Internal Error"}const ve=new Set(["icon","shortcut icon","apple-touch-icon"]),I=Ft(Kt)??{},V=Ft(qt)??{},P={url:Pt({}),page:Pt({}),navigating:ae(null),updated:se()};function Et(t){I[t]=C()}function ye(t,a){let e=t+1;for(;I[e];)delete I[e],e+=1;for(e=a+1;V[e];)delete V[e],e+=1}function B(t,a=!1){return a?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Mt(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(L||"/");t&&await t.update()}}function Tt(){}let kt,ht,Q,U,dt,E;const Z=[],tt=[];let v=null;function pt(){var t;(t=v==null?void 0:v.fork)==null||t.then(a=>a==null?void 0:a.discard()),v=null}const G=new Map,Vt=new Set,be=new Set,F=new Set;let g={branch:[],error:null,url:null},Bt=!1,et=!1,Ot=!0,H=!1,K=!1,Ht=!1,St=!1,Yt,b,R,O;const at=new Set,Ct=new Map;async function Fe(t,a,e){var o,s,i,c,l;(o=globalThis.__sveltekit_1vwf6db)!=null&&o.data&&globalThis.__sveltekit_1vwf6db.data,document.URL!==location.href&&(location.href=location.href),E=t,await((i=(s=t.hooks).init)==null?void 0:i.call(s)),kt=ge(t),U=document.documentElement,dt=a,ht=t.nodes[0],Q=t.nodes[1],ht(),Q(),b=(c=history.state)==null?void 0:c[N],R=(l=history.state)==null?void 0:l[M],b||(b=R=Date.now(),history.replaceState({...history.state,[N]:b,[M]:R},""));const r=I[b];function n(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}e?(n(),await Ce(dt,e)):(await D({type:"enter",url:gt(E.hash?Ne(new URL(location.href)):location.href),replace_state:!0}),n()),Oe()}function Ee(){Z.length=0,St=!1}function zt(t){tt.some(a=>a==null?void 0:a.snapshot)&&(V[t]=tt.map(a=>{var e;return(e=a==null?void 0:a.snapshot)==null?void 0:e.capture()}))}function Wt(t){var a;(a=V[t])==null||a.forEach((e,r)=>{var n,o;(o=(n=tt[r])==null?void 0:n.snapshot)==null||o.restore(e)})}function jt(){Et(b),It(Kt,I),zt(R),It(qt,V)}async function Gt(t,a,e,r){let n;a.invalidateAll&&pt(),await D({type:"goto",url:gt(t),keepfocus:a.keepFocus,noscroll:a.noScroll,replace_state:a.replaceState,state:a.state,redirect_count:e,nav_token:r,accept:()=>{a.invalidateAll&&(St=!0,n=[...Ct.keys()]),a.invalidate&&a.invalidate.forEach(Te)}}),a.invalidateAll&&J().then(J).then(()=>{Ct.forEach(({resource:o},s)=>{var i;n!=null&&n.includes(s)&&((i=o.refresh)==null||i.call(o))})})}async function ke(t){if(t.id!==(v==null?void 0:v.id)){pt();const a={};at.add(a),v={id:t.id,token:a,promise:Xt({...t,preload:a}).then(e=>(at.delete(a),e.type==="loaded"&&e.state.error&&pt(),e)),fork:null}}return v.promise}async function lt(t){var e;const a=(e=await ot(t,!1))==null?void 0:e.route;a&&await Promise.all([...a.layouts,a.leaf].map(r=>r==null?void 0:r[1]()))}async function Jt(t,a,e){var n;g=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(x,t.props.page),Yt=new E.root({target:a,props:{...t.props,stores:P,components:tt},hydrate:e,sync:!1}),await Promise.resolve(),Wt(R),e){const o={from:null,to:{params:g.params,route:{id:((n=g.route)==null?void 0:n.id)??null},url:new URL(location.href),scroll:I[b]??C()},willUnload:!1,type:"enter",complete:Promise.resolve()};F.forEach(s=>s(o))}et=!0}function nt({url:t,params:a,branch:e,status:r,error:n,route:o,form:s}){let i="never";if(L&&(t.pathname===L||t.pathname===L+"/"))i="always";else for(const f of e)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:a,branch:e,error:n,route:o},props:{constructors:_e(e).map(f=>f.node.component),page:At(x)}};s!==void 0&&(c.props.form=s);let l={},h=!x,u=0;for(let f=0;f<Math.max(e.length,g.branch.length);f+=1){const d=e[f],_=g.branch[f];(d==null?void 0:d.data)!==(_==null?void 0:_.data)&&(h=!0),d&&(l={...l,...d.data},h&&(c.props[`data_${u}`]=l),u+=1)}return(!g.url||t.href!==g.url.href||g.error!==n||s!==void 0&&s!==x.form||h)&&(c.props.page={error:n,params:a,route:{id:(o==null?void 0:o.id)??null},state:{},status:r,url:new URL(t),form:s??null,data:h?l:x.data}),c}async function Rt({loader:t,parent:a,url:e,params:r,route:n,server_data_node:o}){var l,h;let s=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:o,universal:(l=c.universal)!=null&&l.load?{type:"data",data:s,uses:i}:null,data:s??(o==null?void 0:o.data)??null,slash:((h=c.universal)==null?void 0:h.trailingSlash)??(o==null?void 0:o.slash)}}function Se(t,a,e){let r=t instanceof Request?t.url:t;const n=new URL(r,e);n.origin===e.origin&&(r=n.href.slice(e.origin.length));const o=et?ce(r,n.href,a):le(r,a);return{resolved:n,promise:o}}function Re(t,a,e,r,n,o){if(St)return!0;if(!n)return!1;if(n.parent&&t||n.route&&a||n.url&&e)return!0;for(const s of n.search_params)if(r.has(s))return!0;for(const s of n.params)if(o[s]!==g.params[s])return!0;for(const s of n.dependencies)if(Z.some(i=>i(new URL(s))))return!0;return!1}function xt(t,a){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?a??null:null}function xe(t,a){if(!t)return new Set(a.searchParams.keys());const e=new Set([...t.searchParams.keys(),...a.searchParams.keys()]);for(const r of e){const n=t.searchParams.getAll(r),o=a.searchParams.getAll(r);n.every(s=>o.includes(s))&&o.every(s=>n.includes(s))&&e.delete(r)}return e}function Le({error:t,url:a,route:e,params:r}){return{type:"loaded",state:{error:t,url:a,route:e,params:r,branch:[]},props:{page:At(x),constructors:[]}}}async function Xt({id:t,invalidating:a,url:e,params:r,route:n,preload:o}){if((v==null?void 0:v.id)===t)return at.delete(v.token),v.promise;const{errors:s,layouts:i,leaf:c}=n,l=[...i,c];s.forEach(m=>m==null?void 0:m().catch(()=>{})),l.forEach(m=>m==null?void 0:m[1]().catch(()=>{}));const h=g.url?t!==rt(g.url):!1,u=g.route?n.id!==g.route.id:!1,w=xe(g.url,e);let f=!1;const d=l.map(async(m,p)=>{var A;if(!m)return;const y=g.branch[p];return m[1]===(y==null?void 0:y.loader)&&!Re(f,u,h,w,(A=y.universal)==null?void 0:A.uses,r)?y:(f=!0,Rt({loader:m[1],url:e,params:r,route:n,parent:async()=>{var z;const T={};for(let j=0;j<p;j+=1)Object.assign(T,(z=await d[j])==null?void 0:z.data);return T},server_data_node:xt(m[0]?{type:"skip"}:null,m[0]?y==null?void 0:y.server:void 0)}))});for(const m of d)m.catch(()=>{});const _=[];for(let m=0;m<l.length;m+=1)if(l[m])try{_.push(await d[m])}catch(p){if(p instanceof vt)return{type:"redirect",location:p.location};if(at.has(o))return Le({error:await Y(p,{params:r,url:e,route:{id:n.id}}),url:e,params:r,route:n});let y=bt(p),S;if(p instanceof wt)S=p.body;else{if(await P.updated.check())return await Mt(),await B(e);S=await Y(p,{params:r,url:e,route:{id:n.id}})}const A=await Ue(m,_,s);return A?nt({url:e,params:r,branch:_.slice(0,A.idx).concat(A.node),status:y,error:S,route:n}):await Zt(e,{id:n.id},S,y)}else _.push(void 0);return nt({url:e,params:r,branch:_,status:200,error:null,route:n,form:a?void 0:null})}async function Ue(t,a,e){for(;t--;)if(e[t]){let r=t;for(;!a[r];)r-=1;try{return{idx:r+1,node:{node:await e[t](),loader:e[t],data:{},server:null,universal:null}}}catch{continue}}}async function Lt({status:t,error:a,url:e,route:r}){const n={};let o=null;try{const s=await Rt({loader:ht,url:e,params:n,route:r,parent:()=>Promise.resolve({}),server_data_node:xt(o)}),i={node:await Q(),loader:Q,universal:null,server:null,data:null};return nt({url:e,params:n,branch:[s,i],status:t,error:a,route:null})}catch(s){if(s instanceof vt)return Gt(new URL(s.location,location.href),{},0);throw s}}async function Ae(t){const a=t.href;if(G.has(a))return G.get(a);let e;try{const r=(async()=>{let n=await E.hooks.reroute({url:new URL(t),fetch:async(o,s)=>Se(o,s,t).promise})??t;if(typeof n=="string"){const o=new URL(t);E.hash?o.hash=n:o.pathname=n,n=o}return n})();G.set(a,r),e=await r}catch{G.delete(a);return}return e}async function ot(t,a){if(t&&!_t(t,L,E.hash)){const e=await Ae(t);if(!e)return;const r=Pe(e);for(const n of kt){const o=n.exec(r);if(o)return{id:rt(t),invalidating:a,route:n,params:re(o),url:t}}}}function Pe(t){return ie(E.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(L.length))||"/"}function rt(t){return(E.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Qt({url:t,type:a,intent:e,delta:r,event:n,scroll:o}){let s=!1;const i=Ut(g,e,t,a,o??null);r!==void 0&&(i.navigation.delta=r),n!==void 0&&(i.navigation.event=n);const c={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return H||Vt.forEach(l=>l(c)),s?null:i}async function D({type:t,url:a,popped:e,keepfocus:r,noscroll:n,replace_state:o,state:s={},redirect_count:i=0,nav_token:c={},accept:l=Tt,block:h=Tt,event:u}){var j;const w=O;O=c;const f=await ot(a,!1),d=t==="enter"?Ut(g,f,a,t):Qt({url:a,type:t,delta:e==null?void 0:e.delta,intent:f,scroll:e==null?void 0:e.scroll,event:u});if(!d){h(),O===c&&(O=w);return}const _=b,m=R;l(),H=!0,et&&d.navigation.type!=="enter"&&P.navigating.set(ft.current=d.navigation);let p=f&&await Xt(f);if(!p){if(_t(a,L,E.hash))return await B(a,o);p=await Zt(a,{id:null},await Y(new yt(404,"Not Found",`Not found: ${a.pathname}`),{url:a,params:{},route:{id:null}}),404,o)}if(a=(f==null?void 0:f.url)||a,O!==c)return d.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await D({type:t,url:new URL(p.location,a),popped:e,keepfocus:r,noscroll:n,replace_state:o,state:s,redirect_count:i+1,nav_token:c}),d.fulfil(void 0);return}p=await Lt({status:500,error:await Y(new Error("Redirect loop"),{url:a,params:{},route:{id:null}}),url:a,route:{id:null}})}else p.props.page.status>=400&&await P.updated.check()&&(await Mt(),await B(a,o));if(Ee(),Et(_),zt(m),p.props.page.url.pathname!==a.pathname&&(a.pathname=p.props.page.url.pathname),s=e?e.state:s,!e){const k=o?0:1,W={[N]:b+=k,[M]:R+=k,[Dt]:s};(o?history.replaceState:history.pushState).call(history,W,"",a),o||ye(b,R)}const y=f&&(v==null?void 0:v.id)===f.id?v.fork:null;v=null,p.props.page.state=s;let S;if(et){const k=(await Promise.all(Array.from(be,$=>$(d.navigation)))).filter($=>typeof $=="function");if(k.length>0){let $=function(){k.forEach(st=>{F.delete(st)})};k.push($),k.forEach(st=>{F.add(st)})}g=p.state,p.props.page&&(p.props.page.url=a);const W=y&&await y;W?S=W.commit():(Yt.$set(p.props),fe(p.props.page),S=(j=ee)==null?void 0:j()),Ht=!0}else await Jt(p,dt,!1);const{activeElement:A}=document;await S,await J(),await J();let T=null;if(Ot){const k=e?e.scroll:n?C():null;k?scrollTo(k.x,k.y):(T=a.hash&&document.getElementById(te(a)))?T.scrollIntoView():scrollTo(0,0)}const z=document.activeElement!==A&&document.activeElement!==document.body;!r&&!z&&$e(a,!T),Ot=!0,p.props.page&&Object.assign(x,p.props.page),H=!1,t==="popstate"&&Wt(R),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=C()),F.forEach(k=>k(d.navigation)),P.navigating.set(ft.current=null)}async function Zt(t,a,e,r,n){return t.origin===$t&&t.pathname===location.pathname&&!Bt?await Lt({status:r,error:e,url:t,route:a}):await B(t,n)}function Ie(){let t,a={element:void 0,href:void 0},e;U.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{o(c,q.hover)},20)});function r(i){i.defaultPrevented||o(i.composedPath()[0],q.tap)}U.addEventListener("mousedown",r),U.addEventListener("touchstart",r,{passive:!0});const n=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(lt(new URL(c.target.href)),n.unobserve(c.target))},{threshold:0});async function o(i,c){const l=Nt(i,U),h=l===a.element&&(l==null?void 0:l.href)===a.href&&c>=e;if(!l||h)return;const{url:u,external:w,download:f}=ut(l,L,E.hash);if(w||f)return;const d=X(l),_=u&&rt(g.url)===rt(u);if(!(d.reload||_))if(c<=d.preload_data){a={element:l,href:l.href},e=q.tap;const m=await ot(u,!1);if(!m)return;ke(m)}else c<=d.preload_code&&(a={element:l,href:l.href},e=c,lt(u))}function s(){n.disconnect();for(const i of U.querySelectorAll("a")){const{url:c,external:l,download:h}=ut(i,L,E.hash);if(l||h)continue;const u=X(i);u.reload||(u.preload_code===q.viewport&&n.observe(i),u.preload_code===q.eager&&lt(c))}}F.add(s),s()}function Y(t,a){if(t instanceof wt)return t.body;const e=bt(t),r=we(t);return E.hooks.handleError({error:t,event:a,status:e,message:r})??{message:r}}function Me(t,a={}){return t=new URL(gt(t)),t.origin!==$t?Promise.reject(new Error("goto: invalid URL")):Gt(t,a,0)}function Te(t){if(typeof t=="function")Z.push(t);else{const{href:a}=new URL(t,location.href);Z.push(e=>e.href===a)}}function Oe(){var a;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let r=!1;if(jt(),!H){const n=Ut(g,void 0,null,"leave"),o={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};Vt.forEach(s=>s(o))}r?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&jt()}),(a=navigator.connection)!=null&&a.saveData||Ie(),U.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const r=Nt(e.composedPath()[0],U);if(!r)return;const{url:n,external:o,target:s,download:i}=ut(r,L,E.hash);if(!n)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const c=X(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||i)return;const[h,u]=(E.hash?n.hash.replace(/^#/,""):n.href).split("#"),w=h===it(location);if(o||c.reload&&(!w||!u)){Qt({url:n,type:"link",event:e})?H=!0:e.preventDefault();return}if(u!==void 0&&w){const[,f]=g.url.href.split("#");if(f===u){if(e.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(K=!0,Et(b),t(n),!c.replace_state)return;K=!1}e.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await D({type:"link",url:n,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??n.href===location.href,event:e})}),U.addEventListener("submit",e=>{if(e.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if(((n==null?void 0:n.formTarget)||r.target)==="_blank"||((n==null?void 0:n.formMethod)||r.method)!=="get")return;const i=new URL((n==null?void 0:n.hasAttribute("formaction"))&&(n==null?void 0:n.formAction)||r.action);if(_t(i,L,!1))return;const c=e.target,l=X(c);if(l.reload)return;e.preventDefault(),e.stopPropagation();const h=new FormData(c,n);i.search=new URLSearchParams(h).toString(),D({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:e})}),addEventListener("popstate",async e=>{var r;if(!mt){if((r=e.state)!=null&&r[N]){const n=e.state[N];if(O={},n===b)return;const o=I[n],s=e.state[Dt]??{},i=new URL(e.state[ne]??location.href),c=e.state[M],l=g.url?it(location)===it(g.url):!1;if(c===R&&(Ht||l)){s!==x.state&&(x.state=s),t(i),I[b]=C(),o&&scrollTo(o.x,o.y),b=n;return}const u=n-b;await D({type:"popstate",url:i,popped:{state:s,scroll:o,delta:u},accept:()=>{b=n,R=c},block:()=>{history.go(-u)},nav_token:O,event:e})}else if(!K){const n=new URL(location.href);t(n),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[N]:++b,[M]:R},"",location.href))});for(const e of document.querySelectorAll("link"))ve.has(e.rel)&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&P.navigating.set(ft.current=null)});function t(e){g.url=x.url=e,P.page.set(At(x)),P.page.notify()}}async function Ce(t,{status:a=200,error:e,node_ids:r,params:n,route:o,server_route:s,data:i,form:c}){Bt=!0;const l=new URL(location.href);let h;({params:n={},route:o={id:null}}=await ot(l,!1)||{}),h=kt.find(({id:f})=>f===o.id);let u,w=!0;try{const f=r.map(async(_,m)=>{const p=i[m];return p!=null&&p.uses&&(p.uses=je(p.uses)),Rt({loader:E.nodes[_],url:l,params:n,route:o,parent:async()=>{const y={};for(let S=0;S<m;S+=1)Object.assign(y,(await f[S]).data);return y},server_data_node:xt(p)})}),d=await Promise.all(f);if(h){const _=h.layouts;for(let m=0;m<_.length;m++)_[m]||d.splice(m,0,void 0)}u=nt({url:l,params:n,branch:d,status:a,error:e,form:c,route:h??null})}catch(f){if(f instanceof vt){await B(new URL(f.location,location.href));return}u=await Lt({status:bt(f),error:await Y(f,{url:l,params:n,route:o}),url:l,route:o}),t.textContent="",w=!1}u.props.page&&(u.props.page.state={}),await Jt(u,t,w)}function je(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let mt=!1;function $e(t,a=!0){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const r=te(t);if(r&&document.getElementById(r)){const{x:o,y:s}=C();setTimeout(()=>{const i=history.state;mt=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(i,"",t),a&&scrollTo(o,s),mt=!1})}else{const o=document.body,s=o.getAttribute("tabindex");o.tabIndex=-1,o.focus({preventScroll:!0,focusVisible:!1}),s!==null?o.setAttribute("tabindex",s):o.removeAttribute("tabindex")}const n=getSelection();if(n&&n.type!=="None"){const o=[];for(let s=0;s<n.rangeCount;s+=1)o.push(n.getRangeAt(s));setTimeout(()=>{if(n.rangeCount===o.length){for(let s=0;s<n.rangeCount;s+=1){const i=o[s],c=n.getRangeAt(s);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}n.removeAllRanges()}})}}}function Ut(t,a,e,r,n=null){var l,h;let o,s;const i=new Promise((u,w)=>{o=u,s=w});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url,scroll:C()},to:e&&{params:(a==null?void 0:a.params)??null,route:{id:((h=a==null?void 0:a.route)==null?void 0:h.id)??null},url:e,scroll:n},willUnload:!a,type:r,complete:i},fulfil:o,reject:s}}function At(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Ne(t){const a=new URL(t);return a.hash=decodeURIComponent(t.hash),a}function te(t){let a;if(E.hash){const[,,e]=t.hash.split("#",3);a=e??""}else a=t.hash.slice(1);return decodeURIComponent(a)}export{Fe as a,Me as g,P as s};
1
+ import{ab as J,bm as ee}from"./BdTBlfLy.js";import{w as ae}from"./Bn2NtlTj.js";import{H as N,N as M,r as gt,o as $t,i as _t,b as L,s as C,p as x,n as ft,f as Nt,g as ut,a as X,c as it,S as Dt,P as ne,d as re,e as oe,h as se,j as Pt,k as q,l as ie,m as qt,q as ce,t as le,u as Kt,v as fe}from"./5PDcRlfX.js";class wt{constructor(a,e){this.status=a,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${a}`}}toString(){return JSON.stringify(this.body)}}class vt{constructor(a,e){this.status=a,this.location=e}}class yt extends Error{constructor(a,e,r){super(r),this.status=a,this.text=e}}const ue=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function he(t){const a=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${pe(t).map(r=>{const n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(n)return a.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(o)return a.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return ct(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return ct(String.fromCharCode(...c.slice(2).split("-").map(_=>parseInt(_,16))));const h=ue.exec(c),[,u,w,f,d]=h;return a.push({name:f,matcher:d,optional:!!u,rest:!!w,chained:w?l===1&&s[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return ct(c)}).join("")}).join("")}/?$`),params:a}}function de(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function pe(t){return t.slice(1).split("/").filter(de)}function me(t,a,e){const r={},n=t.slice(1),o=n.filter(i=>i!==void 0);let s=0;for(let i=0;i<a.length;i+=1){const c=a[i];let l=n[i-s];if(c.chained&&c.rest&&s&&(l=n.slice(i-s,i+1).filter(h=>h).join("/"),s=0),l===void 0)if(c.rest)l="";else continue;if(!c.matcher||e[c.matcher](l)){r[c.name]=l;const h=a[i+1],u=n[i+1];h&&!h.rest&&h.optional&&u&&c.chained&&(s=0),!h&&!u&&Object.keys(r).length===o.length&&(s=0);continue}if(c.optional&&c.chained){s++;continue}return}if(!s)return r}function ct(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function ge({nodes:t,server_loads:a,dictionary:e,matchers:r}){const n=new Set(a);return Object.entries(e).map(([i,[c,l,h]])=>{const{pattern:u,params:w}=he(i),f={id:i,exec:d=>{const _=u.exec(d);if(_)return me(_,w,r)},errors:[1,...h||[]].map(d=>t[d]),layouts:[0,...l||[]].map(s),leaf:o(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function o(i){const c=i<0;return c&&(i=~i),[c,t[i]]}function s(i){return i===void 0?i:[n.has(i),t[i]]}}function Ft(t,a=JSON.parse){try{return a(sessionStorage[t])}catch{}}function It(t,a,e=JSON.stringify){const r=e(a);try{sessionStorage[t]=r}catch{}}function _e(t){return t.filter(a=>a!=null)}function bt(t){return t instanceof wt||t instanceof yt?t.status:500}function we(t){return t instanceof yt?t.text:"Internal Error"}const ve=new Set(["icon","shortcut icon","apple-touch-icon"]),I=Ft(Kt)??{},V=Ft(qt)??{},P={url:Pt({}),page:Pt({}),navigating:ae(null),updated:se()};function Et(t){I[t]=C()}function ye(t,a){let e=t+1;for(;I[e];)delete I[e],e+=1;for(e=a+1;V[e];)delete V[e],e+=1}function B(t,a=!1){return a?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Mt(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(L||"/");t&&await t.update()}}function Tt(){}let kt,ht,Q,U,dt,E;const Z=[],tt=[];let v=null;function pt(){var t;(t=v==null?void 0:v.fork)==null||t.then(a=>a==null?void 0:a.discard()),v=null}const G=new Map,Vt=new Set,be=new Set,F=new Set;let g={branch:[],error:null,url:null},Bt=!1,et=!1,Ot=!0,H=!1,K=!1,Ht=!1,St=!1,Yt,b,R,O;const at=new Set,Ct=new Map;async function Fe(t,a,e){var o,s,i,c,l;(o=globalThis.__sveltekit_1ddhohc)!=null&&o.data&&globalThis.__sveltekit_1ddhohc.data,document.URL!==location.href&&(location.href=location.href),E=t,await((i=(s=t.hooks).init)==null?void 0:i.call(s)),kt=ge(t),U=document.documentElement,dt=a,ht=t.nodes[0],Q=t.nodes[1],ht(),Q(),b=(c=history.state)==null?void 0:c[N],R=(l=history.state)==null?void 0:l[M],b||(b=R=Date.now(),history.replaceState({...history.state,[N]:b,[M]:R},""));const r=I[b];function n(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}e?(n(),await Ce(dt,e)):(await D({type:"enter",url:gt(E.hash?Ne(new URL(location.href)):location.href),replace_state:!0}),n()),Oe()}function Ee(){Z.length=0,St=!1}function zt(t){tt.some(a=>a==null?void 0:a.snapshot)&&(V[t]=tt.map(a=>{var e;return(e=a==null?void 0:a.snapshot)==null?void 0:e.capture()}))}function Wt(t){var a;(a=V[t])==null||a.forEach((e,r)=>{var n,o;(o=(n=tt[r])==null?void 0:n.snapshot)==null||o.restore(e)})}function jt(){Et(b),It(Kt,I),zt(R),It(qt,V)}async function Gt(t,a,e,r){let n;a.invalidateAll&&pt(),await D({type:"goto",url:gt(t),keepfocus:a.keepFocus,noscroll:a.noScroll,replace_state:a.replaceState,state:a.state,redirect_count:e,nav_token:r,accept:()=>{a.invalidateAll&&(St=!0,n=[...Ct.keys()]),a.invalidate&&a.invalidate.forEach(Te)}}),a.invalidateAll&&J().then(J).then(()=>{Ct.forEach(({resource:o},s)=>{var i;n!=null&&n.includes(s)&&((i=o.refresh)==null||i.call(o))})})}async function ke(t){if(t.id!==(v==null?void 0:v.id)){pt();const a={};at.add(a),v={id:t.id,token:a,promise:Xt({...t,preload:a}).then(e=>(at.delete(a),e.type==="loaded"&&e.state.error&&pt(),e)),fork:null}}return v.promise}async function lt(t){var e;const a=(e=await ot(t,!1))==null?void 0:e.route;a&&await Promise.all([...a.layouts,a.leaf].map(r=>r==null?void 0:r[1]()))}async function Jt(t,a,e){var n;g=t.state;const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(x,t.props.page),Yt=new E.root({target:a,props:{...t.props,stores:P,components:tt},hydrate:e,sync:!1}),await Promise.resolve(),Wt(R),e){const o={from:null,to:{params:g.params,route:{id:((n=g.route)==null?void 0:n.id)??null},url:new URL(location.href),scroll:I[b]??C()},willUnload:!1,type:"enter",complete:Promise.resolve()};F.forEach(s=>s(o))}et=!0}function nt({url:t,params:a,branch:e,status:r,error:n,route:o,form:s}){let i="never";if(L&&(t.pathname===L||t.pathname===L+"/"))i="always";else for(const f of e)(f==null?void 0:f.slash)!==void 0&&(i=f.slash);t.pathname=oe(t.pathname,i),t.search=t.search;const c={type:"loaded",state:{url:t,params:a,branch:e,error:n,route:o},props:{constructors:_e(e).map(f=>f.node.component),page:At(x)}};s!==void 0&&(c.props.form=s);let l={},h=!x,u=0;for(let f=0;f<Math.max(e.length,g.branch.length);f+=1){const d=e[f],_=g.branch[f];(d==null?void 0:d.data)!==(_==null?void 0:_.data)&&(h=!0),d&&(l={...l,...d.data},h&&(c.props[`data_${u}`]=l),u+=1)}return(!g.url||t.href!==g.url.href||g.error!==n||s!==void 0&&s!==x.form||h)&&(c.props.page={error:n,params:a,route:{id:(o==null?void 0:o.id)??null},state:{},status:r,url:new URL(t),form:s??null,data:h?l:x.data}),c}async function Rt({loader:t,parent:a,url:e,params:r,route:n,server_data_node:o}){var l,h;let s=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();return{node:c,loader:t,server:o,universal:(l=c.universal)!=null&&l.load?{type:"data",data:s,uses:i}:null,data:s??(o==null?void 0:o.data)??null,slash:((h=c.universal)==null?void 0:h.trailingSlash)??(o==null?void 0:o.slash)}}function Se(t,a,e){let r=t instanceof Request?t.url:t;const n=new URL(r,e);n.origin===e.origin&&(r=n.href.slice(e.origin.length));const o=et?ce(r,n.href,a):le(r,a);return{resolved:n,promise:o}}function Re(t,a,e,r,n,o){if(St)return!0;if(!n)return!1;if(n.parent&&t||n.route&&a||n.url&&e)return!0;for(const s of n.search_params)if(r.has(s))return!0;for(const s of n.params)if(o[s]!==g.params[s])return!0;for(const s of n.dependencies)if(Z.some(i=>i(new URL(s))))return!0;return!1}function xt(t,a){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?a??null:null}function xe(t,a){if(!t)return new Set(a.searchParams.keys());const e=new Set([...t.searchParams.keys(),...a.searchParams.keys()]);for(const r of e){const n=t.searchParams.getAll(r),o=a.searchParams.getAll(r);n.every(s=>o.includes(s))&&o.every(s=>n.includes(s))&&e.delete(r)}return e}function Le({error:t,url:a,route:e,params:r}){return{type:"loaded",state:{error:t,url:a,route:e,params:r,branch:[]},props:{page:At(x),constructors:[]}}}async function Xt({id:t,invalidating:a,url:e,params:r,route:n,preload:o}){if((v==null?void 0:v.id)===t)return at.delete(v.token),v.promise;const{errors:s,layouts:i,leaf:c}=n,l=[...i,c];s.forEach(m=>m==null?void 0:m().catch(()=>{})),l.forEach(m=>m==null?void 0:m[1]().catch(()=>{}));const h=g.url?t!==rt(g.url):!1,u=g.route?n.id!==g.route.id:!1,w=xe(g.url,e);let f=!1;const d=l.map(async(m,p)=>{var A;if(!m)return;const y=g.branch[p];return m[1]===(y==null?void 0:y.loader)&&!Re(f,u,h,w,(A=y.universal)==null?void 0:A.uses,r)?y:(f=!0,Rt({loader:m[1],url:e,params:r,route:n,parent:async()=>{var z;const T={};for(let j=0;j<p;j+=1)Object.assign(T,(z=await d[j])==null?void 0:z.data);return T},server_data_node:xt(m[0]?{type:"skip"}:null,m[0]?y==null?void 0:y.server:void 0)}))});for(const m of d)m.catch(()=>{});const _=[];for(let m=0;m<l.length;m+=1)if(l[m])try{_.push(await d[m])}catch(p){if(p instanceof vt)return{type:"redirect",location:p.location};if(at.has(o))return Le({error:await Y(p,{params:r,url:e,route:{id:n.id}}),url:e,params:r,route:n});let y=bt(p),S;if(p instanceof wt)S=p.body;else{if(await P.updated.check())return await Mt(),await B(e);S=await Y(p,{params:r,url:e,route:{id:n.id}})}const A=await Ue(m,_,s);return A?nt({url:e,params:r,branch:_.slice(0,A.idx).concat(A.node),status:y,error:S,route:n}):await Zt(e,{id:n.id},S,y)}else _.push(void 0);return nt({url:e,params:r,branch:_,status:200,error:null,route:n,form:a?void 0:null})}async function Ue(t,a,e){for(;t--;)if(e[t]){let r=t;for(;!a[r];)r-=1;try{return{idx:r+1,node:{node:await e[t](),loader:e[t],data:{},server:null,universal:null}}}catch{continue}}}async function Lt({status:t,error:a,url:e,route:r}){const n={};let o=null;try{const s=await Rt({loader:ht,url:e,params:n,route:r,parent:()=>Promise.resolve({}),server_data_node:xt(o)}),i={node:await Q(),loader:Q,universal:null,server:null,data:null};return nt({url:e,params:n,branch:[s,i],status:t,error:a,route:null})}catch(s){if(s instanceof vt)return Gt(new URL(s.location,location.href),{},0);throw s}}async function Ae(t){const a=t.href;if(G.has(a))return G.get(a);let e;try{const r=(async()=>{let n=await E.hooks.reroute({url:new URL(t),fetch:async(o,s)=>Se(o,s,t).promise})??t;if(typeof n=="string"){const o=new URL(t);E.hash?o.hash=n:o.pathname=n,n=o}return n})();G.set(a,r),e=await r}catch{G.delete(a);return}return e}async function ot(t,a){if(t&&!_t(t,L,E.hash)){const e=await Ae(t);if(!e)return;const r=Pe(e);for(const n of kt){const o=n.exec(r);if(o)return{id:rt(t),invalidating:a,route:n,params:re(o),url:t}}}}function Pe(t){return ie(E.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(L.length))||"/"}function rt(t){return(E.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Qt({url:t,type:a,intent:e,delta:r,event:n,scroll:o}){let s=!1;const i=Ut(g,e,t,a,o??null);r!==void 0&&(i.navigation.delta=r),n!==void 0&&(i.navigation.event=n);const c={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return H||Vt.forEach(l=>l(c)),s?null:i}async function D({type:t,url:a,popped:e,keepfocus:r,noscroll:n,replace_state:o,state:s={},redirect_count:i=0,nav_token:c={},accept:l=Tt,block:h=Tt,event:u}){var j;const w=O;O=c;const f=await ot(a,!1),d=t==="enter"?Ut(g,f,a,t):Qt({url:a,type:t,delta:e==null?void 0:e.delta,intent:f,scroll:e==null?void 0:e.scroll,event:u});if(!d){h(),O===c&&(O=w);return}const _=b,m=R;l(),H=!0,et&&d.navigation.type!=="enter"&&P.navigating.set(ft.current=d.navigation);let p=f&&await Xt(f);if(!p){if(_t(a,L,E.hash))return await B(a,o);p=await Zt(a,{id:null},await Y(new yt(404,"Not Found",`Not found: ${a.pathname}`),{url:a,params:{},route:{id:null}}),404,o)}if(a=(f==null?void 0:f.url)||a,O!==c)return d.reject(new Error("navigation aborted")),!1;if(p.type==="redirect"){if(i<20){await D({type:t,url:new URL(p.location,a),popped:e,keepfocus:r,noscroll:n,replace_state:o,state:s,redirect_count:i+1,nav_token:c}),d.fulfil(void 0);return}p=await Lt({status:500,error:await Y(new Error("Redirect loop"),{url:a,params:{},route:{id:null}}),url:a,route:{id:null}})}else p.props.page.status>=400&&await P.updated.check()&&(await Mt(),await B(a,o));if(Ee(),Et(_),zt(m),p.props.page.url.pathname!==a.pathname&&(a.pathname=p.props.page.url.pathname),s=e?e.state:s,!e){const k=o?0:1,W={[N]:b+=k,[M]:R+=k,[Dt]:s};(o?history.replaceState:history.pushState).call(history,W,"",a),o||ye(b,R)}const y=f&&(v==null?void 0:v.id)===f.id?v.fork:null;v=null,p.props.page.state=s;let S;if(et){const k=(await Promise.all(Array.from(be,$=>$(d.navigation)))).filter($=>typeof $=="function");if(k.length>0){let $=function(){k.forEach(st=>{F.delete(st)})};k.push($),k.forEach(st=>{F.add(st)})}g=p.state,p.props.page&&(p.props.page.url=a);const W=y&&await y;W?S=W.commit():(Yt.$set(p.props),fe(p.props.page),S=(j=ee)==null?void 0:j()),Ht=!0}else await Jt(p,dt,!1);const{activeElement:A}=document;await S,await J(),await J();let T=null;if(Ot){const k=e?e.scroll:n?C():null;k?scrollTo(k.x,k.y):(T=a.hash&&document.getElementById(te(a)))?T.scrollIntoView():scrollTo(0,0)}const z=document.activeElement!==A&&document.activeElement!==document.body;!r&&!z&&$e(a,!T),Ot=!0,p.props.page&&Object.assign(x,p.props.page),H=!1,t==="popstate"&&Wt(R),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=C()),F.forEach(k=>k(d.navigation)),P.navigating.set(ft.current=null)}async function Zt(t,a,e,r,n){return t.origin===$t&&t.pathname===location.pathname&&!Bt?await Lt({status:r,error:e,url:t,route:a}):await B(t,n)}function Ie(){let t,a={element:void 0,href:void 0},e;U.addEventListener("mousemove",i=>{const c=i.target;clearTimeout(t),t=setTimeout(()=>{o(c,q.hover)},20)});function r(i){i.defaultPrevented||o(i.composedPath()[0],q.tap)}U.addEventListener("mousedown",r),U.addEventListener("touchstart",r,{passive:!0});const n=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting&&(lt(new URL(c.target.href)),n.unobserve(c.target))},{threshold:0});async function o(i,c){const l=Nt(i,U),h=l===a.element&&(l==null?void 0:l.href)===a.href&&c>=e;if(!l||h)return;const{url:u,external:w,download:f}=ut(l,L,E.hash);if(w||f)return;const d=X(l),_=u&&rt(g.url)===rt(u);if(!(d.reload||_))if(c<=d.preload_data){a={element:l,href:l.href},e=q.tap;const m=await ot(u,!1);if(!m)return;ke(m)}else c<=d.preload_code&&(a={element:l,href:l.href},e=c,lt(u))}function s(){n.disconnect();for(const i of U.querySelectorAll("a")){const{url:c,external:l,download:h}=ut(i,L,E.hash);if(l||h)continue;const u=X(i);u.reload||(u.preload_code===q.viewport&&n.observe(i),u.preload_code===q.eager&&lt(c))}}F.add(s),s()}function Y(t,a){if(t instanceof wt)return t.body;const e=bt(t),r=we(t);return E.hooks.handleError({error:t,event:a,status:e,message:r})??{message:r}}function Me(t,a={}){return t=new URL(gt(t)),t.origin!==$t?Promise.reject(new Error("goto: invalid URL")):Gt(t,a,0)}function Te(t){if(typeof t=="function")Z.push(t);else{const{href:a}=new URL(t,location.href);Z.push(e=>e.href===a)}}function Oe(){var a;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let r=!1;if(jt(),!H){const n=Ut(g,void 0,null,"leave"),o={...n.navigation,cancel:()=>{r=!0,n.reject(new Error("navigation cancelled"))}};Vt.forEach(s=>s(o))}r?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&jt()}),(a=navigator.connection)!=null&&a.saveData||Ie(),U.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const r=Nt(e.composedPath()[0],U);if(!r)return;const{url:n,external:o,target:s,download:i}=ut(r,L,E.hash);if(!n)return;if(s==="_parent"||s==="_top"){if(window.parent!==window)return}else if(s&&s!=="_self")return;const c=X(r);if(!(r instanceof SVGAElement)&&n.protocol!==location.protocol&&!(n.protocol==="https:"||n.protocol==="http:")||i)return;const[h,u]=(E.hash?n.hash.replace(/^#/,""):n.href).split("#"),w=h===it(location);if(o||c.reload&&(!w||!u)){Qt({url:n,type:"link",event:e})?H=!0:e.preventDefault();return}if(u!==void 0&&w){const[,f]=g.url.href.split("#");if(f===u){if(e.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=r.ownerDocument.getElementById(decodeURIComponent(u));d&&(d.scrollIntoView(),d.focus())}return}if(K=!0,Et(b),t(n),!c.replace_state)return;K=!1}e.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await D({type:"link",url:n,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??n.href===location.href,event:e})}),U.addEventListener("submit",e=>{if(e.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if(((n==null?void 0:n.formTarget)||r.target)==="_blank"||((n==null?void 0:n.formMethod)||r.method)!=="get")return;const i=new URL((n==null?void 0:n.hasAttribute("formaction"))&&(n==null?void 0:n.formAction)||r.action);if(_t(i,L,!1))return;const c=e.target,l=X(c);if(l.reload)return;e.preventDefault(),e.stopPropagation();const h=new FormData(c,n);i.search=new URLSearchParams(h).toString(),D({type:"form",url:i,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??i.href===location.href,event:e})}),addEventListener("popstate",async e=>{var r;if(!mt){if((r=e.state)!=null&&r[N]){const n=e.state[N];if(O={},n===b)return;const o=I[n],s=e.state[Dt]??{},i=new URL(e.state[ne]??location.href),c=e.state[M],l=g.url?it(location)===it(g.url):!1;if(c===R&&(Ht||l)){s!==x.state&&(x.state=s),t(i),I[b]=C(),o&&scrollTo(o.x,o.y),b=n;return}const u=n-b;await D({type:"popstate",url:i,popped:{state:s,scroll:o,delta:u},accept:()=>{b=n,R=c},block:()=>{history.go(-u)},nav_token:O,event:e})}else if(!K){const n=new URL(location.href);t(n),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{K&&(K=!1,history.replaceState({...history.state,[N]:++b,[M]:R},"",location.href))});for(const e of document.querySelectorAll("link"))ve.has(e.rel)&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&P.navigating.set(ft.current=null)});function t(e){g.url=x.url=e,P.page.set(At(x)),P.page.notify()}}async function Ce(t,{status:a=200,error:e,node_ids:r,params:n,route:o,server_route:s,data:i,form:c}){Bt=!0;const l=new URL(location.href);let h;({params:n={},route:o={id:null}}=await ot(l,!1)||{}),h=kt.find(({id:f})=>f===o.id);let u,w=!0;try{const f=r.map(async(_,m)=>{const p=i[m];return p!=null&&p.uses&&(p.uses=je(p.uses)),Rt({loader:E.nodes[_],url:l,params:n,route:o,parent:async()=>{const y={};for(let S=0;S<m;S+=1)Object.assign(y,(await f[S]).data);return y},server_data_node:xt(p)})}),d=await Promise.all(f);if(h){const _=h.layouts;for(let m=0;m<_.length;m++)_[m]||d.splice(m,0,void 0)}u=nt({url:l,params:n,branch:d,status:a,error:e,form:c,route:h??null})}catch(f){if(f instanceof vt){await B(new URL(f.location,location.href));return}u=await Lt({status:bt(f),error:await Y(f,{url:l,params:n,route:o}),url:l,route:o}),t.textContent="",w=!1}u.props.page&&(u.props.page.state={}),await Jt(u,t,w)}function je(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let mt=!1;function $e(t,a=!0){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const r=te(t);if(r&&document.getElementById(r)){const{x:o,y:s}=C();setTimeout(()=>{const i=history.state;mt=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(i,"",t),a&&scrollTo(o,s),mt=!1})}else{const o=document.body,s=o.getAttribute("tabindex");o.tabIndex=-1,o.focus({preventScroll:!0,focusVisible:!1}),s!==null?o.setAttribute("tabindex",s):o.removeAttribute("tabindex")}const n=getSelection();if(n&&n.type!=="None"){const o=[];for(let s=0;s<n.rangeCount;s+=1)o.push(n.getRangeAt(s));setTimeout(()=>{if(n.rangeCount===o.length){for(let s=0;s<n.rangeCount;s+=1){const i=o[s],c=n.getRangeAt(s);if(i.commonAncestorContainer!==c.commonAncestorContainer||i.startContainer!==c.startContainer||i.endContainer!==c.endContainer||i.startOffset!==c.startOffset||i.endOffset!==c.endOffset)return}n.removeAllRanges()}})}}}function Ut(t,a,e,r,n=null){var l,h;let o,s;const i=new Promise((u,w)=>{o=u,s=w});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((l=t.route)==null?void 0:l.id)??null},url:t.url,scroll:C()},to:e&&{params:(a==null?void 0:a.params)??null,route:{id:((h=a==null?void 0:a.route)==null?void 0:h.id)??null},url:e,scroll:n},willUnload:!a,type:r,complete:i},fulfil:o,reject:s}}function At(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Ne(t){const a=new URL(t);return a.hash=decodeURIComponent(t.hash),a}function te(t){let a;if(E.hash){const[,,e]=t.hash.split("#",3);a=e??""}else a=t.hash.slice(1);return decodeURIComponent(a)}export{Fe as a,Me as g,P as s};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.BZ00WDYH.js","../chunks/CWj6FrbW.js","../chunks/BdTBlfLy.js","../chunks/DtZk82gG.js","../chunks/DEELgv7K.js","../chunks/XmteHKH_.js","../chunks/Bb0e0sAP.js","../chunks/Y22E1hJM.js","../chunks/CoI6jjbg.js","../chunks/Cp8V0Xy2.js","../chunks/Bn2NtlTj.js","../chunks/CSGrwS7E.js","../chunks/m9QZTyVV.js","../chunks/D755Tqat.js","../chunks/BcIUK2sk.js","../chunks/BsFiK_FJ.js","../chunks/Dqk2TGNU.js","../chunks/CqUxCvs_.js","../chunks/DHWOQ9Ui.js","../chunks/F9_4wRrd.js","../chunks/CGgVJi7f.js","../chunks/C8s55wKu.js","../chunks/CYatlt7w.js","../chunks/D-x55wdW.js","../assets/0.Bm6cF078.css","../nodes/1.RzSJ3yyr.js","../assets/1.BfW3pUNa.css","../nodes/2.Bn3R2oDm.js","../nodes/3.Bzo2yVIO.js","../chunks/C72lTcG0.js","../assets/Button.DpzMRTjK.css","../assets/3.BtHYobTg.css","../nodes/4.BgQaXZ27.js","../chunks/R6arueIl.js","../chunks/B8s_s9QY.js","../assets/PageShell.CmU-Xh-b.css","../chunks/k0CIJkw4.js","../assets/TimeChart.BTCDAvmT.css","../chunks/Q2nPFxS6.js","../assets/4.CyawCCux.css","../nodes/5.BuJrHvxH.js","../chunks/DjOEv9M9.js","../assets/TopList.ClFzmPlA.css","../assets/5.C0YO2HTk.css","../nodes/6.CkBBC94k.js","../nodes/7.D2YBvNFM.js","../nodes/8.D8qQWo_z.js","../chunks/BCKr7yKd.js","../assets/Select.BW4Keufm.css","../chunks/_teD5ji5.js","../assets/Input.BDUSenmU.css","../chunks/m9eWh0Cd.js","../assets/EmptyState.CwKsu57Y.css","../chunks/B0HRJ657.js","../assets/Badge.EMYLHBxE.css","../assets/8.Br5jd6kD.css","../nodes/9.BLDLX5hV.js","../nodes/10.D-rsiquF.js","../nodes/11.l7-bgtFD.js","../chunks/DILS_-VJ.js","../assets/ConfirmDialog.DAnaWRRk.css","../chunks/Dt4vL4Df.js","../assets/Modal.Dm5B0Xie.css","../chunks/DnLqc9L1.js","../assets/Skeleton.KWUulTKJ.css","../assets/11.CVmQOewb.css","../nodes/12.Dkq0H7B5.js","../assets/12.B1EhbRZT.css","../nodes/13.DtK_4oRz.js","../chunks/BFs_qStz.js","../assets/Tabs.CniGYb67.css","../chunks/gtu8uwJD.js","../assets/13.BvwYeuwE.css","../nodes/14.BKo7-AMx.js","../chunks/Z41NK6i6.js","../assets/Toggle.Cy_K12OM.css","../assets/14.CdVfcO0R.css","../nodes/15.CQAj_6lq.js","../chunks/wJsUhbfZ.js","../assets/15.2yeZ66b-.css","../nodes/16.XVIG-Ffr.js","../nodes/17.g6raZLCM.js","../assets/17.BVg0JEVu.css","../nodes/18.IQz6a3T6.js","../assets/18.Rwnl3x_i.css","../nodes/19.CAAZ8i8h.js","../chunks/B2bEC_Hm.js","../assets/19.4Si2ZFC_.css","../nodes/20.BPcX3KPj.js","../assets/20.DsPWA9AV.css","../nodes/21.DoPabrY_.js","../chunks/B0QyxC2M.js","../chunks/BTJcQFEp.js","../assets/SchemaFieldEditor.g4NsCdno.css","../chunks/Ce-ngf4p.js","../assets/21.x9OgMBdi.css","../nodes/22.Br5AG_5Z.js","../assets/22.DwNLk5Ai.css","../nodes/23.KjbrdXoE.js","../assets/23.CFpu0gOO.css","../nodes/24.C3n2-hgw.js","../assets/24.Cy5LBeoJ.css","../nodes/25.SFDSBzHd.js","../assets/25.pUyLVf-h.css","../nodes/26.D95vui6E.js","../assets/26.DBcGrlXa.css","../nodes/27.FgLgdjwB.js","../assets/27.BswYyAJD.css","../nodes/28.B9sYYm1F.js","../assets/28.B4ueB1Kf.css","../nodes/29.DyqZ_wbN.js","../assets/29.B-qU6PdF.css","../nodes/30.c1CiNwiS.js","../assets/30.CsdWum94.css","../nodes/31.CXty66Vh.js","../assets/31.U6OwIp50.css"])))=>i.map(i=>d[i]);
2
- var tt=a=>{throw TypeError(a)};var rt=(a,t,r)=>t.has(a)||tt("Cannot "+r);var s=(a,t,r)=>(rt(a,t,"read from private field"),r?r.call(a):t.get(a)),F=(a,t,r)=>t.has(a)?tt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,r),H=(a,t,r,i)=>(rt(a,t,"write to private field"),i?i.call(a,r):t.set(a,r),r);import{c as b,_ as e}from"../chunks/B2bEC_Hm.js";import{b as S,Z as ht,g as m,aK as pt,a9 as Pt,a7 as Ot,p as Rt,ai as bt,w as At,ab as It,f as E,s as Lt,a as Dt,d as J,c as Tt,r as Vt,u as A,t as yt}from"../chunks/BdTBlfLy.js";import{h as xt,m as wt,u as kt,s as jt}from"../chunks/DtZk82gG.js";import"../chunks/CWj6FrbW.js";import{o as Ct}from"../chunks/Bn2NtlTj.js";import{i as k}from"../chunks/Y22E1hJM.js";import{a as u,c as h,f as et,t as St}from"../chunks/DEELgv7K.js";import{b as I}from"../chunks/CGgVJi7f.js";import{p as j}from"../chunks/F9_4wRrd.js";function Mt(a){return class extends qt{constructor(t){super({component:a,...t})}}}var p,c;class qt{constructor(t){F(this,p);F(this,c);var L;var r=new Map,i=(_,o)=>{var g=Ot(o,!1,!1);return r.set(_,g),g};const d=new Proxy({...t.props||{},$$events:{}},{get(_,o){return m(r.get(o)??i(o,Reflect.get(_,o)))},has(_,o){return o===ht?!0:(m(r.get(o)??i(o,Reflect.get(_,o))),Reflect.has(_,o))},set(_,o,g){return S(r.get(o)??i(o,g),g),Reflect.set(_,o,g)}});H(this,c,(t.hydrate?xt:wt)(t.component,{target:t.target,anchor:t.anchor,props:d,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((L=t==null?void 0:t.props)!=null&&L.$$host)||t.sync===!1)&&pt(),H(this,p,d.$$events);for(const _ of Object.keys(s(this,c)))_==="$set"||_==="$destroy"||_==="$on"||Pt(this,_,{get(){return s(this,c)[_]},set(o){s(this,c)[_]=o},enumerable:!0});s(this,c).$set=_=>{Object.assign(d,_)},s(this,c).$destroy=()=>{kt(s(this,c))}}$set(t){s(this,c).$set(t)}$on(t,r){s(this,p)[t]=s(this,p)[t]||[];const i=(...d)=>r.call(this,...d);return s(this,p)[t].push(i),()=>{s(this,p)[t]=s(this,p)[t].filter(d=>d!==i)}}$destroy(){s(this,c).$destroy()}}p=new WeakMap,c=new WeakMap;const er={};var Gt=et('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Kt=et("<!> <!>",1);function Yt(a,t){Rt(t,!0);let r=j(t,"components",23,()=>[]),i=j(t,"data_0",3,null),d=j(t,"data_1",3,null),L=j(t,"data_2",3,null),_=j(t,"data_3",3,null);bt(()=>t.stores.page.set(t.page)),At(()=>{t.stores,t.page,t.constructors,r(),t.form,i(),d(),L(),_(),t.stores.page.notify()});let o=J(!1),g=J(!1),N=J(null);Ct(()=>{const n=t.stores.page.subscribe(()=>{m(o)&&(S(g,!0),It().then(()=>{S(N,document.title||"untitled page",!0)}))});return S(o,!0),n});const ot=A(()=>t.constructors[3]);var Q=Kt(),U=E(Q);{var _t=n=>{const P=A(()=>t.constructors[0]);var O=h(),y=E(O);b(y,()=>m(P),(R,D)=>{I(D(R,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(l,zt)=>{var W=h(),nt=E(W);{var ut=T=>{const M=A(()=>t.constructors[1]);var x=h(),q=E(x);b(q,()=>m(M),(G,K)=>{I(K(G,{get data(){return d()},get form(){return t.form},get params(){return t.page.params},children:(f,Bt)=>{var X=h(),dt=E(X);{var lt=V=>{const Y=A(()=>t.constructors[2]);var w=h(),Z=E(w);b(Z,()=>m(Y),(z,B)=>{I(B(z,{get data(){return L()},get form(){return t.form},get params(){return t.page.params},children:(v,Ft)=>{var $=h(),vt=E($);b(vt,()=>m(ot),(Et,gt)=>{I(gt(Et,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),C=>r()[3]=C,()=>{var C;return(C=r())==null?void 0:C[3]})}),u(v,$)},$$slots:{default:!0}}),v=>r()[2]=v,()=>{var v;return(v=r())==null?void 0:v[2]})}),u(V,w)},ft=V=>{const Y=A(()=>t.constructors[2]);var w=h(),Z=E(w);b(Z,()=>m(Y),(z,B)=>{I(B(z,{get data(){return L()},get form(){return t.form},get params(){return t.page.params}}),v=>r()[2]=v,()=>{var v;return(v=r())==null?void 0:v[2]})}),u(V,w)};k(dt,V=>{t.constructors[3]?V(lt):V(ft,!1)})}u(f,X)},$$slots:{default:!0}}),f=>r()[1]=f,()=>{var f;return(f=r())==null?void 0:f[1]})}),u(T,x)},ct=T=>{const M=A(()=>t.constructors[1]);var x=h(),q=E(x);b(q,()=>m(M),(G,K)=>{I(K(G,{get data(){return d()},get form(){return t.form},get params(){return t.page.params}}),f=>r()[1]=f,()=>{var f;return(f=r())==null?void 0:f[1]})}),u(T,x)};k(nt,T=>{t.constructors[2]?T(ut):T(ct,!1)})}u(l,W)},$$slots:{default:!0}}),l=>r()[0]=l,()=>{var l;return(l=r())==null?void 0:l[0]})}),u(n,O)},st=n=>{const P=A(()=>t.constructors[0]);var O=h(),y=E(O);b(y,()=>m(P),(R,D)=>{I(D(R,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),l=>r()[0]=l,()=>{var l;return(l=r())==null?void 0:l[0]})}),u(n,O)};k(U,n=>{t.constructors[1]?n(_t):n(st,!1)})}var it=Lt(U,2);{var mt=n=>{var P=Gt(),O=Tt(P);{var y=R=>{var D=St();yt(()=>jt(D,m(N))),u(R,D)};k(O,R=>{m(g)&&R(y)})}Vt(P),u(n,P)};k(it,n=>{m(o)&&n(mt)})}u(a,Q),Dt()}const ar=Mt(Yt),or=[()=>e(()=>import("../nodes/0.BZ00WDYH.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>e(()=>import("../nodes/1.RzSJ3yyr.js"),__vite__mapDeps([25,1,2,3,4,8,9,10,11,12,13,26]),import.meta.url),()=>e(()=>import("../nodes/2.Bn3R2oDm.js"),__vite__mapDeps([27,1,2,4,5,6]),import.meta.url),()=>e(()=>import("../nodes/3.Bzo2yVIO.js"),__vite__mapDeps([28,1,10,2,3,4,7,6,17,14,13,16,5,8,20,9,11,12,23,29,19,30,31]),import.meta.url),()=>e(()=>import("../nodes/4.BgQaXZ27.js"),__vite__mapDeps([32,1,10,2,3,4,7,6,17,14,13,16,18,8,9,33,34,5,35,36,19,20,37,38,39]),import.meta.url),()=>e(()=>import("../nodes/5.BuJrHvxH.js"),__vite__mapDeps([40,1,10,2,3,4,7,6,17,14,13,16,8,22,33,34,5,35,38,36,18,19,9,20,37,41,42,43]),import.meta.url),()=>e(()=>import("../nodes/6.CkBBC94k.js"),__vite__mapDeps([44,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/7.D2YBvNFM.js"),__vite__mapDeps([45,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/8.D8qQWo_z.js"),__vite__mapDeps([46,1,10,2,3,4,7,6,17,14,13,16,8,34,5,35,38,29,19,9,30,47,48,49,22,50,51,52,53,54,55]),import.meta.url),()=>e(()=>import("../nodes/9.BLDLX5hV.js"),__vite__mapDeps([56,1,10,2,3,4,17,14,13,16,8,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/10.D-rsiquF.js"),__vite__mapDeps([57,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/11.l7-bgtFD.js"),__vite__mapDeps([58,1,10,2,3,4,7,6,17,14,13,16,8,12,34,5,35,38,29,19,9,30,49,22,50,53,54,59,20,60,51,52,61,62,47,48,63,64,65]),import.meta.url),()=>e(()=>import("../nodes/12.Dkq0H7B5.js"),__vite__mapDeps([66,1,10,2,3,4,7,6,17,14,13,16,8,9,11,12,34,5,35,38,29,19,30,53,54,47,48,59,20,60,67]),import.meta.url),()=>e(()=>import("../nodes/13.DtK_4oRz.js"),__vite__mapDeps([68,1,10,2,3,4,7,6,17,14,13,16,8,9,34,5,35,38,29,19,30,69,70,49,22,50,20,71,72]),import.meta.url),()=>e(()=>import("../nodes/14.BKo7-AMx.js"),__vite__mapDeps([73,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,29,19,9,30,53,54,49,50,74,75,76]),import.meta.url),()=>e(()=>import("../nodes/15.CQAj_6lq.js"),__vite__mapDeps([77,1,10,2,3,4,7,6,17,14,13,16,78,34,5,8,35,38,29,19,9,30,53,54,59,20,60,79]),import.meta.url),()=>e(()=>import("../nodes/16.XVIG-Ffr.js"),__vite__mapDeps([80,1,2,12,10,13]),import.meta.url),()=>e(()=>import("../nodes/17.g6raZLCM.js"),__vite__mapDeps([81,1,10,2,3,4,7,6,17,14,13,16,8,20,23,34,5,35,38,51,19,9,52,82]),import.meta.url),()=>e(()=>import("../nodes/18.IQz6a3T6.js"),__vite__mapDeps([83,1,2,3,4,7,6,17,10,14,13,16,8,9,12,34,5,35,38,29,19,30,49,22,50,23,84]),import.meta.url),()=>e(()=>import("../nodes/19.CAAZ8i8h.js"),__vite__mapDeps([85,86,2,6,1,10,3,4,7,17,14,13,16,8,22,9,23,34,5,35,29,19,30,38,87]),import.meta.url),()=>e(()=>import("../nodes/20.BPcX3KPj.js"),__vite__mapDeps([88,1,21,2,4,7,6,8,3,9,10,13,16,14,51,5,19,52,38,89]),import.meta.url),()=>e(()=>import("../nodes/21.DoPabrY_.js"),__vite__mapDeps([90,91,86,2,6,1,3,4,7,17,10,14,13,16,8,22,9,12,11,61,5,20,19,62,29,30,23,78,92,53,54,49,50,74,75,93,94,69,70,59,60,38,95]),import.meta.url),()=>e(()=>import("../nodes/22.Br5AG_5Z.js"),__vite__mapDeps([96,1,10,2,3,4,7,6,17,14,13,16,8,9,12,11,23,92,19,29,5,30,53,54,61,20,62,49,22,50,74,75,93,97]),import.meta.url),()=>e(()=>import("../nodes/23.KjbrdXoE.js"),__vite__mapDeps([98,1,10,2,3,4,7,6,8,34,5,35,38,14,13,99]),import.meta.url),()=>e(()=>import("../nodes/24.C3n2-hgw.js"),__vite__mapDeps([100,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,29,19,9,30,51,52,101]),import.meta.url),()=>e(()=>import("../nodes/25.SFDSBzHd.js"),__vite__mapDeps([102,1,2,3,4,7,6,8,9,10,12,13,11,14,15,29,5,19,30,49,22,50,103]),import.meta.url),()=>e(()=>import("../nodes/26.D95vui6E.js"),__vite__mapDeps([104,1,10,2,3,4,7,6,17,14,13,16,8,78,94,34,5,35,38,29,19,9,30,49,22,50,47,48,51,52,63,64,105]),import.meta.url),()=>e(()=>import("../nodes/27.FgLgdjwB.js"),__vite__mapDeps([106,1,10,2,3,4,7,6,17,14,13,16,8,34,5,35,38,107,54]),import.meta.url),()=>e(()=>import("../nodes/28.B9sYYm1F.js"),__vite__mapDeps([108,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,69,19,9,70,49,50,29,30,53,54,51,52,109]),import.meta.url),()=>e(()=>import("../nodes/29.DyqZ_wbN.js"),__vite__mapDeps([110,1,10,2,3,4,7,6,17,14,13,16,8,78,34,5,35,38,53,19,9,54,29,30,61,20,62,49,22,50,59,60,63,64,111]),import.meta.url),()=>e(()=>import("../nodes/30.c1CiNwiS.js"),__vite__mapDeps([112,1,10,2,3,4,7,6,17,14,13,16,8,9,34,5,35,38,51,19,52,29,30,49,22,50,61,20,62,113]),import.meta.url),()=>e(()=>import("../nodes/31.CXty66Vh.js"),__vite__mapDeps([114,1,10,2,3,4,7,6,17,14,13,16,8,9,11,12,78,34,5,35,38,29,19,30,51,52,59,20,60,61,62,49,22,50,47,48,115]),import.meta.url)],_r=[],sr={"/":[4],"/analytics":[5],"/analytics/auth":[6],"/analytics/database":[7],"/analytics/events":[8],"/analytics/functions":[9],"/analytics/storage":[10],"/auth":[11],"/auth/email-templates":[13],"/auth/settings":[14],"/auth/[userId]":[12],"/backup":[15],"/database":[16,[2]],"/database/erd":[17,[2]],"/database/new":[18,[2]],"/database/sql":[19,[2]],"/database/tables":[20,[2,3]],"/database/tables/new":[22,[2,3]],"/database/tables/[table]":[21,[2,3]],"/docs":[23],"/functions":[24],"/login":[25],"/logs":[26],"/monitoring":[27],"/push":[28],"/settings":[29],"/storage":[30],"/storage/[bucket]":[31]},at={handleError:({error:a})=>{console.error(a)},reroute:()=>{},transport:{}},Zt=Object.fromEntries(Object.entries(at.transport).map(([a,t])=>[a,t.decode])),ir=Object.fromEntries(Object.entries(at.transport).map(([a,t])=>[a,t.encode])),mr=!1,nr=(a,t)=>Zt[a](t);export{nr as decode,Zt as decoders,sr as dictionary,ir as encoders,mr as hash,at as hooks,er as matchers,or as nodes,ar as root,_r as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DlsaydXO.js","../chunks/CWj6FrbW.js","../chunks/BdTBlfLy.js","../chunks/DtZk82gG.js","../chunks/DEELgv7K.js","../chunks/XmteHKH_.js","../chunks/Bb0e0sAP.js","../chunks/Y22E1hJM.js","../chunks/CoI6jjbg.js","../chunks/Cp8V0Xy2.js","../chunks/Bn2NtlTj.js","../chunks/kiJ6KthZ.js","../chunks/qiZXAKh-.js","../chunks/5PDcRlfX.js","../chunks/BaCHY17I.js","../chunks/CPdXvRUb.js","../chunks/BKXmgPq4.js","../chunks/g3ZZdY-r.js","../chunks/DHWOQ9Ui.js","../chunks/F9_4wRrd.js","../chunks/CGgVJi7f.js","../chunks/C8s55wKu.js","../chunks/CYatlt7w.js","../chunks/DzXaj-Ja.js","../assets/0.Bm6cF078.css","../nodes/1.D2NWN5eG.js","../assets/1.BfW3pUNa.css","../nodes/2.Bn3R2oDm.js","../nodes/3.CKoj2vNz.js","../chunks/C72lTcG0.js","../assets/Button.DpzMRTjK.css","../assets/3.BtHYobTg.css","../nodes/4.B_-z9AzT.js","../chunks/R6arueIl.js","../chunks/B8s_s9QY.js","../assets/PageShell.CmU-Xh-b.css","../chunks/C85dMlzL.js","../assets/TimeChart.BTCDAvmT.css","../chunks/Q2nPFxS6.js","../assets/4.CyawCCux.css","../nodes/5.yiZ72j4k.js","../chunks/BWyDPAjM.js","../assets/TopList.ClFzmPlA.css","../assets/5.C0YO2HTk.css","../nodes/6.BqykybBG.js","../nodes/7.BDAHlhsF.js","../nodes/8.D8Xvy0lH.js","../chunks/CTngeX8H.js","../assets/Select.BW4Keufm.css","../chunks/_teD5ji5.js","../assets/Input.BDUSenmU.css","../chunks/m9eWh0Cd.js","../assets/EmptyState.CwKsu57Y.css","../chunks/B0HRJ657.js","../assets/Badge.EMYLHBxE.css","../assets/8.Br5jd6kD.css","../nodes/9.Dddmd7_F.js","../nodes/10.EMDaN3nw.js","../nodes/11.BasqQ_o9.js","../chunks/DILS_-VJ.js","../assets/ConfirmDialog.DAnaWRRk.css","../chunks/Dt4vL4Df.js","../assets/Modal.Dm5B0Xie.css","../chunks/BEYYl662.js","../assets/Skeleton.KWUulTKJ.css","../assets/11.CVmQOewb.css","../nodes/12.DO31Ljs7.js","../assets/12.B1EhbRZT.css","../nodes/13.DhyAy-GZ.js","../chunks/B8DT4fss.js","../assets/Tabs.CniGYb67.css","../chunks/gtu8uwJD.js","../assets/13.BvwYeuwE.css","../nodes/14.CLecGWc4.js","../chunks/Z41NK6i6.js","../assets/Toggle.Cy_K12OM.css","../assets/14.CdVfcO0R.css","../nodes/15.B9kp3W4e.js","../chunks/wJsUhbfZ.js","../assets/15.2yeZ66b-.css","../nodes/16.Pu_8T3RI.js","../nodes/17.DX4z43t6.js","../assets/17.BVg0JEVu.css","../nodes/18.BKsSaxrr.js","../assets/18.Rwnl3x_i.css","../nodes/19.DXNF1htN.js","../chunks/B2bEC_Hm.js","../assets/19.4Si2ZFC_.css","../nodes/20.VRVb0wee.js","../assets/20.DsPWA9AV.css","../nodes/21.Ck3_0D2f.js","../chunks/C-DsDCNG.js","../chunks/c5iKSdWY.js","../assets/SchemaFieldEditor.g4NsCdno.css","../chunks/Ce-ngf4p.js","../assets/21.x9OgMBdi.css","../nodes/22.DqZf4CtH.js","../assets/22.DwNLk5Ai.css","../nodes/23.DtyxMiQG.js","../assets/23.CFpu0gOO.css","../nodes/24.CloWNmTd.js","../assets/24.Cy5LBeoJ.css","../nodes/25.CnZWMq7_.js","../assets/25.pUyLVf-h.css","../nodes/26.DrV7XOmf.js","../assets/26.DBcGrlXa.css","../nodes/27.DV8L32OF.js","../assets/27.BswYyAJD.css","../nodes/28.Stil2D4u.js","../assets/28.B4ueB1Kf.css","../nodes/29.Zsm1e5Dc.js","../assets/29.B-qU6PdF.css","../nodes/30.Ni0k5bER.js","../assets/30.CsdWum94.css","../nodes/31.mnqj9EbV.js","../assets/31.U6OwIp50.css"])))=>i.map(i=>d[i]);
2
+ var tt=a=>{throw TypeError(a)};var rt=(a,t,r)=>t.has(a)||tt("Cannot "+r);var s=(a,t,r)=>(rt(a,t,"read from private field"),r?r.call(a):t.get(a)),F=(a,t,r)=>t.has(a)?tt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(a):t.set(a,r),H=(a,t,r,i)=>(rt(a,t,"write to private field"),i?i.call(a,r):t.set(a,r),r);import{c as b,_ as e}from"../chunks/B2bEC_Hm.js";import{b as S,Z as ht,g as m,aK as pt,a9 as Pt,a7 as Ot,p as Rt,ai as bt,w as At,ab as It,f as E,s as Lt,a as Dt,d as J,c as Tt,r as Vt,u as A,t as yt}from"../chunks/BdTBlfLy.js";import{h as xt,m as wt,u as kt,s as jt}from"../chunks/DtZk82gG.js";import"../chunks/CWj6FrbW.js";import{o as Ct}from"../chunks/Bn2NtlTj.js";import{i as k}from"../chunks/Y22E1hJM.js";import{a as u,c as h,f as et,t as St}from"../chunks/DEELgv7K.js";import{b as I}from"../chunks/CGgVJi7f.js";import{p as j}from"../chunks/F9_4wRrd.js";function Mt(a){return class extends qt{constructor(t){super({component:a,...t})}}}var p,c;class qt{constructor(t){F(this,p);F(this,c);var L;var r=new Map,i=(_,o)=>{var g=Ot(o,!1,!1);return r.set(_,g),g};const d=new Proxy({...t.props||{},$$events:{}},{get(_,o){return m(r.get(o)??i(o,Reflect.get(_,o)))},has(_,o){return o===ht?!0:(m(r.get(o)??i(o,Reflect.get(_,o))),Reflect.has(_,o))},set(_,o,g){return S(r.get(o)??i(o,g),g),Reflect.set(_,o,g)}});H(this,c,(t.hydrate?xt:wt)(t.component,{target:t.target,anchor:t.anchor,props:d,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((L=t==null?void 0:t.props)!=null&&L.$$host)||t.sync===!1)&&pt(),H(this,p,d.$$events);for(const _ of Object.keys(s(this,c)))_==="$set"||_==="$destroy"||_==="$on"||Pt(this,_,{get(){return s(this,c)[_]},set(o){s(this,c)[_]=o},enumerable:!0});s(this,c).$set=_=>{Object.assign(d,_)},s(this,c).$destroy=()=>{kt(s(this,c))}}$set(t){s(this,c).$set(t)}$on(t,r){s(this,p)[t]=s(this,p)[t]||[];const i=(...d)=>r.call(this,...d);return s(this,p)[t].push(i),()=>{s(this,p)[t]=s(this,p)[t].filter(d=>d!==i)}}$destroy(){s(this,c).$destroy()}}p=new WeakMap,c=new WeakMap;const er={};var Gt=et('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Kt=et("<!> <!>",1);function Yt(a,t){Rt(t,!0);let r=j(t,"components",23,()=>[]),i=j(t,"data_0",3,null),d=j(t,"data_1",3,null),L=j(t,"data_2",3,null),_=j(t,"data_3",3,null);bt(()=>t.stores.page.set(t.page)),At(()=>{t.stores,t.page,t.constructors,r(),t.form,i(),d(),L(),_(),t.stores.page.notify()});let o=J(!1),g=J(!1),N=J(null);Ct(()=>{const n=t.stores.page.subscribe(()=>{m(o)&&(S(g,!0),It().then(()=>{S(N,document.title||"untitled page",!0)}))});return S(o,!0),n});const ot=A(()=>t.constructors[3]);var Q=Kt(),U=E(Q);{var _t=n=>{const P=A(()=>t.constructors[0]);var O=h(),y=E(O);b(y,()=>m(P),(R,D)=>{I(D(R,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(l,zt)=>{var W=h(),nt=E(W);{var ut=T=>{const M=A(()=>t.constructors[1]);var x=h(),q=E(x);b(q,()=>m(M),(G,K)=>{I(K(G,{get data(){return d()},get form(){return t.form},get params(){return t.page.params},children:(f,Bt)=>{var X=h(),dt=E(X);{var lt=V=>{const Y=A(()=>t.constructors[2]);var w=h(),Z=E(w);b(Z,()=>m(Y),(z,B)=>{I(B(z,{get data(){return L()},get form(){return t.form},get params(){return t.page.params},children:(v,Ft)=>{var $=h(),vt=E($);b(vt,()=>m(ot),(Et,gt)=>{I(gt(Et,{get data(){return _()},get form(){return t.form},get params(){return t.page.params}}),C=>r()[3]=C,()=>{var C;return(C=r())==null?void 0:C[3]})}),u(v,$)},$$slots:{default:!0}}),v=>r()[2]=v,()=>{var v;return(v=r())==null?void 0:v[2]})}),u(V,w)},ft=V=>{const Y=A(()=>t.constructors[2]);var w=h(),Z=E(w);b(Z,()=>m(Y),(z,B)=>{I(B(z,{get data(){return L()},get form(){return t.form},get params(){return t.page.params}}),v=>r()[2]=v,()=>{var v;return(v=r())==null?void 0:v[2]})}),u(V,w)};k(dt,V=>{t.constructors[3]?V(lt):V(ft,!1)})}u(f,X)},$$slots:{default:!0}}),f=>r()[1]=f,()=>{var f;return(f=r())==null?void 0:f[1]})}),u(T,x)},ct=T=>{const M=A(()=>t.constructors[1]);var x=h(),q=E(x);b(q,()=>m(M),(G,K)=>{I(K(G,{get data(){return d()},get form(){return t.form},get params(){return t.page.params}}),f=>r()[1]=f,()=>{var f;return(f=r())==null?void 0:f[1]})}),u(T,x)};k(nt,T=>{t.constructors[2]?T(ut):T(ct,!1)})}u(l,W)},$$slots:{default:!0}}),l=>r()[0]=l,()=>{var l;return(l=r())==null?void 0:l[0]})}),u(n,O)},st=n=>{const P=A(()=>t.constructors[0]);var O=h(),y=E(O);b(y,()=>m(P),(R,D)=>{I(D(R,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),l=>r()[0]=l,()=>{var l;return(l=r())==null?void 0:l[0]})}),u(n,O)};k(U,n=>{t.constructors[1]?n(_t):n(st,!1)})}var it=Lt(U,2);{var mt=n=>{var P=Gt(),O=Tt(P);{var y=R=>{var D=St();yt(()=>jt(D,m(N))),u(R,D)};k(O,R=>{m(g)&&R(y)})}Vt(P),u(n,P)};k(it,n=>{m(o)&&n(mt)})}u(a,Q),Dt()}const ar=Mt(Yt),or=[()=>e(()=>import("../nodes/0.DlsaydXO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24]),import.meta.url),()=>e(()=>import("../nodes/1.D2NWN5eG.js"),__vite__mapDeps([25,1,2,3,4,8,9,10,11,12,13,26]),import.meta.url),()=>e(()=>import("../nodes/2.Bn3R2oDm.js"),__vite__mapDeps([27,1,2,4,5,6]),import.meta.url),()=>e(()=>import("../nodes/3.CKoj2vNz.js"),__vite__mapDeps([28,1,10,2,3,4,7,6,17,14,13,16,5,8,20,9,11,12,23,29,19,30,31]),import.meta.url),()=>e(()=>import("../nodes/4.B_-z9AzT.js"),__vite__mapDeps([32,1,10,2,3,4,7,6,17,14,13,16,18,8,9,33,34,5,35,36,19,20,37,38,39]),import.meta.url),()=>e(()=>import("../nodes/5.yiZ72j4k.js"),__vite__mapDeps([40,1,10,2,3,4,7,6,17,14,13,16,8,22,33,34,5,35,38,36,18,19,9,20,37,41,42,43]),import.meta.url),()=>e(()=>import("../nodes/6.BqykybBG.js"),__vite__mapDeps([44,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/7.BDAHlhsF.js"),__vite__mapDeps([45,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/8.D8Xvy0lH.js"),__vite__mapDeps([46,1,10,2,3,4,7,6,17,14,13,16,8,34,5,35,38,29,19,9,30,47,48,49,22,50,51,52,53,54,55]),import.meta.url),()=>e(()=>import("../nodes/9.Dddmd7_F.js"),__vite__mapDeps([56,1,10,2,3,4,17,14,13,16,8,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/10.EMDaN3nw.js"),__vite__mapDeps([57,1,10,2,3,4,17,14,13,16,8,33,34,5,6,7,35,38,36,18,19,9,20,37,41,42]),import.meta.url),()=>e(()=>import("../nodes/11.BasqQ_o9.js"),__vite__mapDeps([58,1,10,2,3,4,7,6,17,14,13,16,8,12,34,5,35,38,29,19,9,30,49,22,50,53,54,59,20,60,51,52,61,62,47,48,63,64,65]),import.meta.url),()=>e(()=>import("../nodes/12.DO31Ljs7.js"),__vite__mapDeps([66,1,10,2,3,4,7,6,17,14,13,16,8,9,11,12,34,5,35,38,29,19,30,53,54,47,48,59,20,60,67]),import.meta.url),()=>e(()=>import("../nodes/13.DhyAy-GZ.js"),__vite__mapDeps([68,1,10,2,3,4,7,6,17,14,13,16,8,9,34,5,35,38,29,19,30,69,70,49,22,50,20,71,72]),import.meta.url),()=>e(()=>import("../nodes/14.CLecGWc4.js"),__vite__mapDeps([73,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,29,19,9,30,53,54,49,50,74,75,76]),import.meta.url),()=>e(()=>import("../nodes/15.B9kp3W4e.js"),__vite__mapDeps([77,1,10,2,3,4,7,6,17,14,13,16,78,34,5,8,35,38,29,19,9,30,53,54,59,20,60,79]),import.meta.url),()=>e(()=>import("../nodes/16.Pu_8T3RI.js"),__vite__mapDeps([80,1,2,12,10,13]),import.meta.url),()=>e(()=>import("../nodes/17.DX4z43t6.js"),__vite__mapDeps([81,1,10,2,3,4,7,6,17,14,13,16,8,20,23,34,5,35,38,51,19,9,52,82]),import.meta.url),()=>e(()=>import("../nodes/18.BKsSaxrr.js"),__vite__mapDeps([83,1,2,3,4,7,6,17,10,14,13,16,8,9,12,34,5,35,38,29,19,30,49,22,50,23,84]),import.meta.url),()=>e(()=>import("../nodes/19.DXNF1htN.js"),__vite__mapDeps([85,86,2,6,1,10,3,4,7,17,14,13,16,8,22,9,23,34,5,35,29,19,30,38,87]),import.meta.url),()=>e(()=>import("../nodes/20.VRVb0wee.js"),__vite__mapDeps([88,1,21,2,4,7,6,8,3,9,10,13,16,14,51,5,19,52,38,89]),import.meta.url),()=>e(()=>import("../nodes/21.Ck3_0D2f.js"),__vite__mapDeps([90,91,86,2,6,1,3,4,7,17,10,14,13,16,8,22,9,12,11,61,5,20,19,62,29,30,23,78,92,53,54,49,50,74,75,93,94,69,70,59,60,38,95]),import.meta.url),()=>e(()=>import("../nodes/22.DqZf4CtH.js"),__vite__mapDeps([96,1,10,2,3,4,7,6,17,14,13,16,8,9,12,11,23,92,19,29,5,30,53,54,61,20,62,49,22,50,74,75,93,97]),import.meta.url),()=>e(()=>import("../nodes/23.DtyxMiQG.js"),__vite__mapDeps([98,1,10,2,3,4,7,6,8,34,5,35,38,14,13,99]),import.meta.url),()=>e(()=>import("../nodes/24.CloWNmTd.js"),__vite__mapDeps([100,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,29,19,9,30,51,52,101]),import.meta.url),()=>e(()=>import("../nodes/25.CnZWMq7_.js"),__vite__mapDeps([102,1,2,3,4,7,6,8,9,10,12,13,11,14,15,29,5,19,30,49,22,50,103]),import.meta.url),()=>e(()=>import("../nodes/26.DrV7XOmf.js"),__vite__mapDeps([104,1,10,2,3,4,7,6,17,14,13,16,8,78,94,34,5,35,38,29,19,9,30,49,22,50,47,48,51,52,63,64,105]),import.meta.url),()=>e(()=>import("../nodes/27.DV8L32OF.js"),__vite__mapDeps([106,1,10,2,3,4,7,6,17,14,13,16,8,34,5,35,38,107,54]),import.meta.url),()=>e(()=>import("../nodes/28.Stil2D4u.js"),__vite__mapDeps([108,1,10,2,3,4,7,6,17,14,13,16,8,22,34,5,35,38,69,19,9,70,49,50,29,30,53,54,51,52,109]),import.meta.url),()=>e(()=>import("../nodes/29.Zsm1e5Dc.js"),__vite__mapDeps([110,1,10,2,3,4,7,6,17,14,13,16,8,78,34,5,35,38,53,19,9,54,29,30,61,20,62,49,22,50,59,60,63,64,111]),import.meta.url),()=>e(()=>import("../nodes/30.Ni0k5bER.js"),__vite__mapDeps([112,1,10,2,3,4,7,6,17,14,13,16,8,9,34,5,35,38,51,19,52,29,30,49,22,50,61,20,62,113]),import.meta.url),()=>e(()=>import("../nodes/31.mnqj9EbV.js"),__vite__mapDeps([114,1,10,2,3,4,7,6,17,14,13,16,8,9,11,12,78,34,5,35,38,29,19,30,51,52,59,20,60,61,62,49,22,50,47,48,115]),import.meta.url)],_r=[],sr={"/":[4],"/analytics":[5],"/analytics/auth":[6],"/analytics/database":[7],"/analytics/events":[8],"/analytics/functions":[9],"/analytics/storage":[10],"/auth":[11],"/auth/email-templates":[13],"/auth/settings":[14],"/auth/[userId]":[12],"/backup":[15],"/database":[16,[2]],"/database/erd":[17,[2]],"/database/new":[18,[2]],"/database/sql":[19,[2]],"/database/tables":[20,[2,3]],"/database/tables/new":[22,[2,3]],"/database/tables/[table]":[21,[2,3]],"/docs":[23],"/functions":[24],"/login":[25],"/logs":[26],"/monitoring":[27],"/push":[28],"/settings":[29],"/storage":[30],"/storage/[bucket]":[31]},at={handleError:({error:a})=>{console.error(a)},reroute:()=>{},transport:{}},Zt=Object.fromEntries(Object.entries(at.transport).map(([a,t])=>[a,t.decode])),ir=Object.fromEntries(Object.entries(at.transport).map(([a,t])=>[a,t.encode])),mr=!1,nr=(a,t)=>Zt[a](t);export{nr as decode,Zt as decoders,sr as dictionary,ir as encoders,mr as hash,at as hooks,er as matchers,or as nodes,ar as root,_r as server_loads};
@@ -0,0 +1 @@
1
+ import{a as r}from"../chunks/qiZXAKh-.js";import{w as t}from"../chunks/5PDcRlfX.js";export{t as load_css,r as start};
@@ -1 +1 @@
1
- import"../chunks/CWj6FrbW.js";import{p as ne,c as s,r as a,s as v,g as e,t as q,a as le,ae as Be,u as ae,w as oe,at as He,d as te,b as j,f as re}from"../chunks/BdTBlfLy.js";import{d as ce,s as Z,a as K,e as Me}from"../chunks/DtZk82gG.js";import{a as n,f as h,d as de,t as Fe,c as he}from"../chunks/DEELgv7K.js";import{s as xe}from"../chunks/XmteHKH_.js";import{i as $}from"../chunks/Y22E1hJM.js";import{a as Q,s as se,r as Ne}from"../chunks/CoI6jjbg.js";import{a as ie,s as ge}from"../chunks/Cp8V0Xy2.js";import{p as $e}from"../chunks/CSGrwS7E.js";import{g as Ve}from"../chunks/m9QZTyVV.js";import{b as o}from"../chunks/D755Tqat.js";import{a as _e}from"../chunks/BcIUK2sk.js";import{m as Pe,f as Oe,c as Ze,b as Re}from"../chunks/BsFiK_FJ.js";import{d as Ue,l as Ke}from"../chunks/Dqk2TGNU.js";import{w as We}from"../chunks/Bn2NtlTj.js";import{e as ue,i as Ce,m as Ge,g as we,f as ye,h as Qe,j as Le,r as Ye}from"../chunks/CqUxCvs_.js";import{h as Se}from"../chunks/DHWOQ9Ui.js";import{p as je}from"../chunks/F9_4wRrd.js";import{b as Te}from"../chunks/CGgVJi7f.js";import{i as Je}from"../chunks/C8s55wKu.js";import{b as Xe}from"../chunks/CYatlt7w.js";import{s as et}from"../chunks/D-x55wdW.js";const tt=!1,rt=!1,br=Object.freeze(Object.defineProperty({__proto__:null,prerender:tt,ssr:rt},Symbol.toStringTag,{value:"Module"})),De="edgebase_theme";let ee="light";const Ae=We(ee);function ot(){if(typeof window>"u")return;const k=localStorage.getItem(De);k==="light"||k==="dark"?ee=k:window.matchMedia("(prefers-color-scheme: dark)").matches&&(ee="dark"),Ee(ee)}function at(){return ee=ee==="light"?"dark":"light",localStorage.setItem(De,ee),Ee(ee),ee}function st(k){document.documentElement.setAttribute("data-theme",k)}function Ee(k){ee=k,Ae.set(k),st(k)}function ze(k){return{overview:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="2" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/></svg>',tables:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="12" height="12" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 6H14M2 10H14M6 6V14" stroke="currentColor" stroke-width="1.5"/></svg>',schema:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><path d="M7 4.5H9.5V9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',records:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4H14M2 8H14M2 12H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',sql:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 3H13M3 6H10M3 9H13M3 12H8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12 10L14 12L12 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',erd:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="2" width="5" height="4" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="10" y="10" width="5" height="4" rx="1" stroke="currentColor" stroke-width="1.5"/><path d="M6 4H8.5V12H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',rulesTest:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L12 4V7.5C12 10.5 10.2 12.8 8 14C5.8 12.8 4 10.5 4 7.5V4L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 8L7.5 9.5L10 6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',users:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="5" r="2.5" stroke="currentColor" stroke-width="1.5"/><path d="M3 14C3 11.2386 5.23858 9 8 9C10.7614 9 13 11.2386 13 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',settings:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 1V3M8 13V15M1 8H3M13 8H15M2.93 2.93L4.34 4.34M11.66 11.66L13.07 13.07M13.07 2.93L11.66 4.34M4.34 11.66L2.93 13.07" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',storage:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4L8 2L14 4V12L8 14L2 12V4Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M2 4L8 6L14 4" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8 6V14" stroke="currentColor" stroke-width="1.5"/></svg>',functions:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6 2C4.89543 2 4 2.89543 4 4V6L3 8L4 10V12C4 13.1046 4.89543 14 6 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M10 2C11.1046 2 12 2.89543 12 4V6L13 8L12 10V12C12 13.1046 11.1046 14 10 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="6.5" cy="8" r="0.75" fill="currentColor"/><circle cx="9.5" cy="8" r="0.75" fill="currentColor"/></svg>',ai:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="3" y="3" width="10" height="10" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 1V3M8 13V15M1 8H3M13 8H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="6" cy="6.5" r="0.75" fill="currentColor"/><circle cx="10" cy="6.5" r="0.75" fill="currentColor"/><path d="M5.5 9.5C6.1 10.3 6.95 10.75 8 10.75C9.05 10.75 9.9 10.3 10.5 9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',logs:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 4H12M4 7H10M4 10H12M4 13H8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',live:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1 8H3L5 3L8 13L11 6L13 8H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',analytics:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="9" width="3" height="5" rx="0.5" stroke="currentColor" stroke-width="1.5"/><rect x="6.5" y="5" width="3" height="9" rx="0.5" stroke="currentColor" stroke-width="1.5"/><rect x="11" y="2" width="3" height="12" rx="0.5" stroke="currentColor" stroke-width="1.5"/></svg>',events:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="4" cy="4" r="1.5" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="8" r="1.5" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="12" r="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M7 4H14M7 8H12M7 12H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',analyticsAuth:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L12 4V7.5C12 10.5 10.2 12.8 8 14C5.8 12.8 4 10.5 4 7.5V4L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',analyticsDb:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><ellipse cx="8" cy="4" rx="5" ry="2" stroke="currentColor" stroke-width="1.5"/><path d="M3 4V12C3 13.1 5.24 14 8 14C10.76 14 13 13.1 13 12V4" stroke="currentColor" stroke-width="1.5"/><path d="M3 8C3 9.1 5.24 10 8 10C10.76 10 13 9.1 13 8" stroke="currentColor" stroke-width="1.5"/></svg>',analyticsStorage:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L14 5V11L8 14L2 11V5L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8 8V14M2 5L8 8L14 5" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',analyticsFn:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M5.5 2H10C11.1 2 12 2.9 12 4V5.5M4 10.5V12C4 13.1 4.9 14 6 14H10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M3 7L6.5 7L8 5L10 9L11.5 7L13 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',push:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 3C4 2.44772 4.44772 2 5 2H11C11.5523 2 12 2.44772 12 3V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V3Z" stroke="currentColor" stroke-width="1.5"/><circle cx="8" cy="11" r="0.75" fill="currentColor"/><path d="M6.5 5H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',backup:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8V12C3 13.1046 3.89543 14 5 14H11C12.1046 14 13 13.1046 13 12V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8 2V10M8 10L5 7M8 10L11 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',apiDocs:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 2H10L13 5V14H3V2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M10 2V5H13" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 8H10M6 10.5H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',configView:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="3" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 6H14" stroke="currentColor" stroke-width="1.5"/><path d="M5 6V13" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="4.5" r="0.5" fill="currentColor"/><circle cx="6" cy="4.5" r="0.5" fill="currentColor"/><circle cx="8" cy="4.5" r="0.5" fill="currentColor"/></svg>',email:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="3" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 3L8 9L14 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'}[k]??""}var it=h('<a class="sidebar__brand svelte-6dohdz" aria-label="EdgeBase home"><img class="sidebar__brand-icon svelte-6dohdz" alt=""/> <span class="sidebar__brand-text svelte-6dohdz">EdgeBase</span></a>'),nt=h('<a class="sidebar__brand svelte-6dohdz" aria-label="EdgeBase home"><img class="sidebar__brand-icon svelte-6dohdz" alt=""/></a>'),lt=h('<div class="sidebar__dev-badge svelte-6dohdz"><!></div>'),ct=h('<span class="sidebar__label svelte-6dohdz"> </span>'),dt=h('<div class="sidebar__section-title svelte-6dohdz"> </div>'),vt=h('<span class="sidebar__label svelte-6dohdz"> </span>'),ht=h('<a><span class="sidebar__icon svelte-6dohdz"><!></span> <!></a>'),ut=h('<div class="sidebar__section svelte-6dohdz"><!> <!></div>'),pt=de('<path d="M6 3L11 8L6 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>'),ft=de('<path d="M10 3L5 8L10 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>'),gt=h('<aside><div class="sidebar__logo svelte-6dohdz"><!></div> <!> <nav class="sidebar__nav svelte-6dohdz"><div class="sidebar__section sidebar__section--overview svelte-6dohdz"><a><span class="sidebar__icon svelte-6dohdz"><!></span> <!></a></div> <!></nav> <button class="sidebar__toggle svelte-6dohdz" aria-label="Toggle sidebar"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><!></svg></button></aside>');function kt(k,L){ne(L,!0);const z=()=>ie(Ue,"$devInfoStore",F),H=()=>ie($e,"$page",F),[F,S]=ge();let d=je(L,"collapsed",15,!1);const c={label:"Overview",href:`${o}/`,icon:"overview"},x=[{title:"Auth",items:[{label:"Users",href:`${o}/auth`,icon:"users"},{label:"Auth Settings",href:`${o}/auth/settings`,icon:"settings"},{label:"Email Templates",href:`${o}/auth/email-templates`,icon:"email"}]},{title:"Database",items:[{label:"Tables",href:`${o}/database/tables`,icon:"tables"},{label:"ERD",href:`${o}/database/erd`,icon:"erd"},{label:"SQL",href:`${o}/database/sql`,icon:"sql"}]},{title:"Storage",items:[{label:"Files",href:`${o}/storage`,icon:"storage"}]},{title:"Functions",items:[{label:"Functions",href:`${o}/functions`,icon:"functions"}]},{title:"Push",items:[{label:"Notifications",href:`${o}/push`,icon:"push"}]},{title:"Analytics",items:[{label:"Overview",href:`${o}/analytics`,icon:"analytics"},{label:"Events",href:`${o}/analytics/events`,icon:"events"},{label:"Auth",href:`${o}/analytics/auth`,icon:"analyticsAuth"},{label:"Database",href:`${o}/analytics/database`,icon:"analyticsDb"},{label:"Storage",href:`${o}/analytics/storage`,icon:"analyticsStorage"},{label:"Functions",href:`${o}/analytics/functions`,icon:"analyticsFn"}]},{title:"Monitoring",items:[{label:"Logs",href:`${o}/logs`,icon:"logs"},{label:"Live",href:`${o}/monitoring`,icon:"live"}]},{title:"System",items:[{label:"API Docs",href:`${o}/docs`,icon:"apiDocs"},{label:"Backup",href:`${o}/backup`,icon:"backup"},{label:"Project Info",href:`${o}/settings`,icon:"configView"}]}];function m(t,r){return t===`${o}/`?r===`${o}/`||r===o:t===`${o}/auth`&&r===`${o}/auth`||t===`${o}/auth`&&r.startsWith(`${o}/auth/`)&&!r.startsWith(`${o}/auth/settings`)&&!r.startsWith(`${o}/auth/email-templates`)?!0:t===`${o}/analytics`&&r!==`${o}/analytics`?!1:t!==`${o}/auth`?r.startsWith(t):!1}var C=gt();let w;var E=s(C),N=s(E);{var R=t=>{var r=it(),B=s(r);Be(2),a(r),q(()=>{Q(r,"href",`${o??""}/`),Q(B,"src",`${o}/favicon.svg`)}),n(t,r)},P=t=>{var r=nt(),B=s(r);a(r),q(()=>{Q(r,"href",`${o??""}/`),Q(B,"src",`${o}/favicon.svg`)}),n(t,r)};$(N,t=>{d()?t(P,!1):t(R)})}a(E);var _=v(E,2);{var T=t=>{var r=lt(),B=s(r);{var W=Y=>{var G=Fe("DEV");n(Y,G)};$(B,Y=>{d()||Y(W)})}a(r),n(t,r)};$(_,t=>{z().devMode&&t(T)})}var u=v(_,2),g=s(u),l=s(g);let i;var M=s(l),b=s(M);Se(b,()=>ze(c.icon)),a(M);var y=v(M,2);{var A=t=>{var r=ct(),B=s(r,!0);a(r),q(()=>Z(B,c.label)),n(t,r)};$(y,t=>{d()||t(A)})}a(l),a(g);var I=v(g,2);ue(I,17,()=>x,Ce,(t,r)=>{var B=ut(),W=s(B);{var Y=J=>{var O=dt(),X=s(O,!0);a(O),q(()=>Z(X,e(r).title)),n(J,O)};$(W,J=>{d()||J(Y)})}var G=v(W,2);ue(G,17,()=>e(r).items,Ce,(J,O)=>{var X=ht();let ve;var pe=s(X),ke=s(pe);Se(ke,()=>ze(e(O).icon)),a(pe);var be=v(pe,2);{var Ie=fe=>{var me=vt(),qe=s(me,!0);a(me),q(()=>Z(qe,e(O).label)),n(fe,me)};$(be,fe=>{d()||fe(Ie)})}a(X),q(fe=>{Q(X,"href",e(O).href),ve=se(X,1,"sidebar__link svelte-6dohdz",null,ve,fe),Q(X,"title",d()?e(O).label:void 0)},[()=>({"sidebar__link--active":m(e(O).href,H().url.pathname)})]),n(J,X)}),a(B),n(t,B)}),a(u);var p=v(u,2),D=s(p),U=s(D);{var V=t=>{var r=pt();n(t,r)},f=t=>{var r=ft();n(t,r)};$(U,t=>{d()?t(V):t(f,!1)})}a(D),a(p),a(C),q(t=>{w=se(C,1,"sidebar svelte-6dohdz",null,w,{"sidebar--collapsed":d()}),Q(l,"href",c.href),i=se(l,1,"sidebar__link svelte-6dohdz",null,i,t),Q(l,"title",d()?c.label:void 0)},[()=>({"sidebar__link--active":m(c.href,H().url.pathname)})]),K("click",p,()=>d(!d())),n(k,C),le(),S()}ce(["click"]);var _t=de('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>'),bt=de('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path></svg>'),mt=h('<button class="theme-toggle svelte-bxe964"><!></button>');function wt(k,L){ne(L,!0);const z=()=>ie(Ae,"$themeStore",H),[H,F]=ge();let S=ae(()=>z()==="dark");function d(){at()}var c=mt(),x=s(c);{var m=w=>{var E=_t();n(w,E)},C=w=>{var E=bt();n(w,E)};$(x,w=>{e(S)?w(m):w(C,!1)})}a(c),q(()=>{Q(c,"aria-label",e(S)?"Switch to light mode":"Switch to dark mode"),Q(c,"title",e(S)?"Light mode":"Dark mode")}),K("click",c,d),n(k,c),le(),F()}ce(["click"]);var yt=h('<span class="nc-badge svelte-la2t1l"> </span>'),xt=h('<button class="nc-clear svelte-la2t1l">Clear all</button>'),Ct=h('<div class="nc-empty svelte-la2t1l">No notifications</div>'),Mt=h('<div><span> </span> <span class="nc-message svelte-la2t1l"> </span> <span class="nc-time svelte-la2t1l"> </span></div>'),$t=h('<button type="button" class="nc-backdrop svelte-la2t1l" aria-label="Close notifications"></button> <div class="nc-dropdown svelte-la2t1l" role="dialog" aria-modal="true" aria-label="Notifications" tabindex="-1"><div class="nc-header svelte-la2t1l"><span class="nc-title svelte-la2t1l">Notifications</span> <!></div> <div class="nc-list svelte-la2t1l"><!></div></div>',1),Lt=h('<div class="notification-center svelte-la2t1l"><button class="nc-btn svelte-la2t1l" aria-label="Notifications"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 1.5C5.5 1.5 4 3.5 4 5.5V8L2.5 10.5H13.5L12 8V5.5C12 3.5 10.5 1.5 8 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path><path d="M6 11.5C6 12.6046 6.89543 13.5 8 13.5C9.10457 13.5 10 12.6046 10 11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg> <!></button> <!></div>');function St(k,L){ne(L,!0);let z=te(!1),H=te(void 0);function F(){j(z,!e(z)),e(z)&&Ge()}function S(){j(z,!1)}function d(_){const T=Date.now()-_,u=Math.floor(T/1e3);if(u<60)return"just now";const g=Math.floor(u/60);if(g<60)return`${g}m ago`;const l=Math.floor(g/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}const c={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function x(_){_.key==="Escape"&&S()}oe(()=>{e(z)&&requestAnimationFrame(()=>{var _;return(_=e(H))==null?void 0:_.focus()})});var m=Lt();Me("keydown",He,x);var C=s(m),w=v(s(C),2);{var E=_=>{var T=yt(),u=s(T,!0);a(T),q(g=>Z(u,g),[()=>we()>9?"9+":we()]),n(_,T)},N=ae(()=>we()>0);$(w,_=>{e(N)&&_(E)})}a(C);var R=v(C,2);{var P=_=>{var T=$t(),u=re(T),g=v(u,2),l=s(g),i=v(s(l),2);{var M=p=>{var D=xt();K("click",D,function(...U){var V;(V=Qe)==null||V.apply(this,U)}),n(p,D)};$(i,p=>{ye.length>0&&p(M)})}a(l);var b=v(l,2),y=s(b);{var A=p=>{var D=Ct();n(p,D)},I=p=>{var D=he(),U=re(D);ue(U,17,()=>ye,V=>V.id,(V,f)=>{var t=Mt(),r=s(t),B=s(r,!0);a(r);var W=v(r,2),Y=s(W,!0);a(W);var G=v(W,2),J=s(G,!0);a(G),a(t),q(O=>{se(t,1,`nc-item nc-item--${e(f).type??""}`,"svelte-la2t1l"),se(r,1,`nc-icon nc-icon--${e(f).type??""}`,"svelte-la2t1l"),Z(B,c[e(f).type]),Z(Y,e(f).message),Z(J,O)},[()=>d(e(f).timestamp)]),n(V,t)}),n(p,D)};$(y,p=>{ye.length===0?p(A):p(I,!1)})}a(b),a(g),Te(g,p=>j(H,p),()=>e(H)),K("click",u,S),n(_,T)};$(R,_=>{e(z)&&_(P)})}a(m),K("click",C,F),n(k,m),le()}ce(["click"]);var zt=h('<span class="header__separator svelte-hv3zzy">/</span>'),Bt=h('<span class="header__crumb header__crumb--current svelte-hv3zzy"> </span>'),Ht=h('<a class="header__crumb svelte-hv3zzy"> </a>'),Vt=h("<!> <!>",1),jt=h('<h1 class="header__title svelte-hv3zzy"> </h1>'),Tt=h('<header class="header svelte-hv3zzy"><div class="header__left svelte-hv3zzy"><nav class="header__breadcrumbs svelte-hv3zzy" aria-label="Breadcrumb"></nav> <!></div> <div class="header__right svelte-hv3zzy"><!> <!> <!> <div class="header__user svelte-hv3zzy"><span class="header__email svelte-hv3zzy"> </span> <button class="header__logout svelte-hv3zzy">Logout</button></div></div></header>');function Dt(k,L){ne(L,!0);const z=()=>ie($e,"$page",F),H=()=>ie(_e,"$authStore",F),[F,S]=ge();function d(){Pe(),_e.logout()}function c(b){const y=[],I=b.replace(o,"").split("/").filter(Boolean),p={database:"Database",schema:"Schema",records:"Records",auth:"Auth",settings:"Settings",storage:"Storage",logs:"Logs",monitoring:"Monitoring",new:"New"};let D=o;for(const[U,V]of I.entries()){D+=`/${V}`;const f=decodeURIComponent(V),t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(f)||/^[0-9a-f]{20,}$/i.test(f);let r=p[V]??(t?f.slice(0,8)+"...":f);V==="settings"&&(r=I[U-1]==="auth"?"Auth Settings":"Project Info"),y.push({label:r,href:D})}return y}let x=ae(()=>c(z().url.pathname));var m=Tt(),C=s(m),w=s(C);ue(w,21,()=>e(x),Ce,(b,y,A)=>{var I=Vt(),p=re(I);{var D=t=>{var r=zt();n(t,r)};$(p,t=>{A>0&&t(D)})}var U=v(p,2);{var V=t=>{var r=Bt(),B=s(r,!0);a(r),q(()=>Z(B,e(y).label)),n(t,r)},f=t=>{var r=Ht(),B=s(r,!0);a(r),q(()=>{Q(r,"href",e(y).href),Z(B,e(y).label)}),n(t,r)};$(U,t=>{A===e(x).length-1?t(V):t(f,!1)})}n(b,I)}),a(w);var E=v(w,2);{var N=b=>{var y=jt(),A=s(y,!0);a(y),q(()=>Z(A,L.title)),n(b,y)};$(E,b=>{L.title&&b(N)})}a(C);var R=v(C,2),P=s(R);{var _=b=>{var y=he(),A=re(y);xe(A,()=>L.actions),n(b,y)};$(P,b=>{L.actions&&b(_)})}var T=v(P,2);St(T,{});var u=v(T,2);wt(u,{});var g=v(u,2),l=s(g),i=s(l,!0);a(l);var M=v(l,2);a(g),a(R),a(m),q(()=>{var b;return Z(i,((b=H().admin)==null?void 0:b.email)??"")}),K("click",M,d),n(k,m),le(),S()}ce(["click"]);var At=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 8.5L6.5 11L12 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),Et=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M5 5L11 11M11 5L5 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>'),It=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="5" r="0.75" fill="currentColor"></circle><path d="M8 7.5V11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>'),qt=h('<div role="status"><span class="toast__icon svelte-zemmny" aria-hidden="true"><!></span> <span class="toast__message svelte-zemmny"> </span> <button class="toast__dismiss svelte-zemmny" aria-label="Dismiss"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M4 4L10 10M10 4L4 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div>'),Ft=h('<div class="toast-container svelte-zemmny" aria-live="polite"></div>');function Nt(k,L){ne(L,!1),Je();var z=he(),H=re(z);{var F=S=>{var d=Ft();ue(d,5,()=>Le,c=>c.id,(c,x)=>{var m=qt(),C=s(m),w=s(C);{var E=u=>{var g=At();n(u,g)},N=u=>{var g=Et();n(u,g)},R=u=>{var g=It();n(u,g)};$(w,u=>{e(x).type==="success"?u(E):e(x).type==="error"?u(N,1):u(R,!1)})}a(C);var P=v(C,2),_=s(P,!0);a(P);var T=v(P,2);a(m),q(()=>{se(m,1,`toast toast--${e(x).type??""}`,"svelte-zemmny"),Z(_,e(x).message)}),K("click",T,()=>Ye(e(x).id)),n(c,m)}),a(d),n(S,d)};$(H,S=>{Le.length>0&&S(F)})}n(k,z),le()}ce(["click"]);var Pt=h('<div class="palette__empty svelte-xhxto7">No results found</div>'),Ot=h('<button><span class="palette__item-label svelte-xhxto7"> </span> <span class="palette__item-desc svelte-xhxto7"> </span> <span class="palette__item-cat svelte-xhxto7"> </span></button>'),Zt=h('<div class="palette-layer svelte-xhxto7"><button type="button" class="palette-backdrop svelte-xhxto7" aria-label="Close command palette"></button> <div class="palette svelte-xhxto7" role="dialog" aria-modal="true" aria-label="Command palette" tabindex="-1"><div class="palette__search svelte-xhxto7"><svg class="palette__search-icon svelte-xhxto7" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> <input class="palette__input svelte-xhxto7" type="text" placeholder="Search pages, tables..."/> <kbd class="palette__kbd svelte-xhxto7">ESC</kbd></div> <div class="palette__results svelte-xhxto7"><!></div></div></div>');function Rt(k,L){ne(L,!0);const z=()=>ie(et,"$schemaStore",H),[H,F]=ge();let S=je(L,"open",15,!1),d=te(""),c=te(0),x=te(void 0);const m=[{label:"Overview",description:"Dashboard home",href:`${o}/`,category:"Navigation"},{label:"Users",description:"Manage user accounts",href:`${o}/auth`,category:"Auth"},{label:"Auth Settings",description:"Manage authentication providers and methods",href:`${o}/auth/settings`,category:"Auth"},{label:"Tables",description:"Database tables",href:`${o}/database/tables`,category:"Database"},{label:"ERD Diagram",description:"Entity relationship diagram",href:`${o}/database/erd`,category:"Database"},{label:"Storage",description:"File storage buckets",href:`${o}/storage`,category:"Storage"},{label:"Functions",description:"Serverless functions",href:`${o}/functions`,category:"Functions"},{label:"Push Notifications",description:"Push token management",href:`${o}/push`,category:"Push"},{label:"Analytics",description:"Traffic and performance",href:`${o}/analytics`,category:"Analytics"},{label:"Events",description:"Event timeline",href:`${o}/analytics/events`,category:"Analytics"},{label:"Logs",description:"Application logs",href:`${o}/logs`,category:"Monitoring"},{label:"Live",description:"WebSocket monitoring",href:`${o}/monitoring`,category:"Monitoring"},{label:"Backup",description:"Backup and restore",href:`${o}/backup`,category:"System"},{label:"Project Info",description:"Environment and resource overview",href:`${o}/settings`,category:"System"}];let C=ae(()=>Object.keys(z().schema||{}).map(i=>({label:i,description:`Table: ${i}`,href:`${o}/database/tables/${i}`,category:"Tables"}))),w=ae(()=>[...m,...e(C)]),E=ae(()=>()=>{if(!e(d).trim())return e(w);const i=e(d).toLowerCase();return e(w).filter(M=>M.label.toLowerCase().includes(i)||M.description.toLowerCase().includes(i)||M.category.toLowerCase().includes(i))}),N=ae(()=>e(E)());oe(()=>{S()&&(j(d,""),j(c,0),requestAnimationFrame(()=>{var i;return(i=e(x))==null?void 0:i.focus()}))}),oe(()=>{e(d),j(c,0)});function R(i){i.key==="ArrowDown"?(i.preventDefault(),j(c,Math.min(e(c)+1,e(N).length-1),!0)):i.key==="ArrowUp"?(i.preventDefault(),j(c,Math.max(e(c)-1,0),!0)):i.key==="Enter"?(i.preventDefault(),e(N)[e(c)]&&P(e(N)[e(c)].href)):i.key==="Escape"&&S(!1)}function P(i){S(!1),Ve(i)}function _(){S(!1)}function T(i){i.stopPropagation()}var u=he(),g=re(u);{var l=i=>{var M=Zt(),b=s(M),y=v(b,2),A=s(y),I=v(s(A),2);Ne(I),Te(I,f=>j(x,f),()=>e(x)),Be(2),a(A);var p=v(A,2),D=s(p);{var U=f=>{var t=Pt();n(f,t)},V=f=>{var t=he(),r=re(t);ue(r,19,()=>e(N),B=>B.href,(B,W,Y)=>{var G=Ot();let J;var O=s(G),X=s(O,!0);a(O);var ve=v(O,2),pe=s(ve,!0);a(ve);var ke=v(ve,2),be=s(ke,!0);a(ke),a(G),q(()=>{J=se(G,1,"palette__item svelte-xhxto7",null,J,{"palette__item--selected":e(Y)===e(c)}),Z(X,e(W).label),Z(pe,e(W).description),Z(be,e(W).category)}),K("click",G,()=>P(e(W).href)),Me("mouseenter",G,()=>j(c,e(Y),!0)),n(B,G)}),n(f,t)};$(D,f=>{e(N).length===0?f(U):f(V,!1)})}a(p),a(y),a(M),K("click",b,_),K("click",y,T),K("keydown",y,R),K("keydown",I,R),Xe(I,()=>e(d),f=>j(d,f)),n(i,M)};$(g,i=>{S()&&i(l)})}n(k,u),le(),F()}ce(["click","keydown"]);var Ut=h('<button type="button" class="sidebar-overlay svelte-12qhfyh" aria-label="Close navigation menu"></button>'),Kt=h('<button class="mobile-menu-btn svelte-12qhfyh" aria-label="Toggle menu"><svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M3 5H17M3 10H17M3 15H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button>'),Wt=h('<div><!> <!> <div class="app-main svelte-12qhfyh"><!> <!> <main class="app-content svelte-12qhfyh"><!></main></div></div>'),Gt=h('<div class="app-loading svelte-12qhfyh"><span>Loading...</span></div>'),Qt=h("<!> <!> <!>",1);function mr(k,L){ne(L,!0);const z=()=>ie($e,"$page",F),H=()=>ie(_e,"$authStore",F),[F,S]=ge();let d=te(!1),c=te(!1),x=te(!1),m=te(!1);oe(()=>{ot()}),oe(()=>{if(typeof window>"u")return;const l=window.matchMedia("(max-width: 768px)"),i=M=>{j(c,M.matches,!0),M.matches&&j(d,!0)};return i(l),l.addEventListener("change",i),()=>l.removeEventListener("change",i)});function C(){e(c)&&j(d,!0)}let w=ae(()=>z().url.pathname===`${o}/login`||z().url.pathname===`${o}/login/`);oe(()=>{!e(w)&&H().accessToken&&!e(x)?E():H().accessToken||j(x,!0)});async function E(){try{if((await Oe()).needsSetup){_e.logout();return}}catch{}j(x,!0)}oe(()=>{if(!e(w)&&!H().accessToken){const l=Ze()?`${o}/login`:Re(z().url);Ve(l,{replaceState:!0})}}),oe(()=>{H().accessToken&&e(x)&&Ke()});var N=Qt();Me("keydown",He,l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),j(m,!e(m)))});var R=re(N);{var P=l=>{var i=he(),M=re(i);xe(M,()=>L.children),n(l,i)},_=l=>{var i=Wt();let M;var b=s(i);{var y=t=>{var r=Ut();K("click",r,C),n(t,r)};$(b,t=>{e(c)&&!e(d)&&t(y)})}var A=v(b,2);kt(A,{get collapsed(){return e(d)},set collapsed(t){j(d,t,!0)}});var I=v(A,2),p=s(I);{var D=t=>{var r=Kt();K("click",r,()=>j(d,!e(d))),n(t,r)};$(p,t=>{e(c)&&t(D)})}var U=v(p,2);Dt(U,{});var V=v(U,2),f=s(V);xe(f,()=>L.children),a(V),a(I),a(i),q(()=>M=se(i,1,"app-layout svelte-12qhfyh",null,M,{"app-layout--mobile":e(c)})),n(l,i)},T=l=>{var i=Gt();n(l,i)};$(R,l=>{e(w)?l(P):H().accessToken?l(_,1):l(T,!1)})}var u=v(R,2);Nt(u,{});var g=v(u,2);Rt(g,{get open(){return e(m)},set open(l){j(m,l,!0)}}),n(k,N),le(),S()}ce(["click"]);export{mr as component,br as universal};
1
+ import"../chunks/CWj6FrbW.js";import{p as ne,c as s,r as a,s as v,g as e,t as q,a as le,ae as Be,u as ae,w as oe,at as He,d as te,b as j,f as re}from"../chunks/BdTBlfLy.js";import{d as ce,s as Z,a as K,e as Me}from"../chunks/DtZk82gG.js";import{a as n,f as h,d as de,t as Fe,c as he}from"../chunks/DEELgv7K.js";import{s as xe}from"../chunks/XmteHKH_.js";import{i as $}from"../chunks/Y22E1hJM.js";import{a as Q,s as se,r as Ne}from"../chunks/CoI6jjbg.js";import{a as ie,s as ge}from"../chunks/Cp8V0Xy2.js";import{p as $e}from"../chunks/kiJ6KthZ.js";import{g as Ve}from"../chunks/qiZXAKh-.js";import{b as o}from"../chunks/5PDcRlfX.js";import{a as _e}from"../chunks/BaCHY17I.js";import{m as Pe,f as Oe,c as Ze,b as Re}from"../chunks/CPdXvRUb.js";import{d as Ue,l as Ke}from"../chunks/BKXmgPq4.js";import{w as We}from"../chunks/Bn2NtlTj.js";import{e as ue,i as Ce,m as Ge,g as we,f as ye,h as Qe,j as Le,r as Ye}from"../chunks/g3ZZdY-r.js";import{h as Se}from"../chunks/DHWOQ9Ui.js";import{p as je}from"../chunks/F9_4wRrd.js";import{b as Te}from"../chunks/CGgVJi7f.js";import{i as Je}from"../chunks/C8s55wKu.js";import{b as Xe}from"../chunks/CYatlt7w.js";import{s as et}from"../chunks/DzXaj-Ja.js";const tt=!1,rt=!1,br=Object.freeze(Object.defineProperty({__proto__:null,prerender:tt,ssr:rt},Symbol.toStringTag,{value:"Module"})),De="edgebase_theme";let ee="light";const Ae=We(ee);function ot(){if(typeof window>"u")return;const k=localStorage.getItem(De);k==="light"||k==="dark"?ee=k:window.matchMedia("(prefers-color-scheme: dark)").matches&&(ee="dark"),Ee(ee)}function at(){return ee=ee==="light"?"dark":"light",localStorage.setItem(De,ee),Ee(ee),ee}function st(k){document.documentElement.setAttribute("data-theme",k)}function Ee(k){ee=k,Ae.set(k),st(k)}function ze(k){return{overview:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="2" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/></svg>',tables:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="12" height="12" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 6H14M2 10H14M6 6V14" stroke="currentColor" stroke-width="1.5"/></svg>',schema:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="2" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="9" y="9" width="5" height="5" rx="1" stroke="currentColor" stroke-width="1.5"/><path d="M7 4.5H9.5V9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',records:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4H14M2 8H14M2 12H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',sql:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 3H13M3 6H10M3 9H13M3 12H8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12 10L14 12L12 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',erd:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="2" width="5" height="4" rx="1" stroke="currentColor" stroke-width="1.5"/><rect x="10" y="10" width="5" height="4" rx="1" stroke="currentColor" stroke-width="1.5"/><path d="M6 4H8.5V12H10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',rulesTest:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L12 4V7.5C12 10.5 10.2 12.8 8 14C5.8 12.8 4 10.5 4 7.5V4L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 8L7.5 9.5L10 6.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',users:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="5" r="2.5" stroke="currentColor" stroke-width="1.5"/><path d="M3 14C3 11.2386 5.23858 9 8 9C10.7614 9 13 11.2386 13 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',settings:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="8" r="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 1V3M8 13V15M1 8H3M13 8H15M2.93 2.93L4.34 4.34M11.66 11.66L13.07 13.07M13.07 2.93L11.66 4.34M4.34 11.66L2.93 13.07" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',storage:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M2 4L8 2L14 4V12L8 14L2 12V4Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M2 4L8 6L14 4" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8 6V14" stroke="currentColor" stroke-width="1.5"/></svg>',functions:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6 2C4.89543 2 4 2.89543 4 4V6L3 8L4 10V12C4 13.1046 4.89543 14 6 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M10 2C11.1046 2 12 2.89543 12 4V6L13 8L12 10V12C12 13.1046 11.1046 14 10 14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="6.5" cy="8" r="0.75" fill="currentColor"/><circle cx="9.5" cy="8" r="0.75" fill="currentColor"/></svg>',ai:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="3" y="3" width="10" height="10" rx="2" stroke="currentColor" stroke-width="1.5"/><path d="M8 1V3M8 13V15M1 8H3M13 8H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="6" cy="6.5" r="0.75" fill="currentColor"/><circle cx="10" cy="6.5" r="0.75" fill="currentColor"/><path d="M5.5 9.5C6.1 10.3 6.95 10.75 8 10.75C9.05 10.75 9.9 10.3 10.5 9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',logs:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 4H12M4 7H10M4 10H12M4 13H8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',live:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1 8H3L5 3L8 13L11 6L13 8H15" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',analytics:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="9" width="3" height="5" rx="0.5" stroke="currentColor" stroke-width="1.5"/><rect x="6.5" y="5" width="3" height="9" rx="0.5" stroke="currentColor" stroke-width="1.5"/><rect x="11" y="2" width="3" height="12" rx="0.5" stroke="currentColor" stroke-width="1.5"/></svg>',events:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="4" cy="4" r="1.5" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="8" r="1.5" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="12" r="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M7 4H14M7 8H12M7 12H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',analyticsAuth:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L12 4V7.5C12 10.5 10.2 12.8 8 14C5.8 12.8 4 10.5 4 7.5V4L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',analyticsDb:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><ellipse cx="8" cy="4" rx="5" ry="2" stroke="currentColor" stroke-width="1.5"/><path d="M3 4V12C3 13.1 5.24 14 8 14C10.76 14 13 13.1 13 12V4" stroke="currentColor" stroke-width="1.5"/><path d="M3 8C3 9.1 5.24 10 8 10C10.76 10 13 9.1 13 8" stroke="currentColor" stroke-width="1.5"/></svg>',analyticsStorage:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2L14 5V11L8 14L2 11V5L8 2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M8 8V14M2 5L8 8L14 5" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/></svg>',analyticsFn:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M5.5 2H10C11.1 2 12 2.9 12 4V5.5M4 10.5V12C4 13.1 4.9 14 6 14H10.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M3 7L6.5 7L8 5L10 9L11.5 7L13 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',push:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 3C4 2.44772 4.44772 2 5 2H11C11.5523 2 12 2.44772 12 3V13C12 13.5523 11.5523 14 11 14H5C4.44772 14 4 13.5523 4 13V3Z" stroke="currentColor" stroke-width="1.5"/><circle cx="8" cy="11" r="0.75" fill="currentColor"/><path d="M6.5 5H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',backup:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8V12C3 13.1046 3.89543 14 5 14H11C12.1046 14 13 13.1046 13 12V8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8 2V10M8 10L5 7M8 10L11 7" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',apiDocs:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 2H10L13 5V14H3V2Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M10 2V5H13" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/><path d="M6 8H10M6 10.5H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>',configView:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="3" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 6H14" stroke="currentColor" stroke-width="1.5"/><path d="M5 6V13" stroke="currentColor" stroke-width="1.5"/><circle cx="4" cy="4.5" r="0.5" fill="currentColor"/><circle cx="6" cy="4.5" r="0.5" fill="currentColor"/><circle cx="8" cy="4.5" r="0.5" fill="currentColor"/></svg>',email:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="2" y="3" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M2 3L8 9L14 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'}[k]??""}var it=h('<a class="sidebar__brand svelte-6dohdz" aria-label="EdgeBase home"><img class="sidebar__brand-icon svelte-6dohdz" alt=""/> <span class="sidebar__brand-text svelte-6dohdz">EdgeBase</span></a>'),nt=h('<a class="sidebar__brand svelte-6dohdz" aria-label="EdgeBase home"><img class="sidebar__brand-icon svelte-6dohdz" alt=""/></a>'),lt=h('<div class="sidebar__dev-badge svelte-6dohdz"><!></div>'),ct=h('<span class="sidebar__label svelte-6dohdz"> </span>'),dt=h('<div class="sidebar__section-title svelte-6dohdz"> </div>'),vt=h('<span class="sidebar__label svelte-6dohdz"> </span>'),ht=h('<a><span class="sidebar__icon svelte-6dohdz"><!></span> <!></a>'),ut=h('<div class="sidebar__section svelte-6dohdz"><!> <!></div>'),pt=de('<path d="M6 3L11 8L6 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>'),ft=de('<path d="M10 3L5 8L10 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>'),gt=h('<aside><div class="sidebar__logo svelte-6dohdz"><!></div> <!> <nav class="sidebar__nav svelte-6dohdz"><div class="sidebar__section sidebar__section--overview svelte-6dohdz"><a><span class="sidebar__icon svelte-6dohdz"><!></span> <!></a></div> <!></nav> <button class="sidebar__toggle svelte-6dohdz" aria-label="Toggle sidebar"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><!></svg></button></aside>');function kt(k,L){ne(L,!0);const z=()=>ie(Ue,"$devInfoStore",F),H=()=>ie($e,"$page",F),[F,S]=ge();let d=je(L,"collapsed",15,!1);const c={label:"Overview",href:`${o}/`,icon:"overview"},x=[{title:"Auth",items:[{label:"Users",href:`${o}/auth`,icon:"users"},{label:"Auth Settings",href:`${o}/auth/settings`,icon:"settings"},{label:"Email Templates",href:`${o}/auth/email-templates`,icon:"email"}]},{title:"Database",items:[{label:"Tables",href:`${o}/database/tables`,icon:"tables"},{label:"ERD",href:`${o}/database/erd`,icon:"erd"},{label:"SQL",href:`${o}/database/sql`,icon:"sql"}]},{title:"Storage",items:[{label:"Files",href:`${o}/storage`,icon:"storage"}]},{title:"Functions",items:[{label:"Functions",href:`${o}/functions`,icon:"functions"}]},{title:"Push",items:[{label:"Notifications",href:`${o}/push`,icon:"push"}]},{title:"Analytics",items:[{label:"Overview",href:`${o}/analytics`,icon:"analytics"},{label:"Events",href:`${o}/analytics/events`,icon:"events"},{label:"Auth",href:`${o}/analytics/auth`,icon:"analyticsAuth"},{label:"Database",href:`${o}/analytics/database`,icon:"analyticsDb"},{label:"Storage",href:`${o}/analytics/storage`,icon:"analyticsStorage"},{label:"Functions",href:`${o}/analytics/functions`,icon:"analyticsFn"}]},{title:"Monitoring",items:[{label:"Logs",href:`${o}/logs`,icon:"logs"},{label:"Live",href:`${o}/monitoring`,icon:"live"}]},{title:"System",items:[{label:"API Docs",href:`${o}/docs`,icon:"apiDocs"},{label:"Backup",href:`${o}/backup`,icon:"backup"},{label:"Project Info",href:`${o}/settings`,icon:"configView"}]}];function m(t,r){return t===`${o}/`?r===`${o}/`||r===o:t===`${o}/auth`&&r===`${o}/auth`||t===`${o}/auth`&&r.startsWith(`${o}/auth/`)&&!r.startsWith(`${o}/auth/settings`)&&!r.startsWith(`${o}/auth/email-templates`)?!0:t===`${o}/analytics`&&r!==`${o}/analytics`?!1:t!==`${o}/auth`?r.startsWith(t):!1}var C=gt();let w;var E=s(C),N=s(E);{var R=t=>{var r=it(),B=s(r);Be(2),a(r),q(()=>{Q(r,"href",`${o??""}/`),Q(B,"src",`${o}/favicon.svg`)}),n(t,r)},P=t=>{var r=nt(),B=s(r);a(r),q(()=>{Q(r,"href",`${o??""}/`),Q(B,"src",`${o}/favicon.svg`)}),n(t,r)};$(N,t=>{d()?t(P,!1):t(R)})}a(E);var _=v(E,2);{var T=t=>{var r=lt(),B=s(r);{var W=Y=>{var G=Fe("DEV");n(Y,G)};$(B,Y=>{d()||Y(W)})}a(r),n(t,r)};$(_,t=>{z().devMode&&t(T)})}var u=v(_,2),g=s(u),l=s(g);let i;var M=s(l),b=s(M);Se(b,()=>ze(c.icon)),a(M);var y=v(M,2);{var A=t=>{var r=ct(),B=s(r,!0);a(r),q(()=>Z(B,c.label)),n(t,r)};$(y,t=>{d()||t(A)})}a(l),a(g);var I=v(g,2);ue(I,17,()=>x,Ce,(t,r)=>{var B=ut(),W=s(B);{var Y=J=>{var O=dt(),X=s(O,!0);a(O),q(()=>Z(X,e(r).title)),n(J,O)};$(W,J=>{d()||J(Y)})}var G=v(W,2);ue(G,17,()=>e(r).items,Ce,(J,O)=>{var X=ht();let ve;var pe=s(X),ke=s(pe);Se(ke,()=>ze(e(O).icon)),a(pe);var be=v(pe,2);{var Ie=fe=>{var me=vt(),qe=s(me,!0);a(me),q(()=>Z(qe,e(O).label)),n(fe,me)};$(be,fe=>{d()||fe(Ie)})}a(X),q(fe=>{Q(X,"href",e(O).href),ve=se(X,1,"sidebar__link svelte-6dohdz",null,ve,fe),Q(X,"title",d()?e(O).label:void 0)},[()=>({"sidebar__link--active":m(e(O).href,H().url.pathname)})]),n(J,X)}),a(B),n(t,B)}),a(u);var p=v(u,2),D=s(p),U=s(D);{var V=t=>{var r=pt();n(t,r)},f=t=>{var r=ft();n(t,r)};$(U,t=>{d()?t(V):t(f,!1)})}a(D),a(p),a(C),q(t=>{w=se(C,1,"sidebar svelte-6dohdz",null,w,{"sidebar--collapsed":d()}),Q(l,"href",c.href),i=se(l,1,"sidebar__link svelte-6dohdz",null,i,t),Q(l,"title",d()?c.label:void 0)},[()=>({"sidebar__link--active":m(c.href,H().url.pathname)})]),K("click",p,()=>d(!d())),n(k,C),le(),S()}ce(["click"]);var _t=de('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>'),bt=de('<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path></svg>'),mt=h('<button class="theme-toggle svelte-bxe964"><!></button>');function wt(k,L){ne(L,!0);const z=()=>ie(Ae,"$themeStore",H),[H,F]=ge();let S=ae(()=>z()==="dark");function d(){at()}var c=mt(),x=s(c);{var m=w=>{var E=_t();n(w,E)},C=w=>{var E=bt();n(w,E)};$(x,w=>{e(S)?w(m):w(C,!1)})}a(c),q(()=>{Q(c,"aria-label",e(S)?"Switch to light mode":"Switch to dark mode"),Q(c,"title",e(S)?"Light mode":"Dark mode")}),K("click",c,d),n(k,c),le(),F()}ce(["click"]);var yt=h('<span class="nc-badge svelte-la2t1l"> </span>'),xt=h('<button class="nc-clear svelte-la2t1l">Clear all</button>'),Ct=h('<div class="nc-empty svelte-la2t1l">No notifications</div>'),Mt=h('<div><span> </span> <span class="nc-message svelte-la2t1l"> </span> <span class="nc-time svelte-la2t1l"> </span></div>'),$t=h('<button type="button" class="nc-backdrop svelte-la2t1l" aria-label="Close notifications"></button> <div class="nc-dropdown svelte-la2t1l" role="dialog" aria-modal="true" aria-label="Notifications" tabindex="-1"><div class="nc-header svelte-la2t1l"><span class="nc-title svelte-la2t1l">Notifications</span> <!></div> <div class="nc-list svelte-la2t1l"><!></div></div>',1),Lt=h('<div class="notification-center svelte-la2t1l"><button class="nc-btn svelte-la2t1l" aria-label="Notifications"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 1.5C5.5 1.5 4 3.5 4 5.5V8L2.5 10.5H13.5L12 8V5.5C12 3.5 10.5 1.5 8 1.5Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"></path><path d="M6 11.5C6 12.6046 6.89543 13.5 8 13.5C9.10457 13.5 10 12.6046 10 11.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg> <!></button> <!></div>');function St(k,L){ne(L,!0);let z=te(!1),H=te(void 0);function F(){j(z,!e(z)),e(z)&&Ge()}function S(){j(z,!1)}function d(_){const T=Date.now()-_,u=Math.floor(T/1e3);if(u<60)return"just now";const g=Math.floor(u/60);if(g<60)return`${g}m ago`;const l=Math.floor(g/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}const c={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function x(_){_.key==="Escape"&&S()}oe(()=>{e(z)&&requestAnimationFrame(()=>{var _;return(_=e(H))==null?void 0:_.focus()})});var m=Lt();Me("keydown",He,x);var C=s(m),w=v(s(C),2);{var E=_=>{var T=yt(),u=s(T,!0);a(T),q(g=>Z(u,g),[()=>we()>9?"9+":we()]),n(_,T)},N=ae(()=>we()>0);$(w,_=>{e(N)&&_(E)})}a(C);var R=v(C,2);{var P=_=>{var T=$t(),u=re(T),g=v(u,2),l=s(g),i=v(s(l),2);{var M=p=>{var D=xt();K("click",D,function(...U){var V;(V=Qe)==null||V.apply(this,U)}),n(p,D)};$(i,p=>{ye.length>0&&p(M)})}a(l);var b=v(l,2),y=s(b);{var A=p=>{var D=Ct();n(p,D)},I=p=>{var D=he(),U=re(D);ue(U,17,()=>ye,V=>V.id,(V,f)=>{var t=Mt(),r=s(t),B=s(r,!0);a(r);var W=v(r,2),Y=s(W,!0);a(W);var G=v(W,2),J=s(G,!0);a(G),a(t),q(O=>{se(t,1,`nc-item nc-item--${e(f).type??""}`,"svelte-la2t1l"),se(r,1,`nc-icon nc-icon--${e(f).type??""}`,"svelte-la2t1l"),Z(B,c[e(f).type]),Z(Y,e(f).message),Z(J,O)},[()=>d(e(f).timestamp)]),n(V,t)}),n(p,D)};$(y,p=>{ye.length===0?p(A):p(I,!1)})}a(b),a(g),Te(g,p=>j(H,p),()=>e(H)),K("click",u,S),n(_,T)};$(R,_=>{e(z)&&_(P)})}a(m),K("click",C,F),n(k,m),le()}ce(["click"]);var zt=h('<span class="header__separator svelte-hv3zzy">/</span>'),Bt=h('<span class="header__crumb header__crumb--current svelte-hv3zzy"> </span>'),Ht=h('<a class="header__crumb svelte-hv3zzy"> </a>'),Vt=h("<!> <!>",1),jt=h('<h1 class="header__title svelte-hv3zzy"> </h1>'),Tt=h('<header class="header svelte-hv3zzy"><div class="header__left svelte-hv3zzy"><nav class="header__breadcrumbs svelte-hv3zzy" aria-label="Breadcrumb"></nav> <!></div> <div class="header__right svelte-hv3zzy"><!> <!> <!> <div class="header__user svelte-hv3zzy"><span class="header__email svelte-hv3zzy"> </span> <button class="header__logout svelte-hv3zzy">Logout</button></div></div></header>');function Dt(k,L){ne(L,!0);const z=()=>ie($e,"$page",F),H=()=>ie(_e,"$authStore",F),[F,S]=ge();function d(){Pe(),_e.logout()}function c(b){const y=[],I=b.replace(o,"").split("/").filter(Boolean),p={database:"Database",schema:"Schema",records:"Records",auth:"Auth",settings:"Settings",storage:"Storage",logs:"Logs",monitoring:"Monitoring",new:"New"};let D=o;for(const[U,V]of I.entries()){D+=`/${V}`;const f=decodeURIComponent(V),t=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(f)||/^[0-9a-f]{20,}$/i.test(f);let r=p[V]??(t?f.slice(0,8)+"...":f);V==="settings"&&(r=I[U-1]==="auth"?"Auth Settings":"Project Info"),y.push({label:r,href:D})}return y}let x=ae(()=>c(z().url.pathname));var m=Tt(),C=s(m),w=s(C);ue(w,21,()=>e(x),Ce,(b,y,A)=>{var I=Vt(),p=re(I);{var D=t=>{var r=zt();n(t,r)};$(p,t=>{A>0&&t(D)})}var U=v(p,2);{var V=t=>{var r=Bt(),B=s(r,!0);a(r),q(()=>Z(B,e(y).label)),n(t,r)},f=t=>{var r=Ht(),B=s(r,!0);a(r),q(()=>{Q(r,"href",e(y).href),Z(B,e(y).label)}),n(t,r)};$(U,t=>{A===e(x).length-1?t(V):t(f,!1)})}n(b,I)}),a(w);var E=v(w,2);{var N=b=>{var y=jt(),A=s(y,!0);a(y),q(()=>Z(A,L.title)),n(b,y)};$(E,b=>{L.title&&b(N)})}a(C);var R=v(C,2),P=s(R);{var _=b=>{var y=he(),A=re(y);xe(A,()=>L.actions),n(b,y)};$(P,b=>{L.actions&&b(_)})}var T=v(P,2);St(T,{});var u=v(T,2);wt(u,{});var g=v(u,2),l=s(g),i=s(l,!0);a(l);var M=v(l,2);a(g),a(R),a(m),q(()=>{var b;return Z(i,((b=H().admin)==null?void 0:b.email)??"")}),K("click",M,d),n(k,m),le(),S()}ce(["click"]);var At=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4 8.5L6.5 11L12 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),Et=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M5 5L11 11M11 5L5 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>'),It=de('<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><circle cx="8" cy="5" r="0.75" fill="currentColor"></circle><path d="M8 7.5V11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>'),qt=h('<div role="status"><span class="toast__icon svelte-zemmny" aria-hidden="true"><!></span> <span class="toast__message svelte-zemmny"> </span> <button class="toast__dismiss svelte-zemmny" aria-label="Dismiss"><svg width="14" height="14" viewBox="0 0 14 14" fill="none"><path d="M4 4L10 10M10 4L4 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button></div>'),Ft=h('<div class="toast-container svelte-zemmny" aria-live="polite"></div>');function Nt(k,L){ne(L,!1),Je();var z=he(),H=re(z);{var F=S=>{var d=Ft();ue(d,5,()=>Le,c=>c.id,(c,x)=>{var m=qt(),C=s(m),w=s(C);{var E=u=>{var g=At();n(u,g)},N=u=>{var g=Et();n(u,g)},R=u=>{var g=It();n(u,g)};$(w,u=>{e(x).type==="success"?u(E):e(x).type==="error"?u(N,1):u(R,!1)})}a(C);var P=v(C,2),_=s(P,!0);a(P);var T=v(P,2);a(m),q(()=>{se(m,1,`toast toast--${e(x).type??""}`,"svelte-zemmny"),Z(_,e(x).message)}),K("click",T,()=>Ye(e(x).id)),n(c,m)}),a(d),n(S,d)};$(H,S=>{Le.length>0&&S(F)})}n(k,z),le()}ce(["click"]);var Pt=h('<div class="palette__empty svelte-xhxto7">No results found</div>'),Ot=h('<button><span class="palette__item-label svelte-xhxto7"> </span> <span class="palette__item-desc svelte-xhxto7"> </span> <span class="palette__item-cat svelte-xhxto7"> </span></button>'),Zt=h('<div class="palette-layer svelte-xhxto7"><button type="button" class="palette-backdrop svelte-xhxto7" aria-label="Close command palette"></button> <div class="palette svelte-xhxto7" role="dialog" aria-modal="true" aria-label="Command palette" tabindex="-1"><div class="palette__search svelte-xhxto7"><svg class="palette__search-icon svelte-xhxto7" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg> <input class="palette__input svelte-xhxto7" type="text" placeholder="Search pages, tables..."/> <kbd class="palette__kbd svelte-xhxto7">ESC</kbd></div> <div class="palette__results svelte-xhxto7"><!></div></div></div>');function Rt(k,L){ne(L,!0);const z=()=>ie(et,"$schemaStore",H),[H,F]=ge();let S=je(L,"open",15,!1),d=te(""),c=te(0),x=te(void 0);const m=[{label:"Overview",description:"Dashboard home",href:`${o}/`,category:"Navigation"},{label:"Users",description:"Manage user accounts",href:`${o}/auth`,category:"Auth"},{label:"Auth Settings",description:"Manage authentication providers and methods",href:`${o}/auth/settings`,category:"Auth"},{label:"Tables",description:"Database tables",href:`${o}/database/tables`,category:"Database"},{label:"ERD Diagram",description:"Entity relationship diagram",href:`${o}/database/erd`,category:"Database"},{label:"Storage",description:"File storage buckets",href:`${o}/storage`,category:"Storage"},{label:"Functions",description:"Serverless functions",href:`${o}/functions`,category:"Functions"},{label:"Push Notifications",description:"Push token management",href:`${o}/push`,category:"Push"},{label:"Analytics",description:"Traffic and performance",href:`${o}/analytics`,category:"Analytics"},{label:"Events",description:"Event timeline",href:`${o}/analytics/events`,category:"Analytics"},{label:"Logs",description:"Application logs",href:`${o}/logs`,category:"Monitoring"},{label:"Live",description:"WebSocket monitoring",href:`${o}/monitoring`,category:"Monitoring"},{label:"Backup",description:"Backup and restore",href:`${o}/backup`,category:"System"},{label:"Project Info",description:"Environment and resource overview",href:`${o}/settings`,category:"System"}];let C=ae(()=>Object.keys(z().schema||{}).map(i=>({label:i,description:`Table: ${i}`,href:`${o}/database/tables/${i}`,category:"Tables"}))),w=ae(()=>[...m,...e(C)]),E=ae(()=>()=>{if(!e(d).trim())return e(w);const i=e(d).toLowerCase();return e(w).filter(M=>M.label.toLowerCase().includes(i)||M.description.toLowerCase().includes(i)||M.category.toLowerCase().includes(i))}),N=ae(()=>e(E)());oe(()=>{S()&&(j(d,""),j(c,0),requestAnimationFrame(()=>{var i;return(i=e(x))==null?void 0:i.focus()}))}),oe(()=>{e(d),j(c,0)});function R(i){i.key==="ArrowDown"?(i.preventDefault(),j(c,Math.min(e(c)+1,e(N).length-1),!0)):i.key==="ArrowUp"?(i.preventDefault(),j(c,Math.max(e(c)-1,0),!0)):i.key==="Enter"?(i.preventDefault(),e(N)[e(c)]&&P(e(N)[e(c)].href)):i.key==="Escape"&&S(!1)}function P(i){S(!1),Ve(i)}function _(){S(!1)}function T(i){i.stopPropagation()}var u=he(),g=re(u);{var l=i=>{var M=Zt(),b=s(M),y=v(b,2),A=s(y),I=v(s(A),2);Ne(I),Te(I,f=>j(x,f),()=>e(x)),Be(2),a(A);var p=v(A,2),D=s(p);{var U=f=>{var t=Pt();n(f,t)},V=f=>{var t=he(),r=re(t);ue(r,19,()=>e(N),B=>B.href,(B,W,Y)=>{var G=Ot();let J;var O=s(G),X=s(O,!0);a(O);var ve=v(O,2),pe=s(ve,!0);a(ve);var ke=v(ve,2),be=s(ke,!0);a(ke),a(G),q(()=>{J=se(G,1,"palette__item svelte-xhxto7",null,J,{"palette__item--selected":e(Y)===e(c)}),Z(X,e(W).label),Z(pe,e(W).description),Z(be,e(W).category)}),K("click",G,()=>P(e(W).href)),Me("mouseenter",G,()=>j(c,e(Y),!0)),n(B,G)}),n(f,t)};$(D,f=>{e(N).length===0?f(U):f(V,!1)})}a(p),a(y),a(M),K("click",b,_),K("click",y,T),K("keydown",y,R),K("keydown",I,R),Xe(I,()=>e(d),f=>j(d,f)),n(i,M)};$(g,i=>{S()&&i(l)})}n(k,u),le(),F()}ce(["click","keydown"]);var Ut=h('<button type="button" class="sidebar-overlay svelte-12qhfyh" aria-label="Close navigation menu"></button>'),Kt=h('<button class="mobile-menu-btn svelte-12qhfyh" aria-label="Toggle menu"><svg width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M3 5H17M3 10H17M3 15H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button>'),Wt=h('<div><!> <!> <div class="app-main svelte-12qhfyh"><!> <!> <main class="app-content svelte-12qhfyh"><!></main></div></div>'),Gt=h('<div class="app-loading svelte-12qhfyh"><span>Loading...</span></div>'),Qt=h("<!> <!> <!>",1);function mr(k,L){ne(L,!0);const z=()=>ie($e,"$page",F),H=()=>ie(_e,"$authStore",F),[F,S]=ge();let d=te(!1),c=te(!1),x=te(!1),m=te(!1);oe(()=>{ot()}),oe(()=>{if(typeof window>"u")return;const l=window.matchMedia("(max-width: 768px)"),i=M=>{j(c,M.matches,!0),M.matches&&j(d,!0)};return i(l),l.addEventListener("change",i),()=>l.removeEventListener("change",i)});function C(){e(c)&&j(d,!0)}let w=ae(()=>z().url.pathname===`${o}/login`||z().url.pathname===`${o}/login/`);oe(()=>{!e(w)&&H().accessToken&&!e(x)?E():H().accessToken||j(x,!0)});async function E(){try{if((await Oe()).needsSetup){_e.logout();return}}catch{}j(x,!0)}oe(()=>{if(!e(w)&&!H().accessToken){const l=Ze()?`${o}/login`:Re(z().url);Ve(l,{replaceState:!0})}}),oe(()=>{H().accessToken&&e(x)&&Ke()});var N=Qt();Me("keydown",He,l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),j(m,!e(m)))});var R=re(N);{var P=l=>{var i=he(),M=re(i);xe(M,()=>L.children),n(l,i)},_=l=>{var i=Wt();let M;var b=s(i);{var y=t=>{var r=Ut();K("click",r,C),n(t,r)};$(b,t=>{e(c)&&!e(d)&&t(y)})}var A=v(b,2);kt(A,{get collapsed(){return e(d)},set collapsed(t){j(d,t,!0)}});var I=v(A,2),p=s(I);{var D=t=>{var r=Kt();K("click",r,()=>j(d,!e(d))),n(t,r)};$(p,t=>{e(c)&&t(D)})}var U=v(p,2);Dt(U,{});var V=v(U,2),f=s(V);xe(f,()=>L.children),a(V),a(I),a(i),q(()=>M=se(i,1,"app-layout svelte-12qhfyh",null,M,{"app-layout--mobile":e(c)})),n(l,i)},T=l=>{var i=Gt();n(l,i)};$(R,l=>{e(w)?l(P):H().accessToken?l(_,1):l(T,!1)})}var u=v(R,2);Nt(u,{});var g=v(u,2);Rt(g,{get open(){return e(m)},set open(l){j(m,l,!0)}}),n(k,N),le(),S()}ce(["click"]);export{mr as component,br as universal};
@@ -1 +1 @@
1
- import"../chunks/CWj6FrbW.js";import{p as y,t as $,a as j,c as e,r,s as p,g as x,u as q}from"../chunks/BdTBlfLy.js";import{s as l}from"../chunks/DtZk82gG.js";import{a as B,f as k}from"../chunks/DEELgv7K.js";import{a as M}from"../chunks/CoI6jjbg.js";import{s as P,a as R}from"../chunks/Cp8V0Xy2.js";import{p as S}from"../chunks/CSGrwS7E.js";import{b as A}from"../chunks/D755Tqat.js";var D=k('<div class="error-page svelte-1j96wlh"><div class="error-card svelte-1j96wlh"><h1 class="error-code svelte-1j96wlh"> </h1> <p class="error-status svelte-1j96wlh"> </p> <p class="error-message svelte-1j96wlh"> </p> <a class="error-link svelte-1j96wlh">Back to Dashboard</a></div></div>');function H(u,c){y(c,!0);const s=()=>R(S,"$page",d),[d,g]=P(),n={400:"Bad Request",401:"Authentication required",403:"You don't have permission to access this page",404:"Page not found",408:"Request timed out",429:"Too many requests — please try again later",500:"Internal server error",502:"Bad gateway — the server may be restarting",503:"Service temporarily unavailable"},h=q(()=>{var m;return((m=s().error)==null?void 0:m.message)||n[s().status]||"Something went wrong. Please try reloading the page."});var a=D(),v=e(a),t=e(v),f=e(t,!0);r(t);var o=p(t,2),_=e(o,!0);r(o);var i=p(o,2),w=e(i,!0);r(i);var b=p(i,2);r(v),r(a),$(()=>{l(f,s().status),l(_,n[s().status]??"Error"),l(w,x(h)),M(b,"href",`${A??""}/`)}),B(u,a),j(),g()}export{H as component};
1
+ import"../chunks/CWj6FrbW.js";import{p as y,t as $,a as j,c as e,r,s as p,g as x,u as q}from"../chunks/BdTBlfLy.js";import{s as l}from"../chunks/DtZk82gG.js";import{a as B,f as k}from"../chunks/DEELgv7K.js";import{a as M}from"../chunks/CoI6jjbg.js";import{s as P,a as R}from"../chunks/Cp8V0Xy2.js";import{p as S}from"../chunks/kiJ6KthZ.js";import{b as A}from"../chunks/5PDcRlfX.js";var D=k('<div class="error-page svelte-1j96wlh"><div class="error-card svelte-1j96wlh"><h1 class="error-code svelte-1j96wlh"> </h1> <p class="error-status svelte-1j96wlh"> </p> <p class="error-message svelte-1j96wlh"> </p> <a class="error-link svelte-1j96wlh">Back to Dashboard</a></div></div>');function H(u,c){y(c,!0);const s=()=>R(S,"$page",d),[d,g]=P(),n={400:"Bad Request",401:"Authentication required",403:"You don't have permission to access this page",404:"Page not found",408:"Request timed out",429:"Too many requests — please try again later",500:"Internal server error",502:"Bad gateway — the server may be restarting",503:"Service temporarily unavailable"},h=q(()=>{var m;return((m=s().error)==null?void 0:m.message)||n[s().status]||"Something went wrong. Please try reloading the page."});var a=D(),v=e(a),t=e(v),f=e(t,!0);r(t);var o=p(t,2),_=e(o,!0);r(o);var i=p(o,2),w=e(i,!0);r(i);var b=p(i,2);r(v),r(a),$(()=>{l(f,s().status),l(_,n[s().status]??"Error"),l(w,x(h)),M(b,"href",`${A??""}/`)}),B(u,a),j(),g()}export{H as component};
@@ -1 +1 @@
1
- import"../chunks/CWj6FrbW.js";import{o as U}from"../chunks/Bn2NtlTj.js";import{p as B,a as j,f as z,c as h,g as t,s as m,r as g,u as o,b as y,d as D,t as G}from"../chunks/BdTBlfLy.js";import{d as J,s as K,a as N}from"../chunks/DtZk82gG.js";import{a as Q,t as V,e as W,i as X}from"../chunks/CqUxCvs_.js";import{a as T,f as k}from"../chunks/DEELgv7K.js";import{s as Y}from"../chunks/CoI6jjbg.js";import{g as Z}from"../chunks/R6arueIl.js";import{P as tt}from"../chunks/B8s_s9QY.js";import{a as et}from"../chunks/Q2nPFxS6.js";import{M as _,T as at}from"../chunks/k0CIJkw4.js";import{D as rt,T as ot}from"../chunks/DjOEv9M9.js";var st=k("<button> </button>"),lt=k('<div class="range-selector"></div>'),nt=k('<div class="analytics-grid"><!> <!> <!> <!></div> <div class="analytics-chart"><!></div> <div class="analytics-bottom"><!> <!></div>',1);function _t(R,q){B(q,!0);let s=D(!0),l=D(null),p=D("24h");const A=[{value:"1h",label:"1H"},{value:"6h",label:"6H"},{value:"24h",label:"24H"},{value:"7d",label:"7D"},{value:"30d",label:"30D"}];async function $(){try{const e=await Q.fetch(`data/analytics?range=${t(p)}&category=storage&metric=overview`);y(l,e,!0)}catch(e){V(e instanceof Error?e.message:"Failed to load storage analytics")}finally{y(s,!1)}}function I(e){y(p,e,!0),y(s,!0),$()}U(()=>{$();const e=setInterval(()=>void $(),3e4);return()=>clearInterval(e)});const M=o(()=>()=>{var d;if(!((d=t(l))!=null&&d.summary))return 0;const{totalRequests:e,totalErrors:a}=t(l).summary;return e>0?a/e*100:0}),S=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.timeSeries)||[]).map(a=>({timestamp:a.timestamp,value:a.requests??a.value??0}))}),H=o(()=>Z(t(p))),L=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.breakdown)||[]).map(a=>({label:a.label||"other",value:a.count}))}),C=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.topItems)||[]).map(a=>({label:a.label,count:a.count,secondary:`${Math.round(a.avgLatency)}ms · ${a.errorRate.toFixed(1)}% 5xx`}))});tt(R,{title:"Storage Analytics",description:"File upload, download, and bucket usage metrics",get docsHref(){return et},actions:a=>{var d=lt();W(d,21,()=>A,X,(f,c)=>{var n=st();let v;var b=h(n,!0);g(n),G(()=>{v=Y(n,1,"range-btn",null,v,{"range-btn--active":t(p)===t(c).value}),K(b,t(c).label)}),N("click",n,()=>I(t(c).value)),T(f,n)}),g(d),T(a,d)},children:(a,d)=>{var f=nt(),c=z(f),n=h(c);{let r=o(()=>{var i,u;return((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.totalRequests)??0});_(n,{label:"Storage Ops",get value(){return t(r)},get loading(){return t(s)}})}var v=m(n,2);{let r=o(()=>{var i,u;return((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.uniqueUsers)??0});_(v,{label:"Unique Users",get value(){return t(r)},get loading(){return t(s)}})}var b=m(v,2);{let r=o(()=>t(M)().toFixed(1));_(b,{label:"5xx Rate",get value(){return t(r)},unit:"%",get loading(){return t(s)}})}var E=m(b,2);{let r=o(()=>{var i,u;return Math.round(((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.avgLatency)??0)});_(E,{label:"Avg Latency",get value(){return t(r)},unit:"ms",get loading(){return t(s)}})}g(c);var x=m(c,2),O=h(x);{let r=o(()=>t(S)());at(O,{get data(){return t(r)},type:"line",height:240,label:"Storage operations over time",get formatTime(){return t(H)},get loading(){return t(s)},color:"#d97706"})}g(x);var w=m(x,2),F=h(w);{let r=o(()=>t(L)());rt(F,{get items(){return t(r)},title:"Operation Distribution (upload, download, list...)",get loading(){return t(s)}})}var P=m(F,2);{let r=o(()=>t(C)());ot(P,{get items(){return t(r)},title:"Top Buckets / Operations",get loading(){return t(s)}})}g(w),T(a,f)}}),j()}J(["click"]);export{_t as component};
1
+ import"../chunks/CWj6FrbW.js";import{o as U}from"../chunks/Bn2NtlTj.js";import{p as B,a as j,f as z,c as h,g as t,s as m,r as g,u as o,b as y,d as D,t as G}from"../chunks/BdTBlfLy.js";import{d as J,s as K,a as N}from"../chunks/DtZk82gG.js";import{a as Q,t as V,e as W,i as X}from"../chunks/g3ZZdY-r.js";import{a as T,f as k}from"../chunks/DEELgv7K.js";import{s as Y}from"../chunks/CoI6jjbg.js";import{g as Z}from"../chunks/R6arueIl.js";import{P as tt}from"../chunks/B8s_s9QY.js";import{a as et}from"../chunks/Q2nPFxS6.js";import{M as _,T as at}from"../chunks/C85dMlzL.js";import{D as rt,T as ot}from"../chunks/BWyDPAjM.js";var st=k("<button> </button>"),lt=k('<div class="range-selector"></div>'),nt=k('<div class="analytics-grid"><!> <!> <!> <!></div> <div class="analytics-chart"><!></div> <div class="analytics-bottom"><!> <!></div>',1);function _t(R,q){B(q,!0);let s=D(!0),l=D(null),p=D("24h");const A=[{value:"1h",label:"1H"},{value:"6h",label:"6H"},{value:"24h",label:"24H"},{value:"7d",label:"7D"},{value:"30d",label:"30D"}];async function $(){try{const e=await Q.fetch(`data/analytics?range=${t(p)}&category=storage&metric=overview`);y(l,e,!0)}catch(e){V(e instanceof Error?e.message:"Failed to load storage analytics")}finally{y(s,!1)}}function I(e){y(p,e,!0),y(s,!0),$()}U(()=>{$();const e=setInterval(()=>void $(),3e4);return()=>clearInterval(e)});const M=o(()=>()=>{var d;if(!((d=t(l))!=null&&d.summary))return 0;const{totalRequests:e,totalErrors:a}=t(l).summary;return e>0?a/e*100:0}),S=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.timeSeries)||[]).map(a=>({timestamp:a.timestamp,value:a.requests??a.value??0}))}),H=o(()=>Z(t(p))),L=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.breakdown)||[]).map(a=>({label:a.label||"other",value:a.count}))}),C=o(()=>()=>{var e;return(((e=t(l))==null?void 0:e.topItems)||[]).map(a=>({label:a.label,count:a.count,secondary:`${Math.round(a.avgLatency)}ms · ${a.errorRate.toFixed(1)}% 5xx`}))});tt(R,{title:"Storage Analytics",description:"File upload, download, and bucket usage metrics",get docsHref(){return et},actions:a=>{var d=lt();W(d,21,()=>A,X,(f,c)=>{var n=st();let v;var b=h(n,!0);g(n),G(()=>{v=Y(n,1,"range-btn",null,v,{"range-btn--active":t(p)===t(c).value}),K(b,t(c).label)}),N("click",n,()=>I(t(c).value)),T(f,n)}),g(d),T(a,d)},children:(a,d)=>{var f=nt(),c=z(f),n=h(c);{let r=o(()=>{var i,u;return((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.totalRequests)??0});_(n,{label:"Storage Ops",get value(){return t(r)},get loading(){return t(s)}})}var v=m(n,2);{let r=o(()=>{var i,u;return((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.uniqueUsers)??0});_(v,{label:"Unique Users",get value(){return t(r)},get loading(){return t(s)}})}var b=m(v,2);{let r=o(()=>t(M)().toFixed(1));_(b,{label:"5xx Rate",get value(){return t(r)},unit:"%",get loading(){return t(s)}})}var E=m(b,2);{let r=o(()=>{var i,u;return Math.round(((u=(i=t(l))==null?void 0:i.summary)==null?void 0:u.avgLatency)??0)});_(E,{label:"Avg Latency",get value(){return t(r)},unit:"ms",get loading(){return t(s)}})}g(c);var x=m(c,2),O=h(x);{let r=o(()=>t(S)());at(O,{get data(){return t(r)},type:"line",height:240,label:"Storage operations over time",get formatTime(){return t(H)},get loading(){return t(s)},color:"#d97706"})}g(x);var w=m(x,2),F=h(w);{let r=o(()=>t(L)());rt(F,{get items(){return t(r)},title:"Operation Distribution (upload, download, list...)",get loading(){return t(s)}})}var P=m(F,2);{let r=o(()=>t(C)());ot(P,{get items(){return t(r)},title:"Top Buckets / Operations",get loading(){return t(s)}})}g(w),T(a,f)}}),j()}J(["click"]);export{_t as component};