@lensjs/core 1.0.8 → 1.0.10
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.
- package/dist/abstracts/adapter.cjs +70 -5
- package/dist/abstracts/adapter.js +37 -5
- package/dist/abstracts/store.cjs +26 -6
- package/dist/abstracts/store.js +3 -4
- package/dist/context/container.cjs +57 -6
- package/dist/context/container.js +34 -4
- package/dist/context/context.cjs +71 -7
- package/dist/context/context.js +42 -6
- package/dist/core/api_controller.cjs +148 -7
- package/dist/core/api_controller.js +121 -7
- package/dist/core/lens.cjs +404 -12
- package/dist/core/lens.js +370 -12
- package/dist/core/watcher.cjs +26 -6
- package/dist/core/watcher.js +3 -4
- package/dist/index.cjs +611 -51
- package/dist/index.js +556 -38
- package/dist/stores/better_sqlite.cjs +149 -6
- package/dist/stores/better_sqlite.js +116 -6
- package/dist/stores/index.cjs +153 -7
- package/dist/stores/index.js +116 -7
- package/dist/types/index.cjs +33 -6
- package/dist/types/index.js +6 -4
- package/dist/ui/assets/QueriesContainer-CAAsjjW5.js +2 -0
- package/dist/ui/assets/{QueryDetailsContainer-CtNxjUvF.js → QueryDetailsContainer-E7P-IO7f.js} +3 -3
- package/dist/ui/assets/{QueryTable-B6L0F5jL.js → QueryTable-BcrtUssT.js} +1 -1
- package/dist/ui/assets/{RequestDetails-BfxFQmp1.js → RequestDetails-C2DZBu5H.js} +1 -1
- package/dist/ui/assets/{RequestDetailsContainer-C0s7VLpw.js → RequestDetailsContainer-DuDo-IqS.js} +2 -2
- package/dist/ui/assets/{RequestsContainer-rWbSc4Py.js → RequestsContainer-DK3hQVz9.js} +2 -2
- package/dist/ui/assets/{RequetsTable-D2qBWqFN.js → RequetsTable-DgP8p60b.js} +1 -1
- package/dist/ui/assets/{StatusCode-BZGwjlgz.js → StatusCode-FQEjz7gK.js} +1 -1
- package/dist/ui/assets/{TabbedDataViewer-CmztxF70.js → TabbedDataViewer-cBDdPwIz.js} +1 -1
- package/dist/ui/assets/{Table-DF4sxTNg.js → Table-DYaXk80S.js} +2 -2
- package/dist/ui/assets/{index-Dzy6B_ZD.js → index-BS8XxorB.js} +11 -11
- package/dist/ui/assets/{index-byVaIWe8.js → index-CpP2Ap5X.js} +1 -1
- package/dist/ui/assets/{useLensApi-CkgX8mtY.js → useLensApi-DG6atd6d.js} +1 -1
- package/dist/ui/assets/{useLoadMore-BRca6vvh.js → useLoadMore-CJltToLI.js} +1 -1
- package/dist/ui/assets/{useQueries-CVt1cLYV.js → useQueries-C8mDDDc6.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/dist/utils/event_emitter.cjs +42 -6
- package/dist/utils/event_emitter.js +5 -4
- package/dist/utils/index.cjs +163 -23
- package/dist/utils/index.js +109 -12
- package/dist/watchers/index.cjs +105 -10
- package/dist/watchers/index.js +79 -12
- package/dist/watchers/query_watcher.cjs +78 -8
- package/dist/watchers/query_watcher.js +55 -8
- package/dist/watchers/request_watcher.cjs +90 -8
- package/dist/watchers/request_watcher.js +67 -8
- package/package.json +3 -3
- package/dist/chunk-2HRVJRKV.cjs +0 -10
- package/dist/chunk-45JBO7ME.cjs +0 -120
- package/dist/chunk-4HLDYZJA.js +0 -34
- package/dist/chunk-66RDYK2I.js +0 -9
- package/dist/chunk-75ZPJI57.cjs +0 -9
- package/dist/chunk-7EKM5HB5.cjs +0 -1
- package/dist/chunk-7FBZAVQ3.cjs +0 -138
- package/dist/chunk-7MOTQS6N.cjs +0 -32
- package/dist/chunk-BL4Z6JFH.cjs +0 -34
- package/dist/chunk-CGPET47D.cjs +0 -129
- package/dist/chunk-CQ2Z4TCR.js +0 -7
- package/dist/chunk-EHOWCXZV.cjs +0 -7
- package/dist/chunk-EKG3FVLV.cjs +0 -7
- package/dist/chunk-FKMBNWX4.js +0 -7
- package/dist/chunk-FLOVBBFU.js +0 -10
- package/dist/chunk-GI7SJDNQ.cjs +0 -38
- package/dist/chunk-HLBMQ3ID.js +0 -120
- package/dist/chunk-HMBQ2DF7.js +0 -129
- package/dist/chunk-JTRKNE5Q.js +0 -32
- package/dist/chunk-JZ2JLQXL.cjs +0 -87
- package/dist/chunk-MLKGABMK.js +0 -9
- package/dist/chunk-NUSVID2Q.cjs +0 -9
- package/dist/chunk-QRZUNYF6.cjs +0 -16
- package/dist/chunk-SJXZARBJ.cjs +0 -22
- package/dist/chunk-TJDE6AZM.js +0 -87
- package/dist/chunk-UF5HFNMI.js +0 -22
- package/dist/chunk-VD5IMUWL.js +0 -0
- package/dist/chunk-XXYRWHSQ.js +0 -0
- package/dist/chunk-XYXPHWEI.js +0 -16
- package/dist/chunk-XZFXXD3A.cjs +0 -1
- package/dist/chunk-YC6T4XWI.js +0 -38
- package/dist/chunk-YXSPADWE.js +0 -138
- package/dist/ui/assets/QueriesContainer-DhnU1ndx.js +0 -2
package/dist/ui/assets/{RequestDetailsContainer-C0s7VLpw.js → RequestDetailsContainer-DuDo-IqS.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetails-
|
|
2
|
-
import{S as V,p as k,a as l,s as w,b as y,n as x,i as I,c as L,t as W,f as $,d as K,e as j,g as H,r as p,h as N,u as J,k as G,l as X,m as Y,j as T,_ as Z}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetails-C2DZBu5H.js","./index-BS8XxorB.js","./index-DzNHqeKh.css","./TabbedDataViewer-cBDdPwIz.js","./index-CpP2Ap5X.js","./StatusCode-FQEjz7gK.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{S as V,p as k,a as l,s as w,b as y,n as x,i as I,c as L,t as W,f as $,d as K,e as j,g as H,r as p,h as N,u as J,k as G,l as X,m as Y,j as T,_ as Z}from"./index-BS8XxorB.js";var tt=class extends V{constructor(t,e){super(),this.options=e,this.#s=t,this.#r=null,this.#i=k(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#p=void 0;#e=void 0;#n;#c;#i;#r;#R;#l;#d;#o;#h;#a;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),A(this.#t,this.options)?this.#u():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Q(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Q(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#C(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof l(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!w(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&B(this.#t,s,this.options,e)&&this.#u(),this.updateResult(),i&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(e.staleTime,this.#t))&&this.#b();const a=this.#v();i&&(this.#t!==s||l(this.options.enabled,this.#t)!==l(e.enabled,this.#t)||a!==this.#a)&&this.#m(a)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return st(this,s)&&(this.#e=s,this.#c=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(s,i))})}trackProp(t){this.#f.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#u({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#u(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(x)),e}#b(){this.#g();const t=y(this.options.staleTime,this.#t);if(I||this.#e.isStale||!L(t))return;const s=W(this.#e.dataUpdatedAt,t)+1;this.#o=setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#m(t){this.#C(),this.#a=t,!(I||l(this.options.enabled,this.#t)===!1||!L(this.#a)||this.#a===0)&&(this.#h=setInterval(()=>{(this.options.refetchIntervalInBackground||$.isFocused())&&this.#u()},this.#a))}#y(){this.#b(),this.#m(this.#v())}#g(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}#C(){this.#h&&(clearInterval(this.#h),this.#h=void 0)}createResult(t,e){const s=this.#t,i=this.options,a=this.#e,u=this.#n,r=this.#c,o=t!==s?t.state:this.#p,{state:d}=t;let n={...d},m=!1,h;if(e._optimisticResults){const c=this.hasListeners(),g=!c&&A(t,e),v=c&&B(t,s,e,i);(g||v)&&(n={...n,...K(d.data,t.options)}),e._optimisticResults==="isRestoring"&&(n.fetchStatus="idle")}let{error:_,errorUpdatedAt:P,status:R}=n;h=n.data;let D=!1;if(e.placeholderData!==void 0&&h===void 0&&R==="pending"){let c;a?.isPlaceholderData&&e.placeholderData===r?.placeholderData?(c=a.data,D=!0):c=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,c!==void 0&&(R="success",h=j(a?.data,c,e),m=!0)}if(e.select&&h!==void 0&&!D)if(a&&h===u?.data&&e.select===this.#R)h=this.#l;else try{this.#R=e.select,h=e.select(h),h=j(a?.data,h,e),this.#l=h,this.#r=null}catch(c){this.#r=c}this.#r&&(_=this.#r,h=this.#l,P=Date.now(),R="error");const O=n.fetchStatus==="fetching",S=R==="pending",E=R==="error",U=S&&O,M=h!==void 0,f={status:R,fetchStatus:n.fetchStatus,isPending:S,isSuccess:R==="success",isError:E,isInitialLoading:U,isLoading:U,data:h,dataUpdatedAt:n.dataUpdatedAt,error:_,errorUpdatedAt:P,failureCount:n.fetchFailureCount,failureReason:n.fetchFailureReason,errorUpdateCount:n.errorUpdateCount,isFetched:n.dataUpdateCount>0||n.errorUpdateCount>0,isFetchedAfterMount:n.dataUpdateCount>o.dataUpdateCount||n.errorUpdateCount>o.errorUpdateCount,isFetching:O,isRefetching:O&&!S,isLoadingError:E&&!M,isPaused:n.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&M,isStale:F(t,e),refetch:this.refetch,promise:this.#i,isEnabled:l(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const c=C=>{f.status==="error"?C.reject(f.error):f.data!==void 0&&C.resolve(f.data)},g=()=>{const C=this.#i=f.promise=k();c(C)},v=this.#i;switch(v.status){case"pending":t.queryHash===s.queryHash&&c(v);break;case"fulfilled":(f.status==="error"||f.data!==v.value)&&g();break;case"rejected":(f.status!=="error"||f.error!==v.reason)&&g();break}}return f}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#c=this.options,this.#n.data!==void 0&&(this.#d=this.#t),w(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!this.#f.size)return!0;const u=new Set(a??this.#f);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(r=>{const b=r;return this.#e[b]!==t[b]&&u.has(b)})};this.#S({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#p=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(t){H.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function et(t,e){return l(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function A(t,e){return et(t,e)||t.state.data!==void 0&&Q(t,e,e.refetchOnMount)}function Q(t,e,s){if(l(e.enabled,t)!==!1&&y(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&F(t,e)}return!1}function B(t,e,s,i){return(t!==e||l(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&F(t,s)}function F(t,e){return l(e.enabled,t)!==!1&&t.isStaleByTime(y(e.staleTime,t))}function st(t,e){return!w(t.getCurrentResult(),e)}var z=p.createContext(!1),it=()=>p.useContext(z);z.Provider;function rt(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var at=p.createContext(rt()),nt=()=>p.useContext(at),ot=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},ht=t=>{p.useEffect(()=>{t.clearReset()},[t])},ut=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:a})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(a&&t.data===void 0||N(s,[t.error,i])),ct=t=>{if(t.suspense){const e=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>e(s(...i)):e(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},lt=(t,e)=>t.isLoading&&t.isFetching&&!e,dt=(t,e)=>t?.suspense&&e.isPending,q=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function ft(t,e,s){const i=it(),a=nt(),u=J(),r=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(r),r._optimisticResults=i?"isRestoring":"optimistic",ct(r),ot(r,a),ht(a);const b=!u.getQueryCache().get(r.queryHash),[o]=p.useState(()=>new e(u,r)),d=o.getOptimisticResult(r),n=!i&&t.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(m=>{const h=n?o.subscribe(H.batchCalls(m)):x;return o.updateResult(),h},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),p.useEffect(()=>{o.setOptions(r)},[r,o]),dt(r,d))throw q(r,o,a);if(ut({result:d,errorResetBoundary:a,throwOnError:r.throwOnError,query:u.getQueryCache().get(r.queryHash),suspense:r.suspense}))throw d.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(r,d),r.experimental_prefetchInRender&&!I&<(d,i)&&(b?q(r,o,a):u.getQueryCache().get(r.queryHash)?.promise)?.catch(x).finally(()=>{o.updateResult()}),r.notifyOnChangeProps?d:o.trackResult(d)}function pt(t,e){return ft(t,tt)}async function Rt(t,e){const s=await fetch(t,{headers:{"Content-Type":"application/json"},...e});if(!s.ok)throw new Error(`Failed to fetch: ${t}`);return s.json()}function bt(t,e){const s=G();return pt({queryKey:["request",t],queryFn:async()=>await Rt(X(`${s.api.requests}/${t}`)),enabled:!!t,...e})}const vt=p.lazy(()=>Z(()=>import("./RequestDetails-C2DZBu5H.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),gt=()=>{const{id:t}=Y(),{data:e}=bt(t);return T.jsx(T.Fragment,{children:e?.data&&T.jsx(vt,{request:e?.data})})};export{gt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequetsTable-
|
|
2
|
-
import{r as e,j as m,_ as p}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequetsTable-DgP8p60b.js","./index-BS8XxorB.js","./index-DzNHqeKh.css","./Table-DYaXk80S.js","./StatusCode-FQEjz7gK.js","./index-CpP2Ap5X.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,j as m,_ as p}from"./index-BS8XxorB.js";import{D as _,u as h}from"./useLensApi-DG6atd6d.js";import{u as y}from"./useLoadMore-CJltToLI.js";const E={created_at:"",data:{body:{},createdAt:"",duration:"",headers:{},id:"",ip:"",method:"GET",path:"",response:{headers:{},json:{}},status:0,user:null},id:"",lens_entry_id:null,type:"request"};function M(){const[t,u]=e.useState([]),[n,i]=e.useState(E),[l,s]=e.useState(!1),[c,f]=e.useState(_),{getAllRequests:a,getRequestById:d}=h(),q=e.useCallback(async r=>{s(!0),d(r).then(o=>{i(o.data)}).finally(()=>{s(!1)})},[d]),R=e.useCallback(async r=>{s(!0),a(r).then(o=>{u(o.data),f(o.meta)}).finally(()=>{s(!1)})},[a]);return{loadMoreRequests:e.useMemo(()=>({initialData:t,meta:c,loading:l,fetchRawPage:a}),[t,c,l,a]),fetchRequests:R,fetchRequest:q,request:n}}const g=e.lazy(()=>p(()=>import("./RequetsTable-DgP8p60b.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),L=()=>{const{loadMoreRequests:t,fetchRequests:u}=M(),n=y({paginatedPage:t});return e.useEffect(()=>{u()},[]),m.jsx(g,{hasMoreObject:n})};export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as o,k as d,j as e,L as s}from"./index-
|
|
1
|
+
import{q as o,k as d,j as e,L as s}from"./index-BS8XxorB.js";import{C as i,T as m,L as l}from"./Table-DYaXk80S.js";import{M as u,S as x}from"./StatusCode-FQEjz7gK.js";import{h as c}from"./index-CpP2Ap5X.js";const h=()=>{const a=o(d());return[{name:"Method",render:t=>e.jsx(u,{method:t.data.method})},{name:"Path",render:t=>e.jsx(s,{to:`${a.REQUESTS}/${t.id}`,className:"line-clamp-2 max-w-80 min-w-40 text-base text-blue-600 dark:text-neutral-200 hover:underline",children:t.data.path})},{name:"Status",render:t=>e.jsx(x,{status:t.data.status})},{name:"Duration",value:t=>t.data.duration},{name:"Happened",render:t=>{const{label:n,exact:r}=c(t.data.createdAt);return e.jsx("span",{title:r,children:n})},position:"end",class:"min-w-32"},{name:"Actions",render:t=>e.jsx(s,{to:`${a.REQUESTS}/${t.id}`,className:"transition-colors duration-100 hover:text-white",children:e.jsx(i,{size:20})}),position:"end"}]},S=({hasMoreObject:a})=>e.jsxs("div",{children:[e.jsx(m,{columns:h(),data:a.data}),e.jsx(l,{paginatedPage:a})]});export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./index-
|
|
1
|
+
import{j as r}from"./index-BS8XxorB.js";function g({method:e}){const t={GET:"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white",POST:"bg-blue-100 text-blue-800 dark:bg-blue-600 dark:text-white",PUT:"bg-yellow-100 text-yellow-800 dark:bg-yellow-600 dark:text-white",DELETE:"bg-red-100 text-red-800 dark:bg-red-600 dark:text-white"};return r.jsx("span",{className:`rounded px-2 py-1 text-sm font-semibold ${t[e.toUpperCase()]||"bg-gray-100 text-gray-800 dark:bg-gray-600 dark:text-white"}`,children:e})}const d=e=>e>=200&&e<300?"bg-green-100 text-green-800 dark:bg-green-700 dark:text-green-100":e>=300&&e<400?"bg-blue-100 text-blue-800 dark:bg-blue-700 dark:text-blue-100":e>=400&&e<500?"bg-yellow-100 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-100":e>=500?"bg-red-100 text-red-800 dark:bg-red-700 dark:text-red-100":"bg-gray-100 text-gray-800 dark:bg-neutral-700 dark:text-neutral-200",l=({status:e})=>r.jsx("span",{className:`rounded-lg px-2 py-1 text-sm font-semibold ${d(e)}`,children:e});export{g as M,l as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,r as b}from"./index-
|
|
1
|
+
import{j as e,r as b}from"./index-BS8XxorB.js";const f=({title:l,items:d,emptyMessage:c="No data available"})=>!d||d.length===0||d.every(s=>!s.value)?e.jsxs("div",{className:"bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-sm p-6",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l})," ",e.jsx("p",{className:"text-center text-gray-500 dark:text-gray-400",children:c})]}):e.jsxs("div",{className:"bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 rounded-lg shadow-sm",children:[e.jsx("div",{className:"px-6 py-4 border-b border-gray-200 dark:border-neutral-700 bg-gray-50 dark:bg-neutral-900",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:l})}),e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"space-y-4",children:d.map((s,i)=>e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-2",children:[e.jsx("div",{className:"w-full sm:w-32 flex-shrink-0",children:e.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:s.label})}),e.jsx("div",{className:"flex-1",children:typeof s.value=="string"?e.jsx("span",{className:`text-sm ${s.className||""}`,children:s.value}):s.value})]},i))})})]});function t(l="key"){return l+"-"+Math.random().toString(36).substr(2,9)}const j=({data:l})=>{const[d,c]=b.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(l,null,2)),c(!0),setTimeout(()=>c(!1),2e3)}catch(n){console.error("Failed to copy: ",n)}},i=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),e.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]}),a=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M20 6 9 17l-5-5"})}),h=(n,p=0)=>{const r=[],x=" ".repeat(p);if(Array.isArray(n))r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:"["},t("open-bracket"))),n.forEach((u,m)=>{r.push(e.jsx("br",{},t("br"))),r.push(e.jsxs("span",{className:"text-transparent",children:[x," "]},t("indent"))),r.push(...h(u,p+1)),m<n.length-1&&r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:","},t("comma")))}),r.push(e.jsx("br",{},t("br-close"))),r.push(e.jsx("span",{className:"text-transparent",children:x},t("indent-close"))),r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:"]"},t("close-bracket")));else if(typeof n=="object"&&n!==null){r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:"{"},t("open-brace")));const u=Object.entries(n);u.forEach(([m,o],k)=>{r.push(e.jsx("br",{},t("br"))),r.push(e.jsxs("span",{className:"text-transparent",children:[x," "]},t("indent"))),r.push(e.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:['"',m,'"']},t("key"))),r.push(e.jsxs("span",{className:"text-neutral-600 dark:text-neutral-400",children:[":"," "]},t("colon"))),typeof o=="string"?r.push(e.jsxs("span",{className:"text-green-600 dark:text-green-400",children:['"',o,'"']},t("value-string"))):typeof o=="number"?r.push(e.jsx("span",{className:"text-orange-600 dark:text-orange-400",children:o},t("value-number"))):typeof o=="boolean"?r.push(e.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:o.toString()},t("value-boolean"))):o===null?r.push(e.jsx("span",{className:"text-neutral-500 dark:text-neutral-400",children:"null"},t("value-null"))):r.push(...h(o,p+1)),k<u.length-1&&r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:","},t("comma")))}),r.push(e.jsx("br",{},t("br-close"))),r.push(e.jsx("span",{className:"text-transparent",children:x},t("indent-close"))),r.push(e.jsx("span",{className:"text-neutral-600 dark:text-neutral-400",children:"}"},t("close-brace")))}return r};function g(n){return typeof n=="string"?e.jsx("span",{className:"text-green-600 dark:text-green-400",children:n}):h(n)}return e.jsxs("div",{className:"bg-neutral-50 dark:bg-slate-900 rounded-lg p-4 font-mono text-sm overflow-x-auto relative",children:[e.jsx("button",{onClick:s,className:`absolute top-3 right-3 p-2 rounded-md transition-colors ${d?"bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400":"bg-white text-neutral-500 hover:text-neutral-700 hover:bg-neutral-100 dark:bg-slate-800 dark:text-neutral-400 dark:hover:text-neutral-300 dark:hover:bg-slate-700"}`,title:d?"Copied!":"Copy to clipboard",children:d?e.jsx(a,{}):e.jsx(i,{})}),e.jsx("pre",{className:"whitespace-pre-wrap pr-12 text-neutral-800 dark:text-neutral-200 min-h-10",children:g(l)})]})},y=({tabs:l,title:d,defaultActiveTab:c})=>{const[s,i]=b.useState(c||l[0]?.id||"");return e.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-[15px] shadow-sm",children:[d&&e.jsx("div",{className:"px-6 py-4 rounded-t-[15px] border-b border-neutral-200 dark:border-neutral-700 bg-neutral-50 dark:bg-neutral-900",children:e.jsx("h2",{className:"text-lg font-semibold text-neutral-900 dark:text-neutral-100",children:d})}),e.jsx("div",{className:"border-b rounded-[15px] border-neutral-200 dark:border-neutral-700",children:e.jsx("nav",{className:"flex space-x-8 px-6","aria-label":"Tabs",children:l.map(a=>e.jsx("button",{onClick:()=>i(a.id),className:`py-4 px-1 border-b-2 font-medium text-sm transition-colors duration-200 ${s===a.id?"border-blue-500 text-blue-600 dark:text-blue-400":"border-transparent text-neutral-500 dark:text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-300 hover:border-neutral-300 dark:hover:border-neutral-600"}`,children:a.label},a.id))})}),e.jsx("div",{className:"p-6 ",children:l.map(a=>e.jsx("div",{className:s===a.id?"block":"hidden",children:a.content?e.jsx("div",{children:a.content}):e.jsx(e.Fragment,{children:a.data&&e.jsx(j,{data:a.data})})},a.id))})]})};export{f as D,y as T};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{o as Ie,j as y}from"./index-
|
|
2
|
-
* @license lucide-react v0.
|
|
1
|
+
import{o as Ie,j as y}from"./index-BS8XxorB.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestsContainer-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestsContainer-DK3hQVz9.js","./useLensApi-DG6atd6d.js","./useLoadMore-CJltToLI.js","./QueriesContainer-CAAsjjW5.js","./useQueries-C8mDDDc6.js","./QueryDetailsContainer-E7P-IO7f.js","./TabbedDataViewer-cBDdPwIz.js","./index-CpP2Ap5X.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))s(h);new MutationObserver(h=>{for(const y of h)if(y.type==="childList")for(const E of y.addedNodes)E.tagName==="LINK"&&E.rel==="modulepreload"&&s(E)}).observe(document,{childList:!0,subtree:!0});function r(h){const y={};return h.integrity&&(y.integrity=h.integrity),h.referrerPolicy&&(y.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?y.credentials="include":h.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function s(h){if(h.ep)return;h.ep=!0;const y=r(h);fetch(h.href,y)}})();var Df={exports:{}},xn={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.js
|
|
@@ -59,47 +59,47 @@ Error generating stack: `+l.message+`
|
|
|
59
59
|
*/var ud="popstate";function Lv(u={}){function c(s,h){let{pathname:y,search:E,hash:p}=s.location;return Bf("",{pathname:y,search:E,hash:p},h.state&&h.state.usr||null,h.state&&h.state.key||"default")}function r(s,h){return typeof h=="string"?h:Nn(h)}return Xv(c,r,null,u)}function _t(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function Me(u,c){if(!u){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Gv(){return Math.random().toString(36).substring(2,10)}function id(u,c){return{usr:u.state,key:u.key,idx:c}}function Bf(u,c,r=null,s){return{pathname:typeof u=="string"?u:u.pathname,search:"",hash:"",...typeof c=="string"?qn(c):c,state:r,key:c&&c.key||s||Gv()}}function Nn({pathname:u="/",search:c="",hash:r=""}){return c&&c!=="?"&&(u+=c.charAt(0)==="?"?c:"?"+c),r&&r!=="#"&&(u+=r.charAt(0)==="#"?r:"#"+r),u}function qn(u){let c={};if(u){let r=u.indexOf("#");r>=0&&(c.hash=u.substring(r),u=u.substring(0,r));let s=u.indexOf("?");s>=0&&(c.search=u.substring(s),u=u.substring(0,s)),u&&(c.pathname=u)}return c}function Xv(u,c,r,s={}){let{window:h=document.defaultView,v5Compat:y=!1}=s,E=h.history,p="POP",b=null,m=T();m==null&&(m=0,E.replaceState({...E.state,idx:m},""));function T(){return(E.state||{idx:null}).idx}function C(){p="POP";let j=T(),V=j==null?null:j-m;m=j,b&&b({action:p,location:B.location,delta:V})}function q(j,V){p="PUSH";let G=Bf(B.location,j,V);m=T()+1;let F=id(G,m),ht=B.createHref(G);try{E.pushState(F,"",ht)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;h.location.assign(ht)}y&&b&&b({action:p,location:B.location,delta:1})}function Z(j,V){p="REPLACE";let G=Bf(B.location,j,V);m=T();let F=id(G,m),ht=B.createHref(G);E.replaceState(F,"",ht),y&&b&&b({action:p,location:B.location,delta:0})}function H(j){return Zv(j)}let B={get action(){return p},get location(){return u(h,E)},listen(j){if(b)throw new Error("A history only accepts one active listener");return h.addEventListener(ud,C),b=j,()=>{h.removeEventListener(ud,C),b=null}},createHref(j){return c(h,j)},createURL:H,encodeLocation(j){let V=H(j);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:q,replace:Z,go(j){return E.go(j)}};return B}function Zv(u,c=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),_t(r,"No window.location.(origin|href) available to create URL");let s=typeof u=="string"?u:Nn(u);return s=s.replace(/ $/,"%20"),!c&&s.startsWith("//")&&(s=r+s),new URL(s,r)}function Td(u,c,r="/"){return Vv(u,c,r,!1)}function Vv(u,c,r,s){let h=typeof c=="string"?qn(c):c,y=We(h.pathname||"/",r);if(y==null)return null;let E=Ad(u);Kv(E);let p=null;for(let b=0;p==null&&b<E.length;++b){let m=a0(y);p=e0(E[b],m,s)}return p}function Ad(u,c=[],r=[],s="",h=!1){let y=(E,p,b=h,m)=>{let T={relativePath:m===void 0?E.path||"":m,caseSensitive:E.caseSensitive===!0,childrenIndex:p,route:E};if(T.relativePath.startsWith("/")){if(!T.relativePath.startsWith(s)&&b)return;_t(T.relativePath.startsWith(s),`Absolute route path "${T.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),T.relativePath=T.relativePath.slice(s.length)}let C=Fe([s,T.relativePath]),q=r.concat(T);E.children&&E.children.length>0&&(_t(E.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${C}".`),Ad(E.children,c,q,C,b)),!(E.path==null&&!E.index)&&c.push({path:C,score:Iv(C,E.index),routesMeta:q})};return u.forEach((E,p)=>{if(E.path===""||!E.path?.includes("?"))y(E,p);else for(let b of Od(E.path))y(E,p,!0,b)}),c}function Od(u){let c=u.split("/");if(c.length===0)return[];let[r,...s]=c,h=r.endsWith("?"),y=r.replace(/\?$/,"");if(s.length===0)return h?[y,""]:[y];let E=Od(s.join("/")),p=[];return p.push(...E.map(b=>b===""?y:[y,b].join("/"))),h&&p.push(...E),p.map(b=>u.startsWith("/")&&b===""?"/":b)}function Kv(u){u.sort((c,r)=>c.score!==r.score?r.score-c.score:t0(c.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}var Jv=/^:[\w-]+$/,kv=3,$v=2,Fv=1,Wv=10,Pv=-2,cd=u=>u==="*";function Iv(u,c){let r=u.split("/"),s=r.length;return r.some(cd)&&(s+=Pv),c&&(s+=$v),r.filter(h=>!cd(h)).reduce((h,y)=>h+(Jv.test(y)?kv:y===""?Fv:Wv),s)}function t0(u,c){return u.length===c.length&&u.slice(0,-1).every((s,h)=>s===c[h])?u[u.length-1]-c[c.length-1]:0}function e0(u,c,r=!1){let{routesMeta:s}=u,h={},y="/",E=[];for(let p=0;p<s.length;++p){let b=s[p],m=p===s.length-1,T=y==="/"?c:c.slice(y.length)||"/",C=ai({path:b.relativePath,caseSensitive:b.caseSensitive,end:m},T),q=b.route;if(!C&&m&&r&&!s[s.length-1].route.index&&(C=ai({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},T)),!C)return null;Object.assign(h,C.params),E.push({params:h,pathname:Fe([y,C.pathname]),pathnameBase:c0(Fe([y,C.pathnameBase])),route:q}),C.pathnameBase!=="/"&&(y=Fe([y,C.pathnameBase]))}return E}function ai(u,c){typeof u=="string"&&(u={path:u,caseSensitive:!1,end:!0});let[r,s]=l0(u.path,u.caseSensitive,u.end),h=c.match(r);if(!h)return null;let y=h[0],E=y.replace(/(.)\/+$/,"$1"),p=h.slice(1);return{params:s.reduce((m,{paramName:T,isOptional:C},q)=>{if(T==="*"){let H=p[q]||"";E=y.slice(0,y.length-H.length).replace(/(.)\/+$/,"$1")}const Z=p[q];return C&&!Z?m[T]=void 0:m[T]=(Z||"").replace(/%2F/g,"/"),m},{}),pathname:y,pathnameBase:E,pattern:u}}function l0(u,c=!1,r=!0){Me(u==="*"||!u.endsWith("*")||u.endsWith("/*"),`Route path "${u}" will be treated as if it were "${u.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${u.replace(/\*$/,"/*")}".`);let s=[],h="^"+u.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(E,p,b)=>(s.push({paramName:p,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return u.endsWith("*")?(s.push({paramName:"*"}),h+=u==="*"||u==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?h+="\\/*$":u!==""&&u!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,c?void 0:"i"),s]}function a0(u){try{return u.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Me(!1,`The URL path "${u}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),u}}function We(u,c){if(c==="/")return u;if(!u.toLowerCase().startsWith(c.toLowerCase()))return null;let r=c.endsWith("/")?c.length-1:c.length,s=u.charAt(r);return s&&s!=="/"?null:u.slice(r)||"/"}function n0(u,c="/"){let{pathname:r,search:s="",hash:h=""}=typeof u=="string"?qn(u):u;return{pathname:r?r.startsWith("/")?r:u0(r,c):c,search:f0(s),hash:r0(h)}}function u0(u,c){let r=c.replace(/\/+$/,"").split("/");return u.split("/").forEach(h=>{h===".."?r.length>1&&r.pop():h!=="."&&r.push(h)}),r.length>1?r.join("/"):"/"}function Nf(u,c,r,s){return`Cannot include a '${u}' character in a manually specified \`to.${c}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function i0(u){return u.filter((c,r)=>r===0||c.route.path&&c.route.path.length>0)}function Lf(u){let c=i0(u);return c.map((r,s)=>s===c.length-1?r.pathname:r.pathnameBase)}function Gf(u,c,r,s=!1){let h;typeof u=="string"?h=qn(u):(h={...u},_t(!h.pathname||!h.pathname.includes("?"),Nf("?","pathname","search",h)),_t(!h.pathname||!h.pathname.includes("#"),Nf("#","pathname","hash",h)),_t(!h.search||!h.search.includes("#"),Nf("#","search","hash",h)));let y=u===""||h.pathname==="",E=y?"/":h.pathname,p;if(E==null)p=r;else{let C=c.length-1;if(!s&&E.startsWith("..")){let q=E.split("/");for(;q[0]==="..";)q.shift(),C-=1;h.pathname=q.join("/")}p=C>=0?c[C]:"/"}let b=n0(h,p),m=E&&E!=="/"&&E.endsWith("/"),T=(y||E===".")&&r.endsWith("/");return!b.pathname.endsWith("/")&&(m||T)&&(b.pathname+="/"),b}var Fe=u=>u.join("/").replace(/\/\/+/g,"/"),c0=u=>u.replace(/\/+$/,"").replace(/^\/*/,"/"),f0=u=>!u||u==="?"?"":u.startsWith("?")?u:"?"+u,r0=u=>!u||u==="#"?"":u.startsWith("#")?u:"#"+u;function s0(u){return u!=null&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.internal=="boolean"&&"data"in u}var Rd=["POST","PUT","PATCH","DELETE"];new Set(Rd);var o0=["GET",...Rd];new Set(o0);var xa=D.createContext(null);xa.displayName="DataRouter";var ii=D.createContext(null);ii.displayName="DataRouterState";D.createContext(!1);var Md=D.createContext({isTransitioning:!1});Md.displayName="ViewTransition";var h0=D.createContext(new Map);h0.displayName="Fetchers";var d0=D.createContext(null);d0.displayName="Await";var De=D.createContext(null);De.displayName="Navigation";var ci=D.createContext(null);ci.displayName="Location";var Ee=D.createContext({outlet:null,matches:[],isDataRoute:!1});Ee.displayName="Route";var Xf=D.createContext(null);Xf.displayName="RouteError";function y0(u,{relative:c}={}){_t(za(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:s}=D.useContext(De),{hash:h,pathname:y,search:E}=Hn(u,{relative:c}),p=y;return r!=="/"&&(p=y==="/"?r:Fe([r,y])),s.createHref({pathname:p,search:E,hash:h})}function za(){return D.useContext(ci)!=null}function qe(){return _t(za(),"useLocation() may be used only in the context of a <Router> component."),D.useContext(ci).location}var Dd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xd(u){D.useContext(De).static||D.useLayoutEffect(u)}function zd(){let{isDataRoute:u}=D.useContext(Ee);return u?z0():m0()}function m0(){_t(za(),"useNavigate() may be used only in the context of a <Router> component.");let u=D.useContext(xa),{basename:c,navigator:r}=D.useContext(De),{matches:s}=D.useContext(Ee),{pathname:h}=qe(),y=JSON.stringify(Lf(s)),E=D.useRef(!1);return xd(()=>{E.current=!0}),D.useCallback((b,m={})=>{if(Me(E.current,Dd),!E.current)return;if(typeof b=="number"){r.go(b);return}let T=Gf(b,JSON.parse(y),h,m.relative==="path");u==null&&c!=="/"&&(T.pathname=T.pathname==="/"?c:Fe([c,T.pathname])),(m.replace?r.replace:r.push)(T,m.state,m)},[c,r,y,h,u])}var v0=D.createContext(null);function g0(u){let c=D.useContext(Ee).outlet;return c&&D.createElement(v0.Provider,{value:u},c)}function $g(){let{matches:u}=D.useContext(Ee),c=u[u.length-1];return c?c.params:{}}function Hn(u,{relative:c}={}){let{matches:r}=D.useContext(Ee),{pathname:s}=qe(),h=JSON.stringify(Lf(r));return D.useMemo(()=>Gf(u,JSON.parse(h),s,c==="path"),[u,h,s,c])}function p0(u,c){return _d(u)}function _d(u,c,r,s,h){_t(za(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:y}=D.useContext(De),{matches:E}=D.useContext(Ee),p=E[E.length-1],b=p?p.params:{},m=p?p.pathname:"/",T=p?p.pathnameBase:"/",C=p&&p.route;{let G=C&&C.path||"";Ud(m,!C||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${G}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
60
|
|
|
61
61
|
Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let q=qe(),Z;Z=q;let H=Z.pathname||"/",B=H;if(T!=="/"){let G=T.replace(/^\//,"").split("/");B="/"+H.replace(/^\//,"").split("/").slice(G.length).join("/")}let j=Td(u,{pathname:B});return Me(C||j!=null,`No routes matched location "${Z.pathname}${Z.search}${Z.hash}" `),Me(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${Z.pathname}${Z.search}${Z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),A0(j&&j.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:Fe([T,y.encodeLocation?y.encodeLocation(G.pathname).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?T:Fe([T,y.encodeLocation?y.encodeLocation(G.pathnameBase).pathname:G.pathnameBase])})),E,r,s,h)}function b0(){let u=x0(),c=s0(u)?`${u.status} ${u.statusText}`:u instanceof Error?u.message:JSON.stringify(u),r=u instanceof Error?u.stack:null,s="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:s},y={padding:"2px 4px",backgroundColor:s},E=null;return console.error("Error handled by React Router default ErrorBoundary:",u),E=D.createElement(D.Fragment,null,D.createElement("p",null,"💿 Hey developer 👋"),D.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",D.createElement("code",{style:y},"ErrorBoundary")," or"," ",D.createElement("code",{style:y},"errorElement")," prop on your route.")),D.createElement(D.Fragment,null,D.createElement("h2",null,"Unexpected Application Error!"),D.createElement("h3",{style:{fontStyle:"italic"}},c),r?D.createElement("pre",{style:h},r):null,E)}var S0=D.createElement(b0,null),E0=class extends D.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,c){return c.location!==u.location||c.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:c.error,location:c.location,revalidation:u.revalidation||c.revalidation}}componentDidCatch(u,c){this.props.unstable_onError?this.props.unstable_onError(u,c):console.error("React Router caught the following error during render",u)}render(){return this.state.error!==void 0?D.createElement(Ee.Provider,{value:this.props.routeContext},D.createElement(Xf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function T0({routeContext:u,match:c,children:r}){let s=D.useContext(xa);return s&&s.static&&s.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=c.route.id),D.createElement(Ee.Provider,{value:u},r)}function A0(u,c=[],r=null,s=null,h=null){if(u==null){if(!r)return null;if(r.errors)u=r.matches;else if(c.length===0&&!r.initialized&&r.matches.length>0)u=r.matches;else return null}let y=u,E=r?.errors;if(E!=null){let m=y.findIndex(T=>T.route.id&&E?.[T.route.id]!==void 0);_t(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(E).join(",")}`),y=y.slice(0,Math.min(y.length,m+1))}let p=!1,b=-1;if(r)for(let m=0;m<y.length;m++){let T=y[m];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(b=m),T.route.id){let{loaderData:C,errors:q}=r,Z=T.route.loader&&!C.hasOwnProperty(T.route.id)&&(!q||q[T.route.id]===void 0);if(T.route.lazy||Z){p=!0,b>=0?y=y.slice(0,b+1):y=[y[0]];break}}}return y.reduceRight((m,T,C)=>{let q,Z=!1,H=null,B=null;r&&(q=E&&T.route.id?E[T.route.id]:void 0,H=T.route.errorElement||S0,p&&(b<0&&C===0?(Ud("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),Z=!0,B=null):b===C&&(Z=!0,B=T.route.hydrateFallbackElement||null)));let j=c.concat(y.slice(0,C+1)),V=()=>{let G;return q?G=H:Z?G=B:T.route.Component?G=D.createElement(T.route.Component,null):T.route.element?G=T.route.element:G=m,D.createElement(T0,{match:T,routeContext:{outlet:m,matches:j,isDataRoute:r!=null},children:G})};return r&&(T.route.ErrorBoundary||T.route.errorElement||C===0)?D.createElement(E0,{location:r.location,revalidation:r.revalidation,component:H,error:q,children:V(),routeContext:{outlet:null,matches:j,isDataRoute:!0},unstable_onError:s}):V()},null)}function Zf(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function O0(u){let c=D.useContext(xa);return _t(c,Zf(u)),c}function R0(u){let c=D.useContext(ii);return _t(c,Zf(u)),c}function M0(u){let c=D.useContext(Ee);return _t(c,Zf(u)),c}function Vf(u){let c=M0(u),r=c.matches[c.matches.length-1];return _t(r.route.id,`${u} can only be used on routes that contain a unique "id"`),r.route.id}function D0(){return Vf("useRouteId")}function x0(){let u=D.useContext(Xf),c=R0("useRouteError"),r=Vf("useRouteError");return u!==void 0?u:c.errors?.[r]}function z0(){let{router:u}=O0("useNavigate"),c=Vf("useNavigate"),r=D.useRef(!1);return xd(()=>{r.current=!0}),D.useCallback(async(h,y={})=>{Me(r.current,Dd),r.current&&(typeof h=="number"?u.navigate(h):await u.navigate(h,{fromRouteId:c,...y}))},[u,c])}var fd={};function Ud(u,c,r){!c&&!fd[u]&&(fd[u]=!0,Me(!1,r))}D.memo(_0);function _0({routes:u,future:c,state:r,unstable_onError:s}){return _d(u,void 0,r,s,c)}function rd({to:u,replace:c,state:r,relative:s}){_t(za(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=D.useContext(De);Me(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:y}=D.useContext(Ee),{pathname:E}=qe(),p=zd(),b=Gf(u,Lf(y),E,s==="path"),m=JSON.stringify(b);return D.useEffect(()=>{p(JSON.parse(m),{replace:c,state:r,relative:s})},[p,m,s,c,r]),null}function U0(u){return g0(u.context)}function C0({basename:u="/",children:c=null,location:r,navigationType:s="POP",navigator:h,static:y=!1}){_t(!za(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let E=u.replace(/^\/*/,"/"),p=D.useMemo(()=>({basename:E,navigator:h,static:y,future:{}}),[E,h,y]);typeof r=="string"&&(r=qn(r));let{pathname:b="/",search:m="",hash:T="",state:C=null,key:q="default"}=r,Z=D.useMemo(()=>{let H=We(b,E);return H==null?null:{location:{pathname:H,search:m,hash:T,state:C,key:q},navigationType:s}},[E,b,m,T,C,q,s]);return Me(Z!=null,`<Router basename="${E}"> is not able to match the URL "${b}${m}${T}" because it does not start with the basename, so the <Router> won't render anything.`),Z==null?null:D.createElement(De.Provider,{value:p},D.createElement(ci.Provider,{children:c,value:Z}))}var ti="get",ei="application/x-www-form-urlencoded";function fi(u){return u!=null&&typeof u.tagName=="string"}function N0(u){return fi(u)&&u.tagName.toLowerCase()==="button"}function q0(u){return fi(u)&&u.tagName.toLowerCase()==="form"}function H0(u){return fi(u)&&u.tagName.toLowerCase()==="input"}function j0(u){return!!(u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)}function B0(u,c){return u.button===0&&(!c||c==="_self")&&!j0(u)}var Iu=null;function Q0(){if(Iu===null)try{new FormData(document.createElement("form"),0),Iu=!1}catch{Iu=!0}return Iu}var w0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qf(u){return u!=null&&!w0.has(u)?(Me(!1,`"${u}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ei}"`),null):u}function Y0(u,c){let r,s,h,y,E;if(q0(u)){let p=u.getAttribute("action");s=p?We(p,c):null,r=u.getAttribute("method")||ti,h=qf(u.getAttribute("enctype"))||ei,y=new FormData(u)}else if(N0(u)||H0(u)&&(u.type==="submit"||u.type==="image")){let p=u.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=u.getAttribute("formaction")||p.getAttribute("action");if(s=b?We(b,c):null,r=u.getAttribute("formmethod")||p.getAttribute("method")||ti,h=qf(u.getAttribute("formenctype"))||qf(p.getAttribute("enctype"))||ei,y=new FormData(p,u),!Q0()){let{name:m,type:T,value:C}=u;if(T==="image"){let q=m?`${m}.`:"";y.append(`${q}x`,"0"),y.append(`${q}y`,"0")}else m&&y.append(m,C)}}else{if(fi(u))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ti,s=null,h=ei,E=u}return y&&h==="text/plain"&&(E=y,y=void 0),{action:s,method:r.toLowerCase(),encType:h,formData:y,body:E}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Kf(u,c){if(u===!1||u===null||typeof u>"u")throw new Error(c)}function L0(u,c,r){let s=typeof u=="string"?new URL(u,typeof window>"u"?"server://singlefetch/":window.location.origin):u;return s.pathname==="/"?s.pathname=`_root.${r}`:c&&We(s.pathname,c)==="/"?s.pathname=`${c.replace(/\/$/,"")}/_root.${r}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${r}`,s}async function G0(u,c){if(u.id in c)return c[u.id];try{let r=await import(u.module);return c[u.id]=r,r}catch(r){return console.error(`Error loading route module \`${u.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function X0(u){return u==null?!1:u.href==null?u.rel==="preload"&&typeof u.imageSrcSet=="string"&&typeof u.imageSizes=="string":typeof u.rel=="string"&&typeof u.href=="string"}async function Z0(u,c,r){let s=await Promise.all(u.map(async h=>{let y=c.routes[h.route.id];if(y){let E=await G0(y,r);return E.links?E.links():[]}return[]}));return k0(s.flat(1).filter(X0).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function sd(u,c,r,s,h,y){let E=(b,m)=>r[m]?b.route.id!==r[m].route.id:!0,p=(b,m)=>r[m].pathname!==b.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==b.params["*"];return y==="assets"?c.filter((b,m)=>E(b,m)||p(b,m)):y==="data"?c.filter((b,m)=>{let T=s.routes[b.route.id];if(!T||!T.hasLoader)return!1;if(E(b,m)||p(b,m))return!0;if(b.route.shouldRevalidate){let C=b.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(u,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function V0(u,c,{includeHydrateFallback:r}={}){return K0(u.map(s=>{let h=c.routes[s.route.id];if(!h)return[];let y=[h.module];return h.clientActionModule&&(y=y.concat(h.clientActionModule)),h.clientLoaderModule&&(y=y.concat(h.clientLoaderModule)),r&&h.hydrateFallbackModule&&(y=y.concat(h.hydrateFallbackModule)),h.imports&&(y=y.concat(h.imports)),y}).flat(1))}function K0(u){return[...new Set(u)]}function J0(u){let c={},r=Object.keys(u).sort();for(let s of r)c[s]=u[s];return c}function k0(u,c){let r=new Set;return new Set(c),u.reduce((s,h)=>{let y=JSON.stringify(J0(h));return r.has(y)||(r.add(y),s.push({key:y,link:h})),s},[])}function Cd(){let u=D.useContext(xa);return Kf(u,"You must render this element inside a <DataRouterContext.Provider> element"),u}function $0(){let u=D.useContext(ii);return Kf(u,"You must render this element inside a <DataRouterStateContext.Provider> element"),u}var Jf=D.createContext(void 0);Jf.displayName="FrameworkContext";function Nd(){let u=D.useContext(Jf);return Kf(u,"You must render this element inside a <HydratedRouter> element"),u}function F0(u,c){let r=D.useContext(Jf),[s,h]=D.useState(!1),[y,E]=D.useState(!1),{onFocus:p,onBlur:b,onMouseEnter:m,onMouseLeave:T,onTouchStart:C}=c,q=D.useRef(null);D.useEffect(()=>{if(u==="render"&&E(!0),u==="viewport"){let B=V=>{V.forEach(G=>{E(G.isIntersecting)})},j=new IntersectionObserver(B,{threshold:.5});return q.current&&j.observe(q.current),()=>{j.disconnect()}}},[u]),D.useEffect(()=>{if(s){let B=setTimeout(()=>{E(!0)},100);return()=>{clearTimeout(B)}}},[s]);let Z=()=>{h(!0)},H=()=>{h(!1),E(!1)};return r?u!=="intent"?[y,q,{}]:[y,q,{onFocus:_n(p,Z),onBlur:_n(b,H),onMouseEnter:_n(m,Z),onMouseLeave:_n(T,H),onTouchStart:_n(C,Z)}]:[!1,q,{}]}function _n(u,c){return r=>{u&&u(r),r.defaultPrevented||c(r)}}function W0({page:u,...c}){let{router:r}=Cd(),s=D.useMemo(()=>Td(r.routes,u,r.basename),[r.routes,u,r.basename]);return s?D.createElement(I0,{page:u,matches:s,...c}):null}function P0(u){let{manifest:c,routeModules:r}=Nd(),[s,h]=D.useState([]);return D.useEffect(()=>{let y=!1;return Z0(u,c,r).then(E=>{y||h(E)}),()=>{y=!0}},[u,c,r]),s}function I0({page:u,matches:c,...r}){let s=qe(),{manifest:h,routeModules:y}=Nd(),{basename:E}=Cd(),{loaderData:p,matches:b}=$0(),m=D.useMemo(()=>sd(u,c,b,h,s,"data"),[u,c,b,h,s]),T=D.useMemo(()=>sd(u,c,b,h,s,"assets"),[u,c,b,h,s]),C=D.useMemo(()=>{if(u===s.pathname+s.search+s.hash)return[];let H=new Set,B=!1;if(c.forEach(V=>{let G=h.routes[V.route.id];!G||!G.hasLoader||(!m.some(F=>F.route.id===V.route.id)&&V.route.id in p&&y[V.route.id]?.shouldRevalidate||G.hasClientLoader?B=!0:H.add(V.route.id))}),H.size===0)return[];let j=L0(u,E,"data");return B&&H.size>0&&j.searchParams.set("_routes",c.filter(V=>H.has(V.route.id)).map(V=>V.route.id).join(",")),[j.pathname+j.search]},[E,p,s,h,m,c,u,y]),q=D.useMemo(()=>V0(T,h),[T,h]),Z=P0(T);return D.createElement(D.Fragment,null,C.map(H=>D.createElement("link",{key:H,rel:"prefetch",as:"fetch",href:H,...r})),q.map(H=>D.createElement("link",{key:H,rel:"modulepreload",href:H,...r})),Z.map(({key:H,link:B})=>D.createElement("link",{key:H,nonce:r.nonce,...B})))}function tg(...u){return c=>{u.forEach(r=>{typeof r=="function"?r(c):r!=null&&(r.current=c)})}}var qd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{qd&&(window.__reactRouterVersion="7.8.2")}catch{}function eg({basename:u,children:c,window:r}){let s=D.useRef();s.current==null&&(s.current=Lv({window:r,v5Compat:!0}));let h=s.current,[y,E]=D.useState({action:h.action,location:h.location}),p=D.useCallback(b=>{D.startTransition(()=>E(b))},[E]);return D.useLayoutEffect(()=>h.listen(p),[h,p]),D.createElement(C0,{basename:u,children:c,location:y.location,navigationType:y.action,navigator:h})}var Hd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ri=D.forwardRef(function({onClick:c,discover:r="render",prefetch:s="none",relative:h,reloadDocument:y,replace:E,state:p,target:b,to:m,preventScrollReset:T,viewTransition:C,...q},Z){let{basename:H}=D.useContext(De),B=typeof m=="string"&&Hd.test(m),j,V=!1;if(typeof m=="string"&&B&&(j=m,qd))try{let Tt=new URL(window.location.href),te=m.startsWith("//")?new URL(Tt.protocol+m):new URL(m),oe=We(te.pathname,H);te.origin===Tt.origin&&oe!=null?m=oe+te.search+te.hash:V=!0}catch{Me(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let G=y0(m,{relative:h}),[F,ht,W]=F0(s,q),Rt=ug(m,{replace:E,state:p,target:b,preventScrollReset:T,relative:h,viewTransition:C});function Ut(Tt){c&&c(Tt),Tt.defaultPrevented||Rt(Tt)}let qt=D.createElement("a",{...q,...W,href:j||G,onClick:V||y?c:Ut,ref:tg(Z,ht),target:b,"data-discover":!B&&r==="render"?"true":void 0});return F&&!B?D.createElement(D.Fragment,null,qt,D.createElement(W0,{page:G})):qt});ri.displayName="Link";var lg=D.forwardRef(function({"aria-current":c="page",caseSensitive:r=!1,className:s="",end:h=!1,style:y,to:E,viewTransition:p,children:b,...m},T){let C=Hn(E,{relative:m.relative}),q=qe(),Z=D.useContext(ii),{navigator:H,basename:B}=D.useContext(De),j=Z!=null&&sg(C)&&p===!0,V=H.encodeLocation?H.encodeLocation(C).pathname:C.pathname,G=q.pathname,F=Z&&Z.navigation&&Z.navigation.location?Z.navigation.location.pathname:null;r||(G=G.toLowerCase(),F=F?F.toLowerCase():null,V=V.toLowerCase()),F&&B&&(F=We(F,B)||F);const ht=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let W=G===V||!h&&G.startsWith(V)&&G.charAt(ht)==="/",Rt=F!=null&&(F===V||!h&&F.startsWith(V)&&F.charAt(V.length)==="/"),Ut={isActive:W,isPending:Rt,isTransitioning:j},qt=W?c:void 0,Tt;typeof s=="function"?Tt=s(Ut):Tt=[s,W?"active":null,Rt?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let te=typeof y=="function"?y(Ut):y;return D.createElement(ri,{...m,"aria-current":qt,className:Tt,ref:T,style:te,to:E,viewTransition:p},typeof b=="function"?b(Ut):b)});lg.displayName="NavLink";var ag=D.forwardRef(({discover:u="render",fetcherKey:c,navigate:r,reloadDocument:s,replace:h,state:y,method:E=ti,action:p,onSubmit:b,relative:m,preventScrollReset:T,viewTransition:C,...q},Z)=>{let H=fg(),B=rg(p,{relative:m}),j=E.toLowerCase()==="get"?"get":"post",V=typeof p=="string"&&Hd.test(p),G=F=>{if(b&&b(F),F.defaultPrevented)return;F.preventDefault();let ht=F.nativeEvent.submitter,W=ht?.getAttribute("formmethod")||E;H(ht||F.currentTarget,{fetcherKey:c,method:W,navigate:r,replace:h,state:y,relative:m,preventScrollReset:T,viewTransition:C})};return D.createElement("form",{ref:Z,method:j,action:B,onSubmit:s?b:G,...q,"data-discover":!V&&u==="render"?"true":void 0})});ag.displayName="Form";function ng(u){return`${u} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jd(u){let c=D.useContext(xa);return _t(c,ng(u)),c}function ug(u,{target:c,replace:r,state:s,preventScrollReset:h,relative:y,viewTransition:E}={}){let p=zd(),b=qe(),m=Hn(u,{relative:y});return D.useCallback(T=>{if(B0(T,c)){T.preventDefault();let C=r!==void 0?r:Nn(b)===Nn(m);p(u,{replace:C,state:s,preventScrollReset:h,relative:y,viewTransition:E})}},[b,p,m,r,s,c,u,h,y,E])}var ig=0,cg=()=>`__${String(++ig)}__`;function fg(){let{router:u}=jd("useSubmit"),{basename:c}=D.useContext(De),r=D0();return D.useCallback(async(s,h={})=>{let{action:y,method:E,encType:p,formData:b,body:m}=Y0(s,c);if(h.navigate===!1){let T=h.fetcherKey||cg();await u.fetch(T,r,h.action||y,{preventScrollReset:h.preventScrollReset,formData:b,body:m,formMethod:h.method||E,formEncType:h.encType||p,flushSync:h.flushSync})}else await u.navigate(h.action||y,{preventScrollReset:h.preventScrollReset,formData:b,body:m,formMethod:h.method||E,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:r,flushSync:h.flushSync,viewTransition:h.viewTransition})},[u,c,r])}function rg(u,{relative:c}={}){let{basename:r}=D.useContext(De),s=D.useContext(Ee);_t(s,"useFormAction must be used inside a RouteContext");let[h]=s.matches.slice(-1),y={...Hn(u||".",{relative:c})},E=qe();if(u==null){y.search=E.search;let p=new URLSearchParams(y.search),b=p.getAll("index");if(b.some(T=>T==="")){p.delete("index"),b.filter(C=>C).forEach(C=>p.append("index",C));let T=p.toString();y.search=T?`?${T}`:""}}return(!u||u===".")&&h.route.index&&(y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(y.pathname=y.pathname==="/"?r:Fe([r,y.pathname])),Nn(y)}function sg(u,{relative:c}={}){let r=D.useContext(Md);_t(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=jd("useViewTransitionState"),h=Hn(u,{relative:c});if(!r.isTransitioning)return!1;let y=We(r.currentLocation.pathname,s)||r.currentLocation.pathname,E=We(r.nextLocation.pathname,s)||r.nextLocation.pathname;return ai(h.pathname,E)!=null||ai(h.pathname,y)!=null}var og=Ed();const hg="modulepreload",dg=function(u,c){return new URL(u,c).href},od={},si=function(c,r,s){let h=Promise.resolve();if(r&&r.length>0){let m=function(T){return Promise.all(T.map(C=>Promise.resolve(C).then(q=>({status:"fulfilled",value:q}),q=>({status:"rejected",reason:q}))))};const E=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),b=p?.nonce||p?.getAttribute("nonce");h=m(r.map(T=>{if(T=dg(T,s),T in od)return;od[T]=!0;const C=T.endsWith(".css"),q=C?'[rel="stylesheet"]':"";if(!!s)for(let B=E.length-1;B>=0;B--){const j=E[B];if(j.href===T&&(!C||j.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${T}"]${q}`))return;const H=document.createElement("link");if(H.rel=C?"stylesheet":hg,C||(H.as="script"),H.crossOrigin="",H.href=T,b&&H.setAttribute("nonce",b),document.head.appendChild(H),C)return new Promise((B,j)=>{H.addEventListener("load",B),H.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${T}`)))})}))}function y(E){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=E,window.dispatchEvent(p),!p.defaultPrevented)throw E}return h.then(E=>{for(const p of E||[])p.status==="rejected"&&y(p.reason);return c().catch(y)})};/**
|
|
62
|
-
* @license lucide-react v0.
|
|
62
|
+
* @license lucide-react v0.542.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/const yg=u=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mg=u=>u.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,r,s)=>s?s.toUpperCase():r.toLowerCase()),hd=u=>{const c=mg(u);return c.charAt(0).toUpperCase()+c.slice(1)},Bd=(...u)=>u.filter((c,r,s)=>!!c&&c.trim()!==""&&s.indexOf(c)===r).join(" ").trim(),vg=u=>{for(const c in u)if(c.startsWith("aria-")||c==="role"||c==="title")return!0};/**
|
|
67
|
-
* @license lucide-react v0.
|
|
67
|
+
* @license lucide-react v0.542.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
71
|
*/var gg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
72
|
-
* @license lucide-react v0.
|
|
72
|
+
* @license lucide-react v0.542.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/const pg=D.forwardRef(({color:u="currentColor",size:c=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:h="",children:y,iconNode:E,...p},b)=>D.createElement("svg",{ref:b,...gg,width:c,height:c,stroke:u,strokeWidth:s?Number(r)*24/Number(c):r,className:Bd("lucide",h),...!y&&!vg(p)&&{"aria-hidden":"true"},...p},[...E.map(([m,T])=>D.createElement(m,T)),...Array.isArray(y)?y:[y]]));/**
|
|
77
|
-
* @license lucide-react v0.
|
|
77
|
+
* @license lucide-react v0.542.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/const jn=(u,c)=>{const r=D.forwardRef(({className:s,...h},y)=>D.createElement(pg,{ref:y,iconNode:c,className:Bd(`lucide-${yg(hd(u))}`,`lucide-${u}`,s),...h}));return r.displayName=hd(u),r};/**
|
|
82
|
-
* @license lucide-react v0.
|
|
82
|
+
* @license lucide-react v0.542.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
86
|
*/const bg=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],Sg=jn("arrow-right-left",bg);/**
|
|
87
|
-
* @license lucide-react v0.
|
|
87
|
+
* @license lucide-react v0.542.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/const Eg=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Tg=jn("database",Eg);/**
|
|
92
|
-
* @license lucide-react v0.
|
|
92
|
+
* @license lucide-react v0.542.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
96
|
*/const Ag=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Og=jn("menu",Ag);/**
|
|
97
|
-
* @license lucide-react v0.
|
|
97
|
+
* @license lucide-react v0.542.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/const Rg=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Mg=jn("trash-2",Rg);/**
|
|
102
|
-
* @license lucide-react v0.
|
|
102
|
+
* @license lucide-react v0.542.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -111,4 +111,4 @@ Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}
|
|
|
111
111
|
transform transition-transform duration-300 ease-in-out
|
|
112
112
|
${u?"translate-x-0 bg-white dark:bg-neutral-900":"-translate-x-[120%] lg:translate-x-0"}
|
|
113
113
|
lg:bg-transparent
|
|
114
|
-
`,children:L.jsx("ul",{className:"flex flex-col gap-2 text-gray-700 dark:text-neutral-300",children:wg(r).map(h=>{const y=s.pathname.startsWith(h.path),E=h.icon;return L.jsx("li",{className:"contents",children:L.jsxs(ri,{to:h.path,className:["flex items-center gap-2 rounded-lg px-4 py-2 font-medium",y?"bg-green-100 dark:bg-neutral-800 text-gray-900 dark:text-white":"text-gray-600 dark:text-neutral-400 hover:bg-gray-50 dark:hover:bg-neutral-800/50"].join(" "),children:[L.jsx(E,{size:16}),h.label]})},h.path)})})})]})},qg=()=>{const u=qe(),[c,r]=D.useState(!1);D.useEffect(()=>{r(!1)},[u.pathname]);const s=()=>{r(!c)},h=()=>{r(!1)};return L.jsxs(L.Fragment,{children:[" ",L.jsx(Cg,{isMobileSidebarOpen:c,onToggleMobileSidebar:s}),L.jsx("hr",{className:"container my-6 border-gray-300 dark:border-neutral-900"}),L.jsxs("div",{className:"container flex flex-col h-full lg:flex-row gap-8 relative",children:[L.jsx(Ng,{isMobileSidebarOpen:c,onCloseMobileSidebar:h}),L.jsx("div",{className:"w-full min-h-[88vh] flex-1 flex flex-col min-w-0 pb-5 overflow-hidden",children:L.jsx("div",{className:"flex-1",children:L.jsx(U0,{})})})]})," "]})},Hg=D.lazy(()=>si(()=>import("./RequestsContainer-
|
|
114
|
+
`,children:L.jsx("ul",{className:"flex flex-col gap-2 text-gray-700 dark:text-neutral-300",children:wg(r).map(h=>{const y=s.pathname.startsWith(h.path),E=h.icon;return L.jsx("li",{className:"contents",children:L.jsxs(ri,{to:h.path,className:["flex items-center gap-2 rounded-lg px-4 py-2 font-medium",y?"bg-green-100 dark:bg-neutral-800 text-gray-900 dark:text-white":"text-gray-600 dark:text-neutral-400 hover:bg-gray-50 dark:hover:bg-neutral-800/50"].join(" "),children:[L.jsx(E,{size:16}),h.label]})},h.path)})})})]})},qg=()=>{const u=qe(),[c,r]=D.useState(!1);D.useEffect(()=>{r(!1)},[u.pathname]);const s=()=>{r(!c)},h=()=>{r(!1)};return L.jsxs(L.Fragment,{children:[" ",L.jsx(Cg,{isMobileSidebarOpen:c,onToggleMobileSidebar:s}),L.jsx("hr",{className:"container my-6 border-gray-300 dark:border-neutral-900"}),L.jsxs("div",{className:"container flex flex-col h-full lg:flex-row gap-8 relative",children:[L.jsx(Ng,{isMobileSidebarOpen:c,onCloseMobileSidebar:h}),L.jsx("div",{className:"w-full min-h-[88vh] flex-1 flex flex-col min-w-0 pb-5 overflow-hidden",children:L.jsx("div",{className:"flex-1",children:L.jsx(U0,{})})})]})," "]})},Hg=D.lazy(()=>si(()=>import("./RequestsContainer-DK3hQVz9.js"),__vite__mapDeps([0,1,2]),import.meta.url)),jg=D.lazy(()=>si(()=>import("./QueriesContainer-CAAsjjW5.js"),__vite__mapDeps([3,4,1,2]),import.meta.url)),Bg=D.lazy(()=>si(()=>import("./RequestDetailsContainer-DuDo-IqS.js"),[],import.meta.url)),Qg=D.lazy(()=>si(()=>import("./QueryDetailsContainer-E7P-IO7f.js"),__vite__mapDeps([5,4,1,6,7]),import.meta.url));function $f(u){return{REQUESTS:`${u.path}/requests`,QUERIES:`${u.path}/queries`,REQUEST_DETAILS:`${u.path}/requests/:requestId`,QUERY_DETAILS:`${u.path}/queries/:queryId`}}function wg(u){const c=$f(u);return[{path:c.REQUESTS,label:"Requests",icon:Sg},{path:c.QUERIES,label:"Queries",icon:Tg}]}function Yg(u){const c=$f(u);return[{path:"/",element:L.jsx(rd,{to:c.REQUESTS,replace:!0})},{path:u.path,element:L.jsx(qg,{}),children:[{index:!0,element:L.jsx(rd,{to:"requests",replace:!0})},{path:"requests",element:L.jsx(Hg,{})},{path:"requests/:id",element:L.jsx(Bg,{})},{path:"queries",element:L.jsx(jg,{})},{path:"queries/:id",element:L.jsx(Qg,{})},{path:"*",element:L.jsx("h1",{children:"Error"})}]}]}const Lg=({config:u})=>{const c=Yg(u);return p0([...c])},Gg=()=>L.jsx("div",{className:"flex items-center justify-center h-screen bg-background",children:L.jsxs("div",{className:"relative",children:[L.jsx("div",{className:"w-28 h-28 border-t-4 border-b-4 border-neutral-200 rounded-full animate-spin"}),L.jsx("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 text-white font-semibold text-lg",children:"Lens.js"})]})}),Xg=()=>L.jsx("div",{className:"flex items-center justify-center min-h-screen",children:L.jsx("div",{className:"animate-spin rounded-full h-32 w-32 border-b-2 border-gray-900"})}),Zg=()=>{const[u,c]=D.useState({}),[r,s]=D.useState(!0);return D.useEffect(()=>{fetch(wd("/lens-config")).then(h=>h.json()).then(h=>{c(h)}).catch(h=>{console.error("Failed to load config:",h)}).finally(()=>{s(!1)})},[]),r?L.jsx(Gg,{}):L.jsx(Qd.Provider,{value:{config:u},children:L.jsx(D.Suspense,{fallback:L.jsx(Xg,{}),children:L.jsx(Lg,{config:u})})})},Vg=new Cv({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3}}});Yv.createRoot(document.getElementById("root")).render(L.jsx(D.StrictMode,{children:L.jsx(qv,{client:Vg,children:L.jsx(eg,{children:L.jsx(Zg,{})})})}));export{ri as L,ni as S,si as _,dv as a,Hf as b,ov as c,Rv as d,mv as e,md as f,kt as g,Jg as h,ui as i,L as j,kf as k,wd as l,$g as m,Re as n,jn as o,Sv as p,$f as q,D as r,Kg as s,hv as t,kg as u};
|