@lunora/studio 1.0.0-alpha.3 → 1.0.0-alpha.30
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/__assets__/package-og.svg +1 -1
- package/dist/index.d.ts +29 -18
- package/dist/index.js +29 -29
- package/dist/mount.d.ts +1 -1
- package/dist/mount.js +1 -1
- package/dist/{packem_shared/ApiTab-W3no0KOj.js → packem_chunks/ApiTab.js} +5 -5
- package/dist/{packem_shared/AuditPanel-Bq4o_IqT.js → packem_chunks/AuditPanel.js} +24 -36
- package/dist/{packem_shared/ExportImportPanel-dxY56TDF.js → packem_chunks/ExportImportPanel.js} +13 -9
- package/dist/{packem_shared/FileBrowser-Dhy4zES8.js → packem_chunks/FileBrowser.js} +15 -15
- package/dist/{packem_shared/FunctionRunner--fQJRPAD.js → packem_chunks/FunctionRunner.js} +10 -10
- package/dist/{packem_shared/FunctionStatsPanel-BjRUA_G3.js → packem_chunks/FunctionStatsPanel.js} +147 -204
- package/dist/{packem_shared/HealthPanel-PxclMWmA.js → packem_chunks/HealthPanel.js} +37 -29
- package/dist/{packem_shared/InsightsPanel-CWS_C-xW.js → packem_chunks/InsightsPanel.js} +107 -69
- package/dist/{packem_shared/LogsPanel-CTW8CFcM.js → packem_chunks/LogsPanel.js} +41 -53
- package/dist/{packem_shared/MailPanel-BwkvfIHF.js → packem_chunks/MailPanel.js} +37 -44
- package/dist/{packem_shared/MetricsPanel-BLuOhZQ4.js → packem_chunks/MetricsPanel.js} +41 -322
- package/dist/{packem_shared/MigrationsPanel-DT3lnwHF.js → packem_chunks/MigrationsPanel.js} +39 -46
- package/dist/{packem_shared/PitrPanel-CdErL7EJ.js → packem_chunks/PitrPanel.js} +9 -9
- package/dist/{packem_shared/SchemaViewer-LJDcmNIO.js → packem_chunks/SchemaViewer.js} +15 -15
- package/dist/{packem_shared/SecurityAdvisorPanel-C_ETsPih.js → packem_chunks/SecurityAdvisorPanel.js} +44 -31
- package/dist/packem_chunks/SettingsPanel.js +390 -0
- package/dist/{packem_shared/sql-editor-panel-BFRpzj6r.js → packem_chunks/SqlEditorPanel.js} +12 -252
- package/dist/{packem_shared/TableEditor-ChfUOZec.js → packem_chunks/TableEditor.js} +10 -68
- package/dist/packem_chunks/analytics-panel.js +261 -0
- package/dist/packem_chunks/auth-config-panel.js +179 -0
- package/dist/packem_chunks/auth-sessions-panel.js +175 -0
- package/dist/packem_chunks/dashboards-panel.js +779 -0
- package/dist/packem_chunks/fanout-panel.js +481 -0
- package/dist/packem_chunks/flags-panel.js +176 -0
- package/dist/packem_chunks/kv-browser.js +1896 -0
- package/dist/packem_chunks/log-drains-panel.js +273 -0
- package/dist/packem_chunks/organizations-panel.js +670 -0
- package/dist/packem_chunks/payments-panel.js +185 -0
- package/dist/packem_chunks/permissions-panel.js +804 -0
- package/dist/packem_chunks/queues-panel.js +147 -0
- package/dist/packem_chunks/rls-panel.js +313 -0
- package/dist/packem_chunks/schedule-panel.js +831 -0
- package/dist/packem_chunks/sparkline.js +79 -0
- package/dist/packem_chunks/storage-rules-panel.js +138 -0
- package/dist/packem_chunks/subscriptions-panel.js +236 -0
- package/dist/packem_chunks/users-panel.js +1265 -0
- package/dist/packem_chunks/vector-browser.js +281 -0
- package/dist/packem_chunks/workflows-panel.js +562 -0
- package/dist/packem_shared/{ADMIN_FUNCTIONS-DmBqMZ-z.js → ADMIN_FUNCTIONS-CdaxLGkE.js} +3 -0
- package/dist/packem_shared/{ApiDocsPanel-C5-yJ1p7.js → ApiDocsPanel-B6u_wnz-.js} +2 -2
- package/dist/packem_shared/{ApiReferencePanel-1vubqG5s.js → ApiReferencePanel-Drz4UO0a.js} +2 -1
- package/dist/packem_shared/{CommandPalette-BtgkBzZI.js → CommandPalette-B5BertvU.js} +1 -1
- package/dist/packem_shared/{DataBrowser-CtBe1So9.js → DataBrowser-ANTHLWWh.js} +198 -247
- package/dist/packem_shared/{GlobalDataBrowser-BTEmGrph.js → GlobalDataBrowser-CjgTG_wa.js} +37 -66
- package/dist/packem_shared/HomePanel-c2FodE9t.js +14 -0
- package/dist/packem_shared/{OpenRpcReferencePanel-vbcYbv3V.js → OpenRpcReferencePanel-CspFdbUT.js} +2 -1
- package/dist/packem_shared/{ScheduledJobs-CabfKbyM.js → ScheduledJobs-BEJXtsBn.js} +163 -60
- package/dist/packem_shared/Studio-CVTtA_sB.js +16 -0
- package/dist/packem_shared/{StudioApp-CHOZA-z-.js → StudioApp-BSYV2fz6.js} +277 -3
- package/dist/packem_shared/{advisor-view-CGcfMiPq.js → advisor-view-DzqyvUU3.js} +1 -1
- package/dist/packem_shared/{app.d-CCmwDEVs.d.ts → app.d-B6MyY_al.d.ts} +1 -1
- package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-Bb__F5-u.js} +1 -1
- package/dist/packem_shared/browser-storage-d03UsV7v.js +249 -0
- package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
- package/dist/packem_shared/{data-grid-B5CaV3wS.js → data-grid-Dsg6nRjo.js} +1 -1
- package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
- package/dist/packem_shared/{grid-features-CzUfqgsM.js → grid-features-D7nNzBYm.js} +4 -99
- package/dist/packem_shared/{HomePanel-Cw16stjq.js → home-panel-aOR_drVv.js} +833 -469
- package/dist/packem_shared/{internal-rXJEAhXS.js → internal-FcNZ3beb.js} +1 -1
- package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
- package/dist/packem_shared/{reference-view-B4E49Lip.js → reference-view-Doy1XlQq.js} +4 -44
- package/dist/packem_shared/select-UkNYCT3s.js +273 -0
- package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
- package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-KgMPHS4u.js} +1 -1
- package/dist/packem_shared/studio-dMTJ-kRR.js +3987 -0
- package/dist/packem_shared/{table-_RzNvy3R.js → table-DsCa9Qp9.js} +1 -1
- package/dist/packem_shared/{table-list-sidebar-Bg7uzbvC.js → table-list-sidebar-VMo0ftxD.js} +1 -1
- package/dist/packem_shared/use-admin-query-BViPA3US.js +105 -0
- package/dist/packem_shared/use-auth-capabilities-BHkoBnbZ.js +32 -0
- package/dist/standalone/chunk-2DS7JLWL.js +13 -0
- package/dist/standalone/chunk-2K47A3P6.js +1 -0
- package/dist/standalone/chunk-2NGUNNGW.js +1 -0
- package/dist/standalone/chunk-2PDQ4KZ6.js +1 -0
- package/dist/standalone/chunk-3BP4BTLR.js +4 -0
- package/dist/standalone/chunk-3OA7PECS.js +6 -0
- package/dist/standalone/chunk-4QHKBC77.js +1 -0
- package/dist/standalone/chunk-57LYXHXH.js +1 -0
- package/dist/standalone/chunk-5NSZVXCS.js +1 -0
- package/dist/standalone/chunk-5OIBXYZM.js +1 -0
- package/dist/standalone/chunk-63XKJQTQ.js +1 -0
- package/dist/standalone/chunk-6RC6L33K.js +4 -0
- package/dist/standalone/chunk-6VTGE3WJ.js +1 -0
- package/dist/standalone/chunk-7PBZKXYA.js +1 -0
- package/dist/standalone/chunk-7POIIWC5.js +3 -0
- package/dist/standalone/chunk-7RYIQKZA.js +1 -0
- package/dist/standalone/chunk-7TJJXVSE.js +1 -0
- package/dist/standalone/chunk-AB6QGMBF.js +1 -0
- package/dist/standalone/chunk-AHILM3ZP.js +1 -0
- package/dist/standalone/chunk-AQGOX5DK.js +1 -0
- package/dist/standalone/chunk-ASLGNHAX.js +1 -0
- package/dist/standalone/chunk-BHTPZS7L.js +4 -0
- package/dist/standalone/chunk-BJGBHGK3.js +1 -0
- package/dist/standalone/chunk-D7HKX4DI.js +1 -0
- package/dist/standalone/chunk-DGWTR4G7.js +1 -0
- package/dist/standalone/chunk-DSX53PBM.js +1 -0
- package/dist/standalone/chunk-DV2MNASX.js +1 -0
- package/dist/standalone/chunk-DWDILV2E.js +1 -0
- package/dist/standalone/chunk-E7AVZZKO.js +1 -0
- package/dist/standalone/chunk-EGJX34WM.js +1 -0
- package/dist/standalone/chunk-FCR3HKFV.js +1 -0
- package/dist/standalone/chunk-FKO3HO6I.js +4 -0
- package/dist/standalone/chunk-FQKNJSRA.js +76 -0
- package/dist/standalone/chunk-G2TFEWEQ.js +4 -0
- package/dist/standalone/chunk-GABMIICA.js +1 -0
- package/dist/standalone/chunk-GTM65MVX.js +1 -0
- package/dist/standalone/chunk-GZXPPJVK.js +1 -0
- package/dist/standalone/chunk-HFBRE65A.js +1 -0
- package/dist/standalone/chunk-HFMQNUBC.js +1 -0
- package/dist/standalone/chunk-HG7Q5B3H.js +1 -0
- package/dist/standalone/chunk-HTQL7AXU.js +1 -0
- package/dist/standalone/chunk-HV7G6DFP.js +5 -0
- package/dist/standalone/chunk-ITLLHEVG.js +1 -0
- package/dist/standalone/chunk-J6J54MBP.js +1 -0
- package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
- package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
- package/dist/standalone/chunk-KG3QTFWE.js +1 -0
- package/dist/standalone/chunk-KGS7KM4A.js +2 -0
- package/dist/standalone/chunk-KODWGUAB.js +1 -0
- package/dist/standalone/chunk-KZ6INM5M.js +1 -0
- package/dist/standalone/chunk-MGFEVTRI.js +1 -0
- package/dist/standalone/chunk-N2QDG3MW.js +1 -0
- package/dist/standalone/chunk-N4JI6VQD.js +1 -0
- package/dist/standalone/chunk-NNISYDNI.js +1 -0
- package/dist/standalone/chunk-O4PXDNR3.js +1 -0
- package/dist/standalone/chunk-O77VNUFD.js +1 -0
- package/dist/standalone/chunk-OD2POGPJ.js +1 -0
- package/dist/standalone/chunk-OXCK3ZUG.js +1 -0
- package/dist/standalone/chunk-P7DSVO4U.js +1 -0
- package/dist/standalone/chunk-PKAM3N5C.js +1 -0
- package/dist/standalone/chunk-QGXGBHQO.js +1 -0
- package/dist/standalone/chunk-QHA3TAEJ.js +1 -0
- package/dist/standalone/chunk-QQWC62X7.js +1 -0
- package/dist/standalone/chunk-RMYA7NAH.js +1 -0
- package/dist/standalone/chunk-RRCPZMC2.js +22 -0
- package/dist/standalone/chunk-S53RUBW5.js +1 -0
- package/dist/standalone/chunk-SB4GT6PK.js +1 -0
- package/dist/standalone/chunk-SEU5V7I6.js +1 -0
- package/dist/standalone/chunk-SHIOUDOT.js +1 -0
- package/dist/standalone/chunk-SIDRSX7Y.js +1 -0
- package/dist/standalone/chunk-SVR644RF.js +1 -0
- package/dist/standalone/chunk-TAD43CG5.js +1 -0
- package/dist/standalone/chunk-TBMYIZIO.js +1 -0
- package/dist/standalone/chunk-TICVNLPM.js +1 -0
- package/dist/standalone/chunk-TQ36RWOP.js +1 -0
- package/dist/standalone/chunk-UGMRUEBU.js +1 -0
- package/dist/standalone/chunk-UII66UVF.js +1 -0
- package/dist/standalone/chunk-VJPQUBN6.js +8 -0
- package/dist/standalone/chunk-VLXV72QE.js +1 -0
- package/dist/standalone/chunk-VMJKJWG6.js +1 -0
- package/dist/standalone/chunk-VPDPN5RR.js +2 -0
- package/dist/standalone/chunk-VSEGZA3J.js +1 -0
- package/dist/standalone/chunk-VXBZQIGY.js +4 -0
- package/dist/standalone/chunk-W7PCVQTE.js +1 -0
- package/dist/standalone/chunk-XLILSHPE.js +1 -0
- package/dist/standalone/chunk-XURNGQSS.js +1 -0
- package/dist/standalone/chunk-YJGANMU7.js +18 -0
- package/dist/standalone/chunk-YQQJ4N6U.js +1 -0
- package/dist/standalone/chunk-ZH7UES4T.js +2 -0
- package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
- package/dist/standalone/chunk-ZQCVDXDL.js +1 -0
- package/dist/standalone/studio.js +104 -246
- package/dist/styles.css +1 -1
- package/package.json +13 -12
- package/dist/packem_shared/SettingsPanel-C0uLRf5P.js +0 -176
- package/dist/packem_shared/SqlEditorPanel-CguV7otm.js +0 -13
- package/dist/packem_shared/Studio-DFWAlcuf.js +0 -33
- package/dist/packem_shared/studio-Bj8psK1c.js +0 -10303
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var Nt=Object.create;var Oe=Object.defineProperty;var jt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames;var Mt=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty;var r=(t,s)=>Oe(t,"name",{value:s,configurable:!0}),Cr=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(s,n)=>(typeof require<"u"?require:s)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var _e=(t,s)=>()=>{try{return s||t((s={exports:{}}).exports,s),s.exports}catch(n){throw s=0,n}},Pr=(t,s)=>{for(var n in s)Oe(t,n,{get:s[n],enumerable:!0})},Lt=(t,s,n,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let f of zt(s))!It.call(t,f)&&f!==n&&Oe(t,f,{get:()=>s[f],enumerable:!(a=jt(s,f))||a.enumerable});return t};var Nr=(t,s,n)=>(n=t!=null?Nt(Mt(t)):{},Lt(s||!t||!t.__esModule?Oe(n,"default",{value:t,enumerable:!0}):n,t));var Xe=_e((w,Ce)=>{"use strict";(function(){function t(e,o){Object.defineProperty(a.prototype,e,{get:r(function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",o[0],o[1])},"get")})}r(t,"defineDeprecationWarning");function s(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}r(s,"getIteratorFn");function n(e,o){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var l=e+"."+o;ge[l]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",o,e),ge[l]=!0)}r(n,"warnNoop");function a(e,o,l){this.props=e,this.context=o,this.refs=ue,this.updater=l||he}r(a,"Component");function f(){}r(f,"ComponentDummy");function h(e,o,l){this.props=e,this.context=o,this.refs=ue,this.updater=l||he}r(h,"PureComponent");function m(){}r(m,"noop");function x(e){return""+e}r(x,"testStringCoercion");function R(e){try{x(e);var o=!1}catch{o=!0}if(o){o=console;var l=o.error,c=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",c),x(e)}}r(R,"checkKeyStringCoercion");function y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===St?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ie:return"Fragment";case i:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case I:return"SuspenseList";case j:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ce:return"Portal";case P:return e.displayName||"Context";case v:return(e._context.displayName||"Context")+".Consumer";case z:var o=e.render;return e=e.displayName,e||(e=o.displayName||o.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return o=e.displayName||null,o!==null?o:y(e.type)||"Memo";case q:o=e._payload,e=e._init;try{return y(e(o))}catch{}}return null}r(y,"getComponentNameFromType");function L(e){if(e===ie)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===q)return"<...>";try{var o=y(e);return o?"<"+o+">":"<...>"}catch{return"<...>"}}r(L,"getTaskName");function M(){var e=E.A;return e===null?null:e.getOwner()}r(M,"getOwner");function Q(){return Error("react-stack-top-frame")}r(Q,"UnknownOwner");function Y(e){if(Re.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}r(Y,"hasValidKey");function re(e,o){function l(){Ue||(Ue=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}r(l,"warnAboutAccessingKey"),l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}r(re,"defineKeyPropWarningGetter");function V(){var e=y(this.type);return Ve[e]||(Ve[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}r(V,"elementRefGetterWithDeprecationWarning");function G(e,o,l,c,g,T){var k=l.ref;return e={$$typeof:H,type:e,key:o,props:l,_owner:c},(k!==void 0?k:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:V}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:g}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:T}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}r(G,"ReactElement");function ee(e,o){return o=G(e.type,o,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(o._store.validated=e._store.validated),o}r(ee,"cloneAndReplaceKey");function W(e){B(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===q&&(e._payload.status==="fulfilled"?B(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}r(W,"validateChildKeys");function B(e){return typeof e=="object"&&e!==null&&e.$$typeof===H}r(B,"isValidElement");function oe(e){var o={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(l){return o[l]})}r(oe,"escape");function X(e,o){return typeof e=="object"&&e!==null&&e.key!=null?(R(e.key),oe(""+e.key)):o.toString(36)}r(X,"getElementKey");function ne(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(m,m):(e.status="pending",e.then(function(o){e.status==="pending"&&(e.status="fulfilled",e.value=o)},function(o){e.status==="pending"&&(e.status="rejected",e.reason=o)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}r(ne,"resolveThenable");function U(e,o,l,c,g){var T=typeof e;(T==="undefined"||T==="boolean")&&(e=null);var k=!1;if(e===null)k=!0;else switch(T){case"bigint":case"string":case"number":k=!0;break;case"object":switch(e.$$typeof){case H:case ce:k=!0;break;case q:return k=e._init,U(k(e._payload),o,l,c,g)}}if(k){k=e,g=g(k);var O=c===""?"."+X(k,0):c;return Ye(g)?(l="",O!=null&&(l=O.replace(Be,"$&/")+"/"),U(g,o,l,"",function(de){return de})):g!=null&&(B(g)&&(g.key!=null&&(k&&k.key===g.key||R(g.key)),l=ee(g,l+(g.key==null||k&&k.key===g.key?"":(""+g.key).replace(Be,"$&/")+"/")+O),c!==""&&k!=null&&B(k)&&k.key==null&&k._store&&!k._store.validated&&(l._store.validated=2),g=l),o.push(g)),1}if(k=0,O=c===""?".":c+":",Ye(e))for(var S=0;S<e.length;S++)c=e[S],T=O+X(c,S),k+=U(c,o,l,T,g);else if(S=s(e),typeof S=="function")for(S===e.entries&&(qe||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),qe=!0),e=S.call(e),S=0;!(c=e.next()).done;)c=c.value,T=O+X(c,S++),k+=U(c,o,l,T,g);else if(T==="object"){if(typeof e.then=="function")return U(ne(e),o,l,c,g);throw o=String(e),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return k}r(U,"mapIntoArray");function p(e,o,l){if(e==null)return e;var c=[],g=0;return U(e,c,"","",function(T){return o.call(l,T,g++)}),c}r(p,"mapChildren");function D(e){if(e._status===-1){var o=e._ioInfo;o!=null&&(o.start=o.end=performance.now()),o=e._result;var l=o();if(l.then(function(g){if(e._status===0||e._status===-1){e._status=1,e._result=g;var T=e._ioInfo;T!=null&&(T.end=performance.now()),l.status===void 0&&(l.status="fulfilled",l.value=g)}},function(g){if(e._status===0||e._status===-1){e._status=2,e._result=g;var T=e._ioInfo;T!=null&&(T.end=performance.now()),l.status===void 0&&(l.status="rejected",l.reason=g)}}),o=e._ioInfo,o!=null){o.value=l;var c=l.displayName;typeof c=="string"&&(o.name=c)}e._status===-1&&(e._status=0,e._result=l)}if(e._status===1)return o=e._result,o===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,o),"default"in o||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,o),o.default;throw e._result}r(D,"lazyInitializer");function C(){var e=E.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}r(C,"resolveDispatcher");function me(){E.asyncTransitions--}r(me,"releaseAsyncTransition");function Z(e){if(Te===null)try{var o=("require"+Math.random()).slice(0,7);Te=(Ce&&Ce[o]).call(Ce,"timers").setImmediate}catch{Te=r(function(c){Qe===!1&&(Qe=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var g=new MessageChannel;g.port1.onmessage=c,g.port2.postMessage(void 0)},"enqueueTaskImpl")}return Te(e)}r(Z,"enqueueTask");function te(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}r(te,"aggregateErrors");function se(e,o){o!==Se-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Se=o}r(se,"popActScope");function K(e,o,l){var c=E.actQueue;if(c!==null)if(c.length!==0)try{F(c),Z(function(){return K(e,o,l)});return}catch(g){E.thrownErrors.push(g)}else E.actQueue=null;0<E.thrownErrors.length?(c=te(E.thrownErrors),E.thrownErrors.length=0,l(c)):o(e)}r(K,"recursivelyFlushAsyncActWork");function F(e){if(!ze){ze=!0;var o=0;try{for(;o<e.length;o++){var l=e[o];do{E.didUsePromise=!1;var c=l(!1);if(c!==null){if(E.didUsePromise){e[o]=l,e.splice(0,o);return}l=c}else break}while(!0)}e.length=0}catch(g){e.splice(0,o+1),E.thrownErrors.push(g)}finally{ze=!1}}}r(F,"flushActQueue"),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var H=Symbol.for("react.transitional.element"),ce=Symbol.for("react.portal"),ie=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),P=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),be=Symbol.iterator,ge={},he={isMounted:r(function(){return!1},"isMounted"),enqueueForceUpdate:r(function(e){n(e,"forceUpdate")},"enqueueForceUpdate"),enqueueReplaceState:r(function(e){n(e,"replaceState")},"enqueueReplaceState"),enqueueSetState:r(function(e){n(e,"setState")},"enqueueSetState")},ve=Object.assign,ue={};Object.freeze(ue),a.prototype.isReactComponent={},a.prototype.setState=function(e,o){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,o,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var J={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(xe in J)J.hasOwnProperty(xe)&&t(xe,J[xe]);f.prototype=a.prototype,J=h.prototype=new f,J.constructor=h,ve(J,a.prototype),J.isPureReactComponent=!0;var Ye=Array.isArray,St=Symbol.for("react.client.reference"),E={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Re=Object.prototype.hasOwnProperty,We=console.createTask?console.createTask:function(){return null};J={react_stack_bottom_frame:r(function(e){return e()},"react_stack_bottom_frame")};var Ue,Fe,Ve={},At=J.react_stack_bottom_frame.bind(J,Q)(),Ot=We(L(Q)),qe=!1,Be=/\/+/g,He=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Qe=!1,Te=null,Se=0,Ae=!1,ze=!1,Ke=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:Z;J=Object.freeze({__proto__:null,c:r(function(e){return C().useMemoCache(e)},"c")});var xe={map:p,forEach:r(function(e,o,l){p(e,function(){o.apply(this,arguments)},l)},"forEach"),count:r(function(e){var o=0;return p(e,function(){o++}),o},"count"),toArray:r(function(e){return p(e,function(o){return o})||[]},"toArray"),only:r(function(e){if(!B(e))throw Error("React.Children.only expected to receive a single React element child.");return e},"only")};w.Activity=j,w.Children=xe,w.Component=a,w.Fragment=ie,w.Profiler=i,w.PureComponent=h,w.StrictMode=b,w.Suspense=N,w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,w.__COMPILER_RUNTIME=J,w.act=function(e){var o=E.actQueue,l=Se;Se++;var c=E.actQueue=o!==null?o:[],g=!1;try{var T=e()}catch(S){E.thrownErrors.push(S)}if(0<E.thrownErrors.length)throw se(o,l),e=te(E.thrownErrors),E.thrownErrors.length=0,e;if(T!==null&&typeof T=="object"&&typeof T.then=="function"){var k=T;return Ke(function(){g||Ae||(Ae=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:r(function(S,de){g=!0,k.then(function(ke){if(se(o,l),l===0){try{F(c),Z(function(){return K(ke,S,de)})}catch(Pt){E.thrownErrors.push(Pt)}if(0<E.thrownErrors.length){var Ct=te(E.thrownErrors);E.thrownErrors.length=0,de(Ct)}}else S(ke)},function(ke){se(o,l),0<E.thrownErrors.length&&(ke=te(E.thrownErrors),E.thrownErrors.length=0),de(ke)})},"then")}}var O=T;if(se(o,l),l===0&&(F(c),c.length!==0&&Ke(function(){g||Ae||(Ae=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),E.actQueue=null),0<E.thrownErrors.length)throw e=te(E.thrownErrors),E.thrownErrors.length=0,e;return{then:r(function(S,de){g=!0,l===0?(E.actQueue=c,Z(function(){return K(O,S,de)})):S(O)},"then")}},w.cache=function(e){return function(){return e.apply(null,arguments)}},w.cacheSignal=function(){return null},w.captureOwnerStack=function(){var e=E.getCurrentStack;return e===null?null:e()},w.cloneElement=function(e,o,l){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var c=ve({},e.props),g=e.key,T=e._owner;if(o!=null){var k;e:{if(Re.call(o,"ref")&&(k=Object.getOwnPropertyDescriptor(o,"ref").get)&&k.isReactWarning){k=!1;break e}k=o.ref!==void 0}k&&(T=M()),Y(o)&&(R(o.key),g=""+o.key);for(O in o)!Re.call(o,O)||O==="key"||O==="__self"||O==="__source"||O==="ref"&&o.ref===void 0||(c[O]=o[O])}var O=arguments.length-2;if(O===1)c.children=l;else if(1<O){k=Array(O);for(var S=0;S<O;S++)k[S]=arguments[S+2];c.children=k}for(c=G(e.type,g,c,T,e._debugStack,e._debugTask),g=2;g<arguments.length;g++)W(arguments[g]);return c},w.createContext=function(e){return e={$$typeof:P,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:v,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},w.createElement=function(e,o,l){for(var c=2;c<arguments.length;c++)W(arguments[c]);c={};var g=null;if(o!=null)for(S in Fe||!("__self"in o)||"key"in o||(Fe=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),Y(o)&&(R(o.key),g=""+o.key),o)Re.call(o,S)&&S!=="key"&&S!=="__self"&&S!=="__source"&&(c[S]=o[S]);var T=arguments.length-2;if(T===1)c.children=l;else if(1<T){for(var k=Array(T),O=0;O<T;O++)k[O]=arguments[O+2];Object.freeze&&Object.freeze(k),c.children=k}if(e&&e.defaultProps)for(S in T=e.defaultProps,T)c[S]===void 0&&(c[S]=T[S]);g&&re(c,typeof e=="function"?e.displayName||e.name||"Unknown":e);var S=1e4>E.recentlyCreatedOwnerStacks++;return G(e,g,c,M(),S?Error("react-stack-top-frame"):At,S?We(L(e)):Ot)},w.createRef=function(){var e={current:null};return Object.seal(e),e},w.forwardRef=function(e){e!=null&&e.$$typeof===A?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var o={$$typeof:z,render:e},l;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:r(function(){return l},"get"),set:r(function(c){l=c,e.name||e.displayName||(Object.defineProperty(e,"name",{value:c}),e.displayName=c)},"set")}),o},w.isValidElement=B,w.lazy=function(e){e={_status:-1,_result:e};var o={$$typeof:q,_payload:e,_init:D},l={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return e._ioInfo=l,o._debugInfo=[{awaited:l}],o},w.memo=function(e,o){e==null&&console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),o={$$typeof:A,type:e,compare:o===void 0?null:o};var l;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:r(function(){return l},"get"),set:r(function(c){l=c,e.name||e.displayName||(Object.defineProperty(e,"name",{value:c}),e.displayName=c)},"set")}),o},w.startTransition=function(e){var o=E.T,l={};l._updatedFibers=new Set,E.T=l;try{var c=e(),g=E.S;g!==null&&g(l,c),typeof c=="object"&&c!==null&&typeof c.then=="function"&&(E.asyncTransitions++,c.then(me,me),c.then(m,He))}catch(T){He(T)}finally{o===null&&l._updatedFibers&&(e=l._updatedFibers.size,l._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),o!==null&&l.types!==null&&(o.types!==null&&o.types!==l.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),o.types=l.types),E.T=o}},w.unstable_useCacheRefresh=function(){return C().useCacheRefresh()},w.use=function(e){return C().use(e)},w.useActionState=function(e,o,l){return C().useActionState(e,o,l)},w.useCallback=function(e,o){return C().useCallback(e,o)},w.useContext=function(e){var o=C();return e.$$typeof===v&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),o.useContext(e)},w.useDebugValue=function(e,o){return C().useDebugValue(e,o)},w.useDeferredValue=function(e,o){return C().useDeferredValue(e,o)},w.useEffect=function(e,o){return e==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useEffect(e,o)},w.useEffectEvent=function(e){return C().useEffectEvent(e)},w.useId=function(){return C().useId()},w.useImperativeHandle=function(e,o,l){return C().useImperativeHandle(e,o,l)},w.useInsertionEffect=function(e,o){return e==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useInsertionEffect(e,o)},w.useLayoutEffect=function(e,o){return e==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),C().useLayoutEffect(e,o)},w.useMemo=function(e,o){return C().useMemo(e,o)},w.useOptimistic=function(e,o){return C().useOptimistic(e,o)},w.useReducer=function(e,o,l){return C().useReducer(e,o,l)},w.useRef=function(e){return C().useRef(e)},w.useState=function(e){return C().useState(e)},w.useSyncExternalStore=function(e,o,l){return C().useSyncExternalStore(e,o,l)},w.useTransition=function(){return C().useTransition()},w.version="19.2.7",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Me=_e((Mr,Ze)=>{"use strict";Ze.exports=Xe()});var et=_e(Je=>{"use strict";(function(){var t=Me().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;Je.c=function(s){var n=t.H;return n===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
14
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
15
|
+
2. You might be breaking the Rules of Hooks
|
|
16
|
+
3. You might have more than one copy of React in the same app
|
|
17
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),n.useMemoCache(s)}})()});var Gt=_e((Lr,tt)=>{"use strict";tt.exports=et()});var rt=_e(Ie=>{"use strict";(function(){function t(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===me?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case G:return"Fragment";case W:return"Profiler";case ee:return"StrictMode";case ne:return"Suspense";case U:return"SuspenseList";case C:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case V:return"Portal";case oe:return i.displayName||"Context";case B:return(i._context.displayName||"Context")+".Consumer";case X:var v=i.render;return i=i.displayName,i||(i=v.displayName||v.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case p:return v=i.displayName||null,v!==null?v:t(i.type)||"Memo";case D:v=i._payload,i=i._init;try{return t(i(v))}catch{}}return null}r(t,"getComponentNameFromType");function s(i){return""+i}r(s,"testStringCoercion");function n(i){try{s(i);var v=!1}catch{v=!0}if(v){v=console;var P=v.error,z=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return P.call(v,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",z),s(i)}}r(n,"checkKeyStringCoercion");function a(i){if(i===G)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===D)return"<...>";try{var v=t(i);return v?"<"+v+">":"<...>"}catch{return"<...>"}}r(a,"getTaskName");function f(){var i=Z.A;return i===null?null:i.getOwner()}r(f,"getOwner");function h(){return Error("react-stack-top-frame")}r(h,"UnknownOwner");function m(i){if(te.call(i,"key")){var v=Object.getOwnPropertyDescriptor(i,"key").get;if(v&&v.isReactWarning)return!1}return i.key!==void 0}r(m,"hasValidKey");function x(i,v){function P(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",v))}r(P,"warnAboutAccessingKey"),P.isReactWarning=!0,Object.defineProperty(i,"key",{get:P,configurable:!0})}r(x,"defineKeyPropWarningGetter");function R(){var i=t(this.type);return H[i]||(H[i]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),i=this.props.ref,i!==void 0?i:null}r(R,"elementRefGetterWithDeprecationWarning");function y(i,v,P,z,N,I){var A=P.ref;return i={$$typeof:re,type:i,key:v,props:P,_owner:z},(A!==void 0?A:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:R}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:N}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}r(y,"ReactElement");function L(i,v,P,z,N,I){var A=v.children;if(A!==void 0)if(z)if(se(A)){for(z=0;z<A.length;z++)M(A[z]);Object.freeze&&Object.freeze(A)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(A);if(te.call(v,"key")){A=t(i);var q=Object.keys(v).filter(function(be){return be!=="key"});z=0<q.length?"{key: someKey, "+q.join(": ..., ")+": ...}":"{key: someKey}",b[A+z]||(q=0<q.length?"{"+q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,z,A,q,A),b[A+z]=!0)}if(A=null,P!==void 0&&(n(P),A=""+P),m(v)&&(n(v.key),A=""+v.key),"key"in v){P={};for(var j in v)j!=="key"&&(P[j]=v[j])}else P=v;return A&&x(P,typeof i=="function"?i.displayName||i.name||"Unknown":i),y(i,A,P,f(),N,I)}r(L,"jsxDEVImpl");function M(i){Q(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===D&&(i._payload.status==="fulfilled"?Q(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}r(M,"validateChildKeys");function Q(i){return typeof i=="object"&&i!==null&&i.$$typeof===re}r(Q,"isValidElement");var Y=Me(),re=Symbol.for("react.transitional.element"),V=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),oe=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),me=Symbol.for("react.client.reference"),Z=Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,se=Array.isArray,K=console.createTask?console.createTask:function(){return null};Y={react_stack_bottom_frame:r(function(i){return i()},"react_stack_bottom_frame")};var F,H={},ce=Y.react_stack_bottom_frame.bind(Y,h)(),ie=K(a(h)),b={};Ie.Fragment=G,Ie.jsxDEV=function(i,v,P,z){var N=1e4>Z.recentlyCreatedOwnerStacks++;return L(i,v,P,z,N?Error("react-stack-top-frame"):ce,N?K(a(i)):ie)}})()});var Dt=_e(($r,ot)=>{"use strict";ot.exports=rt()});function nt(t){var s,n,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var f=t.length;for(s=0;s<f;s++)t[s]&&(n=nt(t[s]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}r(nt,"r");function st(){for(var t,s,n=0,a="",f=arguments.length;n<f;n++)(t=arguments[n])&&(s=nt(t))&&(a&&(a+=" "),a+=s);return a}r(st,"clsx");var $t=r((t,s)=>{let n=new Array(t.length+s.length);for(let a=0;a<t.length;a++)n[a]=t[a];for(let a=0;a<s.length;a++)n[t.length+a]=s[a];return n},"concatArrays"),Yt=r((t,s)=>({classGroupId:t,validator:s}),"createClassValidatorObject"),ft=r((t=new Map,s=null,n)=>({nextPart:t,validators:s,classGroupId:n}),"createClassPartObject"),je="-",at=[],Wt="arbitrary..",Ut=r(t=>{let s=Vt(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=t;return{getClassGroupId:r(m=>{if(m.startsWith("[")&&m.endsWith("]"))return Ft(m);let x=m.split(je),R=x[0]===""&&x.length>1?1:0;return pt(x,R,s)},"getClassGroupId"),getConflictingClassGroupIds:r((m,x)=>{if(x){let R=a[m],y=n[m];return R?y?$t(y,R):R:y||at}return n[m]||at},"getConflictingClassGroupIds")}},"createClassGroupUtils"),pt=r((t,s,n)=>{if(t.length-s===0)return n.classGroupId;let f=t[s],h=n.nextPart.get(f);if(h){let y=pt(t,s+1,h);if(y)return y}let m=n.validators;if(m===null)return;let x=s===0?t.join(je):t.slice(s).join(je),R=m.length;for(let y=0;y<R;y++){let L=m[y];if(L.validator(x))return L.classGroupId}},"getGroupRecursive"),Ft=r(t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let s=t.slice(1,-1),n=s.indexOf(":"),a=s.slice(0,n);return a?Wt+a:void 0})(),"getGroupIdForArbitraryProperty"),Vt=r(t=>{let{theme:s,classGroups:n}=t;return qt(n,s)},"createClassMap"),qt=r((t,s)=>{let n=ft();for(let a in t){let f=t[a];De(f,n,a,s)}return n},"processClassGroups"),De=r((t,s,n,a)=>{let f=t.length;for(let h=0;h<f;h++){let m=t[h];Bt(m,s,n,a)}},"processClassesRecursively"),Bt=r((t,s,n,a)=>{if(typeof t=="string"){Ht(t,s,n);return}if(typeof t=="function"){Qt(t,s,n,a);return}Kt(t,s,n,a)},"processClassDefinition"),Ht=r((t,s,n)=>{let a=t===""?s:mt(s,t);a.classGroupId=n},"processStringDefinition"),Qt=r((t,s,n,a)=>{if(Xt(t)){De(t(a),s,n,a);return}s.validators===null&&(s.validators=[]),s.validators.push(Yt(n,t))},"processFunctionDefinition"),Kt=r((t,s,n,a)=>{let f=Object.entries(t),h=f.length;for(let m=0;m<h;m++){let[x,R]=f[m];De(R,mt(s,x),n,a)}},"processObjectDefinition"),mt=r((t,s)=>{let n=t,a=s.split(je),f=a.length;for(let h=0;h<f;h++){let m=a[h],x=n.nextPart.get(m);x||(x=ft(),n.nextPart.set(m,x)),n=x}return n},"getPart"),Xt=r(t=>"isThemeGetter"in t&&t.isThemeGetter===!0,"isThemeGetter"),Zt=r(t=>{if(t<1)return{get:r(()=>{},"get"),set:r(()=>{},"set")};let s=0,n=Object.create(null),a=Object.create(null),f=r((h,m)=>{n[h]=m,s++,s>t&&(s=0,a=n,n=Object.create(null))},"update");return{get(h){let m=n[h];if(m!==void 0)return m;if((m=a[h])!==void 0)return f(h,m),m},set(h,m){h in n?n[h]=m:f(h,m)}}},"createLruCache"),Ge="!",it=":",Jt=[],lt=r((t,s,n,a,f)=>({modifiers:t,hasImportantModifier:s,baseClassName:n,maybePostfixModifierPosition:a,isExternal:f}),"createResultObject"),er=r(t=>{let{prefix:s,experimentalParseClassName:n}=t,a=r(f=>{let h=[],m=0,x=0,R=0,y,L=f.length;for(let V=0;V<L;V++){let G=f[V];if(m===0&&x===0){if(G===it){h.push(f.slice(R,V)),R=V+1;continue}if(G==="/"){y=V;continue}}G==="["?m++:G==="]"?m--:G==="("?x++:G===")"&&x--}let M=h.length===0?f:f.slice(R),Q=M,Y=!1;M.endsWith(Ge)?(Q=M.slice(0,-1),Y=!0):M.startsWith(Ge)&&(Q=M.slice(1),Y=!0);let re=y&&y>R?y-R:void 0;return lt(h,Y,Q,re)},"parseClassName");if(s){let f=s+it,h=a;a=r(m=>m.startsWith(f)?h(m.slice(f.length)):lt(Jt,!1,m,void 0,!0),"parseClassName")}if(n){let f=a;a=r(h=>n({className:h,parseClassName:f}),"parseClassName")}return a},"createParseClassName"),tr=r(t=>{let s=new Map;return t.orderSensitiveModifiers.forEach((n,a)=>{s.set(n,1e6+a)}),n=>{let a=[],f=[];for(let h=0;h<n.length;h++){let m=n[h],x=m[0]==="[",R=s.has(m);x||R?(f.length>0&&(f.sort(),a.push(...f),f=[]),a.push(m)):f.push(m)}return f.length>0&&(f.sort(),a.push(...f)),a}},"createSortModifiers"),rr=r(t=>({cache:Zt(t.cacheSize),parseClassName:er(t),sortModifiers:tr(t),postfixLookupClassGroupIds:or(t),...Ut(t)}),"createConfigUtils"),or=r(t=>{let s=Object.create(null),n=t.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)s[n[a]]=!0;return s},"createPostfixLookupClassGroupIds"),nr=/\s+/,sr=r((t,s)=>{let{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:f,sortModifiers:h,postfixLookupClassGroupIds:m}=s,x=[],R=t.trim().split(nr),y="";for(let L=R.length-1;L>=0;L-=1){let M=R[L],{isExternal:Q,modifiers:Y,hasImportantModifier:re,baseClassName:V,maybePostfixModifierPosition:G}=n(M);if(Q){y=M+(y.length>0?" "+y:y);continue}let ee=!!G,W;if(ee){let U=V.substring(0,G);W=a(U);let p=W&&m[W]?a(V):void 0;p&&p!==W&&(W=p,ee=!1)}else W=a(V);if(!W){if(!ee){y=M+(y.length>0?" "+y:y);continue}if(W=a(V),!W){y=M+(y.length>0?" "+y:y);continue}ee=!1}let B=Y.length===0?"":Y.length===1?Y[0]:h(Y).join(":"),oe=re?B+Ge:B,X=oe+W;if(x.indexOf(X)>-1)continue;x.push(X);let ne=f(W,ee);for(let U=0;U<ne.length;++U){let p=ne[U];x.push(oe+p)}y=M+(y.length>0?" "+y:y)}return y},"mergeClassList"),ar=r((...t)=>{let s=0,n,a,f="";for(;s<t.length;)(n=t[s++])&&(a=bt(n))&&(f&&(f+=" "),f+=a);return f},"twJoin"),bt=r(t=>{if(typeof t=="string")return t;let s,n="";for(let a=0;a<t.length;a++)t[a]&&(s=bt(t[a]))&&(n&&(n+=" "),n+=s);return n},"toValue"),ir=r((t,...s)=>{let n,a,f,h,m=r(R=>{let y=s.reduce((L,M)=>M(L),t());return n=rr(y),a=n.cache.get,f=n.cache.set,h=x,x(R)},"initTailwindMerge"),x=r(R=>{let y=a(R);if(y)return y;let L=sr(R,n);return f(R,L),L},"tailwindMerge");return h=m,(...R)=>h(ar(...R))},"createTailwindMerge"),lr=[],$=r(t=>{let s=r(n=>n[t]||lr,"themeGetter");return s.isThemeGetter=!0,s},"fromTheme"),gt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ht=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ur=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=r(t=>cr.test(t),"isFraction"),_=r(t=>!!t&&!Number.isNaN(Number(t)),"isNumber"),ae=r(t=>!!t&&Number.isInteger(Number(t)),"isInteger"),Le=r(t=>t.endsWith("%")&&_(t.slice(0,-1)),"isPercent"),le=r(t=>ur.test(t),"isTshirtSize"),yt=r(()=>!0,"isAny"),br=r(t=>dr.test(t)&&!fr.test(t),"isLengthOnly"),$e=r(()=>!1,"isNever"),gr=r(t=>pr.test(t),"isShadow"),hr=r(t=>mr.test(t),"isImage"),yr=r(t=>!u(t)&&!d(t),"isAnyNonArbitrary"),wr=r(t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),"isNamedContainerQuery"),vr=r(t=>pe(t,kt,$e),"isArbitrarySize"),u=r(t=>gt.test(t),"isArbitraryValue"),ye=r(t=>pe(t,_t,br),"isArbitraryLength"),ct=r(t=>pe(t,Ar,_),"isArbitraryNumber"),kr=r(t=>pe(t,Et,yt),"isArbitraryWeight"),_r=r(t=>pe(t,xt,$e),"isArbitraryFamilyName"),ut=r(t=>pe(t,wt,$e),"isArbitraryPosition"),xr=r(t=>pe(t,vt,hr),"isArbitraryImage"),Pe=r(t=>pe(t,Rt,gr),"isArbitraryShadow"),d=r(t=>ht.test(t),"isArbitraryVariable"),Ee=r(t=>we(t,_t),"isArbitraryVariableLength"),Er=r(t=>we(t,xt),"isArbitraryVariableFamilyName"),dt=r(t=>we(t,wt),"isArbitraryVariablePosition"),Rr=r(t=>we(t,kt),"isArbitraryVariableSize"),Tr=r(t=>we(t,vt),"isArbitraryVariableImage"),Ne=r(t=>we(t,Rt,!0),"isArbitraryVariableShadow"),Sr=r(t=>we(t,Et,!0),"isArbitraryVariableWeight"),pe=r((t,s,n)=>{let a=gt.exec(t);return a?a[1]?s(a[1]):n(a[2]):!1},"getIsArbitraryValue"),we=r((t,s,n=!1)=>{let a=ht.exec(t);return a?a[1]?s(a[1]):n:!1},"getIsArbitraryVariable"),wt=r(t=>t==="position"||t==="percentage","isLabelPosition"),vt=r(t=>t==="image"||t==="url","isLabelImage"),kt=r(t=>t==="length"||t==="size"||t==="bg-size","isLabelSize"),_t=r(t=>t==="length","isLabelLength"),Ar=r(t=>t==="number","isLabelNumber"),xt=r(t=>t==="family-name","isLabelFamilyName"),Et=r(t=>t==="number"||t==="weight","isLabelWeight"),Rt=r(t=>t==="shadow","isLabelShadow");var Or=r(()=>{let t=$("color"),s=$("font"),n=$("text"),a=$("font-weight"),f=$("tracking"),h=$("leading"),m=$("breakpoint"),x=$("container"),R=$("spacing"),y=$("radius"),L=$("shadow"),M=$("inset-shadow"),Q=$("text-shadow"),Y=$("drop-shadow"),re=$("blur"),V=$("perspective"),G=$("aspect"),ee=$("ease"),W=$("animate"),B=r(()=>["auto","avoid","all","avoid-page","page","left","right","column"],"scaleBreak"),oe=r(()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],"scalePosition"),X=r(()=>[...oe(),d,u],"scalePositionWithArbitrary"),ne=r(()=>["auto","hidden","clip","visible","scroll"],"scaleOverflow"),U=r(()=>["auto","contain","none"],"scaleOverscroll"),p=r(()=>[d,u,R],"scaleUnambiguousSpacing"),D=r(()=>[fe,"full","auto",...p()],"scaleInset"),C=r(()=>[ae,"none","subgrid",d,u],"scaleGridTemplateColsRows"),me=r(()=>["auto",{span:["full",ae,d,u]},ae,d,u],"scaleGridColRowStartAndEnd"),Z=r(()=>[ae,"auto",d,u],"scaleGridColRowStartOrEnd"),te=r(()=>["auto","min","max","fr",d,u],"scaleGridAutoColsRows"),se=r(()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],"scaleAlignPrimaryAxis"),K=r(()=>["start","end","center","stretch","center-safe","end-safe"],"scaleAlignSecondaryAxis"),F=r(()=>["auto",...p()],"scaleMargin"),H=r(()=>[fe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],"scaleSizing"),ce=r(()=>[fe,"screen","full","dvw","lvw","svw","min","max","fit",...p()],"scaleSizingInline"),ie=r(()=>[fe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...p()],"scaleSizingBlock"),b=r(()=>[t,d,u],"scaleColor"),i=r(()=>[...oe(),dt,ut,{position:[d,u]}],"scaleBgPosition"),v=r(()=>["no-repeat",{repeat:["","x","y","space","round"]}],"scaleBgRepeat"),P=r(()=>["auto","cover","contain",Rr,vr,{size:[d,u]}],"scaleBgSize"),z=r(()=>[Le,Ee,ye],"scaleGradientStopPosition"),N=r(()=>["","none","full",y,d,u],"scaleRadius"),I=r(()=>["",_,Ee,ye],"scaleBorderWidth"),A=r(()=>["solid","dashed","dotted","double"],"scaleLineStyle"),q=r(()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],"scaleBlendMode"),j=r(()=>[_,Le,dt,ut],"scaleMaskImagePosition"),be=r(()=>["","none",re,d,u],"scaleBlur"),ge=r(()=>["none",_,d,u],"scaleRotate"),he=r(()=>["none",_,d,u],"scaleScale"),ve=r(()=>[_,d,u],"scaleSkew"),ue=r(()=>[fe,"full",...p()],"scaleTranslate");return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[le],breakpoint:[le],color:[yt],container:[le],"drop-shadow":[le],ease:["in","out","in-out"],font:[yr],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[le],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[le],shadow:[le],spacing:["px",_],text:[le],"text-shadow":[le],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fe,u,d,G]}],container:["container"],"container-type":[{"@container":["","normal","size",d,u]}],"container-named":[wr],columns:[{columns:[_,u,d,x]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:X()}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[ae,"auto",d,u]}],basis:[{basis:[fe,"full","auto",x,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_,fe,"auto","initial","none",u]}],grow:[{grow:["",_,d,u]}],shrink:[{shrink:["",_,d,u]}],order:[{order:[ae,"first","last","none",d,u]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:me()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:me()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pbs:[{pbs:p()}],pbe:[{pbe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...ie()]}],"min-block-size":[{"min-block":["auto",...ie()]}],"max-block-size":[{"max-block":["none",...ie()]}],w:[{w:[x,"screen",...H()]}],"min-w":[{"min-w":[x,"screen","none",...H()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[m]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,Ee,ye]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,Sr,kr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Le,u]}],"font-family":[{font:[Er,_r,s]}],"font-features":[{"font-features":[u]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[f,d,u]}],"line-clamp":[{"line-clamp":[_,"none",d,ct]}],leading:[{leading:[h,...p()]}],"list-image":[{"list-image":["none",d,u]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",d,u]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:b()}],"text-color":[{text:b()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...A(),"wavy"]}],"text-decoration-thickness":[{decoration:[_,"from-font","auto",d,ye]}],"text-decoration-color":[{decoration:b()}],"underline-offset":[{"underline-offset":[_,"auto",d,u]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"tab-size":[{tab:[ae,d,u]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",d,u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",d,u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:i()}],"bg-repeat":[{bg:v()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ae,d,u],radial:["",d,u],conic:[ae,d,u]},Tr,xr]}],"bg-color":[{bg:b()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:b()}],"gradient-via":[{via:b()}],"gradient-to":[{to:b()}],rounded:[{rounded:N()}],"rounded-s":[{"rounded-s":N()}],"rounded-e":[{"rounded-e":N()}],"rounded-t":[{"rounded-t":N()}],"rounded-r":[{"rounded-r":N()}],"rounded-b":[{"rounded-b":N()}],"rounded-l":[{"rounded-l":N()}],"rounded-ss":[{"rounded-ss":N()}],"rounded-se":[{"rounded-se":N()}],"rounded-ee":[{"rounded-ee":N()}],"rounded-es":[{"rounded-es":N()}],"rounded-tl":[{"rounded-tl":N()}],"rounded-tr":[{"rounded-tr":N()}],"rounded-br":[{"rounded-br":N()}],"rounded-bl":[{"rounded-bl":N()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...A(),"hidden","none"]}],"divide-style":[{divide:[...A(),"hidden","none"]}],"border-color":[{border:b()}],"border-color-x":[{"border-x":b()}],"border-color-y":[{"border-y":b()}],"border-color-s":[{"border-s":b()}],"border-color-e":[{"border-e":b()}],"border-color-bs":[{"border-bs":b()}],"border-color-be":[{"border-be":b()}],"border-color-t":[{"border-t":b()}],"border-color-r":[{"border-r":b()}],"border-color-b":[{"border-b":b()}],"border-color-l":[{"border-l":b()}],"divide-color":[{divide:b()}],"outline-style":[{outline:[...A(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_,d,u]}],"outline-w":[{outline:["",_,Ee,ye]}],"outline-color":[{outline:b()}],shadow:[{shadow:["","none",L,Ne,Pe]}],"shadow-color":[{shadow:b()}],"inset-shadow":[{"inset-shadow":["none",M,Ne,Pe]}],"inset-shadow-color":[{"inset-shadow":b()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:b()}],"ring-offset-w":[{"ring-offset":[_,ye]}],"ring-offset-color":[{"ring-offset":b()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":b()}],"text-shadow":[{"text-shadow":["none",Q,Ne,Pe]}],"text-shadow-color":[{"text-shadow":b()}],opacity:[{opacity:[_,d,u]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[_]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":b()}],"mask-image-linear-to-color":[{"mask-linear-to":b()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":b()}],"mask-image-t-to-color":[{"mask-t-to":b()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":b()}],"mask-image-r-to-color":[{"mask-r-to":b()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":b()}],"mask-image-b-to-color":[{"mask-b-to":b()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":b()}],"mask-image-l-to-color":[{"mask-l-to":b()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":b()}],"mask-image-x-to-color":[{"mask-x-to":b()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":b()}],"mask-image-y-to-color":[{"mask-y-to":b()}],"mask-image-radial":[{"mask-radial":[d,u]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":b()}],"mask-image-radial-to-color":[{"mask-radial-to":b()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":oe()}],"mask-image-conic-pos":[{"mask-conic":[_]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":b()}],"mask-image-conic-to-color":[{"mask-conic-to":b()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:i()}],"mask-repeat":[{mask:v()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",d,u]}],filter:[{filter:["","none",d,u]}],blur:[{blur:be()}],brightness:[{brightness:[_,d,u]}],contrast:[{contrast:[_,d,u]}],"drop-shadow":[{"drop-shadow":["","none",Y,Ne,Pe]}],"drop-shadow-color":[{"drop-shadow":b()}],grayscale:[{grayscale:["",_,d,u]}],"hue-rotate":[{"hue-rotate":[_,d,u]}],invert:[{invert:["",_,d,u]}],saturate:[{saturate:[_,d,u]}],sepia:[{sepia:["",_,d,u]}],"backdrop-filter":[{"backdrop-filter":["","none",d,u]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[_,d,u]}],"backdrop-contrast":[{"backdrop-contrast":[_,d,u]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_,d,u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_,d,u]}],"backdrop-invert":[{"backdrop-invert":["",_,d,u]}],"backdrop-opacity":[{"backdrop-opacity":[_,d,u]}],"backdrop-saturate":[{"backdrop-saturate":[_,d,u]}],"backdrop-sepia":[{"backdrop-sepia":["",_,d,u]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",d,u]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_,"initial",d,u]}],ease:[{ease:["linear","initial",ee,d,u]}],delay:[{delay:[_,d,u]}],animate:[{animate:["none",W,d,u]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[V,d,u]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:he()}],"scale-x":[{"scale-x":he()}],"scale-y":[{"scale-y":he()}],"scale-z":[{"scale-z":he()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[d,u,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],zoom:[{zoom:[ae,d,u]}],accent:[{accent:b()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:b()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",d,u]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":b()}],"scrollbar-track-color":[{"scrollbar-track":b()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mbs":[{"scroll-mbs":p()}],"scroll-mbe":[{"scroll-mbe":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pbs":[{"scroll-pbs":p()}],"scroll-pbe":[{"scroll-pbe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",d,u]}],fill:[{fill:["none",...b()]}],"stroke-w":[{stroke:[_,Ee,ye,ct]}],stroke:[{stroke:["none",...b()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},"getDefaultConfig");var Tt=ir(Or);function Br(...t){return Tt(st(t))}r(Br,"cn");export{r as a,Cr as b,_e as c,Pr as d,Nr as e,Me as f,Gt as g,Dt as h,st as i,Br as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as _,b as k,c as N,d as T,e as q,f as O}from"./chunk-GTM65MVX.js";import{a as R}from"./chunk-TAD43CG5.js";import{a as C}from"./chunk-SEU5V7I6.js";import{d as x,g as I,h as L,i as w}from"./chunk-YJGANMU7.js";import{a as d,e as b,f as $,g as U,h as F}from"./chunk-RRCPZMC2.js";var P=b(U(),1);var Y="https://api.cloudflare.com/client/v4/accounts",A=class extends Error{static{d(this,"AnalyticsSqlError")}status;constructor(e,f){super(`Analytics Engine SQL API returned ${String(e)}: ${f}`),this.name="AnalyticsSqlError",this.status=e}},v=d(t=>{let e=t.fetch??globalThis.fetch,f=`${Y}/${encodeURIComponent(t.accountId)}/analytics_engine/sql`;return{query:d(async o=>{let l=await e(f,{body:o,headers:{Authorization:`Bearer ${t.apiToken}`,"Content-Type":"text/plain"},method:"POST"});if(!l.ok)throw new A(l.status,await l.text());let n;try{n=await l.json()}catch{throw new A(l.status,"Analytics Engine SQL API returned a non-JSON body.")}let s=n,a=s.data??[];return{columns:s.meta??[],rowCount:s.rows??a.length,rows:a}},"query")}},"createAnalyticsSqlClient");var m=b($(),1);var r=b(F(),1);var H="ANALYTICS",D=[{key:"volume",sql:d(t=>`SELECT blob2 AS fn, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY calls DESC LIMIT 25`,"sql"),title:"Request volume per function"},{key:"latency",sql:d(t=>`SELECT blob2 AS fn, quantileWeighted(0.50)(double1, _sample_interval) AS p50, quantileWeighted(0.95)(double1, _sample_interval) AS p95 FROM ${t} WHERE blob1 = 'function_call' GROUP BY fn ORDER BY p95 DESC LIMIT 25`,"sql"),title:"Latency p50 / p95 per function"},{key:"hotShards",sql:d(t=>`SELECT blob3 AS shard, count() AS calls FROM ${t} WHERE blob1 = 'function_call' GROUP BY shard ORDER BY calls DESC LIMIT 25`,"sql"),title:"Hot shards"}],W={error:null,loading:!0,result:null},j=d(t=>{let e=(0,P.c)(27),{state:f,title:p}=t,o=x(),{error:l,loading:n,result:s}=f,a=`analytics-panel-${p}`,i;e[0]!==o||e[1]!==p?(i=o(p),e[0]=o,e[1]=p,e[2]=i):i=e[2];let c;e[3]!==i?(c=(0,r.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,r.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i},void 0,!1)},void 0,!1),e[3]=i,e[4]=c):c=e[4];let u;e[5]!==n||e[6]!==o?(u=n&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-loading",children:o("Loading\u2026")},void 0,!1),e[5]=n,e[6]=o,e[7]=u):u=e[7];let y;e[8]!==l||e[9]!==n?(y=!n&&l!==null&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"analytics-error",role:"alert",children:l},void 0,!1),e[8]=l,e[9]=n,e[10]=y):y=e[10];let h;e[11]!==l||e[12]!==n||e[13]!==s||e[14]!==o?(h=!n&&l===null&&s!==null&&s.rows.length===0&&(0,r.jsxDEV)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"analytics-empty-rows",children:o("No data points yet.")},void 0,!1),e[11]=l,e[12]=n,e[13]=s,e[14]=o,e[15]=h):h=e[15];let E;e[16]!==l||e[17]!==n||e[18]!==s?(E=!n&&l===null&&s!==null&&s.rows.length>0&&(0,r.jsxDEV)(_,{children:[(0,r.jsxDEV)(k,{children:(0,r.jsxDEV)(T,{children:s.columns.map(G)},void 0,!1)},void 0,!1),(0,r.jsxDEV)(N,{children:s.rows.map((M,B)=>(0,r.jsxDEV)(T,{children:s.columns.map(g=>(0,r.jsxDEV)(O,{className:"font-mono text-xs",children:L(M[g.name])},g.name,!1))},B,!1))},void 0,!1)]},void 0,!0),e[16]=l,e[17]=n,e[18]=s,e[19]=E):E=e[19];let S;return e[20]!==a||e[21]!==c||e[22]!==u||e[23]!==y||e[24]!==h||e[25]!==E?(S=(0,r.jsxDEV)(C,{className:"gap-0 py-0","data-testid":a,children:[c,u,y,h,E]},void 0,!0),e[20]=a,e[21]=c,e[22]=u,e[23]=y,e[24]=h,e[25]=E,e[26]=S):S=e[26],S},"PanelResult"),ne=d(({config:t,dataset:e=H,runQuery:f}={})=>{let p=x(),[o,l]=(0,m.useState)({}),n=(0,m.useMemo)(()=>{if(f!==void 0)return f;if(t===void 0)return null;let a=v({accountId:t.accountId,apiToken:t.apiToken});return i=>a.query(i)},[t,f]),s=(0,m.useCallback)(async a=>{if(n!==null)for(let i of D){if(a.cancelled)return;l(c=>({...c,[i.key]:{error:null,loading:!0,result:null}}));try{let c=await n(i.sql(e));a.cancelled||l(u=>({...u,[i.key]:{error:null,loading:!1,result:c}}))}catch(c){a.cancelled||l(u=>({...u,[i.key]:{error:I(c),loading:!1,result:null}}))}}},[n,e]);return(0,m.useEffect)(()=>{let a={cancelled:!1};return w(s(a)),()=>{a.cancelled=!0}},[s]),n===null?(0,r.jsxDEV)(R,{description:p("Set CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN (Analytics Read) in your .dev.vars to enable usage panels."),icon:(0,r.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,r.jsxDEV)("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"},void 0,!1)},void 0,!1),testId:"analytics-not-configured",title:p("Analytics is not configured.")},void 0,!1):(0,r.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-analytics-panel",children:D.map(a=>(0,r.jsxDEV)(j,{state:o[a.key]??W,title:a.title},a.key,!1))},void 0,!1)},"AnalyticsPanel");function G(t){return(0,r.jsxDEV)(q,{children:t.name},t.name,!1)}d(G,"_temp");export{ne as AnalyticsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as U}from"./chunk-J6J54MBP.js";import{a as L}from"./chunk-2K47A3P6.js";import{a as W,b as O,c as Q,d as B,e as R,f as D}from"./chunk-GTM65MVX.js";import{a as j}from"./chunk-RMYA7NAH.js";import"./chunk-TBMYIZIO.js";import"./chunk-BHTPZS7L.js";import"./chunk-TICVNLPM.js";import"./chunk-HV7G6DFP.js";import{a as H}from"./chunk-AQGOX5DK.js";import{a as A}from"./chunk-TAD43CG5.js";import{b as E}from"./chunk-FCR3HKFV.js";import{a as K}from"./chunk-SEU5V7I6.js";import{b as w}from"./chunk-O4PXDNR3.js";import"./chunk-ZH7UES4T.js";import"./chunk-KODWGUAB.js";import"./chunk-3OA7PECS.js";import{d as _}from"./chunk-YJGANMU7.js";import{a as I,e as F,f as G,g as J,h as X}from"./chunk-RRCPZMC2.js";var P=F(J(),1),z=F(G(),1);var t=F(X(),1);var V=I(r=>`${r.toString()} ms`,"formatMs"),Y=I(r=>r.totalConnections===0&&r.shapePoke.passes===0&&r.whisper.passes===0,"isFanoutIdle"),$=I(r=>{let e=(0,P.c)(8),{label:o,testId:s,value:i}=r,l;e[0]!==o?(l=(0,t.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o},void 0,!1),e[0]=o,e[1]=l):l=e[1];let d;e[2]!==s||e[3]!==i?(d=(0,t.jsxDEV)("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":s,children:i},void 0,!1),e[2]=s,e[3]=i,e[4]=d):d=e[4];let p;return e[5]!==l||e[6]!==d?(p=(0,t.jsxDEV)(K,{className:"gap-0 py-0",children:(0,t.jsxDEV)("div",{className:"flex flex-col gap-2.5 p-4",children:[l,d]},void 0,!0)},void 0,!1),e[5]=l,e[6]=d,e[7]=p):p=e[7],p},"StatCard"),q=I(r=>{let e=(0,P.c)(48),{counters:o,includeTiming:s,prefix:i,t:l,title:d}=r,p=`${i}-section`,v;e[0]!==d?(v=(0,t.jsxDEV)("h3",{className:"text-sm font-medium text-foreground",children:d},void 0,!1),e[0]=d,e[1]=v):v=e[1];let k=`${i}-stats`,a;e[2]!==l?(a=l("Passes"),e[2]=l,e[3]=a):a=e[3];let n=`${i}-passes`,N;e[4]!==o.passes||e[5]!==a||e[6]!==n?(N=(0,t.jsxDEV)($,{label:a,testId:n,value:o.passes},void 0,!1),e[4]=o.passes,e[5]=a,e[6]=n,e[7]=N):N=e[7];let h;e[8]!==l?(h=l("Sockets iterated"),e[8]=l,e[9]=h):h=e[9];let g=`${i}-iterated`,c;e[10]!==o.socketsIterated||e[11]!==h||e[12]!==g?(c=(0,t.jsxDEV)($,{label:h,testId:g,value:o.socketsIterated},void 0,!1),e[10]=o.socketsIterated,e[11]=h,e[12]=g,e[13]=c):c=e[13];let f;e[14]!==l?(f=l("Delivered"),e[14]=l,e[15]=f):f=e[15];let y=`${i}-delivered`,u;e[16]!==o.socketsDelivered||e[17]!==f||e[18]!==y?(u=(0,t.jsxDEV)($,{label:f,testId:y,value:o.socketsDelivered},void 0,!1),e[16]=o.socketsDelivered,e[17]=f,e[18]=y,e[19]=u):u=e[19];let m;e[20]!==l?(m=l("Peak width"),e[20]=l,e[21]=m):m=e[21];let b=`${i}-peak`,x;e[22]!==o.peakSocketsIterated||e[23]!==m||e[24]!==b?(x=(0,t.jsxDEV)($,{label:m,testId:b,value:o.peakSocketsIterated},void 0,!1),e[22]=o.peakSocketsIterated,e[23]=m,e[24]=b,e[25]=x):x=e[25];let C;e[26]!==o.totalMs||e[27]!==s||e[28]!==i||e[29]!==l?(C=s&&(0,t.jsxDEV)($,{label:l("Total time"),testId:`${i}-total-ms`,value:V(o.totalMs)},void 0,!1),e[26]=o.totalMs,e[27]=s,e[28]=i,e[29]=l,e[30]=C):C=e[30];let S;e[31]!==o.maxMs||e[32]!==s||e[33]!==i||e[34]!==l?(S=s&&(0,t.jsxDEV)($,{label:l("Max time"),testId:`${i}-max-ms`,value:V(o.maxMs)},void 0,!1),e[31]=o.maxMs,e[32]=s,e[33]=i,e[34]=l,e[35]=S):S=e[35];let T;e[36]!==u||e[37]!==x||e[38]!==C||e[39]!==S||e[40]!==k||e[41]!==N||e[42]!==c?(T=(0,t.jsxDEV)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":k,children:[N,c,u,x,C,S]},void 0,!0),e[36]=u,e[37]=x,e[38]=C,e[39]=S,e[40]=k,e[41]=N,e[42]=c,e[43]=T):T=e[43];let M;return e[44]!==p||e[45]!==T||e[46]!==v?(M=(0,t.jsxDEV)("section",{className:"flex flex-col gap-2","data-testid":p,children:[v,T]},void 0,!0),e[44]=p,e[45]=T,e[46]=v,e[47]=M):M=e[47],M},"PathCounters"),ce=I(r=>{let e=(0,P.c)(31),{initialShardKey:o}=r,s=_(),[i,l]=(0,z.useState)(o??""),d;e[0]!==i?(d=i.trim(),e[0]=i,e[1]=d):d=e[1];let p=L(d,400),v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v={},e[2]=v):v=e[2];let k;e[3]!==p?(k={keepPreviousData:!0,shardKey:p},e[3]=p,e[4]=k):k=e[4];let{data:a,error:n,refetch:N}=E(H.getFanoutMetrics,v,k);U(N,!0);let h;e[5]!==a?(h=a!==void 0&&Y(a),e[5]=a,e[6]=h):h=e[6];let g=h,c;e[7]!==i?(c=(0,t.jsxDEV)(j,{onChange:l,testId:"fanout-shard-input",value:i},void 0,!1),e[7]=i,e[8]=c):c=e[8];let f;e[9]!==a||e[10]!==s?(f=a!==void 0&&(0,t.jsxDEV)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[a.promoted&&(0,t.jsxDEV)(w,{"data-testid":"fanout-promoted",variant:a.relayCount>=a.maxRelays?"destructive":"default",children:a.relayCount>=a.maxRelays?s("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:a.maxRelays,relayCount:a.relayCount}):s("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:a.maxRelays,relayCount:a.relayCount})},void 0,!1),(0,t.jsxDEV)(w,{variant:"secondary",children:s("{count} connections",{count:a.totalConnections})},void 0,!1),(0,t.jsxDEV)(w,{variant:"secondary",children:s("peak {count} subscribers",{count:a.peakSubscribers})},void 0,!1)]},void 0,!0),e[9]=a,e[10]=s,e[11]=f):f=e[11];let y;e[12]!==c||e[13]!==f?(y=(0,t.jsxDEV)("div",{className:"flex flex-wrap items-center gap-2",children:[c,f]},void 0,!0),e[12]=c,e[13]=f,e[14]=y):y=e[14];let u;e[15]!==n?(u=n!==null&&(0,t.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"fanout-error",role:"alert",children:n},void 0,!1),e[15]=n,e[16]=u):u=e[16];let m;e[17]!==n||e[18]!==g||e[19]!==s?(m=n===null&&g&&(0,t.jsxDEV)(A,{description:s("Realtime fan-out cost and per-topic subscriber counts for this shard."),icon:(0,t.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsxDEV)("path",{d:"M4 12h4l3 7 4-14 3 7h2"},void 0,!1)},void 0,!1),testId:"fanout-empty",title:s("No fan-out activity yet.")},void 0,!1),e[17]=n,e[18]=g,e[19]=s,e[20]=m):m=e[20];let b;e[21]!==n||e[22]!==g||e[23]!==a||e[24]!==s?(b=n===null&&a!==void 0&&!g&&(0,t.jsxDEV)(t.Fragment,{children:[a.topics.length>0&&(0,t.jsxDEV)("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[(0,t.jsxDEV)("h3",{className:"text-sm font-medium text-foreground",children:s("Hot topics")},void 0,!1),(0,t.jsxDEV)(K,{className:"overflow-hidden py-0",children:(0,t.jsxDEV)(W,{"data-testid":"fanout-topics-table",children:[(0,t.jsxDEV)(O,{children:(0,t.jsxDEV)(B,{children:[(0,t.jsxDEV)(R,{children:s("Topic")},void 0,!1),(0,t.jsxDEV)(R,{children:s("Kind")},void 0,!1),(0,t.jsxDEV)(R,{className:"text-right",children:s("Subscribers")},void 0,!1)]},void 0,!0)},void 0,!1),(0,t.jsxDEV)(Q,{children:a.topics.map(Z)},void 0,!1)]},void 0,!0)},void 0,!1)]},void 0,!0),(0,t.jsxDEV)("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[(0,t.jsxDEV)("h2",{className:"text-sm font-medium text-muted-foreground",children:s("Fan-out cost since this instance woke")},void 0,!1),(0,t.jsxDEV)(q,{counters:a.shapePoke,includeTiming:!0,prefix:"fanout-poke",t:s,title:s("Shape pokes")},void 0,!1),(0,t.jsxDEV)(q,{counters:a.whisper,includeTiming:!1,prefix:"fanout-whisper",t:s,title:s("Whisper broadcasts")},void 0,!1)]},void 0,!0)]},void 0,!0),e[21]=n,e[22]=g,e[23]=a,e[24]=s,e[25]=b):b=e[25];let x;return e[26]!==b||e[27]!==y||e[28]!==u||e[29]!==m?(x=(0,t.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[y,u,m,b]},void 0,!0),e[26]=b,e[27]=y,e[28]=u,e[29]=m,e[30]=x):x=e[30],x},"FanoutPanel");function Z(r){return(0,t.jsxDEV)(B,{"data-testid":"fanout-topic-row",children:[(0,t.jsxDEV)(D,{className:"font-mono text-xs",children:r.topic},void 0,!1),(0,t.jsxDEV)(D,{children:(0,t.jsxDEV)(w,{variant:"outline",children:r.kind},void 0,!1)},void 0,!1),(0,t.jsxDEV)(D,{className:"text-right font-medium tabular-nums",children:r.subscribers},void 0,!1)]},`${r.kind}:${r.topic}`,!0)}I(Z,"_temp");export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o,e as n,f,g as m,h as p,j as l}from"./chunk-RRCPZMC2.js";var c=n(m(),1),u=n(f(),1);var i=n(p(),1);function g({className:d,size:e="default",...a}){return(0,i.jsxDEV)("div",{"data-slot":"card","data-size":e,className:l("group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-border bg-card py-4 text-xs/relaxed text-card-foreground shadow-xs has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-md *:[img:last-child]:rounded-md",d),...a},void 0,!1)}o(g,"Card");function h(d){let e=(0,c.c)(8),a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=l("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-md px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=(0,i.jsxDEV)("div",{"data-slot":"card-header",className:s,...t},void 0,!1),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}o(h,"CardHeader");function b(d){let e=(0,c.c)(8),a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=l("font-heading text-sm font-medium group-data-[size=sm]/card:text-sm",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=(0,i.jsxDEV)("div",{"data-slot":"card-title",className:s,...t},void 0,!1),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}o(b,"CardTitle");function v(d){let e=(0,c.c)(8),a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=l("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=(0,i.jsxDEV)("div",{"data-slot":"card-description",className:s,...t},void 0,!1),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}o(v,"CardDescription");function N(d){let e=(0,c.c)(8),a,t;e[0]!==d?({className:a,...t}=d,e[0]=d,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=l("px-4 group-data-[size=sm]/card:px-3",a),e[3]=a,e[4]=s):s=e[4];let r;return e[5]!==t||e[6]!==s?(r=(0,i.jsxDEV)("div",{"data-slot":"card-content",className:s,...t},void 0,!1),e[5]=t,e[6]=s,e[7]=r):r=e[7],r}o(N,"CardContent");export{g as a,h as b,b as c,v as d,N as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as oe}from"./chunk-7RYIQKZA.js";import{a as te,b as ae,c as se,d as J,e as U,f as $}from"./chunk-GTM65MVX.js";import{a as le}from"./chunk-VLXV72QE.js";import{a as w}from"./chunk-JSEXCW5Q.js";import{a as ee}from"./chunk-RMYA7NAH.js";import"./chunk-TBMYIZIO.js";import{R as A}from"./chunk-BHTPZS7L.js";import{c as C}from"./chunk-YQQJ4N6U.js";import"./chunk-TICVNLPM.js";import"./chunk-HV7G6DFP.js";import{a as O}from"./chunk-AQGOX5DK.js";import{a as q}from"./chunk-TAD43CG5.js";import{b as D}from"./chunk-FCR3HKFV.js";import{a as W,b as K,c as V,d as Y,e as j}from"./chunk-SEU5V7I6.js";import{b as T}from"./chunk-O4PXDNR3.js";import"./chunk-ZH7UES4T.js";import{f as B}from"./chunk-KODWGUAB.js";import"./chunk-3OA7PECS.js";import{d as _,e as G,f as X,g as Z,i as M}from"./chunk-YJGANMU7.js";import{a as n,e as z,f as pe,g as ve,h as he}from"./chunk-RRCPZMC2.js";var f=z(pe(),1);var de=z(ve(),1);var e=z(he(),1);var re=["read","insert","update","delete"],xe=n((a,t)=>({delete:a("Delete"),insert:a("Insert"),read:a("Read"),update:a("Update")})[t],"operationLabel"),ye=n(a=>{let t=new Set;for(let r of a?.advisories??[])if(r.name==="rls_uncovered_table"){let{table:o}=r.metadata;typeof o=="string"&&o!==""&&t.add(o)}return t},"uncoveredTables"),ge=n((a,t,r)=>{let o=new Map,s=n(l=>{let d=o.get(l);if(d!==void 0)return d;let i={cells:{delete:{},insert:{},read:{},update:{}},maskedColumns:[],table:l,uncovered:r.has(l)};return o.set(l,i),i},"ensure");for(let l of a)s(l.table).cells[l.on]={procedure:l.procedure};for(let l of t){let d=s(l.table);d.maskedColumns.includes(l.column)||d.maskedColumns.push(l.column)}for(let l of r)s(l);return[...o.values()].toSorted((l,d)=>l.table.localeCompare(d.table))},"buildRows"),be=n(a=>{let t=(0,de.c)(16),r;t[0]!==a?(r=a===void 0?{}:a,t[0]=a,t[1]=r):r=t[1];let{onProbe:o}=r,s=_(),l,d;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={},d={live:!0},t[2]=l,t[3]=d):(l=t[2],d=t[3]);let i=D(O.rlsPolicies,l,d),x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x={},t[4]=x):x=t[4];let p=D(O.maskPolicies,x),h;t[5]===Symbol.for("react.memo_cache_sentinel")?(h={},t[5]=h):h=t[5];let g=D(O.getAdvisories,h),b;if(t[6]!==g.data||t[7]!==p.data||t[8]!==o||t[9]!==i||t[10]!==s){let y=null;i.data!==void 0&&(y=Array.isArray(i.data.policies)?i.data.policies:[]);let R=Array.isArray(p.data?.columns)?p.data.columns:[],I=g.data??null,{error:v,liveError:m}=i,E=y===null?[]:ge(y,R,ye(I)),N;t[12]!==m?(N=(0,e.jsxDEV)("div",{className:"flex items-center justify-end",children:(0,e.jsxDEV)(oe,{message:m,prefix:"pm"},void 0,!1)},void 0,!1),t[12]=m,t[13]=N):N=t[13];let S;t[14]!==v?(S=v!==null&&(0,e.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pm-error",role:"alert",children:v},void 0,!1),t[14]=v,t[15]=S):S=t[15],b=(0,e.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-permissions-matrix",children:[N,S,y!==null&&E.length===0?(0,e.jsxDEV)(q,{description:s("Add a `definePolicy` and wire it through `.use(rls(...))` to populate this matrix."),testId:"pm-empty",title:s("No policy")},void 0,!1):(0,e.jsxDEV)(te,{"data-testid":"pm-table",children:[(0,e.jsxDEV)(ae,{children:(0,e.jsxDEV)(J,{children:[(0,e.jsxDEV)(U,{children:s("Table")},void 0,!1),re.map(c=>(0,e.jsxDEV)(U,{children:xe(s,c)},c,!1)),(0,e.jsxDEV)(U,{children:s("Masked columns")},void 0,!1)]},void 0,!0)},void 0,!1),(0,e.jsxDEV)(se,{children:E.map(c=>(0,e.jsxDEV)(J,{"data-testid":`pm-row-${c.table}`,children:[(0,e.jsxDEV)($,{className:"font-mono text-xs",children:(0,e.jsxDEV)("span",{className:"flex items-center gap-1.5",children:[c.table,c.uncovered&&(0,e.jsxDEV)(T,{"data-testid":`pm-uncovered-${c.table}`,title:s("Uncovered \u2014 reachable without a policy"),variant:"destructive",children:s("Uncovered \u2014 reachable without a policy")},void 0,!1)]},void 0,!0)},void 0,!1),re.map(k=>{let F=c.cells[k];return(0,e.jsxDEV)($,{"data-testid":`pm-cell-${c.table}-${k}`,children:F.procedure===void 0?(0,e.jsxDEV)("span",{className:"text-xs text-muted-foreground",children:s("No policy")},void 0,!1):(0,e.jsxDEV)("span",{className:"flex flex-col gap-1",children:[(0,e.jsxDEV)(T,{variant:"secondary",children:s("Covered by {procedure}",{procedure:F.procedure})},void 0,!1),o!==void 0&&(0,e.jsxDEV)(C,{className:"h-auto justify-start p-0 text-[11px]","data-testid":`pm-probe-${c.table}-${k}`,onClick:n(()=>{o(c.table,k,F.procedure??"")},"onClick"),size:"xs",type:"button",variant:"ghost",children:s("Probe this")},void 0,!1)]},void 0,!0)},k,!1)}),(0,e.jsxDEV)($,{children:c.maskedColumns.length===0?(0,e.jsxDEV)("span",{"aria-hidden":"true",className:"text-muted-foreground",children:"\u2014"},void 0,!1):(0,e.jsxDEV)("span",{className:"flex flex-wrap gap-1",children:c.maskedColumns.map(Ne)},void 0,!1)},void 0,!1)]},c.table,!0))},void 0,!1)]},void 0,!0)]},void 0,!0),t[6]=g.data,t[7]=p.data,t[8]=o,t[9]=i,t[10]=s,t[11]=b}else b=t[11];return b},"PermissionsMatrix");function Ne(a){return(0,e.jsxDEV)(T,{variant:"outline",children:a},a,!1)}n(Ne,"_temp");var ke=G(O.runAs),Ce=n(()=>{let a=B();return async({args:t,functionPath:r,shardKey:o="",userId:s})=>{let l=ke;try{return{kind:"allowed",value:await a.query(l,{args:t,functionPath:r,userId:s},X(o))}}catch(d){return{kind:"denied",message:d instanceof Error?d.message:String(d)}}}},"useRunAsProbe"),we=n(a=>a===void 0?"undefined":JSON.stringify(a,null,2),"formatValue"),Pe=n(({functions:a,prefill:t,runAsIdentity:r=!1}={})=>{let o=B(),s=_(),l=Ce(),[d,i]=(0,f.useState)(null),[x,p]=(0,f.useState)(null),h=a??d??[],[g,b]=(0,f.useState)(""),[y,R]=(0,f.useState)("{}"),[I,v]=(0,f.useState)(""),[m,E]=(0,f.useState)(""),[N,S]=(0,f.useState)(!1),[c,k]=(0,f.useState)(null),[F,Q]=(0,f.useState)(null),H=(0,f.useRef)(-1);(0,f.useEffect)(()=>{if(a!==void 0)return;let u=!1;return o.listFunctions().then(P=>(u||i(P),P)).catch(P=>{u||p(Z(P))}),()=>{u=!0}},[o,a]),(0,f.useEffect)(()=>{if(t===void 0||H.current===t.nonce)return;H.current=t.nonce;let u=t.functionPath;queueMicrotask(()=>{b(u),k(null)})},[t]);let L=g===""?h[0]?.path??"":g,ne=n(async()=>{if(L==="")return;let u;try{u=y.trim()===""?{}:JSON.parse(y)}catch(P){Q(s("Invalid JSON args: {message}",{message:P.message})),k(null);return}Q(null),S(!0);try{let P=await l({args:u,functionPath:L,shardKey:I.trim(),userId:m.trim()});k(P)}finally{S(!1)}},"run"),ce=n(()=>{M(ne())},"runOnce"),fe=n(u=>{b(u.target.value)},"onSelectChange"),ue=n(u=>{R(u.target.value)},"onArgsChange"),me=n(u=>{E(u.target.value)},"onUserIdChange");return(0,e.jsxDEV)("div",{className:"flex flex-col gap-3","data-testid":"lunora-permissions-playground",children:[x!==null&&(0,e.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pp-discover-error",role:"alert",children:x},void 0,!1),!r&&(0,e.jsxDEV)(q,{description:s("Dev only: runs the selected function as this user over the admin gate so you can test auth and RLS."),testId:"pp-gate",title:s("Set `runAsIdentity` to forge an identity and probe access.")},void 0,!1),(0,e.jsxDEV)("div",{className:"flex flex-col gap-3 rounded-md border border-border p-3",children:[(0,e.jsxDEV)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxDEV)(w,{htmlFor:"pp-function",children:s("Function")},void 0,!1),(0,e.jsxDEV)("select",{"aria-label":s("Function"),className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","data-testid":"pp-function",id:"pp-function",onChange:fe,value:L,children:h.map(u=>(0,e.jsxDEV)("option",{value:u.path,children:[u.path," (",u.kind,")"]},u.path,!0))},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxDEV)(w,{htmlFor:"pp-args",children:s("Arguments")},void 0,!1),(0,e.jsxDEV)(le,{"aria-label":s("Arguments"),className:"font-mono text-xs","data-testid":"pp-args",id:"pp-args",onChange:ue,value:y},void 0,!1)]},void 0,!0),(0,e.jsxDEV)(ee,{onChange:v,testId:"pp-shard",value:I},void 0,!1),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1.5",children:[(0,e.jsxDEV)(w,{htmlFor:"pp-user",children:s("Run as (userId)")},void 0,!1),(0,e.jsxDEV)(A,{"aria-label":s("Identity (userId) to run as"),className:"font-mono text-xs","data-testid":"pp-user",id:"pp-user",onChange:me,placeholder:s("Leave empty to run as admin"),value:m},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex items-center gap-2",children:[(0,e.jsxDEV)(C,{"data-testid":"pp-run",disabled:!r||N||L==="",onClick:ce,type:"button",children:s(N?"Probing\u2026":"Run probe")},void 0,!1),m.trim()!==""&&(0,e.jsxDEV)(T,{"data-testid":"pp-as-badge",variant:"secondary",children:s("as {userId}",{userId:m.trim()})},void 0,!1)]},void 0,!0)]},void 0,!0),F!==null&&(0,e.jsxDEV)("p",{className:"text-sm text-destructive","data-testid":"pp-args-error",role:"alert",children:F},void 0,!1),c!==null&&c.kind==="allowed"&&(0,e.jsxDEV)("div",{className:"flex flex-col gap-2","data-testid":"pp-outcome-allowed",children:[(0,e.jsxDEV)(T,{variant:"secondary",children:s("Allowed")},void 0,!1),(0,e.jsxDEV)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs","data-testid":"pp-result",children:we(c.value)},void 0,!1)]},void 0,!0),c!==null&&c.kind==="denied"&&(0,e.jsxDEV)("div",{className:"flex flex-col gap-2","data-testid":"pp-outcome-denied",children:[(0,e.jsxDEV)(T,{variant:"destructive",children:s("Denied")},void 0,!1),(0,e.jsxDEV)("pre",{className:"overflow-auto rounded-md border border-border bg-muted/50 p-3 font-mono text-xs text-destructive","data-testid":"pp-denied",role:"alert",children:c.message},void 0,!1)]},void 0,!0)]},void 0,!0)},"PermissionsPlayground"),Se="/__lunora/policy-scaffold",Te={"already-wired":"That procedure already has an rls(...) policy wired in.","file-exists":"A policy file with that name already exists \u2014 pick another name or edit it by hand.","invalid-identifier":"Name, table, and policy-set must be plain identifiers (letters, digits, _ or $).","unknown-procedure":"No exported procedure was found at that file path.","unsupported-procedure-shape":"That procedure uses the bare query({\u2026}) form \u2014 convert it to the builder form (c.use(\u2026).query(\u2026)) before wiring RLS."},Ae=n(async a=>{let t=await fetch(Se,{body:JSON.stringify(a),headers:{"Content-Type":"application/json"},method:"POST"}),r=await t.json();if(r.needsManualEdit===!0)return{kind:"needs-manual-edit",message:r.message??"This change must be made by hand."};if(t.ok)return{diagnostics:r.diagnostics??[],kind:"ok",label:r.fileName??r.exportName??""};let o=r.error;return{kind:"error",message:o===void 0?`policy scaffold failed (${String(t.status)})`:Te[o]??o}},"applyPolicyScaffold"),ie={exportName:"",filePath:"",policyName:"",policies:"",tableName:""},Ie=n(()=>{let a=_(),[t,r]=(0,f.useState)(null),[o,s]=(0,f.useState)(!1),[l,d]=(0,f.useState)(null),[i,x]=(0,f.useState)(ie),p=n(v=>{let m=v.target.name,{value:E}=v.target;x(N=>({...N,[m]:E}))},"onFieldChange"),h=n(()=>{r(null),x(ie)},"reset"),g=n(async v=>{s(!0),d(null);try{let m=await Ae(v);d(m),m.kind==="ok"&&h()}catch(m){d({kind:"error",message:m instanceof Error?m.message:String(m)})}finally{s(!1)}},"submit"),b=n(()=>{M(g({kind:"scaffoldPolicy",name:i.policyName.trim(),table:i.tableName.trim()}))},"onSubmitScaffold"),y=n(()=>{M(g({exportName:i.exportName.trim(),filePath:i.filePath.trim(),kind:"wireRls",policies:i.policies.trim()}))},"onSubmitWire"),R=n(()=>{d(null),r("scaffold")},"openScaffold"),I=n(()=>{d(null),r("wire")},"openWire");return(0,e.jsxDEV)(W,{"data-testid":"policy-scaffolder",size:"sm",children:[(0,e.jsxDEV)(K,{children:[(0,e.jsxDEV)(V,{children:a("Scaffold access rules")},void 0,!1),(0,e.jsxDEV)(Y,{children:a("Writes a new deny-by-default policy file under lunora/, or wires one into a procedure, then reruns codegen. Local dev only.")},void 0,!1)]},void 0,!0),(0,e.jsxDEV)(j,{children:[(0,e.jsxDEV)("div",{className:"flex flex-wrap gap-2",children:[(0,e.jsxDEV)(C,{"data-testid":"policy-scaffolder-new",onClick:R,size:"xs",type:"button",variant:t==="scaffold"?"default":"outline",children:a("New policy file")},void 0,!1),(0,e.jsxDEV)(C,{"data-testid":"policy-scaffolder-wire",onClick:I,size:"xs",type:"button",variant:t==="wire"?"default":"outline",children:a("Wire into a procedure")},void 0,!1)]},void 0,!0),t==="scaffold"&&(0,e.jsxDEV)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"policy-scaffolder-new-form",children:[(0,e.jsxDEV)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,e.jsxDEV)(w,{htmlFor:"policy-scaffolder-name",children:a("Policy name")},void 0,!1),(0,e.jsxDEV)(A,{"data-testid":"policy-scaffolder-name",id:"policy-scaffolder-name",name:"policyName",onChange:p,value:i.policyName},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,e.jsxDEV)(w,{htmlFor:"policy-scaffolder-table",children:a("Table name")},void 0,!1),(0,e.jsxDEV)(A,{"data-testid":"policy-scaffolder-table",id:"policy-scaffolder-table",name:"tableName",onChange:p,value:i.tableName},void 0,!1)]},void 0,!0),(0,e.jsxDEV)(C,{"data-testid":"policy-scaffolder-create",disabled:o||i.policyName.trim()===""||i.tableName.trim()==="",onClick:b,size:"xs",type:"button",children:a(o?"Creating\u2026":"Create policy file")},void 0,!1),(0,e.jsxDEV)(C,{onClick:h,size:"xs",type:"button",variant:"ghost",children:a("Cancel")},void 0,!1)]},void 0,!0),t==="wire"&&(0,e.jsxDEV)("div",{className:"mt-3 flex flex-wrap items-end gap-2","data-testid":"policy-scaffolder-wire-form",children:[(0,e.jsxDEV)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,e.jsxDEV)(w,{htmlFor:"policy-scaffolder-file",children:a("Procedure file path")},void 0,!1),(0,e.jsxDEV)(A,{"data-testid":"policy-scaffolder-file",id:"policy-scaffolder-file",name:"filePath",onChange:p,value:i.filePath},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,e.jsxDEV)(w,{htmlFor:"policy-scaffolder-export",children:a("Exported procedure")},void 0,!1),(0,e.jsxDEV)(A,{"data-testid":"policy-scaffolder-export",id:"policy-scaffolder-export",name:"exportName",onChange:p,value:i.exportName},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("div",{className:"flex flex-col gap-1 text-xs",children:[(0,e.jsxDEV)(w,{htmlFor:"policy-scaffolder-policies",children:a("Policy set identifier")},void 0,!1),(0,e.jsxDEV)(A,{"data-testid":"policy-scaffolder-policies",id:"policy-scaffolder-policies",name:"policies",onChange:p,value:i.policies},void 0,!1)]},void 0,!0),(0,e.jsxDEV)(C,{"data-testid":"policy-scaffolder-apply",disabled:o||i.filePath.trim()===""||i.exportName.trim()===""||i.policies.trim()==="",onClick:y,size:"xs",type:"button",children:a(o?"Wiring\u2026":"Wire RLS")},void 0,!1),(0,e.jsxDEV)(C,{onClick:h,size:"xs",type:"button",variant:"ghost",children:a("Cancel")},void 0,!1)]},void 0,!0),l?.kind==="error"&&(0,e.jsxDEV)("p",{className:"mt-3 text-sm text-destructive","data-testid":"policy-scaffolder-error",role:"alert",children:l.message},void 0,!1),l?.kind==="needs-manual-edit"&&(0,e.jsxDEV)("p",{className:"mt-3 text-sm text-amber-600 dark:text-amber-500","data-testid":"policy-scaffolder-manual",role:"alert",children:a("This change must be made by hand \u2014 the scaffolder only adds new, deny-by-default rules.")},void 0,!1),l?.kind==="ok"&&(0,e.jsxDEV)("div",{className:"mt-3 flex flex-col gap-1","data-testid":"policy-scaffolder-ok",children:[(0,e.jsxDEV)("p",{className:"text-sm text-emerald-600 dark:text-emerald-500",children:a("Scaffolded {label} and reran codegen. Fill in the `when` predicates before relying on it.",{label:l.label})},void 0,!1),l.diagnostics.length>0&&(0,e.jsxDEV)("ul",{className:"flex flex-col gap-0.5","data-testid":"policy-scaffolder-diagnostics",children:l.diagnostics.map(v=>(0,e.jsxDEV)("li",{className:"font-mono text-[11px] text-destructive",children:v},v,!1))},void 0,!1)]},void 0,!0)]},void 0,!0)]},void 0,!0)},"PolicyScaffolder"),Je=n(({functions:a,runAsIdentity:t=!1,schemaEditable:r=!1}={})=>{let o=_(),[s,l]=(0,f.useState)(void 0),d=n((i,x,p)=>{p!==""&&l(h=>({functionPath:p,nonce:(h?.nonce??0)+1}))},"onProbe");return(0,e.jsxDEV)("div",{className:"flex flex-col gap-8","data-testid":"lunora-permissions",children:[(0,e.jsxDEV)("section",{className:"flex flex-col gap-3",children:[(0,e.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o("Permissions")},void 0,!1)},void 0,!1),(0,e.jsxDEV)(be,{onProbe:d},void 0,!1)]},void 0,!0),(0,e.jsxDEV)("section",{className:"flex flex-col gap-3",children:(0,e.jsxDEV)(W,{className:"gap-0 py-0",children:[(0,e.jsxDEV)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsxDEV)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o("Probe")},void 0,!1)},void 0,!1),(0,e.jsxDEV)(j,{className:"px-4 py-4",children:[(0,e.jsxDEV)("p",{className:"mb-3 text-sm text-muted-foreground",children:o("Pick a function and an identity, then run it to see the access outcome.")},void 0,!1),(0,e.jsxDEV)(Pe,{functions:a,prefill:s,runAsIdentity:t},void 0,!1)]},void 0,!0)]},void 0,!0)},void 0,!1),r&&(0,e.jsxDEV)("section",{className:"flex flex-col gap-2",children:(0,e.jsxDEV)(Ie,{},void 0,!1)},void 0,!1)]},void 0,!0)},"PermissionsPanel");export{Je as PermissionsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as X,b as ee,c as te,d as se}from"./chunk-KG3QTFWE.js";import"./chunk-FQKNJSRA.js";import"./chunk-BJGBHGK3.js";import"./chunk-UII66UVF.js";import"./chunk-KEGAWN6Y.js";import{c as I}from"./chunk-YQQJ4N6U.js";import"./chunk-TICVNLPM.js";import"./chunk-HV7G6DFP.js";import{a as J}from"./chunk-AQGOX5DK.js";import{a as U}from"./chunk-TAD43CG5.js";import{a as z,b as V,c as P,e as D}from"./chunk-SEU5V7I6.js";import"./chunk-ZH7UES4T.js";import{f as Q}from"./chunk-KODWGUAB.js";import"./chunk-3OA7PECS.js";import{d as O,e as H,f as Y,g as G,i as Z}from"./chunk-YJGANMU7.js";import{a as k,e as j,f as ie,g as le,h as de}from"./chunk-RRCPZMC2.js";var W=j(le(),1),T=j(ie(),1);var d=j(de(),1);var oe=H(J.runSql),ae=k(($,e)=>{let s=Q(),[f,t]=(0,T.useState)(void 0),[i,o]=(0,T.useState)(void 0),[l,c]=(0,T.useState)(!0),q=(0,T.useCallback)(async a=>{c(!0);try{let x=await s.query(oe,{sql:$},Y(e));a.cancelled||(t(x),o(void 0))}catch(x){a.cancelled||(t(void 0),o(G(x)))}finally{a.cancelled||c(!1)}},[s,$,e]);return(0,T.useEffect)(()=>{let a={cancelled:!1};return Z(q(a)),()=>{a.cancelled=!0}},[q]),{error:i,loading:l,result:f}},"useRunSql"),re="lunora-studio-dashboards",B={shardKey:"",sql:"",title:""},ne=k($=>{let e=(0,W.c)(54),{onEdit:s,onRemove:f,widget:t}=$,i=O(),{error:o,loading:l,result:c}=ae(t.sql,t.shardKey??""),q;e[0]!==s||e[1]!==t.id?(q=k(()=>{s(t.id)},"t1"),e[0]=s,e[1]=t.id,e[2]=q):q=e[2];let a=q,x;e[3]!==f||e[4]!==t.id?(x=k(()=>{f(t.id)},"t2"),e[3]=f,e[4]=t.id,e[5]=x):x=e[5];let K=x,M=`dashboards-widget-${t.id}`,S;e[6]!==t.title?(S=(0,d.jsxDEV)(P,{className:"min-w-0 truncate",title:t.title,children:t.title},void 0,!1),e[6]=t.title,e[7]=S):S=e[7];let L;e[8]!==i?(L=i("Edit widget"),e[8]=i,e[9]=L):L=e[9];let R=`dashboards-widget-edit-${t.id}`,A;e[10]!==i?(A=i("Edit widget"),e[10]=i,e[11]=A):A=e[11];let w;e[12]===Symbol.for("react.memo_cache_sentinel")?(w=(0,d.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,d.jsxDEV)("path",{d:"M4 20h4L18 10l-4-4L4 16v4ZM14 6l4 4"},void 0,!1)},void 0,!1),e[12]=w):w=e[12];let C;e[13]!==a||e[14]!==L||e[15]!==R||e[16]!==A?(C=(0,d.jsxDEV)(I,{"aria-label":L,"data-testid":R,onClick:a,size:"icon-xs",title:A,type:"button",variant:"ghost",children:w},void 0,!1),e[13]=a,e[14]=L,e[15]=R,e[16]=A,e[17]=C):C=e[17];let b;e[18]!==i?(b=i("Remove widget"),e[18]=i,e[19]=b):b=e[19];let E=`dashboards-widget-remove-${t.id}`,m;e[20]!==i?(m=i("Remove widget"),e[20]=i,e[21]=m):m=e[21];let p;e[22]===Symbol.for("react.memo_cache_sentinel")?(p=(0,d.jsxDEV)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,d.jsxDEV)("path",{d:"M5 7h14M9 7V5h6v2m-1 0v12H10V7M7 7v13h10V7"},void 0,!1)},void 0,!1),e[22]=p):p=e[22];let u;e[23]!==K||e[24]!==b||e[25]!==E||e[26]!==m?(u=(0,d.jsxDEV)(I,{"aria-label":b,"data-testid":E,onClick:K,size:"icon-xs",title:m,type:"button",variant:"ghost",children:p},void 0,!1),e[23]=K,e[24]=b,e[25]=E,e[26]=m,e[27]=u):u=e[27];let h;e[28]!==u||e[29]!==C?(h=(0,d.jsxDEV)("div",{className:"flex shrink-0 items-center gap-1",children:[C,u]},void 0,!0),e[28]=u,e[29]=C,e[30]=h):h=e[30];let v;e[31]!==h||e[32]!==S?(v=(0,d.jsxDEV)(V,{className:"flex flex-row items-start justify-between gap-2 border-b pb-3",children:[S,h]},void 0,!0),e[31]=h,e[32]=S,e[33]=v):v=e[33];let g;e[34]!==o||e[35]!==t.id?(g=o!==void 0&&(0,d.jsxDEV)(ee,{className:"font-mono text-xs",testId:`dashboards-widget-error-${t.id}`,variant:"destructive",children:o},void 0,!1),e[34]=o,e[35]=t.id,e[36]=g):g=e[36];let N;e[37]!==o||e[38]!==l||e[39]!==c||e[40]!==i||e[41]!==t.id?(N=o===void 0&&l&&c===void 0&&(0,d.jsxDEV)("p",{className:"p-4 text-sm text-muted-foreground","data-testid":`dashboards-widget-loading-${t.id}`,children:i("Running\u2026")},void 0,!1),e[37]=o,e[38]=l,e[39]=c,e[40]=i,e[41]=t.id,e[42]=N):N=e[42];let r;e[43]!==o||e[44]!==c?(r=o===void 0&&c!==void 0&&(0,d.jsxDEV)(X,{result:c},void 0,!1),e[43]=o,e[44]=c,e[45]=r):r=e[45];let n;e[46]!==g||e[47]!==N||e[48]!==r?(n=(0,d.jsxDEV)(D,{className:"min-h-32 py-2",children:[g,N,r]},void 0,!0),e[46]=g,e[47]=N,e[48]=r,e[49]=n):n=e[49];let y;return e[50]!==v||e[51]!==n||e[52]!==M?(y=(0,d.jsxDEV)(z,{"data-testid":M,children:[v,n]},void 0,!0),e[50]=v,e[51]=n,e[52]=M,e[53]=y):y=e[53],y},"WidgetCard"),ce=k($=>{let e=(0,W.c)(58),{draft:s,editing:f,onCancel:t,onChange:i,onSubmit:o}=$,l=O(),c;e[0]!==s||e[1]!==i?(c=k(_=>{i({...s,title:_.target.value})},"t1"),e[0]=s,e[1]=i,e[2]=c):c=e[2];let q=c,a;e[3]!==s||e[4]!==i?(a=k(_=>{i({...s,sql:_.target.value})},"t2"),e[3]=s,e[4]=i,e[5]=a):a=e[5];let x=a,K;e[6]!==s||e[7]!==i?(K=k(_=>{i({...s,shardKey:_.target.value})},"t3"),e[6]=s,e[7]=i,e[8]=K):K=e[8];let M=K,S;e[9]!==o?(S=k(()=>{o()},"t4"),e[9]=o,e[10]=S):S=e[10];let L=S,R;e[11]!==s.sql||e[12]!==s.title?(R=s.title.trim()!==""&&s.sql.trim()!=="",e[11]=s.sql,e[12]=s.title,e[13]=R):R=e[13];let A=R,w;e[14]!==l?(w=l("Widget title"),e[14]=l,e[15]=w):w=e[15];let C;e[16]!==l?(C=l("Widget title"),e[16]=l,e[17]=C):C=e[17];let b;e[18]!==s.title||e[19]!==q||e[20]!==w||e[21]!==C?(b=(0,d.jsxDEV)("input",{"aria-label":w,className:"h-8 rounded-md border border-border bg-background px-2 text-xs outline-none focus-visible:border-ring","data-testid":"dashboards-form-title",onChange:q,placeholder:C,type:"text",value:s.title},void 0,!1),e[18]=s.title,e[19]=q,e[20]=w,e[21]=C,e[22]=b):b=e[22];let E;e[23]!==l?(E=l("SQL query"),e[23]=l,e[24]=E):E=e[24];let m;e[25]!==s.sql||e[26]!==x||e[27]!==E?(m=(0,d.jsxDEV)("textarea",{"aria-label":E,className:"min-h-24 resize-y rounded-md border border-border bg-background p-2 font-mono text-xs leading-5 outline-none focus-visible:border-ring","data-testid":"dashboards-form-sql",onChange:x,placeholder:"SELECT author, COUNT(*) AS messages FROM \u2026",spellCheck:!1,value:s.sql},void 0,!1),e[25]=s.sql,e[26]=x,e[27]=E,e[28]=m):m=e[28];let p;e[29]!==l?(p=l("Shard key (optional)"),e[29]=l,e[30]=p):p=e[30];let u;e[31]!==l?(u=l("Shard key (optional)"),e[31]=l,e[32]=u):u=e[32];let h;e[33]!==s.shardKey||e[34]!==M||e[35]!==p||e[36]!==u?(h=(0,d.jsxDEV)("input",{"aria-label":p,className:"h-8 rounded-md border border-border bg-background px-2 font-mono text-xs outline-none focus-visible:border-ring","data-testid":"dashboards-form-shard",onChange:M,placeholder:u,type:"text",value:s.shardKey},void 0,!1),e[33]=s.shardKey,e[34]=M,e[35]=p,e[36]=u,e[37]=h):h=e[37];let v;e[38]!==l?(v=l("Cancel"),e[38]=l,e[39]=v):v=e[39];let g;e[40]!==t||e[41]!==v?(g=(0,d.jsxDEV)(I,{"data-testid":"dashboards-form-cancel",onClick:t,size:"sm",type:"button",variant:"outline",children:v},void 0,!1),e[40]=t,e[41]=v,e[42]=g):g=e[42];let N=!A,r;e[43]!==f||e[44]!==l?(r=l(f?"Save widget":"Add widget"),e[43]=f,e[44]=l,e[45]=r):r=e[45];let n;e[46]!==L||e[47]!==N||e[48]!==r?(n=(0,d.jsxDEV)(I,{"data-testid":"dashboards-form-save",disabled:N,onClick:L,size:"sm",type:"button",children:r},void 0,!1),e[46]=L,e[47]=N,e[48]=r,e[49]=n):n=e[49];let y;e[50]!==g||e[51]!==n?(y=(0,d.jsxDEV)("div",{className:"flex items-center justify-end gap-2",children:[g,n]},void 0,!0),e[50]=g,e[51]=n,e[52]=y):y=e[52];let F;return e[53]!==m||e[54]!==h||e[55]!==y||e[56]!==b?(F=(0,d.jsxDEV)(z,{"data-testid":"dashboards-form",children:(0,d.jsxDEV)(D,{className:"flex flex-col gap-3 py-4",children:[b,m,h,y]},void 0,!0)},void 0,!1),e[53]=m,e[54]=h,e[55]=y,e[56]=b,e[57]=F):F=e[57],F},"WidgetForm"),ye=k($=>{let e=(0,W.c)(39),{initialShardKey:s}=$,f=O(),[t,i]=te(re),[o,l]=(0,T.useState)(B),[c,q]=(0,T.useState)(null),[a,x]=(0,T.useState)(!1),K;e[0]!==s?(K=k(()=>{q(null),l({...B,shardKey:s??""}),x(!0)},"t1"),e[0]=s,e[1]=K):K=e[1];let M=K,S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=k(()=>{x(!1),q(null),l(B)},"t2"),e[2]=S):S=e[2];let L=S,R;e[3]!==t?(R=k(r=>{let n=t.find(y=>y.id===r);n!==void 0&&(q(r),l({shardKey:n.shardKey??"",sql:n.sql,title:n.title}),x(!0))},"t3"),e[3]=t,e[4]=R):R=e[4];let A=R,w;e[5]!==i?(w=k(r=>{i(n=>n.filter(y=>y.id!==r))},"t4"),e[5]=i,e[6]=w):w=e[6];let C=w,b;e[7]!==o.shardKey||e[8]!==o.sql||e[9]!==o.title||e[10]!==c||e[11]!==i?(b=k(()=>{let r=o.title.trim(),n=o.sql.trim();if(r===""||n==="")return;let y=o.shardKey.trim();i(c===null?F=>[...F,{id:se("w"),shardKey:y,sql:n,title:r}]:F=>F.map(_=>_.id===c?{..._,shardKey:y,sql:n,title:r}:_)),L()},"t5"),e[7]=o.shardKey,e[8]=o.sql,e[9]=o.title,e[10]=c,e[11]=i,e[12]=b):b=e[12];let E=b,m;e[13]!==f?(m=f("Chart widgets backed by saved read-only SQL queries."),e[13]=f,e[14]=m):m=e[14];let p;e[15]!==m?(p=(0,d.jsxDEV)("p",{className:"text-sm text-muted-foreground",children:m},void 0,!1),e[15]=m,e[16]=p):p=e[16];let u;e[17]!==a||e[18]!==M||e[19]!==f?(u=!a&&(0,d.jsxDEV)(I,{"data-testid":"dashboards-add",onClick:M,size:"sm",type:"button",children:f("Add widget")},void 0,!1),e[17]=a,e[18]=M,e[19]=f,e[20]=u):u=e[20];let h;e[21]!==p||e[22]!==u?(h=(0,d.jsxDEV)("div",{className:"flex items-center justify-between",children:[p,u]},void 0,!0),e[21]=p,e[22]=u,e[23]=h):h=e[23];let v;e[24]!==o||e[25]!==c||e[26]!==a||e[27]!==E?(v=a&&(0,d.jsxDEV)(ce,{draft:o,editing:c!==null,onCancel:L,onChange:l,onSubmit:E},void 0,!1),e[24]=o,e[25]=c,e[26]=a,e[27]=E,e[28]=v):v=e[28];let g;e[29]!==a||e[30]!==A||e[31]!==C||e[32]!==f||e[33]!==t?(g=t.length===0&&!a?(0,d.jsxDEV)(U,{description:f("Add a widget to chart a saved SQL query on this browser."),testId:"dashboards-empty",title:f("No widgets yet")},void 0,!1):(0,d.jsxDEV)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3","data-testid":"dashboards-grid",children:t.map(r=>(0,d.jsxDEV)(ne,{onEdit:A,onRemove:C,widget:r},r.id,!1))},void 0,!1),e[29]=a,e[30]=A,e[31]=C,e[32]=f,e[33]=t,e[34]=g):g=e[34];let N;return e[35]!==v||e[36]!==g||e[37]!==h?(N=(0,d.jsxDEV)("div",{className:"flex flex-col gap-4","data-testid":"lunora-dashboards",children:[h,v,g]},void 0,!0),e[35]=v,e[36]=g,e[37]=h,e[38]=N):N=e[38],N},"DashboardsPanel");export{ye as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as ws}from"./chunk-KEGAWN6Y.js";import{a as xs}from"./chunk-HV7G6DFP.js";import{a as rt}from"./chunk-3OA7PECS.js";import{a as i,e as k,f as j}from"./chunk-RRCPZMC2.js";var Yo=k(j(),1),le=Yo.createContext(null);var Xo=k(j(),1);function D(t){let o=Xo.useContext(le);return(t?.warn??!0)&&!o&&console.warn("Warning: useRouter must be used inside a <RouterProvider> component!"),o}i(D,"useRouter");var Ke=k(j(),1),Mt=Ke.createContext(void 0),Zo=Ke.createContext(void 0);function pt(t){return t[t.length-1]}i(pt,"last");function _s(t){return typeof t=="function"}i(_s,"isFunction");function Y(t,o){return _s(t)?t(o):t}i(Y,"functionalUpdate");var rr=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;function mt(t){for(let o in t)if(rr.call(t,o))return!0;return!1}i(mt,"hasKeys");var Cs=i(()=>Object.create(null),"createNull"),gt=i((t,o)=>at(t,o,Cs),"nullReplaceEqualDeep");function at(t,o,e=()=>({}),s=0){if(!1)return o;if(t===o)return t;if(s>500)return o;let r=o,n=qe(t)&&qe(r);if(!n&&!(Xt(t)&&Xt(r)))return r;let a=n?t:tr(t);if(!a)return r;let f=n?r:tr(r);if(!f)return r;let c=a.length,d=f.length,l=n?new Array(d):e(),u=0;for(let p=0;p<d;p++){let h=n?p:f[p],m=t[h],y=r[h];if(m===y){l[h]=m,(n?p<c:rr.call(t,h))&&u++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){l[h]=y;continue}let g=at(m,y,e,s+1);l[h]=g,g===m&&u++}return c===d&&u===c?t:l}i(at,"replaceEqualDeep");function tr(t){let o=Object.getOwnPropertyNames(t);for(let r of o)if(!Qo.call(t,r))return!1;let e=Object.getOwnPropertySymbols(t);if(e.length===0)return o;let s=o;for(let r of e){if(!Qo.call(t,r))return!1;s.push(r)}return s}i(tr,"getEnumerableOwnKeys");function Xt(t){if(!er(t))return!1;let o=t.constructor;if(typeof o>"u")return!0;let e=o.prototype;return!(!er(e)||!e.hasOwnProperty("isPrototypeOf"))}i(Xt,"isPlainObject");function er(t){return Object.prototype.toString.call(t)==="[object Object]"}i(er,"hasObjectPrototype");function qe(t){return Array.isArray(t)&&t.length===Object.keys(t).length}i(qe,"isPlainArray");function st(t,o,e){if(t===o)return!0;if(typeof t!=typeof o)return!1;if(Array.isArray(t)&&Array.isArray(o)){if(t.length!==o.length)return!1;for(let s=0,r=t.length;s<r;s++)if(!st(t[s],o[s],e))return!1;return!0}if(Xt(t)&&Xt(o)){let s=e?.ignoreUndefined??!0;if(e?.partial){for(let a in o)if((!s||o[a]!==void 0)&&!st(t[a],o[a],e))return!1;return!0}let r=0;if(!s)r=Object.keys(t).length;else for(let a in t)t[a]!==void 0&&r++;let n=0;for(let a in o)if((!s||o[a]!==void 0)&&(n++,n>r||!st(t[a],o[a],e)))return!1;return r===n}return!1}i(st,"deepEqual");function ct(t){let o,e,s=new Promise((r,n)=>{o=r,e=n});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,o(r),t?.(r)},s.reject=r=>{s.status="rejected",e(r)},s}i(ct,"createControlledPromise");function vt(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}i(vt,"isPromise");function Ge(t,o){for(let e=t.length-1;e>=0;e--){let s=t[e];if(o(s))return s}}i(Ge,"findLast");function bs(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}i(bs,"sanitizePathSegment");function or(t){let o;try{o=decodeURI(t)}catch{o=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return bs(o)}i(or,"decodeSegment");var Je=["http:","https:","mailto:","tel:"];function ut(t,o){if(!t)return!1;try{let e=new URL(t);return!o.has(e.protocol)}catch{return!1}}i(ut,"isDangerousProtocol");function Bt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let o=/%25|%5C/gi,e=0,s="",r;for(;(r=o.exec(t))!==null;)s+=or(t.slice(e,r.index))+r[0],e=o.lastIndex;s=s+or(e?t.slice(e):t);let n=!1;return s.startsWith("//")&&(n=!0,s="/"+s.replace(/^\/+/,"")),{path:s,handledProtocolRelativeURL:n}}i(Bt,"decodePath");function sr(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}i(sr,"encodePathLikeUrl");function nr(t,o){if(t===o)return!0;if(t.length!==o.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==o[e])return!1;return!0}i(nr,"arraysEqual");function $(){throw new Error("Invariant failed")}i($,"invariant");function yt(t){let o=new Map,e,s,r=i(n=>{n.next&&(n.prev?(n.prev.next=n.next,n.next.prev=n.prev,n.next=void 0,s&&(s.next=n,n.prev=s)):(n.next.prev=void 0,e=n.next,n.next=void 0,s&&(n.prev=s,s.next=n)),s=n)},"touch");return{get(n){let a=o.get(n);if(a)return r(a),a.value},set(n,a){if(o.size>=t&&e){let c=e;o.delete(c.key),c.next&&(e=c.next,c.next.prev=void 0),c===s&&(s=void 0)}let f=o.get(n);if(f)f.value=a,r(f);else{let c={key:n,value:a,prev:s};s&&(s.next=c),s=c,e||(e=c),o.set(n,c)}},clear(){o.clear(),e=void 0,s=void 0}}}i(yt,"createLRUCache");var St=4,ar=5;function Ls(t){let o=t.indexOf("{");if(o===-1)return null;let e=t.indexOf("}",o);return e===-1||o+1>=t.length?null:[o,e]}i(Ls,"getOpenAndCloseBraces");function Ze(t,o,e=new Uint16Array(6)){let s=t.indexOf("/",o),r=s===-1?t.length:s,n=t.substring(o,r);if(!n||!n.includes("$"))return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e;if(n==="$"){let f=t.length;return e[0]=2,e[1]=o,e[2]=o,e[3]=f,e[4]=f,e[5]=f,e}if(n.charCodeAt(0)===36)return e[0]=1,e[1]=o,e[2]=o+1,e[3]=r,e[4]=r,e[5]=r,e;let a=Ls(n);if(a){let[f,c]=a,d=n.charCodeAt(f+1);if(d===45){if(f+2<n.length&&n.charCodeAt(f+2)===36){let l=f+3,u=c;if(l<u)return e[0]=3,e[1]=o+f,e[2]=o+l,e[3]=o+u,e[4]=o+c+1,e[5]=r,e}}else if(d===36){let l=f+1,u=f+2;return u===c?(e[0]=2,e[1]=o+f,e[2]=o+l,e[3]=o+u,e[4]=o+c+1,e[5]=t.length,e):(e[0]=1,e[1]=o+f,e[2]=o+u,e[3]=o+c,e[4]=o+c+1,e[5]=r,e)}}return e[0]=0,e[1]=o,e[2]=o,e[3]=r,e[4]=r,e[5]=r,e}i(Ze,"parseSegment");function he(t,o,e,s,r,n,a){a?.(e);let f=s;{let c=e.fullPath??e.from,d=c.length,l=e.options?.caseSensitive??t,u=e.options?.params?.parse??e.options?.parseParams;for(;f<d;){let h=Ze(c,f,o),m,y=f,g=h[5];switch(f=g+1,n++,h[0]){case 0:{let v=c.substring(h[2],h[3]);if(l){let R=r.static?.get(v);if(R)m=R;else{r.static??=new Map;let S=It(e.fullPath??e.from);S.parent=r,S.depth=n,m=S,r.static.set(v,S)}}else{let R=v.toLowerCase(),S=r.staticInsensitive?.get(R);if(S)m=S;else{r.staticInsensitive??=new Map;let P=It(e.fullPath??e.from);P.parent=r,P.depth=n,m=P,r.staticInsensitive.set(R,P)}}break}case 1:{let v=c.substring(y,h[1]),R=c.substring(h[4],g),S=l&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!u&&r.dynamic?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Xe(1,e.fullPath??e.from,S,P,_);m=x,x.depth=n,x.parent=r,r.dynamic??=[],r.dynamic.push(x)}break}case 3:{let v=c.substring(y,h[1]),R=c.substring(h[4],g),S=l&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=!u&&r.optional?.find(x=>!x.parse&&x.caseSensitive===S&&x.prefix===P&&x.suffix===_);if(b)m=b;else{let x=Xe(3,e.fullPath??e.from,S,P,_);m=x,x.parent=r,x.depth=n,r.optional??=[],r.optional.push(x)}break}case 2:{let v=c.substring(y,h[1]),R=c.substring(h[4],g),S=l&&!!(v||R),P=v?S?v:v.toLowerCase():void 0,_=R?S?R:R.toLowerCase():void 0,b=Xe(2,e.fullPath??e.from,S,P,_);m=b,b.parent=r,b.depth=n,r.wildcard??=[],r.wildcard.push(b)}}r=m}if(u&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){let h=It(e.fullPath??e.from);h.kind=ar,h.parent=r,n++,h.depth=n,r.pathless??=[],r.pathless.push(h),r=h}let p=(e.path||!e.children)&&!e.isRoot;if(p&&c.endsWith("/")){let h=It(e.fullPath??e.from);h.kind=St,h.parent=r,n++,h.depth=n,r.index=h,r=h}r.parse=u??null,r.priority=e.options?.params?.priority??0,p&&!r.route&&(r.route=e,r.fullPath=e.fullPath??e.from)}if(e.children)for(let c of e.children)he(t,o,c,f,r,n,a)}i(he,"parseSegments");function Ye(t,o){if(t.parse&&!o.parse)return-1;if(!t.parse&&o.parse)return 1;if(t.parse&&o.parse&&(t.priority||o.priority))return o.priority-t.priority;if(t.prefix&&o.prefix&&t.prefix!==o.prefix){if(t.prefix.startsWith(o.prefix))return-1;if(o.prefix.startsWith(t.prefix))return 1}if(t.suffix&&o.suffix&&t.suffix!==o.suffix){if(t.suffix.endsWith(o.suffix))return-1;if(o.suffix.endsWith(t.suffix))return 1}return t.prefix&&!o.prefix?-1:!t.prefix&&o.prefix?1:t.suffix&&!o.suffix?-1:!t.suffix&&o.suffix?1:t.caseSensitive&&!o.caseSensitive?-1:!t.caseSensitive&&o.caseSensitive?1:0}i(Ye,"sortDynamic");function Rt(t){if(t.pathless)for(let o of t.pathless)Rt(o);if(t.static)for(let o of t.static.values())Rt(o);if(t.staticInsensitive)for(let o of t.staticInsensitive.values())Rt(o);if(t.dynamic?.length){t.dynamic.sort(Ye);for(let o of t.dynamic)Rt(o)}if(t.optional?.length){t.optional.sort(Ye);for(let o of t.optional)Rt(o)}if(t.wildcard?.length){t.wildcard.sort(Ye);for(let o of t.wildcard)Rt(o)}}i(Rt,"sortTreeNodes");function It(t){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0}}i(It,"createStaticNode");function Xe(t,o,e,s,r){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:o,parent:null,parse:null,priority:0,caseSensitive:e,prefix:s,suffix:r}}i(Xe,"createDynamicNode");function cr(t,o){let e=It("/"),s=new Uint16Array(6);for(let r of t)he(!1,s,r,1,e,0);Rt(e),o.masksTree=e,o.flatCache=yt(1e3)}i(cr,"processRouteMasks");function ur(t,o){t||="/";let e=o.flatCache.get(t);if(e)return e;let s=Qe(t,o.masksTree);return o.flatCache.set(t,s),s}i(ur,"findFlatMatch");function lr(t,o,e,s,r){t||="/",s||="/";let n=o?`case\0${t}`:t,a=r.singleCache.get(n);return a||(a=It("/"),he(o,new Uint16Array(6),{from:t},1,a,0),r.singleCache.set(n,a)),Qe(s,a,e)}i(lr,"findSingleMatch");function fr(t,o,e=!1){let s=e?t:`nofuzz\0${t}`,r=o.matchCache.get(s);if(r!==void 0)return r;t||="/";let n;try{n=Qe(t,o.segmentTree,e)}catch(a){if(a instanceof URIError)n=null;else throw a}return n&&(n.branch=to(n.route)),o.matchCache.set(s,n),n}i(fr,"findRouteMatch");function Ms(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}i(Ms,"trimPathRight");function dr(t,o=!1,e){let s=It(t.fullPath),r=new Uint16Array(6),n={},a={},f=0;return he(o,r,t,1,s,0,c=>{if(e?.(c,f),c.id in n)throw new Error(`Invariant failed: Duplicate routes found with id: ${String(c.id)}`);if(n[c.id]=c,f!==0&&c.path){let d=Ms(c.fullPath);(!a[d]||c.fullPath.endsWith("/"))&&(a[d]=c)}f++}),Rt(s),{processedTree:{segmentTree:s,singleCache:yt(1e3),matchCache:yt(1e3),flatCache:null,masksTree:null},routesById:n,routesByPath:a}}i(dr,"processRouteTree");function Qe(t,o,e=!1){let s=t.split("/"),r=Es(t,s,o,e);if(!r)return null;let[n]=hr(t,s,r);return{route:r.node.route,rawParams:n}}i(Qe,"findMatch");function hr(t,o,e){let s=Is(e.node),r=null,n=Object.create(null),a=e.extract?.part??0,f=e.extract?.node??0,c=e.extract?.path??0,d=e.extract?.segment??0;for(;f<s.length;a++,f++,c++,d++){let l=s[f];if(l.kind===St)break;if(l.kind===ar){d--,a--,c--;continue}let u=o[a],p=c;if(u&&(c+=u.length),l.kind===1){r??=e.node.fullPath.split("/");let h=r[d],m=l.prefix?.length??0;if(h.charCodeAt(m)===123){let y=l.suffix?.length??0,g=h.substring(m+2,h.length-y-1),v=u.substring(m,u.length-y);n[g]=decodeURIComponent(v)}else{let y=h.substring(1);n[y]=decodeURIComponent(u)}}else if(l.kind===3){if(e.skipped&1<<f){a--,c=p-1;continue}r??=e.node.fullPath.split("/");let h=r[d],m=l.prefix?.length??0,y=l.suffix?.length??0,g=h.substring(m+3,h.length-y-1),v=l.suffix||l.prefix?u.substring(m,u.length-y):u;v&&(n[g]=decodeURIComponent(v))}else if(l.kind===2){let h=l,m=t.substring(p+(h.prefix?.length??0),t.length-(h.suffix?.length??0)),y=decodeURIComponent(m);n["*"]=y,n._splat=y;break}}return e.rawParams&&Object.assign(n,e.rawParams),[n,{part:a,node:f,path:c,segment:d}]}i(hr,"extractParams");function to(t){let o=[t];for(;t.parentRoute;)t=t.parentRoute,o.push(t);return o.reverse(),o}i(to,"buildRouteBranch");function Is(t){let o=Array(t.depth+1);do o[t.depth]=t,t=t.parent;while(t);return o}i(Is,"buildBranch");function Es(t,o,e,s){if(t==="/"&&e.index)return{node:e.index,skipped:0};let r=!pt(o),n=r&&t!=="/",a=o.length-(r?1:0),f=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,d=null;for(;f.length;){let l=f.pop(),{node:u,index:p,skipped:h,depth:m,statics:y,dynamics:g,optionals:v}=l,{extract:R,rawParams:S}=l;if(u.kind===2&&u.route&&!de(d,l))continue;if(u.parse){if(!ir(t,o,l))continue;S=l.rawParams,R=l.extract}s&&u.route&&u.kind!==St&&de(c,l)&&(c=l);let P=p===a;if(P&&(u.route&&(!n||u.kind===St||u.kind===2)&&de(d,l)&&(d=l),!u.optional&&!u.wildcard&&!u.index&&!u.pathless))continue;let _=P?void 0:o[p],b;if(P&&u.index){let x={node:u.index,index:p,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S},w=!0;if(u.index.parse&&(ir(t,o,x)||(w=!1)),w){if(!g&&!v&&!h&&ks(y,a))return x;de(d,x)&&(d=x)}}if(u.wildcard)for(let x=u.wildcard.length-1;x>=0;x--){let w=u.wildcard[x],{prefix:C,suffix:I}=w;if(!(C&&(P||!(w.caseSensitive?_:b??=_.toLowerCase()).startsWith(C)))){if(I){if(P)continue;let L=o.slice(p).join("/").slice(-I.length);if((w.caseSensitive?L:L.toLowerCase())!==I)continue}f.push({node:w,index:a,skipped:h,depth:m+1,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}if(u.optional){let x=h|1<<m,w=m+1;for(let C=u.optional.length-1;C>=0;C--){let I=u.optional[C];f.push({node:I,index:p,skipped:x,depth:w,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P)for(let C=u.optional.length-1;C>=0;C--){let I=u.optional[C],{prefix:L,suffix:M}=I;if(L||M){let et=I.caseSensitive?_:b??=_.toLowerCase();if(L&&!et.startsWith(L)||M&&!et.endsWith(M))continue}f.push({node:I,index:p+1,skipped:h,depth:w,statics:y,dynamics:g,optionals:v+fe(a,p),extract:R,rawParams:S})}}if(!P&&u.dynamic&&_)for(let x=u.dynamic.length-1;x>=0;x--){let w=u.dynamic[x],{prefix:C,suffix:I}=w;if(C||I){let L=w.caseSensitive?_:b??=_.toLowerCase();if(C&&!L.startsWith(C)||I&&!L.endsWith(I))continue}f.push({node:w,index:p+1,skipped:h,depth:m+1,statics:y,dynamics:g+fe(a,p),optionals:v,extract:R,rawParams:S})}if(!P&&u.staticInsensitive){let x=u.staticInsensitive.get(b??=_.toLowerCase());x&&f.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+fe(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(!P&&u.static){let x=u.static.get(_);x&&f.push({node:x,index:p+1,skipped:h,depth:m+1,statics:y+fe(a,p),dynamics:g,optionals:v,extract:R,rawParams:S})}if(u.pathless){let x=m+1;for(let w=u.pathless.length-1;w>=0;w--){let C=u.pathless[w];f.push({node:C,index:p,skipped:h,depth:x,statics:y,dynamics:g,optionals:v,extract:R,rawParams:S})}}}if(d)return d;if(s&&c){let l=c.index;for(let p=0;p<c.index;p++)l+=o[p].length;let u=l===t.length?"/":t.slice(l);return c.rawParams??=Object.create(null),c.rawParams["**"]=decodeURIComponent(u),c}return null}i(Es,"getNodeMatch");function fe(t,o){return 2**(t-o-1)}i(fe,"segmentScore");function ks(t,o){return t===2**(o-1)-1}i(ks,"isPerfectStaticMatch");function ir(t,o,e){let s,r;try{[s,r]=hr(t,o,e)}catch{return null}if(e.rawParams=s,e.extract=r,!e.node.parse)return!0;try{if(e.node.parse(s)===!1)return null}catch{}return!0}i(ir,"validateParseParams");function de(t,o){return t?o.statics>t.statics||o.statics===t.statics&&(o.dynamics>t.dynamics||o.dynamics===t.dynamics&&(o.optionals>t.optionals||o.optionals===t.optionals&&((o.node.kind===St)>(t.node.kind===St)||o.node.kind===St==(t.node.kind===St)&&o.depth>t.depth))):!0}i(de,"isFrameMoreSpecific");function Et(t){return Qt(t.filter(o=>o!==void 0).join("/"))}i(Et,"joinPaths");function Qt(t){return t.replace(/\/{2,}/g,"/")}i(Qt,"cleanPath");function pe(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}i(pe,"trimPathLeft");function Q(t){let o=t.length;return o>1&&t[o-1]==="/"?t.replace(/\/{1,}$/,""):t}i(Q,"trimPathRight");function te(t){return Q(pe(t))}i(te,"trimPath");function Pt(t,o){return t?.endsWith("/")&&t!=="/"&&t!==`${o}/`?t.slice(0,-1):t}i(Pt,"removeTrailingSlash");function me(t,o,e){return Pt(t,e)===Pt(o,e)}i(me,"exactPathTest");function eo({base:t,to:o,trailingSlash:e="never",cache:s}){let r=o.startsWith("/"),n=!r&&o===".",a;if(s){a=r?o:n?t:t+"\0"+o;let d=s.get(a);if(d)return d}let f;if(n)f=t.split("/");else if(r)f=o.split("/");else{for(f=t.split("/");f.length>1&&pt(f)==="";)f.pop();let d=o.split("/");for(let l=0,u=d.length;l<u;l++){let p=d[l];p===""?l?l===u-1&&f.push(p):f=[p]:p===".."?f.pop():p==="."||f.push(p)}}f.length>1&&(pt(f)===""?e==="never"&&f.pop():e==="always"&&f.push(""));let c=Qt(f.join("/"))||"/";return a&&s&&s.set(a,c),c}i(eo,"resolvePath");function mr(t){let o=new Map(t.map(r=>[encodeURIComponent(r),r])),e=Array.from(o.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),s=new RegExp(e,"g");return r=>r.replace(s,n=>o.get(n)??n)}i(mr,"compileDecodeCharMap");function Zt(t,o,e){let s=o[t];return typeof s!="string"?s:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(s)?s:s.split("/").map(r=>pr(r,e)).join("/"):pr(s,e)}i(Zt,"encodeParam");function ge({path:t,params:o,decoder:e,...s}){let r=!1,n=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:n,isMissingParams:r};if(!t.includes("$"))return{interpolatedPath:t,usedParams:n,isMissingParams:r};if(!1){let l=t.length,u=0,p="";for(;u<l;){for(;u<l&&t.charCodeAt(u)===47;)u++;if(u>=l)break;let h=u,m=t.indexOf("/",u);m===-1&&(m=l),u=m;let y=t.substring(h,m);if(y)if(y.charCodeAt(0)===36)if(y.length===1){let g=o._splat;if(n._splat=g,n["*"]=g,!g){r=!0;continue}let v=Zt("_splat",o,e);p+="/"+v}else{let g=y.substring(1);!r&&!(g in o)&&(r=!0),n[g]=o[g];let v=Zt(g,o,e)??"undefined";p+="/"+v}else p+="/"+y}return t.endsWith("/")&&(p+="/"),{usedParams:n,interpolatedPath:p||"/",isMissingParams:r}}let a=t.length,f=0,c,d="";for(;f<a;){let l=f;c=Ze(t,l,c);let u=c[5];if(f=u+1,l===u)continue;let p=c[0];if(p===0){d+="/"+t.substring(l,u);continue}if(p===2){let h=o._splat;n._splat=h,n["*"]=h;let m=t.substring(l,c[1]),y=t.substring(c[4],u);if(!h){r=!0,(m||y)&&(d+="/"+m+y);continue}let g=Zt("_splat",o,e);d+="/"+m+g+y;continue}if(p===1){let h=t.substring(c[2],c[3]);!r&&!(h in o)&&(r=!0),n[h]=o[h];let m=t.substring(l,c[1]),y=t.substring(c[4],u),g=Zt(h,o,e)??"undefined";d+="/"+m+g+y;continue}if(p===3){let h=t.substring(c[2],c[3]),m=o[h];if(m==null)continue;n[h]=m;let y=t.substring(l,c[1]),g=t.substring(c[4],u),v=Zt(h,o,e)??"";d+="/"+y+v+g;continue}}return t.endsWith("/")&&(d+="/"),{usedParams:n,interpolatedPath:d||"/",isMissingParams:r}}i(ge,"interpolatePath");function pr(t,o){let e=encodeURIComponent(t);return o?.(e)??e}i(pr,"encodePathParam");function A(t){return t?.isNotFound===!0}i(A,"isNotFound");function gr(t,o=String){let e=new URLSearchParams;for(let s in t){let r=t[s];r!==void 0&&e.set(s,o(r))}return e.toString()}i(gr,"encode");function oo(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}i(oo,"toValue");function vr(t){let o=new URLSearchParams(t),e=Object.create(null);for(let[s,r]of o.entries()){let n=e[s];n==null?e[s]=oo(r):Array.isArray(n)?n.push(oo(r)):e[s]=[n,oo(r)]}return e}i(vr,"decode");var yr=Ts(JSON.parse),Rr=Os(JSON.stringify,JSON.parse);function Ts(t){return o=>{o[0]==="?"&&(o=o.substring(1));let e=vr(o);for(let s in e){let r=e[s];if(typeof r=="string")try{e[s]=t(r)}catch{}}return e}}i(Ts,"parseSearchWith");function Os(t,o){let e=typeof o=="function";function s(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(e&&typeof r=="string")try{return o(r),t(r)}catch{}return r}return i(s,"stringifyValue"),r=>{let n=gr(r,s);return n?`?${n}`:""}}i(Os,"stringifySearchWith");var X="__root__";function $t(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let o=new Headers(t.headers);t.href&&o.get("Location")===null&&o.set("Location",t.href);let e=new Response(null,{status:t.statusCode,headers:o});if(e.options=t,t.throw)throw e;return e}i($t,"redirect");function H(t){return t instanceof Response&&!!t.options}i(H,"isRedirect");var ro=i(t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},"triggerOnReady"),Ns=i(t=>t.stores.matchesId.get().some(o=>t.stores.matchStores.get(o)?.get()._forcePending),"hasForcePendingActiveMatch"),Re=i((t,o)=>!!(t.preload&&!t.router.stores.matchStores.has(o)),"resolvePreload"),kt=i((t,o,e=!0)=>{let s={...t.router.options.context??{}},r=e?o:o-1;for(let n=0;n<=r;n++){let a=t.matches[n];if(!a)continue;let f=t.router.getMatch(a.id);f&&Object.assign(s,f.__routeContext,f.__beforeLoadContext)}return s},"buildMatchContext"),Sr=i((t,o)=>{if(!t.matches.length)return;let e=o.routeId,s=t.matches.findIndex(a=>a.routeId===t.router.routeTree.id),r=s>=0?s:0,n=e?t.matches.findIndex(a=>a.routeId===e):t.firstBadMatchIndex??t.matches.length-1;n<0&&(n=r);for(let a=n;a>=0;a--){let f=t.matches[a];if(t.router.looseRoutesById[f.routeId].options.notFoundComponent)return a}return e?n:r},"getNotFoundBoundaryIndex"),xt=i((t,o,e)=>{if(!(!H(e)&&!A(e)))throw H(e)&&e.redirectHandled&&!e.options.reloadDocument||(o&&(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.loaderPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loaderPromise=void 0,o._nonReactive.error=e,t.updateMatch(o.id,s=>({...s,status:H(e)?"redirected":A(e)?"notFound":s.status==="pending"?"success":s.status,context:kt(t,o.index),isFetching:!1,error:e})),A(e)&&!e.routeId&&(e.routeId=o.routeId),o._nonReactive.loadPromise?.resolve()),H(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},"handleRedirectAndNotFound"),_r=i((t,o)=>{let e=t.router.getMatch(o);return!!(!e||!!1&&e._nonReactive.dehydrated||!1)},"shouldSkipLoader"),Pr=i((t,o,e)=>{let s=kt(t,e);t.updateMatch(o,r=>({...r,context:s}))},"syncMatchContext"),ee=i((t,o,e)=>{let{id:s,routeId:r}=t.matches[o],n=t.router.looseRoutesById[r];if(e instanceof Promise)throw e;t.firstBadMatchIndex??=o,xt(t,t.router.getMatch(s),e);try{n.options.onError?.(e)}catch(a){e=a,xt(t,t.router.getMatch(s),e)}t.updateMatch(s,a=>(a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,a._nonReactive.loadPromise?.resolve(),{...a,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!t.preload&&!H(e)&&!A(e)&&(t.serialError??=e)},"handleSerialError"),Ds=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=t.matches[e-1]?.id,a=n?t.router.getMatch(n):void 0;if(t.router.isShell()){r.ssr=s.id===X;return}if(a?.ssr===!1){r.ssr=!1;return}let f=i(h=>h===!0&&a?.ssr==="data-only"?"data-only":h,"parentOverride"),c=t.router.options.defaultSsr??!0;if(s.options.ssr===void 0){r.ssr=f(c);return}if(typeof s.options.ssr!="function"){r.ssr=f(s.options.ssr);return}let{search:d,params:l}=r,u={search:ve(d,r.searchError),params:ve(l,r.paramsError),location:t.location,matches:t.matches.map(h=>({index:h.index,pathname:h.pathname,fullPath:h.fullPath,staticData:h.staticData,id:h.id,routeId:h.routeId,search:ve(h.search,h.searchError),params:ve(h.params,h.paramsError),ssr:h.ssr}))},p=s.options.ssr(u);if(vt(p))return p.then(h=>{r.ssr=f(h??c)});r.ssr=f(p??c)},"isBeforeLoadSsr"),Cr=i((t,o,e,s)=>{if(s._nonReactive.pendingTimeout!==void 0)return;let r=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!!1&&!Re(t,o)&&(e.options.loader||e.options.beforeLoad||no(e))&&typeof r=="number"&&r!==1/0&&(e.options.pendingComponent??t.router.options?.defaultPendingComponent)){let n=setTimeout(()=>{ro(t)},r);s._nonReactive.pendingTimeout=n}},"setupPendingTimeout"),Fs=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s._nonReactive.beforeLoadPromise&&!s._nonReactive.loaderPromise)return;Cr(t,o,e,s);let r=i(()=>{let n=t.router.getMatch(o);n.preload&&(n.status==="redirected"||n.status==="notFound")&&xt(t,n,n.error)},"then");return s._nonReactive.beforeLoadPromise?s._nonReactive.beforeLoadPromise.then(r):r()},"preBeforeLoadSetup"),As=i((t,o,e,s)=>{let r=t.router.getMatch(o),n=r._nonReactive.loadPromise;r._nonReactive.loadPromise=ct(()=>{n?.resolve(),n=void 0});let{paramsError:a,searchError:f}=r;a&&ee(t,e,a),f&&ee(t,e,f),Cr(t,o,s,r);let c=new AbortController,d=!1,l=i(()=>{d||(d=!0,t.updateMatch(o,P=>({...P,isFetching:"beforeLoad",fetchCount:P.fetchCount+1,abortController:c})))},"pending"),u=i(()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(o,P=>({...P,isFetching:!1}))},"resolve");if(!s.options.beforeLoad){t.router.batch(()=>{l(),u()});return}r._nonReactive.beforeLoadPromise=ct();let p={...kt(t,e,!1),...r.__routeContext},{search:h,params:m,cause:y}=r,g=Re(t,o),v={search:h,abortController:c,params:m,preload:g,context:p,location:t.location,navigate:i(P=>t.router.navigate({...P,_fromLocation:t.location}),"navigate"),buildLocation:t.router.buildLocation,cause:g?"preload":y,matches:t.matches,routeId:s.id,...t.router.options.additionalContext},R=i(P=>{if(P===void 0){t.router.batch(()=>{l(),u()});return}(H(P)||A(P))&&(l(),ee(t,e,P)),t.router.batch(()=>{l(),t.updateMatch(o,_=>({..._,__beforeLoadContext:P})),u()})},"updateContext"),S;try{if(S=s.options.beforeLoad(v),vt(S))return l(),S.catch(P=>{ee(t,e,P)}).then(R)}catch(P){l(),ee(t,e,P)}R(S)},"executeBeforeLoad"),Bs=i((t,o)=>{let{id:e,routeId:s}=t.matches[o],r=t.router.looseRoutesById[s],n=i(()=>{if(!1){let c=Ds(t,e,o,r);if(vt(c))return c.then(f)}return f()},"serverSsr"),a=i(()=>As(t,e,o,r),"execute"),f=i(()=>{if(_r(t,e))return;let c=Fs(t,e,r);return vt(c)?c.then(a):a()},"queueExecution");return n()},"handleBeforeLoad"),$s=i((t,o,e)=>{let s=t.router.getMatch(o);if(!s||!e.options.head&&!e.options.scripts&&!e.options.headers)return;let r={ssr:t.router.options.ssr,matches:t.matches,match:s,params:s.params,loaderData:s.loaderData};return Promise.all([e.options.head?.(r),e.options.scripts?.(r),e.options.headers?.(r)]).then(([n,a,f])=>({meta:n?.meta,links:n?.links,headScripts:n?.scripts,headers:f,scripts:a,styles:n?.styles}))},"executeHead"),br=i((t,o,e,s,r)=>{let n=o[s-1],{params:a,loaderDeps:f,abortController:c,cause:d}=t.router.getMatch(e),l=kt(t,s),u=Re(t,e);return{params:a,deps:f,preload:!!u,parentMatchPromise:n,abortController:c,context:l,location:t.location,navigate:i(p=>t.router.navigate({...p,_fromLocation:t.location}),"navigate"),cause:u?"preload":d,route:r,...t.router.options.additionalContext}},"getLoaderContext"),xr=i(async(t,o,e,s,r)=>{try{let n=t.router.getMatch(e);try{(!!1||n.ssr===!0)&&Ut(r);let a=r.options.loader,f=typeof a=="function"?a:a?.handler,c=f?.(br(t,o,e,s,r)),d=!!f&&vt(c);if((d||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||n._nonReactive.minPendingPromise)&&t.updateMatch(e,u=>({...u,isFetching:"loader"})),f){let u=d?await c:c;xt(t,t.router.getMatch(e),u),u!==void 0&&t.updateMatch(e,p=>({...p,loaderData:u}))}r._lazyPromise&&await r._lazyPromise;let l=n._nonReactive.minPendingPromise;l&&await l,r._componentsPromise&&await r._componentsPromise,t.updateMatch(e,u=>({...u,error:void 0,context:kt(t,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let f=a;if(f?.name==="AbortError"){if(n.abortController.signal.aborted){n._nonReactive.loaderPromise?.resolve(),n._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:kt(t,s)}));return}let c=n._nonReactive.minPendingPromise;c&&await c,A(a)&&await r.options.notFoundComponent?.preload?.(),xt(t,t.router.getMatch(e),a);try{r.options.onError?.(a)}catch(d){f=d,xt(t,t.router.getMatch(e),d)}!H(f)&&!A(f)&&await Ut(r,["errorComponent"]),t.updateMatch(e,d=>({...d,error:f,context:kt(t,s),status:"error",isFetching:!1}))}}catch(n){let a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),xt(t,a,n)}},"runLoader"),Us=i(async(t,o,e)=>{async function s(h,m,y,g,v){let R=Date.now()-m.updatedAt,S=h?v.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:v.options.staleTime??t.router.options.defaultStaleTime??0,P=v.options.shouldReload,_=typeof P=="function"?P(br(t,o,r,e,v)):P,{status:b,invalid:x}=g,w=R>=S&&(!!t.forceStaleReload||g.cause==="enter"||y!==void 0&&y!==g.id);a=b==="success"&&(x||(_??w)),h&&v.options.preload===!1||(a&&!t.sync&&l?(f=!0,(async()=>{try{await xr(t,o,r,e,v);let C=t.router.getMatch(r);C._nonReactive.loaderPromise?.resolve(),C._nonReactive.loadPromise?.resolve(),C._nonReactive.loaderPromise=void 0,C._nonReactive.loadPromise=void 0}catch(C){H(C)&&await t.router.navigate(C.options)}})()):b!=="success"||a?await xr(t,o,r,e,v):Pr(t,r,e))}i(s,"handleLoader");let{id:r,routeId:n}=t.matches[e],a=!1,f=!1,c=t.router.looseRoutesById[n],d=c.options.loader,l=((typeof d=="function"?void 0:d?.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(_r(t,r)){if(!t.router.getMatch(r))return t.matches[e];if(Pr(t,r,e),!1)return t.router.getMatch(r)}else{let h=t.router.getMatch(r),m=t.router.stores.matchesId.get()[e],y=(m&&t.router.stores.matchStores.get(m)||null)?.routeId===n?m:t.router.stores.matches.get().find(v=>v.routeId===n)?.id,g=Re(t,r);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!t.sync&&!h.preload&&l)return h;await h._nonReactive.loaderPromise;let v=t.router.getMatch(r),R=v._nonReactive.error||v.error;R&&xt(t,v,R),v.status==="pending"&&await s(g,h,y,v,c)}else{let v=g&&!t.router.stores.matchStores.has(r),R=t.router.getMatch(r);R._nonReactive.loaderPromise=ct(),v!==R.preload&&t.updateMatch(r,S=>({...S,preload:v})),await s(g,h,y,R,c)}}let u=t.router.getMatch(r);f||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve(),u._nonReactive.loadPromise=void 0),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,f||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;let p=f?u.isFetching:!1;return p!==u.isFetching||u.invalid!==!1?(t.updateMatch(r,h=>({...h,isFetching:p,invalid:!1})),t.router.getMatch(r)):u},"loadRouteMatch");async function so(t){let o=t,e=[];!!1&&Ns(o.router)&&ro(o);let s;for(let p=0;p<o.matches.length;p++){try{let h=Bs(o,p);vt(h)&&await h}catch(h){if(H(h))throw h;if(A(h))s=h;else if(!o.preload)throw h;break}if(o.serialError||o.firstBadMatchIndex!=null)break}let r=o.firstBadMatchIndex??o.matches.length,n=s&&!o.preload?Sr(o,s):void 0,a=s&&o.preload?0:n!==void 0?Math.min(n+1,r):r,f,c;for(let p=0;p<a;p++)e.push(Us(o,e,p));try{await Promise.all(e)}catch{let p=await Promise.allSettled(e);for(let h of p){if(h.status!=="rejected")continue;let m=h.reason;if(H(m))throw m;A(m)?f??=m:c??=m}if(c!==void 0)throw c}let d=f??(s&&!o.preload?s:void 0),l=o.firstBadMatchIndex!==void 0?o.firstBadMatchIndex:o.matches.length-1;if(!d&&s&&o.preload)return o.matches;if(d){let p=Sr(o,d);if(p===void 0)throw new Error("Invariant failed: Could not find match for notFound boundary");let h=o.matches[p],m=o.router.looseRoutesById[h.routeId],y=o.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),d.routeId=h.routeId;let g=h.routeId===o.router.routeTree.id;o.updateMatch(h.id,v=>({...v,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:d},isFetching:!1})),l=p,await Ut(m,["notFoundComponent"])}else if(!o.preload){let p=o.matches[0];p.globalNotFound||o.router.getMatch(p.id)?.globalNotFound&&o.updateMatch(p.id,h=>({...h,globalNotFound:!1,error:void 0}))}if(o.serialError&&o.firstBadMatchIndex!==void 0){let p=o.router.looseRoutesById[o.matches[o.firstBadMatchIndex].routeId];await Ut(p,["errorComponent"])}for(let p=0;p<=l;p++){let{id:h,routeId:m}=o.matches[p],y=o.router.looseRoutesById[m];try{let g=$s(o,h,y);if(g){let v=await g;o.updateMatch(h,R=>({...R,...v}))}}catch(g){console.error(`Error executing head for route ${m}:`,g)}}let u=ro(o);if(vt(u)&&await u,d)throw d;if(o.serialError&&!o.preload&&!o.onReady)throw o.serialError;return o.matches}i(so,"loadMatches");function wr(t,o){let e=o.map(s=>t.options[s]?.preload?.()).filter(Boolean);if(e.length!==0)return Promise.all(e)}i(wr,"preloadRouteComponents");function Ut(t,o=ye){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(s=>{let{id:r,...n}=s.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);let e=i(()=>t._componentsLoaded?void 0:o===ye?(()=>{if(t._componentsPromise===void 0){let s=wr(t,ye);s?t._componentsPromise=s.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():wr(t,o),"runAfterLazy");return t._lazyPromise?t._lazyPromise.then(e):e()}i(Ut,"loadRouteChunk");function ve(t,o){return o?{status:"error",error:o}:{status:"success",value:t}}i(ve,"makeMaybe");function no(t){for(let o of ye)if(t.options[o]?.preload)return!0;return!1}i(no,"routeNeedsPreload");var ye=["component","errorComponent","pendingComponent","notFoundComponent"];function Lr(t){return{input:i(({url:o})=>{for(let e of t)o=Se(e,o);return o},"input"),output:i(({url:o})=>{for(let e=t.length-1;e>=0;e--)o=io(t[e],o);return o},"output")}}i(Lr,"composeRewrites");function Mr(t){let o=te(t.basepath),e=`/${o}`,s=t.caseSensitive?e:e.toLowerCase(),r=`${s}/`;return{input:i(({url:n})=>{let a=t.caseSensitive?n.pathname:n.pathname.toLowerCase();return a===s?n.pathname="/":a.startsWith(r)&&(n.pathname=n.pathname.slice(e.length)),n},"input"),output:i(({url:n})=>(n.pathname=Et(["/",o,n.pathname]),n),"output")}}i(Mr,"rewriteBasepath");function Se(t,o){let e=t?.input?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(Se,"executeRewriteInput");function io(t,o){let e=t?.output?.({url:o});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return o}i(io,"executeRewriteOutput");function uo(t){let o=t;return{get(){return o},set(e){o=Y(e,o)}}}i(uo,"createNonReactiveMutableStore");function lo(t){return{get(){return t()}}}i(lo,"createNonReactiveReadonlyStore");function Ir(t,o){let{createMutableStore:e,createReadonlyStore:s,batch:r,init:n}=o,a=new Map,f=new Map,c=new Map,d=e(t.status),l=e(t.loadedAt),u=e(t.isLoading),p=e(t.isTransitioning),h=e(t.location),m=e(t.resolvedLocation),y=e(t.statusCode),g=e(t.redirect),v=e([]),R=e([]),S=e([]),P=s(()=>ao(a,v.get())),_=s(()=>ao(f,R.get())),b=s(()=>ao(c,S.get())),x=s(()=>v.get()[0]),w=s(()=>v.get().some(ot=>a.get(ot)?.get().status==="pending")),C=s(()=>({locationHref:h.get().href,resolvedLocationHref:m.get()?.href,status:d.get()})),I=s(()=>({status:d.get(),loadedAt:l.get(),isLoading:u.get(),isTransitioning:p.get(),matches:P.get(),location:h.get(),resolvedLocation:m.get(),statusCode:y.get(),redirect:g.get()})),L=yt(64);function M(ot){let qt=L.get(ot);return qt||(qt=s(()=>{let Bo=v.get();for(let $o of Bo){let ae=a.get($o);if(ae&&ae.routeId===ot)return ae.get()}}),L.set(ot,qt)),qt}i(M,"getRouteMatchStore");let et={status:d,loadedAt:l,isLoading:u,isTransitioning:p,location:h,resolvedLocation:m,statusCode:y,redirect:g,matchesId:v,pendingIds:R,cachedIds:S,matches:P,pendingMatches:_,cachedMatches:b,firstId:x,hasPending:w,matchRouteDeps:C,matchStores:a,pendingMatchStores:f,cachedMatchStores:c,__store:I,getRouteMatchStore:M,setMatches:V,setPending:dt,setCached:ie};V(t.matches),n?.(et);function V(ot){co(ot,a,v,e,r)}i(V,"setMatches");function dt(ot){co(ot,f,R,e,r)}i(dt,"setPending");function ie(ot){co(ot,c,S,e,r)}return i(ie,"setCached"),et}i(Ir,"createRouterStores");function ao(t,o){let e=[];for(let s of o){let r=t.get(s);r&&e.push(r.get())}return e}i(ao,"readPoolMatches");function co(t,o,e,s,r){let n=t.map(f=>f.id),a=new Set(n);r(()=>{for(let f of o.keys())a.has(f)||o.delete(f);for(let f of t){let c=o.get(f.id);if(!c){let d=s(f);d.routeId=f.routeId,o.set(f.id,d);continue}c.routeId=f.routeId,c.get()!==f&&c.set(f)}nr(e.get(),n)||e.set(n)})}i(co,"reconcileMatchPool");var wt="__TSR_index",Er="popstate",kr="beforeunload";function ho(t){let o=t.getLocation(),e=new Set,s=i(a=>{o=t.getLocation(),e.forEach(f=>f({location:o,action:a}))},"notify"),r=i(a=>{t.notifyOnIndexChange??!0?s(a):o=t.getLocation()},"handleIndexChange"),n=i(async({task:a,navigateOpts:f,...c})=>{if(f?.ignoreBlocker??!1){a();return}let d=t.getBlockers?.()??[],l=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&d.length&&l)for(let u of d){let p=Ht(c.path,c.state);if(await u.blockerFn({currentLocation:o,nextLocation:p,action:c.type})){t.onBlocked?.();return}}a()},"tryNavigation");return{get location(){return o},get length(){return t.getLength()},subscribers:e,subscribe:i(a=>(e.add(a),()=>{e.delete(a)}),"subscribe"),push:i((a,f,c)=>{let d=o.state[wt];f=fo(d+1,f),n({task:i(()=>{t.pushState(a,f),s({type:"PUSH"})},"task"),navigateOpts:c,type:"PUSH",path:a,state:f})},"push"),replace:i((a,f,c)=>{let d=o.state[wt];f=fo(d,f),n({task:i(()=>{t.replaceState(a,f),s({type:"REPLACE"})},"task"),navigateOpts:c,type:"REPLACE",path:a,state:f})},"replace"),go:i((a,f)=>{n({task:i(()=>{t.go(a),r({type:"GO",index:a})},"task"),navigateOpts:f,type:"GO"})},"go"),back:i(a=>{n({task:i(()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},"task"),navigateOpts:a,type:"BACK"})},"back"),forward:i(a=>{n({task:i(()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},"task"),navigateOpts:a,type:"FORWARD"})},"forward"),canGoBack:i(()=>o.state[wt]!==0,"canGoBack"),createHref:i(a=>t.createHref(a),"createHref"),block:i(a=>{if(!t.setBlockers)return()=>{};let f=t.getBlockers?.()??[];return t.setBlockers([...f,a]),()=>{let c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(d=>d!==a))}},"block"),flush:i(()=>t.flush?.(),"flush"),destroy:i(()=>t.destroy?.(),"destroy"),notify:s}}i(ho,"createHistory");function fo(t,o){o||(o={});let e=mo();return{...o,key:e,__TSR_key:e,[wt]:t}}i(fo,"assignKeyAndIndex");function po(t){let o=t?.window??(typeof document<"u"?window:void 0),e=o.history.pushState,s=o.history.replaceState,r=[],n=i(()=>r,"_getBlockers"),a=i(w=>r=w,"_setBlockers"),f=t?.createHref??(w=>w),c=t?.parseLocation??(()=>Ht(`${o.location.pathname}${o.location.search}${o.location.hash}`,o.history.state));if(!o.history.state?.__TSR_key&&!o.history.state?.key){let w=mo();o.history.replaceState({[wt]:0,key:w,__TSR_key:w},"")}let d=c(),l,u=!1,p=!1,h=!1,m=!1,y=i(()=>d,"getLocation"),g,v,R=i(()=>{g&&(x._ignoreSubscribers=!0,(g.isPush?o.history.pushState:o.history.replaceState)(g.state,"",g.href),x._ignoreSubscribers=!1,g=void 0,v=void 0,l=void 0)},"flush"),S=i((w,C,I)=>{let L=f(C);v||(l=d),d=Ht(C,I),g={href:L,state:I,isPush:g?.isPush||w==="push"},v||(v=Promise.resolve().then(()=>R()))},"queueHistoryAction"),P=i(w=>{d=c(),x.notify({type:w})},"onPushPop"),_=i(async()=>{if(p){p=!1;return}let w=c(),C=w.state[wt]-d.state[wt],I=C===1,L=C===-1,M=!I&&!L||u;u=!1;let et=M?"GO":L?"BACK":"FORWARD",V=M?{type:"GO",index:C}:{type:L?"BACK":"FORWARD"};if(h)h=!1;else{let dt=n();if(typeof document<"u"&&dt.length){for(let ie of dt)if(await ie.blockerFn({currentLocation:d,nextLocation:w,action:et})){p=!0,o.history.go(1),x.notify(V);return}}}d=c(),x.notify(V)},"onPushPopEvent"),b=i(w=>{if(m){m=!1;return}let C=!1,I=n();if(typeof document<"u"&&I.length)for(let L of I){let M=L.enableBeforeUnload??!0;if(M===!0){C=!0;break}if(typeof M=="function"&&M()===!0){C=!0;break}}if(C)return w.preventDefault(),w.returnValue=""},"onBeforeUnload"),x=ho({getLocation:y,getLength:i(()=>o.history.length,"getLength"),pushState:i((w,C)=>S("push",w,C),"pushState"),replaceState:i((w,C)=>S("replace",w,C),"replaceState"),back:i(w=>(w&&(h=!0),m=!0,o.history.back()),"back"),forward:i(w=>{w&&(h=!0),m=!0,o.history.forward()},"forward"),go:i(w=>{u=!0,o.history.go(w)},"go"),createHref:i(w=>f(w),"createHref"),flush:R,destroy:i(()=>{o.history.pushState=e,o.history.replaceState=s,o.removeEventListener(kr,b,{capture:!0}),o.removeEventListener(Er,_)},"destroy"),onBlocked:i(()=>{l&&d!==l&&(d=l)},"onBlocked"),getBlockers:n,setBlockers:a,notifyOnIndexChange:!1});return o.addEventListener(kr,b,{capture:!0}),o.addEventListener(Er,_),o.history.pushState=function(...w){let C=e.apply(o.history,w);return x._ignoreSubscribers||P("PUSH"),C},o.history.replaceState=function(...w){let C=s.apply(o.history,w);return x._ignoreSubscribers||P("REPLACE"),C},x}i(po,"createBrowserHistory");function Hs(t={initialEntries:["/"]}){let o=t.initialEntries,e=t.initialIndex?Math.min(Math.max(t.initialIndex,0),o.length-1):o.length-1,s=o.map((c,d)=>fo(d,void 0)),r=i(()=>Ht(o[e],s[e]),"getLocation"),n=[];return ho({getLocation:r,getLength:i(()=>o.length,"getLength"),pushState:i((c,d)=>{e<o.length-1&&(o.splice(e+1),s.splice(e+1)),s.push(d),o.push(c),e=Math.max(o.length-1,0)},"pushState"),replaceState:i((c,d)=>{s[e]=d,o[e]=c},"replaceState"),back:i(()=>{e=Math.max(e-1,0)},"back"),forward:i(()=>{e=Math.min(e+1,o.length-1)},"forward"),go:i(c=>{e=Math.min(Math.max(e+c,0),o.length-1)},"go"),createHref:i(c=>c,"createHref"),getBlockers:i(()=>n,"_getBlockers"),setBlockers:i(c=>n=c,"_setBlockers")})}i(Hs,"createMemoryHistory");function Vs(t){let o=t.replace(/[\x00-\x1f\x7f]/g,"");return o.startsWith("//")&&(o="/"+o.replace(/^\/+/,"")),o}i(Vs,"sanitizePath");function Ht(t,o){let e=Vs(t),s=e.indexOf("#"),r=e.indexOf("?"),n=mo();return{href:e,pathname:e.substring(0,s>0?r>0?Math.min(s,r):s:r>0?r:e.length),hash:s>-1?e.substring(s):"",search:r>-1?e.slice(r,s===-1?void 0:s):"",state:o||{[wt]:0,key:n,__TSR_key:n}}}i(Ht,"parseHref");function mo(){return(Math.random()+1).toString(36).substring(7)}i(mo,"createRandomKey");function ht(t,o){let e=o,s=t;return{fromLocation:e,toLocation:s,pathChanged:e?.pathname!==s.pathname,hrefChanged:e?.href!==s.href,hashChanged:e?.hash!==s.hash}}i(ht,"getLocationChangeInfo");var xe=new WeakMap,go=class{static{i(this,"RouterCore")}constructor(t,o){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{e.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");let s=this.options,r=this.basepath??s?.basepath??"/",n=this.basepath===void 0,a=s?.rewrite;if(this.options={...s,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=mr(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=po()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let l;!1,this.resolvePathCache=yt(1e3),l=this.buildRouteTree(),!1,this.setRoutes(l)}if(!this.stores&&this.latestLocation){let l=this.getStoreConfig(this);this.batch=l.batch,this.stores=Ir(Fr(this.latestLocation),l),Br(this)}let f=!1,c=this.options.basepath??"/",d=this.options.rewrite;if(n||r!==c||a!==d){this.basepath=c;let l=[],u=te(c);u&&u!=="/"&&l.push(Mr({basepath:c})),d&&l.push(d),this.rewrite=l.length===0?void 0:l.length===1?l[0]:Lr(l),this.history&&this.updateLatestLocation(),f=!0}f&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=dr(this.routeTree,this.options.caseSensitive,(s,r)=>{s.init({originalIndex:r})});return this.options.routeMasks&&cr(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,s)=>{let r={eventType:e,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=e=>{this.subscribers.forEach(s=>{s.eventType===e.type&&s.fn(e)})},this.parseLocation=(e,s)=>{let r=i(({pathname:c,search:d,hash:l,href:u,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){let v=this.options.parseSearch(d),R=this.options.stringifySearch(v);return{href:c+R+l,publicHref:c+R+l,pathname:Bt(c).path,external:!1,searchStr:R,search:gt(s?.search,v),hash:Bt(l.slice(1)).path,state:at(s?.state,p)}}let h=new URL(u,this.origin),m=Se(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:u,pathname:Bt(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:gt(s?.search,y),hash:Bt(m.hash.slice(1)).path,state:at(s?.state,p)}},"parse"),n=r(e),{__tempLocation:a,__tempKey:f}=n.state;if(a&&(!f||f===this.tempLocationKey)){let c=r(a);return c.state.key=n.state.key,c.state.__TSR_key=n.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:n}}return n},this.resolvePathWithBase=(e,s)=>eo({base:e,to:s.includes("//")?Qt(s):s,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,s,r)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:s},r):this.matchRoutesInternal(e,s),this.getMatchedRoutes=e=>Ar({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let s=this.getMatch(e);s&&(s.abortController.abort(),clearTimeout(s._nonReactive.pendingTimeout),s._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let s=this.stores.matchStores.get(e)?.get();s&&(s.status==="pending"||s.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{let s=i((n={})=>{let a=n._fromLocation||this.pendingBuiltLocation||this.latestLocation,f=this.matchRoutesLightweight(a);if(n.from&&n._isNavigate){let L=this.getMatchedRoutes(n.from).matchedRoutes,M=Ge(f.matchedRoutes,V=>Or(V.fullPath,n.from)),et=Ge(L,V=>Or(V.fullPath,f.fullPath));!M&&!et&&console.warn(`Could not find match for from: ${n.from}`)}let c=n.unsafeRelative==="path"?a.pathname:n.from??f.fullPath,d=n.to?`${n.to}`:void 0,l=f.search,u=Object.assign(Object.create(null),f.params),p=d?.charCodeAt(0)===47?"/":this.resolvePathWithBase(c,"."),h=d?this.resolvePathWithBase(p,d):p,m=n.params===!1||n.params===null?Object.create(null):(n.params??!0)===!0?u:Object.assign(u,Y(n.params,u)),y=this.routesByPath[Q(h)],g;if(y)g=this.getRouteBranch(y);else if(h.includes("$"))g=[];else{let L=this.getMatchedRoutes(h);g=L.matchedRoutes,this.options.notFoundRoute&&(!L.foundRoute||L.foundRoute.path!=="/"&&L.routeParams["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&mt(m))for(let L of g){let M=L.options.params?.stringify??L.options.stringifyParams;if(M)try{Object.assign(m,M(m))}catch{}}let v=e.leaveParams?h:Bt(ge({path:h,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;if(y&&!e.leaveParams)try{let L=this.getMatchedRoutes(v);L.foundRoute?.id!==y.id&&console.warn(`Generated path "${v}" for route "${y.id}" matched route "${L.foundRoute?.id}" instead. This can happen when multiple route templates resolve to the same URL. Use the route template that matches the intended route, or adjust params.stringify if it changed the target path.`)}catch{}let R=l;if(e._includeValidateSearch&&this.options.search?.strict){let L={};g.forEach(M=>{if(M.options.validateSearch)try{Object.assign(L,Pe(M.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=Ws({search:R,dest:n,destRoutes:g,_includeValidateSearch:e._includeValidateSearch}),R=gt(l,R);let S=this.options.stringifySearch(R),P=n.hash===!0?a.hash:n.hash?Y(n.hash,a.hash):void 0,_=P?`#${P}`:"",b=n.state===!0?a.state:n.state?Y(n.state,a.state):{};b=at(a.state,b);let x=`${v}${S}${_}`,w,C,I=!1;if(this.rewrite){let L=new URL(x,this.origin),M=io(this.rewrite,L);w=L.href.replace(L.origin,""),M.origin!==this.origin?(C=M.href,I=!0):C=M.pathname+M.search+M.hash}else w=sr(x),C=w;return{publicHref:C,href:w,pathname:v,search:R,searchStr:S,state:b,hash:P??"",external:I,unmaskOnReload:n.unmaskOnReload}},"build"),r=i((n={},a)=>{let f=s(n),c=a?s(a):void 0;if(!c){let d=Object.create(null);if(this.options.routeMasks){let l=ur(f.pathname,this.processedTree);if(l){Object.assign(d,l.rawParams);let{from:u,params:p,...h}=l.route,m=p===!1||p===null?Object.create(null):(p??!0)===!0?d:Object.assign(d,Y(p,d));a={from:e.from,...h,params:m},c=s(a)}}}return c&&(f.maskedLocation=c),f},"buildWithMatches");return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:s,...r})=>{let n,a=i(()=>{let d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(u=>{r.state[u]=this.latestLocation.state[u]});let l=st(r.state,this.latestLocation.state);return d.forEach(u=>{delete r.state[u]}),l},"isSameState"),f=Q(this.latestLocation.href)===Q(r.href),c=this.commitLocationPromise;if(this.commitLocationPromise=ct(()=>{c?.resolve(),c=void 0}),f&&a())this.load();else{let{maskedLocation:d,hashScrollIntoView:l,...u}=r;d&&(u={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...u,search:u.searchStr,state:{...u.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(u.unmaskOnReload??this.options.unmaskOnReload??!1)&&(u.state.__tempKey=this.tempLocationKey)),u.state.__hashScrollIntoViewOptions=l??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,n=r.replace?"REPLACE":"PUSH",this.history[n==="REPLACE"?"replace":"push"](u.publicHref,u.state,{ignoreBlocker:s})}return this._scroll.next=r.resetScroll??!0,this.history.subscribers.size||this.load(n?{action:{type:n}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:s,hashScrollIntoView:r,viewTransition:n,ignoreBlocker:a,href:f,...c}={})=>{if(f){let u=this.history.location.state.__TSR_index,p=Ht(f,{__TSR_index:e?u:u+1}),h=new URL(p.pathname,this.origin);c.to=Se(this.rewrite,h).pathname,c.search=this.options.parseSearch(p.search),c.hash=p.hash.slice(1)}let d=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=d;let l=this.commitLocation({...d,viewTransition:n,replace:e,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===d&&(this.pendingBuiltLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:s,href:r,publicHref:n,...a})=>{let f=!1;if(r)try{new URL(`${r}`),f=!0}catch{}if(f&&!s&&(s=!0),s){if(e!==void 0||!r){let d=this.buildLocation({to:e,...a});r=r??d.publicHref,n=n??d.publicHref}let c=!f&&n?n:r;if(ut(c,this.protocolAllowlist))return console.warn(`Blocked navigation to dangerous protocol: ${c}`),Promise.resolve();if(!a.ignoreBlocker){let d=this.history.getBlockers?.()??[];for(let l of d)if(l?.blockerFn&&await l.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...a,href:r,to:e,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),!1){let r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==r.publicHref){let n=this.getParsedLocationHref(r);throw r.external?$t({href:n}):$t({href:n,_builtLocation:r})}}let e=this.matchRoutes(this.latestLocation),s=this.stores.cachedMatches.get().filter(r=>!e.some(n=>n.id===r.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(s)})},this.load=async e=>{let s=e?.action?.type,r,n,a,f=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad(),s?xe.set(this.latestLocation,s):xe.delete(this.latestLocation);let l=this.latestLocation,u=ht(l,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...u}),this.emit({type:"onBeforeLoad",...u}),await so({router:this,sync:e?.sync,forceStaleReload:f.href===l.href,matches:this.stores.pendingMatches.get(),location:l,updateMatch:this.updateMatch,onReady:i(async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=null,h=null,m=null,y=null;this.batch(()=>{let g=this.stores.pendingMatches.get(),v=g.length,R=this.stores.matches.get();p=v?R.filter(_=>!this.stores.pendingMatchStores.has(_.id)):null;let S=new Set;for(let _ of this.stores.pendingMatchStores.values())_.routeId&&S.add(_.routeId);let P=new Set;for(let _ of this.stores.matchStores.values())_.routeId&&P.add(_.routeId);h=v?R.filter(_=>!S.has(_.routeId)):null,m=v?g.filter(_=>!P.has(_.routeId)):null,y=v?g.filter(_=>P.has(_.routeId)):R,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),v&&(this.stores.setMatches(g),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(_=>_.status!=="error"&&_.status!=="notFound"&&_.status!=="redirected")]),this.clearExpiredCache())});for(let[g,v]of[[h,"onLeave"],[m,"onEnter"],[y,"onStay"]])if(g)for(let R of g)this.looseRoutesById[R.routeId].options[v]?.(R)})})},"onReady")})}catch(l){H(l)?(r=l,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):A(l)&&(n=l);let u=r?r.status:n?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(u),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(d=>d.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=e=>{let s=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof s=="object"&&this.isViewTransitionTypesSupported){let n=this.latestLocation,a=this.stores.resolvedLocation.get(),f=typeof s.types=="function"?s.types(ht(n,a)):s.types;if(f===!1){e();return}r={update:e,types:f}}else r=e;document.startViewTransition(r)}else e()},this.updateMatch=(e,s)=>{this.startTransition(()=>{let r=this.stores.pendingMatchStores.get(e);if(r){r.set(s);return}let n=this.stores.matchStores.get(e);if(n){n.set(s);return}let a=this.stores.cachedMatchStores.get(e);if(a){let f=s(a.get());f.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(c=>c.filter(d=>d!==e)):a.set(f)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let s=i(r=>e?.filter?.(r)??!0?{...r,invalid:!0,...e?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r,"invalidate");return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(s)),this.stores.setCached(this.stores.cachedMatches.get().map(s)),this.stores.setPending(this.stores.pendingMatches.get().map(s))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{let s=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){let r=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(r);e.options.href=n,e.headers.set("Location",n)}else if(s)try{let r=new URL(s);if(this.origin&&r.origin===this.origin){let n=r.pathname+r.search+r.hash;e.options.href=n,e.headers.set("Location",n)}}catch{}if(e.options.href&&!e.options._builtLocation&&ut(e.options.href,this.protocolAllowlist))throw new Error(`Redirect blocked: unsafe protocol in href "${e.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{let s=e?.filter;s!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(r=>!s(r))):this.stores.setCached([])},this.clearExpiredCache=()=>{let e=Date.now(),s=i(r=>{let n=this.looseRoutesById[r.routeId];if(!n.options.loader)return!0;let a=(r.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:e-r.updatedAt>=a},"filter");this.clearCache({filter:s})},this.loadRouteChunk=Ut,this.preloadRoute=async e=>{let s=e._builtLocation??this.buildLocation(e),r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:e}),n=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...n,...this.stores.cachedIds.get()]),f=r.filter(c=>!a.has(c.id));if(f.length){let c=this.stores.cachedMatches.get();this.stores.setCached([...c,...f])}try{return r=await so({router:this,matches:r,location:s,preload:!0,updateMatch:i((c,d)=>{n.has(c)?r=r.map(l=>l.id===c?d(l):l):this.updateMatch(c,d)},"updateMatch")}),r}catch(c){if(H(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:s});A(c)||console.error(c);return}},this.matchRoute=(e,s)=>{let r={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},n=this.buildLocation(r);if(s?.pending&&this.stores.status.get()!=="pending")return!1;let a=(s?.pending===void 0?!this.stores.isLoading.get():s.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),f=lr(n.pathname,s?.caseSensitive??!1,s?.fuzzy??!1,a.pathname,this.processedTree);return!f||e.params&&!st(f.rawParams,e.params,{partial:!0})?!1:s?.includeSearch??!0?st(a.search,n.search,{partial:!0})?f.rawParams:!1:f.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=o,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Rr,parseSearch:t.parseSearch??yr,protocolAllowlist:t.protocolAllowlist??Je}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:o,processedTree:e}){this.routesById=t,this.routesByPath=o,this.processedTree=e;let s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}getRouteBranch(t){let o=this.routeBranchCache.get(t);return o||(o=to(t),this.routeBranchCache.set(t,o)),o}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,o){let e=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:r}=e,{matchedRoutes:n}=e,a=!1;(s?s.path!=="/"&&r["**"]:Q(t.pathname))&&(this.options.notFoundRoute?n=[...n,this.options.notFoundRoute]:a=!0);let f=a?zs(this.options.notFoundMode,n):void 0,c=new Array(n.length),d=new Map;for(let l of this.stores.matchStores.values())l.routeId&&d.set(l.routeId,l.get());for(let l=0;l<n.length;l++){let u=n[l],p=c[l-1],h,m,y;{let M=p?.search??t.search,et=p?._strictSearch??void 0;try{let V=Pe(u.options.validateSearch,{...M})??void 0;h={...M,...V},m={...et,...V},y=void 0}catch(V){let dt=V;if(V instanceof oe||(dt=new oe(V.message,{cause:V})),o?.throwOnError)throw dt;h=M,m={},y=dt}}let g=u.options.loaderDeps?.({search:h})??"",v=g?JSON.stringify(g):"",{interpolatedPath:R,usedParams:S}=ge({path:u.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),P=u.id+R+v,_=this.getMatch(P),b=d.get(u.id),x=_?._strictParams??S,w;if(!_)try{Nr(u,x)}catch(M){if(A(M)||H(M)?w=M:w=new Dr(M.message,{cause:M}),o?.throwOnError)throw w}Object.assign(r,x);let C=b?"stay":"enter",I;if(_)I={..._,cause:C,params:b?.params??r,_strictParams:x,search:b?gt(b.search,h):gt(_.search,h),_strictSearch:m};else{let M=u.options.loader||u.options.beforeLoad||u.lazyFn||no(u)?"pending":"success";I={id:P,ssr:u.options.ssr,index:l,routeId:u.id,params:b?.params??r,_strictParams:x,pathname:R,updatedAt:Date.now(),search:b?gt(b.search,h):h,_strictSearch:m,searchError:void 0,status:M,isFetching:!1,error:void 0,paramsError:w,__routeContext:void 0,_nonReactive:{loadPromise:ct()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:C,loaderDeps:b?at(b.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:u.options.staticData||{},fullPath:u.fullPath}}o?.preload||(I.globalNotFound=f===u.id),I.searchError=y;let L=this.getParentContext(p);I.context={...L,...I.__routeContext,...I.__beforeLoadContext},c[l]=I}for(let l=0;l<c.length;l++){let u=c[l],p=this.looseRoutesById[u.routeId],h=this.getMatch(u.id),m=d.get(u.routeId);if(u.params=m?gt(m.params,r):r,!h){let y=c[l-1],g=this.getParentContext(y);if(p.options.context){let v={deps:u.loaderDeps,params:u.params,context:g??{},location:t,navigate:i(R=>this.navigate({...R,_fromLocation:t}),"navigate"),buildLocation:this.buildLocation,cause:u.cause,abortController:u.abortController,preload:!!u.preload,matches:c,routeId:p.id};u.__routeContext=p.options.context(v)??void 0}u.context={...g,...u.__routeContext,...u.__beforeLoadContext}}}return c}matchRoutesLightweight(t){let{matchedRoutes:o,routeParams:e}=this.getMatchedRoutes(t.pathname),s=pt(o),r={...t.search};for(let d of o)try{Object.assign(r,Pe(d.options.validateSearch,r))}catch{}let n=pt(this.stores.matchesId.get()),a=n&&this.stores.matchStores.get(n)?.get(),f=a&&a.routeId===s.id&&a.pathname===t.pathname,c;if(f)c=a.params;else{let d=Object.assign(Object.create(null),e);for(let l of o)try{Nr(l,d)}catch{}c=d}return{matchedRoutes:o,fullPath:s.fullPath,search:r,params:c}}},oe=class extends Error{static{i(this,"SearchParamError")}},Dr=class extends Error{static{i(this,"PathParamError")}},Tr=i(t=>t.endsWith("/")&&t.length>1?t.slice(0,-1):t,"normalize");function Or(t,o){return Tr(t)===Tr(o)}i(Or,"comparePaths");function Fr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}i(Fr,"getInitialRouterState");function Pe(t,o){if(t==null)return{};if("~standard"in t){let e=t["~standard"].validate(o);if(e instanceof Promise)throw new oe("Async validation not supported");if(e.issues)throw new oe(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(o):typeof t=="function"?t(o):{}}i(Pe,"validateSearch");function Ar({pathname:t,routesById:o,processedTree:e}){let s=Object.create(null),r=Q(t),n,a=fr(r,e,!0);return a&&(n=a.route,Object.assign(s,a.rawParams)),{matchedRoutes:a?.branch||[o.__root__],routeParams:s,foundRoute:n}}i(Ar,"getMatchedRoutes");function Ws({search:t,dest:o,destRoutes:e,_includeValidateSearch:s}){return js(e)(t,o,s??!1)}i(Ws,"applySearchMiddleware");function js(t){let o,e,s=[];for(let n of t){let a=n.options;if("search"in a)a.search?.middlewares&&s.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){let c=i(({search:d,next:l})=>{let u=l(a.preSearchFilters?a.preSearchFilters.reduce((p,h)=>h(p),d):d);return a.postSearchFilters?a.postSearchFilters.reduce((p,h)=>h(p),u):u},"legacyMiddleware");s.push(c)}let f=a.validateSearch;if(f){let c=i(({search:d,next:l,meta:u})=>{let p=l(d);if(e)try{let h=Pe(f,p);if(u&&h)for(let m in h)m in p||(u.defaulted||=new Map).set(m,h[m]);return{...p,...h}}catch{}return p},"validate");s.push(c)}}let r=i((n,a,f)=>{if(n>=s.length){if(!o.search)return{};if(o.search===!0)return a;let d=Y(o.search,a);return f&&(f.explicit=d),d}let c=i((d,l)=>{if(l){let u=f||{};return{search:r(n+1,d,u),meta:u}}return r(n+1,d,f)},"next");return s[n]({search:a,next:c,meta:f})},"applyNext");return i(function(a,f,c){return o=f,e=c,r(0,a)},"middleware")}i(js,"buildMiddlewareChain");function zs(t,o){if(t!=="root")for(let e=o.length-1;e>=0;e--){let s=o[e];if(s.children)return s.id}return X}i(zs,"findGlobalNotFoundRouteId");function Nr(t,o){let e=t.options.params?.parse??t.options.parseParams;if(e){let s=e(o);if(s===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(o,s)}}i(Nr,"extractStrictParams");function Ks(){try{return sessionStorage}catch{return}}i(Ks,"getSafeSessionStorage");var qs="tsr-scroll-restoration-v1_3",Hr=Ks();function Gs(){try{return JSON.parse(Hr?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}i(Gs,"createScrollRestorationCache");function Js(){try{Hr?.setItem(qs,JSON.stringify(Vt))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}i(Js,"persistScrollRestorationCache");var Vt=Gs(),$r="data-scroll-restoration-id",Ys=i(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Xs(t){let o=t.getAttribute($r);if(o)return`[${$r}="${o}"]`;let e="",s=t,r;for(;r=s.parentNode;){let n=1,a=s;for(;a=a.previousElementSibling;)n++;let f=`${s.localName}:nth-child(${n})`;e=e?`${f} > ${e}`:f,s=r}return e}i(Xs,"getScrollRestorationSelector");var we=!1,Wt="window";function vo(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}i(vo,"getElement");function Ur(t){let o=[];for(let e of t){if(e===Wt)continue;let s=vo(e);s&&o.push(s)}return o}i(Ur,"getScrollToTopElements");function Br(t,o){let e=o??t.options.scrollRestoration,s=t._scroll;if(e&&(s.restoring=!0),!1)return;let r=t.options.getScrollRestorationKey||Ys,n=new Map,a=i((d,l,u)=>{let p=n.get(d)||{};p.scrollX=l,p.scrollY=u,n.set(d,p)},"setTrackedScrollEntry"),f=i(d=>{if(!(we||!s.restoring))if(d.target===document)a(Wt,scrollX,scrollY);else{let l=d.target;a(l,l.scrollLeft,l.scrollTop)}},"onScroll"),c=i(d=>{if(!s.restoring)return;let l=Vt[d]||={};for(let[u,p]of n)u===Wt?l[Wt]=p:u.isConnected&&(l[Xs(u)]=p)},"snapshotCurrentScrollTargets");e&&!s.restoration&&(s.restoration=!0,we=!1,history.scrollRestoration="manual",document.addEventListener("scroll",f,!0),t.subscribe("onBeforeLoad",d=>{d.fromLocation&&c(r(d.fromLocation)),n.clear()}),addEventListener("pagehide",()=>{c(r(t.stores.resolvedLocation.get()??t.stores.location.get())),Js()})),!s.reset&&(s.reset=!0,t.subscribe("onRendered",d=>{let l=t.options.scrollRestorationBehavior,u=t.options.scrollToTopSelectors,p=s.next,h;if(n.clear(),p||(s.next=!0),typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let m=r(d.toLocation),y=d.fromLocation&&r(d.fromLocation);if(s.restoring&&y&&y!==m){let g=Vt[y];if(g){let v=Vt[m];for(let R in g){if(R===Wt){if(p)continue}else{let S=vo(R);if(!S||p&&u&&(h??=Ur(u),h.includes(S)))continue}v||(v=Vt[m]={}),v[R]??=g[R]}}}we=!0;try{let g=d.toLocation.hash,v=d.toLocation.state.__hashScrollIntoViewOptions??!0,R=!1;if(p){let S=xe.get(d.toLocation),P=g&&v&&(S==="PUSH"||S==="REPLACE"),_=s.restoring?Vt[m]:void 0;if(_)for(let b in _){let{scrollX:x,scrollY:w}=_[b];if(b===Wt){if(P)continue;scrollTo({top:w,left:x,behavior:l}),R=!0}else{let C=vo(b);C&&(C.scrollLeft=x,C.scrollTop=w)}}if(!R&&!g){let b={top:0,left:0,behavior:l};if(scrollTo(b),u){h??=Ur(u);for(let x of h)x.scrollTo(b)}}}!R&&g&&v&&document.getElementById(g)?.scrollIntoView(v)}finally{we=!1}}))}i(Br,"setupScrollRestoration");var yo="Error preloading route! \u261D\uFE0F";var _e=class{static{i(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=o=>{this.originalIndex=o.originalIndex;let e=this.options,s=!e?.path&&!e?.id;if(this.parentRoute=this.options.getParentRoute?.(),s)this._path=X;else if(!this.parentRoute)throw new Error("Invariant failed: Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let r=s?X:e?.path;r&&r!=="/"&&(r=pe(r));let n=e?.id||r,a=s?X:Et([this.parentRoute.id==="__root__"?"":this.parentRoute.id,n]);r==="__root__"&&(r="/"),a!=="__root__"&&(a=Et(["/",a]));let f=a==="__root__"?"/":Et([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=f,this._to=Q(f)},this.addChildren=o=>this._addFileChildren(o),this._addFileChildren=o=>(Array.isArray(o)&&(this.children=o),typeof o=="object"&&o!==null&&(this.children=Object.values(o)),this),this._addFileTypes=()=>this,this.updateLoader=o=>(Object.assign(this.options,o),this),this.update=o=>(Object.assign(this.options,o),this),this.lazy=o=>(this.lazyFn=o,this),this.redirect=o=>$t({from:this.fullPath,...o}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var Ro=class extends _e{static{i(this,"BaseRootRoute")}constructor(t){super(t)}};var Ie=k(j(),1);var F=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(F||{});function Vr({update:t,notify:o,unwatched:e}){return{link:s,unlink:r,propagate:n,checkDirty:a,shallowPropagate:f};function s(d,l,u){let p=l.depsTail;if(p!==void 0&&p.dep===d)return;let h=p!==void 0?p.nextDep:l.deps;if(h!==void 0&&h.dep===d){h.version=u,l.depsTail=h;return}let m=d.subsTail;if(m!==void 0&&m.version===u&&m.sub===l)return;let y=l.depsTail=d.subsTail={version:u,dep:d,sub:l,prevDep:p,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),p!==void 0?p.nextDep=y:l.deps=y,m!==void 0?m.nextSub=y:d.subs=y}function r(d,l=d.sub){let u=d.dep,p=d.prevDep,h=d.nextDep,m=d.nextSub,y=d.prevSub;return h!==void 0?h.prevDep=p:l.depsTail=p,p!==void 0?p.nextDep=h:l.deps=h,m!==void 0?m.prevSub=y:u.subsTail=y,y!==void 0?y.nextSub=m:(u.subs=m)===void 0&&e(u),h}function n(d){let l=d.nextSub,u;t:do{let p=d.sub,h=p.flags;if(h&60?h&12?h&4?!(h&48)&&c(d,p)?(p.flags=h|40,h&=1):h=0:p.flags=h&-9|32:h=0:p.flags=h|32,h&2&&o(p),h&1){let m=p.subs;if(m!==void 0){let y=(d=m).nextSub;y!==void 0&&(u={value:l,prev:u},l=y);continue}}if((d=l)!==void 0){l=d.nextSub;continue}for(;u!==void 0;)if(d=u.value,u=u.prev,d!==void 0){l=d.nextSub;continue t}break}while(!0)}function a(d,l){let u,p=0,h=!1;t:do{let m=d.dep,y=m.flags;if(l.flags&16)h=!0;else if((y&17)===17){if(t(m)){let g=m.subs;g.nextSub!==void 0&&f(g),h=!0}}else if((y&33)===33){(d.nextSub!==void 0||d.prevSub!==void 0)&&(u={value:d,prev:u}),d=m.deps,l=m,++p;continue}if(!h){let g=d.nextDep;if(g!==void 0){d=g;continue}}for(;p--;){let g=l.subs,v=g.nextSub!==void 0;if(v?(d=u.value,u=u.prev):d=g,h){if(t(l)){v&&f(g),l=d.sub;continue}h=!1}else l.flags&=-33;l=d.sub;let R=d.nextDep;if(R!==void 0){d=R;continue t}}return h}while(!0)}function f(d){do{let l=d.sub,u=l.flags;(u&48)===32&&(l.flags=u|16,(u&6)===2&&o(l))}while((d=d.nextSub)!==void 0)}function c(d,l){let u=l.depsTail;for(;u!==void 0;){if(u===d)return!0;u=u.prevDep}return!1}}i(Vr,"createReactiveSystem");function zr(t,o,e){let s=typeof t=="object",r=s?t:void 0;return{next:(s?t.next:t)?.bind(r),error:(s?t.error:o)?.bind(r),complete:(s?t.complete:e)?.bind(r)}}i(zr,"toObserver");var So=[],be=0,{link:Wr,unlink:tn,propagate:en,checkDirty:Kr,shallowPropagate:jr}=Vr({update(t){return t._update()},notify(t){So[Po++]=t,t.flags&=~F.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=F.Mutable|F.Dirty,Le(t))}}),Ce=0,Po=0,lt,xo=0;function re(t){try{++xo,t()}finally{--xo||wo()}}i(re,"batch");function Le(t){let o=t.depsTail,e=o!==void 0?o.nextDep:t.deps;for(;e!==void 0;)e=tn(e,t)}i(Le,"purgeDeps");function wo(){if(!(xo>0)){for(;Ce<Po;){let t=So[Ce];So[Ce++]=void 0,t.notify()}Ce=0,Po=0}}i(wo,"flush");function Me(t,o){let e=typeof t=="function",s=t,r={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?F.None:F.Mutable,get(){return lt!==void 0&&Wr(r,lt,be),r._snapshot},subscribe(n){let a=zr(n),f={current:!1},c=on(()=>{r.get(),f.current?a.next?.(r._snapshot):f.current=!0});return{unsubscribe:i(()=>{c.stop()},"unsubscribe")}},_update(n){let a=lt,f=o?.compare??Object.is;if(e)lt=r,++be,r.depsTail=void 0;else if(n===void 0)return!1;e&&(r.flags=F.Mutable|F.RecursedCheck);try{let c=r._snapshot,d=typeof n=="function"?n(c):n===void 0&&e?s(c):n;return c===void 0||!f(c,d)?(r._snapshot=d,!0):!1}finally{lt=a,e&&(r.flags&=~F.RecursedCheck),Le(r)}}};return e?(r.flags=F.Mutable|F.Dirty,r.get=function(){let n=r.flags;if(n&F.Dirty||n&F.Pending&&Kr(r.deps,r)){if(r._update()){let a=r.subs;a!==void 0&&jr(a)}}else n&F.Pending&&(r.flags=n&~F.Pending);return lt!==void 0&&Wr(r,lt,be),r._snapshot}):r.set=function(n){if(r._update(n)){let a=r.subs;a!==void 0&&(en(a),jr(a),wo())}},r}i(Me,"createAtom");function on(t){let o=i(()=>{let s=lt;lt=e,++be,e.depsTail=void 0,e.flags=F.Watching|F.RecursedCheck;try{return t()}finally{lt=s,e.flags&=~F.RecursedCheck,Le(e)}},"run"),e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:F.Watching|F.RecursedCheck,notify(){let s=this.flags;s&F.Dirty||s&F.Pending&&Kr(this.deps,this)?o():this.flags=F.Watching},stop(){this.flags=F.None,this.depsTail=void 0,Le(this)}};return o(),e}i(on,"effect");var _o=k(j(),1),qr=k(ws(),1);function rn(t,o){return t===o}i(rn,"defaultCompare");function B(t,o,e=rn){let s=(0,_o.useCallback)(a=>{if(!t)return()=>{};let{unsubscribe:f}=t.subscribe(a);return f},[t]),r=(0,_o.useCallback)(()=>t?.get(),[t]);return(0,qr.useSyncExternalStoreWithSelector)(s,r,r,o,e)}i(B,"useStore");var Co={get(){},subscribe(){return{unsubscribe(){}}}};function bo(t,o){let e=Ie.useRef();return s=>{let r=t?.select?t.select(s):s;return t?.structuralSharing??o.options.defaultStructuralSharing?e.current=at(e.current,r):r}}i(bo,"useStructuralSharing");function tt(t){let o=D(),e=Ie.useContext(t.from?Zo:Mt),s=t.from?o.stores.getRouteMatchStore(t.from):o.stores.matchStores.get(e);if(!1){let a=s?.get();if(!a){if(t.shouldThrow??!0)throw new Error(`Invariant failed: Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`);return}return t.select?t.select(a):a}let r=bo(t,o),n=B(s??Co,a=>a?r(a):Co);if(n!==Co)return n;if(t.shouldThrow??!0)throw new Error(`Invariant failed: Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`)}i(tt,"useMatch");function Ee(t){return tt({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.search):o.search,"select")})}i(Ee,"useSearch");var nt=k(j(),1);var Tt=typeof window<"u"?nt.useLayoutEffect:nt.useEffect;function ke(t){let o=nt.useRef({value:t,prev:null}),e=o.current.value;return t!==e&&(o.current={value:t,prev:e}),o.current.prev}i(ke,"usePrevious");function Gr(t,o,e={},s={}){nt.useEffect(()=>{if(!t.current||s.disabled||typeof IntersectionObserver!="function")return;let r=new IntersectionObserver(([n])=>{o(n)},e);return r.observe(t.current),()=>{r.disconnect()}},[o,e,s.disabled,t])}i(Gr,"useIntersectionObserver");function Jr(t){let o=nt.useRef(null);return nt.useImperativeHandle(t,()=>o.current,[]),o}i(Jr,"useForwardedRef");var Lo=k(j(),1);function Te(t){let o=D();return Lo.useCallback(e=>o.navigate({...e,from:e.from??t?.from}),[t?.from,o])}i(Te,"useNavigate");var jt=k(j(),1),it=k(rt(),1);function Ot(t){let o=t.errorComponent??Nt;return(0,it.jsx)(sn,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:i(({error:e,reset:s})=>e?jt.createElement(o,{error:e,reset:s}):t.children,"children")})}i(Ot,"CatchBoundary");var sn=class extends jt.Component{static{i(this,"CatchBoundaryImpl")}constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,o){let e=t.getResetKey();return o.error&&o.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,o){this.props.onCatch&&this.props.onCatch(t,o)}render(){return this.props.children({error:this.state.error,reset:i(()=>{this.reset()},"reset")})}};function Nt({error:t}){let[o,e]=jt.useState(!0);return(0,it.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,it.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,it.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,it.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:i(()=>e(s=>!s),"onClick"),children:o?"Hide Error":"Show Error"})]}),(0,it.jsx)("div",{style:{height:".25rem"}}),o?(0,it.jsx)("div",{children:(0,it.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,it.jsx)("code",{children:t.message}):null})}):null]})}i(Nt,"ErrorComponent");var Oe=k(j(),1),Mo=k(rt(),1);function Yr({children:t,fallback:o=null}){return Io()?(0,Mo.jsx)(Oe.default.Fragment,{children:t}):(0,Mo.jsx)(Oe.default.Fragment,{children:o})}i(Yr,"ClientOnly");function Io(){return Oe.default.useSyncExternalStore(nn,()=>!0,()=>!1)}i(Io,"useHydrated");function nn(){return()=>{}}i(nn,"subscribe");function Eo(t){return tt({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i(o=>t.select?t.select(o.loaderData):o.loaderData,"select")})}i(Eo,"useLoaderData");function ko(t){let{select:o,...e}=t;return tt({...e,select:i(s=>o?o(s.loaderDeps):s.loaderDeps,"select")})}i(ko,"useLoaderDeps");function To(t){return tt({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i(o=>{let e=t.strict===!1?o.params:o._strictParams;return t.select?t.select(e):e},"select")})}i(To,"useParams");function Oo(t){return tt({...t,select:i(o=>t.select?t.select(o.context):o.context,"select")})}i(Oo,"useRouteContext");var U=k(j(),1),an=k(rt(),1);var os=k(xs(),1);function cn(t,o){let e=D(),s=Jr(o),r=!1,{activeProps:n,inactiveProps:a,activeOptions:f,to:c,preload:d,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:p,replace:h,startTransition:m,resetScroll:y,viewTransition:g,children:v,target:R,disabled:S,style:P,className:_,onClick:b,onBlur:x,onFocus:w,onMouseEnter:C,onMouseLeave:I,onTouchStart:L,ignoreBlocker:M,params:et,search:V,hash:dt,state:ie,mask:ot,reloadDocument:qt,unsafeRelative:Bo,from:$o,_fromLocation:ae,...Dt}=t;if(r){let O=es(c);if(typeof c=="string"&&!O&&c.indexOf(":")>-1)try{return new URL(c),ut(c,e.protocolAllowlist)?(console.warn(`Blocked Link with dangerous protocol: ${c}`),{...Dt,ref:s,href:void 0,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}):{...Dt,ref:s,href:c,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}}}catch{}let T=e.buildLocation({...t,from:t.from}),Z=ts(T.maskedLocation?T.maskedLocation.publicHref:T.publicHref,T.maskedLocation?T.maskedLocation.external:T.external,e.history,S),Yt=(()=>{if(Z?.external){if(ut(Z.href,e.protocolAllowlist)){console.warn(`Blocked Link with dangerous protocol: ${Z.href}`);return}return Z.href}if(!O&&typeof c=="string"&&c.indexOf(":")>-1)try{if(new URL(c),ut(c,e.protocolAllowlist)){console.warn(`Blocked Link with dangerous protocol: ${c}`);return}return c}catch{}})(),We=(()=>{if(Yt)return!1;let W=e.stores.location.get(),G=f?.exact??!1;if(G){if(!me(W.pathname,T.pathname,e.basepath))return!1}else{let z=Pt(W.pathname,e.basepath),J=Pt(T.pathname,e.basepath);if(!(z.startsWith(J)&&(z.length===J.length||z[J.length]==="/")))return!1}if((f?.includeSearch??!0)&&W.search!==T.search){let z=!W.search||typeof W.search=="object"&&!mt(W.search),J=!T.search||typeof T.search=="object"&&!mt(T.search);if(!(z&&J)&&!st(W.search,T.search,{partial:!G,ignoreUndefined:!f?.explicitUndefined}))return!1}return!f?.includeHash})();if(Yt)return{...Dt,ref:s,href:Yt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_}};let je=We?Y(n,{})??Xr:zt,ze=We?zt:Y(a,{})??zt,Go=(()=>{let W=P,G=je.style,z=ze.style;if(!(!W&&!G&&!z))return W&&!G&&!z?W:!W&&G&&!z?G:!W&&!G&&z?z:{...W,...G,...z}})(),Jo=(()=>{let W=_,G=je.className,z=ze.className;if(!W&&!G&&!z)return"";let J="";return W&&(J=W),G&&(J=J?`${J} ${G}`:G),z&&(J=J?`${J} ${z}`:z),J})();return{...Dt,...je,...ze,href:Z?.href,ref:s,disabled:!!S,target:R,...Go&&{style:Go},...Jo&&{className:Jo},...S&&Zr,...We&&Qr}}let Ue=Io(),Gt=U.useMemo(()=>t,[e,t.from,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),bt=B(e.stores.location,O=>O,(O,T)=>O.href===T.href),q=U.useMemo(()=>{let O={_fromLocation:bt,...Gt};return e.buildLocation(O)},[e,bt,Gt]),Uo=q.maskedLocation?q.maskedLocation.publicHref:q.publicHref,Ho=q.maskedLocation?q.maskedLocation.external:q.external,Ft=U.useMemo(()=>ts(Uo,Ho,e.history,S),[S,Ho,Uo,e.history]),Jt=U.useMemo(()=>{if(Ft?.external){if(ut(Ft.href,e.protocolAllowlist)){console.warn(`Blocked Link with dangerous protocol: ${Ft.href}`);return}return Ft.href}if(!es(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{if(new URL(c),ut(c,e.protocolAllowlist)){console.warn(`Blocked Link with dangerous protocol: ${c}`);return}return c}catch{}},[c,Ft,e.protocolAllowlist]),He=U.useMemo(()=>{if(Jt)return!1;if(f?.exact){if(!me(bt.pathname,q.pathname,e.basepath))return!1}else{let O=Pt(bt.pathname,e.basepath),T=Pt(q.pathname,e.basepath);if(!(O.startsWith(T)&&(O.length===T.length||O[T.length]==="/")))return!1}return(f?.includeSearch??!0)&&!st(bt.search,q.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?Ue&&bt.hash===q.hash:!0},[f?.exact,f?.explicitUndefined,f?.includeHash,f?.includeSearch,bt,Jt,Ue,q.hash,q.pathname,q.search,e.basepath]),ce=He?Y(n,{})??Xr:zt,ue=He?zt:Y(a,{})??zt,Vo=[_,ce.className,ue.className].filter(Boolean).join(" "),Wo=(P||ce.style||ue.style)&&{...P,...ce.style,...ue.style},[Rs,jo]=U.useState(!1),zo=U.useRef(!1),At=t.reloadDocument||Jt?!1:d??e.options.defaultPreload,Ve=l??e.options.defaultPreloadDelay??0,Lt=U.useCallback(()=>{e.preloadRoute({...Gt,_builtLocation:q}).catch(O=>{console.warn(O),console.warn(yo)})},[e,Gt,q]);Gr(s,U.useCallback(O=>{O?.isIntersecting&&Lt()},[Lt]),ln,{disabled:!!S||At!=="viewport"}),U.useEffect(()=>{zo.current||!S&&At==="render"&&(Lt(),zo.current=!0)},[S,Lt,At]);let Ss=i(O=>{let T=O.currentTarget.getAttribute("target"),Z=R!==void 0?R:T;if(!S&&!fn(O)&&!O.defaultPrevented&&(!Z||Z==="_self")&&O.button===0){O.preventDefault(),(0,os.flushSync)(()=>{jo(!0)});let Yt=e.subscribe("onResolved",()=>{Yt(),jo(!1)});e.navigate({...Gt,replace:h,resetScroll:y,hashScrollIntoView:p,startTransition:m,viewTransition:g,ignoreBlocker:M})}},"handleClick");if(Jt)return{...Dt,ref:s,href:Jt,...v&&{children:v},...R&&{target:R},...S&&{disabled:S},...P&&{style:P},..._&&{className:_},...b&&{onClick:b},...x&&{onBlur:x},...w&&{onFocus:w},...C&&{onMouseEnter:C},...I&&{onMouseLeave:I},...L&&{onTouchStart:L}};let Ko=i(O=>{if(S||At!=="intent")return;if(!Ve){Lt();return}let T=O.currentTarget;if(se.has(T))return;let Z=setTimeout(()=>{se.delete(T),Lt()},Ve);se.set(T,Z)},"enqueueIntentPreload"),Ps=i(O=>{S||At!=="intent"||Lt()},"handleTouchStart"),qo=i(O=>{if(S||!At||!Ve)return;let T=O.currentTarget,Z=se.get(T);Z&&(clearTimeout(Z),se.delete(T))},"handleLeave");return{...Dt,...ce,...ue,href:Ft?.href,ref:s,onClick:Kt([b,Ss]),onBlur:Kt([x,qo]),onFocus:Kt([w,Ko]),onMouseEnter:Kt([C,Ko]),onMouseLeave:Kt([I,qo]),onTouchStart:Kt([L,Ps]),disabled:!!S,target:R,...Wo&&{style:Wo},...Vo&&{className:Vo},...S&&Zr,...He&&Qr,...Ue&&Rs&&un}}i(cn,"useLinkProps");var zt={},Xr={className:"active"},Zr={role:"link","aria-disabled":!0},Qr={"data-status":"active","aria-current":"page"},un={"data-transitioning":"transitioning"},se=new WeakMap,ln={rootMargin:"100px"},Kt=i(t=>o=>{for(let e of t)if(e){if(o.defaultPrevented)return;e(o)}},"composeHandlers");function ts(t,o,e,s){if(!s)return o?{href:t,external:!0}:{href:e.createHref(t)||"/",external:!1}}i(ts,"getHrefOption");function es(t){if(typeof t!="string")return!1;let o=t.charCodeAt(0);return o===47?t.charCodeAt(1)!==47:o===46}i(es,"isSafeInternal");var No=U.forwardRef((t,o)=>{let{_asChild:e,...s}=t,{type:r,...n}=cn(s,o),a=typeof s.children=="function"?s.children({isActive:n["data-status"]==="active"}):s.children;if(!e){let{disabled:f,...c}=n;return U.createElement("a",c,a)}return U.createElement(e,n,a)});function fn(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}i(fn,"isCtrlEvent");var Do=k(j(),1),Fo=k(rt(),1);var rs=class extends _e{static{i(this,"Route")}constructor(t){super(t),this.useMatch=o=>tt({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>Oo({...o,from:this.id}),this.useSearch=o=>Ee({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>To({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>ko({...o,from:this.id}),this.useLoaderData=o=>Eo({...o,from:this.id}),this.useNavigate=()=>Te({from:this.fullPath}),this.Link=Do.default.forwardRef((o,e)=>(0,Fo.jsx)(No,{ref:e,from:this.fullPath,...o}))}};function dn(t){return new rs(t)}i(dn,"createRoute");var ss=class extends Ro{static{i(this,"RootRoute")}constructor(t){super(t),this.useMatch=o=>tt({select:o?.select,from:this.id,structuralSharing:o?.structuralSharing}),this.useRouteContext=o=>Oo({...o,from:this.id}),this.useSearch=o=>Ee({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useParams=o=>To({select:o?.select,structuralSharing:o?.structuralSharing,from:this.id}),this.useLoaderDeps=o=>ko({...o,from:this.id}),this.useLoaderData=o=>Eo({...o,from:this.id}),this.useNavigate=()=>Te({from:this.fullPath}),this.Link=Do.default.forwardRef((o,e)=>(0,Fo.jsx)(No,{ref:e,from:this.fullPath,...o}))}};function hn(t){return new ss(t)}i(hn,"createRootRoute");var xc=k(j(),1),Ne=k(rt(),1);function ns(t){let o=D();if(!1){let s=`not-found-${o.stores.location.get().pathname}-${o.stores.status.get()}`;return(0,Ne.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),onCatch:i((r,n)=>{if(A(r))t.onCatch?.(r,n);else throw r},"onCatch"),errorComponent:i(({error:r})=>{if(A(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}let e=`not-found-${B(o.stores.location,s=>s.pathname)}-${B(o.stores.status,s=>s)}`;return(0,Ne.jsx)(Ot,{getResetKey:i(()=>e,"getResetKey"),onCatch:i((s,r)=>{if(A(s))t.onCatch?.(s,r);else throw s},"onCatch"),errorComponent:i(({error:s})=>{if(A(s))return t.fallback?.(s);throw s},"errorComponent"),children:t.children})}i(ns,"CatchNotFound");function is(){return(0,Ne.jsx)("p",{children:"Not Found"})}i(is,"DefaultGlobalNotFound");var as=k(rt(),1);function cs({children:t}){let o=D();return null}i(cs,"ScriptOnce");var Ic=k(j(),1),De=k(rt(),1);function _t(t){return(0,De.jsx)(De.Fragment,{children:t.children})}i(_t,"SafeFragment");var Oc=k(j(),1),Fe=k(rt(),1);function Ae(t,o,e){return o.options.notFoundComponent?(0,Fe.jsx)(o.options.notFoundComponent,{...e}):t.options.defaultNotFoundComponent?(0,Fe.jsx)(t.options.defaultNotFoundComponent,{...e}):(o.options.notFoundComponent||console.warn(`Warning: A notFoundError was encountered on the route with ID "${o.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`),(0,Fe.jsx)(is,{}))}i(Ae,"renderRouteNotFound");var ls=k(rt(),1);function us(t){return null}i(us,"getScrollRestorationScriptForRouter");function fs(){let t=us(D());return t?(0,ls.jsx)(cs,{children:t}):null}i(fs,"ScrollRestoration");var K=k(j(),1),N=k(rt(),1);var pn=i((t,o)=>t.routeId===o.routeId&&t._displayPending===o._displayPending,"matchViewFieldsEqual"),mn=i((t,o)=>t[0]===o[0]&&t[1]===o[1],"outletMatchSelectionEqual"),Be=K.memo(i(function({matchId:o}){let e=D();if(!1){let a=e.stores.matchStores.get(o)?.get();if(!a)throw new Error(`Invariant failed: Could not find match for matchId "${o}". Please file an issue!`);let f=a.routeId,c=e.routesById[f].parentRoute?.id;return(0,N.jsx)(ds,{router:e,matchId:o,resetKey:e.stores.loadedAt.get(),matchState:{routeId:f,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:c}})}let s=e.stores.matchStores.get(o);if(!s)throw new Error(`Invariant failed: Could not find match for matchId "${o}". Please file an issue!`);let r=B(e.stores.loadedAt,a=>a),n=B(s,a=>a,pn);return(0,N.jsx)(ds,{router:e,matchId:o,resetKey:r,matchState:K.useMemo(()=>{let a=n.routeId,f=e.routesById[a].parentRoute?.id;return{routeId:a,ssr:n.ssr,_displayPending:n._displayPending,parentRouteId:f}},[n._displayPending,n.routeId,n.ssr,e.routesById])})},"MatchImpl"));function ds({router:t,matchId:o,resetKey:e,matchState:s}){let r=t.routesById[s.routeId],n=r.options.pendingComponent??t.options.defaultPendingComponent,a=n?(0,N.jsx)(n,{}):null,f=r.options.errorComponent??t.options.defaultErrorComponent,c=r.options.onCatch??t.options.defaultOnCatch,d=r.isRoot?r.options.notFoundComponent??t.options.notFoundRoute?.options.component:r.options.notFoundComponent,l=s.ssr===!1||s.ssr==="data-only",u=(!r.isRoot||r.options.wrapInSuspense||l)&&(r.options.wrapInSuspense??n??(r.options.errorComponent?.preload||l))?K.Suspense:_t,p=f?Ot:_t,h=d?ns:_t;return(0,N.jsxs)(r.isRoot?r.options.shellComponent??_t:_t,{children:[(0,N.jsx)(Mt.Provider,{value:o,children:(0,N.jsx)(u,{fallback:a,children:(0,N.jsx)(p,{getResetKey:i(()=>e,"getResetKey"),errorComponent:f||Nt,onCatch:i((m,y)=>{if(A(m))throw m.routeId??=s.routeId,m;console.warn(`Warning: Error in route match: ${o}`),c?.(m,y)},"onCatch"),children:(0,N.jsx)(h,{fallback:i(m=>{if(m.routeId??=s.routeId,!d||m.routeId&&m.routeId!==s.routeId||!m.routeId&&!r.isRoot)throw m;return K.createElement(d,m)},"fallback"),children:l||s._displayPending?(0,N.jsx)(Yr,{fallback:a,children:(0,N.jsx)(hs,{matchId:o})}):(0,N.jsx)(hs,{matchId:o})})})})}),s.parentRouteId===X?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(gn,{}),t.options.scrollRestoration&&!1?(0,N.jsx)(fs,{}):null]}):null]})}i(ds,"MatchView");function gn(){let t=D();if(!1)return null;let o=K.useRef();return Tt(()=>{let e=t.stores.resolvedLocation.get(),s=o.current;e&&(!s||s.href!==e.href)&&t.emit({type:"onRendered",...ht(t.stores.location.get(),s??e)}),o.current=e},[B(t.stores.resolvedLocation,e=>e?.state.__TSR_key),t]),null}i(gn,"OnRendered");var hs=K.memo(i(function({matchId:o}){let e=D(),s=i((l,u)=>e.getMatch(l.id)?._nonReactive[u]??l._nonReactive[u],"getMatchPromise");if(!1){let l=e.stores.matchStores.get(o)?.get();if(!l)throw new Error(`Invariant failed: Could not find match for matchId "${o}". Please file an issue!`);let u=l.routeId,p=e.routesById[u],h=(e.routesById[u].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:u,loaderDeps:l.loaderDeps,params:l._strictParams,search:l._strictSearch}),m=h?JSON.stringify(h):void 0,y=p.options.component??e.options.defaultComponent,g=y?(0,N.jsx)(y,{},m):(0,N.jsx)(Ao,{});if(l._displayPending)throw s(l,"displayPendingPromise");if(l._forcePending)throw s(l,"minPendingPromise");if(l.status==="pending")throw s(l,"loadPromise");if(l.status==="notFound"){if(!A(l.error))throw new Error("Invariant failed: Expected a notFound error");return Ae(e,p,l.error)}if(l.status==="redirected")throw H(l.error)?s(l,"loadPromise"):new Error("Invariant failed: Expected a redirect error");return l.status==="error"?(0,N.jsx)((p.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:l.error,reset:void 0,info:{componentStack:""}}):g}let r=e.stores.matchStores.get(o);if(!r)throw new Error(`Invariant failed: Could not find match for matchId "${o}". Please file an issue!`);let n=B(r,l=>l),a=n.routeId,f=e.routesById[a],c=K.useMemo(()=>{let l=(e.routesById[a].options.remountDeps??e.options.defaultRemountDeps)?.({routeId:a,loaderDeps:n.loaderDeps,params:n._strictParams,search:n._strictSearch});return l?JSON.stringify(l):void 0},[a,n.loaderDeps,n._strictParams,n._strictSearch,e.options.defaultRemountDeps,e.routesById]),d=K.useMemo(()=>{let l=f.options.component??e.options.defaultComponent;return l?(0,N.jsx)(l,{},c):(0,N.jsx)(Ao,{})},[c,f.options.component,e.options.defaultComponent]);if(n._displayPending)throw s(n,"displayPendingPromise");if(n._forcePending)throw s(n,"minPendingPromise");if(n.status==="pending"){let l=f.options.pendingMinMs??e.options.defaultPendingMinMs;if(l){let u=e.getMatch(n.id);if(u&&!u._nonReactive.minPendingPromise&&!!1){let p=ct();u._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),u._nonReactive.minPendingPromise=void 0},l)}}throw s(n,"loadPromise")}if(n.status==="notFound"){if(!A(n.error))throw new Error("Invariant failed: Expected a notFound error");return Ae(e,f,n.error)}if(n.status==="redirected")throw H(n.error)?s(n,"loadPromise"):new Error("Invariant failed: Expected a redirect error");if(n.status==="error"){if(!1)return(0,N.jsx)((f.options.errorComponent??e.options.defaultErrorComponent)||Nt,{error:n.error,reset:void 0,info:{componentStack:""}});throw n.error}return d},"MatchInnerImpl")),Ao=K.memo(i(function(){let o=D(),e=K.useContext(Mt),s,r=!1,n;if(!1){let d=o.stores.matches.get(),l=e?d.findIndex(p=>p.id===e):-1,u=l>=0?d[l]:void 0;s=u?.routeId,r=u?.globalNotFound??!1,n=l>=0?d[l+1]?.id:void 0}else{let d=e?o.stores.matchStores.get(e):void 0;[s,r]=B(d,l=>[l?.routeId,l?.globalNotFound??!1],mn),n=B(o.stores.matchesId,l=>l[l.findIndex(u=>u===e)+1])}let a=s?o.routesById[s]:void 0,f=o.options.defaultPendingComponent?(0,N.jsx)(o.options.defaultPendingComponent,{}):null;if(r){if(!a)throw new Error("Invariant failed: Could not resolve route for Outlet render");return Ae(o,a,void 0)}if(!n)return null;let c=(0,N.jsx)(Be,{matchId:n});return s===X?(0,N.jsx)(K.Suspense,{fallback:f,children:c}):c},"OutletImpl"));var Ct=k(j(),1);function ps(){let t=D(),o=Ct.useRef({router:t,mounted:!1}),[e,s]=Ct.useState(!1),r=B(t.stores.isLoading,u=>u),n=B(t.stores.hasPending,u=>u),a=ke(r),f=r||e||n,c=ke(f),d=r||n,l=ke(d);return t.startTransition=u=>{s(!0),Ct.startTransition(()=>{u(),s(!1)})},Ct.useEffect(()=>{let u=t.history.subscribe(t.load),p=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Q(t.latestLocation.publicHref)!==Q(p.publicHref)&&t.commitLocation({...p,replace:!0}),()=>{u()}},[t,t.history]),Tt(()=>{if(typeof window<"u"&&t.ssr||o.current.router===t&&o.current.mounted)return;o.current={router:t,mounted:!0},i(async()=>{try{await t.load()}catch(p){console.error(p)}},"tryLoad")()},[t]),Tt(()=>{a&&!r&&t.emit({type:"onLoad",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[a,t,r]),Tt(()=>{l&&!d&&t.emit({type:"onBeforeRouteMount",...ht(t.stores.location.get(),t.stores.resolvedLocation.get())})},[d,l,t]),Tt(()=>{if(c&&!f){let u=ht(t.stores.location.get(),t.stores.resolvedLocation.get());t.emit({type:"onResolved",...u}),re(()=>{t.stores.status.set("idle"),t.stores.resolvedLocation.set(t.stores.location.get())})}},[f,c,t]),null}i(ps,"Transitioner");var $e=k(j(),1),ft=k(rt(),1);function ms(){let t=D(),o=t.routesById[X].options.pendingComponent??t.options.defaultPendingComponent,e=o?(0,ft.jsx)(o,{}):null,s=(0,ft.jsxs)(typeof document<"u"&&t.ssr?_t:$e.Suspense,{fallback:e,children:[!!1&&(0,ft.jsx)(ps,{}),(0,ft.jsx)(vn,{})]});return t.options.InnerWrap?(0,ft.jsx)(t.options.InnerWrap,{children:s}):s}i(ms,"Matches");function vn(){let t=D(),o=!1,e=o?t.stores.firstId.get():B(t.stores.firstId,n=>n),s=o?t.stores.loadedAt.get():B(t.stores.loadedAt,n=>n),r=e?(0,ft.jsx)(Be,{matchId:e}):null;return(0,ft.jsx)(Mt.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?r:(0,ft.jsx)(Ot,{getResetKey:i(()=>s,"getResetKey"),errorComponent:Nt,onCatch:n=>{console.warn("Warning: The following error wasn't caught by any route! At the very least, consider setting an 'errorComponent' in your RootRoute!"),console.warn(`Warning: ${n.message||n.toString()}`)},children:r})})}i(vn,"MatchesInner");var gs=i(t=>({createMutableStore:Me,createReadonlyStore:Me,batch:re}),"getStoreFactory");var yn=i(t=>new vs(t),"createRouter"),vs=class extends go{static{i(this,"Router")}constructor(t){super(t,gs)}};var Eu=k(j(),1),ne=k(rt(),1);function ys({router:t,children:o,...e}){mt(e)&&t.update({...t.options,...e,context:{...t.options.context,...e.context}});let s=(0,ne.jsx)(le.Provider,{value:t,children:o});return t.options.Wrap?(0,ne.jsx)(t.options.Wrap,{children:s}):s}i(ys,"RouterContextProvider");function Rn({router:t,...o}){return(0,ne.jsx)(ys,{router:t,...o,children:(0,ne.jsx)(ms,{})})}i(Rn,"RouterProvider");function Sn(t){let o=D({warn:t?.router===void 0}),e=t?.router||o;if(!1){let s=e.stores.__store.get();return t?.select?t.select(s):s}return B(e.stores.__store,bo(t,e))}i(Sn,"useRouterState");export{po as a,Hs as b,D as c,Ee as d,Te as e,dn as f,hn as g,Ao as h,yn as i,Rn as j,Sn as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,e as v,g as b,h as y,j as g}from"./chunk-RRCPZMC2.js";var h=v(b(),1);var t=v(y(),1);var E=u(N=>{let e=(0,h.c)(19),{action:a,className:f,description:c,icon:m,testId:x,title:p}=N,s;e[0]!==f?(s=g("flex flex-col items-center justify-center gap-3 rounded-lg border border-dashed border-border px-6 py-14 text-center",f),e[0]=f,e[1]=s):s=e[1];let i;e[2]!==m?(i=m!==void 0&&(0,t.jsxDEV)("span",{className:"flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground [&_svg]:size-5",children:m},void 0,!1),e[2]=m,e[3]=i):i=e[3];let l;e[4]!==p?(l=(0,t.jsxDEV)("p",{className:"text-sm font-medium text-foreground",children:p},void 0,!1),e[4]=p,e[5]=l):l=e[5];let r;e[6]!==c?(r=c!==void 0&&(0,t.jsxDEV)("p",{className:"max-w-sm text-sm text-muted-foreground",children:c},void 0,!1),e[6]=c,e[7]=r):r=e[7];let d;e[8]!==l||e[9]!==r?(d=(0,t.jsxDEV)("div",{className:"flex flex-col gap-1",children:[l,r]},void 0,!0),e[8]=l,e[9]=r,e[10]=d):d=e[10];let o;e[11]!==a?(o=a!==void 0&&(0,t.jsxDEV)("div",{className:"mt-1 flex items-center gap-2",children:a},void 0,!1),e[11]=a,e[12]=o):o=e[12];let n;return e[13]!==s||e[14]!==i||e[15]!==d||e[16]!==o||e[17]!==x?(n=(0,t.jsxDEV)("div",{className:s,"data-testid":x,children:[i,d,o]},void 0,!0),e[13]=s,e[14]=i,e[15]=d,e[16]=o,e[17]=x,e[18]=n):n=e[18],n},"EmptyState");export{E as a};
|